zudoku 0.32.5 → 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 (189) 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/RouteGuard.js +12 -5
  42. package/dist/lib/core/RouteGuard.js.map +1 -1
  43. package/dist/lib/core/ZudokuContext.d.ts +10 -0
  44. package/dist/lib/core/ZudokuContext.js +17 -1
  45. package/dist/lib/core/ZudokuContext.js.map +1 -1
  46. package/dist/lib/core/plugins.d.ts +8 -2
  47. package/dist/lib/core/plugins.js +1 -0
  48. package/dist/lib/core/plugins.js.map +1 -1
  49. package/dist/lib/hooks/index.d.ts +3 -0
  50. package/dist/lib/hooks/index.js +5 -0
  51. package/dist/lib/hooks/index.js.map +1 -0
  52. package/dist/lib/hooks/useEvent.d.ts +11 -0
  53. package/dist/lib/hooks/useEvent.js +19 -0
  54. package/dist/lib/hooks/useEvent.js.map +1 -0
  55. package/dist/lib/hooks/useEvent.test.d.ts +1 -0
  56. package/dist/lib/hooks/useEvent.test.js +100 -0
  57. package/dist/lib/hooks/useEvent.test.js.map +1 -0
  58. package/dist/lib/ui/Stepper.d.ts +4 -0
  59. package/dist/lib/ui/Stepper.js +7 -0
  60. package/dist/lib/ui/Stepper.js.map +1 -0
  61. package/dist/lib/util/MdxComponents.d.ts +3 -1
  62. package/dist/lib/util/MdxComponents.js +3 -0
  63. package/dist/lib/util/MdxComponents.js.map +1 -1
  64. package/dist/vite/config.d.ts +2 -5
  65. package/dist/vite/config.js +21 -33
  66. package/dist/vite/config.js.map +1 -1
  67. package/dist/vite/config.test.js +1 -1
  68. package/dist/vite/config.test.js.map +1 -1
  69. package/dist/vite/css/plugin.d.ts +2 -2
  70. package/dist/vite/css/plugin.js.map +1 -1
  71. package/dist/vite/dev-server.js.map +1 -1
  72. package/dist/vite/plugin-api-keys.d.ts +2 -2
  73. package/dist/vite/plugin-api-keys.js +3 -3
  74. package/dist/vite/plugin-api-keys.js.map +1 -1
  75. package/dist/vite/plugin-api.d.ts +2 -2
  76. package/dist/vite/plugin-api.js +5 -5
  77. package/dist/vite/plugin-api.js.map +1 -1
  78. package/dist/vite/plugin-auth.d.ts +2 -2
  79. package/dist/vite/plugin-auth.js +3 -3
  80. package/dist/vite/plugin-auth.js.map +1 -1
  81. package/dist/vite/plugin-component.d.ts +2 -2
  82. package/dist/vite/plugin-component.js +3 -2
  83. package/dist/vite/plugin-component.js.map +1 -1
  84. package/dist/vite/plugin-config-reload.d.ts +4 -3
  85. package/dist/vite/plugin-config-reload.js +11 -6
  86. package/dist/vite/plugin-config-reload.js.map +1 -1
  87. package/dist/vite/plugin-config.d.ts +2 -2
  88. package/dist/vite/plugin-config.js +2 -2
  89. package/dist/vite/plugin-config.js.map +1 -1
  90. package/dist/vite/plugin-custom-pages.d.ts +2 -2
  91. package/dist/vite/plugin-custom-pages.js +3 -3
  92. package/dist/vite/plugin-custom-pages.js.map +1 -1
  93. package/dist/vite/plugin-docs.d.ts +2 -2
  94. package/dist/vite/plugin-docs.js +5 -5
  95. package/dist/vite/plugin-docs.js.map +1 -1
  96. package/dist/vite/plugin-frontmatter.d.ts +2 -2
  97. package/dist/vite/plugin-frontmatter.js +5 -4
  98. package/dist/vite/plugin-frontmatter.js.map +1 -1
  99. package/dist/vite/plugin-mdx.d.ts +2 -2
  100. package/dist/vite/plugin-mdx.js +1 -1
  101. package/dist/vite/plugin-mdx.js.map +1 -1
  102. package/dist/vite/plugin-redirect.d.ts +2 -2
  103. package/dist/vite/plugin-redirect.js +3 -3
  104. package/dist/vite/plugin-redirect.js.map +1 -1
  105. package/dist/vite/plugin-search.d.ts +2 -2
  106. package/dist/vite/plugin-search.js +1 -1
  107. package/dist/vite/plugin-search.js.map +1 -1
  108. package/dist/vite/plugin-sidebar.d.ts +2 -2
  109. package/dist/vite/plugin-sidebar.js +2 -2
  110. package/dist/vite/plugin-sidebar.js.map +1 -1
  111. package/dist/vite/plugin-theme-css.d.ts +2 -2
  112. package/dist/vite/plugin-theme-css.js.map +1 -1
  113. package/dist/vite/plugin.d.ts +2 -2
  114. package/dist/vite/plugin.js.map +1 -1
  115. package/dist/vite/prerender/FileWritingResponse.d.ts +2 -1
  116. package/dist/vite/prerender/FileWritingResponse.js +4 -1
  117. package/dist/vite/prerender/FileWritingResponse.js.map +1 -1
  118. package/dist/vite/prerender/worker.d.ts +1 -1
  119. package/dist/vite/prerender/worker.js +3 -0
  120. package/dist/vite/prerender/worker.js.map +1 -1
  121. package/lib/{AuthenticationPlugin-BlxA4Mbn.js → AuthenticationPlugin-_gUMnGxb.js} +2 -2
  122. package/lib/{AuthenticationPlugin-BlxA4Mbn.js.map → AuthenticationPlugin-_gUMnGxb.js.map} +1 -1
  123. package/lib/{Markdown-Cr9sYpR_.js → Markdown-DePfm7oQ.js} +1384 -1381
  124. package/lib/{Markdown-Cr9sYpR_.js.map → Markdown-DePfm7oQ.js.map} +1 -1
  125. package/lib/{MdxPage-Dt-UEQl8.js → MdxPage-DM9mE-G-.js} +4 -4
  126. package/lib/{MdxPage-Dt-UEQl8.js.map → MdxPage-DM9mE-G-.js.map} +1 -1
  127. package/lib/{OasProvider-WVtvHP5H.js → OasProvider-Bvu4dDpX.js} +3 -3
  128. package/lib/{OasProvider-WVtvHP5H.js.map → OasProvider-Bvu4dDpX.js.map} +1 -1
  129. package/lib/{OperationList-DhOwupvv.js → OperationList-DWnNbwVg.js} +241 -240
  130. package/lib/OperationList-DWnNbwVg.js.map +1 -0
  131. package/lib/{Select-D9hI1G-y.js → Select-BmoX1iTH.js} +36 -36
  132. package/lib/{Select-D9hI1G-y.js.map → Select-BmoX1iTH.js.map} +1 -1
  133. package/lib/{SlotletProvider-CEfNOA8i.js → SlotletProvider-DdtIOUi6.js} +2 -2
  134. package/lib/{SlotletProvider-CEfNOA8i.js.map → SlotletProvider-DdtIOUi6.js.map} +1 -1
  135. package/lib/{createServer-DMf6O2Rz.js → createServer-DmusVVsi.js} +987 -967
  136. package/lib/createServer-DmusVVsi.js.map +1 -0
  137. package/lib/{hook-CWwSAAlH.js → hook-4_6pQSo4.js} +29 -29
  138. package/lib/{hook-CWwSAAlH.js.map → hook-4_6pQSo4.js.map} +1 -1
  139. package/lib/{index-Do_30Hpk.js → index-DVBlM15k.js} +83 -82
  140. package/lib/{index-Do_30Hpk.js.map → index-DVBlM15k.js.map} +1 -1
  141. package/lib/index-DwT-v3zK.js +86 -0
  142. package/lib/index-DwT-v3zK.js.map +1 -0
  143. package/lib/{mutation-B0wxqzSN.js → mutation-DTunCQKB.js} +2 -2
  144. package/lib/{mutation-B0wxqzSN.js.map → mutation-DTunCQKB.js.map} +1 -1
  145. package/lib/objectEntries-yMIkr2mI.js +5 -0
  146. package/lib/objectEntries-yMIkr2mI.js.map +1 -0
  147. package/lib/ui/Stepper.js +6 -0
  148. package/lib/ui/Stepper.js.map +1 -0
  149. package/lib/ui/SyntaxHighlight.js +2902 -7
  150. package/lib/ui/SyntaxHighlight.js.map +1 -1
  151. package/lib/{useScrollToAnchor-C-sRxs9o.js → useScrollToAnchor-BW8y_cwU.js} +3 -3
  152. package/lib/{useScrollToAnchor-C-sRxs9o.js.map → useScrollToAnchor-BW8y_cwU.js.map} +1 -1
  153. package/lib/zudoku.auth-auth0.js +15 -14
  154. package/lib/zudoku.auth-auth0.js.map +1 -1
  155. package/lib/zudoku.auth-clerk.js +2 -2
  156. package/lib/zudoku.auth-openid.js +126 -124
  157. package/lib/zudoku.auth-openid.js.map +1 -1
  158. package/lib/zudoku.components.js +497 -456
  159. package/lib/zudoku.components.js.map +1 -1
  160. package/lib/zudoku.css +1 -0
  161. package/lib/zudoku.hooks.js +19 -0
  162. package/lib/zudoku.hooks.js.map +1 -0
  163. package/lib/zudoku.plugin-api-catalog.js +2 -2
  164. package/lib/zudoku.plugin-api-keys.js +5 -5
  165. package/lib/zudoku.plugin-custom-pages.js +1 -1
  166. package/lib/zudoku.plugin-markdown.js +1 -1
  167. package/lib/zudoku.plugin-openapi.js +2 -2
  168. package/lib/zudoku.plugins.js +9 -8
  169. package/lib/zudoku.plugins.js.map +1 -1
  170. package/package.json +12 -4
  171. package/src/app/main.tsx +1 -1
  172. package/src/lib/authentication/providers/auth0.tsx +3 -2
  173. package/src/lib/authentication/providers/openid.tsx +8 -5
  174. package/src/lib/components/ThemeSwitch.tsx +1 -1
  175. package/src/lib/components/Zudoku.tsx +9 -5
  176. package/src/lib/components/context/RouterEventsEmitter.tsx +19 -0
  177. package/src/lib/core/RouteGuard.tsx +13 -5
  178. package/src/lib/core/ZudokuContext.ts +31 -0
  179. package/src/lib/core/plugins.ts +16 -2
  180. package/src/lib/hooks/index.ts +5 -0
  181. package/src/lib/hooks/useEvent.test.tsx +149 -0
  182. package/src/lib/hooks/useEvent.ts +41 -0
  183. package/src/lib/ui/Stepper.css +43 -0
  184. package/src/lib/ui/Stepper.tsx +8 -0
  185. package/src/lib/util/MdxComponents.tsx +4 -1
  186. package/lib/OperationList-DhOwupvv.js.map +0 -1
  187. package/lib/SyntaxHighlight-CcnUjERD.js +0 -2986
  188. package/lib/SyntaxHighlight-CcnUjERD.js.map +0 -1
  189. 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,129 +483,135 @@ 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
- a && !t.isAuthenticated && ((i = e.authentication) == null || i.signIn({
595
- redirectTo: n.current
596
- }));
597
- }, [a, t.isAuthenticated, e.authentication, n]), a && !t.isAuthenticated)
595
+ !a || t.isPending || t.isAuthenticated || (i = e.authentication) == null || i.signIn({
596
+ redirectTo: s.current
597
+ });
598
+ }, [
599
+ a,
600
+ t.isPending,
601
+ t.isAuthenticated,
602
+ e.authentication,
603
+ s
604
+ ]), a && !t.isAuthenticated)
598
605
  return null;
599
606
  if (a && !t.isAuthEnabled)
600
607
  throw new Ze("Authentication is not enabled", {
601
608
  title: "Authentication is not enabled",
602
609
  developerHint: "To use protectedRoutes you need authentication to be enabled"
603
610
  });
604
- return /* @__PURE__ */ s.jsx(ce, {});
611
+ return /* @__PURE__ */ n.jsx(ce, {});
605
612
  };
606
613
  function Or({ error: t }) {
607
- return /* @__PURE__ */ s.jsx(Ye, { error: t });
614
+ return /* @__PURE__ */ n.jsx(Ye, { error: t });
608
615
  }
609
616
  /**
610
617
  * react-router v7.1.5
@@ -617,75 +624,75 @@ function Or({ error: t }) {
617
624
  * @license MIT
618
625
  */
619
626
  function Ar(t) {
620
- return /* @__PURE__ */ U.createElement(gt, { flushSync: zt.flushSync, ...t });
627
+ return /* @__PURE__ */ U.createElement(mt, { flushSync: Ht.flushSync, ...t });
621
628
  }
622
- const ie = he({ stagger: !1 }), Er = new Cr({
629
+ const oe = he({ stagger: !1 }), qr = new Sr({
623
630
  defaultOptions: {
624
631
  queries: {
625
632
  staleTime: 1e3 * 60 * 5
626
633
  }
627
634
  }
628
- }), qr = ({
635
+ }), Tr = ({
629
636
  router: t,
630
637
  hydrate: e = !1
631
- }) => /* @__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 = ({
632
639
  router: t,
633
640
  context: e,
634
641
  queryClient: r,
635
- helmetContext: n
636
- }) => /* @__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 }) }) }) });
637
- var Z = { exports: {} }, Ir = Z.exports, Ee;
638
- function Qr() {
639
- return Ee || (Ee = 1, function(t, e) {
640
- (function(r, n) {
641
- n(e, Ot);
642
- })(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) {
643
650
  const a = {
644
651
  delay: 500,
645
652
  minDuration: 200,
646
653
  ssr: !0
647
654
  };
648
655
  function o() {
649
- const [u, d] = n.useState(!0);
650
- return n.useEffect(() => {
656
+ const [u, d] = s.useState(!0);
657
+ return s.useEffect(() => {
651
658
  d(!1);
652
659
  }, []), u;
653
660
  }
654
661
  function i(u, d) {
655
662
  d = Object.assign({}, a, d);
656
- const c = o() && d.ssr, g = c && u ? "DISPLAY" : "IDLE", [f, h] = n.useState(g), m = n.useRef(null);
657
- return n.useEffect(() => {
658
- if (u && (f === "IDLE" || c)) {
659
- clearTimeout(m.current);
660
- const y = c ? 0 : d.delay;
661
- 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(() => {
662
669
  if (!u)
663
670
  return h("IDLE");
664
- m.current = setTimeout(() => {
671
+ f.current = setTimeout(() => {
665
672
  h("EXPIRE");
666
673
  }, d.minDuration), h("DISPLAY");
667
- }, y), c || h("DELAY");
674
+ }, v), c || h("DELAY");
668
675
  }
669
- !u && f !== "DISPLAY" && (clearTimeout(m.current), h("IDLE"));
670
- }, [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";
671
678
  }
672
679
  r.defaultOptions = a, r.useSpinDelay = i;
673
680
  });
674
681
  }(Z, Z.exports)), Z.exports;
675
682
  }
676
- var Rr = Qr();
677
- const Fr = () => {
678
- const t = le(), e = ee(t.pathname);
679
- I(() => {
680
- const r = e.current !== t.pathname, n = t.hash !== "";
681
- 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;
682
689
  }, [t.pathname, t.hash]);
683
690
  };
684
- function Br({
691
+ function Hr({
685
692
  className: t,
686
693
  ...e
687
694
  }) {
688
- return /* @__PURE__ */ s.jsx(
695
+ return /* @__PURE__ */ n.jsx(
689
696
  "div",
690
697
  {
691
698
  className: Q("animate-pulse rounded-md bg-muted", t),
@@ -699,70 +706,70 @@ const qe = {
699
706
  tip: "bg-green-600",
700
707
  caution: "bg-orange-500",
701
708
  danger: "bg-rose-500"
702
- }, Hr = () => {
703
- const { page: t } = A(), [e, r] = L(!0);
709
+ }, zr = () => {
710
+ const { page: t } = D(), [e, r] = L(!0);
704
711
  if (!(t != null && t.banner) || !e)
705
- return /* @__PURE__ */ s.jsx("style", { children: ":root { --banner-height: 0px; }" });
706
- 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 };
707
- 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(
708
715
  "div",
709
716
  {
710
717
  className: Q(
711
718
  "relative text-primary-foreground text-sm font-medium px-4 py-2 flex gap-2 items-center",
712
- n
719
+ s
713
720
  ),
714
721
  style: a,
715
722
  children: [
716
- /* @__PURE__ */ s.jsx("div", { className: "w-full", children: t.banner.message }),
717
- 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(
718
725
  "button",
719
726
  {
720
727
  type: "button",
721
728
  className: "md:absolute md:right-4 -m-1.5 p-1.5 hover:bg-accent-foreground/10 rounded-md",
722
729
  onClick: () => r(!1),
723
- children: /* @__PURE__ */ s.jsx(Lt, { size: 16 })
730
+ children: /* @__PURE__ */ n.jsx(zt, { size: 16 })
724
731
  }
725
732
  )
726
733
  ]
727
734
  }
728
735
  );
729
736
  }, et = ({ className: t }) => {
730
- const e = A(), [r, n] = L(!1), a = At(() => n(!1), []);
731
- I(() => {
737
+ const e = D(), [r, s] = L(!1), a = Ot(() => s(!1), []);
738
+ A(() => {
732
739
  if (r)
733
740
  return;
734
741
  function i(u) {
735
- u.key === "k" && (u.metaKey || u.ctrlKey) && (u.preventDefault(), n(!0));
742
+ u.key === "k" && (u.metaKey || u.ctrlKey) && (u.preventDefault(), s(!0));
736
743
  }
737
744
  return window.addEventListener("keydown", i), () => {
738
745
  window.removeEventListener("keydown", i);
739
746
  };
740
- }, [r, n]);
741
- const o = e.plugins.find(nr);
742
- return o ? /* @__PURE__ */ s.jsxs("div", { className: t, children: [
743
- /* @__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(
744
751
  "button",
745
752
  {
746
753
  type: "button",
747
- onClick: () => n(!0),
754
+ onClick: () => s(!0),
748
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",
749
756
  children: [
750
- /* @__PURE__ */ s.jsxs("div", { className: "flex items-center gap-2 flex-grow", children: [
751
- /* @__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 }),
752
759
  "Search"
753
760
  ] }),
754
- /* @__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" })
755
762
  ]
756
763
  }
757
764
  ),
758
- /* @__PURE__ */ s.jsx(fe, { fallback: null, children: o.renderSearch({
765
+ /* @__PURE__ */ n.jsx(fe, { fallback: null, children: o.renderSearch({
759
766
  isOpen: r,
760
767
  onClose: a
761
768
  }) })
762
769
  ] }) : null;
763
770
  }, tt = () => {
764
771
  const { resolvedTheme: t, setTheme: e } = Be();
765
- 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(
766
773
  "button",
767
774
  {
768
775
  type: "button",
@@ -770,18 +777,18 @@ const qe = {
770
777
  onClick: () => e(t === "dark" ? "light" : "dark"),
771
778
  "aria-label": t === "dark" ? "Switch to light mode" : "Switch to dark mode",
772
779
  children: [
773
- /* @__PURE__ */ s.jsx(
780
+ /* @__PURE__ */ n.jsx(
774
781
  "div",
775
782
  {
776
783
  className: Q(
777
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",
778
- t === "light" && "border-border bg-muted/50",
785
+ t === "light" && "border-border bg-muted",
779
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] "
780
787
  ),
781
- children: /* @__PURE__ */ s.jsx($t, { size: 16 })
788
+ children: /* @__PURE__ */ n.jsx(Kt, { size: 16 })
782
789
  }
783
790
  ),
784
- /* @__PURE__ */ s.jsx(
791
+ /* @__PURE__ */ n.jsx(
785
792
  "div",
786
793
  {
787
794
  className: Q(
@@ -789,17 +796,17 @@ const qe = {
789
796
  t === "dark" && "border-border bg-muted [&>svg>path]:fill-white [&>svg>path]:stroke-transparent",
790
797
  t === "light" && "group-hover:rotate-[-10deg] [&>svg>path]:stroke-currentColor"
791
798
  ),
792
- children: /* @__PURE__ */ s.jsx(Ut, { size: 16 })
799
+ children: /* @__PURE__ */ n.jsx($t, { size: 16 })
793
800
  }
794
801
  )
795
802
  ]
796
803
  }
797
804
  ) });
798
- }, rt = (t) => (e) => e.display === "auth" && t || e.display === "anon" && !t || !e.display || e.display === "always", zr = () => {
799
- const { topNavigation: t } = A(), { isAuthenticated: e } = z();
800
- 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: [
801
- /* @__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)) }) }),
802
- /* @__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" })
803
810
  ] }) });
804
811
  }, st = ({
805
812
  id: t,
@@ -807,9 +814,9 @@ const qe = {
807
814
  default: r
808
815
  }) => {
809
816
  var c;
810
- 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) => {
811
- if (g.type === "doc") return ne(g.id);
812
- }) : 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));
813
820
  if (!d)
814
821
  throw new Ze("Page not found.", {
815
822
  developerHint: `No links found in top navigation for '${t}'. Check that the sidebar isn't empty or that a default link is set.`
@@ -817,7 +824,7 @@ const qe = {
817
824
  return (
818
825
  // We don't use isActive here because it has to be inside the sidebar,
819
826
  // the top nav id doesn't necessarily start with the sidebar id
820
- /* @__PURE__ */ s.jsx(
827
+ /* @__PURE__ */ n.jsx(
821
828
  pt,
822
829
  {
823
830
  className: ({ isPending: g }) => br(
@@ -829,27 +836,27 @@ const qe = {
829
836
  }
830
837
  )
831
838
  );
832
- }, Lr = () => {
833
- const { topNavigation: t } = A(), { isAuthenticated: e } = z(), [r, n] = L(!1);
834
- return /* @__PURE__ */ s.jsxs(
839
+ }, Kr = () => {
840
+ const { topNavigation: t } = D(), { isAuthenticated: e } = z(), [r, s] = L(!1);
841
+ return /* @__PURE__ */ n.jsxs(
835
842
  Ve,
836
843
  {
837
844
  direction: "right",
838
845
  open: r,
839
- onOpenChange: (a) => n(a),
846
+ onOpenChange: (a) => s(a),
840
847
  children: [
841
- /* @__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 }) }) }),
842
- /* @__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(
843
850
  Ge,
844
851
  {
845
852
  className: "lg:hidden h-[100dvh] right-0 left-auto w-[320px] rounded-none",
846
853
  "aria-describedby": void 0,
847
- children: /* @__PURE__ */ s.jsxs("div", { className: "p-4 overflow-y-auto overscroll-none", children: [
848
- /* @__PURE__ */ s.jsx(Je, { children: /* @__PURE__ */ s.jsx(_e, { children: "Navigation" }) }),
849
- /* @__PURE__ */ s.jsx(et, { className: "flex p-4" }),
850
- /* @__PURE__ */ s.jsxs("ul", { className: "flex flex-col items-center gap-4 p-4", children: [
851
- /* @__PURE__ */ s.jsx("li", { children: /* @__PURE__ */ s.jsx(tt, {}) }),
852
- 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))
853
860
  ] })
854
861
  ] })
855
862
  }
@@ -857,23 +864,23 @@ const qe = {
857
864
  ]
858
865
  }
859
866
  );
860
- }, J = ({ item: t }) => t.children ? /* @__PURE__ */ s.jsxs(mr, { children: [
861
- /* @__PURE__ */ s.jsx(pr, { children: t.label }),
862
- /* @__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) => (
863
870
  // eslint-disable-next-line react/no-array-index-key
864
- /* @__PURE__ */ s.jsx(J, { item: e }, r)
871
+ /* @__PURE__ */ n.jsx(ee, { item: e }, r)
865
872
  )) }) })
866
- ] }, t.label) : /* @__PURE__ */ s.jsx(de, { to: t.path ?? "", children: /* @__PURE__ */ s.jsxs(yr, { className: "flex gap-2", children: [
867
- 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 }),
868
875
  t.label
869
876
  ] }, t.label) }), nt = Ue(function() {
870
- 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);
871
- return /* @__PURE__ */ s.jsxs("header", { className: "sticky lg:top-0 z-10 bg-background/80 backdrop-blur w-full", children: [
872
- /* @__PURE__ */ s.jsx(Hr, {}),
873
- /* @__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: [
874
- /* @__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: [
875
- (i == null ? void 0 : i.logo) && /* @__PURE__ */ s.jsxs(s.Fragment, { children: [
876
- /* @__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(
877
884
  "img",
878
885
  {
879
886
  src: /https?:\/\//.test(i.logo.src.light) ? i.logo.src.light : Ne(
@@ -886,7 +893,7 @@ const qe = {
886
893
  loading: "lazy"
887
894
  }
888
895
  ),
889
- /* @__PURE__ */ s.jsx(
896
+ /* @__PURE__ */ n.jsx(
890
897
  "img",
891
898
  {
892
899
  src: /https?:\/\//.test(i.logo.src.dark) ? i.logo.src.dark : Ne(
@@ -900,50 +907,50 @@ const qe = {
900
907
  }
901
908
  )
902
909
  ] }),
903
- /* @__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 })
904
911
  ] }) }) }),
905
- /* @__PURE__ */ s.jsxs("div", { className: "grid grid-cols-1 lg:grid-cols-[--sidecar-grid-cols] items-center gap-8", children: [
906
- /* @__PURE__ */ s.jsx("div", { className: "w-full justify-center hidden lg:flex", children: /* @__PURE__ */ s.jsx(et, {}) }),
907
- /* @__PURE__ */ s.jsx(Lr, {}),
908
- /* @__PURE__ */ s.jsxs("div", { className: "hidden lg:flex items-center justify-self-end text-sm gap-2", children: [
909
- /* @__PURE__ */ s.jsx(S, { name: "head-navigation-start" }),
910
- a && /* @__PURE__ */ s.jsx(
911
- 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,
912
919
  {
913
- fallback: /* @__PURE__ */ s.jsx(Br, { className: "rounded h-5 w-24 mr-4" }),
914
- children: r ? Object.values(d).length > 0 && /* @__PURE__ */ s.jsxs(dr, { modal: !1, children: [
915
- /* @__PURE__ */ s.jsx(hr, { asChild: !0, children: /* @__PURE__ */ s.jsx(ae, { variant: "ghost", children: n != null && n.name ? `${n.name}` : "My Account" }) }),
916
- /* @__PURE__ */ s.jsxs(fr, { className: "w-56", children: [
917
- /* @__PURE__ */ s.jsxs(gr, { children: [
918
- n != null && n.name ? `${n.name}` : "My Account",
919
- (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 })
920
927
  ] }),
921
- d.filter((c) => c.category === "top").length > 0 && /* @__PURE__ */ s.jsx(re, {}),
922
- 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)),
923
930
  d.filter(
924
931
  (c) => !c.category || c.category === "middle"
925
- ).length > 0 && /* @__PURE__ */ s.jsx(re, {}),
932
+ ).length > 0 && /* @__PURE__ */ n.jsx(se, {}),
926
933
  d.filter(
927
934
  (c) => !c.category || c.category === "middle"
928
- ).map((c) => /* @__PURE__ */ s.jsx(J, { item: c }, c.label)),
929
- d.filter((c) => c.category === "bottom").length > 0 && /* @__PURE__ */ s.jsx(re, {}),
930
- 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))
931
938
  ] })
932
- ] }) : /* @__PURE__ */ s.jsx(ae, { variant: "ghost", onClick: () => e.login(), children: "Login" })
939
+ ] }) : /* @__PURE__ */ n.jsx(ie, { variant: "ghost", onClick: () => e.login(), children: "Login" })
933
940
  }
934
941
  ),
935
- /* @__PURE__ */ s.jsx(S, { name: "head-navigation-end" }),
936
- /* @__PURE__ */ s.jsx(tt, {})
942
+ /* @__PURE__ */ n.jsx(S, { name: "head-navigation-end" }),
943
+ /* @__PURE__ */ n.jsx(tt, {})
937
944
  ] })
938
945
  ] })
939
946
  ] }) }),
940
- /* @__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: [
941
- /* @__PURE__ */ s.jsx(S, { name: "top-navigation-before" }),
942
- /* @__PURE__ */ s.jsx(zr, {}),
943
- /* @__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" })
944
951
  ] }) })
945
952
  ] });
946
- }), 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(
947
954
  "nav",
948
955
  {
949
956
  "data-navigation": String(r),
@@ -954,96 +961,96 @@ const qe = {
954
961
  !r && "border-r-0",
955
962
  e
956
963
  ),
957
- ref: n,
964
+ ref: s,
958
965
  children: t
959
966
  }
960
967
  ));
961
968
  at.displayName = "SidebarWrapper";
962
- const Kr = ({
969
+ const $r = ({
963
970
  onRequestClose: t
964
971
  }) => {
965
- const e = ee(null), r = Ke();
966
- return I(() => {
972
+ const e = V(null), r = Ke();
973
+ return A(() => {
967
974
  var a;
968
- const n = (a = e.current) == null ? void 0 : a.querySelector('[aria-current="page"]');
969
- Vt(n ?? null);
970
- }, []), /* @__PURE__ */ s.jsxs(s.Fragment, { children: [
971
- /* @__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(
972
979
  at,
973
980
  {
974
981
  ref: e,
975
982
  pushMainContent: r.sidebar.length > 0,
976
983
  children: [
977
- /* @__PURE__ */ s.jsx(S, { name: "zudoku-before-navigation" }),
978
- r.sidebar.map((n) => /* @__PURE__ */ s.jsx(Se, { item: n }, n.label)),
979
- /* @__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" })
980
987
  ]
981
988
  }
982
989
  ),
983
- /* @__PURE__ */ s.jsx(
990
+ /* @__PURE__ */ n.jsx(
984
991
  Ge,
985
992
  {
986
993
  className: "lg:hidden h-[100dvh] left-0 w-[320px] rounded-none",
987
994
  "aria-describedby": void 0,
988
- children: /* @__PURE__ */ s.jsxs("div", { className: "p-4 overflow-y-auto overscroll-none", children: [
989
- /* @__PURE__ */ s.jsx(Je, { children: /* @__PURE__ */ s.jsx(_e, { children: "Sidebar" }) }),
990
- 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(
991
998
  Se,
992
999
  {
993
- item: n,
1000
+ item: s,
994
1001
  onRequestClose: t
995
1002
  },
996
- n.label
1003
+ s.label
997
1004
  ))
998
1005
  ] })
999
1006
  }
1000
1007
  )
1001
1008
  ] });
1002
- }, Te = () => /* @__PURE__ */ s.jsx("main", { className: "grid h-[calc(100vh-var(--header-height))] place-items-center", children: /* @__PURE__ */ s.jsx(We, {}) }), $r = ({ children: t }) => {
1003
- const e = le(), { setActiveAnchor: r } = Wt(), { meta: n, authentication: a } = A();
1004
- Xt(), Fr();
1005
- const o = ee(e.pathname);
1006
- 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(() => {
1007
1014
  var g;
1008
1015
  (g = a == null ? void 0 : a.onPageLoad) == null || g.call(a);
1009
- }, [a]), I(() => {
1016
+ }, [a]), A(() => {
1010
1017
  e.pathname !== o.current && r(""), o.current = e.pathname;
1011
1018
  }, [e.pathname, r]);
1012
- const i = !!ue().location, u = Rr.useSpinDelay(i, {
1019
+ const i = !!ue().location, u = Fr.useSpinDelay(i, {
1013
1020
  delay: 300,
1014
1021
  minDuration: 500
1015
1022
  }), [d, c] = L(!1);
1016
- return /* @__PURE__ */ s.jsxs(s.Fragment, { children: [
1023
+ return /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
1017
1024
  !1,
1018
- /* @__PURE__ */ s.jsxs(oe, { titleTemplate: n == null ? void 0 : n.title, children: [
1019
- (n == null ? void 0 : n.description) && /* @__PURE__ */ s.jsx("meta", { name: "description", content: n.description }),
1020
- (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 })
1021
1028
  ] }),
1022
- /* @__PURE__ */ s.jsx(S, { name: "layout-before-head" }),
1023
- /* @__PURE__ */ s.jsx(nt, {}),
1024
- /* @__PURE__ */ s.jsx(S, { name: "layout-after-head" }),
1025
- /* @__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(
1026
1033
  Ve,
1027
1034
  {
1028
1035
  direction: "left",
1029
1036
  open: d,
1030
1037
  onOpenChange: (g) => c(g),
1031
1038
  children: [
1032
- /* @__PURE__ */ s.jsx(Kr, { onRequestClose: () => c(!1) }),
1033
- /* @__PURE__ */ s.jsx(
1039
+ /* @__PURE__ */ n.jsx($r, { onRequestClose: () => c(!1) }),
1040
+ /* @__PURE__ */ n.jsx(
1034
1041
  "div",
1035
1042
  {
1036
1043
  className: Q(
1037
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",
1038
1045
  "peer-data-[navigation=false]:hidden"
1039
1046
  ),
1040
- children: /* @__PURE__ */ s.jsxs(Xe, { className: "flex items-center gap-2", children: [
1041
- /* @__PURE__ */ s.jsx(Yt, { size: 16, strokeWidth: 1.5 }),
1042
- /* @__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" })
1043
1050
  ] })
1044
1051
  }
1045
1052
  ),
1046
- /* @__PURE__ */ s.jsxs(
1053
+ /* @__PURE__ */ n.jsxs(
1047
1054
  "main",
1048
1055
  {
1049
1056
  className: Q(
@@ -1054,9 +1061,9 @@ const Kr = ({
1054
1061
  "lg:peer-data-[navigation=true]:translate-x-[--side-nav-width] lg:peer-data-[navigation=true]:pl-12"
1055
1062
  ),
1056
1063
  children: [
1057
- /* @__PURE__ */ s.jsx(S, { name: "zudoku-before-content" }),
1058
- t ?? /* @__PURE__ */ s.jsx(ce, {}),
1059
- /* @__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" })
1060
1067
  ]
1061
1068
  }
1062
1069
  )
@@ -1064,15 +1071,15 @@ const Kr = ({
1064
1071
  }
1065
1072
  ) }) })
1066
1073
  ] });
1067
- }, Ur = ({
1074
+ }, Zr = ({
1068
1075
  title: t = "An error occurred",
1069
1076
  message: e,
1070
1077
  category: r
1071
- }) => /* @__PURE__ */ s.jsxs("div", { className: er + " h-full pt-[--padding-content-top]", children: [
1072
- r && /* @__PURE__ */ s.jsx(jr, { children: r }),
1073
- t && /* @__PURE__ */ s.jsx(Jt, { level: 1, className: "flex gap-3.5 items-center", children: t }),
1074
- /* @__PURE__ */ s.jsx("p", { children: e })
1075
- ] }), 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) => {
1076
1083
  switch (t) {
1077
1084
  case 400:
1078
1085
  return {
@@ -1135,23 +1142,23 @@ const Kr = ({
1135
1142
  message: "Something went wrong while processing your request."
1136
1143
  };
1137
1144
  }
1138
- }, Yr = ({ statusCode: t, message: e }) => {
1139
- const r = Zr(t);
1140
- return /* @__PURE__ */ s.jsx(
1141
- Ur,
1145
+ }, Vr = ({ statusCode: t, message: e }) => {
1146
+ const r = Yr(t);
1147
+ return /* @__PURE__ */ n.jsx(
1148
+ Zr,
1142
1149
  {
1143
1150
  title: r.title,
1144
1151
  message: e ?? r.message,
1145
1152
  category: t
1146
1153
  }
1147
1154
  );
1148
- }, Vr = he(null), se = {
1155
+ }, Xr = he(null), ne = {
1149
1156
  didCatch: !1,
1150
1157
  error: null
1151
1158
  };
1152
- class Xr extends qt {
1159
+ class Gr extends qt {
1153
1160
  constructor(e) {
1154
- super(e), this.resetErrorBoundary = this.resetErrorBoundary.bind(this), this.state = se;
1161
+ super(e), this.resetErrorBoundary = this.resetErrorBoundary.bind(this), this.state = ne;
1155
1162
  }
1156
1163
  static getDerivedStateFromError(e) {
1157
1164
  return {
@@ -1164,38 +1171,38 @@ class Xr extends qt {
1164
1171
  error: e
1165
1172
  } = this.state;
1166
1173
  if (e !== null) {
1167
- 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++)
1168
1175
  o[i] = arguments[i];
1169
- (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, {
1170
1177
  args: o,
1171
1178
  reason: "imperative-api"
1172
- }), this.setState(se);
1179
+ }), this.setState(ne);
1173
1180
  }
1174
1181
  }
1175
1182
  componentDidCatch(e, r) {
1176
- var n, a;
1177
- (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);
1178
1185
  }
1179
1186
  componentDidUpdate(e, r) {
1180
1187
  const {
1181
- didCatch: n
1188
+ didCatch: s
1182
1189
  } = this.state, {
1183
1190
  resetKeys: a
1184
1191
  } = this.props;
1185
- if (n && r.error !== null && Gr(e.resetKeys, a)) {
1192
+ if (s && r.error !== null && _r(e.resetKeys, a)) {
1186
1193
  var o, i;
1187
1194
  (o = (i = this.props).onReset) === null || o === void 0 || o.call(i, {
1188
1195
  next: a,
1189
1196
  prev: e.resetKeys,
1190
1197
  reason: "keys"
1191
- }), this.setState(se);
1198
+ }), this.setState(ne);
1192
1199
  }
1193
1200
  }
1194
1201
  render() {
1195
1202
  const {
1196
1203
  children: e,
1197
1204
  fallbackRender: r,
1198
- FallbackComponent: n,
1205
+ FallbackComponent: s,
1199
1206
  fallback: a
1200
1207
  } = this.props, {
1201
1208
  didCatch: o,
@@ -1209,14 +1216,14 @@ class Xr extends qt {
1209
1216
  };
1210
1217
  if (typeof r == "function")
1211
1218
  u = r(d);
1212
- else if (n)
1213
- u = Ce(n, d);
1219
+ else if (s)
1220
+ u = Ce(s, d);
1214
1221
  else if (a !== void 0)
1215
1222
  u = a;
1216
1223
  else
1217
1224
  throw i;
1218
1225
  }
1219
- return Ce(Vr.Provider, {
1226
+ return Ce(Xr.Provider, {
1220
1227
  value: {
1221
1228
  didCatch: o,
1222
1229
  error: i,
@@ -1225,20 +1232,35 @@ class Xr extends qt {
1225
1232
  }, u);
1226
1233
  }
1227
1234
  }
1228
- function Gr() {
1235
+ function _r() {
1229
1236
  let t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : [], e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : [];
1230
- 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]));
1231
1238
  }
1232
- 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 {
1233
1254
  constructor(e) {
1234
- P(this, "plugins");
1235
- P(this, "sidebars");
1236
- P(this, "topNavigation");
1237
- P(this, "meta");
1238
- P(this, "page");
1239
- P(this, "authentication");
1240
- P(this, "navigationPlugins");
1241
- 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 () => {
1242
1264
  await Promise.all(
1243
1265
  this.plugins.filter(or).map((e) => {
1244
1266
  var r;
@@ -1246,99 +1268,118 @@ class _r {
1246
1268
  })
1247
1269
  );
1248
1270
  });
1249
- P(this, "getApiIdentities", async () => (await Promise.all(
1271
+ j(this, "getApiIdentities", async () => (await Promise.all(
1250
1272
  this.plugins.filter(lr).map((r) => r.getIdentities(this))
1251
1273
  )).flat());
1252
- 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(
1253
1276
  this.navigationPlugins.map(
1254
- (n) => {
1277
+ (s) => {
1255
1278
  var a;
1256
- 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));
1257
1280
  }
1258
1281
  )
1259
- )).flatMap((n) => n ?? []));
1260
- P(this, "signRequest", async (e) => {
1282
+ )).flatMap((s) => s ?? []));
1283
+ j(this, "signRequest", async (e) => {
1261
1284
  if (!this.authentication)
1262
1285
  throw new Error("No authentication provider configured");
1263
1286
  const r = await this.authentication.getAccessToken();
1264
1287
  return e.headers.set("Authorization", `Bearer ${r}`), e;
1265
1288
  });
1266
- 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);
1267
1297
  }
1268
1298
  }
1269
- function Wr({ error: t, resetErrorBoundary: e }) {
1270
- return /* @__PURE__ */ s.jsx(Ye, { error: t });
1299
+ function es({ error: t, resetErrorBoundary: e }) {
1300
+ return /* @__PURE__ */ n.jsx(Ye, { error: t });
1271
1301
  }
1272
- const W = globalThis;
1273
- (!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);
1274
1304
  const it = {
1275
1305
  Header: nt
1276
- }, 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 = ({
1277
1315
  children: t,
1278
1316
  context: e
1279
1317
  }) => (St({
1280
1318
  queryFn: async () => (await e.initialize(), !0),
1281
1319
  queryKey: ["zudoku-initialize"]
1282
- }), /* @__PURE__ */ s.jsx(Nt.Provider, { value: e, children: t })), ot = Ue(
1320
+ }), /* @__PURE__ */ n.jsx(Nt.Provider, { value: e, children: t })), ot = Ue(
1283
1321
  ({ children: t, ...e }) => {
1284
- var f, h;
1285
- const r = te(
1322
+ var m, h;
1323
+ const r = re(
1286
1324
  () => ({ ...it, ...e.overrides }),
1287
1325
  [e.overrides]
1288
- ), n = te(() => {
1289
- var y;
1326
+ ), s = re(() => {
1327
+ var v;
1290
1328
  return {
1291
1329
  ...(e.plugins ?? []).filter(cr).flatMap(
1292
- (p) => p.getMdxComponents ? [p.getMdxComponents()] : []
1330
+ (x) => x.getMdxComponents ? [x.getMdxComponents()] : []
1293
1331
  ).reduce(
1294
- (p, k) => ({ ...p, ...k }),
1332
+ (x, k) => ({ ...x, ...k }),
1295
1333
  {}
1296
1334
  ),
1297
- ...tr,
1298
- ...(y = e.mdx) == null ? void 0 : y.components
1335
+ ...er,
1336
+ ...(v = e.mdx) == null ? void 0 : v.components
1299
1337
  };
1300
- }, [(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(
1301
1339
  () => o ? { stagger: !0 } : { stagger: a },
1302
1340
  [a, o]
1303
1341
  ), d = ue();
1304
- I(() => {
1342
+ A(() => {
1305
1343
  o || i(!0);
1306
1344
  }, [o, d.location]);
1307
- const [c] = L(() => new _r(e)), g = (h = e.plugins) == null ? void 0 : h.filter(ur).map((m, y) => {
1308
- var p;
1309
- return /* @__PURE__ */ s.jsx(It, { children: (p = m.getHead) == null ? void 0 : p.call(m) }, y);
1310
- });
1311
- return /* @__PURE__ */ s.jsxs(s.Fragment, { children: [
1312
- /* @__PURE__ */ s.jsx(oe, { children: g }),
1313
- /* @__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
+ ] }) })
1314
1355
  ] });
1315
1356
  }
1316
1357
  );
1317
1358
  ot.displayName = "ZudokoInner";
1318
- 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 }) });
1319
1360
  lt.displayName = "Zudoku";
1320
- 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;
1321
1362
  export {
1322
- As as Bootstrap,
1323
- Es as BootstrapStatic,
1324
- Us as Button,
1325
- Fs as CACHE_KEYS,
1326
- zs as Callout,
1327
- $s as ClientOnly,
1328
- Ts as Head,
1329
- Ds as Layout,
1330
- Zs as Link,
1331
- Ls as Markdown,
1332
- qs as RouteGuard,
1333
- Ms as RouterError,
1334
- Os as ServerError,
1335
- Ks as Spinner,
1336
- Hs as StatusPage,
1337
- Bs as Zudoku,
1338
- Qs as useAuth,
1339
- Rs as useCache,
1340
- Ns as useMDXComponents,
1341
- Ys as useTheme,
1342
- 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
1343
1384
  };
1344
1385
  //# sourceMappingURL=zudoku.components.js.map