zudoku 0.28.0 → 0.28.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/app/main.js +1 -2
- package/dist/app/main.js.map +1 -1
- package/dist/config/validators/InputSidebarSchema.d.ts +2 -2
- package/dist/lib/components/PathRenderer.d.ts +11 -0
- package/dist/lib/components/PathRenderer.js +25 -0
- package/dist/lib/components/PathRenderer.js.map +1 -0
- package/dist/lib/components/ThemeSwitch.js +4 -4
- package/dist/lib/components/ThemeSwitch.js.map +1 -1
- package/dist/lib/components/index.d.ts +1 -0
- package/dist/lib/components/index.js +4 -2
- package/dist/lib/components/index.js.map +1 -1
- package/dist/lib/components/navigation/SidebarCategory.js +16 -14
- package/dist/lib/components/navigation/SidebarCategory.js.map +1 -1
- package/dist/lib/oas/graphql/circular.js +17 -6
- package/dist/lib/oas/graphql/circular.js.map +1 -1
- package/dist/lib/plugins/openapi/ColorizedParam.js +3 -1
- package/dist/lib/plugins/openapi/ColorizedParam.js.map +1 -1
- package/dist/lib/plugins/openapi/OperationListItem.js +1 -1
- package/dist/lib/plugins/openapi/OperationListItem.js.map +1 -1
- package/dist/lib/plugins/openapi/ParameterListItem.js +1 -1
- package/dist/lib/plugins/openapi/ParameterListItem.js.map +1 -1
- package/dist/lib/plugins/openapi/Sidecar.js +5 -10
- package/dist/lib/plugins/openapi/Sidecar.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/PathParams.js +1 -1
- package/dist/lib/plugins/openapi/playground/PathParams.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/Playground.js +7 -15
- package/dist/lib/plugins/openapi/playground/Playground.js.map +1 -1
- package/dist/lib/plugins/openapi/schema/{SchemaComponents.js → SchemaPropertyItem.js} +10 -8
- package/dist/lib/plugins/openapi/schema/SchemaPropertyItem.js.map +1 -0
- package/dist/lib/plugins/openapi/schema/SchemaView.js +1 -1
- package/dist/lib/plugins/openapi/schema/SchemaView.js.map +1 -1
- package/dist/lib/plugins/openapi/schema/utils.d.ts +1 -0
- package/dist/lib/plugins/openapi/schema/utils.js +2 -0
- package/dist/lib/plugins/openapi/schema/utils.js.map +1 -1
- package/dist/vite/plugin-api.js +4 -2
- package/dist/vite/plugin-api.js.map +1 -1
- package/dist/vite/prerender.js +0 -1
- package/dist/vite/prerender.js.map +1 -1
- package/lib/{MdxPage-DewragjB.js → MdxPage-BuG8Tuwc.js} +2 -2
- package/lib/{MdxPage-DewragjB.js.map → MdxPage-BuG8Tuwc.js.map} +1 -1
- package/lib/{OperationList-D_ejrepA.js → OperationList-CDt1xdc4.js} +978 -970
- package/lib/OperationList-CDt1xdc4.js.map +1 -0
- package/lib/{circular-Dgpd6AN-.js → circular-DxaIIlWD.js} +251 -239
- package/lib/{circular-Dgpd6AN-.js.map → circular-DxaIIlWD.js.map} +1 -1
- package/lib/{createServer-BydbkTsd.js → createServer-CjNktZzL.js} +2 -2
- package/lib/{createServer-BydbkTsd.js.map → createServer-CjNktZzL.js.map} +1 -1
- package/lib/{index-DGugJOLc.js → index-Eb1oiHbM.js} +583 -560
- package/lib/index-Eb1oiHbM.js.map +1 -0
- package/lib/{useScrollToAnchor-eRM9tVvD.js → useScrollToAnchor-BZsGmBng.js} +84 -89
- package/lib/useScrollToAnchor-BZsGmBng.js.map +1 -0
- package/lib/zudoku.components.js +334 -317
- package/lib/zudoku.components.js.map +1 -1
- package/lib/zudoku.plugin-markdown.js +1 -1
- package/lib/zudoku.plugin-openapi.js +1 -1
- package/package.json +1 -1
- package/src/app/main.tsx +1 -2
- package/src/lib/components/PathRenderer.tsx +59 -0
- package/src/lib/components/ThemeSwitch.tsx +15 -14
- package/src/lib/components/index.ts +7 -5
- package/src/lib/components/navigation/SidebarCategory.tsx +43 -41
- package/src/lib/oas/graphql/circular.ts +27 -6
- package/src/lib/plugins/openapi/ColorizedParam.tsx +3 -3
- package/src/lib/plugins/openapi/OperationListItem.tsx +6 -1
- package/src/lib/plugins/openapi/ParameterListItem.tsx +1 -1
- package/src/lib/plugins/openapi/Sidecar.tsx +17 -26
- package/src/lib/plugins/openapi/playground/PathParams.tsx +1 -1
- package/src/lib/plugins/openapi/playground/Playground.tsx +23 -33
- package/src/lib/plugins/openapi/schema/{SchemaComponents.tsx → SchemaPropertyItem.tsx} +10 -6
- package/src/lib/plugins/openapi/schema/SchemaView.tsx +4 -1
- package/src/lib/plugins/openapi/schema/utils.ts +4 -0
- package/dist/lib/plugins/openapi/schema/SchemaComponents.js.map +0 -1
- package/lib/OperationList-D_ejrepA.js.map +0 -1
- package/lib/index-DGugJOLc.js.map +0 -1
- package/lib/useScrollToAnchor-eRM9tVvD.js.map +0 -1
- /package/dist/lib/plugins/openapi/schema/{SchemaComponents.d.ts → SchemaPropertyItem.d.ts} +0 -0
package/lib/zudoku.components.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
1
|
+
var lt = Object.defineProperty;
|
|
2
|
+
var xe = (t) => {
|
|
3
3
|
throw TypeError(t);
|
|
4
4
|
};
|
|
5
|
-
var
|
|
6
|
-
var P = (t, e, n) =>
|
|
7
|
-
var l = (t, e, n) => (
|
|
5
|
+
var ct = (t, e, n) => e in t ? lt(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n;
|
|
6
|
+
var P = (t, e, n) => ct(t, typeof e != "symbol" ? e + "" : e, n), ye = (t, e, n) => e.has(t) || xe("Cannot " + n);
|
|
7
|
+
var l = (t, e, n) => (ye(t, e, "read from private field"), n ? n.call(t) : e.get(t)), j = (t, e, n) => e.has(t) ? xe("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(t) : e.set(t, n), y = (t, e, n, s) => (ye(t, e, "write to private field"), s ? s.call(t, n) : e.set(t, n), n);
|
|
8
8
|
var _ = (t, e, n, s) => ({
|
|
9
9
|
set _(a) {
|
|
10
10
|
y(t, e, a, n);
|
|
@@ -13,47 +13,47 @@ var _ = (t, e, n, s) => ({
|
|
|
13
13
|
return l(t, e, s);
|
|
14
14
|
}
|
|
15
15
|
});
|
|
16
|
-
import { a as
|
|
17
|
-
import {
|
|
18
|
-
import { M as
|
|
19
|
-
import { E as Re, S as M, a as ft, R as gt } from "./SlotletProvider-mQiPDQIH.js";
|
|
16
|
+
import { a as Re, H as ie } from "./index.esm-9-TF9KQB.js";
|
|
17
|
+
import { u as oe, m as ut, O as le, R as dt, S as ht, h as ce, N as ft, L as ue } from "./chunk-SYFQ2XB5-BPvC-soB.js";
|
|
18
|
+
import { M as gt, u as z } from "./hook-FT3SJLe_.js";
|
|
20
19
|
import { j as r } from "./jsx-runtime-Bdg6XQ1m.js";
|
|
21
|
-
import
|
|
22
|
-
import {
|
|
23
|
-
import { S as
|
|
24
|
-
import
|
|
25
|
-
import
|
|
26
|
-
import
|
|
27
|
-
import {
|
|
28
|
-
import
|
|
29
|
-
import {
|
|
30
|
-
import {
|
|
31
|
-
import {
|
|
32
|
-
import {
|
|
33
|
-
import {
|
|
34
|
-
import {
|
|
35
|
-
import {
|
|
36
|
-
import {
|
|
37
|
-
import {
|
|
38
|
-
import {
|
|
39
|
-
import {
|
|
40
|
-
|
|
20
|
+
import * as $ from "react";
|
|
21
|
+
import mt, { useEffect as B, createContext as de, StrictMode as Fe, useRef as he, useState as H, useCallback as pt, Suspense as fe, memo as ze, forwardRef as xt, Component as yt, createElement as ve, useMemo as te, useContext as vt, Fragment as bt } from "react";
|
|
22
|
+
import { S as Be, m as He, Q as jt, n as w, o as be, p as je, q as N, r as wt, t as Pt, v as Ct, w as kt, x as we, y as Pe, z as St, h as Ce, A as ke, B as Dt, e as Mt, a as E, C as Le, D as Ke, E as Nt, j as re, u as Ot, Z as Et, F as At, G as Qt } from "./ZudokuContext-BTUJPpQl.js";
|
|
23
|
+
import { Z as $e } from "./invariant-Caa8-XvF.js";
|
|
24
|
+
import { E as Ze, S as M, a as It, R as Tt } from "./SlotletProvider-mQiPDQIH.js";
|
|
25
|
+
import { Button as qt } from "./ui/Button.js";
|
|
26
|
+
import { Callout as Rt } from "./ui/Callout.js";
|
|
27
|
+
import * as Ft from "react-dom";
|
|
28
|
+
import { C as ge } from "./ClientOnly-E7hGysn1.js";
|
|
29
|
+
import { CircleXIcon as zt, SearchIcon as Bt, MoonStarIcon as Ht, SunIcon as Lt, MenuIcon as Kt, PanelLeftIcon as $t } from "lucide-react";
|
|
30
|
+
import { Drawer as Ue, DrawerTrigger as Ye, DrawerContent as Xe, DrawerTitle as Ve } from "./ui/Drawer.js";
|
|
31
|
+
import { c as U } from "./cn-qaFjX9_3.js";
|
|
32
|
+
import { S as Se, a as Zt, M as Ut, u as Yt } from "./useScrollToAnchor-BZsGmBng.js";
|
|
33
|
+
import { u as Xt, a as Vt, V as _t, M as Wt } from "./Markdown-Cyrx_JrO.js";
|
|
34
|
+
import { B as ee, S as _e } from "./Spinner-BlzrEEk1.js";
|
|
35
|
+
import { DropdownMenu as Gt, DropdownMenuTrigger as Jt, DropdownMenuContent as en, DropdownMenuLabel as tn, DropdownMenuSeparator as ne, DropdownMenuSub as nn, DropdownMenuSubTrigger as sn, DropdownMenuPortal as rn, DropdownMenuSubContent as an, DropdownMenuItem as on } from "./ui/DropdownMenu.js";
|
|
36
|
+
import { j as De } from "./joinUrl-nLx9pD-Z.js";
|
|
37
|
+
import { VisuallyHidden as We } from "@radix-ui/react-visually-hidden";
|
|
38
|
+
import { z as ln, J as cn } from "./SyntaxHighlight-B0L4SC_N.js";
|
|
39
|
+
import { a as un } from "./index-Djenk2Hj.js";
|
|
40
|
+
var D, Ie, dn = (Ie = class extends Be {
|
|
41
41
|
constructor(e = {}) {
|
|
42
42
|
super();
|
|
43
43
|
j(this, D);
|
|
44
44
|
this.config = e, y(this, D, /* @__PURE__ */ new Map());
|
|
45
45
|
}
|
|
46
46
|
build(e, n, s) {
|
|
47
|
-
const a = n.queryKey,
|
|
48
|
-
let
|
|
49
|
-
return
|
|
47
|
+
const a = n.queryKey, i = n.queryHash ?? He(a, n);
|
|
48
|
+
let o = this.get(i);
|
|
49
|
+
return o || (o = new jt({
|
|
50
50
|
cache: this,
|
|
51
51
|
queryKey: a,
|
|
52
|
-
queryHash:
|
|
52
|
+
queryHash: i,
|
|
53
53
|
options: e.defaultQueryOptions(n),
|
|
54
54
|
state: s,
|
|
55
55
|
defaultOptions: e.getQueryDefaults(a)
|
|
56
|
-
}), this.add(
|
|
56
|
+
}), this.add(o)), o;
|
|
57
57
|
}
|
|
58
58
|
add(e) {
|
|
59
59
|
l(this, D).has(e.queryHash) || (l(this, D).set(e.queryHash, e), this.notify({
|
|
@@ -81,12 +81,12 @@ var D, Ee, un = (Ee = class extends Fe {
|
|
|
81
81
|
find(e) {
|
|
82
82
|
const n = { exact: !0, ...e };
|
|
83
83
|
return this.getAll().find(
|
|
84
|
-
(s) =>
|
|
84
|
+
(s) => be(n, s)
|
|
85
85
|
);
|
|
86
86
|
}
|
|
87
87
|
findAll(e = {}) {
|
|
88
88
|
const n = this.getAll();
|
|
89
|
-
return Object.keys(e).length > 0 ? n.filter((s) =>
|
|
89
|
+
return Object.keys(e).length > 0 ? n.filter((s) => be(e, s)) : n;
|
|
90
90
|
}
|
|
91
91
|
notify(e) {
|
|
92
92
|
w.batch(() => {
|
|
@@ -109,16 +109,16 @@ var D, Ee, un = (Ee = class extends Fe {
|
|
|
109
109
|
});
|
|
110
110
|
});
|
|
111
111
|
}
|
|
112
|
-
}, D = new WeakMap(),
|
|
112
|
+
}, D = new WeakMap(), Ie), O, k, Y, Te, hn = (Te = class extends Be {
|
|
113
113
|
constructor(e = {}) {
|
|
114
114
|
super();
|
|
115
115
|
j(this, O);
|
|
116
|
-
j(this,
|
|
116
|
+
j(this, k);
|
|
117
117
|
j(this, Y);
|
|
118
|
-
this.config = e, y(this, O, /* @__PURE__ */ new Set()), y(this,
|
|
118
|
+
this.config = e, y(this, O, /* @__PURE__ */ new Set()), y(this, k, /* @__PURE__ */ new Map()), y(this, Y, 0);
|
|
119
119
|
}
|
|
120
120
|
build(e, n, s) {
|
|
121
|
-
const a = new
|
|
121
|
+
const a = new gt({
|
|
122
122
|
mutationCache: this,
|
|
123
123
|
mutationId: ++_(this, Y)._,
|
|
124
124
|
options: e.defaultMutationOptions(n),
|
|
@@ -130,8 +130,8 @@ var D, Ee, un = (Ee = class extends Fe {
|
|
|
130
130
|
l(this, O).add(e);
|
|
131
131
|
const n = W(e);
|
|
132
132
|
if (typeof n == "string") {
|
|
133
|
-
const s = l(this,
|
|
134
|
-
s ? s.push(e) : l(this,
|
|
133
|
+
const s = l(this, k).get(n);
|
|
134
|
+
s ? s.push(e) : l(this, k).set(n, [e]);
|
|
135
135
|
}
|
|
136
136
|
this.notify({ type: "added", mutation: e });
|
|
137
137
|
}
|
|
@@ -139,12 +139,12 @@ var D, Ee, un = (Ee = class extends Fe {
|
|
|
139
139
|
if (l(this, O).delete(e)) {
|
|
140
140
|
const n = W(e);
|
|
141
141
|
if (typeof n == "string") {
|
|
142
|
-
const s = l(this,
|
|
142
|
+
const s = l(this, k).get(n);
|
|
143
143
|
if (s)
|
|
144
144
|
if (s.length > 1) {
|
|
145
145
|
const a = s.indexOf(e);
|
|
146
146
|
a !== -1 && s.splice(a, 1);
|
|
147
|
-
} else s[0] === e && l(this,
|
|
147
|
+
} else s[0] === e && l(this, k).delete(n);
|
|
148
148
|
}
|
|
149
149
|
}
|
|
150
150
|
this.notify({ type: "removed", mutation: e });
|
|
@@ -152,8 +152,8 @@ var D, Ee, un = (Ee = class extends Fe {
|
|
|
152
152
|
canRun(e) {
|
|
153
153
|
const n = W(e);
|
|
154
154
|
if (typeof n == "string") {
|
|
155
|
-
const s = l(this,
|
|
156
|
-
(
|
|
155
|
+
const s = l(this, k).get(n), a = s == null ? void 0 : s.find(
|
|
156
|
+
(i) => i.state.status === "pending"
|
|
157
157
|
);
|
|
158
158
|
return !a || a === e;
|
|
159
159
|
} else
|
|
@@ -163,7 +163,7 @@ var D, Ee, un = (Ee = class extends Fe {
|
|
|
163
163
|
var s;
|
|
164
164
|
const n = W(e);
|
|
165
165
|
if (typeof n == "string") {
|
|
166
|
-
const a = (s = l(this,
|
|
166
|
+
const a = (s = l(this, k).get(n)) == null ? void 0 : s.find((i) => i !== e && i.state.isPaused);
|
|
167
167
|
return (a == null ? void 0 : a.continue()) ?? Promise.resolve();
|
|
168
168
|
} else
|
|
169
169
|
return Promise.resolve();
|
|
@@ -172,7 +172,7 @@ var D, Ee, un = (Ee = class extends Fe {
|
|
|
172
172
|
w.batch(() => {
|
|
173
173
|
l(this, O).forEach((e) => {
|
|
174
174
|
this.notify({ type: "removed", mutation: e });
|
|
175
|
-
}), l(this, O).clear(), l(this,
|
|
175
|
+
}), l(this, O).clear(), l(this, k).clear();
|
|
176
176
|
});
|
|
177
177
|
}
|
|
178
178
|
getAll() {
|
|
@@ -181,11 +181,11 @@ var D, Ee, un = (Ee = class extends Fe {
|
|
|
181
181
|
find(e) {
|
|
182
182
|
const n = { exact: !0, ...e };
|
|
183
183
|
return this.getAll().find(
|
|
184
|
-
(s) =>
|
|
184
|
+
(s) => je(n, s)
|
|
185
185
|
);
|
|
186
186
|
}
|
|
187
187
|
findAll(e = {}) {
|
|
188
|
-
return this.getAll().filter((n) =>
|
|
188
|
+
return this.getAll().filter((n) => je(e, n));
|
|
189
189
|
}
|
|
190
190
|
notify(e) {
|
|
191
191
|
w.batch(() => {
|
|
@@ -202,16 +202,16 @@ var D, Ee, un = (Ee = class extends Fe {
|
|
|
202
202
|
)
|
|
203
203
|
);
|
|
204
204
|
}
|
|
205
|
-
}, O = new WeakMap(),
|
|
205
|
+
}, O = new WeakMap(), k = new WeakMap(), Y = new WeakMap(), Te);
|
|
206
206
|
function W(t) {
|
|
207
207
|
var e;
|
|
208
208
|
return (e = t.options.scope) == null ? void 0 : e.id;
|
|
209
209
|
}
|
|
210
|
-
function
|
|
210
|
+
function Me(t) {
|
|
211
211
|
return {
|
|
212
212
|
onFetch: (e, n) => {
|
|
213
213
|
var g, f, h, x, v;
|
|
214
|
-
const s = e.options, a = (h = (f = (g = e.fetchOptions) == null ? void 0 : g.meta) == null ? void 0 : f.fetchMore) == null ? void 0 : h.direction,
|
|
214
|
+
const s = e.options, a = (h = (f = (g = e.fetchOptions) == null ? void 0 : g.meta) == null ? void 0 : f.fetchMore) == null ? void 0 : h.direction, i = ((x = e.state.data) == null ? void 0 : x.pages) || [], o = ((v = e.state.data) == null ? void 0 : v.pageParams) || [];
|
|
215
215
|
let u = { pages: [], pageParams: [] }, d = 0;
|
|
216
216
|
const c = async () => {
|
|
217
217
|
let m = !1;
|
|
@@ -222,39 +222,39 @@ function Se(t) {
|
|
|
222
222
|
m = !0;
|
|
223
223
|
}), e.signal)
|
|
224
224
|
});
|
|
225
|
-
}, X =
|
|
225
|
+
}, X = wt(e.options, e.fetchOptions), L = async (b, S, K) => {
|
|
226
226
|
if (m)
|
|
227
227
|
return Promise.reject();
|
|
228
|
-
if (
|
|
228
|
+
if (S == null && b.pages.length)
|
|
229
229
|
return Promise.resolve(b);
|
|
230
230
|
const V = {
|
|
231
231
|
queryKey: e.queryKey,
|
|
232
|
-
pageParam:
|
|
233
|
-
direction:
|
|
232
|
+
pageParam: S,
|
|
233
|
+
direction: K ? "backward" : "forward",
|
|
234
234
|
meta: e.options.meta
|
|
235
235
|
};
|
|
236
236
|
C(V);
|
|
237
|
-
const
|
|
237
|
+
const ot = await X(
|
|
238
238
|
V
|
|
239
|
-
), { maxPages:
|
|
239
|
+
), { maxPages: me } = e.options, pe = K ? Pt : Ct;
|
|
240
240
|
return {
|
|
241
|
-
pages:
|
|
242
|
-
pageParams:
|
|
241
|
+
pages: pe(b.pages, ot, me),
|
|
242
|
+
pageParams: pe(b.pageParams, S, me)
|
|
243
243
|
};
|
|
244
244
|
};
|
|
245
|
-
if (a &&
|
|
246
|
-
const b = a === "backward",
|
|
247
|
-
pages:
|
|
248
|
-
pageParams:
|
|
249
|
-
}, V =
|
|
250
|
-
u = await
|
|
245
|
+
if (a && i.length) {
|
|
246
|
+
const b = a === "backward", S = b ? fn : Ne, K = {
|
|
247
|
+
pages: i,
|
|
248
|
+
pageParams: o
|
|
249
|
+
}, V = S(s, K);
|
|
250
|
+
u = await L(K, V, b);
|
|
251
251
|
} else {
|
|
252
|
-
const b = t ??
|
|
252
|
+
const b = t ?? i.length;
|
|
253
253
|
do {
|
|
254
|
-
const
|
|
255
|
-
if (d > 0 &&
|
|
254
|
+
const S = d === 0 ? o[0] ?? s.initialPageParam : Ne(s, u);
|
|
255
|
+
if (d > 0 && S == null)
|
|
256
256
|
break;
|
|
257
|
-
u = await
|
|
257
|
+
u = await L(u, S), d++;
|
|
258
258
|
} while (d < b);
|
|
259
259
|
}
|
|
260
260
|
return u;
|
|
@@ -275,7 +275,7 @@ function Se(t) {
|
|
|
275
275
|
}
|
|
276
276
|
};
|
|
277
277
|
}
|
|
278
|
-
function
|
|
278
|
+
function Ne(t, { pages: e, pageParams: n }) {
|
|
279
279
|
const s = e.length - 1;
|
|
280
280
|
return e.length > 0 ? t.getNextPageParam(
|
|
281
281
|
e[s],
|
|
@@ -284,38 +284,38 @@ function ke(t, { pages: e, pageParams: n }) {
|
|
|
284
284
|
n
|
|
285
285
|
) : void 0;
|
|
286
286
|
}
|
|
287
|
-
function
|
|
287
|
+
function fn(t, { pages: e, pageParams: n }) {
|
|
288
288
|
var s;
|
|
289
289
|
return e.length > 0 ? (s = t.getPreviousPageParam) == null ? void 0 : s.call(t, e[0], e, n[0], n) : void 0;
|
|
290
290
|
}
|
|
291
|
-
var p,
|
|
291
|
+
var p, A, Q, T, q, I, R, F, qe, gn = (qe = class {
|
|
292
292
|
constructor(t = {}) {
|
|
293
293
|
j(this, p);
|
|
294
|
-
j(this, E);
|
|
295
294
|
j(this, A);
|
|
295
|
+
j(this, Q);
|
|
296
296
|
j(this, T);
|
|
297
297
|
j(this, q);
|
|
298
|
-
j(this,
|
|
298
|
+
j(this, I);
|
|
299
299
|
j(this, R);
|
|
300
300
|
j(this, F);
|
|
301
|
-
y(this, p, t.queryCache || new
|
|
301
|
+
y(this, p, t.queryCache || new dn()), y(this, A, t.mutationCache || new hn()), y(this, Q, t.defaultOptions || {}), y(this, T, /* @__PURE__ */ new Map()), y(this, q, /* @__PURE__ */ new Map()), y(this, I, 0);
|
|
302
302
|
}
|
|
303
303
|
mount() {
|
|
304
|
-
_(this,
|
|
304
|
+
_(this, I)._++, l(this, I) === 1 && (y(this, R, kt.subscribe(async (t) => {
|
|
305
305
|
t && (await this.resumePausedMutations(), l(this, p).onFocus());
|
|
306
|
-
})), y(this, F,
|
|
306
|
+
})), y(this, F, we.subscribe(async (t) => {
|
|
307
307
|
t && (await this.resumePausedMutations(), l(this, p).onOnline());
|
|
308
308
|
})));
|
|
309
309
|
}
|
|
310
310
|
unmount() {
|
|
311
311
|
var t, e;
|
|
312
|
-
_(this,
|
|
312
|
+
_(this, I)._--, l(this, I) === 0 && ((t = l(this, R)) == null || t.call(this), y(this, R, void 0), (e = l(this, F)) == null || e.call(this), y(this, F, void 0));
|
|
313
313
|
}
|
|
314
314
|
isFetching(t) {
|
|
315
315
|
return l(this, p).findAll({ ...t, fetchStatus: "fetching" }).length;
|
|
316
316
|
}
|
|
317
317
|
isMutating(t) {
|
|
318
|
-
return l(this,
|
|
318
|
+
return l(this, A).findAll({ ...t, status: "pending" }).length;
|
|
319
319
|
}
|
|
320
320
|
getQueryData(t) {
|
|
321
321
|
var n;
|
|
@@ -324,7 +324,7 @@ var p, E, A, T, q, Q, R, F, Qe, fn = (Qe = class {
|
|
|
324
324
|
}
|
|
325
325
|
ensureQueryData(t) {
|
|
326
326
|
const e = this.defaultQueryOptions(t), n = l(this, p).build(this, e), s = n.state.data;
|
|
327
|
-
return s === void 0 ? this.fetchQuery(t) : (t.revalidateIfStale && n.isStaleByTime(
|
|
327
|
+
return s === void 0 ? this.fetchQuery(t) : (t.revalidateIfStale && n.isStaleByTime(Pe(e.staleTime, n)) && this.prefetchQuery(e), Promise.resolve(s));
|
|
328
328
|
}
|
|
329
329
|
getQueriesData(t) {
|
|
330
330
|
return l(this, p).findAll(t).map(({ queryKey: e, state: n }) => {
|
|
@@ -335,9 +335,9 @@ var p, E, A, T, q, Q, R, F, Qe, fn = (Qe = class {
|
|
|
335
335
|
setQueryData(t, e, n) {
|
|
336
336
|
const s = this.defaultQueryOptions({ queryKey: t }), a = l(this, p).get(
|
|
337
337
|
s.queryHash
|
|
338
|
-
),
|
|
339
|
-
if (
|
|
340
|
-
return l(this, p).build(this, s).setData(
|
|
338
|
+
), i = a == null ? void 0 : a.state.data, o = St(e, i);
|
|
339
|
+
if (o !== void 0)
|
|
340
|
+
return l(this, p).build(this, s).setData(o, { ...n, manual: !0 });
|
|
341
341
|
}
|
|
342
342
|
setQueriesData(t, e, n) {
|
|
343
343
|
return w.batch(
|
|
@@ -396,8 +396,8 @@ var p, E, A, T, q, Q, R, F, Qe, fn = (Qe = class {
|
|
|
396
396
|
cancelRefetch: e.cancelRefetch ?? !0
|
|
397
397
|
}, s = w.batch(
|
|
398
398
|
() => l(this, p).findAll(t).filter((a) => !a.isDisabled()).map((a) => {
|
|
399
|
-
let
|
|
400
|
-
return n.throwOnError || (
|
|
399
|
+
let i = a.fetch(void 0, n);
|
|
400
|
+
return n.throwOnError || (i = i.catch(N)), a.state.fetchStatus === "paused" ? Promise.resolve() : i;
|
|
401
401
|
})
|
|
402
402
|
);
|
|
403
403
|
return Promise.all(s).then(N);
|
|
@@ -407,38 +407,38 @@ var p, E, A, T, q, Q, R, F, Qe, fn = (Qe = class {
|
|
|
407
407
|
e.retry === void 0 && (e.retry = !1);
|
|
408
408
|
const n = l(this, p).build(this, e);
|
|
409
409
|
return n.isStaleByTime(
|
|
410
|
-
|
|
410
|
+
Pe(e.staleTime, n)
|
|
411
411
|
) ? n.fetch(e) : Promise.resolve(n.state.data);
|
|
412
412
|
}
|
|
413
413
|
prefetchQuery(t) {
|
|
414
414
|
return this.fetchQuery(t).then(N).catch(N);
|
|
415
415
|
}
|
|
416
416
|
fetchInfiniteQuery(t) {
|
|
417
|
-
return t.behavior =
|
|
417
|
+
return t.behavior = Me(t.pages), this.fetchQuery(t);
|
|
418
418
|
}
|
|
419
419
|
prefetchInfiniteQuery(t) {
|
|
420
420
|
return this.fetchInfiniteQuery(t).then(N).catch(N);
|
|
421
421
|
}
|
|
422
422
|
ensureInfiniteQueryData(t) {
|
|
423
|
-
return t.behavior =
|
|
423
|
+
return t.behavior = Me(t.pages), this.ensureQueryData(t);
|
|
424
424
|
}
|
|
425
425
|
resumePausedMutations() {
|
|
426
|
-
return
|
|
426
|
+
return we.isOnline() ? l(this, A).resumePausedMutations() : Promise.resolve();
|
|
427
427
|
}
|
|
428
428
|
getQueryCache() {
|
|
429
429
|
return l(this, p);
|
|
430
430
|
}
|
|
431
431
|
getMutationCache() {
|
|
432
|
-
return l(this,
|
|
432
|
+
return l(this, A);
|
|
433
433
|
}
|
|
434
434
|
getDefaultOptions() {
|
|
435
|
-
return l(this,
|
|
435
|
+
return l(this, Q);
|
|
436
436
|
}
|
|
437
437
|
setDefaultOptions(t) {
|
|
438
|
-
y(this,
|
|
438
|
+
y(this, Q, t);
|
|
439
439
|
}
|
|
440
440
|
setQueryDefaults(t, e) {
|
|
441
|
-
l(this, T).set(
|
|
441
|
+
l(this, T).set(Ce(t), {
|
|
442
442
|
queryKey: t,
|
|
443
443
|
defaultOptions: e
|
|
444
444
|
});
|
|
@@ -446,11 +446,11 @@ var p, E, A, T, q, Q, R, F, Qe, fn = (Qe = class {
|
|
|
446
446
|
getQueryDefaults(t) {
|
|
447
447
|
const e = [...l(this, T).values()], n = {};
|
|
448
448
|
return e.forEach((s) => {
|
|
449
|
-
|
|
449
|
+
ke(t, s.queryKey) && Object.assign(n, s.defaultOptions);
|
|
450
450
|
}), n;
|
|
451
451
|
}
|
|
452
452
|
setMutationDefaults(t, e) {
|
|
453
|
-
l(this, q).set(
|
|
453
|
+
l(this, q).set(Ce(t), {
|
|
454
454
|
mutationKey: t,
|
|
455
455
|
defaultOptions: e
|
|
456
456
|
});
|
|
@@ -459,44 +459,44 @@ var p, E, A, T, q, Q, R, F, Qe, fn = (Qe = class {
|
|
|
459
459
|
const e = [...l(this, q).values()];
|
|
460
460
|
let n = {};
|
|
461
461
|
return e.forEach((s) => {
|
|
462
|
-
|
|
462
|
+
ke(t, s.mutationKey) && (n = { ...n, ...s.defaultOptions });
|
|
463
463
|
}), n;
|
|
464
464
|
}
|
|
465
465
|
defaultQueryOptions(t) {
|
|
466
466
|
if (t._defaulted)
|
|
467
467
|
return t;
|
|
468
468
|
const e = {
|
|
469
|
-
...l(this,
|
|
469
|
+
...l(this, Q).queries,
|
|
470
470
|
...this.getQueryDefaults(t.queryKey),
|
|
471
471
|
...t,
|
|
472
472
|
_defaulted: !0
|
|
473
473
|
};
|
|
474
|
-
return e.queryHash || (e.queryHash =
|
|
474
|
+
return e.queryHash || (e.queryHash = He(
|
|
475
475
|
e.queryKey,
|
|
476
476
|
e
|
|
477
|
-
)), 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 ===
|
|
477
|
+
)), 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 === Dt && (e.enabled = !1), e;
|
|
478
478
|
}
|
|
479
479
|
defaultMutationOptions(t) {
|
|
480
480
|
return t != null && t._defaulted ? t : {
|
|
481
|
-
...l(this,
|
|
481
|
+
...l(this, Q).mutations,
|
|
482
482
|
...(t == null ? void 0 : t.mutationKey) && this.getMutationDefaults(t.mutationKey),
|
|
483
483
|
...t,
|
|
484
484
|
_defaulted: !0
|
|
485
485
|
};
|
|
486
486
|
}
|
|
487
487
|
clear() {
|
|
488
|
-
l(this, p).clear(), l(this,
|
|
488
|
+
l(this, p).clear(), l(this, A).clear();
|
|
489
489
|
}
|
|
490
|
-
}, p = new WeakMap(),
|
|
491
|
-
function
|
|
490
|
+
}, p = new WeakMap(), A = new WeakMap(), Q = new WeakMap(), T = new WeakMap(), q = new WeakMap(), I = new WeakMap(), R = new WeakMap(), F = new WeakMap(), qe);
|
|
491
|
+
function mn(t) {
|
|
492
492
|
return t;
|
|
493
493
|
}
|
|
494
|
-
function
|
|
494
|
+
function Oe(t, e, n) {
|
|
495
495
|
var d, c;
|
|
496
496
|
if (typeof e != "object" || e === null)
|
|
497
497
|
return;
|
|
498
|
-
const s = t.getMutationCache(), a = t.getQueryCache(),
|
|
499
|
-
|
|
498
|
+
const s = t.getMutationCache(), a = t.getQueryCache(), i = ((d = n == null ? void 0 : n.defaultOptions) == null ? void 0 : d.deserializeData) ?? ((c = t.getDefaultOptions().hydrate) == null ? void 0 : c.deserializeData) ?? mn, o = e.mutations || [], u = e.queries || [];
|
|
499
|
+
o.forEach(({ state: g, ...f }) => {
|
|
500
500
|
var h, x;
|
|
501
501
|
s.build(
|
|
502
502
|
t,
|
|
@@ -508,14 +508,14 @@ function De(t, e, n) {
|
|
|
508
508
|
g
|
|
509
509
|
);
|
|
510
510
|
}), u.forEach(({ queryKey: g, state: f, queryHash: h, meta: x, promise: v }) => {
|
|
511
|
-
var X,
|
|
511
|
+
var X, L;
|
|
512
512
|
let m = a.get(h);
|
|
513
|
-
const C = f.data === void 0 ? f.data :
|
|
513
|
+
const C = f.data === void 0 ? f.data : i(f.data);
|
|
514
514
|
if (m) {
|
|
515
515
|
if (m.state.dataUpdatedAt < f.dataUpdatedAt) {
|
|
516
|
-
const { fetchStatus: b, ...
|
|
516
|
+
const { fetchStatus: b, ...S } = f;
|
|
517
517
|
m.setState({
|
|
518
|
-
...
|
|
518
|
+
...S,
|
|
519
519
|
data: C
|
|
520
520
|
});
|
|
521
521
|
}
|
|
@@ -524,7 +524,7 @@ function De(t, e, n) {
|
|
|
524
524
|
t,
|
|
525
525
|
{
|
|
526
526
|
...(X = t.getDefaultOptions().hydrate) == null ? void 0 : X.queries,
|
|
527
|
-
...(
|
|
527
|
+
...(L = n == null ? void 0 : n.defaultOptions) == null ? void 0 : L.queries,
|
|
528
528
|
queryKey: g,
|
|
529
529
|
queryHash: h,
|
|
530
530
|
meta: x
|
|
@@ -538,19 +538,19 @@ function De(t, e, n) {
|
|
|
538
538
|
}
|
|
539
539
|
);
|
|
540
540
|
if (v) {
|
|
541
|
-
const b = Promise.resolve(v).then(
|
|
541
|
+
const b = Promise.resolve(v).then(i);
|
|
542
542
|
m.fetch(void 0, { initialPromise: b });
|
|
543
543
|
}
|
|
544
544
|
});
|
|
545
545
|
}
|
|
546
|
-
var
|
|
546
|
+
var pn = ({
|
|
547
547
|
children: t,
|
|
548
548
|
options: e = {},
|
|
549
549
|
state: n,
|
|
550
550
|
queryClient: s
|
|
551
551
|
}) => {
|
|
552
|
-
const a =
|
|
553
|
-
return u.current = e,
|
|
552
|
+
const a = Mt(s), [i, o] = $.useState(), u = $.useRef(e);
|
|
553
|
+
return u.current = e, $.useMemo(() => {
|
|
554
554
|
if (n) {
|
|
555
555
|
if (typeof n != "object")
|
|
556
556
|
return;
|
|
@@ -560,22 +560,39 @@ var mn = ({
|
|
|
560
560
|
if (!x)
|
|
561
561
|
g.push(h);
|
|
562
562
|
else {
|
|
563
|
-
const v = h.state.dataUpdatedAt > x.state.dataUpdatedAt, m =
|
|
563
|
+
const v = h.state.dataUpdatedAt > x.state.dataUpdatedAt, m = i == null ? void 0 : i.find(
|
|
564
564
|
(C) => C.queryHash === h.queryHash
|
|
565
565
|
);
|
|
566
566
|
v && (!m || h.state.dataUpdatedAt > m.state.dataUpdatedAt) && f.push(h);
|
|
567
567
|
}
|
|
568
568
|
}
|
|
569
|
-
g.length > 0 &&
|
|
569
|
+
g.length > 0 && Oe(a, { queries: g }, u.current), f.length > 0 && o(
|
|
570
570
|
(h) => h ? [...h, ...f] : f
|
|
571
571
|
);
|
|
572
572
|
}
|
|
573
|
-
}, [a,
|
|
574
|
-
|
|
575
|
-
}, [a,
|
|
573
|
+
}, [a, i, n]), $.useEffect(() => {
|
|
574
|
+
i && (Oe(a, { queries: i }, u.current), o(void 0));
|
|
575
|
+
}, [a, i]), t;
|
|
576
576
|
};
|
|
577
|
-
|
|
578
|
-
|
|
577
|
+
const xn = () => {
|
|
578
|
+
var a;
|
|
579
|
+
const t = z(), e = E(), n = oe(), s = (a = e.options.protectedRoutes) == null ? void 0 : a.some(
|
|
580
|
+
(i) => ut({ path: i, end: !0 }, n.pathname)
|
|
581
|
+
);
|
|
582
|
+
if (B(() => {
|
|
583
|
+
var i;
|
|
584
|
+
s && !t.isAuthenticated && ((i = e.authentication) == null || i.signIn());
|
|
585
|
+
}, [s, t.isAuthenticated, e.authentication]), s && !t.isAuthenticated)
|
|
586
|
+
return null;
|
|
587
|
+
if (s && !t.isAuthEnabled)
|
|
588
|
+
throw new $e("Authentication is not enabled", {
|
|
589
|
+
title: "Authentication is not enabled",
|
|
590
|
+
developerHint: "To use protectedRoutes you need authentication to be enabled"
|
|
591
|
+
});
|
|
592
|
+
return /* @__PURE__ */ r.jsx(le, {});
|
|
593
|
+
};
|
|
594
|
+
function yn({ error: t }) {
|
|
595
|
+
return /* @__PURE__ */ r.jsx(Ze, { error: t });
|
|
579
596
|
}
|
|
580
597
|
/**
|
|
581
598
|
* react-router v7.1.3
|
|
@@ -587,44 +604,44 @@ function pn({ error: t }) {
|
|
|
587
604
|
*
|
|
588
605
|
* @license MIT
|
|
589
606
|
*/
|
|
590
|
-
function
|
|
591
|
-
return /* @__PURE__ */
|
|
607
|
+
function vn(t) {
|
|
608
|
+
return /* @__PURE__ */ $.createElement(dt, { flushSync: Ft.flushSync, ...t });
|
|
592
609
|
}
|
|
593
|
-
const ae =
|
|
610
|
+
const ae = de({ stagger: !1 }), bn = new gn({
|
|
594
611
|
defaultOptions: {
|
|
595
612
|
queries: {
|
|
596
613
|
staleTime: 1e3 * 60 * 5
|
|
597
614
|
}
|
|
598
615
|
}
|
|
599
|
-
}),
|
|
616
|
+
}), jn = ({
|
|
600
617
|
router: t,
|
|
601
618
|
hydrate: e = !1
|
|
602
|
-
}) => /* @__PURE__ */ r.jsx(
|
|
619
|
+
}) => /* @__PURE__ */ r.jsx(Fe, { children: /* @__PURE__ */ r.jsx(Le, { client: bn, children: /* @__PURE__ */ r.jsx(pn, { state: e ? window.DATA : void 0, children: /* @__PURE__ */ r.jsx(Re, { children: /* @__PURE__ */ r.jsx(ae.Provider, { value: { stagger: !e }, children: /* @__PURE__ */ r.jsx(vn, { router: t }) }) }) }) }) }), wn = ({
|
|
603
620
|
router: t,
|
|
604
621
|
context: e,
|
|
605
622
|
queryClient: n,
|
|
606
623
|
helmetContext: s
|
|
607
|
-
}) => /* @__PURE__ */ r.jsx(
|
|
608
|
-
var
|
|
609
|
-
function
|
|
610
|
-
return
|
|
624
|
+
}) => /* @__PURE__ */ r.jsx(Fe, { children: /* @__PURE__ */ r.jsx(Le, { client: n, children: /* @__PURE__ */ r.jsx(Re, { context: s, children: /* @__PURE__ */ r.jsx(ht, { router: t, context: e }) }) }) });
|
|
625
|
+
var Z = { exports: {} }, Pn = Z.exports, Ee;
|
|
626
|
+
function Cn() {
|
|
627
|
+
return Ee || (Ee = 1, function(t, e) {
|
|
611
628
|
(function(n, s) {
|
|
612
|
-
s(e,
|
|
613
|
-
})(
|
|
629
|
+
s(e, mt);
|
|
630
|
+
})(Pn, function(n, s) {
|
|
614
631
|
const a = {
|
|
615
632
|
delay: 500,
|
|
616
633
|
minDuration: 200,
|
|
617
634
|
ssr: !0
|
|
618
635
|
};
|
|
619
|
-
function
|
|
636
|
+
function i() {
|
|
620
637
|
const [u, d] = s.useState(!0);
|
|
621
638
|
return s.useEffect(() => {
|
|
622
639
|
d(!1);
|
|
623
640
|
}, []), u;
|
|
624
641
|
}
|
|
625
|
-
function
|
|
642
|
+
function o(u, d) {
|
|
626
643
|
d = Object.assign({}, a, d);
|
|
627
|
-
const c =
|
|
644
|
+
const c = i() && d.ssr, g = c && u ? "DISPLAY" : "IDLE", [f, h] = s.useState(g), x = s.useRef(null);
|
|
628
645
|
return s.useEffect(() => {
|
|
629
646
|
if (u && (f === "IDLE" || c)) {
|
|
630
647
|
clearTimeout(x.current);
|
|
@@ -640,44 +657,44 @@ function wn() {
|
|
|
640
657
|
!u && f !== "DISPLAY" && (clearTimeout(x.current), h("IDLE"));
|
|
641
658
|
}, [u, f, d.delay, d.minDuration, c]), s.useEffect(() => () => clearTimeout(x.current), []), f === "DISPLAY" || f === "EXPIRE";
|
|
642
659
|
}
|
|
643
|
-
n.defaultOptions = a, n.useSpinDelay =
|
|
660
|
+
n.defaultOptions = a, n.useSpinDelay = o;
|
|
644
661
|
});
|
|
645
|
-
}(
|
|
662
|
+
}(Z, Z.exports)), Z.exports;
|
|
646
663
|
}
|
|
647
|
-
var
|
|
648
|
-
const
|
|
649
|
-
const t =
|
|
650
|
-
|
|
664
|
+
var kn = Cn();
|
|
665
|
+
const Sn = () => {
|
|
666
|
+
const t = oe(), e = he(t.pathname);
|
|
667
|
+
B(() => {
|
|
651
668
|
e.current !== t.pathname && (window.scrollTo(0, 0), e.current = t.pathname);
|
|
652
669
|
}, [t.pathname]);
|
|
653
670
|
};
|
|
654
|
-
function
|
|
671
|
+
function Dn({
|
|
655
672
|
className: t,
|
|
656
673
|
...e
|
|
657
674
|
}) {
|
|
658
675
|
return /* @__PURE__ */ r.jsx(
|
|
659
676
|
"div",
|
|
660
677
|
{
|
|
661
|
-
className:
|
|
678
|
+
className: U("animate-pulse rounded-md bg-muted", t),
|
|
662
679
|
...e
|
|
663
680
|
}
|
|
664
681
|
);
|
|
665
682
|
}
|
|
666
|
-
const
|
|
683
|
+
const Mn = (t) => "getProfileMenuItems" in t && typeof t.getProfileMenuItems == "function", Nn = (t) => "getRoutes" in t && typeof t.getRoutes == "function", On = (t) => "renderSearch" in t && typeof t.renderSearch == "function", En = (t) => "initialize" in t && typeof t.initialize == "function", An = (t) => "getHead" in t && typeof t.getHead == "function", Qn = (t) => "getMdxComponents" in t && typeof t.getMdxComponents == "function", In = (t) => "getIdentities" in t && typeof t.getIdentities == "function", Ae = {
|
|
667
684
|
info: "bg-blue-500",
|
|
668
685
|
note: "bg-gray-500",
|
|
669
686
|
tip: "bg-green-600",
|
|
670
687
|
caution: "bg-orange-500",
|
|
671
688
|
danger: "bg-rose-500"
|
|
672
|
-
},
|
|
673
|
-
const { page: t } =
|
|
689
|
+
}, Tn = () => {
|
|
690
|
+
const { page: t } = E(), [e, n] = H(!0);
|
|
674
691
|
if (!(t != null && t.banner) || !e)
|
|
675
692
|
return /* @__PURE__ */ r.jsx("style", { children: ":root { --banner-height: 0px; }" });
|
|
676
|
-
const s = t.banner.color && t.banner.color in
|
|
693
|
+
const s = t.banner.color && t.banner.color in Ae ? Ae[t.banner.color] : t.banner.color ? void 0 : "bg-primary", a = s ? {} : { backgroundColor: t.banner.color };
|
|
677
694
|
return /* @__PURE__ */ r.jsxs(
|
|
678
695
|
"div",
|
|
679
696
|
{
|
|
680
|
-
className:
|
|
697
|
+
className: U(
|
|
681
698
|
"relative text-primary-foreground text-sm font-medium px-4 py-2 flex gap-2 items-center",
|
|
682
699
|
s
|
|
683
700
|
),
|
|
@@ -690,26 +707,26 @@ const kn = (t) => "getProfileMenuItems" in t && typeof t.getProfileMenuItems ==
|
|
|
690
707
|
type: "button",
|
|
691
708
|
className: "md:absolute md:right-4 -m-1.5 p-1.5 hover:bg-accent-foreground/10 rounded-md",
|
|
692
709
|
onClick: () => n(!1),
|
|
693
|
-
children: /* @__PURE__ */ r.jsx(
|
|
710
|
+
children: /* @__PURE__ */ r.jsx(zt, { size: 16 })
|
|
694
711
|
}
|
|
695
712
|
)
|
|
696
713
|
]
|
|
697
714
|
}
|
|
698
715
|
);
|
|
699
|
-
},
|
|
700
|
-
const e =
|
|
701
|
-
|
|
716
|
+
}, Ge = ({ className: t }) => {
|
|
717
|
+
const e = E(), [n, s] = H(!1), a = pt(() => s(!1), []);
|
|
718
|
+
B(() => {
|
|
702
719
|
if (n)
|
|
703
720
|
return;
|
|
704
|
-
function
|
|
721
|
+
function o(u) {
|
|
705
722
|
u.key === "k" && (u.metaKey || u.ctrlKey) && (u.preventDefault(), s(!0));
|
|
706
723
|
}
|
|
707
|
-
return window.addEventListener("keydown",
|
|
708
|
-
window.removeEventListener("keydown",
|
|
724
|
+
return window.addEventListener("keydown", o), () => {
|
|
725
|
+
window.removeEventListener("keydown", o);
|
|
709
726
|
};
|
|
710
727
|
}, [n, s]);
|
|
711
|
-
const
|
|
712
|
-
return
|
|
728
|
+
const i = e.plugins.find(On);
|
|
729
|
+
return i ? /* @__PURE__ */ r.jsxs("div", { className: t, children: [
|
|
713
730
|
/* @__PURE__ */ r.jsxs(
|
|
714
731
|
"button",
|
|
715
732
|
{
|
|
@@ -718,54 +735,53 @@ const kn = (t) => "getProfileMenuItems" in t && typeof t.getProfileMenuItems ==
|
|
|
718
735
|
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",
|
|
719
736
|
children: [
|
|
720
737
|
/* @__PURE__ */ r.jsxs("div", { className: "flex items-center gap-2 flex-grow", children: [
|
|
721
|
-
/* @__PURE__ */ r.jsx(
|
|
738
|
+
/* @__PURE__ */ r.jsx(Bt, { size: 14 }),
|
|
722
739
|
"Search"
|
|
723
740
|
] }),
|
|
724
741
|
/* @__PURE__ */ r.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" })
|
|
725
742
|
]
|
|
726
743
|
}
|
|
727
744
|
),
|
|
728
|
-
/* @__PURE__ */ r.jsx(
|
|
745
|
+
/* @__PURE__ */ r.jsx(fe, { fallback: null, children: i.renderSearch({
|
|
729
746
|
isOpen: n,
|
|
730
747
|
onClose: a
|
|
731
748
|
}) })
|
|
732
749
|
] }) : null;
|
|
733
|
-
},
|
|
734
|
-
const { resolvedTheme: t, setTheme: e } =
|
|
735
|
-
return /* @__PURE__ */ r.jsx(
|
|
736
|
-
|
|
750
|
+
}, Je = () => {
|
|
751
|
+
const { resolvedTheme: t, setTheme: e } = ln(), n = t === "dark" ? Ht : Lt;
|
|
752
|
+
return /* @__PURE__ */ r.jsx(ge, { fallback: /* @__PURE__ */ r.jsx(ee, { variant: "ghost", size: "icon" }), children: /* @__PURE__ */ r.jsx(
|
|
753
|
+
ee,
|
|
737
754
|
{
|
|
738
755
|
variant: "ghost",
|
|
739
756
|
size: "icon",
|
|
740
757
|
"aria-label": t === "dark" ? "Switch to light mode" : "Switch to dark mode",
|
|
741
|
-
className: B(t ? "opacity-100" : "opacity-0"),
|
|
742
758
|
onClick: () => e(t === "dark" ? "light" : "dark"),
|
|
743
759
|
children: /* @__PURE__ */ r.jsx(n, { size: 18 })
|
|
744
760
|
}
|
|
745
|
-
);
|
|
746
|
-
},
|
|
747
|
-
const { topNavigation: t } =
|
|
748
|
-
return t.length <= 1 ? /* @__PURE__ */ r.jsx("style", { children: ":root { --top-nav-height: 0px; }" }) : /* @__PURE__ */ r.jsx(
|
|
749
|
-
},
|
|
761
|
+
) });
|
|
762
|
+
}, et = (t) => (e) => e.display === "auth" && t || e.display === "anon" && !t || !e.display || e.display === "always", qn = () => {
|
|
763
|
+
const { topNavigation: t } = E(), { isAuthenticated: e } = z();
|
|
764
|
+
return t.length <= 1 ? /* @__PURE__ */ r.jsx("style", { children: ":root { --top-nav-height: 0px; }" }) : /* @__PURE__ */ r.jsx(fe, { children: /* @__PURE__ */ r.jsx("nav", { className: "hidden lg:block text-sm px-12 h-[--top-nav-height]", children: /* @__PURE__ */ r.jsx("ul", { className: "flex flex-row items-center gap-8", children: t.filter(et(e)).map((n) => /* @__PURE__ */ r.jsx("li", { children: /* @__PURE__ */ r.jsx(tt, { ...n }) }, n.id)) }) }) });
|
|
765
|
+
}, tt = ({
|
|
750
766
|
id: t,
|
|
751
767
|
label: e,
|
|
752
768
|
default: n
|
|
753
769
|
}) => {
|
|
754
770
|
var c;
|
|
755
|
-
const { sidebars: s } =
|
|
756
|
-
if (g.type === "doc") return
|
|
757
|
-
}) :
|
|
771
|
+
const { sidebars: s } = E(), a = s[t], i = Ke(), o = !!ce().location, u = ((c = i.topNavItem) == null ? void 0 : c.id) === t && !o, d = n ?? (a ? Nt(a, (g) => {
|
|
772
|
+
if (g.type === "doc") return re(g.id);
|
|
773
|
+
}) : re(t));
|
|
758
774
|
if (!d)
|
|
759
|
-
throw new
|
|
775
|
+
throw new $e("Page not found.", {
|
|
760
776
|
developerHint: `No links found in top navigation for '${t}'. Check that the sidebar isn't empty or that a default link is set.`
|
|
761
777
|
});
|
|
762
778
|
return (
|
|
763
779
|
// We don't use isActive here because it has to be inside the sidebar,
|
|
764
780
|
// the top nav id doesn't necessarily start with the sidebar id
|
|
765
781
|
/* @__PURE__ */ r.jsx(
|
|
766
|
-
|
|
782
|
+
ft,
|
|
767
783
|
{
|
|
768
|
-
className: ({ isPending: g }) =>
|
|
784
|
+
className: ({ isPending: g }) => un(
|
|
769
785
|
"block lg:py-3.5 font-medium -mb-px",
|
|
770
786
|
u || g ? "border-primary text-foreground" : "border-transparent text-foreground/75 hover:text-foreground hover:border-accent-foreground/25"
|
|
771
787
|
),
|
|
@@ -774,27 +790,27 @@ const kn = (t) => "getProfileMenuItems" in t && typeof t.getProfileMenuItems ==
|
|
|
774
790
|
}
|
|
775
791
|
)
|
|
776
792
|
);
|
|
777
|
-
},
|
|
778
|
-
const { topNavigation: t } =
|
|
793
|
+
}, Rn = () => {
|
|
794
|
+
const { topNavigation: t } = E(), { isAuthenticated: e } = z(), [n, s] = H(!1);
|
|
779
795
|
return /* @__PURE__ */ r.jsxs(
|
|
780
|
-
|
|
796
|
+
Ue,
|
|
781
797
|
{
|
|
782
798
|
direction: "right",
|
|
783
799
|
open: n,
|
|
784
800
|
onOpenChange: (a) => s(a),
|
|
785
801
|
children: [
|
|
786
|
-
/* @__PURE__ */ r.jsx("div", { className: "flex lg:hidden justify-self-end", children: /* @__PURE__ */ r.jsx(
|
|
802
|
+
/* @__PURE__ */ r.jsx("div", { className: "flex lg:hidden justify-self-end", children: /* @__PURE__ */ r.jsx(Ye, { className: "lg:hidden", children: /* @__PURE__ */ r.jsx(Kt, { size: 22 }) }) }),
|
|
787
803
|
/* @__PURE__ */ r.jsx(
|
|
788
|
-
|
|
804
|
+
Xe,
|
|
789
805
|
{
|
|
790
806
|
className: "lg:hidden h-[100dvh] right-0 left-auto w-[320px] rounded-none",
|
|
791
807
|
"aria-describedby": void 0,
|
|
792
808
|
children: /* @__PURE__ */ r.jsxs("div", { className: "p-4 overflow-y-auto overscroll-none", children: [
|
|
793
|
-
/* @__PURE__ */ r.jsx(
|
|
794
|
-
/* @__PURE__ */ r.jsx(
|
|
809
|
+
/* @__PURE__ */ r.jsx(We, { children: /* @__PURE__ */ r.jsx(Ve, { children: "Navigation" }) }),
|
|
810
|
+
/* @__PURE__ */ r.jsx(Ge, { className: "flex p-4" }),
|
|
795
811
|
/* @__PURE__ */ r.jsxs("ul", { className: "flex flex-col items-center gap-4 p-4", children: [
|
|
796
|
-
/* @__PURE__ */ r.jsx("li", { children: /* @__PURE__ */ r.jsx(
|
|
797
|
-
t.filter(
|
|
812
|
+
/* @__PURE__ */ r.jsx("li", { children: /* @__PURE__ */ r.jsx(Je, {}) }),
|
|
813
|
+
t.filter(et(e)).map((a) => /* @__PURE__ */ r.jsx("li", { children: /* @__PURE__ */ r.jsx("button", { onClick: () => s(!1), children: /* @__PURE__ */ r.jsx(tt, { ...a }) }) }, a.label))
|
|
798
814
|
] })
|
|
799
815
|
] })
|
|
800
816
|
}
|
|
@@ -802,31 +818,31 @@ const kn = (t) => "getProfileMenuItems" in t && typeof t.getProfileMenuItems ==
|
|
|
802
818
|
]
|
|
803
819
|
}
|
|
804
820
|
);
|
|
805
|
-
}, J = ({ item: t }) => t.children ? /* @__PURE__ */ r.jsxs(
|
|
806
|
-
/* @__PURE__ */ r.jsx(
|
|
807
|
-
/* @__PURE__ */ r.jsx(
|
|
821
|
+
}, J = ({ item: t }) => t.children ? /* @__PURE__ */ r.jsxs(nn, { children: [
|
|
822
|
+
/* @__PURE__ */ r.jsx(sn, { children: t.label }),
|
|
823
|
+
/* @__PURE__ */ r.jsx(rn, { children: /* @__PURE__ */ r.jsx(an, { children: t.children.map((e, n) => (
|
|
808
824
|
// eslint-disable-next-line react/no-array-index-key
|
|
809
825
|
/* @__PURE__ */ r.jsx(J, { item: e }, n)
|
|
810
826
|
)) }) })
|
|
811
|
-
] }, t.label) : /* @__PURE__ */ r.jsx(
|
|
827
|
+
] }, t.label) : /* @__PURE__ */ r.jsx(ue, { to: t.path ?? "", children: /* @__PURE__ */ r.jsxs(on, { className: "flex gap-2", children: [
|
|
812
828
|
t.icon && /* @__PURE__ */ r.jsx(t.icon, { size: 16, strokeWidth: 1, absoluteStrokeWidth: !0 }),
|
|
813
829
|
t.label
|
|
814
|
-
] }, t.label) }),
|
|
815
|
-
const e =
|
|
830
|
+
] }, t.label) }), nt = ze(function() {
|
|
831
|
+
const e = z(), { isAuthenticated: n, profile: s, isAuthEnabled: a } = z(), i = E(), { page: o, plugins: u } = i, d = u.filter((c) => Mn(c)).flatMap((c) => c.getProfileMenuItems(i)).sort((c) => c.weight ?? 0);
|
|
816
832
|
return /* @__PURE__ */ r.jsxs("header", { className: "sticky lg:top-0 z-10 bg-background/80 backdrop-blur w-full", children: [
|
|
817
|
-
/* @__PURE__ */ r.jsx(
|
|
833
|
+
/* @__PURE__ */ r.jsx(Tn, {}),
|
|
818
834
|
/* @__PURE__ */ r.jsx("div", { className: "border-b", children: /* @__PURE__ */ r.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: [
|
|
819
|
-
/* @__PURE__ */ r.jsx("div", { className: "flex", children: /* @__PURE__ */ r.jsx(
|
|
820
|
-
(
|
|
835
|
+
/* @__PURE__ */ r.jsx("div", { className: "flex", children: /* @__PURE__ */ r.jsx(ue, { to: "/", children: /* @__PURE__ */ r.jsxs("div", { className: "flex items-center gap-3.5", children: [
|
|
836
|
+
(o == null ? void 0 : o.logo) && /* @__PURE__ */ r.jsxs(r.Fragment, { children: [
|
|
821
837
|
/* @__PURE__ */ r.jsx(
|
|
822
838
|
"img",
|
|
823
839
|
{
|
|
824
|
-
src: /https?:\/\//.test(
|
|
840
|
+
src: /https?:\/\//.test(o.logo.src.light) ? o.logo.src.light : De(
|
|
825
841
|
"/",
|
|
826
|
-
|
|
842
|
+
o.logo.src.light
|
|
827
843
|
),
|
|
828
|
-
alt:
|
|
829
|
-
style: { width:
|
|
844
|
+
alt: o.logo.alt ?? o.pageTitle,
|
|
845
|
+
style: { width: o.logo.width },
|
|
830
846
|
className: "h-10 dark:hidden",
|
|
831
847
|
loading: "lazy"
|
|
832
848
|
}
|
|
@@ -834,65 +850,65 @@ const kn = (t) => "getProfileMenuItems" in t && typeof t.getProfileMenuItems ==
|
|
|
834
850
|
/* @__PURE__ */ r.jsx(
|
|
835
851
|
"img",
|
|
836
852
|
{
|
|
837
|
-
src: /https?:\/\//.test(
|
|
853
|
+
src: /https?:\/\//.test(o.logo.src.dark) ? o.logo.src.dark : De(
|
|
838
854
|
"/",
|
|
839
|
-
|
|
855
|
+
o.logo.src.dark
|
|
840
856
|
),
|
|
841
|
-
alt:
|
|
842
|
-
style: { width:
|
|
857
|
+
alt: o.logo.alt ?? o.pageTitle,
|
|
858
|
+
style: { width: o.logo.width },
|
|
843
859
|
className: "h-10 hidden dark:block",
|
|
844
860
|
loading: "lazy"
|
|
845
861
|
}
|
|
846
862
|
)
|
|
847
863
|
] }),
|
|
848
|
-
/* @__PURE__ */ r.jsx("span", { className: "font-bold text-2xl text-foreground/85 tracking-wide", children:
|
|
864
|
+
/* @__PURE__ */ r.jsx("span", { className: "font-bold text-2xl text-foreground/85 tracking-wide", children: o == null ? void 0 : o.pageTitle })
|
|
849
865
|
] }) }) }),
|
|
850
866
|
/* @__PURE__ */ r.jsxs("div", { className: "grid grid-cols-1 lg:grid-cols-[--sidecar-grid-cols] items-center gap-8", children: [
|
|
851
|
-
/* @__PURE__ */ r.jsx("div", { className: "w-full justify-center hidden lg:flex", children: /* @__PURE__ */ r.jsx(
|
|
852
|
-
/* @__PURE__ */ r.jsx(
|
|
867
|
+
/* @__PURE__ */ r.jsx("div", { className: "w-full justify-center hidden lg:flex", children: /* @__PURE__ */ r.jsx(Ge, {}) }),
|
|
868
|
+
/* @__PURE__ */ r.jsx(Rn, {}),
|
|
853
869
|
/* @__PURE__ */ r.jsxs("div", { className: "hidden lg:flex items-center justify-self-end text-sm gap-2", children: [
|
|
854
870
|
/* @__PURE__ */ r.jsx(M, { name: "head-navigation-start" }),
|
|
855
871
|
a && /* @__PURE__ */ r.jsx(
|
|
856
|
-
|
|
872
|
+
ge,
|
|
857
873
|
{
|
|
858
|
-
fallback: /* @__PURE__ */ r.jsx(
|
|
859
|
-
children: n ? Object.values(d).length > 0 && /* @__PURE__ */ r.jsxs(
|
|
860
|
-
/* @__PURE__ */ r.jsx(
|
|
861
|
-
/* @__PURE__ */ r.jsxs(
|
|
862
|
-
/* @__PURE__ */ r.jsxs(
|
|
874
|
+
fallback: /* @__PURE__ */ r.jsx(Dn, { className: "rounded h-5 w-24 mr-4" }),
|
|
875
|
+
children: n ? Object.values(d).length > 0 && /* @__PURE__ */ r.jsxs(Gt, { modal: !1, children: [
|
|
876
|
+
/* @__PURE__ */ r.jsx(Jt, { asChild: !0, children: /* @__PURE__ */ r.jsx(ee, { variant: "ghost", children: s != null && s.name ? `${s.name}` : "My Account" }) }),
|
|
877
|
+
/* @__PURE__ */ r.jsxs(en, { className: "w-56", children: [
|
|
878
|
+
/* @__PURE__ */ r.jsxs(tn, { children: [
|
|
863
879
|
s != null && s.name ? `${s.name}` : "My Account",
|
|
864
880
|
(s == null ? void 0 : s.email) && /* @__PURE__ */ r.jsx("div", { className: "font-normal text-muted-foreground", children: s.email })
|
|
865
881
|
] }),
|
|
866
|
-
d.filter((c) => c.category === "top").length > 0 && /* @__PURE__ */ r.jsx(
|
|
882
|
+
d.filter((c) => c.category === "top").length > 0 && /* @__PURE__ */ r.jsx(ne, {}),
|
|
867
883
|
d.filter((c) => c.category === "top").map((c) => /* @__PURE__ */ r.jsx(J, { item: c }, c.label)),
|
|
868
884
|
d.filter(
|
|
869
885
|
(c) => !c.category || c.category === "middle"
|
|
870
|
-
).length > 0 && /* @__PURE__ */ r.jsx(
|
|
886
|
+
).length > 0 && /* @__PURE__ */ r.jsx(ne, {}),
|
|
871
887
|
d.filter(
|
|
872
888
|
(c) => !c.category || c.category === "middle"
|
|
873
889
|
).map((c) => /* @__PURE__ */ r.jsx(J, { item: c }, c.label)),
|
|
874
|
-
d.filter((c) => c.category === "bottom").length > 0 && /* @__PURE__ */ r.jsx(
|
|
890
|
+
d.filter((c) => c.category === "bottom").length > 0 && /* @__PURE__ */ r.jsx(ne, {}),
|
|
875
891
|
d.filter((c) => c.category === "bottom").map((c) => /* @__PURE__ */ r.jsx(J, { item: c }, c.label))
|
|
876
892
|
] })
|
|
877
|
-
] }) : /* @__PURE__ */ r.jsx(
|
|
893
|
+
] }) : /* @__PURE__ */ r.jsx(ee, { variant: "ghost", onClick: () => e.login(), children: "Login" })
|
|
878
894
|
}
|
|
879
895
|
),
|
|
880
896
|
/* @__PURE__ */ r.jsx(M, { name: "head-navigation-end" }),
|
|
881
|
-
/* @__PURE__ */ r.jsx(
|
|
897
|
+
/* @__PURE__ */ r.jsx(Je, {})
|
|
882
898
|
] })
|
|
883
899
|
] })
|
|
884
900
|
] }) }),
|
|
885
901
|
/* @__PURE__ */ r.jsx("div", { className: "border-b", children: /* @__PURE__ */ r.jsxs("div", { className: "max-w-screen-2xl mx-auto border-l border-r", children: [
|
|
886
902
|
/* @__PURE__ */ r.jsx(M, { name: "top-navigation-before" }),
|
|
887
|
-
/* @__PURE__ */ r.jsx(
|
|
903
|
+
/* @__PURE__ */ r.jsx(qn, {}),
|
|
888
904
|
/* @__PURE__ */ r.jsx(M, { name: "top-navigation-after" })
|
|
889
905
|
] }) })
|
|
890
906
|
] });
|
|
891
|
-
}),
|
|
907
|
+
}), st = xt(({ children: t, className: e, pushMainContent: n }, s) => /* @__PURE__ */ r.jsx(
|
|
892
908
|
"nav",
|
|
893
909
|
{
|
|
894
910
|
"data-navigation": String(n),
|
|
895
|
-
className:
|
|
911
|
+
className: U(
|
|
896
912
|
"scrollbar peer hidden lg:flex flex-col fixed text-sm overflow-y-auto shrink-0 border-r pr-10",
|
|
897
913
|
"-mx-[--padding-nav-item] pb-20 pt-[--padding-content-top]",
|
|
898
914
|
"w-[--side-nav-width] h-[calc(100%-var(--header-height))] scroll-pt-2 gap-2",
|
|
@@ -903,33 +919,33 @@ const kn = (t) => "getProfileMenuItems" in t && typeof t.getProfileMenuItems ==
|
|
|
903
919
|
children: t
|
|
904
920
|
}
|
|
905
921
|
));
|
|
906
|
-
|
|
907
|
-
const
|
|
922
|
+
st.displayName = "SidebarWrapper";
|
|
923
|
+
const Fn = ({
|
|
908
924
|
onRequestClose: t
|
|
909
925
|
}) => {
|
|
910
|
-
const e =
|
|
926
|
+
const e = he(null), n = Ke();
|
|
911
927
|
return /* @__PURE__ */ r.jsxs(r.Fragment, { children: [
|
|
912
928
|
/* @__PURE__ */ r.jsxs(
|
|
913
|
-
|
|
929
|
+
st,
|
|
914
930
|
{
|
|
915
931
|
ref: e,
|
|
916
932
|
pushMainContent: n.sidebar.length > 0,
|
|
917
933
|
children: [
|
|
918
934
|
/* @__PURE__ */ r.jsx(M, { name: "zudoku-before-navigation" }),
|
|
919
|
-
n.sidebar.map((s) => /* @__PURE__ */ r.jsx(
|
|
935
|
+
n.sidebar.map((s) => /* @__PURE__ */ r.jsx(Se, { item: s }, s.label)),
|
|
920
936
|
/* @__PURE__ */ r.jsx(M, { name: "zudoku-after-navigation" })
|
|
921
937
|
]
|
|
922
938
|
}
|
|
923
939
|
),
|
|
924
940
|
/* @__PURE__ */ r.jsx(
|
|
925
|
-
|
|
941
|
+
Xe,
|
|
926
942
|
{
|
|
927
943
|
className: "lg:hidden h-[100dvh] left-0 w-[320px] rounded-none",
|
|
928
944
|
"aria-describedby": void 0,
|
|
929
945
|
children: /* @__PURE__ */ r.jsxs("div", { className: "p-4 overflow-y-auto overscroll-none", children: [
|
|
930
|
-
/* @__PURE__ */ r.jsx(
|
|
946
|
+
/* @__PURE__ */ r.jsx(We, { children: /* @__PURE__ */ r.jsx(Ve, { children: "Sidebar" }) }),
|
|
931
947
|
n.sidebar.map((s) => /* @__PURE__ */ r.jsx(
|
|
932
|
-
|
|
948
|
+
Se,
|
|
933
949
|
{
|
|
934
950
|
item: s,
|
|
935
951
|
onRequestClose: t
|
|
@@ -940,20 +956,20 @@ const qn = ({
|
|
|
940
956
|
}
|
|
941
957
|
)
|
|
942
958
|
] });
|
|
943
|
-
},
|
|
944
|
-
const e =
|
|
945
|
-
|
|
946
|
-
const
|
|
947
|
-
|
|
959
|
+
}, Qe = () => /* @__PURE__ */ r.jsx("main", { className: "grid h-[calc(100vh-var(--header-height))] place-items-center", children: /* @__PURE__ */ r.jsx(_e, {}) }), zn = ({ children: t }) => {
|
|
960
|
+
const e = oe(), { setActiveAnchor: n } = Xt(), { meta: s, authentication: a } = E();
|
|
961
|
+
Zt(), Sn();
|
|
962
|
+
const i = he(e.pathname);
|
|
963
|
+
B(() => {
|
|
948
964
|
var g;
|
|
949
965
|
(g = a == null ? void 0 : a.onPageLoad) == null || g.call(a);
|
|
950
|
-
}, [a]),
|
|
951
|
-
e.pathname !==
|
|
966
|
+
}, [a]), B(() => {
|
|
967
|
+
e.pathname !== i.current && n(""), i.current = e.pathname;
|
|
952
968
|
}, [e.pathname, n]);
|
|
953
|
-
const
|
|
969
|
+
const o = !!ce().location, u = kn.useSpinDelay(o, {
|
|
954
970
|
delay: 300,
|
|
955
971
|
minDuration: 500
|
|
956
|
-
}), [d, c] =
|
|
972
|
+
}), [d, c] = H(!1);
|
|
957
973
|
return /* @__PURE__ */ r.jsxs(r.Fragment, { children: [
|
|
958
974
|
!1,
|
|
959
975
|
/* @__PURE__ */ r.jsxs(ie, { titleTemplate: s == null ? void 0 : s.title, children: [
|
|
@@ -961,25 +977,25 @@ const qn = ({
|
|
|
961
977
|
(s == null ? void 0 : s.favicon) && /* @__PURE__ */ r.jsx("link", { rel: "icon", href: s.favicon })
|
|
962
978
|
] }),
|
|
963
979
|
/* @__PURE__ */ r.jsx(M, { name: "layout-before-head" }),
|
|
964
|
-
/* @__PURE__ */ r.jsx(
|
|
980
|
+
/* @__PURE__ */ r.jsx(nt, {}),
|
|
965
981
|
/* @__PURE__ */ r.jsx(M, { name: "layout-after-head" }),
|
|
966
|
-
/* @__PURE__ */ r.jsx("div", { className: "w-full max-w-screen-2xl mx-auto px-4 lg:px-12 border-l border-r", children: u ? /* @__PURE__ */ r.jsx(
|
|
967
|
-
|
|
982
|
+
/* @__PURE__ */ r.jsx("div", { className: "w-full max-w-screen-2xl mx-auto px-4 lg:px-12 border-l border-r", children: u ? /* @__PURE__ */ r.jsx(Qe, {}) : /* @__PURE__ */ r.jsx(fe, { fallback: /* @__PURE__ */ r.jsx(Qe, {}), children: /* @__PURE__ */ r.jsxs(
|
|
983
|
+
Ue,
|
|
968
984
|
{
|
|
969
985
|
direction: "left",
|
|
970
986
|
open: d,
|
|
971
987
|
onOpenChange: (g) => c(g),
|
|
972
988
|
children: [
|
|
973
|
-
/* @__PURE__ */ r.jsx(
|
|
989
|
+
/* @__PURE__ */ r.jsx(Fn, { onRequestClose: () => c(!1) }),
|
|
974
990
|
/* @__PURE__ */ r.jsx(
|
|
975
991
|
"div",
|
|
976
992
|
{
|
|
977
|
-
className:
|
|
993
|
+
className: U(
|
|
978
994
|
"lg:hidden -mx-10 px-10 py-2 sticky bg-background/80 backdrop-blur z-10 top-0 left-0 right-0 border-b",
|
|
979
995
|
"peer-data-[navigation=false]:hidden"
|
|
980
996
|
),
|
|
981
|
-
children: /* @__PURE__ */ r.jsxs(
|
|
982
|
-
/* @__PURE__ */ r.jsx(
|
|
997
|
+
children: /* @__PURE__ */ r.jsxs(Ye, { className: "flex items-center gap-2", children: [
|
|
998
|
+
/* @__PURE__ */ r.jsx($t, { size: 16, strokeWidth: 1.5 }),
|
|
983
999
|
/* @__PURE__ */ r.jsx("span", { className: "text-sm", children: "Menu" })
|
|
984
1000
|
] })
|
|
985
1001
|
}
|
|
@@ -987,7 +1003,7 @@ const qn = ({
|
|
|
987
1003
|
/* @__PURE__ */ r.jsxs(
|
|
988
1004
|
"main",
|
|
989
1005
|
{
|
|
990
|
-
className:
|
|
1006
|
+
className: U(
|
|
991
1007
|
"h-full dark:border-white/10 translate-x-0",
|
|
992
1008
|
"lg:overflow-visible",
|
|
993
1009
|
// This works in tandem with the `SidebarWrapper` component
|
|
@@ -996,7 +1012,7 @@ const qn = ({
|
|
|
996
1012
|
),
|
|
997
1013
|
children: [
|
|
998
1014
|
/* @__PURE__ */ r.jsx(M, { name: "zudoku-before-content" }),
|
|
999
|
-
t ?? /* @__PURE__ */ r.jsx(
|
|
1015
|
+
t ?? /* @__PURE__ */ r.jsx(le, {}),
|
|
1000
1016
|
/* @__PURE__ */ r.jsx(M, { name: "zudoku-after-content" })
|
|
1001
1017
|
]
|
|
1002
1018
|
}
|
|
@@ -1005,13 +1021,13 @@ const qn = ({
|
|
|
1005
1021
|
}
|
|
1006
1022
|
) }) })
|
|
1007
1023
|
] });
|
|
1008
|
-
},
|
|
1024
|
+
}, Bn = de(null), se = {
|
|
1009
1025
|
didCatch: !1,
|
|
1010
1026
|
error: null
|
|
1011
1027
|
};
|
|
1012
|
-
class
|
|
1028
|
+
class Hn extends yt {
|
|
1013
1029
|
constructor(e) {
|
|
1014
|
-
super(e), this.resetErrorBoundary = this.resetErrorBoundary.bind(this), this.state =
|
|
1030
|
+
super(e), this.resetErrorBoundary = this.resetErrorBoundary.bind(this), this.state = se;
|
|
1015
1031
|
}
|
|
1016
1032
|
static getDerivedStateFromError(e) {
|
|
1017
1033
|
return {
|
|
@@ -1024,12 +1040,12 @@ class zn extends Qt {
|
|
|
1024
1040
|
error: e
|
|
1025
1041
|
} = this.state;
|
|
1026
1042
|
if (e !== null) {
|
|
1027
|
-
for (var n, s, a = arguments.length,
|
|
1028
|
-
o
|
|
1043
|
+
for (var n, s, a = arguments.length, i = new Array(a), o = 0; o < a; o++)
|
|
1044
|
+
i[o] = arguments[o];
|
|
1029
1045
|
(n = (s = this.props).onReset) === null || n === void 0 || n.call(s, {
|
|
1030
|
-
args:
|
|
1046
|
+
args: i,
|
|
1031
1047
|
reason: "imperative-api"
|
|
1032
|
-
}), this.setState(
|
|
1048
|
+
}), this.setState(se);
|
|
1033
1049
|
}
|
|
1034
1050
|
}
|
|
1035
1051
|
componentDidCatch(e, n) {
|
|
@@ -1042,13 +1058,13 @@ class zn extends Qt {
|
|
|
1042
1058
|
} = this.state, {
|
|
1043
1059
|
resetKeys: a
|
|
1044
1060
|
} = this.props;
|
|
1045
|
-
if (s && n.error !== null &&
|
|
1046
|
-
var
|
|
1047
|
-
(
|
|
1061
|
+
if (s && n.error !== null && Ln(e.resetKeys, a)) {
|
|
1062
|
+
var i, o;
|
|
1063
|
+
(i = (o = this.props).onReset) === null || i === void 0 || i.call(o, {
|
|
1048
1064
|
next: a,
|
|
1049
1065
|
prev: e.resetKeys,
|
|
1050
1066
|
reason: "keys"
|
|
1051
|
-
}), this.setState(
|
|
1067
|
+
}), this.setState(se);
|
|
1052
1068
|
}
|
|
1053
1069
|
}
|
|
1054
1070
|
render() {
|
|
@@ -1058,38 +1074,38 @@ class zn extends Qt {
|
|
|
1058
1074
|
FallbackComponent: s,
|
|
1059
1075
|
fallback: a
|
|
1060
1076
|
} = this.props, {
|
|
1061
|
-
didCatch:
|
|
1062
|
-
error:
|
|
1077
|
+
didCatch: i,
|
|
1078
|
+
error: o
|
|
1063
1079
|
} = this.state;
|
|
1064
1080
|
let u = e;
|
|
1065
|
-
if (
|
|
1081
|
+
if (i) {
|
|
1066
1082
|
const d = {
|
|
1067
|
-
error:
|
|
1083
|
+
error: o,
|
|
1068
1084
|
resetErrorBoundary: this.resetErrorBoundary
|
|
1069
1085
|
};
|
|
1070
1086
|
if (typeof n == "function")
|
|
1071
1087
|
u = n(d);
|
|
1072
1088
|
else if (s)
|
|
1073
|
-
u =
|
|
1089
|
+
u = ve(s, d);
|
|
1074
1090
|
else if (a !== void 0)
|
|
1075
1091
|
u = a;
|
|
1076
1092
|
else
|
|
1077
|
-
throw
|
|
1093
|
+
throw o;
|
|
1078
1094
|
}
|
|
1079
|
-
return
|
|
1095
|
+
return ve(Bn.Provider, {
|
|
1080
1096
|
value: {
|
|
1081
|
-
didCatch:
|
|
1082
|
-
error:
|
|
1097
|
+
didCatch: i,
|
|
1098
|
+
error: o,
|
|
1083
1099
|
resetErrorBoundary: this.resetErrorBoundary
|
|
1084
1100
|
}
|
|
1085
1101
|
}, u);
|
|
1086
1102
|
}
|
|
1087
1103
|
}
|
|
1088
|
-
function
|
|
1104
|
+
function Ln() {
|
|
1089
1105
|
let t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : [], e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : [];
|
|
1090
1106
|
return t.length !== e.length || t.some((n, s) => !Object.is(n, e[s]));
|
|
1091
1107
|
}
|
|
1092
|
-
class
|
|
1108
|
+
class Kn {
|
|
1093
1109
|
constructor(e) {
|
|
1094
1110
|
P(this, "plugins");
|
|
1095
1111
|
P(this, "sidebars");
|
|
@@ -1100,20 +1116,20 @@ class Hn {
|
|
|
1100
1116
|
P(this, "navigationPlugins");
|
|
1101
1117
|
P(this, "initialize", async () => {
|
|
1102
1118
|
await Promise.all(
|
|
1103
|
-
this.plugins.filter(
|
|
1119
|
+
this.plugins.filter(En).map((e) => {
|
|
1104
1120
|
var n;
|
|
1105
1121
|
return (n = e.initialize) == null ? void 0 : n.call(e, this);
|
|
1106
1122
|
})
|
|
1107
1123
|
);
|
|
1108
1124
|
});
|
|
1109
1125
|
P(this, "getApiIdentities", async () => (await Promise.all(
|
|
1110
|
-
this.plugins.filter(
|
|
1126
|
+
this.plugins.filter(In).map((n) => n.getIdentities(this))
|
|
1111
1127
|
)).flat());
|
|
1112
1128
|
P(this, "getPluginSidebar", async (e) => (await Promise.all(
|
|
1113
1129
|
this.navigationPlugins.map(
|
|
1114
1130
|
(s) => {
|
|
1115
1131
|
var a;
|
|
1116
|
-
return (a = s.getSidebar) == null ? void 0 : a.call(s,
|
|
1132
|
+
return (a = s.getSidebar) == null ? void 0 : a.call(s, re(e));
|
|
1117
1133
|
}
|
|
1118
1134
|
)
|
|
1119
1135
|
)).flatMap((s) => s ?? []));
|
|
@@ -1123,79 +1139,80 @@ class Hn {
|
|
|
1123
1139
|
const n = await this.authentication.getAccessToken();
|
|
1124
1140
|
return e.headers.set("Authorization", `Bearer ${n}`), e;
|
|
1125
1141
|
});
|
|
1126
|
-
this.options = e, this.plugins = e.plugins ?? [], this.topNavigation = e.topNavigation ?? [], this.sidebars = e.sidebars ?? {}, this.navigationPlugins = this.plugins.filter(
|
|
1142
|
+
this.options = e, this.plugins = e.plugins ?? [], this.topNavigation = e.topNavigation ?? [], this.sidebars = e.sidebars ?? {}, this.navigationPlugins = this.plugins.filter(Nn), this.authentication = e.authentication, this.meta = e.metadata, this.page = e.page;
|
|
1127
1143
|
}
|
|
1128
1144
|
}
|
|
1129
|
-
function
|
|
1130
|
-
return /* @__PURE__ */ r.jsx(
|
|
1145
|
+
function $n({ error: t, resetErrorBoundary: e }) {
|
|
1146
|
+
return /* @__PURE__ */ r.jsx(Ze, { error: t });
|
|
1131
1147
|
}
|
|
1132
1148
|
const G = globalThis;
|
|
1133
1149
|
(!G.requestIdleCallback || !G.cancelIdleCallback) && (G.requestIdleCallback = (t) => setTimeout(t, 1), G.cancelIdleCallback = clearTimeout);
|
|
1134
|
-
const
|
|
1135
|
-
Header:
|
|
1136
|
-
},
|
|
1150
|
+
const rt = {
|
|
1151
|
+
Header: nt
|
|
1152
|
+
}, Zn = de(rt), Un = Zn.Provider, Yn = ({
|
|
1137
1153
|
children: t,
|
|
1138
1154
|
context: e
|
|
1139
|
-
}) => (
|
|
1155
|
+
}) => (Ot({
|
|
1140
1156
|
queryFn: async () => (await e.initialize(), !0),
|
|
1141
1157
|
queryKey: ["zudoku-initialize"]
|
|
1142
|
-
}), /* @__PURE__ */ r.jsx(
|
|
1158
|
+
}), /* @__PURE__ */ r.jsx(Et.Provider, { value: e, children: t })), at = ze(
|
|
1143
1159
|
({ children: t, ...e }) => {
|
|
1144
1160
|
var f, h;
|
|
1145
|
-
const n =
|
|
1146
|
-
() => ({ ...
|
|
1161
|
+
const n = te(
|
|
1162
|
+
() => ({ ...rt, ...e.overrides }),
|
|
1147
1163
|
[e.overrides]
|
|
1148
|
-
), s =
|
|
1164
|
+
), s = te(() => {
|
|
1149
1165
|
var v;
|
|
1150
1166
|
return {
|
|
1151
|
-
...(e.plugins ?? []).filter(
|
|
1167
|
+
...(e.plugins ?? []).filter(Qn).flatMap(
|
|
1152
1168
|
(m) => m.getMdxComponents ? [m.getMdxComponents()] : []
|
|
1153
1169
|
).reduce(
|
|
1154
1170
|
(m, C) => ({ ...m, ...C }),
|
|
1155
1171
|
{}
|
|
1156
1172
|
),
|
|
1157
|
-
...
|
|
1173
|
+
...Vt,
|
|
1158
1174
|
...(v = e.mdx) == null ? void 0 : v.components
|
|
1159
1175
|
};
|
|
1160
|
-
}, [(f = e.mdx) == null ? void 0 : f.components, e.plugins]), { stagger: a } =
|
|
1161
|
-
() =>
|
|
1162
|
-
[a,
|
|
1163
|
-
), d =
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
}, [
|
|
1167
|
-
const [c] =
|
|
1176
|
+
}, [(f = e.mdx) == null ? void 0 : f.components, e.plugins]), { stagger: a } = vt(ae), [i, o] = H(!1), u = te(
|
|
1177
|
+
() => i ? { stagger: !0 } : { stagger: a },
|
|
1178
|
+
[a, i]
|
|
1179
|
+
), d = ce();
|
|
1180
|
+
B(() => {
|
|
1181
|
+
i || o(!0);
|
|
1182
|
+
}, [i, d.location]);
|
|
1183
|
+
const [c] = H(() => new Kn(e)), g = (h = e.plugins) == null ? void 0 : h.filter(An).map((x, v) => {
|
|
1168
1184
|
var m;
|
|
1169
|
-
return /* @__PURE__ */ r.jsx(
|
|
1185
|
+
return /* @__PURE__ */ r.jsx(bt, { children: (m = x.getHead) == null ? void 0 : m.call(x) }, v);
|
|
1170
1186
|
});
|
|
1171
1187
|
return /* @__PURE__ */ r.jsxs(r.Fragment, { children: [
|
|
1172
1188
|
/* @__PURE__ */ r.jsx(ie, { children: g }),
|
|
1173
|
-
/* @__PURE__ */ r.jsx(ae.Provider, { value: u, children: /* @__PURE__ */ r.jsx(
|
|
1189
|
+
/* @__PURE__ */ r.jsx(ae.Provider, { value: u, children: /* @__PURE__ */ r.jsx(Yn, { context: c, children: /* @__PURE__ */ r.jsx(Ut, { components: s, children: /* @__PURE__ */ r.jsx(cn, { attribute: "class", disableTransitionOnChange: !0, children: /* @__PURE__ */ r.jsx(Un, { value: n, children: /* @__PURE__ */ r.jsx(It, { slotlets: e.slotlets, children: /* @__PURE__ */ r.jsx(_t, { children: t ?? /* @__PURE__ */ r.jsx(le, {}) }) }) }) }) }) }) })
|
|
1174
1190
|
] });
|
|
1175
1191
|
}
|
|
1176
1192
|
);
|
|
1177
|
-
|
|
1178
|
-
const
|
|
1179
|
-
|
|
1180
|
-
const
|
|
1193
|
+
at.displayName = "ZudokoInner";
|
|
1194
|
+
const it = (t) => /* @__PURE__ */ r.jsx(Hn, { FallbackComponent: $n, children: /* @__PURE__ */ r.jsx(at, { ...t }) });
|
|
1195
|
+
it.displayName = "Zudoku";
|
|
1196
|
+
const xs = Yt, ys = zn, vs = Tt, bs = yn, js = jn, ws = wn, Ps = xn, Cs = ie, ks = E, Ss = z, Ds = At, Ms = Qt, Ns = it, Os = Rt, Es = Wt, As = _e, Qs = ge, Is = qt, Ts = ue;
|
|
1181
1197
|
export {
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
|
|
1198
|
+
js as Bootstrap,
|
|
1199
|
+
ws as BootstrapStatic,
|
|
1200
|
+
Is as Button,
|
|
1201
|
+
Ms as CACHE_KEYS,
|
|
1202
|
+
Os as Callout,
|
|
1203
|
+
Qs as ClientOnly,
|
|
1204
|
+
Cs as Head,
|
|
1205
|
+
ys as Layout,
|
|
1206
|
+
Ts as Link,
|
|
1207
|
+
Es as Markdown,
|
|
1208
|
+
Ps as RouteGuard,
|
|
1209
|
+
vs as RouterError,
|
|
1210
|
+
bs as ServerError,
|
|
1211
|
+
As as Spinner,
|
|
1212
|
+
Ns as Zudoku,
|
|
1213
|
+
Ss as useAuth,
|
|
1214
|
+
Ds as useCache,
|
|
1215
|
+
xs as useMDXComponents,
|
|
1216
|
+
ks as useZudoku
|
|
1200
1217
|
};
|
|
1201
1218
|
//# sourceMappingURL=zudoku.components.js.map
|