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