{"version":3,"file":"chunk.931.0b30ecaab295ddcabb05.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","hasSendingDomain","config","sendingDomain","hostSettings","managedEmail","isManagedEmail","enabled","require_hooks_use_handle_error","require_utils_api_fetch_api","react","_tanstack_react_query","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","useSearchIndexPosts","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_permissions","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_pintura_config","koenigFileUploadTypes","useConfirmUnload","useFilterableApi","useForm","useHandleError","useKoenigFetchEmbed","useKoenigFileUpload","useKoenigLinkSuggestions","usePermission","usePinturaConfig","require_rolldown_runtime","__toESM","shouldConfirmUnload","handleBeforeUnload","event","preventDefault","returnValue","addEventListener","removeEventListener","require_utils_nql","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","file","getStringAtPath","maybeObj","progress","setProgress","isLoading","setLoading","filesNumber","setFilesNumber","progressTracker","updateProgress","size","totalProgress","Math","round","defaultValidator","extension","exec","name","uploadFile","formData","fileFormData","FormData","append","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","usePagination","setPage","prevMeta","setPrevMeta","total","nextPage","min","prevPage","max","require_api_current_user","requiredRoles","currentUser","currentUserRoles","roles","role","require_api_config","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","queryClientOptions","props","jsx","ErrorBoundary","QueryClientProvider","client","QueryClient","defaultOptions","queries","refetchOnWindowFocus","staleTime","refetchOnMount","gcTime","retry","networkMode","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","onload","Response","statusText","onerror","onSignalAbort","abort","onloadend","send","activityPubRoot","useActivityPub","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","VersionMismatchError","ValidationError","ThemeValidationError","HostLimitError","EmailError","JSONError","require_hooks_use_pagination","hasPermission","permissions","defaultErrorHandler","getNextPageParams","nextPageParams","useInfiniteQuery","pageParam","initialPageParam","getNextPageParam","mutateOptions","useMutation","mutationFn","requestOptions","generatedBody","requestBody","onSuccess","setQueriesData","createPaginatedQuery","parseInt","paginatedSearchParams","isFetching","deleteFromQueryCache","idsFromPayload","_","currentData","deletedIds","recordsToInsert","getRecords","concat","updatedRecords","updated","reduce","record","constructor","errorOptions","super","this","errorsWithMessage","AlreadyExistsError","fallback","subdir","substr","assetRoot","downloadFile","iframe","document","getElementById","display","setAttribute","getFilenameFromContentDisposition","header","extendedMatch","singleQuote","extValue","firstQuote","secondQuote","encoded","decodeURIComponent","quotedMatch","unquotedMatch","blobDownload","fallbackFilename","filename","blob","blobUrl","createObjectURL","download","appendChild","click","revokeObjectURL","blobDownloadFromEndpoint","downloadFromEndpoint","adminXQueryClient","__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--2961-QDxg68lh4bbX/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-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-pagination.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/nql.cjs","webpack://__ember_auto_import__/admin-x-framework/dist/utils/query-client.cjs"],"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) || (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\n            .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: [\n        [1, 'p', [\n                [0, [], 0, '']\n            ]]\n    ]\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] || !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 || serializedMobiledoc === undefined || 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) { // link is open\n                // Create an empty link node if it doesn't exist already\n                linkNode = linkNode !== undefined ? linkNode : 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, { tag, type: 'list', listType, start: 1, direction: 'ltr' });\n    listItems?.forEach((listItem, i) => {\n        const listItemNode = createEmptyLexicalNode('li', { type: 'listitem', value: i + 1, direction: 'ltr' });\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\": 82909,\n\t\"./af.js\": 82909,\n\t\"./ar\": 12785,\n\t\"./ar-dz\": 93396,\n\t\"./ar-dz.js\": 93396,\n\t\"./ar-kw\": 69208,\n\t\"./ar-kw.js\": 69208,\n\t\"./ar-ly\": 677,\n\t\"./ar-ly.js\": 677,\n\t\"./ar-ma\": 45668,\n\t\"./ar-ma.js\": 45668,\n\t\"./ar-ps\": 43583,\n\t\"./ar-ps.js\": 43583,\n\t\"./ar-sa\": 70870,\n\t\"./ar-sa.js\": 70870,\n\t\"./ar-tn\": 30120,\n\t\"./ar-tn.js\": 30120,\n\t\"./ar.js\": 12785,\n\t\"./az\": 12617,\n\t\"./az.js\": 12617,\n\t\"./be\": 4963,\n\t\"./be.js\": 4963,\n\t\"./bg\": 13925,\n\t\"./bg.js\": 13925,\n\t\"./bm\": 22091,\n\t\"./bm.js\": 22091,\n\t\"./bn\": 14990,\n\t\"./bn-bd\": 95993,\n\t\"./bn-bd.js\": 95993,\n\t\"./bn.js\": 14990,\n\t\"./bo\": 47949,\n\t\"./bo.js\": 47949,\n\t\"./br\": 81162,\n\t\"./br.js\": 81162,\n\t\"./bs\": 51417,\n\t\"./bs.js\": 51417,\n\t\"./ca\": 95606,\n\t\"./ca.js\": 95606,\n\t\"./cs\": 53724,\n\t\"./cs.js\": 53724,\n\t\"./cv\": 1223,\n\t\"./cv.js\": 1223,\n\t\"./cy\": 45390,\n\t\"./cy.js\": 45390,\n\t\"./da\": 789,\n\t\"./da.js\": 789,\n\t\"./de\": 78041,\n\t\"./de-at\": 44451,\n\t\"./de-at.js\": 44451,\n\t\"./de-ch\": 99237,\n\t\"./de-ch.js\": 99237,\n\t\"./de.js\": 78041,\n\t\"./dv\": 30768,\n\t\"./dv.js\": 30768,\n\t\"./el\": 88975,\n\t\"./el.js\": 88975,\n\t\"./en-au\": 16628,\n\t\"./en-au.js\": 16628,\n\t\"./en-ca\": 92550,\n\t\"./en-ca.js\": 92550,\n\t\"./en-gb\": 86295,\n\t\"./en-gb.js\": 86295,\n\t\"./en-ie\": 78140,\n\t\"./en-ie.js\": 78140,\n\t\"./en-il\": 10155,\n\t\"./en-il.js\": 10155,\n\t\"./en-in\": 53293,\n\t\"./en-in.js\": 53293,\n\t\"./en-nz\": 39342,\n\t\"./en-nz.js\": 39342,\n\t\"./en-sg\": 28928,\n\t\"./en-sg.js\": 28928,\n\t\"./eo\": 91490,\n\t\"./eo.js\": 91490,\n\t\"./es\": 78038,\n\t\"./es-do\": 32730,\n\t\"./es-do.js\": 32730,\n\t\"./es-mx\": 6430,\n\t\"./es-mx.js\": 6430,\n\t\"./es-us\": 56443,\n\t\"./es-us.js\": 56443,\n\t\"./es.js\": 78038,\n\t\"./et\": 71255,\n\t\"./et.js\": 71255,\n\t\"./eu\": 29952,\n\t\"./eu.js\": 29952,\n\t\"./fa\": 69419,\n\t\"./fa.js\": 69419,\n\t\"./fi\": 52291,\n\t\"./fi.js\": 52291,\n\t\"./fil\": 66559,\n\t\"./fil.js\": 66559,\n\t\"./fo\": 79465,\n\t\"./fo.js\": 79465,\n\t\"./fr\": 66014,\n\t\"./fr-ca\": 79383,\n\t\"./fr-ca.js\": 79383,\n\t\"./fr-ch\": 69864,\n\t\"./fr-ch.js\": 69864,\n\t\"./fr.js\": 66014,\n\t\"./fy\": 66355,\n\t\"./fy.js\": 66355,\n\t\"./ga\": 4442,\n\t\"./ga.js\": 4442,\n\t\"./gd\": 72581,\n\t\"./gd.js\": 72581,\n\t\"./gl\": 17997,\n\t\"./gl.js\": 17997,\n\t\"./gom-deva\": 2480,\n\t\"./gom-deva.js\": 2480,\n\t\"./gom-latn\": 74347,\n\t\"./gom-latn.js\": 74347,\n\t\"./gu\": 42198,\n\t\"./gu.js\": 42198,\n\t\"./he\": 77861,\n\t\"./he.js\": 77861,\n\t\"./hi\": 94129,\n\t\"./hi.js\": 94129,\n\t\"./hr\": 30528,\n\t\"./hr.js\": 30528,\n\t\"./hu\": 47381,\n\t\"./hu.js\": 47381,\n\t\"./hy-am\": 42380,\n\t\"./hy-am.js\": 42380,\n\t\"./id\": 79187,\n\t\"./id.js\": 79187,\n\t\"./is\": 45082,\n\t\"./is.js\": 45082,\n\t\"./it\": 65123,\n\t\"./it-ch\": 63303,\n\t\"./it-ch.js\": 63303,\n\t\"./it.js\": 65123,\n\t\"./ja\": 92063,\n\t\"./ja.js\": 92063,\n\t\"./jv\": 58222,\n\t\"./jv.js\": 58222,\n\t\"./ka\": 69550,\n\t\"./ka.js\": 69550,\n\t\"./kk\": 38748,\n\t\"./kk.js\": 38748,\n\t\"./km\": 39994,\n\t\"./km.js\": 39994,\n\t\"./kn\": 43719,\n\t\"./kn.js\": 43719,\n\t\"./ko\": 19568,\n\t\"./ko.js\": 19568,\n\t\"./ku\": 38226,\n\t\"./ku-kmr\": 2729,\n\t\"./ku-kmr.js\": 2729,\n\t\"./ku.js\": 38226,\n\t\"./ky\": 80630,\n\t\"./ky.js\": 80630,\n\t\"./lb\": 25732,\n\t\"./lb.js\": 25732,\n\t\"./lo\": 80135,\n\t\"./lo.js\": 80135,\n\t\"./lt\": 73586,\n\t\"./lt.js\": 73586,\n\t\"./lv\": 46824,\n\t\"./lv.js\": 46824,\n\t\"./me\": 93576,\n\t\"./me.js\": 93576,\n\t\"./mi\": 9516,\n\t\"./mi.js\": 9516,\n\t\"./mk\": 21270,\n\t\"./mk.js\": 21270,\n\t\"./ml\": 14487,\n\t\"./ml.js\": 14487,\n\t\"./mn\": 7481,\n\t\"./mn.js\": 7481,\n\t\"./mr\": 20365,\n\t\"./mr.js\": 20365,\n\t\"./ms\": 71054,\n\t\"./ms-my\": 43925,\n\t\"./ms-my.js\": 43925,\n\t\"./ms.js\": 71054,\n\t\"./mt\": 32207,\n\t\"./mt.js\": 32207,\n\t\"./my\": 79388,\n\t\"./my.js\": 79388,\n\t\"./nb\": 1318,\n\t\"./nb.js\": 1318,\n\t\"./ne\": 20999,\n\t\"./ne.js\": 20999,\n\t\"./nl\": 73624,\n\t\"./nl-be\": 48492,\n\t\"./nl-be.js\": 48492,\n\t\"./nl.js\": 73624,\n\t\"./nn\": 85378,\n\t\"./nn.js\": 85378,\n\t\"./oc-lnc\": 91966,\n\t\"./oc-lnc.js\": 91966,\n\t\"./pa-in\": 92733,\n\t\"./pa-in.js\": 92733,\n\t\"./pl\": 80854,\n\t\"./pl.js\": 80854,\n\t\"./pt\": 95950,\n\t\"./pt-br\": 90051,\n\t\"./pt-br.js\": 90051,\n\t\"./pt.js\": 95950,\n\t\"./ro\": 7485,\n\t\"./ro.js\": 7485,\n\t\"./ru\": 44195,\n\t\"./ru.js\": 44195,\n\t\"./sd\": 25225,\n\t\"./sd.js\": 25225,\n\t\"./se\": 12698,\n\t\"./se.js\": 12698,\n\t\"./si\": 65550,\n\t\"./si.js\": 65550,\n\t\"./sk\": 85316,\n\t\"./sk.js\": 85316,\n\t\"./sl\": 71070,\n\t\"./sl.js\": 71070,\n\t\"./sq\": 50454,\n\t\"./sq.js\": 50454,\n\t\"./sr\": 4275,\n\t\"./sr-cyrl\": 5630,\n\t\"./sr-cyrl.js\": 5630,\n\t\"./sr.js\": 4275,\n\t\"./ss\": 4012,\n\t\"./ss.js\": 4012,\n\t\"./sv\": 8983,\n\t\"./sv.js\": 8983,\n\t\"./sw\": 19264,\n\t\"./sw.js\": 19264,\n\t\"./ta\": 86117,\n\t\"./ta.js\": 86117,\n\t\"./te\": 53801,\n\t\"./te.js\": 53801,\n\t\"./tet\": 42425,\n\t\"./tet.js\": 42425,\n\t\"./tg\": 10311,\n\t\"./tg.js\": 10311,\n\t\"./th\": 94126,\n\t\"./th.js\": 94126,\n\t\"./tk\": 43755,\n\t\"./tk.js\": 43755,\n\t\"./tl-ph\": 72347,\n\t\"./tl-ph.js\": 72347,\n\t\"./tlh\": 51440,\n\t\"./tlh.js\": 51440,\n\t\"./tr\": 32588,\n\t\"./tr.js\": 32588,\n\t\"./tzl\": 22746,\n\t\"./tzl.js\": 22746,\n\t\"./tzm\": 77801,\n\t\"./tzm-latn\": 73819,\n\t\"./tzm-latn.js\": 73819,\n\t\"./tzm.js\": 77801,\n\t\"./ug-cn\": 88722,\n\t\"./ug-cn.js\": 88722,\n\t\"./uk\": 70750,\n\t\"./uk.js\": 70750,\n\t\"./ur\": 16517,\n\t\"./ur.js\": 16517,\n\t\"./uz\": 50541,\n\t\"./uz-latn\": 92055,\n\t\"./uz-latn.js\": 92055,\n\t\"./uz.js\": 50541,\n\t\"./vi\": 93811,\n\t\"./vi.js\": 93811,\n\t\"./x-pseudo\": 97415,\n\t\"./x-pseudo.js\": 97415,\n\t\"./yo\": 43886,\n\t\"./yo.js\": 43886,\n\t\"./zh-cn\": 89900,\n\t\"./zh-cn.js\": 89900,\n\t\"./zh-hk\": 2732,\n\t\"./zh-hk.js\": 2732,\n\t\"./zh-mo\": 82433,\n\t\"./zh-mo.js\": 82433,\n\t\"./zh-tw\": 51244,\n\t\"./zh-tw.js\": 51244\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};\n//#endregion\nexports.configDataType = configDataType;\nexports.hasSendingDomain = hasSendingDomain;\nexports.isManagedEmail = isManagedEmail;\nexports.sendingDomain = sendingDomain;\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 react = require(\"react\");\nlet _tanstack_react_query = require(\"@tanstack/react-query\");\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 useSearchIndexPosts = require_utils_api_hooks.createQuery({\n\tdataType,\n\tpath: \"/search-index/posts/\"\n});\n//#endregion\nexports.getPost = getPost;\nexports.useBrowsePosts = useBrowsePosts;\nexports.useBrowsePostsInfinite = useBrowsePostsInfinite;\nexports.useDeletePost = useDeletePost;\nexports.useSearchIndexPosts = useSearchIndexPosts;\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_hooks_use_permissions = require(\"./hooks/use-permissions.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_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.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.usePermission = require_hooks_use_permissions.usePermission;\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","const require_utils_api_fetch_api = require(\"../utils/api/fetch-api.cjs\");\nconst require_utils_nql = require(\"../utils/nql.cjs\");\nlet react = require(\"react\");\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}:~${require_utils_nql.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 react = require(\"react\");\nlet _sentry_react = require(\"@sentry/react\");\n_sentry_react = require_rolldown_runtime.__toESM(_sentry_react, 1);\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\" });\nlet react = require(\"react\");\n//#region src/hooks/use-pagination.ts\nvar usePagination = ({ limit, meta, page, setPage }) => {\n\tconst [prevMeta, setPrevMeta] = (0, react.useState)(meta);\n\t(0, react.useEffect)(() => {\n\t\tif (meta) {\n\t\t\tsetPrevMeta(meta);\n\t\t\tif (meta.pages > 0 && meta.pages < page) setPage(meta.pages);\n\t\t}\n\t}, [\n\t\tmeta,\n\t\tsetPage,\n\t\tpage\n\t]);\n\treturn {\n\t\tpage,\n\t\tsetPage,\n\t\tpages: prevMeta?.pages ?? null,\n\t\tlimit: prevMeta?.limit && prevMeta.limit !== \"all\" ? prevMeta.limit : limit,\n\t\ttotal: prevMeta?.total ?? null,\n\t\tnextPage: () => setPage(Math.min(page + 1, prevMeta?.pages ? prevMeta.pages : page)),\n\t\tprevPage: () => setPage(Math.max(1, page - 1))\n\t};\n};\n//#endregion\nexports.usePagination = usePagination;\n\n//# sourceMappingURL=use-pagination.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)?.hostSettings?.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 react = require(\"react\");\nlet _sentry_react = require(\"@sentry/react\");\nlet _tanstack_react_query = require(\"@tanstack/react-query\");\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, queryClientOptions, ...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\tif (!queryClientOptions) return require_utils_query_client;\n\t\t\treturn new _tanstack_react_query.QueryClient({ defaultOptions: { queries: {\n\t\t\t\trefetchOnWindowFocus: queryClientOptions.refetchOnWindowFocus ?? false,\n\t\t\t\tstaleTime: queryClientOptions.staleTime ?? 5 * (60 * 1e3),\n\t\t\t\trefetchOnMount: queryClientOptions.refetchOnMount ?? false,\n\t\t\t\tgcTime: 10 * (60 * 1e3),\n\t\t\t\tretry: false,\n\t\t\t\tnetworkMode: \"always\"\n\t\t\t} } });\n\t\t}, [queryClientOverride, queryClientOptions]),\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 react = require(\"react\");\nlet _sentry_react = require(\"@sentry/react\");\n_sentry_react = require_rolldown_runtime.__toESM(_sentry_react, 1);\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, 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));\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, activityPubRoot } = require_utils_helpers.getGhostPaths();\nvar apiUrl = (path, searchParams = {}, useActivityPub = false) => {\n\tconst url = new URL(`${useActivityPub ? activityPubRoot : 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 handleResponse = async (response) => {\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 (response.headers.get(\"content-type\")?.includes(\"text/csv\")) 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_hooks_use_pagination = require(\"../../hooks/use-pagination.cjs\");\nconst require_utils_api_fetch_api = require(\"./fetch-api.cjs\");\nconst require_hooks_use_permissions = require(\"../../hooks/use-permissions.cjs\");\nlet react = require(\"react\");\nlet _tanstack_react_query = require(\"@tanstack/react-query\");\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, options?.useActivityPub);\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 createPaginatedQuery = (options) => ({ searchParams, ...query } = {}) => {\n\tconst [page, setPage] = (0, react.useState)(1);\n\tconst limit = searchParams?.limit || options.defaultSearchParams?.limit ? parseInt(searchParams?.limit || options.defaultSearchParams?.limit || \"15\") : 15;\n\tconst paginatedSearchParams = searchParams || options.defaultSearchParams || {};\n\tpaginatedSearchParams.page = page.toString();\n\tconst url = require_utils_api_fetch_api.apiUrl(options.path, paginatedSearchParams, options?.useActivityPub);\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\tconst pagination = require_hooks_use_pagination.usePagination({\n\t\tpage,\n\t\tsetPage,\n\t\tlimit,\n\t\tmeta: result.isFetching ? void 0 : data?.meta?.pagination\n\t});\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\tpagination\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, options?.useActivityPub)],\n\t\tqueryFn: ({ pageParam }) => fetchApi(require_utils_api_fetch_api.apiUrl(options.path, pageParam || searchParams || options.defaultSearchParams, options?.useActivityPub)),\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, options?.useActivityPub);\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\tqueryClient.invalidateQueries({ queryKey: [invalidateQueries.dataType] });\n\t\t\t\tonInvalidate(invalidateQueries.dataType);\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.createPaginatedQuery = createPaginatedQuery;\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];\nfunction getErrorMessage(error, fallback) {\n\tif (error instanceof ValidationError && error.data?.errors[0]) return error.data.errors[0].context || error.data.errors[0].message;\n\treturn 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\tactivityPubRoot: `${subdir}/.ghost/activitypub`\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) {\n\tconst response = await fetch(url, { method: \"GET\" });\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) {\n\treturn blobDownload(`${getGhostPaths().apiRoot}${path}`, fallbackFilename);\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","Object.defineProperty(exports, Symbol.toStringTag, { value: \"Module\" });\n//#region src/utils/nql.ts\nfunction escapeNqlString(value) {\n\treturn `'${value.replace(/'/g, \"\\\\'\")}'`;\n}\n//#endregion\nexports.escapeNqlString = escapeNqlString;\n\n//# sourceMappingURL=nql.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"],"mappings":";AACAA,sC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,mBACA,gBACA,aACA,gBACA,aACA,gBACA,aACA,gBACA,aACA,gBACA,aACA,gBACA,YACA,eACA,aACA,gBACA,WACA,cACA,aACA,gBACA,mBACA,gBACA,mBACA,gBACA,aACA,gBACA,aACA,gBACA,gBACA,mBACA,gBACA,mBACA,gBACA,mBACA,gBACA,mBACA,gBACA,mBACA,gBACA,mBACA,gBACA,mBACA,gBACA,mBACA,aACA,gBACA,aACA,gBACA,mBACA,eACA,kBACA,gBACA,mBACA,gBACA,aACA,gBACA,aACA,gBACA,aACA,gBACA,aACA,gBACA,cACA,iBACA,aACA,gBACA,aACA,gBACA,mBACA,gBACA,mBACA,gBACA,aACA,gBACA,YACA,eACA,aACA,gBACA,aACA,gBACA,kBACA,qBACA,mBACA,sBACA,aACA,gBACA,aACA,gBACA,aACA,gBACA,aACA,gBACA,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,gBACA,mBACA,gBACA,aACA,gBACA,aACA,gBACA,aACA,gBACA,aACA,gBACA,aACA,gBACA,aACA,gBACA,YACA,eACA,aACA,gBACA,aACA,gBACA,YACA,eACA,aACA,gBACA,aACA,gBACA,mBACA,gBACA,aACA,gBACA,aACA,gBACA,YACA,eACA,aACA,gBACA,aACA,gBACA,mBACA,gBACA,aACA,gBACA,iBACA,oBACA,gBACA,mBACA,aACA,gBACA,aACA,gBACA,mBACA,gBACA,YACA,eACA,aACA,gBACA,aACA,gBACA,aACA,gBACA,aACA,gBACA,aACA,gBACA,aACA,gBACA,aACA,gBACA,YACA,iBACA,oBACA,eACA,YACA,eACA,YACA,eACA,aACA,gBACA,aACA,gBACA,aACA,gBACA,cACA,iBACA,aACA,gBACA,aACA,gBACA,aACA,gBACA,gBACA,mBACA,cACA,iBACA,aACA,gBACA,cACA,iBACA,cACA,mBACA,sBACA,iBACA,gBACA,m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