zudoku 0.33.0 → 0.33.2-local.4

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 (177) hide show
  1. package/dist/config/validators/common.d.ts +226 -8
  2. package/dist/config/validators/common.js +26 -8
  3. package/dist/config/validators/common.js.map +1 -1
  4. package/dist/config/validators/validate.d.ts +89 -2
  5. package/dist/lib/authentication/hook.d.ts +1 -0
  6. package/dist/lib/authentication/hook.js +11 -1
  7. package/dist/lib/authentication/hook.js.map +1 -1
  8. package/dist/lib/authentication/providers/clerk.js +6 -6
  9. package/dist/lib/authentication/providers/clerk.js.map +1 -1
  10. package/dist/lib/authentication/state.js +8 -2
  11. package/dist/lib/authentication/state.js.map +1 -1
  12. package/dist/lib/components/Banner.js +1 -1
  13. package/dist/lib/components/Banner.js.map +1 -1
  14. package/dist/lib/components/Heading.d.ts +1 -1
  15. package/dist/lib/components/Layout.js +1 -1
  16. package/dist/lib/components/Layout.js.map +1 -1
  17. package/dist/lib/components/index.d.ts +2 -1
  18. package/dist/lib/core/RouteGuard.d.ts +1 -1
  19. package/dist/lib/core/RouteGuard.js +24 -18
  20. package/dist/lib/core/RouteGuard.js.map +1 -1
  21. package/dist/lib/plugins/api-catalog/Catalog.d.ts +3 -1
  22. package/dist/lib/plugins/api-catalog/Catalog.js +7 -4
  23. package/dist/lib/plugins/api-catalog/Catalog.js.map +1 -1
  24. package/dist/lib/plugins/api-catalog/index.js +1 -1
  25. package/dist/lib/plugins/api-catalog/index.js.map +1 -1
  26. package/dist/lib/plugins/markdown/MdxPage.js +1 -1
  27. package/dist/lib/plugins/markdown/MdxPage.js.map +1 -1
  28. package/dist/lib/plugins/openapi/OperationList.d.ts +1 -1
  29. package/dist/lib/plugins/openapi/OperationList.js +2 -1
  30. package/dist/lib/plugins/openapi/OperationList.js.map +1 -1
  31. package/dist/lib/plugins/openapi/OperationListItem.js +2 -1
  32. package/dist/lib/plugins/openapi/OperationListItem.js.map +1 -1
  33. package/dist/lib/plugins/openapi/ParameterList.d.ts +2 -1
  34. package/dist/lib/plugins/openapi/ParameterList.js +3 -2
  35. package/dist/lib/plugins/openapi/ParameterList.js.map +1 -1
  36. package/dist/lib/plugins/openapi/PlaygroundDialogWrapper.js +3 -1
  37. package/dist/lib/plugins/openapi/PlaygroundDialogWrapper.js.map +1 -1
  38. package/dist/lib/plugins/openapi/Sidecar.js +1 -1
  39. package/dist/lib/plugins/openapi/Sidecar.js.map +1 -1
  40. package/dist/lib/plugins/openapi/playground/PathParams.d.ts +3 -2
  41. package/dist/lib/plugins/openapi/playground/PathParams.js +3 -2
  42. package/dist/lib/plugins/openapi/playground/PathParams.js.map +1 -1
  43. package/dist/lib/plugins/openapi/playground/Playground.d.ts +4 -1
  44. package/dist/lib/plugins/openapi/playground/Playground.js +10 -7
  45. package/dist/lib/plugins/openapi/playground/Playground.js.map +1 -1
  46. package/dist/lib/plugins/search-pagefind/PagefindSearch.d.ts +6 -0
  47. package/dist/lib/plugins/search-pagefind/PagefindSearch.js +66 -0
  48. package/dist/lib/plugins/search-pagefind/PagefindSearch.js.map +1 -0
  49. package/dist/lib/plugins/search-pagefind/ResultList.d.ts +8 -0
  50. package/dist/lib/plugins/search-pagefind/ResultList.js +31 -0
  51. package/dist/lib/plugins/search-pagefind/ResultList.js.map +1 -0
  52. package/dist/lib/plugins/search-pagefind/get-results.d.ts +3 -0
  53. package/dist/lib/plugins/search-pagefind/get-results.js +37 -0
  54. package/dist/lib/plugins/search-pagefind/get-results.js.map +1 -0
  55. package/dist/lib/plugins/search-pagefind/index.d.ts +8 -0
  56. package/dist/lib/plugins/search-pagefind/index.js +9 -0
  57. package/dist/lib/plugins/search-pagefind/index.js.map +1 -0
  58. package/dist/lib/plugins/search-pagefind/types.d.ts +85 -0
  59. package/dist/lib/plugins/search-pagefind/types.js +2 -0
  60. package/dist/lib/plugins/search-pagefind/types.js.map +1 -0
  61. package/dist/lib/ui/Command.d.ts +7 -1
  62. package/dist/lib/ui/Command.js +2 -2
  63. package/dist/lib/ui/Command.js.map +1 -1
  64. package/dist/lib/util/useScrollToAnchor.js +6 -8
  65. package/dist/lib/util/useScrollToAnchor.js.map +1 -1
  66. package/dist/vite/build.js +4 -0
  67. package/dist/vite/build.js.map +1 -1
  68. package/dist/vite/config.js +7 -2
  69. package/dist/vite/config.js.map +1 -1
  70. package/dist/vite/dev-server.js +8 -0
  71. package/dist/vite/dev-server.js.map +1 -1
  72. package/dist/vite/pagefind.d.ts +4 -0
  73. package/dist/vite/pagefind.js +15 -0
  74. package/dist/vite/pagefind.js.map +1 -0
  75. package/dist/vite/plugin-component.js +4 -0
  76. package/dist/vite/plugin-component.js.map +1 -1
  77. package/dist/vite/plugin-search.js +4 -0
  78. package/dist/vite/plugin-search.js.map +1 -1
  79. package/dist/vite/prerender/prerender.js +1 -1
  80. package/dist/vite/prerender/prerender.js.map +1 -1
  81. package/dist/vite/sitemap.js +2 -1
  82. package/dist/vite/sitemap.js.map +1 -1
  83. package/lib/{AuthenticationPlugin-_gUMnGxb.js → AuthenticationPlugin-BCYuduZ9.js} +3 -3
  84. package/lib/{AuthenticationPlugin-_gUMnGxb.js.map → AuthenticationPlugin-BCYuduZ9.js.map} +1 -1
  85. package/lib/Command-CrTA1FX0.js +140 -0
  86. package/lib/Command-CrTA1FX0.js.map +1 -0
  87. package/lib/Dialog-mi6BrnrM.js +83 -0
  88. package/lib/Dialog-mi6BrnrM.js.map +1 -0
  89. package/lib/{Markdown-DePfm7oQ.js → Markdown-DofXBcqg.js} +2 -2
  90. package/lib/{Markdown-DePfm7oQ.js.map → Markdown-DofXBcqg.js.map} +1 -1
  91. package/lib/MdxPage-KJcNWIgt.js +200 -0
  92. package/lib/MdxPage-KJcNWIgt.js.map +1 -0
  93. package/lib/{OasProvider-Bvu4dDpX.js → OasProvider-HcqBeC4H.js} +4 -4
  94. package/lib/{OasProvider-Bvu4dDpX.js.map → OasProvider-HcqBeC4H.js.map} +1 -1
  95. package/lib/{OperationList-DWnNbwVg.js → OperationList-C3wnbFxp.js} +1857 -1816
  96. package/lib/OperationList-C3wnbFxp.js.map +1 -0
  97. package/lib/{Select-BmoX1iTH.js → Select-Co6MuS4j.js} +36 -36
  98. package/lib/{Select-BmoX1iTH.js.map → Select-Co6MuS4j.js.map} +1 -1
  99. package/lib/{SlotletProvider-DdtIOUi6.js → SlotletProvider-CYFNHuok.js} +4 -4
  100. package/lib/{SlotletProvider-DdtIOUi6.js.map → SlotletProvider-CYFNHuok.js.map} +1 -1
  101. package/lib/{chunk-IR6S3I6Y-D_3UmFIn.js → chunk-IR6S3I6Y-CRDBmIgK.js} +3 -3
  102. package/lib/{chunk-IR6S3I6Y-D_3UmFIn.js.map → chunk-IR6S3I6Y-CRDBmIgK.js.map} +1 -1
  103. package/lib/hook-LTe5qHSc.js +347 -0
  104. package/lib/hook-LTe5qHSc.js.map +1 -0
  105. package/lib/{index-DVBlM15k.js → index-CtkRMvMw.js} +696 -743
  106. package/lib/index-CtkRMvMw.js.map +1 -0
  107. package/lib/index-gQD2h1wX.js +447 -0
  108. package/lib/index-gQD2h1wX.js.map +1 -0
  109. package/lib/index-vn5bsvmU.js +1399 -0
  110. package/lib/index-vn5bsvmU.js.map +1 -0
  111. package/lib/{mutation-DTunCQKB.js → mutation-B81DztCT.js} +2 -2
  112. package/lib/{mutation-DTunCQKB.js.map → mutation-B81DztCT.js.map} +1 -1
  113. package/lib/ui/Command.js +105 -78
  114. package/lib/ui/Command.js.map +1 -1
  115. package/lib/{useExposedProps-RIvey2Oy.js → useExposedProps-D76yras4.js} +2 -2
  116. package/lib/{useExposedProps-RIvey2Oy.js.map → useExposedProps-D76yras4.js.map} +1 -1
  117. package/lib/useQuery-CQUwWR9i.js +1137 -0
  118. package/lib/useQuery-CQUwWR9i.js.map +1 -0
  119. package/lib/useScrollToAnchor-DKyrbZoy.js +977 -0
  120. package/lib/useScrollToAnchor-DKyrbZoy.js.map +1 -0
  121. package/lib/zudoku.auth-auth0.js +1 -1
  122. package/lib/zudoku.auth-clerk.js +29 -29
  123. package/lib/zudoku.auth-clerk.js.map +1 -1
  124. package/lib/zudoku.auth-openid.js +3 -3
  125. package/lib/zudoku.components.js +32 -1382
  126. package/lib/zudoku.components.js.map +1 -1
  127. package/lib/zudoku.hooks.js +1 -1
  128. package/lib/zudoku.plugin-api-catalog.js +87 -71
  129. package/lib/zudoku.plugin-api-catalog.js.map +1 -1
  130. package/lib/zudoku.plugin-api-keys.js +16 -15
  131. package/lib/zudoku.plugin-api-keys.js.map +1 -1
  132. package/lib/zudoku.plugin-custom-pages.js +2 -2
  133. package/lib/zudoku.plugin-markdown.js +1 -1
  134. package/lib/zudoku.plugin-openapi.js +3 -3
  135. package/lib/zudoku.plugin-redirect.js +1 -1
  136. package/lib/zudoku.plugin-search-pagefind.js +274 -0
  137. package/lib/zudoku.plugin-search-pagefind.js.map +1 -0
  138. package/package.json +8 -3
  139. package/src/lib/authentication/hook.ts +12 -1
  140. package/src/lib/authentication/providers/clerk.tsx +10 -6
  141. package/src/lib/authentication/state.ts +8 -2
  142. package/src/lib/components/Banner.tsx +1 -0
  143. package/src/lib/components/Heading.tsx +1 -1
  144. package/src/lib/components/Layout.tsx +1 -0
  145. package/src/lib/core/RouteGuard.tsx +44 -18
  146. package/src/lib/plugins/api-catalog/Catalog.tsx +23 -7
  147. package/src/lib/plugins/api-catalog/index.tsx +1 -0
  148. package/src/lib/plugins/markdown/MdxPage.tsx +5 -1
  149. package/src/lib/plugins/openapi/OperationList.tsx +15 -3
  150. package/src/lib/plugins/openapi/OperationListItem.tsx +8 -0
  151. package/src/lib/plugins/openapi/ParameterList.tsx +4 -0
  152. package/src/lib/plugins/openapi/PlaygroundDialogWrapper.tsx +7 -0
  153. package/src/lib/plugins/openapi/Sidecar.tsx +2 -1
  154. package/src/lib/plugins/openapi/playground/PathParams.tsx +8 -2
  155. package/src/lib/plugins/openapi/playground/Playground.tsx +61 -5
  156. package/src/lib/plugins/search-pagefind/PagefindSearch.tsx +135 -0
  157. package/src/lib/plugins/search-pagefind/ResultList.tsx +104 -0
  158. package/src/lib/plugins/search-pagefind/get-results.tsx +54 -0
  159. package/src/lib/plugins/search-pagefind/index.tsx +21 -0
  160. package/src/lib/plugins/search-pagefind/types.ts +118 -0
  161. package/src/lib/ui/Command.tsx +25 -3
  162. package/src/lib/util/useScrollToAnchor.ts +8 -8
  163. package/README.md +0 -121
  164. package/lib/MdxPage-DM9mE-G-.js +0 -193
  165. package/lib/MdxPage-DM9mE-G-.js.map +0 -1
  166. package/lib/OperationList-DWnNbwVg.js.map +0 -1
  167. package/lib/hook-4_6pQSo4.js +0 -1460
  168. package/lib/hook-4_6pQSo4.js.map +0 -1
  169. package/lib/index-DVBlM15k.js.map +0 -1
  170. package/lib/index-Du5aNddU.js +0 -509
  171. package/lib/index-Du5aNddU.js.map +0 -1
  172. package/lib/index.esm-CQHE3GEU.js +0 -691
  173. package/lib/index.esm-CQHE3GEU.js.map +0 -1
  174. package/lib/objectEntries-yMIkr2mI.js +0 -5
  175. package/lib/objectEntries-yMIkr2mI.js.map +0 -1
  176. package/lib/useScrollToAnchor-BW8y_cwU.js +0 -290
  177. package/lib/useScrollToAnchor-BW8y_cwU.js.map +0 -1
@@ -1,1385 +1,35 @@
1
- var ut = Object.defineProperty;
2
- var xe = (t) => {
3
- throw TypeError(t);
4
- };
5
- var dt = (t, e, r) => e in t ? ut(t, e, { enumerable: !0, configurable: !0, writable: !0, value: r }) : t[e] = r;
6
- var j = (t, e, r) => dt(t, typeof e != "symbol" ? e + "" : e, r), ve = (t, e, r) => e.has(t) || xe("Cannot " + r);
7
- var l = (t, e, r) => (ve(t, e, "read from private field"), r ? r.call(t) : e.get(t)), w = (t, e, r) => e.has(t) ? xe("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(t) : e.set(t, r), y = (t, e, r, s) => (ve(t, e, "write to private field"), s ? s.call(t, r) : e.set(t, r), r);
8
- var _ = (t, e, r, s) => ({
9
- set _(a) {
10
- y(t, e, a, r);
11
- },
12
- get _() {
13
- return l(t, e, s);
14
- }
15
- });
16
- import { a as Fe, H as le } from "./index.esm-CQHE3GEU.js";
17
- import { z as Be, J as ht } from "./index-DwT-v3zK.js";
18
- import { u as te, m as ft, O as ce, R as mt, S as gt, h as ue, f as pt, L as de } from "./chunk-IR6S3I6Y-D_3UmFIn.js";
19
- import { S as He, q as ze, Q as xt, n as P, r as ye, t as be, v as M, w as vt, x as yt, y as bt, z as jt, A as je, B as we, C as wt, h as Pe, D as ke, E as Pt, f as kt, k as z, a as D, F as Le, G as Ke, H as Ct, j as ae, b as St, Z as Nt, I as Et, J as Dt } from "./hook-4_6pQSo4.js";
20
- import { j as n } from "./jsx-runtime-CYK1ROHF.js";
21
- import * as U from "react";
22
- import Mt, { useRef as V, useEffect as A, createContext as he, StrictMode as $e, useState as L, useCallback as Ot, Suspense as fe, memo as Ue, forwardRef as At, Component as qt, createElement as Ce, useMemo as re, useContext as Tt } from "react";
23
- import { Z as Ze } from "./invariant-Caa8-XvF.js";
24
- import { E as Ye, S, a as It, R as Qt } from "./SlotletProvider-DdtIOUi6.js";
25
- import { Button as Rt } from "./ui/Button.js";
26
- import { Callout as Ft } from "./ui/Callout.js";
27
- import { M as Bt } from "./mutation-DTunCQKB.js";
28
- import * as Ht from "react-dom";
29
- import { C as me } from "./ClientOnly-E7hGysn1.js";
30
- import { CircleXIcon as zt, SearchIcon as Lt, SunIcon as Kt, MoonIcon as $t, MenuIcon as Ut, PanelLeftIcon as Zt } from "lucide-react";
31
- import { Drawer as Ve, DrawerTrigger as Xe, DrawerContent as Ge, DrawerTitle as _e } from "./ui/Drawer.js";
32
- import { c as Q } from "./cn-qaFjX9_3.js";
33
- import { s as Yt, S as Se, a as Vt, M as Xt, u as Gt } from "./useScrollToAnchor-BW8y_cwU.js";
34
- import { u as _t, H as Wt, P as Jt, a as er, V as tr, M as rr } from "./Markdown-DePfm7oQ.js";
35
- import { B as ie, S as We } from "./Spinner-1KrEmx1V.js";
36
- import { isSearchPlugin as sr, isProfileMenuPlugin as nr, isNavigationPlugin as ar, isEventConsumerPlugin as ir, needsInitialization as or, isApiIdentityPlugin as lr, isMdxProviderPlugin as cr, hasHead as ur } from "./zudoku.plugins.js";
37
- import { DropdownMenu as dr, DropdownMenuTrigger as hr, DropdownMenuContent as fr, DropdownMenuLabel as mr, DropdownMenuSeparator as se, DropdownMenuSub as gr, DropdownMenuSubTrigger as pr, DropdownMenuPortal as xr, DropdownMenuSubContent as vr, DropdownMenuItem as yr } from "./ui/DropdownMenu.js";
38
- import { j as Ne } from "./joinUrl-10po2Jdj.js";
39
- import { VisuallyHidden as Je } from "@radix-ui/react-visually-hidden";
40
- import { a as br } from "./index-CPNSgwSb.js";
41
- import { C as jr } from "./CategoryHeading-DpB47wvk.js";
42
- import { o as wr } from "./objectEntries-yMIkr2mI.js";
43
- var E, Ie, Pr = (Ie = class extends He {
44
- constructor(e = {}) {
45
- super();
46
- w(this, E);
47
- this.config = e, y(this, E, /* @__PURE__ */ new Map());
48
- }
49
- build(e, r, s) {
50
- const a = r.queryKey, o = r.queryHash ?? ze(a, r);
51
- let i = this.get(o);
52
- return i || (i = new xt({
53
- client: e,
54
- queryKey: a,
55
- queryHash: o,
56
- options: e.defaultQueryOptions(r),
57
- state: s,
58
- defaultOptions: e.getQueryDefaults(a)
59
- }), this.add(i)), i;
60
- }
61
- add(e) {
62
- l(this, E).has(e.queryHash) || (l(this, E).set(e.queryHash, e), this.notify({
63
- type: "added",
64
- query: e
65
- }));
66
- }
67
- remove(e) {
68
- const r = l(this, E).get(e.queryHash);
69
- r && (e.destroy(), r === e && l(this, E).delete(e.queryHash), this.notify({ type: "removed", query: e }));
70
- }
71
- clear() {
72
- P.batch(() => {
73
- this.getAll().forEach((e) => {
74
- this.remove(e);
75
- });
76
- });
77
- }
78
- get(e) {
79
- return l(this, E).get(e);
80
- }
81
- getAll() {
82
- return [...l(this, E).values()];
83
- }
84
- find(e) {
85
- const r = { exact: !0, ...e };
86
- return this.getAll().find(
87
- (s) => ye(r, s)
88
- );
89
- }
90
- findAll(e = {}) {
91
- const r = this.getAll();
92
- return Object.keys(e).length > 0 ? r.filter((s) => ye(e, s)) : r;
93
- }
94
- notify(e) {
95
- P.batch(() => {
96
- this.listeners.forEach((r) => {
97
- r(e);
98
- });
99
- });
100
- }
101
- onFocus() {
102
- P.batch(() => {
103
- this.getAll().forEach((e) => {
104
- e.onFocus();
105
- });
106
- });
107
- }
108
- onOnline() {
109
- P.batch(() => {
110
- this.getAll().forEach((e) => {
111
- e.onOnline();
112
- });
113
- });
114
- }
115
- }, E = new WeakMap(), Ie), O, C, Y, Qe, kr = (Qe = class extends He {
116
- constructor(e = {}) {
117
- super();
118
- w(this, O);
119
- w(this, C);
120
- w(this, Y);
121
- this.config = e, y(this, O, /* @__PURE__ */ new Set()), y(this, C, /* @__PURE__ */ new Map()), y(this, Y, 0);
122
- }
123
- build(e, r, s) {
124
- const a = new Bt({
125
- mutationCache: this,
126
- mutationId: ++_(this, Y)._,
127
- options: e.defaultMutationOptions(r),
128
- state: s
129
- });
130
- return this.add(a), a;
131
- }
132
- add(e) {
133
- l(this, O).add(e);
134
- const r = W(e);
135
- if (typeof r == "string") {
136
- const s = l(this, C).get(r);
137
- s ? s.push(e) : l(this, C).set(r, [e]);
138
- }
139
- this.notify({ type: "added", mutation: e });
140
- }
141
- remove(e) {
142
- if (l(this, O).delete(e)) {
143
- const r = W(e);
144
- if (typeof r == "string") {
145
- const s = l(this, C).get(r);
146
- if (s)
147
- if (s.length > 1) {
148
- const a = s.indexOf(e);
149
- a !== -1 && s.splice(a, 1);
150
- } else s[0] === e && l(this, C).delete(r);
151
- }
152
- }
153
- this.notify({ type: "removed", mutation: e });
154
- }
155
- canRun(e) {
156
- const r = W(e);
157
- if (typeof r == "string") {
158
- const s = l(this, C).get(r), a = s == null ? void 0 : s.find(
159
- (o) => o.state.status === "pending"
160
- );
161
- return !a || a === e;
162
- } else
163
- return !0;
164
- }
165
- runNext(e) {
166
- var s;
167
- const r = W(e);
168
- if (typeof r == "string") {
169
- const a = (s = l(this, C).get(r)) == null ? void 0 : s.find((o) => o !== e && o.state.isPaused);
170
- return (a == null ? void 0 : a.continue()) ?? Promise.resolve();
171
- } else
172
- return Promise.resolve();
173
- }
174
- clear() {
175
- P.batch(() => {
176
- l(this, O).forEach((e) => {
177
- this.notify({ type: "removed", mutation: e });
178
- }), l(this, O).clear(), l(this, C).clear();
179
- });
180
- }
181
- getAll() {
182
- return Array.from(l(this, O));
183
- }
184
- find(e) {
185
- const r = { exact: !0, ...e };
186
- return this.getAll().find(
187
- (s) => be(r, s)
188
- );
189
- }
190
- findAll(e = {}) {
191
- return this.getAll().filter((r) => be(e, r));
192
- }
193
- notify(e) {
194
- P.batch(() => {
195
- this.listeners.forEach((r) => {
196
- r(e);
197
- });
198
- });
199
- }
200
- resumePausedMutations() {
201
- const e = this.getAll().filter((r) => r.state.isPaused);
202
- return P.batch(
203
- () => Promise.all(
204
- e.map((r) => r.continue().catch(M))
205
- )
206
- );
207
- }
208
- }, O = new WeakMap(), C = new WeakMap(), Y = new WeakMap(), Qe);
209
- function W(t) {
210
- var e;
211
- return (e = t.options.scope) == null ? void 0 : e.id;
212
- }
213
- function Ee(t) {
214
- return {
215
- onFetch: (e, r) => {
216
- var g, m, h, f, v;
217
- const s = e.options, a = (h = (m = (g = e.fetchOptions) == null ? void 0 : g.meta) == null ? void 0 : m.fetchMore) == null ? void 0 : h.direction, o = ((f = e.state.data) == null ? void 0 : f.pages) || [], i = ((v = e.state.data) == null ? void 0 : v.pageParams) || [];
218
- let u = { pages: [], pageParams: [] }, d = 0;
219
- const c = async () => {
220
- let x = !1;
221
- const k = (b) => {
222
- Object.defineProperty(b, "signal", {
223
- enumerable: !0,
224
- get: () => (e.signal.aborted ? x = !0 : e.signal.addEventListener("abort", () => {
225
- x = !0;
226
- }), e.signal)
227
- });
228
- }, X = vt(e.options, e.fetchOptions), K = async (b, N, $) => {
229
- if (x)
230
- return Promise.reject();
231
- if (N == null && b.pages.length)
232
- return Promise.resolve(b);
233
- const G = {
234
- client: e.client,
235
- queryKey: e.queryKey,
236
- pageParam: N,
237
- direction: $ ? "backward" : "forward",
238
- meta: e.options.meta
239
- };
240
- k(G);
241
- const ct = await X(
242
- G
243
- ), { maxPages: ge } = e.options, pe = $ ? yt : bt;
244
- return {
245
- pages: pe(b.pages, ct, ge),
246
- pageParams: pe(b.pageParams, N, ge)
247
- };
248
- };
249
- if (a && o.length) {
250
- const b = a === "backward", N = b ? Cr : De, $ = {
251
- pages: o,
252
- pageParams: i
253
- }, G = N(s, $);
254
- u = await K($, G, b);
255
- } else {
256
- const b = t ?? o.length;
257
- do {
258
- const N = d === 0 ? i[0] ?? s.initialPageParam : De(s, u);
259
- if (d > 0 && N == null)
260
- break;
261
- u = await K(u, N), d++;
262
- } while (d < b);
263
- }
264
- return u;
265
- };
266
- e.options.persister ? e.fetchFn = () => {
267
- var x, k;
268
- return (k = (x = e.options).persister) == null ? void 0 : k.call(
269
- x,
270
- c,
271
- {
272
- client: e.client,
273
- queryKey: e.queryKey,
274
- meta: e.options.meta,
275
- signal: e.signal
276
- },
277
- r
278
- );
279
- } : e.fetchFn = c;
280
- }
281
- };
282
- }
283
- function De(t, { pages: e, pageParams: r }) {
284
- const s = e.length - 1;
285
- return e.length > 0 ? t.getNextPageParam(
286
- e[s],
287
- e,
288
- r[s],
289
- r
290
- ) : void 0;
291
- }
292
- function Cr(t, { pages: e, pageParams: r }) {
293
- var s;
294
- return e.length > 0 ? (s = t.getPreviousPageParam) == null ? void 0 : s.call(t, e[0], e, r[0], r) : void 0;
295
- }
296
- var p, q, T, R, F, I, B, H, Re, Sr = (Re = class {
297
- constructor(t = {}) {
298
- w(this, p);
299
- w(this, q);
300
- w(this, T);
301
- w(this, R);
302
- w(this, F);
303
- w(this, I);
304
- w(this, B);
305
- w(this, H);
306
- y(this, p, t.queryCache || new Pr()), y(this, q, t.mutationCache || new kr()), y(this, T, t.defaultOptions || {}), y(this, R, /* @__PURE__ */ new Map()), y(this, F, /* @__PURE__ */ new Map()), y(this, I, 0);
307
- }
308
- mount() {
309
- _(this, I)._++, l(this, I) === 1 && (y(this, B, jt.subscribe(async (t) => {
310
- t && (await this.resumePausedMutations(), l(this, p).onFocus());
311
- })), y(this, H, je.subscribe(async (t) => {
312
- t && (await this.resumePausedMutations(), l(this, p).onOnline());
313
- })));
314
- }
315
- unmount() {
316
- var t, e;
317
- _(this, I)._--, l(this, I) === 0 && ((t = l(this, B)) == null || t.call(this), y(this, B, void 0), (e = l(this, H)) == null || e.call(this), y(this, H, void 0));
318
- }
319
- isFetching(t) {
320
- return l(this, p).findAll({ ...t, fetchStatus: "fetching" }).length;
321
- }
322
- isMutating(t) {
323
- return l(this, q).findAll({ ...t, status: "pending" }).length;
324
- }
325
- getQueryData(t) {
326
- var r;
327
- const e = this.defaultQueryOptions({ queryKey: t });
328
- return (r = l(this, p).get(e.queryHash)) == null ? void 0 : r.state.data;
329
- }
330
- ensureQueryData(t) {
331
- const e = this.defaultQueryOptions(t), r = l(this, p).build(this, e), s = r.state.data;
332
- return s === void 0 ? this.fetchQuery(t) : (t.revalidateIfStale && r.isStaleByTime(we(e.staleTime, r)) && this.prefetchQuery(e), Promise.resolve(s));
333
- }
334
- getQueriesData(t) {
335
- return l(this, p).findAll(t).map(({ queryKey: e, state: r }) => {
336
- const s = r.data;
337
- return [e, s];
338
- });
339
- }
340
- setQueryData(t, e, r) {
341
- const s = this.defaultQueryOptions({ queryKey: t }), a = l(this, p).get(
342
- s.queryHash
343
- ), o = a == null ? void 0 : a.state.data, i = wt(e, o);
344
- if (i !== void 0)
345
- return l(this, p).build(this, s).setData(i, { ...r, manual: !0 });
346
- }
347
- setQueriesData(t, e, r) {
348
- return P.batch(
349
- () => l(this, p).findAll(t).map(({ queryKey: s }) => [
350
- s,
351
- this.setQueryData(s, e, r)
352
- ])
353
- );
354
- }
355
- getQueryState(t) {
356
- var r;
357
- const e = this.defaultQueryOptions({ queryKey: t });
358
- return (r = l(this, p).get(
359
- e.queryHash
360
- )) == null ? void 0 : r.state;
361
- }
362
- removeQueries(t) {
363
- const e = l(this, p);
364
- P.batch(() => {
365
- e.findAll(t).forEach((r) => {
366
- e.remove(r);
367
- });
368
- });
369
- }
370
- resetQueries(t, e) {
371
- const r = l(this, p), s = {
372
- type: "active",
373
- ...t
374
- };
375
- return P.batch(() => (r.findAll(t).forEach((a) => {
376
- a.reset();
377
- }), this.refetchQueries(s, e)));
378
- }
379
- cancelQueries(t, e = {}) {
380
- const r = { revert: !0, ...e }, s = P.batch(
381
- () => l(this, p).findAll(t).map((a) => a.cancel(r))
382
- );
383
- return Promise.all(s).then(M).catch(M);
384
- }
385
- invalidateQueries(t, e = {}) {
386
- return P.batch(() => {
387
- if (l(this, p).findAll(t).forEach((s) => {
388
- s.invalidate();
389
- }), (t == null ? void 0 : t.refetchType) === "none")
390
- return Promise.resolve();
391
- const r = {
392
- ...t,
393
- type: (t == null ? void 0 : t.refetchType) ?? (t == null ? void 0 : t.type) ?? "active"
394
- };
395
- return this.refetchQueries(r, e);
396
- });
397
- }
398
- refetchQueries(t, e = {}) {
399
- const r = {
400
- ...e,
401
- cancelRefetch: e.cancelRefetch ?? !0
402
- }, s = P.batch(
403
- () => l(this, p).findAll(t).filter((a) => !a.isDisabled()).map((a) => {
404
- let o = a.fetch(void 0, r);
405
- return r.throwOnError || (o = o.catch(M)), a.state.fetchStatus === "paused" ? Promise.resolve() : o;
406
- })
407
- );
408
- return Promise.all(s).then(M);
409
- }
410
- fetchQuery(t) {
411
- const e = this.defaultQueryOptions(t);
412
- e.retry === void 0 && (e.retry = !1);
413
- const r = l(this, p).build(this, e);
414
- return r.isStaleByTime(
415
- we(e.staleTime, r)
416
- ) ? r.fetch(e) : Promise.resolve(r.state.data);
417
- }
418
- prefetchQuery(t) {
419
- return this.fetchQuery(t).then(M).catch(M);
420
- }
421
- fetchInfiniteQuery(t) {
422
- return t.behavior = Ee(t.pages), this.fetchQuery(t);
423
- }
424
- prefetchInfiniteQuery(t) {
425
- return this.fetchInfiniteQuery(t).then(M).catch(M);
426
- }
427
- ensureInfiniteQueryData(t) {
428
- return t.behavior = Ee(t.pages), this.ensureQueryData(t);
429
- }
430
- resumePausedMutations() {
431
- return je.isOnline() ? l(this, q).resumePausedMutations() : Promise.resolve();
432
- }
433
- getQueryCache() {
434
- return l(this, p);
435
- }
436
- getMutationCache() {
437
- return l(this, q);
438
- }
439
- getDefaultOptions() {
440
- return l(this, T);
441
- }
442
- setDefaultOptions(t) {
443
- y(this, T, t);
444
- }
445
- setQueryDefaults(t, e) {
446
- l(this, R).set(Pe(t), {
447
- queryKey: t,
448
- defaultOptions: e
449
- });
450
- }
451
- getQueryDefaults(t) {
452
- const e = [...l(this, R).values()], r = {};
453
- return e.forEach((s) => {
454
- ke(t, s.queryKey) && Object.assign(r, s.defaultOptions);
455
- }), r;
456
- }
457
- setMutationDefaults(t, e) {
458
- l(this, F).set(Pe(t), {
459
- mutationKey: t,
460
- defaultOptions: e
461
- });
462
- }
463
- getMutationDefaults(t) {
464
- const e = [...l(this, F).values()];
465
- let r = {};
466
- return e.forEach((s) => {
467
- ke(t, s.mutationKey) && (r = { ...r, ...s.defaultOptions });
468
- }), r;
469
- }
470
- defaultQueryOptions(t) {
471
- if (t._defaulted)
472
- return t;
473
- const e = {
474
- ...l(this, T).queries,
475
- ...this.getQueryDefaults(t.queryKey),
476
- ...t,
477
- _defaulted: !0
478
- };
479
- return e.queryHash || (e.queryHash = ze(
480
- e.queryKey,
481
- e
482
- )), e.refetchOnReconnect === void 0 && (e.refetchOnReconnect = e.networkMode !== "always"), e.throwOnError === void 0 && (e.throwOnError = !!e.suspense), !e.networkMode && e.persister && (e.networkMode = "offlineFirst"), e.queryFn === Pt && (e.enabled = !1), e;
483
- }
484
- defaultMutationOptions(t) {
485
- return t != null && t._defaulted ? t : {
486
- ...l(this, T).mutations,
487
- ...(t == null ? void 0 : t.mutationKey) && this.getMutationDefaults(t.mutationKey),
488
- ...t,
489
- _defaulted: !0
490
- };
491
- }
492
- clear() {
493
- l(this, p).clear(), l(this, q).clear();
494
- }
495
- }, p = new WeakMap(), q = new WeakMap(), T = new WeakMap(), R = new WeakMap(), F = new WeakMap(), I = new WeakMap(), B = new WeakMap(), H = new WeakMap(), Re);
496
- function Nr(t) {
497
- return t;
498
- }
499
- function Me(t, e, r) {
500
- var d, c;
501
- if (typeof e != "object" || e === null)
502
- return;
503
- const s = t.getMutationCache(), a = t.getQueryCache(), o = ((d = r == null ? void 0 : r.defaultOptions) == null ? void 0 : d.deserializeData) ?? ((c = t.getDefaultOptions().hydrate) == null ? void 0 : c.deserializeData) ?? Nr, i = e.mutations || [], u = e.queries || [];
504
- i.forEach(({ state: g, ...m }) => {
505
- var h, f;
506
- s.build(
507
- t,
508
- {
509
- ...(h = t.getDefaultOptions().hydrate) == null ? void 0 : h.mutations,
510
- ...(f = r == null ? void 0 : r.defaultOptions) == null ? void 0 : f.mutations,
511
- ...m
512
- },
513
- g
514
- );
515
- }), u.forEach(({ queryKey: g, state: m, queryHash: h, meta: f, promise: v }) => {
516
- var X, K;
517
- let x = a.get(h);
518
- const k = m.data === void 0 ? m.data : o(m.data);
519
- if (x) {
520
- if (x.state.dataUpdatedAt < m.dataUpdatedAt) {
521
- const { fetchStatus: b, ...N } = m;
522
- x.setState({
523
- ...N,
524
- data: k
525
- });
526
- }
527
- } else
528
- x = a.build(
529
- t,
530
- {
531
- ...(X = t.getDefaultOptions().hydrate) == null ? void 0 : X.queries,
532
- ...(K = r == null ? void 0 : r.defaultOptions) == null ? void 0 : K.queries,
533
- queryKey: g,
534
- queryHash: h,
535
- meta: f
536
- },
537
- // Reset fetch status to idle to avoid
538
- // query being stuck in fetching state upon hydration
539
- {
540
- ...m,
541
- data: k,
542
- fetchStatus: "idle"
543
- }
544
- );
545
- if (v) {
546
- const b = Promise.resolve(v).then(o);
547
- x.fetch(void 0, { initialPromise: b });
548
- }
549
- });
550
- }
551
- var Oe = (t, e) => typeof t == "object" && t !== null && e in t, Er = ({
552
- children: t,
553
- options: e = {},
554
- state: r,
555
- queryClient: s
556
- }) => {
557
- const a = kt(s), [o, i] = U.useState(), u = U.useRef(e);
558
- return u.current = e, U.useMemo(() => {
559
- if (r) {
560
- if (typeof r != "object")
561
- return;
562
- const d = a.getQueryCache(), c = r.queries || [], g = [], m = [];
563
- for (const h of c) {
564
- const f = d.get(h.queryHash);
565
- if (!f)
566
- g.push(h);
567
- else {
568
- const v = h.state.dataUpdatedAt > f.state.dataUpdatedAt || // RSC special serialized then-able chunks
569
- Oe(h.promise, "status") && Oe(f.promise, "status") && h.promise.status !== f.promise.status, x = o == null ? void 0 : o.find(
570
- (k) => k.queryHash === h.queryHash
571
- );
572
- v && (!x || h.state.dataUpdatedAt > x.state.dataUpdatedAt) && m.push(h);
573
- }
574
- }
575
- g.length > 0 && Me(a, { queries: g }, u.current), m.length > 0 && i(
576
- (h) => h ? [...h, ...m] : m
577
- );
578
- }
579
- }, [a, o, r]), U.useEffect(() => {
580
- o && (Me(a, { queries: o }, u.current), i(void 0));
581
- }, [a, o]), t;
582
- };
583
- const Dr = (t) => {
584
- const e = V(t);
585
- return e.current = t, A(() => {
586
- e.current = t;
587
- }, [t]), e;
588
- }, Mr = () => {
589
- var o;
590
- const t = z(), e = D(), r = te(), s = Dr(r.pathname), a = (o = e.options.protectedRoutes) == null ? void 0 : o.some(
591
- (i) => ft({ path: i, end: !0 }, r.pathname)
592
- );
593
- if (A(() => {
594
- var i;
595
- !a || t.isPending || t.isAuthenticated || (i = e.authentication) == null || i.signIn({
596
- redirectTo: s.current
597
- });
598
- }, [
599
- a,
600
- t.isPending,
601
- t.isAuthenticated,
602
- e.authentication,
603
- s
604
- ]), a && !t.isAuthenticated)
605
- return null;
606
- if (a && !t.isAuthEnabled)
607
- throw new Ze("Authentication is not enabled", {
608
- title: "Authentication is not enabled",
609
- developerHint: "To use protectedRoutes you need authentication to be enabled"
610
- });
611
- return /* @__PURE__ */ n.jsx(ce, {});
612
- };
613
- function Or({ error: t }) {
614
- return /* @__PURE__ */ n.jsx(Ye, { error: t });
615
- }
616
- /**
617
- * react-router v7.1.5
618
- *
619
- * Copyright (c) Remix Software Inc.
620
- *
621
- * This source code is licensed under the MIT license found in the
622
- * LICENSE.md file in the root directory of this source tree.
623
- *
624
- * @license MIT
625
- */
626
- function Ar(t) {
627
- return /* @__PURE__ */ U.createElement(mt, { flushSync: Ht.flushSync, ...t });
628
- }
629
- const oe = he({ stagger: !1 }), qr = new Sr({
630
- defaultOptions: {
631
- queries: {
632
- staleTime: 1e3 * 60 * 5
633
- }
634
- }
635
- }), Tr = ({
636
- router: t,
637
- hydrate: e = !1
638
- }) => /* @__PURE__ */ n.jsx($e, { children: /* @__PURE__ */ n.jsx(Le, { client: qr, children: /* @__PURE__ */ n.jsx(Er, { state: e ? window.DATA : void 0, children: /* @__PURE__ */ n.jsx(Fe, { children: /* @__PURE__ */ n.jsx(oe.Provider, { value: { stagger: !e }, children: /* @__PURE__ */ n.jsx(Ar, { router: t }) }) }) }) }) }), Ir = ({
639
- router: t,
640
- context: e,
641
- queryClient: r,
642
- helmetContext: s
643
- }) => /* @__PURE__ */ n.jsx($e, { children: /* @__PURE__ */ n.jsx(Le, { client: r, children: /* @__PURE__ */ n.jsx(Fe, { context: s, children: /* @__PURE__ */ n.jsx(gt, { router: t, context: e }) }) }) });
644
- var Z = { exports: {} }, Qr = Z.exports, Ae;
645
- function Rr() {
646
- return Ae || (Ae = 1, function(t, e) {
647
- (function(r, s) {
648
- s(e, Mt);
649
- })(Qr, function(r, s) {
650
- const a = {
651
- delay: 500,
652
- minDuration: 200,
653
- ssr: !0
654
- };
655
- function o() {
656
- const [u, d] = s.useState(!0);
657
- return s.useEffect(() => {
658
- d(!1);
659
- }, []), u;
660
- }
661
- function i(u, d) {
662
- d = Object.assign({}, a, d);
663
- const c = o() && d.ssr, g = c && u ? "DISPLAY" : "IDLE", [m, h] = s.useState(g), f = s.useRef(null);
664
- return s.useEffect(() => {
665
- if (u && (m === "IDLE" || c)) {
666
- clearTimeout(f.current);
667
- const v = c ? 0 : d.delay;
668
- f.current = setTimeout(() => {
669
- if (!u)
670
- return h("IDLE");
671
- f.current = setTimeout(() => {
672
- h("EXPIRE");
673
- }, d.minDuration), h("DISPLAY");
674
- }, v), c || h("DELAY");
675
- }
676
- !u && m !== "DISPLAY" && (clearTimeout(f.current), h("IDLE"));
677
- }, [u, m, d.delay, d.minDuration, c]), s.useEffect(() => () => clearTimeout(f.current), []), m === "DISPLAY" || m === "EXPIRE";
678
- }
679
- r.defaultOptions = a, r.useSpinDelay = i;
680
- });
681
- }(Z, Z.exports)), Z.exports;
682
- }
683
- var Fr = Rr();
684
- const Br = () => {
685
- const t = te(), e = V(t.pathname);
686
- A(() => {
687
- const r = e.current !== t.pathname, s = t.hash !== "";
688
- r && !s && window.scrollTo(0, 0), e.current = t.pathname;
689
- }, [t.pathname, t.hash]);
690
- };
691
- function Hr({
692
- className: t,
693
- ...e
694
- }) {
695
- return /* @__PURE__ */ n.jsx(
696
- "div",
697
- {
698
- className: Q("animate-pulse rounded-md bg-muted", t),
699
- ...e
700
- }
701
- );
702
- }
703
- const qe = {
704
- info: "bg-blue-500",
705
- note: "bg-gray-500",
706
- tip: "bg-green-600",
707
- caution: "bg-orange-500",
708
- danger: "bg-rose-500"
709
- }, zr = () => {
710
- const { page: t } = D(), [e, r] = L(!0);
711
- if (!(t != null && t.banner) || !e)
712
- return /* @__PURE__ */ n.jsx("style", { children: ":root { --banner-height: 0px; }" });
713
- const s = t.banner.color && t.banner.color in qe ? qe[t.banner.color] : t.banner.color ? void 0 : "bg-primary", a = s ? {} : { backgroundColor: t.banner.color };
714
- return /* @__PURE__ */ n.jsxs(
715
- "div",
716
- {
717
- className: Q(
718
- "relative text-primary-foreground text-sm font-medium px-4 py-2 flex gap-2 items-center",
719
- s
720
- ),
721
- style: a,
722
- children: [
723
- /* @__PURE__ */ n.jsx("div", { className: "w-full", children: t.banner.message }),
724
- t.banner.dismissible && /* @__PURE__ */ n.jsx(
725
- "button",
726
- {
727
- type: "button",
728
- className: "md:absolute md:right-4 -m-1.5 p-1.5 hover:bg-accent-foreground/10 rounded-md",
729
- onClick: () => r(!1),
730
- children: /* @__PURE__ */ n.jsx(zt, { size: 16 })
731
- }
732
- )
733
- ]
734
- }
735
- );
736
- }, et = ({ className: t }) => {
737
- const e = D(), [r, s] = L(!1), a = Ot(() => s(!1), []);
738
- A(() => {
739
- if (r)
740
- return;
741
- function i(u) {
742
- u.key === "k" && (u.metaKey || u.ctrlKey) && (u.preventDefault(), s(!0));
743
- }
744
- return window.addEventListener("keydown", i), () => {
745
- window.removeEventListener("keydown", i);
746
- };
747
- }, [r, s]);
748
- const o = e.plugins.find(sr);
749
- return o ? /* @__PURE__ */ n.jsxs("div", { className: t, children: [
750
- /* @__PURE__ */ n.jsxs(
751
- "button",
752
- {
753
- type: "button",
754
- onClick: () => s(!0),
755
- 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",
756
- children: [
757
- /* @__PURE__ */ n.jsxs("div", { className: "flex items-center gap-2 flex-grow", children: [
758
- /* @__PURE__ */ n.jsx(Lt, { size: 14 }),
759
- "Search"
760
- ] }),
761
- /* @__PURE__ */ n.jsx("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", children: "⌘K" })
762
- ]
763
- }
764
- ),
765
- /* @__PURE__ */ n.jsx(fe, { fallback: null, children: o.renderSearch({
766
- isOpen: r,
767
- onClose: a
768
- }) })
769
- ] }) : null;
770
- }, tt = () => {
771
- const { resolvedTheme: t, setTheme: e } = Be();
772
- return /* @__PURE__ */ n.jsx(me, { fallback: /* @__PURE__ */ n.jsx(ie, { variant: "ghost", size: "icon" }), children: /* @__PURE__ */ n.jsxs(
773
- "button",
774
- {
775
- type: "button",
776
- className: "flex rounded-full border p-0.5 gap-0.5 group",
777
- onClick: () => e(t === "dark" ? "light" : "dark"),
778
- "aria-label": t === "dark" ? "Switch to light mode" : "Switch to dark mode",
779
- children: [
780
- /* @__PURE__ */ n.jsx(
781
- "div",
782
- {
783
- className: Q(
784
- "border border-transparent rounded-full p-0.5 [&>svg>circle]:transition-colors [&>svg>path]:transition-transform transition-all [&>svg>path]:duration-200 [&>svg>circle]:duration-500 [&>svg>circle]:fill-transparent",
785
- t === "light" && "border-border bg-muted",
786
- t === "dark" && "group-hover:[&>svg>path]:scale-110 group-hover:[&>svg>path]:-translate-x-[1px] group-hover:[&>svg>path]:-translate-y-[1px] group-hover:rotate-[15deg] "
787
- ),
788
- children: /* @__PURE__ */ n.jsx(Kt, { size: 16 })
789
- }
790
- ),
791
- /* @__PURE__ */ n.jsx(
792
- "div",
793
- {
794
- className: Q(
795
- "border border-transparent rounded-full p-0.5 transition-transform transform-gpu duration-500",
796
- t === "dark" && "border-border bg-muted [&>svg>path]:fill-white [&>svg>path]:stroke-transparent",
797
- t === "light" && "group-hover:rotate-[-10deg] [&>svg>path]:stroke-currentColor"
798
- ),
799
- children: /* @__PURE__ */ n.jsx($t, { size: 16 })
800
- }
801
- )
802
- ]
803
- }
804
- ) });
805
- }, rt = (t) => (e) => e.display === "auth" && t || e.display === "anon" && !t || !e.display || e.display === "always", Lr = () => {
806
- const { topNavigation: t } = D(), { isAuthenticated: e } = z();
807
- return t.length <= 1 ? /* @__PURE__ */ n.jsx("style", { children: ":root { --top-nav-height: 0px; }" }) : /* @__PURE__ */ n.jsx(fe, { children: /* @__PURE__ */ n.jsxs("div", { className: " items-center justify-between px-8 h-[--top-nav-height] hidden lg:flex text-sm", children: [
808
- /* @__PURE__ */ n.jsx("nav", { className: "text-sm", children: /* @__PURE__ */ n.jsx("ul", { className: "flex flex-row items-center gap-8", children: t.filter(rt(e)).map((r) => /* @__PURE__ */ n.jsx("li", { children: /* @__PURE__ */ n.jsx(st, { ...r }) }, r.id)) }) }),
809
- /* @__PURE__ */ n.jsx(S, { name: "top-navigation-side" })
810
- ] }) });
811
- }, st = ({
812
- id: t,
813
- label: e,
814
- default: r
815
- }) => {
816
- var c;
817
- const { sidebars: s } = D(), a = s[t], o = Ke(), i = !!ue().location, u = ((c = o.topNavItem) == null ? void 0 : c.id) === t && !i, d = r ?? (a ? Ct(a, (g) => {
818
- if (g.type === "doc") return ae(g.id);
819
- }) : ae(t));
820
- if (!d)
821
- throw new Ze("Page not found.", {
822
- developerHint: `No links found in top navigation for '${t}'. Check that the sidebar isn't empty or that a default link is set.`
823
- });
824
- return (
825
- // We don't use isActive here because it has to be inside the sidebar,
826
- // the top nav id doesn't necessarily start with the sidebar id
827
- /* @__PURE__ */ n.jsx(
828
- pt,
829
- {
830
- className: ({ isPending: g }) => br(
831
- "block lg:py-3.5 font-medium -mb-px",
832
- u || g ? "border-primary text-foreground" : "border-transparent text-foreground/75 hover:text-foreground hover:border-accent-foreground/25"
833
- ),
834
- to: d,
835
- children: e
836
- }
837
- )
838
- );
839
- }, Kr = () => {
840
- const { topNavigation: t } = D(), { isAuthenticated: e } = z(), [r, s] = L(!1);
841
- return /* @__PURE__ */ n.jsxs(
842
- Ve,
843
- {
844
- direction: "right",
845
- open: r,
846
- onOpenChange: (a) => s(a),
847
- children: [
848
- /* @__PURE__ */ n.jsx("div", { className: "flex lg:hidden justify-self-end", children: /* @__PURE__ */ n.jsx(Xe, { className: "lg:hidden", children: /* @__PURE__ */ n.jsx(Ut, { size: 22 }) }) }),
849
- /* @__PURE__ */ n.jsx(
850
- Ge,
851
- {
852
- className: "lg:hidden h-[100dvh] right-0 left-auto w-[320px] rounded-none",
853
- "aria-describedby": void 0,
854
- children: /* @__PURE__ */ n.jsxs("div", { className: "p-4 overflow-y-auto overscroll-none", children: [
855
- /* @__PURE__ */ n.jsx(Je, { children: /* @__PURE__ */ n.jsx(_e, { children: "Navigation" }) }),
856
- /* @__PURE__ */ n.jsx(et, { className: "flex p-4" }),
857
- /* @__PURE__ */ n.jsxs("ul", { className: "flex flex-col items-center gap-4 p-4", children: [
858
- /* @__PURE__ */ n.jsx("li", { children: /* @__PURE__ */ n.jsx(tt, {}) }),
859
- t.filter(rt(e)).map((a) => /* @__PURE__ */ n.jsx("li", { children: /* @__PURE__ */ n.jsx("button", { onClick: () => s(!1), children: /* @__PURE__ */ n.jsx(st, { ...a }) }) }, a.label))
860
- ] })
861
- ] })
862
- }
863
- )
864
- ]
865
- }
866
- );
867
- }, ee = ({ item: t }) => t.children ? /* @__PURE__ */ n.jsxs(gr, { children: [
868
- /* @__PURE__ */ n.jsx(pr, { children: t.label }),
869
- /* @__PURE__ */ n.jsx(xr, { children: /* @__PURE__ */ n.jsx(vr, { children: t.children.map((e, r) => (
870
- // eslint-disable-next-line react/no-array-index-key
871
- /* @__PURE__ */ n.jsx(ee, { item: e }, r)
872
- )) }) })
873
- ] }, t.label) : /* @__PURE__ */ n.jsx(de, { to: t.path ?? "", children: /* @__PURE__ */ n.jsxs(yr, { className: "flex gap-2", children: [
874
- t.icon && /* @__PURE__ */ n.jsx(t.icon, { size: 16, strokeWidth: 1, absoluteStrokeWidth: !0 }),
875
- t.label
876
- ] }, t.label) }), nt = Ue(function() {
877
- const e = z(), { isAuthenticated: r, profile: s, isAuthEnabled: a } = z(), o = D(), { page: i, plugins: u } = o, d = u.filter((c) => nr(c)).flatMap((c) => c.getProfileMenuItems(o)).sort((c) => c.weight ?? 0);
878
- return /* @__PURE__ */ n.jsxs("header", { className: "sticky lg:top-0 z-10 bg-background/80 backdrop-blur w-full", children: [
879
- /* @__PURE__ */ n.jsx(zr, {}),
880
- /* @__PURE__ */ n.jsx("div", { className: "border-b", children: /* @__PURE__ */ n.jsxs("div", { className: "max-w-screen-2xl 2xl:border-x 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-8 h-[--top-header-height]", children: [
881
- /* @__PURE__ */ n.jsx("div", { className: "flex", children: /* @__PURE__ */ n.jsx(de, { to: "/", children: /* @__PURE__ */ n.jsxs("div", { className: "flex items-center gap-3.5", children: [
882
- (i == null ? void 0 : i.logo) && /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
883
- /* @__PURE__ */ n.jsx(
884
- "img",
885
- {
886
- src: /https?:\/\//.test(i.logo.src.light) ? i.logo.src.light : Ne(
887
- "/",
888
- i.logo.src.light
889
- ),
890
- alt: i.logo.alt ?? i.pageTitle,
891
- style: { width: i.logo.width },
892
- className: "h-10 dark:hidden",
893
- loading: "lazy"
894
- }
895
- ),
896
- /* @__PURE__ */ n.jsx(
897
- "img",
898
- {
899
- src: /https?:\/\//.test(i.logo.src.dark) ? i.logo.src.dark : Ne(
900
- "/",
901
- i.logo.src.dark
902
- ),
903
- alt: i.logo.alt ?? i.pageTitle,
904
- style: { width: i.logo.width },
905
- className: "h-10 hidden dark:block",
906
- loading: "lazy"
907
- }
908
- )
909
- ] }),
910
- /* @__PURE__ */ n.jsx("span", { className: "font-bold text-2xl text-foreground/85 tracking-wide", children: i == null ? void 0 : i.pageTitle })
911
- ] }) }) }),
912
- /* @__PURE__ */ n.jsxs("div", { className: "grid grid-cols-1 lg:grid-cols-[--sidecar-grid-cols] items-center gap-8", children: [
913
- /* @__PURE__ */ n.jsx("div", { className: "w-full justify-center hidden lg:flex", children: /* @__PURE__ */ n.jsx(et, {}) }),
914
- /* @__PURE__ */ n.jsx(Kr, {}),
915
- /* @__PURE__ */ n.jsxs("div", { className: "hidden lg:flex items-center justify-self-end text-sm gap-2", children: [
916
- /* @__PURE__ */ n.jsx(S, { name: "head-navigation-start" }),
917
- a && /* @__PURE__ */ n.jsx(
918
- me,
919
- {
920
- fallback: /* @__PURE__ */ n.jsx(Hr, { className: "rounded h-5 w-24 mr-4" }),
921
- children: r ? Object.values(d).length > 0 && /* @__PURE__ */ n.jsxs(dr, { modal: !1, children: [
922
- /* @__PURE__ */ n.jsx(hr, { asChild: !0, children: /* @__PURE__ */ n.jsx(ie, { variant: "ghost", children: s != null && s.name ? `${s.name}` : "My Account" }) }),
923
- /* @__PURE__ */ n.jsxs(fr, { className: "w-56", children: [
924
- /* @__PURE__ */ n.jsxs(mr, { children: [
925
- s != null && s.name ? `${s.name}` : "My Account",
926
- (s == null ? void 0 : s.email) && /* @__PURE__ */ n.jsx("div", { className: "font-normal text-muted-foreground", children: s.email })
927
- ] }),
928
- d.filter((c) => c.category === "top").length > 0 && /* @__PURE__ */ n.jsx(se, {}),
929
- d.filter((c) => c.category === "top").map((c) => /* @__PURE__ */ n.jsx(ee, { item: c }, c.label)),
930
- d.filter(
931
- (c) => !c.category || c.category === "middle"
932
- ).length > 0 && /* @__PURE__ */ n.jsx(se, {}),
933
- d.filter(
934
- (c) => !c.category || c.category === "middle"
935
- ).map((c) => /* @__PURE__ */ n.jsx(ee, { item: c }, c.label)),
936
- d.filter((c) => c.category === "bottom").length > 0 && /* @__PURE__ */ n.jsx(se, {}),
937
- d.filter((c) => c.category === "bottom").map((c) => /* @__PURE__ */ n.jsx(ee, { item: c }, c.label))
938
- ] })
939
- ] }) : /* @__PURE__ */ n.jsx(ie, { variant: "ghost", onClick: () => e.login(), children: "Login" })
940
- }
941
- ),
942
- /* @__PURE__ */ n.jsx(S, { name: "head-navigation-end" }),
943
- /* @__PURE__ */ n.jsx(tt, {})
944
- ] })
945
- ] })
946
- ] }) }),
947
- /* @__PURE__ */ n.jsx("div", { className: "border-b hidden lg:block", children: /* @__PURE__ */ n.jsxs("div", { className: "max-w-screen-2xl mx-auto 2xl:border-x", children: [
948
- /* @__PURE__ */ n.jsx(S, { name: "top-navigation-before" }),
949
- /* @__PURE__ */ n.jsx(Lr, {}),
950
- /* @__PURE__ */ n.jsx(S, { name: "top-navigation-after" })
951
- ] }) })
952
- ] });
953
- }), at = At(({ children: t, className: e, pushMainContent: r }, s) => /* @__PURE__ */ n.jsx(
954
- "nav",
955
- {
956
- "data-navigation": String(r),
957
- className: Q(
958
- "scrollbar peer hidden lg:flex flex-col fixed text-sm overflow-y-auto shrink-0 border-r pr-6",
959
- "-mx-[--padding-nav-item] pb-20 pt-[--padding-content-top]",
960
- "w-[--side-nav-width] h-[calc(100%-var(--header-height))] scroll-pt-2 gap-2",
961
- !r && "border-r-0",
962
- e
963
- ),
964
- ref: s,
965
- children: t
966
- }
967
- ));
968
- at.displayName = "SidebarWrapper";
969
- const $r = ({
970
- onRequestClose: t
971
- }) => {
972
- const e = V(null), r = Ke();
973
- return A(() => {
974
- var a;
975
- const s = (a = e.current) == null ? void 0 : a.querySelector('[aria-current="page"]');
976
- Yt(s ?? null);
977
- }, []), /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
978
- /* @__PURE__ */ n.jsxs(
979
- at,
980
- {
981
- ref: e,
982
- pushMainContent: r.sidebar.length > 0,
983
- children: [
984
- /* @__PURE__ */ n.jsx(S, { name: "zudoku-before-navigation" }),
985
- r.sidebar.map((s) => /* @__PURE__ */ n.jsx(Se, { item: s }, s.label)),
986
- /* @__PURE__ */ n.jsx(S, { name: "zudoku-after-navigation" })
987
- ]
988
- }
989
- ),
990
- /* @__PURE__ */ n.jsx(
991
- Ge,
992
- {
993
- className: "lg:hidden h-[100dvh] left-0 w-[320px] rounded-none",
994
- "aria-describedby": void 0,
995
- children: /* @__PURE__ */ n.jsxs("div", { className: "p-4 overflow-y-auto overscroll-none", children: [
996
- /* @__PURE__ */ n.jsx(Je, { children: /* @__PURE__ */ n.jsx(_e, { children: "Sidebar" }) }),
997
- r.sidebar.map((s) => /* @__PURE__ */ n.jsx(
998
- Se,
999
- {
1000
- item: s,
1001
- onRequestClose: t
1002
- },
1003
- s.label
1004
- ))
1005
- ] })
1006
- }
1007
- )
1008
- ] });
1009
- }, Te = () => /* @__PURE__ */ n.jsx("main", { className: "grid h-[calc(100vh-var(--header-height))] place-items-center", children: /* @__PURE__ */ n.jsx(We, {}) }), Ur = ({ children: t }) => {
1010
- const e = te(), { setActiveAnchor: r } = _t(), { meta: s, authentication: a } = D();
1011
- Vt(), Br();
1012
- const o = V(e.pathname);
1013
- A(() => {
1014
- var g;
1015
- (g = a == null ? void 0 : a.onPageLoad) == null || g.call(a);
1016
- }, [a]), A(() => {
1017
- e.pathname !== o.current && r(""), o.current = e.pathname;
1018
- }, [e.pathname, r]);
1019
- const i = !!ue().location, u = Fr.useSpinDelay(i, {
1020
- delay: 300,
1021
- minDuration: 500
1022
- }), [d, c] = L(!1);
1023
- return /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
1024
- !1,
1025
- /* @__PURE__ */ n.jsxs(le, { titleTemplate: s == null ? void 0 : s.title, children: [
1026
- (s == null ? void 0 : s.description) && /* @__PURE__ */ n.jsx("meta", { name: "description", content: s.description }),
1027
- (s == null ? void 0 : s.favicon) && /* @__PURE__ */ n.jsx("link", { rel: "icon", href: s.favicon })
1028
- ] }),
1029
- /* @__PURE__ */ n.jsx(S, { name: "layout-before-head" }),
1030
- /* @__PURE__ */ n.jsx(nt, {}),
1031
- /* @__PURE__ */ n.jsx(S, { name: "layout-after-head" }),
1032
- /* @__PURE__ */ n.jsx("div", { className: "w-full min-h-[calc(100vh-var(--header-height))] max-w-screen-2xl mx-auto px-4 lg:px-8 2xl:border-x", children: u ? /* @__PURE__ */ n.jsx(Te, {}) : /* @__PURE__ */ n.jsx(fe, { fallback: /* @__PURE__ */ n.jsx(Te, {}), children: /* @__PURE__ */ n.jsxs(
1033
- Ve,
1034
- {
1035
- direction: "left",
1036
- open: d,
1037
- onOpenChange: (g) => c(g),
1038
- children: [
1039
- /* @__PURE__ */ n.jsx($r, { onRequestClose: () => c(!1) }),
1040
- /* @__PURE__ */ n.jsx(
1041
- "div",
1042
- {
1043
- className: Q(
1044
- "lg:hidden -mx-4 px-4 py-2 sticky bg-background/80 backdrop-blur z-10 top-0 left-0 right-0 border-b",
1045
- "peer-data-[navigation=false]:hidden"
1046
- ),
1047
- children: /* @__PURE__ */ n.jsxs(Xe, { className: "flex items-center gap-2", children: [
1048
- /* @__PURE__ */ n.jsx(Zt, { size: 16, strokeWidth: 1.5 }),
1049
- /* @__PURE__ */ n.jsx("span", { className: "text-sm", children: "Menu" })
1050
- ] })
1051
- }
1052
- ),
1053
- /* @__PURE__ */ n.jsxs(
1054
- "main",
1055
- {
1056
- className: Q(
1057
- "h-full dark:border-white/10 translate-x-0",
1058
- "lg:overflow-visible",
1059
- // This works in tandem with the `SidebarWrapper` component
1060
- "lg:peer-data-[navigation=true]:w-[calc(100%-var(--side-nav-width))]",
1061
- "lg:peer-data-[navigation=true]:translate-x-[--side-nav-width] lg:peer-data-[navigation=true]:pl-12"
1062
- ),
1063
- children: [
1064
- /* @__PURE__ */ n.jsx(S, { name: "zudoku-before-content" }),
1065
- t ?? /* @__PURE__ */ n.jsx(ce, {}),
1066
- /* @__PURE__ */ n.jsx(S, { name: "zudoku-after-content" })
1067
- ]
1068
- }
1069
- )
1070
- ]
1071
- }
1072
- ) }) })
1073
- ] });
1074
- }, Zr = ({
1075
- title: t = "An error occurred",
1076
- message: e,
1077
- category: r
1078
- }) => /* @__PURE__ */ n.jsxs("div", { className: Jt + " h-full pt-[--padding-content-top]", children: [
1079
- r && /* @__PURE__ */ n.jsx(jr, { children: r }),
1080
- t && /* @__PURE__ */ n.jsx(Wt, { level: 1, className: "flex gap-3.5 items-center", children: t }),
1081
- /* @__PURE__ */ n.jsx("p", { children: e })
1082
- ] }), Yr = (t) => {
1083
- switch (t) {
1084
- case 400:
1085
- return {
1086
- title: "Bad Request",
1087
- message: "The request could not be understood by the server due to malformed syntax."
1088
- };
1089
- case 403:
1090
- return {
1091
- title: "Forbidden",
1092
- message: "You don't have permission to access this resource."
1093
- };
1094
- case 404:
1095
- return {
1096
- title: "Not Found",
1097
- message: "The requested resource could not be found."
1098
- };
1099
- case 405:
1100
- return {
1101
- title: "Method Not Allowed",
1102
- message: "The request method is not supported for the requested resource."
1103
- };
1104
- case 414:
1105
- return {
1106
- title: "Request URI Too Large",
1107
- message: "The request URI is too large."
1108
- };
1109
- case 416:
1110
- return {
1111
- title: "Range Not Satisfiable",
1112
- message: "The server cannot satisfy the request range."
1113
- };
1114
- case 500:
1115
- return {
1116
- title: "Internal Server Error",
1117
- message: "An unexpected error occurred while processing your request."
1118
- };
1119
- case 501:
1120
- return {
1121
- title: "Not Implemented",
1122
- message: "The server does not support the functionality required to fulfill the request."
1123
- };
1124
- case 502:
1125
- return {
1126
- title: "Bad Gateway",
1127
- message: "The server received an invalid response from the upstream server."
1128
- };
1129
- case 503:
1130
- return {
1131
- title: "Service Unavailable",
1132
- message: "The server is temporarily unable to handle the request."
1133
- };
1134
- case 504:
1135
- return {
1136
- title: "Gateway Timeout",
1137
- message: "The server did not receive a timely response from the upstream server."
1138
- };
1139
- default:
1140
- return {
1141
- title: "An error occurred",
1142
- message: "Something went wrong while processing your request."
1143
- };
1144
- }
1145
- }, Vr = ({ statusCode: t, message: e }) => {
1146
- const r = Yr(t);
1147
- return /* @__PURE__ */ n.jsx(
1148
- Zr,
1149
- {
1150
- title: r.title,
1151
- message: e ?? r.message,
1152
- category: t
1153
- }
1154
- );
1155
- }, Xr = he(null), ne = {
1156
- didCatch: !1,
1157
- error: null
1158
- };
1159
- class Gr extends qt {
1160
- constructor(e) {
1161
- super(e), this.resetErrorBoundary = this.resetErrorBoundary.bind(this), this.state = ne;
1162
- }
1163
- static getDerivedStateFromError(e) {
1164
- return {
1165
- didCatch: !0,
1166
- error: e
1167
- };
1168
- }
1169
- resetErrorBoundary() {
1170
- const {
1171
- error: e
1172
- } = this.state;
1173
- if (e !== null) {
1174
- for (var r, s, a = arguments.length, o = new Array(a), i = 0; i < a; i++)
1175
- o[i] = arguments[i];
1176
- (r = (s = this.props).onReset) === null || r === void 0 || r.call(s, {
1177
- args: o,
1178
- reason: "imperative-api"
1179
- }), this.setState(ne);
1180
- }
1181
- }
1182
- componentDidCatch(e, r) {
1183
- var s, a;
1184
- (s = (a = this.props).onError) === null || s === void 0 || s.call(a, e, r);
1185
- }
1186
- componentDidUpdate(e, r) {
1187
- const {
1188
- didCatch: s
1189
- } = this.state, {
1190
- resetKeys: a
1191
- } = this.props;
1192
- if (s && r.error !== null && _r(e.resetKeys, a)) {
1193
- var o, i;
1194
- (o = (i = this.props).onReset) === null || o === void 0 || o.call(i, {
1195
- next: a,
1196
- prev: e.resetKeys,
1197
- reason: "keys"
1198
- }), this.setState(ne);
1199
- }
1200
- }
1201
- render() {
1202
- const {
1203
- children: e,
1204
- fallbackRender: r,
1205
- FallbackComponent: s,
1206
- fallback: a
1207
- } = this.props, {
1208
- didCatch: o,
1209
- error: i
1210
- } = this.state;
1211
- let u = e;
1212
- if (o) {
1213
- const d = {
1214
- error: i,
1215
- resetErrorBoundary: this.resetErrorBoundary
1216
- };
1217
- if (typeof r == "function")
1218
- u = r(d);
1219
- else if (s)
1220
- u = Ce(s, d);
1221
- else if (a !== void 0)
1222
- u = a;
1223
- else
1224
- throw i;
1225
- }
1226
- return Ce(Xr.Provider, {
1227
- value: {
1228
- didCatch: o,
1229
- error: i,
1230
- resetErrorBoundary: this.resetErrorBoundary
1231
- }
1232
- }, u);
1233
- }
1234
- }
1235
- function _r() {
1236
- let t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : [], e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : [];
1237
- return t.length !== e.length || t.some((r, s) => !Object.is(r, e[s]));
1238
- }
1239
- let Wr = () => ({
1240
- emit(t, ...e) {
1241
- for (let r = this.events[t] || [], s = 0, a = r.length; s < a; s++)
1242
- r[s](...e);
1243
- },
1244
- events: {},
1245
- on(t, e) {
1246
- var r;
1247
- return ((r = this.events)[t] || (r[t] = [])).push(e), () => {
1248
- var s;
1249
- this.events[t] = (s = this.events[t]) == null ? void 0 : s.filter((a) => e !== a);
1250
- };
1251
- }
1252
- });
1253
- class Jr {
1254
- constructor(e) {
1255
- j(this, "plugins");
1256
- j(this, "sidebars");
1257
- j(this, "topNavigation");
1258
- j(this, "meta");
1259
- j(this, "page");
1260
- j(this, "authentication");
1261
- j(this, "navigationPlugins");
1262
- j(this, "emitter", Wr());
1263
- j(this, "initialize", async () => {
1264
- await Promise.all(
1265
- this.plugins.filter(or).map((e) => {
1266
- var r;
1267
- return (r = e.initialize) == null ? void 0 : r.call(e, this);
1268
- })
1269
- );
1270
- });
1271
- j(this, "getApiIdentities", async () => (await Promise.all(
1272
- this.plugins.filter(lr).map((r) => r.getIdentities(this))
1273
- )).flat());
1274
- j(this, "emitEvent", (e, ...r) => this.emitter.emit(e, ...r));
1275
- j(this, "getPluginSidebar", async (e) => (await Promise.all(
1276
- this.navigationPlugins.map(
1277
- (s) => {
1278
- var a;
1279
- return (a = s.getSidebar) == null ? void 0 : a.call(s, ae(e));
1280
- }
1281
- )
1282
- )).flatMap((s) => s ?? []));
1283
- j(this, "signRequest", async (e) => {
1284
- if (!this.authentication)
1285
- throw new Error("No authentication provider configured");
1286
- const r = await this.authentication.getAccessToken();
1287
- return e.headers.set("Authorization", `Bearer ${r}`), e;
1288
- });
1289
- this.options = e, this.plugins = e.plugins ?? [], this.topNavigation = e.topNavigation ?? [], this.sidebars = e.sidebars ?? {}, this.navigationPlugins = this.plugins.filter(ar), this.authentication = e.authentication, this.meta = e.metadata, this.page = e.page, this.plugins.forEach((r) => {
1290
- ir(r) && wr(r.events).forEach(([s, a]) => {
1291
- this.emitter.on(s, a);
1292
- });
1293
- });
1294
- }
1295
- addEventListener(e, r) {
1296
- return this.emitter.on(e, r);
1297
- }
1298
- }
1299
- function es({ error: t, resetErrorBoundary: e }) {
1300
- return /* @__PURE__ */ n.jsx(Ye, { error: t });
1301
- }
1302
- const J = globalThis;
1303
- (!J.requestIdleCallback || !J.cancelIdleCallback) && (J.requestIdleCallback = (t) => setTimeout(t, 1), J.cancelIdleCallback = clearTimeout);
1304
- const it = {
1305
- Header: nt
1306
- }, ts = he(it), rs = ts.Provider, ss = () => {
1307
- const t = te(), e = D(), r = V(void 0);
1308
- return A(() => {
1309
- e.emitEvent("location", {
1310
- from: r.current,
1311
- to: t
1312
- }), r.current = t;
1313
- }, [e, t]), null;
1314
- }, ns = ({
1315
- children: t,
1316
- context: e
1317
- }) => (St({
1318
- queryFn: async () => (await e.initialize(), !0),
1319
- queryKey: ["zudoku-initialize"]
1320
- }), /* @__PURE__ */ n.jsx(Nt.Provider, { value: e, children: t })), ot = Ue(
1321
- ({ children: t, ...e }) => {
1322
- var m, h;
1323
- const r = re(
1324
- () => ({ ...it, ...e.overrides }),
1325
- [e.overrides]
1326
- ), s = re(() => {
1327
- var v;
1328
- return {
1329
- ...(e.plugins ?? []).filter(cr).flatMap(
1330
- (x) => x.getMdxComponents ? [x.getMdxComponents()] : []
1331
- ).reduce(
1332
- (x, k) => ({ ...x, ...k }),
1333
- {}
1334
- ),
1335
- ...er,
1336
- ...(v = e.mdx) == null ? void 0 : v.components
1337
- };
1338
- }, [(m = e.mdx) == null ? void 0 : m.components, e.plugins]), { stagger: a } = Tt(oe), [o, i] = L(!1), u = re(
1339
- () => o ? { stagger: !0 } : { stagger: a },
1340
- [a, o]
1341
- ), d = ue();
1342
- A(() => {
1343
- o || i(!0);
1344
- }, [o, d.location]);
1345
- const [c] = L(() => new Jr(e)), g = (h = e.plugins) == null ? void 0 : h.flatMap((f) => {
1346
- var v;
1347
- return ur(f) ? ((v = f.getHead) == null ? void 0 : v.call(f)) ?? [] : [];
1348
- }).map((f, v) => /* @__PURE__ */ n.jsx(le, { children: f }, v));
1349
- return /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
1350
- g,
1351
- /* @__PURE__ */ n.jsx(oe.Provider, { value: u, children: /* @__PURE__ */ n.jsxs(ns, { context: c, children: [
1352
- /* @__PURE__ */ n.jsx(ss, {}),
1353
- /* @__PURE__ */ n.jsx(Xt, { components: s, children: /* @__PURE__ */ n.jsx(ht, { attribute: "class", disableTransitionOnChange: !0, children: /* @__PURE__ */ n.jsx(rs, { value: r, children: /* @__PURE__ */ n.jsx(It, { slotlets: e.slotlets, children: /* @__PURE__ */ n.jsx(tr, { children: t ?? /* @__PURE__ */ n.jsx(ce, {}) }) }) }) }) })
1354
- ] }) })
1355
- ] });
1356
- }
1357
- );
1358
- ot.displayName = "ZudokoInner";
1359
- const lt = (t) => /* @__PURE__ */ n.jsx(Gr, { FallbackComponent: es, children: /* @__PURE__ */ n.jsx(ot, { ...t }) });
1360
- lt.displayName = "Zudoku";
1361
- const Os = Gt, As = Ur, qs = Qt, Ts = Or, Is = Tr, Qs = Ir, Rs = Mr, Fs = le, Bs = D, Hs = z, zs = Et, Ls = Dt, Ks = lt, $s = Vr, Us = Ft, Zs = rr, Ys = We, Vs = me, Xs = Rt, Gs = de, _s = Be;
1
+ import "./useScrollToAnchor-DKyrbZoy.js";
2
+ import "./index-DwT-v3zK.js";
3
+ import "./chunk-IR6S3I6Y-CRDBmIgK.js";
4
+ import "./hook-LTe5qHSc.js";
5
+ import { B as d, c as S, k, C as l, h, j as B, H as E, b as c, L as H, M as L, d as M, R, S as Z, i as f, g, Z as y, u as A, f as b, a as j, l as v, e as w } from "./index-vn5bsvmU.js";
6
+ import "./SlotletProvider-CYFNHuok.js";
7
+ import "./ui/Button.js";
8
+ import "./ui/Callout.js";
9
+ import "./ClientOnly-E7hGysn1.js";
10
+ import "./Markdown-DofXBcqg.js";
11
+ import "./Spinner-1KrEmx1V.js";
1362
12
  export {
1363
- Is as Bootstrap,
1364
- Qs as BootstrapStatic,
1365
- Xs as Button,
1366
- Ls as CACHE_KEYS,
1367
- Us as Callout,
1368
- Vs as ClientOnly,
1369
- Fs as Head,
1370
- As as Layout,
1371
- Gs as Link,
1372
- Zs as Markdown,
1373
- Rs as RouteGuard,
1374
- qs as RouterError,
1375
- Ts as ServerError,
1376
- Ys as Spinner,
1377
- $s as StatusPage,
1378
- Ks as Zudoku,
1379
- Hs as useAuth,
1380
- zs as useCache,
1381
- Os as useMDXComponents,
1382
- _s as useTheme,
1383
- Bs as useZudoku
13
+ d as Bootstrap,
14
+ S as BootstrapStatic,
15
+ k as Button,
16
+ l as CACHE_KEYS,
17
+ h as Callout,
18
+ B as ClientOnly,
19
+ E as Head,
20
+ c as Layout,
21
+ H as Link,
22
+ L as Markdown,
23
+ M as RouteGuard,
24
+ R as RouterError,
25
+ Z as ServerError,
26
+ f as Spinner,
27
+ g as StatusPage,
28
+ y as Zudoku,
29
+ A as useAuth,
30
+ b as useCache,
31
+ j as useMDXComponents,
32
+ v as useTheme,
33
+ w as useZudoku
1384
34
  };
1385
35
  //# sourceMappingURL=zudoku.components.js.map