zudoku 0.28.0 → 0.28.1

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 (75) hide show
  1. package/dist/app/main.js +1 -2
  2. package/dist/app/main.js.map +1 -1
  3. package/dist/config/validators/InputSidebarSchema.d.ts +2 -2
  4. package/dist/lib/components/PathRenderer.d.ts +11 -0
  5. package/dist/lib/components/PathRenderer.js +25 -0
  6. package/dist/lib/components/PathRenderer.js.map +1 -0
  7. package/dist/lib/components/ThemeSwitch.js +4 -4
  8. package/dist/lib/components/ThemeSwitch.js.map +1 -1
  9. package/dist/lib/components/index.d.ts +1 -0
  10. package/dist/lib/components/index.js +4 -2
  11. package/dist/lib/components/index.js.map +1 -1
  12. package/dist/lib/components/navigation/SidebarCategory.js +16 -14
  13. package/dist/lib/components/navigation/SidebarCategory.js.map +1 -1
  14. package/dist/lib/oas/graphql/circular.js +17 -6
  15. package/dist/lib/oas/graphql/circular.js.map +1 -1
  16. package/dist/lib/plugins/openapi/ColorizedParam.js +3 -1
  17. package/dist/lib/plugins/openapi/ColorizedParam.js.map +1 -1
  18. package/dist/lib/plugins/openapi/OperationListItem.js +1 -1
  19. package/dist/lib/plugins/openapi/OperationListItem.js.map +1 -1
  20. package/dist/lib/plugins/openapi/ParameterListItem.js +1 -1
  21. package/dist/lib/plugins/openapi/ParameterListItem.js.map +1 -1
  22. package/dist/lib/plugins/openapi/Sidecar.js +5 -10
  23. package/dist/lib/plugins/openapi/Sidecar.js.map +1 -1
  24. package/dist/lib/plugins/openapi/playground/PathParams.js +1 -1
  25. package/dist/lib/plugins/openapi/playground/PathParams.js.map +1 -1
  26. package/dist/lib/plugins/openapi/playground/Playground.js +7 -15
  27. package/dist/lib/plugins/openapi/playground/Playground.js.map +1 -1
  28. package/dist/lib/plugins/openapi/schema/{SchemaComponents.js → SchemaPropertyItem.js} +10 -8
  29. package/dist/lib/plugins/openapi/schema/SchemaPropertyItem.js.map +1 -0
  30. package/dist/lib/plugins/openapi/schema/SchemaView.js +1 -1
  31. package/dist/lib/plugins/openapi/schema/SchemaView.js.map +1 -1
  32. package/dist/lib/plugins/openapi/schema/utils.d.ts +1 -0
  33. package/dist/lib/plugins/openapi/schema/utils.js +2 -0
  34. package/dist/lib/plugins/openapi/schema/utils.js.map +1 -1
  35. package/dist/vite/plugin-api.js +4 -2
  36. package/dist/vite/plugin-api.js.map +1 -1
  37. package/dist/vite/prerender.js +0 -1
  38. package/dist/vite/prerender.js.map +1 -1
  39. package/lib/{MdxPage-DewragjB.js → MdxPage-BuG8Tuwc.js} +2 -2
  40. package/lib/{MdxPage-DewragjB.js.map → MdxPage-BuG8Tuwc.js.map} +1 -1
  41. package/lib/{OperationList-D_ejrepA.js → OperationList-CDt1xdc4.js} +978 -970
  42. package/lib/OperationList-CDt1xdc4.js.map +1 -0
  43. package/lib/{circular-Dgpd6AN-.js → circular-DxaIIlWD.js} +251 -239
  44. package/lib/{circular-Dgpd6AN-.js.map → circular-DxaIIlWD.js.map} +1 -1
  45. package/lib/{createServer-BydbkTsd.js → createServer-CjNktZzL.js} +2 -2
  46. package/lib/{createServer-BydbkTsd.js.map → createServer-CjNktZzL.js.map} +1 -1
  47. package/lib/{index-DGugJOLc.js → index-Eb1oiHbM.js} +583 -560
  48. package/lib/index-Eb1oiHbM.js.map +1 -0
  49. package/lib/{useScrollToAnchor-eRM9tVvD.js → useScrollToAnchor-BZsGmBng.js} +84 -89
  50. package/lib/useScrollToAnchor-BZsGmBng.js.map +1 -0
  51. package/lib/zudoku.components.js +334 -317
  52. package/lib/zudoku.components.js.map +1 -1
  53. package/lib/zudoku.plugin-markdown.js +1 -1
  54. package/lib/zudoku.plugin-openapi.js +1 -1
  55. package/package.json +1 -1
  56. package/src/app/main.tsx +1 -2
  57. package/src/lib/components/PathRenderer.tsx +59 -0
  58. package/src/lib/components/ThemeSwitch.tsx +15 -14
  59. package/src/lib/components/index.ts +7 -5
  60. package/src/lib/components/navigation/SidebarCategory.tsx +43 -41
  61. package/src/lib/oas/graphql/circular.ts +27 -6
  62. package/src/lib/plugins/openapi/ColorizedParam.tsx +3 -3
  63. package/src/lib/plugins/openapi/OperationListItem.tsx +6 -1
  64. package/src/lib/plugins/openapi/ParameterListItem.tsx +1 -1
  65. package/src/lib/plugins/openapi/Sidecar.tsx +17 -26
  66. package/src/lib/plugins/openapi/playground/PathParams.tsx +1 -1
  67. package/src/lib/plugins/openapi/playground/Playground.tsx +23 -33
  68. package/src/lib/plugins/openapi/schema/{SchemaComponents.tsx → SchemaPropertyItem.tsx} +10 -6
  69. package/src/lib/plugins/openapi/schema/SchemaView.tsx +4 -1
  70. package/src/lib/plugins/openapi/schema/utils.ts +4 -0
  71. package/dist/lib/plugins/openapi/schema/SchemaComponents.js.map +0 -1
  72. package/lib/OperationList-D_ejrepA.js.map +0 -1
  73. package/lib/index-DGugJOLc.js.map +0 -1
  74. package/lib/useScrollToAnchor-eRM9tVvD.js.map +0 -1
  75. /package/dist/lib/plugins/openapi/schema/{SchemaComponents.d.ts → SchemaPropertyItem.d.ts} +0 -0
@@ -1,10 +1,10 @@
1
- var ot = Object.defineProperty;
2
- var ge = (t) => {
1
+ var lt = Object.defineProperty;
2
+ var xe = (t) => {
3
3
  throw TypeError(t);
4
4
  };
5
- var lt = (t, e, n) => e in t ? ot(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n;
6
- var P = (t, e, n) => lt(t, typeof e != "symbol" ? e + "" : e, n), me = (t, e, n) => e.has(t) || ge("Cannot " + n);
7
- var l = (t, e, n) => (me(t, e, "read from private field"), n ? n.call(t) : e.get(t)), j = (t, e, n) => e.has(t) ? ge("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(t) : e.set(t, n), y = (t, e, n, s) => (me(t, e, "write to private field"), s ? s.call(t, n) : e.set(t, n), n);
5
+ var ct = (t, e, n) => e in t ? lt(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n;
6
+ var P = (t, e, n) => ct(t, typeof e != "symbol" ? e + "" : e, n), ye = (t, e, n) => e.has(t) || xe("Cannot " + n);
7
+ var l = (t, e, n) => (ye(t, e, "read from private field"), n ? n.call(t) : e.get(t)), j = (t, e, n) => e.has(t) ? xe("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(t) : e.set(t, n), y = (t, e, n, s) => (ye(t, e, "write to private field"), s ? s.call(t, n) : e.set(t, n), n);
8
8
  var _ = (t, e, n, s) => ({
9
9
  set _(a) {
10
10
  y(t, e, a, n);
@@ -13,47 +13,47 @@ var _ = (t, e, n, s) => ({
13
13
  return l(t, e, s);
14
14
  }
15
15
  });
16
- import { a as Ie, H as ie } from "./index.esm-9-TF9KQB.js";
17
- import { R as ct, S as ut, u as Te, h as oe, N as dt, L as le, O as qe } from "./chunk-SYFQ2XB5-BPvC-soB.js";
18
- import { M as ht, u as Z } from "./hook-FT3SJLe_.js";
19
- import { E as Re, S as M, a as ft, R as gt } from "./SlotletProvider-mQiPDQIH.js";
16
+ import { a as Re, H as ie } from "./index.esm-9-TF9KQB.js";
17
+ import { u as oe, m as ut, O as le, R as dt, S as ht, h as ce, N as ft, L as ue } from "./chunk-SYFQ2XB5-BPvC-soB.js";
18
+ import { M as gt, u as z } from "./hook-FT3SJLe_.js";
20
19
  import { j as r } from "./jsx-runtime-Bdg6XQ1m.js";
21
- import { Button as mt } from "./ui/Button.js";
22
- import { Callout as pt } from "./ui/Callout.js";
23
- import { S as Fe, m as ze, Q as xt, n as w, o as pe, p as xe, q as N, r as yt, t as vt, v as bt, w as jt, x as ye, y as ve, z as wt, h as be, A as je, B as Pt, e as Ct, C as Be, a as I, D as He, E as St, j as se, u as kt, Z as Dt, F as Mt, G as Nt } from "./ZudokuContext-BTUJPpQl.js";
24
- import * as K from "react";
25
- import Ot, { createContext as ce, StrictMode as Le, useRef as ue, useEffect as U, useState as z, useCallback as Et, Suspense as de, memo as Ke, forwardRef as At, Component as Qt, createElement as we, useMemo as ee, useContext as It, Fragment as Tt } from "react";
26
- import * as qt from "react-dom";
27
- import { C as $e } from "./ClientOnly-E7hGysn1.js";
28
- import { CircleXIcon as Rt, SearchIcon as Ft, MoonStarIcon as zt, SunIcon as Bt, MenuIcon as Ht, PanelLeftIcon as Lt } from "lucide-react";
29
- import { Drawer as Ze, DrawerTrigger as Ue, DrawerContent as Ye, DrawerTitle as Xe } from "./ui/Drawer.js";
30
- import { c as B } from "./cn-qaFjX9_3.js";
31
- import { S as Pe, a as Kt, M as $t, u as Zt } from "./useScrollToAnchor-eRM9tVvD.js";
32
- import { u as Ut, a as Yt, V as Xt, M as Vt } from "./Markdown-Cyrx_JrO.js";
33
- import { B as re, S as Ve } from "./Spinner-BlzrEEk1.js";
34
- import { DropdownMenu as _t, DropdownMenuTrigger as Wt, DropdownMenuContent as Gt, DropdownMenuLabel as Jt, DropdownMenuSeparator as te, DropdownMenuSub as en, DropdownMenuSubTrigger as tn, DropdownMenuPortal as nn, DropdownMenuSubContent as sn, DropdownMenuItem as rn } from "./ui/DropdownMenu.js";
35
- import { j as Ce } from "./joinUrl-nLx9pD-Z.js";
36
- import { VisuallyHidden as _e } from "@radix-ui/react-visually-hidden";
37
- import { z as an, J as on } from "./SyntaxHighlight-B0L4SC_N.js";
38
- import { a as ln } from "./index-Djenk2Hj.js";
39
- import { Z as cn } from "./invariant-Caa8-XvF.js";
40
- var D, Ee, un = (Ee = class extends Fe {
20
+ import * as $ from "react";
21
+ import mt, { useEffect as B, createContext as de, StrictMode as Fe, useRef as he, useState as H, useCallback as pt, Suspense as fe, memo as ze, forwardRef as xt, Component as yt, createElement as ve, useMemo as te, useContext as vt, Fragment as bt } from "react";
22
+ import { S as Be, m as He, Q as jt, n as w, o as be, p as je, q as N, r as wt, t as Pt, v as Ct, w as kt, x as we, y as Pe, z as St, h as Ce, A as ke, B as Dt, e as Mt, a as E, C as Le, D as Ke, E as Nt, j as re, u as Ot, Z as Et, F as At, G as Qt } from "./ZudokuContext-BTUJPpQl.js";
23
+ import { Z as $e } from "./invariant-Caa8-XvF.js";
24
+ import { E as Ze, S as M, a as It, R as Tt } from "./SlotletProvider-mQiPDQIH.js";
25
+ import { Button as qt } from "./ui/Button.js";
26
+ import { Callout as Rt } from "./ui/Callout.js";
27
+ import * as Ft from "react-dom";
28
+ import { C as ge } from "./ClientOnly-E7hGysn1.js";
29
+ import { CircleXIcon as zt, SearchIcon as Bt, MoonStarIcon as Ht, SunIcon as Lt, MenuIcon as Kt, PanelLeftIcon as $t } from "lucide-react";
30
+ import { Drawer as Ue, DrawerTrigger as Ye, DrawerContent as Xe, DrawerTitle as Ve } from "./ui/Drawer.js";
31
+ import { c as U } from "./cn-qaFjX9_3.js";
32
+ import { S as Se, a as Zt, M as Ut, u as Yt } from "./useScrollToAnchor-BZsGmBng.js";
33
+ import { u as Xt, a as Vt, V as _t, M as Wt } from "./Markdown-Cyrx_JrO.js";
34
+ import { B as ee, S as _e } from "./Spinner-BlzrEEk1.js";
35
+ import { DropdownMenu as Gt, DropdownMenuTrigger as Jt, DropdownMenuContent as en, DropdownMenuLabel as tn, DropdownMenuSeparator as ne, DropdownMenuSub as nn, DropdownMenuSubTrigger as sn, DropdownMenuPortal as rn, DropdownMenuSubContent as an, DropdownMenuItem as on } from "./ui/DropdownMenu.js";
36
+ import { j as De } from "./joinUrl-nLx9pD-Z.js";
37
+ import { VisuallyHidden as We } from "@radix-ui/react-visually-hidden";
38
+ import { z as ln, J as cn } from "./SyntaxHighlight-B0L4SC_N.js";
39
+ import { a as un } from "./index-Djenk2Hj.js";
40
+ var D, Ie, dn = (Ie = class extends Be {
41
41
  constructor(e = {}) {
42
42
  super();
43
43
  j(this, D);
44
44
  this.config = e, y(this, D, /* @__PURE__ */ new Map());
45
45
  }
46
46
  build(e, n, s) {
47
- const a = n.queryKey, o = n.queryHash ?? ze(a, n);
48
- let i = this.get(o);
49
- return i || (i = new xt({
47
+ const a = n.queryKey, i = n.queryHash ?? He(a, n);
48
+ let o = this.get(i);
49
+ return o || (o = new jt({
50
50
  cache: this,
51
51
  queryKey: a,
52
- queryHash: o,
52
+ queryHash: i,
53
53
  options: e.defaultQueryOptions(n),
54
54
  state: s,
55
55
  defaultOptions: e.getQueryDefaults(a)
56
- }), this.add(i)), i;
56
+ }), this.add(o)), o;
57
57
  }
58
58
  add(e) {
59
59
  l(this, D).has(e.queryHash) || (l(this, D).set(e.queryHash, e), this.notify({
@@ -81,12 +81,12 @@ var D, Ee, un = (Ee = class extends Fe {
81
81
  find(e) {
82
82
  const n = { exact: !0, ...e };
83
83
  return this.getAll().find(
84
- (s) => pe(n, s)
84
+ (s) => be(n, s)
85
85
  );
86
86
  }
87
87
  findAll(e = {}) {
88
88
  const n = this.getAll();
89
- return Object.keys(e).length > 0 ? n.filter((s) => pe(e, s)) : n;
89
+ return Object.keys(e).length > 0 ? n.filter((s) => be(e, s)) : n;
90
90
  }
91
91
  notify(e) {
92
92
  w.batch(() => {
@@ -109,16 +109,16 @@ var D, Ee, un = (Ee = class extends Fe {
109
109
  });
110
110
  });
111
111
  }
112
- }, D = new WeakMap(), Ee), O, S, Y, Ae, dn = (Ae = class extends Fe {
112
+ }, D = new WeakMap(), Ie), O, k, Y, Te, hn = (Te = class extends Be {
113
113
  constructor(e = {}) {
114
114
  super();
115
115
  j(this, O);
116
- j(this, S);
116
+ j(this, k);
117
117
  j(this, Y);
118
- this.config = e, y(this, O, /* @__PURE__ */ new Set()), y(this, S, /* @__PURE__ */ new Map()), y(this, Y, 0);
118
+ this.config = e, y(this, O, /* @__PURE__ */ new Set()), y(this, k, /* @__PURE__ */ new Map()), y(this, Y, 0);
119
119
  }
120
120
  build(e, n, s) {
121
- const a = new ht({
121
+ const a = new gt({
122
122
  mutationCache: this,
123
123
  mutationId: ++_(this, Y)._,
124
124
  options: e.defaultMutationOptions(n),
@@ -130,8 +130,8 @@ var D, Ee, un = (Ee = class extends Fe {
130
130
  l(this, O).add(e);
131
131
  const n = W(e);
132
132
  if (typeof n == "string") {
133
- const s = l(this, S).get(n);
134
- s ? s.push(e) : l(this, S).set(n, [e]);
133
+ const s = l(this, k).get(n);
134
+ s ? s.push(e) : l(this, k).set(n, [e]);
135
135
  }
136
136
  this.notify({ type: "added", mutation: e });
137
137
  }
@@ -139,12 +139,12 @@ var D, Ee, un = (Ee = class extends Fe {
139
139
  if (l(this, O).delete(e)) {
140
140
  const n = W(e);
141
141
  if (typeof n == "string") {
142
- const s = l(this, S).get(n);
142
+ const s = l(this, k).get(n);
143
143
  if (s)
144
144
  if (s.length > 1) {
145
145
  const a = s.indexOf(e);
146
146
  a !== -1 && s.splice(a, 1);
147
- } else s[0] === e && l(this, S).delete(n);
147
+ } else s[0] === e && l(this, k).delete(n);
148
148
  }
149
149
  }
150
150
  this.notify({ type: "removed", mutation: e });
@@ -152,8 +152,8 @@ var D, Ee, un = (Ee = class extends Fe {
152
152
  canRun(e) {
153
153
  const n = W(e);
154
154
  if (typeof n == "string") {
155
- const s = l(this, S).get(n), a = s == null ? void 0 : s.find(
156
- (o) => o.state.status === "pending"
155
+ const s = l(this, k).get(n), a = s == null ? void 0 : s.find(
156
+ (i) => i.state.status === "pending"
157
157
  );
158
158
  return !a || a === e;
159
159
  } else
@@ -163,7 +163,7 @@ var D, Ee, un = (Ee = class extends Fe {
163
163
  var s;
164
164
  const n = W(e);
165
165
  if (typeof n == "string") {
166
- const a = (s = l(this, S).get(n)) == null ? void 0 : s.find((o) => o !== e && o.state.isPaused);
166
+ const a = (s = l(this, k).get(n)) == null ? void 0 : s.find((i) => i !== e && i.state.isPaused);
167
167
  return (a == null ? void 0 : a.continue()) ?? Promise.resolve();
168
168
  } else
169
169
  return Promise.resolve();
@@ -172,7 +172,7 @@ var D, Ee, un = (Ee = class extends Fe {
172
172
  w.batch(() => {
173
173
  l(this, O).forEach((e) => {
174
174
  this.notify({ type: "removed", mutation: e });
175
- }), l(this, O).clear(), l(this, S).clear();
175
+ }), l(this, O).clear(), l(this, k).clear();
176
176
  });
177
177
  }
178
178
  getAll() {
@@ -181,11 +181,11 @@ var D, Ee, un = (Ee = class extends Fe {
181
181
  find(e) {
182
182
  const n = { exact: !0, ...e };
183
183
  return this.getAll().find(
184
- (s) => xe(n, s)
184
+ (s) => je(n, s)
185
185
  );
186
186
  }
187
187
  findAll(e = {}) {
188
- return this.getAll().filter((n) => xe(e, n));
188
+ return this.getAll().filter((n) => je(e, n));
189
189
  }
190
190
  notify(e) {
191
191
  w.batch(() => {
@@ -202,16 +202,16 @@ var D, Ee, un = (Ee = class extends Fe {
202
202
  )
203
203
  );
204
204
  }
205
- }, O = new WeakMap(), S = new WeakMap(), Y = new WeakMap(), Ae);
205
+ }, O = new WeakMap(), k = new WeakMap(), Y = new WeakMap(), Te);
206
206
  function W(t) {
207
207
  var e;
208
208
  return (e = t.options.scope) == null ? void 0 : e.id;
209
209
  }
210
- function Se(t) {
210
+ function Me(t) {
211
211
  return {
212
212
  onFetch: (e, n) => {
213
213
  var g, f, h, x, v;
214
- const s = e.options, a = (h = (f = (g = e.fetchOptions) == null ? void 0 : g.meta) == null ? void 0 : f.fetchMore) == null ? void 0 : h.direction, o = ((x = e.state.data) == null ? void 0 : x.pages) || [], i = ((v = e.state.data) == null ? void 0 : v.pageParams) || [];
214
+ const s = e.options, a = (h = (f = (g = e.fetchOptions) == null ? void 0 : g.meta) == null ? void 0 : f.fetchMore) == null ? void 0 : h.direction, i = ((x = e.state.data) == null ? void 0 : x.pages) || [], o = ((v = e.state.data) == null ? void 0 : v.pageParams) || [];
215
215
  let u = { pages: [], pageParams: [] }, d = 0;
216
216
  const c = async () => {
217
217
  let m = !1;
@@ -222,39 +222,39 @@ function Se(t) {
222
222
  m = !0;
223
223
  }), e.signal)
224
224
  });
225
- }, X = yt(e.options, e.fetchOptions), H = async (b, k, L) => {
225
+ }, X = wt(e.options, e.fetchOptions), L = async (b, S, K) => {
226
226
  if (m)
227
227
  return Promise.reject();
228
- if (k == null && b.pages.length)
228
+ if (S == null && b.pages.length)
229
229
  return Promise.resolve(b);
230
230
  const V = {
231
231
  queryKey: e.queryKey,
232
- pageParam: k,
233
- direction: L ? "backward" : "forward",
232
+ pageParam: S,
233
+ direction: K ? "backward" : "forward",
234
234
  meta: e.options.meta
235
235
  };
236
236
  C(V);
237
- const it = await X(
237
+ const ot = await X(
238
238
  V
239
- ), { maxPages: he } = e.options, fe = L ? vt : bt;
239
+ ), { maxPages: me } = e.options, pe = K ? Pt : Ct;
240
240
  return {
241
- pages: fe(b.pages, it, he),
242
- pageParams: fe(b.pageParams, k, he)
241
+ pages: pe(b.pages, ot, me),
242
+ pageParams: pe(b.pageParams, S, me)
243
243
  };
244
244
  };
245
- if (a && o.length) {
246
- const b = a === "backward", k = b ? hn : ke, L = {
247
- pages: o,
248
- pageParams: i
249
- }, V = k(s, L);
250
- u = await H(L, V, b);
245
+ if (a && i.length) {
246
+ const b = a === "backward", S = b ? fn : Ne, K = {
247
+ pages: i,
248
+ pageParams: o
249
+ }, V = S(s, K);
250
+ u = await L(K, V, b);
251
251
  } else {
252
- const b = t ?? o.length;
252
+ const b = t ?? i.length;
253
253
  do {
254
- const k = d === 0 ? i[0] ?? s.initialPageParam : ke(s, u);
255
- if (d > 0 && k == null)
254
+ const S = d === 0 ? o[0] ?? s.initialPageParam : Ne(s, u);
255
+ if (d > 0 && S == null)
256
256
  break;
257
- u = await H(u, k), d++;
257
+ u = await L(u, S), d++;
258
258
  } while (d < b);
259
259
  }
260
260
  return u;
@@ -275,7 +275,7 @@ function Se(t) {
275
275
  }
276
276
  };
277
277
  }
278
- function ke(t, { pages: e, pageParams: n }) {
278
+ function Ne(t, { pages: e, pageParams: n }) {
279
279
  const s = e.length - 1;
280
280
  return e.length > 0 ? t.getNextPageParam(
281
281
  e[s],
@@ -284,38 +284,38 @@ function ke(t, { pages: e, pageParams: n }) {
284
284
  n
285
285
  ) : void 0;
286
286
  }
287
- function hn(t, { pages: e, pageParams: n }) {
287
+ function fn(t, { pages: e, pageParams: n }) {
288
288
  var s;
289
289
  return e.length > 0 ? (s = t.getPreviousPageParam) == null ? void 0 : s.call(t, e[0], e, n[0], n) : void 0;
290
290
  }
291
- var p, E, A, T, q, Q, R, F, Qe, fn = (Qe = class {
291
+ var p, A, Q, T, q, I, R, F, qe, gn = (qe = class {
292
292
  constructor(t = {}) {
293
293
  j(this, p);
294
- j(this, E);
295
294
  j(this, A);
295
+ j(this, Q);
296
296
  j(this, T);
297
297
  j(this, q);
298
- j(this, Q);
298
+ j(this, I);
299
299
  j(this, R);
300
300
  j(this, F);
301
- y(this, p, t.queryCache || new un()), y(this, E, t.mutationCache || new dn()), y(this, A, t.defaultOptions || {}), y(this, T, /* @__PURE__ */ new Map()), y(this, q, /* @__PURE__ */ new Map()), y(this, Q, 0);
301
+ y(this, p, t.queryCache || new dn()), y(this, A, t.mutationCache || new hn()), y(this, Q, t.defaultOptions || {}), y(this, T, /* @__PURE__ */ new Map()), y(this, q, /* @__PURE__ */ new Map()), y(this, I, 0);
302
302
  }
303
303
  mount() {
304
- _(this, Q)._++, l(this, Q) === 1 && (y(this, R, jt.subscribe(async (t) => {
304
+ _(this, I)._++, l(this, I) === 1 && (y(this, R, kt.subscribe(async (t) => {
305
305
  t && (await this.resumePausedMutations(), l(this, p).onFocus());
306
- })), y(this, F, ye.subscribe(async (t) => {
306
+ })), y(this, F, we.subscribe(async (t) => {
307
307
  t && (await this.resumePausedMutations(), l(this, p).onOnline());
308
308
  })));
309
309
  }
310
310
  unmount() {
311
311
  var t, e;
312
- _(this, Q)._--, l(this, Q) === 0 && ((t = l(this, R)) == null || t.call(this), y(this, R, void 0), (e = l(this, F)) == null || e.call(this), y(this, F, void 0));
312
+ _(this, I)._--, l(this, I) === 0 && ((t = l(this, R)) == null || t.call(this), y(this, R, void 0), (e = l(this, F)) == null || e.call(this), y(this, F, void 0));
313
313
  }
314
314
  isFetching(t) {
315
315
  return l(this, p).findAll({ ...t, fetchStatus: "fetching" }).length;
316
316
  }
317
317
  isMutating(t) {
318
- return l(this, E).findAll({ ...t, status: "pending" }).length;
318
+ return l(this, A).findAll({ ...t, status: "pending" }).length;
319
319
  }
320
320
  getQueryData(t) {
321
321
  var n;
@@ -324,7 +324,7 @@ var p, E, A, T, q, Q, R, F, Qe, fn = (Qe = class {
324
324
  }
325
325
  ensureQueryData(t) {
326
326
  const e = this.defaultQueryOptions(t), n = l(this, p).build(this, e), s = n.state.data;
327
- return s === void 0 ? this.fetchQuery(t) : (t.revalidateIfStale && n.isStaleByTime(ve(e.staleTime, n)) && this.prefetchQuery(e), Promise.resolve(s));
327
+ return s === void 0 ? this.fetchQuery(t) : (t.revalidateIfStale && n.isStaleByTime(Pe(e.staleTime, n)) && this.prefetchQuery(e), Promise.resolve(s));
328
328
  }
329
329
  getQueriesData(t) {
330
330
  return l(this, p).findAll(t).map(({ queryKey: e, state: n }) => {
@@ -335,9 +335,9 @@ var p, E, A, T, q, Q, R, F, Qe, fn = (Qe = class {
335
335
  setQueryData(t, e, n) {
336
336
  const s = this.defaultQueryOptions({ queryKey: t }), a = l(this, p).get(
337
337
  s.queryHash
338
- ), o = a == null ? void 0 : a.state.data, i = wt(e, o);
339
- if (i !== void 0)
340
- return l(this, p).build(this, s).setData(i, { ...n, manual: !0 });
338
+ ), i = a == null ? void 0 : a.state.data, o = St(e, i);
339
+ if (o !== void 0)
340
+ return l(this, p).build(this, s).setData(o, { ...n, manual: !0 });
341
341
  }
342
342
  setQueriesData(t, e, n) {
343
343
  return w.batch(
@@ -396,8 +396,8 @@ var p, E, A, T, q, Q, R, F, Qe, fn = (Qe = class {
396
396
  cancelRefetch: e.cancelRefetch ?? !0
397
397
  }, s = w.batch(
398
398
  () => l(this, p).findAll(t).filter((a) => !a.isDisabled()).map((a) => {
399
- let o = a.fetch(void 0, n);
400
- return n.throwOnError || (o = o.catch(N)), a.state.fetchStatus === "paused" ? Promise.resolve() : o;
399
+ let i = a.fetch(void 0, n);
400
+ return n.throwOnError || (i = i.catch(N)), a.state.fetchStatus === "paused" ? Promise.resolve() : i;
401
401
  })
402
402
  );
403
403
  return Promise.all(s).then(N);
@@ -407,38 +407,38 @@ var p, E, A, T, q, Q, R, F, Qe, fn = (Qe = class {
407
407
  e.retry === void 0 && (e.retry = !1);
408
408
  const n = l(this, p).build(this, e);
409
409
  return n.isStaleByTime(
410
- ve(e.staleTime, n)
410
+ Pe(e.staleTime, n)
411
411
  ) ? n.fetch(e) : Promise.resolve(n.state.data);
412
412
  }
413
413
  prefetchQuery(t) {
414
414
  return this.fetchQuery(t).then(N).catch(N);
415
415
  }
416
416
  fetchInfiniteQuery(t) {
417
- return t.behavior = Se(t.pages), this.fetchQuery(t);
417
+ return t.behavior = Me(t.pages), this.fetchQuery(t);
418
418
  }
419
419
  prefetchInfiniteQuery(t) {
420
420
  return this.fetchInfiniteQuery(t).then(N).catch(N);
421
421
  }
422
422
  ensureInfiniteQueryData(t) {
423
- return t.behavior = Se(t.pages), this.ensureQueryData(t);
423
+ return t.behavior = Me(t.pages), this.ensureQueryData(t);
424
424
  }
425
425
  resumePausedMutations() {
426
- return ye.isOnline() ? l(this, E).resumePausedMutations() : Promise.resolve();
426
+ return we.isOnline() ? l(this, A).resumePausedMutations() : Promise.resolve();
427
427
  }
428
428
  getQueryCache() {
429
429
  return l(this, p);
430
430
  }
431
431
  getMutationCache() {
432
- return l(this, E);
432
+ return l(this, A);
433
433
  }
434
434
  getDefaultOptions() {
435
- return l(this, A);
435
+ return l(this, Q);
436
436
  }
437
437
  setDefaultOptions(t) {
438
- y(this, A, t);
438
+ y(this, Q, t);
439
439
  }
440
440
  setQueryDefaults(t, e) {
441
- l(this, T).set(be(t), {
441
+ l(this, T).set(Ce(t), {
442
442
  queryKey: t,
443
443
  defaultOptions: e
444
444
  });
@@ -446,11 +446,11 @@ var p, E, A, T, q, Q, R, F, Qe, fn = (Qe = class {
446
446
  getQueryDefaults(t) {
447
447
  const e = [...l(this, T).values()], n = {};
448
448
  return e.forEach((s) => {
449
- je(t, s.queryKey) && Object.assign(n, s.defaultOptions);
449
+ ke(t, s.queryKey) && Object.assign(n, s.defaultOptions);
450
450
  }), n;
451
451
  }
452
452
  setMutationDefaults(t, e) {
453
- l(this, q).set(be(t), {
453
+ l(this, q).set(Ce(t), {
454
454
  mutationKey: t,
455
455
  defaultOptions: e
456
456
  });
@@ -459,44 +459,44 @@ var p, E, A, T, q, Q, R, F, Qe, fn = (Qe = class {
459
459
  const e = [...l(this, q).values()];
460
460
  let n = {};
461
461
  return e.forEach((s) => {
462
- je(t, s.mutationKey) && (n = { ...n, ...s.defaultOptions });
462
+ ke(t, s.mutationKey) && (n = { ...n, ...s.defaultOptions });
463
463
  }), n;
464
464
  }
465
465
  defaultQueryOptions(t) {
466
466
  if (t._defaulted)
467
467
  return t;
468
468
  const e = {
469
- ...l(this, A).queries,
469
+ ...l(this, Q).queries,
470
470
  ...this.getQueryDefaults(t.queryKey),
471
471
  ...t,
472
472
  _defaulted: !0
473
473
  };
474
- return e.queryHash || (e.queryHash = ze(
474
+ return e.queryHash || (e.queryHash = He(
475
475
  e.queryKey,
476
476
  e
477
- )), 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;
477
+ )), 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 === Dt && (e.enabled = !1), e;
478
478
  }
479
479
  defaultMutationOptions(t) {
480
480
  return t != null && t._defaulted ? t : {
481
- ...l(this, A).mutations,
481
+ ...l(this, Q).mutations,
482
482
  ...(t == null ? void 0 : t.mutationKey) && this.getMutationDefaults(t.mutationKey),
483
483
  ...t,
484
484
  _defaulted: !0
485
485
  };
486
486
  }
487
487
  clear() {
488
- l(this, p).clear(), l(this, E).clear();
488
+ l(this, p).clear(), l(this, A).clear();
489
489
  }
490
- }, p = new WeakMap(), E = new WeakMap(), A = new WeakMap(), T = new WeakMap(), q = new WeakMap(), Q = new WeakMap(), R = new WeakMap(), F = new WeakMap(), Qe);
491
- function gn(t) {
490
+ }, p = new WeakMap(), A = new WeakMap(), Q = new WeakMap(), T = new WeakMap(), q = new WeakMap(), I = new WeakMap(), R = new WeakMap(), F = new WeakMap(), qe);
491
+ function mn(t) {
492
492
  return t;
493
493
  }
494
- function De(t, e, n) {
494
+ function Oe(t, e, n) {
495
495
  var d, c;
496
496
  if (typeof e != "object" || e === null)
497
497
  return;
498
- const s = t.getMutationCache(), a = t.getQueryCache(), o = ((d = n == null ? void 0 : n.defaultOptions) == null ? void 0 : d.deserializeData) ?? ((c = t.getDefaultOptions().hydrate) == null ? void 0 : c.deserializeData) ?? gn, i = e.mutations || [], u = e.queries || [];
499
- i.forEach(({ state: g, ...f }) => {
498
+ const s = t.getMutationCache(), a = t.getQueryCache(), i = ((d = n == null ? void 0 : n.defaultOptions) == null ? void 0 : d.deserializeData) ?? ((c = t.getDefaultOptions().hydrate) == null ? void 0 : c.deserializeData) ?? mn, o = e.mutations || [], u = e.queries || [];
499
+ o.forEach(({ state: g, ...f }) => {
500
500
  var h, x;
501
501
  s.build(
502
502
  t,
@@ -508,14 +508,14 @@ function De(t, e, n) {
508
508
  g
509
509
  );
510
510
  }), u.forEach(({ queryKey: g, state: f, queryHash: h, meta: x, promise: v }) => {
511
- var X, H;
511
+ var X, L;
512
512
  let m = a.get(h);
513
- const C = f.data === void 0 ? f.data : o(f.data);
513
+ const C = f.data === void 0 ? f.data : i(f.data);
514
514
  if (m) {
515
515
  if (m.state.dataUpdatedAt < f.dataUpdatedAt) {
516
- const { fetchStatus: b, ...k } = f;
516
+ const { fetchStatus: b, ...S } = f;
517
517
  m.setState({
518
- ...k,
518
+ ...S,
519
519
  data: C
520
520
  });
521
521
  }
@@ -524,7 +524,7 @@ function De(t, e, n) {
524
524
  t,
525
525
  {
526
526
  ...(X = t.getDefaultOptions().hydrate) == null ? void 0 : X.queries,
527
- ...(H = n == null ? void 0 : n.defaultOptions) == null ? void 0 : H.queries,
527
+ ...(L = n == null ? void 0 : n.defaultOptions) == null ? void 0 : L.queries,
528
528
  queryKey: g,
529
529
  queryHash: h,
530
530
  meta: x
@@ -538,19 +538,19 @@ function De(t, e, n) {
538
538
  }
539
539
  );
540
540
  if (v) {
541
- const b = Promise.resolve(v).then(o);
541
+ const b = Promise.resolve(v).then(i);
542
542
  m.fetch(void 0, { initialPromise: b });
543
543
  }
544
544
  });
545
545
  }
546
- var mn = ({
546
+ var pn = ({
547
547
  children: t,
548
548
  options: e = {},
549
549
  state: n,
550
550
  queryClient: s
551
551
  }) => {
552
- const a = Ct(s), [o, i] = K.useState(), u = K.useRef(e);
553
- return u.current = e, K.useMemo(() => {
552
+ const a = Mt(s), [i, o] = $.useState(), u = $.useRef(e);
553
+ return u.current = e, $.useMemo(() => {
554
554
  if (n) {
555
555
  if (typeof n != "object")
556
556
  return;
@@ -560,22 +560,39 @@ var mn = ({
560
560
  if (!x)
561
561
  g.push(h);
562
562
  else {
563
- const v = h.state.dataUpdatedAt > x.state.dataUpdatedAt, m = o == null ? void 0 : o.find(
563
+ const v = h.state.dataUpdatedAt > x.state.dataUpdatedAt, m = i == null ? void 0 : i.find(
564
564
  (C) => C.queryHash === h.queryHash
565
565
  );
566
566
  v && (!m || h.state.dataUpdatedAt > m.state.dataUpdatedAt) && f.push(h);
567
567
  }
568
568
  }
569
- g.length > 0 && De(a, { queries: g }, u.current), f.length > 0 && i(
569
+ g.length > 0 && Oe(a, { queries: g }, u.current), f.length > 0 && o(
570
570
  (h) => h ? [...h, ...f] : f
571
571
  );
572
572
  }
573
- }, [a, o, n]), K.useEffect(() => {
574
- o && (De(a, { queries: o }, u.current), i(void 0));
575
- }, [a, o]), t;
573
+ }, [a, i, n]), $.useEffect(() => {
574
+ i && (Oe(a, { queries: i }, u.current), o(void 0));
575
+ }, [a, i]), t;
576
576
  };
577
- function pn({ error: t }) {
578
- return /* @__PURE__ */ r.jsx(Re, { error: t });
577
+ const xn = () => {
578
+ var a;
579
+ const t = z(), e = E(), n = oe(), s = (a = e.options.protectedRoutes) == null ? void 0 : a.some(
580
+ (i) => ut({ path: i, end: !0 }, n.pathname)
581
+ );
582
+ if (B(() => {
583
+ var i;
584
+ s && !t.isAuthenticated && ((i = e.authentication) == null || i.signIn());
585
+ }, [s, t.isAuthenticated, e.authentication]), s && !t.isAuthenticated)
586
+ return null;
587
+ if (s && !t.isAuthEnabled)
588
+ throw new $e("Authentication is not enabled", {
589
+ title: "Authentication is not enabled",
590
+ developerHint: "To use protectedRoutes you need authentication to be enabled"
591
+ });
592
+ return /* @__PURE__ */ r.jsx(le, {});
593
+ };
594
+ function yn({ error: t }) {
595
+ return /* @__PURE__ */ r.jsx(Ze, { error: t });
579
596
  }
580
597
  /**
581
598
  * react-router v7.1.3
@@ -587,44 +604,44 @@ function pn({ error: t }) {
587
604
  *
588
605
  * @license MIT
589
606
  */
590
- function xn(t) {
591
- return /* @__PURE__ */ K.createElement(ct, { flushSync: qt.flushSync, ...t });
607
+ function vn(t) {
608
+ return /* @__PURE__ */ $.createElement(dt, { flushSync: Ft.flushSync, ...t });
592
609
  }
593
- const ae = ce({ stagger: !1 }), yn = new fn({
610
+ const ae = de({ stagger: !1 }), bn = new gn({
594
611
  defaultOptions: {
595
612
  queries: {
596
613
  staleTime: 1e3 * 60 * 5
597
614
  }
598
615
  }
599
- }), vn = ({
616
+ }), jn = ({
600
617
  router: t,
601
618
  hydrate: e = !1
602
- }) => /* @__PURE__ */ r.jsx(Le, { children: /* @__PURE__ */ r.jsx(Be, { client: yn, children: /* @__PURE__ */ r.jsx(mn, { state: e ? window.DATA : void 0, children: /* @__PURE__ */ r.jsx(Ie, { children: /* @__PURE__ */ r.jsx(ae.Provider, { value: { stagger: !e }, children: /* @__PURE__ */ r.jsx(xn, { router: t }) }) }) }) }) }), bn = ({
619
+ }) => /* @__PURE__ */ r.jsx(Fe, { children: /* @__PURE__ */ r.jsx(Le, { client: bn, children: /* @__PURE__ */ r.jsx(pn, { state: e ? window.DATA : void 0, children: /* @__PURE__ */ r.jsx(Re, { children: /* @__PURE__ */ r.jsx(ae.Provider, { value: { stagger: !e }, children: /* @__PURE__ */ r.jsx(vn, { router: t }) }) }) }) }) }), wn = ({
603
620
  router: t,
604
621
  context: e,
605
622
  queryClient: n,
606
623
  helmetContext: s
607
- }) => /* @__PURE__ */ r.jsx(Le, { children: /* @__PURE__ */ r.jsx(Be, { client: n, children: /* @__PURE__ */ r.jsx(Ie, { context: s, children: /* @__PURE__ */ r.jsx(ut, { router: t, context: e }) }) }) });
608
- var $ = { exports: {} }, jn = $.exports, Me;
609
- function wn() {
610
- return Me || (Me = 1, function(t, e) {
624
+ }) => /* @__PURE__ */ r.jsx(Fe, { children: /* @__PURE__ */ r.jsx(Le, { client: n, children: /* @__PURE__ */ r.jsx(Re, { context: s, children: /* @__PURE__ */ r.jsx(ht, { router: t, context: e }) }) }) });
625
+ var Z = { exports: {} }, Pn = Z.exports, Ee;
626
+ function Cn() {
627
+ return Ee || (Ee = 1, function(t, e) {
611
628
  (function(n, s) {
612
- s(e, Ot);
613
- })(jn, function(n, s) {
629
+ s(e, mt);
630
+ })(Pn, function(n, s) {
614
631
  const a = {
615
632
  delay: 500,
616
633
  minDuration: 200,
617
634
  ssr: !0
618
635
  };
619
- function o() {
636
+ function i() {
620
637
  const [u, d] = s.useState(!0);
621
638
  return s.useEffect(() => {
622
639
  d(!1);
623
640
  }, []), u;
624
641
  }
625
- function i(u, d) {
642
+ function o(u, d) {
626
643
  d = Object.assign({}, a, d);
627
- const c = o() && d.ssr, g = c && u ? "DISPLAY" : "IDLE", [f, h] = s.useState(g), x = s.useRef(null);
644
+ const c = i() && d.ssr, g = c && u ? "DISPLAY" : "IDLE", [f, h] = s.useState(g), x = s.useRef(null);
628
645
  return s.useEffect(() => {
629
646
  if (u && (f === "IDLE" || c)) {
630
647
  clearTimeout(x.current);
@@ -640,44 +657,44 @@ function wn() {
640
657
  !u && f !== "DISPLAY" && (clearTimeout(x.current), h("IDLE"));
641
658
  }, [u, f, d.delay, d.minDuration, c]), s.useEffect(() => () => clearTimeout(x.current), []), f === "DISPLAY" || f === "EXPIRE";
642
659
  }
643
- n.defaultOptions = a, n.useSpinDelay = i;
660
+ n.defaultOptions = a, n.useSpinDelay = o;
644
661
  });
645
- }($, $.exports)), $.exports;
662
+ }(Z, Z.exports)), Z.exports;
646
663
  }
647
- var Pn = wn();
648
- const Cn = () => {
649
- const t = Te(), e = ue(t.pathname);
650
- U(() => {
664
+ var kn = Cn();
665
+ const Sn = () => {
666
+ const t = oe(), e = he(t.pathname);
667
+ B(() => {
651
668
  e.current !== t.pathname && (window.scrollTo(0, 0), e.current = t.pathname);
652
669
  }, [t.pathname]);
653
670
  };
654
- function Sn({
671
+ function Dn({
655
672
  className: t,
656
673
  ...e
657
674
  }) {
658
675
  return /* @__PURE__ */ r.jsx(
659
676
  "div",
660
677
  {
661
- className: B("animate-pulse rounded-md bg-muted", t),
678
+ className: U("animate-pulse rounded-md bg-muted", t),
662
679
  ...e
663
680
  }
664
681
  );
665
682
  }
666
- const kn = (t) => "getProfileMenuItems" in t && typeof t.getProfileMenuItems == "function", Dn = (t) => "getRoutes" in t && typeof t.getRoutes == "function", Mn = (t) => "renderSearch" in t && typeof t.renderSearch == "function", Nn = (t) => "initialize" in t && typeof t.initialize == "function", On = (t) => "getHead" in t && typeof t.getHead == "function", En = (t) => "getMdxComponents" in t && typeof t.getMdxComponents == "function", An = (t) => "getIdentities" in t && typeof t.getIdentities == "function", Ne = {
683
+ const Mn = (t) => "getProfileMenuItems" in t && typeof t.getProfileMenuItems == "function", Nn = (t) => "getRoutes" in t && typeof t.getRoutes == "function", On = (t) => "renderSearch" in t && typeof t.renderSearch == "function", En = (t) => "initialize" in t && typeof t.initialize == "function", An = (t) => "getHead" in t && typeof t.getHead == "function", Qn = (t) => "getMdxComponents" in t && typeof t.getMdxComponents == "function", In = (t) => "getIdentities" in t && typeof t.getIdentities == "function", Ae = {
667
684
  info: "bg-blue-500",
668
685
  note: "bg-gray-500",
669
686
  tip: "bg-green-600",
670
687
  caution: "bg-orange-500",
671
688
  danger: "bg-rose-500"
672
- }, Qn = () => {
673
- const { page: t } = I(), [e, n] = z(!0);
689
+ }, Tn = () => {
690
+ const { page: t } = E(), [e, n] = H(!0);
674
691
  if (!(t != null && t.banner) || !e)
675
692
  return /* @__PURE__ */ r.jsx("style", { children: ":root { --banner-height: 0px; }" });
676
- const s = t.banner.color && t.banner.color in Ne ? Ne[t.banner.color] : t.banner.color ? void 0 : "bg-primary", a = s ? {} : { backgroundColor: t.banner.color };
693
+ const s = t.banner.color && t.banner.color in Ae ? Ae[t.banner.color] : t.banner.color ? void 0 : "bg-primary", a = s ? {} : { backgroundColor: t.banner.color };
677
694
  return /* @__PURE__ */ r.jsxs(
678
695
  "div",
679
696
  {
680
- className: B(
697
+ className: U(
681
698
  "relative text-primary-foreground text-sm font-medium px-4 py-2 flex gap-2 items-center",
682
699
  s
683
700
  ),
@@ -690,26 +707,26 @@ const kn = (t) => "getProfileMenuItems" in t && typeof t.getProfileMenuItems ==
690
707
  type: "button",
691
708
  className: "md:absolute md:right-4 -m-1.5 p-1.5 hover:bg-accent-foreground/10 rounded-md",
692
709
  onClick: () => n(!1),
693
- children: /* @__PURE__ */ r.jsx(Rt, { size: 16 })
710
+ children: /* @__PURE__ */ r.jsx(zt, { size: 16 })
694
711
  }
695
712
  )
696
713
  ]
697
714
  }
698
715
  );
699
- }, We = ({ className: t }) => {
700
- const e = I(), [n, s] = z(!1), a = Et(() => s(!1), []);
701
- U(() => {
716
+ }, Ge = ({ className: t }) => {
717
+ const e = E(), [n, s] = H(!1), a = pt(() => s(!1), []);
718
+ B(() => {
702
719
  if (n)
703
720
  return;
704
- function i(u) {
721
+ function o(u) {
705
722
  u.key === "k" && (u.metaKey || u.ctrlKey) && (u.preventDefault(), s(!0));
706
723
  }
707
- return window.addEventListener("keydown", i), () => {
708
- window.removeEventListener("keydown", i);
724
+ return window.addEventListener("keydown", o), () => {
725
+ window.removeEventListener("keydown", o);
709
726
  };
710
727
  }, [n, s]);
711
- const o = e.plugins.find(Mn);
712
- return o ? /* @__PURE__ */ r.jsxs("div", { className: t, children: [
728
+ const i = e.plugins.find(On);
729
+ return i ? /* @__PURE__ */ r.jsxs("div", { className: t, children: [
713
730
  /* @__PURE__ */ r.jsxs(
714
731
  "button",
715
732
  {
@@ -718,54 +735,53 @@ const kn = (t) => "getProfileMenuItems" in t && typeof t.getProfileMenuItems ==
718
735
  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",
719
736
  children: [
720
737
  /* @__PURE__ */ r.jsxs("div", { className: "flex items-center gap-2 flex-grow", children: [
721
- /* @__PURE__ */ r.jsx(Ft, { size: 14 }),
738
+ /* @__PURE__ */ r.jsx(Bt, { size: 14 }),
722
739
  "Search"
723
740
  ] }),
724
741
  /* @__PURE__ */ r.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" })
725
742
  ]
726
743
  }
727
744
  ),
728
- /* @__PURE__ */ r.jsx(de, { fallback: null, children: o.renderSearch({
745
+ /* @__PURE__ */ r.jsx(fe, { fallback: null, children: i.renderSearch({
729
746
  isOpen: n,
730
747
  onClose: a
731
748
  }) })
732
749
  ] }) : null;
733
- }, Ge = () => {
734
- const { resolvedTheme: t, setTheme: e } = an(), n = t === "dark" ? zt : Bt;
735
- return /* @__PURE__ */ r.jsx(
736
- re,
750
+ }, Je = () => {
751
+ const { resolvedTheme: t, setTheme: e } = ln(), n = t === "dark" ? Ht : Lt;
752
+ return /* @__PURE__ */ r.jsx(ge, { fallback: /* @__PURE__ */ r.jsx(ee, { variant: "ghost", size: "icon" }), children: /* @__PURE__ */ r.jsx(
753
+ ee,
737
754
  {
738
755
  variant: "ghost",
739
756
  size: "icon",
740
757
  "aria-label": t === "dark" ? "Switch to light mode" : "Switch to dark mode",
741
- className: B(t ? "opacity-100" : "opacity-0"),
742
758
  onClick: () => e(t === "dark" ? "light" : "dark"),
743
759
  children: /* @__PURE__ */ r.jsx(n, { size: 18 })
744
760
  }
745
- );
746
- }, Je = (t) => (e) => e.display === "auth" && t || e.display === "anon" && !t || !e.display || e.display === "always", In = () => {
747
- const { topNavigation: t } = I(), { isAuthenticated: e } = Z();
748
- return t.length <= 1 ? /* @__PURE__ */ r.jsx("style", { children: ":root { --top-nav-height: 0px; }" }) : /* @__PURE__ */ r.jsx(de, { children: /* @__PURE__ */ r.jsx("nav", { className: "hidden lg:block text-sm px-12 h-[--top-nav-height]", children: /* @__PURE__ */ r.jsx("ul", { className: "flex flex-row items-center gap-8", children: t.filter(Je(e)).map((n) => /* @__PURE__ */ r.jsx("li", { children: /* @__PURE__ */ r.jsx(et, { ...n }) }, n.id)) }) }) });
749
- }, et = ({
761
+ ) });
762
+ }, et = (t) => (e) => e.display === "auth" && t || e.display === "anon" && !t || !e.display || e.display === "always", qn = () => {
763
+ const { topNavigation: t } = E(), { isAuthenticated: e } = z();
764
+ return t.length <= 1 ? /* @__PURE__ */ r.jsx("style", { children: ":root { --top-nav-height: 0px; }" }) : /* @__PURE__ */ r.jsx(fe, { children: /* @__PURE__ */ r.jsx("nav", { className: "hidden lg:block text-sm px-12 h-[--top-nav-height]", children: /* @__PURE__ */ r.jsx("ul", { className: "flex flex-row items-center gap-8", children: t.filter(et(e)).map((n) => /* @__PURE__ */ r.jsx("li", { children: /* @__PURE__ */ r.jsx(tt, { ...n }) }, n.id)) }) }) });
765
+ }, tt = ({
750
766
  id: t,
751
767
  label: e,
752
768
  default: n
753
769
  }) => {
754
770
  var c;
755
- const { sidebars: s } = I(), a = s[t], o = He(), i = !!oe().location, u = ((c = o.topNavItem) == null ? void 0 : c.id) === t && !i, d = n ?? (a ? St(a, (g) => {
756
- if (g.type === "doc") return se(g.id);
757
- }) : se(t));
771
+ const { sidebars: s } = E(), a = s[t], i = Ke(), o = !!ce().location, u = ((c = i.topNavItem) == null ? void 0 : c.id) === t && !o, d = n ?? (a ? Nt(a, (g) => {
772
+ if (g.type === "doc") return re(g.id);
773
+ }) : re(t));
758
774
  if (!d)
759
- throw new cn("Page not found.", {
775
+ throw new $e("Page not found.", {
760
776
  developerHint: `No links found in top navigation for '${t}'. Check that the sidebar isn't empty or that a default link is set.`
761
777
  });
762
778
  return (
763
779
  // We don't use isActive here because it has to be inside the sidebar,
764
780
  // the top nav id doesn't necessarily start with the sidebar id
765
781
  /* @__PURE__ */ r.jsx(
766
- dt,
782
+ ft,
767
783
  {
768
- className: ({ isPending: g }) => ln(
784
+ className: ({ isPending: g }) => un(
769
785
  "block lg:py-3.5 font-medium -mb-px",
770
786
  u || g ? "border-primary text-foreground" : "border-transparent text-foreground/75 hover:text-foreground hover:border-accent-foreground/25"
771
787
  ),
@@ -774,27 +790,27 @@ const kn = (t) => "getProfileMenuItems" in t && typeof t.getProfileMenuItems ==
774
790
  }
775
791
  )
776
792
  );
777
- }, Tn = () => {
778
- const { topNavigation: t } = I(), { isAuthenticated: e } = Z(), [n, s] = z(!1);
793
+ }, Rn = () => {
794
+ const { topNavigation: t } = E(), { isAuthenticated: e } = z(), [n, s] = H(!1);
779
795
  return /* @__PURE__ */ r.jsxs(
780
- Ze,
796
+ Ue,
781
797
  {
782
798
  direction: "right",
783
799
  open: n,
784
800
  onOpenChange: (a) => s(a),
785
801
  children: [
786
- /* @__PURE__ */ r.jsx("div", { className: "flex lg:hidden justify-self-end", children: /* @__PURE__ */ r.jsx(Ue, { className: "lg:hidden", children: /* @__PURE__ */ r.jsx(Ht, { size: 22 }) }) }),
802
+ /* @__PURE__ */ r.jsx("div", { className: "flex lg:hidden justify-self-end", children: /* @__PURE__ */ r.jsx(Ye, { className: "lg:hidden", children: /* @__PURE__ */ r.jsx(Kt, { size: 22 }) }) }),
787
803
  /* @__PURE__ */ r.jsx(
788
- Ye,
804
+ Xe,
789
805
  {
790
806
  className: "lg:hidden h-[100dvh] right-0 left-auto w-[320px] rounded-none",
791
807
  "aria-describedby": void 0,
792
808
  children: /* @__PURE__ */ r.jsxs("div", { className: "p-4 overflow-y-auto overscroll-none", children: [
793
- /* @__PURE__ */ r.jsx(_e, { children: /* @__PURE__ */ r.jsx(Xe, { children: "Navigation" }) }),
794
- /* @__PURE__ */ r.jsx(We, { className: "flex p-4" }),
809
+ /* @__PURE__ */ r.jsx(We, { children: /* @__PURE__ */ r.jsx(Ve, { children: "Navigation" }) }),
810
+ /* @__PURE__ */ r.jsx(Ge, { className: "flex p-4" }),
795
811
  /* @__PURE__ */ r.jsxs("ul", { className: "flex flex-col items-center gap-4 p-4", children: [
796
- /* @__PURE__ */ r.jsx("li", { children: /* @__PURE__ */ r.jsx(Ge, {}) }),
797
- t.filter(Je(e)).map((a) => /* @__PURE__ */ r.jsx("li", { children: /* @__PURE__ */ r.jsx("button", { onClick: () => s(!1), children: /* @__PURE__ */ r.jsx(et, { ...a }) }) }, a.label))
812
+ /* @__PURE__ */ r.jsx("li", { children: /* @__PURE__ */ r.jsx(Je, {}) }),
813
+ t.filter(et(e)).map((a) => /* @__PURE__ */ r.jsx("li", { children: /* @__PURE__ */ r.jsx("button", { onClick: () => s(!1), children: /* @__PURE__ */ r.jsx(tt, { ...a }) }) }, a.label))
798
814
  ] })
799
815
  ] })
800
816
  }
@@ -802,31 +818,31 @@ const kn = (t) => "getProfileMenuItems" in t && typeof t.getProfileMenuItems ==
802
818
  ]
803
819
  }
804
820
  );
805
- }, J = ({ item: t }) => t.children ? /* @__PURE__ */ r.jsxs(en, { children: [
806
- /* @__PURE__ */ r.jsx(tn, { children: t.label }),
807
- /* @__PURE__ */ r.jsx(nn, { children: /* @__PURE__ */ r.jsx(sn, { children: t.children.map((e, n) => (
821
+ }, J = ({ item: t }) => t.children ? /* @__PURE__ */ r.jsxs(nn, { children: [
822
+ /* @__PURE__ */ r.jsx(sn, { children: t.label }),
823
+ /* @__PURE__ */ r.jsx(rn, { children: /* @__PURE__ */ r.jsx(an, { children: t.children.map((e, n) => (
808
824
  // eslint-disable-next-line react/no-array-index-key
809
825
  /* @__PURE__ */ r.jsx(J, { item: e }, n)
810
826
  )) }) })
811
- ] }, t.label) : /* @__PURE__ */ r.jsx(le, { to: t.path ?? "", children: /* @__PURE__ */ r.jsxs(rn, { className: "flex gap-2", children: [
827
+ ] }, t.label) : /* @__PURE__ */ r.jsx(ue, { to: t.path ?? "", children: /* @__PURE__ */ r.jsxs(on, { className: "flex gap-2", children: [
812
828
  t.icon && /* @__PURE__ */ r.jsx(t.icon, { size: 16, strokeWidth: 1, absoluteStrokeWidth: !0 }),
813
829
  t.label
814
- ] }, t.label) }), tt = Ke(function() {
815
- const e = Z(), { isAuthenticated: n, profile: s, isAuthEnabled: a } = Z(), o = I(), { page: i, plugins: u } = o, d = u.filter((c) => kn(c)).flatMap((c) => c.getProfileMenuItems(o)).sort((c) => c.weight ?? 0);
830
+ ] }, t.label) }), nt = ze(function() {
831
+ const e = z(), { isAuthenticated: n, profile: s, isAuthEnabled: a } = z(), i = E(), { page: o, plugins: u } = i, d = u.filter((c) => Mn(c)).flatMap((c) => c.getProfileMenuItems(i)).sort((c) => c.weight ?? 0);
816
832
  return /* @__PURE__ */ r.jsxs("header", { className: "sticky lg:top-0 z-10 bg-background/80 backdrop-blur w-full", children: [
817
- /* @__PURE__ */ r.jsx(Qn, {}),
833
+ /* @__PURE__ */ r.jsx(Tn, {}),
818
834
  /* @__PURE__ */ r.jsx("div", { className: "border-b", children: /* @__PURE__ */ r.jsxs("div", { className: "max-w-screen-2xl border-l border-r mx-auto grid grid-cols-[1fr_auto] lg:grid-cols-[calc(var(--side-nav-width))_1fr] lg:gap-12 items-center px-4 lg:px-12 h-[--top-header-height]", children: [
819
- /* @__PURE__ */ r.jsx("div", { className: "flex", children: /* @__PURE__ */ r.jsx(le, { to: "/", children: /* @__PURE__ */ r.jsxs("div", { className: "flex items-center gap-3.5", children: [
820
- (i == null ? void 0 : i.logo) && /* @__PURE__ */ r.jsxs(r.Fragment, { children: [
835
+ /* @__PURE__ */ r.jsx("div", { className: "flex", children: /* @__PURE__ */ r.jsx(ue, { to: "/", children: /* @__PURE__ */ r.jsxs("div", { className: "flex items-center gap-3.5", children: [
836
+ (o == null ? void 0 : o.logo) && /* @__PURE__ */ r.jsxs(r.Fragment, { children: [
821
837
  /* @__PURE__ */ r.jsx(
822
838
  "img",
823
839
  {
824
- src: /https?:\/\//.test(i.logo.src.light) ? i.logo.src.light : Ce(
840
+ src: /https?:\/\//.test(o.logo.src.light) ? o.logo.src.light : De(
825
841
  "/",
826
- i.logo.src.light
842
+ o.logo.src.light
827
843
  ),
828
- alt: i.logo.alt ?? i.pageTitle,
829
- style: { width: i.logo.width },
844
+ alt: o.logo.alt ?? o.pageTitle,
845
+ style: { width: o.logo.width },
830
846
  className: "h-10 dark:hidden",
831
847
  loading: "lazy"
832
848
  }
@@ -834,65 +850,65 @@ const kn = (t) => "getProfileMenuItems" in t && typeof t.getProfileMenuItems ==
834
850
  /* @__PURE__ */ r.jsx(
835
851
  "img",
836
852
  {
837
- src: /https?:\/\//.test(i.logo.src.dark) ? i.logo.src.dark : Ce(
853
+ src: /https?:\/\//.test(o.logo.src.dark) ? o.logo.src.dark : De(
838
854
  "/",
839
- i.logo.src.dark
855
+ o.logo.src.dark
840
856
  ),
841
- alt: i.logo.alt ?? i.pageTitle,
842
- style: { width: i.logo.width },
857
+ alt: o.logo.alt ?? o.pageTitle,
858
+ style: { width: o.logo.width },
843
859
  className: "h-10 hidden dark:block",
844
860
  loading: "lazy"
845
861
  }
846
862
  )
847
863
  ] }),
848
- /* @__PURE__ */ r.jsx("span", { className: "font-bold text-2xl text-foreground/85 tracking-wide", children: i == null ? void 0 : i.pageTitle })
864
+ /* @__PURE__ */ r.jsx("span", { className: "font-bold text-2xl text-foreground/85 tracking-wide", children: o == null ? void 0 : o.pageTitle })
849
865
  ] }) }) }),
850
866
  /* @__PURE__ */ r.jsxs("div", { className: "grid grid-cols-1 lg:grid-cols-[--sidecar-grid-cols] items-center gap-8", children: [
851
- /* @__PURE__ */ r.jsx("div", { className: "w-full justify-center hidden lg:flex", children: /* @__PURE__ */ r.jsx(We, {}) }),
852
- /* @__PURE__ */ r.jsx(Tn, {}),
867
+ /* @__PURE__ */ r.jsx("div", { className: "w-full justify-center hidden lg:flex", children: /* @__PURE__ */ r.jsx(Ge, {}) }),
868
+ /* @__PURE__ */ r.jsx(Rn, {}),
853
869
  /* @__PURE__ */ r.jsxs("div", { className: "hidden lg:flex items-center justify-self-end text-sm gap-2", children: [
854
870
  /* @__PURE__ */ r.jsx(M, { name: "head-navigation-start" }),
855
871
  a && /* @__PURE__ */ r.jsx(
856
- $e,
872
+ ge,
857
873
  {
858
- fallback: /* @__PURE__ */ r.jsx(Sn, { className: "rounded h-5 w-24 mr-4" }),
859
- children: n ? Object.values(d).length > 0 && /* @__PURE__ */ r.jsxs(_t, { modal: !1, children: [
860
- /* @__PURE__ */ r.jsx(Wt, { asChild: !0, children: /* @__PURE__ */ r.jsx(re, { variant: "ghost", children: s != null && s.name ? `${s.name}` : "My Account" }) }),
861
- /* @__PURE__ */ r.jsxs(Gt, { className: "w-56", children: [
862
- /* @__PURE__ */ r.jsxs(Jt, { children: [
874
+ fallback: /* @__PURE__ */ r.jsx(Dn, { className: "rounded h-5 w-24 mr-4" }),
875
+ children: n ? Object.values(d).length > 0 && /* @__PURE__ */ r.jsxs(Gt, { modal: !1, children: [
876
+ /* @__PURE__ */ r.jsx(Jt, { asChild: !0, children: /* @__PURE__ */ r.jsx(ee, { variant: "ghost", children: s != null && s.name ? `${s.name}` : "My Account" }) }),
877
+ /* @__PURE__ */ r.jsxs(en, { className: "w-56", children: [
878
+ /* @__PURE__ */ r.jsxs(tn, { children: [
863
879
  s != null && s.name ? `${s.name}` : "My Account",
864
880
  (s == null ? void 0 : s.email) && /* @__PURE__ */ r.jsx("div", { className: "font-normal text-muted-foreground", children: s.email })
865
881
  ] }),
866
- d.filter((c) => c.category === "top").length > 0 && /* @__PURE__ */ r.jsx(te, {}),
882
+ d.filter((c) => c.category === "top").length > 0 && /* @__PURE__ */ r.jsx(ne, {}),
867
883
  d.filter((c) => c.category === "top").map((c) => /* @__PURE__ */ r.jsx(J, { item: c }, c.label)),
868
884
  d.filter(
869
885
  (c) => !c.category || c.category === "middle"
870
- ).length > 0 && /* @__PURE__ */ r.jsx(te, {}),
886
+ ).length > 0 && /* @__PURE__ */ r.jsx(ne, {}),
871
887
  d.filter(
872
888
  (c) => !c.category || c.category === "middle"
873
889
  ).map((c) => /* @__PURE__ */ r.jsx(J, { item: c }, c.label)),
874
- d.filter((c) => c.category === "bottom").length > 0 && /* @__PURE__ */ r.jsx(te, {}),
890
+ d.filter((c) => c.category === "bottom").length > 0 && /* @__PURE__ */ r.jsx(ne, {}),
875
891
  d.filter((c) => c.category === "bottom").map((c) => /* @__PURE__ */ r.jsx(J, { item: c }, c.label))
876
892
  ] })
877
- ] }) : /* @__PURE__ */ r.jsx(re, { variant: "ghost", onClick: () => e.login(), children: "Login" })
893
+ ] }) : /* @__PURE__ */ r.jsx(ee, { variant: "ghost", onClick: () => e.login(), children: "Login" })
878
894
  }
879
895
  ),
880
896
  /* @__PURE__ */ r.jsx(M, { name: "head-navigation-end" }),
881
- /* @__PURE__ */ r.jsx(Ge, {})
897
+ /* @__PURE__ */ r.jsx(Je, {})
882
898
  ] })
883
899
  ] })
884
900
  ] }) }),
885
901
  /* @__PURE__ */ r.jsx("div", { className: "border-b", children: /* @__PURE__ */ r.jsxs("div", { className: "max-w-screen-2xl mx-auto border-l border-r", children: [
886
902
  /* @__PURE__ */ r.jsx(M, { name: "top-navigation-before" }),
887
- /* @__PURE__ */ r.jsx(In, {}),
903
+ /* @__PURE__ */ r.jsx(qn, {}),
888
904
  /* @__PURE__ */ r.jsx(M, { name: "top-navigation-after" })
889
905
  ] }) })
890
906
  ] });
891
- }), nt = At(({ children: t, className: e, pushMainContent: n }, s) => /* @__PURE__ */ r.jsx(
907
+ }), st = xt(({ children: t, className: e, pushMainContent: n }, s) => /* @__PURE__ */ r.jsx(
892
908
  "nav",
893
909
  {
894
910
  "data-navigation": String(n),
895
- className: B(
911
+ className: U(
896
912
  "scrollbar peer hidden lg:flex flex-col fixed text-sm overflow-y-auto shrink-0 border-r pr-10",
897
913
  "-mx-[--padding-nav-item] pb-20 pt-[--padding-content-top]",
898
914
  "w-[--side-nav-width] h-[calc(100%-var(--header-height))] scroll-pt-2 gap-2",
@@ -903,33 +919,33 @@ const kn = (t) => "getProfileMenuItems" in t && typeof t.getProfileMenuItems ==
903
919
  children: t
904
920
  }
905
921
  ));
906
- nt.displayName = "SidebarWrapper";
907
- const qn = ({
922
+ st.displayName = "SidebarWrapper";
923
+ const Fn = ({
908
924
  onRequestClose: t
909
925
  }) => {
910
- const e = ue(null), n = He();
926
+ const e = he(null), n = Ke();
911
927
  return /* @__PURE__ */ r.jsxs(r.Fragment, { children: [
912
928
  /* @__PURE__ */ r.jsxs(
913
- nt,
929
+ st,
914
930
  {
915
931
  ref: e,
916
932
  pushMainContent: n.sidebar.length > 0,
917
933
  children: [
918
934
  /* @__PURE__ */ r.jsx(M, { name: "zudoku-before-navigation" }),
919
- n.sidebar.map((s) => /* @__PURE__ */ r.jsx(Pe, { item: s }, s.label)),
935
+ n.sidebar.map((s) => /* @__PURE__ */ r.jsx(Se, { item: s }, s.label)),
920
936
  /* @__PURE__ */ r.jsx(M, { name: "zudoku-after-navigation" })
921
937
  ]
922
938
  }
923
939
  ),
924
940
  /* @__PURE__ */ r.jsx(
925
- Ye,
941
+ Xe,
926
942
  {
927
943
  className: "lg:hidden h-[100dvh] left-0 w-[320px] rounded-none",
928
944
  "aria-describedby": void 0,
929
945
  children: /* @__PURE__ */ r.jsxs("div", { className: "p-4 overflow-y-auto overscroll-none", children: [
930
- /* @__PURE__ */ r.jsx(_e, { children: /* @__PURE__ */ r.jsx(Xe, { children: "Sidebar" }) }),
946
+ /* @__PURE__ */ r.jsx(We, { children: /* @__PURE__ */ r.jsx(Ve, { children: "Sidebar" }) }),
931
947
  n.sidebar.map((s) => /* @__PURE__ */ r.jsx(
932
- Pe,
948
+ Se,
933
949
  {
934
950
  item: s,
935
951
  onRequestClose: t
@@ -940,20 +956,20 @@ const qn = ({
940
956
  }
941
957
  )
942
958
  ] });
943
- }, Oe = () => /* @__PURE__ */ r.jsx("main", { className: "grid h-[calc(100vh-var(--header-height))] place-items-center", children: /* @__PURE__ */ r.jsx(Ve, {}) }), Rn = ({ children: t }) => {
944
- const e = Te(), { setActiveAnchor: n } = Ut(), { meta: s, authentication: a } = I();
945
- Kt(), Cn();
946
- const o = ue(e.pathname);
947
- U(() => {
959
+ }, Qe = () => /* @__PURE__ */ r.jsx("main", { className: "grid h-[calc(100vh-var(--header-height))] place-items-center", children: /* @__PURE__ */ r.jsx(_e, {}) }), zn = ({ children: t }) => {
960
+ const e = oe(), { setActiveAnchor: n } = Xt(), { meta: s, authentication: a } = E();
961
+ Zt(), Sn();
962
+ const i = he(e.pathname);
963
+ B(() => {
948
964
  var g;
949
965
  (g = a == null ? void 0 : a.onPageLoad) == null || g.call(a);
950
- }, [a]), U(() => {
951
- e.pathname !== o.current && n(""), o.current = e.pathname;
966
+ }, [a]), B(() => {
967
+ e.pathname !== i.current && n(""), i.current = e.pathname;
952
968
  }, [e.pathname, n]);
953
- const i = !!oe().location, u = Pn.useSpinDelay(i, {
969
+ const o = !!ce().location, u = kn.useSpinDelay(o, {
954
970
  delay: 300,
955
971
  minDuration: 500
956
- }), [d, c] = z(!1);
972
+ }), [d, c] = H(!1);
957
973
  return /* @__PURE__ */ r.jsxs(r.Fragment, { children: [
958
974
  !1,
959
975
  /* @__PURE__ */ r.jsxs(ie, { titleTemplate: s == null ? void 0 : s.title, children: [
@@ -961,25 +977,25 @@ const qn = ({
961
977
  (s == null ? void 0 : s.favicon) && /* @__PURE__ */ r.jsx("link", { rel: "icon", href: s.favicon })
962
978
  ] }),
963
979
  /* @__PURE__ */ r.jsx(M, { name: "layout-before-head" }),
964
- /* @__PURE__ */ r.jsx(tt, {}),
980
+ /* @__PURE__ */ r.jsx(nt, {}),
965
981
  /* @__PURE__ */ r.jsx(M, { name: "layout-after-head" }),
966
- /* @__PURE__ */ r.jsx("div", { className: "w-full max-w-screen-2xl mx-auto px-4 lg:px-12 border-l border-r", children: u ? /* @__PURE__ */ r.jsx(Oe, {}) : /* @__PURE__ */ r.jsx(de, { fallback: /* @__PURE__ */ r.jsx(Oe, {}), children: /* @__PURE__ */ r.jsxs(
967
- Ze,
982
+ /* @__PURE__ */ r.jsx("div", { className: "w-full max-w-screen-2xl mx-auto px-4 lg:px-12 border-l border-r", children: u ? /* @__PURE__ */ r.jsx(Qe, {}) : /* @__PURE__ */ r.jsx(fe, { fallback: /* @__PURE__ */ r.jsx(Qe, {}), children: /* @__PURE__ */ r.jsxs(
983
+ Ue,
968
984
  {
969
985
  direction: "left",
970
986
  open: d,
971
987
  onOpenChange: (g) => c(g),
972
988
  children: [
973
- /* @__PURE__ */ r.jsx(qn, { onRequestClose: () => c(!1) }),
989
+ /* @__PURE__ */ r.jsx(Fn, { onRequestClose: () => c(!1) }),
974
990
  /* @__PURE__ */ r.jsx(
975
991
  "div",
976
992
  {
977
- className: B(
993
+ className: U(
978
994
  "lg:hidden -mx-10 px-10 py-2 sticky bg-background/80 backdrop-blur z-10 top-0 left-0 right-0 border-b",
979
995
  "peer-data-[navigation=false]:hidden"
980
996
  ),
981
- children: /* @__PURE__ */ r.jsxs(Ue, { className: "flex items-center gap-2", children: [
982
- /* @__PURE__ */ r.jsx(Lt, { size: 16, strokeWidth: 1.5 }),
997
+ children: /* @__PURE__ */ r.jsxs(Ye, { className: "flex items-center gap-2", children: [
998
+ /* @__PURE__ */ r.jsx($t, { size: 16, strokeWidth: 1.5 }),
983
999
  /* @__PURE__ */ r.jsx("span", { className: "text-sm", children: "Menu" })
984
1000
  ] })
985
1001
  }
@@ -987,7 +1003,7 @@ const qn = ({
987
1003
  /* @__PURE__ */ r.jsxs(
988
1004
  "main",
989
1005
  {
990
- className: B(
1006
+ className: U(
991
1007
  "h-full dark:border-white/10 translate-x-0",
992
1008
  "lg:overflow-visible",
993
1009
  // This works in tandem with the `SidebarWrapper` component
@@ -996,7 +1012,7 @@ const qn = ({
996
1012
  ),
997
1013
  children: [
998
1014
  /* @__PURE__ */ r.jsx(M, { name: "zudoku-before-content" }),
999
- t ?? /* @__PURE__ */ r.jsx(qe, {}),
1015
+ t ?? /* @__PURE__ */ r.jsx(le, {}),
1000
1016
  /* @__PURE__ */ r.jsx(M, { name: "zudoku-after-content" })
1001
1017
  ]
1002
1018
  }
@@ -1005,13 +1021,13 @@ const qn = ({
1005
1021
  }
1006
1022
  ) }) })
1007
1023
  ] });
1008
- }, Fn = ce(null), ne = {
1024
+ }, Bn = de(null), se = {
1009
1025
  didCatch: !1,
1010
1026
  error: null
1011
1027
  };
1012
- class zn extends Qt {
1028
+ class Hn extends yt {
1013
1029
  constructor(e) {
1014
- super(e), this.resetErrorBoundary = this.resetErrorBoundary.bind(this), this.state = ne;
1030
+ super(e), this.resetErrorBoundary = this.resetErrorBoundary.bind(this), this.state = se;
1015
1031
  }
1016
1032
  static getDerivedStateFromError(e) {
1017
1033
  return {
@@ -1024,12 +1040,12 @@ class zn extends Qt {
1024
1040
  error: e
1025
1041
  } = this.state;
1026
1042
  if (e !== null) {
1027
- for (var n, s, a = arguments.length, o = new Array(a), i = 0; i < a; i++)
1028
- o[i] = arguments[i];
1043
+ for (var n, s, a = arguments.length, i = new Array(a), o = 0; o < a; o++)
1044
+ i[o] = arguments[o];
1029
1045
  (n = (s = this.props).onReset) === null || n === void 0 || n.call(s, {
1030
- args: o,
1046
+ args: i,
1031
1047
  reason: "imperative-api"
1032
- }), this.setState(ne);
1048
+ }), this.setState(se);
1033
1049
  }
1034
1050
  }
1035
1051
  componentDidCatch(e, n) {
@@ -1042,13 +1058,13 @@ class zn extends Qt {
1042
1058
  } = this.state, {
1043
1059
  resetKeys: a
1044
1060
  } = this.props;
1045
- if (s && n.error !== null && Bn(e.resetKeys, a)) {
1046
- var o, i;
1047
- (o = (i = this.props).onReset) === null || o === void 0 || o.call(i, {
1061
+ if (s && n.error !== null && Ln(e.resetKeys, a)) {
1062
+ var i, o;
1063
+ (i = (o = this.props).onReset) === null || i === void 0 || i.call(o, {
1048
1064
  next: a,
1049
1065
  prev: e.resetKeys,
1050
1066
  reason: "keys"
1051
- }), this.setState(ne);
1067
+ }), this.setState(se);
1052
1068
  }
1053
1069
  }
1054
1070
  render() {
@@ -1058,38 +1074,38 @@ class zn extends Qt {
1058
1074
  FallbackComponent: s,
1059
1075
  fallback: a
1060
1076
  } = this.props, {
1061
- didCatch: o,
1062
- error: i
1077
+ didCatch: i,
1078
+ error: o
1063
1079
  } = this.state;
1064
1080
  let u = e;
1065
- if (o) {
1081
+ if (i) {
1066
1082
  const d = {
1067
- error: i,
1083
+ error: o,
1068
1084
  resetErrorBoundary: this.resetErrorBoundary
1069
1085
  };
1070
1086
  if (typeof n == "function")
1071
1087
  u = n(d);
1072
1088
  else if (s)
1073
- u = we(s, d);
1089
+ u = ve(s, d);
1074
1090
  else if (a !== void 0)
1075
1091
  u = a;
1076
1092
  else
1077
- throw i;
1093
+ throw o;
1078
1094
  }
1079
- return we(Fn.Provider, {
1095
+ return ve(Bn.Provider, {
1080
1096
  value: {
1081
- didCatch: o,
1082
- error: i,
1097
+ didCatch: i,
1098
+ error: o,
1083
1099
  resetErrorBoundary: this.resetErrorBoundary
1084
1100
  }
1085
1101
  }, u);
1086
1102
  }
1087
1103
  }
1088
- function Bn() {
1104
+ function Ln() {
1089
1105
  let t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : [], e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : [];
1090
1106
  return t.length !== e.length || t.some((n, s) => !Object.is(n, e[s]));
1091
1107
  }
1092
- class Hn {
1108
+ class Kn {
1093
1109
  constructor(e) {
1094
1110
  P(this, "plugins");
1095
1111
  P(this, "sidebars");
@@ -1100,20 +1116,20 @@ class Hn {
1100
1116
  P(this, "navigationPlugins");
1101
1117
  P(this, "initialize", async () => {
1102
1118
  await Promise.all(
1103
- this.plugins.filter(Nn).map((e) => {
1119
+ this.plugins.filter(En).map((e) => {
1104
1120
  var n;
1105
1121
  return (n = e.initialize) == null ? void 0 : n.call(e, this);
1106
1122
  })
1107
1123
  );
1108
1124
  });
1109
1125
  P(this, "getApiIdentities", async () => (await Promise.all(
1110
- this.plugins.filter(An).map((n) => n.getIdentities(this))
1126
+ this.plugins.filter(In).map((n) => n.getIdentities(this))
1111
1127
  )).flat());
1112
1128
  P(this, "getPluginSidebar", async (e) => (await Promise.all(
1113
1129
  this.navigationPlugins.map(
1114
1130
  (s) => {
1115
1131
  var a;
1116
- return (a = s.getSidebar) == null ? void 0 : a.call(s, se(e));
1132
+ return (a = s.getSidebar) == null ? void 0 : a.call(s, re(e));
1117
1133
  }
1118
1134
  )
1119
1135
  )).flatMap((s) => s ?? []));
@@ -1123,79 +1139,80 @@ class Hn {
1123
1139
  const n = await this.authentication.getAccessToken();
1124
1140
  return e.headers.set("Authorization", `Bearer ${n}`), e;
1125
1141
  });
1126
- this.options = e, this.plugins = e.plugins ?? [], this.topNavigation = e.topNavigation ?? [], this.sidebars = e.sidebars ?? {}, this.navigationPlugins = this.plugins.filter(Dn), this.authentication = e.authentication, this.meta = e.metadata, this.page = e.page;
1142
+ this.options = e, this.plugins = e.plugins ?? [], this.topNavigation = e.topNavigation ?? [], this.sidebars = e.sidebars ?? {}, this.navigationPlugins = this.plugins.filter(Nn), this.authentication = e.authentication, this.meta = e.metadata, this.page = e.page;
1127
1143
  }
1128
1144
  }
1129
- function Ln({ error: t, resetErrorBoundary: e }) {
1130
- return /* @__PURE__ */ r.jsx(Re, { error: t });
1145
+ function $n({ error: t, resetErrorBoundary: e }) {
1146
+ return /* @__PURE__ */ r.jsx(Ze, { error: t });
1131
1147
  }
1132
1148
  const G = globalThis;
1133
1149
  (!G.requestIdleCallback || !G.cancelIdleCallback) && (G.requestIdleCallback = (t) => setTimeout(t, 1), G.cancelIdleCallback = clearTimeout);
1134
- const st = {
1135
- Header: tt
1136
- }, Kn = ce(st), $n = Kn.Provider, Zn = ({
1150
+ const rt = {
1151
+ Header: nt
1152
+ }, Zn = de(rt), Un = Zn.Provider, Yn = ({
1137
1153
  children: t,
1138
1154
  context: e
1139
- }) => (kt({
1155
+ }) => (Ot({
1140
1156
  queryFn: async () => (await e.initialize(), !0),
1141
1157
  queryKey: ["zudoku-initialize"]
1142
- }), /* @__PURE__ */ r.jsx(Dt.Provider, { value: e, children: t })), rt = Ke(
1158
+ }), /* @__PURE__ */ r.jsx(Et.Provider, { value: e, children: t })), at = ze(
1143
1159
  ({ children: t, ...e }) => {
1144
1160
  var f, h;
1145
- const n = ee(
1146
- () => ({ ...st, ...e.overrides }),
1161
+ const n = te(
1162
+ () => ({ ...rt, ...e.overrides }),
1147
1163
  [e.overrides]
1148
- ), s = ee(() => {
1164
+ ), s = te(() => {
1149
1165
  var v;
1150
1166
  return {
1151
- ...(e.plugins ?? []).filter(En).flatMap(
1167
+ ...(e.plugins ?? []).filter(Qn).flatMap(
1152
1168
  (m) => m.getMdxComponents ? [m.getMdxComponents()] : []
1153
1169
  ).reduce(
1154
1170
  (m, C) => ({ ...m, ...C }),
1155
1171
  {}
1156
1172
  ),
1157
- ...Yt,
1173
+ ...Vt,
1158
1174
  ...(v = e.mdx) == null ? void 0 : v.components
1159
1175
  };
1160
- }, [(f = e.mdx) == null ? void 0 : f.components, e.plugins]), { stagger: a } = It(ae), [o, i] = z(!1), u = ee(
1161
- () => o ? { stagger: !0 } : { stagger: a },
1162
- [a, o]
1163
- ), d = oe();
1164
- U(() => {
1165
- o || i(!0);
1166
- }, [o, d.location]);
1167
- const [c] = z(() => new Hn(e)), g = (h = e.plugins) == null ? void 0 : h.filter(On).map((x, v) => {
1176
+ }, [(f = e.mdx) == null ? void 0 : f.components, e.plugins]), { stagger: a } = vt(ae), [i, o] = H(!1), u = te(
1177
+ () => i ? { stagger: !0 } : { stagger: a },
1178
+ [a, i]
1179
+ ), d = ce();
1180
+ B(() => {
1181
+ i || o(!0);
1182
+ }, [i, d.location]);
1183
+ const [c] = H(() => new Kn(e)), g = (h = e.plugins) == null ? void 0 : h.filter(An).map((x, v) => {
1168
1184
  var m;
1169
- return /* @__PURE__ */ r.jsx(Tt, { children: (m = x.getHead) == null ? void 0 : m.call(x) }, v);
1185
+ return /* @__PURE__ */ r.jsx(bt, { children: (m = x.getHead) == null ? void 0 : m.call(x) }, v);
1170
1186
  });
1171
1187
  return /* @__PURE__ */ r.jsxs(r.Fragment, { children: [
1172
1188
  /* @__PURE__ */ r.jsx(ie, { children: g }),
1173
- /* @__PURE__ */ r.jsx(ae.Provider, { value: u, children: /* @__PURE__ */ r.jsx(Zn, { context: c, children: /* @__PURE__ */ r.jsx($t, { components: s, children: /* @__PURE__ */ r.jsx(on, { attribute: "class", disableTransitionOnChange: !0, children: /* @__PURE__ */ r.jsx($n, { value: n, children: /* @__PURE__ */ r.jsx(ft, { slotlets: e.slotlets, children: /* @__PURE__ */ r.jsx(Xt, { children: t ?? /* @__PURE__ */ r.jsx(qe, {}) }) }) }) }) }) }) })
1189
+ /* @__PURE__ */ r.jsx(ae.Provider, { value: u, children: /* @__PURE__ */ r.jsx(Yn, { context: c, children: /* @__PURE__ */ r.jsx(Ut, { components: s, children: /* @__PURE__ */ r.jsx(cn, { attribute: "class", disableTransitionOnChange: !0, children: /* @__PURE__ */ r.jsx(Un, { value: n, children: /* @__PURE__ */ r.jsx(It, { slotlets: e.slotlets, children: /* @__PURE__ */ r.jsx(_t, { children: t ?? /* @__PURE__ */ r.jsx(le, {}) }) }) }) }) }) }) })
1174
1190
  ] });
1175
1191
  }
1176
1192
  );
1177
- rt.displayName = "ZudokoInner";
1178
- const at = (t) => /* @__PURE__ */ r.jsx(zn, { FallbackComponent: Ln, children: /* @__PURE__ */ r.jsx(rt, { ...t }) });
1179
- at.displayName = "Zudoku";
1180
- const ms = Zt, ps = Rn, xs = gt, ys = pn, vs = vn, bs = bn, js = ie, ws = I, Ps = Z, Cs = Mt, Ss = Nt, ks = at, Ds = pt, Ms = Vt, Ns = Ve, Os = $e, Es = mt, As = le;
1193
+ at.displayName = "ZudokoInner";
1194
+ const it = (t) => /* @__PURE__ */ r.jsx(Hn, { FallbackComponent: $n, children: /* @__PURE__ */ r.jsx(at, { ...t }) });
1195
+ it.displayName = "Zudoku";
1196
+ const xs = Yt, ys = zn, vs = Tt, bs = yn, js = jn, ws = wn, Ps = xn, Cs = ie, ks = E, Ss = z, Ds = At, Ms = Qt, Ns = it, Os = Rt, Es = Wt, As = _e, Qs = ge, Is = qt, Ts = ue;
1181
1197
  export {
1182
- vs as Bootstrap,
1183
- bs as BootstrapStatic,
1184
- Es as Button,
1185
- Ss as CACHE_KEYS,
1186
- Ds as Callout,
1187
- Os as ClientOnly,
1188
- js as Head,
1189
- ps as Layout,
1190
- As as Link,
1191
- Ms as Markdown,
1192
- xs as RouterError,
1193
- ys as ServerError,
1194
- Ns as Spinner,
1195
- ks as Zudoku,
1196
- Ps as useAuth,
1197
- Cs as useCache,
1198
- ms as useMDXComponents,
1199
- ws as useZudoku
1198
+ js as Bootstrap,
1199
+ ws as BootstrapStatic,
1200
+ Is as Button,
1201
+ Ms as CACHE_KEYS,
1202
+ Os as Callout,
1203
+ Qs as ClientOnly,
1204
+ Cs as Head,
1205
+ ys as Layout,
1206
+ Ts as Link,
1207
+ Es as Markdown,
1208
+ Ps as RouteGuard,
1209
+ vs as RouterError,
1210
+ bs as ServerError,
1211
+ As as Spinner,
1212
+ Ns as Zudoku,
1213
+ Ss as useAuth,
1214
+ Ds as useCache,
1215
+ xs as useMDXComponents,
1216
+ ks as useZudoku
1200
1217
  };
1201
1218
  //# sourceMappingURL=zudoku.components.js.map