zudoku 0.0.0-f9d5b02 → 0.0.0-fb7d300
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/dist/app/entry.client.js +14 -0
- package/dist/app/entry.client.js.map +1 -1
- package/dist/config/validators/validate.d.ts +8 -8
- package/dist/lib/authentication/AuthenticationPlugin.d.ts +4 -2
- package/dist/lib/authentication/AuthenticationPlugin.js +3 -0
- package/dist/lib/authentication/AuthenticationPlugin.js.map +1 -1
- package/dist/lib/authentication/authentication.d.ts +1 -1
- package/dist/lib/authentication/hook.d.ts +5 -4
- package/dist/lib/authentication/hook.js +1 -3
- package/dist/lib/authentication/hook.js.map +1 -1
- package/dist/lib/authentication/providers/auth0.js +2 -2
- package/dist/lib/authentication/providers/auth0.js.map +1 -1
- package/dist/lib/authentication/providers/openid.d.ts +0 -1
- package/dist/lib/authentication/providers/openid.js +11 -26
- package/dist/lib/authentication/providers/openid.js.map +1 -1
- package/dist/lib/authentication/state.d.ts +25 -4
- package/dist/lib/authentication/state.js +28 -5
- package/dist/lib/authentication/state.js.map +1 -1
- package/dist/lib/components/Bootstrap.js +9 -5
- package/dist/lib/components/Bootstrap.js.map +1 -1
- package/dist/lib/components/Header.js +12 -4
- package/dist/lib/components/Header.js.map +1 -1
- package/dist/lib/components/Layout.js +12 -4
- package/dist/lib/components/Layout.js.map +1 -1
- package/dist/lib/components/MobileTopNavigation.js +5 -7
- package/dist/lib/components/MobileTopNavigation.js.map +1 -1
- package/dist/lib/components/SyntaxHighlight.js +2 -2
- package/dist/lib/components/SyntaxHighlight.js.map +1 -1
- package/dist/lib/components/ThemeSwitch.js +5 -3
- package/dist/lib/components/ThemeSwitch.js.map +1 -1
- package/dist/lib/components/TopNavigation.d.ts +2 -0
- package/dist/lib/components/TopNavigation.js +13 -7
- package/dist/lib/components/TopNavigation.js.map +1 -1
- package/dist/lib/components/index.d.ts +11 -1
- package/dist/lib/core/plugins.d.ts +6 -0
- package/dist/lib/core/plugins.js.map +1 -1
- package/dist/lib/plugins/api-keys/index.js +3 -0
- package/dist/lib/plugins/api-keys/index.js.map +1 -1
- package/dist/lib/plugins/openapi/ColorizedParam.js +2 -2
- package/dist/lib/plugins/openapi/ColorizedParam.js.map +1 -1
- package/dist/lib/plugins/openapi/schema/SchemaView.js.map +1 -1
- package/dist/vite/remarkStaticGeneration.js +5 -5
- package/dist/vite/remarkStaticGeneration.js.map +1 -1
- package/lib/AuthenticationPlugin-D0Em0SwR.js +59 -0
- package/lib/AuthenticationPlugin-D0Em0SwR.js.map +1 -0
- package/lib/{Markdown-BorQdbxW.js → Markdown-ievDDhFT.js} +2 -2
- package/lib/{Markdown-BorQdbxW.js.map → Markdown-ievDDhFT.js.map} +1 -1
- package/lib/{MdxPage-DFlbtJWi.js → MdxPage-Bwn-VSsH.js} +2 -2
- package/lib/{MdxPage-DFlbtJWi.js.map → MdxPage-Bwn-VSsH.js.map} +1 -1
- package/lib/{OperationList-KshJrrLL.js → OperationList-BwBl1xrD.js} +5 -5
- package/lib/{OperationList-KshJrrLL.js.map → OperationList-BwBl1xrD.js.map} +1 -1
- package/lib/{Select-DP74t8Yy.js → Select-O9ZM3ZgX.js} +2 -2
- package/lib/{Select-DP74t8Yy.js.map → Select-O9ZM3ZgX.js.map} +1 -1
- package/lib/{SlotletProvider-D2v6rJy1.js → SlotletProvider-DyomlzGx.js} +2 -2
- package/lib/{SlotletProvider-D2v6rJy1.js.map → SlotletProvider-DyomlzGx.js.map} +1 -1
- package/lib/{SyntaxHighlight-CBmwwKoM.js → SyntaxHighlight-DkLOsjHS.js} +2 -2
- package/lib/{SyntaxHighlight-CBmwwKoM.js.map → SyntaxHighlight-DkLOsjHS.js.map} +1 -1
- package/lib/{hook-Diu0rqp-.js → hook-hEqe7fPB.js} +12 -14
- package/lib/{hook-Diu0rqp-.js.map → hook-hEqe7fPB.js.map} +1 -1
- package/lib/{index-BcesIHH4.js → index-DNxQ_rCt.js} +7 -7
- package/lib/index-DNxQ_rCt.js.map +1 -0
- package/lib/state-tsXBLONe.js +203 -0
- package/lib/state-tsXBLONe.js.map +1 -0
- package/lib/zudoku.auth-auth0.js +9 -8
- package/lib/zudoku.auth-auth0.js.map +1 -1
- package/lib/zudoku.auth-clerk.js +2 -2
- package/lib/zudoku.auth-openid.js +119 -133
- package/lib/zudoku.auth-openid.js.map +1 -1
- package/lib/zudoku.components.js +596 -530
- package/lib/zudoku.components.js.map +1 -1
- package/lib/zudoku.plugin-api-keys.js +40 -38
- package/lib/zudoku.plugin-api-keys.js.map +1 -1
- 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/package.json +5 -4
- package/src/app/entry.client.tsx +14 -0
- package/src/lib/authentication/AuthenticationPlugin.tsx +4 -1
- package/src/lib/authentication/authentication.ts +1 -1
- package/src/lib/authentication/hook.ts +1 -3
- package/src/lib/authentication/providers/auth0.tsx +3 -2
- package/src/lib/authentication/providers/openid.tsx +12 -30
- package/src/lib/authentication/state.ts +44 -10
- package/src/lib/components/Bootstrap.tsx +25 -18
- package/src/lib/components/Header.tsx +42 -9
- package/src/lib/components/Layout.tsx +49 -37
- package/src/lib/components/MobileTopNavigation.tsx +11 -18
- package/src/lib/components/SyntaxHighlight.tsx +3 -2
- package/src/lib/components/ThemeSwitch.tsx +6 -4
- package/src/lib/components/TopNavigation.tsx +25 -17
- package/src/lib/core/plugins.ts +8 -0
- package/src/lib/plugins/api-keys/index.tsx +3 -0
- package/src/lib/plugins/openapi/ColorizedParam.tsx +2 -2
- package/src/lib/plugins/openapi/schema/SchemaView.tsx +1 -1
- package/lib/AuthenticationPlugin-DeGDVa1r.js +0 -56
- package/lib/AuthenticationPlugin-DeGDVa1r.js.map +0 -1
- package/lib/index-BcesIHH4.js.map +0 -1
- package/lib/state-BsPrOUAh.js +0 -252
- package/lib/state-BsPrOUAh.js.map +0 -1
package/lib/zudoku.components.js
CHANGED
|
@@ -1,58 +1,59 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
1
|
+
var yt = Object.defineProperty;
|
|
2
|
+
var Pe = (e) => {
|
|
3
3
|
throw TypeError(e);
|
|
4
4
|
};
|
|
5
|
-
var
|
|
6
|
-
var
|
|
7
|
-
var
|
|
8
|
-
var
|
|
5
|
+
var bt = (e, t, r) => t in e ? yt(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r;
|
|
6
|
+
var S = (e, t, r) => bt(e, typeof t != "symbol" ? t + "" : t, r), Ce = (e, t, r) => t.has(e) || Pe("Cannot " + r);
|
|
7
|
+
var c = (e, t, r) => (Ce(e, t, "read from private field"), r ? r.call(e) : t.get(e)), N = (e, t, r) => t.has(e) ? Pe("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(e) : t.set(e, r), y = (e, t, r, s) => (Ce(e, t, "write to private field"), s ? s.call(e, r) : t.set(e, r), r);
|
|
8
|
+
var J = (e, t, r, s) => ({
|
|
9
9
|
set _(n) {
|
|
10
10
|
y(e, t, n, r);
|
|
11
11
|
},
|
|
12
12
|
get _() {
|
|
13
|
-
return
|
|
13
|
+
return c(e, t, s);
|
|
14
14
|
}
|
|
15
15
|
});
|
|
16
|
-
import { a as
|
|
17
|
-
import { d as
|
|
18
|
-
import { u as
|
|
19
|
-
import { E as
|
|
16
|
+
import { a as He, A as jt, H as me, M as wt, u as St } from "./AnchorLink-CDlhr8gL.js";
|
|
17
|
+
import { d as Nt, R as Et, N as ae, u as Pt, L as ge } from "./index-Yn8c3UWE.js";
|
|
18
|
+
import { u as Ct } from "./state-tsXBLONe.js";
|
|
19
|
+
import { E as Ue, S as D, a as kt, R as At } from "./SlotletProvider-DyomlzGx.js";
|
|
20
20
|
import { j as a } from "./jsx-runtime-B6kdoens.js";
|
|
21
|
-
import { Button as
|
|
22
|
-
import { Callout as
|
|
23
|
-
import { S as
|
|
24
|
-
import { M as
|
|
21
|
+
import { Button as Dt } from "./ui/Button.js";
|
|
22
|
+
import { Callout as Ot } from "./ui/Callout.js";
|
|
23
|
+
import { S as $e, l as Ke, Q as Mt, n as w, m as ke, o as Ae, p as O, q as Rt, r as It, t as Tt, v as _t, w as De, x as Oe, y as Ft, h as Me, z as Re, A as Qt, d as qt, B as Ve, C as Lt, j as Q, u as F, D as Ze, E as zt, g as Bt, Z as Ht } from "./utils-DcpDOncX.js";
|
|
24
|
+
import { M as Ut, u as se } from "./hook-hEqe7fPB.js";
|
|
25
25
|
import * as G from "react";
|
|
26
|
-
import
|
|
27
|
-
import { a as
|
|
28
|
-
import { B as
|
|
29
|
-
import { I as
|
|
30
|
-
import { S as
|
|
31
|
-
import { C as
|
|
32
|
-
import { ChevronRightIcon as
|
|
33
|
-
import { Drawer as
|
|
26
|
+
import Ye, { StrictMode as We, useState as q, useEffect as L, useRef as pe, useCallback as $t, Suspense as ve, memo as Xe, forwardRef as Kt, createContext as Je, Component as Vt, createElement as Ie, useMemo as ne, useContext as Zt, Fragment as Yt } from "react";
|
|
27
|
+
import { a as xe, c as Wt } from "./_commonjsHelpers-BkfeUUK-.js";
|
|
28
|
+
import { B as Xt } from "./router-lfyopgBI.js";
|
|
29
|
+
import { I as Jt, y as Gt, u as ye, j as be, O as Ge } from "./index-Czzd9rjU.js";
|
|
30
|
+
import { S as ue, a as ie } from "./SidebarBadge-DxFJcJ6V.js";
|
|
31
|
+
import { C as je } from "./ClientOnly-E7hGysn1.js";
|
|
32
|
+
import { ChevronRightIcon as er, ExternalLinkIcon as tr, CircleXIcon as rr, SearchIcon as ar, MoonStarIcon as sr, SunIcon as nr, MenuIcon as ir, PanelLeftIcon as or } from "lucide-react";
|
|
33
|
+
import { Drawer as et, DrawerTrigger as tt, DrawerContent as rt, DrawerTitle as at } from "./ui/Drawer.js";
|
|
34
34
|
import { c as R } from "./cn-BmFQLtkS.js";
|
|
35
|
-
import { u as
|
|
36
|
-
import { c as
|
|
35
|
+
import { u as we, a as lr, V as cr } from "./Markdown-ievDDhFT.js";
|
|
36
|
+
import { c as ur, a as dr } from "./index-BuAyrJe3.js";
|
|
37
37
|
import * as oe from "@radix-ui/react-collapsible";
|
|
38
|
-
import { B as
|
|
39
|
-
import { DropdownMenu as
|
|
40
|
-
import { VisuallyHidden as
|
|
41
|
-
import { z as
|
|
42
|
-
import {
|
|
43
|
-
|
|
44
|
-
|
|
38
|
+
import { B as de } from "./Button-jK0EsymC.js";
|
|
39
|
+
import { DropdownMenu as hr, DropdownMenuTrigger as fr, DropdownMenuContent as mr, DropdownMenuLabel as gr, DropdownMenuSeparator as le, DropdownMenuSub as pr, DropdownMenuSubTrigger as vr, DropdownMenuPortal as xr, DropdownMenuSubContent as yr, DropdownMenuItem as br } from "./ui/DropdownMenu.js";
|
|
40
|
+
import { VisuallyHidden as st } from "@radix-ui/react-visually-hidden";
|
|
41
|
+
import { z as jr, J as wr } from "./SyntaxHighlight-DkLOsjHS.js";
|
|
42
|
+
import { Z as Sr } from "./invariant-Caa8-XvF.js";
|
|
43
|
+
import { S as Nr } from "./Spinner-3cQDBVGr.js";
|
|
44
|
+
function Er({ error: e }) {
|
|
45
|
+
return /* @__PURE__ */ a.jsx(Ue, { error: e });
|
|
45
46
|
}
|
|
46
|
-
var k,
|
|
47
|
+
var k, Le, Pr = (Le = class extends $e {
|
|
47
48
|
constructor(t = {}) {
|
|
48
49
|
super();
|
|
49
|
-
|
|
50
|
+
N(this, k);
|
|
50
51
|
this.config = t, y(this, k, /* @__PURE__ */ new Map());
|
|
51
52
|
}
|
|
52
53
|
build(t, r, s) {
|
|
53
|
-
const n = r.queryKey, o = r.queryHash ??
|
|
54
|
+
const n = r.queryKey, o = r.queryHash ?? Ke(n, r);
|
|
54
55
|
let i = this.get(o);
|
|
55
|
-
return i || (i = new
|
|
56
|
+
return i || (i = new Mt({
|
|
56
57
|
cache: this,
|
|
57
58
|
queryKey: n,
|
|
58
59
|
queryHash: o,
|
|
@@ -62,14 +63,14 @@ var k, Te, wr = (Te = class extends ze {
|
|
|
62
63
|
}), this.add(i)), i;
|
|
63
64
|
}
|
|
64
65
|
add(t) {
|
|
65
|
-
|
|
66
|
+
c(this, k).has(t.queryHash) || (c(this, k).set(t.queryHash, t), this.notify({
|
|
66
67
|
type: "added",
|
|
67
68
|
query: t
|
|
68
69
|
}));
|
|
69
70
|
}
|
|
70
71
|
remove(t) {
|
|
71
|
-
const r =
|
|
72
|
-
r && (t.destroy(), r === t &&
|
|
72
|
+
const r = c(this, k).get(t.queryHash);
|
|
73
|
+
r && (t.destroy(), r === t && c(this, k).delete(t.queryHash), this.notify({ type: "removed", query: t }));
|
|
73
74
|
}
|
|
74
75
|
clear() {
|
|
75
76
|
w.batch(() => {
|
|
@@ -79,20 +80,20 @@ var k, Te, wr = (Te = class extends ze {
|
|
|
79
80
|
});
|
|
80
81
|
}
|
|
81
82
|
get(t) {
|
|
82
|
-
return
|
|
83
|
+
return c(this, k).get(t);
|
|
83
84
|
}
|
|
84
85
|
getAll() {
|
|
85
|
-
return [...
|
|
86
|
+
return [...c(this, k).values()];
|
|
86
87
|
}
|
|
87
88
|
find(t) {
|
|
88
89
|
const r = { exact: !0, ...t };
|
|
89
90
|
return this.getAll().find(
|
|
90
|
-
(s) =>
|
|
91
|
+
(s) => ke(r, s)
|
|
91
92
|
);
|
|
92
93
|
}
|
|
93
94
|
findAll(t = {}) {
|
|
94
95
|
const r = this.getAll();
|
|
95
|
-
return Object.keys(t).length > 0 ? r.filter((s) =>
|
|
96
|
+
return Object.keys(t).length > 0 ? r.filter((s) => ke(t, s)) : r;
|
|
96
97
|
}
|
|
97
98
|
notify(t) {
|
|
98
99
|
w.batch(() => {
|
|
@@ -115,43 +116,43 @@ var k, Te, wr = (Te = class extends ze {
|
|
|
115
116
|
});
|
|
116
117
|
});
|
|
117
118
|
}
|
|
118
|
-
}, k = new WeakMap(),
|
|
119
|
+
}, k = new WeakMap(), Le), j, Z, ze, Cr = (ze = class extends $e {
|
|
119
120
|
constructor(t = {}) {
|
|
120
121
|
super();
|
|
121
|
-
|
|
122
|
-
|
|
122
|
+
N(this, j);
|
|
123
|
+
N(this, Z);
|
|
123
124
|
this.config = t, y(this, j, /* @__PURE__ */ new Map()), y(this, Z, Date.now());
|
|
124
125
|
}
|
|
125
126
|
build(t, r, s) {
|
|
126
|
-
const n = new
|
|
127
|
+
const n = new Ut({
|
|
127
128
|
mutationCache: this,
|
|
128
|
-
mutationId: ++
|
|
129
|
+
mutationId: ++J(this, Z)._,
|
|
129
130
|
options: t.defaultMutationOptions(r),
|
|
130
131
|
state: s
|
|
131
132
|
});
|
|
132
133
|
return this.add(n), n;
|
|
133
134
|
}
|
|
134
135
|
add(t) {
|
|
135
|
-
const r = ee(t), s =
|
|
136
|
-
s.push(t),
|
|
136
|
+
const r = ee(t), s = c(this, j).get(r) ?? [];
|
|
137
|
+
s.push(t), c(this, j).set(r, s), this.notify({ type: "added", mutation: t });
|
|
137
138
|
}
|
|
138
139
|
remove(t) {
|
|
139
140
|
var s;
|
|
140
141
|
const r = ee(t);
|
|
141
|
-
if (
|
|
142
|
-
const n = (s =
|
|
143
|
-
n && (n.length === 0 ?
|
|
142
|
+
if (c(this, j).has(r)) {
|
|
143
|
+
const n = (s = c(this, j).get(r)) == null ? void 0 : s.filter((o) => o !== t);
|
|
144
|
+
n && (n.length === 0 ? c(this, j).delete(r) : c(this, j).set(r, n));
|
|
144
145
|
}
|
|
145
146
|
this.notify({ type: "removed", mutation: t });
|
|
146
147
|
}
|
|
147
148
|
canRun(t) {
|
|
148
149
|
var s;
|
|
149
|
-
const r = (s =
|
|
150
|
+
const r = (s = c(this, j).get(ee(t))) == null ? void 0 : s.find((n) => n.state.status === "pending");
|
|
150
151
|
return !r || r === t;
|
|
151
152
|
}
|
|
152
153
|
runNext(t) {
|
|
153
154
|
var s;
|
|
154
|
-
const r = (s =
|
|
155
|
+
const r = (s = c(this, j).get(ee(t))) == null ? void 0 : s.find((n) => n !== t && n.state.isPaused);
|
|
155
156
|
return (r == null ? void 0 : r.continue()) ?? Promise.resolve();
|
|
156
157
|
}
|
|
157
158
|
clear() {
|
|
@@ -162,16 +163,16 @@ var k, Te, wr = (Te = class extends ze {
|
|
|
162
163
|
});
|
|
163
164
|
}
|
|
164
165
|
getAll() {
|
|
165
|
-
return [...
|
|
166
|
+
return [...c(this, j).values()].flat();
|
|
166
167
|
}
|
|
167
168
|
find(t) {
|
|
168
169
|
const r = { exact: !0, ...t };
|
|
169
170
|
return this.getAll().find(
|
|
170
|
-
(s) =>
|
|
171
|
+
(s) => Ae(r, s)
|
|
171
172
|
);
|
|
172
173
|
}
|
|
173
174
|
findAll(t = {}) {
|
|
174
|
-
return this.getAll().filter((r) =>
|
|
175
|
+
return this.getAll().filter((r) => Ae(t, r));
|
|
175
176
|
}
|
|
176
177
|
notify(t) {
|
|
177
178
|
w.batch(() => {
|
|
@@ -184,72 +185,72 @@ var k, Te, wr = (Te = class extends ze {
|
|
|
184
185
|
const t = this.getAll().filter((r) => r.state.isPaused);
|
|
185
186
|
return w.batch(
|
|
186
187
|
() => Promise.all(
|
|
187
|
-
t.map((r) => r.continue().catch(
|
|
188
|
+
t.map((r) => r.continue().catch(O))
|
|
188
189
|
)
|
|
189
190
|
);
|
|
190
191
|
}
|
|
191
|
-
}, j = new WeakMap(), Z = new WeakMap(),
|
|
192
|
+
}, j = new WeakMap(), Z = new WeakMap(), ze);
|
|
192
193
|
function ee(e) {
|
|
193
194
|
var t;
|
|
194
195
|
return ((t = e.options.scope) == null ? void 0 : t.id) ?? String(e.mutationId);
|
|
195
196
|
}
|
|
196
|
-
function
|
|
197
|
+
function Te(e) {
|
|
197
198
|
return {
|
|
198
199
|
onFetch: (t, r) => {
|
|
199
|
-
var
|
|
200
|
-
const s = t.options, n = (
|
|
201
|
-
let
|
|
202
|
-
const
|
|
203
|
-
let
|
|
204
|
-
const
|
|
200
|
+
var p, f, h, g, v;
|
|
201
|
+
const s = t.options, n = (h = (f = (p = t.fetchOptions) == null ? void 0 : p.meta) == null ? void 0 : f.fetchMore) == null ? void 0 : h.direction, o = ((g = t.state.data) == null ? void 0 : g.pages) || [], i = ((v = t.state.data) == null ? void 0 : v.pageParams) || [];
|
|
202
|
+
let u = { pages: [], pageParams: [] }, d = 0;
|
|
203
|
+
const l = async () => {
|
|
204
|
+
let m = !1;
|
|
205
|
+
const E = (b) => {
|
|
205
206
|
Object.defineProperty(b, "signal", {
|
|
206
207
|
enumerable: !0,
|
|
207
|
-
get: () => (t.signal.aborted ?
|
|
208
|
-
|
|
208
|
+
get: () => (t.signal.aborted ? m = !0 : t.signal.addEventListener("abort", () => {
|
|
209
|
+
m = !0;
|
|
209
210
|
}), t.signal)
|
|
210
211
|
});
|
|
211
|
-
},
|
|
212
|
-
if (
|
|
212
|
+
}, W = Rt(t.options, t.fetchOptions), $ = async (b, P, K) => {
|
|
213
|
+
if (m)
|
|
213
214
|
return Promise.reject();
|
|
214
215
|
if (P == null && b.pages.length)
|
|
215
216
|
return Promise.resolve(b);
|
|
216
|
-
const
|
|
217
|
+
const X = {
|
|
217
218
|
queryKey: t.queryKey,
|
|
218
219
|
pageParam: P,
|
|
219
|
-
direction:
|
|
220
|
+
direction: K ? "backward" : "forward",
|
|
220
221
|
meta: t.options.meta
|
|
221
222
|
};
|
|
222
|
-
|
|
223
|
-
const
|
|
224
|
-
|
|
225
|
-
), { maxPages:
|
|
223
|
+
E(X);
|
|
224
|
+
const xt = await W(
|
|
225
|
+
X
|
|
226
|
+
), { maxPages: Ne } = t.options, Ee = K ? It : Tt;
|
|
226
227
|
return {
|
|
227
|
-
pages:
|
|
228
|
-
pageParams:
|
|
228
|
+
pages: Ee(b.pages, xt, Ne),
|
|
229
|
+
pageParams: Ee(b.pageParams, P, Ne)
|
|
229
230
|
};
|
|
230
231
|
};
|
|
231
232
|
if (n && o.length) {
|
|
232
|
-
const b = n === "backward", P = b ?
|
|
233
|
+
const b = n === "backward", P = b ? kr : _e, K = {
|
|
233
234
|
pages: o,
|
|
234
235
|
pageParams: i
|
|
235
|
-
},
|
|
236
|
-
|
|
236
|
+
}, X = P(s, K);
|
|
237
|
+
u = await $(K, X, b);
|
|
237
238
|
} else {
|
|
238
239
|
const b = e ?? o.length;
|
|
239
240
|
do {
|
|
240
|
-
const P =
|
|
241
|
-
if (
|
|
241
|
+
const P = d === 0 ? i[0] ?? s.initialPageParam : _e(s, u);
|
|
242
|
+
if (d > 0 && P == null)
|
|
242
243
|
break;
|
|
243
|
-
|
|
244
|
-
} while (
|
|
244
|
+
u = await $(u, P), d++;
|
|
245
|
+
} while (d < b);
|
|
245
246
|
}
|
|
246
|
-
return
|
|
247
|
+
return u;
|
|
247
248
|
};
|
|
248
249
|
t.options.persister ? t.fetchFn = () => {
|
|
249
|
-
var
|
|
250
|
-
return (
|
|
251
|
-
|
|
252
|
-
|
|
250
|
+
var m, E;
|
|
251
|
+
return (E = (m = t.options).persister) == null ? void 0 : E.call(
|
|
252
|
+
m,
|
|
253
|
+
l,
|
|
253
254
|
{
|
|
254
255
|
queryKey: t.queryKey,
|
|
255
256
|
meta: t.options.meta,
|
|
@@ -257,11 +258,11 @@ function Me(e) {
|
|
|
257
258
|
},
|
|
258
259
|
r
|
|
259
260
|
);
|
|
260
|
-
} : t.fetchFn =
|
|
261
|
+
} : t.fetchFn = l;
|
|
261
262
|
}
|
|
262
263
|
};
|
|
263
264
|
}
|
|
264
|
-
function
|
|
265
|
+
function _e(e, { pages: t, pageParams: r }) {
|
|
265
266
|
const s = t.length - 1;
|
|
266
267
|
return t.length > 0 ? e.getNextPageParam(
|
|
267
268
|
t[s],
|
|
@@ -270,69 +271,69 @@ function De(e, { pages: t, pageParams: r }) {
|
|
|
270
271
|
r
|
|
271
272
|
) : void 0;
|
|
272
273
|
}
|
|
273
|
-
function
|
|
274
|
+
function kr(e, { pages: t, pageParams: r }) {
|
|
274
275
|
var s;
|
|
275
276
|
return t.length > 0 ? (s = e.getPreviousPageParam) == null ? void 0 : s.call(e, t[0], t, r[0], r) : void 0;
|
|
276
277
|
}
|
|
277
|
-
var
|
|
278
|
+
var x, I, T, z, B, _, H, U, Be, Ar = (Be = class {
|
|
278
279
|
constructor(e = {}) {
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
y(this,
|
|
280
|
+
N(this, x);
|
|
281
|
+
N(this, I);
|
|
282
|
+
N(this, T);
|
|
283
|
+
N(this, z);
|
|
284
|
+
N(this, B);
|
|
285
|
+
N(this, _);
|
|
286
|
+
N(this, H);
|
|
287
|
+
N(this, U);
|
|
288
|
+
y(this, x, e.queryCache || new Pr()), y(this, I, e.mutationCache || new Cr()), y(this, T, e.defaultOptions || {}), y(this, z, /* @__PURE__ */ new Map()), y(this, B, /* @__PURE__ */ new Map()), y(this, _, 0);
|
|
288
289
|
}
|
|
289
290
|
mount() {
|
|
290
|
-
|
|
291
|
-
e && (await this.resumePausedMutations(),
|
|
292
|
-
})), y(this,
|
|
293
|
-
e && (await this.resumePausedMutations(),
|
|
291
|
+
J(this, _)._++, c(this, _) === 1 && (y(this, H, _t.subscribe(async (e) => {
|
|
292
|
+
e && (await this.resumePausedMutations(), c(this, x).onFocus());
|
|
293
|
+
})), y(this, U, De.subscribe(async (e) => {
|
|
294
|
+
e && (await this.resumePausedMutations(), c(this, x).onOnline());
|
|
294
295
|
})));
|
|
295
296
|
}
|
|
296
297
|
unmount() {
|
|
297
298
|
var e, t;
|
|
298
|
-
|
|
299
|
+
J(this, _)._--, c(this, _) === 0 && ((e = c(this, H)) == null || e.call(this), y(this, H, void 0), (t = c(this, U)) == null || t.call(this), y(this, U, void 0));
|
|
299
300
|
}
|
|
300
301
|
isFetching(e) {
|
|
301
|
-
return
|
|
302
|
+
return c(this, x).findAll({ ...e, fetchStatus: "fetching" }).length;
|
|
302
303
|
}
|
|
303
304
|
isMutating(e) {
|
|
304
|
-
return
|
|
305
|
+
return c(this, I).findAll({ ...e, status: "pending" }).length;
|
|
305
306
|
}
|
|
306
307
|
getQueryData(e) {
|
|
307
308
|
var r;
|
|
308
309
|
const t = this.defaultQueryOptions({ queryKey: e });
|
|
309
|
-
return (r =
|
|
310
|
+
return (r = c(this, x).get(t.queryHash)) == null ? void 0 : r.state.data;
|
|
310
311
|
}
|
|
311
312
|
ensureQueryData(e) {
|
|
312
313
|
const t = this.getQueryData(e.queryKey);
|
|
313
314
|
if (t === void 0)
|
|
314
315
|
return this.fetchQuery(e);
|
|
315
316
|
{
|
|
316
|
-
const r = this.defaultQueryOptions(e), s =
|
|
317
|
-
return e.revalidateIfStale && s.isStaleByTime(
|
|
317
|
+
const r = this.defaultQueryOptions(e), s = c(this, x).build(this, r);
|
|
318
|
+
return e.revalidateIfStale && s.isStaleByTime(Oe(r.staleTime, s)) && this.prefetchQuery(r), Promise.resolve(t);
|
|
318
319
|
}
|
|
319
320
|
}
|
|
320
321
|
getQueriesData(e) {
|
|
321
|
-
return
|
|
322
|
+
return c(this, x).findAll(e).map(({ queryKey: t, state: r }) => {
|
|
322
323
|
const s = r.data;
|
|
323
324
|
return [t, s];
|
|
324
325
|
});
|
|
325
326
|
}
|
|
326
327
|
setQueryData(e, t, r) {
|
|
327
|
-
const s = this.defaultQueryOptions({ queryKey: e }), n =
|
|
328
|
+
const s = this.defaultQueryOptions({ queryKey: e }), n = c(this, x).get(
|
|
328
329
|
s.queryHash
|
|
329
|
-
), o = n == null ? void 0 : n.state.data, i =
|
|
330
|
+
), o = n == null ? void 0 : n.state.data, i = Ft(t, o);
|
|
330
331
|
if (i !== void 0)
|
|
331
|
-
return
|
|
332
|
+
return c(this, x).build(this, s).setData(i, { ...r, manual: !0 });
|
|
332
333
|
}
|
|
333
334
|
setQueriesData(e, t, r) {
|
|
334
335
|
return w.batch(
|
|
335
|
-
() =>
|
|
336
|
+
() => c(this, x).findAll(e).map(({ queryKey: s }) => [
|
|
336
337
|
s,
|
|
337
338
|
this.setQueryData(s, t, r)
|
|
338
339
|
])
|
|
@@ -341,10 +342,10 @@ var g, I, T, z, B, Q, H, L, _e, Sr = (_e = class {
|
|
|
341
342
|
getQueryState(e) {
|
|
342
343
|
var r;
|
|
343
344
|
const t = this.defaultQueryOptions({ queryKey: e });
|
|
344
|
-
return (r =
|
|
345
|
+
return (r = c(this, x).get(t.queryHash)) == null ? void 0 : r.state;
|
|
345
346
|
}
|
|
346
347
|
removeQueries(e) {
|
|
347
|
-
const t =
|
|
348
|
+
const t = c(this, x);
|
|
348
349
|
w.batch(() => {
|
|
349
350
|
t.findAll(e).forEach((r) => {
|
|
350
351
|
t.remove(r);
|
|
@@ -352,7 +353,7 @@ var g, I, T, z, B, Q, H, L, _e, Sr = (_e = class {
|
|
|
352
353
|
});
|
|
353
354
|
}
|
|
354
355
|
resetQueries(e, t) {
|
|
355
|
-
const r =
|
|
356
|
+
const r = c(this, x), s = {
|
|
356
357
|
type: "active",
|
|
357
358
|
...e
|
|
358
359
|
};
|
|
@@ -362,13 +363,13 @@ var g, I, T, z, B, Q, H, L, _e, Sr = (_e = class {
|
|
|
362
363
|
}
|
|
363
364
|
cancelQueries(e = {}, t = {}) {
|
|
364
365
|
const r = { revert: !0, ...t }, s = w.batch(
|
|
365
|
-
() =>
|
|
366
|
+
() => c(this, x).findAll(e).map((n) => n.cancel(r))
|
|
366
367
|
);
|
|
367
|
-
return Promise.all(s).then(
|
|
368
|
+
return Promise.all(s).then(O).catch(O);
|
|
368
369
|
}
|
|
369
370
|
invalidateQueries(e = {}, t = {}) {
|
|
370
371
|
return w.batch(() => {
|
|
371
|
-
if (
|
|
372
|
+
if (c(this, x).findAll(e).forEach((s) => {
|
|
372
373
|
s.invalidate();
|
|
373
374
|
}), e.refetchType === "none")
|
|
374
375
|
return Promise.resolve();
|
|
@@ -384,190 +385,190 @@ var g, I, T, z, B, Q, H, L, _e, Sr = (_e = class {
|
|
|
384
385
|
...t,
|
|
385
386
|
cancelRefetch: (t == null ? void 0 : t.cancelRefetch) ?? !0
|
|
386
387
|
}, s = w.batch(
|
|
387
|
-
() =>
|
|
388
|
+
() => c(this, x).findAll(e).filter((n) => !n.isDisabled()).map((n) => {
|
|
388
389
|
let o = n.fetch(void 0, r);
|
|
389
|
-
return r.throwOnError || (o = o.catch(
|
|
390
|
+
return r.throwOnError || (o = o.catch(O)), n.state.fetchStatus === "paused" ? Promise.resolve() : o;
|
|
390
391
|
})
|
|
391
392
|
);
|
|
392
|
-
return Promise.all(s).then(
|
|
393
|
+
return Promise.all(s).then(O);
|
|
393
394
|
}
|
|
394
395
|
fetchQuery(e) {
|
|
395
396
|
const t = this.defaultQueryOptions(e);
|
|
396
397
|
t.retry === void 0 && (t.retry = !1);
|
|
397
|
-
const r =
|
|
398
|
+
const r = c(this, x).build(this, t);
|
|
398
399
|
return r.isStaleByTime(
|
|
399
|
-
|
|
400
|
+
Oe(t.staleTime, r)
|
|
400
401
|
) ? r.fetch(t) : Promise.resolve(r.state.data);
|
|
401
402
|
}
|
|
402
403
|
prefetchQuery(e) {
|
|
403
|
-
return this.fetchQuery(e).then(
|
|
404
|
+
return this.fetchQuery(e).then(O).catch(O);
|
|
404
405
|
}
|
|
405
406
|
fetchInfiniteQuery(e) {
|
|
406
|
-
return e.behavior =
|
|
407
|
+
return e.behavior = Te(e.pages), this.fetchQuery(e);
|
|
407
408
|
}
|
|
408
409
|
prefetchInfiniteQuery(e) {
|
|
409
|
-
return this.fetchInfiniteQuery(e).then(
|
|
410
|
+
return this.fetchInfiniteQuery(e).then(O).catch(O);
|
|
410
411
|
}
|
|
411
412
|
ensureInfiniteQueryData(e) {
|
|
412
|
-
return e.behavior =
|
|
413
|
+
return e.behavior = Te(e.pages), this.ensureQueryData(e);
|
|
413
414
|
}
|
|
414
415
|
resumePausedMutations() {
|
|
415
|
-
return
|
|
416
|
+
return De.isOnline() ? c(this, I).resumePausedMutations() : Promise.resolve();
|
|
416
417
|
}
|
|
417
418
|
getQueryCache() {
|
|
418
|
-
return
|
|
419
|
+
return c(this, x);
|
|
419
420
|
}
|
|
420
421
|
getMutationCache() {
|
|
421
|
-
return
|
|
422
|
+
return c(this, I);
|
|
422
423
|
}
|
|
423
424
|
getDefaultOptions() {
|
|
424
|
-
return
|
|
425
|
+
return c(this, T);
|
|
425
426
|
}
|
|
426
427
|
setDefaultOptions(e) {
|
|
427
428
|
y(this, T, e);
|
|
428
429
|
}
|
|
429
430
|
setQueryDefaults(e, t) {
|
|
430
|
-
|
|
431
|
+
c(this, z).set(Me(e), {
|
|
431
432
|
queryKey: e,
|
|
432
433
|
defaultOptions: t
|
|
433
434
|
});
|
|
434
435
|
}
|
|
435
436
|
getQueryDefaults(e) {
|
|
436
|
-
const t = [...
|
|
437
|
+
const t = [...c(this, z).values()];
|
|
437
438
|
let r = {};
|
|
438
439
|
return t.forEach((s) => {
|
|
439
|
-
|
|
440
|
+
Re(e, s.queryKey) && (r = { ...r, ...s.defaultOptions });
|
|
440
441
|
}), r;
|
|
441
442
|
}
|
|
442
443
|
setMutationDefaults(e, t) {
|
|
443
|
-
|
|
444
|
+
c(this, B).set(Me(e), {
|
|
444
445
|
mutationKey: e,
|
|
445
446
|
defaultOptions: t
|
|
446
447
|
});
|
|
447
448
|
}
|
|
448
449
|
getMutationDefaults(e) {
|
|
449
|
-
const t = [...
|
|
450
|
+
const t = [...c(this, B).values()];
|
|
450
451
|
let r = {};
|
|
451
452
|
return t.forEach((s) => {
|
|
452
|
-
|
|
453
|
+
Re(e, s.mutationKey) && (r = { ...r, ...s.defaultOptions });
|
|
453
454
|
}), r;
|
|
454
455
|
}
|
|
455
456
|
defaultQueryOptions(e) {
|
|
456
457
|
if (e._defaulted)
|
|
457
458
|
return e;
|
|
458
459
|
const t = {
|
|
459
|
-
...
|
|
460
|
+
...c(this, T).queries,
|
|
460
461
|
...this.getQueryDefaults(e.queryKey),
|
|
461
462
|
...e,
|
|
462
463
|
_defaulted: !0
|
|
463
464
|
};
|
|
464
|
-
return t.queryHash || (t.queryHash =
|
|
465
|
+
return t.queryHash || (t.queryHash = Ke(
|
|
465
466
|
t.queryKey,
|
|
466
467
|
t
|
|
467
|
-
)), t.refetchOnReconnect === void 0 && (t.refetchOnReconnect = t.networkMode !== "always"), t.throwOnError === void 0 && (t.throwOnError = !!t.suspense), !t.networkMode && t.persister && (t.networkMode = "offlineFirst"), t.enabled !== !0 && t.queryFn ===
|
|
468
|
+
)), t.refetchOnReconnect === void 0 && (t.refetchOnReconnect = t.networkMode !== "always"), t.throwOnError === void 0 && (t.throwOnError = !!t.suspense), !t.networkMode && t.persister && (t.networkMode = "offlineFirst"), t.enabled !== !0 && t.queryFn === Qt && (t.enabled = !1), t;
|
|
468
469
|
}
|
|
469
470
|
defaultMutationOptions(e) {
|
|
470
471
|
return e != null && e._defaulted ? e : {
|
|
471
|
-
...
|
|
472
|
+
...c(this, T).mutations,
|
|
472
473
|
...(e == null ? void 0 : e.mutationKey) && this.getMutationDefaults(e.mutationKey),
|
|
473
474
|
...e,
|
|
474
475
|
_defaulted: !0
|
|
475
476
|
};
|
|
476
477
|
}
|
|
477
478
|
clear() {
|
|
478
|
-
|
|
479
|
+
c(this, x).clear(), c(this, I).clear();
|
|
479
480
|
}
|
|
480
|
-
},
|
|
481
|
-
function
|
|
481
|
+
}, x = new WeakMap(), I = new WeakMap(), T = new WeakMap(), z = new WeakMap(), B = new WeakMap(), _ = new WeakMap(), H = new WeakMap(), U = new WeakMap(), Be);
|
|
482
|
+
function Dr(e) {
|
|
482
483
|
return e;
|
|
483
484
|
}
|
|
484
|
-
function
|
|
485
|
-
var
|
|
485
|
+
function Fe(e, t, r) {
|
|
486
|
+
var d, l;
|
|
486
487
|
if (typeof t != "object" || t === null)
|
|
487
488
|
return;
|
|
488
|
-
const s = e.getMutationCache(), n = e.getQueryCache(), o = ((
|
|
489
|
-
i.forEach(({ state:
|
|
490
|
-
var
|
|
489
|
+
const s = e.getMutationCache(), n = e.getQueryCache(), o = ((d = r == null ? void 0 : r.defaultOptions) == null ? void 0 : d.deserializeData) ?? ((l = e.getDefaultOptions().hydrate) == null ? void 0 : l.deserializeData) ?? Dr, i = t.mutations || [], u = t.queries || [];
|
|
490
|
+
i.forEach(({ state: p, ...f }) => {
|
|
491
|
+
var h, g;
|
|
491
492
|
s.build(
|
|
492
493
|
e,
|
|
493
494
|
{
|
|
494
|
-
...(
|
|
495
|
-
...(
|
|
496
|
-
...
|
|
495
|
+
...(h = e.getDefaultOptions().hydrate) == null ? void 0 : h.mutations,
|
|
496
|
+
...(g = r == null ? void 0 : r.defaultOptions) == null ? void 0 : g.mutations,
|
|
497
|
+
...f
|
|
497
498
|
},
|
|
498
|
-
|
|
499
|
+
p
|
|
499
500
|
);
|
|
500
|
-
}),
|
|
501
|
-
var
|
|
502
|
-
let
|
|
503
|
-
const
|
|
504
|
-
if (
|
|
505
|
-
if (
|
|
506
|
-
const { fetchStatus: b, ...P } =
|
|
507
|
-
|
|
501
|
+
}), u.forEach(({ queryKey: p, state: f, queryHash: h, meta: g, promise: v }) => {
|
|
502
|
+
var W, $;
|
|
503
|
+
let m = n.get(h);
|
|
504
|
+
const E = f.data === void 0 ? f.data : o(f.data);
|
|
505
|
+
if (m) {
|
|
506
|
+
if (m.state.dataUpdatedAt < f.dataUpdatedAt) {
|
|
507
|
+
const { fetchStatus: b, ...P } = f;
|
|
508
|
+
m.setState({
|
|
508
509
|
...P,
|
|
509
|
-
data:
|
|
510
|
+
data: E
|
|
510
511
|
});
|
|
511
512
|
}
|
|
512
513
|
} else
|
|
513
|
-
|
|
514
|
+
m = n.build(
|
|
514
515
|
e,
|
|
515
516
|
{
|
|
516
|
-
...(
|
|
517
|
-
...(
|
|
518
|
-
queryKey:
|
|
519
|
-
queryHash:
|
|
520
|
-
meta:
|
|
517
|
+
...(W = e.getDefaultOptions().hydrate) == null ? void 0 : W.queries,
|
|
518
|
+
...($ = r == null ? void 0 : r.defaultOptions) == null ? void 0 : $.queries,
|
|
519
|
+
queryKey: p,
|
|
520
|
+
queryHash: h,
|
|
521
|
+
meta: g
|
|
521
522
|
},
|
|
522
523
|
// Reset fetch status to idle to avoid
|
|
523
524
|
// query being stuck in fetching state upon hydration
|
|
524
525
|
{
|
|
525
|
-
...
|
|
526
|
-
data:
|
|
526
|
+
...f,
|
|
527
|
+
data: E,
|
|
527
528
|
fetchStatus: "idle"
|
|
528
529
|
}
|
|
529
530
|
);
|
|
530
|
-
if (
|
|
531
|
-
const b = Promise.resolve(
|
|
532
|
-
|
|
531
|
+
if (v) {
|
|
532
|
+
const b = Promise.resolve(v).then(o);
|
|
533
|
+
m.fetch(void 0, { initialPromise: b });
|
|
533
534
|
}
|
|
534
535
|
});
|
|
535
536
|
}
|
|
536
|
-
var
|
|
537
|
+
var Or = ({
|
|
537
538
|
children: e,
|
|
538
539
|
options: t = {},
|
|
539
540
|
state: r,
|
|
540
541
|
queryClient: s
|
|
541
542
|
}) => {
|
|
542
|
-
const n =
|
|
543
|
-
return
|
|
543
|
+
const n = qt(s), [o, i] = G.useState(), u = G.useRef(t);
|
|
544
|
+
return u.current = t, G.useMemo(() => {
|
|
544
545
|
if (r) {
|
|
545
546
|
if (typeof r != "object")
|
|
546
547
|
return;
|
|
547
|
-
const
|
|
548
|
-
for (const
|
|
549
|
-
const
|
|
550
|
-
if (!
|
|
551
|
-
|
|
548
|
+
const d = n.getQueryCache(), l = r.queries || [], p = [], f = [];
|
|
549
|
+
for (const h of l) {
|
|
550
|
+
const g = d.get(h.queryHash);
|
|
551
|
+
if (!g)
|
|
552
|
+
p.push(h);
|
|
552
553
|
else {
|
|
553
|
-
const
|
|
554
|
-
(
|
|
554
|
+
const v = h.state.dataUpdatedAt > g.state.dataUpdatedAt, m = o == null ? void 0 : o.find(
|
|
555
|
+
(E) => E.queryHash === h.queryHash
|
|
555
556
|
);
|
|
556
|
-
|
|
557
|
+
v && (!m || h.state.dataUpdatedAt > m.state.dataUpdatedAt) && f.push(h);
|
|
557
558
|
}
|
|
558
559
|
}
|
|
559
|
-
|
|
560
|
-
(
|
|
560
|
+
p.length > 0 && Fe(n, { queries: p }, u.current), f.length > 0 && i(
|
|
561
|
+
(h) => h ? [...h, ...f] : f
|
|
561
562
|
);
|
|
562
563
|
}
|
|
563
564
|
}, [n, o, r]), G.useEffect(() => {
|
|
564
|
-
o && (
|
|
565
|
+
o && (Fe(n, { queries: o }, u.current), i(void 0));
|
|
565
566
|
}, [n, o]), e;
|
|
566
|
-
},
|
|
567
|
-
const
|
|
568
|
-
Object.defineProperty(
|
|
569
|
-
var
|
|
570
|
-
function
|
|
567
|
+
}, Y = {};
|
|
568
|
+
const Mr = /* @__PURE__ */ xe(Xt), Rr = /* @__PURE__ */ xe(Jt), Ir = /* @__PURE__ */ xe(Nt);
|
|
569
|
+
Object.defineProperty(Y, "__esModule", { value: !0 });
|
|
570
|
+
var Tr = Ye, A = Mr, Se = Rr, M = Ir;
|
|
571
|
+
function _r(e) {
|
|
571
572
|
if (e && e.__esModule) return e;
|
|
572
573
|
var t = /* @__PURE__ */ Object.create(null);
|
|
573
574
|
return e && Object.keys(e).forEach(function(r) {
|
|
@@ -582,22 +583,22 @@ function Dr(e) {
|
|
|
582
583
|
}
|
|
583
584
|
}), t.default = e, Object.freeze(t);
|
|
584
585
|
}
|
|
585
|
-
var
|
|
586
|
-
function
|
|
586
|
+
var C = /* @__PURE__ */ _r(Tr);
|
|
587
|
+
function Fr({
|
|
587
588
|
basename: e,
|
|
588
589
|
children: t,
|
|
589
590
|
location: r = "/",
|
|
590
591
|
future: s
|
|
591
592
|
}) {
|
|
592
|
-
typeof r == "string" && (r =
|
|
593
|
+
typeof r == "string" && (r = M.parsePath(r));
|
|
593
594
|
let n = A.Action.Pop, o = {
|
|
594
595
|
pathname: r.pathname || "/",
|
|
595
596
|
search: r.search || "",
|
|
596
597
|
hash: r.hash || "",
|
|
597
598
|
state: r.state != null ? r.state : null,
|
|
598
599
|
key: r.key || "default"
|
|
599
|
-
}, i =
|
|
600
|
-
return /* @__PURE__ */
|
|
600
|
+
}, i = nt();
|
|
601
|
+
return /* @__PURE__ */ C.createElement(M.Router, {
|
|
601
602
|
basename: e,
|
|
602
603
|
children: t,
|
|
603
604
|
location: o,
|
|
@@ -607,7 +608,7 @@ function Rr({
|
|
|
607
608
|
static: !0
|
|
608
609
|
});
|
|
609
610
|
}
|
|
610
|
-
function
|
|
611
|
+
function Qr({
|
|
611
612
|
context: e,
|
|
612
613
|
router: t,
|
|
613
614
|
hydrate: r = !0,
|
|
@@ -616,46 +617,46 @@ function Ir({
|
|
|
616
617
|
t && e || (process.env.NODE_ENV !== "production" ? A.UNSAFE_invariant(!1, "You must provide `router` and `context` to <StaticRouterProvider>") : A.UNSAFE_invariant(!1));
|
|
617
618
|
let n = {
|
|
618
619
|
router: t,
|
|
619
|
-
navigator:
|
|
620
|
+
navigator: nt(),
|
|
620
621
|
static: !0,
|
|
621
622
|
staticContext: e,
|
|
622
623
|
basename: e.basename || "/"
|
|
623
624
|
}, o = /* @__PURE__ */ new Map(), i = "";
|
|
624
625
|
if (r !== !1) {
|
|
625
|
-
let
|
|
626
|
+
let d = {
|
|
626
627
|
loaderData: e.loaderData,
|
|
627
628
|
actionData: e.actionData,
|
|
628
|
-
errors:
|
|
629
|
+
errors: Lr(e.errors)
|
|
629
630
|
};
|
|
630
|
-
i = `window.__staticRouterHydrationData = JSON.parse(${
|
|
631
|
+
i = `window.__staticRouterHydrationData = JSON.parse(${Kr(JSON.stringify(JSON.stringify(d)))});`;
|
|
631
632
|
}
|
|
632
633
|
let {
|
|
633
|
-
state:
|
|
634
|
+
state: u
|
|
634
635
|
} = n.router;
|
|
635
|
-
return /* @__PURE__ */
|
|
636
|
+
return /* @__PURE__ */ C.createElement(C.Fragment, null, /* @__PURE__ */ C.createElement(M.UNSAFE_DataRouterContext.Provider, {
|
|
636
637
|
value: n
|
|
637
|
-
}, /* @__PURE__ */
|
|
638
|
-
value:
|
|
639
|
-
}, /* @__PURE__ */
|
|
638
|
+
}, /* @__PURE__ */ C.createElement(M.UNSAFE_DataRouterStateContext.Provider, {
|
|
639
|
+
value: u
|
|
640
|
+
}, /* @__PURE__ */ C.createElement(M.UNSAFE_FetchersContext.Provider, {
|
|
640
641
|
value: o
|
|
641
|
-
}, /* @__PURE__ */
|
|
642
|
+
}, /* @__PURE__ */ C.createElement(M.UNSAFE_ViewTransitionContext.Provider, {
|
|
642
643
|
value: {
|
|
643
644
|
isTransitioning: !1
|
|
644
645
|
}
|
|
645
|
-
}, /* @__PURE__ */
|
|
646
|
+
}, /* @__PURE__ */ C.createElement(M.Router, {
|
|
646
647
|
basename: n.basename,
|
|
647
|
-
location:
|
|
648
|
-
navigationType:
|
|
648
|
+
location: u.location,
|
|
649
|
+
navigationType: u.historyAction,
|
|
649
650
|
navigator: n.navigator,
|
|
650
651
|
static: n.static,
|
|
651
652
|
future: {
|
|
652
653
|
v7_relativeSplatPath: t.future.v7_relativeSplatPath
|
|
653
654
|
}
|
|
654
|
-
}, /* @__PURE__ */
|
|
655
|
+
}, /* @__PURE__ */ C.createElement(qr, {
|
|
655
656
|
routes: t.routes,
|
|
656
657
|
future: t.future,
|
|
657
|
-
state:
|
|
658
|
-
})))))), i ? /* @__PURE__ */
|
|
658
|
+
state: u
|
|
659
|
+
})))))), i ? /* @__PURE__ */ C.createElement("script", {
|
|
659
660
|
suppressHydrationWarning: !0,
|
|
660
661
|
nonce: s,
|
|
661
662
|
dangerouslySetInnerHTML: {
|
|
@@ -663,14 +664,14 @@ function Ir({
|
|
|
663
664
|
}
|
|
664
665
|
}) : null);
|
|
665
666
|
}
|
|
666
|
-
function
|
|
667
|
+
function qr({
|
|
667
668
|
routes: e,
|
|
668
669
|
future: t,
|
|
669
670
|
state: r
|
|
670
671
|
}) {
|
|
671
|
-
return
|
|
672
|
+
return Se.UNSAFE_useRoutesImpl(e, void 0, r, t);
|
|
672
673
|
}
|
|
673
|
-
function
|
|
674
|
+
function Lr(e) {
|
|
674
675
|
if (!e) return null;
|
|
675
676
|
let t = Object.entries(e), r = {};
|
|
676
677
|
for (let [s, n] of t)
|
|
@@ -688,10 +689,10 @@ function Qr(e) {
|
|
|
688
689
|
} : r[s] = n;
|
|
689
690
|
return r;
|
|
690
691
|
}
|
|
691
|
-
function
|
|
692
|
+
function nt() {
|
|
692
693
|
return {
|
|
693
|
-
createHref:
|
|
694
|
-
encodeLocation:
|
|
694
|
+
createHref: it,
|
|
695
|
+
encodeLocation: ot,
|
|
695
696
|
push(e) {
|
|
696
697
|
throw new Error(`You cannot use navigator.push() on the server because it is a stateless environment. This error was probably triggered when you did a \`navigate(${JSON.stringify(e)})\` somewhere in your app.`);
|
|
697
698
|
},
|
|
@@ -709,32 +710,32 @@ function et() {
|
|
|
709
710
|
}
|
|
710
711
|
};
|
|
711
712
|
}
|
|
712
|
-
function
|
|
713
|
+
function zr(e, t) {
|
|
713
714
|
return A.createStaticHandler(e, {
|
|
714
715
|
...t,
|
|
715
|
-
mapRouteProperties:
|
|
716
|
+
mapRouteProperties: Se.UNSAFE_mapRouteProperties
|
|
716
717
|
});
|
|
717
718
|
}
|
|
718
|
-
function
|
|
719
|
-
let s = {}, n = A.UNSAFE_convertRoutesToDataRoutes(e,
|
|
720
|
-
let
|
|
719
|
+
function Br(e, t, r = {}) {
|
|
720
|
+
let s = {}, n = A.UNSAFE_convertRoutesToDataRoutes(e, Se.UNSAFE_mapRouteProperties, void 0, s), o = t.matches.map((u) => {
|
|
721
|
+
let d = s[u.route.id] || u.route;
|
|
721
722
|
return {
|
|
722
|
-
...
|
|
723
|
-
route:
|
|
723
|
+
...u,
|
|
724
|
+
route: d
|
|
724
725
|
};
|
|
725
|
-
}), i = (
|
|
726
|
+
}), i = (u) => `You cannot use router.${u}() on the server because it is a stateless environment`;
|
|
726
727
|
return {
|
|
727
728
|
get basename() {
|
|
728
729
|
return t.basename;
|
|
729
730
|
},
|
|
730
731
|
get future() {
|
|
731
|
-
var
|
|
732
|
+
var u, d;
|
|
732
733
|
return {
|
|
733
734
|
v7_fetcherPersist: !1,
|
|
734
735
|
v7_normalizeFormMethod: !1,
|
|
735
|
-
v7_partialHydration: ((
|
|
736
|
+
v7_partialHydration: ((u = r.future) == null ? void 0 : u.v7_partialHydration) === !0,
|
|
736
737
|
v7_prependBasename: !1,
|
|
737
|
-
v7_relativeSplatPath: ((
|
|
738
|
+
v7_relativeSplatPath: ((d = r.future) == null ? void 0 : d.v7_relativeSplatPath) === !0,
|
|
738
739
|
v7_skipActionErrorRevalidation: !1
|
|
739
740
|
};
|
|
740
741
|
},
|
|
@@ -778,8 +779,8 @@ function Fr(e, t, r = {}) {
|
|
|
778
779
|
revalidate() {
|
|
779
780
|
throw i("revalidate");
|
|
780
781
|
},
|
|
781
|
-
createHref:
|
|
782
|
-
encodeLocation:
|
|
782
|
+
createHref: it,
|
|
783
|
+
encodeLocation: ot,
|
|
783
784
|
getFetcher() {
|
|
784
785
|
return A.IDLE_FETCHER;
|
|
785
786
|
},
|
|
@@ -805,62 +806,110 @@ function Fr(e, t, r = {}) {
|
|
|
805
806
|
}
|
|
806
807
|
};
|
|
807
808
|
}
|
|
808
|
-
function
|
|
809
|
-
return typeof e == "string" ? e :
|
|
809
|
+
function it(e) {
|
|
810
|
+
return typeof e == "string" ? e : M.createPath(e);
|
|
810
811
|
}
|
|
811
|
-
function
|
|
812
|
-
let t = typeof e == "string" ? e :
|
|
812
|
+
function ot(e) {
|
|
813
|
+
let t = typeof e == "string" ? e : M.createPath(e);
|
|
813
814
|
t = t.replace(/ $/, "%20");
|
|
814
|
-
let r =
|
|
815
|
+
let r = Hr.test(t) ? new URL(t) : new URL(t, "http://localhost");
|
|
815
816
|
return {
|
|
816
817
|
pathname: r.pathname,
|
|
817
818
|
search: r.search,
|
|
818
819
|
hash: r.hash
|
|
819
820
|
};
|
|
820
821
|
}
|
|
821
|
-
const
|
|
822
|
+
const Hr = /^(?:[a-z][a-z0-9+.-]*:|\/\/)/i, Ur = {
|
|
822
823
|
"&": "\\u0026",
|
|
823
824
|
">": "\\u003e",
|
|
824
825
|
"<": "\\u003c",
|
|
825
826
|
"\u2028": "\\u2028",
|
|
826
827
|
"\u2029": "\\u2029"
|
|
827
|
-
},
|
|
828
|
-
function
|
|
829
|
-
return e.replace(
|
|
828
|
+
}, $r = /[&><\u2028\u2029]/g;
|
|
829
|
+
function Kr(e) {
|
|
830
|
+
return e.replace($r, (t) => Ur[t]);
|
|
830
831
|
}
|
|
831
|
-
|
|
832
|
-
var
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
const
|
|
832
|
+
Y.StaticRouter = Fr;
|
|
833
|
+
var Vr = Y.StaticRouterProvider = Qr;
|
|
834
|
+
Y.createStaticHandler = zr;
|
|
835
|
+
Y.createStaticRouter = Br;
|
|
836
|
+
const Zr = new Ar({
|
|
837
|
+
defaultOptions: {
|
|
838
|
+
queries: {
|
|
839
|
+
staleTime: 1e3 * 60 * 5
|
|
840
|
+
}
|
|
841
|
+
}
|
|
842
|
+
}), Yr = ({
|
|
836
843
|
router: e,
|
|
837
844
|
hydrate: t = !1
|
|
838
|
-
}) => {
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
845
|
+
}) => /* @__PURE__ */ a.jsx(We, { children: /* @__PURE__ */ a.jsx(Ve, { client: Zr, children: /* @__PURE__ */ a.jsx(Or, { state: t ? window.DATA : void 0, children: /* @__PURE__ */ a.jsx(He, { children: /* @__PURE__ */ a.jsx(ue.Provider, { value: { stagger: !t }, children: /* @__PURE__ */ a.jsx(
|
|
846
|
+
Et,
|
|
847
|
+
{
|
|
848
|
+
router: e,
|
|
849
|
+
future: { v7_startTransition: !0 }
|
|
850
|
+
}
|
|
851
|
+
) }) }) }) }) }), Wr = ({
|
|
842
852
|
router: e,
|
|
843
853
|
context: t,
|
|
844
854
|
queryClient: r,
|
|
845
855
|
helmetContext: s
|
|
846
|
-
}) => /* @__PURE__ */ a.jsx(
|
|
856
|
+
}) => /* @__PURE__ */ a.jsx(We, { children: /* @__PURE__ */ a.jsx(Ve, { client: r, children: /* @__PURE__ */ a.jsx(He, { context: s, children: /* @__PURE__ */ a.jsx(Vr, { router: e, context: t }) }) }) });
|
|
857
|
+
var he = { exports: {} };
|
|
858
|
+
(function(e, t) {
|
|
859
|
+
(function(r, s) {
|
|
860
|
+
s(t, Ye);
|
|
861
|
+
})(Wt, function(r, s) {
|
|
862
|
+
const n = {
|
|
863
|
+
delay: 500,
|
|
864
|
+
minDuration: 200,
|
|
865
|
+
ssr: !0
|
|
866
|
+
};
|
|
867
|
+
function o() {
|
|
868
|
+
const [u, d] = s.useState(!0);
|
|
869
|
+
return s.useEffect(() => {
|
|
870
|
+
d(!1);
|
|
871
|
+
}, []), u;
|
|
872
|
+
}
|
|
873
|
+
function i(u, d) {
|
|
874
|
+
d = Object.assign({}, n, d);
|
|
875
|
+
const l = o() && d.ssr, p = l && u ? "DISPLAY" : "IDLE", [f, h] = s.useState(p), g = s.useRef(null);
|
|
876
|
+
return s.useEffect(() => {
|
|
877
|
+
if (u && (f === "IDLE" || l)) {
|
|
878
|
+
clearTimeout(g.current);
|
|
879
|
+
const v = l ? 0 : d.delay;
|
|
880
|
+
g.current = setTimeout(() => {
|
|
881
|
+
if (!u)
|
|
882
|
+
return h("IDLE");
|
|
883
|
+
g.current = setTimeout(() => {
|
|
884
|
+
h("EXPIRE");
|
|
885
|
+
}, d.minDuration), h("DISPLAY");
|
|
886
|
+
}, v), l || h("DELAY");
|
|
887
|
+
}
|
|
888
|
+
!u && f !== "DISPLAY" && (clearTimeout(g.current), h("IDLE"));
|
|
889
|
+
}, [u, f, d.delay, d.minDuration, l]), s.useEffect(() => () => clearTimeout(g.current), []), f === "DISPLAY" || f === "EXPIRE";
|
|
890
|
+
}
|
|
891
|
+
r.defaultOptions = n, r.useSpinDelay = i;
|
|
892
|
+
});
|
|
893
|
+
})(he, he.exports);
|
|
894
|
+
var Xr = he.exports;
|
|
895
|
+
const Jr = ({
|
|
847
896
|
category: e,
|
|
848
897
|
level: t
|
|
849
898
|
}) => {
|
|
850
|
-
var
|
|
851
|
-
const r =
|
|
852
|
-
|
|
853
|
-
r &&
|
|
899
|
+
var h, g;
|
|
900
|
+
const r = Lt(e), [s, n] = q(!1), o = e.collapsible ?? !0, i = e.collapsed ?? !0, u = !!(!o || !i || r), [d, l] = q(u), p = Gt(((h = e.link) == null ? void 0 : h.id) ?? "");
|
|
901
|
+
L(() => {
|
|
902
|
+
r && l(!0);
|
|
854
903
|
}, [r]);
|
|
855
|
-
const
|
|
904
|
+
const f = o && /* @__PURE__ */ a.jsx(
|
|
856
905
|
"button",
|
|
857
906
|
{
|
|
858
907
|
type: "button",
|
|
859
|
-
onClick: (
|
|
860
|
-
|
|
908
|
+
onClick: (v) => {
|
|
909
|
+
v.preventDefault(), l((m) => !m), n(!0);
|
|
861
910
|
},
|
|
862
911
|
children: /* @__PURE__ */ a.jsx(
|
|
863
|
-
|
|
912
|
+
er,
|
|
864
913
|
{
|
|
865
914
|
size: 16,
|
|
866
915
|
className: R(
|
|
@@ -875,9 +924,9 @@ const Ur = ({
|
|
|
875
924
|
oe.Root,
|
|
876
925
|
{
|
|
877
926
|
className: "flex flex-col",
|
|
878
|
-
defaultOpen:
|
|
879
|
-
open:
|
|
880
|
-
onOpenChange: () =>
|
|
927
|
+
defaultOpen: u,
|
|
928
|
+
open: d,
|
|
929
|
+
onOpenChange: () => l(!0),
|
|
881
930
|
children: [
|
|
882
931
|
/* @__PURE__ */ a.jsx(oe.Trigger, { className: "group", asChild: !0, disabled: !o, children: /* @__PURE__ */ a.jsxs(
|
|
883
932
|
"div",
|
|
@@ -898,35 +947,35 @@ const Ur = ({
|
|
|
898
947
|
size: 16,
|
|
899
948
|
className: R(
|
|
900
949
|
"align-[-0.125em] -translate-x-1",
|
|
901
|
-
|
|
950
|
+
p && "text-primary"
|
|
902
951
|
)
|
|
903
952
|
}
|
|
904
953
|
),
|
|
905
|
-
((
|
|
954
|
+
((g = e.link) == null ? void 0 : g.type) === "doc" ? /* @__PURE__ */ a.jsx(
|
|
906
955
|
ae,
|
|
907
956
|
{
|
|
908
|
-
to:
|
|
957
|
+
to: Q(e.link.id),
|
|
909
958
|
className: "flex-1",
|
|
910
959
|
onClick: () => {
|
|
911
|
-
|
|
960
|
+
p && !d && l(!0);
|
|
912
961
|
},
|
|
913
962
|
children: /* @__PURE__ */ a.jsxs(
|
|
914
963
|
"div",
|
|
915
964
|
{
|
|
916
965
|
className: R(
|
|
917
966
|
"flex items-center gap-2 justify-between w-full",
|
|
918
|
-
|
|
967
|
+
p ? "text-primary" : "text-foreground/80"
|
|
919
968
|
),
|
|
920
969
|
children: [
|
|
921
970
|
/* @__PURE__ */ a.jsx("div", { className: "truncate", children: e.label }),
|
|
922
|
-
|
|
971
|
+
f
|
|
923
972
|
]
|
|
924
973
|
}
|
|
925
974
|
)
|
|
926
975
|
}
|
|
927
976
|
) : /* @__PURE__ */ a.jsxs("div", { className: "flex items-center justify-between w-full", children: [
|
|
928
977
|
/* @__PURE__ */ a.jsx("div", { className: "flex gap-2 truncate w-full", children: e.label }),
|
|
929
|
-
|
|
978
|
+
f
|
|
930
979
|
] })
|
|
931
980
|
]
|
|
932
981
|
}
|
|
@@ -938,20 +987,20 @@ const Ur = ({
|
|
|
938
987
|
// CollapsibleContent class is used to animate and it should only be applied when the user has triggered the toggle
|
|
939
988
|
s && "CollapsibleContent"
|
|
940
989
|
),
|
|
941
|
-
children: /* @__PURE__ */ a.jsx("ul", { className: "mt-1 border-l ms-0.5", children: e.items.map((
|
|
942
|
-
|
|
990
|
+
children: /* @__PURE__ */ a.jsx("ul", { className: "mt-1 border-l ms-0.5", children: e.items.map((v) => /* @__PURE__ */ a.jsx(
|
|
991
|
+
fe,
|
|
943
992
|
{
|
|
944
993
|
level: t + 1,
|
|
945
|
-
item:
|
|
994
|
+
item: v
|
|
946
995
|
},
|
|
947
|
-
("id" in
|
|
996
|
+
("id" in v ? v.id : "") + ("href" in v ? v.href : "") + v.label
|
|
948
997
|
)) })
|
|
949
998
|
}
|
|
950
999
|
)
|
|
951
1000
|
]
|
|
952
1001
|
}
|
|
953
1002
|
);
|
|
954
|
-
}, V =
|
|
1003
|
+
}, V = ur(
|
|
955
1004
|
"flex items-center gap-2 px-[--padding-nav-item] py-1.5 rounded-lg hover:bg-accent transition-colors duration-300",
|
|
956
1005
|
{
|
|
957
1006
|
variants: {
|
|
@@ -972,21 +1021,21 @@ const Ur = ({
|
|
|
972
1021
|
isActive: !1
|
|
973
1022
|
}
|
|
974
1023
|
}
|
|
975
|
-
),
|
|
1024
|
+
), lt = "data-anchor", fe = ({
|
|
976
1025
|
item: e,
|
|
977
1026
|
level: t = 0
|
|
978
1027
|
}) => {
|
|
979
1028
|
var n, o;
|
|
980
|
-
const { activeAnchor: r } =
|
|
1029
|
+
const { activeAnchor: r } = we(), [s] = Pt();
|
|
981
1030
|
switch (e.type) {
|
|
982
1031
|
case "category":
|
|
983
|
-
return /* @__PURE__ */ a.jsx(
|
|
1032
|
+
return /* @__PURE__ */ a.jsx(Jr, { category: e, level: t });
|
|
984
1033
|
case "doc":
|
|
985
1034
|
return /* @__PURE__ */ a.jsxs(
|
|
986
1035
|
ae,
|
|
987
1036
|
{
|
|
988
1037
|
className: ({ isActive: i }) => V({ isActive: i, isTopLevel: t === 0 }),
|
|
989
|
-
to:
|
|
1038
|
+
to: Q(e.id),
|
|
990
1039
|
children: [
|
|
991
1040
|
e.icon && /* @__PURE__ */ a.jsx(e.icon, { size: 16, className: "align-[-0.125em]" }),
|
|
992
1041
|
e.badge ? /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
|
|
@@ -998,10 +1047,10 @@ const Ur = ({
|
|
|
998
1047
|
);
|
|
999
1048
|
case "link":
|
|
1000
1049
|
return e.href.startsWith("#") ? /* @__PURE__ */ a.jsx(
|
|
1001
|
-
|
|
1050
|
+
jt,
|
|
1002
1051
|
{
|
|
1003
1052
|
to: { hash: e.href, search: s.toString() },
|
|
1004
|
-
[
|
|
1053
|
+
[lt]: e.href.slice(1),
|
|
1005
1054
|
className: V({
|
|
1006
1055
|
isActive: e.href.slice(1) === r,
|
|
1007
1056
|
isTopLevel: t === 0,
|
|
@@ -1021,7 +1070,7 @@ const Ur = ({
|
|
|
1021
1070
|
rel: "noopener noreferrer",
|
|
1022
1071
|
children: [
|
|
1023
1072
|
/* @__PURE__ */ a.jsx("span", { className: "whitespace-normal", children: e.label }),
|
|
1024
|
-
/* @__PURE__ */ a.jsx("span", { className: "whitespace-nowrap", children: /* @__PURE__ */ a.jsx(
|
|
1073
|
+
/* @__PURE__ */ a.jsx("span", { className: "whitespace-nowrap", children: /* @__PURE__ */ a.jsx(tr, { className: "inline -translate-y-0.5", size: 12 }) })
|
|
1025
1074
|
]
|
|
1026
1075
|
}
|
|
1027
1076
|
) : /* @__PURE__ */ a.jsx(
|
|
@@ -1038,17 +1087,17 @@ const Ur = ({
|
|
|
1038
1087
|
}
|
|
1039
1088
|
);
|
|
1040
1089
|
}
|
|
1041
|
-
},
|
|
1090
|
+
}, Gr = (e, t = { block: "center" }) => {
|
|
1042
1091
|
if (!e) return;
|
|
1043
1092
|
const r = e.getBoundingClientRect();
|
|
1044
1093
|
r.top >= 0 && r.left >= 0 && r.bottom <= (window.innerHeight || document.documentElement.clientHeight) && r.right <= (window.innerWidth || document.documentElement.clientWidth) || e.scrollIntoView(t);
|
|
1045
|
-
},
|
|
1046
|
-
const e =
|
|
1047
|
-
|
|
1094
|
+
}, ea = () => {
|
|
1095
|
+
const e = ye(), { setActiveAnchor: t } = we();
|
|
1096
|
+
L(() => {
|
|
1048
1097
|
if (!e.hash) return;
|
|
1049
1098
|
const r = decodeURIComponent(e.hash.split("/")[0].slice(1)), s = () => {
|
|
1050
|
-
const n = document.getElementById(r), o = document.querySelector(`[${
|
|
1051
|
-
return n ? (n.scrollIntoView(),
|
|
1099
|
+
const n = document.getElementById(r), o = document.querySelector(`[${lt}="${r}"]`);
|
|
1100
|
+
return n ? (n.scrollIntoView(), Gr(o), requestIdleCallback(() => t(r)), !0) : !1;
|
|
1052
1101
|
};
|
|
1053
1102
|
if (!s()) {
|
|
1054
1103
|
const n = new MutationObserver((o, i) => {
|
|
@@ -1057,13 +1106,13 @@ const Ur = ({
|
|
|
1057
1106
|
return n.observe(document.body, { childList: !0, subtree: !0 }), () => n.disconnect();
|
|
1058
1107
|
}
|
|
1059
1108
|
}, [e.hash, t]);
|
|
1060
|
-
},
|
|
1061
|
-
const e =
|
|
1062
|
-
|
|
1109
|
+
}, ta = () => {
|
|
1110
|
+
const e = ye(), t = pe(e.pathname);
|
|
1111
|
+
L(() => {
|
|
1063
1112
|
t.current !== e.pathname && (window.scrollTo(0, 0), t.current = e.pathname);
|
|
1064
1113
|
}, [e.pathname]);
|
|
1065
1114
|
};
|
|
1066
|
-
function
|
|
1115
|
+
function ra({
|
|
1067
1116
|
className: e,
|
|
1068
1117
|
...t
|
|
1069
1118
|
}) {
|
|
@@ -1075,17 +1124,17 @@ function Yr({
|
|
|
1075
1124
|
}
|
|
1076
1125
|
);
|
|
1077
1126
|
}
|
|
1078
|
-
const
|
|
1127
|
+
const aa = (e) => "getProfileMenuItems" in e && typeof e.getProfileMenuItems == "function", sa = (e) => "getRoutes" in e && typeof e.getRoutes == "function", na = (e) => "renderSearch" in e && typeof e.renderSearch == "function", ia = (e) => "initialize" in e && typeof e.initialize == "function", oa = (e) => "getHead" in e && typeof e.getHead == "function", la = (e) => "getMdxComponents" in e && typeof e.getMdxComponents == "function", ca = (e) => "getIdentities" in e && typeof e.getIdentities == "function", Qe = {
|
|
1079
1128
|
info: "bg-blue-500",
|
|
1080
1129
|
note: "bg-gray-500",
|
|
1081
1130
|
tip: "bg-green-600",
|
|
1082
1131
|
caution: "bg-orange-500",
|
|
1083
1132
|
danger: "bg-rose-500"
|
|
1084
|
-
},
|
|
1085
|
-
const { page: e } =
|
|
1133
|
+
}, ua = () => {
|
|
1134
|
+
const { page: e } = F(), [t, r] = q(!0);
|
|
1086
1135
|
if (!(e != null && e.banner) || !t)
|
|
1087
1136
|
return /* @__PURE__ */ a.jsx("style", { children: ":root { --banner-height: 0px; }" });
|
|
1088
|
-
const s = e.banner.color && e.banner.color in
|
|
1137
|
+
const s = e.banner.color && e.banner.color in Qe ? Qe[e.banner.color] : e.banner.color ? void 0 : "bg-primary", n = s ? {} : { backgroundColor: e.banner.color };
|
|
1089
1138
|
return /* @__PURE__ */ a.jsxs(
|
|
1090
1139
|
"div",
|
|
1091
1140
|
{
|
|
@@ -1102,15 +1151,15 @@ const Jr = (e) => "getProfileMenuItems" in e && typeof e.getProfileMenuItems ==
|
|
|
1102
1151
|
type: "button",
|
|
1103
1152
|
className: "md:absolute md:right-4 -m-1.5 p-1.5 hover:bg-accent-foreground/10 rounded-md",
|
|
1104
1153
|
onClick: () => r(!1),
|
|
1105
|
-
children: /* @__PURE__ */ a.jsx(
|
|
1154
|
+
children: /* @__PURE__ */ a.jsx(rr, { size: 16 })
|
|
1106
1155
|
}
|
|
1107
1156
|
)
|
|
1108
1157
|
]
|
|
1109
1158
|
}
|
|
1110
1159
|
);
|
|
1111
|
-
},
|
|
1112
|
-
const e =
|
|
1113
|
-
|
|
1160
|
+
}, ct = () => {
|
|
1161
|
+
const e = F(), [t, r] = q(!1), s = $t(() => r(!1), []);
|
|
1162
|
+
L(() => {
|
|
1114
1163
|
if (t)
|
|
1115
1164
|
return;
|
|
1116
1165
|
function o(i) {
|
|
@@ -1120,7 +1169,7 @@ const Jr = (e) => "getProfileMenuItems" in e && typeof e.getProfileMenuItems ==
|
|
|
1120
1169
|
window.removeEventListener("keydown", o);
|
|
1121
1170
|
};
|
|
1122
1171
|
}, [t, r]);
|
|
1123
|
-
const n = e.plugins.find(
|
|
1172
|
+
const n = e.plugins.find(na);
|
|
1124
1173
|
return n ? /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
|
|
1125
1174
|
/* @__PURE__ */ a.jsxs(
|
|
1126
1175
|
"button",
|
|
@@ -1130,22 +1179,22 @@ const Jr = (e) => "getProfileMenuItems" in e && typeof e.getProfileMenuItems ==
|
|
|
1130
1179
|
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",
|
|
1131
1180
|
children: [
|
|
1132
1181
|
/* @__PURE__ */ a.jsxs("div", { className: "flex items-center gap-2 flex-grow", children: [
|
|
1133
|
-
/* @__PURE__ */ a.jsx(
|
|
1182
|
+
/* @__PURE__ */ a.jsx(ar, { size: 14 }),
|
|
1134
1183
|
"Search"
|
|
1135
1184
|
] }),
|
|
1136
1185
|
/* @__PURE__ */ a.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" })
|
|
1137
1186
|
]
|
|
1138
1187
|
}
|
|
1139
1188
|
),
|
|
1140
|
-
/* @__PURE__ */ a.jsx(
|
|
1189
|
+
/* @__PURE__ */ a.jsx(ve, { fallback: null, children: n.renderSearch({
|
|
1141
1190
|
isOpen: t,
|
|
1142
1191
|
onClose: s
|
|
1143
1192
|
}) })
|
|
1144
1193
|
] }) : null;
|
|
1145
|
-
},
|
|
1146
|
-
const {
|
|
1147
|
-
return /* @__PURE__ */ a.jsx(
|
|
1148
|
-
|
|
1194
|
+
}, ut = () => {
|
|
1195
|
+
const { resolvedTheme: e, setTheme: t } = jr(), r = e === "dark" ? sr : nr;
|
|
1196
|
+
return /* @__PURE__ */ a.jsx(je, { children: /* @__PURE__ */ a.jsx(
|
|
1197
|
+
de,
|
|
1149
1198
|
{
|
|
1150
1199
|
variant: "ghost",
|
|
1151
1200
|
"aria-label": e === "dark" ? "Switch to light mode" : "Switch to dark mode",
|
|
@@ -1154,78 +1203,86 @@ const Jr = (e) => "getProfileMenuItems" in e && typeof e.getProfileMenuItems ==
|
|
|
1154
1203
|
children: /* @__PURE__ */ a.jsx(r, { size: 18 })
|
|
1155
1204
|
}
|
|
1156
1205
|
) });
|
|
1157
|
-
},
|
|
1158
|
-
const { topNavigation: e } =
|
|
1159
|
-
return e.length <= 1 ? /* @__PURE__ */ a.jsx("style", { children: ":root { --top-nav-height: 0px; }" }) : /* @__PURE__ */ a.jsx(
|
|
1160
|
-
},
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
|
|
1175
|
-
|
|
1176
|
-
|
|
1177
|
-
|
|
1178
|
-
children: t
|
|
1179
|
-
}
|
|
1180
|
-
);
|
|
1181
|
-
}, oa = () => {
|
|
1182
|
-
const { topNavigation: e } = _(), { isAuthenticated: t } = se();
|
|
1183
|
-
return /* @__PURE__ */ a.jsxs(Ze, { direction: "right", children: [
|
|
1184
|
-
/* @__PURE__ */ a.jsx("div", { className: "flex lg:hidden justify-self-end", children: /* @__PURE__ */ a.jsx(We, { className: "lg:hidden", children: /* @__PURE__ */ a.jsx(rr, { size: 22 }) }) }),
|
|
1185
|
-
/* @__PURE__ */ a.jsxs(
|
|
1186
|
-
Ye,
|
|
1206
|
+
}, dt = (e) => (t) => t.display === "auth" && e || t.display === "anon" && !e || !t.display || t.display === "always", da = () => {
|
|
1207
|
+
const { topNavigation: e } = F(), { isAuthenticated: t } = se();
|
|
1208
|
+
return e.length <= 1 ? /* @__PURE__ */ a.jsx("style", { children: ":root { --top-nav-height: 0px; }" }) : /* @__PURE__ */ a.jsx(ve, { children: /* @__PURE__ */ a.jsx("nav", { className: "hidden lg:block border-b text-sm px-12 h-[--top-nav-height]", children: /* @__PURE__ */ a.jsx("ul", { className: "flex flex-row items-center gap-8", children: e.filter(dt(t)).map((r) => /* @__PURE__ */ a.jsx("li", { children: /* @__PURE__ */ a.jsx(ht, { ...r }) }, r.id)) }) }) });
|
|
1209
|
+
}, ht = ({
|
|
1210
|
+
id: e,
|
|
1211
|
+
label: t,
|
|
1212
|
+
default: r
|
|
1213
|
+
}) => {
|
|
1214
|
+
var l;
|
|
1215
|
+
const { sidebars: s } = F(), n = s[e], o = Ze(), i = !!be().location, u = ((l = o.topNavItem) == null ? void 0 : l.id) === e && !i, d = r ?? (n ? zt(n, (p) => {
|
|
1216
|
+
if (p.type === "doc") return Q(p.id);
|
|
1217
|
+
}) : Q(e));
|
|
1218
|
+
if (!d)
|
|
1219
|
+
throw new Sr("Page not found.", {
|
|
1220
|
+
developerHint: `No links found in top navigation for '${e}'. Check that the sidebar isn't empty or that a default link is set.`
|
|
1221
|
+
});
|
|
1222
|
+
return (
|
|
1223
|
+
// We don't use isActive here because it has to be inside the sidebar,
|
|
1224
|
+
// the top nav id doesn't necessarily start with the sidebar id
|
|
1225
|
+
/* @__PURE__ */ a.jsx(
|
|
1226
|
+
ae,
|
|
1187
1227
|
{
|
|
1188
|
-
className:
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
/* @__PURE__ */ a.jsx("li", { children: /* @__PURE__ */ a.jsx(nt, {}) }),
|
|
1195
|
-
e.filter(it(t)).map((r) => /* @__PURE__ */ a.jsx("li", { children: /* @__PURE__ */ a.jsx(
|
|
1196
|
-
ae,
|
|
1197
|
-
{
|
|
1198
|
-
className: ({ isActive: s }) => Xe(
|
|
1199
|
-
"block font-medium border-b-2",
|
|
1200
|
-
s ? "border-primary text-foreground" : "border-transparent text-foreground/75 hover:text-foreground hover:border-accent-foreground/25"
|
|
1201
|
-
),
|
|
1202
|
-
to: r.id,
|
|
1203
|
-
children: /* @__PURE__ */ a.jsx(sr, { children: r.label })
|
|
1204
|
-
}
|
|
1205
|
-
) }, r.label))
|
|
1206
|
-
] })
|
|
1207
|
-
]
|
|
1228
|
+
className: ({ isPending: p }) => dr(
|
|
1229
|
+
"block lg:py-3.5 font-medium -mb-px border-b-2",
|
|
1230
|
+
u || p ? "border-primary text-foreground" : "border-transparent text-foreground/75 hover:text-foreground hover:border-accent-foreground/25"
|
|
1231
|
+
),
|
|
1232
|
+
to: d,
|
|
1233
|
+
children: t
|
|
1208
1234
|
}
|
|
1209
1235
|
)
|
|
1210
|
-
|
|
1211
|
-
},
|
|
1212
|
-
|
|
1213
|
-
|
|
1236
|
+
);
|
|
1237
|
+
}, ha = () => {
|
|
1238
|
+
const { topNavigation: e } = F(), { isAuthenticated: t } = se(), [r, s] = q(!1);
|
|
1239
|
+
return /* @__PURE__ */ a.jsxs(
|
|
1240
|
+
et,
|
|
1241
|
+
{
|
|
1242
|
+
direction: "right",
|
|
1243
|
+
open: r,
|
|
1244
|
+
onOpenChange: (n) => s(n),
|
|
1245
|
+
children: [
|
|
1246
|
+
/* @__PURE__ */ a.jsx("div", { className: "flex lg:hidden justify-self-end", children: /* @__PURE__ */ a.jsx(tt, { className: "lg:hidden", children: /* @__PURE__ */ a.jsx(ir, { size: 22 }) }) }),
|
|
1247
|
+
/* @__PURE__ */ a.jsxs(
|
|
1248
|
+
rt,
|
|
1249
|
+
{
|
|
1250
|
+
className: "lg:hidden h-screen right-0 left-auto w-[320px] rounded-none overflow-auto",
|
|
1251
|
+
"aria-describedby": void 0,
|
|
1252
|
+
children: [
|
|
1253
|
+
/* @__PURE__ */ a.jsx(st, { children: /* @__PURE__ */ a.jsx(at, { children: "Navigation" }) }),
|
|
1254
|
+
/* @__PURE__ */ a.jsx("div", { className: "flex p-4", children: /* @__PURE__ */ a.jsx(ct, {}) }),
|
|
1255
|
+
/* @__PURE__ */ a.jsxs("ul", { className: "flex flex-col items-center gap-4 p-4", children: [
|
|
1256
|
+
/* @__PURE__ */ a.jsx("li", { children: /* @__PURE__ */ a.jsx(ut, {}) }),
|
|
1257
|
+
e.filter(dt(t)).map((n) => /* @__PURE__ */ a.jsx("li", { children: /* @__PURE__ */ a.jsx("button", { onClick: () => s(!1), children: /* @__PURE__ */ a.jsx(ht, { ...n }) }) }, n.label))
|
|
1258
|
+
] })
|
|
1259
|
+
]
|
|
1260
|
+
}
|
|
1261
|
+
)
|
|
1262
|
+
]
|
|
1263
|
+
}
|
|
1264
|
+
);
|
|
1265
|
+
}, re = ({ item: e }) => e.children ? /* @__PURE__ */ a.jsxs(pr, { children: [
|
|
1266
|
+
/* @__PURE__ */ a.jsx(vr, { children: e.label }),
|
|
1267
|
+
/* @__PURE__ */ a.jsx(xr, { children: /* @__PURE__ */ a.jsx(yr, { children: e.children.map((t, r) => (
|
|
1214
1268
|
// eslint-disable-next-line react/no-array-index-key
|
|
1215
|
-
/* @__PURE__ */ a.jsx(
|
|
1269
|
+
/* @__PURE__ */ a.jsx(re, { item: t }, r)
|
|
1216
1270
|
)) }) })
|
|
1217
|
-
] }, e.label) : /* @__PURE__ */ a.jsx(
|
|
1218
|
-
|
|
1271
|
+
] }, e.label) : /* @__PURE__ */ a.jsx(ge, { to: e.path ?? "", children: /* @__PURE__ */ a.jsxs(br, { className: "flex gap-2", children: [
|
|
1272
|
+
e.icon && /* @__PURE__ */ a.jsx(e.icon, { size: 16, strokeWidth: 1, absoluteStrokeWidth: !0 }),
|
|
1273
|
+
e.label
|
|
1274
|
+
] }, e.label) }), ft = Xe(function() {
|
|
1275
|
+
const t = se(), { isAuthenticated: r, profile: s, isAuthEnabled: n } = se(), o = F(), { page: i, plugins: u } = o, d = u.filter((l) => aa(l)).flatMap((l) => l.getProfileMenuItems(o)).sort((l) => l.weight ?? 0);
|
|
1219
1276
|
return /* @__PURE__ */ a.jsxs("header", { className: "sticky lg:top-0 z-10 bg-background/80 backdrop-blur w-full", children: [
|
|
1220
|
-
/* @__PURE__ */ a.jsx(
|
|
1277
|
+
/* @__PURE__ */ a.jsx(ua, {}),
|
|
1221
1278
|
/* @__PURE__ */ a.jsxs("div", { className: "max-w-screen-2xl mx-auto", children: [
|
|
1222
1279
|
/* @__PURE__ */ a.jsxs("div", { className: "grid grid-cols-2 lg:grid-cols-[calc(var(--side-nav-width))_1fr] lg:gap-12 items-center border-b px-10 lg:px-12 h-[--top-header-height]", children: [
|
|
1223
|
-
/* @__PURE__ */ a.jsx("div", { className: "flex", children: /* @__PURE__ */ a.jsx(
|
|
1280
|
+
/* @__PURE__ */ a.jsx("div", { className: "flex", children: /* @__PURE__ */ a.jsx(ge, { to: "/", children: /* @__PURE__ */ a.jsxs("div", { className: "flex items-center gap-3.5", children: [
|
|
1224
1281
|
(i == null ? void 0 : i.logo) && /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
|
|
1225
1282
|
/* @__PURE__ */ a.jsx(
|
|
1226
1283
|
"img",
|
|
1227
1284
|
{
|
|
1228
|
-
src: /https?:\/\//.test(i.logo.src.light) ? i.logo.src.light :
|
|
1285
|
+
src: /https?:\/\//.test(i.logo.src.light) ? i.logo.src.light : Q(
|
|
1229
1286
|
"/",
|
|
1230
1287
|
i.logo.src.light
|
|
1231
1288
|
),
|
|
@@ -1238,14 +1295,13 @@ const Jr = (e) => "getProfileMenuItems" in e && typeof e.getProfileMenuItems ==
|
|
|
1238
1295
|
/* @__PURE__ */ a.jsx(
|
|
1239
1296
|
"img",
|
|
1240
1297
|
{
|
|
1241
|
-
|
|
1242
|
-
src: /https?:\/\//.test(i.logo.src.dark) ? i.logo.src.dark : F(
|
|
1298
|
+
src: /https?:\/\//.test(i.logo.src.dark) ? i.logo.src.dark : Q(
|
|
1243
1299
|
"/",
|
|
1244
1300
|
i.logo.src.dark
|
|
1245
1301
|
),
|
|
1246
1302
|
alt: i.logo.alt ?? i.pageTitle,
|
|
1247
1303
|
style: { width: i.logo.width },
|
|
1248
|
-
className: "h-10",
|
|
1304
|
+
className: "h-10 hidden dark:block",
|
|
1249
1305
|
loading: "lazy"
|
|
1250
1306
|
}
|
|
1251
1307
|
)
|
|
@@ -1253,35 +1309,46 @@ const Jr = (e) => "getProfileMenuItems" in e && typeof e.getProfileMenuItems ==
|
|
|
1253
1309
|
/* @__PURE__ */ a.jsx("span", { className: "font-bold text-2xl text-foreground/85 tracking-wide", children: i == null ? void 0 : i.pageTitle })
|
|
1254
1310
|
] }) }) }),
|
|
1255
1311
|
/* @__PURE__ */ a.jsxs("div", { className: "grid grid-cols-1 lg:grid-cols-[--sidecar-grid-cols] items-center gap-8", children: [
|
|
1256
|
-
/* @__PURE__ */ a.jsx("div", { className: "w-full justify-center hidden lg:flex", children: /* @__PURE__ */ a.jsx(
|
|
1257
|
-
/* @__PURE__ */ a.jsx(
|
|
1312
|
+
/* @__PURE__ */ a.jsx("div", { className: "w-full justify-center hidden lg:flex", children: /* @__PURE__ */ a.jsx(ct, {}) }),
|
|
1313
|
+
/* @__PURE__ */ a.jsx(ha, {}),
|
|
1258
1314
|
/* @__PURE__ */ a.jsxs("div", { className: "hidden lg:flex items-center justify-self-end text-sm gap-2", children: [
|
|
1259
|
-
/* @__PURE__ */ a.jsx(
|
|
1315
|
+
/* @__PURE__ */ a.jsx(D, { name: "head-navigation-start" }),
|
|
1260
1316
|
n && /* @__PURE__ */ a.jsx(
|
|
1261
|
-
|
|
1317
|
+
je,
|
|
1262
1318
|
{
|
|
1263
|
-
fallback: /* @__PURE__ */ a.jsx(
|
|
1264
|
-
children: r ?
|
|
1265
|
-
/* @__PURE__ */ a.jsx(
|
|
1266
|
-
/* @__PURE__ */ a.jsxs(
|
|
1267
|
-
/* @__PURE__ */ a.
|
|
1268
|
-
|
|
1269
|
-
|
|
1319
|
+
fallback: /* @__PURE__ */ a.jsx(ra, { className: "rounded h-5 w-24 mr-4" }),
|
|
1320
|
+
children: r ? Object.values(d).length > 0 && /* @__PURE__ */ a.jsxs(hr, { modal: !1, children: [
|
|
1321
|
+
/* @__PURE__ */ a.jsx(fr, { asChild: !0, children: /* @__PURE__ */ a.jsx(de, { variant: "ghost", children: s != null && s.name ? `${s.name}` : "My Account" }) }),
|
|
1322
|
+
/* @__PURE__ */ a.jsxs(mr, { className: "w-56", children: [
|
|
1323
|
+
/* @__PURE__ */ a.jsxs(gr, { children: [
|
|
1324
|
+
s != null && s.name ? `${s.name}` : "My Account",
|
|
1325
|
+
(s == null ? void 0 : s.email) && /* @__PURE__ */ a.jsx("div", { className: "font-normal text-muted-foreground", children: s.email })
|
|
1326
|
+
] }),
|
|
1327
|
+
d.filter((l) => l.category === "top").length > 0 && /* @__PURE__ */ a.jsx(le, {}),
|
|
1328
|
+
d.filter((l) => l.category === "top").map((l) => /* @__PURE__ */ a.jsx(re, { item: l }, l.label)),
|
|
1329
|
+
d.filter(
|
|
1330
|
+
(l) => !l.category || l.category === "middle"
|
|
1331
|
+
).length > 0 && /* @__PURE__ */ a.jsx(le, {}),
|
|
1332
|
+
d.filter(
|
|
1333
|
+
(l) => !l.category || l.category === "middle"
|
|
1334
|
+
).map((l) => /* @__PURE__ */ a.jsx(re, { item: l }, l.label)),
|
|
1335
|
+
d.filter((l) => l.category === "bottom").length > 0 && /* @__PURE__ */ a.jsx(le, {}),
|
|
1336
|
+
d.filter((l) => l.category === "bottom").map((l) => /* @__PURE__ */ a.jsx(re, { item: l }, l.label))
|
|
1270
1337
|
] })
|
|
1271
|
-
] }) : /* @__PURE__ */ a.jsx(
|
|
1338
|
+
] }) : /* @__PURE__ */ a.jsx(de, { variant: "ghost", onClick: () => t.login(), children: "Login" })
|
|
1272
1339
|
}
|
|
1273
1340
|
),
|
|
1274
|
-
/* @__PURE__ */ a.jsx(
|
|
1275
|
-
/* @__PURE__ */ a.jsx(
|
|
1341
|
+
/* @__PURE__ */ a.jsx(ut, {}),
|
|
1342
|
+
/* @__PURE__ */ a.jsx(D, { name: "head-navigation-end" })
|
|
1276
1343
|
] })
|
|
1277
1344
|
] })
|
|
1278
1345
|
] }),
|
|
1279
|
-
/* @__PURE__ */ a.jsx(
|
|
1280
|
-
/* @__PURE__ */ a.jsx(
|
|
1281
|
-
/* @__PURE__ */ a.jsx(
|
|
1346
|
+
/* @__PURE__ */ a.jsx(D, { name: "top-navigation-before" }),
|
|
1347
|
+
/* @__PURE__ */ a.jsx(da, {}),
|
|
1348
|
+
/* @__PURE__ */ a.jsx(D, { name: "top-navigation-after" })
|
|
1282
1349
|
] })
|
|
1283
1350
|
] });
|
|
1284
|
-
}),
|
|
1351
|
+
}), mt = Kt(({ children: e, className: t, pushMainContent: r }, s) => /* @__PURE__ */ a.jsx(
|
|
1285
1352
|
"nav",
|
|
1286
1353
|
{
|
|
1287
1354
|
"data-navigation": String(r),
|
|
@@ -1295,99 +1362,98 @@ const Jr = (e) => "getProfileMenuItems" in e && typeof e.getProfileMenuItems ==
|
|
|
1295
1362
|
children: e
|
|
1296
1363
|
}
|
|
1297
1364
|
));
|
|
1298
|
-
|
|
1299
|
-
const
|
|
1300
|
-
const e =
|
|
1365
|
+
mt.displayName = "SidebarWrapper";
|
|
1366
|
+
const fa = () => {
|
|
1367
|
+
const e = pe(null), t = Ze();
|
|
1301
1368
|
return /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
|
|
1302
1369
|
/* @__PURE__ */ a.jsxs(
|
|
1303
|
-
|
|
1370
|
+
mt,
|
|
1304
1371
|
{
|
|
1305
1372
|
ref: e,
|
|
1306
1373
|
pushMainContent: t.sidebar.length > 0,
|
|
1307
1374
|
children: [
|
|
1308
|
-
/* @__PURE__ */ a.jsx(
|
|
1309
|
-
t.sidebar.map((r) => /* @__PURE__ */ a.jsx(
|
|
1310
|
-
/* @__PURE__ */ a.jsx(
|
|
1375
|
+
/* @__PURE__ */ a.jsx(D, { name: "zudoku-before-navigation" }),
|
|
1376
|
+
t.sidebar.map((r) => /* @__PURE__ */ a.jsx(fe, { item: r }, r.label)),
|
|
1377
|
+
/* @__PURE__ */ a.jsx(D, { name: "zudoku-after-navigation" })
|
|
1311
1378
|
]
|
|
1312
1379
|
}
|
|
1313
1380
|
),
|
|
1314
1381
|
/* @__PURE__ */ a.jsxs(
|
|
1315
|
-
|
|
1382
|
+
rt,
|
|
1316
1383
|
{
|
|
1317
1384
|
className: "lg:hidden h-screen left-0 p-6 w-[320px] rounded-none overflow-auto",
|
|
1318
1385
|
"aria-describedby": void 0,
|
|
1319
1386
|
children: [
|
|
1320
|
-
/* @__PURE__ */ a.jsx(
|
|
1321
|
-
t.sidebar.map((r) => /* @__PURE__ */ a.jsx(
|
|
1387
|
+
/* @__PURE__ */ a.jsx(st, { children: /* @__PURE__ */ a.jsx(at, { children: "Sidebar" }) }),
|
|
1388
|
+
t.sidebar.map((r) => /* @__PURE__ */ a.jsx(fe, { item: r }, r.label))
|
|
1322
1389
|
]
|
|
1323
1390
|
}
|
|
1324
1391
|
)
|
|
1325
1392
|
] });
|
|
1326
|
-
},
|
|
1327
|
-
const t =
|
|
1328
|
-
|
|
1329
|
-
const o =
|
|
1330
|
-
|
|
1331
|
-
var
|
|
1332
|
-
(
|
|
1333
|
-
}, [n]),
|
|
1393
|
+
}, qe = () => /* @__PURE__ */ a.jsx("main", { className: "grid h-[calc(100vh-var(--header-height))] place-items-center", children: /* @__PURE__ */ a.jsx(Nr, {}) }), ma = ({ children: e }) => {
|
|
1394
|
+
const t = ye(), { setActiveAnchor: r } = we(), { meta: s, authentication: n } = F();
|
|
1395
|
+
ea(), ta();
|
|
1396
|
+
const o = pe(t.pathname);
|
|
1397
|
+
L(() => {
|
|
1398
|
+
var d;
|
|
1399
|
+
(d = n == null ? void 0 : n.onPageLoad) == null || d.call(n);
|
|
1400
|
+
}, [n]), L(() => {
|
|
1334
1401
|
t.pathname !== o.current && r(""), o.current = t.pathname;
|
|
1335
|
-
}, [t.pathname, r])
|
|
1402
|
+
}, [t.pathname, r]);
|
|
1403
|
+
const i = !!be().location, u = Xr.useSpinDelay(i, {
|
|
1404
|
+
delay: 300,
|
|
1405
|
+
minDuration: 500
|
|
1406
|
+
});
|
|
1407
|
+
return /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
|
|
1336
1408
|
!1,
|
|
1337
|
-
/* @__PURE__ */ a.jsxs(
|
|
1409
|
+
/* @__PURE__ */ a.jsxs(me, { titleTemplate: s == null ? void 0 : s.title, children: [
|
|
1338
1410
|
(s == null ? void 0 : s.description) && /* @__PURE__ */ a.jsx("meta", { name: "description", content: s.description }),
|
|
1339
1411
|
(s == null ? void 0 : s.favicon) && /* @__PURE__ */ a.jsx("link", { rel: "icon", href: s.favicon })
|
|
1340
1412
|
] }),
|
|
1341
|
-
/* @__PURE__ */ a.jsx(
|
|
1342
|
-
/* @__PURE__ */ a.jsx(
|
|
1343
|
-
/* @__PURE__ */ a.jsx(
|
|
1344
|
-
/* @__PURE__ */ a.jsx("div", { className: "w-full max-w-screen-2xl mx-auto px-10 lg:px-12", children: /* @__PURE__ */ a.jsx(
|
|
1345
|
-
|
|
1346
|
-
|
|
1347
|
-
|
|
1348
|
-
|
|
1349
|
-
|
|
1350
|
-
|
|
1351
|
-
"
|
|
1352
|
-
{
|
|
1353
|
-
className: R(
|
|
1354
|
-
"lg:hidden -mx-10 px-10 py-2 sticky bg-background/80 backdrop-blur z-10 top-0 left-0 right-0 border-b",
|
|
1355
|
-
"peer-data-[navigation=false]:hidden"
|
|
1356
|
-
),
|
|
1357
|
-
children: /* @__PURE__ */ a.jsxs(We, { className: "flex items-center gap-2", children: [
|
|
1358
|
-
/* @__PURE__ */ a.jsx(ar, { size: 16, strokeWidth: 1.5 }),
|
|
1359
|
-
/* @__PURE__ */ a.jsx("span", { className: "text-sm", children: "Menu" })
|
|
1360
|
-
] })
|
|
1361
|
-
}
|
|
1413
|
+
/* @__PURE__ */ a.jsx(D, { name: "layout-before-head" }),
|
|
1414
|
+
/* @__PURE__ */ a.jsx(ft, {}),
|
|
1415
|
+
/* @__PURE__ */ a.jsx(D, { name: "layout-after-head" }),
|
|
1416
|
+
/* @__PURE__ */ a.jsx("div", { className: "w-full max-w-screen-2xl mx-auto px-10 lg:px-12", children: u ? /* @__PURE__ */ a.jsx(qe, {}) : /* @__PURE__ */ a.jsx(ve, { fallback: /* @__PURE__ */ a.jsx(qe, {}), children: /* @__PURE__ */ a.jsxs(et, { direction: "left", children: [
|
|
1417
|
+
/* @__PURE__ */ a.jsx(fa, {}),
|
|
1418
|
+
/* @__PURE__ */ a.jsx(
|
|
1419
|
+
"div",
|
|
1420
|
+
{
|
|
1421
|
+
className: R(
|
|
1422
|
+
"lg:hidden -mx-10 px-10 py-2 sticky bg-background/80 backdrop-blur z-10 top-0 left-0 right-0 border-b",
|
|
1423
|
+
"peer-data-[navigation=false]:hidden"
|
|
1362
1424
|
),
|
|
1363
|
-
/* @__PURE__ */ a.jsxs(
|
|
1364
|
-
|
|
1365
|
-
{
|
|
1366
|
-
|
|
1367
|
-
|
|
1368
|
-
|
|
1369
|
-
|
|
1370
|
-
|
|
1371
|
-
|
|
1372
|
-
|
|
1373
|
-
|
|
1374
|
-
|
|
1375
|
-
|
|
1376
|
-
|
|
1377
|
-
|
|
1378
|
-
|
|
1379
|
-
|
|
1380
|
-
|
|
1381
|
-
|
|
1382
|
-
|
|
1425
|
+
children: /* @__PURE__ */ a.jsxs(tt, { className: "flex items-center gap-2", children: [
|
|
1426
|
+
/* @__PURE__ */ a.jsx(or, { size: 16, strokeWidth: 1.5 }),
|
|
1427
|
+
/* @__PURE__ */ a.jsx("span", { className: "text-sm", children: "Menu" })
|
|
1428
|
+
] })
|
|
1429
|
+
}
|
|
1430
|
+
),
|
|
1431
|
+
/* @__PURE__ */ a.jsxs(
|
|
1432
|
+
"main",
|
|
1433
|
+
{
|
|
1434
|
+
className: R(
|
|
1435
|
+
"h-full dark:border-white/10 translate-x-0",
|
|
1436
|
+
"lg:overflow-visible",
|
|
1437
|
+
// This works in tandem with the `SidebarWrapper` component
|
|
1438
|
+
"lg:peer-data-[navigation=true]:w-[calc(100%-var(--side-nav-width))]",
|
|
1439
|
+
"lg:peer-data-[navigation=true]:translate-x-[--side-nav-width] lg:peer-data-[navigation=true]:pl-12"
|
|
1440
|
+
),
|
|
1441
|
+
children: [
|
|
1442
|
+
/* @__PURE__ */ a.jsx(D, { name: "zudoku-before-content" }),
|
|
1443
|
+
e ?? /* @__PURE__ */ a.jsx(Ge, {}),
|
|
1444
|
+
/* @__PURE__ */ a.jsx(D, { name: "zudoku-after-content" })
|
|
1445
|
+
]
|
|
1446
|
+
}
|
|
1447
|
+
)
|
|
1448
|
+
] }) }) })
|
|
1383
1449
|
] });
|
|
1384
|
-
},
|
|
1450
|
+
}, ga = Je(null), ce = {
|
|
1385
1451
|
didCatch: !1,
|
|
1386
1452
|
error: null
|
|
1387
1453
|
};
|
|
1388
|
-
class
|
|
1454
|
+
class pa extends Vt {
|
|
1389
1455
|
constructor(t) {
|
|
1390
|
-
super(t), this.resetErrorBoundary = this.resetErrorBoundary.bind(this), this.state =
|
|
1456
|
+
super(t), this.resetErrorBoundary = this.resetErrorBoundary.bind(this), this.state = ce;
|
|
1391
1457
|
}
|
|
1392
1458
|
static getDerivedStateFromError(t) {
|
|
1393
1459
|
return {
|
|
@@ -1405,7 +1471,7 @@ class da extends Lt {
|
|
|
1405
1471
|
(r = (s = this.props).onReset) === null || r === void 0 || r.call(s, {
|
|
1406
1472
|
args: o,
|
|
1407
1473
|
reason: "imperative-api"
|
|
1408
|
-
}), this.setState(
|
|
1474
|
+
}), this.setState(ce);
|
|
1409
1475
|
}
|
|
1410
1476
|
}
|
|
1411
1477
|
componentDidCatch(t, r) {
|
|
@@ -1418,13 +1484,13 @@ class da extends Lt {
|
|
|
1418
1484
|
} = this.state, {
|
|
1419
1485
|
resetKeys: n
|
|
1420
1486
|
} = this.props;
|
|
1421
|
-
if (s && r.error !== null &&
|
|
1487
|
+
if (s && r.error !== null && va(t.resetKeys, n)) {
|
|
1422
1488
|
var o, i;
|
|
1423
1489
|
(o = (i = this.props).onReset) === null || o === void 0 || o.call(i, {
|
|
1424
1490
|
next: n,
|
|
1425
1491
|
prev: t.resetKeys,
|
|
1426
1492
|
reason: "keys"
|
|
1427
|
-
}), this.setState(
|
|
1493
|
+
}), this.setState(ce);
|
|
1428
1494
|
}
|
|
1429
1495
|
}
|
|
1430
1496
|
render() {
|
|
@@ -1437,137 +1503,137 @@ class da extends Lt {
|
|
|
1437
1503
|
didCatch: o,
|
|
1438
1504
|
error: i
|
|
1439
1505
|
} = this.state;
|
|
1440
|
-
let
|
|
1506
|
+
let u = t;
|
|
1441
1507
|
if (o) {
|
|
1442
|
-
const
|
|
1508
|
+
const d = {
|
|
1443
1509
|
error: i,
|
|
1444
1510
|
resetErrorBoundary: this.resetErrorBoundary
|
|
1445
1511
|
};
|
|
1446
1512
|
if (typeof r == "function")
|
|
1447
|
-
|
|
1513
|
+
u = r(d);
|
|
1448
1514
|
else if (s)
|
|
1449
|
-
|
|
1515
|
+
u = Ie(s, d);
|
|
1450
1516
|
else if (n !== void 0)
|
|
1451
|
-
|
|
1517
|
+
u = n;
|
|
1452
1518
|
else
|
|
1453
1519
|
throw i;
|
|
1454
1520
|
}
|
|
1455
|
-
return
|
|
1521
|
+
return Ie(ga.Provider, {
|
|
1456
1522
|
value: {
|
|
1457
1523
|
didCatch: o,
|
|
1458
1524
|
error: i,
|
|
1459
1525
|
resetErrorBoundary: this.resetErrorBoundary
|
|
1460
1526
|
}
|
|
1461
|
-
},
|
|
1527
|
+
}, u);
|
|
1462
1528
|
}
|
|
1463
1529
|
}
|
|
1464
|
-
function
|
|
1530
|
+
function va() {
|
|
1465
1531
|
let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : [], t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : [];
|
|
1466
1532
|
return e.length !== t.length || e.some((r, s) => !Object.is(r, t[s]));
|
|
1467
1533
|
}
|
|
1468
|
-
class
|
|
1534
|
+
class xa {
|
|
1469
1535
|
constructor(t) {
|
|
1470
|
-
|
|
1471
|
-
|
|
1472
|
-
|
|
1473
|
-
|
|
1474
|
-
|
|
1475
|
-
|
|
1476
|
-
|
|
1477
|
-
|
|
1536
|
+
S(this, "plugins");
|
|
1537
|
+
S(this, "sidebars");
|
|
1538
|
+
S(this, "topNavigation");
|
|
1539
|
+
S(this, "meta");
|
|
1540
|
+
S(this, "page");
|
|
1541
|
+
S(this, "authentication");
|
|
1542
|
+
S(this, "navigationPlugins");
|
|
1543
|
+
S(this, "initialize", async () => {
|
|
1478
1544
|
await Promise.all(
|
|
1479
|
-
this.plugins.filter(
|
|
1545
|
+
this.plugins.filter(ia).map((t) => {
|
|
1480
1546
|
var r;
|
|
1481
1547
|
return (r = t.initialize) == null ? void 0 : r.call(t, this);
|
|
1482
1548
|
})
|
|
1483
1549
|
);
|
|
1484
1550
|
});
|
|
1485
|
-
|
|
1486
|
-
this.plugins.filter(
|
|
1551
|
+
S(this, "getApiIdentities", async () => (await Promise.all(
|
|
1552
|
+
this.plugins.filter(ca).map((r) => r.getIdentities(this))
|
|
1487
1553
|
)).flat());
|
|
1488
|
-
|
|
1554
|
+
S(this, "getPluginSidebar", async (t) => (await Promise.all(
|
|
1489
1555
|
this.navigationPlugins.map(
|
|
1490
1556
|
(s) => {
|
|
1491
1557
|
var n;
|
|
1492
|
-
return (n = s.getSidebar) == null ? void 0 : n.call(s,
|
|
1558
|
+
return (n = s.getSidebar) == null ? void 0 : n.call(s, Q(t));
|
|
1493
1559
|
}
|
|
1494
1560
|
)
|
|
1495
1561
|
)).flatMap((s) => s ?? []));
|
|
1496
|
-
|
|
1562
|
+
S(this, "signRequest", async (t) => {
|
|
1497
1563
|
if (!this.authentication)
|
|
1498
1564
|
throw new Error("No authentication provider configured");
|
|
1499
1565
|
const r = await this.authentication.getAccessToken();
|
|
1500
1566
|
return t.headers.set("Authorization", `Bearer ${r}`), t;
|
|
1501
1567
|
});
|
|
1502
|
-
this.plugins = t.plugins ?? [], this.topNavigation = t.topNavigation ?? [], this.sidebars = t.sidebars ?? {}, this.navigationPlugins = this.plugins.filter(
|
|
1568
|
+
this.plugins = t.plugins ?? [], this.topNavigation = t.topNavigation ?? [], this.sidebars = t.sidebars ?? {}, this.navigationPlugins = this.plugins.filter(sa), this.authentication = t.authentication, this.meta = t.metadata, this.page = t.page;
|
|
1503
1569
|
}
|
|
1504
1570
|
}
|
|
1505
|
-
function
|
|
1506
|
-
return /* @__PURE__ */ a.jsx(
|
|
1571
|
+
function ya({ error: e, resetErrorBoundary: t }) {
|
|
1572
|
+
return /* @__PURE__ */ a.jsx(Ue, { error: e });
|
|
1507
1573
|
}
|
|
1508
1574
|
const te = globalThis;
|
|
1509
1575
|
(!te.requestIdleCallback || !te.cancelIdleCallback) && (te.requestIdleCallback = (e) => setTimeout(e, 1), te.cancelIdleCallback = clearTimeout);
|
|
1510
|
-
const
|
|
1511
|
-
Header:
|
|
1512
|
-
},
|
|
1576
|
+
const gt = {
|
|
1577
|
+
Header: ft
|
|
1578
|
+
}, ba = Je(gt), ja = ba.Provider, wa = ({
|
|
1513
1579
|
children: e,
|
|
1514
1580
|
context: t
|
|
1515
|
-
}) => (
|
|
1581
|
+
}) => (Bt({
|
|
1516
1582
|
queryFn: async () => (await t.initialize(), !0),
|
|
1517
1583
|
queryKey: ["zudoku-initialize"]
|
|
1518
|
-
}), /* @__PURE__ */ a.jsx(
|
|
1584
|
+
}), /* @__PURE__ */ a.jsx(Ht.Provider, { value: t, children: e })), pt = Xe(
|
|
1519
1585
|
({ children: e, ...t }) => {
|
|
1520
|
-
var
|
|
1521
|
-
const r =
|
|
1522
|
-
() => ({ ...
|
|
1586
|
+
var f, h;
|
|
1587
|
+
const r = ne(
|
|
1588
|
+
() => ({ ...gt, ...t.overrides }),
|
|
1523
1589
|
[t.overrides]
|
|
1524
|
-
), s =
|
|
1525
|
-
var
|
|
1590
|
+
), s = ne(() => {
|
|
1591
|
+
var v;
|
|
1526
1592
|
return {
|
|
1527
|
-
...(t.plugins ?? []).filter(
|
|
1528
|
-
(
|
|
1593
|
+
...(t.plugins ?? []).filter(la).flatMap(
|
|
1594
|
+
(m) => m.getMdxComponents ? [m.getMdxComponents()] : []
|
|
1529
1595
|
).reduce(
|
|
1530
|
-
(
|
|
1596
|
+
(m, E) => ({ ...m, ...E }),
|
|
1531
1597
|
{}
|
|
1532
1598
|
),
|
|
1533
|
-
...
|
|
1534
|
-
...(
|
|
1599
|
+
...lr,
|
|
1600
|
+
...(v = t.mdx) == null ? void 0 : v.components
|
|
1535
1601
|
};
|
|
1536
|
-
}, [(
|
|
1602
|
+
}, [(f = t.mdx) == null ? void 0 : f.components, t.plugins]), { stagger: n } = Zt(ue), [o, i] = q(!1), u = ne(
|
|
1537
1603
|
() => o ? { stagger: !0 } : { stagger: n },
|
|
1538
1604
|
[n, o]
|
|
1539
|
-
),
|
|
1540
|
-
|
|
1605
|
+
), d = be();
|
|
1606
|
+
L(() => {
|
|
1541
1607
|
o || i(!0);
|
|
1542
|
-
}, [o,
|
|
1543
|
-
const [
|
|
1544
|
-
var
|
|
1545
|
-
return /* @__PURE__ */ a.jsx(
|
|
1608
|
+
}, [o, d.location]);
|
|
1609
|
+
const [l] = q(() => new xa(t)), p = (h = t.plugins) == null ? void 0 : h.filter(oa).map((g, v) => {
|
|
1610
|
+
var m;
|
|
1611
|
+
return /* @__PURE__ */ a.jsx(Yt, { children: (m = g.getHead) == null ? void 0 : m.call(g) }, v);
|
|
1546
1612
|
});
|
|
1547
1613
|
return /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
|
|
1548
|
-
/* @__PURE__ */ a.jsx(
|
|
1549
|
-
/* @__PURE__ */ a.jsx(
|
|
1614
|
+
/* @__PURE__ */ a.jsx(me, { children: p }),
|
|
1615
|
+
/* @__PURE__ */ a.jsx(ue.Provider, { value: u, children: /* @__PURE__ */ a.jsx(wa, { context: l, children: /* @__PURE__ */ a.jsx(wt, { components: s, children: /* @__PURE__ */ a.jsx(wr, { attribute: "class", disableTransitionOnChange: !0, children: /* @__PURE__ */ a.jsx(ja, { value: r, children: /* @__PURE__ */ a.jsx(kt, { slotlets: t.slotlets, children: /* @__PURE__ */ a.jsx(cr, { children: e ?? /* @__PURE__ */ a.jsx(Ge, {}) }) }) }) }) }) }) })
|
|
1550
1616
|
] });
|
|
1551
1617
|
}
|
|
1552
1618
|
);
|
|
1553
|
-
|
|
1554
|
-
const
|
|
1555
|
-
|
|
1556
|
-
const
|
|
1619
|
+
pt.displayName = "ZudokoInner";
|
|
1620
|
+
const vt = (e) => /* @__PURE__ */ a.jsx(pa, { FallbackComponent: ya, children: /* @__PURE__ */ a.jsx(pt, { ...e }) });
|
|
1621
|
+
vt.displayName = "Zudoku";
|
|
1622
|
+
const Wa = St, Xa = ma, Ja = At, Ga = Er, es = Yr, ts = Wr, rs = me, as = F, ss = Ct, ns = vt, is = Ot, os = je, ls = Dt, cs = ge;
|
|
1557
1623
|
export {
|
|
1558
|
-
|
|
1559
|
-
|
|
1560
|
-
|
|
1561
|
-
|
|
1562
|
-
|
|
1563
|
-
|
|
1564
|
-
|
|
1565
|
-
|
|
1566
|
-
|
|
1567
|
-
|
|
1568
|
-
|
|
1569
|
-
|
|
1570
|
-
|
|
1571
|
-
|
|
1624
|
+
es as Bootstrap,
|
|
1625
|
+
ts as BootstrapStatic,
|
|
1626
|
+
ls as Button,
|
|
1627
|
+
is as Callout,
|
|
1628
|
+
os as ClientOnly,
|
|
1629
|
+
rs as Head,
|
|
1630
|
+
Xa as Layout,
|
|
1631
|
+
cs as Link,
|
|
1632
|
+
Ja as RouterError,
|
|
1633
|
+
Ga as ServerError,
|
|
1634
|
+
ns as Zudoku,
|
|
1635
|
+
ss as useAuth,
|
|
1636
|
+
Wa as useMDXComponents,
|
|
1637
|
+
as as useZudoku
|
|
1572
1638
|
};
|
|
1573
1639
|
//# sourceMappingURL=zudoku.components.js.map
|