zudoku 0.24.1 → 0.25.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (45) hide show
  1. package/dist/lib/components/Header.js +13 -13
  2. package/dist/lib/components/Header.js.map +1 -1
  3. package/dist/lib/components/Layout.js +1 -1
  4. package/dist/lib/components/Layout.js.map +1 -1
  5. package/dist/lib/components/TopNavigation.js +2 -2
  6. package/dist/lib/components/TopNavigation.js.map +1 -1
  7. package/dist/lib/components/navigation/SidebarWrapper.js +1 -1
  8. package/dist/lib/components/navigation/SidebarWrapper.js.map +1 -1
  9. package/dist/lib/plugins/openapi/CollapsibleCode.js +2 -1
  10. package/dist/lib/plugins/openapi/CollapsibleCode.js.map +1 -1
  11. package/dist/lib/plugins/openapi/Endpoint.js +1 -1
  12. package/dist/lib/plugins/openapi/Endpoint.js.map +1 -1
  13. package/dist/lib/plugins/openapi/Sidecar.js +1 -1
  14. package/dist/lib/plugins/openapi/SidecarBox.js +4 -4
  15. package/dist/lib/plugins/openapi/SidecarBox.js.map +1 -1
  16. package/dist/lib/plugins/openapi/playground/Headers.js +1 -1
  17. package/dist/lib/plugins/openapi/playground/Headers.js.map +1 -1
  18. package/dist/lib/plugins/openapi/playground/PlaygroundDialog.js +1 -1
  19. package/dist/lib/plugins/openapi/playground/PlaygroundDialog.js.map +1 -1
  20. package/dist/lib/ui/Card.js +1 -1
  21. package/dist/lib/ui/Card.js.map +1 -1
  22. package/lib/{OperationList-CqLL5P5l.js → OperationList-c6V_vcgz.js} +787 -802
  23. package/lib/OperationList-c6V_vcgz.js.map +1 -0
  24. package/lib/{index-DzRORsY1.js → index-DkwDHnit.js} +4 -3
  25. package/lib/index-DkwDHnit.js.map +1 -0
  26. package/lib/ui/Card.js +7 -7
  27. package/lib/ui/Card.js.map +1 -1
  28. package/lib/zudoku.components.js +140 -140
  29. package/lib/zudoku.components.js.map +1 -1
  30. package/lib/zudoku.plugin-openapi.js +1 -1
  31. package/package.json +1 -1
  32. package/src/app/main.css +50 -37
  33. package/src/lib/components/Header.tsx +9 -5
  34. package/src/lib/components/Layout.tsx +1 -1
  35. package/src/lib/components/TopNavigation.tsx +2 -2
  36. package/src/lib/components/navigation/SidebarWrapper.tsx +2 -2
  37. package/src/lib/plugins/openapi/CollapsibleCode.tsx +10 -7
  38. package/src/lib/plugins/openapi/Endpoint.tsx +1 -3
  39. package/src/lib/plugins/openapi/Sidecar.tsx +2 -2
  40. package/src/lib/plugins/openapi/SidecarBox.tsx +4 -16
  41. package/src/lib/plugins/openapi/playground/Headers.tsx +1 -0
  42. package/src/lib/plugins/openapi/playground/PlaygroundDialog.tsx +1 -1
  43. package/src/lib/ui/Card.tsx +1 -1
  44. package/lib/OperationList-CqLL5P5l.js.map +0 -1
  45. package/lib/index-DzRORsY1.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"zudoku.components.js","sources":["../../../node_modules/.pnpm/@tanstack+query-core@5.62.3/node_modules/@tanstack/query-core/build/modern/queryCache.js","../../../node_modules/.pnpm/@tanstack+query-core@5.62.3/node_modules/@tanstack/query-core/build/modern/mutationCache.js","../../../node_modules/.pnpm/@tanstack+query-core@5.62.3/node_modules/@tanstack/query-core/build/modern/infiniteQueryBehavior.js","../../../node_modules/.pnpm/@tanstack+query-core@5.62.3/node_modules/@tanstack/query-core/build/modern/queryClient.js","../../../node_modules/.pnpm/@tanstack+query-core@5.62.3/node_modules/@tanstack/query-core/build/modern/hydration.js","../../../node_modules/.pnpm/@tanstack+react-query@5.62.3_react@19.0.0/node_modules/@tanstack/react-query/build/modern/HydrationBoundary.js","../src/lib/errors/ServerError.tsx","../../../node_modules/.pnpm/react-router@7.0.2_react-dom@19.0.0_react@19.0.0__react@19.0.0/node_modules/react-router/dist/development/dom-export.mjs","../src/lib/components/Bootstrap.tsx","../../../node_modules/.pnpm/spin-delay@2.0.1_react@19.0.0/node_modules/spin-delay/dist/index.js","../src/lib/components/navigation/SidebarBadge.tsx","../src/lib/components/navigation/SidebarCategory.tsx","../src/lib/components/navigation/SidebarItem.tsx","../src/lib/util/useScrollToAnchor.ts","../src/lib/util/useScrollToTop.ts","../src/lib/ui/Skeleton.tsx","../src/lib/core/plugins.ts","../src/lib/components/Banner.tsx","../src/lib/components/Search.tsx","../src/lib/components/ThemeSwitch.tsx","../src/lib/components/TopNavigation.tsx","../src/lib/components/MobileTopNavigation.tsx","../src/lib/components/Header.tsx","../src/lib/components/navigation/SidebarWrapper.tsx","../src/lib/components/navigation/Sidebar.tsx","../src/lib/components/Layout.tsx","../../../node_modules/.pnpm/react-error-boundary@4.1.2_react@19.0.0/node_modules/react-error-boundary/dist/react-error-boundary.esm.js","../src/lib/core/ZudokuContext.ts","../src/lib/errors/TopLevelError.tsx","../src/lib/util/requestIdleCallbackPolyfill.ts","../src/lib/components/context/ComponentsContext.tsx","../src/lib/components/context/ZudokuProvider.tsx","../src/lib/components/Zudoku.tsx","../src/lib/components/index.ts"],"sourcesContent":["// src/queryCache.ts\nimport { hashQueryKeyByOptions, matchQuery } from \"./utils.js\";\nimport { Query } from \"./query.js\";\nimport { notifyManager } from \"./notifyManager.js\";\nimport { Subscribable } from \"./subscribable.js\";\nvar QueryCache = class extends Subscribable {\n constructor(config = {}) {\n super();\n this.config = config;\n this.#queries = /* @__PURE__ */ new Map();\n }\n #queries;\n build(client, options, state) {\n const queryKey = options.queryKey;\n const queryHash = options.queryHash ?? hashQueryKeyByOptions(queryKey, options);\n let query = this.get(queryHash);\n if (!query) {\n query = new Query({\n cache: this,\n queryKey,\n queryHash,\n options: client.defaultQueryOptions(options),\n state,\n defaultOptions: client.getQueryDefaults(queryKey)\n });\n this.add(query);\n }\n return query;\n }\n add(query) {\n if (!this.#queries.has(query.queryHash)) {\n this.#queries.set(query.queryHash, query);\n this.notify({\n type: \"added\",\n query\n });\n }\n }\n remove(query) {\n const queryInMap = this.#queries.get(query.queryHash);\n if (queryInMap) {\n query.destroy();\n if (queryInMap === query) {\n this.#queries.delete(query.queryHash);\n }\n this.notify({ type: \"removed\", query });\n }\n }\n clear() {\n notifyManager.batch(() => {\n this.getAll().forEach((query) => {\n this.remove(query);\n });\n });\n }\n get(queryHash) {\n return this.#queries.get(queryHash);\n }\n getAll() {\n return [...this.#queries.values()];\n }\n find(filters) {\n const defaultedFilters = { exact: true, ...filters };\n return this.getAll().find(\n (query) => matchQuery(defaultedFilters, query)\n );\n }\n findAll(filters = {}) {\n const queries = this.getAll();\n return Object.keys(filters).length > 0 ? queries.filter((query) => matchQuery(filters, query)) : queries;\n }\n notify(event) {\n notifyManager.batch(() => {\n this.listeners.forEach((listener) => {\n listener(event);\n });\n });\n }\n onFocus() {\n notifyManager.batch(() => {\n this.getAll().forEach((query) => {\n query.onFocus();\n });\n });\n }\n onOnline() {\n notifyManager.batch(() => {\n this.getAll().forEach((query) => {\n query.onOnline();\n });\n });\n }\n};\nexport {\n QueryCache\n};\n//# sourceMappingURL=queryCache.js.map","// src/mutationCache.ts\nimport { notifyManager } from \"./notifyManager.js\";\nimport { Mutation } from \"./mutation.js\";\nimport { matchMutation, noop } from \"./utils.js\";\nimport { Subscribable } from \"./subscribable.js\";\nvar MutationCache = class extends Subscribable {\n constructor(config = {}) {\n super();\n this.config = config;\n this.#mutations = /* @__PURE__ */ new Map();\n this.#mutationId = Date.now();\n }\n #mutations;\n #mutationId;\n build(client, options, state) {\n const mutation = new Mutation({\n mutationCache: this,\n mutationId: ++this.#mutationId,\n options: client.defaultMutationOptions(options),\n state\n });\n this.add(mutation);\n return mutation;\n }\n add(mutation) {\n const scope = scopeFor(mutation);\n const mutations = this.#mutations.get(scope) ?? [];\n mutations.push(mutation);\n this.#mutations.set(scope, mutations);\n this.notify({ type: \"added\", mutation });\n }\n remove(mutation) {\n const scope = scopeFor(mutation);\n if (this.#mutations.has(scope)) {\n const mutations = this.#mutations.get(scope)?.filter((x) => x !== mutation);\n if (mutations) {\n if (mutations.length === 0) {\n this.#mutations.delete(scope);\n } else {\n this.#mutations.set(scope, mutations);\n }\n }\n }\n this.notify({ type: \"removed\", mutation });\n }\n canRun(mutation) {\n const firstPendingMutation = this.#mutations.get(scopeFor(mutation))?.find((m) => m.state.status === \"pending\");\n return !firstPendingMutation || firstPendingMutation === mutation;\n }\n runNext(mutation) {\n const foundMutation = this.#mutations.get(scopeFor(mutation))?.find((m) => m !== mutation && m.state.isPaused);\n return foundMutation?.continue() ?? Promise.resolve();\n }\n clear() {\n notifyManager.batch(() => {\n this.getAll().forEach((mutation) => {\n this.remove(mutation);\n });\n });\n }\n getAll() {\n return [...this.#mutations.values()].flat();\n }\n find(filters) {\n const defaultedFilters = { exact: true, ...filters };\n return this.getAll().find(\n (mutation) => matchMutation(defaultedFilters, mutation)\n );\n }\n findAll(filters = {}) {\n return this.getAll().filter((mutation) => matchMutation(filters, mutation));\n }\n notify(event) {\n notifyManager.batch(() => {\n this.listeners.forEach((listener) => {\n listener(event);\n });\n });\n }\n resumePausedMutations() {\n const pausedMutations = this.getAll().filter((x) => x.state.isPaused);\n return notifyManager.batch(\n () => Promise.all(\n pausedMutations.map((mutation) => mutation.continue().catch(noop))\n )\n );\n }\n};\nfunction scopeFor(mutation) {\n return mutation.options.scope?.id ?? String(mutation.mutationId);\n}\nexport {\n MutationCache\n};\n//# sourceMappingURL=mutationCache.js.map","// src/infiniteQueryBehavior.ts\nimport { addToEnd, addToStart, ensureQueryFn } from \"./utils.js\";\nfunction infiniteQueryBehavior(pages) {\n return {\n onFetch: (context, query) => {\n const options = context.options;\n const direction = context.fetchOptions?.meta?.fetchMore?.direction;\n const oldPages = context.state.data?.pages || [];\n const oldPageParams = context.state.data?.pageParams || [];\n let result = { pages: [], pageParams: [] };\n let currentPage = 0;\n const fetchFn = async () => {\n let cancelled = false;\n const addSignalProperty = (object) => {\n Object.defineProperty(object, \"signal\", {\n enumerable: true,\n get: () => {\n if (context.signal.aborted) {\n cancelled = true;\n } else {\n context.signal.addEventListener(\"abort\", () => {\n cancelled = true;\n });\n }\n return context.signal;\n }\n });\n };\n const queryFn = ensureQueryFn(context.options, context.fetchOptions);\n const fetchPage = async (data, param, previous) => {\n if (cancelled) {\n return Promise.reject();\n }\n if (param == null && data.pages.length) {\n return Promise.resolve(data);\n }\n const queryFnContext = {\n queryKey: context.queryKey,\n pageParam: param,\n direction: previous ? \"backward\" : \"forward\",\n meta: context.options.meta\n };\n addSignalProperty(queryFnContext);\n const page = await queryFn(\n queryFnContext\n );\n const { maxPages } = context.options;\n const addTo = previous ? addToStart : addToEnd;\n return {\n pages: addTo(data.pages, page, maxPages),\n pageParams: addTo(data.pageParams, param, maxPages)\n };\n };\n if (direction && oldPages.length) {\n const previous = direction === \"backward\";\n const pageParamFn = previous ? getPreviousPageParam : getNextPageParam;\n const oldData = {\n pages: oldPages,\n pageParams: oldPageParams\n };\n const param = pageParamFn(options, oldData);\n result = await fetchPage(oldData, param, previous);\n } else {\n const remainingPages = pages ?? oldPages.length;\n do {\n const param = currentPage === 0 ? oldPageParams[0] ?? options.initialPageParam : getNextPageParam(options, result);\n if (currentPage > 0 && param == null) {\n break;\n }\n result = await fetchPage(result, param);\n currentPage++;\n } while (currentPage < remainingPages);\n }\n return result;\n };\n if (context.options.persister) {\n context.fetchFn = () => {\n return context.options.persister?.(\n fetchFn,\n {\n queryKey: context.queryKey,\n meta: context.options.meta,\n signal: context.signal\n },\n query\n );\n };\n } else {\n context.fetchFn = fetchFn;\n }\n }\n };\n}\nfunction getNextPageParam(options, { pages, pageParams }) {\n const lastIndex = pages.length - 1;\n return pages.length > 0 ? options.getNextPageParam(\n pages[lastIndex],\n pages,\n pageParams[lastIndex],\n pageParams\n ) : void 0;\n}\nfunction getPreviousPageParam(options, { pages, pageParams }) {\n return pages.length > 0 ? options.getPreviousPageParam?.(pages[0], pages, pageParams[0], pageParams) : void 0;\n}\nfunction hasNextPage(options, data) {\n if (!data)\n return false;\n return getNextPageParam(options, data) != null;\n}\nfunction hasPreviousPage(options, data) {\n if (!data || !options.getPreviousPageParam)\n return false;\n return getPreviousPageParam(options, data) != null;\n}\nexport {\n hasNextPage,\n hasPreviousPage,\n infiniteQueryBehavior\n};\n//# sourceMappingURL=infiniteQueryBehavior.js.map","// src/queryClient.ts\nimport {\n functionalUpdate,\n hashKey,\n hashQueryKeyByOptions,\n noop,\n partialMatchKey,\n resolveStaleTime,\n skipToken\n} from \"./utils.js\";\nimport { QueryCache } from \"./queryCache.js\";\nimport { MutationCache } from \"./mutationCache.js\";\nimport { focusManager } from \"./focusManager.js\";\nimport { onlineManager } from \"./onlineManager.js\";\nimport { notifyManager } from \"./notifyManager.js\";\nimport { infiniteQueryBehavior } from \"./infiniteQueryBehavior.js\";\nvar QueryClient = class {\n #queryCache;\n #mutationCache;\n #defaultOptions;\n #queryDefaults;\n #mutationDefaults;\n #mountCount;\n #unsubscribeFocus;\n #unsubscribeOnline;\n constructor(config = {}) {\n this.#queryCache = config.queryCache || new QueryCache();\n this.#mutationCache = config.mutationCache || new MutationCache();\n this.#defaultOptions = config.defaultOptions || {};\n this.#queryDefaults = /* @__PURE__ */ new Map();\n this.#mutationDefaults = /* @__PURE__ */ new Map();\n this.#mountCount = 0;\n }\n mount() {\n this.#mountCount++;\n if (this.#mountCount !== 1)\n return;\n this.#unsubscribeFocus = focusManager.subscribe(async (focused) => {\n if (focused) {\n await this.resumePausedMutations();\n this.#queryCache.onFocus();\n }\n });\n this.#unsubscribeOnline = onlineManager.subscribe(async (online) => {\n if (online) {\n await this.resumePausedMutations();\n this.#queryCache.onOnline();\n }\n });\n }\n unmount() {\n this.#mountCount--;\n if (this.#mountCount !== 0)\n return;\n this.#unsubscribeFocus?.();\n this.#unsubscribeFocus = void 0;\n this.#unsubscribeOnline?.();\n this.#unsubscribeOnline = void 0;\n }\n isFetching(filters) {\n return this.#queryCache.findAll({ ...filters, fetchStatus: \"fetching\" }).length;\n }\n isMutating(filters) {\n return this.#mutationCache.findAll({ ...filters, status: \"pending\" }).length;\n }\n getQueryData(queryKey) {\n const options = this.defaultQueryOptions({ queryKey });\n return this.#queryCache.get(options.queryHash)?.state.data;\n }\n ensureQueryData(options) {\n const cachedData = this.getQueryData(options.queryKey);\n if (cachedData === void 0) {\n return this.fetchQuery(options);\n } else {\n const defaultedOptions = this.defaultQueryOptions(options);\n const query = this.#queryCache.build(this, defaultedOptions);\n if (options.revalidateIfStale && query.isStaleByTime(resolveStaleTime(defaultedOptions.staleTime, query))) {\n void this.prefetchQuery(defaultedOptions);\n }\n return Promise.resolve(cachedData);\n }\n }\n getQueriesData(filters) {\n return this.#queryCache.findAll(filters).map(({ queryKey, state }) => {\n const data = state.data;\n return [queryKey, data];\n });\n }\n setQueryData(queryKey, updater, options) {\n const defaultedOptions = this.defaultQueryOptions({ queryKey });\n const query = this.#queryCache.get(\n defaultedOptions.queryHash\n );\n const prevData = query?.state.data;\n const data = functionalUpdate(updater, prevData);\n if (data === void 0) {\n return void 0;\n }\n return this.#queryCache.build(this, defaultedOptions).setData(data, { ...options, manual: true });\n }\n setQueriesData(filters, updater, options) {\n return notifyManager.batch(\n () => this.#queryCache.findAll(filters).map(({ queryKey }) => [\n queryKey,\n this.setQueryData(queryKey, updater, options)\n ])\n );\n }\n getQueryState(queryKey) {\n const options = this.defaultQueryOptions({ queryKey });\n return this.#queryCache.get(\n options.queryHash\n )?.state;\n }\n removeQueries(filters) {\n const queryCache = this.#queryCache;\n notifyManager.batch(() => {\n queryCache.findAll(filters).forEach((query) => {\n queryCache.remove(query);\n });\n });\n }\n resetQueries(filters, options) {\n const queryCache = this.#queryCache;\n const refetchFilters = {\n type: \"active\",\n ...filters\n };\n return notifyManager.batch(() => {\n queryCache.findAll(filters).forEach((query) => {\n query.reset();\n });\n return this.refetchQueries(refetchFilters, options);\n });\n }\n cancelQueries(filters, cancelOptions = {}) {\n const defaultedCancelOptions = { revert: true, ...cancelOptions };\n const promises = notifyManager.batch(\n () => this.#queryCache.findAll(filters).map((query) => query.cancel(defaultedCancelOptions))\n );\n return Promise.all(promises).then(noop).catch(noop);\n }\n invalidateQueries(filters, options = {}) {\n return notifyManager.batch(() => {\n this.#queryCache.findAll(filters).forEach((query) => {\n query.invalidate();\n });\n if (filters?.refetchType === \"none\") {\n return Promise.resolve();\n }\n const refetchFilters = {\n ...filters,\n type: filters?.refetchType ?? filters?.type ?? \"active\"\n };\n return this.refetchQueries(refetchFilters, options);\n });\n }\n refetchQueries(filters, options = {}) {\n const fetchOptions = {\n ...options,\n cancelRefetch: options.cancelRefetch ?? true\n };\n const promises = notifyManager.batch(\n () => this.#queryCache.findAll(filters).filter((query) => !query.isDisabled()).map((query) => {\n let promise = query.fetch(void 0, fetchOptions);\n if (!fetchOptions.throwOnError) {\n promise = promise.catch(noop);\n }\n return query.state.fetchStatus === \"paused\" ? Promise.resolve() : promise;\n })\n );\n return Promise.all(promises).then(noop);\n }\n fetchQuery(options) {\n const defaultedOptions = this.defaultQueryOptions(options);\n if (defaultedOptions.retry === void 0) {\n defaultedOptions.retry = false;\n }\n const query = this.#queryCache.build(this, defaultedOptions);\n return query.isStaleByTime(\n resolveStaleTime(defaultedOptions.staleTime, query)\n ) ? query.fetch(defaultedOptions) : Promise.resolve(query.state.data);\n }\n prefetchQuery(options) {\n return this.fetchQuery(options).then(noop).catch(noop);\n }\n fetchInfiniteQuery(options) {\n options.behavior = infiniteQueryBehavior(options.pages);\n return this.fetchQuery(options);\n }\n prefetchInfiniteQuery(options) {\n return this.fetchInfiniteQuery(options).then(noop).catch(noop);\n }\n ensureInfiniteQueryData(options) {\n options.behavior = infiniteQueryBehavior(options.pages);\n return this.ensureQueryData(options);\n }\n resumePausedMutations() {\n if (onlineManager.isOnline()) {\n return this.#mutationCache.resumePausedMutations();\n }\n return Promise.resolve();\n }\n getQueryCache() {\n return this.#queryCache;\n }\n getMutationCache() {\n return this.#mutationCache;\n }\n getDefaultOptions() {\n return this.#defaultOptions;\n }\n setDefaultOptions(options) {\n this.#defaultOptions = options;\n }\n setQueryDefaults(queryKey, options) {\n this.#queryDefaults.set(hashKey(queryKey), {\n queryKey,\n defaultOptions: options\n });\n }\n getQueryDefaults(queryKey) {\n const defaults = [...this.#queryDefaults.values()];\n const result = {};\n defaults.forEach((queryDefault) => {\n if (partialMatchKey(queryKey, queryDefault.queryKey)) {\n Object.assign(result, queryDefault.defaultOptions);\n }\n });\n return result;\n }\n setMutationDefaults(mutationKey, options) {\n this.#mutationDefaults.set(hashKey(mutationKey), {\n mutationKey,\n defaultOptions: options\n });\n }\n getMutationDefaults(mutationKey) {\n const defaults = [...this.#mutationDefaults.values()];\n let result = {};\n defaults.forEach((queryDefault) => {\n if (partialMatchKey(mutationKey, queryDefault.mutationKey)) {\n result = { ...result, ...queryDefault.defaultOptions };\n }\n });\n return result;\n }\n defaultQueryOptions(options) {\n if (options._defaulted) {\n return options;\n }\n const defaultedOptions = {\n ...this.#defaultOptions.queries,\n ...this.getQueryDefaults(options.queryKey),\n ...options,\n _defaulted: true\n };\n if (!defaultedOptions.queryHash) {\n defaultedOptions.queryHash = hashQueryKeyByOptions(\n defaultedOptions.queryKey,\n defaultedOptions\n );\n }\n if (defaultedOptions.refetchOnReconnect === void 0) {\n defaultedOptions.refetchOnReconnect = defaultedOptions.networkMode !== \"always\";\n }\n if (defaultedOptions.throwOnError === void 0) {\n defaultedOptions.throwOnError = !!defaultedOptions.suspense;\n }\n if (!defaultedOptions.networkMode && defaultedOptions.persister) {\n defaultedOptions.networkMode = \"offlineFirst\";\n }\n if (defaultedOptions.queryFn === skipToken) {\n defaultedOptions.enabled = false;\n }\n return defaultedOptions;\n }\n defaultMutationOptions(options) {\n if (options?._defaulted) {\n return options;\n }\n return {\n ...this.#defaultOptions.mutations,\n ...options?.mutationKey && this.getMutationDefaults(options.mutationKey),\n ...options,\n _defaulted: true\n };\n }\n clear() {\n this.#queryCache.clear();\n this.#mutationCache.clear();\n }\n};\nexport {\n QueryClient\n};\n//# sourceMappingURL=queryClient.js.map","// src/hydration.ts\nfunction defaultTransformerFn(data) {\n return data;\n}\nfunction dehydrateMutation(mutation) {\n return {\n mutationKey: mutation.options.mutationKey,\n state: mutation.state,\n ...mutation.options.scope && { scope: mutation.options.scope },\n ...mutation.meta && { meta: mutation.meta }\n };\n}\nfunction dehydrateQuery(query, serializeData) {\n return {\n state: {\n ...query.state,\n ...query.state.data !== void 0 && {\n data: serializeData(query.state.data)\n }\n },\n queryKey: query.queryKey,\n queryHash: query.queryHash,\n ...query.state.status === \"pending\" && {\n promise: query.promise?.then(serializeData).catch((error) => {\n if (process.env.NODE_ENV !== \"production\") {\n console.error(\n `A query that was dehydrated as pending ended up rejecting. [${query.queryHash}]: ${error}; The error will be redacted in production builds`\n );\n }\n return Promise.reject(new Error(\"redacted\"));\n })\n },\n ...query.meta && { meta: query.meta }\n };\n}\nfunction defaultShouldDehydrateMutation(mutation) {\n return mutation.state.isPaused;\n}\nfunction defaultShouldDehydrateQuery(query) {\n return query.state.status === \"success\";\n}\nfunction dehydrate(client, options = {}) {\n const filterMutation = options.shouldDehydrateMutation ?? client.getDefaultOptions().dehydrate?.shouldDehydrateMutation ?? defaultShouldDehydrateMutation;\n const mutations = client.getMutationCache().getAll().flatMap(\n (mutation) => filterMutation(mutation) ? [dehydrateMutation(mutation)] : []\n );\n const filterQuery = options.shouldDehydrateQuery ?? client.getDefaultOptions().dehydrate?.shouldDehydrateQuery ?? defaultShouldDehydrateQuery;\n const serializeData = options.serializeData ?? client.getDefaultOptions().dehydrate?.serializeData ?? defaultTransformerFn;\n const queries = client.getQueryCache().getAll().flatMap(\n (query) => filterQuery(query) ? [dehydrateQuery(query, serializeData)] : []\n );\n return { mutations, queries };\n}\nfunction hydrate(client, dehydratedState, options) {\n if (typeof dehydratedState !== \"object\" || dehydratedState === null) {\n return;\n }\n const mutationCache = client.getMutationCache();\n const queryCache = client.getQueryCache();\n const deserializeData = options?.defaultOptions?.deserializeData ?? client.getDefaultOptions().hydrate?.deserializeData ?? defaultTransformerFn;\n const mutations = dehydratedState.mutations || [];\n const queries = dehydratedState.queries || [];\n mutations.forEach(({ state, ...mutationOptions }) => {\n mutationCache.build(\n client,\n {\n ...client.getDefaultOptions().hydrate?.mutations,\n ...options?.defaultOptions?.mutations,\n ...mutationOptions\n },\n state\n );\n });\n queries.forEach(({ queryKey, state, queryHash, meta, promise }) => {\n let query = queryCache.get(queryHash);\n const data = state.data === void 0 ? state.data : deserializeData(state.data);\n if (query) {\n if (query.state.dataUpdatedAt < state.dataUpdatedAt) {\n const { fetchStatus: _ignored, ...serializedState } = state;\n query.setState({\n ...serializedState,\n data\n });\n }\n } else {\n query = queryCache.build(\n client,\n {\n ...client.getDefaultOptions().hydrate?.queries,\n ...options?.defaultOptions?.queries,\n queryKey,\n queryHash,\n meta\n },\n // Reset fetch status to idle to avoid\n // query being stuck in fetching state upon hydration\n {\n ...state,\n data,\n fetchStatus: \"idle\"\n }\n );\n }\n if (promise) {\n const initialPromise = Promise.resolve(promise).then(deserializeData);\n void query.fetch(void 0, { initialPromise });\n }\n });\n}\nexport {\n defaultShouldDehydrateMutation,\n defaultShouldDehydrateQuery,\n dehydrate,\n hydrate\n};\n//# sourceMappingURL=hydration.js.map","\"use client\";\n\n// src/HydrationBoundary.tsx\nimport * as React from \"react\";\nimport { hydrate } from \"@tanstack/query-core\";\nimport { useQueryClient } from \"./QueryClientProvider.js\";\nvar HydrationBoundary = ({\n children,\n options = {},\n state,\n queryClient\n}) => {\n const client = useQueryClient(queryClient);\n const [hydrationQueue, setHydrationQueue] = React.useState();\n const optionsRef = React.useRef(options);\n optionsRef.current = options;\n React.useMemo(() => {\n if (state) {\n if (typeof state !== \"object\") {\n return;\n }\n const queryCache = client.getQueryCache();\n const queries = state.queries || [];\n const newQueries = [];\n const existingQueries = [];\n for (const dehydratedQuery of queries) {\n const existingQuery = queryCache.get(dehydratedQuery.queryHash);\n if (!existingQuery) {\n newQueries.push(dehydratedQuery);\n } else {\n const hydrationIsNewer = dehydratedQuery.state.dataUpdatedAt > existingQuery.state.dataUpdatedAt;\n const queryAlreadyQueued = hydrationQueue?.find(\n (query) => query.queryHash === dehydratedQuery.queryHash\n );\n if (hydrationIsNewer && (!queryAlreadyQueued || dehydratedQuery.state.dataUpdatedAt > queryAlreadyQueued.state.dataUpdatedAt)) {\n existingQueries.push(dehydratedQuery);\n }\n }\n }\n if (newQueries.length > 0) {\n hydrate(client, { queries: newQueries }, optionsRef.current);\n }\n if (existingQueries.length > 0) {\n setHydrationQueue(\n (prev) => prev ? [...prev, ...existingQueries] : existingQueries\n );\n }\n }\n }, [client, hydrationQueue, state]);\n React.useEffect(() => {\n if (hydrationQueue) {\n hydrate(client, { queries: hydrationQueue }, optionsRef.current);\n setHydrationQueue(void 0);\n }\n }, [client, hydrationQueue]);\n return children;\n};\nexport {\n HydrationBoundary\n};\n//# sourceMappingURL=HydrationBoundary.js.map","import { ErrorAlert } from \"./ErrorAlert.js\";\n\nexport function ServerError({ error }: { error: unknown }) {\n return <ErrorAlert error={error} />;\n}\n","/**\n * react-router v7.0.2\n *\n * Copyright (c) Remix Software Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE.md file in the root directory of this source tree.\n *\n * @license MIT\n */\nimport {\n FrameworkContext,\n RemixErrorBoundary,\n RouterProvider,\n createBrowserHistory,\n createClientRoutes,\n createClientRoutesWithHMRRevalidationOptOut,\n createRouter,\n decodeViaTurboStream,\n deserializeErrors,\n getPatchRoutesOnNavigationFunction,\n getSingleFetchDataStrategy,\n invariant,\n mapRouteProperties,\n matchRoutes,\n shouldHydrateRouteLoader,\n useFogOFWarDiscovery\n} from \"./chunk-D52XG6IA.mjs\";\n\n// lib/dom-export/dom-router-provider.tsx\nimport * as React from \"react\";\nimport * as ReactDOM from \"react-dom\";\nfunction RouterProvider2(props) {\n return /* @__PURE__ */ React.createElement(RouterProvider, { flushSync: ReactDOM.flushSync, ...props });\n}\n\n// lib/dom-export/hydrated-router.tsx\nimport * as React2 from \"react\";\nvar ssrInfo = null;\nvar router = null;\nfunction initSsrInfo() {\n if (!ssrInfo && window.__reactRouterContext && window.__reactRouterManifest && window.__reactRouterRouteModules) {\n ssrInfo = {\n context: window.__reactRouterContext,\n manifest: window.__reactRouterManifest,\n routeModules: window.__reactRouterRouteModules,\n stateDecodingPromise: void 0,\n router: void 0,\n routerInitialized: false\n };\n }\n}\nfunction createHydratedRouter() {\n initSsrInfo();\n if (!ssrInfo) {\n throw new Error(\n \"You must be using the SSR features of React Router in order to skip passing a `router` prop to `<RouterProvider>`\"\n );\n }\n let localSsrInfo = ssrInfo;\n if (!ssrInfo.stateDecodingPromise) {\n let stream = ssrInfo.context.stream;\n invariant(stream, \"No stream found for single fetch decoding\");\n ssrInfo.context.stream = void 0;\n ssrInfo.stateDecodingPromise = decodeViaTurboStream(stream, window).then((value) => {\n ssrInfo.context.state = value.value;\n localSsrInfo.stateDecodingPromise.value = true;\n }).catch((e) => {\n localSsrInfo.stateDecodingPromise.error = e;\n });\n }\n if (ssrInfo.stateDecodingPromise.error) {\n throw ssrInfo.stateDecodingPromise.error;\n }\n if (!ssrInfo.stateDecodingPromise.value) {\n throw ssrInfo.stateDecodingPromise;\n }\n let routes = createClientRoutes(\n ssrInfo.manifest.routes,\n ssrInfo.routeModules,\n ssrInfo.context.state,\n ssrInfo.context.isSpaMode\n );\n let hydrationData = void 0;\n if (!ssrInfo.context.isSpaMode) {\n hydrationData = {\n ...ssrInfo.context.state,\n loaderData: { ...ssrInfo.context.state.loaderData }\n };\n let initialMatches = matchRoutes(\n routes,\n window.location,\n window.__reactRouterContext?.basename\n );\n if (initialMatches) {\n for (let match of initialMatches) {\n let routeId = match.route.id;\n let route = ssrInfo.routeModules[routeId];\n let manifestRoute = ssrInfo.manifest.routes[routeId];\n if (route && manifestRoute && shouldHydrateRouteLoader(\n manifestRoute,\n route,\n ssrInfo.context.isSpaMode\n ) && (route.HydrateFallback || !manifestRoute.hasLoader)) {\n delete hydrationData.loaderData[routeId];\n } else if (manifestRoute && !manifestRoute.hasLoader) {\n hydrationData.loaderData[routeId] = null;\n }\n }\n }\n if (hydrationData && hydrationData.errors) {\n hydrationData.errors = deserializeErrors(hydrationData.errors);\n }\n }\n let router2 = createRouter({\n routes,\n history: createBrowserHistory(),\n basename: ssrInfo.context.basename,\n hydrationData,\n mapRouteProperties,\n dataStrategy: getSingleFetchDataStrategy(\n ssrInfo.manifest,\n ssrInfo.routeModules,\n () => router2\n ),\n patchRoutesOnNavigation: getPatchRoutesOnNavigationFunction(\n ssrInfo.manifest,\n ssrInfo.routeModules,\n ssrInfo.context.isSpaMode,\n ssrInfo.context.basename\n )\n });\n ssrInfo.router = router2;\n if (router2.state.initialized) {\n ssrInfo.routerInitialized = true;\n router2.initialize();\n }\n router2.createRoutesForHMR = /* spacer so ts-ignore does not affect the right hand of the assignment */\n createClientRoutesWithHMRRevalidationOptOut;\n window.__reactRouterDataRouter = router2;\n return router2;\n}\nfunction HydratedRouter() {\n if (!router) {\n router = createHydratedRouter();\n }\n let [criticalCss, setCriticalCss] = React2.useState(\n process.env.NODE_ENV === \"development\" ? ssrInfo?.context.criticalCss : void 0\n );\n if (process.env.NODE_ENV === \"development\") {\n if (ssrInfo) {\n window.__reactRouterClearCriticalCss = () => setCriticalCss(void 0);\n }\n }\n let [location, setLocation] = React2.useState(router.state.location);\n React2.useLayoutEffect(() => {\n if (ssrInfo && ssrInfo.router && !ssrInfo.routerInitialized) {\n ssrInfo.routerInitialized = true;\n ssrInfo.router.initialize();\n }\n }, []);\n React2.useLayoutEffect(() => {\n if (ssrInfo && ssrInfo.router) {\n return ssrInfo.router.subscribe((newState) => {\n if (newState.location !== location) {\n setLocation(newState.location);\n }\n });\n }\n }, [location]);\n invariant(ssrInfo, \"ssrInfo unavailable for HydratedRouter\");\n useFogOFWarDiscovery(\n router,\n ssrInfo.manifest,\n ssrInfo.routeModules,\n ssrInfo.context.isSpaMode\n );\n return (\n // This fragment is important to ensure we match the <ServerRouter> JSX\n // structure so that useId values hydrate correctly\n /* @__PURE__ */ React2.createElement(React2.Fragment, null, /* @__PURE__ */ React2.createElement(\n FrameworkContext.Provider,\n {\n value: {\n manifest: ssrInfo.manifest,\n routeModules: ssrInfo.routeModules,\n future: ssrInfo.context.future,\n criticalCss,\n isSpaMode: ssrInfo.context.isSpaMode\n }\n },\n /* @__PURE__ */ React2.createElement(RemixErrorBoundary, { location }, /* @__PURE__ */ React2.createElement(RouterProvider2, { router }))\n ), /* @__PURE__ */ React2.createElement(React2.Fragment, null))\n );\n}\nexport {\n HydratedRouter,\n RouterProvider2 as RouterProvider\n};\n","import {\n HydrationBoundary,\n QueryClient,\n QueryClientProvider,\n} from \"@tanstack/react-query\";\nimport { type HelmetData, HelmetProvider } from \"@zudoku/react-helmet-async\";\nimport { StrictMode } from \"react\";\nimport {\n type createBrowserRouter,\n type createStaticRouter,\n type StaticHandlerContext,\n StaticRouterProvider,\n} from \"react-router\";\nimport { RouterProvider } from \"react-router/dom\";\nimport { StaggeredRenderContext } from \"../plugins/openapi/StaggeredRender.js\";\n\nconst queryClient = new QueryClient({\n defaultOptions: {\n queries: {\n staleTime: 1000 * 60 * 5,\n },\n },\n});\n\nconst Bootstrap = ({\n router,\n hydrate = false,\n}: {\n hydrate?: boolean;\n router: ReturnType<typeof createBrowserRouter>;\n}) => (\n <StrictMode>\n <QueryClientProvider client={queryClient}>\n <HydrationBoundary state={hydrate ? (window as any).DATA : undefined}>\n <HelmetProvider>\n <StaggeredRenderContext.Provider value={{ stagger: !hydrate }}>\n <RouterProvider router={router} />\n </StaggeredRenderContext.Provider>\n </HelmetProvider>\n </HydrationBoundary>\n </QueryClientProvider>\n </StrictMode>\n);\n\nconst BootstrapStatic = ({\n router,\n context,\n queryClient,\n helmetContext,\n}: {\n helmetContext: HelmetData[\"context\"];\n context: StaticHandlerContext;\n queryClient: QueryClient;\n router: ReturnType<typeof createStaticRouter>;\n}) => (\n <StrictMode>\n <QueryClientProvider client={queryClient}>\n <HelmetProvider context={helmetContext}>\n <StaticRouterProvider router={router} context={context} />\n </HelmetProvider>\n </QueryClientProvider>\n </StrictMode>\n);\n\nexport { Bootstrap, BootstrapStatic };\n","(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('react')) :\n typeof define === 'function' && define.amd ? define(['exports', 'react'], factory) :\n (global = global || self, factory(global.spinDelay = {}, global.react));\n}(this, (function (exports, react) {\n const defaultOptions = {\n delay: 500,\n minDuration: 200,\n ssr: true\n };\n\n function useIsSSR() {\n const [isSSR, setIsSSR] = react.useState(true);\n react.useEffect(() => {\n setIsSSR(false);\n }, []);\n return isSSR;\n }\n\n function useSpinDelay(loading, options) {\n options = Object.assign({}, defaultOptions, options);\n const isSSR = useIsSSR() && options.ssr;\n const initialState = isSSR && loading ? 'DISPLAY' : 'IDLE';\n const [state, setState] = react.useState(initialState);\n const timeout = react.useRef(null);\n react.useEffect(() => {\n if (loading && (state === 'IDLE' || isSSR)) {\n clearTimeout(timeout.current);\n const delay = isSSR ? 0 : options.delay;\n timeout.current = setTimeout(() => {\n if (!loading) {\n return setState('IDLE');\n }\n\n timeout.current = setTimeout(() => {\n setState('EXPIRE');\n }, options.minDuration);\n setState('DISPLAY');\n }, delay);\n\n if (!isSSR) {\n setState('DELAY');\n }\n }\n\n if (!loading && state !== 'DISPLAY') {\n clearTimeout(timeout.current);\n setState('IDLE');\n }\n }, [loading, state, options.delay, options.minDuration, isSSR]);\n react.useEffect(() => {\n return () => clearTimeout(timeout.current);\n }, []);\n return state === 'DISPLAY' || state === 'EXPIRE';\n }\n\n exports.defaultOptions = defaultOptions;\n exports.useSpinDelay = useSpinDelay;\n\n})));\n//# sourceMappingURL=index.js.map\n","import { cn } from \"../../util/cn.js\";\n\nexport const ColorMap = {\n green: \"bg-green-400 dark:bg-green-800\",\n blue: \"bg-sky-400 dark:bg-sky-800\",\n yellow: \"bg-yellow-400 dark:bg-yellow-800\",\n red: \"bg-red-400 dark:bg-red-800\",\n purple: \"bg-purple-400 dark:bg-purple-600\",\n indigo: \"bg-indigo-400 dark:bg-indigo-600\",\n gray: \"bg-gray-400 dark:bg-gray-600\",\n};\n\nexport const SidebarBadge = ({\n color,\n label,\n className,\n}: {\n color: keyof typeof ColorMap;\n label: string;\n className?: string;\n}) => {\n return (\n <span\n className={cn(\n \"mt-0.5 flex items-center duration-200 transition-opacity text-center uppercase font-mono text-[0.65rem] font-bold rounded text-background dark:text-zinc-50 h-4 px-1\",\n ColorMap[color],\n className,\n )}\n >\n {label}\n </span>\n );\n};\n","import * as Collapsible from \"@radix-ui/react-collapsible\";\nimport { ChevronRightIcon } from \"lucide-react\";\nimport { useEffect, useState } from \"react\";\nimport { NavLink, useMatch } from \"react-router\";\nimport type { SidebarItemCategory } from \"../../../config/validators/SidebarSchema.js\";\nimport { cn } from \"../../util/cn.js\";\nimport { joinPath } from \"../../util/joinPath.js\";\nimport { navigationListItem, SidebarItem } from \"./SidebarItem.js\";\nimport { useIsCategoryOpen } from \"./utils.js\";\n\nexport const SidebarCategory = ({\n category,\n onRequestClose,\n}: {\n category: SidebarItemCategory;\n onRequestClose?: () => void;\n}) => {\n const isCategoryOpen = useIsCategoryOpen(category);\n const [hasInteracted, setHasInteracted] = useState(false);\n\n const isCollapsible = category.collapsible ?? true;\n const isCollapsed = category.collapsed ?? true;\n const isDefaultOpen = Boolean(\n !isCollapsible || !isCollapsed || isCategoryOpen,\n );\n const [open, setOpen] = useState(isDefaultOpen);\n const isActive = useMatch(category.link?.id ?? \"\");\n\n useEffect(() => {\n // this is triggered when an item from the sidebar is clicked\n // and the sidebar, enclosing this item, is not opened\n if (isCategoryOpen) {\n setOpen(true);\n }\n }, [isCategoryOpen]);\n\n const ToggleButton = isCollapsible && (\n <button\n type=\"button\"\n onClick={(e) => {\n e.preventDefault();\n setOpen((prev) => !prev);\n setHasInteracted(true);\n }}\n >\n <ChevronRightIcon\n size={16}\n className={cn(\n hasInteracted && \"transition\",\n \"shrink-0 group-data-[state=open]:rotate-90\",\n )}\n />\n </button>\n );\n\n return (\n <Collapsible.Root\n className=\"flex flex-col\"\n defaultOpen={isDefaultOpen}\n open={open}\n onOpenChange={() => setOpen(true)}\n >\n <Collapsible.Trigger className=\"group\" asChild disabled={!isCollapsible}>\n <div\n onClick={() => setHasInteracted(true)}\n className={navigationListItem({\n isActive: false,\n className: [\n \"text-start\",\n isCollapsible\n ? \"cursor-pointer\"\n : \"cursor-default hover:bg-transparent\",\n ],\n })}\n >\n {category.icon && (\n <category.icon\n size={16}\n className={cn(\"align-[-0.125em] \", isActive && \"text-primary\")}\n />\n )}\n {category.link?.type === \"doc\" ? (\n <NavLink\n to={joinPath(category.link.id)}\n className=\"flex-1\"\n onClick={() => {\n // if it is the current path and closed then open it because there's no path change to trigger the open\n if (isActive && !open) {\n setOpen(true);\n }\n }}\n >\n <div\n className={cn(\n \"flex items-center gap-2 justify-between w-full\",\n isActive ? \"text-primary\" : \"text-foreground/80\",\n )}\n >\n <div className=\"truncate\">{category.label}</div>\n {ToggleButton}\n </div>\n </NavLink>\n ) : (\n <div className=\"flex items-center justify-between w-full\">\n <div className=\"flex gap-2 truncate w-full\">{category.label}</div>\n {ToggleButton}\n </div>\n )}\n </div>\n </Collapsible.Trigger>\n <Collapsible.Content\n className={cn(\n // CollapsibleContent class is used to animate and it should only be applied when the user has triggered the toggle\n hasInteracted && \"CollapsibleContent\",\n \"ms-6 my-1\",\n )}\n >\n <ul\n className={\n \"relative after:absolute after:-left-[--padding-nav-item] after:translate-x-[1.5px] after:top-0 after:bottom-0 after:w-px after:bg-border\"\n }\n >\n {category.items.map((item) => (\n <SidebarItem\n key={\n (\"id\" in item ? item.id : \"\") +\n (\"href\" in item ? item.href : \"\") +\n item.label\n }\n onRequestClose={onRequestClose}\n item={item}\n />\n ))}\n </ul>\n </Collapsible.Content>\n </Collapsible.Root>\n );\n};\n","import { cva } from \"class-variance-authority\";\nimport { ExternalLinkIcon } from \"lucide-react\";\nimport { NavLink, useSearchParams } from \"react-router\";\n\nimport type { SidebarItem as SidebarItemType } from \"../../../config/validators/SidebarSchema.js\";\nimport { joinPath } from \"../../util/joinPath.js\";\nimport { AnchorLink } from \"../AnchorLink.js\";\nimport { useViewportAnchor } from \"../context/ViewportAnchorContext.js\";\nimport { SidebarBadge } from \"./SidebarBadge.js\";\nimport { SidebarCategory } from \"./SidebarCategory.js\";\n\nexport const navigationListItem = cva(\n \"flex items-center gap-2 px-[--padding-nav-item] py-1.5 rounded-lg hover:bg-accent\",\n {\n variants: {\n isActive: {\n true: \"text-primary font-medium\",\n false: \"text-foreground/80\",\n },\n isMuted: {\n true: \"text-foreground/30\",\n false: \"\",\n },\n },\n defaultVariants: {\n isActive: false,\n },\n },\n);\n\nexport const DATA_ANCHOR_ATTR = \"data-anchor\";\n\nexport const SidebarItem = ({\n item,\n onRequestClose,\n}: {\n item: SidebarItemType;\n onRequestClose?: () => void;\n}) => {\n const { activeAnchor } = useViewportAnchor();\n const [searchParams] = useSearchParams();\n\n switch (item.type) {\n case \"category\":\n return (\n <SidebarCategory category={item} onRequestClose={onRequestClose} />\n );\n case \"doc\":\n return (\n <NavLink\n className={({ isActive }) => navigationListItem({ isActive })}\n to={joinPath(item.id)}\n onClick={onRequestClose}\n >\n {item.icon && <item.icon size={16} className=\"align-[-0.125em]\" />}\n {item.badge ? (\n <>\n <span className=\"truncate flex-1\" title={item.label}>\n {item.label}\n </span>\n <SidebarBadge {...item.badge} />\n </>\n ) : (\n item.label\n )}\n </NavLink>\n );\n case \"link\":\n return item.href.startsWith(\"#\") ? (\n <AnchorLink\n to={{ hash: item.href, search: searchParams.toString() }}\n {...{ [DATA_ANCHOR_ATTR]: item.href.slice(1) }}\n className={navigationListItem({\n isActive: item.href.slice(1) === activeAnchor,\n className: item.badge?.placement !== \"start\" && \"justify-between\",\n })}\n onClick={onRequestClose}\n >\n {item.badge ? (\n <>\n <span className=\"truncate\" title={item.label}>\n {item.label}\n </span>\n <SidebarBadge {...item.badge} />\n </>\n ) : (\n <span className=\"break-all\">{item.label}</span>\n )}\n </AnchorLink>\n ) : !item.href.startsWith(\"http\") ? (\n <NavLink\n className={navigationListItem({\n className: item.badge?.placement !== \"start\" && \"justify-between\",\n })}\n to={item.href}\n >\n {item.badge ? (\n <>\n <span className=\"truncate\" title={item.label}>\n {item.label}\n </span>\n <SidebarBadge {...item.badge} />\n </>\n ) : (\n <span className=\"break-all\">{item.label}</span>\n )}\n </NavLink>\n ) : (\n <a\n className={navigationListItem()}\n href={item.href}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n onClick={onRequestClose}\n >\n <span className=\"whitespace-normal\">{item.label}</span>\n {/* This prevents that the icon would be positioned in its own line if the text fills a line entirely */}\n <span className=\"whitespace-nowrap\">\n <ExternalLinkIcon className=\"inline -translate-y-0.5\" size={12} />\n </span>\n </a>\n );\n }\n};\n","import { useEffect } from \"react\";\nimport { useLocation } from \"react-router\";\nimport { useViewportAnchor } from \"../components/context/ViewportAnchorContext.js\";\nimport { DATA_ANCHOR_ATTR } from \"../components/navigation/SidebarItem.js\";\n\nconst scrollIntoViewIfNeeded = (\n element: Element | null,\n options: ScrollIntoViewOptions = { block: \"center\" },\n) => {\n if (!element) return;\n\n const rect = element.getBoundingClientRect();\n const isInView =\n rect.top >= 0 &&\n rect.left >= 0 &&\n rect.bottom <=\n (window.innerHeight || document.documentElement.clientHeight) &&\n rect.right <= (window.innerWidth || document.documentElement.clientWidth);\n\n if (isInView) return;\n\n element.scrollIntoView(options);\n};\n\nexport const useScrollToAnchor = () => {\n const location = useLocation();\n const { setActiveAnchor } = useViewportAnchor();\n\n useEffect(() => {\n if (!location.hash) return;\n\n const hash = decodeURIComponent(location.hash.split(\"/\")[0]!.slice(1));\n\n const scrollToElement = () => {\n const element = document.getElementById(hash);\n const link = document.querySelector(`[${DATA_ANCHOR_ATTR}=\"${hash}\"]`);\n\n if (element) {\n element.scrollIntoView();\n scrollIntoViewIfNeeded(link);\n requestIdleCallback(() => setActiveAnchor(hash));\n return true;\n }\n\n return false;\n };\n\n if (!scrollToElement()) {\n const observer = new MutationObserver((_, obs) => {\n if (!scrollToElement()) return;\n obs.disconnect();\n });\n\n observer.observe(document.body, { childList: true, subtree: true });\n\n return () => observer.disconnect();\n }\n }, [location.hash, setActiveAnchor]);\n};\n","import { useEffect, useRef } from \"react\";\nimport { useLocation } from \"react-router\";\n\nexport const useScrollToTop = () => {\n const location = useLocation();\n const previousPath = useRef(location.pathname);\n\n useEffect(() => {\n if (previousPath.current === location.pathname) return;\n window.scrollTo(0, 0);\n previousPath.current = location.pathname;\n }, [location.pathname]);\n};\n","import { cn } from \"../util/cn.js\";\n\nfunction Skeleton({\n className,\n ...props\n}: React.HTMLAttributes<HTMLDivElement>) {\n return (\n <div\n className={cn(\"animate-pulse rounded-md bg-muted\", className)}\n {...props}\n />\n );\n}\n\nexport { Skeleton };\n","import type { LucideIcon } from \"lucide-react\";\nimport { type ReactElement } from \"react\";\nimport { type RouteObject } from \"react-router\";\nimport type { Sidebar } from \"../../config/validators/SidebarSchema.js\";\nimport { MdxComponentsType } from \"../util/MdxComponents.js\";\nimport { ZudokuContext, type ApiIdentity } from \"./ZudokuContext.js\";\n\nexport type ZudokuPlugin =\n | CommonPlugin\n | ProfileMenuPlugin\n | NavigationPlugin\n | ApiIdentityPlugin\n | SearchProviderPlugin;\n\nexport type { RouteObject };\n\nexport interface NavigationPlugin {\n getRoutes: () => RouteObject[];\n getSidebar?: (path: string) => Promise<Sidebar>;\n}\n\nexport interface ApiIdentityPlugin {\n getIdentities: (context: ZudokuContext) => Promise<ApiIdentity[]>;\n}\n\nexport interface SearchProviderPlugin {\n renderSearch: (o: {\n isOpen: boolean;\n onClose: () => void;\n }) => React.JSX.Element | null;\n}\n\nexport interface ProfileMenuPlugin {\n getProfileMenuItems: (context: ZudokuContext) => ProfileNavigationItem[];\n}\n\nexport type ProfileNavigationItem = {\n label: string;\n path?: string;\n weight?: number;\n category?: \"top\" | \"middle\" | \"bottom\";\n children?: ProfileNavigationItem[];\n icon?: LucideIcon;\n};\n\nexport interface CommonPlugin {\n initialize?: (\n context: ZudokuContext,\n ) => Promise<void | boolean> | void | boolean;\n getHead?: () => ReactElement | undefined;\n getMdxComponents?: () => MdxComponentsType;\n}\n\nexport const isProfileMenuPlugin = (\n obj: ZudokuPlugin,\n): obj is ProfileMenuPlugin =>\n \"getProfileMenuItems\" in obj && typeof obj.getProfileMenuItems === \"function\";\n\nexport const isNavigationPlugin = (\n obj: ZudokuPlugin,\n): obj is NavigationPlugin =>\n \"getRoutes\" in obj && typeof obj.getRoutes === \"function\";\n\nexport const isSearchPlugin = (\n obj: ZudokuPlugin,\n): obj is SearchProviderPlugin =>\n \"renderSearch\" in obj && typeof obj.renderSearch === \"function\";\n\nexport const needsInitialization = (obj: ZudokuPlugin): obj is CommonPlugin =>\n \"initialize\" in obj && typeof obj.initialize === \"function\";\n\nexport const hasHead = (obj: ZudokuPlugin): obj is CommonPlugin =>\n \"getHead\" in obj && typeof obj.getHead === \"function\";\n\nexport const isMdxProviderPlugin = (obj: ZudokuPlugin): obj is CommonPlugin =>\n \"getMdxComponents\" in obj && typeof obj.getMdxComponents === \"function\";\n\nexport const isApiIdentityPlugin = (\n obj: ZudokuPlugin,\n): obj is ApiIdentityPlugin =>\n \"getIdentities\" in obj && typeof obj.getIdentities === \"function\";\n","import { CircleXIcon } from \"lucide-react\";\nimport { useState } from \"react\";\nimport { cn } from \"../util/cn.js\";\nimport { useZudoku } from \"./context/ZudokuContext.js\";\n\nconst COLOR_MAP = {\n info: \"bg-blue-500\",\n note: \"bg-gray-500\",\n tip: \"bg-green-600\",\n caution: \"bg-orange-500\",\n danger: \"bg-rose-500\",\n} as const;\n\nexport const Banner = () => {\n const { page } = useZudoku();\n const [isBannerOpen, setIsBannerOpen] = useState(true);\n\n if (!page?.banner || !isBannerOpen) {\n return <style>{`:root { --banner-height: 0px; }`}</style>;\n }\n\n const mappedColor =\n page.banner.color && page.banner.color in COLOR_MAP\n ? COLOR_MAP[page.banner.color as keyof typeof COLOR_MAP]\n : !page.banner.color\n ? \"bg-primary\"\n : undefined;\n\n const style = !mappedColor ? { backgroundColor: page.banner.color } : {};\n\n return (\n <div\n className={cn(\n \"relative text-primary-foreground text-sm font-medium px-4 py-2 flex gap-2 items-center\",\n mappedColor,\n )}\n style={style}\n >\n <div className=\"w-full\">{page.banner.message}</div>\n {page.banner.dismissible && (\n <button\n type=\"button\"\n className=\"md:absolute md:right-4 -m-1.5 p-1.5 hover:bg-accent-foreground/10 rounded-md\"\n onClick={() => setIsBannerOpen(false)}\n >\n <CircleXIcon size={16} />\n </button>\n )}\n </div>\n );\n};\n","import { SearchIcon } from \"lucide-react\";\nimport { Suspense, useCallback, useEffect, useState } from \"react\";\nimport { isSearchPlugin } from \"../core/plugins.js\";\nimport { useZudoku } from \"./context/ZudokuContext.js\";\n\nexport const Search = ({ className }: { className?: string }) => {\n const ctx = useZudoku();\n const [isOpen, setIsOpen] = useState(false);\n\n const onClose = useCallback(() => setIsOpen(false), []);\n\n useEffect(() => {\n if (isOpen) {\n return;\n }\n\n function onKeyDown(event: KeyboardEvent) {\n if (event.key === \"k\" && (event.metaKey || event.ctrlKey)) {\n event.preventDefault();\n setIsOpen(true);\n }\n }\n\n window.addEventListener(\"keydown\", onKeyDown);\n\n return () => {\n window.removeEventListener(\"keydown\", onKeyDown);\n };\n }, [isOpen, setIsOpen]);\n\n const searchPlugin = ctx.plugins.find(isSearchPlugin);\n\n if (!searchPlugin) {\n return null;\n }\n\n return (\n <div className={className}>\n <button\n type=\"button\"\n onClick={() => setIsOpen(true)}\n className=\"flex items-center border border-input hover:bg-accent hover:text-accent-foreground p-4 relative h-8 justify-start rounded-lg bg-background text-sm text-muted-foreground shadow-none w-full sm:w-72\"\n >\n <div className=\"flex items-center gap-2 flex-grow\">\n <SearchIcon size={14} />\n Search\n </div>\n <kbd className=\"absolute right-[0.3rem] top-[0.3rem] hidden h-5 select-none items-center gap-1 rounded border bg-muted px-1.5 font-mono text-[11px] font-medium opacity-100 sm:flex\">\n ⌘K\n </kbd>\n </button>\n <Suspense fallback={null}>\n {searchPlugin.renderSearch({\n isOpen,\n onClose,\n })}\n </Suspense>\n </div>\n );\n};\n","import { MoonStarIcon, SunIcon } from \"lucide-react\";\nimport { useTheme } from \"next-themes\";\nimport { Button } from \"zudoku/ui/Button.js\";\nimport { ClientOnly } from \"./ClientOnly.js\";\n\nexport const ThemeSwitch = () => {\n const { resolvedTheme, setTheme } = useTheme();\n const ThemeIcon = resolvedTheme === \"dark\" ? MoonStarIcon : SunIcon;\n\n return (\n <ClientOnly>\n <Button\n variant=\"ghost\"\n aria-label={\n resolvedTheme === \"dark\"\n ? \"Switch to light mode\"\n : \"Switch to dark mode\"\n }\n className=\"p-2.5 -m-2.5 rounded-full\"\n onClick={() => setTheme(resolvedTheme === \"dark\" ? \"light\" : \"dark\")}\n >\n <ThemeIcon size={18} />\n </Button>\n </ClientOnly>\n );\n};\n","import { cx } from \"class-variance-authority\";\nimport { Suspense } from \"react\";\nimport { NavLink, useNavigation } from \"react-router\";\nimport { TopNavigationItem } from \"../../config/validators/common.js\";\nimport { useAuth } from \"../authentication/hook.js\";\nimport { ZudokuError } from \"../util/invariant.js\";\nimport { joinPath } from \"../util/joinPath.js\";\nimport { useCurrentNavigation, useZudoku } from \"./context/ZudokuContext.js\";\nimport { traverseSidebar } from \"./navigation/utils.js\";\n\nexport const isHiddenItem =\n (isAuthenticated?: boolean) =>\n (item: { display?: \"auth\" | \"anon\" | \"always\" }) => {\n return (\n (item.display === \"auth\" && isAuthenticated) ||\n (item.display === \"anon\" && !isAuthenticated) ||\n !item.display ||\n item.display === \"always\"\n );\n };\n\nexport const TopNavigation = () => {\n const { topNavigation } = useZudoku();\n const { isAuthenticated } = useAuth();\n\n // Hide top nav if there is only one item\n if (topNavigation.length <= 1) {\n return <style>{`:root { --top-nav-height: 0px; }`}</style>;\n }\n\n return (\n <Suspense>\n <nav className=\"hidden lg:block border-b text-sm px-12 h-[--top-nav-height]\">\n <ul className=\"flex flex-row items-center gap-8\">\n {topNavigation.filter(isHiddenItem(isAuthenticated)).map((item) => (\n <li key={item.id}>\n <TopNavItem {...item} />\n </li>\n ))}\n </ul>\n </nav>\n </Suspense>\n );\n};\n\nexport const TopNavItem = ({\n id,\n label,\n default: defaultLink,\n}: TopNavigationItem) => {\n const { sidebars } = useZudoku();\n const currentSidebar = sidebars[id];\n const currentNav = useCurrentNavigation();\n const isNavigating = Boolean(useNavigation().location);\n const isActive = currentNav.topNavItem?.id === id && !isNavigating;\n\n // TODO: This is a bit of a hack to get the first link in the sidebar\n // We should really process this when we load the config so we can validate\n // that the sidebar is actually set. In this case we just fall back to linking\n // to the id if we can't resolve a sidebar.\n const first =\n defaultLink ??\n (currentSidebar\n ? traverseSidebar(currentSidebar, (item) => {\n if (item.type === \"doc\") return joinPath(item.id);\n })\n : joinPath(id));\n\n if (!first) {\n throw new ZudokuError(\"Page not found.\", {\n developerHint: `No links found in top navigation for '${id}'. Check that the sidebar isn't empty or that a default link is set.`,\n });\n }\n\n return (\n // We don't use isActive here because it has to be inside the sidebar,\n // the top nav id doesn't necessarily start with the sidebar id\n <NavLink\n className={({ isPending }) =>\n cx(\n \"block lg:py-3.5 font-medium -mb-px border-b-2\",\n isActive || isPending\n ? \"border-primary text-foreground\"\n : \"border-transparent text-foreground/75 hover:text-foreground hover:border-accent-foreground/25\",\n )\n }\n to={first}\n >\n {label}\n </NavLink>\n );\n};\n","import { VisuallyHidden } from \"@radix-ui/react-visually-hidden\";\nimport { MenuIcon } from \"lucide-react\";\nimport { useState } from \"react\";\nimport { useAuth } from \"../authentication/hook.js\";\nimport {\n Drawer,\n DrawerContent,\n DrawerTitle,\n DrawerTrigger,\n} from \"../ui/Drawer.js\";\nimport { useZudoku } from \"./context/ZudokuContext.js\";\nimport { Search } from \"./Search.js\";\nimport { ThemeSwitch } from \"./ThemeSwitch.js\";\nimport { isHiddenItem, TopNavItem } from \"./TopNavigation.js\";\n\nexport const MobileTopNavigation = () => {\n const { topNavigation } = useZudoku();\n const { isAuthenticated } = useAuth();\n const [drawerOpen, setDrawerOpen] = useState(false);\n\n return (\n <Drawer\n direction=\"right\"\n open={drawerOpen}\n onOpenChange={(open) => setDrawerOpen(open)}\n >\n <div className=\"flex lg:hidden justify-self-end\">\n <DrawerTrigger className=\"lg:hidden\">\n <MenuIcon size={22} />\n </DrawerTrigger>\n </div>\n <DrawerContent\n className=\"lg:hidden h-[100dvh] right-0 left-auto w-[320px] rounded-none\"\n aria-describedby={undefined}\n >\n <div className=\"p-4 overflow-y-auto overscroll-none\">\n <VisuallyHidden>\n <DrawerTitle>Navigation</DrawerTitle>\n </VisuallyHidden>\n <Search className=\"flex p-4\" />\n <ul className=\"flex flex-col items-center gap-4 p-4\">\n <li>\n <ThemeSwitch />\n </li>\n {topNavigation.filter(isHiddenItem(isAuthenticated)).map((item) => (\n <li key={item.label}>\n <button onClick={() => setDrawerOpen(false)}>\n <TopNavItem {...item} />\n </button>\n </li>\n ))}\n </ul>\n </div>\n </DrawerContent>\n </Drawer>\n );\n};\n","import { memo } from \"react\";\nimport { Link } from \"react-router\";\nimport { Button } from \"zudoku/ui/Button.js\";\nimport { Skeleton } from \"zudoku/ui/Skeleton.js\";\nimport { useAuth } from \"../authentication/hook.js\";\nimport { isProfileMenuPlugin, ProfileNavigationItem } from \"../core/plugins.js\";\nimport {\n DropdownMenu,\n DropdownMenuContent,\n DropdownMenuItem,\n DropdownMenuLabel,\n DropdownMenuPortal,\n DropdownMenuSeparator,\n DropdownMenuSub,\n DropdownMenuSubContent,\n DropdownMenuSubTrigger,\n DropdownMenuTrigger,\n} from \"../ui/DropdownMenu.js\";\nimport { joinPath } from \"../util/joinPath.js\";\nimport { Banner } from \"./Banner.js\";\nimport { ClientOnly } from \"./ClientOnly.js\";\nimport { useZudoku } from \"./context/ZudokuContext.js\";\nimport { MobileTopNavigation } from \"./MobileTopNavigation.js\";\nimport { Search } from \"./Search.js\";\nimport { Slotlet } from \"./SlotletProvider.js\";\nimport { ThemeSwitch } from \"./ThemeSwitch.js\";\nimport { TopNavigation } from \"./TopNavigation.js\";\n\nconst RecursiveMenu = ({ item }: { item: ProfileNavigationItem }) => {\n return item.children ? (\n <DropdownMenuSub key={item.label}>\n <DropdownMenuSubTrigger>{item.label}</DropdownMenuSubTrigger>\n <DropdownMenuPortal>\n <DropdownMenuSubContent>\n {item.children.map((item, i) => (\n // eslint-disable-next-line react/no-array-index-key\n <RecursiveMenu key={i} item={item} />\n ))}\n </DropdownMenuSubContent>\n </DropdownMenuPortal>\n </DropdownMenuSub>\n ) : (\n <Link to={item.path ?? \"\"}>\n <DropdownMenuItem key={item.label} className=\"flex gap-2\">\n {item.icon && (\n <item.icon size={16} strokeWidth={1} absoluteStrokeWidth />\n )}\n {item.label}\n </DropdownMenuItem>\n </Link>\n );\n};\n\nexport const Header = memo(function HeaderInner() {\n const auth = useAuth();\n const { isAuthenticated, profile, isAuthEnabled } = useAuth();\n const context = useZudoku();\n const { page, plugins } = context;\n\n const accountItems = plugins\n .filter((p) => isProfileMenuPlugin(p))\n .flatMap((p) => p.getProfileMenuItems(context))\n .sort((i) => i.weight ?? 0);\n\n return (\n <header className=\"sticky lg:top-0 z-10 bg-background/80 backdrop-blur w-full\">\n <Banner />\n <div className=\"max-w-screen-2xl mx-auto\">\n <div className=\"grid grid-cols-[1fr_auto] lg:grid-cols-[calc(var(--side-nav-width))_1fr] lg:gap-12 items-center border-b px-4 lg:px-12 h-[--top-header-height]\">\n <div className=\"flex\">\n <Link to=\"/\">\n <div className=\"flex items-center gap-3.5\">\n {page?.logo && (\n <>\n <img\n src={\n /https?:\\/\\//.test(page.logo.src.light)\n ? page.logo.src.light\n : joinPath(\n import.meta.env.BASE_URL,\n page.logo.src.light,\n )\n }\n alt={page.logo.alt ?? page.pageTitle}\n style={{ width: page.logo.width }}\n className=\"h-10 dark:hidden\"\n loading=\"lazy\"\n />\n <img\n src={\n /https?:\\/\\//.test(page.logo.src.dark)\n ? page.logo.src.dark\n : joinPath(\n import.meta.env.BASE_URL,\n page.logo.src.dark,\n )\n }\n alt={page.logo.alt ?? page.pageTitle}\n style={{ width: page.logo.width }}\n className=\"h-10 hidden dark:block\"\n loading=\"lazy\"\n />\n </>\n )}\n <span className=\"font-bold text-2xl text-foreground/85 tracking-wide\">\n {page?.pageTitle}\n </span>\n </div>\n </Link>\n </div>\n <div className=\"grid grid-cols-1 lg:grid-cols-[--sidecar-grid-cols] items-center gap-8\">\n <div className=\"w-full justify-center hidden lg:flex\">\n <Search />\n </div>\n\n <MobileTopNavigation />\n <div className=\"hidden lg:flex items-center justify-self-end text-sm gap-2\">\n <Slotlet name=\"head-navigation-start\" />\n {isAuthEnabled && (\n <ClientOnly\n fallback={<Skeleton className=\"rounded h-5 w-24 mr-4\" />}\n >\n {!isAuthenticated ? (\n <Button variant=\"ghost\" onClick={() => auth.login()}>\n Login\n </Button>\n ) : (\n Object.values(accountItems).length > 0 && (\n <DropdownMenu modal={false}>\n <DropdownMenuTrigger asChild>\n <Button variant=\"ghost\">\n {profile?.name ? `${profile.name}` : \"My Account\"}\n </Button>\n </DropdownMenuTrigger>\n <DropdownMenuContent className=\"w-56\">\n <DropdownMenuLabel>\n {profile?.name ? `${profile.name}` : \"My Account\"}\n {profile?.email && (\n <div className=\"font-normal text-muted-foreground\">\n {profile.email}\n </div>\n )}\n </DropdownMenuLabel>\n {accountItems.filter((i) => i.category === \"top\")\n .length > 0 && <DropdownMenuSeparator />}\n {accountItems\n .filter((i) => i.category === \"top\")\n .map((i) => (\n <RecursiveMenu key={i.label} item={i} />\n ))}\n {accountItems.filter(\n (i) => !i.category || i.category === \"middle\",\n ).length > 0 && <DropdownMenuSeparator />}\n {accountItems\n .filter(\n (i) => !i.category || i.category === \"middle\",\n )\n .map((i) => (\n <RecursiveMenu key={i.label} item={i} />\n ))}\n {accountItems.filter((i) => i.category === \"bottom\")\n .length > 0 && <DropdownMenuSeparator />}\n {accountItems\n .filter((i) => i.category === \"bottom\")\n .map((i) => (\n <RecursiveMenu key={i.label} item={i} />\n ))}\n </DropdownMenuContent>\n </DropdownMenu>\n )\n )}\n </ClientOnly>\n )}\n <ThemeSwitch />\n <Slotlet name=\"head-navigation-end\" />\n </div>\n </div>\n </div>\n <Slotlet name=\"top-navigation-before\" />\n <TopNavigation />\n <Slotlet name=\"top-navigation-after\" />\n </div>\n </header>\n );\n});\n","import { forwardRef, type PropsWithChildren } from \"react\";\nimport { cn } from \"../../util/cn.js\";\n\nexport const SidebarWrapper = forwardRef<\n HTMLDivElement,\n PropsWithChildren<{ pushMainContent?: boolean; className?: string }>\n>(({ children, className, pushMainContent }, ref) => (\n <nav\n // this data attribute is used in `Layout.tsx` to determine if side navigation\n // is present for the current page so the main content is pushed to the right\n // it's also important to set `peer` class here.\n // maybe this could be simplified by adjusting the layout\n data-navigation={String(pushMainContent)}\n className={cn(\n \"scrollbar peer hidden lg:flex flex-col fixed text-sm overflow-y-auto shrink-0\",\n \"-mx-[--padding-nav-item] pb-20 mt-[--padding-content-top]\",\n \"w-[--side-nav-width] h-[calc(100%-var(--header-height))] scroll-pt-2 gap-2\",\n className,\n )}\n ref={ref}\n >\n {children}\n </nav>\n));\n\nSidebarWrapper.displayName = \"SidebarWrapper\";\n","import { useRef } from \"react\";\n\nimport { VisuallyHidden } from \"@radix-ui/react-visually-hidden\";\nimport { DrawerContent, DrawerTitle } from \"../../ui/Drawer.js\";\nimport { useCurrentNavigation } from \"../context/ZudokuContext.js\";\nimport { Slotlet } from \"../SlotletProvider.js\";\nimport { SidebarItem } from \"./SidebarItem.js\";\nimport { SidebarWrapper } from \"./SidebarWrapper.js\";\n\nexport const Sidebar = ({\n onRequestClose,\n}: {\n onRequestClose?: () => void;\n}) => {\n const navRef = useRef<HTMLDivElement | null>(null);\n const navigation = useCurrentNavigation();\n\n return (\n <>\n <SidebarWrapper\n ref={navRef}\n pushMainContent={navigation.sidebar.length > 0}\n >\n <Slotlet name=\"zudoku-before-navigation\" />\n {navigation.sidebar.map((item) => (\n <SidebarItem key={item.label} item={item} />\n ))}\n <Slotlet name=\"zudoku-after-navigation\" />\n </SidebarWrapper>\n <DrawerContent\n className=\"lg:hidden h-[100dvh] left-0 w-[320px] rounded-none\"\n aria-describedby={undefined}\n >\n <div className=\"p-4 overflow-y-auto overscroll-none\">\n <VisuallyHidden>\n <DrawerTitle>Sidebar</DrawerTitle>\n </VisuallyHidden>\n {navigation.sidebar.map((item) => (\n <SidebarItem\n key={item.label}\n item={item}\n onRequestClose={onRequestClose}\n />\n ))}\n </div>\n </DrawerContent>\n </>\n );\n};\n","import { Helmet } from \"@zudoku/react-helmet-async\";\nimport { PanelLeftIcon } from \"lucide-react\";\nimport { Suspense, useEffect, useRef, useState, type ReactNode } from \"react\";\nimport { Outlet, useLocation, useNavigation } from \"react-router\";\nimport { useSpinDelay } from \"spin-delay\";\nimport { Drawer, DrawerTrigger } from \"../ui/Drawer.js\";\nimport { cn } from \"../util/cn.js\";\nimport { useScrollToAnchor } from \"../util/useScrollToAnchor.js\";\nimport { useScrollToTop } from \"../util/useScrollToTop.js\";\nimport { useViewportAnchor } from \"./context/ViewportAnchorContext.js\";\nimport { useZudoku } from \"./context/ZudokuContext.js\";\nimport { Header } from \"./Header.js\";\nimport { Sidebar } from \"./navigation/Sidebar.js\";\nimport { Slotlet } from \"./SlotletProvider.js\";\nimport { Spinner } from \"./Spinner.js\";\n\nconst LoadingFallback = () => (\n <main className=\"grid h-[calc(100vh-var(--header-height))] place-items-center\">\n <Spinner />\n </main>\n);\n\nexport const Layout = ({ children }: { children?: ReactNode }) => {\n const location = useLocation();\n const { setActiveAnchor } = useViewportAnchor();\n const { meta, authentication } = useZudoku();\n\n useScrollToAnchor();\n useScrollToTop();\n\n const previousLocationPath = useRef(location.pathname);\n\n useEffect(() => {\n // Initialize the authentication plugin\n authentication?.onPageLoad?.();\n }, [authentication]);\n\n useEffect(() => {\n // always reset on location change\n if (location.pathname !== previousLocationPath.current) {\n setActiveAnchor(\"\");\n }\n previousLocationPath.current = location.pathname;\n }, [location.pathname, setActiveAnchor]);\n\n // Page transition is happening: https://reactrouter.com/start/framework/pending-ui#global-pending-navigation\n const isNavigating = Boolean(useNavigation().location);\n const showSpinner = useSpinDelay(isNavigating, {\n delay: 300,\n minDuration: 500,\n });\n const [isDrawerOpen, setDrawerOpen] = useState(false);\n\n return (\n <>\n {import.meta.env.MODE === \"standalone\" && (\n <style>{`:root { --top-nav-height: 0px; }`}</style>\n )}\n <Helmet titleTemplate={meta?.title}>\n {meta?.description && (\n <meta name=\"description\" content={meta.description} />\n )}\n {meta?.favicon && <link rel=\"icon\" href={meta.favicon} />}\n </Helmet>\n <Slotlet name=\"layout-before-head\" />\n <Header />\n <Slotlet name=\"layout-after-head\" />\n\n <div className=\"w-full max-w-screen-2xl mx-auto px-4 lg:px-12\">\n {showSpinner ? (\n <LoadingFallback />\n ) : (\n <Suspense fallback={<LoadingFallback />}>\n <Drawer\n direction=\"left\"\n open={isDrawerOpen}\n onOpenChange={(open) => setDrawerOpen(open)}\n >\n <Sidebar onRequestClose={() => setDrawerOpen(false)} />\n <div\n className={cn(\n \"lg:hidden -mx-10 px-10 py-2 sticky bg-background/80 backdrop-blur z-10 top-0 left-0 right-0 border-b\",\n \"peer-data-[navigation=false]:hidden\",\n )}\n >\n <DrawerTrigger className=\"flex items-center gap-2\">\n <PanelLeftIcon size={16} strokeWidth={1.5} />\n <span className=\"text-sm\">Menu</span>\n </DrawerTrigger>\n </div>\n <main\n className={cn(\n \"h-full dark:border-white/10 translate-x-0\",\n \"lg:overflow-visible\",\n // This works in tandem with the `SidebarWrapper` component\n \"lg:peer-data-[navigation=true]:w-[calc(100%-var(--side-nav-width))]\",\n \"lg:peer-data-[navigation=true]:translate-x-[--side-nav-width] lg:peer-data-[navigation=true]:pl-12\",\n )}\n >\n <Slotlet name=\"zudoku-before-content\" />\n {children ?? <Outlet />}\n <Slotlet name=\"zudoku-after-content\" />\n </main>\n </Drawer>\n </Suspense>\n )}\n </div>\n </>\n );\n};\n","'use client';\nimport { createContext, Component, createElement, useContext, useState, useMemo, forwardRef } from 'react';\n\nconst ErrorBoundaryContext = createContext(null);\n\nconst initialState = {\n didCatch: false,\n error: null\n};\nclass ErrorBoundary extends Component {\n constructor(props) {\n super(props);\n this.resetErrorBoundary = this.resetErrorBoundary.bind(this);\n this.state = initialState;\n }\n static getDerivedStateFromError(error) {\n return {\n didCatch: true,\n error\n };\n }\n resetErrorBoundary() {\n const {\n error\n } = this.state;\n if (error !== null) {\n var _this$props$onReset, _this$props;\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n (_this$props$onReset = (_this$props = this.props).onReset) === null || _this$props$onReset === void 0 ? void 0 : _this$props$onReset.call(_this$props, {\n args,\n reason: \"imperative-api\"\n });\n this.setState(initialState);\n }\n }\n componentDidCatch(error, info) {\n var _this$props$onError, _this$props2;\n (_this$props$onError = (_this$props2 = this.props).onError) === null || _this$props$onError === void 0 ? void 0 : _this$props$onError.call(_this$props2, error, info);\n }\n componentDidUpdate(prevProps, prevState) {\n const {\n didCatch\n } = this.state;\n const {\n resetKeys\n } = this.props;\n\n // There's an edge case where if the thing that triggered the error happens to *also* be in the resetKeys array,\n // we'd end up resetting the error boundary immediately.\n // This would likely trigger a second error to be thrown.\n // So we make sure that we don't check the resetKeys on the first call of cDU after the error is set.\n\n if (didCatch && prevState.error !== null && hasArrayChanged(prevProps.resetKeys, resetKeys)) {\n var _this$props$onReset2, _this$props3;\n (_this$props$onReset2 = (_this$props3 = this.props).onReset) === null || _this$props$onReset2 === void 0 ? void 0 : _this$props$onReset2.call(_this$props3, {\n next: resetKeys,\n prev: prevProps.resetKeys,\n reason: \"keys\"\n });\n this.setState(initialState);\n }\n }\n render() {\n const {\n children,\n fallbackRender,\n FallbackComponent,\n fallback\n } = this.props;\n const {\n didCatch,\n error\n } = this.state;\n let childToRender = children;\n if (didCatch) {\n const props = {\n error,\n resetErrorBoundary: this.resetErrorBoundary\n };\n if (typeof fallbackRender === \"function\") {\n childToRender = fallbackRender(props);\n } else if (FallbackComponent) {\n childToRender = createElement(FallbackComponent, props);\n } else if (fallback !== undefined) {\n childToRender = fallback;\n } else {\n throw error;\n }\n }\n return createElement(ErrorBoundaryContext.Provider, {\n value: {\n didCatch,\n error,\n resetErrorBoundary: this.resetErrorBoundary\n }\n }, childToRender);\n }\n}\nfunction hasArrayChanged() {\n let a = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];\n let b = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];\n return a.length !== b.length || a.some((item, index) => !Object.is(item, b[index]));\n}\n\nfunction assertErrorBoundaryContext(value) {\n if (value == null || typeof value.didCatch !== \"boolean\" || typeof value.resetErrorBoundary !== \"function\") {\n throw new Error(\"ErrorBoundaryContext not found\");\n }\n}\n\nfunction useErrorBoundary() {\n const context = useContext(ErrorBoundaryContext);\n assertErrorBoundaryContext(context);\n const [state, setState] = useState({\n error: null,\n hasError: false\n });\n const memoized = useMemo(() => ({\n resetBoundary: () => {\n context.resetErrorBoundary();\n setState({\n error: null,\n hasError: false\n });\n },\n showBoundary: error => setState({\n error,\n hasError: true\n })\n }), [context.resetErrorBoundary]);\n if (state.hasError) {\n throw state.error;\n }\n return memoized;\n}\n\nfunction withErrorBoundary(component, errorBoundaryProps) {\n const Wrapped = forwardRef((props, ref) => createElement(ErrorBoundary, errorBoundaryProps, createElement(component, {\n ...props,\n ref\n })));\n\n // Format for display in DevTools\n const name = component.displayName || component.name || \"Unknown\";\n Wrapped.displayName = \"withErrorBoundary(\".concat(name, \")\");\n return Wrapped;\n}\n\nexport { ErrorBoundary, ErrorBoundaryContext, useErrorBoundary, withErrorBoundary };\n","import { ReactNode } from \"react\";\nimport { TopNavigationItem } from \"../../config/validators/common.js\";\nimport type { SidebarConfig } from \"../../config/validators/SidebarSchema.js\";\nimport { type AuthenticationProvider } from \"../authentication/authentication.js\";\nimport type { ComponentsContextType } from \"../components/context/ComponentsContext.js\";\nimport { Slotlets } from \"../components/SlotletProvider.js\";\nimport { joinPath } from \"../util/joinPath.js\";\nimport type { MdxComponentsType } from \"../util/MdxComponents.js\";\nimport {\n isApiIdentityPlugin,\n isNavigationPlugin,\n type NavigationPlugin,\n needsInitialization,\n type ZudokuPlugin,\n} from \"./plugins.js\";\n\nexport interface ApiIdentity {\n authorizeRequest: (request: Request) => Request;\n label: string;\n id: string;\n}\n\nexport type ApiKeyCache = \"api-keys\";\n\ntype Metadata = Partial<{\n title: string;\n description: string;\n logo: string;\n favicon: string;\n generator: string;\n applicationName: string;\n referrer: string;\n keywords: string[];\n authors: string[];\n creator: string;\n publisher: string;\n}>;\n\ntype Page = Partial<{\n pageTitle?: string;\n logo?: {\n src: {\n light: string;\n dark: string;\n };\n width?: string;\n alt?: string;\n };\n banner?: {\n message: ReactNode;\n color?: \"note\" | \"tip\" | \"info\" | \"caution\" | \"danger\" | (string & {});\n dismissible?: boolean;\n };\n}>;\n\nexport type ZudokuContextOptions = {\n metadata?: Metadata;\n page?: Page;\n authentication?: AuthenticationProvider;\n topNavigation?: TopNavigationItem[];\n sidebars?: SidebarConfig;\n plugins?: ZudokuPlugin[];\n slotlets?: Slotlets;\n mdx?: {\n components?: MdxComponentsType;\n };\n overrides?: ComponentsContextType;\n};\n\nexport class ZudokuContext {\n public plugins: NonNullable<ZudokuContextOptions[\"plugins\"]>;\n public sidebars: SidebarConfig;\n public topNavigation: NonNullable<ZudokuContextOptions[\"topNavigation\"]>;\n public meta: ZudokuContextOptions[\"metadata\"];\n public page: ZudokuContextOptions[\"page\"];\n public authentication?: ZudokuContextOptions[\"authentication\"];\n private navigationPlugins: NavigationPlugin[];\n\n constructor(config: ZudokuContextOptions) {\n this.plugins = config.plugins ?? [];\n this.topNavigation = config.topNavigation ?? [];\n this.sidebars = config.sidebars ?? {};\n this.navigationPlugins = this.plugins.filter(isNavigationPlugin);\n this.authentication = config.authentication;\n this.meta = config.metadata;\n this.page = config.page;\n }\n\n initialize = async (): Promise<void> => {\n await Promise.all(\n this.plugins\n .filter(needsInitialization)\n .map((plugin) => plugin.initialize?.(this)),\n );\n };\n\n getApiIdentities = async () => {\n const keys = await Promise.all(\n this.plugins\n .filter(isApiIdentityPlugin)\n .map((plugin) => plugin.getIdentities(this)),\n );\n\n return keys.flat();\n };\n\n getPluginSidebar = async (path: string) => {\n const navigations = await Promise.all(\n this.navigationPlugins.map((plugin) =>\n plugin.getSidebar?.(joinPath(path)),\n ),\n );\n\n return navigations.flatMap((nav) => nav ?? []);\n };\n\n signRequest = async (request: Request) => {\n if (!this.authentication) {\n throw new Error(\"No authentication provider configured\");\n }\n\n const accessToken = await this.authentication.getAccessToken();\n\n request.headers.set(\"Authorization\", `Bearer ${accessToken}`);\n\n return request;\n };\n}\n","import { FallbackProps } from \"react-error-boundary\";\nimport { ErrorAlert } from \"./ErrorAlert.js\";\n\nexport function TopLevelError({ error, resetErrorBoundary }: FallbackProps) {\n // Call resetErrorBoundary() to reset the error boundary and retry the render.\n\n return <ErrorAlert error={error} />;\n}\n","const root = globalThis;\n\nif (!root.requestIdleCallback || !root.cancelIdleCallback) {\n root.requestIdleCallback = (cb: IdleRequestCallback) => setTimeout(cb, 1);\n root.cancelIdleCallback = clearTimeout;\n}\n","import {\n createContext,\n useContext,\n type ComponentProps,\n type ComponentType,\n} from \"react\";\nimport { Header } from \"../Header.js\";\n\nexport const DEFAULT_COMPONENTS = {\n Header,\n};\n\nexport type ComponentsContextType = {\n Header?: ComponentType<ComponentProps<typeof Header>>;\n};\n\nconst ComponentsContext =\n createContext<Required<ComponentsContextType>>(DEFAULT_COMPONENTS);\n\nexport const ComponentsProvider = ComponentsContext.Provider;\n\nexport const useComponents = () => {\n return useContext(ComponentsContext);\n};\n","import { useSuspenseQuery } from \"@tanstack/react-query\";\nimport type { PropsWithChildren } from \"react\";\nimport { ZudokuContext } from \"../../core/ZudokuContext.js\";\nimport { ZudokuReactContext } from \"./ZudokuContext.js\";\n\nexport const ZudokuProvider = ({\n children,\n context,\n}: PropsWithChildren<{ context: ZudokuContext }>) => {\n useSuspenseQuery({\n queryFn: async () => {\n await context.initialize();\n return true;\n },\n queryKey: [\"zudoku-initialize\"],\n });\n\n return (\n <ZudokuReactContext.Provider value={context}>\n {children}\n </ZudokuReactContext.Provider>\n );\n};\n","import { MDXProvider } from \"@mdx-js/react\";\nimport { Helmet } from \"@zudoku/react-helmet-async\";\nimport { ThemeProvider } from \"next-themes\";\nimport {\n Fragment,\n memo,\n type PropsWithChildren,\n useContext,\n useEffect,\n useMemo,\n useState,\n} from \"react\";\nimport { ErrorBoundary } from \"react-error-boundary\";\nimport { Outlet, useNavigation } from \"react-router\";\nimport { hasHead, isMdxProviderPlugin } from \"../core/plugins.js\";\nimport { ZudokuContext, ZudokuContextOptions } from \"../core/ZudokuContext.js\";\nimport { TopLevelError } from \"../errors/TopLevelError.js\";\nimport { StaggeredRenderContext } from \"../plugins/openapi/StaggeredRender.js\";\nimport { MdxComponents } from \"../util/MdxComponents.js\";\nimport \"../util/requestIdleCallbackPolyfill.js\";\nimport {\n ComponentsProvider,\n DEFAULT_COMPONENTS,\n} from \"./context/ComponentsContext.js\";\nimport { ViewportAnchorProvider } from \"./context/ViewportAnchorContext.js\";\nimport { ZudokuProvider } from \"./context/ZudokuProvider.js\";\nimport { SlotletProvider } from \"./SlotletProvider.js\";\n\nconst ZudokoInner = memo(\n ({ children, ...props }: PropsWithChildren<ZudokuContextOptions>) => {\n const components = useMemo(\n () => ({ ...DEFAULT_COMPONENTS, ...props.overrides }),\n [props.overrides],\n );\n\n const mdxComponents = useMemo(() => {\n const componentsFromPlugins = (props.plugins ?? [])\n .filter(isMdxProviderPlugin)\n .flatMap((plugin) =>\n plugin.getMdxComponents ? [plugin.getMdxComponents()] : [],\n );\n\n return {\n ...componentsFromPlugins.reduce(\n (acc, curr) => ({ ...acc, ...curr }),\n {},\n ),\n ...MdxComponents,\n ...props.mdx?.components,\n };\n }, [props.mdx?.components, props.plugins]);\n const { stagger } = useContext(StaggeredRenderContext);\n const [didNavigate, setDidNavigate] = useState(false);\n const staggeredValue = useMemo(\n () => (didNavigate ? { stagger: true } : { stagger }),\n [stagger, didNavigate],\n );\n const navigation = useNavigation();\n\n useEffect(() => {\n if (didNavigate) {\n return;\n }\n setDidNavigate(true);\n }, [didNavigate, navigation.location]);\n\n const [zudokuContext] = useState(() => new ZudokuContext(props));\n\n const heads = props.plugins\n ?.filter(hasHead)\n // eslint-disable-next-line react/no-array-index-key\n .map((plugin, i) => <Fragment key={i}>{plugin.getHead?.()}</Fragment>);\n\n return (\n <>\n <Helmet>{heads}</Helmet>\n <StaggeredRenderContext.Provider value={staggeredValue}>\n <ZudokuProvider context={zudokuContext}>\n <MDXProvider components={mdxComponents}>\n <ThemeProvider attribute=\"class\" disableTransitionOnChange>\n <ComponentsProvider value={components}>\n <SlotletProvider slotlets={props.slotlets}>\n <ViewportAnchorProvider>\n {children ?? <Outlet />}\n </ViewportAnchorProvider>\n </SlotletProvider>\n </ComponentsProvider>\n </ThemeProvider>\n </MDXProvider>\n </ZudokuProvider>\n </StaggeredRenderContext.Provider>\n </>\n );\n },\n);\n\nZudokoInner.displayName = \"ZudokoInner\";\n\nconst Zudoku = (props: ZudokuContextOptions) => {\n return (\n <ErrorBoundary FallbackComponent={TopLevelError}>\n <ZudokoInner {...props} />\n </ErrorBoundary>\n );\n};\nZudoku.displayName = \"Zudoku\";\n\nexport { Zudoku };\n","import { useMDXComponents as useMDXComponentsImport } from \"@mdx-js/react\";\nimport { Helmet } from \"@zudoku/react-helmet-async\";\nimport { Link as LinkImport } from \"react-router\";\nimport { useAuth as useAuthImport } from \"../authentication/hook.js\";\nimport { RouterError as RouterErrorImport } from \"../errors/RouterError.js\";\nimport { ServerError as ServerErrorImport } from \"../errors/ServerError.js\";\nimport { Button as ButtonImport } from \"../ui/Button.js\";\nimport { Callout as CalloutImport } from \"../ui/Callout.js\";\nimport { Spinner as SpinnerImport } from \"./Spinner.js\";\nimport { Markdown as MarkdownImport } from \"./Markdown.js\";\nimport {\n Bootstrap as BootstrapImport,\n BootstrapStatic as BootstrapStaticImport,\n} from \"./Bootstrap.js\";\nimport { ClientOnly as ClientOnlyImport } from \"./ClientOnly.js\";\nimport { Layout as LayoutImport } from \"./Layout.js\";\nimport { Zudoku as ZudokuImport } from \"./Zudoku.js\";\nimport { useZudoku as useZudokuImport } from \"./context/ZudokuContext.js\";\nexport const useMDXComponents = /*@__PURE__*/ useMDXComponentsImport;\nexport const Layout = /*@__PURE__*/ LayoutImport;\nexport const RouterError = /*@__PURE__*/ RouterErrorImport;\nexport const ServerError = /*@__PURE__*/ ServerErrorImport;\nexport const Bootstrap = /*@__PURE__*/ BootstrapImport;\nexport const BootstrapStatic = /*@__PURE__*/ BootstrapStaticImport;\n\nexport const Head = /*@__PURE__*/ Helmet;\n\nexport const useZudoku = /*@__PURE__*/ useZudokuImport;\nexport const useAuth = /*@__PURE__*/ useAuthImport;\nexport const Zudoku = /*@__PURE__*/ ZudokuImport;\n\nexport const Callout = /*@__PURE__*/ CalloutImport;\nexport const Markdown = /*@__PURE__*/ MarkdownImport;\nexport const Spinner = /*@__PURE__*/ SpinnerImport;\nexport const ClientOnly = /*@__PURE__*/ ClientOnlyImport;\nexport const Button = /*@__PURE__*/ ButtonImport;\nexport const Link = /*@__PURE__*/ LinkImport;\n"],"names":["QueryCache","_a","Subscribable","config","__privateAdd","_queries","__privateSet","client","options","state","queryKey","queryHash","hashQueryKeyByOptions","query","Query","__privateGet","queryInMap","notifyManager","filters","defaultedFilters","matchQuery","queries","event","listener","MutationCache","_mutations","_mutationId","mutation","Mutation","__privateWrapper","scope","scopeFor","mutations","x","firstPendingMutation","m","foundMutation","matchMutation","pausedMutations","noop","infiniteQueryBehavior","pages","context","direction","_c","_b","oldPages","_d","oldPageParams","_e","result","currentPage","fetchFn","cancelled","addSignalProperty","object","queryFn","ensureQueryFn","fetchPage","data","param","previous","queryFnContext","page","maxPages","addTo","addToStart","addToEnd","pageParamFn","getPreviousPageParam","getNextPageParam","oldData","remainingPages","pageParams","lastIndex","QueryClient","_queryCache","_mutationCache","_defaultOptions","_queryDefaults","_mutationDefaults","_mountCount","_unsubscribeFocus","_unsubscribeOnline","focusManager","focused","onlineManager","online","cachedData","defaultedOptions","resolveStaleTime","updater","prevData","functionalUpdate","queryCache","refetchFilters","cancelOptions","defaultedCancelOptions","promises","fetchOptions","promise","hashKey","defaults","queryDefault","partialMatchKey","mutationKey","skipToken","defaultTransformerFn","hydrate","dehydratedState","mutationCache","deserializeData","mutationOptions","meta","_ignored","serializedState","initialPromise","HydrationBoundary","children","queryClient","useQueryClient","hydrationQueue","setHydrationQueue","React","optionsRef","newQueries","existingQueries","dehydratedQuery","existingQuery","hydrationIsNewer","queryAlreadyQueued","prev","ServerError","error","jsx","ErrorAlert","RouterProvider2","props","RouterProvider","ReactDOM","Bootstrap","router","StrictMode","QueryClientProvider","HelmetProvider","StaggeredRenderContext","BootstrapStatic","helmetContext","StaticRouterProvider","global","factory","exports","require$$0","this","react","defaultOptions","useIsSSR","isSSR","setIsSSR","useSpinDelay","loading","initialState","setState","timeout","delay","ColorMap","SidebarBadge","color","label","className","cn","SidebarCategory","category","onRequestClose","isCategoryOpen","useIsCategoryOpen","hasInteracted","setHasInteracted","useState","isCollapsible","isCollapsed","isDefaultOpen","open","setOpen","isActive","useMatch","useEffect","ToggleButton","e","ChevronRightIcon","jsxs","Collapsible","navigationListItem","NavLink","joinPath","item","SidebarItem","cva","DATA_ANCHOR_ATTR","activeAnchor","useViewportAnchor","searchParams","useSearchParams","Fragment","AnchorLink","ExternalLinkIcon","scrollIntoViewIfNeeded","element","rect","useScrollToAnchor","location","useLocation","setActiveAnchor","hash","scrollToElement","link","observer","_","obs","useScrollToTop","previousPath","useRef","Skeleton","isProfileMenuPlugin","obj","isNavigationPlugin","isSearchPlugin","needsInitialization","hasHead","isMdxProviderPlugin","isApiIdentityPlugin","COLOR_MAP","Banner","useZudoku","isBannerOpen","setIsBannerOpen","mappedColor","style","CircleXIcon","Search","ctx","isOpen","setIsOpen","onClose","useCallback","onKeyDown","searchPlugin","SearchIcon","Suspense","ThemeSwitch","resolvedTheme","setTheme","useTheme","ThemeIcon","MoonStarIcon","SunIcon","ClientOnly","Button","isHiddenItem","isAuthenticated","TopNavigation","topNavigation","useAuth","TopNavItem","id","defaultLink","sidebars","currentSidebar","currentNav","useCurrentNavigation","isNavigating","useNavigation","first","traverseSidebar","ZudokuError","isPending","cx","MobileTopNavigation","drawerOpen","setDrawerOpen","Drawer","DrawerTrigger","MenuIcon","DrawerContent","VisuallyHidden","DrawerTitle","RecursiveMenu","DropdownMenuSub","DropdownMenuSubTrigger","DropdownMenuPortal","DropdownMenuSubContent","i","Link","DropdownMenuItem","Header","memo","auth","profile","isAuthEnabled","plugins","accountItems","p","Slotlet","DropdownMenu","DropdownMenuTrigger","DropdownMenuContent","DropdownMenuLabel","DropdownMenuSeparator","SidebarWrapper","forwardRef","pushMainContent","ref","Sidebar","navRef","navigation","LoadingFallback","Spinner","Layout","authentication","previousLocationPath","showSpinner","isDrawerOpen","Helmet","PanelLeftIcon","Outlet","ErrorBoundaryContext","createContext","ErrorBoundary","Component","_this$props$onReset","_this$props","_len","args","_key","info","_this$props$onError","_this$props2","prevProps","prevState","didCatch","resetKeys","hasArrayChanged","_this$props$onReset2","_this$props3","fallbackRender","FallbackComponent","fallback","childToRender","createElement","a","b","index","ZudokuContext","__publicField","plugin","path","nav","request","accessToken","TopLevelError","resetErrorBoundary","root","cb","DEFAULT_COMPONENTS","ComponentsContext","ComponentsProvider","ZudokuProvider","useSuspenseQuery","ZudokuReactContext","ZudokoInner","components","useMemo","mdxComponents","acc","curr","MdxComponents","stagger","useContext","didNavigate","setDidNavigate","staggeredValue","zudokuContext","heads","MDXProvider","ThemeProvider","SlotletProvider","ViewportAnchorProvider","Zudoku","useMDXComponents","useMDXComponentsImport","LayoutImport","RouterError","RouterErrorImport","ServerErrorImport","BootstrapImport","BootstrapStaticImport","Head","useZudokuImport","useAuthImport","ZudokuImport","Callout","CalloutImport","Markdown","MarkdownImport","SpinnerImport","ClientOnlyImport","ButtonImport","LinkImport"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;WAKIA,MAAaC,KAAA,cAAcC,GAA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P,KAAgCyP,IAEhCC,KAAqB1E,IAErBzF,KAA0BoK,GAC1BvI,KAAwBwI,GACxBX,KAAuBY,IAEvBC,KAAwBC,IACxBC,KAAyBC,IACzBvF,KAAwBwF,IACxBpJ,KAA2BqJ,IAC3BpJ,KAAuBqJ,IACvBlH,KAAqBmH;","x_google_ignoreList":[0,1,2,3,4,5,7,9,26]}
1
+ {"version":3,"file":"zudoku.components.js","sources":["../../../node_modules/.pnpm/@tanstack+query-core@5.62.3/node_modules/@tanstack/query-core/build/modern/queryCache.js","../../../node_modules/.pnpm/@tanstack+query-core@5.62.3/node_modules/@tanstack/query-core/build/modern/mutationCache.js","../../../node_modules/.pnpm/@tanstack+query-core@5.62.3/node_modules/@tanstack/query-core/build/modern/infiniteQueryBehavior.js","../../../node_modules/.pnpm/@tanstack+query-core@5.62.3/node_modules/@tanstack/query-core/build/modern/queryClient.js","../../../node_modules/.pnpm/@tanstack+query-core@5.62.3/node_modules/@tanstack/query-core/build/modern/hydration.js","../../../node_modules/.pnpm/@tanstack+react-query@5.62.3_react@19.0.0/node_modules/@tanstack/react-query/build/modern/HydrationBoundary.js","../src/lib/errors/ServerError.tsx","../../../node_modules/.pnpm/react-router@7.0.2_react-dom@19.0.0_react@19.0.0__react@19.0.0/node_modules/react-router/dist/development/dom-export.mjs","../src/lib/components/Bootstrap.tsx","../../../node_modules/.pnpm/spin-delay@2.0.1_react@19.0.0/node_modules/spin-delay/dist/index.js","../src/lib/components/navigation/SidebarBadge.tsx","../src/lib/components/navigation/SidebarCategory.tsx","../src/lib/components/navigation/SidebarItem.tsx","../src/lib/util/useScrollToAnchor.ts","../src/lib/util/useScrollToTop.ts","../src/lib/ui/Skeleton.tsx","../src/lib/core/plugins.ts","../src/lib/components/Banner.tsx","../src/lib/components/Search.tsx","../src/lib/components/ThemeSwitch.tsx","../src/lib/components/TopNavigation.tsx","../src/lib/components/MobileTopNavigation.tsx","../src/lib/components/Header.tsx","../src/lib/components/navigation/SidebarWrapper.tsx","../src/lib/components/navigation/Sidebar.tsx","../src/lib/components/Layout.tsx","../../../node_modules/.pnpm/react-error-boundary@4.1.2_react@19.0.0/node_modules/react-error-boundary/dist/react-error-boundary.esm.js","../src/lib/core/ZudokuContext.ts","../src/lib/errors/TopLevelError.tsx","../src/lib/util/requestIdleCallbackPolyfill.ts","../src/lib/components/context/ComponentsContext.tsx","../src/lib/components/context/ZudokuProvider.tsx","../src/lib/components/Zudoku.tsx","../src/lib/components/index.ts"],"sourcesContent":["// src/queryCache.ts\nimport { hashQueryKeyByOptions, matchQuery } from \"./utils.js\";\nimport { Query } from \"./query.js\";\nimport { notifyManager } from \"./notifyManager.js\";\nimport { Subscribable } from \"./subscribable.js\";\nvar QueryCache = class extends Subscribable {\n constructor(config = {}) {\n super();\n this.config = config;\n this.#queries = /* @__PURE__ */ new Map();\n }\n #queries;\n build(client, options, state) {\n const queryKey = options.queryKey;\n const queryHash = options.queryHash ?? hashQueryKeyByOptions(queryKey, options);\n let query = this.get(queryHash);\n if (!query) {\n query = new Query({\n cache: this,\n queryKey,\n queryHash,\n options: client.defaultQueryOptions(options),\n state,\n defaultOptions: client.getQueryDefaults(queryKey)\n });\n this.add(query);\n }\n return query;\n }\n add(query) {\n if (!this.#queries.has(query.queryHash)) {\n this.#queries.set(query.queryHash, query);\n this.notify({\n type: \"added\",\n query\n });\n }\n }\n remove(query) {\n const queryInMap = this.#queries.get(query.queryHash);\n if (queryInMap) {\n query.destroy();\n if (queryInMap === query) {\n this.#queries.delete(query.queryHash);\n }\n this.notify({ type: \"removed\", query });\n }\n }\n clear() {\n notifyManager.batch(() => {\n this.getAll().forEach((query) => {\n this.remove(query);\n });\n });\n }\n get(queryHash) {\n return this.#queries.get(queryHash);\n }\n getAll() {\n return [...this.#queries.values()];\n }\n find(filters) {\n const defaultedFilters = { exact: true, ...filters };\n return this.getAll().find(\n (query) => matchQuery(defaultedFilters, query)\n );\n }\n findAll(filters = {}) {\n const queries = this.getAll();\n return Object.keys(filters).length > 0 ? queries.filter((query) => matchQuery(filters, query)) : queries;\n }\n notify(event) {\n notifyManager.batch(() => {\n this.listeners.forEach((listener) => {\n listener(event);\n });\n });\n }\n onFocus() {\n notifyManager.batch(() => {\n this.getAll().forEach((query) => {\n query.onFocus();\n });\n });\n }\n onOnline() {\n notifyManager.batch(() => {\n this.getAll().forEach((query) => {\n query.onOnline();\n });\n });\n }\n};\nexport {\n QueryCache\n};\n//# sourceMappingURL=queryCache.js.map","// src/mutationCache.ts\nimport { notifyManager } from \"./notifyManager.js\";\nimport { Mutation } from \"./mutation.js\";\nimport { matchMutation, noop } from \"./utils.js\";\nimport { Subscribable } from \"./subscribable.js\";\nvar MutationCache = class extends Subscribable {\n constructor(config = {}) {\n super();\n this.config = config;\n this.#mutations = /* @__PURE__ */ new Map();\n this.#mutationId = Date.now();\n }\n #mutations;\n #mutationId;\n build(client, options, state) {\n const mutation = new Mutation({\n mutationCache: this,\n mutationId: ++this.#mutationId,\n options: client.defaultMutationOptions(options),\n state\n });\n this.add(mutation);\n return mutation;\n }\n add(mutation) {\n const scope = scopeFor(mutation);\n const mutations = this.#mutations.get(scope) ?? [];\n mutations.push(mutation);\n this.#mutations.set(scope, mutations);\n this.notify({ type: \"added\", mutation });\n }\n remove(mutation) {\n const scope = scopeFor(mutation);\n if (this.#mutations.has(scope)) {\n const mutations = this.#mutations.get(scope)?.filter((x) => x !== mutation);\n if (mutations) {\n if (mutations.length === 0) {\n this.#mutations.delete(scope);\n } else {\n this.#mutations.set(scope, mutations);\n }\n }\n }\n this.notify({ type: \"removed\", mutation });\n }\n canRun(mutation) {\n const firstPendingMutation = this.#mutations.get(scopeFor(mutation))?.find((m) => m.state.status === \"pending\");\n return !firstPendingMutation || firstPendingMutation === mutation;\n }\n runNext(mutation) {\n const foundMutation = this.#mutations.get(scopeFor(mutation))?.find((m) => m !== mutation && m.state.isPaused);\n return foundMutation?.continue() ?? Promise.resolve();\n }\n clear() {\n notifyManager.batch(() => {\n this.getAll().forEach((mutation) => {\n this.remove(mutation);\n });\n });\n }\n getAll() {\n return [...this.#mutations.values()].flat();\n }\n find(filters) {\n const defaultedFilters = { exact: true, ...filters };\n return this.getAll().find(\n (mutation) => matchMutation(defaultedFilters, mutation)\n );\n }\n findAll(filters = {}) {\n return this.getAll().filter((mutation) => matchMutation(filters, mutation));\n }\n notify(event) {\n notifyManager.batch(() => {\n this.listeners.forEach((listener) => {\n listener(event);\n });\n });\n }\n resumePausedMutations() {\n const pausedMutations = this.getAll().filter((x) => x.state.isPaused);\n return notifyManager.batch(\n () => Promise.all(\n pausedMutations.map((mutation) => mutation.continue().catch(noop))\n )\n );\n }\n};\nfunction scopeFor(mutation) {\n return mutation.options.scope?.id ?? String(mutation.mutationId);\n}\nexport {\n MutationCache\n};\n//# sourceMappingURL=mutationCache.js.map","// src/infiniteQueryBehavior.ts\nimport { addToEnd, addToStart, ensureQueryFn } from \"./utils.js\";\nfunction infiniteQueryBehavior(pages) {\n return {\n onFetch: (context, query) => {\n const options = context.options;\n const direction = context.fetchOptions?.meta?.fetchMore?.direction;\n const oldPages = context.state.data?.pages || [];\n const oldPageParams = context.state.data?.pageParams || [];\n let result = { pages: [], pageParams: [] };\n let currentPage = 0;\n const fetchFn = async () => {\n let cancelled = false;\n const addSignalProperty = (object) => {\n Object.defineProperty(object, \"signal\", {\n enumerable: true,\n get: () => {\n if (context.signal.aborted) {\n cancelled = true;\n } else {\n context.signal.addEventListener(\"abort\", () => {\n cancelled = true;\n });\n }\n return context.signal;\n }\n });\n };\n const queryFn = ensureQueryFn(context.options, context.fetchOptions);\n const fetchPage = async (data, param, previous) => {\n if (cancelled) {\n return Promise.reject();\n }\n if (param == null && data.pages.length) {\n return Promise.resolve(data);\n }\n const queryFnContext = {\n queryKey: context.queryKey,\n pageParam: param,\n direction: previous ? \"backward\" : \"forward\",\n meta: context.options.meta\n };\n addSignalProperty(queryFnContext);\n const page = await queryFn(\n queryFnContext\n );\n const { maxPages } = context.options;\n const addTo = previous ? addToStart : addToEnd;\n return {\n pages: addTo(data.pages, page, maxPages),\n pageParams: addTo(data.pageParams, param, maxPages)\n };\n };\n if (direction && oldPages.length) {\n const previous = direction === \"backward\";\n const pageParamFn = previous ? getPreviousPageParam : getNextPageParam;\n const oldData = {\n pages: oldPages,\n pageParams: oldPageParams\n };\n const param = pageParamFn(options, oldData);\n result = await fetchPage(oldData, param, previous);\n } else {\n const remainingPages = pages ?? oldPages.length;\n do {\n const param = currentPage === 0 ? oldPageParams[0] ?? options.initialPageParam : getNextPageParam(options, result);\n if (currentPage > 0 && param == null) {\n break;\n }\n result = await fetchPage(result, param);\n currentPage++;\n } while (currentPage < remainingPages);\n }\n return result;\n };\n if (context.options.persister) {\n context.fetchFn = () => {\n return context.options.persister?.(\n fetchFn,\n {\n queryKey: context.queryKey,\n meta: context.options.meta,\n signal: context.signal\n },\n query\n );\n };\n } else {\n context.fetchFn = fetchFn;\n }\n }\n };\n}\nfunction getNextPageParam(options, { pages, pageParams }) {\n const lastIndex = pages.length - 1;\n return pages.length > 0 ? options.getNextPageParam(\n pages[lastIndex],\n pages,\n pageParams[lastIndex],\n pageParams\n ) : void 0;\n}\nfunction getPreviousPageParam(options, { pages, pageParams }) {\n return pages.length > 0 ? options.getPreviousPageParam?.(pages[0], pages, pageParams[0], pageParams) : void 0;\n}\nfunction hasNextPage(options, data) {\n if (!data)\n return false;\n return getNextPageParam(options, data) != null;\n}\nfunction hasPreviousPage(options, data) {\n if (!data || !options.getPreviousPageParam)\n return false;\n return getPreviousPageParam(options, data) != null;\n}\nexport {\n hasNextPage,\n hasPreviousPage,\n infiniteQueryBehavior\n};\n//# sourceMappingURL=infiniteQueryBehavior.js.map","// src/queryClient.ts\nimport {\n functionalUpdate,\n hashKey,\n hashQueryKeyByOptions,\n noop,\n partialMatchKey,\n resolveStaleTime,\n skipToken\n} from \"./utils.js\";\nimport { QueryCache } from \"./queryCache.js\";\nimport { MutationCache } from \"./mutationCache.js\";\nimport { focusManager } from \"./focusManager.js\";\nimport { onlineManager } from \"./onlineManager.js\";\nimport { notifyManager } from \"./notifyManager.js\";\nimport { infiniteQueryBehavior } from \"./infiniteQueryBehavior.js\";\nvar QueryClient = class {\n #queryCache;\n #mutationCache;\n #defaultOptions;\n #queryDefaults;\n #mutationDefaults;\n #mountCount;\n #unsubscribeFocus;\n #unsubscribeOnline;\n constructor(config = {}) {\n this.#queryCache = config.queryCache || new QueryCache();\n this.#mutationCache = config.mutationCache || new MutationCache();\n this.#defaultOptions = config.defaultOptions || {};\n this.#queryDefaults = /* @__PURE__ */ new Map();\n this.#mutationDefaults = /* @__PURE__ */ new Map();\n this.#mountCount = 0;\n }\n mount() {\n this.#mountCount++;\n if (this.#mountCount !== 1)\n return;\n this.#unsubscribeFocus = focusManager.subscribe(async (focused) => {\n if (focused) {\n await this.resumePausedMutations();\n this.#queryCache.onFocus();\n }\n });\n this.#unsubscribeOnline = onlineManager.subscribe(async (online) => {\n if (online) {\n await this.resumePausedMutations();\n this.#queryCache.onOnline();\n }\n });\n }\n unmount() {\n this.#mountCount--;\n if (this.#mountCount !== 0)\n return;\n this.#unsubscribeFocus?.();\n this.#unsubscribeFocus = void 0;\n this.#unsubscribeOnline?.();\n this.#unsubscribeOnline = void 0;\n }\n isFetching(filters) {\n return this.#queryCache.findAll({ ...filters, fetchStatus: \"fetching\" }).length;\n }\n isMutating(filters) {\n return this.#mutationCache.findAll({ ...filters, status: \"pending\" }).length;\n }\n getQueryData(queryKey) {\n const options = this.defaultQueryOptions({ queryKey });\n return this.#queryCache.get(options.queryHash)?.state.data;\n }\n ensureQueryData(options) {\n const cachedData = this.getQueryData(options.queryKey);\n if (cachedData === void 0) {\n return this.fetchQuery(options);\n } else {\n const defaultedOptions = this.defaultQueryOptions(options);\n const query = this.#queryCache.build(this, defaultedOptions);\n if (options.revalidateIfStale && query.isStaleByTime(resolveStaleTime(defaultedOptions.staleTime, query))) {\n void this.prefetchQuery(defaultedOptions);\n }\n return Promise.resolve(cachedData);\n }\n }\n getQueriesData(filters) {\n return this.#queryCache.findAll(filters).map(({ queryKey, state }) => {\n const data = state.data;\n return [queryKey, data];\n });\n }\n setQueryData(queryKey, updater, options) {\n const defaultedOptions = this.defaultQueryOptions({ queryKey });\n const query = this.#queryCache.get(\n defaultedOptions.queryHash\n );\n const prevData = query?.state.data;\n const data = functionalUpdate(updater, prevData);\n if (data === void 0) {\n return void 0;\n }\n return this.#queryCache.build(this, defaultedOptions).setData(data, { ...options, manual: true });\n }\n setQueriesData(filters, updater, options) {\n return notifyManager.batch(\n () => this.#queryCache.findAll(filters).map(({ queryKey }) => [\n queryKey,\n this.setQueryData(queryKey, updater, options)\n ])\n );\n }\n getQueryState(queryKey) {\n const options = this.defaultQueryOptions({ queryKey });\n return this.#queryCache.get(\n options.queryHash\n )?.state;\n }\n removeQueries(filters) {\n const queryCache = this.#queryCache;\n notifyManager.batch(() => {\n queryCache.findAll(filters).forEach((query) => {\n queryCache.remove(query);\n });\n });\n }\n resetQueries(filters, options) {\n const queryCache = this.#queryCache;\n const refetchFilters = {\n type: \"active\",\n ...filters\n };\n return notifyManager.batch(() => {\n queryCache.findAll(filters).forEach((query) => {\n query.reset();\n });\n return this.refetchQueries(refetchFilters, options);\n });\n }\n cancelQueries(filters, cancelOptions = {}) {\n const defaultedCancelOptions = { revert: true, ...cancelOptions };\n const promises = notifyManager.batch(\n () => this.#queryCache.findAll(filters).map((query) => query.cancel(defaultedCancelOptions))\n );\n return Promise.all(promises).then(noop).catch(noop);\n }\n invalidateQueries(filters, options = {}) {\n return notifyManager.batch(() => {\n this.#queryCache.findAll(filters).forEach((query) => {\n query.invalidate();\n });\n if (filters?.refetchType === \"none\") {\n return Promise.resolve();\n }\n const refetchFilters = {\n ...filters,\n type: filters?.refetchType ?? filters?.type ?? \"active\"\n };\n return this.refetchQueries(refetchFilters, options);\n });\n }\n refetchQueries(filters, options = {}) {\n const fetchOptions = {\n ...options,\n cancelRefetch: options.cancelRefetch ?? true\n };\n const promises = notifyManager.batch(\n () => this.#queryCache.findAll(filters).filter((query) => !query.isDisabled()).map((query) => {\n let promise = query.fetch(void 0, fetchOptions);\n if (!fetchOptions.throwOnError) {\n promise = promise.catch(noop);\n }\n return query.state.fetchStatus === \"paused\" ? Promise.resolve() : promise;\n })\n );\n return Promise.all(promises).then(noop);\n }\n fetchQuery(options) {\n const defaultedOptions = this.defaultQueryOptions(options);\n if (defaultedOptions.retry === void 0) {\n defaultedOptions.retry = false;\n }\n const query = this.#queryCache.build(this, defaultedOptions);\n return query.isStaleByTime(\n resolveStaleTime(defaultedOptions.staleTime, query)\n ) ? query.fetch(defaultedOptions) : Promise.resolve(query.state.data);\n }\n prefetchQuery(options) {\n return this.fetchQuery(options).then(noop).catch(noop);\n }\n fetchInfiniteQuery(options) {\n options.behavior = infiniteQueryBehavior(options.pages);\n return this.fetchQuery(options);\n }\n prefetchInfiniteQuery(options) {\n return this.fetchInfiniteQuery(options).then(noop).catch(noop);\n }\n ensureInfiniteQueryData(options) {\n options.behavior = infiniteQueryBehavior(options.pages);\n return this.ensureQueryData(options);\n }\n resumePausedMutations() {\n if (onlineManager.isOnline()) {\n return this.#mutationCache.resumePausedMutations();\n }\n return Promise.resolve();\n }\n getQueryCache() {\n return this.#queryCache;\n }\n getMutationCache() {\n return this.#mutationCache;\n }\n getDefaultOptions() {\n return this.#defaultOptions;\n }\n setDefaultOptions(options) {\n this.#defaultOptions = options;\n }\n setQueryDefaults(queryKey, options) {\n this.#queryDefaults.set(hashKey(queryKey), {\n queryKey,\n defaultOptions: options\n });\n }\n getQueryDefaults(queryKey) {\n const defaults = [...this.#queryDefaults.values()];\n const result = {};\n defaults.forEach((queryDefault) => {\n if (partialMatchKey(queryKey, queryDefault.queryKey)) {\n Object.assign(result, queryDefault.defaultOptions);\n }\n });\n return result;\n }\n setMutationDefaults(mutationKey, options) {\n this.#mutationDefaults.set(hashKey(mutationKey), {\n mutationKey,\n defaultOptions: options\n });\n }\n getMutationDefaults(mutationKey) {\n const defaults = [...this.#mutationDefaults.values()];\n let result = {};\n defaults.forEach((queryDefault) => {\n if (partialMatchKey(mutationKey, queryDefault.mutationKey)) {\n result = { ...result, ...queryDefault.defaultOptions };\n }\n });\n return result;\n }\n defaultQueryOptions(options) {\n if (options._defaulted) {\n return options;\n }\n const defaultedOptions = {\n ...this.#defaultOptions.queries,\n ...this.getQueryDefaults(options.queryKey),\n ...options,\n _defaulted: true\n };\n if (!defaultedOptions.queryHash) {\n defaultedOptions.queryHash = hashQueryKeyByOptions(\n defaultedOptions.queryKey,\n defaultedOptions\n );\n }\n if (defaultedOptions.refetchOnReconnect === void 0) {\n defaultedOptions.refetchOnReconnect = defaultedOptions.networkMode !== \"always\";\n }\n if (defaultedOptions.throwOnError === void 0) {\n defaultedOptions.throwOnError = !!defaultedOptions.suspense;\n }\n if (!defaultedOptions.networkMode && defaultedOptions.persister) {\n defaultedOptions.networkMode = \"offlineFirst\";\n }\n if (defaultedOptions.queryFn === skipToken) {\n defaultedOptions.enabled = false;\n }\n return defaultedOptions;\n }\n defaultMutationOptions(options) {\n if (options?._defaulted) {\n return options;\n }\n return {\n ...this.#defaultOptions.mutations,\n ...options?.mutationKey && this.getMutationDefaults(options.mutationKey),\n ...options,\n _defaulted: true\n };\n }\n clear() {\n this.#queryCache.clear();\n this.#mutationCache.clear();\n }\n};\nexport {\n QueryClient\n};\n//# sourceMappingURL=queryClient.js.map","// src/hydration.ts\nfunction defaultTransformerFn(data) {\n return data;\n}\nfunction dehydrateMutation(mutation) {\n return {\n mutationKey: mutation.options.mutationKey,\n state: mutation.state,\n ...mutation.options.scope && { scope: mutation.options.scope },\n ...mutation.meta && { meta: mutation.meta }\n };\n}\nfunction dehydrateQuery(query, serializeData) {\n return {\n state: {\n ...query.state,\n ...query.state.data !== void 0 && {\n data: serializeData(query.state.data)\n }\n },\n queryKey: query.queryKey,\n queryHash: query.queryHash,\n ...query.state.status === \"pending\" && {\n promise: query.promise?.then(serializeData).catch((error) => {\n if (process.env.NODE_ENV !== \"production\") {\n console.error(\n `A query that was dehydrated as pending ended up rejecting. [${query.queryHash}]: ${error}; The error will be redacted in production builds`\n );\n }\n return Promise.reject(new Error(\"redacted\"));\n })\n },\n ...query.meta && { meta: query.meta }\n };\n}\nfunction defaultShouldDehydrateMutation(mutation) {\n return mutation.state.isPaused;\n}\nfunction defaultShouldDehydrateQuery(query) {\n return query.state.status === \"success\";\n}\nfunction dehydrate(client, options = {}) {\n const filterMutation = options.shouldDehydrateMutation ?? client.getDefaultOptions().dehydrate?.shouldDehydrateMutation ?? defaultShouldDehydrateMutation;\n const mutations = client.getMutationCache().getAll().flatMap(\n (mutation) => filterMutation(mutation) ? [dehydrateMutation(mutation)] : []\n );\n const filterQuery = options.shouldDehydrateQuery ?? client.getDefaultOptions().dehydrate?.shouldDehydrateQuery ?? defaultShouldDehydrateQuery;\n const serializeData = options.serializeData ?? client.getDefaultOptions().dehydrate?.serializeData ?? defaultTransformerFn;\n const queries = client.getQueryCache().getAll().flatMap(\n (query) => filterQuery(query) ? [dehydrateQuery(query, serializeData)] : []\n );\n return { mutations, queries };\n}\nfunction hydrate(client, dehydratedState, options) {\n if (typeof dehydratedState !== \"object\" || dehydratedState === null) {\n return;\n }\n const mutationCache = client.getMutationCache();\n const queryCache = client.getQueryCache();\n const deserializeData = options?.defaultOptions?.deserializeData ?? client.getDefaultOptions().hydrate?.deserializeData ?? defaultTransformerFn;\n const mutations = dehydratedState.mutations || [];\n const queries = dehydratedState.queries || [];\n mutations.forEach(({ state, ...mutationOptions }) => {\n mutationCache.build(\n client,\n {\n ...client.getDefaultOptions().hydrate?.mutations,\n ...options?.defaultOptions?.mutations,\n ...mutationOptions\n },\n state\n );\n });\n queries.forEach(({ queryKey, state, queryHash, meta, promise }) => {\n let query = queryCache.get(queryHash);\n const data = state.data === void 0 ? state.data : deserializeData(state.data);\n if (query) {\n if (query.state.dataUpdatedAt < state.dataUpdatedAt) {\n const { fetchStatus: _ignored, ...serializedState } = state;\n query.setState({\n ...serializedState,\n data\n });\n }\n } else {\n query = queryCache.build(\n client,\n {\n ...client.getDefaultOptions().hydrate?.queries,\n ...options?.defaultOptions?.queries,\n queryKey,\n queryHash,\n meta\n },\n // Reset fetch status to idle to avoid\n // query being stuck in fetching state upon hydration\n {\n ...state,\n data,\n fetchStatus: \"idle\"\n }\n );\n }\n if (promise) {\n const initialPromise = Promise.resolve(promise).then(deserializeData);\n void query.fetch(void 0, { initialPromise });\n }\n });\n}\nexport {\n defaultShouldDehydrateMutation,\n defaultShouldDehydrateQuery,\n dehydrate,\n hydrate\n};\n//# sourceMappingURL=hydration.js.map","\"use client\";\n\n// src/HydrationBoundary.tsx\nimport * as React from \"react\";\nimport { hydrate } from \"@tanstack/query-core\";\nimport { useQueryClient } from \"./QueryClientProvider.js\";\nvar HydrationBoundary = ({\n children,\n options = {},\n state,\n queryClient\n}) => {\n const client = useQueryClient(queryClient);\n const [hydrationQueue, setHydrationQueue] = React.useState();\n const optionsRef = React.useRef(options);\n optionsRef.current = options;\n React.useMemo(() => {\n if (state) {\n if (typeof state !== \"object\") {\n return;\n }\n const queryCache = client.getQueryCache();\n const queries = state.queries || [];\n const newQueries = [];\n const existingQueries = [];\n for (const dehydratedQuery of queries) {\n const existingQuery = queryCache.get(dehydratedQuery.queryHash);\n if (!existingQuery) {\n newQueries.push(dehydratedQuery);\n } else {\n const hydrationIsNewer = dehydratedQuery.state.dataUpdatedAt > existingQuery.state.dataUpdatedAt;\n const queryAlreadyQueued = hydrationQueue?.find(\n (query) => query.queryHash === dehydratedQuery.queryHash\n );\n if (hydrationIsNewer && (!queryAlreadyQueued || dehydratedQuery.state.dataUpdatedAt > queryAlreadyQueued.state.dataUpdatedAt)) {\n existingQueries.push(dehydratedQuery);\n }\n }\n }\n if (newQueries.length > 0) {\n hydrate(client, { queries: newQueries }, optionsRef.current);\n }\n if (existingQueries.length > 0) {\n setHydrationQueue(\n (prev) => prev ? [...prev, ...existingQueries] : existingQueries\n );\n }\n }\n }, [client, hydrationQueue, state]);\n React.useEffect(() => {\n if (hydrationQueue) {\n hydrate(client, { queries: hydrationQueue }, optionsRef.current);\n setHydrationQueue(void 0);\n }\n }, [client, hydrationQueue]);\n return children;\n};\nexport {\n HydrationBoundary\n};\n//# sourceMappingURL=HydrationBoundary.js.map","import { ErrorAlert } from \"./ErrorAlert.js\";\n\nexport function ServerError({ error }: { error: unknown }) {\n return <ErrorAlert error={error} />;\n}\n","/**\n * react-router v7.0.2\n *\n * Copyright (c) Remix Software Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE.md file in the root directory of this source tree.\n *\n * @license MIT\n */\nimport {\n FrameworkContext,\n RemixErrorBoundary,\n RouterProvider,\n createBrowserHistory,\n createClientRoutes,\n createClientRoutesWithHMRRevalidationOptOut,\n createRouter,\n decodeViaTurboStream,\n deserializeErrors,\n getPatchRoutesOnNavigationFunction,\n getSingleFetchDataStrategy,\n invariant,\n mapRouteProperties,\n matchRoutes,\n shouldHydrateRouteLoader,\n useFogOFWarDiscovery\n} from \"./chunk-D52XG6IA.mjs\";\n\n// lib/dom-export/dom-router-provider.tsx\nimport * as React from \"react\";\nimport * as ReactDOM from \"react-dom\";\nfunction RouterProvider2(props) {\n return /* @__PURE__ */ React.createElement(RouterProvider, { flushSync: ReactDOM.flushSync, ...props });\n}\n\n// lib/dom-export/hydrated-router.tsx\nimport * as React2 from \"react\";\nvar ssrInfo = null;\nvar router = null;\nfunction initSsrInfo() {\n if (!ssrInfo && window.__reactRouterContext && window.__reactRouterManifest && window.__reactRouterRouteModules) {\n ssrInfo = {\n context: window.__reactRouterContext,\n manifest: window.__reactRouterManifest,\n routeModules: window.__reactRouterRouteModules,\n stateDecodingPromise: void 0,\n router: void 0,\n routerInitialized: false\n };\n }\n}\nfunction createHydratedRouter() {\n initSsrInfo();\n if (!ssrInfo) {\n throw new Error(\n \"You must be using the SSR features of React Router in order to skip passing a `router` prop to `<RouterProvider>`\"\n );\n }\n let localSsrInfo = ssrInfo;\n if (!ssrInfo.stateDecodingPromise) {\n let stream = ssrInfo.context.stream;\n invariant(stream, \"No stream found for single fetch decoding\");\n ssrInfo.context.stream = void 0;\n ssrInfo.stateDecodingPromise = decodeViaTurboStream(stream, window).then((value) => {\n ssrInfo.context.state = value.value;\n localSsrInfo.stateDecodingPromise.value = true;\n }).catch((e) => {\n localSsrInfo.stateDecodingPromise.error = e;\n });\n }\n if (ssrInfo.stateDecodingPromise.error) {\n throw ssrInfo.stateDecodingPromise.error;\n }\n if (!ssrInfo.stateDecodingPromise.value) {\n throw ssrInfo.stateDecodingPromise;\n }\n let routes = createClientRoutes(\n ssrInfo.manifest.routes,\n ssrInfo.routeModules,\n ssrInfo.context.state,\n ssrInfo.context.isSpaMode\n );\n let hydrationData = void 0;\n if (!ssrInfo.context.isSpaMode) {\n hydrationData = {\n ...ssrInfo.context.state,\n loaderData: { ...ssrInfo.context.state.loaderData }\n };\n let initialMatches = matchRoutes(\n routes,\n window.location,\n window.__reactRouterContext?.basename\n );\n if (initialMatches) {\n for (let match of initialMatches) {\n let routeId = match.route.id;\n let route = ssrInfo.routeModules[routeId];\n let manifestRoute = ssrInfo.manifest.routes[routeId];\n if (route && manifestRoute && shouldHydrateRouteLoader(\n manifestRoute,\n route,\n ssrInfo.context.isSpaMode\n ) && (route.HydrateFallback || !manifestRoute.hasLoader)) {\n delete hydrationData.loaderData[routeId];\n } else if (manifestRoute && !manifestRoute.hasLoader) {\n hydrationData.loaderData[routeId] = null;\n }\n }\n }\n if (hydrationData && hydrationData.errors) {\n hydrationData.errors = deserializeErrors(hydrationData.errors);\n }\n }\n let router2 = createRouter({\n routes,\n history: createBrowserHistory(),\n basename: ssrInfo.context.basename,\n hydrationData,\n mapRouteProperties,\n dataStrategy: getSingleFetchDataStrategy(\n ssrInfo.manifest,\n ssrInfo.routeModules,\n () => router2\n ),\n patchRoutesOnNavigation: getPatchRoutesOnNavigationFunction(\n ssrInfo.manifest,\n ssrInfo.routeModules,\n ssrInfo.context.isSpaMode,\n ssrInfo.context.basename\n )\n });\n ssrInfo.router = router2;\n if (router2.state.initialized) {\n ssrInfo.routerInitialized = true;\n router2.initialize();\n }\n router2.createRoutesForHMR = /* spacer so ts-ignore does not affect the right hand of the assignment */\n createClientRoutesWithHMRRevalidationOptOut;\n window.__reactRouterDataRouter = router2;\n return router2;\n}\nfunction HydratedRouter() {\n if (!router) {\n router = createHydratedRouter();\n }\n let [criticalCss, setCriticalCss] = React2.useState(\n process.env.NODE_ENV === \"development\" ? ssrInfo?.context.criticalCss : void 0\n );\n if (process.env.NODE_ENV === \"development\") {\n if (ssrInfo) {\n window.__reactRouterClearCriticalCss = () => setCriticalCss(void 0);\n }\n }\n let [location, setLocation] = React2.useState(router.state.location);\n React2.useLayoutEffect(() => {\n if (ssrInfo && ssrInfo.router && !ssrInfo.routerInitialized) {\n ssrInfo.routerInitialized = true;\n ssrInfo.router.initialize();\n }\n }, []);\n React2.useLayoutEffect(() => {\n if (ssrInfo && ssrInfo.router) {\n return ssrInfo.router.subscribe((newState) => {\n if (newState.location !== location) {\n setLocation(newState.location);\n }\n });\n }\n }, [location]);\n invariant(ssrInfo, \"ssrInfo unavailable for HydratedRouter\");\n useFogOFWarDiscovery(\n router,\n ssrInfo.manifest,\n ssrInfo.routeModules,\n ssrInfo.context.isSpaMode\n );\n return (\n // This fragment is important to ensure we match the <ServerRouter> JSX\n // structure so that useId values hydrate correctly\n /* @__PURE__ */ React2.createElement(React2.Fragment, null, /* @__PURE__ */ React2.createElement(\n FrameworkContext.Provider,\n {\n value: {\n manifest: ssrInfo.manifest,\n routeModules: ssrInfo.routeModules,\n future: ssrInfo.context.future,\n criticalCss,\n isSpaMode: ssrInfo.context.isSpaMode\n }\n },\n /* @__PURE__ */ React2.createElement(RemixErrorBoundary, { location }, /* @__PURE__ */ React2.createElement(RouterProvider2, { router }))\n ), /* @__PURE__ */ React2.createElement(React2.Fragment, null))\n );\n}\nexport {\n HydratedRouter,\n RouterProvider2 as RouterProvider\n};\n","import {\n HydrationBoundary,\n QueryClient,\n QueryClientProvider,\n} from \"@tanstack/react-query\";\nimport { type HelmetData, HelmetProvider } from \"@zudoku/react-helmet-async\";\nimport { StrictMode } from \"react\";\nimport {\n type createBrowserRouter,\n type createStaticRouter,\n type StaticHandlerContext,\n StaticRouterProvider,\n} from \"react-router\";\nimport { RouterProvider } from \"react-router/dom\";\nimport { StaggeredRenderContext } from \"../plugins/openapi/StaggeredRender.js\";\n\nconst queryClient = new QueryClient({\n defaultOptions: {\n queries: {\n staleTime: 1000 * 60 * 5,\n },\n },\n});\n\nconst Bootstrap = ({\n router,\n hydrate = false,\n}: {\n hydrate?: boolean;\n router: ReturnType<typeof createBrowserRouter>;\n}) => (\n <StrictMode>\n <QueryClientProvider client={queryClient}>\n <HydrationBoundary state={hydrate ? (window as any).DATA : undefined}>\n <HelmetProvider>\n <StaggeredRenderContext.Provider value={{ stagger: !hydrate }}>\n <RouterProvider router={router} />\n </StaggeredRenderContext.Provider>\n </HelmetProvider>\n </HydrationBoundary>\n </QueryClientProvider>\n </StrictMode>\n);\n\nconst BootstrapStatic = ({\n router,\n context,\n queryClient,\n helmetContext,\n}: {\n helmetContext: HelmetData[\"context\"];\n context: StaticHandlerContext;\n queryClient: QueryClient;\n router: ReturnType<typeof createStaticRouter>;\n}) => (\n <StrictMode>\n <QueryClientProvider client={queryClient}>\n <HelmetProvider context={helmetContext}>\n <StaticRouterProvider router={router} context={context} />\n </HelmetProvider>\n </QueryClientProvider>\n </StrictMode>\n);\n\nexport { Bootstrap, BootstrapStatic };\n","(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('react')) :\n typeof define === 'function' && define.amd ? define(['exports', 'react'], factory) :\n (global = global || self, factory(global.spinDelay = {}, global.react));\n}(this, (function (exports, react) {\n const defaultOptions = {\n delay: 500,\n minDuration: 200,\n ssr: true\n };\n\n function useIsSSR() {\n const [isSSR, setIsSSR] = react.useState(true);\n react.useEffect(() => {\n setIsSSR(false);\n }, []);\n return isSSR;\n }\n\n function useSpinDelay(loading, options) {\n options = Object.assign({}, defaultOptions, options);\n const isSSR = useIsSSR() && options.ssr;\n const initialState = isSSR && loading ? 'DISPLAY' : 'IDLE';\n const [state, setState] = react.useState(initialState);\n const timeout = react.useRef(null);\n react.useEffect(() => {\n if (loading && (state === 'IDLE' || isSSR)) {\n clearTimeout(timeout.current);\n const delay = isSSR ? 0 : options.delay;\n timeout.current = setTimeout(() => {\n if (!loading) {\n return setState('IDLE');\n }\n\n timeout.current = setTimeout(() => {\n setState('EXPIRE');\n }, options.minDuration);\n setState('DISPLAY');\n }, delay);\n\n if (!isSSR) {\n setState('DELAY');\n }\n }\n\n if (!loading && state !== 'DISPLAY') {\n clearTimeout(timeout.current);\n setState('IDLE');\n }\n }, [loading, state, options.delay, options.minDuration, isSSR]);\n react.useEffect(() => {\n return () => clearTimeout(timeout.current);\n }, []);\n return state === 'DISPLAY' || state === 'EXPIRE';\n }\n\n exports.defaultOptions = defaultOptions;\n exports.useSpinDelay = useSpinDelay;\n\n})));\n//# sourceMappingURL=index.js.map\n","import { cn } from \"../../util/cn.js\";\n\nexport const ColorMap = {\n green: \"bg-green-400 dark:bg-green-800\",\n blue: \"bg-sky-400 dark:bg-sky-800\",\n yellow: \"bg-yellow-400 dark:bg-yellow-800\",\n red: \"bg-red-400 dark:bg-red-800\",\n purple: \"bg-purple-400 dark:bg-purple-600\",\n indigo: \"bg-indigo-400 dark:bg-indigo-600\",\n gray: \"bg-gray-400 dark:bg-gray-600\",\n};\n\nexport const SidebarBadge = ({\n color,\n label,\n className,\n}: {\n color: keyof typeof ColorMap;\n label: string;\n className?: string;\n}) => {\n return (\n <span\n className={cn(\n \"mt-0.5 flex items-center duration-200 transition-opacity text-center uppercase font-mono text-[0.65rem] font-bold rounded text-background dark:text-zinc-50 h-4 px-1\",\n ColorMap[color],\n className,\n )}\n >\n {label}\n </span>\n );\n};\n","import * as Collapsible from \"@radix-ui/react-collapsible\";\nimport { ChevronRightIcon } from \"lucide-react\";\nimport { useEffect, useState } from \"react\";\nimport { NavLink, useMatch } from \"react-router\";\nimport type { SidebarItemCategory } from \"../../../config/validators/SidebarSchema.js\";\nimport { cn } from \"../../util/cn.js\";\nimport { joinPath } from \"../../util/joinPath.js\";\nimport { navigationListItem, SidebarItem } from \"./SidebarItem.js\";\nimport { useIsCategoryOpen } from \"./utils.js\";\n\nexport const SidebarCategory = ({\n category,\n onRequestClose,\n}: {\n category: SidebarItemCategory;\n onRequestClose?: () => void;\n}) => {\n const isCategoryOpen = useIsCategoryOpen(category);\n const [hasInteracted, setHasInteracted] = useState(false);\n\n const isCollapsible = category.collapsible ?? true;\n const isCollapsed = category.collapsed ?? true;\n const isDefaultOpen = Boolean(\n !isCollapsible || !isCollapsed || isCategoryOpen,\n );\n const [open, setOpen] = useState(isDefaultOpen);\n const isActive = useMatch(category.link?.id ?? \"\");\n\n useEffect(() => {\n // this is triggered when an item from the sidebar is clicked\n // and the sidebar, enclosing this item, is not opened\n if (isCategoryOpen) {\n setOpen(true);\n }\n }, [isCategoryOpen]);\n\n const ToggleButton = isCollapsible && (\n <button\n type=\"button\"\n onClick={(e) => {\n e.preventDefault();\n setOpen((prev) => !prev);\n setHasInteracted(true);\n }}\n >\n <ChevronRightIcon\n size={16}\n className={cn(\n hasInteracted && \"transition\",\n \"shrink-0 group-data-[state=open]:rotate-90\",\n )}\n />\n </button>\n );\n\n return (\n <Collapsible.Root\n className=\"flex flex-col\"\n defaultOpen={isDefaultOpen}\n open={open}\n onOpenChange={() => setOpen(true)}\n >\n <Collapsible.Trigger className=\"group\" asChild disabled={!isCollapsible}>\n <div\n onClick={() => setHasInteracted(true)}\n className={navigationListItem({\n isActive: false,\n className: [\n \"text-start\",\n isCollapsible\n ? \"cursor-pointer\"\n : \"cursor-default hover:bg-transparent\",\n ],\n })}\n >\n {category.icon && (\n <category.icon\n size={16}\n className={cn(\"align-[-0.125em] \", isActive && \"text-primary\")}\n />\n )}\n {category.link?.type === \"doc\" ? (\n <NavLink\n to={joinPath(category.link.id)}\n className=\"flex-1\"\n onClick={() => {\n // if it is the current path and closed then open it because there's no path change to trigger the open\n if (isActive && !open) {\n setOpen(true);\n }\n }}\n >\n <div\n className={cn(\n \"flex items-center gap-2 justify-between w-full\",\n isActive ? \"text-primary\" : \"text-foreground/80\",\n )}\n >\n <div className=\"truncate\">{category.label}</div>\n {ToggleButton}\n </div>\n </NavLink>\n ) : (\n <div className=\"flex items-center justify-between w-full\">\n <div className=\"flex gap-2 truncate w-full\">{category.label}</div>\n {ToggleButton}\n </div>\n )}\n </div>\n </Collapsible.Trigger>\n <Collapsible.Content\n className={cn(\n // CollapsibleContent class is used to animate and it should only be applied when the user has triggered the toggle\n hasInteracted && \"CollapsibleContent\",\n \"ms-6 my-1\",\n )}\n >\n <ul\n className={\n \"relative after:absolute after:-left-[--padding-nav-item] after:translate-x-[1.5px] after:top-0 after:bottom-0 after:w-px after:bg-border\"\n }\n >\n {category.items.map((item) => (\n <SidebarItem\n key={\n (\"id\" in item ? item.id : \"\") +\n (\"href\" in item ? item.href : \"\") +\n item.label\n }\n onRequestClose={onRequestClose}\n item={item}\n />\n ))}\n </ul>\n </Collapsible.Content>\n </Collapsible.Root>\n );\n};\n","import { cva } from \"class-variance-authority\";\nimport { ExternalLinkIcon } from \"lucide-react\";\nimport { NavLink, useSearchParams } from \"react-router\";\n\nimport type { SidebarItem as SidebarItemType } from \"../../../config/validators/SidebarSchema.js\";\nimport { joinPath } from \"../../util/joinPath.js\";\nimport { AnchorLink } from \"../AnchorLink.js\";\nimport { useViewportAnchor } from \"../context/ViewportAnchorContext.js\";\nimport { SidebarBadge } from \"./SidebarBadge.js\";\nimport { SidebarCategory } from \"./SidebarCategory.js\";\n\nexport const navigationListItem = cva(\n \"flex items-center gap-2 px-[--padding-nav-item] py-1.5 rounded-lg hover:bg-accent\",\n {\n variants: {\n isActive: {\n true: \"text-primary font-medium\",\n false: \"text-foreground/80\",\n },\n isMuted: {\n true: \"text-foreground/30\",\n false: \"\",\n },\n },\n defaultVariants: {\n isActive: false,\n },\n },\n);\n\nexport const DATA_ANCHOR_ATTR = \"data-anchor\";\n\nexport const SidebarItem = ({\n item,\n onRequestClose,\n}: {\n item: SidebarItemType;\n onRequestClose?: () => void;\n}) => {\n const { activeAnchor } = useViewportAnchor();\n const [searchParams] = useSearchParams();\n\n switch (item.type) {\n case \"category\":\n return (\n <SidebarCategory category={item} onRequestClose={onRequestClose} />\n );\n case \"doc\":\n return (\n <NavLink\n className={({ isActive }) => navigationListItem({ isActive })}\n to={joinPath(item.id)}\n onClick={onRequestClose}\n >\n {item.icon && <item.icon size={16} className=\"align-[-0.125em]\" />}\n {item.badge ? (\n <>\n <span className=\"truncate flex-1\" title={item.label}>\n {item.label}\n </span>\n <SidebarBadge {...item.badge} />\n </>\n ) : (\n item.label\n )}\n </NavLink>\n );\n case \"link\":\n return item.href.startsWith(\"#\") ? (\n <AnchorLink\n to={{ hash: item.href, search: searchParams.toString() }}\n {...{ [DATA_ANCHOR_ATTR]: item.href.slice(1) }}\n className={navigationListItem({\n isActive: item.href.slice(1) === activeAnchor,\n className: item.badge?.placement !== \"start\" && \"justify-between\",\n })}\n onClick={onRequestClose}\n >\n {item.badge ? (\n <>\n <span className=\"truncate\" title={item.label}>\n {item.label}\n </span>\n <SidebarBadge {...item.badge} />\n </>\n ) : (\n <span className=\"break-all\">{item.label}</span>\n )}\n </AnchorLink>\n ) : !item.href.startsWith(\"http\") ? (\n <NavLink\n className={navigationListItem({\n className: item.badge?.placement !== \"start\" && \"justify-between\",\n })}\n to={item.href}\n >\n {item.badge ? (\n <>\n <span className=\"truncate\" title={item.label}>\n {item.label}\n </span>\n <SidebarBadge {...item.badge} />\n </>\n ) : (\n <span className=\"break-all\">{item.label}</span>\n )}\n </NavLink>\n ) : (\n <a\n className={navigationListItem()}\n href={item.href}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n onClick={onRequestClose}\n >\n <span className=\"whitespace-normal\">{item.label}</span>\n {/* This prevents that the icon would be positioned in its own line if the text fills a line entirely */}\n <span className=\"whitespace-nowrap\">\n <ExternalLinkIcon className=\"inline -translate-y-0.5\" size={12} />\n </span>\n </a>\n );\n }\n};\n","import { useEffect } from \"react\";\nimport { useLocation } from \"react-router\";\nimport { useViewportAnchor } from \"../components/context/ViewportAnchorContext.js\";\nimport { DATA_ANCHOR_ATTR } from \"../components/navigation/SidebarItem.js\";\n\nconst scrollIntoViewIfNeeded = (\n element: Element | null,\n options: ScrollIntoViewOptions = { block: \"center\" },\n) => {\n if (!element) return;\n\n const rect = element.getBoundingClientRect();\n const isInView =\n rect.top >= 0 &&\n rect.left >= 0 &&\n rect.bottom <=\n (window.innerHeight || document.documentElement.clientHeight) &&\n rect.right <= (window.innerWidth || document.documentElement.clientWidth);\n\n if (isInView) return;\n\n element.scrollIntoView(options);\n};\n\nexport const useScrollToAnchor = () => {\n const location = useLocation();\n const { setActiveAnchor } = useViewportAnchor();\n\n useEffect(() => {\n if (!location.hash) return;\n\n const hash = decodeURIComponent(location.hash.split(\"/\")[0]!.slice(1));\n\n const scrollToElement = () => {\n const element = document.getElementById(hash);\n const link = document.querySelector(`[${DATA_ANCHOR_ATTR}=\"${hash}\"]`);\n\n if (element) {\n element.scrollIntoView();\n scrollIntoViewIfNeeded(link);\n requestIdleCallback(() => setActiveAnchor(hash));\n return true;\n }\n\n return false;\n };\n\n if (!scrollToElement()) {\n const observer = new MutationObserver((_, obs) => {\n if (!scrollToElement()) return;\n obs.disconnect();\n });\n\n observer.observe(document.body, { childList: true, subtree: true });\n\n return () => observer.disconnect();\n }\n }, [location.hash, setActiveAnchor]);\n};\n","import { useEffect, useRef } from \"react\";\nimport { useLocation } from \"react-router\";\n\nexport const useScrollToTop = () => {\n const location = useLocation();\n const previousPath = useRef(location.pathname);\n\n useEffect(() => {\n if (previousPath.current === location.pathname) return;\n window.scrollTo(0, 0);\n previousPath.current = location.pathname;\n }, [location.pathname]);\n};\n","import { cn } from \"../util/cn.js\";\n\nfunction Skeleton({\n className,\n ...props\n}: React.HTMLAttributes<HTMLDivElement>) {\n return (\n <div\n className={cn(\"animate-pulse rounded-md bg-muted\", className)}\n {...props}\n />\n );\n}\n\nexport { Skeleton };\n","import type { LucideIcon } from \"lucide-react\";\nimport { type ReactElement } from \"react\";\nimport { type RouteObject } from \"react-router\";\nimport type { Sidebar } from \"../../config/validators/SidebarSchema.js\";\nimport { MdxComponentsType } from \"../util/MdxComponents.js\";\nimport { ZudokuContext, type ApiIdentity } from \"./ZudokuContext.js\";\n\nexport type ZudokuPlugin =\n | CommonPlugin\n | ProfileMenuPlugin\n | NavigationPlugin\n | ApiIdentityPlugin\n | SearchProviderPlugin;\n\nexport type { RouteObject };\n\nexport interface NavigationPlugin {\n getRoutes: () => RouteObject[];\n getSidebar?: (path: string) => Promise<Sidebar>;\n}\n\nexport interface ApiIdentityPlugin {\n getIdentities: (context: ZudokuContext) => Promise<ApiIdentity[]>;\n}\n\nexport interface SearchProviderPlugin {\n renderSearch: (o: {\n isOpen: boolean;\n onClose: () => void;\n }) => React.JSX.Element | null;\n}\n\nexport interface ProfileMenuPlugin {\n getProfileMenuItems: (context: ZudokuContext) => ProfileNavigationItem[];\n}\n\nexport type ProfileNavigationItem = {\n label: string;\n path?: string;\n weight?: number;\n category?: \"top\" | \"middle\" | \"bottom\";\n children?: ProfileNavigationItem[];\n icon?: LucideIcon;\n};\n\nexport interface CommonPlugin {\n initialize?: (\n context: ZudokuContext,\n ) => Promise<void | boolean> | void | boolean;\n getHead?: () => ReactElement | undefined;\n getMdxComponents?: () => MdxComponentsType;\n}\n\nexport const isProfileMenuPlugin = (\n obj: ZudokuPlugin,\n): obj is ProfileMenuPlugin =>\n \"getProfileMenuItems\" in obj && typeof obj.getProfileMenuItems === \"function\";\n\nexport const isNavigationPlugin = (\n obj: ZudokuPlugin,\n): obj is NavigationPlugin =>\n \"getRoutes\" in obj && typeof obj.getRoutes === \"function\";\n\nexport const isSearchPlugin = (\n obj: ZudokuPlugin,\n): obj is SearchProviderPlugin =>\n \"renderSearch\" in obj && typeof obj.renderSearch === \"function\";\n\nexport const needsInitialization = (obj: ZudokuPlugin): obj is CommonPlugin =>\n \"initialize\" in obj && typeof obj.initialize === \"function\";\n\nexport const hasHead = (obj: ZudokuPlugin): obj is CommonPlugin =>\n \"getHead\" in obj && typeof obj.getHead === \"function\";\n\nexport const isMdxProviderPlugin = (obj: ZudokuPlugin): obj is CommonPlugin =>\n \"getMdxComponents\" in obj && typeof obj.getMdxComponents === \"function\";\n\nexport const isApiIdentityPlugin = (\n obj: ZudokuPlugin,\n): obj is ApiIdentityPlugin =>\n \"getIdentities\" in obj && typeof obj.getIdentities === \"function\";\n","import { CircleXIcon } from \"lucide-react\";\nimport { useState } from \"react\";\nimport { cn } from \"../util/cn.js\";\nimport { useZudoku } from \"./context/ZudokuContext.js\";\n\nconst COLOR_MAP = {\n info: \"bg-blue-500\",\n note: \"bg-gray-500\",\n tip: \"bg-green-600\",\n caution: \"bg-orange-500\",\n danger: \"bg-rose-500\",\n} as const;\n\nexport const Banner = () => {\n const { page } = useZudoku();\n const [isBannerOpen, setIsBannerOpen] = useState(true);\n\n if (!page?.banner || !isBannerOpen) {\n return <style>{`:root { --banner-height: 0px; }`}</style>;\n }\n\n const mappedColor =\n page.banner.color && page.banner.color in COLOR_MAP\n ? COLOR_MAP[page.banner.color as keyof typeof COLOR_MAP]\n : !page.banner.color\n ? \"bg-primary\"\n : undefined;\n\n const style = !mappedColor ? { backgroundColor: page.banner.color } : {};\n\n return (\n <div\n className={cn(\n \"relative text-primary-foreground text-sm font-medium px-4 py-2 flex gap-2 items-center\",\n mappedColor,\n )}\n style={style}\n >\n <div className=\"w-full\">{page.banner.message}</div>\n {page.banner.dismissible && (\n <button\n type=\"button\"\n className=\"md:absolute md:right-4 -m-1.5 p-1.5 hover:bg-accent-foreground/10 rounded-md\"\n onClick={() => setIsBannerOpen(false)}\n >\n <CircleXIcon size={16} />\n </button>\n )}\n </div>\n );\n};\n","import { SearchIcon } from \"lucide-react\";\nimport { Suspense, useCallback, useEffect, useState } from \"react\";\nimport { isSearchPlugin } from \"../core/plugins.js\";\nimport { useZudoku } from \"./context/ZudokuContext.js\";\n\nexport const Search = ({ className }: { className?: string }) => {\n const ctx = useZudoku();\n const [isOpen, setIsOpen] = useState(false);\n\n const onClose = useCallback(() => setIsOpen(false), []);\n\n useEffect(() => {\n if (isOpen) {\n return;\n }\n\n function onKeyDown(event: KeyboardEvent) {\n if (event.key === \"k\" && (event.metaKey || event.ctrlKey)) {\n event.preventDefault();\n setIsOpen(true);\n }\n }\n\n window.addEventListener(\"keydown\", onKeyDown);\n\n return () => {\n window.removeEventListener(\"keydown\", onKeyDown);\n };\n }, [isOpen, setIsOpen]);\n\n const searchPlugin = ctx.plugins.find(isSearchPlugin);\n\n if (!searchPlugin) {\n return null;\n }\n\n return (\n <div className={className}>\n <button\n type=\"button\"\n onClick={() => setIsOpen(true)}\n className=\"flex items-center border border-input hover:bg-accent hover:text-accent-foreground p-4 relative h-8 justify-start rounded-lg bg-background text-sm text-muted-foreground shadow-none w-full sm:w-72\"\n >\n <div className=\"flex items-center gap-2 flex-grow\">\n <SearchIcon size={14} />\n Search\n </div>\n <kbd className=\"absolute right-[0.3rem] top-[0.3rem] hidden h-5 select-none items-center gap-1 rounded border bg-muted px-1.5 font-mono text-[11px] font-medium opacity-100 sm:flex\">\n ⌘K\n </kbd>\n </button>\n <Suspense fallback={null}>\n {searchPlugin.renderSearch({\n isOpen,\n onClose,\n })}\n </Suspense>\n </div>\n );\n};\n","import { MoonStarIcon, SunIcon } from \"lucide-react\";\nimport { useTheme } from \"next-themes\";\nimport { Button } from \"zudoku/ui/Button.js\";\nimport { ClientOnly } from \"./ClientOnly.js\";\n\nexport const ThemeSwitch = () => {\n const { resolvedTheme, setTheme } = useTheme();\n const ThemeIcon = resolvedTheme === \"dark\" ? MoonStarIcon : SunIcon;\n\n return (\n <ClientOnly>\n <Button\n variant=\"ghost\"\n aria-label={\n resolvedTheme === \"dark\"\n ? \"Switch to light mode\"\n : \"Switch to dark mode\"\n }\n className=\"p-2.5 -m-2.5 rounded-full\"\n onClick={() => setTheme(resolvedTheme === \"dark\" ? \"light\" : \"dark\")}\n >\n <ThemeIcon size={18} />\n </Button>\n </ClientOnly>\n );\n};\n","import { cx } from \"class-variance-authority\";\nimport { Suspense } from \"react\";\nimport { NavLink, useNavigation } from \"react-router\";\nimport { TopNavigationItem } from \"../../config/validators/common.js\";\nimport { useAuth } from \"../authentication/hook.js\";\nimport { ZudokuError } from \"../util/invariant.js\";\nimport { joinPath } from \"../util/joinPath.js\";\nimport { useCurrentNavigation, useZudoku } from \"./context/ZudokuContext.js\";\nimport { traverseSidebar } from \"./navigation/utils.js\";\n\nexport const isHiddenItem =\n (isAuthenticated?: boolean) =>\n (item: { display?: \"auth\" | \"anon\" | \"always\" }) => {\n return (\n (item.display === \"auth\" && isAuthenticated) ||\n (item.display === \"anon\" && !isAuthenticated) ||\n !item.display ||\n item.display === \"always\"\n );\n };\n\nexport const TopNavigation = () => {\n const { topNavigation } = useZudoku();\n const { isAuthenticated } = useAuth();\n\n // Hide top nav if there is only one item\n if (topNavigation.length <= 1) {\n return <style>{`:root { --top-nav-height: 0px; }`}</style>;\n }\n\n return (\n <Suspense>\n <nav className=\"hidden lg:block text-sm px-12 h-[--top-nav-height]\">\n <ul className=\"flex flex-row items-center gap-8\">\n {topNavigation.filter(isHiddenItem(isAuthenticated)).map((item) => (\n <li key={item.id}>\n <TopNavItem {...item} />\n </li>\n ))}\n </ul>\n </nav>\n </Suspense>\n );\n};\n\nexport const TopNavItem = ({\n id,\n label,\n default: defaultLink,\n}: TopNavigationItem) => {\n const { sidebars } = useZudoku();\n const currentSidebar = sidebars[id];\n const currentNav = useCurrentNavigation();\n const isNavigating = Boolean(useNavigation().location);\n const isActive = currentNav.topNavItem?.id === id && !isNavigating;\n\n // TODO: This is a bit of a hack to get the first link in the sidebar\n // We should really process this when we load the config so we can validate\n // that the sidebar is actually set. In this case we just fall back to linking\n // to the id if we can't resolve a sidebar.\n const first =\n defaultLink ??\n (currentSidebar\n ? traverseSidebar(currentSidebar, (item) => {\n if (item.type === \"doc\") return joinPath(item.id);\n })\n : joinPath(id));\n\n if (!first) {\n throw new ZudokuError(\"Page not found.\", {\n developerHint: `No links found in top navigation for '${id}'. Check that the sidebar isn't empty or that a default link is set.`,\n });\n }\n\n return (\n // We don't use isActive here because it has to be inside the sidebar,\n // the top nav id doesn't necessarily start with the sidebar id\n <NavLink\n className={({ isPending }) =>\n cx(\n \"block lg:py-3.5 font-medium -mb-px\",\n isActive || isPending\n ? \"border-primary text-foreground\"\n : \"border-transparent text-foreground/75 hover:text-foreground hover:border-accent-foreground/25\",\n )\n }\n to={first}\n >\n {label}\n </NavLink>\n );\n};\n","import { VisuallyHidden } from \"@radix-ui/react-visually-hidden\";\nimport { MenuIcon } from \"lucide-react\";\nimport { useState } from \"react\";\nimport { useAuth } from \"../authentication/hook.js\";\nimport {\n Drawer,\n DrawerContent,\n DrawerTitle,\n DrawerTrigger,\n} from \"../ui/Drawer.js\";\nimport { useZudoku } from \"./context/ZudokuContext.js\";\nimport { Search } from \"./Search.js\";\nimport { ThemeSwitch } from \"./ThemeSwitch.js\";\nimport { isHiddenItem, TopNavItem } from \"./TopNavigation.js\";\n\nexport const MobileTopNavigation = () => {\n const { topNavigation } = useZudoku();\n const { isAuthenticated } = useAuth();\n const [drawerOpen, setDrawerOpen] = useState(false);\n\n return (\n <Drawer\n direction=\"right\"\n open={drawerOpen}\n onOpenChange={(open) => setDrawerOpen(open)}\n >\n <div className=\"flex lg:hidden justify-self-end\">\n <DrawerTrigger className=\"lg:hidden\">\n <MenuIcon size={22} />\n </DrawerTrigger>\n </div>\n <DrawerContent\n className=\"lg:hidden h-[100dvh] right-0 left-auto w-[320px] rounded-none\"\n aria-describedby={undefined}\n >\n <div className=\"p-4 overflow-y-auto overscroll-none\">\n <VisuallyHidden>\n <DrawerTitle>Navigation</DrawerTitle>\n </VisuallyHidden>\n <Search className=\"flex p-4\" />\n <ul className=\"flex flex-col items-center gap-4 p-4\">\n <li>\n <ThemeSwitch />\n </li>\n {topNavigation.filter(isHiddenItem(isAuthenticated)).map((item) => (\n <li key={item.label}>\n <button onClick={() => setDrawerOpen(false)}>\n <TopNavItem {...item} />\n </button>\n </li>\n ))}\n </ul>\n </div>\n </DrawerContent>\n </Drawer>\n );\n};\n","import { memo } from \"react\";\nimport { Link } from \"react-router\";\nimport { Button } from \"zudoku/ui/Button.js\";\nimport { Skeleton } from \"zudoku/ui/Skeleton.js\";\nimport { useAuth } from \"../authentication/hook.js\";\nimport { isProfileMenuPlugin, ProfileNavigationItem } from \"../core/plugins.js\";\nimport {\n DropdownMenu,\n DropdownMenuContent,\n DropdownMenuItem,\n DropdownMenuLabel,\n DropdownMenuPortal,\n DropdownMenuSeparator,\n DropdownMenuSub,\n DropdownMenuSubContent,\n DropdownMenuSubTrigger,\n DropdownMenuTrigger,\n} from \"../ui/DropdownMenu.js\";\nimport { joinPath } from \"../util/joinPath.js\";\nimport { Banner } from \"./Banner.js\";\nimport { ClientOnly } from \"./ClientOnly.js\";\nimport { useZudoku } from \"./context/ZudokuContext.js\";\nimport { MobileTopNavigation } from \"./MobileTopNavigation.js\";\nimport { Search } from \"./Search.js\";\nimport { Slotlet } from \"./SlotletProvider.js\";\nimport { ThemeSwitch } from \"./ThemeSwitch.js\";\nimport { TopNavigation } from \"./TopNavigation.js\";\n\nconst RecursiveMenu = ({ item }: { item: ProfileNavigationItem }) => {\n return item.children ? (\n <DropdownMenuSub key={item.label}>\n <DropdownMenuSubTrigger>{item.label}</DropdownMenuSubTrigger>\n <DropdownMenuPortal>\n <DropdownMenuSubContent>\n {item.children.map((item, i) => (\n // eslint-disable-next-line react/no-array-index-key\n <RecursiveMenu key={i} item={item} />\n ))}\n </DropdownMenuSubContent>\n </DropdownMenuPortal>\n </DropdownMenuSub>\n ) : (\n <Link to={item.path ?? \"\"}>\n <DropdownMenuItem key={item.label} className=\"flex gap-2\">\n {item.icon && (\n <item.icon size={16} strokeWidth={1} absoluteStrokeWidth />\n )}\n {item.label}\n </DropdownMenuItem>\n </Link>\n );\n};\n\nexport const Header = memo(function HeaderInner() {\n const auth = useAuth();\n const { isAuthenticated, profile, isAuthEnabled } = useAuth();\n const context = useZudoku();\n const { page, plugins } = context;\n\n const accountItems = plugins\n .filter((p) => isProfileMenuPlugin(p))\n .flatMap((p) => p.getProfileMenuItems(context))\n .sort((i) => i.weight ?? 0);\n\n return (\n <header className=\"sticky lg:top-0 z-10 bg-background/80 backdrop-blur w-full\">\n <Banner />\n <div className=\"border-b\">\n <div className=\"max-w-screen-2xl border-l border-r mx-auto grid grid-cols-[1fr_auto] lg:grid-cols-[calc(var(--side-nav-width))_1fr] lg:gap-12 items-center px-4 lg:px-12 h-[--top-header-height]\">\n <div className=\"flex\">\n <Link to=\"/\">\n <div className=\"flex items-center gap-3.5\">\n {page?.logo && (\n <>\n <img\n src={\n /https?:\\/\\//.test(page.logo.src.light)\n ? page.logo.src.light\n : joinPath(\n import.meta.env.BASE_URL,\n page.logo.src.light,\n )\n }\n alt={page.logo.alt ?? page.pageTitle}\n style={{ width: page.logo.width }}\n className=\"h-10 dark:hidden\"\n loading=\"lazy\"\n />\n <img\n src={\n /https?:\\/\\//.test(page.logo.src.dark)\n ? page.logo.src.dark\n : joinPath(\n import.meta.env.BASE_URL,\n page.logo.src.dark,\n )\n }\n alt={page.logo.alt ?? page.pageTitle}\n style={{ width: page.logo.width }}\n className=\"h-10 hidden dark:block\"\n loading=\"lazy\"\n />\n </>\n )}\n <span className=\"font-bold text-2xl text-foreground/85 tracking-wide\">\n {page?.pageTitle}\n </span>\n </div>\n </Link>\n </div>\n <div className=\"grid grid-cols-1 lg:grid-cols-[--sidecar-grid-cols] items-center gap-8\">\n <div className=\"w-full justify-center hidden lg:flex\">\n <Search />\n </div>\n\n <MobileTopNavigation />\n <div className=\"hidden lg:flex items-center justify-self-end text-sm gap-2\">\n <Slotlet name=\"head-navigation-start\" />\n {isAuthEnabled && (\n <ClientOnly\n fallback={<Skeleton className=\"rounded h-5 w-24 mr-4\" />}\n >\n {!isAuthenticated ? (\n <Button variant=\"ghost\" onClick={() => auth.login()}>\n Login\n </Button>\n ) : (\n Object.values(accountItems).length > 0 && (\n <DropdownMenu modal={false}>\n <DropdownMenuTrigger asChild>\n <Button variant=\"ghost\">\n {profile?.name ? `${profile.name}` : \"My Account\"}\n </Button>\n </DropdownMenuTrigger>\n <DropdownMenuContent className=\"w-56\">\n <DropdownMenuLabel>\n {profile?.name ? `${profile.name}` : \"My Account\"}\n {profile?.email && (\n <div className=\"font-normal text-muted-foreground\">\n {profile.email}\n </div>\n )}\n </DropdownMenuLabel>\n {accountItems.filter((i) => i.category === \"top\")\n .length > 0 && <DropdownMenuSeparator />}\n {accountItems\n .filter((i) => i.category === \"top\")\n .map((i) => (\n <RecursiveMenu key={i.label} item={i} />\n ))}\n {accountItems.filter(\n (i) => !i.category || i.category === \"middle\",\n ).length > 0 && <DropdownMenuSeparator />}\n {accountItems\n .filter(\n (i) => !i.category || i.category === \"middle\",\n )\n .map((i) => (\n <RecursiveMenu key={i.label} item={i} />\n ))}\n {accountItems.filter((i) => i.category === \"bottom\")\n .length > 0 && <DropdownMenuSeparator />}\n {accountItems\n .filter((i) => i.category === \"bottom\")\n .map((i) => (\n <RecursiveMenu key={i.label} item={i} />\n ))}\n </DropdownMenuContent>\n </DropdownMenu>\n )\n )}\n </ClientOnly>\n )}\n <ThemeSwitch />\n <Slotlet name=\"head-navigation-end\" />\n </div>\n </div>\n </div>\n </div>\n <div className=\"border-b\">\n <div className=\"max-w-screen-2xl mx-auto border-l border-r\">\n <Slotlet name=\"top-navigation-before\" />\n <TopNavigation />\n <Slotlet name=\"top-navigation-after\" />\n </div>\n </div>\n </header>\n );\n});\n","import { forwardRef, type PropsWithChildren } from \"react\";\nimport { cn } from \"../../util/cn.js\";\n\nexport const SidebarWrapper = forwardRef<\n HTMLDivElement,\n PropsWithChildren<{ pushMainContent?: boolean; className?: string }>\n>(({ children, className, pushMainContent }, ref) => (\n <nav\n // this data attribute is used in `Layout.tsx` to determine if side navigation\n // is present for the current page so the main content is pushed to the right\n // it's also important to set `peer` class here.\n // maybe this could be simplified by adjusting the layout\n data-navigation={String(pushMainContent)}\n className={cn(\n \"scrollbar peer hidden lg:flex flex-col fixed text-sm overflow-y-auto shrink-0 border-r pr-10\",\n \"-mx-[--padding-nav-item] pb-20 pt-[--padding-content-top]\",\n \"w-[--side-nav-width] h-[calc(100%-var(--header-height))] scroll-pt-2 gap-2\",\n className,\n )}\n ref={ref}\n >\n {children}\n </nav>\n));\n\nSidebarWrapper.displayName = \"SidebarWrapper\";\n","import { useRef } from \"react\";\n\nimport { VisuallyHidden } from \"@radix-ui/react-visually-hidden\";\nimport { DrawerContent, DrawerTitle } from \"../../ui/Drawer.js\";\nimport { useCurrentNavigation } from \"../context/ZudokuContext.js\";\nimport { Slotlet } from \"../SlotletProvider.js\";\nimport { SidebarItem } from \"./SidebarItem.js\";\nimport { SidebarWrapper } from \"./SidebarWrapper.js\";\n\nexport const Sidebar = ({\n onRequestClose,\n}: {\n onRequestClose?: () => void;\n}) => {\n const navRef = useRef<HTMLDivElement | null>(null);\n const navigation = useCurrentNavigation();\n\n return (\n <>\n <SidebarWrapper\n ref={navRef}\n pushMainContent={navigation.sidebar.length > 0}\n >\n <Slotlet name=\"zudoku-before-navigation\" />\n {navigation.sidebar.map((item) => (\n <SidebarItem key={item.label} item={item} />\n ))}\n <Slotlet name=\"zudoku-after-navigation\" />\n </SidebarWrapper>\n <DrawerContent\n className=\"lg:hidden h-[100dvh] left-0 w-[320px] rounded-none\"\n aria-describedby={undefined}\n >\n <div className=\"p-4 overflow-y-auto overscroll-none\">\n <VisuallyHidden>\n <DrawerTitle>Sidebar</DrawerTitle>\n </VisuallyHidden>\n {navigation.sidebar.map((item) => (\n <SidebarItem\n key={item.label}\n item={item}\n onRequestClose={onRequestClose}\n />\n ))}\n </div>\n </DrawerContent>\n </>\n );\n};\n","import { Helmet } from \"@zudoku/react-helmet-async\";\nimport { PanelLeftIcon } from \"lucide-react\";\nimport { Suspense, useEffect, useRef, useState, type ReactNode } from \"react\";\nimport { Outlet, useLocation, useNavigation } from \"react-router\";\nimport { useSpinDelay } from \"spin-delay\";\nimport { Drawer, DrawerTrigger } from \"../ui/Drawer.js\";\nimport { cn } from \"../util/cn.js\";\nimport { useScrollToAnchor } from \"../util/useScrollToAnchor.js\";\nimport { useScrollToTop } from \"../util/useScrollToTop.js\";\nimport { useViewportAnchor } from \"./context/ViewportAnchorContext.js\";\nimport { useZudoku } from \"./context/ZudokuContext.js\";\nimport { Header } from \"./Header.js\";\nimport { Sidebar } from \"./navigation/Sidebar.js\";\nimport { Slotlet } from \"./SlotletProvider.js\";\nimport { Spinner } from \"./Spinner.js\";\n\nconst LoadingFallback = () => (\n <main className=\"grid h-[calc(100vh-var(--header-height))] place-items-center\">\n <Spinner />\n </main>\n);\n\nexport const Layout = ({ children }: { children?: ReactNode }) => {\n const location = useLocation();\n const { setActiveAnchor } = useViewportAnchor();\n const { meta, authentication } = useZudoku();\n\n useScrollToAnchor();\n useScrollToTop();\n\n const previousLocationPath = useRef(location.pathname);\n\n useEffect(() => {\n // Initialize the authentication plugin\n authentication?.onPageLoad?.();\n }, [authentication]);\n\n useEffect(() => {\n // always reset on location change\n if (location.pathname !== previousLocationPath.current) {\n setActiveAnchor(\"\");\n }\n previousLocationPath.current = location.pathname;\n }, [location.pathname, setActiveAnchor]);\n\n // Page transition is happening: https://reactrouter.com/start/framework/pending-ui#global-pending-navigation\n const isNavigating = Boolean(useNavigation().location);\n const showSpinner = useSpinDelay(isNavigating, {\n delay: 300,\n minDuration: 500,\n });\n const [isDrawerOpen, setDrawerOpen] = useState(false);\n\n return (\n <>\n {import.meta.env.MODE === \"standalone\" && (\n <style>{`:root { --top-nav-height: 0px; }`}</style>\n )}\n <Helmet titleTemplate={meta?.title}>\n {meta?.description && (\n <meta name=\"description\" content={meta.description} />\n )}\n {meta?.favicon && <link rel=\"icon\" href={meta.favicon} />}\n </Helmet>\n <Slotlet name=\"layout-before-head\" />\n <Header />\n <Slotlet name=\"layout-after-head\" />\n\n <div className=\"w-full max-w-screen-2xl mx-auto px-4 lg:px-12 border-l border-r\">\n {showSpinner ? (\n <LoadingFallback />\n ) : (\n <Suspense fallback={<LoadingFallback />}>\n <Drawer\n direction=\"left\"\n open={isDrawerOpen}\n onOpenChange={(open) => setDrawerOpen(open)}\n >\n <Sidebar onRequestClose={() => setDrawerOpen(false)} />\n <div\n className={cn(\n \"lg:hidden -mx-10 px-10 py-2 sticky bg-background/80 backdrop-blur z-10 top-0 left-0 right-0 border-b\",\n \"peer-data-[navigation=false]:hidden\",\n )}\n >\n <DrawerTrigger className=\"flex items-center gap-2\">\n <PanelLeftIcon size={16} strokeWidth={1.5} />\n <span className=\"text-sm\">Menu</span>\n </DrawerTrigger>\n </div>\n <main\n className={cn(\n \"h-full dark:border-white/10 translate-x-0\",\n \"lg:overflow-visible\",\n // This works in tandem with the `SidebarWrapper` component\n \"lg:peer-data-[navigation=true]:w-[calc(100%-var(--side-nav-width))]\",\n \"lg:peer-data-[navigation=true]:translate-x-[--side-nav-width] lg:peer-data-[navigation=true]:pl-12\",\n )}\n >\n <Slotlet name=\"zudoku-before-content\" />\n {children ?? <Outlet />}\n <Slotlet name=\"zudoku-after-content\" />\n </main>\n </Drawer>\n </Suspense>\n )}\n </div>\n </>\n );\n};\n","'use client';\nimport { createContext, Component, createElement, useContext, useState, useMemo, forwardRef } from 'react';\n\nconst ErrorBoundaryContext = createContext(null);\n\nconst initialState = {\n didCatch: false,\n error: null\n};\nclass ErrorBoundary extends Component {\n constructor(props) {\n super(props);\n this.resetErrorBoundary = this.resetErrorBoundary.bind(this);\n this.state = initialState;\n }\n static getDerivedStateFromError(error) {\n return {\n didCatch: true,\n error\n };\n }\n resetErrorBoundary() {\n const {\n error\n } = this.state;\n if (error !== null) {\n var _this$props$onReset, _this$props;\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n (_this$props$onReset = (_this$props = this.props).onReset) === null || _this$props$onReset === void 0 ? void 0 : _this$props$onReset.call(_this$props, {\n args,\n reason: \"imperative-api\"\n });\n this.setState(initialState);\n }\n }\n componentDidCatch(error, info) {\n var _this$props$onError, _this$props2;\n (_this$props$onError = (_this$props2 = this.props).onError) === null || _this$props$onError === void 0 ? void 0 : _this$props$onError.call(_this$props2, error, info);\n }\n componentDidUpdate(prevProps, prevState) {\n const {\n didCatch\n } = this.state;\n const {\n resetKeys\n } = this.props;\n\n // There's an edge case where if the thing that triggered the error happens to *also* be in the resetKeys array,\n // we'd end up resetting the error boundary immediately.\n // This would likely trigger a second error to be thrown.\n // So we make sure that we don't check the resetKeys on the first call of cDU after the error is set.\n\n if (didCatch && prevState.error !== null && hasArrayChanged(prevProps.resetKeys, resetKeys)) {\n var _this$props$onReset2, _this$props3;\n (_this$props$onReset2 = (_this$props3 = this.props).onReset) === null || _this$props$onReset2 === void 0 ? void 0 : _this$props$onReset2.call(_this$props3, {\n next: resetKeys,\n prev: prevProps.resetKeys,\n reason: \"keys\"\n });\n this.setState(initialState);\n }\n }\n render() {\n const {\n children,\n fallbackRender,\n FallbackComponent,\n fallback\n } = this.props;\n const {\n didCatch,\n error\n } = this.state;\n let childToRender = children;\n if (didCatch) {\n const props = {\n error,\n resetErrorBoundary: this.resetErrorBoundary\n };\n if (typeof fallbackRender === \"function\") {\n childToRender = fallbackRender(props);\n } else if (FallbackComponent) {\n childToRender = createElement(FallbackComponent, props);\n } else if (fallback !== undefined) {\n childToRender = fallback;\n } else {\n throw error;\n }\n }\n return createElement(ErrorBoundaryContext.Provider, {\n value: {\n didCatch,\n error,\n resetErrorBoundary: this.resetErrorBoundary\n }\n }, childToRender);\n }\n}\nfunction hasArrayChanged() {\n let a = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];\n let b = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];\n return a.length !== b.length || a.some((item, index) => !Object.is(item, b[index]));\n}\n\nfunction assertErrorBoundaryContext(value) {\n if (value == null || typeof value.didCatch !== \"boolean\" || typeof value.resetErrorBoundary !== \"function\") {\n throw new Error(\"ErrorBoundaryContext not found\");\n }\n}\n\nfunction useErrorBoundary() {\n const context = useContext(ErrorBoundaryContext);\n assertErrorBoundaryContext(context);\n const [state, setState] = useState({\n error: null,\n hasError: false\n });\n const memoized = useMemo(() => ({\n resetBoundary: () => {\n context.resetErrorBoundary();\n setState({\n error: null,\n hasError: false\n });\n },\n showBoundary: error => setState({\n error,\n hasError: true\n })\n }), [context.resetErrorBoundary]);\n if (state.hasError) {\n throw state.error;\n }\n return memoized;\n}\n\nfunction withErrorBoundary(component, errorBoundaryProps) {\n const Wrapped = forwardRef((props, ref) => createElement(ErrorBoundary, errorBoundaryProps, createElement(component, {\n ...props,\n ref\n })));\n\n // Format for display in DevTools\n const name = component.displayName || component.name || \"Unknown\";\n Wrapped.displayName = \"withErrorBoundary(\".concat(name, \")\");\n return Wrapped;\n}\n\nexport { ErrorBoundary, ErrorBoundaryContext, useErrorBoundary, withErrorBoundary };\n","import { ReactNode } from \"react\";\nimport { TopNavigationItem } from \"../../config/validators/common.js\";\nimport type { SidebarConfig } from \"../../config/validators/SidebarSchema.js\";\nimport { type AuthenticationProvider } from \"../authentication/authentication.js\";\nimport type { ComponentsContextType } from \"../components/context/ComponentsContext.js\";\nimport { Slotlets } from \"../components/SlotletProvider.js\";\nimport { joinPath } from \"../util/joinPath.js\";\nimport type { MdxComponentsType } from \"../util/MdxComponents.js\";\nimport {\n isApiIdentityPlugin,\n isNavigationPlugin,\n type NavigationPlugin,\n needsInitialization,\n type ZudokuPlugin,\n} from \"./plugins.js\";\n\nexport interface ApiIdentity {\n authorizeRequest: (request: Request) => Request;\n label: string;\n id: string;\n}\n\nexport type ApiKeyCache = \"api-keys\";\n\ntype Metadata = Partial<{\n title: string;\n description: string;\n logo: string;\n favicon: string;\n generator: string;\n applicationName: string;\n referrer: string;\n keywords: string[];\n authors: string[];\n creator: string;\n publisher: string;\n}>;\n\ntype Page = Partial<{\n pageTitle?: string;\n logo?: {\n src: {\n light: string;\n dark: string;\n };\n width?: string;\n alt?: string;\n };\n banner?: {\n message: ReactNode;\n color?: \"note\" | \"tip\" | \"info\" | \"caution\" | \"danger\" | (string & {});\n dismissible?: boolean;\n };\n}>;\n\nexport type ZudokuContextOptions = {\n metadata?: Metadata;\n page?: Page;\n authentication?: AuthenticationProvider;\n topNavigation?: TopNavigationItem[];\n sidebars?: SidebarConfig;\n plugins?: ZudokuPlugin[];\n slotlets?: Slotlets;\n mdx?: {\n components?: MdxComponentsType;\n };\n overrides?: ComponentsContextType;\n};\n\nexport class ZudokuContext {\n public plugins: NonNullable<ZudokuContextOptions[\"plugins\"]>;\n public sidebars: SidebarConfig;\n public topNavigation: NonNullable<ZudokuContextOptions[\"topNavigation\"]>;\n public meta: ZudokuContextOptions[\"metadata\"];\n public page: ZudokuContextOptions[\"page\"];\n public authentication?: ZudokuContextOptions[\"authentication\"];\n private navigationPlugins: NavigationPlugin[];\n\n constructor(config: ZudokuContextOptions) {\n this.plugins = config.plugins ?? [];\n this.topNavigation = config.topNavigation ?? [];\n this.sidebars = config.sidebars ?? {};\n this.navigationPlugins = this.plugins.filter(isNavigationPlugin);\n this.authentication = config.authentication;\n this.meta = config.metadata;\n this.page = config.page;\n }\n\n initialize = async (): Promise<void> => {\n await Promise.all(\n this.plugins\n .filter(needsInitialization)\n .map((plugin) => plugin.initialize?.(this)),\n );\n };\n\n getApiIdentities = async () => {\n const keys = await Promise.all(\n this.plugins\n .filter(isApiIdentityPlugin)\n .map((plugin) => plugin.getIdentities(this)),\n );\n\n return keys.flat();\n };\n\n getPluginSidebar = async (path: string) => {\n const navigations = await Promise.all(\n this.navigationPlugins.map((plugin) =>\n plugin.getSidebar?.(joinPath(path)),\n ),\n );\n\n return navigations.flatMap((nav) => nav ?? []);\n };\n\n signRequest = async (request: Request) => {\n if (!this.authentication) {\n throw new Error(\"No authentication provider configured\");\n }\n\n const accessToken = await this.authentication.getAccessToken();\n\n request.headers.set(\"Authorization\", `Bearer ${accessToken}`);\n\n return request;\n };\n}\n","import { FallbackProps } from \"react-error-boundary\";\nimport { ErrorAlert } from \"./ErrorAlert.js\";\n\nexport function TopLevelError({ error, resetErrorBoundary }: FallbackProps) {\n // Call resetErrorBoundary() to reset the error boundary and retry the render.\n\n return <ErrorAlert error={error} />;\n}\n","const root = globalThis;\n\nif (!root.requestIdleCallback || !root.cancelIdleCallback) {\n root.requestIdleCallback = (cb: IdleRequestCallback) => setTimeout(cb, 1);\n root.cancelIdleCallback = clearTimeout;\n}\n","import {\n createContext,\n useContext,\n type ComponentProps,\n type ComponentType,\n} from \"react\";\nimport { Header } from \"../Header.js\";\n\nexport const DEFAULT_COMPONENTS = {\n Header,\n};\n\nexport type ComponentsContextType = {\n Header?: ComponentType<ComponentProps<typeof Header>>;\n};\n\nconst ComponentsContext =\n createContext<Required<ComponentsContextType>>(DEFAULT_COMPONENTS);\n\nexport const ComponentsProvider = ComponentsContext.Provider;\n\nexport const useComponents = () => {\n return useContext(ComponentsContext);\n};\n","import { useSuspenseQuery } from \"@tanstack/react-query\";\nimport type { PropsWithChildren } from \"react\";\nimport { ZudokuContext } from \"../../core/ZudokuContext.js\";\nimport { ZudokuReactContext } from \"./ZudokuContext.js\";\n\nexport const ZudokuProvider = ({\n children,\n context,\n}: PropsWithChildren<{ context: ZudokuContext }>) => {\n useSuspenseQuery({\n queryFn: async () => {\n await context.initialize();\n return true;\n },\n queryKey: [\"zudoku-initialize\"],\n });\n\n return (\n <ZudokuReactContext.Provider value={context}>\n {children}\n </ZudokuReactContext.Provider>\n );\n};\n","import { MDXProvider } from \"@mdx-js/react\";\nimport { Helmet } from \"@zudoku/react-helmet-async\";\nimport { ThemeProvider } from \"next-themes\";\nimport {\n Fragment,\n memo,\n type PropsWithChildren,\n useContext,\n useEffect,\n useMemo,\n useState,\n} from \"react\";\nimport { ErrorBoundary } from \"react-error-boundary\";\nimport { Outlet, useNavigation } from \"react-router\";\nimport { hasHead, isMdxProviderPlugin } from \"../core/plugins.js\";\nimport { ZudokuContext, ZudokuContextOptions } from \"../core/ZudokuContext.js\";\nimport { TopLevelError } from \"../errors/TopLevelError.js\";\nimport { StaggeredRenderContext } from \"../plugins/openapi/StaggeredRender.js\";\nimport { MdxComponents } from \"../util/MdxComponents.js\";\nimport \"../util/requestIdleCallbackPolyfill.js\";\nimport {\n ComponentsProvider,\n DEFAULT_COMPONENTS,\n} from \"./context/ComponentsContext.js\";\nimport { ViewportAnchorProvider } from \"./context/ViewportAnchorContext.js\";\nimport { ZudokuProvider } from \"./context/ZudokuProvider.js\";\nimport { SlotletProvider } from \"./SlotletProvider.js\";\n\nconst ZudokoInner = memo(\n ({ children, ...props }: PropsWithChildren<ZudokuContextOptions>) => {\n const components = useMemo(\n () => ({ ...DEFAULT_COMPONENTS, ...props.overrides }),\n [props.overrides],\n );\n\n const mdxComponents = useMemo(() => {\n const componentsFromPlugins = (props.plugins ?? [])\n .filter(isMdxProviderPlugin)\n .flatMap((plugin) =>\n plugin.getMdxComponents ? [plugin.getMdxComponents()] : [],\n );\n\n return {\n ...componentsFromPlugins.reduce(\n (acc, curr) => ({ ...acc, ...curr }),\n {},\n ),\n ...MdxComponents,\n ...props.mdx?.components,\n };\n }, [props.mdx?.components, props.plugins]);\n const { stagger } = useContext(StaggeredRenderContext);\n const [didNavigate, setDidNavigate] = useState(false);\n const staggeredValue = useMemo(\n () => (didNavigate ? { stagger: true } : { stagger }),\n [stagger, didNavigate],\n );\n const navigation = useNavigation();\n\n useEffect(() => {\n if (didNavigate) {\n return;\n }\n setDidNavigate(true);\n }, [didNavigate, navigation.location]);\n\n const [zudokuContext] = useState(() => new ZudokuContext(props));\n\n const heads = props.plugins\n ?.filter(hasHead)\n // eslint-disable-next-line react/no-array-index-key\n .map((plugin, i) => <Fragment key={i}>{plugin.getHead?.()}</Fragment>);\n\n return (\n <>\n <Helmet>{heads}</Helmet>\n <StaggeredRenderContext.Provider value={staggeredValue}>\n <ZudokuProvider context={zudokuContext}>\n <MDXProvider components={mdxComponents}>\n <ThemeProvider attribute=\"class\" disableTransitionOnChange>\n <ComponentsProvider value={components}>\n <SlotletProvider slotlets={props.slotlets}>\n <ViewportAnchorProvider>\n {children ?? <Outlet />}\n </ViewportAnchorProvider>\n </SlotletProvider>\n </ComponentsProvider>\n </ThemeProvider>\n </MDXProvider>\n </ZudokuProvider>\n </StaggeredRenderContext.Provider>\n </>\n );\n },\n);\n\nZudokoInner.displayName = \"ZudokoInner\";\n\nconst Zudoku = (props: ZudokuContextOptions) => {\n return (\n <ErrorBoundary FallbackComponent={TopLevelError}>\n <ZudokoInner {...props} />\n </ErrorBoundary>\n );\n};\nZudoku.displayName = \"Zudoku\";\n\nexport { Zudoku };\n","import { useMDXComponents as useMDXComponentsImport } from \"@mdx-js/react\";\nimport { Helmet } from \"@zudoku/react-helmet-async\";\nimport { Link as LinkImport } from \"react-router\";\nimport { useAuth as useAuthImport } from \"../authentication/hook.js\";\nimport { RouterError as RouterErrorImport } from \"../errors/RouterError.js\";\nimport { ServerError as ServerErrorImport } from \"../errors/ServerError.js\";\nimport { Button as ButtonImport } from \"../ui/Button.js\";\nimport { Callout as CalloutImport } from \"../ui/Callout.js\";\nimport { Spinner as SpinnerImport } from \"./Spinner.js\";\nimport { Markdown as MarkdownImport } from \"./Markdown.js\";\nimport {\n Bootstrap as BootstrapImport,\n BootstrapStatic as BootstrapStaticImport,\n} from \"./Bootstrap.js\";\nimport { ClientOnly as ClientOnlyImport } from \"./ClientOnly.js\";\nimport { Layout as LayoutImport } from \"./Layout.js\";\nimport { Zudoku as ZudokuImport } from \"./Zudoku.js\";\nimport { useZudoku as useZudokuImport } from \"./context/ZudokuContext.js\";\nexport const useMDXComponents = /*@__PURE__*/ useMDXComponentsImport;\nexport const Layout = /*@__PURE__*/ LayoutImport;\nexport const RouterError = /*@__PURE__*/ RouterErrorImport;\nexport const ServerError = /*@__PURE__*/ ServerErrorImport;\nexport const Bootstrap = /*@__PURE__*/ BootstrapImport;\nexport const BootstrapStatic = /*@__PURE__*/ BootstrapStaticImport;\n\nexport const Head = /*@__PURE__*/ Helmet;\n\nexport const useZudoku = /*@__PURE__*/ useZudokuImport;\nexport const useAuth = /*@__PURE__*/ useAuthImport;\nexport const Zudoku = /*@__PURE__*/ ZudokuImport;\n\nexport const Callout = /*@__PURE__*/ CalloutImport;\nexport const Markdown = /*@__PURE__*/ MarkdownImport;\nexport const Spinner = /*@__PURE__*/ SpinnerImport;\nexport const ClientOnly = /*@__PURE__*/ ClientOnlyImport;\nexport const Button = /*@__PURE__*/ ButtonImport;\nexport const Link = /*@__PURE__*/ LinkImport;\n"],"names":["QueryCache","_a","Subscribable","config","__privateAdd","_queries","__privateSet","client","options","state","queryKey","queryHash","hashQueryKeyByOptions","query","Query","__privateGet","queryInMap","notifyManager","filters","defaultedFilters","matchQuery","queries","event","listener","MutationCache","_mutations","_mutationId","mutation","Mutation","__privateWrapper","scope","scopeFor","mutations","x","firstPendingMutation","m","foundMutation","matchMutation","pausedMutations","noop","infiniteQueryBehavior","pages","context","direction","_c","_b","oldPages","_d","oldPageParams","_e","result","currentPage","fetchFn","cancelled","addSignalProperty","object","queryFn","ensureQueryFn","fetchPage","data","param","previous","queryFnContext","page","maxPages","addTo","addToStart","addToEnd","pageParamFn","getPreviousPageParam","getNextPageParam","oldData","remainingPages","pageParams","lastIndex","QueryClient","_queryCache","_mutationCache","_defaultOptions","_queryDefaults","_mutationDefaults","_mountCount","_unsubscribeFocus","_unsubscribeOnline","focusManager","focused","onlineManager","online","cachedData","defaultedOptions","resolveStaleTime","updater","prevData","functionalUpdate","queryCache","refetchFilters","cancelOptions","defaultedCancelOptions","promises","fetchOptions","promise","hashKey","defaults","queryDefault","partialMatchKey","mutationKey","skipToken","defaultTransformerFn","hydrate","dehydratedState","mutationCache","deserializeData","mutationOptions","meta","_ignored","serializedState","initialPromise","HydrationBoundary","children","queryClient","useQueryClient","hydrationQueue","setHydrationQueue","React","optionsRef","newQueries","existingQueries","dehydratedQuery","existingQuery","hydrationIsNewer","queryAlreadyQueued","prev","ServerError","error","jsx","ErrorAlert","RouterProvider2","props","RouterProvider","ReactDOM","Bootstrap","router","StrictMode","QueryClientProvider","HelmetProvider","StaggeredRenderContext","BootstrapStatic","helmetContext","StaticRouterProvider","global","factory","exports","require$$0","this","react","defaultOptions","useIsSSR","isSSR","setIsSSR","useSpinDelay","loading","initialState","setState","timeout","delay","ColorMap","SidebarBadge","color","label","className","cn","SidebarCategory","category","onRequestClose","isCategoryOpen","useIsCategoryOpen","hasInteracted","setHasInteracted","useState","isCollapsible","isCollapsed","isDefaultOpen","open","setOpen","isActive","useMatch","useEffect","ToggleButton","e","ChevronRightIcon","jsxs","Collapsible","navigationListItem","NavLink","joinPath","item","SidebarItem","cva","DATA_ANCHOR_ATTR","activeAnchor","useViewportAnchor","searchParams","useSearchParams","Fragment","AnchorLink","ExternalLinkIcon","scrollIntoViewIfNeeded","element","rect","useScrollToAnchor","location","useLocation","setActiveAnchor","hash","scrollToElement","link","observer","_","obs","useScrollToTop","previousPath","useRef","Skeleton","isProfileMenuPlugin","obj","isNavigationPlugin","isSearchPlugin","needsInitialization","hasHead","isMdxProviderPlugin","isApiIdentityPlugin","COLOR_MAP","Banner","useZudoku","isBannerOpen","setIsBannerOpen","mappedColor","style","CircleXIcon","Search","ctx","isOpen","setIsOpen","onClose","useCallback","onKeyDown","searchPlugin","SearchIcon","Suspense","ThemeSwitch","resolvedTheme","setTheme","useTheme","ThemeIcon","MoonStarIcon","SunIcon","ClientOnly","Button","isHiddenItem","isAuthenticated","TopNavigation","topNavigation","useAuth","TopNavItem","id","defaultLink","sidebars","currentSidebar","currentNav","useCurrentNavigation","isNavigating","useNavigation","first","traverseSidebar","ZudokuError","isPending","cx","MobileTopNavigation","drawerOpen","setDrawerOpen","Drawer","DrawerTrigger","MenuIcon","DrawerContent","VisuallyHidden","DrawerTitle","RecursiveMenu","DropdownMenuSub","DropdownMenuSubTrigger","DropdownMenuPortal","DropdownMenuSubContent","i","Link","DropdownMenuItem","Header","memo","auth","profile","isAuthEnabled","plugins","accountItems","p","Slotlet","DropdownMenu","DropdownMenuTrigger","DropdownMenuContent","DropdownMenuLabel","DropdownMenuSeparator","SidebarWrapper","forwardRef","pushMainContent","ref","Sidebar","navRef","navigation","LoadingFallback","Spinner","Layout","authentication","previousLocationPath","showSpinner","isDrawerOpen","Helmet","PanelLeftIcon","Outlet","ErrorBoundaryContext","createContext","ErrorBoundary","Component","_this$props$onReset","_this$props","_len","args","_key","info","_this$props$onError","_this$props2","prevProps","prevState","didCatch","resetKeys","hasArrayChanged","_this$props$onReset2","_this$props3","fallbackRender","FallbackComponent","fallback","childToRender","createElement","a","b","index","ZudokuContext","__publicField","plugin","path","nav","request","accessToken","TopLevelError","resetErrorBoundary","root","cb","DEFAULT_COMPONENTS","ComponentsContext","ComponentsProvider","ZudokuProvider","useSuspenseQuery","ZudokuReactContext","ZudokoInner","components","useMemo","mdxComponents","acc","curr","MdxComponents","stagger","useContext","didNavigate","setDidNavigate","staggeredValue","zudokuContext","heads","MDXProvider","ThemeProvider","SlotletProvider","ViewportAnchorProvider","Zudoku","useMDXComponents","useMDXComponentsImport","LayoutImport","RouterError","RouterErrorImport","ServerErrorImport","BootstrapImport","BootstrapStaticImport","Head","useZudokuImport","useAuthImport","ZudokuImport","Callout","CalloutImport","Markdown","MarkdownImport","SpinnerImport","ClientOnlyImport","ButtonImport","LinkImport"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;WAKIA,MAAaC,KAAA,cAAcC,GAAa;AAAA,EAC1C,YAAYC,IAAS,IAAI;AACvB,UAAO;AAIT,IAAAC,EAAA,MAAAC;AAHE,SAAK,SAASF,GACdG,EAAA,MAAKD,GAA2B,oBAAI,IAAK;AAAA,EAC7C;AAAA,EAEE,MAAME,GAAQC,GAASC,GAAO;AAC5B,UAAMC,IAAWF,EAAQ,UACnBG,I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