zudoku 0.56.0 → 0.57.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 (119) hide show
  1. package/dist/app/demo.js +1 -1
  2. package/dist/app/entry.client.js +1 -1
  3. package/dist/app/entry.server.js +1 -1
  4. package/dist/app/main.d.ts +1 -1
  5. package/dist/app/main.js +3 -2
  6. package/dist/app/main.js.map +1 -1
  7. package/dist/app/standalone.js +1 -1
  8. package/dist/config/validators/ProtectedRoutesSchema.d.ts +5 -4
  9. package/dist/config/validators/ProtectedRoutesSchema.js +4 -13
  10. package/dist/config/validators/ProtectedRoutesSchema.js.map +1 -1
  11. package/dist/config/validators/validate.d.ts +1 -13
  12. package/dist/lib/components/index.d.ts +0 -29
  13. package/dist/lib/components/index.js +0 -17
  14. package/dist/lib/components/index.js.map +1 -1
  15. package/dist/lib/core/ZudokuContext.d.ts +2 -1
  16. package/dist/lib/core/ZudokuContext.js +13 -3
  17. package/dist/lib/core/ZudokuContext.js.map +1 -1
  18. package/dist/lib/core/__internal.d.ts +37 -0
  19. package/dist/lib/core/__internal.js +26 -0
  20. package/dist/lib/core/__internal.js.map +1 -0
  21. package/dist/lib/core/router.d.ts +1 -0
  22. package/dist/lib/core/router.js +2 -0
  23. package/dist/lib/core/router.js.map +1 -0
  24. package/lib/CategoryHeading-DCpZu3yG.js +17 -0
  25. package/lib/CategoryHeading-DCpZu3yG.js.map +1 -0
  26. package/lib/{Command-CfgGXMfJ.js → Command-CDn17s8X.js} +2 -2
  27. package/lib/{Command-CfgGXMfJ.js.map → Command-CDn17s8X.js.map} +1 -1
  28. package/lib/{Dialog-B7YnrNnG.js → Dialog-BrIjMmUK.js} +3 -3
  29. package/lib/{Dialog-B7YnrNnG.js.map → Dialog-BrIjMmUK.js.map} +1 -1
  30. package/lib/{MdxPage-D49lfheg.js → MdxPage-BmOQ5m5g.js} +16 -15
  31. package/lib/{MdxPage-D49lfheg.js.map → MdxPage-BmOQ5m5g.js.map} +1 -1
  32. package/lib/{OAuthErrorPage-COKL9zOi.js → OAuthErrorPage-Jv3r8wnL.js} +7 -7
  33. package/lib/{OAuthErrorPage-COKL9zOi.js.map → OAuthErrorPage-Jv3r8wnL.js.map} +1 -1
  34. package/lib/{OasProvider-CCv_-asV.js → OasProvider-CA_lpILt.js} +3 -3
  35. package/lib/{OasProvider-CCv_-asV.js.map → OasProvider-CA_lpILt.js.map} +1 -1
  36. package/lib/{OperationList-DkS0B0y1.js → OperationList-C-TObVw6.js} +17 -16
  37. package/lib/{OperationList-DkS0B0y1.js.map → OperationList-C-TObVw6.js.map} +1 -1
  38. package/lib/{Pagination-VfR2DCXf.js → Pagination-CBiRGddW.js} +3 -3
  39. package/lib/{Pagination-VfR2DCXf.js.map → Pagination-CBiRGddW.js.map} +1 -1
  40. package/lib/RouteGuard-JLH6tCY8.js +56 -0
  41. package/lib/RouteGuard-JLH6tCY8.js.map +1 -0
  42. package/lib/RouterError-DcVonMP1.js +41 -0
  43. package/lib/RouterError-DcVonMP1.js.map +1 -0
  44. package/lib/{SchemaList-B7ezc5Uy.js → SchemaList-BeYWvBC7.js} +15 -14
  45. package/lib/{SchemaList-B7ezc5Uy.js.map → SchemaList-BeYWvBC7.js.map} +1 -1
  46. package/lib/{SchemaView-BuL-ycaR.js → SchemaView-CRcShewo.js} +4 -4
  47. package/lib/{SchemaView-BuL-ycaR.js.map → SchemaView-CRcShewo.js.map} +1 -1
  48. package/lib/{Select-B9h5k2Pz.js → Select-C3efYI1n.js} +8 -8
  49. package/lib/{Select-B9h5k2Pz.js.map → Select-C3efYI1n.js.map} +1 -1
  50. package/lib/{SignUp-Cn_gZ7UN.js → SignUp-CxBGHgba.js} +11 -11
  51. package/lib/{SignUp-Cn_gZ7UN.js.map → SignUp-CxBGHgba.js.map} +1 -1
  52. package/lib/{Slot-BFCJzl5J.js → Slot-DOtTvoyj.js} +1678 -1912
  53. package/lib/{Slot-BFCJzl5J.js.map → Slot-DOtTvoyj.js.map} +1 -1
  54. package/lib/{SyntaxHighlight-CSW4eaIJ.js → SyntaxHighlight-GR0eix_L.js} +2 -2
  55. package/lib/{SyntaxHighlight-CSW4eaIJ.js.map → SyntaxHighlight-GR0eix_L.js.map} +1 -1
  56. package/lib/{Toc-B9K7a2FS.js → Toc-BlcGIkXc.js} +2 -2
  57. package/lib/{Toc-B9K7a2FS.js.map → Toc-BlcGIkXc.js.map} +1 -1
  58. package/lib/{ZudokuContext-mDDq1hft.js → ZudokuContext-BuJD7yIX.js} +28 -28
  59. package/lib/{ZudokuContext-mDDq1hft.js.map → ZudokuContext-BuJD7yIX.js.map} +1 -1
  60. package/lib/chunk-QMGIS6GS-DqecZ6nq.js +9204 -0
  61. package/lib/chunk-QMGIS6GS-DqecZ6nq.js.map +1 -0
  62. package/lib/{circular-BMUvC5RK.js → circular-CGTcsqA3.js} +2 -2
  63. package/lib/{circular-BMUvC5RK.js.map → circular-CGTcsqA3.js.map} +1 -1
  64. package/lib/{createServer-I8dX2VSu.js → createServer-DjgpuLne.js} +4 -4
  65. package/lib/{createServer-I8dX2VSu.js.map → createServer-DjgpuLne.js.map} +1 -1
  66. package/lib/{errors-D2Qdkul6.js → errors-CrI3s7mR.js} +2 -2
  67. package/lib/{errors-D2Qdkul6.js.map → errors-CrI3s7mR.js.map} +1 -1
  68. package/lib/{hook-CGx8MPrU.js → hook-bv3iuX7X.js} +2 -2
  69. package/lib/{hook-CGx8MPrU.js.map → hook-bv3iuX7X.js.map} +1 -1
  70. package/lib/{index-DZqSbZzE.js → index-CvTWnHZF.js} +17 -17
  71. package/lib/{index-DZqSbZzE.js.map → index-CvTWnHZF.js.map} +1 -1
  72. package/lib/index-DzO-Qh6S.js +1061 -0
  73. package/lib/index-DzO-Qh6S.js.map +1 -0
  74. package/lib/{index-ChOC1gfC.js → index-HarEI51d.js} +2 -2
  75. package/lib/{index-ChOC1gfC.js.map → index-HarEI51d.js.map} +1 -1
  76. package/lib/{RouteGuard-CSi9-hSR.js → index.esm-BnYHxCYC.js} +226 -281
  77. package/lib/index.esm-BnYHxCYC.js.map +1 -0
  78. package/lib/mutation-Dy_5up8v.js +196 -0
  79. package/lib/mutation-Dy_5up8v.js.map +1 -0
  80. package/lib/ui/Command.js +1 -1
  81. package/lib/ui/SyntaxHighlight.js +2 -2
  82. package/lib/{useExposedProps-DUoV7MCU.js → useExposedProps-BH9aq4MD.js} +32 -32
  83. package/lib/{useExposedProps-DUoV7MCU.js.map → useExposedProps-BH9aq4MD.js.map} +1 -1
  84. package/lib/useLatest-hmRS46UF.js +11 -0
  85. package/lib/useLatest-hmRS46UF.js.map +1 -0
  86. package/lib/zudoku.__internal.js +2965 -0
  87. package/lib/zudoku.__internal.js.map +1 -0
  88. package/lib/zudoku.auth-auth0.js +1 -1
  89. package/lib/zudoku.auth-azureb2c.js +5 -5
  90. package/lib/zudoku.auth-clerk.js +2 -2
  91. package/lib/zudoku.auth-openid.js +5 -5
  92. package/lib/zudoku.auth-supabase.js +2 -2
  93. package/lib/zudoku.components.js +20 -29
  94. package/lib/zudoku.hooks.js +4 -4
  95. package/lib/zudoku.plugin-api-catalog.js +18 -18
  96. package/lib/zudoku.plugin-api-keys.js +27 -26
  97. package/lib/zudoku.plugin-api-keys.js.map +1 -1
  98. package/lib/zudoku.plugin-custom-pages.js +1 -1
  99. package/lib/zudoku.plugin-markdown.js +1 -1
  100. package/lib/zudoku.plugin-openapi.js +4 -4
  101. package/lib/zudoku.plugin-redirect.js +3 -3
  102. package/lib/zudoku.plugin-search-pagefind.js +14 -14
  103. package/lib/zudoku.router.js +123 -0
  104. package/lib/zudoku.router.js.map +1 -0
  105. package/package.json +9 -1
  106. package/src/app/demo.tsx +1 -1
  107. package/src/app/entry.client.tsx +1 -1
  108. package/src/app/entry.server.tsx +1 -1
  109. package/src/app/main.tsx +4 -3
  110. package/src/app/standalone.tsx +1 -1
  111. package/src/lib/components/index.ts +0 -20
  112. package/src/lib/core/ZudokuContext.ts +22 -5
  113. package/src/lib/core/__internal.tsx +30 -0
  114. package/src/lib/core/router.ts +1 -0
  115. package/lib/RouteGuard-CSi9-hSR.js.map +0 -1
  116. package/lib/chunk-QMGIS6GS-CdEm9pzB.js +0 -1839
  117. package/lib/chunk-QMGIS6GS-CdEm9pzB.js.map +0 -1
  118. package/lib/index-Cc70HIQT.js +0 -4087
  119. package/lib/index-Cc70HIQT.js.map +0 -1
@@ -0,0 +1,1061 @@
1
+ import { H as be } from "./index.esm-BnYHxCYC.js";
2
+ import { z as je, M as rt, J as nt, u as ot } from "./useExposedProps-BH9aq4MD.js";
3
+ import { aQ as Ee, N as st, L as re, aM as Se, O as at } from "./chunk-QMGIS6GS-DqecZ6nq.js";
4
+ import { u as it, a as z } from "./hook-bv3iuX7X.js";
5
+ import { Button as ct } from "./ui/Button.js";
6
+ import { Callout as lt } from "./ui/Callout.js";
7
+ import { j as q, d as k, m as Ce, o as ut, p as dt, b as ft, N as mt, Z as ht, g as pt, f as gt, C as vt } from "./ZudokuContext-BuJD7yIX.js";
8
+ import { C as F } from "./ClientOnly-E7hGysn1.js";
9
+ import { E as xt, a as I, d as yt, b as bt, c as jt, V as Et, M as St, T as Ct } from "./Slot-DOtTvoyj.js";
10
+ import { S as wt } from "./Spinner-mNLZ6awP.js";
11
+ import { j as r } from "./jsx-runtime-C5mzlN2N.js";
12
+ import { Component as Pt, createElement as ie, createContext as ne, useState as L, useRef as D, useCallback as _, useEffect as O, Suspense as we, Fragment as Nt, memo as Pe, useMemo as W, useContext as Tt } from "react";
13
+ import { isNavigationPlugin as ce, isAuthenticationPlugin as Mt, isEventConsumerPlugin as _t, needsInitialization as At, isApiIdentityPlugin as Rt, isProfileMenuPlugin as Ne, isSearchPlugin as kt, isMdxProviderPlugin as Ot, hasHead as $t } from "./zudoku.plugins.js";
14
+ import { B as J } from "./Button-B3o-2Xdf.js";
15
+ import { c as R } from "./cn-dYga0KKN.js";
16
+ import { DropdownMenu as It, DropdownMenuTrigger as Dt, DropdownMenuContent as Ft, DropdownMenuLabel as Lt, DropdownMenuSeparator as Q, DropdownMenuSub as zt, DropdownMenuSubTrigger as qt, DropdownMenuPortal as Bt, DropdownMenuSubContent as Yt, DropdownMenuItem as Ht } from "./ui/DropdownMenu.js";
17
+ import { CircleXIcon as Zt, ChevronRightIcon as Kt, SearchIcon as Ut, SunIcon as Vt, MoonIcon as Wt, MenuIcon as Qt } from "lucide-react";
18
+ import { VisuallyHidden as Xt } from "@radix-ui/react-visually-hidden";
19
+ import { D as Gt, a as Jt, b as er, c as tr } from "./Drawer-DJ05s2pH.js";
20
+ import { a as rr } from "./index-DI5SPFK9.js";
21
+ const nr = ne(null), X = {
22
+ didCatch: !1,
23
+ error: null
24
+ };
25
+ class or extends Pt {
26
+ constructor(t) {
27
+ super(t), this.resetErrorBoundary = this.resetErrorBoundary.bind(this), this.state = X;
28
+ }
29
+ static getDerivedStateFromError(t) {
30
+ return {
31
+ didCatch: !0,
32
+ error: t
33
+ };
34
+ }
35
+ resetErrorBoundary() {
36
+ const {
37
+ error: t
38
+ } = this.state;
39
+ if (t !== null) {
40
+ for (var n, o, i = arguments.length, c = new Array(i), s = 0; s < i; s++)
41
+ c[s] = arguments[s];
42
+ (n = (o = this.props).onReset) === null || n === void 0 || n.call(o, {
43
+ args: c,
44
+ reason: "imperative-api"
45
+ }), this.setState(X);
46
+ }
47
+ }
48
+ componentDidCatch(t, n) {
49
+ var o, i;
50
+ (o = (i = this.props).onError) === null || o === void 0 || o.call(i, t, n);
51
+ }
52
+ componentDidUpdate(t, n) {
53
+ const {
54
+ didCatch: o
55
+ } = this.state, {
56
+ resetKeys: i
57
+ } = this.props;
58
+ if (o && n.error !== null && sr(t.resetKeys, i)) {
59
+ var c, s;
60
+ (c = (s = this.props).onReset) === null || c === void 0 || c.call(s, {
61
+ next: i,
62
+ prev: t.resetKeys,
63
+ reason: "keys"
64
+ }), this.setState(X);
65
+ }
66
+ }
67
+ render() {
68
+ const {
69
+ children: t,
70
+ fallbackRender: n,
71
+ FallbackComponent: o,
72
+ fallback: i
73
+ } = this.props, {
74
+ didCatch: c,
75
+ error: s
76
+ } = this.state;
77
+ let d = t;
78
+ if (c) {
79
+ const v = {
80
+ error: s,
81
+ resetErrorBoundary: this.resetErrorBoundary
82
+ };
83
+ if (typeof n == "function")
84
+ d = n(v);
85
+ else if (o)
86
+ d = ie(o, v);
87
+ else if (i !== void 0)
88
+ d = i;
89
+ else
90
+ throw s;
91
+ }
92
+ return ie(nr.Provider, {
93
+ value: {
94
+ didCatch: c,
95
+ error: s,
96
+ resetErrorBoundary: this.resetErrorBoundary
97
+ }
98
+ }, d);
99
+ }
100
+ }
101
+ function sr() {
102
+ let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : [], t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : [];
103
+ return e.length !== t.length || e.some((n, o) => !Object.is(n, t[o]));
104
+ }
105
+ let ar = () => ({
106
+ emit(e, ...t) {
107
+ for (let n = this.events[e] || [], o = 0, i = n.length; o < i; o++)
108
+ n[o](...t);
109
+ },
110
+ events: {},
111
+ on(e, t) {
112
+ return (this.events[e] ||= []).push(t), () => {
113
+ this.events[e] = this.events[e]?.filter((n) => t !== n);
114
+ };
115
+ }
116
+ });
117
+ const ir = (e) => Object.entries(e), le = (e) => {
118
+ if (e)
119
+ return Array.isArray(e) ? Object.fromEntries(
120
+ e.map((t) => [
121
+ t,
122
+ (n) => n.auth.isAuthenticated
123
+ ])
124
+ ) : e;
125
+ };
126
+ class cr {
127
+ plugins;
128
+ navigation;
129
+ meta;
130
+ site;
131
+ authentication;
132
+ queryClient;
133
+ options;
134
+ navigationPlugins;
135
+ emitter = ar();
136
+ constructor(t, n) {
137
+ const i = {
138
+ ...Object.fromEntries(
139
+ (t.plugins ?? []).flatMap((c) => {
140
+ if (!ce(c)) return [];
141
+ const s = c.getProtectedRoutes?.();
142
+ return s ? Object.entries(le(s) ?? {}) : [];
143
+ })
144
+ ),
145
+ ...le(t.protectedRoutes)
146
+ };
147
+ this.queryClient = n, this.options = { ...t, protectedRoutes: i }, this.plugins = t.plugins ?? [], this.navigation = t.navigation ?? [], this.navigationPlugins = this.plugins.filter(ce), this.authentication = this.plugins.find(Mt), this.meta = t.metadata, this.site = t.site, this.plugins.forEach((c) => {
148
+ _t(c) && ir(c.events).forEach(([s, d]) => {
149
+ this.emitter.on(s, d);
150
+ });
151
+ }), it.subscribe((c, s) => {
152
+ this.emitEvent("auth", {
153
+ prev: s,
154
+ next: c
155
+ });
156
+ });
157
+ }
158
+ initialize = async () => {
159
+ await Promise.all(
160
+ this.plugins.filter(At).map((t) => t.initialize?.(this))
161
+ );
162
+ };
163
+ getApiIdentities = async () => (await Promise.all(
164
+ this.plugins.filter(Rt).map((n) => n.getIdentities(this))
165
+ )).flat();
166
+ addEventListener(t, n) {
167
+ return this.emitter.on(t, n);
168
+ }
169
+ emitEvent = (t, ...n) => this.emitter.emit(t, ...n);
170
+ getPluginNavigation = async (t) => (await Promise.all(
171
+ this.navigationPlugins.map(
172
+ (o) => o.getNavigation?.(q(t), this)
173
+ )
174
+ )).flatMap((o) => o ?? []);
175
+ getProfileMenuItems = () => this.plugins.filter((n) => Ne(n)).flatMap((n) => n.getProfileMenuItems(this)).sort(lr(["top", "middle", "bottom"])).sort((n) => n.weight ?? 0);
176
+ signRequest = async (t) => {
177
+ if (!this.authentication)
178
+ throw new Error("No authentication provider configured");
179
+ return await this.authentication.signRequest(t);
180
+ };
181
+ }
182
+ const lr = (e) => (t, n) => {
183
+ const o = e.indexOf(t.category ?? "middle"), i = e.indexOf(n.category ?? "middle");
184
+ return o - i;
185
+ };
186
+ function ur({ error: e, resetErrorBoundary: t }) {
187
+ return /* @__PURE__ */ r.jsx(xt, { error: e });
188
+ }
189
+ const ue = ne({ stagger: !1 }), Y = globalThis;
190
+ (!Y.requestIdleCallback || !Y.cancelIdleCallback) && (Y.requestIdleCallback = (e) => setTimeout(e, 1), Y.cancelIdleCallback = clearTimeout);
191
+ function ee({
192
+ className: e,
193
+ ...t
194
+ }) {
195
+ return /* @__PURE__ */ r.jsx(
196
+ "div",
197
+ {
198
+ className: R("animate-pulse rounded-md bg-muted", e),
199
+ ...t
200
+ }
201
+ );
202
+ }
203
+ const de = {
204
+ info: "bg-blue-500",
205
+ note: "bg-gray-500",
206
+ tip: "bg-green-600",
207
+ caution: "bg-orange-500",
208
+ danger: "bg-rose-500"
209
+ }, dr = () => {
210
+ const { site: e } = k(), [t, n] = L(!0);
211
+ if (!e?.banner || !t)
212
+ return /* @__PURE__ */ r.jsx("style", { children: ":root { --banner-height: 0px; }" });
213
+ const o = e.banner.color && e.banner.color in de ? de[e.banner.color] : e.banner.color ? void 0 : "bg-primary", i = o ? {} : { backgroundColor: e.banner.color };
214
+ return /* @__PURE__ */ r.jsxs(
215
+ "div",
216
+ {
217
+ className: R(
218
+ "relative text-primary-foreground text-sm font-medium px-4 py-2 flex gap-2 items-center lg:h-(--banner-height)",
219
+ o
220
+ ),
221
+ style: i,
222
+ children: [
223
+ /* @__PURE__ */ r.jsx("div", { className: "w-full", children: e.banner.message }),
224
+ e.banner.dismissible && /* @__PURE__ */ r.jsx(
225
+ "button",
226
+ {
227
+ type: "button",
228
+ className: "md:absolute md:end-4 -m-1.5 p-1.5 hover:bg-accent-foreground/10 rounded-md",
229
+ onClick: () => n(!1),
230
+ children: /* @__PURE__ */ r.jsx(Zt, { size: 16 })
231
+ }
232
+ )
233
+ ]
234
+ }
235
+ );
236
+ }, Te = (e) => /* @__PURE__ */ r.jsxs(
237
+ "svg",
238
+ {
239
+ xmlns: "http://www.w3.org/2000/svg",
240
+ viewBox: "0 0 132 100",
241
+ fill: "none",
242
+ ...e,
243
+ children: [
244
+ /* @__PURE__ */ r.jsx(
245
+ "path",
246
+ {
247
+ fill: "currentColor",
248
+ fillRule: "evenodd",
249
+ d: "M80.092 2.963A4.66 4.66 0 0 1 84.449 0h34.049c6.325 0 10.835 6.135 8.948 12.172L116.653 46.71a4.688 4.688 0 0 1-4.474 3.29H75c-5.178 0-7.813 4.687-9.375 9.374-1.288 3.864-11.07 28.963-14.467 37.662A4.66 4.66 0 0 1 46.801 100H12.75c-6.324 0-10.834-6.134-8.947-12.171l10.793-34.54A4.688 4.688 0 0 1 19.071 50H56.25c5.178 0 7.813-4.687 9.375-9.375 1.288-3.864 11.07-28.962 14.467-37.662Z",
250
+ clipRule: "evenodd"
251
+ }
252
+ ),
253
+ /* @__PURE__ */ r.jsx(
254
+ "path",
255
+ {
256
+ fill: "currentColor",
257
+ d: "M83.54 57.813a7.813 7.813 0 0 0-7.316 5.07L63.888 95.777c-.766 2.043.744 4.222 2.926 4.222h36.828c5.211 0 9.875-3.232 11.704-8.11l8.821-23.522c1.915-5.107-1.861-10.555-7.315-10.555H83.539ZM29.17 0a12.5 12.5 0 0 0-11.704 8.111l-8.82 23.521c-1.915 5.107 1.86 10.556 7.315 10.556h33.312a7.813 7.813 0 0 0 7.316-5.07L68.924 4.223C69.691 2.18 68.18 0 65.998 0H29.17Z"
258
+ }
259
+ )
260
+ ]
261
+ }
262
+ );
263
+ Te.displayName = "ZudokuLogo";
264
+ const fr = ({ className: e }) => /* @__PURE__ */ r.jsxs(
265
+ "a",
266
+ {
267
+ href: "https://zudoku.dev",
268
+ target: "_blank",
269
+ rel: "noopener noreferrer",
270
+ className: R(
271
+ "flex justify-between items-center w-full border border-transparent hover:border-border rounded-full hover:shadow-xs h-7 px-3 text-nowrap hover:bg-muted/80 transition-all",
272
+ e
273
+ ),
274
+ children: [
275
+ /* @__PURE__ */ r.jsxs("div", { className: "opacity-70 hover:opacity-100 transition-opacity gap-1.5 text-[11px] font-medium rounded-full h-7 flex items-center text-nowrap", children: [
276
+ /* @__PURE__ */ r.jsx(Te, { className: "w-3.5 h-3.5 dark:fill-white" }),
277
+ "powered by ",
278
+ "Zudoku"
279
+ ] }),
280
+ /* @__PURE__ */ r.jsx("div", { className: "text-xs font-medium opacity-70 hover:text-foreground transition-colors cursor-pointer", children: /* @__PURE__ */ r.jsx(
281
+ Kt,
282
+ {
283
+ size: 12,
284
+ absoluteStrokeWidth: !0,
285
+ strokeWidth: 1.5,
286
+ className: "rtl:rotate-180"
287
+ }
288
+ ) })
289
+ ]
290
+ }
291
+ );
292
+ function K() {
293
+ return K = Object.assign ? Object.assign.bind() : function(e) {
294
+ for (var t = 1; t < arguments.length; t++) {
295
+ var n = arguments[t];
296
+ for (var o in n) ({}).hasOwnProperty.call(n, o) && (e[o] = n[o]);
297
+ }
298
+ return e;
299
+ }, K.apply(null, arguments);
300
+ }
301
+ var H = { exports: {} }, h = {};
302
+ /** @license React v16.13.1
303
+ * react-is.production.min.js
304
+ *
305
+ * Copyright (c) Facebook, Inc. and its affiliates.
306
+ *
307
+ * This source code is licensed under the MIT license found in the
308
+ * LICENSE file in the root directory of this source tree.
309
+ */
310
+ var fe;
311
+ function mr() {
312
+ if (fe) return h;
313
+ fe = 1;
314
+ var e = typeof Symbol == "function" && Symbol.for, t = e ? Symbol.for("react.element") : 60103, n = e ? Symbol.for("react.portal") : 60106, o = e ? Symbol.for("react.fragment") : 60107, i = e ? Symbol.for("react.strict_mode") : 60108, c = e ? Symbol.for("react.profiler") : 60114, s = e ? Symbol.for("react.provider") : 60109, d = e ? Symbol.for("react.context") : 60110, v = e ? Symbol.for("react.async_mode") : 60111, f = e ? Symbol.for("react.concurrent_mode") : 60111, b = e ? Symbol.for("react.forward_ref") : 60112, y = e ? Symbol.for("react.suspense") : 60113, m = e ? Symbol.for("react.suspense_list") : 60120, l = e ? Symbol.for("react.memo") : 60115, g = e ? Symbol.for("react.lazy") : 60116, S = e ? Symbol.for("react.block") : 60121, C = e ? Symbol.for("react.fundamental") : 60117, w = e ? Symbol.for("react.responder") : 60118, P = e ? Symbol.for("react.scope") : 60119;
315
+ function j(a) {
316
+ if (typeof a == "object" && a !== null) {
317
+ var x = a.$$typeof;
318
+ switch (x) {
319
+ case t:
320
+ switch (a = a.type, a) {
321
+ case v:
322
+ case f:
323
+ case o:
324
+ case c:
325
+ case i:
326
+ case y:
327
+ return a;
328
+ default:
329
+ switch (a = a && a.$$typeof, a) {
330
+ case d:
331
+ case b:
332
+ case g:
333
+ case l:
334
+ case s:
335
+ return a;
336
+ default:
337
+ return x;
338
+ }
339
+ }
340
+ case n:
341
+ return x;
342
+ }
343
+ }
344
+ }
345
+ function E(a) {
346
+ return j(a) === f;
347
+ }
348
+ return h.AsyncMode = v, h.ConcurrentMode = f, h.ContextConsumer = d, h.ContextProvider = s, h.Element = t, h.ForwardRef = b, h.Fragment = o, h.Lazy = g, h.Memo = l, h.Portal = n, h.Profiler = c, h.StrictMode = i, h.Suspense = y, h.isAsyncMode = function(a) {
349
+ return E(a) || j(a) === v;
350
+ }, h.isConcurrentMode = E, h.isContextConsumer = function(a) {
351
+ return j(a) === d;
352
+ }, h.isContextProvider = function(a) {
353
+ return j(a) === s;
354
+ }, h.isElement = function(a) {
355
+ return typeof a == "object" && a !== null && a.$$typeof === t;
356
+ }, h.isForwardRef = function(a) {
357
+ return j(a) === b;
358
+ }, h.isFragment = function(a) {
359
+ return j(a) === o;
360
+ }, h.isLazy = function(a) {
361
+ return j(a) === g;
362
+ }, h.isMemo = function(a) {
363
+ return j(a) === l;
364
+ }, h.isPortal = function(a) {
365
+ return j(a) === n;
366
+ }, h.isProfiler = function(a) {
367
+ return j(a) === c;
368
+ }, h.isStrictMode = function(a) {
369
+ return j(a) === i;
370
+ }, h.isSuspense = function(a) {
371
+ return j(a) === y;
372
+ }, h.isValidElementType = function(a) {
373
+ return typeof a == "string" || typeof a == "function" || a === o || a === f || a === c || a === i || a === y || a === m || typeof a == "object" && a !== null && (a.$$typeof === g || a.$$typeof === l || a.$$typeof === s || a.$$typeof === d || a.$$typeof === b || a.$$typeof === C || a.$$typeof === w || a.$$typeof === P || a.$$typeof === S);
374
+ }, h.typeOf = j, h;
375
+ }
376
+ var p = {};
377
+ /** @license React v16.13.1
378
+ * react-is.development.js
379
+ *
380
+ * Copyright (c) Facebook, Inc. and its affiliates.
381
+ *
382
+ * This source code is licensed under the MIT license found in the
383
+ * LICENSE file in the root directory of this source tree.
384
+ */
385
+ var me;
386
+ function hr() {
387
+ return me || (me = 1, process.env.NODE_ENV !== "production" && function() {
388
+ var e = typeof Symbol == "function" && Symbol.for, t = e ? Symbol.for("react.element") : 60103, n = e ? Symbol.for("react.portal") : 60106, o = e ? Symbol.for("react.fragment") : 60107, i = e ? Symbol.for("react.strict_mode") : 60108, c = e ? Symbol.for("react.profiler") : 60114, s = e ? Symbol.for("react.provider") : 60109, d = e ? Symbol.for("react.context") : 60110, v = e ? Symbol.for("react.async_mode") : 60111, f = e ? Symbol.for("react.concurrent_mode") : 60111, b = e ? Symbol.for("react.forward_ref") : 60112, y = e ? Symbol.for("react.suspense") : 60113, m = e ? Symbol.for("react.suspense_list") : 60120, l = e ? Symbol.for("react.memo") : 60115, g = e ? Symbol.for("react.lazy") : 60116, S = e ? Symbol.for("react.block") : 60121, C = e ? Symbol.for("react.fundamental") : 60117, w = e ? Symbol.for("react.responder") : 60118, P = e ? Symbol.for("react.scope") : 60119;
389
+ function j(u) {
390
+ return typeof u == "string" || typeof u == "function" || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.
391
+ u === o || u === f || u === c || u === i || u === y || u === m || typeof u == "object" && u !== null && (u.$$typeof === g || u.$$typeof === l || u.$$typeof === s || u.$$typeof === d || u.$$typeof === b || u.$$typeof === C || u.$$typeof === w || u.$$typeof === P || u.$$typeof === S);
392
+ }
393
+ function E(u) {
394
+ if (typeof u == "object" && u !== null) {
395
+ var V = u.$$typeof;
396
+ switch (V) {
397
+ case t:
398
+ var B = u.type;
399
+ switch (B) {
400
+ case v:
401
+ case f:
402
+ case o:
403
+ case c:
404
+ case i:
405
+ case y:
406
+ return B;
407
+ default:
408
+ var ae = B && B.$$typeof;
409
+ switch (ae) {
410
+ case d:
411
+ case b:
412
+ case g:
413
+ case l:
414
+ case s:
415
+ return ae;
416
+ default:
417
+ return V;
418
+ }
419
+ }
420
+ case n:
421
+ return V;
422
+ }
423
+ }
424
+ }
425
+ var a = v, x = f, N = d, T = s, $ = t, M = b, U = o, A = g, Le = l, ze = n, qe = c, Be = i, Ye = y, oe = !1;
426
+ function He(u) {
427
+ return oe || (oe = !0, console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")), se(u) || E(u) === v;
428
+ }
429
+ function se(u) {
430
+ return E(u) === f;
431
+ }
432
+ function Ze(u) {
433
+ return E(u) === d;
434
+ }
435
+ function Ke(u) {
436
+ return E(u) === s;
437
+ }
438
+ function Ue(u) {
439
+ return typeof u == "object" && u !== null && u.$$typeof === t;
440
+ }
441
+ function Ve(u) {
442
+ return E(u) === b;
443
+ }
444
+ function We(u) {
445
+ return E(u) === o;
446
+ }
447
+ function Qe(u) {
448
+ return E(u) === g;
449
+ }
450
+ function Xe(u) {
451
+ return E(u) === l;
452
+ }
453
+ function Ge(u) {
454
+ return E(u) === n;
455
+ }
456
+ function Je(u) {
457
+ return E(u) === c;
458
+ }
459
+ function et(u) {
460
+ return E(u) === i;
461
+ }
462
+ function tt(u) {
463
+ return E(u) === y;
464
+ }
465
+ p.AsyncMode = a, p.ConcurrentMode = x, p.ContextConsumer = N, p.ContextProvider = T, p.Element = $, p.ForwardRef = M, p.Fragment = U, p.Lazy = A, p.Memo = Le, p.Portal = ze, p.Profiler = qe, p.StrictMode = Be, p.Suspense = Ye, p.isAsyncMode = He, p.isConcurrentMode = se, p.isContextConsumer = Ze, p.isContextProvider = Ke, p.isElement = Ue, p.isForwardRef = Ve, p.isFragment = We, p.isLazy = Qe, p.isMemo = Xe, p.isPortal = Ge, p.isProfiler = Je, p.isStrictMode = et, p.isSuspense = tt, p.isValidElementType = j, p.typeOf = E;
466
+ }()), p;
467
+ }
468
+ var he;
469
+ function pr() {
470
+ return he || (he = 1, process.env.NODE_ENV === "production" ? H.exports = mr() : H.exports = hr()), H.exports;
471
+ }
472
+ var G, pe;
473
+ function gr() {
474
+ if (pe) return G;
475
+ pe = 1;
476
+ var e = pr(), t = {
477
+ childContextTypes: !0,
478
+ contextType: !0,
479
+ contextTypes: !0,
480
+ defaultProps: !0,
481
+ displayName: !0,
482
+ getDefaultProps: !0,
483
+ getDerivedStateFromError: !0,
484
+ getDerivedStateFromProps: !0,
485
+ mixins: !0,
486
+ propTypes: !0,
487
+ type: !0
488
+ }, n = {
489
+ name: !0,
490
+ length: !0,
491
+ prototype: !0,
492
+ caller: !0,
493
+ callee: !0,
494
+ arguments: !0,
495
+ arity: !0
496
+ }, o = {
497
+ $$typeof: !0,
498
+ render: !0,
499
+ defaultProps: !0,
500
+ displayName: !0,
501
+ propTypes: !0
502
+ }, i = {
503
+ $$typeof: !0,
504
+ compare: !0,
505
+ defaultProps: !0,
506
+ displayName: !0,
507
+ propTypes: !0,
508
+ type: !0
509
+ }, c = {};
510
+ c[e.ForwardRef] = o, c[e.Memo] = i;
511
+ function s(g) {
512
+ return e.isMemo(g) ? i : c[g.$$typeof] || t;
513
+ }
514
+ var d = Object.defineProperty, v = Object.getOwnPropertyNames, f = Object.getOwnPropertySymbols, b = Object.getOwnPropertyDescriptor, y = Object.getPrototypeOf, m = Object.prototype;
515
+ function l(g, S, C) {
516
+ if (typeof S != "string") {
517
+ if (m) {
518
+ var w = y(S);
519
+ w && w !== m && l(g, w, C);
520
+ }
521
+ var P = v(S);
522
+ f && (P = P.concat(f(S)));
523
+ for (var j = s(g), E = s(S), a = 0; a < P.length; ++a) {
524
+ var x = P[a];
525
+ if (!n[x] && !(C && C[x]) && !(E && E[x]) && !(j && j[x])) {
526
+ var N = b(S, x);
527
+ try {
528
+ d(g, x, N);
529
+ } catch {
530
+ }
531
+ }
532
+ }
533
+ }
534
+ return g;
535
+ }
536
+ return G = l, G;
537
+ }
538
+ gr();
539
+ var Me = function(t, n, o) {
540
+ return t = t <= o ? t : o, t = t >= n ? t : n, t;
541
+ }, vr = function() {
542
+ var t = !1, n = [], o = function() {
543
+ t = !0;
544
+ var d = n.shift();
545
+ if (d)
546
+ return d(o);
547
+ t = !1;
548
+ }, i = function() {
549
+ t = !1, n = [];
550
+ }, c = function(d) {
551
+ n.push(d), !t && n.length === 1 && o();
552
+ };
553
+ return {
554
+ clear: i,
555
+ enqueue: c
556
+ };
557
+ }, xr = function() {
558
+ var t, n = function() {
559
+ t && window.cancelAnimationFrame(t);
560
+ }, o = function(c, s) {
561
+ var d, v, f = function(y) {
562
+ if (v = v || y, d = y - v, d > s) {
563
+ c();
564
+ return;
565
+ }
566
+ t = window.requestAnimationFrame(f);
567
+ };
568
+ t = window.requestAnimationFrame(f);
569
+ };
570
+ return {
571
+ cancel: n,
572
+ schedule: o
573
+ };
574
+ }, yr = function(t) {
575
+ var n = 0;
576
+ return t >= 0 && t < 0.2 ? n = 0.1 : t >= 0.2 && t < 0.5 ? n = 0.04 : t >= 0.5 && t < 0.8 ? n = 0.02 : t >= 0.8 && t < 0.99 && (n = 5e-3), Me(t + n, 0, 0.994);
577
+ }, ge = function(t) {
578
+ O(t, []);
579
+ }, br = function(t) {
580
+ return ++t % 1e6;
581
+ }, jr = function() {
582
+ var t = L(0), n = t[1];
583
+ return _(function() {
584
+ return n(br);
585
+ }, []);
586
+ }, Er = function(t) {
587
+ t === void 0 && (t = {});
588
+ var n = jr(), o = D(K({}, t)), i = _(function() {
589
+ return o.current;
590
+ }, []), c = _(function(s) {
591
+ s && (Object.assign(o.current, s), n());
592
+ }, []);
593
+ return [i, c];
594
+ }, Sr = function() {
595
+ var t = D(!0);
596
+ return t.current ? (t.current = !1, !0) : t.current;
597
+ }, ve = function(t, n) {
598
+ var o = Sr();
599
+ O(function() {
600
+ if (!o)
601
+ return t();
602
+ }, n);
603
+ }, _e = function() {
604
+ }, xe = {
605
+ isFinished: !0,
606
+ progress: 0,
607
+ sideEffect: _e
608
+ }, Cr = function(t) {
609
+ var n = t === void 0 ? {} : t, o = n.animationDuration, i = o === void 0 ? 200 : o, c = n.incrementDuration, s = c === void 0 ? 800 : c, d = n.isAnimating, v = d === void 0 ? !1 : d, f = n.minimum, b = f === void 0 ? 0.08 : f, y = Er(xe), m = y[0], l = y[1], g = D(null), S = D(null);
610
+ ge(function() {
611
+ g.current = vr(), S.current = xr();
612
+ });
613
+ var C = _(function() {
614
+ var x, N;
615
+ (x = S.current) == null || x.cancel(), (N = g.current) == null || N.clear();
616
+ }, []), w = _(function(x) {
617
+ var N;
618
+ if (x = Me(x, b, 1), x === 1) {
619
+ var T, $;
620
+ C(), (T = g.current) == null || T.enqueue(function(M) {
621
+ l({
622
+ progress: x,
623
+ sideEffect: function() {
624
+ var A;
625
+ return (A = S.current) == null ? void 0 : A.schedule(M, i);
626
+ }
627
+ });
628
+ }), ($ = g.current) == null || $.enqueue(function() {
629
+ l({
630
+ isFinished: !0,
631
+ sideEffect: C
632
+ });
633
+ });
634
+ return;
635
+ }
636
+ (N = g.current) == null || N.enqueue(function(M) {
637
+ l({
638
+ isFinished: !1,
639
+ progress: x,
640
+ sideEffect: function() {
641
+ var A;
642
+ return (A = S.current) == null ? void 0 : A.schedule(M, i);
643
+ }
644
+ });
645
+ });
646
+ }, [i, C, b, g, l, S]), P = _(function() {
647
+ w(yr(m().progress));
648
+ }, [m, w]), j = _(function() {
649
+ var x = function() {
650
+ var T;
651
+ P(), (T = g.current) == null || T.enqueue(function($) {
652
+ var M;
653
+ (M = S.current) == null || M.schedule(function() {
654
+ x(), $();
655
+ }, s);
656
+ });
657
+ };
658
+ x();
659
+ }, [s, g, S, P]), E = D(_e), a = m().sideEffect;
660
+ return O(function() {
661
+ E.current = P;
662
+ }), ge(function() {
663
+ return v && j(), C;
664
+ }), ve(function() {
665
+ m().sideEffect();
666
+ }, [m, a]), ve(function() {
667
+ v ? l(K({}, xe, {
668
+ sideEffect: j
669
+ })) : w(1);
670
+ }, [v, w, l, j]), {
671
+ animationDuration: i,
672
+ isFinished: m().isFinished,
673
+ progress: m().progress
674
+ };
675
+ };
676
+ const Ae = () => {
677
+ const t = Ee().state === "loading", [n, o] = L(!1);
678
+ O(() => {
679
+ const s = setTimeout(() => o(t), 200);
680
+ return () => clearTimeout(s);
681
+ }, [t]);
682
+ const { isFinished: i, progress: c } = Cr({ isAnimating: n });
683
+ return /* @__PURE__ */ r.jsx(
684
+ "div",
685
+ {
686
+ className: "absolute w-0 left-0 right-0 bottom-[-1px] h-[2px] bg-primary transition-all duration-300 ease-in-out",
687
+ style: {
688
+ opacity: i ? 0 : 1,
689
+ width: i ? 0 : `${c * 100}%`
690
+ }
691
+ }
692
+ );
693
+ };
694
+ function wr() {
695
+ const e = navigator.userAgent.toLowerCase();
696
+ if (e.includes("win")) return "Windows";
697
+ if (e.includes("mac")) return "macOS";
698
+ if (e.includes("linux")) return "Linux";
699
+ }
700
+ const Re = ({ className: e }) => {
701
+ const t = k(), [n, o] = L(!1), i = _(() => o(!1), []);
702
+ O(() => {
703
+ if (n)
704
+ return;
705
+ function s(d) {
706
+ d.key === "k" && (d.metaKey || d.ctrlKey) && (d.preventDefault(), o(!0));
707
+ }
708
+ return window.addEventListener("keydown", s), () => {
709
+ window.removeEventListener("keydown", s);
710
+ };
711
+ }, [n, o]);
712
+ const c = t.plugins.find(kt);
713
+ return c ? /* @__PURE__ */ r.jsxs("div", { className: e, children: [
714
+ /* @__PURE__ */ r.jsxs(
715
+ "button",
716
+ {
717
+ type: "button",
718
+ onClick: () => o(!0),
719
+ 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",
720
+ children: [
721
+ /* @__PURE__ */ r.jsxs("div", { className: "flex items-center gap-2 grow", children: [
722
+ /* @__PURE__ */ r.jsx(Ut, { size: 14 }),
723
+ "Search"
724
+ ] }),
725
+ /* @__PURE__ */ r.jsx(F, { children: /* @__PURE__ */ r.jsx(Pr, {}) })
726
+ ]
727
+ }
728
+ ),
729
+ /* @__PURE__ */ r.jsx(we, { fallback: null, children: c.renderSearch({
730
+ isOpen: n,
731
+ onClose: i
732
+ }) })
733
+ ] }) : null;
734
+ }, Pr = () => {
735
+ const e = wr();
736
+ return /* @__PURE__ */ r.jsxs("kbd", { className: "absolute end-1.5 hidden h-5 select-none items-center gap-1 rounded-sm border bg-muted px-1.5 font-mono text-[11px] font-medium opacity-100 sm:flex", children: [
737
+ e === "macOS" ? "⌘" : "Ctrl",
738
+ "+K"
739
+ ] });
740
+ }, ke = () => {
741
+ const { resolvedTheme: e, setTheme: t } = je();
742
+ return /* @__PURE__ */ r.jsx(F, { fallback: /* @__PURE__ */ r.jsx(J, { variant: "ghost", size: "icon" }), children: /* @__PURE__ */ r.jsxs(
743
+ "button",
744
+ {
745
+ type: "button",
746
+ className: "flex rounded-full border p-0.5 gap-0.5 group",
747
+ onClick: () => t(e === "dark" ? "light" : "dark"),
748
+ "aria-label": e === "dark" ? "Switch to light mode" : "Switch to dark mode",
749
+ children: [
750
+ /* @__PURE__ */ r.jsx(
751
+ "div",
752
+ {
753
+ className: R(
754
+ "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",
755
+ e === "light" && "border-border bg-muted",
756
+ e === "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] "
757
+ ),
758
+ children: /* @__PURE__ */ r.jsx(Vt, { size: 16 })
759
+ }
760
+ ),
761
+ /* @__PURE__ */ r.jsx(
762
+ "div",
763
+ {
764
+ className: R(
765
+ "border border-transparent rounded-full p-0.5 transition-transform transform-gpu duration-500",
766
+ e === "dark" && "border-border bg-muted [&>svg>path]:fill-white [&>svg>path]:stroke-transparent",
767
+ e === "light" && "group-hover:rotate-[-10deg] [&>svg>path]:stroke-currentColor"
768
+ ),
769
+ children: /* @__PURE__ */ r.jsx(Wt, { size: 16 })
770
+ }
771
+ )
772
+ ]
773
+ }
774
+ ) });
775
+ }, Nr = () => {
776
+ const e = k(), { navigation: t } = e, n = z(), o = t.filter(Ce(n, e));
777
+ return o.length === 0 ? /* @__PURE__ */ r.jsx("style", { children: ":root { --top-nav-height: 0px; }" }) : /* @__PURE__ */ r.jsx(we, { children: /* @__PURE__ */ r.jsxs("div", { className: "items-center justify-between px-8 h-(--top-nav-height) hidden lg:flex text-sm relative", children: [
778
+ /* @__PURE__ */ r.jsx("nav", { className: "text-sm", children: /* @__PURE__ */ r.jsx("ul", { className: "flex flex-row items-center gap-8", children: o.map((i) => /* @__PURE__ */ r.jsx("li", { children: /* @__PURE__ */ r.jsx($e, { ...i }) }, i.label + i.type)) }) }),
779
+ /* @__PURE__ */ r.jsx(I.Target, { name: "top-navigation-side" })
780
+ ] }) });
781
+ }, Oe = (e) => {
782
+ switch (e.type) {
783
+ case "doc":
784
+ return q(e.path);
785
+ case "link":
786
+ return e.to;
787
+ case "category":
788
+ return e.link?.path ? q(e.link.path) : dt(e, (t) => {
789
+ if (t.type !== "category")
790
+ return Oe(t);
791
+ }) ?? "";
792
+ case "custom-page":
793
+ return e.path;
794
+ }
795
+ }, te = ({
796
+ isActive: e,
797
+ children: t,
798
+ ...n
799
+ }) => /* @__PURE__ */ r.jsx(
800
+ st,
801
+ {
802
+ viewTransition: !0,
803
+ className: ({ isActive: o, isPending: i }) => {
804
+ const c = o || e;
805
+ return rr(
806
+ "flex items-center gap-2 lg:py-3.5 font-medium -mb-px transition duration-150 delay-75 relative",
807
+ c || i ? [
808
+ "text-foreground",
809
+ // underline with view transition animation
810
+ "after:content-[''] after:absolute after:bottom-0 after:left-0 after:right-0",
811
+ "after:h-0.5 after:bg-primary",
812
+ c && "after:[view-transition-name:top-nav-underline]",
813
+ i && "after:bg-primary/25"
814
+ ] : "text-foreground/75 hover:text-foreground"
815
+ );
816
+ },
817
+ ...n,
818
+ children: t
819
+ }
820
+ ), $e = (e) => {
821
+ const t = ut(), n = yt(t.topNavItem, e), o = Oe(e);
822
+ return (
823
+ // We don't use isActive here because it has to be inside the navigation,
824
+ // the top nav id doesn't necessarily start with the navigation id
825
+ /* @__PURE__ */ r.jsxs(te, { to: o, isActive: n, children: [
826
+ e.icon && /* @__PURE__ */ r.jsx(e.icon, { size: 16, className: "align-[-0.125em]" }),
827
+ e.label
828
+ ] })
829
+ );
830
+ }, Tr = () => {
831
+ const e = k(), t = z(), { navigation: n, options: o, getProfileMenuItems: i } = e, { isAuthenticated: c, profile: s, isAuthEnabled: d } = t, [v, f] = L(!1), b = i(), y = n.filter(Ce(t, e));
832
+ return /* @__PURE__ */ r.jsxs(
833
+ Gt,
834
+ {
835
+ direction: o.site?.dir === "rtl" ? "left" : "right",
836
+ open: v,
837
+ onOpenChange: (m) => f(m),
838
+ children: [
839
+ /* @__PURE__ */ r.jsxs("div", { className: "flex lg:hidden justify-self-end", children: [
840
+ /* @__PURE__ */ r.jsx(Jt, { className: "lg:hidden", children: /* @__PURE__ */ r.jsx(Qt, { size: 22 }) }),
841
+ /* @__PURE__ */ r.jsx(Ae, {})
842
+ ] }),
843
+ /* @__PURE__ */ r.jsx(
844
+ er,
845
+ {
846
+ className: "lg:hidden h-[100dvh] end-0 start-auto w-[320px] rounded-none",
847
+ "aria-describedby": void 0,
848
+ children: /* @__PURE__ */ r.jsxs("div", { className: "p-4 overflow-y-auto overscroll-none h-full flex flex-col justify-between", children: [
849
+ /* @__PURE__ */ r.jsxs("div", { children: [
850
+ /* @__PURE__ */ r.jsx(Xt, { children: /* @__PURE__ */ r.jsx(tr, { children: "Navigation" }) }),
851
+ /* @__PURE__ */ r.jsx(Re, { className: "flex p-4" }),
852
+ /* @__PURE__ */ r.jsxs("ul", { className: "flex flex-col items-center gap-4 p-4", children: [
853
+ /* @__PURE__ */ r.jsx("li", { className: "empty:hidden", children: /* @__PURE__ */ r.jsx(I.Target, { name: "top-navigation-side" }) }),
854
+ d && /* @__PURE__ */ r.jsx(
855
+ F,
856
+ {
857
+ fallback: /* @__PURE__ */ r.jsx(ee, { className: "rounded-sm h-5 w-24 mr-4" }),
858
+ children: c ? Object.values(i()).length > 0 && /* @__PURE__ */ r.jsx(Nt, { children: /* @__PURE__ */ r.jsxs("li", { children: [
859
+ s?.name ? `${s.name}` : "My Account",
860
+ s?.email && /* @__PURE__ */ r.jsx("div", { className: "font-normal text-muted-foreground", children: s.email })
861
+ ] }) }) : /* @__PURE__ */ r.jsx("li", { children: /* @__PURE__ */ r.jsx(
862
+ te,
863
+ {
864
+ to: "/signin",
865
+ onClick: () => f(!1),
866
+ children: "Login"
867
+ }
868
+ ) })
869
+ }
870
+ ),
871
+ y.map((m) => /* @__PURE__ */ r.jsx("li", { children: /* @__PURE__ */ r.jsx("button", { type: "button", onClick: () => f(!1), children: /* @__PURE__ */ r.jsx($e, { ...m }) }) }, m.label)),
872
+ d && c && b.length > 0 && /* @__PURE__ */ r.jsx(
873
+ F,
874
+ {
875
+ fallback: /* @__PURE__ */ r.jsx(ee, { className: "rounded-sm h-5 w-24 mr-4" }),
876
+ children: b.map((m) => /* @__PURE__ */ r.jsx("li", { children: /* @__PURE__ */ r.jsx(
877
+ te,
878
+ {
879
+ to: m.path ?? "",
880
+ onClick: () => f(!1),
881
+ children: m.label
882
+ }
883
+ ) }, m.label))
884
+ }
885
+ ),
886
+ /* @__PURE__ */ r.jsx("li", { children: /* @__PURE__ */ r.jsx(ke, {}) })
887
+ ] })
888
+ ] }),
889
+ o.site?.showPoweredBy !== !1 && /* @__PURE__ */ r.jsx(fr, { className: "grow-0 justify-center gap-1" })
890
+ ] })
891
+ }
892
+ )
893
+ ]
894
+ }
895
+ );
896
+ }, Z = ({ item: e }) => e.children ? /* @__PURE__ */ r.jsxs(zt, { children: [
897
+ /* @__PURE__ */ r.jsx(qt, { children: e.label }),
898
+ /* @__PURE__ */ r.jsx(Bt, { children: /* @__PURE__ */ r.jsx(Yt, { children: e.children.map((t, n) => (
899
+ // eslint-disable-next-line react/no-array-index-key
900
+ /* @__PURE__ */ r.jsx(Z, { item: t }, n)
901
+ )) }) })
902
+ ] }, e.label) : /* @__PURE__ */ r.jsx(re, { to: e.path ?? "", children: /* @__PURE__ */ r.jsxs(Ht, { className: "flex gap-2", children: [
903
+ e.icon && /* @__PURE__ */ r.jsx(e.icon, { size: 16, strokeWidth: 1, absoluteStrokeWidth: !0 }),
904
+ e.label
905
+ ] }, e.label) }), Mr = Pe(function() {
906
+ const t = z(), { isAuthenticated: n, profile: o, isAuthEnabled: i } = z(), c = k(), { site: s, plugins: d, options: v } = c, f = d.filter((l) => Ne(l)).flatMap((l) => l.getProfileMenuItems(c)).sort((l) => l.weight ?? 0), b = s?.logo ? /https?:\/\//.test(s.logo.src.light) ? s.logo.src.light : q(v.basePath, s.logo.src.light) : void 0, y = s?.logo ? /https?:\/\//.test(s.logo.src.dark) ? s.logo.src.dark : q(v.basePath, s.logo.src.dark) : void 0, m = "inset-shadow-[0_-1px_0_0_var(--border)]";
907
+ return /* @__PURE__ */ r.jsxs(
908
+ "header",
909
+ {
910
+ className: "sticky lg:top-0 z-10 bg-background/80 backdrop-blur w-full",
911
+ "data-pagefind-ignore": "all",
912
+ children: [
913
+ /* @__PURE__ */ r.jsx(dr, {}),
914
+ /* @__PURE__ */ r.jsxs("div", { className: R(m, "relative"), children: [
915
+ /* @__PURE__ */ r.jsx(Ae, {}),
916
+ /* @__PURE__ */ r.jsxs("div", { className: "max-w-screen-2xl mx-auto flex items-center justify-between h-(--top-header-height) px-4 lg:px-8 border-transparent", children: [
917
+ /* @__PURE__ */ r.jsx("div", { className: "flex", children: /* @__PURE__ */ r.jsx(re, { to: s?.logo?.href ?? "/", children: /* @__PURE__ */ r.jsx("div", { className: "flex items-center gap-3.5", children: s?.logo ? /* @__PURE__ */ r.jsxs(r.Fragment, { children: [
918
+ /* @__PURE__ */ r.jsx(
919
+ "img",
920
+ {
921
+ src: b,
922
+ alt: s.logo.alt ?? s.title,
923
+ style: { width: s.logo.width },
924
+ className: "max-h-(--top-header-height) dark:hidden",
925
+ loading: "lazy"
926
+ }
927
+ ),
928
+ /* @__PURE__ */ r.jsx(
929
+ "img",
930
+ {
931
+ src: y,
932
+ alt: s.logo.alt ?? s.title,
933
+ style: { width: s.logo.width },
934
+ className: "max-h-(--top-header-height) hidden dark:block",
935
+ loading: "lazy"
936
+ }
937
+ )
938
+ ] }) : /* @__PURE__ */ r.jsx("span", { className: "font-semibold text-2xl", children: s?.title }) }) }) }),
939
+ /* @__PURE__ */ r.jsx("div", { className: "absolute inset-x-0 justify-center items-center hidden lg:flex w-full pointer-events-none", children: /* @__PURE__ */ r.jsx(Re, { className: "pointer-events-auto" }) }),
940
+ /* @__PURE__ */ r.jsxs("div", { className: "flex items-center gap-8", children: [
941
+ /* @__PURE__ */ r.jsx(Tr, {}),
942
+ /* @__PURE__ */ r.jsxs("div", { className: "hidden lg:flex items-center justify-self-end text-sm gap-2", children: [
943
+ /* @__PURE__ */ r.jsx(I.Target, { name: "head-navigation-start" }),
944
+ i && /* @__PURE__ */ r.jsx(
945
+ F,
946
+ {
947
+ fallback: /* @__PURE__ */ r.jsx(ee, { className: "rounded-sm h-5 w-24 mr-4" }),
948
+ children: n ? Object.values(f).length > 0 && /* @__PURE__ */ r.jsxs(It, { modal: !1, children: [
949
+ /* @__PURE__ */ r.jsx(Dt, { asChild: !0, children: /* @__PURE__ */ r.jsx(J, { variant: "ghost", children: o?.name ?? "My Account" }) }),
950
+ /* @__PURE__ */ r.jsxs(Ft, { className: "w-56", children: [
951
+ /* @__PURE__ */ r.jsxs(Lt, { children: [
952
+ o?.name ? `${o.name}` : "My Account",
953
+ o?.email && /* @__PURE__ */ r.jsx("div", { className: "font-normal text-muted-foreground", children: o.email })
954
+ ] }),
955
+ f.filter((l) => l.category === "top").length > 0 && /* @__PURE__ */ r.jsx(Q, {}),
956
+ f.filter((l) => l.category === "top").map((l) => /* @__PURE__ */ r.jsx(Z, { item: l }, l.label)),
957
+ f.filter(
958
+ (l) => !l.category || l.category === "middle"
959
+ ).length > 0 && /* @__PURE__ */ r.jsx(Q, {}),
960
+ f.filter(
961
+ (l) => !l.category || l.category === "middle"
962
+ ).map((l) => /* @__PURE__ */ r.jsx(Z, { item: l }, l.label)),
963
+ f.filter((l) => l.category === "bottom").length > 0 && /* @__PURE__ */ r.jsx(Q, {}),
964
+ f.filter((l) => l.category === "bottom").map((l) => /* @__PURE__ */ r.jsx(Z, { item: l }, l.label))
965
+ ] })
966
+ ] }) : /* @__PURE__ */ r.jsx(J, { variant: "ghost", onClick: () => t.login(), children: "Login" })
967
+ }
968
+ ),
969
+ /* @__PURE__ */ r.jsx(I.Target, { name: "head-navigation-end" }),
970
+ /* @__PURE__ */ r.jsx(ke, {})
971
+ ] })
972
+ ] })
973
+ ] })
974
+ ] }),
975
+ /* @__PURE__ */ r.jsx("div", { className: R("hidden lg:block", m), children: /* @__PURE__ */ r.jsxs("div", { className: "max-w-screen-2xl mx-auto border-transparent relative", children: [
976
+ /* @__PURE__ */ r.jsx(I.Target, { name: "top-navigation-before" }),
977
+ /* @__PURE__ */ r.jsx(Nr, {}),
978
+ /* @__PURE__ */ r.jsx(I.Target, { name: "top-navigation-after" })
979
+ ] }) })
980
+ ]
981
+ }
982
+ );
983
+ }), Ie = {
984
+ Header: Mr
985
+ }, _r = ne(Ie), Ar = _r.Provider, Rr = () => {
986
+ const e = Se(), t = k(), n = D(void 0);
987
+ return O(() => {
988
+ t.emitEvent("location", {
989
+ from: n.current,
990
+ to: e
991
+ }), n.current = e;
992
+ }, [t, e]), null;
993
+ }, kr = ({
994
+ children: e,
995
+ context: t
996
+ }) => (ft({
997
+ queryFn: async () => (await t.initialize(), !0),
998
+ queryKey: ["zudoku-initialize", mt]
999
+ }), /* @__PURE__ */ r.jsx(ht.Provider, { value: t, children: e }));
1000
+ let ye;
1001
+ const De = Pe(
1002
+ ({ children: e, ...t }) => {
1003
+ const n = W(
1004
+ () => ({ ...Ie, ...t.overrides }),
1005
+ [t.overrides]
1006
+ ), o = Se(), i = W(() => ({
1007
+ ...(t.plugins ?? []).filter(Ot).flatMap(
1008
+ (l) => l.getMdxComponents ? [l.getMdxComponents()] : []
1009
+ ).reduce(
1010
+ (l, g) => ({ ...l, ...g }),
1011
+ {}
1012
+ ),
1013
+ ...bt,
1014
+ ...t.mdx?.components
1015
+ }), [t.mdx?.components, t.plugins]), { stagger: c } = Tt(ue), [s, d] = L(!1), v = W(
1016
+ () => s ? { stagger: !0 } : { stagger: c },
1017
+ [c, s]
1018
+ ), f = Ee(), b = pt();
1019
+ O(() => {
1020
+ s || d(!0);
1021
+ }, [s, f.location]), ye ??= new cr(t, b);
1022
+ const y = t.plugins?.flatMap(
1023
+ (m) => $t(m) ? m.getHead?.({ location: o }) ?? [] : []
1024
+ ).map((m, l) => /* @__PURE__ */ r.jsx(be, { children: m }, l));
1025
+ return /* @__PURE__ */ r.jsxs(r.Fragment, { children: [
1026
+ y,
1027
+ /* @__PURE__ */ r.jsx(ue.Provider, { value: v, children: /* @__PURE__ */ r.jsxs(kr, { context: ye, children: [
1028
+ /* @__PURE__ */ r.jsx(Rr, {}),
1029
+ /* @__PURE__ */ r.jsx(jt, { slots: t.slots ?? t.UNSAFE_slotlets, children: /* @__PURE__ */ r.jsx(rt, { components: i, children: /* @__PURE__ */ r.jsx(nt, { attribute: "class", disableTransitionOnChange: !0, children: /* @__PURE__ */ r.jsx(Ar, { value: n, children: /* @__PURE__ */ r.jsx(Et, { children: e ?? /* @__PURE__ */ r.jsx(at, {}) }) }) }) }) })
1030
+ ] }) })
1031
+ ] });
1032
+ }
1033
+ );
1034
+ De.displayName = "ZudokoInner";
1035
+ const Fe = (e) => /* @__PURE__ */ r.jsx(or, { FallbackComponent: ur, children: /* @__PURE__ */ r.jsx(De, { ...e }) });
1036
+ Fe.displayName = "Zudoku";
1037
+ const en = be, tn = lt, rn = St, nn = wt, on = F, sn = ct, an = re, cn = Fe, ln = Ct, un = ot, dn = k, fn = z, mn = gt, hn = vt, pn = je;
1038
+ export {
1039
+ sn as B,
1040
+ tn as C,
1041
+ or as E,
1042
+ Mr as H,
1043
+ an as L,
1044
+ rn as M,
1045
+ fr as P,
1046
+ nn as S,
1047
+ ln as T,
1048
+ cn as Z,
1049
+ ue as a,
1050
+ Cr as b,
1051
+ fn as c,
1052
+ en as d,
1053
+ on as e,
1054
+ un as f,
1055
+ mn as g,
1056
+ hn as h,
1057
+ pn as i,
1058
+ ir as o,
1059
+ dn as u
1060
+ };
1061
+ //# sourceMappingURL=index-DzO-Qh6S.js.map