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