{"version":3,"file":"preview.mjs","sources":["../../../../server/src/preview/routes/preview.ts"],"sourcesContent":["import type { Plugin } from '@strapi/types';\n\nconst info = { pluginName: 'content-manager', type: 'admin' };\n\nconst previewRouter: Plugin.LoadedPlugin['routes'][string] = {\n type: 'admin',\n routes: [\n {\n method: 'GET',\n info,\n path: '/preview/url/:contentType',\n handler: 'preview.getPreviewUrl',\n config: {\n policies: ['admin::isAuthenticatedAdmin'],\n },\n },\n {\n method: 'GET',\n info,\n path: '/preview/script',\n handler: 'preview.getPreviewScript',\n // Public: the script is non-sensitive (it runs on the user's public site) and\n // is convenience-fetched by the admin to inject into the preview iframe.\n config: {\n auth: false,\n },\n },\n ],\n};\n\nexport { previewRouter };\n"],"names":["info","pluginName","type","previewRouter","routes","method","path","handler","config","policies","auth"],"mappings":"AAEA,MAAMA,IAAAA,GAAO;IAAEC,UAAAA,EAAY,iBAAA;IAAmBC,IAAAA,EAAM;AAAQ,CAAA;AAE5D,MAAMC,aAAAA,GAAuD;IAC3DD,IAAAA,EAAM,OAAA;IACNE,MAAAA,EAAQ;AACN,QAAA;YACEC,MAAAA,EAAQ,KAAA;AACRL,YAAAA,IAAAA;YACAM,IAAAA,EAAM,2BAAA;YACNC,OAAAA,EAAS,uBAAA;YACTC,MAAAA,EAAQ;gBACNC,QAAAA,EAAU;AAAC,oBAAA;AAA8B;AAC3C;AACF,SAAA;AACA,QAAA;YACEJ,MAAAA,EAAQ,KAAA;AACRL,YAAAA,IAAAA;YACAM,IAAAA,EAAM,iBAAA;YACNC,OAAAA,EAAS,0BAAA;;;YAGTC,MAAAA,EAAQ;gBACNE,IAAAA,EAAM;AACR;AACF;AACD;AACH;;;;"}