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.
- package/cli.js +3 -0
- package/dist/app/main.js +1 -1
- package/dist/app/main.js.map +1 -1
- package/dist/cli/build/handler.d.ts +1 -3
- package/dist/cli/build/handler.js +7 -0
- package/dist/cli/build/handler.js.map +1 -1
- package/dist/cli/cli.js +5 -0
- package/dist/cli/cli.js.map +1 -1
- package/dist/cli/cmds/build.d.ts +11 -3
- package/dist/cli/cmds/build.js +20 -13
- package/dist/cli/cmds/build.js.map +1 -1
- package/dist/cli/cmds/preview.d.ts +16 -0
- package/dist/cli/cmds/preview.js +25 -0
- package/dist/cli/cmds/preview.js.map +1 -0
- package/dist/cli/preview/handler.d.ts +3 -0
- package/dist/cli/preview/handler.js +37 -0
- package/dist/cli/preview/handler.js.map +1 -0
- package/dist/config/common.d.ts +5 -2
- package/dist/config/config.d.ts +2 -7
- package/dist/config/loader.d.ts +4 -4
- package/dist/config/loader.js +7 -4
- package/dist/config/loader.js.map +1 -1
- package/dist/config/validators/validate.d.ts +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/lib/authentication/providers/auth0.d.ts +2 -2
- package/dist/lib/authentication/providers/auth0.js +1 -0
- package/dist/lib/authentication/providers/auth0.js.map +1 -1
- package/dist/lib/authentication/providers/openid.d.ts +4 -3
- package/dist/lib/authentication/providers/openid.js +4 -2
- package/dist/lib/authentication/providers/openid.js.map +1 -1
- package/dist/lib/components/ThemeSwitch.js +1 -1
- package/dist/lib/components/ThemeSwitch.js.map +1 -1
- package/dist/lib/components/Zudoku.d.ts +1 -1
- package/dist/lib/components/Zudoku.js +7 -6
- package/dist/lib/components/Zudoku.js.map +1 -1
- package/dist/lib/components/context/RouterEventsEmitter.d.ts +1 -0
- package/dist/lib/components/context/RouterEventsEmitter.js +17 -0
- package/dist/lib/components/context/RouterEventsEmitter.js.map +1 -0
- package/dist/lib/core/ZudokuContext.d.ts +10 -0
- package/dist/lib/core/ZudokuContext.js +17 -1
- package/dist/lib/core/ZudokuContext.js.map +1 -1
- package/dist/lib/core/plugins.d.ts +8 -2
- package/dist/lib/core/plugins.js +1 -0
- package/dist/lib/core/plugins.js.map +1 -1
- package/dist/lib/hooks/index.d.ts +3 -0
- package/dist/lib/hooks/index.js +5 -0
- package/dist/lib/hooks/index.js.map +1 -0
- package/dist/lib/hooks/useEvent.d.ts +11 -0
- package/dist/lib/hooks/useEvent.js +19 -0
- package/dist/lib/hooks/useEvent.js.map +1 -0
- package/dist/lib/hooks/useEvent.test.d.ts +1 -0
- package/dist/lib/hooks/useEvent.test.js +100 -0
- package/dist/lib/hooks/useEvent.test.js.map +1 -0
- package/dist/lib/ui/Stepper.d.ts +4 -0
- package/dist/lib/ui/Stepper.js +7 -0
- package/dist/lib/ui/Stepper.js.map +1 -0
- package/dist/lib/util/MdxComponents.d.ts +3 -1
- package/dist/lib/util/MdxComponents.js +3 -0
- package/dist/lib/util/MdxComponents.js.map +1 -1
- package/dist/vite/config.d.ts +2 -5
- package/dist/vite/config.js +21 -28
- package/dist/vite/config.js.map +1 -1
- package/dist/vite/config.test.js +1 -1
- package/dist/vite/config.test.js.map +1 -1
- package/dist/vite/css/plugin.d.ts +2 -2
- package/dist/vite/css/plugin.js.map +1 -1
- package/dist/vite/dev-server.js.map +1 -1
- package/dist/vite/plugin-api-keys.d.ts +2 -2
- package/dist/vite/plugin-api-keys.js +3 -3
- package/dist/vite/plugin-api-keys.js.map +1 -1
- package/dist/vite/plugin-api.d.ts +2 -2
- package/dist/vite/plugin-api.js +5 -5
- package/dist/vite/plugin-api.js.map +1 -1
- package/dist/vite/plugin-auth.d.ts +2 -2
- package/dist/vite/plugin-auth.js +3 -3
- package/dist/vite/plugin-auth.js.map +1 -1
- package/dist/vite/plugin-component.d.ts +2 -2
- package/dist/vite/plugin-component.js +3 -2
- package/dist/vite/plugin-component.js.map +1 -1
- package/dist/vite/plugin-config-reload.d.ts +4 -3
- package/dist/vite/plugin-config-reload.js +11 -8
- package/dist/vite/plugin-config-reload.js.map +1 -1
- package/dist/vite/plugin-config.d.ts +2 -2
- package/dist/vite/plugin-config.js +2 -2
- package/dist/vite/plugin-config.js.map +1 -1
- package/dist/vite/plugin-custom-pages.d.ts +2 -2
- package/dist/vite/plugin-custom-pages.js +3 -3
- package/dist/vite/plugin-custom-pages.js.map +1 -1
- package/dist/vite/plugin-docs.d.ts +2 -2
- package/dist/vite/plugin-docs.js +5 -5
- package/dist/vite/plugin-docs.js.map +1 -1
- package/dist/vite/plugin-frontmatter.d.ts +2 -2
- package/dist/vite/plugin-frontmatter.js +5 -4
- package/dist/vite/plugin-frontmatter.js.map +1 -1
- package/dist/vite/plugin-mdx.d.ts +2 -2
- package/dist/vite/plugin-mdx.js +1 -1
- package/dist/vite/plugin-mdx.js.map +1 -1
- package/dist/vite/plugin-redirect.d.ts +2 -2
- package/dist/vite/plugin-redirect.js +3 -3
- package/dist/vite/plugin-redirect.js.map +1 -1
- package/dist/vite/plugin-search.d.ts +2 -2
- package/dist/vite/plugin-search.js +1 -1
- package/dist/vite/plugin-search.js.map +1 -1
- package/dist/vite/plugin-sidebar.d.ts +2 -2
- package/dist/vite/plugin-sidebar.js +2 -2
- package/dist/vite/plugin-sidebar.js.map +1 -1
- package/dist/vite/plugin-theme-css.d.ts +2 -2
- package/dist/vite/plugin-theme-css.js.map +1 -1
- package/dist/vite/plugin.d.ts +2 -2
- package/dist/vite/plugin.js.map +1 -1
- package/dist/vite/prerender/FileWritingResponse.d.ts +2 -1
- package/dist/vite/prerender/FileWritingResponse.js +4 -1
- package/dist/vite/prerender/FileWritingResponse.js.map +1 -1
- package/dist/vite/prerender/worker.d.ts +1 -1
- package/dist/vite/prerender/worker.js +3 -0
- package/dist/vite/prerender/worker.js.map +1 -1
- package/lib/{AuthenticationPlugin-BlxA4Mbn.js → AuthenticationPlugin-_gUMnGxb.js} +2 -2
- package/lib/{AuthenticationPlugin-BlxA4Mbn.js.map → AuthenticationPlugin-_gUMnGxb.js.map} +1 -1
- package/lib/{Markdown-Cr9sYpR_.js → Markdown-DePfm7oQ.js} +1384 -1381
- package/lib/{Markdown-Cr9sYpR_.js.map → Markdown-DePfm7oQ.js.map} +1 -1
- package/lib/{MdxPage-Dt-UEQl8.js → MdxPage-DM9mE-G-.js} +4 -4
- package/lib/{MdxPage-Dt-UEQl8.js.map → MdxPage-DM9mE-G-.js.map} +1 -1
- package/lib/{OasProvider-WVtvHP5H.js → OasProvider-Bvu4dDpX.js} +3 -3
- package/lib/{OasProvider-WVtvHP5H.js.map → OasProvider-Bvu4dDpX.js.map} +1 -1
- package/lib/{OperationList-DhOwupvv.js → OperationList-DWnNbwVg.js} +241 -240
- package/lib/OperationList-DWnNbwVg.js.map +1 -0
- package/lib/{Select-D9hI1G-y.js → Select-BmoX1iTH.js} +36 -36
- package/lib/{Select-D9hI1G-y.js.map → Select-BmoX1iTH.js.map} +1 -1
- package/lib/{SlotletProvider-CEfNOA8i.js → SlotletProvider-DdtIOUi6.js} +2 -2
- package/lib/{SlotletProvider-CEfNOA8i.js.map → SlotletProvider-DdtIOUi6.js.map} +1 -1
- package/lib/{createServer-DMf6O2Rz.js → createServer-DmusVVsi.js} +987 -967
- package/lib/createServer-DmusVVsi.js.map +1 -0
- package/lib/{hook-CWwSAAlH.js → hook-4_6pQSo4.js} +29 -29
- package/lib/{hook-CWwSAAlH.js.map → hook-4_6pQSo4.js.map} +1 -1
- package/lib/{index-Do_30Hpk.js → index-DVBlM15k.js} +83 -82
- package/lib/{index-Do_30Hpk.js.map → index-DVBlM15k.js.map} +1 -1
- package/lib/index-DwT-v3zK.js +86 -0
- package/lib/index-DwT-v3zK.js.map +1 -0
- package/lib/{mutation-B0wxqzSN.js → mutation-DTunCQKB.js} +2 -2
- package/lib/{mutation-B0wxqzSN.js.map → mutation-DTunCQKB.js.map} +1 -1
- package/lib/objectEntries-yMIkr2mI.js +5 -0
- package/lib/objectEntries-yMIkr2mI.js.map +1 -0
- package/lib/ui/Stepper.js +6 -0
- package/lib/ui/Stepper.js.map +1 -0
- package/lib/ui/SyntaxHighlight.js +2902 -7
- package/lib/ui/SyntaxHighlight.js.map +1 -1
- package/lib/{useScrollToAnchor-C-sRxs9o.js → useScrollToAnchor-BW8y_cwU.js} +3 -3
- package/lib/{useScrollToAnchor-C-sRxs9o.js.map → useScrollToAnchor-BW8y_cwU.js.map} +1 -1
- package/lib/zudoku.auth-auth0.js +15 -14
- package/lib/zudoku.auth-auth0.js.map +1 -1
- package/lib/zudoku.auth-clerk.js +2 -2
- package/lib/zudoku.auth-openid.js +126 -124
- package/lib/zudoku.auth-openid.js.map +1 -1
- package/lib/zudoku.components.js +489 -454
- package/lib/zudoku.components.js.map +1 -1
- package/lib/zudoku.css +1 -0
- package/lib/zudoku.hooks.js +19 -0
- package/lib/zudoku.hooks.js.map +1 -0
- package/lib/zudoku.plugin-api-catalog.js +2 -2
- package/lib/zudoku.plugin-api-keys.js +5 -5
- package/lib/zudoku.plugin-custom-pages.js +1 -1
- package/lib/zudoku.plugin-markdown.js +1 -1
- package/lib/zudoku.plugin-openapi.js +2 -2
- package/lib/zudoku.plugins.js +9 -8
- package/lib/zudoku.plugins.js.map +1 -1
- package/package.json +12 -4
- package/src/app/main.tsx +1 -1
- package/src/lib/authentication/providers/auth0.tsx +3 -2
- package/src/lib/authentication/providers/openid.tsx +8 -5
- package/src/lib/components/ThemeSwitch.tsx +1 -1
- package/src/lib/components/Zudoku.tsx +9 -5
- package/src/lib/components/context/RouterEventsEmitter.tsx +19 -0
- package/src/lib/core/ZudokuContext.ts +31 -0
- package/src/lib/core/plugins.ts +16 -2
- package/src/lib/hooks/index.ts +5 -0
- package/src/lib/hooks/useEvent.test.tsx +149 -0
- package/src/lib/hooks/useEvent.ts +41 -0
- package/src/lib/ui/Stepper.css +43 -0
- package/src/lib/ui/Stepper.tsx +8 -0
- package/src/lib/util/MdxComponents.tsx +4 -1
- package/lib/OperationList-DhOwupvv.js.map +0 -1
- package/lib/SyntaxHighlight-CcnUjERD.js +0 -2986
- package/lib/SyntaxHighlight-CcnUjERD.js.map +0 -1
- package/lib/createServer-DMf6O2Rz.js.map +0 -1
package/lib/zudoku.components.js
CHANGED
|
@@ -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
|
|
7
|
-
var l = (t, e, r) => (ve(t, e, "read from private field"), r ? r.call(t) : e.get(t)),
|
|
8
|
-
var
|
|
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
|
-
|
|
10
|
+
y(t, e, a, r);
|
|
11
11
|
},
|
|
12
12
|
get _() {
|
|
13
|
-
return l(t, e,
|
|
13
|
+
return l(t, e, s);
|
|
14
14
|
}
|
|
15
15
|
});
|
|
16
|
-
import { a as Fe, H as
|
|
17
|
-
import { z as Be, J as ht } from "./
|
|
18
|
-
import { u as
|
|
19
|
-
import { S as He,
|
|
20
|
-
import { j as
|
|
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
|
|
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
|
|
25
|
-
import { Button as
|
|
26
|
-
import { Callout as
|
|
27
|
-
import { M as
|
|
28
|
-
import * as
|
|
29
|
-
import { C as
|
|
30
|
-
import { CircleXIcon as
|
|
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
|
|
34
|
-
import { u as
|
|
35
|
-
import { B as
|
|
36
|
-
import { isSearchPlugin as
|
|
37
|
-
import { DropdownMenu as dr, DropdownMenuTrigger as hr, DropdownMenuContent as fr, DropdownMenuLabel as
|
|
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
|
-
|
|
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
|
-
|
|
46
|
-
this.config = e,
|
|
46
|
+
w(this, E);
|
|
47
|
+
this.config = e, y(this, E, /* @__PURE__ */ new Map());
|
|
47
48
|
}
|
|
48
|
-
build(e, r,
|
|
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:
|
|
57
|
+
state: s,
|
|
57
58
|
defaultOptions: e.getQueryDefaults(a)
|
|
58
59
|
}), this.add(i)), i;
|
|
59
60
|
}
|
|
60
61
|
add(e) {
|
|
61
|
-
l(this,
|
|
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,
|
|
68
|
-
r && (e.destroy(), r === e && l(this,
|
|
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
|
-
|
|
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,
|
|
79
|
+
return l(this, E).get(e);
|
|
79
80
|
}
|
|
80
81
|
getAll() {
|
|
81
|
-
return [...l(this,
|
|
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
|
-
(
|
|
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((
|
|
92
|
+
return Object.keys(e).length > 0 ? r.filter((s) => ye(e, s)) : r;
|
|
92
93
|
}
|
|
93
94
|
notify(e) {
|
|
94
|
-
|
|
95
|
+
P.batch(() => {
|
|
95
96
|
this.listeners.forEach((r) => {
|
|
96
97
|
r(e);
|
|
97
98
|
});
|
|
98
99
|
});
|
|
99
100
|
}
|
|
100
101
|
onFocus() {
|
|
101
|
-
|
|
102
|
+
P.batch(() => {
|
|
102
103
|
this.getAll().forEach((e) => {
|
|
103
104
|
e.onFocus();
|
|
104
105
|
});
|
|
105
106
|
});
|
|
106
107
|
}
|
|
107
108
|
onOnline() {
|
|
108
|
-
|
|
109
|
+
P.batch(() => {
|
|
109
110
|
this.getAll().forEach((e) => {
|
|
110
111
|
e.onOnline();
|
|
111
112
|
});
|
|
112
113
|
});
|
|
113
114
|
}
|
|
114
|
-
},
|
|
115
|
+
}, E = new WeakMap(), Ie), O, C, Y, Qe, kr = (Qe = class extends He {
|
|
115
116
|
constructor(e = {}) {
|
|
116
117
|
super();
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
this.config = e,
|
|
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,
|
|
123
|
-
const a = new
|
|
123
|
+
build(e, r, s) {
|
|
124
|
+
const a = new Bt({
|
|
124
125
|
mutationCache: this,
|
|
125
|
-
mutationId: ++
|
|
126
|
+
mutationId: ++_(this, Y)._,
|
|
126
127
|
options: e.defaultMutationOptions(r),
|
|
127
|
-
state:
|
|
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 =
|
|
134
|
+
const r = W(e);
|
|
134
135
|
if (typeof r == "string") {
|
|
135
|
-
const
|
|
136
|
-
|
|
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 =
|
|
143
|
+
const r = W(e);
|
|
143
144
|
if (typeof r == "string") {
|
|
144
|
-
const
|
|
145
|
-
if (
|
|
146
|
-
if (
|
|
147
|
-
const a =
|
|
148
|
-
a !== -1 &&
|
|
149
|
-
} else
|
|
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 =
|
|
156
|
+
const r = W(e);
|
|
156
157
|
if (typeof r == "string") {
|
|
157
|
-
const
|
|
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
|
|
166
|
-
const r =
|
|
166
|
+
var s;
|
|
167
|
+
const r = W(e);
|
|
167
168
|
if (typeof r == "string") {
|
|
168
|
-
const a = (
|
|
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
|
-
|
|
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
|
-
(
|
|
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
|
-
|
|
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
|
|
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
|
|
209
|
+
function W(t) {
|
|
209
210
|
var e;
|
|
210
211
|
return (e = t.options.scope) == null ? void 0 : e.id;
|
|
211
212
|
}
|
|
212
|
-
function
|
|
213
|
+
function Ee(t) {
|
|
213
214
|
return {
|
|
214
215
|
onFetch: (e, r) => {
|
|
215
|
-
var g,
|
|
216
|
-
const
|
|
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
|
|
220
|
+
let x = !1;
|
|
220
221
|
const k = (b) => {
|
|
221
222
|
Object.defineProperty(b, "signal", {
|
|
222
223
|
enumerable: !0,
|
|
223
|
-
get: () => (e.signal.aborted ?
|
|
224
|
-
|
|
224
|
+
get: () => (e.signal.aborted ? x = !0 : e.signal.addEventListener("abort", () => {
|
|
225
|
+
x = !0;
|
|
225
226
|
}), e.signal)
|
|
226
227
|
});
|
|
227
|
-
},
|
|
228
|
-
if (
|
|
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
|
|
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(
|
|
240
|
-
const ct = await
|
|
241
|
-
|
|
242
|
-
), { maxPages:
|
|
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,
|
|
245
|
-
pageParams: pe(b.pageParams, N,
|
|
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 ?
|
|
250
|
+
const b = a === "backward", N = b ? Cr : De, $ = {
|
|
250
251
|
pages: o,
|
|
251
252
|
pageParams: i
|
|
252
|
-
},
|
|
253
|
-
u = await K($,
|
|
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] ??
|
|
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
|
|
267
|
-
return (k = (
|
|
268
|
-
|
|
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
|
|
283
|
-
const
|
|
283
|
+
function De(t, { pages: e, pageParams: r }) {
|
|
284
|
+
const s = e.length - 1;
|
|
284
285
|
return e.length > 0 ? t.getNextPageParam(
|
|
285
|
-
e[
|
|
286
|
+
e[s],
|
|
286
287
|
e,
|
|
287
|
-
r[
|
|
288
|
+
r[s],
|
|
288
289
|
r
|
|
289
290
|
) : void 0;
|
|
290
291
|
}
|
|
291
|
-
function
|
|
292
|
-
var
|
|
293
|
-
return e.length > 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
|
|
296
|
+
var p, q, T, R, F, I, B, H, Re, Sr = (Re = class {
|
|
296
297
|
constructor(t = {}) {
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
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
|
-
|
|
309
|
-
t && (await this.resumePausedMutations(), l(this,
|
|
310
|
-
})),
|
|
311
|
-
t && (await this.resumePausedMutations(), l(this,
|
|
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
|
-
|
|
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,
|
|
320
|
+
return l(this, p).findAll({ ...t, fetchStatus: "fetching" }).length;
|
|
320
321
|
}
|
|
321
322
|
isMutating(t) {
|
|
322
|
-
return l(this,
|
|
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,
|
|
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,
|
|
331
|
-
return
|
|
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,
|
|
335
|
-
const
|
|
336
|
-
return [e,
|
|
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
|
|
341
|
-
|
|
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,
|
|
345
|
+
return l(this, p).build(this, s).setData(i, { ...r, manual: !0 });
|
|
345
346
|
}
|
|
346
347
|
setQueriesData(t, e, r) {
|
|
347
|
-
return
|
|
348
|
-
() => l(this,
|
|
349
|
-
|
|
350
|
-
this.setQueryData(
|
|
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,
|
|
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,
|
|
363
|
-
|
|
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,
|
|
371
|
+
const r = l(this, p), s = {
|
|
371
372
|
type: "active",
|
|
372
373
|
...t
|
|
373
374
|
};
|
|
374
|
-
return
|
|
375
|
+
return P.batch(() => (r.findAll(t).forEach((a) => {
|
|
375
376
|
a.reset();
|
|
376
|
-
}), this.refetchQueries(
|
|
377
|
+
}), this.refetchQueries(s, e)));
|
|
377
378
|
}
|
|
378
379
|
cancelQueries(t, e = {}) {
|
|
379
|
-
const r = { revert: !0, ...e },
|
|
380
|
-
() => l(this,
|
|
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(
|
|
383
|
+
return Promise.all(s).then(M).catch(M);
|
|
383
384
|
}
|
|
384
385
|
invalidateQueries(t, e = {}) {
|
|
385
|
-
return
|
|
386
|
-
if (l(this,
|
|
387
|
-
|
|
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
|
-
},
|
|
402
|
-
() => l(this,
|
|
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(
|
|
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,
|
|
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 =
|
|
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 =
|
|
428
|
+
return t.behavior = Ee(t.pages), this.ensureQueryData(t);
|
|
428
429
|
}
|
|
429
430
|
resumePausedMutations() {
|
|
430
|
-
return je.isOnline() ? l(this,
|
|
431
|
+
return je.isOnline() ? l(this, q).resumePausedMutations() : Promise.resolve();
|
|
431
432
|
}
|
|
432
433
|
getQueryCache() {
|
|
433
|
-
return l(this,
|
|
434
|
+
return l(this, p);
|
|
434
435
|
}
|
|
435
436
|
getMutationCache() {
|
|
436
|
-
return l(this,
|
|
437
|
+
return l(this, q);
|
|
437
438
|
}
|
|
438
439
|
getDefaultOptions() {
|
|
439
|
-
return l(this,
|
|
440
|
+
return l(this, T);
|
|
440
441
|
}
|
|
441
442
|
setDefaultOptions(t) {
|
|
442
|
-
|
|
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((
|
|
453
|
-
ke(t,
|
|
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((
|
|
466
|
-
ke(t,
|
|
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,
|
|
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,
|
|
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,
|
|
493
|
+
l(this, p).clear(), l(this, q).clear();
|
|
493
494
|
}
|
|
494
|
-
},
|
|
495
|
-
function
|
|
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
|
|
499
|
+
function Me(t, e, r) {
|
|
499
500
|
var d, c;
|
|
500
501
|
if (typeof e != "object" || e === null)
|
|
501
502
|
return;
|
|
502
|
-
const
|
|
503
|
-
i.forEach(({ state: g, ...
|
|
504
|
-
var h,
|
|
505
|
-
|
|
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
|
-
...(
|
|
510
|
-
...
|
|
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:
|
|
515
|
-
var
|
|
516
|
-
let
|
|
517
|
-
const k =
|
|
518
|
-
if (
|
|
519
|
-
if (
|
|
520
|
-
const { fetchStatus: b, ...N } =
|
|
521
|
-
|
|
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
|
-
|
|
528
|
+
x = a.build(
|
|
528
529
|
t,
|
|
529
530
|
{
|
|
530
|
-
...(
|
|
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:
|
|
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
|
-
...
|
|
540
|
+
...m,
|
|
540
541
|
data: k,
|
|
541
542
|
fetchStatus: "idle"
|
|
542
543
|
}
|
|
543
544
|
);
|
|
544
|
-
if (
|
|
545
|
-
const b = Promise.resolve(
|
|
546
|
-
|
|
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
|
|
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:
|
|
555
|
+
queryClient: s
|
|
555
556
|
}) => {
|
|
556
|
-
const a = kt(
|
|
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 = [],
|
|
562
|
+
const d = a.getQueryCache(), c = r.queries || [], g = [], m = [];
|
|
562
563
|
for (const h of c) {
|
|
563
|
-
const
|
|
564
|
-
if (!
|
|
564
|
+
const f = d.get(h.queryHash);
|
|
565
|
+
if (!f)
|
|
565
566
|
g.push(h);
|
|
566
567
|
else {
|
|
567
|
-
const
|
|
568
|
-
|
|
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
|
-
|
|
572
|
+
v && (!x || h.state.dataUpdatedAt > x.state.dataUpdatedAt) && m.push(h);
|
|
572
573
|
}
|
|
573
574
|
}
|
|
574
|
-
g.length > 0 &&
|
|
575
|
-
(h) => h ? [...h, ...
|
|
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 && (
|
|
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 =
|
|
584
|
-
return e.current = t,
|
|
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 =
|
|
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 (
|
|
593
|
+
if (A(() => {
|
|
593
594
|
var i;
|
|
594
595
|
!a || t.isPending || t.isAuthenticated || (i = e.authentication) == null || i.signIn({
|
|
595
|
-
redirectTo:
|
|
596
|
+
redirectTo: s.current
|
|
596
597
|
});
|
|
597
598
|
}, [
|
|
598
599
|
a,
|
|
599
600
|
t.isPending,
|
|
600
601
|
t.isAuthenticated,
|
|
601
602
|
e.authentication,
|
|
602
|
-
|
|
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__ */
|
|
611
|
+
return /* @__PURE__ */ n.jsx(ce, {});
|
|
611
612
|
};
|
|
612
613
|
function Or({ error: t }) {
|
|
613
|
-
return /* @__PURE__ */
|
|
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(
|
|
627
|
+
return /* @__PURE__ */ U.createElement(mt, { flushSync: Ht.flushSync, ...t });
|
|
627
628
|
}
|
|
628
|
-
const
|
|
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
|
-
}),
|
|
635
|
+
}), Tr = ({
|
|
635
636
|
router: t,
|
|
636
637
|
hydrate: e = !1
|
|
637
|
-
}) => /* @__PURE__ */
|
|
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:
|
|
642
|
-
}) => /* @__PURE__ */
|
|
643
|
-
var Z = { exports: {} },
|
|
644
|
-
function
|
|
645
|
-
return
|
|
646
|
-
(function(r,
|
|
647
|
-
|
|
648
|
-
})(
|
|
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] =
|
|
656
|
-
return
|
|
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", [
|
|
663
|
-
return
|
|
664
|
-
if (u && (
|
|
665
|
-
clearTimeout(
|
|
666
|
-
const
|
|
667
|
-
|
|
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
|
-
|
|
671
|
+
f.current = setTimeout(() => {
|
|
671
672
|
h("EXPIRE");
|
|
672
673
|
}, d.minDuration), h("DISPLAY");
|
|
673
|
-
},
|
|
674
|
+
}, v), c || h("DELAY");
|
|
674
675
|
}
|
|
675
|
-
!u &&
|
|
676
|
-
}, [u,
|
|
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
|
|
683
|
-
const
|
|
684
|
-
const t =
|
|
685
|
-
|
|
686
|
-
const r = e.current !== t.pathname,
|
|
687
|
-
r && !
|
|
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
|
|
691
|
+
function Hr({
|
|
691
692
|
className: t,
|
|
692
693
|
...e
|
|
693
694
|
}) {
|
|
694
|
-
return /* @__PURE__ */
|
|
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
|
-
},
|
|
709
|
-
const { page: t } =
|
|
709
|
+
}, zr = () => {
|
|
710
|
+
const { page: t } = D(), [e, r] = L(!0);
|
|
710
711
|
if (!(t != null && t.banner) || !e)
|
|
711
|
-
return /* @__PURE__ */
|
|
712
|
-
const
|
|
713
|
-
return /* @__PURE__ */
|
|
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
|
-
|
|
719
|
+
s
|
|
719
720
|
),
|
|
720
721
|
style: a,
|
|
721
722
|
children: [
|
|
722
|
-
/* @__PURE__ */
|
|
723
|
-
t.banner.dismissible && /* @__PURE__ */
|
|
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__ */
|
|
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 =
|
|
737
|
-
|
|
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(),
|
|
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,
|
|
747
|
-
const o = e.plugins.find(
|
|
748
|
-
return o ? /* @__PURE__ */
|
|
749
|
-
/* @__PURE__ */
|
|
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: () =>
|
|
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__ */
|
|
757
|
-
/* @__PURE__ */
|
|
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__ */
|
|
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__ */
|
|
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__ */
|
|
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__ */
|
|
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
|
|
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__ */
|
|
788
|
+
children: /* @__PURE__ */ n.jsx(Kt, { size: 16 })
|
|
788
789
|
}
|
|
789
790
|
),
|
|
790
|
-
/* @__PURE__ */
|
|
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__ */
|
|
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",
|
|
805
|
-
const { topNavigation: t } =
|
|
806
|
-
return t.length <= 1 ? /* @__PURE__ */
|
|
807
|
-
/* @__PURE__ */
|
|
808
|
-
/* @__PURE__ */
|
|
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:
|
|
817
|
-
if (g.type === "doc") return
|
|
818
|
-
}) :
|
|
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__ */
|
|
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
|
-
},
|
|
839
|
-
const { topNavigation: t } =
|
|
840
|
-
return /* @__PURE__ */
|
|
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) =>
|
|
846
|
+
onOpenChange: (a) => s(a),
|
|
846
847
|
children: [
|
|
847
|
-
/* @__PURE__ */
|
|
848
|
-
/* @__PURE__ */
|
|
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__ */
|
|
854
|
-
/* @__PURE__ */
|
|
855
|
-
/* @__PURE__ */
|
|
856
|
-
/* @__PURE__ */
|
|
857
|
-
/* @__PURE__ */
|
|
858
|
-
t.filter(rt(e)).map((a) => /* @__PURE__ */
|
|
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
|
-
},
|
|
867
|
-
/* @__PURE__ */
|
|
868
|
-
/* @__PURE__ */
|
|
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__ */
|
|
871
|
+
/* @__PURE__ */ n.jsx(ee, { item: e }, r)
|
|
871
872
|
)) }) })
|
|
872
|
-
] }, t.label) : /* @__PURE__ */
|
|
873
|
-
t.icon && /* @__PURE__ */
|
|
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:
|
|
877
|
-
return /* @__PURE__ */
|
|
878
|
-
/* @__PURE__ */
|
|
879
|
-
/* @__PURE__ */
|
|
880
|
-
/* @__PURE__ */
|
|
881
|
-
(i == null ? void 0 : i.logo) && /* @__PURE__ */
|
|
882
|
-
/* @__PURE__ */
|
|
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__ */
|
|
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__ */
|
|
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__ */
|
|
912
|
-
/* @__PURE__ */
|
|
913
|
-
/* @__PURE__ */
|
|
914
|
-
/* @__PURE__ */
|
|
915
|
-
/* @__PURE__ */
|
|
916
|
-
a && /* @__PURE__ */
|
|
917
|
-
|
|
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__ */
|
|
920
|
-
children: r ? Object.values(d).length > 0 && /* @__PURE__ */
|
|
921
|
-
/* @__PURE__ */
|
|
922
|
-
/* @__PURE__ */
|
|
923
|
-
/* @__PURE__ */
|
|
924
|
-
|
|
925
|
-
(
|
|
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__ */
|
|
928
|
-
d.filter((c) => c.category === "top").map((c) => /* @__PURE__ */
|
|
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__ */
|
|
932
|
+
).length > 0 && /* @__PURE__ */ n.jsx(se, {}),
|
|
932
933
|
d.filter(
|
|
933
934
|
(c) => !c.category || c.category === "middle"
|
|
934
|
-
).map((c) => /* @__PURE__ */
|
|
935
|
-
d.filter((c) => c.category === "bottom").length > 0 && /* @__PURE__ */
|
|
936
|
-
d.filter((c) => c.category === "bottom").map((c) => /* @__PURE__ */
|
|
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__ */
|
|
939
|
+
] }) : /* @__PURE__ */ n.jsx(ie, { variant: "ghost", onClick: () => e.login(), children: "Login" })
|
|
939
940
|
}
|
|
940
941
|
),
|
|
941
|
-
/* @__PURE__ */
|
|
942
|
-
/* @__PURE__ */
|
|
942
|
+
/* @__PURE__ */ n.jsx(S, { name: "head-navigation-end" }),
|
|
943
|
+
/* @__PURE__ */ n.jsx(tt, {})
|
|
943
944
|
] })
|
|
944
945
|
] })
|
|
945
946
|
] }) }),
|
|
946
|
-
/* @__PURE__ */
|
|
947
|
-
/* @__PURE__ */
|
|
948
|
-
/* @__PURE__ */
|
|
949
|
-
/* @__PURE__ */
|
|
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 =
|
|
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:
|
|
964
|
+
ref: s,
|
|
964
965
|
children: t
|
|
965
966
|
}
|
|
966
967
|
));
|
|
967
968
|
at.displayName = "SidebarWrapper";
|
|
968
|
-
const
|
|
969
|
+
const $r = ({
|
|
969
970
|
onRequestClose: t
|
|
970
971
|
}) => {
|
|
971
|
-
const e =
|
|
972
|
-
return
|
|
972
|
+
const e = V(null), r = Ke();
|
|
973
|
+
return A(() => {
|
|
973
974
|
var a;
|
|
974
|
-
const
|
|
975
|
-
|
|
976
|
-
}, []), /* @__PURE__ */
|
|
977
|
-
/* @__PURE__ */
|
|
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__ */
|
|
984
|
-
r.sidebar.map((
|
|
985
|
-
/* @__PURE__ */
|
|
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__ */
|
|
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__ */
|
|
995
|
-
/* @__PURE__ */
|
|
996
|
-
r.sidebar.map((
|
|
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:
|
|
1000
|
+
item: s,
|
|
1000
1001
|
onRequestClose: t
|
|
1001
1002
|
},
|
|
1002
|
-
|
|
1003
|
+
s.label
|
|
1003
1004
|
))
|
|
1004
1005
|
] })
|
|
1005
1006
|
}
|
|
1006
1007
|
)
|
|
1007
1008
|
] });
|
|
1008
|
-
}, Te = () => /* @__PURE__ */
|
|
1009
|
-
const e =
|
|
1010
|
-
|
|
1011
|
-
const o =
|
|
1012
|
-
|
|
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]),
|
|
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 =
|
|
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__ */
|
|
1023
|
+
return /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
|
|
1023
1024
|
!1,
|
|
1024
|
-
/* @__PURE__ */
|
|
1025
|
-
(
|
|
1026
|
-
(
|
|
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__ */
|
|
1029
|
-
/* @__PURE__ */
|
|
1030
|
-
/* @__PURE__ */
|
|
1031
|
-
/* @__PURE__ */
|
|
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__ */
|
|
1039
|
-
/* @__PURE__ */
|
|
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__ */
|
|
1047
|
-
/* @__PURE__ */
|
|
1048
|
-
/* @__PURE__ */
|
|
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__ */
|
|
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__ */
|
|
1064
|
-
t ?? /* @__PURE__ */
|
|
1065
|
-
/* @__PURE__ */
|
|
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
|
-
},
|
|
1074
|
+
}, Zr = ({
|
|
1074
1075
|
title: t = "An error occurred",
|
|
1075
1076
|
message: e,
|
|
1076
1077
|
category: r
|
|
1077
|
-
}) => /* @__PURE__ */
|
|
1078
|
-
r && /* @__PURE__ */
|
|
1079
|
-
t && /* @__PURE__ */
|
|
1080
|
-
/* @__PURE__ */
|
|
1081
|
-
] }),
|
|
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
|
-
},
|
|
1145
|
-
const r =
|
|
1146
|
-
return /* @__PURE__ */
|
|
1147
|
-
|
|
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
|
-
},
|
|
1155
|
+
}, Xr = he(null), ne = {
|
|
1155
1156
|
didCatch: !1,
|
|
1156
1157
|
error: null
|
|
1157
1158
|
};
|
|
1158
|
-
class
|
|
1159
|
+
class Gr extends qt {
|
|
1159
1160
|
constructor(e) {
|
|
1160
|
-
super(e), this.resetErrorBoundary = this.resetErrorBoundary.bind(this), this.state =
|
|
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,
|
|
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 = (
|
|
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(
|
|
1179
|
+
}), this.setState(ne);
|
|
1179
1180
|
}
|
|
1180
1181
|
}
|
|
1181
1182
|
componentDidCatch(e, r) {
|
|
1182
|
-
var
|
|
1183
|
-
(
|
|
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:
|
|
1188
|
+
didCatch: s
|
|
1188
1189
|
} = this.state, {
|
|
1189
1190
|
resetKeys: a
|
|
1190
1191
|
} = this.props;
|
|
1191
|
-
if (
|
|
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(
|
|
1198
|
+
}), this.setState(ne);
|
|
1198
1199
|
}
|
|
1199
1200
|
}
|
|
1200
1201
|
render() {
|
|
1201
1202
|
const {
|
|
1202
1203
|
children: e,
|
|
1203
1204
|
fallbackRender: r,
|
|
1204
|
-
FallbackComponent:
|
|
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 (
|
|
1219
|
-
u = Ce(
|
|
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(
|
|
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
|
|
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,
|
|
1237
|
+
return t.length !== e.length || t.some((r, s) => !Object.is(r, e[s]));
|
|
1237
1238
|
}
|
|
1238
|
-
|
|
1239
|
+
let Wr = () => ({
|
|
1240
|
+
emit(t, ...e) {
|
|
1241
|
+
for (let r = this.events[t] || [], s = 0, a = r.length; s < a; s++)
|
|
1242
|
+
r[s](...e);
|
|
1243
|
+
},
|
|
1244
|
+
events: {},
|
|
1245
|
+
on(t, e) {
|
|
1246
|
+
var r;
|
|
1247
|
+
return ((r = this.events)[t] || (r[t] = [])).push(e), () => {
|
|
1248
|
+
var s;
|
|
1249
|
+
this.events[t] = (s = this.events[t]) == null ? void 0 : s.filter((a) => e !== a);
|
|
1250
|
+
};
|
|
1251
|
+
}
|
|
1252
|
+
});
|
|
1253
|
+
class Jr {
|
|
1239
1254
|
constructor(e) {
|
|
1240
|
-
|
|
1241
|
-
|
|
1242
|
-
|
|
1243
|
-
|
|
1244
|
-
|
|
1245
|
-
|
|
1246
|
-
|
|
1247
|
-
|
|
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
|
-
|
|
1271
|
+
j(this, "getApiIdentities", async () => (await Promise.all(
|
|
1256
1272
|
this.plugins.filter(lr).map((r) => r.getIdentities(this))
|
|
1257
1273
|
)).flat());
|
|
1258
|
-
|
|
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
|
-
(
|
|
1277
|
+
(s) => {
|
|
1261
1278
|
var a;
|
|
1262
|
-
return (a =
|
|
1279
|
+
return (a = s.getSidebar) == null ? void 0 : a.call(s, ae(e));
|
|
1263
1280
|
}
|
|
1264
1281
|
)
|
|
1265
|
-
)).flatMap((
|
|
1266
|
-
|
|
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(
|
|
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
|
|
1276
|
-
return /* @__PURE__ */
|
|
1299
|
+
function es({ error: t, resetErrorBoundary: e }) {
|
|
1300
|
+
return /* @__PURE__ */ n.jsx(Ye, { error: t });
|
|
1277
1301
|
}
|
|
1278
|
-
const
|
|
1279
|
-
(!
|
|
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
|
-
},
|
|
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__ */
|
|
1320
|
+
}), /* @__PURE__ */ n.jsx(Nt.Provider, { value: e, children: t })), ot = Ue(
|
|
1289
1321
|
({ children: t, ...e }) => {
|
|
1290
|
-
var
|
|
1291
|
-
const r =
|
|
1322
|
+
var m, h;
|
|
1323
|
+
const r = re(
|
|
1292
1324
|
() => ({ ...it, ...e.overrides }),
|
|
1293
1325
|
[e.overrides]
|
|
1294
|
-
),
|
|
1295
|
-
var
|
|
1326
|
+
), s = re(() => {
|
|
1327
|
+
var v;
|
|
1296
1328
|
return {
|
|
1297
1329
|
...(e.plugins ?? []).filter(cr).flatMap(
|
|
1298
|
-
(
|
|
1330
|
+
(x) => x.getMdxComponents ? [x.getMdxComponents()] : []
|
|
1299
1331
|
).reduce(
|
|
1300
|
-
(
|
|
1332
|
+
(x, k) => ({ ...x, ...k }),
|
|
1301
1333
|
{}
|
|
1302
1334
|
),
|
|
1303
|
-
...
|
|
1304
|
-
...(
|
|
1335
|
+
...er,
|
|
1336
|
+
...(v = e.mdx) == null ? void 0 : v.components
|
|
1305
1337
|
};
|
|
1306
|
-
}, [(
|
|
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
|
-
|
|
1342
|
+
A(() => {
|
|
1311
1343
|
o || i(!0);
|
|
1312
1344
|
}, [o, d.location]);
|
|
1313
|
-
const [c] = L(() => new
|
|
1314
|
-
var
|
|
1315
|
-
return
|
|
1316
|
-
});
|
|
1317
|
-
return /* @__PURE__ */
|
|
1318
|
-
|
|
1319
|
-
/* @__PURE__ */
|
|
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__ */
|
|
1359
|
+
const lt = (t) => /* @__PURE__ */ n.jsx(Gr, { FallbackComponent: es, children: /* @__PURE__ */ n.jsx(ot, { ...t }) });
|
|
1325
1360
|
lt.displayName = "Zudoku";
|
|
1326
|
-
const
|
|
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
|
-
|
|
1329
|
-
|
|
1330
|
-
|
|
1331
|
-
|
|
1332
|
-
|
|
1333
|
-
|
|
1334
|
-
|
|
1335
|
-
|
|
1336
|
-
|
|
1337
|
-
|
|
1338
|
-
|
|
1339
|
-
|
|
1340
|
-
|
|
1341
|
-
|
|
1342
|
-
|
|
1343
|
-
|
|
1344
|
-
|
|
1345
|
-
|
|
1346
|
-
|
|
1347
|
-
|
|
1348
|
-
|
|
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
|