zudoku 0.17.0 → 0.18.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/demo.js +0 -2
- package/dist/app/demo.js.map +1 -1
- package/dist/app/entry.client.js +14 -0
- package/dist/app/entry.client.js.map +1 -1
- package/dist/app/entry.server.js +5 -4
- package/dist/app/entry.server.js.map +1 -1
- package/dist/app/standalone.js +0 -2
- package/dist/app/standalone.js.map +1 -1
- package/dist/codegen.d.ts +3 -0
- package/dist/codegen.js +45 -0
- package/dist/codegen.js.map +1 -0
- package/dist/config/validators/InputSidebarSchema.d.ts +10 -10
- package/dist/config/validators/validate.d.ts +74 -74
- package/dist/lib/authentication/hook.d.ts +5 -4
- package/dist/lib/authentication/hook.js +1 -3
- package/dist/lib/authentication/hook.js.map +1 -1
- package/dist/lib/authentication/providers/auth0.js +11 -11
- package/dist/lib/authentication/providers/auth0.js.map +1 -1
- package/dist/lib/authentication/providers/openid.d.ts +0 -1
- package/dist/lib/authentication/providers/openid.js +11 -26
- package/dist/lib/authentication/providers/openid.js.map +1 -1
- package/dist/lib/authentication/state.d.ts +25 -4
- package/dist/lib/authentication/state.js +28 -5
- package/dist/lib/authentication/state.js.map +1 -1
- package/dist/lib/components/Bootstrap.d.ts +3 -1
- package/dist/lib/components/Bootstrap.js +10 -4
- package/dist/lib/components/Bootstrap.js.map +1 -1
- package/dist/lib/components/DeveloperHint.js +2 -1
- package/dist/lib/components/DeveloperHint.js.map +1 -1
- package/dist/lib/components/Header.js +3 -7
- package/dist/lib/components/Header.js.map +1 -1
- package/dist/lib/components/Heading.d.ts +1 -1
- package/dist/lib/components/Layout.js +11 -3
- package/dist/lib/components/Layout.js.map +1 -1
- package/dist/lib/components/MobileTopNavigation.js +6 -7
- package/dist/lib/components/MobileTopNavigation.js.map +1 -1
- package/dist/lib/components/SyntaxHighlight.js +16 -12
- package/dist/lib/components/SyntaxHighlight.js.map +1 -1
- package/dist/lib/components/ThemeSwitch.d.ts +1 -0
- package/dist/lib/components/ThemeSwitch.js +13 -0
- package/dist/lib/components/ThemeSwitch.js.map +1 -0
- package/dist/lib/components/TopNavigation.d.ts +2 -0
- package/dist/lib/components/TopNavigation.js +13 -7
- package/dist/lib/components/TopNavigation.js.map +1 -1
- package/dist/lib/components/Zudoku.js +4 -5
- package/dist/lib/components/Zudoku.js.map +1 -1
- package/dist/lib/components/context/ZudokuContext.d.ts +3 -3
- package/dist/lib/components/context/ZudokuContext.js +7 -12
- package/dist/lib/components/context/ZudokuContext.js.map +1 -1
- package/dist/lib/components/index.d.ts +14 -3
- package/dist/lib/components/navigation/Sidebar.js +1 -1
- package/dist/lib/components/navigation/Sidebar.js.map +1 -1
- package/dist/lib/components/navigation/utils.js +2 -2
- package/dist/lib/components/navigation/utils.js.map +1 -1
- package/dist/lib/core/ZudokuContext.d.ts +0 -4
- package/dist/lib/core/ZudokuContext.js +0 -5
- package/dist/lib/core/ZudokuContext.js.map +1 -1
- package/dist/lib/errors/ErrorAlert.js +1 -1
- package/dist/lib/errors/ErrorAlert.js.map +1 -1
- package/dist/lib/plugins/openapi/ColorizedParam.js +13 -9
- package/dist/lib/plugins/openapi/ColorizedParam.js.map +1 -1
- package/dist/lib/plugins/openapi/Endpoint.d.ts +1 -1
- package/dist/lib/plugins/openapi/Endpoint.js +5 -9
- package/dist/lib/plugins/openapi/Endpoint.js.map +1 -1
- package/dist/lib/plugins/openapi/OperationList.d.ts +2 -2
- package/dist/lib/plugins/openapi/OperationList.js +6 -21
- package/dist/lib/plugins/openapi/OperationList.js.map +1 -1
- package/dist/lib/plugins/openapi/Route.d.ts +4 -4
- package/dist/lib/plugins/openapi/Route.js +2 -4
- package/dist/lib/plugins/openapi/Route.js.map +1 -1
- package/dist/lib/plugins/openapi/Sidecar.d.ts +1 -1
- package/dist/lib/plugins/openapi/Sidecar.js +8 -11
- package/dist/lib/plugins/openapi/Sidecar.js.map +1 -1
- package/dist/lib/plugins/openapi/client/GraphQLClient.d.ts +8 -0
- package/dist/lib/plugins/openapi/client/GraphQLClient.js +102 -0
- package/dist/lib/plugins/openapi/client/GraphQLClient.js.map +1 -0
- package/dist/lib/plugins/openapi/client/GraphQLContext.d.ts +7 -0
- package/dist/lib/plugins/openapi/client/GraphQLContext.js +5 -0
- package/dist/lib/plugins/openapi/client/GraphQLContext.js.map +1 -0
- package/dist/lib/plugins/openapi/client/createServer.d.ts +1 -0
- package/dist/lib/plugins/openapi/client/useCreateQuery.d.ts +5 -0
- package/dist/lib/plugins/openapi/client/useCreateQuery.js +13 -0
- package/dist/lib/plugins/openapi/client/useCreateQuery.js.map +1 -0
- package/dist/lib/plugins/openapi/client/worker.d.ts +4 -1
- package/dist/lib/plugins/openapi/client/worker.js +23 -14
- package/dist/lib/plugins/openapi/client/worker.js.map +1 -1
- package/dist/lib/plugins/openapi/graphql/fragment-masking.d.ts +3 -3
- package/dist/lib/plugins/openapi/graphql/fragment-masking.js +3 -4
- package/dist/lib/plugins/openapi/graphql/fragment-masking.js.map +1 -1
- package/dist/lib/plugins/openapi/graphql/gql.d.ts +5 -52
- package/dist/lib/plugins/openapi/graphql/gql.js +2 -1
- package/dist/lib/plugins/openapi/graphql/gql.js.map +1 -1
- package/dist/lib/plugins/openapi/graphql/graphql.d.ts +134 -9
- package/dist/lib/plugins/openapi/graphql/graphql.js +194 -778
- package/dist/lib/plugins/openapi/graphql/graphql.js.map +1 -1
- package/dist/lib/plugins/openapi/index.js +40 -53
- package/dist/lib/plugins/openapi/index.js.map +1 -1
- package/dist/lib/plugins/openapi/schema/SchemaView.js.map +1 -1
- package/dist/lib/plugins/openapi-worker.d.ts +1 -1
- package/dist/lib/plugins/openapi-worker.js +7 -1
- package/dist/lib/plugins/openapi-worker.js.map +1 -1
- package/dist/lib/util/MdxComponents.d.ts +1 -1
- package/dist/vite/config.js +0 -1
- package/dist/vite/config.js.map +1 -1
- package/dist/vite/html.js +0 -2
- package/dist/vite/html.js.map +1 -1
- package/dist/vite/plugin-component.js +1 -1
- package/dist/vite/plugin-component.js.map +1 -1
- package/dist/vite/plugin-mdx.js +3 -2
- package/dist/vite/plugin-mdx.js.map +1 -1
- package/dist/vite/plugin.js +0 -2
- package/dist/vite/plugin.js.map +1 -1
- package/dist/vite/remarkStaticGeneration.d.ts +3 -0
- package/dist/vite/remarkStaticGeneration.js +125 -0
- package/dist/vite/remarkStaticGeneration.js.map +1 -0
- package/lib/{AnchorLink-DYbUOP9U.js → AnchorLink-CDlhr8gL.js} +11 -10
- package/lib/{AnchorLink-DYbUOP9U.js.map → AnchorLink-CDlhr8gL.js.map} +1 -1
- package/lib/{AuthenticationPlugin-bqGAKfot.js → AuthenticationPlugin-DeGDVa1r.js} +6 -5
- package/lib/{AuthenticationPlugin-bqGAKfot.js.map → AuthenticationPlugin-DeGDVa1r.js.map} +1 -1
- package/lib/{Spinner-ChOGyPls.js → Button-jK0EsymC.js} +12 -15
- package/lib/Button-jK0EsymC.js.map +1 -0
- package/lib/Markdown-ievDDhFT.js +15192 -0
- package/lib/Markdown-ievDDhFT.js.map +1 -0
- package/lib/{MdxPage-DRKqyn2b.js → MdxPage-Bwn-VSsH.js} +5 -5
- package/lib/{MdxPage-DRKqyn2b.js.map → MdxPage-Bwn-VSsH.js.map} +1 -1
- package/lib/OperationList-BwBl1xrD.js +4691 -0
- package/lib/OperationList-BwBl1xrD.js.map +1 -0
- package/lib/Route-DlG_HTMu.js +11 -0
- package/lib/Route-DlG_HTMu.js.map +1 -0
- package/lib/{Select-DYKDahHt.js → Select-O9ZM3ZgX.js} +7 -7
- package/lib/Select-O9ZM3ZgX.js.map +1 -0
- package/lib/SidebarBadge-DxFJcJ6V.js +51 -0
- package/lib/SidebarBadge-DxFJcJ6V.js.map +1 -0
- package/lib/SlotletProvider-DyomlzGx.js +252 -0
- package/lib/SlotletProvider-DyomlzGx.js.map +1 -0
- package/lib/Spinner-3cQDBVGr.js +7 -0
- package/lib/Spinner-3cQDBVGr.js.map +1 -0
- package/lib/SyntaxHighlight-DkLOsjHS.js +2983 -0
- package/lib/SyntaxHighlight-DkLOsjHS.js.map +1 -0
- package/lib/assets/{worker-YA-aCP3P.js → worker-CPsGZsve.js} +24 -22
- package/lib/assets/{worker-YA-aCP3P.js.map → worker-CPsGZsve.js.map} +1 -1
- package/lib/context-D1nXWxm7.js +22 -0
- package/lib/context-D1nXWxm7.js.map +1 -0
- package/lib/createServer-DK-g7kbB.js +16089 -0
- package/lib/createServer-DK-g7kbB.js.map +1 -0
- package/lib/{hook-CjQERPa7.js → hook-hEqe7fPB.js} +12 -14
- package/lib/hook-hEqe7fPB.js.map +1 -0
- package/lib/index-Czzd9rjU.js +899 -0
- package/lib/index-Czzd9rjU.js.map +1 -0
- package/lib/index-DNxQ_rCt.js +1273 -0
- package/lib/index-DNxQ_rCt.js.map +1 -0
- package/lib/index-Yn8c3UWE.js +921 -0
- package/lib/index-Yn8c3UWE.js.map +1 -0
- package/lib/{router-BsfSoK2j.js → router-lfyopgBI.js} +23 -23
- package/lib/{router-BsfSoK2j.js.map → router-lfyopgBI.js.map} +1 -1
- package/lib/state-tsXBLONe.js +203 -0
- package/lib/state-tsXBLONe.js.map +1 -0
- package/lib/ui/ActionButton.js +11 -10
- package/lib/ui/ActionButton.js.map +1 -1
- package/lib/useExposedProps-CTPtylCV.js +10 -0
- package/lib/{useExposedProps-BxyHjPNN.js.map → useExposedProps-CTPtylCV.js.map} +1 -1
- package/lib/{utils-DNAltzXc.js → utils-DcpDOncX.js} +197 -202
- package/lib/utils-DcpDOncX.js.map +1 -0
- package/lib/zudoku.auth-auth0.js +24 -18
- package/lib/zudoku.auth-auth0.js.map +1 -1
- package/lib/zudoku.auth-clerk.js +2 -2
- package/lib/zudoku.auth-openid.js +124 -138
- package/lib/zudoku.auth-openid.js.map +1 -1
- package/lib/zudoku.components.js +1128 -992
- package/lib/zudoku.components.js.map +1 -1
- package/lib/zudoku.openapi-worker.js +10 -16346
- package/lib/zudoku.openapi-worker.js.map +1 -1
- package/lib/zudoku.plugin-api-keys.js +18 -18
- package/lib/zudoku.plugin-custom-pages.js +2 -2
- package/lib/zudoku.plugin-markdown.js +1 -1
- package/lib/zudoku.plugin-openapi.js +5 -9
- package/lib/zudoku.plugin-openapi.js.map +1 -1
- package/lib/zudoku.plugin-redirect.js +1 -1
- package/package.json +14 -4
- package/src/app/demo.tsx +0 -3
- package/src/app/entry.client.tsx +14 -0
- package/src/app/entry.server.tsx +59 -57
- package/src/app/standalone.tsx +0 -3
- package/src/lib/authentication/hook.ts +1 -3
- package/src/lib/authentication/providers/auth0.tsx +16 -11
- package/src/lib/authentication/providers/openid.tsx +12 -30
- package/src/lib/authentication/state.ts +44 -10
- package/src/lib/components/Bootstrap.tsx +36 -14
- package/src/lib/components/DeveloperHint.tsx +6 -1
- package/src/lib/components/Header.tsx +31 -42
- package/src/lib/components/Layout.tsx +48 -36
- package/src/lib/components/MobileTopNavigation.tsx +15 -18
- package/src/lib/components/SyntaxHighlight.tsx +81 -46
- package/src/lib/components/ThemeSwitch.tsx +26 -0
- package/src/lib/components/TopNavigation.tsx +27 -19
- package/src/lib/components/Zudoku.tsx +5 -10
- package/src/lib/components/context/ZudokuContext.ts +8 -13
- package/src/lib/components/navigation/Sidebar.tsx +3 -3
- package/src/lib/components/navigation/utils.ts +2 -2
- package/src/lib/core/ZudokuContext.ts +0 -8
- package/src/lib/errors/ErrorAlert.tsx +2 -1
- package/src/lib/plugins/openapi/ColorizedParam.tsx +23 -14
- package/src/lib/plugins/openapi/Endpoint.tsx +5 -10
- package/src/lib/plugins/openapi/OperationList.tsx +5 -40
- package/src/lib/plugins/openapi/Route.tsx +11 -12
- package/src/lib/plugins/openapi/Sidecar.tsx +10 -13
- package/src/lib/plugins/openapi/client/GraphQLClient.tsx +140 -0
- package/src/lib/plugins/openapi/client/GraphQLContext.tsx +16 -0
- package/src/lib/plugins/openapi/client/createServer.ts +2 -0
- package/src/lib/plugins/openapi/client/useCreateQuery.ts +18 -0
- package/src/lib/plugins/openapi/client/worker.ts +38 -24
- package/src/lib/plugins/openapi/graphql/fragment-masking.ts +11 -18
- package/src/lib/plugins/openapi/graphql/gql.ts +7 -25
- package/src/lib/plugins/openapi/graphql/graphql.ts +351 -782
- package/src/lib/plugins/openapi/index.tsx +40 -63
- package/src/lib/plugins/openapi/schema/SchemaView.tsx +1 -1
- package/src/lib/plugins/openapi-worker.ts +11 -1
- package/dist/lib/components/context/ThemeContext.d.ts +0 -2
- package/dist/lib/components/context/ThemeContext.js +0 -7
- package/dist/lib/components/context/ThemeContext.js.map +0 -1
- package/dist/lib/components/context/ThemeProvider.d.ts +0 -4
- package/dist/lib/components/context/ThemeProvider.js +0 -23
- package/dist/lib/components/context/ThemeProvider.js.map +0 -1
- package/dist/lib/plugins/openapi/client/createMemoryClient.d.ts +0 -9
- package/dist/lib/plugins/openapi/client/createMemoryClient.js +0 -54
- package/dist/lib/plugins/openapi/client/createMemoryClient.js.map +0 -1
- package/dist/lib/plugins/openapi/client/createWorkerClient.d.ts +0 -10
- package/dist/lib/plugins/openapi/client/createWorkerClient.js +0 -62
- package/dist/lib/plugins/openapi/client/createWorkerClient.js.map +0 -1
- package/dist/lib/plugins/openapi/client/interfaces.d.ts +0 -4
- package/dist/lib/plugins/openapi/client/interfaces.js +0 -2
- package/dist/lib/plugins/openapi/client/interfaces.js.map +0 -1
- package/dist/lib/themeToggle.d.ts +0 -1
- package/dist/lib/themeToggle.js +0 -7
- package/dist/lib/themeToggle.js.map +0 -1
- package/dist/lib/util/createWaitForNotify.d.ts +0 -1
- package/dist/lib/util/createWaitForNotify.js +0 -15
- package/dist/lib/util/createWaitForNotify.js.map +0 -1
- package/dist/vite/plugin-html-transform.d.ts +0 -2
- package/dist/vite/plugin-html-transform.js +0 -15
- package/dist/vite/plugin-html-transform.js.map +0 -1
- package/lib/DeveloperHint-DHdLXGHA.js +0 -16
- package/lib/DeveloperHint-DHdLXGHA.js.map +0 -1
- package/lib/Markdown-D6UxMbZm.js +0 -18059
- package/lib/Markdown-D6UxMbZm.js.map +0 -1
- package/lib/OperationList-BHUBGM0c.js +0 -621
- package/lib/OperationList-BHUBGM0c.js.map +0 -1
- package/lib/Route-B0XuN1oC.js +0 -13
- package/lib/Route-B0XuN1oC.js.map +0 -1
- package/lib/Select-DYKDahHt.js.map +0 -1
- package/lib/SidebarBadge-Bbt92M5K.js +0 -38
- package/lib/SidebarBadge-Bbt92M5K.js.map +0 -1
- package/lib/SlotletProvider-mhjLPG44.js +0 -241
- package/lib/SlotletProvider-mhjLPG44.js.map +0 -1
- package/lib/Spinner-ChOGyPls.js.map +0 -1
- package/lib/StaggeredRender-DDHSzQKE.js +0 -17
- package/lib/StaggeredRender-DDHSzQKE.js.map +0 -1
- package/lib/hook-CjQERPa7.js.map +0 -1
- package/lib/index-BRg5pi5D.js +0 -5902
- package/lib/index-BRg5pi5D.js.map +0 -1
- package/lib/index-DM9hrcCG.js +0 -1783
- package/lib/index-DM9hrcCG.js.map +0 -1
- package/lib/state-BsPrOUAh.js +0 -252
- package/lib/state-BsPrOUAh.js.map +0 -1
- package/lib/urql-core-35Qt_U4i.js +0 -1511
- package/lib/urql-core-35Qt_U4i.js.map +0 -1
- package/lib/useExposedProps-BxyHjPNN.js +0 -9
- package/lib/utils-DNAltzXc.js.map +0 -1
- package/src/lib/components/context/ThemeContext.tsx +0 -8
- package/src/lib/components/context/ThemeProvider.tsx +0 -27
- package/src/lib/plugins/openapi/client/createMemoryClient.ts +0 -65
- package/src/lib/plugins/openapi/client/createWorkerClient.ts +0 -79
- package/src/lib/plugins/openapi/client/interfaces.ts +0 -5
- package/src/lib/themeToggle.ts +0 -7
- package/src/lib/util/createWaitForNotify.ts +0 -18
|
@@ -4,15 +4,11 @@ var _e = (t) => {
|
|
|
4
4
|
var be = (t, e, s) => e.has(t) || _e("Cannot " + s);
|
|
5
5
|
var i = (t, e, s) => (be(t, e, "read from private field"), s ? s.call(t) : e.get(t)), y = (t, e, s) => e.has(t) ? _e("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(t) : e.set(t, s), c = (t, e, s, r) => (be(t, e, "write to private field"), r ? r.call(t, s) : e.set(t, s), s), b = (t, e, s) => (be(t, e, "access private method"), s);
|
|
6
6
|
import * as T from "react";
|
|
7
|
-
import { createContext as
|
|
8
|
-
import { j as
|
|
9
|
-
import { u as pe } from "./index-
|
|
10
|
-
import {
|
|
11
|
-
|
|
12
|
-
const e = t.filter((s) => !!s).map((s) => s.replace(/(^\/+|\/+$)/g, "")).join("/").replace(/(^\/+|\/+$)/g, "");
|
|
13
|
-
return e ? `/${e}` : "/";
|
|
14
|
-
};
|
|
15
|
-
var Ue = class {
|
|
7
|
+
import { createContext as ft, useContext as yt } from "react";
|
|
8
|
+
import { j as pt } from "./jsx-runtime-B6kdoens.js";
|
|
9
|
+
import { u as pe } from "./index-Czzd9rjU.js";
|
|
10
|
+
import { m as vt } from "./router-lfyopgBI.js";
|
|
11
|
+
var Qe = class {
|
|
16
12
|
constructor() {
|
|
17
13
|
this.listeners = /* @__PURE__ */ new Set(), this.subscribe = this.subscribe.bind(this);
|
|
18
14
|
}
|
|
@@ -28,22 +24,22 @@ var Ue = class {
|
|
|
28
24
|
}
|
|
29
25
|
onUnsubscribe() {
|
|
30
26
|
}
|
|
31
|
-
},
|
|
27
|
+
}, V = typeof window > "u" || "Deno" in globalThis;
|
|
32
28
|
function ge() {
|
|
33
29
|
}
|
|
34
30
|
function Wt(t, e) {
|
|
35
31
|
return typeof t == "function" ? t(e) : t;
|
|
36
32
|
}
|
|
37
|
-
function
|
|
33
|
+
function Re(t) {
|
|
38
34
|
return typeof t == "number" && t >= 0 && t !== 1 / 0;
|
|
39
35
|
}
|
|
40
|
-
function
|
|
36
|
+
function et(t, e) {
|
|
41
37
|
return Math.max(t + (e || 0) - Date.now(), 0);
|
|
42
38
|
}
|
|
43
39
|
function fe(t, e) {
|
|
44
40
|
return typeof t == "function" ? t(e) : t;
|
|
45
41
|
}
|
|
46
|
-
function
|
|
42
|
+
function x(t, e) {
|
|
47
43
|
return typeof t == "function" ? t(e) : t;
|
|
48
44
|
}
|
|
49
45
|
function Jt(t, e) {
|
|
@@ -57,9 +53,9 @@ function Jt(t, e) {
|
|
|
57
53
|
} = t;
|
|
58
54
|
if (a) {
|
|
59
55
|
if (r) {
|
|
60
|
-
if (e.queryHash !==
|
|
56
|
+
if (e.queryHash !== bt(a, e.options))
|
|
61
57
|
return !1;
|
|
62
|
-
} else if (!
|
|
58
|
+
} else if (!qe(e.queryKey, a))
|
|
63
59
|
return !1;
|
|
64
60
|
}
|
|
65
61
|
if (s !== "all") {
|
|
@@ -77,12 +73,12 @@ function Xt(t, e) {
|
|
|
77
73
|
if (s) {
|
|
78
74
|
if (Se(e.options.mutationKey) !== Se(u))
|
|
79
75
|
return !1;
|
|
80
|
-
} else if (!
|
|
76
|
+
} else if (!qe(e.options.mutationKey, u))
|
|
81
77
|
return !1;
|
|
82
78
|
}
|
|
83
79
|
return !(r && e.state.status !== r || n && !n(e));
|
|
84
80
|
}
|
|
85
|
-
function
|
|
81
|
+
function bt(t, e) {
|
|
86
82
|
return ((e == null ? void 0 : e.queryKeyHashFn) || Se)(t);
|
|
87
83
|
}
|
|
88
84
|
function Se(t) {
|
|
@@ -91,19 +87,19 @@ function Se(t) {
|
|
|
91
87
|
(e, s) => Ee(s) ? Object.keys(s).sort().reduce((r, n) => (r[n] = s[n], r), {}) : s
|
|
92
88
|
);
|
|
93
89
|
}
|
|
94
|
-
function
|
|
95
|
-
return t === e ? !0 : typeof t != typeof e ? !1 : t && e && typeof t == "object" && typeof e == "object" ? !Object.keys(e).some((s) => !
|
|
90
|
+
function qe(t, e) {
|
|
91
|
+
return t === e ? !0 : typeof t != typeof e ? !1 : t && e && typeof t == "object" && typeof e == "object" ? !Object.keys(e).some((s) => !qe(t[s], e[s])) : !1;
|
|
96
92
|
}
|
|
97
|
-
function
|
|
93
|
+
function Ce(t, e) {
|
|
98
94
|
if (t === e)
|
|
99
95
|
return t;
|
|
100
96
|
const s = He(t) && He(e);
|
|
101
97
|
if (s || Ee(t) && Ee(e)) {
|
|
102
98
|
const r = s ? t : Object.keys(t), n = r.length, u = s ? e : Object.keys(e), a = u.length, o = s ? [] : {};
|
|
103
99
|
let l = 0;
|
|
104
|
-
for (let
|
|
105
|
-
const v = s ?
|
|
106
|
-
(!s && r.includes(v) || s) && t[v] === void 0 && e[v] === void 0 ? (o[v] = void 0, l++) : (o[v] =
|
|
100
|
+
for (let R = 0; R < a; R++) {
|
|
101
|
+
const v = s ? R : u[R];
|
|
102
|
+
(!s && r.includes(v) || s) && t[v] === void 0 && e[v] === void 0 ? (o[v] = void 0, l++) : (o[v] = Ce(t[v], e[v]), o[v] === t[v] && t[v] !== void 0 && l++);
|
|
107
103
|
}
|
|
108
104
|
return n === a && l === n ? t : o;
|
|
109
105
|
}
|
|
@@ -132,7 +128,7 @@ function Ee(t) {
|
|
|
132
128
|
function Be(t) {
|
|
133
129
|
return Object.prototype.toString.call(t) === "[object Object]";
|
|
134
130
|
}
|
|
135
|
-
function
|
|
131
|
+
function mt(t) {
|
|
136
132
|
return new Promise((e) => {
|
|
137
133
|
setTimeout(e, t);
|
|
138
134
|
});
|
|
@@ -143,13 +139,13 @@ function Oe(t, e, s) {
|
|
|
143
139
|
if (s.structuralSharing !== !1) {
|
|
144
140
|
if (process.env.NODE_ENV !== "production")
|
|
145
141
|
try {
|
|
146
|
-
return
|
|
142
|
+
return Ce(t, e);
|
|
147
143
|
} catch (r) {
|
|
148
144
|
console.error(
|
|
149
145
|
`Structural sharing requires data to be JSON serializable. To fix this, turn off structuralSharing or return JSON-serializable data from your queryFn. [${s.queryHash}]: ${r}`
|
|
150
146
|
);
|
|
151
147
|
}
|
|
152
|
-
return
|
|
148
|
+
return Ce(t, e);
|
|
153
149
|
}
|
|
154
150
|
return e;
|
|
155
151
|
}
|
|
@@ -162,19 +158,19 @@ function es(t, e, s = 0) {
|
|
|
162
158
|
return s && r.length > s ? r.slice(0, -1) : r;
|
|
163
159
|
}
|
|
164
160
|
var ye = Symbol();
|
|
165
|
-
function
|
|
161
|
+
function gt(t, e) {
|
|
166
162
|
return process.env.NODE_ENV !== "production" && t.queryFn === ye && console.error(
|
|
167
163
|
`Attempted to invoke queryFn when set to skipToken. This is likely a configuration error. Query hash: '${t.queryHash}'`
|
|
168
164
|
), !t.queryFn && (e != null && e.initialPromise) ? () => e.initialPromise : !t.queryFn || t.queryFn === ye ? () => Promise.reject(new Error(`Missing queryFn: '${t.queryHash}'`)) : t.queryFn;
|
|
169
165
|
}
|
|
170
|
-
var K,
|
|
166
|
+
var K, q, J, Ze, Rt = (Ze = class extends Qe {
|
|
171
167
|
constructor() {
|
|
172
168
|
super();
|
|
173
169
|
y(this, K);
|
|
174
|
-
y(this,
|
|
170
|
+
y(this, q);
|
|
175
171
|
y(this, J);
|
|
176
172
|
c(this, J, (e) => {
|
|
177
|
-
if (
|
|
173
|
+
if (!V && window.addEventListener) {
|
|
178
174
|
const s = () => e();
|
|
179
175
|
return window.addEventListener("visibilitychange", s, !1), () => {
|
|
180
176
|
window.removeEventListener("visibilitychange", s);
|
|
@@ -183,15 +179,15 @@ var K, Q, J, $e, gt = ($e = class extends Ue {
|
|
|
183
179
|
});
|
|
184
180
|
}
|
|
185
181
|
onSubscribe() {
|
|
186
|
-
i(this,
|
|
182
|
+
i(this, q) || this.setEventListener(i(this, J));
|
|
187
183
|
}
|
|
188
184
|
onUnsubscribe() {
|
|
189
185
|
var e;
|
|
190
|
-
this.hasListeners() || ((e = i(this,
|
|
186
|
+
this.hasListeners() || ((e = i(this, q)) == null || e.call(this), c(this, q, void 0));
|
|
191
187
|
}
|
|
192
188
|
setEventListener(e) {
|
|
193
189
|
var s;
|
|
194
|
-
c(this, J, e), (s = i(this,
|
|
190
|
+
c(this, J, e), (s = i(this, q)) == null || s.call(this), c(this, q, e((r) => {
|
|
195
191
|
typeof r == "boolean" ? this.setFocused(r) : this.onFocus();
|
|
196
192
|
}));
|
|
197
193
|
}
|
|
@@ -208,14 +204,14 @@ var K, Q, J, $e, gt = ($e = class extends Ue {
|
|
|
208
204
|
var e;
|
|
209
205
|
return typeof i(this, K) == "boolean" ? i(this, K) : ((e = globalThis.document) == null ? void 0 : e.visibilityState) !== "hidden";
|
|
210
206
|
}
|
|
211
|
-
}, K = new WeakMap(),
|
|
207
|
+
}, K = new WeakMap(), q = new WeakMap(), J = new WeakMap(), Ze), tt = new Rt(), X, A, Y, We, St = (We = class extends Qe {
|
|
212
208
|
constructor() {
|
|
213
209
|
super();
|
|
214
210
|
y(this, X, !0);
|
|
215
211
|
y(this, A);
|
|
216
212
|
y(this, Y);
|
|
217
213
|
c(this, Y, (e) => {
|
|
218
|
-
if (
|
|
214
|
+
if (!V && window.addEventListener) {
|
|
219
215
|
const s = () => e(!0), r = () => e(!1);
|
|
220
216
|
return window.addEventListener("online", s, !1), window.addEventListener("offline", r, !1), () => {
|
|
221
217
|
window.removeEventListener("online", s), window.removeEventListener("offline", r);
|
|
@@ -242,7 +238,7 @@ var K, Q, J, $e, gt = ($e = class extends Ue {
|
|
|
242
238
|
isOnline() {
|
|
243
239
|
return i(this, X);
|
|
244
240
|
}
|
|
245
|
-
}, X = new WeakMap(), A = new WeakMap(), Y = new WeakMap(),
|
|
241
|
+
}, X = new WeakMap(), A = new WeakMap(), Y = new WeakMap(), We), st = new St();
|
|
246
242
|
function Fe() {
|
|
247
243
|
let t, e;
|
|
248
244
|
const s = new Promise((n, u) => {
|
|
@@ -265,30 +261,30 @@ function Fe() {
|
|
|
265
261
|
}), e(n);
|
|
266
262
|
}, s;
|
|
267
263
|
}
|
|
268
|
-
function
|
|
264
|
+
function Ct(t) {
|
|
269
265
|
return Math.min(1e3 * 2 ** t, 3e4);
|
|
270
266
|
}
|
|
271
|
-
function
|
|
272
|
-
return (t ?? "online") === "online" ?
|
|
267
|
+
function rt(t) {
|
|
268
|
+
return (t ?? "online") === "online" ? st.isOnline() : !0;
|
|
273
269
|
}
|
|
274
|
-
var
|
|
270
|
+
var it = class extends Error {
|
|
275
271
|
constructor(t) {
|
|
276
272
|
super("CancelledError"), this.revert = t == null ? void 0 : t.revert, this.silent = t == null ? void 0 : t.silent;
|
|
277
273
|
}
|
|
278
274
|
};
|
|
279
275
|
function me(t) {
|
|
280
|
-
return t instanceof
|
|
276
|
+
return t instanceof it;
|
|
281
277
|
}
|
|
282
|
-
function
|
|
278
|
+
function wt(t) {
|
|
283
279
|
let e = !1, s = 0, r = !1, n;
|
|
284
280
|
const u = Fe(), a = (f) => {
|
|
285
281
|
var g;
|
|
286
|
-
r || (m(new
|
|
282
|
+
r || (m(new it(f)), (g = t.abort) == null || g.call(t));
|
|
287
283
|
}, o = () => {
|
|
288
284
|
e = !0;
|
|
289
285
|
}, l = () => {
|
|
290
286
|
e = !1;
|
|
291
|
-
},
|
|
287
|
+
}, R = () => tt.isFocused() && (t.networkMode === "always" || st.isOnline()) && t.canRun(), v = () => rt(t.networkMode) && t.canRun(), h = (f) => {
|
|
292
288
|
var g;
|
|
293
289
|
r || (r = !0, (g = t.onSuccess) == null || g.call(t, f), n == null || n(), u.resolve(f));
|
|
294
290
|
}, m = (f) => {
|
|
@@ -297,7 +293,7 @@ function Rt(t) {
|
|
|
297
293
|
}, S = () => new Promise((f) => {
|
|
298
294
|
var g;
|
|
299
295
|
n = (P) => {
|
|
300
|
-
(r ||
|
|
296
|
+
(r || R()) && f(P);
|
|
301
297
|
}, (g = t.onPause) == null || g.call(t);
|
|
302
298
|
}).then(() => {
|
|
303
299
|
var f;
|
|
@@ -316,12 +312,12 @@ function Rt(t) {
|
|
|
316
312
|
var ve;
|
|
317
313
|
if (r)
|
|
318
314
|
return;
|
|
319
|
-
const
|
|
315
|
+
const U = t.retry ?? (V ? 0 : 3), N = t.retryDelay ?? Ct, ce = typeof N == "function" ? N(s, P) : N, le = U === !0 || typeof U == "number" && s < U || typeof U == "function" && U(s, P);
|
|
320
316
|
if (e || !le) {
|
|
321
317
|
m(P);
|
|
322
318
|
return;
|
|
323
319
|
}
|
|
324
|
-
s++, (ve = t.onFail) == null || ve.call(t, s, P),
|
|
320
|
+
s++, (ve = t.onFail) == null || ve.call(t, s, P), mt(ce).then(() => R() ? void 0 : S()).then(() => {
|
|
325
321
|
e ? m(P) : w();
|
|
326
322
|
});
|
|
327
323
|
});
|
|
@@ -336,7 +332,7 @@ function Rt(t) {
|
|
|
336
332
|
start: () => (v() ? w() : S().then(w), u)
|
|
337
333
|
};
|
|
338
334
|
}
|
|
339
|
-
function
|
|
335
|
+
function Et() {
|
|
340
336
|
let t = [], e = 0, s = (o) => {
|
|
341
337
|
o();
|
|
342
338
|
}, r = (o) => {
|
|
@@ -395,7 +391,7 @@ function wt() {
|
|
|
395
391
|
}
|
|
396
392
|
};
|
|
397
393
|
}
|
|
398
|
-
var Ae =
|
|
394
|
+
var Ae = Et(), _, Je, Ot = (Je = class {
|
|
399
395
|
constructor() {
|
|
400
396
|
y(this, _);
|
|
401
397
|
}
|
|
@@ -403,37 +399,37 @@ var Ae = wt(), _, We, Et = (We = class {
|
|
|
403
399
|
this.clearGcTimeout();
|
|
404
400
|
}
|
|
405
401
|
scheduleGc() {
|
|
406
|
-
this.clearGcTimeout(),
|
|
402
|
+
this.clearGcTimeout(), Re(this.gcTime) && c(this, _, setTimeout(() => {
|
|
407
403
|
this.optionalRemove();
|
|
408
404
|
}, this.gcTime));
|
|
409
405
|
}
|
|
410
406
|
updateGcTime(t) {
|
|
411
407
|
this.gcTime = Math.max(
|
|
412
408
|
this.gcTime || 0,
|
|
413
|
-
t ?? (
|
|
409
|
+
t ?? (V ? 1 / 0 : 5 * 60 * 1e3)
|
|
414
410
|
);
|
|
415
411
|
}
|
|
416
412
|
clearGcTimeout() {
|
|
417
413
|
i(this, _) && (clearTimeout(i(this, _)), c(this, _, void 0));
|
|
418
414
|
}
|
|
419
|
-
}, _ = new WeakMap(),
|
|
415
|
+
}, _ = new WeakMap(), Je), ee, te, I, C, oe, H, D, Q, Xe, ts = (Xe = class extends Ot {
|
|
420
416
|
constructor(e) {
|
|
421
417
|
super();
|
|
422
418
|
y(this, D);
|
|
423
419
|
y(this, ee);
|
|
424
420
|
y(this, te);
|
|
425
421
|
y(this, I);
|
|
426
|
-
y(this,
|
|
422
|
+
y(this, C);
|
|
427
423
|
y(this, oe);
|
|
428
424
|
y(this, H);
|
|
429
|
-
c(this, H, !1), c(this, oe, e.defaultOptions), this.setOptions(e.options), this.observers = [], c(this, I, e.cache), this.queryKey = e.queryKey, this.queryHash = e.queryHash, c(this, ee,
|
|
425
|
+
c(this, H, !1), c(this, oe, e.defaultOptions), this.setOptions(e.options), this.observers = [], c(this, I, e.cache), this.queryKey = e.queryKey, this.queryHash = e.queryHash, c(this, ee, Ft(this.options)), this.state = e.state ?? i(this, ee), this.scheduleGc();
|
|
430
426
|
}
|
|
431
427
|
get meta() {
|
|
432
428
|
return this.options.meta;
|
|
433
429
|
}
|
|
434
430
|
get promise() {
|
|
435
431
|
var e;
|
|
436
|
-
return (e = i(this,
|
|
432
|
+
return (e = i(this, C)) == null ? void 0 : e.promise;
|
|
437
433
|
}
|
|
438
434
|
setOptions(e) {
|
|
439
435
|
this.options = { ...i(this, oe), ...e }, this.updateGcTime(this.options.gcTime);
|
|
@@ -443,7 +439,7 @@ var Ae = wt(), _, We, Et = (We = class {
|
|
|
443
439
|
}
|
|
444
440
|
setData(e, s) {
|
|
445
441
|
const r = Oe(this.state.data, e, this.options);
|
|
446
|
-
return b(this, D,
|
|
442
|
+
return b(this, D, Q).call(this, {
|
|
447
443
|
data: r,
|
|
448
444
|
type: "success",
|
|
449
445
|
dataUpdatedAt: s == null ? void 0 : s.updatedAt,
|
|
@@ -451,12 +447,12 @@ var Ae = wt(), _, We, Et = (We = class {
|
|
|
451
447
|
}), r;
|
|
452
448
|
}
|
|
453
449
|
setState(e, s) {
|
|
454
|
-
b(this, D,
|
|
450
|
+
b(this, D, Q).call(this, { type: "setState", state: e, setStateOptions: s });
|
|
455
451
|
}
|
|
456
452
|
cancel(e) {
|
|
457
453
|
var r, n;
|
|
458
|
-
const s = (r = i(this,
|
|
459
|
-
return (n = i(this,
|
|
454
|
+
const s = (r = i(this, C)) == null ? void 0 : r.promise;
|
|
455
|
+
return (n = i(this, C)) == null || n.cancel(e), s ? s.then(ge).catch(ge) : Promise.resolve();
|
|
460
456
|
}
|
|
461
457
|
destroy() {
|
|
462
458
|
super.destroy(), this.cancel({ silent: !0 });
|
|
@@ -466,7 +462,7 @@ var Ae = wt(), _, We, Et = (We = class {
|
|
|
466
462
|
}
|
|
467
463
|
isActive() {
|
|
468
464
|
return this.observers.some(
|
|
469
|
-
(e) =>
|
|
465
|
+
(e) => x(e.options.enabled, this) !== !1
|
|
470
466
|
);
|
|
471
467
|
}
|
|
472
468
|
isDisabled() {
|
|
@@ -478,37 +474,37 @@ var Ae = wt(), _, We, Et = (We = class {
|
|
|
478
474
|
) : this.state.data === void 0;
|
|
479
475
|
}
|
|
480
476
|
isStaleByTime(e = 0) {
|
|
481
|
-
return this.state.isInvalidated || this.state.data === void 0 || !
|
|
477
|
+
return this.state.isInvalidated || this.state.data === void 0 || !et(this.state.dataUpdatedAt, e);
|
|
482
478
|
}
|
|
483
479
|
onFocus() {
|
|
484
480
|
var s;
|
|
485
481
|
const e = this.observers.find((r) => r.shouldFetchOnWindowFocus());
|
|
486
|
-
e == null || e.refetch({ cancelRefetch: !1 }), (s = i(this,
|
|
482
|
+
e == null || e.refetch({ cancelRefetch: !1 }), (s = i(this, C)) == null || s.continue();
|
|
487
483
|
}
|
|
488
484
|
onOnline() {
|
|
489
485
|
var s;
|
|
490
486
|
const e = this.observers.find((r) => r.shouldFetchOnReconnect());
|
|
491
|
-
e == null || e.refetch({ cancelRefetch: !1 }), (s = i(this,
|
|
487
|
+
e == null || e.refetch({ cancelRefetch: !1 }), (s = i(this, C)) == null || s.continue();
|
|
492
488
|
}
|
|
493
489
|
addObserver(e) {
|
|
494
490
|
this.observers.includes(e) || (this.observers.push(e), this.clearGcTimeout(), i(this, I).notify({ type: "observerAdded", query: this, observer: e }));
|
|
495
491
|
}
|
|
496
492
|
removeObserver(e) {
|
|
497
|
-
this.observers.includes(e) && (this.observers = this.observers.filter((s) => s !== e), this.observers.length || (i(this,
|
|
493
|
+
this.observers.includes(e) && (this.observers = this.observers.filter((s) => s !== e), this.observers.length || (i(this, C) && (i(this, H) ? i(this, C).cancel({ revert: !0 }) : i(this, C).cancelRetry()), this.scheduleGc()), i(this, I).notify({ type: "observerRemoved", query: this, observer: e }));
|
|
498
494
|
}
|
|
499
495
|
getObserversCount() {
|
|
500
496
|
return this.observers.length;
|
|
501
497
|
}
|
|
502
498
|
invalidate() {
|
|
503
|
-
this.state.isInvalidated || b(this, D,
|
|
499
|
+
this.state.isInvalidated || b(this, D, Q).call(this, { type: "invalidate" });
|
|
504
500
|
}
|
|
505
501
|
fetch(e, s) {
|
|
506
|
-
var l,
|
|
502
|
+
var l, R, v;
|
|
507
503
|
if (this.state.fetchStatus !== "idle") {
|
|
508
504
|
if (this.state.data !== void 0 && (s != null && s.cancelRefetch))
|
|
509
505
|
this.cancel({ silent: !0 });
|
|
510
|
-
else if (i(this,
|
|
511
|
-
return i(this,
|
|
506
|
+
else if (i(this, C))
|
|
507
|
+
return i(this, C).continueRetry(), i(this, C).promise;
|
|
512
508
|
}
|
|
513
509
|
if (e && this.setOptions(e), !this.options.queryFn) {
|
|
514
510
|
const h = this.observers.find((m) => m.options.queryFn);
|
|
@@ -523,7 +519,7 @@ var Ae = wt(), _, We, Et = (We = class {
|
|
|
523
519
|
get: () => (c(this, H, !0), r.signal)
|
|
524
520
|
});
|
|
525
521
|
}, u = () => {
|
|
526
|
-
const h =
|
|
522
|
+
const h = gt(this.options, s), m = {
|
|
527
523
|
queryKey: this.queryKey,
|
|
528
524
|
meta: this.meta
|
|
529
525
|
};
|
|
@@ -542,10 +538,10 @@ var Ae = wt(), _, We, Et = (We = class {
|
|
|
542
538
|
n(a), (l = this.options.behavior) == null || l.onFetch(
|
|
543
539
|
a,
|
|
544
540
|
this
|
|
545
|
-
), c(this, te, this.state), (this.state.fetchStatus === "idle" || this.state.fetchMeta !== ((
|
|
541
|
+
), c(this, te, this.state), (this.state.fetchStatus === "idle" || this.state.fetchMeta !== ((R = a.fetchOptions) == null ? void 0 : R.meta)) && b(this, D, Q).call(this, { type: "fetch", meta: (v = a.fetchOptions) == null ? void 0 : v.meta });
|
|
546
542
|
const o = (h) => {
|
|
547
543
|
var m, S, w, f;
|
|
548
|
-
me(h) && h.silent || b(this, D,
|
|
544
|
+
me(h) && h.silent || b(this, D, Q).call(this, {
|
|
549
545
|
type: "error",
|
|
550
546
|
error: h
|
|
551
547
|
}), me(h) || ((S = (m = i(this, I).config).onError) == null || S.call(
|
|
@@ -559,7 +555,7 @@ var Ae = wt(), _, We, Et = (We = class {
|
|
|
559
555
|
this
|
|
560
556
|
)), this.scheduleGc();
|
|
561
557
|
};
|
|
562
|
-
return c(this,
|
|
558
|
+
return c(this, C, wt({
|
|
563
559
|
initialPromise: s == null ? void 0 : s.initialPromise,
|
|
564
560
|
fn: a.fetchFn,
|
|
565
561
|
abort: r.abort.bind(r),
|
|
@@ -586,21 +582,21 @@ var Ae = wt(), _, We, Et = (We = class {
|
|
|
586
582
|
},
|
|
587
583
|
onError: o,
|
|
588
584
|
onFail: (h, m) => {
|
|
589
|
-
b(this, D,
|
|
585
|
+
b(this, D, Q).call(this, { type: "failed", failureCount: h, error: m });
|
|
590
586
|
},
|
|
591
587
|
onPause: () => {
|
|
592
|
-
b(this, D,
|
|
588
|
+
b(this, D, Q).call(this, { type: "pause" });
|
|
593
589
|
},
|
|
594
590
|
onContinue: () => {
|
|
595
|
-
b(this, D,
|
|
591
|
+
b(this, D, Q).call(this, { type: "continue" });
|
|
596
592
|
},
|
|
597
593
|
retry: a.options.retry,
|
|
598
594
|
retryDelay: a.options.retryDelay,
|
|
599
595
|
networkMode: a.options.networkMode,
|
|
600
596
|
canRun: () => !0
|
|
601
|
-
})), i(this,
|
|
597
|
+
})), i(this, C).start();
|
|
602
598
|
}
|
|
603
|
-
}, ee = new WeakMap(), te = new WeakMap(), I = new WeakMap(),
|
|
599
|
+
}, ee = new WeakMap(), te = new WeakMap(), I = new WeakMap(), C = new WeakMap(), oe = new WeakMap(), H = new WeakMap(), D = new WeakSet(), Q = function(e) {
|
|
604
600
|
const s = (r) => {
|
|
605
601
|
switch (e.type) {
|
|
606
602
|
case "failed":
|
|
@@ -622,7 +618,7 @@ var Ae = wt(), _, We, Et = (We = class {
|
|
|
622
618
|
case "fetch":
|
|
623
619
|
return {
|
|
624
620
|
...r,
|
|
625
|
-
...
|
|
621
|
+
...nt(r.data, this.options),
|
|
626
622
|
fetchMeta: e.meta ?? null
|
|
627
623
|
};
|
|
628
624
|
case "success":
|
|
@@ -669,19 +665,19 @@ var Ae = wt(), _, We, Et = (We = class {
|
|
|
669
665
|
r.onQueryUpdate();
|
|
670
666
|
}), i(this, I).notify({ query: this, type: "updated", action: e });
|
|
671
667
|
});
|
|
672
|
-
},
|
|
673
|
-
function
|
|
668
|
+
}, Xe);
|
|
669
|
+
function nt(t, e) {
|
|
674
670
|
return {
|
|
675
671
|
fetchFailureCount: 0,
|
|
676
672
|
fetchFailureReason: null,
|
|
677
|
-
fetchStatus:
|
|
673
|
+
fetchStatus: rt(e.networkMode) ? "fetching" : "paused",
|
|
678
674
|
...t === void 0 && {
|
|
679
675
|
error: null,
|
|
680
676
|
status: "pending"
|
|
681
677
|
}
|
|
682
678
|
};
|
|
683
679
|
}
|
|
684
|
-
function
|
|
680
|
+
function Ft(t) {
|
|
685
681
|
const e = typeof t.initialData == "function" ? t.initialData() : t.initialData, s = e !== void 0, r = s ? typeof t.initialDataUpdatedAt == "function" ? t.initialDataUpdatedAt() : t.initialDataUpdatedAt : 0;
|
|
686
682
|
return {
|
|
687
683
|
data: e,
|
|
@@ -698,7 +694,7 @@ function Ot(t) {
|
|
|
698
694
|
fetchStatus: "idle"
|
|
699
695
|
};
|
|
700
696
|
}
|
|
701
|
-
var F, d, ue, O, B, se, L, k, he, re, ie, G, z, M, ne, p, ae, Pe, Ie, Te, De,
|
|
697
|
+
var F, d, ue, O, B, se, L, k, he, re, ie, G, z, M, ne, p, ae, Pe, Ie, Te, De, xe, je, ke, ot, Ye, at = (Ye = class extends Qe {
|
|
702
698
|
constructor(e, s) {
|
|
703
699
|
super();
|
|
704
700
|
y(this, p);
|
|
@@ -733,25 +729,25 @@ var F, d, ue, O, B, se, L, k, he, re, ie, G, z, M, ne, p, ae, Pe, Ie, Te, De, qe
|
|
|
733
729
|
this.hasListeners() || this.destroy();
|
|
734
730
|
}
|
|
735
731
|
shouldFetchOnReconnect() {
|
|
736
|
-
return
|
|
732
|
+
return Ue(
|
|
737
733
|
i(this, d),
|
|
738
734
|
this.options,
|
|
739
735
|
this.options.refetchOnReconnect
|
|
740
736
|
);
|
|
741
737
|
}
|
|
742
738
|
shouldFetchOnWindowFocus() {
|
|
743
|
-
return
|
|
739
|
+
return Ue(
|
|
744
740
|
i(this, d),
|
|
745
741
|
this.options,
|
|
746
742
|
this.options.refetchOnWindowFocus
|
|
747
743
|
);
|
|
748
744
|
}
|
|
749
745
|
destroy() {
|
|
750
|
-
this.listeners = /* @__PURE__ */ new Set(), b(this, p,
|
|
746
|
+
this.listeners = /* @__PURE__ */ new Set(), b(this, p, xe).call(this), b(this, p, je).call(this), i(this, d).removeObserver(this);
|
|
751
747
|
}
|
|
752
748
|
setOptions(e, s) {
|
|
753
749
|
const r = this.options, n = i(this, d);
|
|
754
|
-
if (this.options = i(this, F).defaultQueryOptions(e), this.options.enabled !== void 0 && typeof this.options.enabled != "boolean" && typeof this.options.enabled != "function" && typeof
|
|
750
|
+
if (this.options = i(this, F).defaultQueryOptions(e), this.options.enabled !== void 0 && typeof this.options.enabled != "boolean" && typeof this.options.enabled != "function" && typeof x(this.options.enabled, i(this, d)) != "boolean")
|
|
755
751
|
throw new Error(
|
|
756
752
|
"Expected enabled to be a boolean or a callback that returns a boolean"
|
|
757
753
|
);
|
|
@@ -766,13 +762,13 @@ var F, d, ue, O, B, se, L, k, he, re, ie, G, z, M, ne, p, ae, Pe, Ie, Te, De, qe
|
|
|
766
762
|
n,
|
|
767
763
|
this.options,
|
|
768
764
|
r
|
|
769
|
-
) && b(this, p, ae).call(this), this.updateResult(s), u && (i(this, d) !== n ||
|
|
765
|
+
) && b(this, p, ae).call(this), this.updateResult(s), u && (i(this, d) !== n || x(this.options.enabled, i(this, d)) !== x(r.enabled, i(this, d)) || fe(this.options.staleTime, i(this, d)) !== fe(r.staleTime, i(this, d))) && b(this, p, Pe).call(this);
|
|
770
766
|
const a = b(this, p, Ie).call(this);
|
|
771
|
-
u && (i(this, d) !== n ||
|
|
767
|
+
u && (i(this, d) !== n || x(this.options.enabled, i(this, d)) !== x(r.enabled, i(this, d)) || a !== i(this, M)) && b(this, p, Te).call(this, a);
|
|
772
768
|
}
|
|
773
769
|
getOptimisticResult(e) {
|
|
774
770
|
const s = i(this, F).getQueryCache().build(i(this, F), e), r = this.createResult(s, e);
|
|
775
|
-
return
|
|
771
|
+
return It(this, r) && (c(this, O, r), c(this, se, this.options), c(this, B, i(this, d).state)), r;
|
|
776
772
|
}
|
|
777
773
|
getCurrentResult() {
|
|
778
774
|
return i(this, O);
|
|
@@ -810,13 +806,13 @@ var F, d, ue, O, B, se, L, k, he, re, ie, G, z, M, ne, p, ae, Pe, Ie, Te, De, qe
|
|
|
810
806
|
}
|
|
811
807
|
createResult(e, s) {
|
|
812
808
|
var Ke;
|
|
813
|
-
const r = i(this, d), n = this.options, u = i(this, O), a = i(this, B), o = i(this, se),
|
|
809
|
+
const r = i(this, d), n = this.options, u = i(this, O), a = i(this, B), o = i(this, se), R = e !== r ? e.state : i(this, ue), { state: v } = e;
|
|
814
810
|
let h = { ...v }, m = !1, S;
|
|
815
811
|
if (s._optimisticResults) {
|
|
816
812
|
const E = this.hasListeners(), Z = !E && Ge(e, s), W = E && ze(e, r, s, n);
|
|
817
813
|
(Z || W) && (h = {
|
|
818
814
|
...h,
|
|
819
|
-
...
|
|
815
|
+
...nt(v.data, e.options)
|
|
820
816
|
}), s._optimisticResults === "isRestoring" && (h.fetchStatus = "idle");
|
|
821
817
|
}
|
|
822
818
|
let { error: w, errorUpdatedAt: f, status: g } = h;
|
|
@@ -851,10 +847,10 @@ var F, d, ue, O, B, se, L, k, he, re, ie, G, z, M, ne, p, ae, Pe, Ie, Te, De, qe
|
|
|
851
847
|
), m = !0);
|
|
852
848
|
}
|
|
853
849
|
i(this, k) && (w = i(this, k), S = i(this, re), f = Date.now(), g = "error");
|
|
854
|
-
const P = h.fetchStatus === "fetching",
|
|
850
|
+
const P = h.fetchStatus === "fetching", U = g === "pending", N = g === "error", ce = U && P, le = S !== void 0, j = {
|
|
855
851
|
status: g,
|
|
856
852
|
fetchStatus: h.fetchStatus,
|
|
857
|
-
isPending:
|
|
853
|
+
isPending: U,
|
|
858
854
|
isSuccess: g === "success",
|
|
859
855
|
isError: N,
|
|
860
856
|
isInitialLoading: ce,
|
|
@@ -867,9 +863,9 @@ var F, d, ue, O, B, se, L, k, he, re, ie, G, z, M, ne, p, ae, Pe, Ie, Te, De, qe
|
|
|
867
863
|
failureReason: h.fetchFailureReason,
|
|
868
864
|
errorUpdateCount: h.errorUpdateCount,
|
|
869
865
|
isFetched: h.dataUpdateCount > 0 || h.errorUpdateCount > 0,
|
|
870
|
-
isFetchedAfterMount: h.dataUpdateCount >
|
|
866
|
+
isFetchedAfterMount: h.dataUpdateCount > R.dataUpdateCount || h.errorUpdateCount > R.errorUpdateCount,
|
|
871
867
|
isFetching: P,
|
|
872
|
-
isRefetching: P && !
|
|
868
|
+
isRefetching: P && !U,
|
|
873
869
|
isLoadingError: N && !le,
|
|
874
870
|
isPaused: h.fetchStatus === "paused",
|
|
875
871
|
isPlaceholderData: m,
|
|
@@ -913,12 +909,12 @@ var F, d, ue, O, B, se, L, k, he, re, ie, G, z, M, ne, p, ae, Pe, Ie, Te, De, qe
|
|
|
913
909
|
const l = new Set(
|
|
914
910
|
o ?? i(this, ne)
|
|
915
911
|
);
|
|
916
|
-
return this.options.throwOnError && l.add("error"), Object.keys(i(this, O)).some((
|
|
917
|
-
const v =
|
|
912
|
+
return this.options.throwOnError && l.add("error"), Object.keys(i(this, O)).some((R) => {
|
|
913
|
+
const v = R;
|
|
918
914
|
return i(this, O)[v] !== s[v] && l.has(v);
|
|
919
915
|
});
|
|
920
916
|
};
|
|
921
|
-
(e == null ? void 0 : e.listeners) !== !1 && u() && (n.listeners = !0), b(this, p,
|
|
917
|
+
(e == null ? void 0 : e.listeners) !== !1 && u() && (n.listeners = !0), b(this, p, ot).call(this, { ...n, ...e });
|
|
922
918
|
}
|
|
923
919
|
onQueryUpdate() {
|
|
924
920
|
this.updateResult(), this.hasListeners() && b(this, p, De).call(this);
|
|
@@ -931,26 +927,26 @@ var F, d, ue, O, B, se, L, k, he, re, ie, G, z, M, ne, p, ae, Pe, Ie, Te, De, qe
|
|
|
931
927
|
);
|
|
932
928
|
return e != null && e.throwOnError || (s = s.catch(ge)), s;
|
|
933
929
|
}, Pe = function() {
|
|
934
|
-
b(this, p,
|
|
930
|
+
b(this, p, xe).call(this);
|
|
935
931
|
const e = fe(
|
|
936
932
|
this.options.staleTime,
|
|
937
933
|
i(this, d)
|
|
938
934
|
);
|
|
939
|
-
if (
|
|
935
|
+
if (V || i(this, O).isStale || !Re(e))
|
|
940
936
|
return;
|
|
941
|
-
const r =
|
|
937
|
+
const r = et(i(this, O).dataUpdatedAt, e) + 1;
|
|
942
938
|
c(this, G, setTimeout(() => {
|
|
943
939
|
i(this, O).isStale || this.updateResult();
|
|
944
940
|
}, r));
|
|
945
941
|
}, Ie = function() {
|
|
946
942
|
return (typeof this.options.refetchInterval == "function" ? this.options.refetchInterval(i(this, d)) : this.options.refetchInterval) ?? !1;
|
|
947
943
|
}, Te = function(e) {
|
|
948
|
-
b(this, p, je).call(this), c(this, M, e), !(
|
|
949
|
-
(this.options.refetchIntervalInBackground ||
|
|
944
|
+
b(this, p, je).call(this), c(this, M, e), !(V || x(this.options.enabled, i(this, d)) === !1 || !Re(i(this, M)) || i(this, M) === 0) && c(this, z, setInterval(() => {
|
|
945
|
+
(this.options.refetchIntervalInBackground || tt.isFocused()) && b(this, p, ae).call(this);
|
|
950
946
|
}, i(this, M)));
|
|
951
947
|
}, De = function() {
|
|
952
948
|
b(this, p, Pe).call(this), b(this, p, Te).call(this, b(this, p, Ie).call(this));
|
|
953
|
-
},
|
|
949
|
+
}, xe = function() {
|
|
954
950
|
i(this, G) && (clearTimeout(i(this, G)), c(this, G, void 0));
|
|
955
951
|
}, je = function() {
|
|
956
952
|
i(this, z) && (clearInterval(i(this, z)), c(this, z, void 0));
|
|
@@ -960,7 +956,7 @@ var F, d, ue, O, B, se, L, k, he, re, ie, G, z, M, ne, p, ae, Pe, Ie, Te, De, qe
|
|
|
960
956
|
return;
|
|
961
957
|
const s = i(this, d);
|
|
962
958
|
c(this, d, e), c(this, ue, e.state), this.hasListeners() && (s == null || s.removeObserver(this), e.addObserver(this));
|
|
963
|
-
},
|
|
959
|
+
}, ot = function(e) {
|
|
964
960
|
Ae.batch(() => {
|
|
965
961
|
e.listeners && this.listeners.forEach((s) => {
|
|
966
962
|
s(i(this, O));
|
|
@@ -969,33 +965,35 @@ var F, d, ue, O, B, se, L, k, he, re, ie, G, z, M, ne, p, ae, Pe, Ie, Te, De, qe
|
|
|
969
965
|
type: "observerResultsUpdated"
|
|
970
966
|
});
|
|
971
967
|
});
|
|
972
|
-
},
|
|
973
|
-
function
|
|
974
|
-
return
|
|
968
|
+
}, Ye);
|
|
969
|
+
function Pt(t, e) {
|
|
970
|
+
return x(e.enabled, t) !== !1 && t.state.data === void 0 && !(t.state.status === "error" && e.retryOnMount === !1);
|
|
975
971
|
}
|
|
976
972
|
function Ge(t, e) {
|
|
977
|
-
return
|
|
973
|
+
return Pt(t, e) || t.state.data !== void 0 && Ue(t, e, e.refetchOnMount);
|
|
978
974
|
}
|
|
979
|
-
function
|
|
980
|
-
if (
|
|
975
|
+
function Ue(t, e, s) {
|
|
976
|
+
if (x(e.enabled, t) !== !1) {
|
|
981
977
|
const r = typeof s == "function" ? s(t) : s;
|
|
982
978
|
return r === "always" || r !== !1 && Le(t, e);
|
|
983
979
|
}
|
|
984
980
|
return !1;
|
|
985
981
|
}
|
|
986
982
|
function ze(t, e, s, r) {
|
|
987
|
-
return (t !== e ||
|
|
983
|
+
return (t !== e || x(r.enabled, t) === !1) && (!s.suspense || t.state.status !== "error") && Le(t, s);
|
|
988
984
|
}
|
|
989
985
|
function Le(t, e) {
|
|
990
|
-
return
|
|
986
|
+
return x(e.enabled, t) !== !1 && t.isStaleByTime(fe(e.staleTime, t));
|
|
991
987
|
}
|
|
992
|
-
function
|
|
988
|
+
function It(t, e) {
|
|
993
989
|
return !we(t.getCurrentResult(), e);
|
|
994
990
|
}
|
|
995
|
-
var
|
|
991
|
+
var ut = T.createContext(
|
|
996
992
|
void 0
|
|
997
|
-
),
|
|
998
|
-
const e = T.useContext(
|
|
993
|
+
), Tt = (t) => {
|
|
994
|
+
const e = T.useContext(ut);
|
|
995
|
+
if (t)
|
|
996
|
+
return t;
|
|
999
997
|
if (!e)
|
|
1000
998
|
throw new Error("No QueryClient set, use QueryClientProvider to set one");
|
|
1001
999
|
return e;
|
|
@@ -1004,9 +1002,9 @@ var ot = T.createContext(
|
|
|
1004
1002
|
children: e
|
|
1005
1003
|
}) => (T.useEffect(() => (t.mount(), () => {
|
|
1006
1004
|
t.unmount();
|
|
1007
|
-
}), [t]), /* @__PURE__ */
|
|
1008
|
-
|
|
1009
|
-
function
|
|
1005
|
+
}), [t]), /* @__PURE__ */ pt.jsx(ut.Provider, { value: t, children: e })), ht = T.createContext(!1), Dt = () => T.useContext(ht);
|
|
1006
|
+
ht.Provider;
|
|
1007
|
+
function xt() {
|
|
1010
1008
|
let t = !1;
|
|
1011
1009
|
return {
|
|
1012
1010
|
clearReset: () => {
|
|
@@ -1018,15 +1016,15 @@ function Dt() {
|
|
|
1018
1016
|
isReset: () => t
|
|
1019
1017
|
};
|
|
1020
1018
|
}
|
|
1021
|
-
var
|
|
1022
|
-
function
|
|
1019
|
+
var jt = T.createContext(xt()), kt = () => T.useContext(jt);
|
|
1020
|
+
function Ut(t, e) {
|
|
1023
1021
|
return typeof t == "function" ? t(...e) : !!t;
|
|
1024
1022
|
}
|
|
1025
|
-
function
|
|
1023
|
+
function Ve() {
|
|
1026
1024
|
}
|
|
1027
|
-
var
|
|
1028
|
-
(t.suspense || t.throwOnError) && (e.isReset() || (t.retryOnMount = !1));
|
|
1029
|
-
},
|
|
1025
|
+
var Qt = (t, e) => {
|
|
1026
|
+
(t.suspense || t.throwOnError || t.experimental_prefetchInRender) && (e.isReset() || (t.retryOnMount = !1));
|
|
1027
|
+
}, qt = (t) => {
|
|
1030
1028
|
T.useEffect(() => {
|
|
1031
1029
|
t.clearReset();
|
|
1032
1030
|
}, [t]);
|
|
@@ -1035,33 +1033,32 @@ var Ut = (t, e) => {
|
|
|
1035
1033
|
errorResetBoundary: e,
|
|
1036
1034
|
throwOnError: s,
|
|
1037
1035
|
query: r
|
|
1038
|
-
}) => t.isError && !e.isReset() && !t.isFetching && r &&
|
|
1039
|
-
t.suspense && (
|
|
1040
|
-
}, Nt = (t, e) => t.isLoading && t.isFetching && !e, Kt = (t, e) => (t == null ? void 0 : t.suspense) && e.isPending,
|
|
1036
|
+
}) => t.isError && !e.isReset() && !t.isFetching && r && Ut(s, [t.error, r]), Lt = (t, e) => e.state.data === void 0, Mt = (t) => {
|
|
1037
|
+
t.suspense && (t.staleTime === void 0 && (t.staleTime = 1e3), typeof t.gcTime == "number" && (t.gcTime = Math.max(t.gcTime, 1e3)));
|
|
1038
|
+
}, Nt = (t, e) => t.isLoading && t.isFetching && !e, Kt = (t, e) => (t == null ? void 0 : t.suspense) && e.isPending, $e = (t, e, s) => e.fetchOptimistic(t).catch(() => {
|
|
1041
1039
|
s.clearReset();
|
|
1042
1040
|
});
|
|
1043
|
-
function
|
|
1041
|
+
function ct(t, e, s) {
|
|
1044
1042
|
var v, h, m, S, w;
|
|
1045
1043
|
if (process.env.NODE_ENV !== "production" && (typeof t != "object" || Array.isArray(t)))
|
|
1046
1044
|
throw new Error(
|
|
1047
1045
|
'Bad argument type. Starting with v5, only the "Object" form is allowed when calling query related functions. Please use the error stack to find the culprit call. More info here: https://tanstack.com/query/latest/docs/react/guides/migrating-to-v5#supports-a-single-signature-one-object'
|
|
1048
1046
|
);
|
|
1049
|
-
const r =
|
|
1047
|
+
const r = Tt(s), n = Dt(), u = kt(), a = r.defaultQueryOptions(t);
|
|
1050
1048
|
(h = (v = r.getDefaultOptions().queries) == null ? void 0 : v._experimental_beforeQuery) == null || h.call(
|
|
1051
1049
|
v,
|
|
1052
1050
|
a
|
|
1053
|
-
), a._optimisticResults = n ? "isRestoring" : "optimistic", Mt(a),
|
|
1051
|
+
), a._optimisticResults = n ? "isRestoring" : "optimistic", Mt(a), Qt(a, u), qt(u);
|
|
1054
1052
|
const o = !r.getQueryCache().get(a.queryHash), [l] = T.useState(
|
|
1055
1053
|
() => new e(
|
|
1056
1054
|
r,
|
|
1057
1055
|
a
|
|
1058
1056
|
)
|
|
1059
|
-
),
|
|
1057
|
+
), R = l.getOptimisticResult(a);
|
|
1060
1058
|
if (T.useSyncExternalStore(
|
|
1061
1059
|
T.useCallback(
|
|
1062
1060
|
(f) => {
|
|
1063
|
-
const g = n ? ()
|
|
1064
|
-
} : l.subscribe(Ae.batchCalls(f));
|
|
1061
|
+
const g = n ? Ve : l.subscribe(Ae.batchCalls(f));
|
|
1065
1062
|
return l.updateResult(), g;
|
|
1066
1063
|
},
|
|
1067
1064
|
[l, n]
|
|
@@ -1070,38 +1067,38 @@ function ht(t, e, s) {
|
|
|
1070
1067
|
() => l.getCurrentResult()
|
|
1071
1068
|
), T.useEffect(() => {
|
|
1072
1069
|
l.setOptions(a, { listeners: !1 });
|
|
1073
|
-
}, [a, l]), Kt(a,
|
|
1074
|
-
throw
|
|
1070
|
+
}, [a, l]), Kt(a, R))
|
|
1071
|
+
throw $e(a, l, u);
|
|
1075
1072
|
if (At({
|
|
1076
|
-
result:
|
|
1073
|
+
result: R,
|
|
1077
1074
|
errorResetBoundary: u,
|
|
1078
1075
|
throwOnError: a.throwOnError,
|
|
1079
1076
|
query: r.getQueryCache().get(a.queryHash)
|
|
1080
1077
|
}))
|
|
1081
|
-
throw
|
|
1078
|
+
throw R.error;
|
|
1082
1079
|
if ((S = (m = r.getDefaultOptions().queries) == null ? void 0 : m._experimental_afterQuery) == null || S.call(
|
|
1083
1080
|
m,
|
|
1084
1081
|
a,
|
|
1085
|
-
|
|
1086
|
-
), a.experimental_prefetchInRender &&
|
|
1082
|
+
R
|
|
1083
|
+
), a.experimental_prefetchInRender && !V && Nt(R, n)) {
|
|
1087
1084
|
const f = o ? (
|
|
1088
1085
|
// Fetch immediately on render in order to ensure `.promise` is resolved even if the component is unmounted
|
|
1089
|
-
|
|
1086
|
+
$e(a, l, u)
|
|
1090
1087
|
) : (
|
|
1091
1088
|
// subscribe to the "cache promise" so that we can finalize the currentThenable once data comes in
|
|
1092
1089
|
(w = r.getQueryCache().get(a.queryHash)) == null ? void 0 : w.promise
|
|
1093
1090
|
);
|
|
1094
|
-
f == null || f.catch(
|
|
1095
|
-
l.
|
|
1091
|
+
f == null || f.catch(Ve).finally(() => {
|
|
1092
|
+
l.updateResult();
|
|
1096
1093
|
});
|
|
1097
1094
|
}
|
|
1098
|
-
return a.notifyOnChangeProps ?
|
|
1095
|
+
return a.notifyOnChangeProps ? R : l.trackResult(R);
|
|
1099
1096
|
}
|
|
1100
1097
|
function _t(t, e) {
|
|
1101
|
-
return
|
|
1098
|
+
return ct(t, at, e);
|
|
1102
1099
|
}
|
|
1103
1100
|
function Ht(t, e) {
|
|
1104
|
-
return process.env.NODE_ENV !== "production" && t.queryFn === ye && console.error("skipToken is not allowed for useSuspenseQuery"),
|
|
1101
|
+
return process.env.NODE_ENV !== "production" && t.queryFn === ye && console.error("skipToken is not allowed for useSuspenseQuery"), ct(
|
|
1105
1102
|
{
|
|
1106
1103
|
...t,
|
|
1107
1104
|
enabled: !0,
|
|
@@ -1109,40 +1106,38 @@ function Ht(t, e) {
|
|
|
1109
1106
|
throwOnError: Lt,
|
|
1110
1107
|
placeholderData: void 0
|
|
1111
1108
|
},
|
|
1112
|
-
|
|
1109
|
+
at,
|
|
1110
|
+
e
|
|
1113
1111
|
);
|
|
1114
1112
|
}
|
|
1115
|
-
const
|
|
1113
|
+
const $ = (...t) => {
|
|
1114
|
+
const e = t.filter((s) => !!s).map((s) => s.replace(/(^\/+|\/+$)/g, "")).join("/").replace(/(^\/+|\/+$)/g, "");
|
|
1115
|
+
return e ? `/${e}` : "/";
|
|
1116
|
+
}, Bt = ft(
|
|
1116
1117
|
void 0
|
|
1117
|
-
),
|
|
1118
|
-
const t =
|
|
1118
|
+
), lt = () => {
|
|
1119
|
+
const t = yt(Bt);
|
|
1119
1120
|
if (!t)
|
|
1120
1121
|
throw new Error("useZudoku must be used within a ZudokuProvider.");
|
|
1121
1122
|
return t;
|
|
1122
1123
|
}, rs = () => {
|
|
1123
|
-
const { getApiIdentities: t } =
|
|
1124
|
+
const { getApiIdentities: t } = lt();
|
|
1124
1125
|
return _t({
|
|
1125
1126
|
queryFn: t,
|
|
1126
1127
|
queryKey: ["api-identities"]
|
|
1127
1128
|
});
|
|
1128
|
-
},
|
|
1129
|
-
const { getPluginSidebar: t, sidebars: e, topNavigation: s } =
|
|
1130
|
-
if ((
|
|
1131
|
-
return
|
|
1132
|
-
})), u = s.find((
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
const a = await t(r.pathname);
|
|
1136
|
-
return {
|
|
1137
|
-
sidebar: [
|
|
1138
|
-
...n ? n[1] : [],
|
|
1139
|
-
...a
|
|
1140
|
-
],
|
|
1141
|
-
topNavItem: u
|
|
1142
|
-
};
|
|
1143
|
-
},
|
|
1144
|
-
queryKey: ["navigation", r.pathname]
|
|
1129
|
+
}, dt = () => {
|
|
1130
|
+
const { getPluginSidebar: t, sidebars: e, topNavigation: s } = lt(), r = pe(), n = Object.entries(e).find(([, o]) => Me(o, (l) => {
|
|
1131
|
+
if ((l.type === "doc" ? $(l.id) : l.type === "category" && l.link ? $(l.link.id) : void 0) === r.pathname)
|
|
1132
|
+
return l;
|
|
1133
|
+
})), u = s.find((o) => o.id === (n == null ? void 0 : n[0])) ?? s.find((o) => vt(o.id, r.pathname)), { data: a } = Ht({
|
|
1134
|
+
queryFn: () => t(r.pathname),
|
|
1135
|
+
queryKey: ["plugin-sidebar", r.pathname]
|
|
1145
1136
|
});
|
|
1137
|
+
return {
|
|
1138
|
+
sidebar: [...n ? n[1] : [], ...a],
|
|
1139
|
+
topNavItem: u
|
|
1140
|
+
};
|
|
1146
1141
|
}, Me = (t, e) => {
|
|
1147
1142
|
for (const s of t) {
|
|
1148
1143
|
const r = Ne(s, e);
|
|
@@ -1160,22 +1155,22 @@ const Bt = dt(
|
|
|
1160
1155
|
if (u !== void 0) return u;
|
|
1161
1156
|
}
|
|
1162
1157
|
}, is = () => {
|
|
1163
|
-
const t = pe(), s =
|
|
1158
|
+
const t = pe(), s = dt().sidebar;
|
|
1164
1159
|
return Me(s, (r) => {
|
|
1165
|
-
if (r.type === "doc" &&
|
|
1160
|
+
if (r.type === "doc" && $(r.id) === t.pathname)
|
|
1166
1161
|
return r;
|
|
1167
1162
|
});
|
|
1168
1163
|
}, ns = (t) => {
|
|
1169
1164
|
const e = pe();
|
|
1170
1165
|
return Ne(t, (s) => {
|
|
1171
|
-
if (s.type === "category" && s.link &&
|
|
1166
|
+
if (s.type === "category" && s.link && $(s.link.id) === e.pathname || s.type === "doc" && $(s.id) === e.pathname)
|
|
1172
1167
|
return !0;
|
|
1173
1168
|
});
|
|
1174
1169
|
}, as = () => {
|
|
1175
|
-
const t = pe().pathname, s =
|
|
1170
|
+
const t = pe().pathname, s = dt().sidebar;
|
|
1176
1171
|
let r, n, u = !1;
|
|
1177
1172
|
return Me(s, (a) => {
|
|
1178
|
-
const o = a.type === "doc" ?
|
|
1173
|
+
const o = a.type === "doc" ? $(a.id) : a.type === "category" && a.link ? $(a.link.id) : void 0;
|
|
1179
1174
|
if (o) {
|
|
1180
1175
|
if (u)
|
|
1181
1176
|
return n = { label: a.label, id: o }, !0;
|
|
@@ -1184,40 +1179,40 @@ const Bt = dt(
|
|
|
1184
1179
|
}), { prev: r, next: n };
|
|
1185
1180
|
};
|
|
1186
1181
|
export {
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
|
|
1182
|
+
ye as A,
|
|
1183
|
+
ss as B,
|
|
1184
|
+
ns as C,
|
|
1185
|
+
dt as D,
|
|
1186
|
+
Me as E,
|
|
1192
1187
|
ts as Q,
|
|
1193
|
-
|
|
1194
|
-
|
|
1188
|
+
Ot as R,
|
|
1189
|
+
Qe as S,
|
|
1195
1190
|
Bt as Z,
|
|
1196
1191
|
is as a,
|
|
1197
1192
|
as as b,
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
|
|
1193
|
+
wt as c,
|
|
1194
|
+
Tt as d,
|
|
1195
|
+
Ve as e,
|
|
1196
|
+
Ut as f,
|
|
1202
1197
|
Ht as g,
|
|
1203
1198
|
Se as h,
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
|
|
1199
|
+
rs as i,
|
|
1200
|
+
$ as j,
|
|
1201
|
+
_t as k,
|
|
1202
|
+
bt as l,
|
|
1208
1203
|
Jt as m,
|
|
1209
1204
|
Ae as n,
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
|
|
1205
|
+
Xt as o,
|
|
1206
|
+
ge as p,
|
|
1207
|
+
gt as q,
|
|
1208
|
+
es as r,
|
|
1214
1209
|
we as s,
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
|
|
1219
|
-
|
|
1220
|
-
|
|
1221
|
-
|
|
1210
|
+
Yt as t,
|
|
1211
|
+
lt as u,
|
|
1212
|
+
tt as v,
|
|
1213
|
+
st as w,
|
|
1214
|
+
fe as x,
|
|
1215
|
+
Wt as y,
|
|
1216
|
+
qe as z
|
|
1222
1217
|
};
|
|
1223
|
-
//# sourceMappingURL=utils-
|
|
1218
|
+
//# sourceMappingURL=utils-DcpDOncX.js.map
|