zudoku 0.3.0-dev.31 → 0.3.0-dev.33
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/App.d.ts +1 -0
- package/dist/app/App.js +2 -0
- package/dist/app/App.js.map +1 -0
- package/dist/app/entry.client.d.ts +3 -0
- package/dist/app/entry.client.js +38 -0
- package/dist/app/entry.client.js.map +1 -0
- package/dist/app/entry.server.d.ts +10 -0
- package/dist/app/entry.server.js +107 -0
- package/dist/app/entry.server.js.map +1 -0
- package/dist/app/main.d.ts +26 -2
- package/dist/app/main.js +39 -17
- package/dist/app/main.js.map +1 -1
- package/dist/app/tailwind.js +5 -0
- package/dist/app/tailwind.js.map +1 -1
- package/dist/app/zudoku-manifest.d.ts +1 -0
- package/dist/app/zudoku-manifest.js +20 -0
- package/dist/app/zudoku-manifest.js.map +1 -0
- package/dist/cli/cmds/dev.js +5 -0
- package/dist/cli/cmds/dev.js.map +1 -1
- package/dist/cli/dev/handler.d.ts +1 -0
- package/dist/cli/dev/handler.js +3 -1
- package/dist/cli/dev/handler.js.map +1 -1
- package/dist/config/config.d.ts +5 -0
- package/dist/lib/authentication/providers/clerk.js +2 -0
- package/dist/lib/authentication/providers/clerk.js.map +1 -1
- package/dist/lib/components/DevPortal.d.ts +1 -1
- package/dist/lib/components/DevPortal.js +6 -10
- package/dist/lib/components/DevPortal.js.map +1 -1
- package/dist/lib/components/ErrorPage.d.ts +6 -0
- package/dist/lib/components/ErrorPage.js +9 -0
- package/dist/lib/components/ErrorPage.js.map +1 -0
- package/dist/lib/components/InlineCode.d.ts +5 -0
- package/dist/lib/components/InlineCode.js +4 -0
- package/dist/lib/components/InlineCode.js.map +1 -0
- package/dist/lib/components/Layout.js +2 -1
- package/dist/lib/components/Layout.js.map +1 -1
- package/dist/lib/components/NotFoundPage.d.ts +1 -0
- package/dist/lib/components/NotFoundPage.js +12 -0
- package/dist/lib/components/NotFoundPage.js.map +1 -0
- package/dist/lib/components/SyntaxHighlight.d.ts +3 -2
- package/dist/lib/components/SyntaxHighlight.js +20 -22
- package/dist/lib/components/SyntaxHighlight.js.map +1 -1
- package/dist/lib/errors/RouterError.js +6 -3
- package/dist/lib/errors/RouterError.js.map +1 -1
- package/dist/lib/errors/ServerError.d.ts +3 -0
- package/dist/lib/errors/ServerError.js +6 -0
- package/dist/lib/errors/ServerError.js.map +1 -0
- package/dist/lib/oas/parser/index.d.ts +1 -1
- package/dist/lib/oas/parser/index.js +38 -14
- package/dist/lib/oas/parser/index.js.map +1 -1
- package/dist/lib/plugins/api-keys/index.js +3 -8
- package/dist/lib/plugins/api-keys/index.js.map +1 -1
- package/dist/lib/plugins/markdown/generateRoutes.js.map +1 -1
- package/dist/lib/plugins/markdown/index.js +3 -7
- package/dist/lib/plugins/markdown/index.js.map +1 -1
- package/dist/lib/plugins/openapi/OperationList.js +11 -1
- package/dist/lib/plugins/openapi/OperationList.js.map +1 -1
- package/dist/lib/plugins/openapi/OperationListItem.js +2 -1
- package/dist/lib/plugins/openapi/OperationListItem.js.map +1 -1
- package/dist/lib/plugins/openapi/SchemaListView.js +2 -1
- package/dist/lib/plugins/openapi/SchemaListView.js.map +1 -1
- package/dist/lib/plugins/openapi/client/createMemoryClient.js +1 -1
- package/dist/lib/plugins/openapi/client/createMemoryClient.js.map +1 -1
- package/dist/lib/plugins/openapi/index.js +9 -1
- package/dist/lib/plugins/openapi/index.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/QueryParams.js +2 -1
- package/dist/lib/plugins/openapi/playground/QueryParams.js.map +1 -1
- package/dist/lib/plugins/redirect/index.js +2 -3
- package/dist/lib/plugins/redirect/index.js.map +1 -1
- package/dist/lib/ui/Callout.js +1 -1
- package/dist/lib/ui/Callout.js.map +1 -1
- package/dist/lib/ui/button-variants.d.ts +1 -1
- package/dist/lib/util/MdxComponents.js +2 -2
- package/dist/lib/util/MdxComponents.js.map +1 -1
- package/dist/lib/util/groupBy.d.ts +1 -6
- package/dist/lib/util/groupBy.js +10 -8
- package/dist/lib/util/groupBy.js.map +1 -1
- package/dist/vite/build.js +30 -11
- package/dist/vite/build.js.map +1 -1
- package/dist/vite/config.d.ts +2 -1
- package/dist/vite/config.js +34 -7
- package/dist/vite/config.js.map +1 -1
- package/dist/vite/dev-server.d.ts +1 -1
- package/dist/vite/dev-server.js +15 -9
- package/dist/vite/dev-server.js.map +1 -1
- package/dist/vite/html.js +5 -4
- package/dist/vite/html.js.map +1 -1
- package/dist/vite/plugin-custom-css.d.ts +6 -0
- package/dist/vite/plugin-custom-css.js +55 -0
- package/dist/vite/plugin-custom-css.js.map +1 -0
- package/dist/vite/plugin-docs.js +14 -5
- package/dist/vite/plugin-docs.js.map +1 -1
- package/dist/vite/plugin-openapi-worker.js +4 -1
- package/dist/vite/plugin-openapi-worker.js.map +1 -1
- package/dist/vite/plugin.js +2 -0
- package/dist/vite/plugin.js.map +1 -1
- package/dist/vite/prerender.d.ts +1 -0
- package/dist/vite/prerender.js +57 -0
- package/dist/vite/prerender.js.map +1 -0
- package/lib/{DevPortalProvider-BMk-RCE0.js → DevPortalProvider-BlxLX6GG.js} +230 -250
- package/lib/DevPortalProvider-BlxLX6GG.js.map +1 -0
- package/lib/{Markdown-DDmW47R9.js → Markdown-CL8KPvJN.js} +8 -9
- package/lib/{Markdown-DDmW47R9.js.map → Markdown-CL8KPvJN.js.map} +1 -1
- package/lib/MdxComponents-Ev_hBHb2.js +5885 -0
- package/lib/MdxComponents-Ev_hBHb2.js.map +1 -0
- package/lib/{MdxPage-DyJAHF9y.js → MdxPage-Z3HKNTrj.js} +92 -89
- package/lib/MdxPage-Z3HKNTrj.js.map +1 -0
- package/lib/{OperationList-Dz9rHM9r.js → OperationList-DfkWNe8Y.js} +1972 -1786
- package/lib/OperationList-DfkWNe8Y.js.map +1 -0
- package/lib/Route-Bf1_D_vC.js +13 -0
- package/lib/{Route-CN_7-e5r.js.map → Route-Bf1_D_vC.js.map} +1 -1
- package/lib/Select-DSa3bN4t.js +4770 -0
- package/lib/Select-DSa3bN4t.js.map +1 -0
- package/lib/assets/{worker-BXS8hiSM.js → worker-BjPv-hjP.js} +3100 -2720
- package/lib/assets/worker-BjPv-hjP.js.map +1 -0
- package/lib/hook-CTmJ6CWq.js +35 -0
- package/lib/hook-CTmJ6CWq.js.map +1 -0
- package/lib/index-BdWBDosx.js +74 -0
- package/lib/index-BdWBDosx.js.map +1 -0
- package/lib/{index-Cpdpun6t.js → index-BjSy8IQO.js} +57 -41
- package/lib/index-BjSy8IQO.js.map +1 -0
- package/lib/{AnchorLink-ptdQk87q.js → index.esm-CPEExBJE.js} +156 -168
- package/lib/index.esm-CPEExBJE.js.map +1 -0
- package/lib/jsx-runtime-CM0TzjGp.js +866 -0
- package/lib/jsx-runtime-CM0TzjGp.js.map +1 -0
- package/lib/mutation-91kw0lHb.js +208 -0
- package/lib/mutation-91kw0lHb.js.map +1 -0
- package/lib/router-CcYTwKjf.js +183 -0
- package/lib/router-CcYTwKjf.js.map +1 -0
- package/lib/zudoku.auth-clerk.js.map +1 -1
- package/lib/zudoku.auth-openid.js +588 -441
- package/lib/zudoku.auth-openid.js.map +1 -1
- package/lib/zudoku.components.js +284 -595
- package/lib/zudoku.components.js.map +1 -1
- package/lib/zudoku.openapi-worker.js +18 -18
- package/lib/zudoku.plugin-api-keys.js +143 -98
- package/lib/zudoku.plugin-api-keys.js.map +1 -1
- package/lib/zudoku.plugin-markdown.js +2 -49
- package/lib/zudoku.plugin-markdown.js.map +1 -1
- package/lib/zudoku.plugin-openapi.js +5 -3
- package/lib/zudoku.plugin-openapi.js.map +1 -1
- package/lib/zudoku.plugin-redirect.js +6 -7
- package/lib/zudoku.plugin-redirect.js.map +1 -1
- package/package.json +9 -8
- package/src/app/App.tsx +0 -0
- package/src/app/entry.client.tsx +64 -0
- package/src/app/entry.server.tsx +158 -0
- package/src/app/main.tsx +65 -43
- package/src/app/tailwind.ts +6 -0
- package/src/app/zudoku-manifest.ts +22 -0
- package/src/lib/authentication/providers/clerk.tsx +1 -0
- package/src/lib/components/DevPortal.tsx +25 -33
- package/src/lib/components/ErrorPage.tsx +28 -0
- package/src/lib/components/InlineCode.tsx +19 -0
- package/src/lib/components/Layout.tsx +7 -4
- package/src/lib/components/NotFoundPage.tsx +39 -0
- package/src/lib/components/SyntaxHighlight.tsx +26 -22
- package/src/lib/errors/RouterError.tsx +8 -7
- package/src/lib/errors/ServerError.tsx +5 -0
- package/src/lib/oas/parser/index.ts +41 -22
- package/src/lib/plugins/api-keys/index.tsx +4 -16
- package/src/lib/plugins/markdown/generateRoutes.tsx +1 -1
- package/src/lib/plugins/markdown/index.tsx +3 -7
- package/src/lib/plugins/openapi/OperationList.tsx +30 -0
- package/src/lib/plugins/openapi/OperationListItem.tsx +3 -1
- package/src/lib/plugins/openapi/SchemaListView.tsx +8 -10
- package/src/lib/plugins/openapi/client/createMemoryClient.ts +1 -1
- package/src/lib/plugins/openapi/index.tsx +18 -1
- package/src/lib/plugins/openapi/playground/QueryParams.tsx +6 -1
- package/src/lib/plugins/redirect/index.tsx +2 -2
- package/src/lib/ui/Callout.tsx +2 -2
- package/src/lib/util/MdxComponents.tsx +2 -11
- package/src/lib/util/groupBy.ts +7 -12
- package/dist/lib/components/Router.d.ts +0 -4
- package/dist/lib/components/Router.js +0 -21
- package/dist/lib/components/Router.js.map +0 -1
- package/lib/AnchorLink-ptdQk87q.js.map +0 -1
- package/lib/DevPortalProvider-BMk-RCE0.js.map +0 -1
- package/lib/MdxComponents-C0R6zobS.js +0 -3019
- package/lib/MdxComponents-C0R6zobS.js.map +0 -1
- package/lib/MdxPage-DyJAHF9y.js.map +0 -1
- package/lib/OperationList-Dz9rHM9r.js.map +0 -1
- package/lib/Route-CN_7-e5r.js +0 -14
- package/lib/Select-D-Jtx53Q.js +0 -4572
- package/lib/Select-D-Jtx53Q.js.map +0 -1
- package/lib/Spinner-BG1JnYy0.js +0 -182
- package/lib/Spinner-BG1JnYy0.js.map +0 -1
- package/lib/assets/worker-BXS8hiSM.js.map +0 -1
- package/lib/cn-DpqTslo9.js +0 -2342
- package/lib/cn-DpqTslo9.js.map +0 -1
- package/lib/hook-BzBeIPL4.js +0 -25
- package/lib/hook-BzBeIPL4.js.map +0 -1
- package/lib/index-BaOOUFsA.js +0 -412
- package/lib/index-BaOOUFsA.js.map +0 -1
- package/lib/index-CPvRaBBB.js +0 -713
- package/lib/index-CPvRaBBB.js.map +0 -1
- package/lib/index-Cpdpun6t.js.map +0 -1
- package/lib/index-DLS6fPwU.js +0 -464
- package/lib/index-DLS6fPwU.js.map +0 -1
- package/lib/jsx-runtime-SV6hXQua.js +0 -3009
- package/lib/jsx-runtime-SV6hXQua.js.map +0 -1
- package/lib/loglevel-CA34MiFn.js +0 -153
- package/lib/loglevel-CA34MiFn.js.map +0 -1
- package/lib/util-CCWvaWo7.js +0 -41
- package/lib/util-CCWvaWo7.js.map +0 -1
- package/src/lib/components/Router.tsx +0 -24
package/lib/zudoku.components.js
CHANGED
|
@@ -1,58 +1,33 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
1
|
+
var ye = Object.defineProperty;
|
|
2
|
+
var V = (t) => {
|
|
3
3
|
throw TypeError(t);
|
|
4
4
|
};
|
|
5
|
-
var
|
|
6
|
-
var g = (t, e, s) =>
|
|
7
|
-
var
|
|
8
|
-
var
|
|
9
|
-
set _(
|
|
10
|
-
|
|
5
|
+
var pe = (t, e, s) => e in t ? ye(t, e, { enumerable: !0, configurable: !0, writable: !0, value: s }) : t[e] = s;
|
|
6
|
+
var g = (t, e, s) => pe(t, typeof e != "symbol" ? e + "" : e, s), X = (t, e, s) => e.has(t) || V("Cannot " + s);
|
|
7
|
+
var n = (t, e, s) => (X(t, e, "read from private field"), s ? s.call(t) : e.get(t)), y = (t, e, s) => e.has(t) ? V("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(t) : e.set(t, s), c = (t, e, s, r) => (X(t, e, "write to private field"), r ? r.call(t, s) : e.set(t, s), s);
|
|
8
|
+
var q = (t, e, s, r) => ({
|
|
9
|
+
set _(a) {
|
|
10
|
+
c(t, e, a, s);
|
|
11
11
|
},
|
|
12
12
|
get _() {
|
|
13
|
-
return
|
|
13
|
+
return n(t, e, r);
|
|
14
14
|
}
|
|
15
15
|
});
|
|
16
|
-
import { c as
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
24
|
-
import { u as xt } from "./hook-BzBeIPL4.js";
|
|
25
|
-
import { u as D, O as yt, a as bt } from "./index-DLS6fPwU.js";
|
|
26
|
-
import { R as Pe, T as we, C as Ce, S as jt } from "./Spinner-BG1JnYy0.js";
|
|
27
|
-
import { c as L } from "./cn-DpqTslo9.js";
|
|
28
|
-
import { c as G, i as W, j as Ne, a as Pt } from "./util-CCWvaWo7.js";
|
|
16
|
+
import { c as ae, N as ve, a as be, u as Pe, M as xe, T as Me, V as Ce, C as we, L as Qe } from "./MdxComponents-Ev_hBHb2.js";
|
|
17
|
+
import { j as i } from "./jsx-runtime-CM0TzjGp.js";
|
|
18
|
+
import { S as ne, h as ie, Q as Oe, n as m, m as G, a as J, b, e as Ee, c as ke, d as De, f as je, o as W, r as Y, g as Ae, i as Z, p as $, s as Ne, u as oe, j as qe, D as Fe } from "./DevPortalProvider-BlxLX6GG.js";
|
|
19
|
+
import { createContext as ue, Component as Te, createElement as _, isValidElement as Se, memo as le, useMemo as S, useEffect as Ie, Fragment as He } from "react";
|
|
20
|
+
import { H as Ke, M as Be, u as ze } from "./index.esm-CPEExBJE.js";
|
|
21
|
+
import { c as Le } from "./state-Ds_OxRHP.js";
|
|
22
|
+
import { M as Re } from "./mutation-91kw0lHb.js";
|
|
23
|
+
import { E as Ue, u as Ve } from "./hook-CTmJ6CWq.js";
|
|
29
24
|
/**
|
|
30
25
|
* @license lucide-react v0.378.0 - ISC
|
|
31
26
|
*
|
|
32
27
|
* This source code is licensed under the ISC license.
|
|
33
28
|
* See the LICENSE file in the root directory of this source tree.
|
|
34
29
|
*/
|
|
35
|
-
const
|
|
36
|
-
["path", { d: "m9 18 6-6-6-6", key: "mthhwq" }]
|
|
37
|
-
]);
|
|
38
|
-
/**
|
|
39
|
-
* @license lucide-react v0.378.0 - ISC
|
|
40
|
-
*
|
|
41
|
-
* This source code is licensed under the ISC license.
|
|
42
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
43
|
-
*/
|
|
44
|
-
const wt = B("ExternalLink", [
|
|
45
|
-
["path", { d: "M15 3h6v6", key: "1q9fwt" }],
|
|
46
|
-
["path", { d: "M10 14 21 3", key: "gplh6r" }],
|
|
47
|
-
["path", { d: "M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6", key: "a6xqqp" }]
|
|
48
|
-
]);
|
|
49
|
-
/**
|
|
50
|
-
* @license lucide-react v0.378.0 - ISC
|
|
51
|
-
*
|
|
52
|
-
* This source code is licensed under the ISC license.
|
|
53
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
54
|
-
*/
|
|
55
|
-
const Ct = B("MoonStar", [
|
|
30
|
+
const Xe = ae("MoonStar", [
|
|
56
31
|
["path", { d: "M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9", key: "4ay0iu" }],
|
|
57
32
|
["path", { d: "M20 3v4", key: "1olli1" }],
|
|
58
33
|
["path", { d: "M22 5h-4", key: "1gvqau" }]
|
|
@@ -63,7 +38,7 @@ const Ct = B("MoonStar", [
|
|
|
63
38
|
* This source code is licensed under the ISC license.
|
|
64
39
|
* See the LICENSE file in the root directory of this source tree.
|
|
65
40
|
*/
|
|
66
|
-
const
|
|
41
|
+
const Ge = ae("Sun", [
|
|
67
42
|
["circle", { cx: "12", cy: "12", r: "4", key: "4exip2" }],
|
|
68
43
|
["path", { d: "M12 2v2", key: "tus03m" }],
|
|
69
44
|
["path", { d: "M12 20v2", key: "1lh1kg" }],
|
|
@@ -74,138 +49,138 @@ const Nt = B("Sun", [
|
|
|
74
49
|
["path", { d: "m6.34 17.66-1.41 1.41", key: "1m8zz5" }],
|
|
75
50
|
["path", { d: "m19.07 4.93-1.41 1.41", key: "1shlcs" }]
|
|
76
51
|
]);
|
|
77
|
-
var
|
|
52
|
+
var v, te, Je = (te = class extends ne {
|
|
78
53
|
constructor(e = {}) {
|
|
79
54
|
super();
|
|
80
|
-
|
|
81
|
-
this.config = e,
|
|
55
|
+
y(this, v);
|
|
56
|
+
this.config = e, c(this, v, /* @__PURE__ */ new Map());
|
|
82
57
|
}
|
|
83
|
-
build(e, s,
|
|
84
|
-
const
|
|
85
|
-
let
|
|
86
|
-
return
|
|
58
|
+
build(e, s, r) {
|
|
59
|
+
const a = s.queryKey, o = s.queryHash ?? ie(a, s);
|
|
60
|
+
let u = this.get(o);
|
|
61
|
+
return u || (u = new Oe({
|
|
87
62
|
cache: this,
|
|
88
|
-
queryKey:
|
|
63
|
+
queryKey: a,
|
|
89
64
|
queryHash: o,
|
|
90
65
|
options: e.defaultQueryOptions(s),
|
|
91
|
-
state:
|
|
92
|
-
defaultOptions: e.getQueryDefaults(
|
|
93
|
-
}), this.add(
|
|
66
|
+
state: r,
|
|
67
|
+
defaultOptions: e.getQueryDefaults(a)
|
|
68
|
+
}), this.add(u)), u;
|
|
94
69
|
}
|
|
95
70
|
add(e) {
|
|
96
|
-
|
|
71
|
+
n(this, v).has(e.queryHash) || (n(this, v).set(e.queryHash, e), this.notify({
|
|
97
72
|
type: "added",
|
|
98
73
|
query: e
|
|
99
74
|
}));
|
|
100
75
|
}
|
|
101
76
|
remove(e) {
|
|
102
|
-
const s =
|
|
103
|
-
s && (e.destroy(), s === e &&
|
|
77
|
+
const s = n(this, v).get(e.queryHash);
|
|
78
|
+
s && (e.destroy(), s === e && n(this, v).delete(e.queryHash), this.notify({ type: "removed", query: e }));
|
|
104
79
|
}
|
|
105
80
|
clear() {
|
|
106
|
-
|
|
81
|
+
m.batch(() => {
|
|
107
82
|
this.getAll().forEach((e) => {
|
|
108
83
|
this.remove(e);
|
|
109
84
|
});
|
|
110
85
|
});
|
|
111
86
|
}
|
|
112
87
|
get(e) {
|
|
113
|
-
return
|
|
88
|
+
return n(this, v).get(e);
|
|
114
89
|
}
|
|
115
90
|
getAll() {
|
|
116
|
-
return [...
|
|
91
|
+
return [...n(this, v).values()];
|
|
117
92
|
}
|
|
118
93
|
find(e) {
|
|
119
94
|
const s = { exact: !0, ...e };
|
|
120
95
|
return this.getAll().find(
|
|
121
|
-
(
|
|
96
|
+
(r) => G(s, r)
|
|
122
97
|
);
|
|
123
98
|
}
|
|
124
99
|
findAll(e = {}) {
|
|
125
100
|
const s = this.getAll();
|
|
126
|
-
return Object.keys(e).length > 0 ? s.filter((
|
|
101
|
+
return Object.keys(e).length > 0 ? s.filter((r) => G(e, r)) : s;
|
|
127
102
|
}
|
|
128
103
|
notify(e) {
|
|
129
|
-
|
|
104
|
+
m.batch(() => {
|
|
130
105
|
this.listeners.forEach((s) => {
|
|
131
106
|
s(e);
|
|
132
107
|
});
|
|
133
108
|
});
|
|
134
109
|
}
|
|
135
110
|
onFocus() {
|
|
136
|
-
|
|
111
|
+
m.batch(() => {
|
|
137
112
|
this.getAll().forEach((e) => {
|
|
138
113
|
e.onFocus();
|
|
139
114
|
});
|
|
140
115
|
});
|
|
141
116
|
}
|
|
142
117
|
onOnline() {
|
|
143
|
-
|
|
118
|
+
m.batch(() => {
|
|
144
119
|
this.getAll().forEach((e) => {
|
|
145
120
|
e.onOnline();
|
|
146
121
|
});
|
|
147
122
|
});
|
|
148
123
|
}
|
|
149
|
-
},
|
|
124
|
+
}, v = new WeakMap(), te), f, A, se, We = (se = class extends ne {
|
|
150
125
|
constructor(e = {}) {
|
|
151
126
|
super();
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
this.config = e,
|
|
127
|
+
y(this, f);
|
|
128
|
+
y(this, A);
|
|
129
|
+
this.config = e, c(this, f, /* @__PURE__ */ new Map()), c(this, A, Date.now());
|
|
155
130
|
}
|
|
156
|
-
build(e, s,
|
|
157
|
-
const
|
|
131
|
+
build(e, s, r) {
|
|
132
|
+
const a = new Re({
|
|
158
133
|
mutationCache: this,
|
|
159
|
-
mutationId: ++
|
|
134
|
+
mutationId: ++q(this, A)._,
|
|
160
135
|
options: e.defaultMutationOptions(s),
|
|
161
|
-
state:
|
|
136
|
+
state: r
|
|
162
137
|
});
|
|
163
|
-
return this.add(
|
|
138
|
+
return this.add(a), a;
|
|
164
139
|
}
|
|
165
140
|
add(e) {
|
|
166
|
-
const s = F(e),
|
|
167
|
-
|
|
141
|
+
const s = F(e), r = n(this, f).get(s) ?? [];
|
|
142
|
+
r.push(e), n(this, f).set(s, r), this.notify({ type: "added", mutation: e });
|
|
168
143
|
}
|
|
169
144
|
remove(e) {
|
|
170
|
-
var
|
|
145
|
+
var r;
|
|
171
146
|
const s = F(e);
|
|
172
|
-
if (
|
|
173
|
-
const
|
|
174
|
-
|
|
147
|
+
if (n(this, f).has(s)) {
|
|
148
|
+
const a = (r = n(this, f).get(s)) == null ? void 0 : r.filter((o) => o !== e);
|
|
149
|
+
a && (a.length === 0 ? n(this, f).delete(s) : n(this, f).set(s, a));
|
|
175
150
|
}
|
|
176
151
|
this.notify({ type: "removed", mutation: e });
|
|
177
152
|
}
|
|
178
153
|
canRun(e) {
|
|
179
|
-
var
|
|
180
|
-
const s = (
|
|
154
|
+
var r;
|
|
155
|
+
const s = (r = n(this, f).get(F(e))) == null ? void 0 : r.find((a) => a.state.status === "pending");
|
|
181
156
|
return !s || s === e;
|
|
182
157
|
}
|
|
183
158
|
runNext(e) {
|
|
184
|
-
var
|
|
185
|
-
const s = (
|
|
159
|
+
var r;
|
|
160
|
+
const s = (r = n(this, f).get(F(e))) == null ? void 0 : r.find((a) => a !== e && a.state.isPaused);
|
|
186
161
|
return (s == null ? void 0 : s.continue()) ?? Promise.resolve();
|
|
187
162
|
}
|
|
188
163
|
clear() {
|
|
189
|
-
|
|
164
|
+
m.batch(() => {
|
|
190
165
|
this.getAll().forEach((e) => {
|
|
191
166
|
this.remove(e);
|
|
192
167
|
});
|
|
193
168
|
});
|
|
194
169
|
}
|
|
195
170
|
getAll() {
|
|
196
|
-
return [...
|
|
171
|
+
return [...n(this, f).values()].flat();
|
|
197
172
|
}
|
|
198
173
|
find(e) {
|
|
199
174
|
const s = { exact: !0, ...e };
|
|
200
175
|
return this.getAll().find(
|
|
201
|
-
(
|
|
176
|
+
(r) => J(s, r)
|
|
202
177
|
);
|
|
203
178
|
}
|
|
204
179
|
findAll(e = {}) {
|
|
205
|
-
return this.getAll().filter((s) =>
|
|
180
|
+
return this.getAll().filter((s) => J(e, s));
|
|
206
181
|
}
|
|
207
182
|
notify(e) {
|
|
208
|
-
|
|
183
|
+
m.batch(() => {
|
|
209
184
|
this.listeners.forEach((s) => {
|
|
210
185
|
s(e);
|
|
211
186
|
});
|
|
@@ -213,76 +188,76 @@ var y, fe, kt = (fe = class extends ge {
|
|
|
213
188
|
}
|
|
214
189
|
resumePausedMutations() {
|
|
215
190
|
const e = this.getAll().filter((s) => s.state.isPaused);
|
|
216
|
-
return
|
|
191
|
+
return m.batch(
|
|
217
192
|
() => Promise.all(
|
|
218
|
-
e.map((s) => s.continue().catch(
|
|
193
|
+
e.map((s) => s.continue().catch(b))
|
|
219
194
|
)
|
|
220
195
|
);
|
|
221
196
|
}
|
|
222
|
-
},
|
|
197
|
+
}, f = new WeakMap(), A = new WeakMap(), se);
|
|
223
198
|
function F(t) {
|
|
224
199
|
var e;
|
|
225
200
|
return ((e = t.options.scope) == null ? void 0 : e.id) ?? String(t.mutationId);
|
|
226
201
|
}
|
|
227
|
-
function
|
|
202
|
+
function Ye(t) {
|
|
228
203
|
return {
|
|
229
204
|
onFetch: (e, s) => {
|
|
230
|
-
const
|
|
231
|
-
var
|
|
232
|
-
const
|
|
233
|
-
let
|
|
234
|
-
const
|
|
235
|
-
Object.defineProperty(
|
|
205
|
+
const r = async () => {
|
|
206
|
+
var H, K, B, z, L;
|
|
207
|
+
const a = e.options, o = (B = (K = (H = e.fetchOptions) == null ? void 0 : H.meta) == null ? void 0 : K.fetchMore) == null ? void 0 : B.direction, u = ((z = e.state.data) == null ? void 0 : z.pages) || [], d = ((L = e.state.data) == null ? void 0 : L.pageParams) || [], h = { pages: [], pageParams: [] };
|
|
208
|
+
let P = !1;
|
|
209
|
+
const fe = (p) => {
|
|
210
|
+
Object.defineProperty(p, "signal", {
|
|
236
211
|
enumerable: !0,
|
|
237
|
-
get: () => (e.signal.aborted ?
|
|
238
|
-
|
|
212
|
+
get: () => (e.signal.aborted ? P = !0 : e.signal.addEventListener("abort", () => {
|
|
213
|
+
P = !0;
|
|
239
214
|
}), e.signal)
|
|
240
215
|
});
|
|
241
|
-
},
|
|
242
|
-
if (
|
|
216
|
+
}, me = Ee(e.options, e.fetchOptions), T = async (p, x, Q) => {
|
|
217
|
+
if (P)
|
|
243
218
|
return Promise.reject();
|
|
244
|
-
if (
|
|
245
|
-
return Promise.resolve(
|
|
246
|
-
const
|
|
219
|
+
if (x == null && p.pages.length)
|
|
220
|
+
return Promise.resolve(p);
|
|
221
|
+
const N = {
|
|
247
222
|
queryKey: e.queryKey,
|
|
248
|
-
pageParam:
|
|
249
|
-
direction:
|
|
223
|
+
pageParam: x,
|
|
224
|
+
direction: Q ? "backward" : "forward",
|
|
250
225
|
meta: e.options.meta
|
|
251
226
|
};
|
|
252
|
-
|
|
253
|
-
const
|
|
254
|
-
|
|
255
|
-
), { maxPages:
|
|
227
|
+
fe(N);
|
|
228
|
+
const ge = await me(
|
|
229
|
+
N
|
|
230
|
+
), { maxPages: R } = e.options, U = Q ? ke : De;
|
|
256
231
|
return {
|
|
257
|
-
pages:
|
|
258
|
-
pageParams:
|
|
232
|
+
pages: U(p.pages, ge, R),
|
|
233
|
+
pageParams: U(p.pageParams, x, R)
|
|
259
234
|
};
|
|
260
235
|
};
|
|
261
|
-
let
|
|
262
|
-
if (o &&
|
|
263
|
-
const
|
|
264
|
-
pages:
|
|
265
|
-
pageParams:
|
|
266
|
-
},
|
|
267
|
-
|
|
236
|
+
let O;
|
|
237
|
+
if (o && u.length) {
|
|
238
|
+
const p = o === "backward", x = p ? Ze : ee, Q = {
|
|
239
|
+
pages: u,
|
|
240
|
+
pageParams: d
|
|
241
|
+
}, N = x(a, Q);
|
|
242
|
+
O = await T(Q, N, p);
|
|
268
243
|
} else {
|
|
269
|
-
|
|
244
|
+
O = await T(
|
|
270
245
|
h,
|
|
271
|
-
|
|
246
|
+
d[0] ?? a.initialPageParam
|
|
272
247
|
);
|
|
273
|
-
const
|
|
274
|
-
for (let
|
|
275
|
-
const
|
|
276
|
-
|
|
248
|
+
const p = t ?? u.length;
|
|
249
|
+
for (let x = 1; x < p; x++) {
|
|
250
|
+
const Q = ee(a, O);
|
|
251
|
+
O = await T(O, Q);
|
|
277
252
|
}
|
|
278
253
|
}
|
|
279
|
-
return
|
|
254
|
+
return O;
|
|
280
255
|
};
|
|
281
256
|
e.options.persister ? e.fetchFn = () => {
|
|
282
|
-
var
|
|
283
|
-
return (o = (
|
|
284
|
-
r,
|
|
257
|
+
var a, o;
|
|
258
|
+
return (o = (a = e.options).persister) == null ? void 0 : o.call(
|
|
285
259
|
a,
|
|
260
|
+
r,
|
|
286
261
|
{
|
|
287
262
|
queryKey: e.queryKey,
|
|
288
263
|
meta: e.options.meta,
|
|
@@ -290,22 +265,22 @@ function Ot(t) {
|
|
|
290
265
|
},
|
|
291
266
|
s
|
|
292
267
|
);
|
|
293
|
-
} : e.fetchFn =
|
|
268
|
+
} : e.fetchFn = r;
|
|
294
269
|
}
|
|
295
270
|
};
|
|
296
271
|
}
|
|
297
|
-
function
|
|
298
|
-
const
|
|
272
|
+
function ee(t, { pages: e, pageParams: s }) {
|
|
273
|
+
const r = e.length - 1;
|
|
299
274
|
return t.getNextPageParam(
|
|
300
|
-
e[
|
|
275
|
+
e[r],
|
|
301
276
|
e,
|
|
302
|
-
s[
|
|
277
|
+
s[r],
|
|
303
278
|
s
|
|
304
279
|
);
|
|
305
280
|
}
|
|
306
|
-
function
|
|
307
|
-
var
|
|
308
|
-
return (
|
|
281
|
+
function Ze(t, { pages: e, pageParams: s }) {
|
|
282
|
+
var r;
|
|
283
|
+
return (r = t.getPreviousPageParam) == null ? void 0 : r.call(
|
|
309
284
|
t,
|
|
310
285
|
e[0],
|
|
311
286
|
e,
|
|
@@ -313,102 +288,102 @@ function At(t, { pages: e, pageParams: s }) {
|
|
|
313
288
|
s
|
|
314
289
|
);
|
|
315
290
|
}
|
|
316
|
-
var
|
|
291
|
+
var l, M, C, E, k, w, D, j, re, $e = (re = class {
|
|
317
292
|
constructor(t = {}) {
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
293
|
+
y(this, l);
|
|
294
|
+
y(this, M);
|
|
295
|
+
y(this, C);
|
|
296
|
+
y(this, E);
|
|
297
|
+
y(this, k);
|
|
298
|
+
y(this, w);
|
|
299
|
+
y(this, D);
|
|
300
|
+
y(this, j);
|
|
301
|
+
c(this, l, t.queryCache || new Je()), c(this, M, t.mutationCache || new We()), c(this, C, t.defaultOptions || {}), c(this, E, /* @__PURE__ */ new Map()), c(this, k, /* @__PURE__ */ new Map()), c(this, w, 0);
|
|
327
302
|
}
|
|
328
303
|
mount() {
|
|
329
|
-
|
|
330
|
-
t && (await this.resumePausedMutations(),
|
|
331
|
-
})),
|
|
332
|
-
t && (await this.resumePausedMutations(),
|
|
304
|
+
q(this, w)._++, n(this, w) === 1 && (c(this, D, je.subscribe(async (t) => {
|
|
305
|
+
t && (await this.resumePausedMutations(), n(this, l).onFocus());
|
|
306
|
+
})), c(this, j, W.subscribe(async (t) => {
|
|
307
|
+
t && (await this.resumePausedMutations(), n(this, l).onOnline());
|
|
333
308
|
})));
|
|
334
309
|
}
|
|
335
310
|
unmount() {
|
|
336
311
|
var t, e;
|
|
337
|
-
|
|
312
|
+
q(this, w)._--, n(this, w) === 0 && ((t = n(this, D)) == null || t.call(this), c(this, D, void 0), (e = n(this, j)) == null || e.call(this), c(this, j, void 0));
|
|
338
313
|
}
|
|
339
314
|
isFetching(t) {
|
|
340
|
-
return
|
|
315
|
+
return n(this, l).findAll({ ...t, fetchStatus: "fetching" }).length;
|
|
341
316
|
}
|
|
342
317
|
isMutating(t) {
|
|
343
|
-
return
|
|
318
|
+
return n(this, M).findAll({ ...t, status: "pending" }).length;
|
|
344
319
|
}
|
|
345
320
|
getQueryData(t) {
|
|
346
321
|
var s;
|
|
347
322
|
const e = this.defaultQueryOptions({ queryKey: t });
|
|
348
|
-
return (s =
|
|
323
|
+
return (s = n(this, l).get(e.queryHash)) == null ? void 0 : s.state.data;
|
|
349
324
|
}
|
|
350
325
|
ensureQueryData(t) {
|
|
351
326
|
const e = this.getQueryData(t.queryKey);
|
|
352
327
|
if (e === void 0)
|
|
353
328
|
return this.fetchQuery(t);
|
|
354
329
|
{
|
|
355
|
-
const s = this.defaultQueryOptions(t),
|
|
356
|
-
return t.revalidateIfStale &&
|
|
330
|
+
const s = this.defaultQueryOptions(t), r = n(this, l).build(this, s);
|
|
331
|
+
return t.revalidateIfStale && r.isStaleByTime(Y(s.staleTime, r)) && this.prefetchQuery(s), Promise.resolve(e);
|
|
357
332
|
}
|
|
358
333
|
}
|
|
359
334
|
getQueriesData(t) {
|
|
360
|
-
return
|
|
361
|
-
const
|
|
362
|
-
return [e,
|
|
335
|
+
return n(this, l).findAll(t).map(({ queryKey: e, state: s }) => {
|
|
336
|
+
const r = s.data;
|
|
337
|
+
return [e, r];
|
|
363
338
|
});
|
|
364
339
|
}
|
|
365
340
|
setQueryData(t, e, s) {
|
|
366
|
-
const
|
|
367
|
-
|
|
368
|
-
), o =
|
|
369
|
-
if (
|
|
370
|
-
return
|
|
341
|
+
const r = this.defaultQueryOptions({ queryKey: t }), a = n(this, l).get(
|
|
342
|
+
r.queryHash
|
|
343
|
+
), o = a == null ? void 0 : a.state.data, u = Ae(e, o);
|
|
344
|
+
if (u !== void 0)
|
|
345
|
+
return n(this, l).build(this, r).setData(u, { ...s, manual: !0 });
|
|
371
346
|
}
|
|
372
347
|
setQueriesData(t, e, s) {
|
|
373
|
-
return
|
|
374
|
-
() =>
|
|
375
|
-
|
|
376
|
-
this.setQueryData(
|
|
348
|
+
return m.batch(
|
|
349
|
+
() => n(this, l).findAll(t).map(({ queryKey: r }) => [
|
|
350
|
+
r,
|
|
351
|
+
this.setQueryData(r, e, s)
|
|
377
352
|
])
|
|
378
353
|
);
|
|
379
354
|
}
|
|
380
355
|
getQueryState(t) {
|
|
381
356
|
var s;
|
|
382
357
|
const e = this.defaultQueryOptions({ queryKey: t });
|
|
383
|
-
return (s =
|
|
358
|
+
return (s = n(this, l).get(e.queryHash)) == null ? void 0 : s.state;
|
|
384
359
|
}
|
|
385
360
|
removeQueries(t) {
|
|
386
|
-
const e =
|
|
387
|
-
|
|
361
|
+
const e = n(this, l);
|
|
362
|
+
m.batch(() => {
|
|
388
363
|
e.findAll(t).forEach((s) => {
|
|
389
364
|
e.remove(s);
|
|
390
365
|
});
|
|
391
366
|
});
|
|
392
367
|
}
|
|
393
368
|
resetQueries(t, e) {
|
|
394
|
-
const s =
|
|
369
|
+
const s = n(this, l), r = {
|
|
395
370
|
type: "active",
|
|
396
371
|
...t
|
|
397
372
|
};
|
|
398
|
-
return
|
|
399
|
-
|
|
400
|
-
}), this.refetchQueries(
|
|
373
|
+
return m.batch(() => (s.findAll(t).forEach((a) => {
|
|
374
|
+
a.reset();
|
|
375
|
+
}), this.refetchQueries(r, e)));
|
|
401
376
|
}
|
|
402
377
|
cancelQueries(t = {}, e = {}) {
|
|
403
|
-
const s = { revert: !0, ...e },
|
|
404
|
-
() =>
|
|
378
|
+
const s = { revert: !0, ...e }, r = m.batch(
|
|
379
|
+
() => n(this, l).findAll(t).map((a) => a.cancel(s))
|
|
405
380
|
);
|
|
406
|
-
return Promise.all(
|
|
381
|
+
return Promise.all(r).then(b).catch(b);
|
|
407
382
|
}
|
|
408
383
|
invalidateQueries(t = {}, e = {}) {
|
|
409
|
-
return
|
|
410
|
-
if (
|
|
411
|
-
|
|
384
|
+
return m.batch(() => {
|
|
385
|
+
if (n(this, l).findAll(t).forEach((r) => {
|
|
386
|
+
r.invalidate();
|
|
412
387
|
}), t.refetchType === "none")
|
|
413
388
|
return Promise.resolve();
|
|
414
389
|
const s = {
|
|
@@ -422,105 +397,105 @@ var u, w, C, O, A, N, E, Q, pe, Et = (pe = class {
|
|
|
422
397
|
const s = {
|
|
423
398
|
...e,
|
|
424
399
|
cancelRefetch: (e == null ? void 0 : e.cancelRefetch) ?? !0
|
|
425
|
-
},
|
|
426
|
-
() =>
|
|
427
|
-
let o =
|
|
428
|
-
return s.throwOnError || (o = o.catch(
|
|
400
|
+
}, r = m.batch(
|
|
401
|
+
() => n(this, l).findAll(t).filter((a) => !a.isDisabled()).map((a) => {
|
|
402
|
+
let o = a.fetch(void 0, s);
|
|
403
|
+
return s.throwOnError || (o = o.catch(b)), a.state.fetchStatus === "paused" ? Promise.resolve() : o;
|
|
429
404
|
})
|
|
430
405
|
);
|
|
431
|
-
return Promise.all(
|
|
406
|
+
return Promise.all(r).then(b);
|
|
432
407
|
}
|
|
433
408
|
fetchQuery(t) {
|
|
434
409
|
const e = this.defaultQueryOptions(t);
|
|
435
410
|
e.retry === void 0 && (e.retry = !1);
|
|
436
|
-
const s =
|
|
411
|
+
const s = n(this, l).build(this, e);
|
|
437
412
|
return s.isStaleByTime(
|
|
438
|
-
|
|
413
|
+
Y(e.staleTime, s)
|
|
439
414
|
) ? s.fetch(e) : Promise.resolve(s.state.data);
|
|
440
415
|
}
|
|
441
416
|
prefetchQuery(t) {
|
|
442
|
-
return this.fetchQuery(t).then(
|
|
417
|
+
return this.fetchQuery(t).then(b).catch(b);
|
|
443
418
|
}
|
|
444
419
|
fetchInfiniteQuery(t) {
|
|
445
|
-
return t.behavior =
|
|
420
|
+
return t.behavior = Ye(t.pages), this.fetchQuery(t);
|
|
446
421
|
}
|
|
447
422
|
prefetchInfiniteQuery(t) {
|
|
448
|
-
return this.fetchInfiniteQuery(t).then(
|
|
423
|
+
return this.fetchInfiniteQuery(t).then(b).catch(b);
|
|
449
424
|
}
|
|
450
425
|
resumePausedMutations() {
|
|
451
|
-
return
|
|
426
|
+
return W.isOnline() ? n(this, M).resumePausedMutations() : Promise.resolve();
|
|
452
427
|
}
|
|
453
428
|
getQueryCache() {
|
|
454
|
-
return
|
|
429
|
+
return n(this, l);
|
|
455
430
|
}
|
|
456
431
|
getMutationCache() {
|
|
457
|
-
return
|
|
432
|
+
return n(this, M);
|
|
458
433
|
}
|
|
459
434
|
getDefaultOptions() {
|
|
460
|
-
return
|
|
435
|
+
return n(this, C);
|
|
461
436
|
}
|
|
462
437
|
setDefaultOptions(t) {
|
|
463
|
-
|
|
438
|
+
c(this, C, t);
|
|
464
439
|
}
|
|
465
440
|
setQueryDefaults(t, e) {
|
|
466
|
-
|
|
441
|
+
n(this, E).set(Z(t), {
|
|
467
442
|
queryKey: t,
|
|
468
443
|
defaultOptions: e
|
|
469
444
|
});
|
|
470
445
|
}
|
|
471
446
|
getQueryDefaults(t) {
|
|
472
|
-
const e = [...
|
|
447
|
+
const e = [...n(this, E).values()];
|
|
473
448
|
let s = {};
|
|
474
|
-
return e.forEach((
|
|
475
|
-
|
|
449
|
+
return e.forEach((r) => {
|
|
450
|
+
$(t, r.queryKey) && (s = { ...s, ...r.defaultOptions });
|
|
476
451
|
}), s;
|
|
477
452
|
}
|
|
478
453
|
setMutationDefaults(t, e) {
|
|
479
|
-
|
|
454
|
+
n(this, k).set(Z(t), {
|
|
480
455
|
mutationKey: t,
|
|
481
456
|
defaultOptions: e
|
|
482
457
|
});
|
|
483
458
|
}
|
|
484
459
|
getMutationDefaults(t) {
|
|
485
|
-
const e = [...
|
|
460
|
+
const e = [...n(this, k).values()];
|
|
486
461
|
let s = {};
|
|
487
|
-
return e.forEach((
|
|
488
|
-
|
|
462
|
+
return e.forEach((r) => {
|
|
463
|
+
$(t, r.mutationKey) && (s = { ...s, ...r.defaultOptions });
|
|
489
464
|
}), s;
|
|
490
465
|
}
|
|
491
466
|
defaultQueryOptions(t) {
|
|
492
467
|
if (t._defaulted)
|
|
493
468
|
return t;
|
|
494
469
|
const e = {
|
|
495
|
-
...
|
|
470
|
+
...n(this, C).queries,
|
|
496
471
|
...this.getQueryDefaults(t.queryKey),
|
|
497
472
|
...t,
|
|
498
473
|
_defaulted: !0
|
|
499
474
|
};
|
|
500
|
-
return e.queryHash || (e.queryHash =
|
|
475
|
+
return e.queryHash || (e.queryHash = ie(
|
|
501
476
|
e.queryKey,
|
|
502
477
|
e
|
|
503
|
-
)), 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.enabled !== !0 && 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.enabled !== !0 && e.queryFn === Ne && (e.enabled = !1), e;
|
|
504
479
|
}
|
|
505
480
|
defaultMutationOptions(t) {
|
|
506
481
|
return t != null && t._defaulted ? t : {
|
|
507
|
-
...
|
|
482
|
+
...n(this, C).mutations,
|
|
508
483
|
...(t == null ? void 0 : t.mutationKey) && this.getMutationDefaults(t.mutationKey),
|
|
509
484
|
...t,
|
|
510
485
|
_defaulted: !0
|
|
511
486
|
};
|
|
512
487
|
}
|
|
513
488
|
clear() {
|
|
514
|
-
|
|
489
|
+
n(this, l).clear(), n(this, M).clear();
|
|
515
490
|
}
|
|
516
|
-
},
|
|
517
|
-
const
|
|
491
|
+
}, l = new WeakMap(), M = new WeakMap(), C = new WeakMap(), E = new WeakMap(), k = new WeakMap(), w = new WeakMap(), D = new WeakMap(), j = new WeakMap(), re);
|
|
492
|
+
const _e = ue(null), I = {
|
|
518
493
|
didCatch: !1,
|
|
519
494
|
error: null
|
|
520
495
|
};
|
|
521
|
-
class
|
|
496
|
+
class et extends Te {
|
|
522
497
|
constructor(e) {
|
|
523
|
-
super(e), this.resetErrorBoundary = this.resetErrorBoundary.bind(this), this.state =
|
|
498
|
+
super(e), this.resetErrorBoundary = this.resetErrorBoundary.bind(this), this.state = I;
|
|
524
499
|
}
|
|
525
500
|
static getDerivedStateFromError(e) {
|
|
526
501
|
return {
|
|
@@ -533,73 +508,73 @@ class Dt extends ot {
|
|
|
533
508
|
error: e
|
|
534
509
|
} = this.state;
|
|
535
510
|
if (e !== null) {
|
|
536
|
-
for (var s,
|
|
537
|
-
o[
|
|
538
|
-
(s = (
|
|
511
|
+
for (var s, r, a = arguments.length, o = new Array(a), u = 0; u < a; u++)
|
|
512
|
+
o[u] = arguments[u];
|
|
513
|
+
(s = (r = this.props).onReset) === null || s === void 0 || s.call(r, {
|
|
539
514
|
args: o,
|
|
540
515
|
reason: "imperative-api"
|
|
541
|
-
}), this.setState(
|
|
516
|
+
}), this.setState(I);
|
|
542
517
|
}
|
|
543
518
|
}
|
|
544
519
|
componentDidCatch(e, s) {
|
|
545
|
-
var
|
|
546
|
-
(
|
|
520
|
+
var r, a;
|
|
521
|
+
(r = (a = this.props).onError) === null || r === void 0 || r.call(a, e, s);
|
|
547
522
|
}
|
|
548
523
|
componentDidUpdate(e, s) {
|
|
549
524
|
const {
|
|
550
|
-
didCatch:
|
|
525
|
+
didCatch: r
|
|
551
526
|
} = this.state, {
|
|
552
|
-
resetKeys:
|
|
527
|
+
resetKeys: a
|
|
553
528
|
} = this.props;
|
|
554
|
-
if (
|
|
555
|
-
var o,
|
|
556
|
-
(o = (
|
|
557
|
-
next:
|
|
529
|
+
if (r && s.error !== null && tt(e.resetKeys, a)) {
|
|
530
|
+
var o, u;
|
|
531
|
+
(o = (u = this.props).onReset) === null || o === void 0 || o.call(u, {
|
|
532
|
+
next: a,
|
|
558
533
|
prev: e.resetKeys,
|
|
559
534
|
reason: "keys"
|
|
560
|
-
}), this.setState(
|
|
535
|
+
}), this.setState(I);
|
|
561
536
|
}
|
|
562
537
|
}
|
|
563
538
|
render() {
|
|
564
539
|
const {
|
|
565
540
|
children: e,
|
|
566
541
|
fallbackRender: s,
|
|
567
|
-
FallbackComponent:
|
|
568
|
-
fallback:
|
|
542
|
+
FallbackComponent: r,
|
|
543
|
+
fallback: a
|
|
569
544
|
} = this.props, {
|
|
570
545
|
didCatch: o,
|
|
571
|
-
error:
|
|
546
|
+
error: u
|
|
572
547
|
} = this.state;
|
|
573
|
-
let
|
|
548
|
+
let d = e;
|
|
574
549
|
if (o) {
|
|
575
550
|
const h = {
|
|
576
|
-
error:
|
|
551
|
+
error: u,
|
|
577
552
|
resetErrorBoundary: this.resetErrorBoundary
|
|
578
553
|
};
|
|
579
554
|
if (typeof s == "function")
|
|
580
|
-
|
|
581
|
-
else if (
|
|
582
|
-
|
|
583
|
-
else if (
|
|
584
|
-
|
|
555
|
+
d = s(h);
|
|
556
|
+
else if (r)
|
|
557
|
+
d = _(r, h);
|
|
558
|
+
else if (a === null || Se(a))
|
|
559
|
+
d = a;
|
|
585
560
|
else
|
|
586
|
-
throw
|
|
561
|
+
throw u;
|
|
587
562
|
}
|
|
588
|
-
return
|
|
563
|
+
return _(_e.Provider, {
|
|
589
564
|
value: {
|
|
590
565
|
didCatch: o,
|
|
591
|
-
error:
|
|
566
|
+
error: u,
|
|
592
567
|
resetErrorBoundary: this.resetErrorBoundary
|
|
593
568
|
}
|
|
594
|
-
},
|
|
569
|
+
}, d);
|
|
595
570
|
}
|
|
596
571
|
}
|
|
597
|
-
function
|
|
572
|
+
function tt() {
|
|
598
573
|
let t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : [], e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : [];
|
|
599
|
-
return t.length !== e.length || t.some((s,
|
|
574
|
+
return t.length !== e.length || t.some((s, r) => !Object.is(s, e[r]));
|
|
600
575
|
}
|
|
601
|
-
const
|
|
602
|
-
class
|
|
576
|
+
const st = (t) => "getRoutes" in t && typeof t.getRoutes == "function", rt = (t) => "initialize" in t && typeof t.initialize == "function", at = (t) => "getHead" in t && typeof t.getHead == "function", nt = (t) => "getIdentities" in t && typeof t.getIdentities == "function", ce = new $e(), it = Le(() => ({}));
|
|
577
|
+
class ot {
|
|
603
578
|
constructor(e) {
|
|
604
579
|
g(this, "plugins", []);
|
|
605
580
|
g(this, "navigationPlugins");
|
|
@@ -610,27 +585,27 @@ class Rt {
|
|
|
610
585
|
g(this, "state");
|
|
611
586
|
g(this, "initialize", async () => {
|
|
612
587
|
await Promise.all([
|
|
613
|
-
this.plugins.filter(
|
|
588
|
+
this.plugins.filter(rt).map((e) => {
|
|
614
589
|
var s;
|
|
615
590
|
return (s = e.initialize) == null ? void 0 : s.call(e, this);
|
|
616
591
|
})
|
|
617
592
|
]);
|
|
618
593
|
});
|
|
619
594
|
g(this, "invalidateCache", async (e) => {
|
|
620
|
-
await
|
|
595
|
+
await ce.invalidateQueries({ queryKey: e });
|
|
621
596
|
});
|
|
622
597
|
g(this, "getApiIdentities", async () => (await Promise.all(
|
|
623
|
-
this.plugins.filter(
|
|
598
|
+
this.plugins.filter(nt).map((s) => s.getIdentities(this))
|
|
624
599
|
)).flat());
|
|
625
600
|
g(this, "getNavigation", async (e) => (await Promise.all(
|
|
626
601
|
this.navigationPlugins.map(
|
|
627
|
-
async (
|
|
628
|
-
var
|
|
629
|
-
return (
|
|
602
|
+
async (r) => {
|
|
603
|
+
var a;
|
|
604
|
+
return (a = r.getNavigation) == null ? void 0 : a.call(r, e);
|
|
630
605
|
}
|
|
631
606
|
)
|
|
632
|
-
)).flatMap((
|
|
633
|
-
this.plugins = e.plugins ?? [], this.navigation = e.navigation, this.navigationPlugins = this.plugins.filter(
|
|
607
|
+
)).flatMap((r) => r ?? []));
|
|
608
|
+
this.plugins = e.plugins ?? [], this.navigation = e.navigation, this.navigationPlugins = this.plugins.filter(st), this.authentication = e.authentication, this.meta = e.metadata, this.page = e.page, this.state = it;
|
|
634
609
|
}
|
|
635
610
|
async signRequest(e) {
|
|
636
611
|
if (!this.authentication)
|
|
@@ -639,23 +614,15 @@ class Rt {
|
|
|
639
614
|
return e.headers.set("Authorization", `Bearer ${s}`), e;
|
|
640
615
|
}
|
|
641
616
|
}
|
|
642
|
-
function
|
|
643
|
-
|
|
644
|
-
return /* @__PURE__ */ n.jsx("div", { className: "flex h-screen max-h-screen min-h-full items-center justify-center bg-primary-background px-4 py-16 lg:px-8", children: /* @__PURE__ */ n.jsxs("div", { className: "mx-auto max-w-[85%] sm:max-w-[50%]", children: [
|
|
645
|
-
/* @__PURE__ */ n.jsx("h1", { className: "text-4xl font-bold tracking-tight text-h1-text sm:text-5xl", children: "Something went wrong" }),
|
|
646
|
-
/* @__PURE__ */ n.jsx("p", { className: "mt-5 text-h1-text", children: e }),
|
|
647
|
-
s ? /* @__PURE__ */ n.jsx("pre", { className: "mt-5 max-h-[400px] w-full overflow-scroll rounded-md border border-input-border bg-input-background p-3 text-property-name-text text-red-700", children: s }) : null
|
|
648
|
-
] }) });
|
|
649
|
-
}
|
|
650
|
-
function Ht({ error: t, resetErrorBoundary: e }) {
|
|
651
|
-
return /* @__PURE__ */ n.jsx(Ae, { error: t });
|
|
617
|
+
function ut({ error: t, resetErrorBoundary: e }) {
|
|
618
|
+
return /* @__PURE__ */ i.jsx(Ue, { error: t });
|
|
652
619
|
}
|
|
653
|
-
const
|
|
654
|
-
const { navigation: t } =
|
|
655
|
-
return t.length <= 1 ? null : /* @__PURE__ */
|
|
656
|
-
|
|
620
|
+
const lt = () => {
|
|
621
|
+
const { navigation: t } = oe();
|
|
622
|
+
return t.length <= 1 ? null : /* @__PURE__ */ i.jsx("nav", { className: "border-b border-border text-sm px-12 h-[--top-nav-height]", children: /* @__PURE__ */ i.jsx("ul", { className: "flex flex-row items-center gap-8", children: t.map((e) => /* @__PURE__ */ i.jsx("li", { children: /* @__PURE__ */ i.jsx(
|
|
623
|
+
ve,
|
|
657
624
|
{
|
|
658
|
-
className: ({ isActive: s }) =>
|
|
625
|
+
className: ({ isActive: s }) => be(
|
|
659
626
|
"block py-3.5 font-medium -mb-px border-b-2",
|
|
660
627
|
s ? "border-primary text-foreground" : "border-transparent text-foreground/75 hover:text-foreground hover:border-accent-foreground/25"
|
|
661
628
|
),
|
|
@@ -663,358 +630,80 @@ const Lt = () => {
|
|
|
663
630
|
children: e.label
|
|
664
631
|
}
|
|
665
632
|
) }, e.label)) }) });
|
|
666
|
-
},
|
|
667
|
-
const [e, s] =
|
|
668
|
-
return /* @__PURE__ */
|
|
669
|
-
/* @__PURE__ */
|
|
670
|
-
/* @__PURE__ */
|
|
671
|
-
(h == null ? void 0 : h.logo) && /* @__PURE__ */
|
|
672
|
-
/* @__PURE__ */
|
|
633
|
+
}, ct = le(function() {
|
|
634
|
+
const [e, s] = Pe(), { isAuthenticated: r, profile: a, isAuthEnabled: o, login: u, logout: d } = Ve(), { page: h } = oe(), P = e ? Xe : Ge;
|
|
635
|
+
return /* @__PURE__ */ i.jsx("header", { className: "fixed top-0 w-full z-10 bg-background/80 backdrop-blur", children: /* @__PURE__ */ i.jsxs("div", { className: "max-w-screen-2xl mx-auto", children: [
|
|
636
|
+
/* @__PURE__ */ i.jsxs("div", { className: "grid grid-cols-[calc(var(--side-nav-width))_1fr] lg:gap-12 items-center border-b border-border px-12 h-[--top-header-height]", children: [
|
|
637
|
+
/* @__PURE__ */ i.jsxs("div", { className: "flex items-center gap-3.5", children: [
|
|
638
|
+
(h == null ? void 0 : h.logo) && /* @__PURE__ */ i.jsx("img", { src: h.logo, alt: h.pageTitle, className: "h-10" }),
|
|
639
|
+
/* @__PURE__ */ i.jsx("span", { className: "font-bold text-2xl text-foreground/85 tracking-wide", children: h == null ? void 0 : h.pageTitle })
|
|
673
640
|
] }),
|
|
674
|
-
/* @__PURE__ */
|
|
675
|
-
/* @__PURE__ */
|
|
676
|
-
/* @__PURE__ */
|
|
677
|
-
o && /* @__PURE__ */
|
|
641
|
+
/* @__PURE__ */ i.jsxs("div", { className: "grid grid-cols-[--sidecar-grid-cols] items-center gap-8", children: [
|
|
642
|
+
/* @__PURE__ */ i.jsx("div", { className: "w-full max-w-prose" }),
|
|
643
|
+
/* @__PURE__ */ i.jsxs("div", { className: "items-center justify-self-end text-sm hidden lg:flex", children: [
|
|
644
|
+
o && /* @__PURE__ */ i.jsx(i.Fragment, { children: r ? /* @__PURE__ */ i.jsxs(
|
|
678
645
|
"button",
|
|
679
646
|
{
|
|
680
647
|
className: "cursor-pointer hover:bg-secondary p-1 px-2 mx-2 rounded text-nowrap",
|
|
681
|
-
onClick:
|
|
648
|
+
onClick: d,
|
|
682
649
|
children: [
|
|
683
650
|
"Logout ",
|
|
684
|
-
|
|
651
|
+
a != null && a.email ? `(${a.email})` : null
|
|
685
652
|
]
|
|
686
653
|
}
|
|
687
|
-
) : /* @__PURE__ */
|
|
654
|
+
) : /* @__PURE__ */ i.jsx(
|
|
688
655
|
"button",
|
|
689
656
|
{
|
|
690
657
|
className: "cursor-pointer hover:bg-secondary p-1 px-2 mx-2 rounded",
|
|
691
|
-
onClick:
|
|
658
|
+
onClick: u,
|
|
692
659
|
children: "Login"
|
|
693
660
|
}
|
|
694
661
|
) }),
|
|
695
|
-
/* @__PURE__ */
|
|
662
|
+
/* @__PURE__ */ i.jsx(
|
|
696
663
|
"button",
|
|
697
664
|
{
|
|
698
665
|
className: "cursor-pointer hover:bg-secondary p-2.5 -m-2.5 rounded-full",
|
|
699
666
|
onClick: s,
|
|
700
|
-
children: /* @__PURE__ */
|
|
667
|
+
children: /* @__PURE__ */ i.jsx(P, { size: 18 })
|
|
701
668
|
}
|
|
702
669
|
)
|
|
703
670
|
] })
|
|
704
671
|
] })
|
|
705
672
|
] }),
|
|
706
|
-
/* @__PURE__ */
|
|
673
|
+
/* @__PURE__ */ i.jsx(lt, {})
|
|
707
674
|
] }) });
|
|
708
|
-
}),
|
|
709
|
-
Header:
|
|
710
|
-
},
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
if (!t.hash) return;
|
|
714
|
-
const s = t.hash.split("/")[0].slice(1), a = document.getElementById(decodeURIComponent(s));
|
|
715
|
-
if (a) {
|
|
716
|
-
requestAnimationFrame(() => {
|
|
717
|
-
a.scrollIntoView(), requestIdleCallback(() => e(s));
|
|
718
|
-
});
|
|
719
|
-
return;
|
|
720
|
-
}
|
|
721
|
-
const r = new MutationObserver((o, l) => {
|
|
722
|
-
const c = document.getElementById(decodeURIComponent(s));
|
|
723
|
-
c && (c.scrollIntoView(), requestIdleCallback(() => e(s)), l.disconnect());
|
|
724
|
-
});
|
|
725
|
-
return r.observe(document.body, { childList: !0, subtree: !0 }), () => r.disconnect();
|
|
726
|
-
}, [t.hash, e]);
|
|
727
|
-
}, Vt = () => {
|
|
728
|
-
const t = D(), e = K(t.pathname);
|
|
729
|
-
T(() => {
|
|
730
|
-
e.current !== t.pathname && (window.scrollTo(0, 0), e.current = t.pathname);
|
|
731
|
-
}, [t.pathname]);
|
|
732
|
-
}, De = ({
|
|
733
|
-
item: t,
|
|
734
|
-
defaultOpen: e,
|
|
735
|
-
path: s
|
|
736
|
-
}) => {
|
|
737
|
-
const [a, r] = ct(e), o = D(), l = K(o.pathname);
|
|
738
|
-
return T(() => {
|
|
739
|
-
!a && l.current !== o.pathname && r(G(t, o.pathname, s)), l.current = o.pathname;
|
|
740
|
-
}, [a, t, s, o.pathname]), [a, r];
|
|
741
|
-
}, R = Be(
|
|
742
|
-
"flex px-[--padding-nav-item] py-1.5 rounded-lg hover:bg-accent transition-colors duration-300",
|
|
743
|
-
{
|
|
744
|
-
variants: {
|
|
745
|
-
isActive: {
|
|
746
|
-
true: "text-primary font-medium",
|
|
747
|
-
false: "text-foreground/80"
|
|
748
|
-
},
|
|
749
|
-
isMuted: {
|
|
750
|
-
true: "text-foreground/30",
|
|
751
|
-
false: ""
|
|
752
|
-
}
|
|
753
|
-
}
|
|
754
|
-
}
|
|
755
|
-
), Ut = "data-anchor", Se = ({
|
|
756
|
-
category: t,
|
|
757
|
-
item: e,
|
|
758
|
-
activeAnchor: s,
|
|
759
|
-
currentTopNavItem: a,
|
|
760
|
-
basePath: r = ""
|
|
761
|
-
}) => {
|
|
762
|
-
const o = W(e) ? Ne(r, e.path) : "", l = D(), [c, h] = De({
|
|
763
|
-
item: e,
|
|
764
|
-
path: o,
|
|
765
|
-
defaultOpen: () => G(e, l.pathname, o)
|
|
766
|
-
});
|
|
767
|
-
if (Pt(e)) {
|
|
768
|
-
const f = L(
|
|
769
|
-
"flex items-center gap-2",
|
|
770
|
-
R({
|
|
771
|
-
isActive: e.href === l.pathname
|
|
772
|
-
})
|
|
773
|
-
);
|
|
774
|
-
return e.href.startsWith("http") ? /* @__PURE__ */ n.jsxs(
|
|
775
|
-
"a",
|
|
776
|
-
{
|
|
777
|
-
className: f,
|
|
778
|
-
href: e.href,
|
|
779
|
-
target: "_blank",
|
|
780
|
-
rel: "noopener noreferrer",
|
|
781
|
-
children: [
|
|
782
|
-
e.label,
|
|
783
|
-
/* @__PURE__ */ n.jsx(wt, { size: 14 })
|
|
784
|
-
]
|
|
785
|
-
}
|
|
786
|
-
) : /* @__PURE__ */ n.jsx(U, { className: f, to: e.href, children: e.label });
|
|
787
|
-
}
|
|
788
|
-
const b = /* @__PURE__ */ n.jsxs("div", { className: "flex justify-between w-full", children: [
|
|
789
|
-
/* @__PURE__ */ n.jsxs("div", { className: "flex items-center gap-2 truncate w-full", children: [
|
|
790
|
-
e.icon,
|
|
791
|
-
typeof e.label != "string" ? e.label : /* @__PURE__ */ n.jsx("span", { className: "truncate", children: e.label })
|
|
792
|
-
] }),
|
|
793
|
-
e.children && /* @__PURE__ */ n.jsx(
|
|
794
|
-
ke,
|
|
795
|
-
{
|
|
796
|
-
size: 16,
|
|
797
|
-
className: "transition shrink-0 group-data-[state=open]:rotate-90"
|
|
798
|
-
}
|
|
799
|
-
)
|
|
800
|
-
] });
|
|
801
|
-
return /* @__PURE__ */ n.jsx("li", { title: typeof e.label == "string" ? e.label : e.title, children: e.children ? /* @__PURE__ */ n.jsxs(
|
|
802
|
-
Pe,
|
|
803
|
-
{
|
|
804
|
-
open: c,
|
|
805
|
-
onOpenChange: () => h((f) => !f),
|
|
806
|
-
className: "flex flex-col",
|
|
807
|
-
children: [
|
|
808
|
-
/* @__PURE__ */ n.jsx(
|
|
809
|
-
we,
|
|
810
|
-
{
|
|
811
|
-
className: L(
|
|
812
|
-
"group text-start",
|
|
813
|
-
R({ isActive: !1 })
|
|
814
|
-
),
|
|
815
|
-
children: b
|
|
816
|
-
}
|
|
817
|
-
),
|
|
818
|
-
/* @__PURE__ */ n.jsx(Ce, { className: "CollapsibleContent ms-[calc(var(--padding-nav-item)*1.125)]", children: /* @__PURE__ */ n.jsx("ul", { className: "mt-1 border-border border-l ps-1.5", children: e.children.map((f) => /* @__PURE__ */ n.jsx(
|
|
819
|
-
Se,
|
|
820
|
-
{
|
|
821
|
-
category: t,
|
|
822
|
-
item: f,
|
|
823
|
-
activeAnchor: s,
|
|
824
|
-
currentTopNavItem: a,
|
|
825
|
-
basePath: o
|
|
826
|
-
},
|
|
827
|
-
W(f) ? f.path : f.href
|
|
828
|
-
)) }) })
|
|
829
|
-
]
|
|
830
|
-
}
|
|
831
|
-
) : e.path.startsWith("#") ? /* @__PURE__ */ n.jsx(
|
|
832
|
-
dt,
|
|
833
|
-
{
|
|
834
|
-
to: e.path,
|
|
835
|
-
[Ut]: e.path,
|
|
836
|
-
className: R({
|
|
837
|
-
isActive: e.path.slice(1) === s,
|
|
838
|
-
isMuted: e.muted
|
|
839
|
-
}),
|
|
840
|
-
children: b
|
|
841
|
-
}
|
|
842
|
-
) : /* @__PURE__ */ n.jsx(
|
|
843
|
-
U,
|
|
844
|
-
{
|
|
845
|
-
className: ({ isActive: f }) => R({ isActive: f }),
|
|
846
|
-
to: o,
|
|
847
|
-
children: b
|
|
848
|
-
}
|
|
849
|
-
) });
|
|
850
|
-
}, Wt = ({
|
|
851
|
-
category: t
|
|
675
|
+
}), he = {
|
|
676
|
+
Header: ct
|
|
677
|
+
}, ht = ue(he), dt = ht.Provider, ft = ({
|
|
678
|
+
children: t,
|
|
679
|
+
...e
|
|
852
680
|
}) => {
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
onOpenChange: () => l((c) => !c),
|
|
863
|
-
children: [
|
|
864
|
-
t.label.length > 0 ? /* @__PURE__ */ n.jsx(we, { asChild: r, disabled: !r, children: /* @__PURE__ */ n.jsxs(
|
|
865
|
-
"h5",
|
|
866
|
-
{
|
|
867
|
-
className: L(
|
|
868
|
-
"flex group items-center justify-between cursor-pointer font-semibold text-foreground/90 px-[--padding-nav-item] py-1.5 rounded-lg transition-colors duration-300 -mx-[--padding-nav-item]",
|
|
869
|
-
r ? "hover:bg-accent" : "cursor-auto"
|
|
870
|
-
),
|
|
871
|
-
children: [
|
|
872
|
-
t.label,
|
|
873
|
-
r && /* @__PURE__ */ n.jsx(
|
|
874
|
-
ke,
|
|
875
|
-
{
|
|
876
|
-
className: "group-data-[state=open]:rotate-90 transition",
|
|
877
|
-
size: 16
|
|
878
|
-
}
|
|
879
|
-
)
|
|
880
|
-
]
|
|
881
|
-
}
|
|
882
|
-
) }) : "Endpoints",
|
|
883
|
-
/* @__PURE__ */ n.jsx(Ce, { className: "CollapsibleContent -mx-[--padding-nav-item]", children: /* @__PURE__ */ n.jsx("ul", { className: "space-y-0.5 mt-1.5 mb-4 ms-3", children: t.children.map((c) => /* @__PURE__ */ n.jsx(
|
|
884
|
-
Se,
|
|
885
|
-
{
|
|
886
|
-
category: t,
|
|
887
|
-
item: c,
|
|
888
|
-
activeAnchor: e,
|
|
889
|
-
currentTopNavItem: s,
|
|
890
|
-
basePath: Ne(s == null ? void 0 : s.path, t.path)
|
|
891
|
-
},
|
|
892
|
-
W(c) ? c.path + c.label : c.href
|
|
893
|
-
)) }) })
|
|
894
|
-
]
|
|
895
|
-
},
|
|
896
|
-
t.label
|
|
897
|
-
);
|
|
898
|
-
}, Xt = ut(function({ children: e, className: s, pushMainContent: a }, r) {
|
|
899
|
-
return /* @__PURE__ */ n.jsx(
|
|
900
|
-
"nav",
|
|
901
|
-
{
|
|
902
|
-
"data-navigation": String(a),
|
|
903
|
-
className: L(
|
|
904
|
-
"peer hidden lg:flex flex-col fixed text-sm overflow-y-auto shrink-0 p-[--padding-nav-item] -mx-[--padding-nav-item] pb-20 pt-[--padding-content-top] w-[--side-nav-width] h-[calc(100%-var(--header-height))] scroll-pt-2 gap-2",
|
|
905
|
-
s
|
|
906
|
-
),
|
|
907
|
-
ref: r,
|
|
908
|
-
children: e
|
|
909
|
-
}
|
|
910
|
-
);
|
|
911
|
-
}), _t = () => {
|
|
912
|
-
const t = K(null), e = nt();
|
|
913
|
-
return /* @__PURE__ */ n.jsx(
|
|
914
|
-
Xt,
|
|
915
|
-
{
|
|
916
|
-
ref: t,
|
|
917
|
-
pushMainContent: e.data.items.length > 0,
|
|
918
|
-
children: e.data.items.map((s) => /* @__PURE__ */ n.jsx(Wt, { category: s }, s.label))
|
|
919
|
-
}
|
|
920
|
-
);
|
|
921
|
-
}, Te = ({ children: t }) => {
|
|
922
|
-
const e = D(), { setActiveAnchor: s } = X(), { meta: a } = _();
|
|
923
|
-
zt(), Vt();
|
|
924
|
-
const r = K(e.pathname);
|
|
925
|
-
return T(() => {
|
|
926
|
-
e.pathname !== r.current && s(""), r.current = e.pathname;
|
|
927
|
-
}, [e.pathname, s]), /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
|
|
928
|
-
/* @__PURE__ */ n.jsxs(je, { titleTemplate: a == null ? void 0 : a.title, children: [
|
|
929
|
-
(a == null ? void 0 : a.description) && /* @__PURE__ */ n.jsx("meta", { name: "description", content: a.description }),
|
|
930
|
-
(a == null ? void 0 : a.favicon) && /* @__PURE__ */ n.jsx("link", { rel: "icon", href: a.favicon })
|
|
931
|
-
] }),
|
|
932
|
-
/* @__PURE__ */ n.jsx(Ee, {}),
|
|
933
|
-
/* @__PURE__ */ n.jsx("div", { className: "max-w-screen-2xl mx-auto pt-[--header-height] px-10 lg:px-12 h-full", children: /* @__PURE__ */ n.jsxs(
|
|
934
|
-
be,
|
|
935
|
-
{
|
|
936
|
-
fallback: /* @__PURE__ */ n.jsx("div", { className: "grid h-full place-items-center", children: /* @__PURE__ */ n.jsx(jt, {}) }),
|
|
937
|
-
children: [
|
|
938
|
-
/* @__PURE__ */ n.jsx(_t, {}),
|
|
939
|
-
/* @__PURE__ */ n.jsx(
|
|
940
|
-
"main",
|
|
941
|
-
{
|
|
942
|
-
className: `dark:border-white/10 translate-x-0 h-full
|
|
943
|
-
lg:overflow-visible
|
|
944
|
-
lg:peer-data-[navigation=true]:w-[calc(100%-var(--side-nav-width))]
|
|
945
|
-
lg:peer-data-[navigation=true]:translate-x-[--side-nav-width] peer-data-[navigation=true]:pl-12`,
|
|
946
|
-
children: t ?? /* @__PURE__ */ n.jsx(yt, {})
|
|
947
|
-
}
|
|
948
|
-
)
|
|
949
|
-
]
|
|
950
|
-
}
|
|
951
|
-
) })
|
|
952
|
-
] });
|
|
953
|
-
};
|
|
954
|
-
function Gt() {
|
|
955
|
-
const t = bt();
|
|
956
|
-
return /* @__PURE__ */ n.jsx(Te, { children: /* @__PURE__ */ n.jsx(Ae, { error: t }) });
|
|
957
|
-
}
|
|
958
|
-
function Jt({ plugins: t }) {
|
|
959
|
-
const e = H(() => {
|
|
960
|
-
const s = (t ?? []).flatMap(
|
|
961
|
-
(a) => Me(a) ? a.getRoutes() : []
|
|
962
|
-
);
|
|
963
|
-
return Ke([
|
|
964
|
-
{
|
|
965
|
-
path: "/",
|
|
966
|
-
element: /* @__PURE__ */ n.jsx(Te, {}),
|
|
967
|
-
errorElement: /* @__PURE__ */ n.jsx(Gt, {}),
|
|
968
|
-
children: s
|
|
969
|
-
}
|
|
970
|
-
]);
|
|
971
|
-
}, [t]);
|
|
972
|
-
return /* @__PURE__ */ n.jsx(ze, { router: e });
|
|
973
|
-
}
|
|
974
|
-
const Yt = (t) => {
|
|
975
|
-
var o;
|
|
976
|
-
const e = H(
|
|
977
|
-
() => ({ ...Qe, ...t.overrides }),
|
|
978
|
-
[t.overrides]
|
|
979
|
-
), s = H(
|
|
980
|
-
() => ({ ...We, ...t.mdxComponents }),
|
|
981
|
-
[t.mdxComponents]
|
|
982
|
-
), a = H(() => new Rt(t), [t]);
|
|
983
|
-
T(() => {
|
|
681
|
+
var u;
|
|
682
|
+
const s = S(
|
|
683
|
+
() => ({ ...he, ...e.overrides }),
|
|
684
|
+
[e.overrides]
|
|
685
|
+
), r = S(
|
|
686
|
+
() => ({ ...xe, ...e.mdxComponents }),
|
|
687
|
+
[e.mdxComponents]
|
|
688
|
+
), a = S(() => new ot(e), [e]);
|
|
689
|
+
Ie(() => {
|
|
984
690
|
a.initialize();
|
|
985
691
|
}, [a]);
|
|
986
|
-
const
|
|
987
|
-
var
|
|
988
|
-
return /* @__PURE__ */
|
|
692
|
+
const o = (u = e.plugins) == null ? void 0 : u.filter(at).map((d, h) => {
|
|
693
|
+
var P;
|
|
694
|
+
return /* @__PURE__ */ i.jsx(He, { children: (P = d.getHead) == null ? void 0 : P.call(d) }, h);
|
|
989
695
|
});
|
|
990
|
-
return /* @__PURE__ */
|
|
991
|
-
/* @__PURE__ */
|
|
992
|
-
/* @__PURE__ */
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
Jt,
|
|
998
|
-
{
|
|
999
|
-
plugins: [
|
|
1000
|
-
...t.plugins ?? [],
|
|
1001
|
-
...t.authentication ? [t.authentication] : []
|
|
1002
|
-
]
|
|
1003
|
-
}
|
|
1004
|
-
)
|
|
1005
|
-
}
|
|
1006
|
-
) }) }) }) }) })
|
|
1007
|
-
] }) });
|
|
1008
|
-
}, qe = (t) => {
|
|
1009
|
-
const e = ye(Yt);
|
|
1010
|
-
return /* @__PURE__ */ n.jsx(Dt, { FallbackComponent: Ht, children: /* @__PURE__ */ n.jsx(e, { ...t }) });
|
|
1011
|
-
};
|
|
1012
|
-
qe.displayName = "DevPortal";
|
|
1013
|
-
const ds = pt, fs = Ge, ms = qe, ps = Ve;
|
|
696
|
+
return /* @__PURE__ */ i.jsxs(qe, { client: ce, children: [
|
|
697
|
+
/* @__PURE__ */ i.jsx(Ke, { children: o }),
|
|
698
|
+
/* @__PURE__ */ i.jsx(Fe, { value: a, children: /* @__PURE__ */ i.jsx(Be, { components: r, children: /* @__PURE__ */ i.jsx(Me, { children: /* @__PURE__ */ i.jsx(dt, { value: s, children: /* @__PURE__ */ i.jsx(Ce, { children: t }) }) }) }) })
|
|
699
|
+
] });
|
|
700
|
+
}, mt = le(ft), de = (t) => /* @__PURE__ */ i.jsx(et, { FallbackComponent: ut, children: /* @__PURE__ */ i.jsx(mt, { ...t }) });
|
|
701
|
+
de.displayName = "DevPortal";
|
|
702
|
+
const wt = ze, Qt = we, Ot = de, Et = Qe;
|
|
1014
703
|
export {
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
704
|
+
Qt as Callout,
|
|
705
|
+
Ot as DevPortal,
|
|
706
|
+
Et as Link,
|
|
707
|
+
wt as useMDXComponents
|
|
1019
708
|
};
|
|
1020
709
|
//# sourceMappingURL=zudoku.components.js.map
|