{"version":3,"file":"chunk.250.5c2b082dc4052fe4d0ff.js","names":["Object","value","exports","html","_options","options","assign","createDocument","Parser","DOMParser","window","Error","docHtml","parseFromString","cleanHtml","allowBr","replace","removeCodeWrappers","trim","doc","body","textContent","querySelectorAll","forEach","element","tagName","querySelector","replaceWith","createElement","length","space","createTextNode","remove","firstChildInnerContent","firstElementChild","innerHTML","e","t","r","clean_basic_html_js_1","require","enumerable","get","cleanBasicHtml","kg_converters_js_1","lexicalToMobiledoc","mobiledocToLexical","lexical_to_mobiledoc_js_1","mobiledoc_to_lexical_js_1","serializedLexical","JSON","stringify","BLANK_DOC","lexical","parse","root","mobiledoc","version","MOBILEDOC_VERSION","ghostVersion","GHOST_VERSION","atoms","cards","markups","sections","children","child","type","addTextSection","HEADING_TYPES","includes","tag","listChild","listItems","listRoot","flatListItems","traverse","item","grandchild","splice","indexOf","push","listItemChild","markers","buildMarkers","section","KNOWN_CARDS","cardType","cardName","CARD_NAME_MAP","payload","key","keys","CARD_PROPERTY_MAP","map","entries","card","L_FORMAT_MAP","Map","TEXT_TYPES","codeblock","horizontalrule","embed","embedType","getOrSetMarkupIndex","markup","index","findIndex","m","childWithFormats","openMarkups","childIndex","format","openedFormats","closedFormatCount","readFormat","nextFormats","firstMissingFormatIndex","slice","markupIndexes","text","linkMarkup","url","linkMarkupIndex","linkChild","linkChildIndex","openedMarkupIndexes","closedMarkupCount","atomIndex","atom","formats","serializedMobiledoc","direction","indent","sectionTypeIdentifier","lexicalChild","lexicalNode","createEmptyLexicalNode","populateLexicalNodeWithMarkers","listNode","listType","start","listItem","i","listItemNode","cardIndex","oldName","newName","CARD_FIXES_MAP","TAG_TO_LEXICAL_NODE","p","h1","h2","h3","h4","h5","h6","blockquote","aside","a","rel","target","title","ATOM_TO_LEXICAL_NODE","MARKUP_TO_FORMAT","strong","b","em","s","u","code","sub","sup","hr","callout","backgroundColor","match","linkNode","href","openLinkMarkup","textTypeIdentifier","openMarkupsIndexes","numberOfClosedMarkups","atomName","embedChildNode","markupIndex","attrs","undefined","convertMarkupTagsToLexicalFormatBitmask","j","pop","detail","mode","style","attributes","nodeParams","parentNode","childNode","tags","webpackContext","req","id","webpackContextResolve","__webpack_require__","o","resolve","module","_eai_r","_eai_d","define","defineProperty","Symbol","toStringTag","dataType","configDataType","useBrowseConfig","createQuery","path","DEFAULT_UPGRADE_ROUTE","hasSendingDomain","config","sendingDomain","hostSettings","managedEmail","isManagedEmail","enabled","upgradeRoute","configured","billing","upgradeUrl","require_hooks_use_handle_error","require_utils_api_fetch_api","_tanstack_react_query","react","usersDataType","currentUserUrl","apiUrl","include","currentUserQueryKey","useCurrentUser","fetchApi","useFetchApi","handleError","result","useQuery","queryKey","queryFn","select","data","users","useEffect","error","require_utils_api_hooks","require_utils_api_update_queries","useBrowseOffers","defaultSearchParams","useBrowseOffersById","createQueryWithId","useEditOffer","createMutation","method","offer","offers","updateQueries","emberUpdateType","update","updateQueryCache","useAddOffer","insertToQueryCache","useInvalidateOffers","queryClient","useQueryClient","invalidateQueries","useBrowsePosts","useBrowsePostsInfinite","createInfiniteQuery","defaultNextPageParams","lastPage","otherParams","meta","pagination","next","page","toString","returnData","originalData","pages","posts","flatMap","isEnd","getPost","useDeletePost","useImportContentCSV","retry","file","formData","FormData","append","useBrowseSettings","group","useEditSettings","settings","newData","filters","predicate","query","useRegenerateAccessCode","useDeleteStripeSettings","useTestSlack","checkStripeEnabled","hasSetting","some","setting","hasDirectKeys","hasConnectKeys","stripeDirect","getSettingValue","find","d","getSettingValues","humanizeSettingKey","char","toUpperCase","RegExp","join","isSettingReadOnly","is_read_only","require_hooks_use_confirm_unload","require_hooks_use_form","require_hooks_use_filterable_api","require_hooks_use_koenig_file_upload","require_hooks_use_koenig_fetch_embed","require_hooks_use_koenig_link_suggestions","require_hooks_use_feature_flag","require_hooks_use_pintura_config","koenigFileUploadTypes","useConfirmUnload","useFeatureFlag","useFilterableApi","useForm","useHandleError","useKoenigFetchEmbed","useKoenigFileUpload","useKoenigLinkSuggestions","usePinturaConfig","require_rolldown_runtime","__toESM","shouldConfirmUnload","handleBeforeUnload","event","preventDefault","returnValue","addEventListener","removeEventListener","require_api_config","flag","refetchOnMount","labs","_tryghost_nql_string","filterData","filterKey","input","filter","toLowerCase","responseKey","limit","useRef","loadData","async","current","allLoaded","lastInput","response","escapeNqlString","loadInitialValues","values","missingValues","additionalData","initialState","savingDelay","savedDelay","onSave","onSaveError","onSavedStateReset","onSaveCompleted","onValidate","formState","setFormState","useState","saveState","setSaveState","errors","setErrors","setTimeout","state","isValid","errs","Boolean","validate","useCallback","newErrors","handleSave","force","fakeWhenUnchanged","timeBefore","Date","now","duration","Promise","updateForm","updater","okVariant","okLabel","okProps","disabled","variant","label","reset","clearError","field","require_providers_framework_provider","require_utils_errors","_sentry_react","sonner","showErrorToast","message","toast","dismiss","sentryDSN","useFramework","withToast","console","SessionExpiredError","withScope","scope","APIError","setTag","status","captureException","getErrorMessage","require_utils_helpers","oembedUrl","URL","getGhostPaths","apiRoot","location","origin","searchParams","set","image","mimeTypes","extensions","endpoint","requestMethod","resourceName","video","audio","mediaThumbnail","getStringAtPath","maybeObj","progress","setProgress","isLoading","setLoading","filesNumber","setFilesNumber","progressTracker","updateProgress","size","totalProgress","Math","round","defaultValidator","extension","exec","name","uploadFile","fileFormData","uploadResponse","onUploadProgress","uploadProgress","responseUrl","resource","Array","isArray","fileName","context","upload","files","validationResult","uploadPromises","uploadResult","all","clear","require_api_offers","require_api_posts","siteUrl","membersSignupAccess","donationsEnabled","recommendationsEnabled","includeShareLink","shareLinkLabel","offersData","latestPostsData","fields","order","searchPosts","searchPages","defaultLinks","useMemo","items","post","visibility","publishedAt","published_at","fetchAutocompleteLinks","redemption_type","searchLinks","term","require_api_current_user","usePermission","requiredRoles","currentUser","currentUserRoles","roles","role","require_api_settings","parseOptionalString","TypeError","resolveUrl","startsWith","adminRoot","configData","settingsData","pinturaConfig","pintura","isEnabled","fallbackJsUrl","fallbackCssUrl","configJsUrl","configCssUrl","js","css","jsUrl","cssUrl","require_utils_query_client","react_jsx_runtime","FrameworkContext","createContext","externalNavigate","unsplashConfig","Authorization","onUpdate","onInvalidate","onDelete","FrameworkProvider","queryClientOverride","props","jsx","ErrorBoundary","QueryClientProvider","client","Provider","useContext","__create","create","__defProp","__getOwnPropDesc","getOwnPropertyDescriptor","__getOwnPropNames","getOwnPropertyNames","__getProtoOf","getPrototypeOf","__hasOwnProp","prototype","hasOwnProperty","mod","isNodeMode","to","from","except","desc","n","call","__copyProps","k","bind","__esModule","require_utils_api_handle_response","xhrHeadersToFetchHeaders","xhr","Headers","headerLines","getAllResponseHeaders","split","headerLine","separatorIndex","headerName","headerValue","GHOST_API_REQUEST","SESSION_API_REQUEST","UNAUTHENTICATED_ADMIN_ROUTE","sessionExpiryHandled","isSessionExpiry","test","redirectOnSessionExpiry","pathname","hash","fetchWithXhr","headers","credentials","signal","reject","onabort","DOMException","aborted","XMLHttpRequest","open","withCredentials","responseType","setRequestHeader","onprogress","lengthComputable","loaded","total","onload","Response","statusText","onerror","onSignalAbort","abort","onloadend","send","search","URLSearchParams","timeout","controller","AbortController","requestInit","attempts","retryingMs","startTime","retryPeriods","retryableErrors","ServerUnreachableError","MaintenanceError","getErrorData","errorName","totalSeconds","server","fetchFn","fetch","timeoutHandle","errorClass","captureMessage","extra","TimeoutError","UnauthorizedError","cause","newError","clearTimeout","UnsupportedMediaTypeError","RequestEntityTooLargeError","json","ok","blob","arrayBuffer","contentType","VersionMismatchError","ValidationError","ThemeValidationError","HostLimitError","EmailError","JSONError","require_hooks_use_permissions","hasPermission","permissions","defaultErrorHandler","getNextPageParams","nextPageParams","useInfiniteQuery","pageParam","initialPageParam","getNextPageParam","mutateOptions","useMutation","mutationFn","requestOptions","generatedBody","requestBody","onSuccess","dataTypes","setQueriesData","deleteFromQueryCache","idsFromPayload","_","currentData","deletedIds","recordsToInsert","getRecords","concat","updatedRecords","updated","reduce","record","constructor","errorOptions","super","this","errorsWithMessage","AlreadyExistsError","fallback","apiError","subdir","substr","assetRoot","downloadFile","iframe","document","getElementById","display","setAttribute","getFilenameFromContentDisposition","header","extendedMatch","singleQuote","extValue","firstQuote","secondQuote","encoded","decodeURIComponent","quotedMatch","unquotedMatch","blobDownload","fallbackFilename","filename","blobUrl","createObjectURL","download","appendChild","click","revokeObjectURL","blobDownloadFromEndpoint","downloadFromEndpoint","adminXQueryClient","QueryClient","defaultOptions","queries","refetchOnWindowFocus","staleTime","gcTime","networkMode","__TANSTACK_QUERY_CLIENT__"],"sources":["webpack://__ember_auto_import__/koenig/kg-clean-basic-html/build/cjs/clean-basic-html.js","webpack://__ember_auto_import__/koenig/kg-clean-basic-html/build/cjs/index.js","webpack://__ember_auto_import__/koenig/kg-converters/build/cjs/index.js","webpack://__ember_auto_import__/koenig/kg-converters/build/cjs/kg-converters.js","webpack://__ember_auto_import__/koenig/kg-converters/build/cjs/lexical-to-mobiledoc.js","webpack://__ember_auto_import__/koenig/kg-converters/build/cjs/mobiledoc-to-lexical.js","webpack://__ember_auto_import__/home/runner/work/Ghost/Ghost/apps/node_modules/.pnpm/moment@2.30.1/node_modules/moment/locale|sync|/^\\.\\/.*$/","webpack://__ember_auto_import__/javascript/tmp/broccoli--2950-9LlCcwP6d6IQ/cache-685-webpack_bundler_ember_auto_import_webpack/l.cjs","webpack://__ember_auto_import__/admin-x-framework/dist/api/config.cjs","webpack://__ember_auto_import__/admin-x-framework/dist/api/current-user.cjs","webpack://__ember_auto_import__/admin-x-framework/dist/api/offers.cjs","webpack://__ember_auto_import__/admin-x-framework/dist/api/posts.cjs","webpack://__ember_auto_import__/admin-x-framework/dist/api/settings.cjs","webpack://__ember_auto_import__/admin-x-framework/dist/hooks.cjs","webpack://__ember_auto_import__/admin-x-framework/dist/hooks/use-confirm-unload.cjs","webpack://__ember_auto_import__/admin-x-framework/dist/hooks/use-feature-flag.cjs","webpack://__ember_auto_import__/admin-x-framework/dist/hooks/use-filterable-api.cjs","webpack://__ember_auto_import__/admin-x-framework/dist/hooks/use-form.cjs","webpack://__ember_auto_import__/admin-x-framework/dist/hooks/use-handle-error.cjs","webpack://__ember_auto_import__/admin-x-framework/dist/hooks/use-koenig-fetch-embed.cjs","webpack://__ember_auto_import__/admin-x-framework/dist/hooks/use-koenig-file-upload.cjs","webpack://__ember_auto_import__/admin-x-framework/dist/hooks/use-koenig-link-suggestions.cjs","webpack://__ember_auto_import__/admin-x-framework/dist/hooks/use-permissions.cjs","webpack://__ember_auto_import__/admin-x-framework/dist/hooks/use-pintura-config.cjs","webpack://__ember_auto_import__/admin-x-framework/dist/providers/framework-provider.cjs","webpack://__ember_auto_import__/admin-x-framework/dist/rolldown-runtime-D6vf50IK.cjs","webpack://__ember_auto_import__/admin-x-framework/dist/utils/api/fetch-api.cjs","webpack://__ember_auto_import__/admin-x-framework/dist/utils/api/handle-response.cjs","webpack://__ember_auto_import__/admin-x-framework/dist/utils/api/hooks.cjs","webpack://__ember_auto_import__/admin-x-framework/dist/utils/api/update-queries.cjs","webpack://__ember_auto_import__/admin-x-framework/dist/utils/errors.cjs","webpack://__ember_auto_import__/admin-x-framework/dist/utils/helpers.cjs","webpack://__ember_auto_import__/admin-x-framework/dist/utils/query-client.cjs","webpack://__ember_auto_import__/src/index.ts"],"sourcesContent":["\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.cleanBasicHtml = cleanBasicHtml;\nfunction removeCodeWrappers(html) {\n    return html.replace(/<code\\b[^>]*>((.*?){.*?}(.*?))<\\/code>/gi, '$1');\n}\nfunction cleanBasicHtml(html = '', _options = {}) {\n    const defaults = {};\n    const options = Object.assign({}, defaults, _options);\n    if (!options.createDocument) {\n        const Parser = (typeof DOMParser !== 'undefined' && DOMParser) ||\n            (typeof window !== 'undefined' && window.DOMParser);\n        if (!Parser) {\n            throw new Error('cleanBasicHtml() must be passed a `createDocument` function as an option when used in a non-browser environment');\n        }\n        options.createDocument = function (docHtml) {\n            const parser = new Parser();\n            return parser.parseFromString(docHtml, 'text/html');\n        };\n    }\n    let cleanHtml = html;\n    if (!options.allowBr || cleanHtml === '<br>') {\n        cleanHtml = cleanHtml.replace(/<br\\s?\\/?>/g, ' ');\n    }\n    if (options.removeCodeWrappers) {\n        cleanHtml = removeCodeWrappers(cleanHtml);\n    }\n    cleanHtml = cleanHtml\n        .replace(/(\\s|&nbsp;){2,}/g, ' ')\n        .trim()\n        .replace(/^&nbsp;|&nbsp$/g, '')\n        .trim();\n    // remove any elements that have a blank textContent\n    if (cleanHtml) {\n        const doc = options.createDocument(cleanHtml);\n        // don't analyze the document if it's empty (can result in storing <br> tags if allowed)\n        if (doc.body.textContent === '') {\n            return '';\n        }\n        doc.body.querySelectorAll('*').forEach((element) => {\n            // Treat Zero Width Non-Joiner characters as spaces\n            if (!element.textContent?.trim().replace(/\\u200c+/g, '')) {\n                if (options.allowBr && element.tagName === 'BR') {\n                    // keep it\n                    return;\n                }\n                if (options.allowBr && element.querySelector('br')) {\n                    return element.replaceWith(doc.createElement('br'));\n                }\n                if (element.textContent && element.textContent.length > 0) {\n                    // keep a single space to avoid collapsing spaces\n                    const space = doc.createTextNode(' ');\n                    return element.replaceWith(space);\n                }\n                return element.remove();\n            }\n        });\n        if (options.firstChildInnerContent && doc.body.firstElementChild) {\n            cleanHtml = doc.body.firstElementChild.innerHTML.trim();\n        }\n        else {\n            cleanHtml = doc.body.innerHTML.trim();\n        }\n    }\n    return cleanHtml;\n}\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.cleanBasicHtml = void 0;\nvar clean_basic_html_js_1 = require(\"./clean-basic-html.js\");\nObject.defineProperty(exports, \"cleanBasicHtml\", { enumerable: true, get: function () { return clean_basic_html_js_1.cleanBasicHtml; } });\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.mobiledocToLexical = exports.lexicalToMobiledoc = void 0;\nvar kg_converters_js_1 = require(\"./kg-converters.js\");\nObject.defineProperty(exports, \"lexicalToMobiledoc\", { enumerable: true, get: function () { return kg_converters_js_1.lexicalToMobiledoc; } });\nObject.defineProperty(exports, \"mobiledocToLexical\", { enumerable: true, get: function () { return kg_converters_js_1.mobiledocToLexical; } });\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.mobiledocToLexical = exports.lexicalToMobiledoc = void 0;\nconst lexical_to_mobiledoc_js_1 = require(\"./lexical-to-mobiledoc.js\");\nObject.defineProperty(exports, \"lexicalToMobiledoc\", { enumerable: true, get: function () { return lexical_to_mobiledoc_js_1.lexicalToMobiledoc; } });\nconst mobiledoc_to_lexical_js_1 = require(\"./mobiledoc-to-lexical.js\");\nObject.defineProperty(exports, \"mobiledocToLexical\", { enumerable: true, get: function () { return mobiledoc_to_lexical_js_1.mobiledocToLexical; } });\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.lexicalToMobiledoc = lexicalToMobiledoc;\nconst MOBILEDOC_VERSION = '0.3.1';\nconst GHOST_VERSION = '4.0';\nconst BLANK_DOC = {\n    version: MOBILEDOC_VERSION,\n    ghostVersion: GHOST_VERSION,\n    markups: [],\n    atoms: [],\n    cards: [],\n    sections: [[1, 'p', [[0, [], 0, '']]]],\n};\nconst MD_TEXT_SECTION = 1;\nconst MD_LIST_SECTION = 3;\nconst MD_CARD_SECTION = 10;\nconst MD_TEXT_MARKER = 0;\nconst MD_ATOM_MARKER = 1;\nconst L_IS_BOLD = 1;\nconst L_IS_ITALIC = 1 << 1;\nconst L_IS_STRIKETHROUGH = 1 << 2;\nconst L_IS_UNDERLINE = 1 << 3;\nconst L_IS_CODE = 1 << 4;\nconst L_IS_SUBSCRIPT = 1 << 5;\nconst L_IS_SUPERSCRIPT = 1 << 6;\nconst L_FORMAT_MAP = new Map([\n    [L_IS_BOLD, 'strong'],\n    [L_IS_ITALIC, 'em'],\n    [L_IS_STRIKETHROUGH, 's'],\n    [L_IS_UNDERLINE, 'u'],\n    [L_IS_CODE, 'code'],\n    [L_IS_SUBSCRIPT, 'sub'],\n    [L_IS_SUPERSCRIPT, 'sup'],\n]);\nconst HEADING_TYPES = ['heading', 'extended-heading'];\nconst TEXT_TYPES = ['text', 'extended-text'];\n// TODO: Feels a little too explicit as it will need updating every time we add a new card.\n//\n// One alternative is to use a list of all built-in Lexical types and assume that anything\n// not listed is a card but that feels more dangerous.\n//\n// Another alternative is to grab the list of cards from kg-default-nodes but that's creating\n// more inter-dependencies that makes development setup tricky.\nconst KNOWN_CARDS = [\n    'audio',\n    'bookmark',\n    'button',\n    'callout',\n    'codeblock',\n    'email-cta',\n    'email',\n    'embed',\n    'file',\n    'gallery',\n    'header',\n    'horizontalrule',\n    'html',\n    'image',\n    'markdown',\n    'paywall',\n    'product',\n    'signup',\n    'toggle',\n    'video',\n];\nconst CARD_NAME_MAP = {\n    codeblock: 'code',\n    horizontalrule: 'hr',\n};\nconst CARD_PROPERTY_MAP = {\n    embed: {\n        embedType: 'type',\n    },\n};\nfunction lexicalToMobiledoc(serializedLexical) {\n    if (serializedLexical === null || serializedLexical === undefined || serializedLexical === '') {\n        return JSON.stringify(BLANK_DOC);\n    }\n    const lexical = JSON.parse(serializedLexical);\n    if (!lexical.root) {\n        return JSON.stringify(BLANK_DOC);\n    }\n    const mobiledoc = buildEmptyDoc();\n    lexical.root.children?.forEach((child) => addRootChild(child, mobiledoc));\n    return JSON.stringify(mobiledoc);\n}\n/* internal functions ------------------------------------------------------- */\nfunction buildEmptyDoc() {\n    return {\n        version: MOBILEDOC_VERSION,\n        ghostVersion: GHOST_VERSION,\n        atoms: [],\n        cards: [],\n        markups: [],\n        sections: [],\n    };\n}\nfunction getOrSetMarkupIndex(markup, mobiledoc) {\n    let index = mobiledoc.markups.findIndex((m) => m[0] === markup);\n    if (index === -1) {\n        mobiledoc.markups.push([markup]);\n        index = mobiledoc.markups.length - 1;\n    }\n    return index;\n}\nfunction getOrSetAtomIndex(atom, mobiledoc) {\n    let index = mobiledoc.atoms.findIndex((m) => m === atom);\n    if (index === -1) {\n        mobiledoc.atoms.push(atom);\n        index = mobiledoc.atoms.length - 1;\n    }\n    return index;\n}\nfunction addRootChild(child, mobiledoc) {\n    if (child.type === 'paragraph') {\n        addTextSection(child, mobiledoc);\n    }\n    if (HEADING_TYPES.includes(child.type)) {\n        addTextSection(child, mobiledoc, child.tag);\n    }\n    if (child.type === 'quote') {\n        addTextSection(child, mobiledoc, 'blockquote');\n    }\n    if (child.type === 'aside') {\n        addTextSection(child, mobiledoc, 'aside');\n    }\n    if (child.type === 'list') {\n        addListSection(child, mobiledoc, child.tag);\n    }\n    if (KNOWN_CARDS.includes(child.type)) {\n        addCardSection(child, mobiledoc);\n    }\n}\nfunction addTextSection(childWithFormats, mobiledoc, tagName = 'p') {\n    const markers = buildMarkers(childWithFormats, mobiledoc);\n    const section = [MD_TEXT_SECTION, tagName, markers];\n    mobiledoc.sections.push(section);\n}\nfunction addListSection(listChild, mobiledoc, tagName = 'ul') {\n    const listItems = buildListItems(listChild, mobiledoc);\n    const section = [MD_LIST_SECTION, tagName, listItems];\n    mobiledoc.sections.push(section);\n}\nfunction buildListItems(listRoot, mobiledoc) {\n    const listItems = [];\n    flattenListChildren(listRoot);\n    listRoot.children?.forEach((listItemChild) => {\n        if (listItemChild.type === 'listitem') {\n            const markers = buildMarkers(listItemChild, mobiledoc);\n            listItems.push(markers);\n        }\n    });\n    return listItems;\n}\nfunction flattenListChildren(listRoot) {\n    const flatListItems = [];\n    function traverse(item) {\n        item.children?.forEach((child) => {\n            child.children?.forEach((grandchild) => {\n                if (grandchild.type === 'list') {\n                    traverse(grandchild);\n                    child.children.splice(child.children.indexOf(grandchild), 1);\n                }\n            });\n            if (child.type === 'listitem' && child.children?.length) {\n                flatListItems.push(child);\n            }\n        });\n    }\n    traverse(listRoot);\n    listRoot.children = flatListItems;\n}\nfunction buildMarkers(childWithFormats, mobiledoc) {\n    const markers = [];\n    if (!childWithFormats.children?.length) {\n        markers.push([MD_TEXT_MARKER, [], 0, '']);\n    }\n    else {\n        // mobiledoc tracks opened/closed formats across markers whereas lexical\n        // lists all formats for each marker so we need to manually track open formats\n        let openMarkups = [];\n        // markup: a specific format, or tag name+attributes\n        // marker: a piece of text with 0 or more markups\n        childWithFormats.children.forEach((child, childIndex) => {\n            if (TEXT_TYPES.includes(child.type)) {\n                if (child.format !== 0) {\n                    // text child has formats, track which are new and which have closed\n                    const openedFormats = [];\n                    const childFormats = readFormat(child.format);\n                    let closedFormatCount = 0;\n                    childFormats.forEach((format) => {\n                        if (!openMarkups.includes(format)) {\n                            openMarkups.push(format);\n                            openedFormats.push(format);\n                        }\n                    });\n                    // mobiledoc will immediately close any formats if the next section doesn't use them or it's not a text section\n                    if (!childWithFormats.children[childIndex + 1] ||\n                        !TEXT_TYPES.includes(childWithFormats.children[childIndex + 1].type)) {\n                        // no more children, close all formats\n                        closedFormatCount = openMarkups.length;\n                        openMarkups = [];\n                    }\n                    else {\n                        const nextChild = childWithFormats.children[childIndex + 1];\n                        const nextFormats = readFormat(nextChild.format);\n                        const firstMissingFormatIndex = openMarkups.findIndex((format) => !nextFormats.includes(format));\n                        if (firstMissingFormatIndex !== -1) {\n                            const formatsToClose = openMarkups.slice(firstMissingFormatIndex);\n                            closedFormatCount = formatsToClose.length;\n                            openMarkups = openMarkups.slice(0, firstMissingFormatIndex);\n                        }\n                    }\n                    const markupIndexes = openedFormats.map((format) => getOrSetMarkupIndex(format, mobiledoc));\n                    markers.push([MD_TEXT_MARKER, markupIndexes, closedFormatCount, child.text]);\n                }\n                else {\n                    // text child has no formats so we close all formats in mobiledoc\n                    const closedFormatCount = openMarkups.length;\n                    openMarkups = [];\n                    markers.push([MD_TEXT_MARKER, [], closedFormatCount, child.text]);\n                }\n            }\n            if (child.type === 'link') {\n                const linkMarkup = ['a', ['href', child.url]];\n                const linkMarkupIndex = mobiledoc.markups.push(linkMarkup) - 1;\n                child.children?.forEach((linkChild, linkChildIndex) => {\n                    if (linkChild.format !== 0) {\n                        const openedMarkupIndexes = [];\n                        const openedFormats = [];\n                        // first child of a link opens the link markup\n                        if (linkChildIndex === 0) {\n                            openMarkups.push(linkMarkup);\n                            openedMarkupIndexes.push(linkMarkupIndex);\n                        }\n                        // text child has formats, track which are new and which have closed\n                        const childFormats = readFormat(linkChild.format);\n                        let closedMarkupCount = 0;\n                        childFormats.forEach((format) => {\n                            if (!openMarkups.includes(format)) {\n                                openMarkups.push(format);\n                                openedFormats.push(format);\n                            }\n                        });\n                        // mobiledoc will immediately close any formats if the next section doesn't use them\n                        if (!child.children[linkChildIndex + 1]) {\n                            // last child of a link closes all markups\n                            closedMarkupCount = openMarkups.length;\n                            openMarkups = [];\n                        }\n                        else {\n                            const nextChild = child.children[linkChildIndex + 1];\n                            const nextFormats = readFormat(nextChild.format);\n                            const firstMissingFormatIndex = openMarkups.findIndex((markup) => {\n                                const markupIsLink = JSON.stringify(markup) === JSON.stringify(linkMarkup);\n                                return !markupIsLink && !nextFormats.includes(markup);\n                            });\n                            if (firstMissingFormatIndex !== -1) {\n                                const formatsToClose = openMarkups.slice(firstMissingFormatIndex);\n                                closedMarkupCount = formatsToClose.length;\n                                openMarkups = openMarkups.slice(0, firstMissingFormatIndex);\n                            }\n                        }\n                        openedMarkupIndexes.push(...openedFormats.map((format) => getOrSetMarkupIndex(format, mobiledoc)));\n                        markers.push([MD_TEXT_MARKER, openedMarkupIndexes, closedMarkupCount, linkChild.text]);\n                    }\n                    else {\n                        const openedMarkupIndexes = [];\n                        // first child of a link opens the link markup\n                        if (linkChildIndex === 0) {\n                            openMarkups.push(linkMarkup);\n                            openedMarkupIndexes.push(linkMarkupIndex);\n                        }\n                        let closedMarkupCount = openMarkups.length - 1; // don't close the link markup, just the others\n                        // last child of a link closes all markups\n                        if (!child.children[linkChildIndex + 1]) {\n                            closedMarkupCount += 1; // close the link markup\n                            openMarkups = [];\n                        }\n                        markers.push([MD_TEXT_MARKER, openedMarkupIndexes, closedMarkupCount, linkChild.text]);\n                    }\n                });\n            }\n            if (child.type === 'linebreak') {\n                const atom = ['soft-return', '', {}];\n                const atomIndex = getOrSetAtomIndex(atom, mobiledoc);\n                markers.push([MD_ATOM_MARKER, [], 0, atomIndex]);\n            }\n        });\n    }\n    return markers;\n}\n// Lexical stores formats as a bitmask, so we need to read the bitmask to\n// determine which formats are present\nfunction readFormat(format) {\n    const formats = [];\n    L_FORMAT_MAP.forEach((value, key) => {\n        if ((format & key) !== 0) {\n            formats.push(value);\n        }\n    });\n    return formats;\n}\nfunction addCardSection(child, mobiledoc) {\n    const cardType = child.type;\n    let cardName = child.type;\n    // rename card if there's a difference between lexical/mobiledoc\n    if (CARD_NAME_MAP[cardName]) {\n        cardName = CARD_NAME_MAP[cardName];\n    }\n    // don't include type in the payload\n    const payload = {};\n    for (const key of Object.keys(child)) {\n        if (key !== 'type') {\n            payload[key] = child[key];\n        }\n    }\n    // rename any properties to match mobiledoc\n    if (CARD_PROPERTY_MAP[cardType]) {\n        const map = CARD_PROPERTY_MAP[cardType];\n        for (const [key, value] of Object.entries(map)) {\n            payload[value] = payload[key];\n            delete payload[key];\n        }\n    }\n    const card = [cardName, payload];\n    mobiledoc.cards.push(card);\n    const cardIndex = mobiledoc.cards.length - 1;\n    const section = [MD_CARD_SECTION, cardIndex];\n    mobiledoc.sections.push(section);\n}\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.mobiledocToLexical = mobiledocToLexical;\nconst BLANK_DOC = {\n    root: {\n        children: [],\n        direction: null,\n        format: '',\n        indent: 0,\n        type: 'root',\n        version: 1,\n    },\n};\nconst TAG_TO_LEXICAL_NODE = {\n    p: {\n        type: 'paragraph',\n    },\n    h1: {\n        type: 'heading',\n        tag: 'h1',\n    },\n    h2: {\n        type: 'heading',\n        tag: 'h2',\n    },\n    h3: {\n        type: 'heading',\n        tag: 'h3',\n    },\n    h4: {\n        type: 'heading',\n        tag: 'h4',\n    },\n    h5: {\n        type: 'heading',\n        tag: 'h5',\n    },\n    h6: {\n        type: 'heading',\n        tag: 'h6',\n    },\n    blockquote: {\n        type: 'quote',\n    },\n    aside: {\n        type: 'aside',\n    },\n    a: {\n        type: 'link',\n        rel: null,\n        target: null,\n        title: null,\n        url: null,\n    },\n};\nconst ATOM_TO_LEXICAL_NODE = {\n    'soft-return': {\n        type: 'linebreak',\n        version: 1,\n    },\n};\nconst MARKUP_TO_FORMAT = {\n    strong: 1,\n    b: 1,\n    em: 1 << 1,\n    i: 1 << 1,\n    s: 1 << 2,\n    u: 1 << 3,\n    code: 1 << 4,\n    sub: 1 << 5,\n    sup: 1 << 6,\n};\nconst CARD_NAME_MAP = {\n    code: 'codeblock',\n    hr: 'horizontalrule',\n};\nconst CARD_PROPERTY_MAP = {\n    embed: {\n        type: 'embedType',\n    },\n};\nconst CARD_FIXES_MAP = {\n    callout: (payload) => {\n        if (payload.backgroundColor && !payload.backgroundColor.match(/^[a-zA-Z\\d-]+$/)) {\n            payload.backgroundColor = 'white';\n        }\n        return payload;\n    },\n};\nfunction mobiledocToLexical(serializedMobiledoc) {\n    if (serializedMobiledoc === null ||\n        serializedMobiledoc === undefined ||\n        serializedMobiledoc === '') {\n        return JSON.stringify(BLANK_DOC);\n    }\n    const mobiledoc = JSON.parse(serializedMobiledoc);\n    if (!mobiledoc.sections) {\n        return JSON.stringify(BLANK_DOC);\n    }\n    const lexical = buildEmptyDoc();\n    mobiledoc.sections.forEach((child) => addRootChild(child, mobiledoc, lexical));\n    return JSON.stringify(lexical);\n}\n/* internal functions ------------------------------------------------------- */\nfunction buildEmptyDoc() {\n    return {\n        root: {\n            children: [],\n            direction: null,\n            format: '',\n            indent: 0,\n            type: 'root',\n            version: 1,\n        },\n    };\n}\nfunction addRootChild(child, mobiledoc, lexical) {\n    const sectionTypeIdentifier = child[0];\n    if (sectionTypeIdentifier === 1) {\n        // Markup (text) section\n        const lexicalChild = convertMarkupSectionToLexical(child, mobiledoc);\n        lexical.root.children.push(lexicalChild);\n        // Set direction to ltr if there is any text\n        // Otherwise direction should be null\n        // Not sure if this is necessary:\n        // if we don't plan to support RTL, we could just set 'ltr' in all cases and ignore null\n        if (lexicalChild.children && lexicalChild.children.length > 0) {\n            lexical.root.direction = 'ltr';\n        }\n    }\n    else if (sectionTypeIdentifier === 2) {\n        // Image section\n        // Not used in Ghost\n    }\n    else if (sectionTypeIdentifier === 3) {\n        // List section\n        const lexicalChild = convertListSectionToLexical(child, mobiledoc);\n        lexical.root.children.push(lexicalChild);\n        lexical.root.direction = 'ltr'; // mobiledoc only supports LTR\n    }\n    else if (sectionTypeIdentifier === 10) {\n        // Card section\n        const lexicalChild = convertCardSectionToLexical(child, mobiledoc);\n        lexical.root.children.push(lexicalChild);\n    }\n}\nfunction convertMarkupSectionToLexical(section, mobiledoc) {\n    const tagName = section[1]; // e.g. 'p'\n    const markers = section[2]; // e.g. [[0, [0], 0, \"Hello world\"]]\n    // Create an empty Lexical node from the tag name\n    // We will add nodes to the children array later\n    const lexicalNode = createEmptyLexicalNode(tagName);\n    populateLexicalNodeWithMarkers(lexicalNode, markers, mobiledoc);\n    return lexicalNode;\n}\nfunction populateLexicalNodeWithMarkers(lexicalNode, markers, mobiledoc) {\n    const markups = mobiledoc.markups;\n    const atoms = mobiledoc.atoms;\n    // Initiate some variables before looping over all the markers\n    const openMarkups = []; // tracks which markup tags are open for the current marker\n    let linkNode = undefined; // tracks current link node or undefined if no a tag is open\n    let href = undefined; // tracks the href for the current link node or undefined if no a tag is open\n    let rel = undefined; //tracks the rel attribute for the current link node or undefined if no a tag is open\n    let openLinkMarkup = false; // tracks whether the current node is a link node\n    // loop over markers and convert each one to lexical\n    for (let i = 0; i < markers.length; i++) {\n        // grab the attributes from the current marker\n        const [textTypeIdentifier, openMarkupsIndexes, numberOfClosedMarkups, value] = markers[i];\n        // Markers are either text (markup) or atoms\n        const markerType = textTypeIdentifier === 0 ? 'markup' : 'atom';\n        // If the current marker is an atom, convert the atom to Lexical and add to the node\n        if (markerType === 'atom') {\n            const atom = atoms[value];\n            const atomName = atom[0];\n            const childNode = ATOM_TO_LEXICAL_NODE[atomName];\n            embedChildNode(lexicalNode, childNode);\n            continue;\n        }\n        // calculate which markups are open for the current marker\n        openMarkupsIndexes.forEach((markupIndex) => {\n            const markup = markups[markupIndex];\n            // Extract the href from the markup if it's a link\n            if (markup[0] === 'a') {\n                openLinkMarkup = true;\n                const attrs = markup[1];\n                if (attrs && attrs[0] === 'href') {\n                    href = attrs[1];\n                }\n                if (attrs && attrs[2] === 'rel') {\n                    rel = attrs[3];\n                }\n            }\n            // Add the markup to the list of open markups\n            openMarkups.push(markup);\n        });\n        if (value !== undefined) {\n            // Convert the open markups to a bitmask compatible with Lexical\n            const format = convertMarkupTagsToLexicalFormatBitmask(openMarkups);\n            // If there is an open link tag, add the text to the link node\n            // Otherwise add the text to the parent node\n            if (openLinkMarkup) {\n                // link is open\n                // Create an empty link node if it doesn't exist already\n                linkNode =\n                    linkNode !== undefined\n                        ? linkNode\n                        : createEmptyLexicalNode('a', { url: href, rel: rel || null });\n                // Create a text node and add it to the link node\n                const textNode = createTextNode(value, format);\n                embedChildNode(linkNode, textNode);\n            }\n            else {\n                const textNode = createTextNode(value, format);\n                embedChildNode(lexicalNode, textNode);\n            }\n        }\n        // Close any markups that are closed after the current marker\n        // Remove any closed markups from openMarkups list\n        for (let j = 0; j < numberOfClosedMarkups; j++) {\n            // Remove the most recently opened markup from the list of open markups\n            const markup = openMarkups.pop();\n            // If we're closing a link tag, add the linkNode to the node\n            // Reset href and linkNode for the next markup\n            if (markup && markup[0] === 'a') {\n                embedChildNode(lexicalNode, linkNode);\n                openLinkMarkup = false;\n                href = undefined;\n                linkNode = undefined;\n            }\n        }\n    }\n}\n// Creates a text node from the given text and format\nfunction createTextNode(text, format) {\n    return {\n        detail: 0,\n        format: format,\n        mode: 'normal',\n        style: '',\n        text: text,\n        type: 'text',\n        version: 1,\n    };\n}\n// Creates an empty Lexical node from the given tag name and additional attributes\nfunction createEmptyLexicalNode(tagName, attributes = {}) {\n    const nodeParams = TAG_TO_LEXICAL_NODE[tagName];\n    const node = {\n        children: [],\n        direction: 'ltr',\n        format: '',\n        indent: 0,\n        ...nodeParams,\n        ...attributes,\n        type: nodeParams?.type || attributes.type || tagName,\n        version: 1,\n    };\n    return node;\n}\n// Adds a child node to a parent node\nfunction embedChildNode(parentNode, childNode) {\n    // If there is no child node, do nothing\n    if (!childNode) {\n        return;\n    }\n    // Add textNode to node's children\n    parentNode.children.push(childNode);\n    // If there is any text (e.g. not a blank text node), set the direction to ltr\n    if (childNode && 'text' in childNode && childNode.text) {\n        parentNode.direction = 'ltr';\n    }\n}\n// Lexical stores formats as a bitmask\n// Mobiledoc stores formats as a list of open markup tags\n// This function converts a list of open tags to a bitmask compatible with lexical\nfunction convertMarkupTagsToLexicalFormatBitmask(tags) {\n    let format = 0;\n    tags.forEach((tag) => {\n        const tagName = tag[0];\n        if (tagName in MARKUP_TO_FORMAT) {\n            format = format | MARKUP_TO_FORMAT[tagName];\n        }\n    });\n    return format;\n}\nfunction convertListSectionToLexical(child, mobiledoc) {\n    const tag = child[1];\n    const listItems = child[2];\n    const listType = tag === 'ul' ? 'bullet' : 'number';\n    const listNode = createEmptyLexicalNode(tag, {\n        tag,\n        type: 'list',\n        listType,\n        start: 1,\n        direction: 'ltr',\n    });\n    listItems?.forEach((listItem, i) => {\n        const listItemNode = createEmptyLexicalNode('li', {\n            type: 'listitem',\n            value: i + 1,\n            direction: 'ltr',\n        });\n        populateLexicalNodeWithMarkers(listItemNode, listItem, mobiledoc);\n        listNode.children.push(listItemNode);\n    });\n    return listNode;\n}\nfunction convertCardSectionToLexical(child, mobiledoc) {\n    const cardIndex = child[1];\n    let [cardName, payload] = mobiledoc.cards[cardIndex];\n    // rename card if there's a difference between mobiledoc and lexical\n    cardName = CARD_NAME_MAP[cardName] || cardName;\n    // rename any properties to match lexical\n    if (CARD_PROPERTY_MAP[cardName]) {\n        const map = CARD_PROPERTY_MAP[cardName];\n        for (const [oldName, newName] of Object.entries(map)) {\n            payload[newName] = payload[oldName];\n            delete payload[oldName];\n        }\n    }\n    // run any payload fixes\n    if (CARD_FIXES_MAP[cardName]) {\n        payload = CARD_FIXES_MAP[cardName](payload);\n    }\n    delete payload.type;\n    const decoratorNode = { type: cardName, ...payload };\n    return decoratorNode;\n}\n","var map = {\n\t\"./af\": 1199,\n\t\"./af.js\": 1199,\n\t\"./ar\": 36347,\n\t\"./ar-dz\": 77230,\n\t\"./ar-dz.js\": 77230,\n\t\"./ar-kw\": 63390,\n\t\"./ar-kw.js\": 63390,\n\t\"./ar-ly\": 65283,\n\t\"./ar-ly.js\": 65283,\n\t\"./ar-ma\": 30570,\n\t\"./ar-ma.js\": 30570,\n\t\"./ar-ps\": 15505,\n\t\"./ar-ps.js\": 15505,\n\t\"./ar-sa\": 94112,\n\t\"./ar-sa.js\": 94112,\n\t\"./ar-tn\": 20386,\n\t\"./ar-tn.js\": 20386,\n\t\"./ar.js\": 36347,\n\t\"./az\": 2067,\n\t\"./az.js\": 2067,\n\t\"./be\": 2405,\n\t\"./be.js\": 2405,\n\t\"./bg\": 77091,\n\t\"./bg.js\": 77091,\n\t\"./bm\": 36429,\n\t\"./bm.js\": 36429,\n\t\"./bn\": 88548,\n\t\"./bn-bd\": 62919,\n\t\"./bn-bd.js\": 62919,\n\t\"./bn.js\": 88548,\n\t\"./bo\": 94219,\n\t\"./bo.js\": 94219,\n\t\"./br\": 89248,\n\t\"./br.js\": 89248,\n\t\"./bs\": 30551,\n\t\"./bs.js\": 30551,\n\t\"./ca\": 36000,\n\t\"./ca.js\": 36000,\n\t\"./cs\": 46330,\n\t\"./cs.js\": 46330,\n\t\"./cv\": 32805,\n\t\"./cv.js\": 32805,\n\t\"./cy\": 51096,\n\t\"./cy.js\": 51096,\n\t\"./da\": 96035,\n\t\"./da.js\": 96035,\n\t\"./de\": 3015,\n\t\"./de-at\": 30917,\n\t\"./de-at.js\": 30917,\n\t\"./de-ch\": 24475,\n\t\"./de-ch.js\": 24475,\n\t\"./de.js\": 3015,\n\t\"./dv\": 29706,\n\t\"./dv.js\": 29706,\n\t\"./el\": 95637,\n\t\"./el.js\": 95637,\n\t\"./en-au\": 33146,\n\t\"./en-au.js\": 33146,\n\t\"./en-ca\": 45800,\n\t\"./en-ca.js\": 45800,\n\t\"./en-gb\": 2053,\n\t\"./en-gb.js\": 2053,\n\t\"./en-ie\": 86274,\n\t\"./en-ie.js\": 86274,\n\t\"./en-il\": 53993,\n\t\"./en-il.js\": 53993,\n\t\"./en-in\": 2663,\n\t\"./en-in.js\": 2663,\n\t\"./en-nz\": 38060,\n\t\"./en-nz.js\": 38060,\n\t\"./en-sg\": 95022,\n\t\"./en-sg.js\": 95022,\n\t\"./eo\": 14060,\n\t\"./eo.js\": 14060,\n\t\"./es\": 44920,\n\t\"./es-do\": 98508,\n\t\"./es-do.js\": 98508,\n\t\"./es-mx\": 22604,\n\t\"./es-mx.js\": 22604,\n\t\"./es-us\": 75269,\n\t\"./es-us.js\": 75269,\n\t\"./es.js\": 44920,\n\t\"./et\": 85773,\n\t\"./et.js\": 85773,\n\t\"./eu\": 75598,\n\t\"./eu.js\": 75598,\n\t\"./fa\": 17933,\n\t\"./fa.js\": 17933,\n\t\"./fi\": 83909,\n\t\"./fi.js\": 83909,\n\t\"./fil\": 80893,\n\t\"./fil.js\": 80893,\n\t\"./fo\": 24455,\n\t\"./fo.js\": 24455,\n\t\"./fr\": 49940,\n\t\"./fr-ca\": 53317,\n\t\"./fr-ca.js\": 53317,\n\t\"./fr-ch\": 77678,\n\t\"./fr-ch.js\": 77678,\n\t\"./fr.js\": 49940,\n\t\"./fy\": 53429,\n\t\"./fy.js\": 53429,\n\t\"./ga\": 96692,\n\t\"./ga.js\": 96692,\n\t\"./gd\": 72511,\n\t\"./gd.js\": 72511,\n\t\"./gl\": 82103,\n\t\"./gl.js\": 82103,\n\t\"./gom-deva\": 33906,\n\t\"./gom-deva.js\": 33906,\n\t\"./gom-latn\": 96893,\n\t\"./gom-latn.js\": 96893,\n\t\"./gu\": 55896,\n\t\"./gu.js\": 55896,\n\t\"./he\": 98755,\n\t\"./he.js\": 98755,\n\t\"./hi\": 46639,\n\t\"./hi.js\": 46639,\n\t\"./hr\": 9130,\n\t\"./hr.js\": 9130,\n\t\"./hu\": 29171,\n\t\"./hu.js\": 29171,\n\t\"./hy-am\": 26406,\n\t\"./hy-am.js\": 26406,\n\t\"./id\": 74694,\n\t\"./id.js\": 74694,\n\t\"./is\": 24220,\n\t\"./is.js\": 24220,\n\t\"./it\": 72681,\n\t\"./it-ch\": 40757,\n\t\"./it-ch.js\": 40757,\n\t\"./it.js\": 72681,\n\t\"./ja\": 33649,\n\t\"./ja.js\": 33649,\n\t\"./jv\": 75572,\n\t\"./jv.js\": 75572,\n\t\"./ka\": 14824,\n\t\"./ka.js\": 14824,\n\t\"./kk\": 81770,\n\t\"./kk.js\": 81770,\n\t\"./km\": 35724,\n\t\"./km.js\": 35724,\n\t\"./kn\": 94005,\n\t\"./kn.js\": 94005,\n\t\"./ko\": 65814,\n\t\"./ko.js\": 65814,\n\t\"./ku\": 17028,\n\t\"./ku-kmr\": 25683,\n\t\"./ku-kmr.js\": 25683,\n\t\"./ku.js\": 17028,\n\t\"./ky\": 23984,\n\t\"./ky.js\": 23984,\n\t\"./lb\": 21038,\n\t\"./lb.js\": 21038,\n\t\"./lo\": 4009,\n\t\"./lo.js\": 4009,\n\t\"./lt\": 27208,\n\t\"./lt.js\": 27208,\n\t\"./lv\": 53970,\n\t\"./lv.js\": 53970,\n\t\"./me\": 13030,\n\t\"./me.js\": 13030,\n\t\"./mi\": 51413,\n\t\"./mi.js\": 51413,\n\t\"./mk\": 85336,\n\t\"./mk.js\": 85336,\n\t\"./ml\": 26189,\n\t\"./ml.js\": 26189,\n\t\"./mn\": 17227,\n\t\"./mn.js\": 17227,\n\t\"./mr\": 1975,\n\t\"./mr.js\": 1975,\n\t\"./ms\": 12256,\n\t\"./ms-my\": 87323,\n\t\"./ms-my.js\": 87323,\n\t\"./ms.js\": 12256,\n\t\"./mt\": 36053,\n\t\"./mt.js\": 36053,\n\t\"./my\": 1042,\n\t\"./my.js\": 1042,\n\t\"./nb\": 1228,\n\t\"./nb.js\": 1228,\n\t\"./ne\": 60057,\n\t\"./ne.js\": 60057,\n\t\"./nl\": 31442,\n\t\"./nl-be\": 17014,\n\t\"./nl-be.js\": 17014,\n\t\"./nl.js\": 31442,\n\t\"./nn\": 46152,\n\t\"./nn.js\": 46152,\n\t\"./oc-lnc\": 62100,\n\t\"./oc-lnc.js\": 62100,\n\t\"./pa-in\": 41771,\n\t\"./pa-in.js\": 41771,\n\t\"./pl\": 6300,\n\t\"./pl.js\": 6300,\n\t\"./pt\": 88340,\n\t\"./pt-br\": 20645,\n\t\"./pt-br.js\": 20645,\n\t\"./pt.js\": 88340,\n\t\"./ro\": 15195,\n\t\"./ro.js\": 15195,\n\t\"./ru\": 75813,\n\t\"./ru.js\": 75813,\n\t\"./sd\": 62339,\n\t\"./sd.js\": 62339,\n\t\"./se\": 6876,\n\t\"./se.js\": 6876,\n\t\"./si\": 41176,\n\t\"./si.js\": 41176,\n\t\"./sk\": 52930,\n\t\"./sk.js\": 52930,\n\t\"./sl\": 38891,\n\t\"./sl.js\": 38891,\n\t\"./sq\": 91392,\n\t\"./sq.js\": 91392,\n\t\"./sr\": 28025,\n\t\"./sr-cyrl\": 50808,\n\t\"./sr-cyrl.js\": 50808,\n\t\"./sr.js\": 28025,\n\t\"./ss\": 38538,\n\t\"./ss.js\": 38538,\n\t\"./sv\": 50773,\n\t\"./sv.js\": 50773,\n\t\"./sw\": 22582,\n\t\"./sw.js\": 22582,\n\t\"./ta\": 23155,\n\t\"./ta.js\": 23155,\n\t\"./te\": 27863,\n\t\"./te.js\": 27863,\n\t\"./tet\": 29464,\n\t\"./tet.js\": 29464,\n\t\"./tg\": 58425,\n\t\"./tg.js\": 58425,\n\t\"./th\": 9492,\n\t\"./th.js\": 9492,\n\t\"./tk\": 21341,\n\t\"./tk.js\": 21341,\n\t\"./tl-ph\": 37317,\n\t\"./tl-ph.js\": 37317,\n\t\"./tlh\": 59394,\n\t\"./tlh.js\": 59394,\n\t\"./tr\": 15622,\n\t\"./tr.js\": 15622,\n\t\"./tzl\": 26952,\n\t\"./tzl.js\": 26952,\n\t\"./tzm\": 61567,\n\t\"./tzm-latn\": 83753,\n\t\"./tzm-latn.js\": 83753,\n\t\"./tzm.js\": 61567,\n\t\"./ug-cn\": 34856,\n\t\"./ug-cn.js\": 34856,\n\t\"./uk\": 40816,\n\t\"./uk.js\": 40816,\n\t\"./ur\": 25695,\n\t\"./ur.js\": 25695,\n\t\"./uz\": 51639,\n\t\"./uz-latn\": 15521,\n\t\"./uz-latn.js\": 15521,\n\t\"./uz.js\": 51639,\n\t\"./vi\": 80885,\n\t\"./vi.js\": 80885,\n\t\"./x-pseudo\": 97765,\n\t\"./x-pseudo.js\": 97765,\n\t\"./yo\": 93592,\n\t\"./yo.js\": 93592,\n\t\"./zh-cn\": 71922,\n\t\"./zh-cn.js\": 71922,\n\t\"./zh-hk\": 37406,\n\t\"./zh-hk.js\": 37406,\n\t\"./zh-mo\": 81043,\n\t\"./zh-mo.js\": 81043,\n\t\"./zh-tw\": 72998,\n\t\"./zh-tw.js\": 72998\n};\n\n\nfunction webpackContext(req) {\n\tvar id = webpackContextResolve(req);\n\treturn __webpack_require__(id);\n}\nfunction webpackContextResolve(req) {\n\tif(!__webpack_require__.o(map, req)) {\n\t\tvar e = new Error(\"Cannot find module '\" + req + \"'\");\n\t\te.code = 'MODULE_NOT_FOUND';\n\t\tthrow e;\n\t}\n\treturn map[req];\n}\nwebpackContext.keys = function webpackContextKeys() {\n\treturn Object.keys(map);\n};\nwebpackContext.resolve = webpackContextResolve;\nmodule.exports = webpackContext;\nwebpackContext.id = 54551;","\nwindow._eai_r = require;\nwindow._eai_d = define;\n","Object.defineProperty(exports, Symbol.toStringTag, { value: \"Module\" });\nconst require_utils_api_hooks = require(\"../utils/api/hooks.cjs\");\n//#region src/api/config.ts\nvar dataType = \"ConfigResponseType\";\nvar configDataType = dataType;\nvar useBrowseConfig = require_utils_api_hooks.createQuery({\n\tdataType,\n\tpath: \"/config/\"\n});\nvar isManagedEmail = (config) => {\n\treturn !!config?.hostSettings?.managedEmail?.enabled;\n};\nvar hasSendingDomain = (config) => {\n\tconst sendingDomain = config?.hostSettings?.managedEmail?.sendingDomain;\n\treturn typeof sendingDomain === \"string\" && sendingDomain.length > 0;\n};\nvar sendingDomain = (config) => {\n\treturn config?.hostSettings?.managedEmail?.sendingDomain;\n};\nvar DEFAULT_UPGRADE_ROUTE = \"/pro\";\nvar upgradeRoute = (config) => {\n\tconst configured = config?.hostSettings?.billing?.upgradeUrl;\n\treturn configured ? configured.replace(/^#/, \"\") : DEFAULT_UPGRADE_ROUTE;\n};\n//#endregion\nexports.DEFAULT_UPGRADE_ROUTE = DEFAULT_UPGRADE_ROUTE;\nexports.configDataType = configDataType;\nexports.hasSendingDomain = hasSendingDomain;\nexports.isManagedEmail = isManagedEmail;\nexports.sendingDomain = sendingDomain;\nexports.upgradeRoute = upgradeRoute;\nexports.useBrowseConfig = useBrowseConfig;\n\n//# sourceMappingURL=config.cjs.map","Object.defineProperty(exports, Symbol.toStringTag, { value: \"Module\" });\nconst require_hooks_use_handle_error = require(\"../hooks/use-handle-error.cjs\");\nconst require_utils_api_fetch_api = require(\"../utils/api/fetch-api.cjs\");\nlet _tanstack_react_query = require(\"@tanstack/react-query\");\nlet react = require(\"react\");\n//#region src/api/current-user.ts\nvar usersDataType = \"UsersResponseType\";\nvar currentUserUrl = require_utils_api_fetch_api.apiUrl(\"/users/me/\", { include: \"roles\" });\nvar currentUserQueryKey = [usersDataType, currentUserUrl];\nvar useCurrentUser = () => {\n\tconst fetchApi = require_utils_api_fetch_api.useFetchApi();\n\tconst handleError = require_hooks_use_handle_error();\n\tconst result = (0, _tanstack_react_query.useQuery)({\n\t\tqueryKey: currentUserQueryKey,\n\t\tqueryFn: () => fetchApi(currentUserUrl),\n\t\tselect: (data) => data.users[0]\n\t});\n\t(0, react.useEffect)(() => {\n\t\tif (result.error) handleError(result.error);\n\t}, [handleError, result.error]);\n\treturn result;\n};\n//#endregion\nexports.currentUserQueryKey = currentUserQueryKey;\nexports.useCurrentUser = useCurrentUser;\nexports.usersDataType = usersDataType;\n\n//# sourceMappingURL=current-user.cjs.map","Object.defineProperty(exports, Symbol.toStringTag, { value: \"Module\" });\nconst require_utils_api_hooks = require(\"../utils/api/hooks.cjs\");\nconst require_utils_api_update_queries = require(\"../utils/api/update-queries.cjs\");\nlet _tanstack_react_query = require(\"@tanstack/react-query\");\n//#region src/api/offers.ts\nvar dataType = \"OffersResponseType\";\nvar useInvalidateOffers = () => {\n\tconst queryClient = (0, _tanstack_react_query.useQueryClient)();\n\treturn () => {\n\t\treturn queryClient.invalidateQueries({ queryKey: [dataType] });\n\t};\n};\nvar useBrowseOffers = require_utils_api_hooks.createQuery({\n\tdataType,\n\tpath: \"/offers/\",\n\tdefaultSearchParams: {}\n});\nvar useBrowseOffersById = require_utils_api_hooks.createQueryWithId({\n\tdataType,\n\tpath: (id) => `/offers/${id}/`\n});\nvar useEditOffer = require_utils_api_hooks.createMutation({\n\tmethod: \"PUT\",\n\tpath: (offer) => `/offers/${offer.id}/`,\n\tbody: (offer) => ({ offers: [offer] }),\n\tupdateQueries: {\n\t\tdataType,\n\t\temberUpdateType: \"createOrUpdate\",\n\t\tupdate: require_utils_api_update_queries.updateQueryCache(\"offers\")\n\t}\n});\nvar useAddOffer = require_utils_api_hooks.createMutation({\n\tmethod: \"POST\",\n\tpath: () => \"/offers/\",\n\tbody: (offer) => ({ offers: [offer] }),\n\tupdateQueries: {\n\t\tdataType,\n\t\temberUpdateType: \"createOrUpdate\",\n\t\tupdate: require_utils_api_update_queries.insertToQueryCache(\"offers\")\n\t}\n});\n//#endregion\nexports.useAddOffer = useAddOffer;\nexports.useBrowseOffers = useBrowseOffers;\nexports.useBrowseOffersById = useBrowseOffersById;\nexports.useEditOffer = useEditOffer;\nexports.useInvalidateOffers = useInvalidateOffers;\n\n//# sourceMappingURL=offers.cjs.map","Object.defineProperty(exports, Symbol.toStringTag, { value: \"Module\" });\nconst require_utils_api_hooks = require(\"../utils/api/hooks.cjs\");\n//#region src/api/posts.ts\nvar dataType = \"PostsResponseType\";\nvar useBrowsePosts = require_utils_api_hooks.createQuery({\n\tdataType,\n\tpath: \"/posts/\"\n});\nvar useBrowsePostsInfinite = require_utils_api_hooks.createInfiniteQuery({\n\tdataType,\n\tpath: \"/posts/\",\n\tdefaultNextPageParams: (lastPage, otherParams) => {\n\t\tif (!lastPage.meta?.pagination.next) return;\n\t\treturn {\n\t\t\t...otherParams,\n\t\t\tpage: lastPage.meta.pagination.next.toString()\n\t\t};\n\t},\n\treturnData: (originalData) => {\n\t\tconst { pages } = originalData;\n\t\tconst posts = pages.flatMap((page) => page.posts);\n\t\tconst meta = pages[pages.length - 1].meta;\n\t\treturn {\n\t\t\tposts,\n\t\t\tmeta,\n\t\t\tisEnd: meta ? meta.pagination.pages === meta.pagination.page : true\n\t\t};\n\t}\n});\nvar getPost = require_utils_api_hooks.createQueryWithId({\n\tdataType,\n\tpath: (id) => `/posts/${id}/`\n});\nvar useDeletePost = require_utils_api_hooks.createMutation({\n\tmethod: \"DELETE\",\n\tpath: (id) => `/posts/${id}/`\n});\nvar useImportContentCSV = require_utils_api_hooks.createMutation({\n\tmethod: \"POST\",\n\tretry: false,\n\tpath: () => \"/posts/upload/\",\n\tbody: (file) => {\n\t\tconst formData = new FormData();\n\t\tformData.append(\"postsfile\", file);\n\t\treturn formData;\n\t}\n});\n//#endregion\nexports.getPost = getPost;\nexports.useBrowsePosts = useBrowsePosts;\nexports.useBrowsePostsInfinite = useBrowsePostsInfinite;\nexports.useDeletePost = useDeletePost;\nexports.useImportContentCSV = useImportContentCSV;\n\n//# sourceMappingURL=posts.cjs.map","Object.defineProperty(exports, Symbol.toStringTag, { value: \"Module\" });\nconst require_utils_api_hooks = require(\"../utils/api/hooks.cjs\");\n//#region src/api/settings.ts\nvar dataType = \"SettingsResponseType\";\nvar useBrowseSettings = require_utils_api_hooks.createQuery({\n\tdataType,\n\tpath: \"/settings/\",\n\tdefaultSearchParams: { group: \"site,theme,private,members,portal,newsletter,email,labs,slack,unsplash,views,firstpromoter,editor,comments,analytics,announcement,pintura,donations,security,social_web,explore,transistor\" }\n});\nvar useEditSettings = require_utils_api_hooks.createMutation({\n\tmethod: \"PUT\",\n\tpath: () => \"/settings/\",\n\tbody: (settings) => ({ settings: settings.map(({ key, value }) => ({\n\t\tkey,\n\t\tvalue\n\t})) }),\n\tupdateQueries: {\n\t\tdataType,\n\t\temberUpdateType: \"createOrUpdate\",\n\t\tupdate: (newData) => ({\n\t\t\t...newData,\n\t\t\tsettings: newData.settings\n\t\t})\n\t},\n\tinvalidateQueries: { filters: { predicate(query) {\n\t\treturn query.queryKey[0] !== dataType;\n\t} } }\n});\nvar useRegenerateAccessCode = require_utils_api_hooks.createMutation({\n\tmethod: \"POST\",\n\tpath: () => \"/settings/access_code/regenerate/\",\n\tupdateQueries: {\n\t\tdataType,\n\t\temberUpdateType: \"createOrUpdate\",\n\t\tupdate: (newData) => ({\n\t\t\t...newData,\n\t\t\tsettings: newData.settings\n\t\t})\n\t},\n\tinvalidateQueries: { filters: { predicate(query) {\n\t\treturn query.queryKey[0] !== dataType;\n\t} } }\n});\nvar useDeleteStripeSettings = require_utils_api_hooks.createMutation({\n\tmethod: \"DELETE\",\n\tpath: () => \"/settings/stripe/connect/\",\n\tinvalidateQueries: { dataType }\n});\nvar useTestSlack = require_utils_api_hooks.createMutation({\n\tmethod: \"POST\",\n\tpath: () => \"/slack/test/\"\n});\nfunction humanizeSettingKey(key) {\n\treturn key.replace(/^[a-z]/, (char) => char.toUpperCase()).replace(/_/g, \" \").replace(new RegExp(`\\\\b(${[\n\t\t\"API\",\n\t\t\"CTA\",\n\t\t\"RSS\"\n\t].join(\"|\")})\\\\b`, \"ig\"), (match) => match.toUpperCase());\n}\nfunction getSettingValues(settings, keys) {\n\treturn keys.map((key) => settings?.find((setting) => setting.key === key)?.value);\n}\nfunction getSettingValue(settings, key) {\n\tif (!settings) return null;\n\treturn settings.find((d) => d.key === key)?.value || null;\n}\nfunction isSettingReadOnly(settings, key) {\n\tif (!settings) return;\n\treturn settings.find((d) => d.key === key)?.is_read_only || false;\n}\nfunction checkStripeEnabled(settings, config) {\n\tconst hasSetting = (key) => settings.some((setting) => setting.key === key && setting.value);\n\tconst hasDirectKeys = hasSetting(\"stripe_secret_key\") && hasSetting(\"stripe_publishable_key\");\n\tconst hasConnectKeys = hasSetting(\"stripe_connect_secret_key\") && hasSetting(\"stripe_connect_publishable_key\");\n\tif (config.stripeDirect) return hasDirectKeys;\n\treturn hasConnectKeys || hasDirectKeys;\n}\n//#endregion\nexports.checkStripeEnabled = checkStripeEnabled;\nexports.getSettingValue = getSettingValue;\nexports.getSettingValues = getSettingValues;\nexports.humanizeSettingKey = humanizeSettingKey;\nexports.isSettingReadOnly = isSettingReadOnly;\nexports.useBrowseSettings = useBrowseSettings;\nexports.useDeleteStripeSettings = useDeleteStripeSettings;\nexports.useEditSettings = useEditSettings;\nexports.useRegenerateAccessCode = useRegenerateAccessCode;\nexports.useTestSlack = useTestSlack;\n\n//# sourceMappingURL=settings.cjs.map","Object.defineProperty(exports, Symbol.toStringTag, { value: \"Module\" });\nconst require_hooks_use_handle_error = require(\"./hooks/use-handle-error.cjs\");\nconst require_utils_api_fetch_api = require(\"./utils/api/fetch-api.cjs\");\nconst require_hooks_use_confirm_unload = require(\"./hooks/use-confirm-unload.cjs\");\nconst require_hooks_use_form = require(\"./hooks/use-form.cjs\");\nconst require_hooks_use_filterable_api = require(\"./hooks/use-filterable-api.cjs\");\nconst require_hooks_use_koenig_file_upload = require(\"./hooks/use-koenig-file-upload.cjs\");\nconst require_hooks_use_koenig_fetch_embed = require(\"./hooks/use-koenig-fetch-embed.cjs\");\nconst require_hooks_use_koenig_link_suggestions = require(\"./hooks/use-koenig-link-suggestions.cjs\");\nconst require_hooks_use_feature_flag = require(\"./hooks/use-feature-flag.cjs\");\nconst require_hooks_use_pintura_config = require(\"./hooks/use-pintura-config.cjs\");\nexports.koenigFileUploadTypes = require_hooks_use_koenig_file_upload.koenigFileUploadTypes;\nexports.useConfirmUnload = require_hooks_use_confirm_unload.useConfirmUnload;\nexports.useFeatureFlag = require_hooks_use_feature_flag.useFeatureFlag;\nexports.useFetchApi = require_utils_api_fetch_api.useFetchApi;\nexports.useFilterableApi = require_hooks_use_filterable_api;\nexports.useForm = require_hooks_use_form;\nexports.useHandleError = require_hooks_use_handle_error;\nexports.useKoenigFetchEmbed = require_hooks_use_koenig_fetch_embed.useKoenigFetchEmbed;\nexports.useKoenigFileUpload = require_hooks_use_koenig_file_upload.useKoenigFileUpload;\nexports.useKoenigLinkSuggestions = require_hooks_use_koenig_link_suggestions.useKoenigLinkSuggestions;\nexports.usePinturaConfig = require_hooks_use_pintura_config.usePinturaConfig;\n","Object.defineProperty(exports, Symbol.toStringTag, { value: \"Module\" });\nconst require_rolldown_runtime = require(\"../rolldown-runtime-D6vf50IK.cjs\");\nlet react = require(\"react\");\nreact = require_rolldown_runtime.__toESM(react, 1);\n//#region src/hooks/use-confirm-unload.ts\nfunction useConfirmUnload(shouldConfirmUnload) {\n\treact.useEffect(() => {\n\t\tif (!shouldConfirmUnload) return;\n\t\tconst handleBeforeUnload = (event) => {\n\t\t\tevent.preventDefault();\n\t\t\tevent.returnValue = \"\";\n\t\t};\n\t\twindow.addEventListener(\"beforeunload\", handleBeforeUnload);\n\t\treturn () => {\n\t\t\twindow.removeEventListener(\"beforeunload\", handleBeforeUnload);\n\t\t};\n\t}, [shouldConfirmUnload]);\n}\n//#endregion\nexports.useConfirmUnload = useConfirmUnload;\n\n//# sourceMappingURL=use-confirm-unload.cjs.map","Object.defineProperty(exports, Symbol.toStringTag, { value: \"Module\" });\nconst require_api_config = require(\"../api/config.cjs\");\n//#region src/hooks/use-feature-flag.ts\n/**\n* Returns whether a Labs flag is explicitly enabled. Only boolean `true`\n* counts — `false` while config is loading, missing, or failed.\n* Avoids refetching stale config when a feature-gated component mounts.\n*/\nvar useFeatureFlag = (flag) => {\n\tconst { data: config } = require_api_config.useBrowseConfig({ refetchOnMount: false });\n\treturn config?.config.labs?.[flag] === true;\n};\n//#endregion\nexports.useFeatureFlag = useFeatureFlag;\n\n//# sourceMappingURL=use-feature-flag.cjs.map","const require_utils_api_fetch_api = require(\"../utils/api/fetch-api.cjs\");\nlet react = require(\"react\");\nlet _tryghost_nql_string = require(\"@tryghost/nql-string\");\n//#region src/hooks/use-filterable-api.ts\nvar filterData = (data = [], filterKey, input) => {\n\tif (!data || !input) return data;\n\treturn data.filter((item) => item[filterKey]?.toLowerCase().includes(input.toLowerCase()));\n};\nvar useFilterableApi = ({ path, filterKey, responseKey, limit = 20 }) => {\n\tconst fetchApi = require_utils_api_fetch_api.useFetchApi();\n\tconst result = (0, react.useRef)({});\n\tconst loadData = async (input) => {\n\t\tif ((result.current.allLoaded || result.current.lastInput === input) && result.current.data) return filterData(result.current.data, filterKey, input);\n\t\tconst response = await fetchApi(require_utils_api_fetch_api.apiUrl(path, {\n\t\t\tfilter: input ? `${filterKey}:~${(0, _tryghost_nql_string.escapeNqlString)(input)}` : \"\",\n\t\t\tlimit: limit.toString()\n\t\t}));\n\t\tresult.current.data = response[responseKey];\n\t\tresult.current.allLoaded = !input && !response.meta?.pagination.next;\n\t\tresult.current.lastInput = input;\n\t\treturn filterData(response[responseKey], filterKey, input);\n\t};\n\tconst loadInitialValues = async (values, key) => {\n\t\tawait loadData(\"\");\n\t\tconst data = [...result.current.data || []];\n\t\tconst missingValues = values.filter((value) => !result.current.data?.find((item) => item[key] === value));\n\t\tif (missingValues.length) {\n\t\t\tconst additionalData = await fetchApi(require_utils_api_fetch_api.apiUrl(path, {\n\t\t\t\tfilter: `${key}:[${missingValues.join(\",\")}]`,\n\t\t\t\tlimit: \"100\"\n\t\t\t}));\n\t\t\tdata.push(...additionalData[responseKey]);\n\t\t}\n\t\treturn values.map((value) => data.find((item) => item[key] === value));\n\t};\n\treturn {\n\t\tloadData,\n\t\tloadInitialValues\n\t};\n};\n//#endregion\nmodule.exports = useFilterableApi;\n\n//# sourceMappingURL=use-filterable-api.cjs.map","let react = require(\"react\");\n//#region src/hooks/use-form.ts\nvar useForm = ({ initialState, savingDelay, savedDelay = 2e3, onSave, onSaveError, onSavedStateReset: onSaveCompleted, onValidate }) => {\n\tconst [formState, setFormState] = (0, react.useState)(initialState);\n\tconst [saveState, setSaveState] = (0, react.useState)(\"\");\n\tconst [errors, setErrors] = (0, react.useState)({});\n\t(0, react.useEffect)(() => {\n\t\tif (saveState === \"saved\") setTimeout(() => {\n\t\t\tonSaveCompleted?.();\n\t\t\tsetSaveState((state) => state === \"saved\" ? \"\" : state);\n\t\t}, savedDelay);\n\t}, [saveState, savedDelay]);\n\tconst isValid = (errs) => Object.values(errs).filter(Boolean).length === 0;\n\tconst validate = (0, react.useCallback)(() => {\n\t\tif (!onValidate) return true;\n\t\tconst newErrors = onValidate(formState);\n\t\tsetErrors(newErrors);\n\t\treturn isValid(newErrors);\n\t}, [formState, onValidate]);\n\tconst handleSave = (0, react.useCallback)(async (options = {}) => {\n\t\tif (!validate()) {\n\t\t\tsetSaveState(\"error\");\n\t\t\treturn false;\n\t\t}\n\t\tif (saveState !== \"unsaved\" && !options.force && !options.fakeWhenUnchanged) return true;\n\t\tconst timeBefore = Date.now();\n\t\tsetSaveState(\"saving\");\n\t\ttry {\n\t\t\tif (saveState === \"unsaved\" || options.force) await onSave(formState);\n\t\t\tconst duration = Date.now() - timeBefore;\n\t\t\tif (savingDelay && duration < savingDelay) await new Promise((resolve) => {\n\t\t\t\tsetTimeout(resolve, savingDelay - duration);\n\t\t\t});\n\t\t\tsetSaveState(\"saved\");\n\t\t\treturn true;\n\t\t} catch (e) {\n\t\t\tawait onSaveError?.(e);\n\t\t\tsetSaveState(\"unsaved\");\n\t\t\tthrow e;\n\t\t}\n\t}, [\n\t\tformState,\n\t\tsaveState,\n\t\tsavingDelay,\n\t\tonSave,\n\t\tonSaveError,\n\t\tvalidate\n\t]);\n\tconst updateForm = (0, react.useCallback)((updater) => {\n\t\tsetFormState(updater);\n\t\tsetSaveState(\"unsaved\");\n\t}, []);\n\tlet okVariant = \"default\";\n\tif (saveState === \"saved\") okVariant = \"default\";\n\telse if (saveState === \"error\") okVariant = \"destructive\";\n\tlet okLabel = \"\";\n\tif (saveState === \"saved\") okLabel = \"Saved\";\n\telse if (saveState === \"saving\") okLabel = \"Saving...\";\n\telse if (saveState === \"error\") okLabel = \"Retry\";\n\tconst okProps = {\n\t\tdisabled: saveState === \"saving\",\n\t\tvariant: okVariant,\n\t\tlabel: okLabel || void 0\n\t};\n\treturn {\n\t\tformState,\n\t\tsaveState,\n\t\thandleSave,\n\t\tupdateForm,\n\t\tsetFormState,\n\t\treset() {\n\t\t\tsetFormState(initialState);\n\t\t\tsetSaveState(\"\");\n\t\t},\n\t\tvalidate,\n\t\tisValid: isValid(errors),\n\t\tclearError: (field) => {\n\t\t\tsetErrors((state) => ({\n\t\t\t\t...state,\n\t\t\t\t[field]: \"\"\n\t\t\t}));\n\t\t},\n\t\terrors,\n\t\tsetErrors,\n\t\tokProps\n\t};\n};\n//#endregion\nmodule.exports = useForm;\n\n//# sourceMappingURL=use-form.cjs.map","const require_rolldown_runtime = require(\"../rolldown-runtime-D6vf50IK.cjs\");\nconst require_providers_framework_provider = require(\"../providers/framework-provider.cjs\");\nconst require_utils_errors = require(\"../utils/errors.cjs\");\nlet _sentry_react = require(\"@sentry/react\");\n_sentry_react = require_rolldown_runtime.__toESM(_sentry_react, 1);\nlet react = require(\"react\");\nlet sonner = require(\"sonner\");\n//#region src/hooks/use-handle-error.ts\nfunction showErrorToast(message) {\n\tsonner.toast.dismiss();\n\tsonner.toast.error(message);\n}\n/**\n* Generic error handling for API calls. This is enabled by default for queries (can be disabled by\n* setting defaultErrorHandler:false when using the query) but should be called when mutations throw\n* errors in order to handle anything unexpected.\n*/\nvar useHandleError = () => {\n\tconst { sentryDSN } = require_providers_framework_provider.useFramework();\n\treturn (0, react.useCallback)((error, { withToast = true } = {}) => {\n\t\tconsole.error(error);\n\t\tif (sentryDSN && !(error instanceof require_utils_errors.SessionExpiredError)) _sentry_react.withScope((scope) => {\n\t\t\tif (error instanceof require_utils_errors.APIError && error.response) {\n\t\t\t\tscope.setTag(\"api_url\", error.response.url);\n\t\t\t\tscope.setTag(\"api_response_status\", error.response.status);\n\t\t\t}\n\t\t\t_sentry_react.captureException(error);\n\t\t});\n\t\tif (!withToast) return;\n\t\tif (error instanceof require_utils_errors.APIError && error.response?.status === 418) sonner.toast.dismiss();\n\t\telse if (error instanceof require_utils_errors.SessionExpiredError) sonner.toast.dismiss();\n\t\telse if (error instanceof require_utils_errors.APIError) showErrorToast(require_utils_errors.getErrorMessage(error, error.message));\n\t\telse showErrorToast(\"Something went wrong, please try again.\");\n\t}, [sentryDSN]);\n};\n//#endregion\nmodule.exports = useHandleError;\n\n//# sourceMappingURL=use-handle-error.cjs.map","Object.defineProperty(exports, Symbol.toStringTag, { value: \"Module\" });\nconst require_utils_helpers = require(\"../utils/helpers.cjs\");\nconst require_utils_api_fetch_api = require(\"../utils/api/fetch-api.cjs\");\nlet react = require(\"react\");\n//#region src/hooks/use-koenig-fetch-embed.ts\nvar useKoenigFetchEmbed = () => {\n\tconst fetchApi = require_utils_api_fetch_api.useFetchApi();\n\treturn (0, react.useCallback)(async (url, { type } = {}) => {\n\t\tconst oembedUrl = new URL(`${require_utils_helpers.getGhostPaths().apiRoot}/oembed/`, window.location.origin);\n\t\toembedUrl.searchParams.set(\"url\", url);\n\t\tif (type) oembedUrl.searchParams.set(\"type\", type);\n\t\treturn await fetchApi(oembedUrl);\n\t}, [fetchApi]);\n};\n//#endregion\nexports.useKoenigFetchEmbed = useKoenigFetchEmbed;\n\n//# sourceMappingURL=use-koenig-fetch-embed.cjs.map","Object.defineProperty(exports, Symbol.toStringTag, { value: \"Module\" });\nconst require_utils_helpers = require(\"../utils/helpers.cjs\");\nconst require_utils_api_fetch_api = require(\"../utils/api/fetch-api.cjs\");\nlet react = require(\"react\");\n//#region src/hooks/use-koenig-file-upload.ts\nvar koenigFileUploadTypes = {\n\timage: {\n\t\tmimeTypes: [\n\t\t\t\"image/gif\",\n\t\t\t\"image/jpg\",\n\t\t\t\"image/jpeg\",\n\t\t\t\"image/png\",\n\t\t\t\"image/svg+xml\",\n\t\t\t\"image/webp\"\n\t\t],\n\t\textensions: [\n\t\t\t\"gif\",\n\t\t\t\"jpg\",\n\t\t\t\"jpeg\",\n\t\t\t\"png\",\n\t\t\t\"svg\",\n\t\t\t\"svgz\",\n\t\t\t\"webp\"\n\t\t],\n\t\tendpoint: \"/images/upload/\",\n\t\trequestMethod: \"post\",\n\t\tresourceName: \"images\"\n\t},\n\tvideo: {\n\t\tmimeTypes: [\n\t\t\t\"video/mp4\",\n\t\t\t\"video/webm\",\n\t\t\t\"video/ogg\"\n\t\t],\n\t\textensions: [\n\t\t\t\"mp4\",\n\t\t\t\"webm\",\n\t\t\t\"ogv\"\n\t\t],\n\t\tendpoint: \"/media/upload/\",\n\t\trequestMethod: \"post\",\n\t\tresourceName: \"media\"\n\t},\n\taudio: {\n\t\tmimeTypes: [\n\t\t\t\"audio/mp3\",\n\t\t\t\"audio/mpeg\",\n\t\t\t\"audio/ogg\",\n\t\t\t\"audio/wav\",\n\t\t\t\"audio/vnd.wav\",\n\t\t\t\"audio/wave\",\n\t\t\t\"audio/x-wav\",\n\t\t\t\"audio/mp4\",\n\t\t\t\"audio/x-m4a\"\n\t\t],\n\t\textensions: [\n\t\t\t\"mp3\",\n\t\t\t\"wav\",\n\t\t\t\"ogg\",\n\t\t\t\"m4a\"\n\t\t],\n\t\tendpoint: \"/media/upload/\",\n\t\trequestMethod: \"post\",\n\t\tresourceName: \"media\"\n\t},\n\tmediaThumbnail: {\n\t\tmimeTypes: [\n\t\t\t\"image/gif\",\n\t\t\t\"image/jpg\",\n\t\t\t\"image/jpeg\",\n\t\t\t\"image/png\",\n\t\t\t\"image/webp\"\n\t\t],\n\t\textensions: [\n\t\t\t\"gif\",\n\t\t\t\"jpg\",\n\t\t\t\"jpeg\",\n\t\t\t\"png\",\n\t\t\t\"webp\"\n\t\t],\n\t\tendpoint: \"/media/thumbnail/upload/\",\n\t\trequestMethod: \"put\",\n\t\tresourceName: \"media\"\n\t},\n\tfile: {\n\t\textensions: [],\n\t\tendpoint: \"/files/upload/\",\n\t\trequestMethod: \"post\",\n\t\tresourceName: \"files\"\n\t}\n};\nvar getStringAtPath = (maybeObj, path) => {\n\tlet current = maybeObj;\n\tfor (const key of path) if (current && typeof current === \"object\" && key in current) current = current[key];\n\telse return null;\n\treturn typeof current === \"string\" ? current : null;\n};\nvar useKoenigFileUpload = (type = \"image\") => {\n\tconst [progress, setProgress] = (0, react.useState)(0);\n\tconst [isLoading, setLoading] = (0, react.useState)(false);\n\tconst [errors, setErrors] = (0, react.useState)([]);\n\tconst [filesNumber, setFilesNumber] = (0, react.useState)(0);\n\tconst progressTracker = (0, react.useRef)(/* @__PURE__ */ new Map());\n\tconst fetchApi = require_utils_api_fetch_api.useFetchApi();\n\tfunction updateProgress() {\n\t\tif (progressTracker.current.size === 0) {\n\t\t\tsetProgress(0);\n\t\t\treturn;\n\t\t}\n\t\tlet totalProgress = 0;\n\t\tprogressTracker.current.forEach((value) => {\n\t\t\ttotalProgress += value;\n\t\t});\n\t\tsetProgress(Math.round(totalProgress / progressTracker.current.size));\n\t}\n\tconst defaultValidator = (file) => {\n\t\tif (type === \"file\") return true;\n\t\tconst extensions = koenigFileUploadTypes[type].extensions;\n\t\tconst [, extension] = /(?:\\.([^.]+))?$/.exec(file.name) ?? [];\n\t\tif (!extensions) return true;\n\t\tif (!extension || extensions.indexOf(extension.toLowerCase()) === -1) return `The file type you uploaded is not supported. Please use ${`.${extensions.join(\", .\").toUpperCase()}`}`;\n\t\treturn true;\n\t};\n\tconst validate = (files = []) => {\n\t\tconst validationResult = [];\n\t\tfor (let i = 0; i < files.length; i += 1) {\n\t\t\tconst file = files[i];\n\t\t\tconst result = defaultValidator(file);\n\t\t\tif (result === true) continue;\n\t\t\tvalidationResult.push({\n\t\t\t\tfileName: file.name,\n\t\t\t\tmessage: result\n\t\t\t});\n\t\t}\n\t\treturn validationResult;\n\t};\n\tconst uploadFile = async (file, { formData = {} } = {}) => {\n\t\tprogressTracker.current.set(file, 0);\n\t\tconst fileFormData = new FormData();\n\t\tfileFormData.append(\"file\", file, file.name);\n\t\tObject.keys(formData).forEach((key) => {\n\t\t\tfileFormData.append(key, formData[key]);\n\t\t});\n\t\tconst url = `${require_utils_helpers.getGhostPaths().apiRoot}${koenigFileUploadTypes[type].endpoint}`;\n\t\ttry {\n\t\t\tconst uploadResponse = await fetchApi(url, {\n\t\t\t\tmethod: koenigFileUploadTypes[type].requestMethod,\n\t\t\t\tbody: fileFormData,\n\t\t\t\tonUploadProgress(uploadProgress) {\n\t\t\t\t\tprogressTracker.current.set(file, uploadProgress);\n\t\t\t\t\tupdateProgress();\n\t\t\t\t}\n\t\t\t});\n\t\t\tprogressTracker.current.set(file, 100);\n\t\t\tupdateProgress();\n\t\t\tlet responseUrl;\n\t\t\tif (uploadResponse) {\n\t\t\t\tconst resource = uploadResponse[koenigFileUploadTypes[type].resourceName];\n\t\t\t\tif (resource && Array.isArray(resource) && resource[0]) responseUrl = resource[0].url;\n\t\t\t}\n\t\t\treturn {\n\t\t\t\turl: responseUrl,\n\t\t\t\tfileName: file.name\n\t\t\t};\n\t\t} catch (error) {\n\t\t\tconsole.error(error);\n\t\t\tconst context = getStringAtPath(error, [\n\t\t\t\t\"data\",\n\t\t\t\t\"errors\",\n\t\t\t\t0,\n\t\t\t\t\"context\"\n\t\t\t]) || \"\";\n\t\t\tconst message = getStringAtPath(error, [\n\t\t\t\t\"data\",\n\t\t\t\t\"errors\",\n\t\t\t\t0,\n\t\t\t\t\"message\"\n\t\t\t]) || getStringAtPath(error, [\"message\"]) || \"\";\n\t\t\tthrow {\n\t\t\t\tmessage: context || message,\n\t\t\t\tcontext,\n\t\t\t\tfileName: file.name\n\t\t\t};\n\t\t}\n\t};\n\tconst upload = async (files = [], options = {}) => {\n\t\tsetFilesNumber(files.length);\n\t\tsetLoading(true);\n\t\tsetErrors([]);\n\t\tconst validationResult = validate(files);\n\t\tif (validationResult.length) {\n\t\t\tsetErrors(validationResult);\n\t\t\tsetLoading(false);\n\t\t\tsetProgress(100);\n\t\t\treturn null;\n\t\t}\n\t\tconst uploadPromises = [];\n\t\tfor (let i = 0; i < files.length; i += 1) {\n\t\t\tconst file = files[i];\n\t\t\tuploadPromises.push(uploadFile(file, options));\n\t\t}\n\t\ttry {\n\t\t\tconst uploadResult = await Promise.all(uploadPromises);\n\t\t\tsetProgress(100);\n\t\t\tprogressTracker.current.clear();\n\t\t\tsetLoading(false);\n\t\t\tsetErrors([]);\n\t\t\treturn uploadResult;\n\t\t} catch (error) {\n\t\t\tconsole.error(error);\n\t\t\tsetErrors([error]);\n\t\t\tsetLoading(false);\n\t\t\tsetProgress(100);\n\t\t\tprogressTracker.current.clear();\n\t\t\treturn null;\n\t\t}\n\t};\n\treturn {\n\t\tprogress,\n\t\tisLoading,\n\t\tupload,\n\t\terrors,\n\t\tfilesNumber\n\t};\n};\n//#endregion\nexports.koenigFileUploadTypes = koenigFileUploadTypes;\nexports.useKoenigFileUpload = useKoenigFileUpload;\n\n//# sourceMappingURL=use-koenig-file-upload.cjs.map","Object.defineProperty(exports, Symbol.toStringTag, { value: \"Module\" });\nconst require_hooks_use_filterable_api = require(\"./use-filterable-api.cjs\");\nconst require_api_offers = require(\"../api/offers.cjs\");\nconst require_api_posts = require(\"../api/posts.cjs\");\nlet react = require(\"react\");\n//#region src/hooks/use-koenig-link-suggestions.ts\nvar useKoenigLinkSuggestions = ({ siteUrl, membersSignupAccess, donationsEnabled, recommendationsEnabled, includeShareLink = false, shareLinkLabel = \"Share\" }) => {\n\tconst { data: offersData } = require_api_offers.useBrowseOffers();\n\tconst { data: latestPostsData } = require_api_posts.useBrowsePosts({ searchParams: {\n\t\tfilter: \"status:published\",\n\t\tfields: \"id,url,title,visibility,published_at\",\n\t\torder: \"published_at desc\",\n\t\tlimit: \"5\"\n\t} });\n\tconst searchPosts = require_hooks_use_filterable_api({\n\t\tpath: \"/search-index/posts/\",\n\t\tfilterKey: \"title\",\n\t\tresponseKey: \"posts\"\n\t});\n\tconst searchPages = require_hooks_use_filterable_api({\n\t\tpath: \"/search-index/pages/\",\n\t\tfilterKey: \"title\",\n\t\tresponseKey: \"pages\"\n\t});\n\tconst defaultLinks = (0, react.useMemo)(() => {\n\t\treturn [{\n\t\t\tlabel: \"Latest posts\",\n\t\t\titems: (latestPostsData?.posts || []).map((post) => ({\n\t\t\t\tid: post.id,\n\t\t\t\ttitle: post.title,\n\t\t\t\turl: post.url,\n\t\t\t\tvisibility: post.visibility,\n\t\t\t\tpublishedAt: post.published_at\n\t\t\t}))\n\t\t}];\n\t}, [latestPostsData?.posts]);\n\treturn {\n\t\tfetchAutocompleteLinks: (0, react.useCallback)(async () => {\n\t\t\tconst defaults = [{\n\t\t\t\tlabel: \"Homepage\",\n\t\t\t\tvalue: siteUrl\n\t\t\t}, {\n\t\t\t\tlabel: \"Free signup\",\n\t\t\t\tvalue: \"#/portal/signup/free\"\n\t\t\t}];\n\t\t\tconst shareLink = includeShareLink ? [{\n\t\t\t\tlabel: shareLinkLabel,\n\t\t\t\tvalue: \"#/share\"\n\t\t\t}] : [];\n\t\t\tconst memberLinks = membersSignupAccess === \"all\" ? [{\n\t\t\t\tlabel: \"Paid signup\",\n\t\t\t\tvalue: \"#/portal/signup\"\n\t\t\t}, {\n\t\t\t\tlabel: \"Upgrade or change plan\",\n\t\t\t\tvalue: \"#/portal/account/plans\"\n\t\t\t}] : [];\n\t\t\tconst donationLink = donationsEnabled ? [{\n\t\t\t\tlabel: \"Tips and donations\",\n\t\t\t\tvalue: \"#/portal/support\"\n\t\t\t}] : [];\n\t\t\tconst recommendationLink = recommendationsEnabled ? [{\n\t\t\t\tlabel: \"Recommendations\",\n\t\t\t\tvalue: \"#/portal/recommendations\"\n\t\t\t}] : [];\n\t\t\tconst offersLinks = (offersData?.offers || []).filter((offer) => offer.status === \"active\" && offer.redemption_type === \"signup\").map((offer) => ({\n\t\t\t\tlabel: `Offer - ${offer.name}`,\n\t\t\t\tvalue: new URL(offer.code, siteUrl).toString()\n\t\t\t}));\n\t\t\treturn [\n\t\t\t\t...defaults,\n\t\t\t\t...memberLinks,\n\t\t\t\t...donationLink,\n\t\t\t\t...shareLink,\n\t\t\t\t...recommendationLink,\n\t\t\t\t...offersLinks\n\t\t\t];\n\t\t}, [\n\t\t\tdonationsEnabled,\n\t\t\tincludeShareLink,\n\t\t\tmembersSignupAccess,\n\t\t\toffersData?.offers,\n\t\t\trecommendationsEnabled,\n\t\t\tshareLinkLabel,\n\t\t\tsiteUrl\n\t\t]),\n\t\tsearchLinks: (0, react.useCallback)(async (term) => {\n\t\t\tif (!term) return defaultLinks;\n\t\t\tconst [posts, pages] = await Promise.all([searchPosts.loadData(term), searchPages.loadData(term)]);\n\t\t\treturn [{\n\t\t\t\tlabel: \"Posts\",\n\t\t\t\titems: posts.filter((item) => item.status === \"published\").map((item) => ({\n\t\t\t\t\tid: item.id,\n\t\t\t\t\ttitle: item.title,\n\t\t\t\t\turl: item.url,\n\t\t\t\t\tvisibility: item.visibility,\n\t\t\t\t\tpublishedAt: item.published_at\n\t\t\t\t}))\n\t\t\t}, {\n\t\t\t\tlabel: \"Pages\",\n\t\t\t\titems: pages.filter((item) => item.status === \"published\").map((item) => ({\n\t\t\t\t\tid: item.id,\n\t\t\t\t\ttitle: item.title,\n\t\t\t\t\turl: item.url,\n\t\t\t\t\tvisibility: item.visibility,\n\t\t\t\t\tpublishedAt: item.published_at\n\t\t\t\t}))\n\t\t\t}].filter((group) => group.items.length > 0);\n\t\t}, [\n\t\t\tdefaultLinks,\n\t\t\tsearchPages,\n\t\t\tsearchPosts\n\t\t])\n\t};\n};\n//#endregion\nexports.useKoenigLinkSuggestions = useKoenigLinkSuggestions;\n\n//# sourceMappingURL=use-koenig-link-suggestions.cjs.map","Object.defineProperty(exports, Symbol.toStringTag, { value: \"Module\" });\nconst require_api_current_user = require(\"../api/current-user.cjs\");\n//#region src/hooks/use-permissions.ts\nvar usePermission = (requiredRoles) => {\n\tconst { data: currentUser } = require_api_current_user.useCurrentUser();\n\tif (!requiredRoles || requiredRoles.length === 0) return true;\n\tconst currentUserRoles = currentUser?.roles.map((role) => role.name);\n\tif (!currentUserRoles) return false;\n\treturn requiredRoles.some((role) => currentUserRoles.includes(role));\n};\n//#endregion\nexports.usePermission = usePermission;\n\n//# sourceMappingURL=use-permissions.cjs.map","Object.defineProperty(exports, Symbol.toStringTag, { value: \"Module\" });\nconst require_utils_helpers = require(\"../utils/helpers.cjs\");\nconst require_api_config = require(\"../api/config.cjs\");\nconst require_api_settings = require(\"../api/settings.cjs\");\nlet react = require(\"react\");\n//#region src/hooks/use-pintura-config.ts\nvar parseOptionalString = (value) => {\n\tif (value === null || typeof value === \"undefined\") return;\n\tif (typeof value === \"string\") return value;\n\tthrow new TypeError(\"Expected value to be null, undefined, or a string\");\n};\nvar resolveUrl = (url) => {\n\tif (url.startsWith(\"/\")) {\n\t\tconst { adminRoot } = require_utils_helpers.getGhostPaths();\n\t\treturn window.location.origin + adminRoot.replace(/\\/$/, \"\") + url;\n\t}\n\treturn url;\n};\n/**\n* Returns the URLs for Pintura, or `null` when Pintura is not\n* enabled/configured.\n*\n* Suitable for passing to Koenig's `cardConfig`. Koenig handles its own script\n* and CSS loading — this hook only resolves the URLs from settings and host\n* config.\n*/\nfunction usePinturaConfig() {\n\tconst { data: configData } = require_api_config.useBrowseConfig();\n\tconst { data: settingsData } = require_api_settings.useBrowseSettings();\n\tconst pinturaConfig = (configData?.config)?.pintura;\n\tconst [isEnabled, fallbackJsUrl, fallbackCssUrl] = require_api_settings.getSettingValues(settingsData?.settings ?? null, [\n\t\t\"pintura\",\n\t\t\"pintura_js_url\",\n\t\t\"pintura_css_url\"\n\t]);\n\tlet configJsUrl;\n\tlet configCssUrl;\n\tif (isEnabled) {\n\t\tconfigJsUrl = pinturaConfig?.js || parseOptionalString(fallbackJsUrl);\n\t\tconfigCssUrl = pinturaConfig?.css || parseOptionalString(fallbackCssUrl);\n\t}\n\treturn (0, react.useMemo)(() => {\n\t\tif (!configJsUrl || !configCssUrl) return null;\n\t\treturn {\n\t\t\tjsUrl: resolveUrl(configJsUrl),\n\t\t\tcssUrl: resolveUrl(configCssUrl)\n\t\t};\n\t}, [configJsUrl, configCssUrl]);\n}\n//#endregion\nexports.usePinturaConfig = usePinturaConfig;\n\n//# sourceMappingURL=use-pintura-config.cjs.map","Object.defineProperty(exports, Symbol.toStringTag, { value: \"Module\" });\nconst require_utils_query_client = require(\"../utils/query-client.cjs\");\nlet _sentry_react = require(\"@sentry/react\");\nlet _tanstack_react_query = require(\"@tanstack/react-query\");\nlet react = require(\"react\");\nlet react_jsx_runtime = require(\"react/jsx-runtime\");\n//#region src/providers/framework-provider.tsx\nvar FrameworkContext = (0, react.createContext)({\n\tghostVersion: \"\",\n\texternalNavigate: () => {},\n\tunsplashConfig: {\n\t\tAuthorization: \"\",\n\t\t\"Accept-Version\": \"\",\n\t\t\"Content-Type\": \"\",\n\t\t\"App-Pragma\": \"\",\n\t\t\"X-Unsplash-Cache\": true\n\t},\n\tsentryDSN: null,\n\tonUpdate: () => {},\n\tonInvalidate: () => {},\n\tonDelete: () => {}\n});\nfunction FrameworkProvider({ children, queryClient: queryClientOverride, ...props }) {\n\treturn /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_sentry_react.ErrorBoundary, { children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_tanstack_react_query.QueryClientProvider, {\n\t\tclient: (0, react.useMemo)(() => {\n\t\t\tif (queryClientOverride) return queryClientOverride;\n\t\t\treturn require_utils_query_client;\n\t\t}, [queryClientOverride]),\n\t\tchildren: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(FrameworkContext.Provider, {\n\t\t\tvalue: props,\n\t\t\tchildren\n\t\t})\n\t}) });\n}\nvar useFramework = () => (0, react.useContext)(FrameworkContext);\n//#endregion\nexports.FrameworkProvider = FrameworkProvider;\nexports.useFramework = useFramework;\n\n//# sourceMappingURL=framework-provider.cjs.map","//#region \\0rolldown/runtime.js\nvar __create = Object.create;\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __getProtoOf = Object.getPrototypeOf;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __copyProps = (to, from, except, desc) => {\n\tif (from && typeof from === \"object\" || typeof from === \"function\") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {\n\t\tkey = keys[i];\n\t\tif (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {\n\t\t\tget: ((k) => from[k]).bind(null, key),\n\t\t\tenumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable\n\t\t});\n\t}\n\treturn to;\n};\nvar __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, \"default\", {\n\tvalue: mod,\n\tenumerable: true\n}) : target, mod));\n//#endregion\nObject.defineProperty(exports, \"__toESM\", {\n\tenumerable: true,\n\tget: function() {\n\t\treturn __toESM;\n\t}\n});\n","Object.defineProperty(exports, Symbol.toStringTag, { value: \"Module\" });\nconst require_rolldown_runtime = require(\"../../rolldown-runtime-D6vf50IK.cjs\");\nconst require_providers_framework_provider = require(\"../../providers/framework-provider.cjs\");\nconst require_utils_errors = require(\"../errors.cjs\");\nconst require_utils_helpers = require(\"../helpers.cjs\");\nconst require_utils_api_handle_response = require(\"./handle-response.cjs\");\nlet _sentry_react = require(\"@sentry/react\");\n_sentry_react = require_rolldown_runtime.__toESM(_sentry_react, 1);\nlet react = require(\"react\");\n//#region src/utils/api/fetch-api.ts\nvar xhrHeadersToFetchHeaders = (xhr) => {\n\tconst result = new Headers();\n\tconst headerLines = xhr.getAllResponseHeaders()?.split(\"\\r\\n\") || [];\n\tfor (const headerLine of headerLines) {\n\t\tconst separatorIndex = headerLine.indexOf(\":\");\n\t\tif (separatorIndex === -1) continue;\n\t\tconst headerName = headerLine.slice(0, separatorIndex);\n\t\tconst headerValue = headerLine.slice(separatorIndex + 1).trim();\n\t\tresult.append(headerName, headerValue);\n\t}\n\treturn result;\n};\nvar xhrToFetchResponse = (xhr) => new Response(xhr.response, {\n\tstatus: xhr.status,\n\tstatusText: xhr.statusText,\n\theaders: xhrHeadersToFetchHeaders(xhr)\n});\nvar GHOST_API_REQUEST = /\\/ghost\\/api\\//;\nvar SESSION_API_REQUEST = /\\/ghost\\/api\\/admin\\/session([/?#]|$)/;\nvar UNAUTHENTICATED_ADMIN_ROUTE = /^#\\/(?:reset|setup|signin|signup)(?:[/?]|$)/;\nvar sessionExpiryHandled = false;\nvar isUnauthenticatedAdminRoute = (adminRoot) => {\n\treturn window.location.pathname === adminRoot && (!window.location.hash || window.location.hash === \"#/\" || UNAUTHENTICATED_ADMIN_ROUTE.test(window.location.hash));\n};\nvar isSessionExpiry = (endpoint) => {\n\tconst url = endpoint.toString();\n\treturn GHOST_API_REQUEST.test(url) && !SESSION_API_REQUEST.test(url);\n};\nvar redirectOnSessionExpiry = () => {\n\tconst { adminRoot } = require_utils_helpers.getGhostPaths();\n\tif (!sessionExpiryHandled && !isUnauthenticatedAdminRoute(adminRoot)) {\n\t\tsessionExpiryHandled = true;\n\t\twindow.location.replace(adminRoot);\n\t}\n};\nvar fetchWithXhr = (onUploadProgress, endpoint, { method, headers, credentials, body, signal }) => new Promise((resolve, reject) => {\n\tconst onabort = () => {\n\t\treject(new DOMException(\"Aborted\", \"AbortError\"));\n\t};\n\tif (signal.aborted) {\n\t\tonabort();\n\t\treturn;\n\t}\n\tconst xhr = new XMLHttpRequest();\n\txhr.open(method, endpoint.toString(), true);\n\tswitch (credentials) {\n\t\tcase \"omit\": throw new Error(\"\\\"omit\\\" credentials cannot be represented with legacy XMLHttpRequest. Consider \\\"same-origin\\\".\");\n\t\tcase \"same-origin\":\n\t\t\txhr.withCredentials = false;\n\t\t\tbreak;\n\t\tcase \"include\":\n\t\t\txhr.withCredentials = true;\n\t\t\tbreak;\n\t\tdefault: throw new Error(credentials);\n\t}\n\txhr.responseType = \"arraybuffer\";\n\tfor (const [headerName, headerValue] of Object.entries(headers)) xhr.setRequestHeader(headerName, headerValue);\n\txhr.upload.onprogress = (event) => {\n\t\tif (event.lengthComputable) onUploadProgress(event.loaded / event.total * 100);\n\t};\n\txhr.onload = () => {\n\t\tresolve(xhrToFetchResponse(xhr));\n\t};\n\txhr.onerror = () => {\n\t\treject(/* @__PURE__ */ new TypeError(\"Network request failed\"));\n\t};\n\txhr.onabort = onabort;\n\tconst onSignalAbort = () => xhr.abort();\n\tsignal.addEventListener(\"abort\", onSignalAbort);\n\txhr.onloadend = () => {\n\t\tsignal.removeEventListener(\"abort\", onSignalAbort);\n\t};\n\txhr.send(body);\n});\nvar useFetchApi = () => {\n\tconst { ghostVersion, sentryDSN } = require_providers_framework_provider.useFramework();\n\treturn (0, react.useCallback)(async (endpoint, { method = \"GET\", headers = {}, body, credentials = \"include\", timeout, retry = true, responseType, onUploadProgress } = {}) => {\n\t\tconst controller = new AbortController();\n\t\tconst requestInit = {\n\t\t\tmethod,\n\t\t\theaders: {\n\t\t\t\t\"app-pragma\": \"no-cache\",\n\t\t\t\t...ghostVersion ? { \"x-ghost-version\": ghostVersion } : {},\n\t\t\t\t...typeof body === \"string\" ? { [\"content-type\"]: \"application/json\" } : {},\n\t\t\t\t...headers\n\t\t\t},\n\t\t\tcredentials,\n\t\t\tmode: \"cors\",\n\t\t\tbody,\n\t\t\tsignal: controller.signal\n\t\t};\n\t\tlet attempts = 0;\n\t\tlet retryingMs = 0;\n\t\tconst startTime = Date.now();\n\t\tconst maxRetryingMs = 15e3;\n\t\tconst retryPeriods = [500, 1e3];\n\t\tconst retryableErrors = [\n\t\t\trequire_utils_errors.ServerUnreachableError,\n\t\t\trequire_utils_errors.MaintenanceError,\n\t\t\tTypeError\n\t\t];\n\t\tconst getErrorData = (error, response) => {\n\t\t\tconst data = {\n\t\t\t\terrorName: error?.name,\n\t\t\t\tattempts,\n\t\t\t\ttotalSeconds: retryingMs / 1e3,\n\t\t\t\tendpoint: endpoint.toString()\n\t\t\t};\n\t\t\tif (endpoint.toString().includes(\"/ghost/api/\")) data.server = response?.headers.get(\"server\");\n\t\t\treturn data;\n\t\t};\n\t\tconst fetchFn = onUploadProgress ? fetchWithXhr.bind(null, onUploadProgress) : fetch;\n\t\tconst timeoutHandle = timeout ? setTimeout(() => controller.abort(), timeout) : void 0;\n\t\ttry {\n\t\t\twhile (attempts === 0 || retry) try {\n\t\t\t\treturn await require_utils_api_handle_response(await fetchFn(endpoint, requestInit), { responseType });\n\t\t\t} catch (error) {\n\t\t\t\tretryingMs = Date.now() - startTime;\n\t\t\t\tif (retry && retryableErrors.some((errorClass) => error instanceof errorClass) && retryingMs <= maxRetryingMs) {\n\t\t\t\t\tawait new Promise((resolve) => {\n\t\t\t\t\t\tsetTimeout(resolve, retryPeriods[attempts] || retryPeriods[retryPeriods.length - 1]);\n\t\t\t\t\t});\n\t\t\t\t\tattempts += 1;\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tif (attempts !== 0 && sentryDSN) _sentry_react.captureMessage(\"Request failed after multiple attempts\", { extra: getErrorData() });\n\t\t\t\tif (error && typeof error === \"object\" && \"name\" in error && error.name === \"AbortError\") throw new require_utils_errors.TimeoutError();\n\t\t\t\tif (error instanceof require_utils_errors.UnauthorizedError && isSessionExpiry(endpoint)) {\n\t\t\t\t\tredirectOnSessionExpiry();\n\t\t\t\t\tthrow new require_utils_errors.SessionExpiredError(error.response, error.data, { cause: error });\n\t\t\t\t}\n\t\t\t\tlet newError = error;\n\t\t\t\tif (!(error instanceof require_utils_errors.APIError)) newError = new require_utils_errors.ServerUnreachableError({ cause: error });\n\t\t\t\tthrow newError;\n\t\t\t}\n\t\t} finally {\n\t\t\tclearTimeout(timeoutHandle);\n\t\t}\n\t}, [ghostVersion, sentryDSN]);\n};\nvar { apiRoot } = require_utils_helpers.getGhostPaths();\nvar apiUrl = (path, searchParams = {}) => {\n\tconst url = new URL(`${apiRoot}${path}`, window.location.origin);\n\turl.search = new URLSearchParams(searchParams).toString();\n\treturn url.toString();\n};\n//#endregion\nexports.apiUrl = apiUrl;\nexports.useFetchApi = useFetchApi;\n\n//# sourceMappingURL=fetch-api.cjs.map","const require_utils_errors = require(\"../errors.cjs\");\n//#region src/utils/api/handle-response.ts\nvar isTextContentType = (contentType) => {\n\treturn !!contentType && (contentType.startsWith(\"text/\") || contentType.includes(\"application/yaml\"));\n};\nvar handleResponse = async (response, { responseType } = {}) => {\n\tif (response.status === 0) throw new require_utils_errors.ServerUnreachableError();\n\telse if (response.status === 503) throw new require_utils_errors.MaintenanceError(response, await response.text());\n\telse if (response.status === 415) throw new require_utils_errors.UnsupportedMediaTypeError(response, await response.text());\n\telse if (response.status === 413) throw new require_utils_errors.RequestEntityTooLargeError(response, await response.text());\n\telse if (response.status === 401) {\n\t\tif (response.headers.get(\"content-type\")?.includes(\"json\")) throw new require_utils_errors.UnauthorizedError(response, await response.json());\n\t\tthrow new require_utils_errors.UnauthorizedError(response, await response.text());\n\t} else if (!response.ok) {\n\t\tif (!response.headers.get(\"content-type\")?.includes(\"json\")) throw new require_utils_errors.APIError(response, await response.text());\n\t\tconst data = await response.json();\n\t\tif (response.status === 403 && data.errors?.[0]?.message === \"Authorization failed\") throw new require_utils_errors.UnauthorizedError(response, data);\n\t\telse if (data.errors?.[0]?.type === \"VersionMismatchError\") throw new require_utils_errors.VersionMismatchError(response, data);\n\t\telse if (data.errors?.[0]?.type === \"ValidationError\") throw new require_utils_errors.ValidationError(response, data);\n\t\telse if (data.errors?.[0]?.type === \"NoPermissionError\") throw new require_utils_errors.ValidationError(response, data);\n\t\telse if (data.errors?.[0]?.type === \"ThemeValidationError\") throw new require_utils_errors.ThemeValidationError(response, data);\n\t\telse if (data.errors?.[0]?.type === \"HostLimitError\") throw new require_utils_errors.HostLimitError(response, data);\n\t\telse if (data.errors?.[0]?.type === \"EmailError\") throw new require_utils_errors.EmailError(response, data);\n\t\telse throw new require_utils_errors.JSONError(response, data);\n\t} else if (response.status === 204) return;\n\telse if (responseType === \"blob\") return await response.blob();\n\telse if (responseType === \"arraybuffer\") return await response.arrayBuffer();\n\telse if (isTextContentType(response.headers.get(\"content-type\"))) return await response.text();\n\telse return await response.json();\n};\n//#endregion\nmodule.exports = handleResponse;\n\n//# sourceMappingURL=handle-response.cjs.map","Object.defineProperty(exports, Symbol.toStringTag, { value: \"Module\" });\nconst require_providers_framework_provider = require(\"../../providers/framework-provider.cjs\");\nconst require_hooks_use_handle_error = require(\"../../hooks/use-handle-error.cjs\");\nconst require_utils_api_fetch_api = require(\"./fetch-api.cjs\");\nconst require_hooks_use_permissions = require(\"../../hooks/use-permissions.cjs\");\nlet _tanstack_react_query = require(\"@tanstack/react-query\");\nlet react = require(\"react\");\n//#region src/utils/api/hooks.ts\nvar createQuery = (options) => ({ searchParams, ...query } = {}) => {\n\tconst url = require_utils_api_fetch_api.apiUrl(options.path, searchParams || options.defaultSearchParams);\n\tconst fetchApi = require_utils_api_fetch_api.useFetchApi();\n\tconst handleError = require_hooks_use_handle_error();\n\tconst hasPermission = require_hooks_use_permissions.usePermission(options.permissions);\n\tconst result = (0, _tanstack_react_query.useQuery)({\n\t\t...query,\n\t\tenabled: hasPermission && (query.enabled ?? true),\n\t\tqueryKey: [options.dataType, url],\n\t\tqueryFn: () => fetchApi(url, { ...options })\n\t});\n\tconst data = (0, react.useMemo)(() => result.data && options.returnData ? options.returnData(result.data) : result.data, [result.data]);\n\t(0, react.useEffect)(() => {\n\t\tif (result.error && query.defaultErrorHandler !== false) handleError(result.error);\n\t}, [\n\t\thandleError,\n\t\tresult.error,\n\t\tquery.defaultErrorHandler\n\t]);\n\treturn {\n\t\t...result,\n\t\tdata\n\t};\n};\nvar createInfiniteQuery = (options) => ({ searchParams, getNextPageParams, ...query } = {}) => {\n\tconst fetchApi = require_utils_api_fetch_api.useFetchApi();\n\tconst handleError = require_hooks_use_handle_error();\n\tconst hasPermission = require_hooks_use_permissions.usePermission(options.permissions);\n\tconst nextPageParams = getNextPageParams || options.defaultNextPageParams || (() => ({}));\n\tconst result = (0, _tanstack_react_query.useInfiniteQuery)({\n\t\t...query,\n\t\tenabled: hasPermission && (query.enabled ?? true),\n\t\tqueryKey: [options.dataType, require_utils_api_fetch_api.apiUrl(options.path, searchParams || options.defaultSearchParams)],\n\t\tqueryFn: ({ pageParam }) => fetchApi(require_utils_api_fetch_api.apiUrl(options.path, pageParam || searchParams || options.defaultSearchParams), { ...options }),\n\t\tinitialPageParam: void 0,\n\t\tgetNextPageParam: (data) => nextPageParams(data, searchParams || options.defaultSearchParams || {})\n\t});\n\tconst data = (0, react.useMemo)(() => result.data && options.returnData(result.data), [result.data]);\n\t(0, react.useEffect)(() => {\n\t\tif (result.error && query.defaultErrorHandler !== false) handleError(result.error);\n\t}, [\n\t\thandleError,\n\t\tresult.error,\n\t\tquery.defaultErrorHandler\n\t]);\n\treturn {\n\t\t...result,\n\t\tdata\n\t};\n};\nvar createQueryWithId = (options) => (id, { searchParams, ...query } = {}) => {\n\treturn createQuery({\n\t\t...options,\n\t\tpath: options.path(id)\n\t})({\n\t\tsearchParams: searchParams || options.defaultSearchParams,\n\t\t...query\n\t});\n};\nvar mutate = ({ fetchApi, path, payload, searchParams, options }) => {\n\tconst { defaultSearchParams, body, ...requestOptions } = options;\n\tconst url = require_utils_api_fetch_api.apiUrl(path, searchParams || defaultSearchParams);\n\tconst generatedBody = payload && body?.(payload);\n\tlet requestBody = void 0;\n\tif (generatedBody instanceof FormData) requestBody = generatedBody;\n\telse if (generatedBody) requestBody = JSON.stringify(generatedBody);\n\treturn fetchApi(url, {\n\t\tbody: requestBody,\n\t\t...requestOptions\n\t});\n};\nvar createMutation = ({ path, searchParams, defaultSearchParams, updateQueries, invalidateQueries, ...mutateOptions }) => () => {\n\tconst fetchApi = require_utils_api_fetch_api.useFetchApi();\n\tconst queryClient = (0, _tanstack_react_query.useQueryClient)();\n\tconst { onUpdate, onInvalidate, onDelete } = require_providers_framework_provider.useFramework();\n\treturn (0, _tanstack_react_query.useMutation)({\n\t\tmutationFn: (payload) => mutate({\n\t\t\tfetchApi,\n\t\t\tpath: path(payload),\n\t\t\tpayload,\n\t\t\tsearchParams: searchParams?.(payload) || defaultSearchParams,\n\t\t\toptions: mutateOptions\n\t\t}),\n\t\tonSuccess: (0, react.useCallback)((newData, payload) => {\n\t\t\tif (invalidateQueries && \"dataType\" in invalidateQueries) {\n\t\t\t\tconst dataTypes = Array.isArray(invalidateQueries.dataType) ? invalidateQueries.dataType : [invalidateQueries.dataType];\n\t\t\t\tfor (const dataType of dataTypes) {\n\t\t\t\t\tqueryClient.invalidateQueries({ queryKey: [dataType] });\n\t\t\t\t\tonInvalidate(dataType);\n\t\t\t\t}\n\t\t\t} else if (invalidateQueries) queryClient.invalidateQueries(invalidateQueries.filters, invalidateQueries.options);\n\t\t\tif (updateQueries) {\n\t\t\t\tqueryClient.setQueriesData({ queryKey: [updateQueries.dataType] }, (data) => updateQueries.update(newData, data, payload));\n\t\t\t\tif (updateQueries.emberUpdateType === \"createOrUpdate\") onUpdate(updateQueries.dataType, newData);\n\t\t\t\telse if (updateQueries.emberUpdateType === \"delete\") {\n\t\t\t\t\tif (typeof payload !== \"string\") throw new Error(\"Expected delete mutation to have a string (ID) payload. Either change the payload or update the createMutation hook\");\n\t\t\t\t\tonDelete(updateQueries.dataType, payload);\n\t\t\t\t}\n\t\t\t}\n\t\t}, [\n\t\t\tonInvalidate,\n\t\t\tonUpdate,\n\t\t\tonDelete,\n\t\t\tqueryClient\n\t\t])\n\t});\n};\n//#endregion\nexports.createInfiniteQuery = createInfiniteQuery;\nexports.createMutation = createMutation;\nexports.createQuery = createQuery;\nexports.createQueryWithId = createQueryWithId;\n\n//# sourceMappingURL=hooks.cjs.map","Object.defineProperty(exports, Symbol.toStringTag, { value: \"Module\" });\n//#region src/utils/api/update-queries.ts\nvar insertToQueryCache = (field, recordsToInsert) => {\n\treturn (newData, currentData) => {\n\t\tif (!currentData) return currentData;\n\t\tconst getRecords = recordsToInsert || ((response) => response[field]);\n\t\tif (typeof currentData === \"object\" && \"pages\" in currentData) {\n\t\t\tconst { pages } = currentData;\n\t\t\tconst lastPage = pages[pages.length - 1];\n\t\t\treturn {\n\t\t\t\t...currentData,\n\t\t\t\tpages: pages.slice(0, -1).concat({\n\t\t\t\t\t...lastPage,\n\t\t\t\t\t[field]: lastPage[field].concat(getRecords(newData))\n\t\t\t\t})\n\t\t\t};\n\t\t}\n\t\treturn {\n\t\t\t...currentData,\n\t\t\t[field]: currentData[field].concat(getRecords(newData))\n\t\t};\n\t};\n};\nvar updateQueryCache = (field, updatedRecords) => {\n\treturn (newData, currentData) => {\n\t\tif (!currentData) return currentData;\n\t\tconst updated = (updatedRecords || ((response) => {\n\t\t\treturn response[field].reduce((result, record) => ({\n\t\t\t\t...result,\n\t\t\t\t[record.id]: record\n\t\t\t}), {});\n\t\t}))(newData);\n\t\tif (typeof currentData === \"object\" && \"pages\" in currentData) {\n\t\t\tconst { pages } = currentData;\n\t\t\treturn {\n\t\t\t\t...currentData,\n\t\t\t\tpages: pages.map((page) => ({\n\t\t\t\t\t...page,\n\t\t\t\t\t[field]: page[field].map((current) => updated[current.id] || current)\n\t\t\t\t}))\n\t\t\t};\n\t\t}\n\t\treturn {\n\t\t\t...currentData,\n\t\t\t[field]: currentData[field].map((current) => updated[current.id] || current)\n\t\t};\n\t};\n};\nvar deleteFromQueryCache = (field, idsFromPayload) => {\n\treturn (_, currentData, payload) => {\n\t\tif (!currentData) return currentData;\n\t\tconst deletedIds = idsFromPayload?.(payload) || [payload];\n\t\tif (typeof currentData === \"object\" && \"pages\" in currentData) {\n\t\t\tconst { pages } = currentData;\n\t\t\treturn {\n\t\t\t\t...currentData,\n\t\t\t\tpages: pages.map((page) => ({\n\t\t\t\t\t...page,\n\t\t\t\t\t[field]: page[field].filter((current) => !deletedIds.includes(current.id))\n\t\t\t\t}))\n\t\t\t};\n\t\t}\n\t\treturn {\n\t\t\t...currentData,\n\t\t\t[field]: currentData[field].filter((current) => !deletedIds.includes(current.id))\n\t\t};\n\t};\n};\n//#endregion\nexports.deleteFromQueryCache = deleteFromQueryCache;\nexports.insertToQueryCache = insertToQueryCache;\nexports.updateQueryCache = updateQueryCache;\n\n//# sourceMappingURL=update-queries.cjs.map","Object.defineProperty(exports, Symbol.toStringTag, { value: \"Module\" });\n//#region src/utils/errors.ts\nvar APIError = class extends Error {\n\tresponse;\n\tdata;\n\tconstructor(response, data, message, errorOptions) {\n\t\tif (!message && response && response.url.includes(\"/ghost/api/admin/\")) message = `Something went wrong while loading ${response.url.replace(/.+\\/ghost\\/api\\/admin\\//, \"\").replace(/\\W.*/, \"\").replace(\"_\", \" \")}, please try again.`;\n\t\tsuper(message || \"Something went wrong, please try again.\", errorOptions);\n\t\tthis.response = response;\n\t\tthis.data = data;\n\t}\n};\nvar JSONError = class extends APIError {\n\tdata;\n\tconstructor(response, data, message, errorOptions) {\n\t\tsuper(response, data, message, errorOptions);\n\t\tthis.data = data;\n\t}\n};\nvar VersionMismatchError = class extends JSONError {\n\tconstructor(response, data, errorOptions) {\n\t\tsuper(response, data, \"API server is running a newer version of Ghost, please upgrade.\", errorOptions);\n\t}\n};\nvar ServerUnreachableError = class extends APIError {\n\tconstructor(errorOptions) {\n\t\tsuper(void 0, void 0, \"Something went wrong, please try again.\", errorOptions);\n\t}\n};\nvar TimeoutError = class extends APIError {\n\tconstructor(errorOptions) {\n\t\tsuper(void 0, void 0, \"Request timed out, please try again.\", errorOptions);\n\t}\n};\nvar RequestEntityTooLargeError = class extends APIError {\n\tconstructor(response, data, errorOptions) {\n\t\tsuper(response, data, \"Request is larger than the maximum file size the server allows\", errorOptions);\n\t}\n};\nvar UnsupportedMediaTypeError = class extends APIError {\n\tconstructor(response, data, errorOptions) {\n\t\tsuper(response, data, \"Request contains an unknown or unsupported file type.\", errorOptions);\n\t}\n};\nvar MaintenanceError = class extends APIError {\n\tconstructor(response, data, errorOptions) {\n\t\tsuper(response, data, \"Ghost is currently undergoing maintenance, please wait a moment then retry.\", errorOptions);\n\t}\n};\nvar UnauthorizedError = class extends APIError {\n\tconstructor(response, data, errorOptions) {\n\t\tsuper(response, data, \"You are not authorised to make this request.\", errorOptions);\n\t}\n};\nvar SessionExpiredError = class extends UnauthorizedError {};\nvar ThemeValidationError = class extends JSONError {\n\tconstructor(response, data, errorOptions) {\n\t\tsuper(response, data, \"Theme is not compatible or contains errors.\", errorOptions);\n\t}\n};\nvar HostLimitError = class extends JSONError {\n\tconstructor(response, data, errorOptions) {\n\t\tsuper(response, data, \"A hosting plan limit was reached or exceeded.\", errorOptions);\n\t}\n};\nvar EmailError = class extends JSONError {\n\tconstructor(response, data, errorOptions) {\n\t\tsuper(response, data, \"Please verify your email settings\", errorOptions);\n\t}\n};\nvar ValidationError = class extends JSONError {\n\tconstructor(response, data, errorOptions) {\n\t\tsuper(response, data, data.errors[0].message, errorOptions);\n\t}\n};\nvar errorsWithMessage = [\n\tValidationError,\n\tThemeValidationError,\n\tHostLimitError,\n\tEmailError\n];\n/**\n* What the server said went wrong, for showing to a person.\n*\n* The API serializer rewrites `message` to a generic summary and leaves the sentence that\n* explains the failure — and usually what to do about it — in `context`, so that is read\n* first. Any error carrying an API body is read the same way: a caller should not have to\n* know which class it got back to find the text, and reading only one class left every\n* other one showing \"Could not save…\" while the reason sat unread in the payload.\n*/\nfunction getErrorMessage(error, fallback) {\n\tconst apiError = error instanceof JSONError ? error.data?.errors?.[0] : void 0;\n\treturn apiError?.context || apiError?.message || fallback;\n}\nvar AlreadyExistsError = class extends Error {\n\tconstructor(message) {\n\t\tsuper(message);\n\t}\n};\n//#endregion\nexports.APIError = APIError;\nexports.AlreadyExistsError = AlreadyExistsError;\nexports.EmailError = EmailError;\nexports.HostLimitError = HostLimitError;\nexports.JSONError = JSONError;\nexports.MaintenanceError = MaintenanceError;\nexports.RequestEntityTooLargeError = RequestEntityTooLargeError;\nexports.ServerUnreachableError = ServerUnreachableError;\nexports.SessionExpiredError = SessionExpiredError;\nexports.ThemeValidationError = ThemeValidationError;\nexports.TimeoutError = TimeoutError;\nexports.UnauthorizedError = UnauthorizedError;\nexports.UnsupportedMediaTypeError = UnsupportedMediaTypeError;\nexports.ValidationError = ValidationError;\nexports.VersionMismatchError = VersionMismatchError;\nexports.errorsWithMessage = errorsWithMessage;\nexports.getErrorMessage = getErrorMessage;\n\n//# sourceMappingURL=errors.cjs.map","Object.defineProperty(exports, Symbol.toStringTag, { value: \"Module\" });\n//#region src/utils/helpers.ts\nfunction getGhostPaths() {\n\tconst path = window.location.pathname;\n\tconst subdir = path.substr(0, path.search(\"/ghost/\"));\n\treturn {\n\t\tsubdir,\n\t\tadminRoot: `${subdir}/ghost/`,\n\t\tassetRoot: `${subdir}/ghost/assets/`,\n\t\tapiRoot: `${subdir}/ghost/api/admin`\n\t};\n}\nfunction downloadFile(url) {\n\tlet iframe = document.getElementById(\"iframeDownload\");\n\tif (!iframe) {\n\t\tiframe = document.createElement(\"iframe\");\n\t\tiframe.id = \"iframeDownload\";\n\t\tiframe.style.display = \"none\";\n\t\tdocument.body.append(iframe);\n\t}\n\tiframe.setAttribute(\"src\", url);\n}\nfunction downloadFromEndpoint(path) {\n\tdownloadFile(`${getGhostPaths().apiRoot}${path}`);\n}\n/**\n* Extracts the filename from a `Content-Disposition` header, preferring the\n* RFC 5987 extended form (`filename*=`) over the basic `filename=` form.\n* Returns `undefined` when neither is present.\n*/\nfunction getFilenameFromContentDisposition(header) {\n\tif (!header) return;\n\tconst extendedMatch = header.match(/filename\\*=([^;]+)/i);\n\tif (extendedMatch?.[1]) {\n\t\tconst singleQuote = \"'\";\n\t\tconst extValue = extendedMatch[1].trim();\n\t\tconst firstQuote = extValue.indexOf(singleQuote);\n\t\tconst secondQuote = firstQuote === -1 ? -1 : extValue.indexOf(singleQuote, firstQuote + 1);\n\t\tconst encoded = secondQuote === -1 ? extValue : extValue.slice(secondQuote + 1);\n\t\ttry {\n\t\t\treturn decodeURIComponent(encoded.replace(/^[\"']|[\"']$/g, \"\"));\n\t\t} catch {}\n\t}\n\tconst quotedMatch = header.match(/filename=\"([^\"]*)\"/i);\n\tif (quotedMatch?.[1]) return quotedMatch[1].trim();\n\tconst unquotedMatch = header.match(/filename=([^;]+)/i);\n\tif (unquotedMatch?.[1]) return unquotedMatch[1].trim();\n}\n/**\n* Downloads a file by fetching it as a blob and triggering a browser download.\n* Use this instead of downloadFile/downloadFromEndpoint for streaming responses\n* (e.g. large CSV exports) where the iframe approach may not work reliably.\n*\n* The filename comes from the response's `Content-Disposition` header;\n* `fallbackFilename` is only used when the server omits it.\n*/\nasync function blobDownload(url, fallbackFilename, { signal } = {}) {\n\tconst response = await fetch(url, {\n\t\tmethod: \"GET\",\n\t\tsignal\n\t});\n\tif (!response.ok) throw new Error(`Download failed: ${response.status} ${response.statusText}`);\n\tconst filename = getFilenameFromContentDisposition(response.headers.get(\"content-disposition\")) ?? fallbackFilename ?? \"download\";\n\tconst blob = await response.blob();\n\tconst blobUrl = window.URL.createObjectURL(blob);\n\tconst a = document.createElement(\"a\");\n\ta.href = blobUrl;\n\ta.download = filename;\n\tdocument.body.appendChild(a);\n\ta.click();\n\ta.remove();\n\twindow.URL.revokeObjectURL(blobUrl);\n}\nasync function blobDownloadFromEndpoint(path, fallbackFilename, options = {}) {\n\treturn blobDownload(`${getGhostPaths().apiRoot}${path}`, fallbackFilename, options);\n}\n//#endregion\nexports.blobDownload = blobDownload;\nexports.blobDownloadFromEndpoint = blobDownloadFromEndpoint;\nexports.downloadFile = downloadFile;\nexports.downloadFromEndpoint = downloadFromEndpoint;\nexports.getFilenameFromContentDisposition = getFilenameFromContentDisposition;\nexports.getGhostPaths = getGhostPaths;\n\n//# sourceMappingURL=helpers.cjs.map","let _tanstack_react_query = require(\"@tanstack/react-query\");\n//#region src/utils/query-client.ts\nvar queryClient = window.adminXQueryClient || new _tanstack_react_query.QueryClient({ defaultOptions: { queries: {\n\trefetchOnWindowFocus: false,\n\tstaleTime: 5 * (60 * 1e3),\n\tgcTime: 10 * (60 * 1e3),\n\tretry: false,\n\tnetworkMode: \"always\"\n} } });\nwindow.__TANSTACK_QUERY_CLIENT__ = queryClient;\nif (!window.adminXQueryClient) window.adminXQueryClient = queryClient;\n//#endregion\nmodule.exports = queryClient;\n\n//# sourceMappingURL=query-client.cjs.map",null],"mappings":";AACAA,sCAA+CC,WAC/CC,iBAIA,SAAwBC,EAAO,GAAIC,EAAW,CAAC,GAC3C,MACMC,EAAUL,OAAOM,OAAO,CAAC,EADd,CAAC,EAC0BF;AAC5C,IAAKC,EAAQE,eAAgB,CACzB,MAAMC,EAA+B,oBAAdC,WAA6BA,WAC7B,oBAAXC,QAA0BA,OAAOD;AAC7C,IAAKD,EACD,MAAM,IAAIG,MAAM;AAEpBN,EAAQE,eAAiB,SAAUK,GAE/B,WADmBJ,GACLK,gBAAgBD,EAAS,YAC3C,CACJ,CACA,IAAIE,EAAYX;AAahB,GAZKE,EAAQU,SAAyB,SAAdD,IACpBA,EAAYA,EAAUE,QAAQ,cAAe,MAE7CX,EAAQY,qBACRH,EAtBR,SAA4BX,GACxB,OAAOA,EAAKa,QAAQ,2CAA4C,KACpE,CAFA,CAsBuCF,IAEnCA,EAAYA,EACPE,QAAQ,mBAAoB,KAC5BE,OACAF,QAAQ,kBAAmB,IAC3BE,OAEDJ,EAAW,CACX,MAAMK,EAAMd,EAAQE,eAAeO;AAEnC,GAA6B,KAAzBK,EAAIC,KAAKC,YACT,MAAO;AAEXF,EAAIC,KAAKE,iBAAiB,KAAKC,QAASC,IAEpC,IAAKA,EAAQH,aAAaH,OAAOF,QAAQ,WAAY,IAAK,CACtD,GAAIX,EAAQU,SAA+B,OAApBS,EAAQC,QAE3B;AAEJ,GAAIpB,EAAQ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,CAIA,SAASwD,EAAwCU,GAC7C,IAAItF,EAAS;AAOb,OANAsF,EAAK/K,QAASgD,IACV,MAAM9C,EAAU8C,EAAI;AAChB9C,KAAW2I,IACXpD,GAAkBoD,EAAiB3I,MAGpCuF,CACX,SAAA5E,EAAAC,EAAAC,GC5RA,IAAAwD,EAAA,CACA,YACA,eACA,aACA,gBACA,mBACA,gBACA,mBACA,gBACA,mBACA,gBACA,mBACA,gBACA,mBACA,gBACA,mBACA,gBACA,mBACA,gBACA,YACA,eACA,YACA,eACA,aACA,gBACA,aACA,gBACA,aACA,gBACA,mBACA,gBACA,aACA,gBACA,aACA,gBACA,aACA,gBACA,YACA,eACA,aACA,gBACA,aACA,gBACA,aACA,gBACA,aACA,gBACA,YACA,gBACA,mBACA,gBACA,mBACA,eACA,aACA,gBACA,aACA,gBACA,gBACA,mBACA,gBACA,mBACA,eACA,kBACA,gBACA,mBACA,gBACA,mBACA,eACA,kBACA,gBACA,mBACA,gBACA,mBACA,aACA,gBACA,aACA,gBACA,mBACA,gBACA,mBACA,gBACA,mBACA,gBACA,aACA,gBACA,aACA,gBACA,aACA,gBACA,aACA,gBACA,cACA,iBACA,aACA,gBACA,aACA,gBACA,mBACA,gBACA,mBACA,gBACA,aACA,gBACA,aACA,gBACA,aACA,gBACA,aACA,gBACA,mBACA,sBACA,mBACA,sBACA,aACA,gBACA,aACA,gBACA,aACA,gBACA,YACA,eACA,aACA,gBACA,gBACA,mBACA,aACA,gBACA,aACA,gBACA,aACA,gBACA,mBACA,gBACA,aACA,gBACA,aACA,gBACA,aACA,gBACA,aACA,gBACA,aACA,gBACA,aACA,gBACA,aACA,gBACA,aACA,iBACA,oBACA,gBACA,aACA,gBACA,aACA,gBACA,YACA,eACA,aACA,gBACA,aACA,gBACA,aACA,gBACA,aACA,gBACA,aACA,gBACA,aACA,gBACA,aACA,gBACA,YACA,eACA,aACA,gBACA,mBACA,gBACA,aACA,gBACA,YACA,eACA,YACA,eACA,aACA,gBACA,aACA,gBACA,mBACA,gBACA,aACA,gBACA,iBACA,oBACA,gBACA,mBACA,YACA,eACA,aACA,gBACA,mBACA,gBACA,aACA,gBACA,aACA,gBACA,aACA,gBACA,YACA,eACA,aACA,gBACA,aACA,gBACA,aACA,gBACA,aACA,gBACA,aACA,kBACA,qBACA,gBACA,aACA,gBACA,aACA,gBACA,aACA,gBACA,aACA,gBACA,aACA,gBACA,cACA,iBACA,aACA,gBACA,YACA,eACA,aACA,gBACA,gBACA,mBACA,cACA,iBACA,aACA,gBACA,cACA,iBACA,cACA,mBACA,sBACA,iBACA,gBACA,mBACA,aACA,gBACA,aACA,gBACA,aACA,kBACA,qBACA,gBACA,aACA,gBACA,mBACA,sBACA,aACA,gBACA,gBACA,mBACA,gBACA,mBACA,gBACA,mBACA,gBACA;AAIA,SAAAyG,EAAAC,GACA,IAAAC,EAAAC,EAAAF;AACA,OAAAG,EAAAF,EACA,CACA,SAAAC,EAAAF,GACA,IAAAG,EAAAC,EAAA9G,EAAA0G,GAAA,CACA,IAAApK,EAAA,IAAAzB,MAAA,uBAAA6L,EAAA;AAEA,MADApK,EAAAsI,KAAA,mBACAtI,CACA,CACA,OAAA0D,EAAA0G,EACA,CACAD,EAAA3G,KAAA,WACA,OAAA5F,OAAA4F,KAAAE,EACA,EACAyG,EAAAM,QAAAH,EACAI,EAAA5M,QAAAqM,EACAA,EAAAE,GAAA,iCAAArK,EAAAC,GCtSA3B,OAAAqM,OAAAvK,QACA9B,OAAAsM,OAAAC,qBCFAjN,OAAAkN,eAAAhN,EAAAiN,OAAAC,YAAA,CAAqDnN,MAAA;AAGrD,IAAAoN,EAAA,qBACAC,EAAAD,EACAE,EAJgCZ,EAAQ,OAIxCa,YAAA,CACAH,WACAI,KAAA,aAYAC,EAAA;AAMAxN,EAAAwN,sBAA6BA,EAC7BxN,EAAAoN,eAAsBA,EACtBpN,EAAAyN,iBAfAC,IACA,MAAAC,EAAAD,GAAAE,cAAAC,cAAAF;AACA,uBAAAA,KAAAhM,OAAA,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