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