zudoku 0.0.0-f3858d6 → 0.0.0-f417aae
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/README.md +121 -0
- package/cli.js +2 -2
- package/dist/app/entry.client.js +2 -2
- package/dist/app/entry.client.js.map +1 -1
- package/dist/app/entry.server.js +0 -3
- package/dist/app/entry.server.js.map +1 -1
- package/dist/app/main.d.ts +0 -1
- package/dist/app/main.js +23 -10
- package/dist/app/main.js.map +1 -1
- package/dist/app/standalone.js.map +1 -1
- package/dist/cli/common/machine-id/lib.js.map +1 -1
- package/dist/cli/common/outdated.js.map +1 -1
- package/dist/cli/common/utils/box.js.map +1 -1
- package/dist/config/validators/InputSidebarSchema.d.ts +21 -6
- package/dist/config/validators/InputSidebarSchema.js +7 -28
- package/dist/config/validators/InputSidebarSchema.js.map +1 -1
- package/dist/config/validators/SidebarSchema.d.ts +1 -1
- package/dist/config/validators/SidebarSchema.js +14 -11
- package/dist/config/validators/SidebarSchema.js.map +1 -1
- package/dist/config/validators/validate.d.ts +117 -95
- package/dist/config/validators/validate.js +23 -8
- package/dist/config/validators/validate.js.map +1 -1
- package/dist/index.d.ts +2 -5
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/lib/authentication/components/CallbackHandler.js +21 -31
- package/dist/lib/authentication/components/CallbackHandler.js.map +1 -1
- package/dist/lib/authentication/hook.d.ts +1 -1
- package/dist/lib/authentication/hook.js +1 -1
- package/dist/lib/authentication/hook.js.map +1 -1
- package/dist/lib/components/Header.js +1 -5
- package/dist/lib/components/Header.js.map +1 -1
- package/dist/lib/components/MobileTopNavigation.js +4 -1
- package/dist/lib/components/MobileTopNavigation.js.map +1 -1
- package/dist/lib/components/Search.js +1 -1
- package/dist/lib/components/Search.js.map +1 -1
- package/dist/lib/components/SlotletProvider.d.ts +6 -2
- package/dist/lib/components/SlotletProvider.js +3 -5
- package/dist/lib/components/SlotletProvider.js.map +1 -1
- package/dist/lib/components/TopNavigation.d.ts +3 -0
- package/dist/lib/components/TopNavigation.js +13 -30
- package/dist/lib/components/TopNavigation.js.map +1 -1
- package/dist/lib/components/context/ZudokuContext.d.ts +11 -4
- package/dist/lib/components/context/ZudokuContext.js +20 -26
- package/dist/lib/components/context/ZudokuContext.js.map +1 -1
- package/dist/lib/components/index.d.ts +17 -8
- package/dist/lib/components/index.js +10 -3
- package/dist/lib/components/index.js.map +1 -1
- package/dist/lib/components/navigation/Sidebar.js +3 -3
- package/dist/lib/components/navigation/Sidebar.js.map +1 -1
- package/dist/lib/components/navigation/SidebarCategory.js +20 -7
- package/dist/lib/components/navigation/SidebarCategory.js.map +1 -1
- package/dist/lib/components/navigation/SidebarItem.js +14 -5
- package/dist/lib/components/navigation/SidebarItem.js.map +1 -1
- package/dist/lib/components/navigation/utils.js +14 -10
- package/dist/lib/components/navigation/utils.js.map +1 -1
- package/dist/lib/core/DevPortalContext.d.ts +7 -3
- package/dist/lib/core/DevPortalContext.js.map +1 -1
- package/dist/lib/core/plugins.d.ts +0 -1
- package/dist/lib/core/plugins.js.map +1 -1
- package/dist/lib/errors/ErrorAlert.d.ts +1 -1
- package/dist/lib/errors/ErrorAlert.js +8 -3
- package/dist/lib/errors/ErrorAlert.js.map +1 -1
- package/dist/lib/plugins/custom-pages/CustomPage.d.ts +2 -0
- package/dist/lib/plugins/custom-pages/CustomPage.js +11 -0
- package/dist/lib/plugins/custom-pages/CustomPage.js.map +1 -0
- package/dist/lib/plugins/custom-pages/index.d.ts +8 -6
- package/dist/lib/plugins/custom-pages/index.js +3 -4
- package/dist/lib/plugins/custom-pages/index.js.map +1 -1
- package/dist/lib/plugins/markdown/MdxPage.js +1 -1
- package/dist/lib/plugins/markdown/MdxPage.js.map +1 -1
- package/dist/lib/plugins/markdown/generateRoutes.d.ts +3 -0
- package/dist/lib/plugins/markdown/generateRoutes.js +21 -0
- package/dist/lib/plugins/markdown/generateRoutes.js.map +1 -0
- package/dist/lib/plugins/markdown/index.d.ts +6 -5
- package/dist/lib/plugins/markdown/index.js +3 -31
- package/dist/lib/plugins/markdown/index.js.map +1 -1
- package/dist/lib/plugins/openapi/Endpoint.js.map +1 -1
- package/dist/lib/plugins/openapi/RequestBodySidecarBox.js.map +1 -1
- package/dist/lib/plugins/openapi/Sidecar.js.map +1 -1
- package/dist/lib/plugins/openapi/client/worker.js.map +1 -1
- package/dist/lib/plugins/openapi/index.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/Playground.js +1 -0
- package/dist/lib/plugins/openapi/playground/Playground.js.map +1 -1
- package/dist/lib/util/invariant.d.ts +9 -0
- package/dist/lib/util/invariant.js +7 -3
- package/dist/lib/util/invariant.js.map +1 -1
- package/dist/lib/util/useExposedProps.d.ts +2 -0
- package/dist/lib/util/useExposedProps.js +8 -0
- package/dist/lib/util/useExposedProps.js.map +1 -0
- package/dist/lib/util/useScrollToAnchor.js.map +1 -1
- package/dist/vite/build.js +2 -7
- package/dist/vite/build.js.map +1 -1
- package/dist/vite/config.js +1 -1
- package/dist/vite/config.js.map +1 -1
- package/dist/vite/dev-server.js +1 -1
- package/dist/vite/dev-server.js.map +1 -1
- package/dist/vite/plugin-config-reload.js.map +1 -1
- package/dist/vite/plugin-docs.js +26 -26
- package/dist/vite/plugin-docs.js.map +1 -1
- package/dist/vite/plugin-mdx.js +17 -0
- package/dist/vite/plugin-mdx.js.map +1 -1
- package/dist/vite/plugin-search.d.ts +3 -0
- package/dist/vite/plugin-search.js +26 -0
- package/dist/vite/plugin-search.js.map +1 -0
- package/dist/vite/plugin-sidebar.js +2 -5
- package/dist/vite/plugin-sidebar.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 -5
- package/dist/vite/prerender.js +5 -6
- package/dist/vite/prerender.js.map +1 -1
- package/lib/{AuthenticationPlugin-Cnqy9csQ.js → AuthenticationPlugin-tBvLKsFg.js} +3 -3
- package/lib/{AuthenticationPlugin-Cnqy9csQ.js.map → AuthenticationPlugin-tBvLKsFg.js.map} +1 -1
- package/lib/{CategoryHeading-C7VfgpFZ.js → CategoryHeading-D2WS6sRI.js} +2 -2
- package/lib/{CategoryHeading-C7VfgpFZ.js.map → CategoryHeading-D2WS6sRI.js.map} +1 -1
- package/lib/ClientOnly-CVN6leDu.js +11 -0
- package/lib/ClientOnly-CVN6leDu.js.map +1 -0
- package/lib/{DeveloperHint-CNyuFROc.js → DeveloperHint-CRiZjqd2.js} +2 -2
- package/lib/{DeveloperHint-CNyuFROc.js.map → DeveloperHint-CRiZjqd2.js.map} +1 -1
- package/lib/{Input-x-t53FyR.js → Input-CO-1DOZa.js} +4 -4
- package/lib/{Input-x-t53FyR.js.map → Input-CO-1DOZa.js.map} +1 -1
- package/lib/{Markdown-C-0TaxoY.js → Markdown-DM4zv3MA.js} +9 -8
- package/lib/{Markdown-C-0TaxoY.js.map → Markdown-DM4zv3MA.js.map} +1 -1
- package/lib/{MdxPage-C5I9c7R1.js → MdxPage-tWI_P8wP.js} +27 -28
- package/lib/MdxPage-tWI_P8wP.js.map +1 -0
- package/lib/{OperationList-qsBOguHS.js → OperationList-Cd3lue0b.js} +11 -12
- package/lib/OperationList-Cd3lue0b.js.map +1 -0
- package/lib/{Route-DlKvXPAO.js → Route-DI0Y0pIV.js} +3 -3
- package/lib/{Route-DlKvXPAO.js.map → Route-DI0Y0pIV.js.map} +1 -1
- package/lib/SlotletProvider-CBqY8mp6.js +241 -0
- package/lib/SlotletProvider-CBqY8mp6.js.map +1 -0
- package/lib/{SidebarBadge-DaA0-bFW.js → Spinner-DFQhPMBl.js} +60 -58
- package/lib/Spinner-DFQhPMBl.js.map +1 -0
- package/lib/{ZudokuContext-DSipF8sq.js → ZudokuContext-DEoP3GGJ.js} +411 -460
- package/lib/ZudokuContext-DEoP3GGJ.js.map +1 -0
- package/lib/_commonjsHelpers-BkfeUUK-.js +29 -0
- package/lib/_commonjsHelpers-BkfeUUK-.js.map +1 -0
- package/lib/assets/{worker-DaFlmuyf.js → worker-Bf8vjASY.js} +2306 -2220
- package/lib/assets/{worker-DaFlmuyf.js.map → worker-Bf8vjASY.js.map} +1 -1
- package/lib/index-Bn6Lc9tq.js +9 -0
- package/lib/{index-DJqnphbT.js.map → index-Bn6Lc9tq.js.map} +1 -1
- package/lib/{index-BIl-R3aH.js → index-Bs9roz8y.js} +690 -669
- package/lib/index-Bs9roz8y.js.map +1 -0
- package/lib/{index-Dssw7Gff.js → index-CBr6BM_4.js} +13 -13
- package/lib/index-CBr6BM_4.js.map +1 -0
- package/lib/{index-SrtqdZ3j.js → index-CRo94sKK.js} +8 -6
- package/lib/{index-SrtqdZ3j.js.map → index-CRo94sKK.js.map} +1 -1
- package/lib/{index-D06ATMgg.js → index-LNp6rxyU.js} +2 -2
- package/lib/{index-D06ATMgg.js.map → index-LNp6rxyU.js.map} +1 -1
- package/lib/{index-CKmSo0py.js → index-UUT9q9f9.js} +3 -3
- package/lib/{index-CKmSo0py.js.map → index-UUT9q9f9.js.map} +1 -1
- package/lib/invariant-Caa8-XvF.js +26 -0
- package/lib/invariant-Caa8-XvF.js.map +1 -0
- package/lib/joinPath-B7kNnUX4.js +8 -0
- package/lib/joinPath-B7kNnUX4.js.map +1 -0
- package/lib/{router-Oe6YmY6B.js → router-BsfSoK2j.js} +3 -3
- package/lib/{router-Oe6YmY6B.js.map → router-BsfSoK2j.js.map} +1 -1
- package/lib/urql-core-KJnLL26g.js.map +1 -1
- package/lib/useExposedProps-B9K-9GTc.js +9 -0
- package/lib/useExposedProps-B9K-9GTc.js.map +1 -0
- package/lib/{AnchorLink-DovtSBJk.js → utils-G5XSiZc9.js} +275 -231
- package/lib/utils-G5XSiZc9.js.map +1 -0
- package/lib/zudoku.auth-clerk.js +1 -1
- package/lib/zudoku.auth-openid.js +477 -483
- package/lib/zudoku.auth-openid.js.map +1 -1
- package/lib/zudoku.components.js +937 -935
- package/lib/zudoku.components.js.map +1 -1
- package/lib/zudoku.openapi-worker.js +2354 -2268
- package/lib/zudoku.openapi-worker.js.map +1 -1
- package/lib/zudoku.plugin-api-keys.js +60 -70
- package/lib/zudoku.plugin-api-keys.js.map +1 -1
- package/lib/zudoku.plugin-custom-pages.js +16 -8
- package/lib/zudoku.plugin-custom-pages.js.map +1 -1
- package/lib/zudoku.plugin-markdown.js +27 -93
- package/lib/zudoku.plugin-markdown.js.map +1 -1
- package/lib/zudoku.plugin-openapi.js +7 -7
- package/lib/zudoku.plugin-redirect.js +1 -1
- package/lib/zudoku.plugin-search-inkeep.js +9 -13
- package/lib/zudoku.plugin-search-inkeep.js.map +1 -1
- package/package.json +1 -1
- package/src/app/entry.client.tsx +2 -4
- package/src/app/entry.server.tsx +0 -4
- package/src/app/main.css +0 -5
- package/src/app/main.tsx +27 -13
- package/src/app/standalone.tsx +1 -1
- package/src/lib/authentication/components/CallbackHandler.tsx +20 -51
- package/src/lib/authentication/hook.ts +1 -1
- package/src/lib/components/Header.tsx +4 -12
- package/src/lib/components/MobileTopNavigation.tsx +9 -3
- package/src/lib/components/Search.tsx +1 -1
- package/src/lib/components/SlotletProvider.tsx +14 -7
- package/src/lib/components/TopNavigation.tsx +37 -58
- package/src/lib/components/context/ZudokuContext.ts +20 -28
- package/src/lib/components/index.ts +13 -4
- package/src/lib/components/navigation/Sidebar.tsx +6 -6
- package/src/lib/components/navigation/SidebarCategory.tsx +37 -27
- package/src/lib/components/navigation/SidebarItem.tsx +19 -18
- package/src/lib/components/navigation/utils.ts +16 -11
- package/src/lib/core/DevPortalContext.ts +7 -3
- package/src/lib/core/plugins.ts +0 -2
- package/src/lib/errors/ErrorAlert.tsx +18 -5
- package/src/lib/plugins/custom-pages/CustomPage.tsx +18 -0
- package/src/lib/plugins/custom-pages/index.tsx +11 -9
- package/src/lib/plugins/markdown/MdxPage.tsx +10 -8
- package/src/lib/plugins/markdown/generateRoutes.tsx +38 -0
- package/src/lib/plugins/markdown/index.tsx +12 -49
- package/src/lib/plugins/openapi/Endpoint.tsx +2 -2
- package/src/lib/plugins/openapi/RequestBodySidecarBox.tsx +1 -1
- package/src/lib/plugins/openapi/Sidecar.tsx +1 -1
- package/src/lib/plugins/openapi/client/worker.ts +2 -2
- package/src/lib/plugins/openapi/index.tsx +1 -1
- package/src/lib/plugins/openapi/playground/Playground.tsx +1 -0
- package/src/lib/util/invariant.ts +15 -3
- package/src/lib/util/useExposedProps.tsx +10 -0
- package/src/lib/util/useScrollToAnchor.ts +1 -1
- package/dist/lib/plugins/markdown/resolver.d.ts +0 -38
- package/dist/lib/plugins/markdown/resolver.js +0 -75
- package/dist/lib/plugins/markdown/resolver.js.map +0 -1
- package/dist/vite/debug.d.ts +0 -1
- package/dist/vite/debug.js +0 -10
- package/dist/vite/debug.js.map +0 -1
- package/lib/AnchorLink-DovtSBJk.js.map +0 -1
- package/lib/ErrorPage-CUz-Zzmx.js +0 -16
- package/lib/ErrorPage-CUz-Zzmx.js.map +0 -1
- package/lib/MdxPage-C5I9c7R1.js.map +0 -1
- package/lib/OperationList-qsBOguHS.js.map +0 -1
- package/lib/SidebarBadge-DaA0-bFW.js.map +0 -1
- package/lib/SlotletProvider-BGEs7yyu.js +0 -240
- package/lib/SlotletProvider-BGEs7yyu.js.map +0 -1
- package/lib/Spinner-3cQDBVGr.js +0 -7
- package/lib/Spinner-3cQDBVGr.js.map +0 -1
- package/lib/ZudokuContext-DSipF8sq.js.map +0 -1
- package/lib/__vite-browser-external-BYRIRx8p.js +0 -9
- package/lib/__vite-browser-external-BYRIRx8p.js.map +0 -1
- package/lib/index-BIl-R3aH.js.map +0 -1
- package/lib/index-DJqnphbT.js +0 -35
- package/lib/index-Dssw7Gff.js.map +0 -1
- package/src/lib/plugins/markdown/resolver.ts +0 -92
package/lib/zudoku.components.js
CHANGED
|
@@ -1,41 +1,43 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
1
|
+
var Ha = Object.defineProperty;
|
|
2
|
+
var pn = (e) => {
|
|
3
3
|
throw TypeError(e);
|
|
4
4
|
};
|
|
5
|
-
var
|
|
6
|
-
var ae = (e, t, n) =>
|
|
7
|
-
var
|
|
5
|
+
var Ua = (e, t, n) => t in e ? Ha(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
|
|
6
|
+
var ae = (e, t, n) => Ua(e, typeof t != "symbol" ? t + "" : t, n), mn = (e, t, n) => t.has(e) || pn("Cannot " + n);
|
|
7
|
+
var w = (e, t, n) => (mn(e, t, "read from private field"), n ? n.call(e) : t.get(e)), ce = (e, t, n) => t.has(e) ? pn("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(e) : t.set(e, n), X = (e, t, n, r) => (mn(e, t, "write to private field"), r ? r.call(e, n) : t.set(e, n), n);
|
|
8
8
|
var ut = (e, t, n, r) => ({
|
|
9
9
|
set _(o) {
|
|
10
10
|
X(e, t, o, n);
|
|
11
11
|
},
|
|
12
12
|
get _() {
|
|
13
|
-
return
|
|
13
|
+
return w(e, t, r);
|
|
14
14
|
}
|
|
15
15
|
});
|
|
16
|
-
import {
|
|
17
|
-
import { e as
|
|
18
|
-
import {
|
|
16
|
+
import { c as In, H as kt, M as za, d as Ka, A as qa, b as Qa } from "./utils-G5XSiZc9.js";
|
|
17
|
+
import { e as Va, f as Ga, R as Wa, g as Je, L as $t, h as Ya, O as An, i as Xa, b as Za, u as Ft } from "./index-CRo94sKK.js";
|
|
18
|
+
import { u as Ja } from "./state-CsuHT8ZO.js";
|
|
19
|
+
import { E as kn, S as ye, a as eo, R as to } from "./SlotletProvider-CBqY8mp6.js";
|
|
19
20
|
import { j as a } from "./jsx-runtime-B6kdoens.js";
|
|
20
|
-
import { M as
|
|
21
|
-
import { a as
|
|
21
|
+
import { M as no, g as ro, c as $n, p as Fn, A as ao, d as rt, k as oo, b as I, l as so, F as io, D as lo, C as co, P as qe, j as Lt, q as uo, s as Ln, R as fo, S as ho, t as po, i as mo, r as Bn, n as go, a as gt, u as Hn, f as vt, V as Un, B as Nt } from "./index-CBr6BM_4.js";
|
|
22
|
+
import { a as F, c as zn, b as vo, T as wo, d as yo, V as xo, u as Bt, e as bo, C as So } from "./Markdown-DM4zv3MA.js";
|
|
22
23
|
import * as h from "react";
|
|
23
|
-
import p, { StrictMode as Kn, createContext as qn, Component as
|
|
24
|
-
import { a as Ut } from "./
|
|
25
|
-
import { B as
|
|
26
|
-
import { a as Tt, R as
|
|
27
|
-
import {
|
|
28
|
-
import {
|
|
29
|
-
import {
|
|
30
|
-
import {
|
|
31
|
-
|
|
24
|
+
import p, { StrictMode as Kn, createContext as qn, Component as Co, createElement as gn, isValidElement as Mo, useState as Ie, useMemo as mt, useLayoutEffect as Ro, useEffect as Ce, useCallback as Qn, Suspense as Vn, memo as Gn, useContext as Eo, Fragment as Do, useRef as Ht, forwardRef as Po } from "react";
|
|
25
|
+
import { a as Ut } from "./_commonjsHelpers-BkfeUUK-.js";
|
|
26
|
+
import { B as jo } from "./router-BsfSoK2j.js";
|
|
27
|
+
import { a as Tt, R as No, T as To, C as _o } from "./index-UUT9q9f9.js";
|
|
28
|
+
import { C as Oo } from "./ClientOnly-CVN6leDu.js";
|
|
29
|
+
import { S as Wn, f as Yn, Q as Io, n as se, m as vn, g as wn, i as be, j as Ao, k as ko, l as $o, o as Fo, p as yn, r as xn, q as Lo, h as bn, t as Sn, v as Bo, u as Ae, b as Ho, Z as Uo, w as zo, c as Xn, x as Ko } from "./ZudokuContext-DEoP3GGJ.js";
|
|
30
|
+
import { j as wt } from "./joinPath-B7kNnUX4.js";
|
|
31
|
+
import { ChevronRightIcon as Zn, CheckIcon as qo, DotIcon as Qo, CircleXIcon as Vo, SearchIcon as Go, MenuIcon as Wo, MoonStarIcon as Yo, SunIcon as Xo, ExternalLinkIcon as Zo, PanelLeftIcon as Jo } from "lucide-react";
|
|
32
|
+
import { c as Jn, P as bt, R as es, I as ts, O as ns, C as rs, T as as, a as os, b as ss, D as is, d as ls, e as cs, S as Mt, f as us } from "./Spinner-DFQhPMBl.js";
|
|
33
|
+
function ds({ error: e }) {
|
|
32
34
|
return /* @__PURE__ */ a.jsx(kn, { error: e });
|
|
33
35
|
}
|
|
34
36
|
var at = {};
|
|
35
|
-
const
|
|
37
|
+
const fs = /* @__PURE__ */ Ut(jo), hs = /* @__PURE__ */ Ut(Va), ps = /* @__PURE__ */ Ut(Ga);
|
|
36
38
|
Object.defineProperty(at, "__esModule", { value: !0 });
|
|
37
|
-
var
|
|
38
|
-
function
|
|
39
|
+
var ms = p, we = fs, zt = hs, Se = ps;
|
|
40
|
+
function gs(e) {
|
|
39
41
|
if (e && e.__esModule) return e;
|
|
40
42
|
var t = /* @__PURE__ */ Object.create(null);
|
|
41
43
|
return e && Object.keys(e).forEach(function(n) {
|
|
@@ -50,8 +52,8 @@ function fs(e) {
|
|
|
50
52
|
}
|
|
51
53
|
}), t.default = e, Object.freeze(t);
|
|
52
54
|
}
|
|
53
|
-
var ge = /* @__PURE__ */
|
|
54
|
-
function
|
|
55
|
+
var ge = /* @__PURE__ */ gs(ms);
|
|
56
|
+
function vs({
|
|
55
57
|
basename: e,
|
|
56
58
|
children: t,
|
|
57
59
|
location: n = "/",
|
|
@@ -64,7 +66,7 @@ function hs({
|
|
|
64
66
|
hash: n.hash || "",
|
|
65
67
|
state: n.state != null ? n.state : null,
|
|
66
68
|
key: n.key || "default"
|
|
67
|
-
}, i =
|
|
69
|
+
}, i = er();
|
|
68
70
|
return /* @__PURE__ */ ge.createElement(Se.Router, {
|
|
69
71
|
basename: e,
|
|
70
72
|
children: t,
|
|
@@ -75,7 +77,7 @@ function hs({
|
|
|
75
77
|
static: !0
|
|
76
78
|
});
|
|
77
79
|
}
|
|
78
|
-
function
|
|
80
|
+
function ws({
|
|
79
81
|
context: e,
|
|
80
82
|
router: t,
|
|
81
83
|
hydrate: n = !0,
|
|
@@ -84,7 +86,7 @@ function ps({
|
|
|
84
86
|
t && e || (process.env.NODE_ENV !== "production" ? we.UNSAFE_invariant(!1, "You must provide `router` and `context` to <StaticRouterProvider>") : we.UNSAFE_invariant(!1));
|
|
85
87
|
let o = {
|
|
86
88
|
router: t,
|
|
87
|
-
navigator:
|
|
89
|
+
navigator: er(),
|
|
88
90
|
static: !0,
|
|
89
91
|
staticContext: e,
|
|
90
92
|
basename: e.basename || "/"
|
|
@@ -93,9 +95,9 @@ function ps({
|
|
|
93
95
|
let u = {
|
|
94
96
|
loaderData: e.loaderData,
|
|
95
97
|
actionData: e.actionData,
|
|
96
|
-
errors:
|
|
98
|
+
errors: xs(e.errors)
|
|
97
99
|
};
|
|
98
|
-
i = `window.__staticRouterHydrationData = JSON.parse(${
|
|
100
|
+
i = `window.__staticRouterHydrationData = JSON.parse(${Es(JSON.stringify(JSON.stringify(u)))});`;
|
|
99
101
|
}
|
|
100
102
|
let {
|
|
101
103
|
state: l
|
|
@@ -119,7 +121,7 @@ function ps({
|
|
|
119
121
|
future: {
|
|
120
122
|
v7_relativeSplatPath: t.future.v7_relativeSplatPath
|
|
121
123
|
}
|
|
122
|
-
}, /* @__PURE__ */ ge.createElement(
|
|
124
|
+
}, /* @__PURE__ */ ge.createElement(ys, {
|
|
123
125
|
routes: t.routes,
|
|
124
126
|
future: t.future,
|
|
125
127
|
state: l
|
|
@@ -131,14 +133,14 @@ function ps({
|
|
|
131
133
|
}
|
|
132
134
|
}) : null);
|
|
133
135
|
}
|
|
134
|
-
function
|
|
136
|
+
function ys({
|
|
135
137
|
routes: e,
|
|
136
138
|
future: t,
|
|
137
139
|
state: n
|
|
138
140
|
}) {
|
|
139
141
|
return zt.UNSAFE_useRoutesImpl(e, void 0, n, t);
|
|
140
142
|
}
|
|
141
|
-
function
|
|
143
|
+
function xs(e) {
|
|
142
144
|
if (!e) return null;
|
|
143
145
|
let t = Object.entries(e), n = {};
|
|
144
146
|
for (let [r, o] of t)
|
|
@@ -156,10 +158,10 @@ function gs(e) {
|
|
|
156
158
|
} : n[r] = o;
|
|
157
159
|
return n;
|
|
158
160
|
}
|
|
159
|
-
function
|
|
161
|
+
function er() {
|
|
160
162
|
return {
|
|
161
|
-
createHref:
|
|
162
|
-
encodeLocation:
|
|
163
|
+
createHref: tr,
|
|
164
|
+
encodeLocation: nr,
|
|
163
165
|
push(e) {
|
|
164
166
|
throw new Error(`You cannot use navigator.push() on the server because it is a stateless environment. This error was probably triggered when you did a \`navigate(${JSON.stringify(e)})\` somewhere in your app.`);
|
|
165
167
|
},
|
|
@@ -177,13 +179,13 @@ function Zn() {
|
|
|
177
179
|
}
|
|
178
180
|
};
|
|
179
181
|
}
|
|
180
|
-
function
|
|
182
|
+
function bs(e, t) {
|
|
181
183
|
return we.createStaticHandler(e, {
|
|
182
184
|
...t,
|
|
183
185
|
mapRouteProperties: zt.UNSAFE_mapRouteProperties
|
|
184
186
|
});
|
|
185
187
|
}
|
|
186
|
-
function
|
|
188
|
+
function Ss(e, t, n = {}) {
|
|
187
189
|
let r = {}, o = we.UNSAFE_convertRoutesToDataRoutes(e, zt.UNSAFE_mapRouteProperties, void 0, r), s = t.matches.map((l) => {
|
|
188
190
|
let u = r[l.route.id] || l.route;
|
|
189
191
|
return {
|
|
@@ -246,8 +248,8 @@ function ws(e, t, n = {}) {
|
|
|
246
248
|
revalidate() {
|
|
247
249
|
throw i("revalidate");
|
|
248
250
|
},
|
|
249
|
-
createHref:
|
|
250
|
-
encodeLocation:
|
|
251
|
+
createHref: tr,
|
|
252
|
+
encodeLocation: nr,
|
|
251
253
|
getFetcher() {
|
|
252
254
|
return we.IDLE_FETCHER;
|
|
253
255
|
},
|
|
@@ -273,51 +275,51 @@ function ws(e, t, n = {}) {
|
|
|
273
275
|
}
|
|
274
276
|
};
|
|
275
277
|
}
|
|
276
|
-
function
|
|
278
|
+
function tr(e) {
|
|
277
279
|
return typeof e == "string" ? e : Se.createPath(e);
|
|
278
280
|
}
|
|
279
|
-
function
|
|
281
|
+
function nr(e) {
|
|
280
282
|
let t = typeof e == "string" ? e : Se.createPath(e);
|
|
281
283
|
t = t.replace(/ $/, "%20");
|
|
282
|
-
let n =
|
|
284
|
+
let n = Cs.test(t) ? new URL(t) : new URL(t, "http://localhost");
|
|
283
285
|
return {
|
|
284
286
|
pathname: n.pathname,
|
|
285
287
|
search: n.search,
|
|
286
288
|
hash: n.hash
|
|
287
289
|
};
|
|
288
290
|
}
|
|
289
|
-
const
|
|
291
|
+
const Cs = /^(?:[a-z][a-z0-9+.-]*:|\/\/)/i, Ms = {
|
|
290
292
|
"&": "\\u0026",
|
|
291
293
|
">": "\\u003e",
|
|
292
294
|
"<": "\\u003c",
|
|
293
295
|
"\u2028": "\\u2028",
|
|
294
296
|
"\u2029": "\\u2029"
|
|
295
|
-
},
|
|
296
|
-
function
|
|
297
|
-
return e.replace(
|
|
298
|
-
}
|
|
299
|
-
at.StaticRouter =
|
|
300
|
-
var
|
|
301
|
-
at.createStaticHandler =
|
|
302
|
-
at.createStaticRouter =
|
|
303
|
-
const
|
|
297
|
+
}, Rs = /[&><\u2028\u2029]/g;
|
|
298
|
+
function Es(e) {
|
|
299
|
+
return e.replace(Rs, (t) => Ms[t]);
|
|
300
|
+
}
|
|
301
|
+
at.StaticRouter = vs;
|
|
302
|
+
var Ds = at.StaticRouterProvider = ws;
|
|
303
|
+
at.createStaticHandler = bs;
|
|
304
|
+
at.createStaticRouter = Ss;
|
|
305
|
+
const Ps = ({
|
|
304
306
|
router: e,
|
|
305
307
|
hydrate: t = !1
|
|
306
|
-
}) => /* @__PURE__ */ a.jsx(Kn, { children: /* @__PURE__ */ a.jsx(In, { children: /* @__PURE__ */ a.jsx(Tt.Provider, { value: { stagger: !t }, children: /* @__PURE__ */ a.jsx(
|
|
308
|
+
}) => /* @__PURE__ */ a.jsx(Kn, { children: /* @__PURE__ */ a.jsx(In, { children: /* @__PURE__ */ a.jsx(Tt.Provider, { value: { stagger: !t }, children: /* @__PURE__ */ a.jsx(Wa, { router: e }) }) }) }), js = ({
|
|
307
309
|
router: e,
|
|
308
310
|
context: t,
|
|
309
311
|
helmetContext: n
|
|
310
|
-
}) => /* @__PURE__ */ a.jsx(Kn, { children: /* @__PURE__ */ a.jsx(In, { context: n, children: /* @__PURE__ */ a.jsx(
|
|
311
|
-
var ve, Tn,
|
|
312
|
+
}) => /* @__PURE__ */ a.jsx(Kn, { children: /* @__PURE__ */ a.jsx(In, { context: n, children: /* @__PURE__ */ a.jsx(Ds, { router: e, context: t }) }) });
|
|
313
|
+
var ve, Tn, Ns = (Tn = class extends Wn {
|
|
312
314
|
constructor(t = {}) {
|
|
313
315
|
super();
|
|
314
316
|
ce(this, ve);
|
|
315
317
|
this.config = t, X(this, ve, /* @__PURE__ */ new Map());
|
|
316
318
|
}
|
|
317
319
|
build(t, n, r) {
|
|
318
|
-
const o = n.queryKey, s = n.queryHash ??
|
|
320
|
+
const o = n.queryKey, s = n.queryHash ?? Yn(o, n);
|
|
319
321
|
let i = this.get(s);
|
|
320
|
-
return i || (i = new
|
|
322
|
+
return i || (i = new Io({
|
|
321
323
|
cache: this,
|
|
322
324
|
queryKey: o,
|
|
323
325
|
queryHash: s,
|
|
@@ -327,14 +329,14 @@ var ve, Tn, Es = (Tn = class extends Gn {
|
|
|
327
329
|
}), this.add(i)), i;
|
|
328
330
|
}
|
|
329
331
|
add(t) {
|
|
330
|
-
|
|
332
|
+
w(this, ve).has(t.queryHash) || (w(this, ve).set(t.queryHash, t), this.notify({
|
|
331
333
|
type: "added",
|
|
332
334
|
query: t
|
|
333
335
|
}));
|
|
334
336
|
}
|
|
335
337
|
remove(t) {
|
|
336
|
-
const n =
|
|
337
|
-
n && (t.destroy(), n === t &&
|
|
338
|
+
const n = w(this, ve).get(t.queryHash);
|
|
339
|
+
n && (t.destroy(), n === t && w(this, ve).delete(t.queryHash), this.notify({ type: "removed", query: t }));
|
|
338
340
|
}
|
|
339
341
|
clear() {
|
|
340
342
|
se.batch(() => {
|
|
@@ -344,10 +346,10 @@ var ve, Tn, Es = (Tn = class extends Gn {
|
|
|
344
346
|
});
|
|
345
347
|
}
|
|
346
348
|
get(t) {
|
|
347
|
-
return
|
|
349
|
+
return w(this, ve).get(t);
|
|
348
350
|
}
|
|
349
351
|
getAll() {
|
|
350
|
-
return [...
|
|
352
|
+
return [...w(this, ve).values()];
|
|
351
353
|
}
|
|
352
354
|
find(t) {
|
|
353
355
|
const n = { exact: !0, ...t };
|
|
@@ -380,7 +382,7 @@ var ve, Tn, Es = (Tn = class extends Gn {
|
|
|
380
382
|
});
|
|
381
383
|
});
|
|
382
384
|
}
|
|
383
|
-
}, ve = new WeakMap(), Tn), oe, nt, _n,
|
|
385
|
+
}, ve = new WeakMap(), Tn), oe, nt, _n, Ts = (_n = class extends Wn {
|
|
384
386
|
constructor(t = {}) {
|
|
385
387
|
super();
|
|
386
388
|
ce(this, oe);
|
|
@@ -388,7 +390,7 @@ var ve, Tn, Es = (Tn = class extends Gn {
|
|
|
388
390
|
this.config = t, X(this, oe, /* @__PURE__ */ new Map()), X(this, nt, Date.now());
|
|
389
391
|
}
|
|
390
392
|
build(t, n, r) {
|
|
391
|
-
const o = new
|
|
393
|
+
const o = new no({
|
|
392
394
|
mutationCache: this,
|
|
393
395
|
mutationId: ++ut(this, nt)._,
|
|
394
396
|
options: t.defaultMutationOptions(n),
|
|
@@ -397,26 +399,26 @@ var ve, Tn, Es = (Tn = class extends Gn {
|
|
|
397
399
|
return this.add(o), o;
|
|
398
400
|
}
|
|
399
401
|
add(t) {
|
|
400
|
-
const n = dt(t), r =
|
|
401
|
-
r.push(t),
|
|
402
|
+
const n = dt(t), r = w(this, oe).get(n) ?? [];
|
|
403
|
+
r.push(t), w(this, oe).set(n, r), this.notify({ type: "added", mutation: t });
|
|
402
404
|
}
|
|
403
405
|
remove(t) {
|
|
404
406
|
var r;
|
|
405
407
|
const n = dt(t);
|
|
406
|
-
if (
|
|
407
|
-
const o = (r =
|
|
408
|
-
o && (o.length === 0 ?
|
|
408
|
+
if (w(this, oe).has(n)) {
|
|
409
|
+
const o = (r = w(this, oe).get(n)) == null ? void 0 : r.filter((s) => s !== t);
|
|
410
|
+
o && (o.length === 0 ? w(this, oe).delete(n) : w(this, oe).set(n, o));
|
|
409
411
|
}
|
|
410
412
|
this.notify({ type: "removed", mutation: t });
|
|
411
413
|
}
|
|
412
414
|
canRun(t) {
|
|
413
415
|
var r;
|
|
414
|
-
const n = (r =
|
|
416
|
+
const n = (r = w(this, oe).get(dt(t))) == null ? void 0 : r.find((o) => o.state.status === "pending");
|
|
415
417
|
return !n || n === t;
|
|
416
418
|
}
|
|
417
419
|
runNext(t) {
|
|
418
420
|
var r;
|
|
419
|
-
const n = (r =
|
|
421
|
+
const n = (r = w(this, oe).get(dt(t))) == null ? void 0 : r.find((o) => o !== t && o.state.isPaused);
|
|
420
422
|
return (n == null ? void 0 : n.continue()) ?? Promise.resolve();
|
|
421
423
|
}
|
|
422
424
|
clear() {
|
|
@@ -427,7 +429,7 @@ var ve, Tn, Es = (Tn = class extends Gn {
|
|
|
427
429
|
});
|
|
428
430
|
}
|
|
429
431
|
getAll() {
|
|
430
|
-
return [...
|
|
432
|
+
return [...w(this, oe).values()].flat();
|
|
431
433
|
}
|
|
432
434
|
find(t) {
|
|
433
435
|
const n = { exact: !0, ...t };
|
|
@@ -461,59 +463,59 @@ function dt(e) {
|
|
|
461
463
|
function Cn(e) {
|
|
462
464
|
return {
|
|
463
465
|
onFetch: (t, n) => {
|
|
464
|
-
var f, c, d, R,
|
|
465
|
-
const r = t.options, o = (d = (c = (f = t.fetchOptions) == null ? void 0 : f.meta) == null ? void 0 : c.fetchMore) == null ? void 0 : d.direction, s = ((R = t.state.data) == null ? void 0 : R.pages) || [], i = ((
|
|
466
|
+
var f, c, d, R, C;
|
|
467
|
+
const r = t.options, o = (d = (c = (f = t.fetchOptions) == null ? void 0 : f.meta) == null ? void 0 : c.fetchMore) == null ? void 0 : d.direction, s = ((R = t.state.data) == null ? void 0 : R.pages) || [], i = ((C = t.state.data) == null ? void 0 : C.pageParams) || [];
|
|
466
468
|
let l = { pages: [], pageParams: [] }, u = 0;
|
|
467
469
|
const m = async () => {
|
|
468
|
-
let
|
|
469
|
-
const
|
|
470
|
+
let g = !1;
|
|
471
|
+
const T = (P) => {
|
|
470
472
|
Object.defineProperty(P, "signal", {
|
|
471
473
|
enumerable: !0,
|
|
472
|
-
get: () => (t.signal.aborted ?
|
|
473
|
-
|
|
474
|
+
get: () => (t.signal.aborted ? g = !0 : t.signal.addEventListener("abort", () => {
|
|
475
|
+
g = !0;
|
|
474
476
|
}), t.signal)
|
|
475
477
|
});
|
|
476
|
-
},
|
|
477
|
-
if (
|
|
478
|
+
}, M = Ao(t.options, t.fetchOptions), A = async (P, v, z) => {
|
|
479
|
+
if (g)
|
|
478
480
|
return Promise.reject();
|
|
479
|
-
if (
|
|
481
|
+
if (v == null && P.pages.length)
|
|
480
482
|
return Promise.resolve(P);
|
|
481
|
-
const
|
|
483
|
+
const J = {
|
|
482
484
|
queryKey: t.queryKey,
|
|
483
|
-
pageParam:
|
|
485
|
+
pageParam: v,
|
|
484
486
|
direction: z ? "backward" : "forward",
|
|
485
487
|
meta: t.options.meta
|
|
486
488
|
};
|
|
487
|
-
|
|
488
|
-
const
|
|
489
|
-
|
|
490
|
-
), { maxPages: j } = t.options, D = z ?
|
|
489
|
+
T(J);
|
|
490
|
+
const b = await M(
|
|
491
|
+
J
|
|
492
|
+
), { maxPages: j } = t.options, D = z ? ko : $o;
|
|
491
493
|
return {
|
|
492
|
-
pages: D(P.pages,
|
|
493
|
-
pageParams: D(P.pageParams,
|
|
494
|
+
pages: D(P.pages, b, j),
|
|
495
|
+
pageParams: D(P.pageParams, v, j)
|
|
494
496
|
};
|
|
495
497
|
};
|
|
496
498
|
if (o && s.length) {
|
|
497
|
-
const P = o === "backward",
|
|
499
|
+
const P = o === "backward", v = P ? _s : Mn, z = {
|
|
498
500
|
pages: s,
|
|
499
501
|
pageParams: i
|
|
500
|
-
},
|
|
501
|
-
l = await
|
|
502
|
+
}, J = v(r, z);
|
|
503
|
+
l = await A(z, J, P);
|
|
502
504
|
} else {
|
|
503
505
|
const P = e ?? s.length;
|
|
504
506
|
do {
|
|
505
|
-
const
|
|
506
|
-
if (u > 0 &&
|
|
507
|
+
const v = u === 0 ? i[0] ?? r.initialPageParam : Mn(r, l);
|
|
508
|
+
if (u > 0 && v == null)
|
|
507
509
|
break;
|
|
508
|
-
l = await
|
|
510
|
+
l = await A(l, v), u++;
|
|
509
511
|
} while (u < P);
|
|
510
512
|
}
|
|
511
513
|
return l;
|
|
512
514
|
};
|
|
513
515
|
t.options.persister ? t.fetchFn = () => {
|
|
514
|
-
var
|
|
515
|
-
return (
|
|
516
|
-
|
|
516
|
+
var g, T;
|
|
517
|
+
return (T = (g = t.options).persister) == null ? void 0 : T.call(
|
|
518
|
+
g,
|
|
517
519
|
m,
|
|
518
520
|
{
|
|
519
521
|
queryKey: t.queryKey,
|
|
@@ -535,13 +537,13 @@ function Mn(e, { pages: t, pageParams: n }) {
|
|
|
535
537
|
n
|
|
536
538
|
) : void 0;
|
|
537
539
|
}
|
|
538
|
-
function
|
|
540
|
+
function _s(e, { pages: t, pageParams: n }) {
|
|
539
541
|
var r;
|
|
540
542
|
return t.length > 0 ? (r = e.getPreviousPageParam) == null ? void 0 : r.call(e, t[0], t, n[0], n) : void 0;
|
|
541
543
|
}
|
|
542
|
-
var
|
|
544
|
+
var $, Pe, je, He, Ue, Ne, ze, Ke, On, Os = (On = class {
|
|
543
545
|
constructor(e = {}) {
|
|
544
|
-
ce(this,
|
|
546
|
+
ce(this, $);
|
|
545
547
|
ce(this, Pe);
|
|
546
548
|
ce(this, je);
|
|
547
549
|
ce(this, He);
|
|
@@ -549,55 +551,55 @@ var F, Pe, je, He, Ue, Ne, ze, Ke, On, js = (On = class {
|
|
|
549
551
|
ce(this, Ne);
|
|
550
552
|
ce(this, ze);
|
|
551
553
|
ce(this, Ke);
|
|
552
|
-
X(this,
|
|
554
|
+
X(this, $, e.queryCache || new Ns()), X(this, Pe, e.mutationCache || new Ts()), X(this, je, e.defaultOptions || {}), X(this, He, /* @__PURE__ */ new Map()), X(this, Ue, /* @__PURE__ */ new Map()), X(this, Ne, 0);
|
|
553
555
|
}
|
|
554
556
|
mount() {
|
|
555
|
-
ut(this, Ne)._++,
|
|
556
|
-
e && (await this.resumePausedMutations(),
|
|
557
|
-
})), X(this, Ke,
|
|
558
|
-
e && (await this.resumePausedMutations(),
|
|
557
|
+
ut(this, Ne)._++, w(this, Ne) === 1 && (X(this, ze, Fo.subscribe(async (e) => {
|
|
558
|
+
e && (await this.resumePausedMutations(), w(this, $).onFocus());
|
|
559
|
+
})), X(this, Ke, yn.subscribe(async (e) => {
|
|
560
|
+
e && (await this.resumePausedMutations(), w(this, $).onOnline());
|
|
559
561
|
})));
|
|
560
562
|
}
|
|
561
563
|
unmount() {
|
|
562
564
|
var e, t;
|
|
563
|
-
ut(this, Ne)._--,
|
|
565
|
+
ut(this, Ne)._--, w(this, Ne) === 0 && ((e = w(this, ze)) == null || e.call(this), X(this, ze, void 0), (t = w(this, Ke)) == null || t.call(this), X(this, Ke, void 0));
|
|
564
566
|
}
|
|
565
567
|
isFetching(e) {
|
|
566
|
-
return
|
|
568
|
+
return w(this, $).findAll({ ...e, fetchStatus: "fetching" }).length;
|
|
567
569
|
}
|
|
568
570
|
isMutating(e) {
|
|
569
|
-
return
|
|
571
|
+
return w(this, Pe).findAll({ ...e, status: "pending" }).length;
|
|
570
572
|
}
|
|
571
573
|
getQueryData(e) {
|
|
572
574
|
var n;
|
|
573
575
|
const t = this.defaultQueryOptions({ queryKey: e });
|
|
574
|
-
return (n =
|
|
576
|
+
return (n = w(this, $).get(t.queryHash)) == null ? void 0 : n.state.data;
|
|
575
577
|
}
|
|
576
578
|
ensureQueryData(e) {
|
|
577
579
|
const t = this.getQueryData(e.queryKey);
|
|
578
580
|
if (t === void 0)
|
|
579
581
|
return this.fetchQuery(e);
|
|
580
582
|
{
|
|
581
|
-
const n = this.defaultQueryOptions(e), r =
|
|
582
|
-
return e.revalidateIfStale && r.isStaleByTime(
|
|
583
|
+
const n = this.defaultQueryOptions(e), r = w(this, $).build(this, n);
|
|
584
|
+
return e.revalidateIfStale && r.isStaleByTime(xn(n.staleTime, r)) && this.prefetchQuery(n), Promise.resolve(t);
|
|
583
585
|
}
|
|
584
586
|
}
|
|
585
587
|
getQueriesData(e) {
|
|
586
|
-
return
|
|
588
|
+
return w(this, $).findAll(e).map(({ queryKey: t, state: n }) => {
|
|
587
589
|
const r = n.data;
|
|
588
590
|
return [t, r];
|
|
589
591
|
});
|
|
590
592
|
}
|
|
591
593
|
setQueryData(e, t, n) {
|
|
592
|
-
const r = this.defaultQueryOptions({ queryKey: e }), o =
|
|
594
|
+
const r = this.defaultQueryOptions({ queryKey: e }), o = w(this, $).get(
|
|
593
595
|
r.queryHash
|
|
594
|
-
), s = o == null ? void 0 : o.state.data, i =
|
|
596
|
+
), s = o == null ? void 0 : o.state.data, i = Lo(t, s);
|
|
595
597
|
if (i !== void 0)
|
|
596
|
-
return
|
|
598
|
+
return w(this, $).build(this, r).setData(i, { ...n, manual: !0 });
|
|
597
599
|
}
|
|
598
600
|
setQueriesData(e, t, n) {
|
|
599
601
|
return se.batch(
|
|
600
|
-
() =>
|
|
602
|
+
() => w(this, $).findAll(e).map(({ queryKey: r }) => [
|
|
601
603
|
r,
|
|
602
604
|
this.setQueryData(r, t, n)
|
|
603
605
|
])
|
|
@@ -606,10 +608,10 @@ var F, Pe, je, He, Ue, Ne, ze, Ke, On, js = (On = class {
|
|
|
606
608
|
getQueryState(e) {
|
|
607
609
|
var n;
|
|
608
610
|
const t = this.defaultQueryOptions({ queryKey: e });
|
|
609
|
-
return (n =
|
|
611
|
+
return (n = w(this, $).get(t.queryHash)) == null ? void 0 : n.state;
|
|
610
612
|
}
|
|
611
613
|
removeQueries(e) {
|
|
612
|
-
const t =
|
|
614
|
+
const t = w(this, $);
|
|
613
615
|
se.batch(() => {
|
|
614
616
|
t.findAll(e).forEach((n) => {
|
|
615
617
|
t.remove(n);
|
|
@@ -617,7 +619,7 @@ var F, Pe, je, He, Ue, Ne, ze, Ke, On, js = (On = class {
|
|
|
617
619
|
});
|
|
618
620
|
}
|
|
619
621
|
resetQueries(e, t) {
|
|
620
|
-
const n =
|
|
622
|
+
const n = w(this, $), r = {
|
|
621
623
|
type: "active",
|
|
622
624
|
...e
|
|
623
625
|
};
|
|
@@ -627,13 +629,13 @@ var F, Pe, je, He, Ue, Ne, ze, Ke, On, js = (On = class {
|
|
|
627
629
|
}
|
|
628
630
|
cancelQueries(e = {}, t = {}) {
|
|
629
631
|
const n = { revert: !0, ...t }, r = se.batch(
|
|
630
|
-
() =>
|
|
632
|
+
() => w(this, $).findAll(e).map((o) => o.cancel(n))
|
|
631
633
|
);
|
|
632
634
|
return Promise.all(r).then(be).catch(be);
|
|
633
635
|
}
|
|
634
636
|
invalidateQueries(e = {}, t = {}) {
|
|
635
637
|
return se.batch(() => {
|
|
636
|
-
if (
|
|
638
|
+
if (w(this, $).findAll(e).forEach((r) => {
|
|
637
639
|
r.invalidate();
|
|
638
640
|
}), e.refetchType === "none")
|
|
639
641
|
return Promise.resolve();
|
|
@@ -649,7 +651,7 @@ var F, Pe, je, He, Ue, Ne, ze, Ke, On, js = (On = class {
|
|
|
649
651
|
...t,
|
|
650
652
|
cancelRefetch: (t == null ? void 0 : t.cancelRefetch) ?? !0
|
|
651
653
|
}, r = se.batch(
|
|
652
|
-
() =>
|
|
654
|
+
() => w(this, $).findAll(e).filter((o) => !o.isDisabled()).map((o) => {
|
|
653
655
|
let s = o.fetch(void 0, n);
|
|
654
656
|
return n.throwOnError || (s = s.catch(be)), o.state.fetchStatus === "paused" ? Promise.resolve() : s;
|
|
655
657
|
})
|
|
@@ -659,9 +661,9 @@ var F, Pe, je, He, Ue, Ne, ze, Ke, On, js = (On = class {
|
|
|
659
661
|
fetchQuery(e) {
|
|
660
662
|
const t = this.defaultQueryOptions(e);
|
|
661
663
|
t.retry === void 0 && (t.retry = !1);
|
|
662
|
-
const n =
|
|
664
|
+
const n = w(this, $).build(this, t);
|
|
663
665
|
return n.isStaleByTime(
|
|
664
|
-
|
|
666
|
+
xn(t.staleTime, n)
|
|
665
667
|
) ? n.fetch(t) : Promise.resolve(n.state.data);
|
|
666
668
|
}
|
|
667
669
|
prefetchQuery(e) {
|
|
@@ -677,41 +679,41 @@ var F, Pe, je, He, Ue, Ne, ze, Ke, On, js = (On = class {
|
|
|
677
679
|
return e.behavior = Cn(e.pages), this.ensureQueryData(e);
|
|
678
680
|
}
|
|
679
681
|
resumePausedMutations() {
|
|
680
|
-
return
|
|
682
|
+
return yn.isOnline() ? w(this, Pe).resumePausedMutations() : Promise.resolve();
|
|
681
683
|
}
|
|
682
684
|
getQueryCache() {
|
|
683
|
-
return
|
|
685
|
+
return w(this, $);
|
|
684
686
|
}
|
|
685
687
|
getMutationCache() {
|
|
686
|
-
return
|
|
688
|
+
return w(this, Pe);
|
|
687
689
|
}
|
|
688
690
|
getDefaultOptions() {
|
|
689
|
-
return
|
|
691
|
+
return w(this, je);
|
|
690
692
|
}
|
|
691
693
|
setDefaultOptions(e) {
|
|
692
694
|
X(this, je, e);
|
|
693
695
|
}
|
|
694
696
|
setQueryDefaults(e, t) {
|
|
695
|
-
|
|
697
|
+
w(this, He).set(bn(e), {
|
|
696
698
|
queryKey: e,
|
|
697
699
|
defaultOptions: t
|
|
698
700
|
});
|
|
699
701
|
}
|
|
700
702
|
getQueryDefaults(e) {
|
|
701
|
-
const t = [...
|
|
703
|
+
const t = [...w(this, He).values()];
|
|
702
704
|
let n = {};
|
|
703
705
|
return t.forEach((r) => {
|
|
704
706
|
Sn(e, r.queryKey) && (n = { ...n, ...r.defaultOptions });
|
|
705
707
|
}), n;
|
|
706
708
|
}
|
|
707
709
|
setMutationDefaults(e, t) {
|
|
708
|
-
|
|
710
|
+
w(this, Ue).set(bn(e), {
|
|
709
711
|
mutationKey: e,
|
|
710
712
|
defaultOptions: t
|
|
711
713
|
});
|
|
712
714
|
}
|
|
713
715
|
getMutationDefaults(e) {
|
|
714
|
-
const t = [...
|
|
716
|
+
const t = [...w(this, Ue).values()];
|
|
715
717
|
let n = {};
|
|
716
718
|
return t.forEach((r) => {
|
|
717
719
|
Sn(e, r.mutationKey) && (n = { ...n, ...r.defaultOptions });
|
|
@@ -721,33 +723,33 @@ var F, Pe, je, He, Ue, Ne, ze, Ke, On, js = (On = class {
|
|
|
721
723
|
if (e._defaulted)
|
|
722
724
|
return e;
|
|
723
725
|
const t = {
|
|
724
|
-
...
|
|
726
|
+
...w(this, je).queries,
|
|
725
727
|
...this.getQueryDefaults(e.queryKey),
|
|
726
728
|
...e,
|
|
727
729
|
_defaulted: !0
|
|
728
730
|
};
|
|
729
|
-
return t.queryHash || (t.queryHash =
|
|
731
|
+
return t.queryHash || (t.queryHash = Yn(
|
|
730
732
|
t.queryKey,
|
|
731
733
|
t
|
|
732
|
-
)), t.refetchOnReconnect === void 0 && (t.refetchOnReconnect = t.networkMode !== "always"), t.throwOnError === void 0 && (t.throwOnError = !!t.suspense), !t.networkMode && t.persister && (t.networkMode = "offlineFirst"), t.enabled !== !0 && t.queryFn ===
|
|
734
|
+
)), t.refetchOnReconnect === void 0 && (t.refetchOnReconnect = t.networkMode !== "always"), t.throwOnError === void 0 && (t.throwOnError = !!t.suspense), !t.networkMode && t.persister && (t.networkMode = "offlineFirst"), t.enabled !== !0 && t.queryFn === Bo && (t.enabled = !1), t;
|
|
733
735
|
}
|
|
734
736
|
defaultMutationOptions(e) {
|
|
735
737
|
return e != null && e._defaulted ? e : {
|
|
736
|
-
...
|
|
738
|
+
...w(this, je).mutations,
|
|
737
739
|
...(e == null ? void 0 : e.mutationKey) && this.getMutationDefaults(e.mutationKey),
|
|
738
740
|
...e,
|
|
739
741
|
_defaulted: !0
|
|
740
742
|
};
|
|
741
743
|
}
|
|
742
744
|
clear() {
|
|
743
|
-
|
|
745
|
+
w(this, $).clear(), w(this, Pe).clear();
|
|
744
746
|
}
|
|
745
|
-
},
|
|
746
|
-
const
|
|
747
|
+
}, $ = new WeakMap(), Pe = new WeakMap(), je = new WeakMap(), He = new WeakMap(), Ue = new WeakMap(), Ne = new WeakMap(), ze = new WeakMap(), Ke = new WeakMap(), On);
|
|
748
|
+
const Is = qn(null), Rt = {
|
|
747
749
|
didCatch: !1,
|
|
748
750
|
error: null
|
|
749
751
|
};
|
|
750
|
-
class
|
|
752
|
+
class As extends Co {
|
|
751
753
|
constructor(t) {
|
|
752
754
|
super(t), this.resetErrorBoundary = this.resetErrorBoundary.bind(this), this.state = Rt;
|
|
753
755
|
}
|
|
@@ -780,7 +782,7 @@ class Ts extends xo {
|
|
|
780
782
|
} = this.state, {
|
|
781
783
|
resetKeys: o
|
|
782
784
|
} = this.props;
|
|
783
|
-
if (r && n.error !== null &&
|
|
785
|
+
if (r && n.error !== null && ks(t.resetKeys, o)) {
|
|
784
786
|
var s, i;
|
|
785
787
|
(s = (i = this.props).onReset) === null || s === void 0 || s.call(i, {
|
|
786
788
|
next: o,
|
|
@@ -809,12 +811,12 @@ class Ts extends xo {
|
|
|
809
811
|
l = n(u);
|
|
810
812
|
else if (r)
|
|
811
813
|
l = gn(r, u);
|
|
812
|
-
else if (o === null ||
|
|
814
|
+
else if (o === null || Mo(o))
|
|
813
815
|
l = o;
|
|
814
816
|
else
|
|
815
817
|
throw i;
|
|
816
818
|
}
|
|
817
|
-
return gn(
|
|
819
|
+
return gn(Is.Provider, {
|
|
818
820
|
value: {
|
|
819
821
|
didCatch: s,
|
|
820
822
|
error: i,
|
|
@@ -823,12 +825,12 @@ class Ts extends xo {
|
|
|
823
825
|
}, l);
|
|
824
826
|
}
|
|
825
827
|
}
|
|
826
|
-
function
|
|
828
|
+
function ks() {
|
|
827
829
|
let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : [], t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : [];
|
|
828
830
|
return e.length !== t.length || e.some((n, r) => !Object.is(n, t[r]));
|
|
829
831
|
}
|
|
830
|
-
const
|
|
831
|
-
class
|
|
832
|
+
const $s = (e) => "getProfileMenuItems" in e && typeof e.getProfileMenuItems == "function", Fs = (e) => "getRoutes" in e && typeof e.getRoutes == "function", Ls = (e) => "renderSearch" in e && typeof e.renderSearch == "function", Bs = (e) => "initialize" in e && typeof e.initialize == "function", Hs = (e) => "getHead" in e && typeof e.getHead == "function", Us = (e) => "getMdxComponents" in e && typeof e.getMdxComponents == "function", zs = (e) => "getIdentities" in e && typeof e.getIdentities == "function", rr = new Os();
|
|
833
|
+
class Ks {
|
|
832
834
|
constructor(t) {
|
|
833
835
|
ae(this, "plugins");
|
|
834
836
|
ae(this, "sidebars");
|
|
@@ -839,23 +841,23 @@ class Bs {
|
|
|
839
841
|
ae(this, "navigationPlugins");
|
|
840
842
|
ae(this, "initialize", async () => {
|
|
841
843
|
await Promise.all(
|
|
842
|
-
this.plugins.filter(
|
|
844
|
+
this.plugins.filter(Bs).map((t) => {
|
|
843
845
|
var n;
|
|
844
846
|
return (n = t.initialize) == null ? void 0 : n.call(t, this);
|
|
845
847
|
})
|
|
846
848
|
);
|
|
847
849
|
});
|
|
848
850
|
ae(this, "invalidateCache", async (t) => {
|
|
849
|
-
await
|
|
851
|
+
await rr.invalidateQueries({ queryKey: t });
|
|
850
852
|
});
|
|
851
853
|
ae(this, "getApiIdentities", async () => (await Promise.all(
|
|
852
|
-
this.plugins.filter(
|
|
854
|
+
this.plugins.filter(zs).map((n) => n.getIdentities(this))
|
|
853
855
|
)).flat());
|
|
854
856
|
ae(this, "getPluginSidebar", async (t) => (await Promise.all(
|
|
855
857
|
this.navigationPlugins.map(
|
|
856
858
|
(r) => {
|
|
857
859
|
var o;
|
|
858
|
-
return (o = r.getSidebar) == null ? void 0 : o.call(r,
|
|
860
|
+
return (o = r.getSidebar) == null ? void 0 : o.call(r, wt(t));
|
|
859
861
|
}
|
|
860
862
|
)
|
|
861
863
|
)).flatMap((r) => r ?? []));
|
|
@@ -865,35 +867,35 @@ class Bs {
|
|
|
865
867
|
const n = await this.authentication.getAccessToken();
|
|
866
868
|
return t.headers.set("Authorization", `Bearer ${n}`), t;
|
|
867
869
|
});
|
|
868
|
-
this.plugins = t.plugins ?? [], this.topNavigation = t.topNavigation ?? [], this.sidebars = t.sidebars ?? {}, this.navigationPlugins = this.plugins.filter(
|
|
870
|
+
this.plugins = t.plugins ?? [], this.topNavigation = t.topNavigation ?? [], this.sidebars = t.sidebars ?? {}, this.navigationPlugins = this.plugins.filter(Fs), this.authentication = t.authentication, this.meta = t.metadata, this.page = t.page;
|
|
869
871
|
}
|
|
870
872
|
}
|
|
871
|
-
function
|
|
873
|
+
function qs({ error: e, resetErrorBoundary: t }) {
|
|
872
874
|
return /* @__PURE__ */ a.jsx(kn, { error: e });
|
|
873
875
|
}
|
|
874
876
|
const ft = globalThis;
|
|
875
877
|
(!ft.requestIdleCallback || !ft.cancelIdleCallback) && (ft.requestIdleCallback = (e) => setTimeout(e, 1), ft.cancelIdleCallback = clearTimeout);
|
|
876
|
-
var _t = ["Enter", " "],
|
|
878
|
+
var _t = ["Enter", " "], Qs = ["ArrowDown", "PageUp", "Home"], ar = ["ArrowUp", "PageDown", "End"], Vs = [...Qs, ...ar], Gs = {
|
|
877
879
|
ltr: [..._t, "ArrowRight"],
|
|
878
880
|
rtl: [..._t, "ArrowLeft"]
|
|
879
|
-
},
|
|
881
|
+
}, Ws = {
|
|
880
882
|
ltr: ["ArrowLeft"],
|
|
881
883
|
rtl: ["ArrowRight"]
|
|
882
|
-
}, ot = "Menu", [et,
|
|
883
|
-
|
|
884
|
+
}, ot = "Menu", [et, Ys, Xs] = ro(ot), [ke, or] = $n(ot, [
|
|
885
|
+
Xs,
|
|
884
886
|
Fn,
|
|
885
887
|
Jn
|
|
886
|
-
]), st = Fn(),
|
|
887
|
-
const { __scopeMenu: t, open: n = !1, children: r, dir: o, onOpenChange: s, modal: i = !0 } = e, l = st(t), [u, m] = h.useState(null), f = h.useRef(!1), c =
|
|
888
|
+
]), st = Fn(), sr = Jn(), [ir, Te] = ke(ot), [Zs, it] = ke(ot), lr = (e) => {
|
|
889
|
+
const { __scopeMenu: t, open: n = !1, children: r, dir: o, onOpenChange: s, modal: i = !0 } = e, l = st(t), [u, m] = h.useState(null), f = h.useRef(!1), c = Lt(s), d = mo(o);
|
|
888
890
|
return h.useEffect(() => {
|
|
889
891
|
const R = () => {
|
|
890
|
-
f.current = !0, document.addEventListener("pointerdown",
|
|
891
|
-
},
|
|
892
|
+
f.current = !0, document.addEventListener("pointerdown", C, { capture: !0, once: !0 }), document.addEventListener("pointermove", C, { capture: !0, once: !0 });
|
|
893
|
+
}, C = () => f.current = !1;
|
|
892
894
|
return document.addEventListener("keydown", R, { capture: !0 }), () => {
|
|
893
|
-
document.removeEventListener("keydown", R, { capture: !0 }), document.removeEventListener("pointerdown",
|
|
895
|
+
document.removeEventListener("keydown", R, { capture: !0 }), document.removeEventListener("pointerdown", C, { capture: !0 }), document.removeEventListener("pointermove", C, { capture: !0 });
|
|
894
896
|
};
|
|
895
897
|
}, []), /* @__PURE__ */ a.jsx(Bn, { ...l, children: /* @__PURE__ */ a.jsx(
|
|
896
|
-
|
|
898
|
+
ir,
|
|
897
899
|
{
|
|
898
900
|
scope: t,
|
|
899
901
|
open: n,
|
|
@@ -901,7 +903,7 @@ var _t = ["Enter", " "], Us = ["ArrowDown", "PageUp", "Home"], rr = ["ArrowUp",
|
|
|
901
903
|
content: u,
|
|
902
904
|
onContentChange: m,
|
|
903
905
|
children: /* @__PURE__ */ a.jsx(
|
|
904
|
-
|
|
906
|
+
Zs,
|
|
905
907
|
{
|
|
906
908
|
scope: t,
|
|
907
909
|
onClose: h.useCallback(() => c(!1), [c]),
|
|
@@ -914,32 +916,32 @@ var _t = ["Enter", " "], Us = ["ArrowDown", "PageUp", "Home"], rr = ["ArrowUp",
|
|
|
914
916
|
}
|
|
915
917
|
) });
|
|
916
918
|
};
|
|
917
|
-
|
|
918
|
-
var
|
|
919
|
+
lr.displayName = ot;
|
|
920
|
+
var Js = "MenuAnchor", Kt = h.forwardRef(
|
|
919
921
|
(e, t) => {
|
|
920
922
|
const { __scopeMenu: n, ...r } = e, o = st(n);
|
|
921
|
-
return /* @__PURE__ */ a.jsx(
|
|
923
|
+
return /* @__PURE__ */ a.jsx(ao, { ...o, ...r, ref: t });
|
|
922
924
|
}
|
|
923
925
|
);
|
|
924
|
-
Kt.displayName =
|
|
925
|
-
var qt = "MenuPortal", [
|
|
926
|
+
Kt.displayName = Js;
|
|
927
|
+
var qt = "MenuPortal", [ei, cr] = ke(qt, {
|
|
926
928
|
forceMount: void 0
|
|
927
|
-
}),
|
|
929
|
+
}), ur = (e) => {
|
|
928
930
|
const { __scopeMenu: t, forceMount: n, children: r, container: o } = e, s = Te(qt, t);
|
|
929
|
-
return /* @__PURE__ */ a.jsx(
|
|
931
|
+
return /* @__PURE__ */ a.jsx(ei, { scope: t, forceMount: n, children: /* @__PURE__ */ a.jsx(bt, { present: n || s.open, children: /* @__PURE__ */ a.jsx(go, { asChild: !0, container: o, children: r }) }) });
|
|
930
932
|
};
|
|
931
|
-
|
|
932
|
-
var ue = "MenuContent", [
|
|
933
|
+
ur.displayName = qt;
|
|
934
|
+
var ue = "MenuContent", [ti, Qt] = ke(ue), dr = h.forwardRef(
|
|
933
935
|
(e, t) => {
|
|
934
|
-
const n =
|
|
935
|
-
return /* @__PURE__ */ a.jsx(et.Provider, { scope: e.__scopeMenu, children: /* @__PURE__ */ a.jsx(bt, { present: r || s.open, children: /* @__PURE__ */ a.jsx(et.Slot, { scope: e.__scopeMenu, children: i.modal ? /* @__PURE__ */ a.jsx(
|
|
936
|
+
const n = cr(ue, e.__scopeMenu), { forceMount: r = n.forceMount, ...o } = e, s = Te(ue, e.__scopeMenu), i = it(ue, e.__scopeMenu);
|
|
937
|
+
return /* @__PURE__ */ a.jsx(et.Provider, { scope: e.__scopeMenu, children: /* @__PURE__ */ a.jsx(bt, { present: r || s.open, children: /* @__PURE__ */ a.jsx(et.Slot, { scope: e.__scopeMenu, children: i.modal ? /* @__PURE__ */ a.jsx(ni, { ...o, ref: t }) : /* @__PURE__ */ a.jsx(ri, { ...o, ref: t }) }) }) });
|
|
936
938
|
}
|
|
937
|
-
),
|
|
939
|
+
), ni = h.forwardRef(
|
|
938
940
|
(e, t) => {
|
|
939
941
|
const n = Te(ue, e.__scopeMenu), r = h.useRef(null), o = rt(t, r);
|
|
940
942
|
return h.useEffect(() => {
|
|
941
943
|
const s = r.current;
|
|
942
|
-
if (s) return
|
|
944
|
+
if (s) return oo(s);
|
|
943
945
|
}, []), /* @__PURE__ */ a.jsx(
|
|
944
946
|
Vt,
|
|
945
947
|
{
|
|
@@ -948,7 +950,7 @@ var ue = "MenuContent", [Xs, Qt] = ke(ue), ur = h.forwardRef(
|
|
|
948
950
|
trapFocus: n.open,
|
|
949
951
|
disableOutsidePointerEvents: n.open,
|
|
950
952
|
disableOutsideScroll: !0,
|
|
951
|
-
onFocusOutside:
|
|
953
|
+
onFocusOutside: I(
|
|
952
954
|
e.onFocusOutside,
|
|
953
955
|
(s) => s.preventDefault(),
|
|
954
956
|
{ checkForDefaultPrevented: !1 }
|
|
@@ -957,7 +959,7 @@ var ue = "MenuContent", [Xs, Qt] = ke(ue), ur = h.forwardRef(
|
|
|
957
959
|
}
|
|
958
960
|
);
|
|
959
961
|
}
|
|
960
|
-
),
|
|
962
|
+
), ri = h.forwardRef((e, t) => {
|
|
961
963
|
const n = Te(ue, e.__scopeMenu);
|
|
962
964
|
return /* @__PURE__ */ a.jsx(
|
|
963
965
|
Vt,
|
|
@@ -985,22 +987,22 @@ var ue = "MenuContent", [Xs, Qt] = ke(ue), ur = h.forwardRef(
|
|
|
985
987
|
onFocusOutside: c,
|
|
986
988
|
onInteractOutside: d,
|
|
987
989
|
onDismiss: R,
|
|
988
|
-
disableOutsideScroll:
|
|
989
|
-
...
|
|
990
|
-
} = e,
|
|
990
|
+
disableOutsideScroll: C,
|
|
991
|
+
...g
|
|
992
|
+
} = e, T = Te(ue, n), M = it(ue, n), A = st(n), P = sr(n), v = Ys(n), [z, J] = h.useState(null), b = h.useRef(null), j = rt(t, b, T.onContentChange), D = h.useRef(0), B = h.useRef(""), K = h.useRef(0), W = h.useRef(null), y = h.useRef("right"), V = h.useRef(0), G = C ? fo : h.Fragment, te = C ? { as: ho, allowPinchZoom: !0 } : void 0, q = (x) => {
|
|
991
993
|
var le, Re;
|
|
992
|
-
const Q = B.current + x, ie =
|
|
994
|
+
const Q = B.current + x, ie = v().filter((re) => !re.disabled), de = document.activeElement, pe = (le = ie.find((re) => re.ref.current === de)) == null ? void 0 : le.textValue, Me = ie.map((re) => re.textValue), $e = mi(Me, Q, pe), xe = (Re = ie.find((re) => re.textValue === $e)) == null ? void 0 : Re.ref.current;
|
|
993
995
|
(function re(Fe) {
|
|
994
996
|
B.current = Fe, window.clearTimeout(D.current), Fe !== "" && (D.current = window.setTimeout(() => re(""), 1e3));
|
|
995
|
-
})(Q),
|
|
997
|
+
})(Q), xe && setTimeout(() => xe.focus());
|
|
996
998
|
};
|
|
997
|
-
h.useEffect(() => () => window.clearTimeout(D.current), []),
|
|
999
|
+
h.useEffect(() => () => window.clearTimeout(D.current), []), so();
|
|
998
1000
|
const Y = h.useCallback((x) => {
|
|
999
1001
|
var ie, de;
|
|
1000
|
-
return
|
|
1002
|
+
return y.current === ((ie = W.current) == null ? void 0 : ie.side) && vi(x, (de = W.current) == null ? void 0 : de.area);
|
|
1001
1003
|
}, []);
|
|
1002
1004
|
return /* @__PURE__ */ a.jsx(
|
|
1003
|
-
|
|
1005
|
+
ti,
|
|
1004
1006
|
{
|
|
1005
1007
|
scope: n,
|
|
1006
1008
|
searchRef: B,
|
|
@@ -1013,7 +1015,7 @@ var ue = "MenuContent", [Xs, Qt] = ke(ue), ur = h.forwardRef(
|
|
|
1013
1015
|
onItemLeave: h.useCallback(
|
|
1014
1016
|
(x) => {
|
|
1015
1017
|
var Q;
|
|
1016
|
-
Y(x) || ((Q =
|
|
1018
|
+
Y(x) || ((Q = b.current) == null || Q.focus(), J(null));
|
|
1017
1019
|
},
|
|
1018
1020
|
[Y]
|
|
1019
1021
|
),
|
|
@@ -1028,17 +1030,17 @@ var ue = "MenuContent", [Xs, Qt] = ke(ue), ur = h.forwardRef(
|
|
|
1028
1030
|
W.current = x;
|
|
1029
1031
|
}, []),
|
|
1030
1032
|
children: /* @__PURE__ */ a.jsx(G, { ...te, children: /* @__PURE__ */ a.jsx(
|
|
1031
|
-
|
|
1033
|
+
io,
|
|
1032
1034
|
{
|
|
1033
1035
|
asChild: !0,
|
|
1034
1036
|
trapped: o,
|
|
1035
|
-
onMountAutoFocus:
|
|
1037
|
+
onMountAutoFocus: I(s, (x) => {
|
|
1036
1038
|
var Q;
|
|
1037
|
-
x.preventDefault(), (Q =
|
|
1039
|
+
x.preventDefault(), (Q = b.current) == null || Q.focus({ preventScroll: !0 });
|
|
1038
1040
|
}),
|
|
1039
1041
|
onUnmountAutoFocus: i,
|
|
1040
1042
|
children: /* @__PURE__ */ a.jsx(
|
|
1041
|
-
|
|
1043
|
+
lo,
|
|
1042
1044
|
{
|
|
1043
1045
|
asChild: !0,
|
|
1044
1046
|
disableOutsidePointerEvents: l,
|
|
@@ -1048,50 +1050,50 @@ var ue = "MenuContent", [Xs, Qt] = ke(ue), ur = h.forwardRef(
|
|
|
1048
1050
|
onInteractOutside: d,
|
|
1049
1051
|
onDismiss: R,
|
|
1050
1052
|
children: /* @__PURE__ */ a.jsx(
|
|
1051
|
-
|
|
1053
|
+
es,
|
|
1052
1054
|
{
|
|
1053
1055
|
asChild: !0,
|
|
1054
1056
|
...P,
|
|
1055
|
-
dir:
|
|
1057
|
+
dir: M.dir,
|
|
1056
1058
|
orientation: "vertical",
|
|
1057
1059
|
loop: r,
|
|
1058
1060
|
currentTabStopId: z,
|
|
1059
|
-
onCurrentTabStopIdChange:
|
|
1060
|
-
onEntryFocus:
|
|
1061
|
-
|
|
1061
|
+
onCurrentTabStopIdChange: J,
|
|
1062
|
+
onEntryFocus: I(u, (x) => {
|
|
1063
|
+
M.isUsingKeyboardRef.current || x.preventDefault();
|
|
1062
1064
|
}),
|
|
1063
1065
|
preventScrollOnEntryFocus: !0,
|
|
1064
1066
|
children: /* @__PURE__ */ a.jsx(
|
|
1065
|
-
|
|
1067
|
+
co,
|
|
1066
1068
|
{
|
|
1067
1069
|
role: "menu",
|
|
1068
1070
|
"aria-orientation": "vertical",
|
|
1069
|
-
"data-state":
|
|
1071
|
+
"data-state": Pr(T.open),
|
|
1070
1072
|
"data-radix-menu-content": "",
|
|
1071
|
-
dir:
|
|
1072
|
-
...
|
|
1073
|
-
...
|
|
1073
|
+
dir: M.dir,
|
|
1074
|
+
...A,
|
|
1075
|
+
...g,
|
|
1074
1076
|
ref: j,
|
|
1075
|
-
style: { outline: "none", ...
|
|
1076
|
-
onKeyDown:
|
|
1077
|
+
style: { outline: "none", ...g.style },
|
|
1078
|
+
onKeyDown: I(g.onKeyDown, (x) => {
|
|
1077
1079
|
const ie = x.target.closest("[data-radix-menu-content]") === x.currentTarget, de = x.ctrlKey || x.altKey || x.metaKey, pe = x.key.length === 1;
|
|
1078
1080
|
ie && (x.key === "Tab" && x.preventDefault(), !de && pe && q(x.key));
|
|
1079
|
-
const Me =
|
|
1080
|
-
if (x.target !== Me || !
|
|
1081
|
+
const Me = b.current;
|
|
1082
|
+
if (x.target !== Me || !Vs.includes(x.key)) return;
|
|
1081
1083
|
x.preventDefault();
|
|
1082
|
-
const
|
|
1083
|
-
|
|
1084
|
+
const xe = v().filter((le) => !le.disabled).map((le) => le.ref.current);
|
|
1085
|
+
ar.includes(x.key) && xe.reverse(), hi(xe);
|
|
1084
1086
|
}),
|
|
1085
|
-
onBlur:
|
|
1087
|
+
onBlur: I(e.onBlur, (x) => {
|
|
1086
1088
|
x.currentTarget.contains(x.target) || (window.clearTimeout(D.current), B.current = "");
|
|
1087
1089
|
}),
|
|
1088
|
-
onPointerMove:
|
|
1090
|
+
onPointerMove: I(
|
|
1089
1091
|
e.onPointerMove,
|
|
1090
1092
|
tt((x) => {
|
|
1091
1093
|
const Q = x.target, ie = V.current !== x.clientX;
|
|
1092
1094
|
if (x.currentTarget.contains(Q) && ie) {
|
|
1093
1095
|
const de = x.clientX > V.current ? "right" : "left";
|
|
1094
|
-
|
|
1096
|
+
y.current = de, V.current = x.clientX;
|
|
1095
1097
|
}
|
|
1096
1098
|
})
|
|
1097
1099
|
)
|
|
@@ -1107,46 +1109,46 @@ var ue = "MenuContent", [Xs, Qt] = ke(ue), ur = h.forwardRef(
|
|
|
1107
1109
|
);
|
|
1108
1110
|
}
|
|
1109
1111
|
);
|
|
1110
|
-
|
|
1111
|
-
var
|
|
1112
|
+
dr.displayName = ue;
|
|
1113
|
+
var ai = "MenuGroup", Gt = h.forwardRef(
|
|
1112
1114
|
(e, t) => {
|
|
1113
1115
|
const { __scopeMenu: n, ...r } = e;
|
|
1114
1116
|
return /* @__PURE__ */ a.jsx(qe.div, { role: "group", ...r, ref: t });
|
|
1115
1117
|
}
|
|
1116
1118
|
);
|
|
1117
|
-
Gt.displayName =
|
|
1118
|
-
var
|
|
1119
|
+
Gt.displayName = ai;
|
|
1120
|
+
var oi = "MenuLabel", fr = h.forwardRef(
|
|
1119
1121
|
(e, t) => {
|
|
1120
1122
|
const { __scopeMenu: n, ...r } = e;
|
|
1121
1123
|
return /* @__PURE__ */ a.jsx(qe.div, { ...r, ref: t });
|
|
1122
1124
|
}
|
|
1123
1125
|
);
|
|
1124
|
-
|
|
1125
|
-
var
|
|
1126
|
+
fr.displayName = oi;
|
|
1127
|
+
var yt = "MenuItem", Rn = "menu.itemSelect", St = h.forwardRef(
|
|
1126
1128
|
(e, t) => {
|
|
1127
|
-
const { disabled: n = !1, onSelect: r, ...o } = e, s = h.useRef(null), i = it(
|
|
1129
|
+
const { disabled: n = !1, onSelect: r, ...o } = e, s = h.useRef(null), i = it(yt, e.__scopeMenu), l = Qt(yt, e.__scopeMenu), u = rt(t, s), m = h.useRef(!1), f = () => {
|
|
1128
1130
|
const c = s.current;
|
|
1129
1131
|
if (!n && c) {
|
|
1130
1132
|
const d = new CustomEvent(Rn, { bubbles: !0, cancelable: !0 });
|
|
1131
|
-
c.addEventListener(Rn, (R) => r == null ? void 0 : r(R), { once: !0 }),
|
|
1133
|
+
c.addEventListener(Rn, (R) => r == null ? void 0 : r(R), { once: !0 }), po(c, d), d.defaultPrevented ? m.current = !1 : i.onClose();
|
|
1132
1134
|
}
|
|
1133
1135
|
};
|
|
1134
1136
|
return /* @__PURE__ */ a.jsx(
|
|
1135
|
-
|
|
1137
|
+
hr,
|
|
1136
1138
|
{
|
|
1137
1139
|
...o,
|
|
1138
1140
|
ref: u,
|
|
1139
1141
|
disabled: n,
|
|
1140
|
-
onClick:
|
|
1142
|
+
onClick: I(e.onClick, f),
|
|
1141
1143
|
onPointerDown: (c) => {
|
|
1142
1144
|
var d;
|
|
1143
1145
|
(d = e.onPointerDown) == null || d.call(e, c), m.current = !0;
|
|
1144
1146
|
},
|
|
1145
|
-
onPointerUp:
|
|
1147
|
+
onPointerUp: I(e.onPointerUp, (c) => {
|
|
1146
1148
|
var d;
|
|
1147
1149
|
m.current || (d = c.currentTarget) == null || d.click();
|
|
1148
1150
|
}),
|
|
1149
|
-
onKeyDown:
|
|
1151
|
+
onKeyDown: I(e.onKeyDown, (c) => {
|
|
1150
1152
|
const d = l.searchRef.current !== "";
|
|
1151
1153
|
n || d && c.key === " " || _t.includes(c.key) && (c.currentTarget.click(), c.preventDefault());
|
|
1152
1154
|
})
|
|
@@ -1154,20 +1156,20 @@ var wt = "MenuItem", Rn = "menu.itemSelect", St = h.forwardRef(
|
|
|
1154
1156
|
);
|
|
1155
1157
|
}
|
|
1156
1158
|
);
|
|
1157
|
-
St.displayName =
|
|
1158
|
-
var
|
|
1159
|
+
St.displayName = yt;
|
|
1160
|
+
var hr = h.forwardRef(
|
|
1159
1161
|
(e, t) => {
|
|
1160
|
-
const { __scopeMenu: n, disabled: r = !1, textValue: o, ...s } = e, i = Qt(
|
|
1162
|
+
const { __scopeMenu: n, disabled: r = !1, textValue: o, ...s } = e, i = Qt(yt, n), l = sr(n), u = h.useRef(null), m = rt(t, u), [f, c] = h.useState(!1), [d, R] = h.useState("");
|
|
1161
1163
|
return h.useEffect(() => {
|
|
1162
|
-
const
|
|
1163
|
-
|
|
1164
|
+
const C = u.current;
|
|
1165
|
+
C && R((C.textContent ?? "").trim());
|
|
1164
1166
|
}, [s.children]), /* @__PURE__ */ a.jsx(
|
|
1165
1167
|
et.ItemSlot,
|
|
1166
1168
|
{
|
|
1167
1169
|
scope: n,
|
|
1168
1170
|
disabled: r,
|
|
1169
1171
|
textValue: o ?? d,
|
|
1170
|
-
children: /* @__PURE__ */ a.jsx(
|
|
1172
|
+
children: /* @__PURE__ */ a.jsx(ts, { asChild: !0, ...l, focusable: !r, children: /* @__PURE__ */ a.jsx(
|
|
1171
1173
|
qe.div,
|
|
1172
1174
|
{
|
|
1173
1175
|
role: "menuitem",
|
|
@@ -1176,27 +1178,27 @@ var fr = h.forwardRef(
|
|
|
1176
1178
|
"data-disabled": r ? "" : void 0,
|
|
1177
1179
|
...s,
|
|
1178
1180
|
ref: m,
|
|
1179
|
-
onPointerMove:
|
|
1181
|
+
onPointerMove: I(
|
|
1180
1182
|
e.onPointerMove,
|
|
1181
|
-
tt((
|
|
1182
|
-
r ? i.onItemLeave(
|
|
1183
|
+
tt((C) => {
|
|
1184
|
+
r ? i.onItemLeave(C) : (i.onItemEnter(C), C.defaultPrevented || C.currentTarget.focus({ preventScroll: !0 }));
|
|
1183
1185
|
})
|
|
1184
1186
|
),
|
|
1185
|
-
onPointerLeave:
|
|
1187
|
+
onPointerLeave: I(
|
|
1186
1188
|
e.onPointerLeave,
|
|
1187
|
-
tt((
|
|
1189
|
+
tt((C) => i.onItemLeave(C))
|
|
1188
1190
|
),
|
|
1189
|
-
onFocus:
|
|
1190
|
-
onBlur:
|
|
1191
|
+
onFocus: I(e.onFocus, () => c(!0)),
|
|
1192
|
+
onBlur: I(e.onBlur, () => c(!1))
|
|
1191
1193
|
}
|
|
1192
1194
|
) })
|
|
1193
1195
|
}
|
|
1194
1196
|
);
|
|
1195
1197
|
}
|
|
1196
|
-
),
|
|
1198
|
+
), si = "MenuCheckboxItem", pr = h.forwardRef(
|
|
1197
1199
|
(e, t) => {
|
|
1198
1200
|
const { checked: n = !1, onCheckedChange: r, ...o } = e;
|
|
1199
|
-
return /* @__PURE__ */ a.jsx(
|
|
1201
|
+
return /* @__PURE__ */ a.jsx(yr, { scope: e.__scopeMenu, checked: n, children: /* @__PURE__ */ a.jsx(
|
|
1200
1202
|
St,
|
|
1201
1203
|
{
|
|
1202
1204
|
role: "menuitemcheckbox",
|
|
@@ -1204,7 +1206,7 @@ var fr = h.forwardRef(
|
|
|
1204
1206
|
...o,
|
|
1205
1207
|
ref: t,
|
|
1206
1208
|
"data-state": Xt(n),
|
|
1207
|
-
onSelect:
|
|
1209
|
+
onSelect: I(
|
|
1208
1210
|
o.onSelect,
|
|
1209
1211
|
() => r == null ? void 0 : r(xt(n) ? !0 : !n),
|
|
1210
1212
|
{ checkForDefaultPrevented: !1 }
|
|
@@ -1213,22 +1215,22 @@ var fr = h.forwardRef(
|
|
|
1213
1215
|
) });
|
|
1214
1216
|
}
|
|
1215
1217
|
);
|
|
1216
|
-
|
|
1217
|
-
var
|
|
1218
|
-
|
|
1218
|
+
pr.displayName = si;
|
|
1219
|
+
var mr = "MenuRadioGroup", [ii, li] = ke(
|
|
1220
|
+
mr,
|
|
1219
1221
|
{ value: void 0, onValueChange: () => {
|
|
1220
1222
|
} }
|
|
1221
|
-
),
|
|
1223
|
+
), gr = h.forwardRef(
|
|
1222
1224
|
(e, t) => {
|
|
1223
|
-
const { value: n, onValueChange: r, ...o } = e, s =
|
|
1224
|
-
return /* @__PURE__ */ a.jsx(
|
|
1225
|
+
const { value: n, onValueChange: r, ...o } = e, s = Lt(r);
|
|
1226
|
+
return /* @__PURE__ */ a.jsx(ii, { scope: e.__scopeMenu, value: n, onValueChange: s, children: /* @__PURE__ */ a.jsx(Gt, { ...o, ref: t }) });
|
|
1225
1227
|
}
|
|
1226
1228
|
);
|
|
1227
|
-
|
|
1228
|
-
var
|
|
1229
|
+
gr.displayName = mr;
|
|
1230
|
+
var vr = "MenuRadioItem", wr = h.forwardRef(
|
|
1229
1231
|
(e, t) => {
|
|
1230
|
-
const { value: n, ...r } = e, o =
|
|
1231
|
-
return /* @__PURE__ */ a.jsx(
|
|
1232
|
+
const { value: n, ...r } = e, o = li(vr, e.__scopeMenu), s = n === o.value;
|
|
1233
|
+
return /* @__PURE__ */ a.jsx(yr, { scope: e.__scopeMenu, checked: s, children: /* @__PURE__ */ a.jsx(
|
|
1232
1234
|
St,
|
|
1233
1235
|
{
|
|
1234
1236
|
role: "menuitemradio",
|
|
@@ -1236,7 +1238,7 @@ var gr = "MenuRadioItem", vr = h.forwardRef(
|
|
|
1236
1238
|
...r,
|
|
1237
1239
|
ref: t,
|
|
1238
1240
|
"data-state": Xt(s),
|
|
1239
|
-
onSelect:
|
|
1241
|
+
onSelect: I(
|
|
1240
1242
|
r.onSelect,
|
|
1241
1243
|
() => {
|
|
1242
1244
|
var i;
|
|
@@ -1248,13 +1250,13 @@ var gr = "MenuRadioItem", vr = h.forwardRef(
|
|
|
1248
1250
|
) });
|
|
1249
1251
|
}
|
|
1250
1252
|
);
|
|
1251
|
-
|
|
1252
|
-
var Wt = "MenuItemIndicator", [
|
|
1253
|
+
wr.displayName = vr;
|
|
1254
|
+
var Wt = "MenuItemIndicator", [yr, ci] = ke(
|
|
1253
1255
|
Wt,
|
|
1254
1256
|
{ checked: !1 }
|
|
1255
1257
|
), xr = h.forwardRef(
|
|
1256
1258
|
(e, t) => {
|
|
1257
|
-
const { __scopeMenu: n, forceMount: r, ...o } = e, s =
|
|
1259
|
+
const { __scopeMenu: n, forceMount: r, ...o } = e, s = ci(Wt, n);
|
|
1258
1260
|
return /* @__PURE__ */ a.jsx(
|
|
1259
1261
|
bt,
|
|
1260
1262
|
{
|
|
@@ -1272,7 +1274,7 @@ var Wt = "MenuItemIndicator", [wr, oi] = ke(
|
|
|
1272
1274
|
}
|
|
1273
1275
|
);
|
|
1274
1276
|
xr.displayName = Wt;
|
|
1275
|
-
var
|
|
1277
|
+
var ui = "MenuSeparator", br = h.forwardRef(
|
|
1276
1278
|
(e, t) => {
|
|
1277
1279
|
const { __scopeMenu: n, ...r } = e;
|
|
1278
1280
|
return /* @__PURE__ */ a.jsx(
|
|
@@ -1286,18 +1288,18 @@ var si = "MenuSeparator", yr = h.forwardRef(
|
|
|
1286
1288
|
);
|
|
1287
1289
|
}
|
|
1288
1290
|
);
|
|
1289
|
-
|
|
1290
|
-
var
|
|
1291
|
+
br.displayName = ui;
|
|
1292
|
+
var di = "MenuArrow", Sr = h.forwardRef(
|
|
1291
1293
|
(e, t) => {
|
|
1292
1294
|
const { __scopeMenu: n, ...r } = e, o = st(n);
|
|
1293
|
-
return /* @__PURE__ */ a.jsx(
|
|
1295
|
+
return /* @__PURE__ */ a.jsx(uo, { ...o, ...r, ref: t });
|
|
1294
1296
|
}
|
|
1295
1297
|
);
|
|
1296
|
-
|
|
1297
|
-
var Yt = "MenuSub", [
|
|
1298
|
-
const { __scopeMenu: t, children: n, open: r = !1, onOpenChange: o } = e, s = Te(Yt, t), i = st(t), [l, u] = h.useState(null), [m, f] = h.useState(null), c =
|
|
1298
|
+
Sr.displayName = di;
|
|
1299
|
+
var Yt = "MenuSub", [fi, Cr] = ke(Yt), Mr = (e) => {
|
|
1300
|
+
const { __scopeMenu: t, children: n, open: r = !1, onOpenChange: o } = e, s = Te(Yt, t), i = st(t), [l, u] = h.useState(null), [m, f] = h.useState(null), c = Lt(o);
|
|
1299
1301
|
return h.useEffect(() => (s.open === !1 && c(!1), () => c(!1)), [s.open, c]), /* @__PURE__ */ a.jsx(Bn, { ...i, children: /* @__PURE__ */ a.jsx(
|
|
1300
|
-
|
|
1302
|
+
ir,
|
|
1301
1303
|
{
|
|
1302
1304
|
scope: t,
|
|
1303
1305
|
open: r,
|
|
@@ -1305,11 +1307,11 @@ var Yt = "MenuSub", [li, Sr] = ke(Yt), Cr = (e) => {
|
|
|
1305
1307
|
content: m,
|
|
1306
1308
|
onContentChange: f,
|
|
1307
1309
|
children: /* @__PURE__ */ a.jsx(
|
|
1308
|
-
|
|
1310
|
+
fi,
|
|
1309
1311
|
{
|
|
1310
1312
|
scope: t,
|
|
1311
|
-
contentId:
|
|
1312
|
-
triggerId:
|
|
1313
|
+
contentId: gt(),
|
|
1314
|
+
triggerId: gt(),
|
|
1313
1315
|
trigger: l,
|
|
1314
1316
|
onTriggerChange: u,
|
|
1315
1317
|
children: n
|
|
@@ -1318,10 +1320,10 @@ var Yt = "MenuSub", [li, Sr] = ke(Yt), Cr = (e) => {
|
|
|
1318
1320
|
}
|
|
1319
1321
|
) });
|
|
1320
1322
|
};
|
|
1321
|
-
|
|
1322
|
-
var Xe = "MenuSubTrigger",
|
|
1323
|
+
Mr.displayName = Yt;
|
|
1324
|
+
var Xe = "MenuSubTrigger", Rr = h.forwardRef(
|
|
1323
1325
|
(e, t) => {
|
|
1324
|
-
const n = Te(Xe, e.__scopeMenu), r = it(Xe, e.__scopeMenu), o =
|
|
1326
|
+
const n = Te(Xe, e.__scopeMenu), r = it(Xe, e.__scopeMenu), o = Cr(Xe, e.__scopeMenu), s = Qt(Xe, e.__scopeMenu), i = h.useRef(null), { pointerGraceTimerRef: l, onPointerGraceIntentChange: u } = s, m = { __scopeMenu: e.__scopeMenu }, f = h.useCallback(() => {
|
|
1325
1327
|
i.current && window.clearTimeout(i.current), i.current = null;
|
|
1326
1328
|
}, []);
|
|
1327
1329
|
return h.useEffect(() => f, [f]), h.useEffect(() => {
|
|
@@ -1330,20 +1332,20 @@ var Xe = "MenuSubTrigger", Mr = h.forwardRef(
|
|
|
1330
1332
|
window.clearTimeout(c), u(null);
|
|
1331
1333
|
};
|
|
1332
1334
|
}, [l, u]), /* @__PURE__ */ a.jsx(Kt, { asChild: !0, ...m, children: /* @__PURE__ */ a.jsx(
|
|
1333
|
-
|
|
1335
|
+
hr,
|
|
1334
1336
|
{
|
|
1335
1337
|
id: o.triggerId,
|
|
1336
1338
|
"aria-haspopup": "menu",
|
|
1337
1339
|
"aria-expanded": n.open,
|
|
1338
1340
|
"aria-controls": o.contentId,
|
|
1339
|
-
"data-state":
|
|
1341
|
+
"data-state": Pr(n.open),
|
|
1340
1342
|
...e,
|
|
1341
1343
|
ref: Ln(t, o.onTriggerChange),
|
|
1342
1344
|
onClick: (c) => {
|
|
1343
1345
|
var d;
|
|
1344
1346
|
(d = e.onClick) == null || d.call(e, c), !(e.disabled || c.defaultPrevented) && (c.currentTarget.focus(), n.open || n.onOpenChange(!0));
|
|
1345
1347
|
},
|
|
1346
|
-
onPointerMove:
|
|
1348
|
+
onPointerMove: I(
|
|
1347
1349
|
e.onPointerMove,
|
|
1348
1350
|
tt((c) => {
|
|
1349
1351
|
s.onItemEnter(c), !c.defaultPrevented && !e.disabled && !n.open && !i.current && (s.onPointerGraceIntentChange(null), i.current = window.setTimeout(() => {
|
|
@@ -1351,25 +1353,25 @@ var Xe = "MenuSubTrigger", Mr = h.forwardRef(
|
|
|
1351
1353
|
}, 100));
|
|
1352
1354
|
})
|
|
1353
1355
|
),
|
|
1354
|
-
onPointerLeave:
|
|
1356
|
+
onPointerLeave: I(
|
|
1355
1357
|
e.onPointerLeave,
|
|
1356
1358
|
tt((c) => {
|
|
1357
|
-
var R,
|
|
1359
|
+
var R, C;
|
|
1358
1360
|
f();
|
|
1359
1361
|
const d = (R = n.content) == null ? void 0 : R.getBoundingClientRect();
|
|
1360
1362
|
if (d) {
|
|
1361
|
-
const
|
|
1363
|
+
const g = (C = n.content) == null ? void 0 : C.dataset.side, T = g === "right", M = T ? -5 : 5, A = d[T ? "left" : "right"], P = d[T ? "right" : "left"];
|
|
1362
1364
|
s.onPointerGraceIntentChange({
|
|
1363
1365
|
area: [
|
|
1364
1366
|
// Apply a bleed on clientX to ensure that our exit point is
|
|
1365
1367
|
// consistently within polygon bounds
|
|
1366
|
-
{ x: c.clientX +
|
|
1367
|
-
{ x:
|
|
1368
|
+
{ x: c.clientX + M, y: c.clientY },
|
|
1369
|
+
{ x: A, y: d.top },
|
|
1368
1370
|
{ x: P, y: d.top },
|
|
1369
1371
|
{ x: P, y: d.bottom },
|
|
1370
|
-
{ x:
|
|
1372
|
+
{ x: A, y: d.bottom }
|
|
1371
1373
|
],
|
|
1372
|
-
side:
|
|
1374
|
+
side: g
|
|
1373
1375
|
}), window.clearTimeout(l.current), l.current = window.setTimeout(
|
|
1374
1376
|
() => s.onPointerGraceIntentChange(null),
|
|
1375
1377
|
300
|
|
@@ -1380,19 +1382,19 @@ var Xe = "MenuSubTrigger", Mr = h.forwardRef(
|
|
|
1380
1382
|
}
|
|
1381
1383
|
})
|
|
1382
1384
|
),
|
|
1383
|
-
onKeyDown:
|
|
1385
|
+
onKeyDown: I(e.onKeyDown, (c) => {
|
|
1384
1386
|
var R;
|
|
1385
1387
|
const d = s.searchRef.current !== "";
|
|
1386
|
-
e.disabled || d && c.key === " " ||
|
|
1388
|
+
e.disabled || d && c.key === " " || Gs[r.dir].includes(c.key) && (n.onOpenChange(!0), (R = n.content) == null || R.focus(), c.preventDefault());
|
|
1387
1389
|
})
|
|
1388
1390
|
}
|
|
1389
1391
|
) });
|
|
1390
1392
|
}
|
|
1391
1393
|
);
|
|
1392
|
-
|
|
1393
|
-
var
|
|
1394
|
+
Rr.displayName = Xe;
|
|
1395
|
+
var Er = "MenuSubContent", Dr = h.forwardRef(
|
|
1394
1396
|
(e, t) => {
|
|
1395
|
-
const n =
|
|
1397
|
+
const n = cr(ue, e.__scopeMenu), { forceMount: r = n.forceMount, ...o } = e, s = Te(ue, e.__scopeMenu), i = it(ue, e.__scopeMenu), l = Cr(Er, e.__scopeMenu), u = h.useRef(null), m = rt(t, u);
|
|
1396
1398
|
return /* @__PURE__ */ a.jsx(et.Provider, { scope: e.__scopeMenu, children: /* @__PURE__ */ a.jsx(bt, { present: r || s.open, children: /* @__PURE__ */ a.jsx(et.Slot, { scope: e.__scopeMenu, children: /* @__PURE__ */ a.jsx(
|
|
1397
1399
|
Vt,
|
|
1398
1400
|
{
|
|
@@ -1410,23 +1412,23 @@ var Rr = "MenuSubContent", Er = h.forwardRef(
|
|
|
1410
1412
|
i.isUsingKeyboardRef.current && ((c = u.current) == null || c.focus()), f.preventDefault();
|
|
1411
1413
|
},
|
|
1412
1414
|
onCloseAutoFocus: (f) => f.preventDefault(),
|
|
1413
|
-
onFocusOutside:
|
|
1415
|
+
onFocusOutside: I(e.onFocusOutside, (f) => {
|
|
1414
1416
|
f.target !== l.trigger && s.onOpenChange(!1);
|
|
1415
1417
|
}),
|
|
1416
|
-
onEscapeKeyDown:
|
|
1418
|
+
onEscapeKeyDown: I(e.onEscapeKeyDown, (f) => {
|
|
1417
1419
|
i.onClose(), f.preventDefault();
|
|
1418
1420
|
}),
|
|
1419
|
-
onKeyDown:
|
|
1421
|
+
onKeyDown: I(e.onKeyDown, (f) => {
|
|
1420
1422
|
var R;
|
|
1421
|
-
const c = f.currentTarget.contains(f.target), d =
|
|
1423
|
+
const c = f.currentTarget.contains(f.target), d = Ws[i.dir].includes(f.key);
|
|
1422
1424
|
c && d && (s.onOpenChange(!1), (R = l.trigger) == null || R.focus(), f.preventDefault());
|
|
1423
1425
|
})
|
|
1424
1426
|
}
|
|
1425
1427
|
) }) }) });
|
|
1426
1428
|
}
|
|
1427
1429
|
);
|
|
1428
|
-
|
|
1429
|
-
function
|
|
1430
|
+
Dr.displayName = Er;
|
|
1431
|
+
function Pr(e) {
|
|
1430
1432
|
return e ? "open" : "closed";
|
|
1431
1433
|
}
|
|
1432
1434
|
function xt(e) {
|
|
@@ -1435,24 +1437,24 @@ function xt(e) {
|
|
|
1435
1437
|
function Xt(e) {
|
|
1436
1438
|
return xt(e) ? "indeterminate" : e ? "checked" : "unchecked";
|
|
1437
1439
|
}
|
|
1438
|
-
function
|
|
1440
|
+
function hi(e) {
|
|
1439
1441
|
const t = document.activeElement;
|
|
1440
1442
|
for (const n of e)
|
|
1441
1443
|
if (n === t || (n.focus(), document.activeElement !== t)) return;
|
|
1442
1444
|
}
|
|
1443
|
-
function
|
|
1445
|
+
function pi(e, t) {
|
|
1444
1446
|
return e.map((n, r) => e[(t + r) % e.length]);
|
|
1445
1447
|
}
|
|
1446
|
-
function
|
|
1448
|
+
function mi(e, t, n) {
|
|
1447
1449
|
const o = t.length > 1 && Array.from(t).every((m) => m === t[0]) ? t[0] : t, s = n ? e.indexOf(n) : -1;
|
|
1448
|
-
let i =
|
|
1450
|
+
let i = pi(e, Math.max(s, 0));
|
|
1449
1451
|
o.length === 1 && (i = i.filter((m) => m !== n));
|
|
1450
1452
|
const u = i.find(
|
|
1451
1453
|
(m) => m.toLowerCase().startsWith(o.toLowerCase())
|
|
1452
1454
|
);
|
|
1453
1455
|
return u !== n ? u : void 0;
|
|
1454
1456
|
}
|
|
1455
|
-
function
|
|
1457
|
+
function gi(e, t) {
|
|
1456
1458
|
const { x: n, y: r } = e;
|
|
1457
1459
|
let o = !1;
|
|
1458
1460
|
for (let s = 0, i = t.length - 1; s < t.length; i = s++) {
|
|
@@ -1461,18 +1463,18 @@ function fi(e, t) {
|
|
|
1461
1463
|
}
|
|
1462
1464
|
return o;
|
|
1463
1465
|
}
|
|
1464
|
-
function
|
|
1466
|
+
function vi(e, t) {
|
|
1465
1467
|
if (!t) return !1;
|
|
1466
1468
|
const n = { x: e.clientX, y: e.clientY };
|
|
1467
|
-
return
|
|
1469
|
+
return gi(n, t);
|
|
1468
1470
|
}
|
|
1469
1471
|
function tt(e) {
|
|
1470
1472
|
return (t) => t.pointerType === "mouse" ? e(t) : void 0;
|
|
1471
1473
|
}
|
|
1472
|
-
var
|
|
1473
|
-
|
|
1474
|
-
[
|
|
1475
|
-
),
|
|
1474
|
+
var wi = lr, yi = Kt, xi = ur, bi = dr, Si = Gt, Ci = fr, Mi = St, Ri = pr, Ei = gr, Di = wr, Pi = xr, ji = br, Ni = Sr, Ti = Mr, _i = Rr, Oi = Dr, Zt = "DropdownMenu", [Ii, mc] = $n(
|
|
1475
|
+
Zt,
|
|
1476
|
+
[or]
|
|
1477
|
+
), Z = or(), [Ai, jr] = Ii(Zt), Nr = (e) => {
|
|
1476
1478
|
const {
|
|
1477
1479
|
__scopeDropdownMenu: t,
|
|
1478
1480
|
children: n,
|
|
@@ -1481,31 +1483,31 @@ var pi = ir, mi = Kt, gi = cr, vi = ur, wi = Gt, xi = dr, yi = St, bi = hr, Si =
|
|
|
1481
1483
|
defaultOpen: s,
|
|
1482
1484
|
onOpenChange: i,
|
|
1483
1485
|
modal: l = !0
|
|
1484
|
-
} = e, u =
|
|
1486
|
+
} = e, u = Z(t), m = h.useRef(null), [f = !1, c] = Hn({
|
|
1485
1487
|
prop: o,
|
|
1486
1488
|
defaultProp: s,
|
|
1487
1489
|
onChange: i
|
|
1488
1490
|
});
|
|
1489
1491
|
return /* @__PURE__ */ a.jsx(
|
|
1490
|
-
|
|
1492
|
+
Ai,
|
|
1491
1493
|
{
|
|
1492
1494
|
scope: t,
|
|
1493
|
-
triggerId:
|
|
1495
|
+
triggerId: gt(),
|
|
1494
1496
|
triggerRef: m,
|
|
1495
|
-
contentId:
|
|
1497
|
+
contentId: gt(),
|
|
1496
1498
|
open: f,
|
|
1497
1499
|
onOpenChange: c,
|
|
1498
1500
|
onOpenToggle: h.useCallback(() => c((d) => !d), [c]),
|
|
1499
1501
|
modal: l,
|
|
1500
|
-
children: /* @__PURE__ */ a.jsx(
|
|
1502
|
+
children: /* @__PURE__ */ a.jsx(wi, { ...u, open: f, onOpenChange: c, dir: r, modal: l, children: n })
|
|
1501
1503
|
}
|
|
1502
1504
|
);
|
|
1503
1505
|
};
|
|
1504
|
-
|
|
1505
|
-
var
|
|
1506
|
+
Nr.displayName = Zt;
|
|
1507
|
+
var Tr = "DropdownMenuTrigger", _r = h.forwardRef(
|
|
1506
1508
|
(e, t) => {
|
|
1507
|
-
const { __scopeDropdownMenu: n, disabled: r = !1, ...o } = e, s =
|
|
1508
|
-
return /* @__PURE__ */ a.jsx(
|
|
1509
|
+
const { __scopeDropdownMenu: n, disabled: r = !1, ...o } = e, s = jr(Tr, n), i = Z(n);
|
|
1510
|
+
return /* @__PURE__ */ a.jsx(yi, { asChild: !0, ...i, children: /* @__PURE__ */ a.jsx(
|
|
1509
1511
|
qe.button,
|
|
1510
1512
|
{
|
|
1511
1513
|
type: "button",
|
|
@@ -1518,38 +1520,38 @@ var Nr = "DropdownMenuTrigger", Tr = h.forwardRef(
|
|
|
1518
1520
|
disabled: r,
|
|
1519
1521
|
...o,
|
|
1520
1522
|
ref: Ln(t, s.triggerRef),
|
|
1521
|
-
onPointerDown:
|
|
1523
|
+
onPointerDown: I(e.onPointerDown, (l) => {
|
|
1522
1524
|
!r && l.button === 0 && l.ctrlKey === !1 && (s.onOpenToggle(), s.open || l.preventDefault());
|
|
1523
1525
|
}),
|
|
1524
|
-
onKeyDown:
|
|
1526
|
+
onKeyDown: I(e.onKeyDown, (l) => {
|
|
1525
1527
|
r || (["Enter", " "].includes(l.key) && s.onOpenToggle(), l.key === "ArrowDown" && s.onOpenChange(!0), ["Enter", " ", "ArrowDown"].includes(l.key) && l.preventDefault());
|
|
1526
1528
|
})
|
|
1527
1529
|
}
|
|
1528
1530
|
) });
|
|
1529
1531
|
}
|
|
1530
1532
|
);
|
|
1531
|
-
|
|
1532
|
-
var
|
|
1533
|
-
const { __scopeDropdownMenu: t, ...n } = e, r =
|
|
1534
|
-
return /* @__PURE__ */ a.jsx(
|
|
1533
|
+
_r.displayName = Tr;
|
|
1534
|
+
var ki = "DropdownMenuPortal", Or = (e) => {
|
|
1535
|
+
const { __scopeDropdownMenu: t, ...n } = e, r = Z(t);
|
|
1536
|
+
return /* @__PURE__ */ a.jsx(xi, { ...r, ...n });
|
|
1535
1537
|
};
|
|
1536
|
-
|
|
1537
|
-
var
|
|
1538
|
+
Or.displayName = ki;
|
|
1539
|
+
var Ir = "DropdownMenuContent", Ar = h.forwardRef(
|
|
1538
1540
|
(e, t) => {
|
|
1539
|
-
const { __scopeDropdownMenu: n, ...r } = e, o =
|
|
1541
|
+
const { __scopeDropdownMenu: n, ...r } = e, o = jr(Ir, n), s = Z(n), i = h.useRef(!1);
|
|
1540
1542
|
return /* @__PURE__ */ a.jsx(
|
|
1541
|
-
|
|
1543
|
+
bi,
|
|
1542
1544
|
{
|
|
1543
1545
|
id: o.contentId,
|
|
1544
1546
|
"aria-labelledby": o.triggerId,
|
|
1545
1547
|
...s,
|
|
1546
1548
|
...r,
|
|
1547
1549
|
ref: t,
|
|
1548
|
-
onCloseAutoFocus:
|
|
1550
|
+
onCloseAutoFocus: I(e.onCloseAutoFocus, (l) => {
|
|
1549
1551
|
var u;
|
|
1550
1552
|
i.current || (u = o.triggerRef.current) == null || u.focus(), i.current = !1, l.preventDefault();
|
|
1551
1553
|
}),
|
|
1552
|
-
onInteractOutside:
|
|
1554
|
+
onInteractOutside: I(e.onInteractOutside, (l) => {
|
|
1553
1555
|
const u = l.detail.originalEvent, m = u.button === 0 && u.ctrlKey === !0, f = u.button === 2 || m;
|
|
1554
1556
|
(!o.modal || f) && (i.current = !0);
|
|
1555
1557
|
}),
|
|
@@ -1565,76 +1567,76 @@ var Or = "DropdownMenuContent", Ir = h.forwardRef(
|
|
|
1565
1567
|
);
|
|
1566
1568
|
}
|
|
1567
1569
|
);
|
|
1568
|
-
|
|
1569
|
-
var
|
|
1570
|
+
Ar.displayName = Ir;
|
|
1571
|
+
var $i = "DropdownMenuGroup", Fi = h.forwardRef(
|
|
1570
1572
|
(e, t) => {
|
|
1571
|
-
const { __scopeDropdownMenu: n, ...r } = e, o =
|
|
1572
|
-
return /* @__PURE__ */ a.jsx(
|
|
1573
|
+
const { __scopeDropdownMenu: n, ...r } = e, o = Z(n);
|
|
1574
|
+
return /* @__PURE__ */ a.jsx(Si, { ...o, ...r, ref: t });
|
|
1573
1575
|
}
|
|
1574
1576
|
);
|
|
1575
|
-
|
|
1576
|
-
var
|
|
1577
|
+
Fi.displayName = $i;
|
|
1578
|
+
var Li = "DropdownMenuLabel", kr = h.forwardRef(
|
|
1577
1579
|
(e, t) => {
|
|
1578
|
-
const { __scopeDropdownMenu: n, ...r } = e, o =
|
|
1579
|
-
return /* @__PURE__ */ a.jsx(
|
|
1580
|
+
const { __scopeDropdownMenu: n, ...r } = e, o = Z(n);
|
|
1581
|
+
return /* @__PURE__ */ a.jsx(Ci, { ...o, ...r, ref: t });
|
|
1580
1582
|
}
|
|
1581
1583
|
);
|
|
1582
|
-
|
|
1583
|
-
var
|
|
1584
|
+
kr.displayName = Li;
|
|
1585
|
+
var Bi = "DropdownMenuItem", $r = h.forwardRef(
|
|
1584
1586
|
(e, t) => {
|
|
1585
|
-
const { __scopeDropdownMenu: n, ...r } = e, o =
|
|
1586
|
-
return /* @__PURE__ */ a.jsx(
|
|
1587
|
+
const { __scopeDropdownMenu: n, ...r } = e, o = Z(n);
|
|
1588
|
+
return /* @__PURE__ */ a.jsx(Mi, { ...o, ...r, ref: t });
|
|
1587
1589
|
}
|
|
1588
1590
|
);
|
|
1589
|
-
|
|
1590
|
-
var
|
|
1591
|
-
const { __scopeDropdownMenu: n, ...r } = e, o =
|
|
1592
|
-
return /* @__PURE__ */ a.jsx(
|
|
1591
|
+
$r.displayName = Bi;
|
|
1592
|
+
var Hi = "DropdownMenuCheckboxItem", Fr = h.forwardRef((e, t) => {
|
|
1593
|
+
const { __scopeDropdownMenu: n, ...r } = e, o = Z(n);
|
|
1594
|
+
return /* @__PURE__ */ a.jsx(Ri, { ...o, ...r, ref: t });
|
|
1593
1595
|
});
|
|
1594
|
-
|
|
1595
|
-
var
|
|
1596
|
-
const { __scopeDropdownMenu: n, ...r } = e, o =
|
|
1597
|
-
return /* @__PURE__ */ a.jsx(
|
|
1596
|
+
Fr.displayName = Hi;
|
|
1597
|
+
var Ui = "DropdownMenuRadioGroup", zi = h.forwardRef((e, t) => {
|
|
1598
|
+
const { __scopeDropdownMenu: n, ...r } = e, o = Z(n);
|
|
1599
|
+
return /* @__PURE__ */ a.jsx(Ei, { ...o, ...r, ref: t });
|
|
1598
1600
|
});
|
|
1599
|
-
|
|
1600
|
-
var
|
|
1601
|
-
const { __scopeDropdownMenu: n, ...r } = e, o =
|
|
1602
|
-
return /* @__PURE__ */ a.jsx(
|
|
1601
|
+
zi.displayName = Ui;
|
|
1602
|
+
var Ki = "DropdownMenuRadioItem", Lr = h.forwardRef((e, t) => {
|
|
1603
|
+
const { __scopeDropdownMenu: n, ...r } = e, o = Z(n);
|
|
1604
|
+
return /* @__PURE__ */ a.jsx(Di, { ...o, ...r, ref: t });
|
|
1603
1605
|
});
|
|
1604
|
-
|
|
1605
|
-
var
|
|
1606
|
-
const { __scopeDropdownMenu: n, ...r } = e, o =
|
|
1607
|
-
return /* @__PURE__ */ a.jsx(
|
|
1606
|
+
Lr.displayName = Ki;
|
|
1607
|
+
var qi = "DropdownMenuItemIndicator", Br = h.forwardRef((e, t) => {
|
|
1608
|
+
const { __scopeDropdownMenu: n, ...r } = e, o = Z(n);
|
|
1609
|
+
return /* @__PURE__ */ a.jsx(Pi, { ...o, ...r, ref: t });
|
|
1608
1610
|
});
|
|
1609
|
-
|
|
1610
|
-
var
|
|
1611
|
-
const { __scopeDropdownMenu: n, ...r } = e, o =
|
|
1612
|
-
return /* @__PURE__ */ a.jsx(
|
|
1611
|
+
Br.displayName = qi;
|
|
1612
|
+
var Qi = "DropdownMenuSeparator", Hr = h.forwardRef((e, t) => {
|
|
1613
|
+
const { __scopeDropdownMenu: n, ...r } = e, o = Z(n);
|
|
1614
|
+
return /* @__PURE__ */ a.jsx(ji, { ...o, ...r, ref: t });
|
|
1613
1615
|
});
|
|
1614
|
-
|
|
1615
|
-
var
|
|
1616
|
+
Hr.displayName = Qi;
|
|
1617
|
+
var Vi = "DropdownMenuArrow", Gi = h.forwardRef(
|
|
1616
1618
|
(e, t) => {
|
|
1617
|
-
const { __scopeDropdownMenu: n, ...r } = e, o =
|
|
1618
|
-
return /* @__PURE__ */ a.jsx(
|
|
1619
|
+
const { __scopeDropdownMenu: n, ...r } = e, o = Z(n);
|
|
1620
|
+
return /* @__PURE__ */ a.jsx(Ni, { ...o, ...r, ref: t });
|
|
1619
1621
|
}
|
|
1620
1622
|
);
|
|
1621
|
-
|
|
1622
|
-
var
|
|
1623
|
-
const { __scopeDropdownMenu: t, children: n, open: r, onOpenChange: o, defaultOpen: s } = e, i =
|
|
1623
|
+
Gi.displayName = Vi;
|
|
1624
|
+
var Wi = (e) => {
|
|
1625
|
+
const { __scopeDropdownMenu: t, children: n, open: r, onOpenChange: o, defaultOpen: s } = e, i = Z(t), [l = !1, u] = Hn({
|
|
1624
1626
|
prop: r,
|
|
1625
1627
|
defaultProp: s,
|
|
1626
1628
|
onChange: o
|
|
1627
1629
|
});
|
|
1628
|
-
return /* @__PURE__ */ a.jsx(
|
|
1629
|
-
},
|
|
1630
|
-
const { __scopeDropdownMenu: n, ...r } = e, o =
|
|
1631
|
-
return /* @__PURE__ */ a.jsx(
|
|
1630
|
+
return /* @__PURE__ */ a.jsx(Ti, { ...i, open: l, onOpenChange: u, children: n });
|
|
1631
|
+
}, Yi = "DropdownMenuSubTrigger", Ur = h.forwardRef((e, t) => {
|
|
1632
|
+
const { __scopeDropdownMenu: n, ...r } = e, o = Z(n);
|
|
1633
|
+
return /* @__PURE__ */ a.jsx(_i, { ...o, ...r, ref: t });
|
|
1632
1634
|
});
|
|
1633
|
-
|
|
1634
|
-
var
|
|
1635
|
-
const { __scopeDropdownMenu: n, ...r } = e, o =
|
|
1635
|
+
Ur.displayName = Yi;
|
|
1636
|
+
var Xi = "DropdownMenuSubContent", zr = h.forwardRef((e, t) => {
|
|
1637
|
+
const { __scopeDropdownMenu: n, ...r } = e, o = Z(n);
|
|
1636
1638
|
return /* @__PURE__ */ a.jsx(
|
|
1637
|
-
|
|
1639
|
+
Oi,
|
|
1638
1640
|
{
|
|
1639
1641
|
...o,
|
|
1640
1642
|
...r,
|
|
@@ -1650,13 +1652,13 @@ var Vi = "DropdownMenuSubContent", Ur = h.forwardRef((e, t) => {
|
|
|
1650
1652
|
}
|
|
1651
1653
|
);
|
|
1652
1654
|
});
|
|
1653
|
-
|
|
1654
|
-
var
|
|
1655
|
-
const
|
|
1656
|
-
|
|
1655
|
+
zr.displayName = Xi;
|
|
1656
|
+
var Zi = Nr, Ji = _r, Kr = Or, qr = Ar, Qr = kr, Vr = $r, Gr = Fr, Wr = Lr, Yr = Br, Xr = Hr, el = Wi, Zr = Ur, Jr = zr;
|
|
1657
|
+
const tl = Zi, nl = Ji, rl = Kr, al = el, ea = h.forwardRef(({ className: e, inset: t, children: n, ...r }, o) => /* @__PURE__ */ a.jsxs(
|
|
1658
|
+
Zr,
|
|
1657
1659
|
{
|
|
1658
1660
|
ref: o,
|
|
1659
|
-
className:
|
|
1661
|
+
className: F(
|
|
1660
1662
|
"flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent",
|
|
1661
1663
|
t && "pl-8",
|
|
1662
1664
|
e
|
|
@@ -1664,29 +1666,29 @@ const Xi = Gi, Ji = Wi, Zi = zr, el = Yi, Zr = h.forwardRef(({ className: e, ins
|
|
|
1664
1666
|
...r,
|
|
1665
1667
|
children: [
|
|
1666
1668
|
n,
|
|
1667
|
-
/* @__PURE__ */ a.jsx(
|
|
1669
|
+
/* @__PURE__ */ a.jsx(Zn, { className: "ml-auto h-4 w-4" })
|
|
1668
1670
|
]
|
|
1669
1671
|
}
|
|
1670
1672
|
));
|
|
1671
|
-
|
|
1672
|
-
const
|
|
1673
|
+
ea.displayName = Zr.displayName;
|
|
1674
|
+
const ta = h.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ a.jsx(
|
|
1673
1675
|
Jr,
|
|
1674
1676
|
{
|
|
1675
1677
|
ref: n,
|
|
1676
|
-
className:
|
|
1678
|
+
className: F(
|
|
1677
1679
|
"z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
|
|
1678
1680
|
e
|
|
1679
1681
|
),
|
|
1680
1682
|
...t
|
|
1681
1683
|
}
|
|
1682
1684
|
));
|
|
1683
|
-
|
|
1684
|
-
const
|
|
1685
|
-
|
|
1685
|
+
ta.displayName = Jr.displayName;
|
|
1686
|
+
const na = h.forwardRef(({ className: e, sideOffset: t = 4, ...n }, r) => /* @__PURE__ */ a.jsx(Kr, { children: /* @__PURE__ */ a.jsx(
|
|
1687
|
+
qr,
|
|
1686
1688
|
{
|
|
1687
1689
|
ref: r,
|
|
1688
1690
|
sideOffset: t,
|
|
1689
|
-
className:
|
|
1691
|
+
className: F(
|
|
1690
1692
|
"z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md",
|
|
1691
1693
|
"data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
|
|
1692
1694
|
e
|
|
@@ -1694,12 +1696,12 @@ const ta = h.forwardRef(({ className: e, sideOffset: t = 4, ...n }, r) => /* @__
|
|
|
1694
1696
|
...n
|
|
1695
1697
|
}
|
|
1696
1698
|
) }));
|
|
1697
|
-
|
|
1698
|
-
const
|
|
1699
|
-
|
|
1699
|
+
na.displayName = qr.displayName;
|
|
1700
|
+
const ra = h.forwardRef(({ className: e, inset: t, ...n }, r) => /* @__PURE__ */ a.jsx(
|
|
1701
|
+
Vr,
|
|
1700
1702
|
{
|
|
1701
1703
|
ref: r,
|
|
1702
|
-
className:
|
|
1704
|
+
className: F(
|
|
1703
1705
|
"relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
|
|
1704
1706
|
t && "pl-8",
|
|
1705
1707
|
e
|
|
@@ -1707,45 +1709,45 @@ const na = h.forwardRef(({ className: e, inset: t, ...n }, r) => /* @__PURE__ */
|
|
|
1707
1709
|
...n
|
|
1708
1710
|
}
|
|
1709
1711
|
));
|
|
1710
|
-
|
|
1711
|
-
const
|
|
1712
|
-
|
|
1712
|
+
ra.displayName = Vr.displayName;
|
|
1713
|
+
const ol = h.forwardRef(({ className: e, children: t, checked: n, ...r }, o) => /* @__PURE__ */ a.jsxs(
|
|
1714
|
+
Gr,
|
|
1713
1715
|
{
|
|
1714
1716
|
ref: o,
|
|
1715
|
-
className:
|
|
1717
|
+
className: F(
|
|
1716
1718
|
"relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
|
|
1717
1719
|
e
|
|
1718
1720
|
),
|
|
1719
1721
|
checked: n,
|
|
1720
1722
|
...r,
|
|
1721
1723
|
children: [
|
|
1722
|
-
/* @__PURE__ */ a.jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ a.jsx(
|
|
1724
|
+
/* @__PURE__ */ a.jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ a.jsx(Yr, { children: /* @__PURE__ */ a.jsx(qo, { className: "h-4 w-4" }) }) }),
|
|
1723
1725
|
t
|
|
1724
1726
|
]
|
|
1725
1727
|
}
|
|
1726
1728
|
));
|
|
1727
|
-
|
|
1728
|
-
const
|
|
1729
|
-
|
|
1729
|
+
ol.displayName = Gr.displayName;
|
|
1730
|
+
const sl = h.forwardRef(({ className: e, children: t, ...n }, r) => /* @__PURE__ */ a.jsxs(
|
|
1731
|
+
Wr,
|
|
1730
1732
|
{
|
|
1731
1733
|
ref: r,
|
|
1732
|
-
className:
|
|
1734
|
+
className: F(
|
|
1733
1735
|
"relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
|
|
1734
1736
|
e
|
|
1735
1737
|
),
|
|
1736
1738
|
...n,
|
|
1737
1739
|
children: [
|
|
1738
|
-
/* @__PURE__ */ a.jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ a.jsx(
|
|
1740
|
+
/* @__PURE__ */ a.jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ a.jsx(Yr, { children: /* @__PURE__ */ a.jsx(Qo, { className: "h-4 w-4 fill-current" }) }) }),
|
|
1739
1741
|
t
|
|
1740
1742
|
]
|
|
1741
1743
|
}
|
|
1742
1744
|
));
|
|
1743
|
-
|
|
1744
|
-
const
|
|
1745
|
-
|
|
1745
|
+
sl.displayName = Wr.displayName;
|
|
1746
|
+
const aa = h.forwardRef(({ className: e, inset: t, ...n }, r) => /* @__PURE__ */ a.jsx(
|
|
1747
|
+
Qr,
|
|
1746
1748
|
{
|
|
1747
1749
|
ref: r,
|
|
1748
|
-
className:
|
|
1750
|
+
className: F(
|
|
1749
1751
|
"px-2 py-1.5 text-sm font-semibold",
|
|
1750
1752
|
t && "pl-8",
|
|
1751
1753
|
e
|
|
@@ -1753,23 +1755,23 @@ const ra = h.forwardRef(({ className: e, inset: t, ...n }, r) => /* @__PURE__ */
|
|
|
1753
1755
|
...n
|
|
1754
1756
|
}
|
|
1755
1757
|
));
|
|
1756
|
-
|
|
1757
|
-
const
|
|
1758
|
-
|
|
1758
|
+
aa.displayName = Qr.displayName;
|
|
1759
|
+
const oa = h.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ a.jsx(
|
|
1760
|
+
Xr,
|
|
1759
1761
|
{
|
|
1760
1762
|
ref: n,
|
|
1761
|
-
className:
|
|
1763
|
+
className: F("-mx-1 my-1 h-px bg-muted", e),
|
|
1762
1764
|
...t
|
|
1763
1765
|
}
|
|
1764
1766
|
));
|
|
1765
|
-
|
|
1767
|
+
oa.displayName = Xr.displayName;
|
|
1766
1768
|
const En = {
|
|
1767
1769
|
info: "bg-blue-500",
|
|
1768
1770
|
note: "bg-gray-500",
|
|
1769
1771
|
tip: "bg-green-600",
|
|
1770
1772
|
caution: "bg-orange-500",
|
|
1771
1773
|
danger: "bg-rose-500"
|
|
1772
|
-
},
|
|
1774
|
+
}, il = () => {
|
|
1773
1775
|
const { page: e } = Ae(), [t, n] = Ie(!0);
|
|
1774
1776
|
if (!(e != null && e.banner) || !t)
|
|
1775
1777
|
return /* @__PURE__ */ a.jsx("style", { children: ":root { --banner-height: 0px; }" });
|
|
@@ -1777,7 +1779,7 @@ const En = {
|
|
|
1777
1779
|
return /* @__PURE__ */ a.jsxs(
|
|
1778
1780
|
"div",
|
|
1779
1781
|
{
|
|
1780
|
-
className:
|
|
1782
|
+
className: F(
|
|
1781
1783
|
"relative text-primary-foreground text-sm font-medium px-4 py-2 flex gap-2 items-center",
|
|
1782
1784
|
r
|
|
1783
1785
|
),
|
|
@@ -1790,19 +1792,19 @@ const En = {
|
|
|
1790
1792
|
type: "button",
|
|
1791
1793
|
className: "md:absolute md:right-4 -m-1.5 p-1.5 hover:bg-accent-foreground/10 rounded-md",
|
|
1792
1794
|
onClick: () => n(!1),
|
|
1793
|
-
children: /* @__PURE__ */ a.jsx(
|
|
1795
|
+
children: /* @__PURE__ */ a.jsx(Vo, { size: 16 })
|
|
1794
1796
|
}
|
|
1795
1797
|
)
|
|
1796
1798
|
]
|
|
1797
1799
|
}
|
|
1798
1800
|
);
|
|
1799
1801
|
};
|
|
1800
|
-
function
|
|
1802
|
+
function ll(e) {
|
|
1801
1803
|
if (typeof document > "u") return;
|
|
1802
1804
|
let t = document.head || document.getElementsByTagName("head")[0], n = document.createElement("style");
|
|
1803
1805
|
n.type = "text/css", t.appendChild(n), n.styleSheet ? n.styleSheet.cssText = e : n.appendChild(document.createTextNode(e));
|
|
1804
1806
|
}
|
|
1805
|
-
const
|
|
1807
|
+
const sa = p.createContext({
|
|
1806
1808
|
drawerRef: {
|
|
1807
1809
|
current: null
|
|
1808
1810
|
},
|
|
@@ -1850,39 +1852,39 @@ const oa = p.createContext({
|
|
|
1850
1852
|
container: null,
|
|
1851
1853
|
autoFocus: !1
|
|
1852
1854
|
}), Qe = () => {
|
|
1853
|
-
const e = p.useContext(
|
|
1855
|
+
const e = p.useContext(sa);
|
|
1854
1856
|
if (!e)
|
|
1855
1857
|
throw new Error("useDrawerContext must be used within a Drawer.Root");
|
|
1856
1858
|
return e;
|
|
1857
1859
|
};
|
|
1858
|
-
|
|
1860
|
+
ll(`[data-vaul-drawer]{touch-action:none;will-change:transform;transition:transform .5s cubic-bezier(.32, .72, 0, 1);animation-duration:.5s;animation-timing-function:cubic-bezier(0.32,0.72,0,1)}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=bottom][data-state=open]{animation-name:slideFromBottom}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=bottom][data-state=closed]{animation-name:slideToBottom}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=top][data-state=open]{animation-name:slideFromTop}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=top][data-state=closed]{animation-name:slideToTop}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=left][data-state=open]{animation-name:slideFromLeft}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=left][data-state=closed]{animation-name:slideToLeft}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=right][data-state=open]{animation-name:slideFromRight}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=right][data-state=closed]{animation-name:slideToRight}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=bottom]{transform:translate3d(0,var(--initial-transform,100%),0)}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=top]{transform:translate3d(0,calc(var(--initial-transform,100%) * -1),0)}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=left]{transform:translate3d(calc(var(--initial-transform,100%) * -1),0,0)}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=right]{transform:translate3d(var(--initial-transform,100%),0,0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=top]{transform:translate3d(0,var(--snap-point-height,0),0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=bottom]{transform:translate3d(0,var(--snap-point-height,0),0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=left]{transform:translate3d(var(--snap-point-height,0),0,0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=right]{transform:translate3d(var(--snap-point-height,0),0,0)}[data-vaul-overlay][data-vaul-snap-points=false]{animation-duration:.5s;animation-timing-function:cubic-bezier(0.32,0.72,0,1)}[data-vaul-overlay][data-vaul-snap-points=false][data-state=open]{animation-name:fadeIn}[data-vaul-overlay][data-state=closed]{animation-name:fadeOut}[data-vaul-animate=false]{animation:none!important}[data-vaul-overlay][data-vaul-snap-points=true]{opacity:0;transition:opacity .5s cubic-bezier(.32, .72, 0, 1)}[data-vaul-overlay][data-vaul-snap-points=true]{opacity:1}[data-vaul-drawer]:not([data-vaul-custom-container=true])::after{content:'';position:absolute;background:inherit;background-color:inherit}[data-vaul-drawer][data-vaul-drawer-direction=top]::after{top:initial;bottom:100%;left:0;right:0;height:200%}[data-vaul-drawer][data-vaul-drawer-direction=bottom]::after{top:100%;bottom:initial;left:0;right:0;height:200%}[data-vaul-drawer][data-vaul-drawer-direction=left]::after{left:initial;right:100%;top:0;bottom:0;width:200%}[data-vaul-drawer][data-vaul-drawer-direction=right]::after{left:100%;right:initial;top:0;bottom:0;width:200%}[data-vaul-overlay][data-vaul-snap-points=true]:not([data-vaul-snap-points-overlay=true]):not(
|
|
1859
1861
|
[data-state=closed]
|
|
1860
1862
|
){opacity:0}[data-vaul-overlay][data-vaul-snap-points-overlay=true]{opacity:1}[data-vaul-handle]{display:block;position:relative;opacity:.7;background:#e2e2e4;margin-left:auto;margin-right:auto;height:5px;width:32px;border-radius:1rem;touch-action:pan-y}[data-vaul-handle]:active,[data-vaul-handle]:hover{opacity:1}[data-vaul-handle-hitarea]{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);width:max(100%,2.75rem);height:max(100%,2.75rem);touch-action:inherit}@media (hover:hover) and (pointer:fine){[data-vaul-drawer]{user-select:none}}@media (pointer:fine){[data-vaul-handle-hitarea]:{width:100%;height:100%}}@keyframes fadeIn{from{opacity:0}to{opacity:1}}@keyframes fadeOut{to{opacity:0}}@keyframes slideFromBottom{from{transform:translate3d(0,var(--initial-transform,100%),0)}to{transform:translate3d(0,0,0)}}@keyframes slideToBottom{to{transform:translate3d(0,var(--initial-transform,100%),0)}}@keyframes slideFromTop{from{transform:translate3d(0,calc(var(--initial-transform,100%) * -1),0)}to{transform:translate3d(0,0,0)}}@keyframes slideToTop{to{transform:translate3d(0,calc(var(--initial-transform,100%) * -1),0)}}@keyframes slideFromLeft{from{transform:translate3d(calc(var(--initial-transform,100%) * -1),0,0)}to{transform:translate3d(0,0,0)}}@keyframes slideToLeft{to{transform:translate3d(calc(var(--initial-transform,100%) * -1),0,0)}}@keyframes slideFromRight{from{transform:translate3d(var(--initial-transform,100%),0,0)}to{transform:translate3d(0,0,0)}}@keyframes slideToRight{to{transform:translate3d(var(--initial-transform,100%),0,0)}}`);
|
|
1861
|
-
function
|
|
1863
|
+
function cl() {
|
|
1862
1864
|
const e = navigator.userAgent;
|
|
1863
1865
|
return typeof window < "u" && (/Firefox/.test(e) && /Mobile/.test(e) || // Android Firefox
|
|
1864
1866
|
/FxiOS/.test(e));
|
|
1865
1867
|
}
|
|
1866
|
-
function
|
|
1867
|
-
return
|
|
1868
|
+
function ul() {
|
|
1869
|
+
return Jt(/^Mac/);
|
|
1868
1870
|
}
|
|
1869
|
-
function
|
|
1870
|
-
return
|
|
1871
|
+
function dl() {
|
|
1872
|
+
return Jt(/^iPhone/);
|
|
1871
1873
|
}
|
|
1872
1874
|
function Dn() {
|
|
1873
1875
|
return /^((?!chrome|android).)*safari/i.test(navigator.userAgent);
|
|
1874
1876
|
}
|
|
1875
|
-
function
|
|
1876
|
-
return
|
|
1877
|
-
|
|
1877
|
+
function fl() {
|
|
1878
|
+
return Jt(/^iPad/) || // iPadOS 13 lies and says it's a Mac, but we can distinguish by detecting touch support.
|
|
1879
|
+
ul() && navigator.maxTouchPoints > 1;
|
|
1878
1880
|
}
|
|
1879
|
-
function
|
|
1880
|
-
return
|
|
1881
|
+
function ia() {
|
|
1882
|
+
return dl() || fl();
|
|
1881
1883
|
}
|
|
1882
|
-
function
|
|
1884
|
+
function Jt(e) {
|
|
1883
1885
|
return typeof window < "u" && window.navigator != null ? e.test(window.navigator.platform) : void 0;
|
|
1884
1886
|
}
|
|
1885
|
-
const
|
|
1887
|
+
const hl = 24, pl = typeof window < "u" ? Ro : Ce;
|
|
1886
1888
|
function Pn(...e) {
|
|
1887
1889
|
return (...t) => {
|
|
1888
1890
|
for (let n of e)
|
|
@@ -1894,12 +1896,12 @@ function jn(e) {
|
|
|
1894
1896
|
let t = window.getComputedStyle(e);
|
|
1895
1897
|
return /(auto|scroll)/.test(t.overflow + t.overflowX + t.overflowY);
|
|
1896
1898
|
}
|
|
1897
|
-
function
|
|
1899
|
+
function la(e) {
|
|
1898
1900
|
for (jn(e) && (e = e.parentElement); e && !jn(e); )
|
|
1899
1901
|
e = e.parentElement;
|
|
1900
1902
|
return e || document.scrollingElement || document.documentElement;
|
|
1901
1903
|
}
|
|
1902
|
-
const
|
|
1904
|
+
const ml = /* @__PURE__ */ new Set([
|
|
1903
1905
|
"checkbox",
|
|
1904
1906
|
"radio",
|
|
1905
1907
|
"range",
|
|
@@ -1911,27 +1913,27 @@ const dl = /* @__PURE__ */ new Set([
|
|
|
1911
1913
|
"reset"
|
|
1912
1914
|
]);
|
|
1913
1915
|
let ht = 0, Dt;
|
|
1914
|
-
function
|
|
1916
|
+
function gl(e = {}) {
|
|
1915
1917
|
let { isDisabled: t } = e;
|
|
1916
|
-
|
|
1918
|
+
pl(() => {
|
|
1917
1919
|
if (!t)
|
|
1918
|
-
return ht++, ht === 1 &&
|
|
1920
|
+
return ht++, ht === 1 && ia() && (Dt = vl()), () => {
|
|
1919
1921
|
ht--, ht === 0 && (Dt == null || Dt());
|
|
1920
1922
|
};
|
|
1921
1923
|
}, [
|
|
1922
1924
|
t
|
|
1923
1925
|
]);
|
|
1924
1926
|
}
|
|
1925
|
-
function
|
|
1927
|
+
function vl() {
|
|
1926
1928
|
let e, t = 0, n = (c) => {
|
|
1927
|
-
e =
|
|
1929
|
+
e = la(c.target), !(e === document.documentElement && e === document.body) && (t = c.changedTouches[0].pageY);
|
|
1928
1930
|
}, r = (c) => {
|
|
1929
1931
|
if (!e || e === document.documentElement || e === document.body) {
|
|
1930
1932
|
c.preventDefault();
|
|
1931
1933
|
return;
|
|
1932
1934
|
}
|
|
1933
|
-
let d = c.changedTouches[0].pageY, R = e.scrollTop,
|
|
1934
|
-
|
|
1935
|
+
let d = c.changedTouches[0].pageY, R = e.scrollTop, C = e.scrollHeight - e.clientHeight;
|
|
1936
|
+
C !== 0 && ((R <= 0 && d > t || R >= C && d < t) && c.preventDefault(), t = d);
|
|
1935
1937
|
}, o = (c) => {
|
|
1936
1938
|
let d = c.target;
|
|
1937
1939
|
Ot(d) && d !== document.activeElement && (c.preventDefault(), d.style.transform = "translateY(-2000px)", d.focus(), requestAnimationFrame(() => {
|
|
@@ -1948,7 +1950,7 @@ function hl() {
|
|
|
1948
1950
|
}));
|
|
1949
1951
|
}, i = () => {
|
|
1950
1952
|
window.scrollTo(0, 0);
|
|
1951
|
-
}, l = window.pageXOffset, u = window.pageYOffset, m = Pn(
|
|
1953
|
+
}, l = window.pageXOffset, u = window.pageYOffset, m = Pn(wl(document.documentElement, "paddingRight", `${window.innerWidth - document.documentElement.clientWidth}px`));
|
|
1952
1954
|
window.scrollTo(0, 0);
|
|
1953
1955
|
let f = Pn(We(document, "touchstart", n, {
|
|
1954
1956
|
passive: !1,
|
|
@@ -1964,7 +1966,7 @@ function hl() {
|
|
|
1964
1966
|
m(), f(), window.scrollTo(l, u);
|
|
1965
1967
|
};
|
|
1966
1968
|
}
|
|
1967
|
-
function
|
|
1969
|
+
function wl(e, t, n) {
|
|
1968
1970
|
let r = e.style[t];
|
|
1969
1971
|
return e.style[t] = n, () => {
|
|
1970
1972
|
e.style[t] = r;
|
|
@@ -1978,28 +1980,28 @@ function We(e, t, n, r) {
|
|
|
1978
1980
|
function Nn(e) {
|
|
1979
1981
|
let t = document.scrollingElement || document.documentElement;
|
|
1980
1982
|
for (; e && e !== t; ) {
|
|
1981
|
-
let n =
|
|
1983
|
+
let n = la(e);
|
|
1982
1984
|
if (n !== document.documentElement && n !== document.body && n !== e) {
|
|
1983
1985
|
let r = n.getBoundingClientRect().top, o = e.getBoundingClientRect().top, s = e.getBoundingClientRect().bottom;
|
|
1984
|
-
const i = n.getBoundingClientRect().bottom +
|
|
1986
|
+
const i = n.getBoundingClientRect().bottom + hl;
|
|
1985
1987
|
s > i && (n.scrollTop += o - r);
|
|
1986
1988
|
}
|
|
1987
1989
|
e = n.parentElement;
|
|
1988
1990
|
}
|
|
1989
1991
|
}
|
|
1990
1992
|
function Ot(e) {
|
|
1991
|
-
return e instanceof HTMLInputElement && !
|
|
1993
|
+
return e instanceof HTMLInputElement && !ml.has(e.type) || e instanceof HTMLTextAreaElement || e instanceof HTMLElement && e.isContentEditable;
|
|
1992
1994
|
}
|
|
1993
|
-
function
|
|
1995
|
+
function yl(e, t) {
|
|
1994
1996
|
typeof e == "function" ? e(t) : e != null && (e.current = t);
|
|
1995
1997
|
}
|
|
1996
|
-
function
|
|
1997
|
-
return (t) => e.forEach((n) =>
|
|
1998
|
+
function xl(...e) {
|
|
1999
|
+
return (t) => e.forEach((n) => yl(n, t));
|
|
1998
2000
|
}
|
|
1999
|
-
function
|
|
2000
|
-
return h.useCallback(
|
|
2001
|
+
function ca(...e) {
|
|
2002
|
+
return h.useCallback(xl(...e), e);
|
|
2001
2003
|
}
|
|
2002
|
-
const
|
|
2004
|
+
const ua = /* @__PURE__ */ new WeakMap();
|
|
2003
2005
|
function H(e, t, n = !1) {
|
|
2004
2006
|
if (!e || !(e instanceof HTMLElement)) return;
|
|
2005
2007
|
let r = {};
|
|
@@ -2009,11 +2011,11 @@ function H(e, t, n = !1) {
|
|
|
2009
2011
|
return;
|
|
2010
2012
|
}
|
|
2011
2013
|
r[o] = e.style[o], e.style[o] = s;
|
|
2012
|
-
}), !n &&
|
|
2014
|
+
}), !n && ua.set(e, r);
|
|
2013
2015
|
}
|
|
2014
|
-
function
|
|
2016
|
+
function bl(e, t) {
|
|
2015
2017
|
if (!e || !(e instanceof HTMLElement)) return;
|
|
2016
|
-
let n =
|
|
2018
|
+
let n = ua.get(e);
|
|
2017
2019
|
n && (e.style[t] = n[t]);
|
|
2018
2020
|
}
|
|
2019
2021
|
const U = (e) => {
|
|
@@ -2038,7 +2040,7 @@ function pt(e, t) {
|
|
|
2038
2040
|
let o = r.match(/^matrix3d\((.+)\)$/);
|
|
2039
2041
|
return o ? parseFloat(o[1].split(", ")[U(t) ? 13 : 12]) : (o = r.match(/^matrix\((.+)\)$/), o ? parseFloat(o[1].split(", ")[U(t) ? 5 : 4]) : null);
|
|
2040
2042
|
}
|
|
2041
|
-
function
|
|
2043
|
+
function Sl(e) {
|
|
2042
2044
|
return 8 * (Math.log(e + 1) - 2);
|
|
2043
2045
|
}
|
|
2044
2046
|
function Pt(e, t) {
|
|
@@ -2049,13 +2051,13 @@ function Pt(e, t) {
|
|
|
2049
2051
|
e.style.cssText = n;
|
|
2050
2052
|
};
|
|
2051
2053
|
}
|
|
2052
|
-
function
|
|
2054
|
+
function Cl(...e) {
|
|
2053
2055
|
return (...t) => {
|
|
2054
2056
|
for (const n of e)
|
|
2055
2057
|
typeof n == "function" && n(...t);
|
|
2056
2058
|
};
|
|
2057
2059
|
}
|
|
2058
|
-
const
|
|
2060
|
+
const k = {
|
|
2059
2061
|
DURATION: 0.5,
|
|
2060
2062
|
EASE: [
|
|
2061
2063
|
0.32,
|
|
@@ -2063,15 +2065,15 @@ const $ = {
|
|
|
2063
2065
|
0,
|
|
2064
2066
|
1
|
|
2065
2067
|
]
|
|
2066
|
-
},
|
|
2067
|
-
function
|
|
2068
|
+
}, da = 0.4, Ml = 0.25, Rl = 100, fa = 8, Oe = 16, It = 26, jt = "vaul-dragging";
|
|
2069
|
+
function ha(e) {
|
|
2068
2070
|
const t = p.useRef(e);
|
|
2069
2071
|
return p.useEffect(() => {
|
|
2070
2072
|
t.current = e;
|
|
2071
2073
|
}), p.useMemo(() => (...n) => t.current == null ? void 0 : t.current.call(t, ...n), []);
|
|
2072
2074
|
}
|
|
2073
|
-
function
|
|
2074
|
-
const n = p.useState(e), [r] = n, o = p.useRef(r), s =
|
|
2075
|
+
function El({ defaultProp: e, onChange: t }) {
|
|
2076
|
+
const n = p.useState(e), [r] = n, o = p.useRef(r), s = ha(t);
|
|
2075
2077
|
return p.useEffect(() => {
|
|
2076
2078
|
o.current !== r && (s(r), o.current = r);
|
|
2077
2079
|
}, [
|
|
@@ -2080,12 +2082,12 @@ function Sl({ defaultProp: e, onChange: t }) {
|
|
|
2080
2082
|
s
|
|
2081
2083
|
]), n;
|
|
2082
2084
|
}
|
|
2083
|
-
function
|
|
2085
|
+
function pa({ prop: e, defaultProp: t, onChange: n = () => {
|
|
2084
2086
|
} }) {
|
|
2085
|
-
const [r, o] =
|
|
2087
|
+
const [r, o] = El({
|
|
2086
2088
|
defaultProp: t,
|
|
2087
2089
|
onChange: n
|
|
2088
|
-
}), s = e !== void 0, i = s ? e : r, l =
|
|
2090
|
+
}), s = e !== void 0, i = s ? e : r, l = ha(n), u = p.useCallback((m) => {
|
|
2089
2091
|
if (s) {
|
|
2090
2092
|
const c = typeof m == "function" ? m(e) : m;
|
|
2091
2093
|
c !== e && l(c);
|
|
@@ -2102,8 +2104,8 @@ function ha({ prop: e, defaultProp: t, onChange: n = () => {
|
|
|
2102
2104
|
u
|
|
2103
2105
|
];
|
|
2104
2106
|
}
|
|
2105
|
-
function
|
|
2106
|
-
const [f, c] =
|
|
2107
|
+
function Dl({ activeSnapPointProp: e, setActiveSnapPointProp: t, snapPoints: n, drawerRef: r, overlayRef: o, fadeFromIndex: s, onSnapPointChange: i, direction: l = "bottom", container: u, snapToSequentialPoint: m }) {
|
|
2108
|
+
const [f, c] = pa({
|
|
2107
2109
|
prop: e,
|
|
2108
2110
|
defaultProp: n == null ? void 0 : n[0],
|
|
2109
2111
|
onChange: t
|
|
@@ -2112,25 +2114,25 @@ function Cl({ activeSnapPointProp: e, setActiveSnapPointProp: t, snapPoints: n,
|
|
|
2112
2114
|
innerHeight: window.innerHeight
|
|
2113
2115
|
} : void 0);
|
|
2114
2116
|
p.useEffect(() => {
|
|
2115
|
-
function
|
|
2117
|
+
function b() {
|
|
2116
2118
|
R({
|
|
2117
2119
|
innerWidth: window.innerWidth,
|
|
2118
2120
|
innerHeight: window.innerHeight
|
|
2119
2121
|
});
|
|
2120
2122
|
}
|
|
2121
|
-
return window.addEventListener("resize",
|
|
2123
|
+
return window.addEventListener("resize", b), () => window.removeEventListener("resize", b);
|
|
2122
2124
|
}, []);
|
|
2123
|
-
const
|
|
2125
|
+
const C = p.useMemo(() => f === (n == null ? void 0 : n[n.length - 1]) || null, [
|
|
2124
2126
|
n,
|
|
2125
2127
|
f
|
|
2126
|
-
]),
|
|
2127
|
-
var
|
|
2128
|
-
return (
|
|
2128
|
+
]), g = p.useMemo(() => {
|
|
2129
|
+
var b;
|
|
2130
|
+
return (b = n == null ? void 0 : n.findIndex((j) => j === f)) != null ? b : null;
|
|
2129
2131
|
}, [
|
|
2130
2132
|
n,
|
|
2131
2133
|
f
|
|
2132
|
-
]),
|
|
2133
|
-
const
|
|
2134
|
+
]), T = n && n.length > 0 && (s || s === 0) && !Number.isNaN(s) && n[s] === f || !n, M = p.useMemo(() => {
|
|
2135
|
+
const b = u ? {
|
|
2134
2136
|
width: u.getBoundingClientRect().width,
|
|
2135
2137
|
height: u.getBoundingClientRect().height
|
|
2136
2138
|
} : typeof window < "u" ? {
|
|
@@ -2145,111 +2147,111 @@ function Cl({ activeSnapPointProp: e, setActiveSnapPointProp: t, snapPoints: n,
|
|
|
2145
2147
|
const B = typeof D == "string";
|
|
2146
2148
|
let K = 0;
|
|
2147
2149
|
if (B && (K = parseInt(D, 10)), U(l)) {
|
|
2148
|
-
const
|
|
2149
|
-
return d ? l === "bottom" ?
|
|
2150
|
+
const y = B ? K : d ? D * b.height : 0;
|
|
2151
|
+
return d ? l === "bottom" ? b.height - y : -b.height + y : y;
|
|
2150
2152
|
}
|
|
2151
|
-
const W = B ? K : d ? D *
|
|
2152
|
-
return d ? l === "right" ?
|
|
2153
|
+
const W = B ? K : d ? D * b.width : 0;
|
|
2154
|
+
return d ? l === "right" ? b.width - W : -b.width + W : W;
|
|
2153
2155
|
})) != null ? j : [];
|
|
2154
2156
|
}, [
|
|
2155
2157
|
n,
|
|
2156
2158
|
d,
|
|
2157
2159
|
u
|
|
2158
|
-
]),
|
|
2159
|
-
|
|
2160
|
-
|
|
2161
|
-
]), P = p.useCallback((
|
|
2160
|
+
]), A = p.useMemo(() => g !== null ? M == null ? void 0 : M[g] : null, [
|
|
2161
|
+
M,
|
|
2162
|
+
g
|
|
2163
|
+
]), P = p.useCallback((b) => {
|
|
2162
2164
|
var j;
|
|
2163
|
-
const D = (j =
|
|
2165
|
+
const D = (j = M == null ? void 0 : M.findIndex((B) => B === b)) != null ? j : null;
|
|
2164
2166
|
i(D), H(r.current, {
|
|
2165
|
-
transition: `transform ${
|
|
2166
|
-
transform: U(l) ? `translate3d(0, ${
|
|
2167
|
-
}),
|
|
2168
|
-
transition: `opacity ${
|
|
2167
|
+
transition: `transform ${k.DURATION}s cubic-bezier(${k.EASE.join(",")})`,
|
|
2168
|
+
transform: U(l) ? `translate3d(0, ${b}px, 0)` : `translate3d(${b}px, 0, 0)`
|
|
2169
|
+
}), M && D !== M.length - 1 && s !== void 0 && D !== s && D < s ? H(o.current, {
|
|
2170
|
+
transition: `opacity ${k.DURATION}s cubic-bezier(${k.EASE.join(",")})`,
|
|
2169
2171
|
opacity: "0"
|
|
2170
2172
|
}) : H(o.current, {
|
|
2171
|
-
transition: `opacity ${
|
|
2173
|
+
transition: `opacity ${k.DURATION}s cubic-bezier(${k.EASE.join(",")})`,
|
|
2172
2174
|
opacity: "1"
|
|
2173
2175
|
}), c(n == null ? void 0 : n[Math.max(D, 0)]);
|
|
2174
2176
|
}, [
|
|
2175
2177
|
r.current,
|
|
2176
2178
|
n,
|
|
2177
|
-
|
|
2179
|
+
M,
|
|
2178
2180
|
s,
|
|
2179
2181
|
o,
|
|
2180
2182
|
c
|
|
2181
2183
|
]);
|
|
2182
2184
|
p.useEffect(() => {
|
|
2183
2185
|
if (f || e) {
|
|
2184
|
-
var
|
|
2185
|
-
const j = (
|
|
2186
|
-
|
|
2186
|
+
var b;
|
|
2187
|
+
const j = (b = n == null ? void 0 : n.findIndex((D) => D === e || D === f)) != null ? b : -1;
|
|
2188
|
+
M && j !== -1 && typeof M[j] == "number" && P(M[j]);
|
|
2187
2189
|
}
|
|
2188
2190
|
}, [
|
|
2189
2191
|
f,
|
|
2190
2192
|
e,
|
|
2191
2193
|
n,
|
|
2192
|
-
|
|
2194
|
+
M,
|
|
2193
2195
|
P
|
|
2194
2196
|
]);
|
|
2195
|
-
function
|
|
2197
|
+
function v({ draggedDistance: b, closeDrawer: j, velocity: D, dismissible: B }) {
|
|
2196
2198
|
if (s === void 0) return;
|
|
2197
|
-
const K = l === "bottom" || l === "right" ? (
|
|
2199
|
+
const K = l === "bottom" || l === "right" ? (A ?? 0) - b : (A ?? 0) + b, W = g === s - 1, y = g === 0, V = b > 0;
|
|
2198
2200
|
if (W && H(o.current, {
|
|
2199
|
-
transition: `opacity ${
|
|
2201
|
+
transition: `opacity ${k.DURATION}s cubic-bezier(${k.EASE.join(",")})`
|
|
2200
2202
|
}), !m && D > 2 && !V) {
|
|
2201
|
-
B ? j() : P(
|
|
2203
|
+
B ? j() : P(M[0]);
|
|
2202
2204
|
return;
|
|
2203
2205
|
}
|
|
2204
|
-
if (!m && D > 2 && V &&
|
|
2205
|
-
P(
|
|
2206
|
+
if (!m && D > 2 && V && M && n) {
|
|
2207
|
+
P(M[n.length - 1]);
|
|
2206
2208
|
return;
|
|
2207
2209
|
}
|
|
2208
|
-
const G =
|
|
2209
|
-
if (D >
|
|
2210
|
+
const G = M == null ? void 0 : M.reduce((q, Y) => typeof q != "number" || typeof Y != "number" ? q : Math.abs(Y - K) < Math.abs(q - K) ? Y : q), te = U(l) ? window.innerHeight : window.innerWidth;
|
|
2211
|
+
if (D > da && Math.abs(b) < te * 0.4) {
|
|
2210
2212
|
const q = V ? 1 : -1;
|
|
2211
|
-
if (q > 0 &&
|
|
2212
|
-
P(
|
|
2213
|
+
if (q > 0 && C && n) {
|
|
2214
|
+
P(M[n.length - 1]);
|
|
2213
2215
|
return;
|
|
2214
2216
|
}
|
|
2215
|
-
if (
|
|
2216
|
-
P(
|
|
2217
|
+
if (y && q < 0 && B && j(), g === null) return;
|
|
2218
|
+
P(M[g + q]);
|
|
2217
2219
|
return;
|
|
2218
2220
|
}
|
|
2219
2221
|
P(G);
|
|
2220
2222
|
}
|
|
2221
|
-
function z({ draggedDistance:
|
|
2222
|
-
if (
|
|
2223
|
-
const j = l === "bottom" || l === "right" ?
|
|
2224
|
-
(l === "bottom" || l === "right") && j <
|
|
2223
|
+
function z({ draggedDistance: b }) {
|
|
2224
|
+
if (A === null) return;
|
|
2225
|
+
const j = l === "bottom" || l === "right" ? A - b : A + b;
|
|
2226
|
+
(l === "bottom" || l === "right") && j < M[M.length - 1] || (l === "top" || l === "left") && j > M[M.length - 1] || H(r.current, {
|
|
2225
2227
|
transform: U(l) ? `translate3d(0, ${j}px, 0)` : `translate3d(${j}px, 0, 0)`
|
|
2226
2228
|
});
|
|
2227
2229
|
}
|
|
2228
|
-
function
|
|
2229
|
-
if (!n || typeof
|
|
2230
|
-
const D =
|
|
2231
|
-
if (
|
|
2230
|
+
function J(b, j) {
|
|
2231
|
+
if (!n || typeof g != "number" || !M || s === void 0) return null;
|
|
2232
|
+
const D = g === s - 1;
|
|
2233
|
+
if (g >= s && j)
|
|
2232
2234
|
return 0;
|
|
2233
2235
|
if (D && !j) return 1;
|
|
2234
|
-
if (!
|
|
2235
|
-
const K = D ?
|
|
2236
|
-
return D ? 1 -
|
|
2236
|
+
if (!T && !D) return null;
|
|
2237
|
+
const K = D ? g + 1 : g - 1, W = D ? M[K] - M[K - 1] : M[K + 1] - M[K], y = b / Math.abs(W);
|
|
2238
|
+
return D ? 1 - y : y;
|
|
2237
2239
|
}
|
|
2238
2240
|
return {
|
|
2239
|
-
isLastSnapPoint:
|
|
2241
|
+
isLastSnapPoint: C,
|
|
2240
2242
|
activeSnapPoint: f,
|
|
2241
|
-
shouldFade:
|
|
2242
|
-
getPercentageDragged:
|
|
2243
|
+
shouldFade: T,
|
|
2244
|
+
getPercentageDragged: J,
|
|
2243
2245
|
setActiveSnapPoint: c,
|
|
2244
|
-
activeSnapPointIndex:
|
|
2245
|
-
onRelease:
|
|
2246
|
+
activeSnapPointIndex: g,
|
|
2247
|
+
onRelease: v,
|
|
2246
2248
|
onDrag: z,
|
|
2247
|
-
snapPointsOffset:
|
|
2249
|
+
snapPointsOffset: M
|
|
2248
2250
|
};
|
|
2249
2251
|
}
|
|
2250
|
-
const
|
|
2252
|
+
const Pl = () => () => {
|
|
2251
2253
|
};
|
|
2252
|
-
function
|
|
2254
|
+
function jl() {
|
|
2253
2255
|
const { direction: e, isOpen: t, shouldScaleBackground: n, setBackgroundColorOnScale: r, noBodyStyles: o } = Qe(), s = p.useRef(null), i = mt(() => document.body.style.backgroundColor, []);
|
|
2254
2256
|
function l() {
|
|
2255
2257
|
return (window.innerWidth - It) / window.innerWidth;
|
|
@@ -2259,16 +2261,16 @@ function Rl() {
|
|
|
2259
2261
|
s.current && clearTimeout(s.current);
|
|
2260
2262
|
const u = document.querySelector("[data-vaul-drawer-wrapper]") || document.querySelector("[vaul-drawer-wrapper]");
|
|
2261
2263
|
if (!u) return;
|
|
2262
|
-
|
|
2264
|
+
Cl(r && !o ? Pt(document.body, {
|
|
2263
2265
|
background: "black"
|
|
2264
|
-
}) :
|
|
2266
|
+
}) : Pl, Pt(u, {
|
|
2265
2267
|
transformOrigin: U(e) ? "top" : "left",
|
|
2266
2268
|
transitionProperty: "transform, border-radius",
|
|
2267
|
-
transitionDuration: `${
|
|
2268
|
-
transitionTimingFunction: `cubic-bezier(${
|
|
2269
|
+
transitionDuration: `${k.DURATION}s`,
|
|
2270
|
+
transitionTimingFunction: `cubic-bezier(${k.EASE.join(",")})`
|
|
2269
2271
|
}));
|
|
2270
2272
|
const m = Pt(u, {
|
|
2271
|
-
borderRadius: `${
|
|
2273
|
+
borderRadius: `${fa}px`,
|
|
2272
2274
|
overflow: "hidden",
|
|
2273
2275
|
...U(e) ? {
|
|
2274
2276
|
transform: `scale(${l()}) translate3d(0, calc(env(safe-area-inset-top) + 14px), 0)`
|
|
@@ -2279,7 +2281,7 @@ function Rl() {
|
|
|
2279
2281
|
return () => {
|
|
2280
2282
|
m(), s.current = window.setTimeout(() => {
|
|
2281
2283
|
i ? document.body.style.background = i : document.body.style.removeProperty("background");
|
|
2282
|
-
},
|
|
2284
|
+
}, k.DURATION * 1e3);
|
|
2283
2285
|
};
|
|
2284
2286
|
}
|
|
2285
2287
|
}, [
|
|
@@ -2289,7 +2291,7 @@ function Rl() {
|
|
|
2289
2291
|
]);
|
|
2290
2292
|
}
|
|
2291
2293
|
let Ye = null;
|
|
2292
|
-
function
|
|
2294
|
+
function Nl({ isOpen: e, modal: t, nested: n, hasBeenOpened: r, preventScrollRestoration: o, noBodyStyles: s }) {
|
|
2293
2295
|
const [i, l] = p.useState(() => typeof window < "u" ? window.location.href : ""), u = p.useRef(0), m = p.useCallback(() => {
|
|
2294
2296
|
if (Dn() && Ye === null && e && !s) {
|
|
2295
2297
|
Ye = {
|
|
@@ -2357,39 +2359,39 @@ function El({ isOpen: e, modal: t, nested: n, hasBeenOpened: r, preventScrollRes
|
|
|
2357
2359
|
restorePositionSetting: f
|
|
2358
2360
|
};
|
|
2359
2361
|
}
|
|
2360
|
-
function
|
|
2361
|
-
var
|
|
2362
|
-
const [G = !1, te] =
|
|
2362
|
+
function ma({ open: e, onOpenChange: t, children: n, onDrag: r, onRelease: o, snapPoints: s, shouldScaleBackground: i = !1, setBackgroundColorOnScale: l = !0, closeThreshold: u = Ml, scrollLockTimeout: m = Rl, dismissible: f = !0, handleOnly: c = !1, fadeFromIndex: d = s && s.length - 1, activeSnapPoint: R, setActiveSnapPoint: C, fixed: g, modal: T = !0, onClose: M, nested: A, noBodyStyles: P = !1, direction: v = "bottom", defaultOpen: z = !1, disablePreventScroll: J = !0, snapToSequentialPoint: b = !1, preventScrollRestoration: j = !1, repositionInputs: D = !0, onAnimationEnd: B, container: K, autoFocus: W = !1 }) {
|
|
2363
|
+
var y, V;
|
|
2364
|
+
const [G = !1, te] = pa({
|
|
2363
2365
|
defaultProp: z,
|
|
2364
2366
|
prop: e,
|
|
2365
|
-
onChange: (
|
|
2366
|
-
t == null || t(
|
|
2367
|
-
B == null || B(
|
|
2368
|
-
},
|
|
2367
|
+
onChange: (S) => {
|
|
2368
|
+
t == null || t(S), !S && !A && Oa(), setTimeout(() => {
|
|
2369
|
+
B == null || B(S);
|
|
2370
|
+
}, k.DURATION * 1e3), S && !T && typeof window < "u" && window.requestAnimationFrame(() => {
|
|
2369
2371
|
document.body.style.pointerEvents = "auto";
|
|
2370
|
-
}),
|
|
2372
|
+
}), S || (document.body.style.pointerEvents = "auto");
|
|
2371
2373
|
}
|
|
2372
|
-
}), [q, Y] = p.useState(!1), [x, Q] = p.useState(!1), [ie, de] = p.useState(!1), pe = p.useRef(null), Me = p.useRef(null), $e = p.useRef(null),
|
|
2373
|
-
s &&
|
|
2374
|
-
}, []), { activeSnapPoint:
|
|
2374
|
+
}), [q, Y] = p.useState(!1), [x, Q] = p.useState(!1), [ie, de] = p.useState(!1), pe = p.useRef(null), Me = p.useRef(null), $e = p.useRef(null), xe = p.useRef(null), le = p.useRef(null), Re = p.useRef(!1), re = p.useRef(null), Fe = p.useRef(0), Le = p.useRef(!1), an = p.useRef(!z), on = p.useRef(0), E = p.useRef(null), sn = p.useRef(((y = E.current) == null ? void 0 : y.getBoundingClientRect().height) || 0), ln = p.useRef(((V = E.current) == null ? void 0 : V.getBoundingClientRect().width) || 0), Ct = p.useRef(0), Pa = p.useCallback((S) => {
|
|
2375
|
+
s && S === Ve.length - 1 && (Me.current = /* @__PURE__ */ new Date());
|
|
2376
|
+
}, []), { activeSnapPoint: ja, activeSnapPointIndex: Be, setActiveSnapPoint: cn, onRelease: Na, snapPointsOffset: Ve, onDrag: Ta, shouldFade: un, getPercentageDragged: _a } = Dl({
|
|
2375
2377
|
snapPoints: s,
|
|
2376
2378
|
activeSnapPointProp: R,
|
|
2377
|
-
setActiveSnapPointProp:
|
|
2379
|
+
setActiveSnapPointProp: C,
|
|
2378
2380
|
drawerRef: E,
|
|
2379
2381
|
fadeFromIndex: d,
|
|
2380
2382
|
overlayRef: pe,
|
|
2381
|
-
onSnapPointChange:
|
|
2382
|
-
direction:
|
|
2383
|
+
onSnapPointChange: Pa,
|
|
2384
|
+
direction: v,
|
|
2383
2385
|
container: K,
|
|
2384
|
-
snapToSequentialPoint:
|
|
2386
|
+
snapToSequentialPoint: b
|
|
2385
2387
|
});
|
|
2386
|
-
|
|
2387
|
-
isDisabled: !G || x || !
|
|
2388
|
+
gl({
|
|
2389
|
+
isDisabled: !G || x || !T || ie || !q || !D || !J
|
|
2388
2390
|
});
|
|
2389
|
-
const { restorePositionSetting:
|
|
2391
|
+
const { restorePositionSetting: Oa } = Nl({
|
|
2390
2392
|
isOpen: G,
|
|
2391
|
-
modal:
|
|
2392
|
-
nested:
|
|
2393
|
+
modal: T,
|
|
2394
|
+
nested: A ?? !1,
|
|
2393
2395
|
hasBeenOpened: q,
|
|
2394
2396
|
preventScrollRestoration: j,
|
|
2395
2397
|
noBodyStyles: P
|
|
@@ -2397,27 +2399,27 @@ function pa({ open: e, onOpenChange: t, children: n, onDrag: r, onRelease: o, sn
|
|
|
2397
2399
|
function lt() {
|
|
2398
2400
|
return (window.innerWidth - It) / window.innerWidth;
|
|
2399
2401
|
}
|
|
2400
|
-
function
|
|
2401
|
-
var
|
|
2402
|
-
!f && !s || E.current && !E.current.contains(
|
|
2402
|
+
function Ia(S) {
|
|
2403
|
+
var _, O;
|
|
2404
|
+
!f && !s || E.current && !E.current.contains(S.target) || (sn.current = ((_ = E.current) == null ? void 0 : _.getBoundingClientRect().height) || 0, ln.current = ((O = E.current) == null ? void 0 : O.getBoundingClientRect().width) || 0, Q(!0), $e.current = /* @__PURE__ */ new Date(), ia() && window.addEventListener("touchend", () => Re.current = !1, {
|
|
2403
2405
|
once: !0
|
|
2404
|
-
}),
|
|
2406
|
+
}), S.target.setPointerCapture(S.pointerId), Fe.current = U(v) ? S.pageY : S.pageX);
|
|
2405
2407
|
}
|
|
2406
|
-
function
|
|
2407
|
-
var
|
|
2408
|
-
let N =
|
|
2409
|
-
const L = (
|
|
2408
|
+
function dn(S, _) {
|
|
2409
|
+
var O;
|
|
2410
|
+
let N = S;
|
|
2411
|
+
const L = (O = window.getSelection()) == null ? void 0 : O.toString(), ne = E.current ? pt(E.current, v) : null, ee = /* @__PURE__ */ new Date();
|
|
2410
2412
|
if (N.tagName === "SELECT" || N.hasAttribute("data-vaul-no-drag") || N.closest("[data-vaul-no-drag]"))
|
|
2411
2413
|
return !1;
|
|
2412
|
-
if (
|
|
2414
|
+
if (v === "right" || v === "left")
|
|
2413
2415
|
return !0;
|
|
2414
2416
|
if (Me.current && ee.getTime() - Me.current.getTime() < 500)
|
|
2415
2417
|
return !1;
|
|
2416
|
-
if (ne !== null && (
|
|
2418
|
+
if (ne !== null && (v === "bottom" ? ne > 0 : ne < 0))
|
|
2417
2419
|
return !0;
|
|
2418
2420
|
if (L && L.length > 0)
|
|
2419
2421
|
return !1;
|
|
2420
|
-
if (le.current && ee.getTime() - le.current.getTime() < m && ne === 0 ||
|
|
2422
|
+
if (le.current && ee.getTime() - le.current.getTime() < m && ne === 0 || _)
|
|
2421
2423
|
return le.current = ee, !1;
|
|
2422
2424
|
for (; N; ) {
|
|
2423
2425
|
if (N.scrollHeight > N.clientHeight) {
|
|
@@ -2430,102 +2432,102 @@ function pa({ open: e, onOpenChange: t, children: n, onDrag: r, onRelease: o, sn
|
|
|
2430
2432
|
}
|
|
2431
2433
|
return !0;
|
|
2432
2434
|
}
|
|
2433
|
-
function
|
|
2435
|
+
function Aa(S) {
|
|
2434
2436
|
if (E.current && x) {
|
|
2435
|
-
const
|
|
2437
|
+
const _ = v === "bottom" || v === "right" ? 1 : -1, O = (Fe.current - (U(v) ? S.pageY : S.pageX)) * _, N = O > 0, L = s && !f && !N;
|
|
2436
2438
|
if (L && Be === 0) return;
|
|
2437
|
-
const ne = Math.abs(
|
|
2439
|
+
const ne = Math.abs(O), ee = document.querySelector("[data-vaul-drawer-wrapper]"), Ee = v === "bottom" || v === "top" ? sn.current : ln.current;
|
|
2438
2440
|
let fe = ne / Ee;
|
|
2439
|
-
const _e =
|
|
2440
|
-
if (_e !== null && (fe = _e), L && fe >= 1 || !Re.current && !
|
|
2441
|
+
const _e = _a(ne, N);
|
|
2442
|
+
if (_e !== null && (fe = _e), L && fe >= 1 || !Re.current && !dn(S.target, N)) return;
|
|
2441
2443
|
if (E.current.classList.add(jt), Re.current = !0, H(E.current, {
|
|
2442
2444
|
transition: "none"
|
|
2443
2445
|
}), H(pe.current, {
|
|
2444
2446
|
transition: "none"
|
|
2445
|
-
}), s &&
|
|
2446
|
-
draggedDistance:
|
|
2447
|
+
}), s && Ta({
|
|
2448
|
+
draggedDistance: O
|
|
2447
2449
|
}), N && !s) {
|
|
2448
|
-
const me =
|
|
2450
|
+
const me = Sl(O), ct = Math.min(me * -1, 0) * _;
|
|
2449
2451
|
H(E.current, {
|
|
2450
|
-
transform: U(
|
|
2452
|
+
transform: U(v) ? `translate3d(0, ${ct}px, 0)` : `translate3d(${ct}px, 0, 0)`
|
|
2451
2453
|
});
|
|
2452
2454
|
return;
|
|
2453
2455
|
}
|
|
2454
2456
|
const De = 1 - fe;
|
|
2455
|
-
if ((
|
|
2457
|
+
if ((un || d && Be === d - 1) && (r == null || r(S, fe), H(pe.current, {
|
|
2456
2458
|
opacity: `${De}`,
|
|
2457
2459
|
transition: "none"
|
|
2458
2460
|
}, !0)), ee && pe.current && i) {
|
|
2459
|
-
const me = Math.min(lt() + fe * (1 - lt()), 1), ct = 8 - fe * 8,
|
|
2461
|
+
const me = Math.min(lt() + fe * (1 - lt()), 1), ct = 8 - fe * 8, hn = Math.max(0, 14 - fe * 14);
|
|
2460
2462
|
H(ee, {
|
|
2461
2463
|
borderRadius: `${ct}px`,
|
|
2462
|
-
transform: U(
|
|
2464
|
+
transform: U(v) ? `scale(${me}) translate3d(0, ${hn}px, 0)` : `scale(${me}) translate3d(${hn}px, 0, 0)`,
|
|
2463
2465
|
transition: "none"
|
|
2464
2466
|
}, !0);
|
|
2465
2467
|
}
|
|
2466
2468
|
if (!s) {
|
|
2467
|
-
const me = ne *
|
|
2469
|
+
const me = ne * _;
|
|
2468
2470
|
H(E.current, {
|
|
2469
|
-
transform: U(
|
|
2471
|
+
transform: U(v) ? `translate3d(0, ${me}px, 0)` : `translate3d(${me}px, 0, 0)`
|
|
2470
2472
|
});
|
|
2471
2473
|
}
|
|
2472
2474
|
}
|
|
2473
2475
|
}
|
|
2474
2476
|
p.useEffect(() => {
|
|
2475
2477
|
window.requestAnimationFrame(() => {
|
|
2476
|
-
|
|
2478
|
+
an.current = !0;
|
|
2477
2479
|
});
|
|
2478
2480
|
}, []), p.useEffect(() => {
|
|
2479
|
-
var
|
|
2480
|
-
function
|
|
2481
|
+
var S;
|
|
2482
|
+
function _() {
|
|
2481
2483
|
if (!E.current || !D) return;
|
|
2482
|
-
const
|
|
2483
|
-
if (Ot(
|
|
2484
|
+
const O = document.activeElement;
|
|
2485
|
+
if (Ot(O) || Le.current) {
|
|
2484
2486
|
var N;
|
|
2485
2487
|
const L = ((N = window.visualViewport) == null ? void 0 : N.height) || 0, ne = window.innerHeight;
|
|
2486
2488
|
let ee = ne - L;
|
|
2487
2489
|
const Ee = E.current.getBoundingClientRect().height || 0, fe = Ee > ne * 0.8;
|
|
2488
2490
|
Ct.current || (Ct.current = Ee);
|
|
2489
2491
|
const _e = E.current.getBoundingClientRect().top;
|
|
2490
|
-
if (Math.abs(
|
|
2492
|
+
if (Math.abs(on.current - ee) > 60 && (Le.current = !Le.current), s && s.length > 0 && Ve && Be) {
|
|
2491
2493
|
const De = Ve[Be] || 0;
|
|
2492
2494
|
ee += De;
|
|
2493
2495
|
}
|
|
2494
|
-
if (
|
|
2496
|
+
if (on.current = ee, Ee > L || Le.current) {
|
|
2495
2497
|
const De = E.current.getBoundingClientRect().height;
|
|
2496
2498
|
let me = De;
|
|
2497
|
-
De > L && (me = L - (fe ? _e : It)),
|
|
2498
|
-
} else
|
|
2499
|
+
De > L && (me = L - (fe ? _e : It)), g ? E.current.style.height = `${De - Math.max(ee, 0)}px` : E.current.style.height = `${Math.max(me, L - _e)}px`;
|
|
2500
|
+
} else cl() || (E.current.style.height = `${Ct.current}px`);
|
|
2499
2501
|
s && s.length > 0 && !Le.current ? E.current.style.bottom = "0px" : E.current.style.bottom = `${Math.max(ee, 0)}px`;
|
|
2500
2502
|
}
|
|
2501
2503
|
}
|
|
2502
|
-
return (
|
|
2503
|
-
var
|
|
2504
|
-
return (
|
|
2504
|
+
return (S = window.visualViewport) == null || S.addEventListener("resize", _), () => {
|
|
2505
|
+
var O;
|
|
2506
|
+
return (O = window.visualViewport) == null ? void 0 : O.removeEventListener("resize", _);
|
|
2505
2507
|
};
|
|
2506
2508
|
}, [
|
|
2507
2509
|
Be,
|
|
2508
2510
|
s,
|
|
2509
2511
|
Ve
|
|
2510
2512
|
]);
|
|
2511
|
-
function Ge(
|
|
2512
|
-
|
|
2513
|
-
s &&
|
|
2514
|
-
},
|
|
2513
|
+
function Ge(S) {
|
|
2514
|
+
ka(), M == null || M(), S || te(!1), setTimeout(() => {
|
|
2515
|
+
s && cn(s[0]);
|
|
2516
|
+
}, k.DURATION * 1e3);
|
|
2515
2517
|
}
|
|
2516
|
-
function
|
|
2518
|
+
function fn() {
|
|
2517
2519
|
if (!E.current) return;
|
|
2518
|
-
const
|
|
2520
|
+
const S = document.querySelector("[data-vaul-drawer-wrapper]"), _ = pt(E.current, v);
|
|
2519
2521
|
H(E.current, {
|
|
2520
2522
|
transform: "translate3d(0, 0, 0)",
|
|
2521
|
-
transition: `transform ${
|
|
2523
|
+
transition: `transform ${k.DURATION}s cubic-bezier(${k.EASE.join(",")})`
|
|
2522
2524
|
}), H(pe.current, {
|
|
2523
|
-
transition: `opacity ${
|
|
2525
|
+
transition: `opacity ${k.DURATION}s cubic-bezier(${k.EASE.join(",")})`,
|
|
2524
2526
|
opacity: "1"
|
|
2525
|
-
}), i &&
|
|
2526
|
-
borderRadius: `${
|
|
2527
|
+
}), i && _ && _ > 0 && G && H(S, {
|
|
2528
|
+
borderRadius: `${fa}px`,
|
|
2527
2529
|
overflow: "hidden",
|
|
2528
|
-
...U(
|
|
2530
|
+
...U(v) ? {
|
|
2529
2531
|
transform: `scale(${lt()}) translate3d(0, calc(env(safe-area-inset-top) + 14px), 0)`,
|
|
2530
2532
|
transformOrigin: "top"
|
|
2531
2533
|
} : {
|
|
@@ -2533,121 +2535,121 @@ function pa({ open: e, onOpenChange: t, children: n, onDrag: r, onRelease: o, sn
|
|
|
2533
2535
|
transformOrigin: "left"
|
|
2534
2536
|
},
|
|
2535
2537
|
transitionProperty: "transform, border-radius",
|
|
2536
|
-
transitionDuration: `${
|
|
2537
|
-
transitionTimingFunction: `cubic-bezier(${
|
|
2538
|
+
transitionDuration: `${k.DURATION}s`,
|
|
2539
|
+
transitionTimingFunction: `cubic-bezier(${k.EASE.join(",")})`
|
|
2538
2540
|
}, !0);
|
|
2539
2541
|
}
|
|
2540
|
-
function
|
|
2541
|
-
!x || !E.current || (E.current.classList.remove(jt), Re.current = !1, Q(!1),
|
|
2542
|
+
function ka() {
|
|
2543
|
+
!x || !E.current || (E.current.classList.remove(jt), Re.current = !1, Q(!1), xe.current = /* @__PURE__ */ new Date());
|
|
2542
2544
|
}
|
|
2543
|
-
function
|
|
2545
|
+
function $a(S) {
|
|
2544
2546
|
if (!x || !E.current) return;
|
|
2545
|
-
E.current.classList.remove(jt), Re.current = !1, Q(!1),
|
|
2546
|
-
const
|
|
2547
|
-
if (!
|
|
2548
|
-
const
|
|
2547
|
+
E.current.classList.remove(jt), Re.current = !1, Q(!1), xe.current = /* @__PURE__ */ new Date();
|
|
2548
|
+
const _ = pt(E.current, v);
|
|
2549
|
+
if (!S || !dn(S.target, !1) || !_ || Number.isNaN(_) || $e.current === null) return;
|
|
2550
|
+
const O = xe.current.getTime() - $e.current.getTime(), N = Fe.current - (U(v) ? S.pageY : S.pageX), L = Math.abs(N) / O;
|
|
2549
2551
|
if (L > 0.05 && (de(!0), setTimeout(() => {
|
|
2550
2552
|
de(!1);
|
|
2551
2553
|
}, 200)), s) {
|
|
2552
|
-
|
|
2553
|
-
draggedDistance: N * (
|
|
2554
|
+
Na({
|
|
2555
|
+
draggedDistance: N * (v === "bottom" || v === "right" ? 1 : -1),
|
|
2554
2556
|
closeDrawer: Ge,
|
|
2555
2557
|
velocity: L,
|
|
2556
2558
|
dismissible: f
|
|
2557
|
-
}), o == null || o(
|
|
2559
|
+
}), o == null || o(S, !0);
|
|
2558
2560
|
return;
|
|
2559
2561
|
}
|
|
2560
|
-
if (
|
|
2561
|
-
|
|
2562
|
+
if (v === "bottom" || v === "right" ? N > 0 : N < 0) {
|
|
2563
|
+
fn(), o == null || o(S, !0);
|
|
2562
2564
|
return;
|
|
2563
2565
|
}
|
|
2564
|
-
if (L >
|
|
2565
|
-
Ge(), o == null || o(
|
|
2566
|
+
if (L > da) {
|
|
2567
|
+
Ge(), o == null || o(S, !1);
|
|
2566
2568
|
return;
|
|
2567
2569
|
}
|
|
2568
2570
|
var ne;
|
|
2569
2571
|
const ee = Math.min((ne = E.current.getBoundingClientRect().height) != null ? ne : 0, window.innerHeight);
|
|
2570
2572
|
var Ee;
|
|
2571
|
-
const fe = Math.min((Ee = E.current.getBoundingClientRect().width) != null ? Ee : 0, window.innerWidth), _e =
|
|
2572
|
-
if (Math.abs(
|
|
2573
|
-
Ge(), o == null || o(
|
|
2573
|
+
const fe = Math.min((Ee = E.current.getBoundingClientRect().width) != null ? Ee : 0, window.innerWidth), _e = v === "left" || v === "right";
|
|
2574
|
+
if (Math.abs(_) >= (_e ? fe : ee) * u) {
|
|
2575
|
+
Ge(), o == null || o(S, !1);
|
|
2574
2576
|
return;
|
|
2575
2577
|
}
|
|
2576
|
-
o == null || o(
|
|
2578
|
+
o == null || o(S, !0), fn();
|
|
2577
2579
|
}
|
|
2578
2580
|
p.useEffect(() => (G && (H(document.documentElement, {
|
|
2579
2581
|
scrollBehavior: "auto"
|
|
2580
2582
|
}), Me.current = /* @__PURE__ */ new Date()), () => {
|
|
2581
|
-
|
|
2583
|
+
bl(document.documentElement, "scrollBehavior");
|
|
2582
2584
|
}), [
|
|
2583
2585
|
G
|
|
2584
2586
|
]);
|
|
2585
|
-
function
|
|
2586
|
-
const
|
|
2587
|
+
function Fa(S) {
|
|
2588
|
+
const _ = S ? (window.innerWidth - Oe) / window.innerWidth : 1, O = S ? -Oe : 0;
|
|
2587
2589
|
re.current && window.clearTimeout(re.current), H(E.current, {
|
|
2588
|
-
transition: `transform ${
|
|
2589
|
-
transform: `scale(${
|
|
2590
|
-
}), !
|
|
2591
|
-
const N = pt(E.current,
|
|
2590
|
+
transition: `transform ${k.DURATION}s cubic-bezier(${k.EASE.join(",")})`,
|
|
2591
|
+
transform: `scale(${_}) translate3d(0, ${O}px, 0)`
|
|
2592
|
+
}), !S && E.current && (re.current = setTimeout(() => {
|
|
2593
|
+
const N = pt(E.current, v);
|
|
2592
2594
|
H(E.current, {
|
|
2593
2595
|
transition: "none",
|
|
2594
|
-
transform: U(
|
|
2596
|
+
transform: U(v) ? `translate3d(0, ${N}px, 0)` : `translate3d(${N}px, 0, 0)`
|
|
2595
2597
|
});
|
|
2596
2598
|
}, 500));
|
|
2597
2599
|
}
|
|
2598
|
-
function
|
|
2599
|
-
if (
|
|
2600
|
-
const
|
|
2600
|
+
function La(S, _) {
|
|
2601
|
+
if (_ < 0) return;
|
|
2602
|
+
const O = (window.innerWidth - Oe) / window.innerWidth, N = O + _ * (1 - O), L = -Oe + _ * Oe;
|
|
2601
2603
|
H(E.current, {
|
|
2602
|
-
transform: U(
|
|
2604
|
+
transform: U(v) ? `scale(${N}) translate3d(0, ${L}px, 0)` : `scale(${N}) translate3d(${L}px, 0, 0)`,
|
|
2603
2605
|
transition: "none"
|
|
2604
2606
|
});
|
|
2605
2607
|
}
|
|
2606
|
-
function
|
|
2607
|
-
const
|
|
2608
|
-
|
|
2609
|
-
transition: `transform ${
|
|
2610
|
-
transform: U(
|
|
2608
|
+
function Ba(S, _) {
|
|
2609
|
+
const O = U(v) ? window.innerHeight : window.innerWidth, N = _ ? (O - Oe) / O : 1, L = _ ? -Oe : 0;
|
|
2610
|
+
_ && H(E.current, {
|
|
2611
|
+
transition: `transform ${k.DURATION}s cubic-bezier(${k.EASE.join(",")})`,
|
|
2612
|
+
transform: U(v) ? `scale(${N}) translate3d(0, ${L}px, 0)` : `scale(${N}) translate3d(${L}px, 0, 0)`
|
|
2611
2613
|
});
|
|
2612
2614
|
}
|
|
2613
2615
|
return p.useEffect(() => {
|
|
2614
|
-
|
|
2616
|
+
T || window.requestAnimationFrame(() => {
|
|
2615
2617
|
document.body.style.pointerEvents = "auto";
|
|
2616
2618
|
});
|
|
2617
2619
|
}, [
|
|
2618
|
-
|
|
2619
|
-
]), /* @__PURE__ */ p.createElement(
|
|
2620
|
+
T
|
|
2621
|
+
]), /* @__PURE__ */ p.createElement(ls, {
|
|
2620
2622
|
defaultOpen: z,
|
|
2621
|
-
onOpenChange: (
|
|
2622
|
-
!f && !
|
|
2623
|
+
onOpenChange: (S) => {
|
|
2624
|
+
!f && !S || (S ? Y(!0) : Ge(!0), te(S));
|
|
2623
2625
|
},
|
|
2624
2626
|
open: G
|
|
2625
|
-
}, /* @__PURE__ */ p.createElement(
|
|
2627
|
+
}, /* @__PURE__ */ p.createElement(sa.Provider, {
|
|
2626
2628
|
value: {
|
|
2627
|
-
activeSnapPoint:
|
|
2629
|
+
activeSnapPoint: ja,
|
|
2628
2630
|
snapPoints: s,
|
|
2629
|
-
setActiveSnapPoint:
|
|
2631
|
+
setActiveSnapPoint: cn,
|
|
2630
2632
|
drawerRef: E,
|
|
2631
2633
|
overlayRef: pe,
|
|
2632
2634
|
onOpenChange: t,
|
|
2633
|
-
onPress:
|
|
2634
|
-
onRelease:
|
|
2635
|
-
onDrag:
|
|
2635
|
+
onPress: Ia,
|
|
2636
|
+
onRelease: $a,
|
|
2637
|
+
onDrag: Aa,
|
|
2636
2638
|
dismissible: f,
|
|
2637
|
-
shouldAnimate:
|
|
2639
|
+
shouldAnimate: an,
|
|
2638
2640
|
handleOnly: c,
|
|
2639
2641
|
isOpen: G,
|
|
2640
2642
|
isDragging: x,
|
|
2641
|
-
shouldFade:
|
|
2643
|
+
shouldFade: un,
|
|
2642
2644
|
closeDrawer: Ge,
|
|
2643
|
-
onNestedDrag:
|
|
2644
|
-
onNestedOpenChange:
|
|
2645
|
-
onNestedRelease:
|
|
2645
|
+
onNestedDrag: La,
|
|
2646
|
+
onNestedOpenChange: Fa,
|
|
2647
|
+
onNestedRelease: Ba,
|
|
2646
2648
|
keyboardIsOpen: Le,
|
|
2647
|
-
modal:
|
|
2649
|
+
modal: T,
|
|
2648
2650
|
snapPointsOffset: Ve,
|
|
2649
2651
|
activeSnapPointIndex: Be,
|
|
2650
|
-
direction:
|
|
2652
|
+
direction: v,
|
|
2651
2653
|
shouldScaleBackground: i,
|
|
2652
2654
|
setBackgroundColorOnScale: l,
|
|
2653
2655
|
noBodyStyles: P,
|
|
@@ -2656,14 +2658,14 @@ function pa({ open: e, onOpenChange: t, children: n, onDrag: r, onRelease: o, sn
|
|
|
2656
2658
|
}
|
|
2657
2659
|
}, n));
|
|
2658
2660
|
}
|
|
2659
|
-
const
|
|
2660
|
-
const { overlayRef: n, snapPoints: r, onRelease: o, shouldFade: s, isOpen: i, modal: l, shouldAnimate: u } = Qe(), m =
|
|
2661
|
+
const ga = /* @__PURE__ */ p.forwardRef(function({ ...e }, t) {
|
|
2662
|
+
const { overlayRef: n, snapPoints: r, onRelease: o, shouldFade: s, isOpen: i, modal: l, shouldAnimate: u } = Qe(), m = ca(t, n), f = r && r.length > 0;
|
|
2661
2663
|
if (!l)
|
|
2662
2664
|
return null;
|
|
2663
2665
|
const c = p.useCallback((d) => o(d), [
|
|
2664
2666
|
o
|
|
2665
2667
|
]);
|
|
2666
|
-
return /* @__PURE__ */ p.createElement(
|
|
2668
|
+
return /* @__PURE__ */ p.createElement(ns, {
|
|
2667
2669
|
onMouseUp: c,
|
|
2668
2670
|
ref: m,
|
|
2669
2671
|
"data-vaul-overlay": "",
|
|
@@ -2673,20 +2675,20 @@ const ma = /* @__PURE__ */ p.forwardRef(function({ ...e }, t) {
|
|
|
2673
2675
|
...e
|
|
2674
2676
|
});
|
|
2675
2677
|
});
|
|
2676
|
-
|
|
2677
|
-
const
|
|
2678
|
-
const { drawerRef: s, onPress: i, onRelease: l, onDrag: u, keyboardIsOpen: m, snapPointsOffset: f, activeSnapPointIndex: c, modal: d, isOpen: R, direction:
|
|
2679
|
-
|
|
2680
|
-
const K = (
|
|
2678
|
+
ga.displayName = "Drawer.Overlay";
|
|
2679
|
+
const va = /* @__PURE__ */ p.forwardRef(function({ onPointerDownOutside: e, style: t, onOpenAutoFocus: n, ...r }, o) {
|
|
2680
|
+
const { drawerRef: s, onPress: i, onRelease: l, onDrag: u, keyboardIsOpen: m, snapPointsOffset: f, activeSnapPointIndex: c, modal: d, isOpen: R, direction: C, snapPoints: g, container: T, handleOnly: M, shouldAnimate: A, autoFocus: P } = Qe(), [v, z] = p.useState(!1), J = ca(o, s), b = p.useRef(null), j = p.useRef(null), D = p.useRef(!1), B = g && g.length > 0;
|
|
2681
|
+
jl();
|
|
2682
|
+
const K = (y, V, G = 0) => {
|
|
2681
2683
|
if (D.current) return !0;
|
|
2682
|
-
const te = Math.abs(
|
|
2684
|
+
const te = Math.abs(y.y), q = Math.abs(y.x), Y = q > te, x = [
|
|
2683
2685
|
"bottom",
|
|
2684
2686
|
"right"
|
|
2685
2687
|
].includes(V) ? 1 : -1;
|
|
2686
2688
|
if (V === "left" || V === "right") {
|
|
2687
|
-
if (!(
|
|
2689
|
+
if (!(y.x * x < 0) && q >= 0 && q <= G)
|
|
2688
2690
|
return Y;
|
|
2689
|
-
} else if (!(
|
|
2691
|
+
} else if (!(y.y * x < 0) && te >= 0 && te <= G)
|
|
2690
2692
|
return !Y;
|
|
2691
2693
|
return D.current = !0, !0;
|
|
2692
2694
|
};
|
|
@@ -2695,77 +2697,77 @@ const ga = /* @__PURE__ */ p.forwardRef(function({ onPointerDownOutside: e, styl
|
|
|
2695
2697
|
z(!0);
|
|
2696
2698
|
});
|
|
2697
2699
|
}, []);
|
|
2698
|
-
function W(
|
|
2699
|
-
|
|
2700
|
+
function W(y) {
|
|
2701
|
+
b.current = null, D.current = !1, l(y);
|
|
2700
2702
|
}
|
|
2701
|
-
return /* @__PURE__ */ p.createElement(
|
|
2702
|
-
"data-vaul-drawer-direction":
|
|
2703
|
+
return /* @__PURE__ */ p.createElement(rs, {
|
|
2704
|
+
"data-vaul-drawer-direction": C,
|
|
2703
2705
|
"data-vaul-drawer": "",
|
|
2704
|
-
"data-vaul-delayed-snap-points":
|
|
2706
|
+
"data-vaul-delayed-snap-points": v ? "true" : "false",
|
|
2705
2707
|
"data-vaul-snap-points": R && B ? "true" : "false",
|
|
2706
|
-
"data-vaul-custom-container":
|
|
2707
|
-
"data-vaul-animate":
|
|
2708
|
+
"data-vaul-custom-container": T ? "true" : "false",
|
|
2709
|
+
"data-vaul-animate": A != null && A.current ? "true" : "false",
|
|
2708
2710
|
...r,
|
|
2709
|
-
ref:
|
|
2711
|
+
ref: J,
|
|
2710
2712
|
style: f && f.length > 0 ? {
|
|
2711
2713
|
"--snap-point-height": `${f[c ?? 0]}px`,
|
|
2712
2714
|
...t
|
|
2713
2715
|
} : t,
|
|
2714
|
-
onPointerDown: (
|
|
2715
|
-
|
|
2716
|
-
x:
|
|
2717
|
-
y:
|
|
2718
|
-
}, i(
|
|
2716
|
+
onPointerDown: (y) => {
|
|
2717
|
+
M || (r.onPointerDown == null || r.onPointerDown.call(r, y), b.current = {
|
|
2718
|
+
x: y.pageX,
|
|
2719
|
+
y: y.pageY
|
|
2720
|
+
}, i(y));
|
|
2719
2721
|
},
|
|
2720
|
-
onOpenAutoFocus: (
|
|
2721
|
-
n == null || n(
|
|
2722
|
+
onOpenAutoFocus: (y) => {
|
|
2723
|
+
n == null || n(y), P || y.preventDefault();
|
|
2722
2724
|
},
|
|
2723
|
-
onPointerDownOutside: (
|
|
2724
|
-
if (e == null || e(
|
|
2725
|
-
|
|
2725
|
+
onPointerDownOutside: (y) => {
|
|
2726
|
+
if (e == null || e(y), !d || y.defaultPrevented) {
|
|
2727
|
+
y.preventDefault();
|
|
2726
2728
|
return;
|
|
2727
2729
|
}
|
|
2728
2730
|
m.current && (m.current = !1);
|
|
2729
2731
|
},
|
|
2730
|
-
onFocusOutside: (
|
|
2732
|
+
onFocusOutside: (y) => {
|
|
2731
2733
|
if (!d) {
|
|
2732
|
-
|
|
2734
|
+
y.preventDefault();
|
|
2733
2735
|
return;
|
|
2734
2736
|
}
|
|
2735
2737
|
},
|
|
2736
|
-
onPointerMove: (
|
|
2737
|
-
if (j.current =
|
|
2738
|
-
const V =
|
|
2738
|
+
onPointerMove: (y) => {
|
|
2739
|
+
if (j.current = y, M || (r.onPointerMove == null || r.onPointerMove.call(r, y), !b.current)) return;
|
|
2740
|
+
const V = y.pageY - b.current.y, G = y.pageX - b.current.x, te = y.pointerType === "touch" ? 10 : 2;
|
|
2739
2741
|
K({
|
|
2740
2742
|
x: G,
|
|
2741
2743
|
y: V
|
|
2742
|
-
},
|
|
2744
|
+
}, C, te) ? u(y) : (Math.abs(G) > te || Math.abs(V) > te) && (b.current = null);
|
|
2743
2745
|
},
|
|
2744
|
-
onPointerUp: (
|
|
2745
|
-
r.onPointerUp == null || r.onPointerUp.call(r,
|
|
2746
|
+
onPointerUp: (y) => {
|
|
2747
|
+
r.onPointerUp == null || r.onPointerUp.call(r, y), b.current = null, D.current = !1, l(y);
|
|
2746
2748
|
},
|
|
2747
|
-
onPointerOut: (
|
|
2748
|
-
r.onPointerOut == null || r.onPointerOut.call(r,
|
|
2749
|
+
onPointerOut: (y) => {
|
|
2750
|
+
r.onPointerOut == null || r.onPointerOut.call(r, y), W(j.current);
|
|
2749
2751
|
},
|
|
2750
|
-
onContextMenu: (
|
|
2751
|
-
r.onContextMenu == null || r.onContextMenu.call(r,
|
|
2752
|
+
onContextMenu: (y) => {
|
|
2753
|
+
r.onContextMenu == null || r.onContextMenu.call(r, y), j.current && W(j.current);
|
|
2752
2754
|
}
|
|
2753
2755
|
});
|
|
2754
2756
|
});
|
|
2755
|
-
|
|
2756
|
-
const
|
|
2757
|
-
const { closeDrawer: o, isDragging: s, snapPoints: i, activeSnapPoint: l, setActiveSnapPoint: u, dismissible: m, handleOnly: f, isOpen: c, onPress: d, onDrag: R } = Qe(),
|
|
2758
|
-
function
|
|
2759
|
-
if (
|
|
2757
|
+
va.displayName = "Drawer.Content";
|
|
2758
|
+
const Tl = 250, _l = 120, wa = /* @__PURE__ */ p.forwardRef(function({ preventCycle: e = !1, children: t, ...n }, r) {
|
|
2759
|
+
const { closeDrawer: o, isDragging: s, snapPoints: i, activeSnapPoint: l, setActiveSnapPoint: u, dismissible: m, handleOnly: f, isOpen: c, onPress: d, onDrag: R } = Qe(), C = p.useRef(null), g = p.useRef(!1);
|
|
2760
|
+
function T() {
|
|
2761
|
+
if (g.current) {
|
|
2760
2762
|
P();
|
|
2761
2763
|
return;
|
|
2762
2764
|
}
|
|
2763
2765
|
window.setTimeout(() => {
|
|
2764
|
-
|
|
2765
|
-
},
|
|
2766
|
+
M();
|
|
2767
|
+
}, _l);
|
|
2766
2768
|
}
|
|
2767
|
-
function
|
|
2768
|
-
if (s || e ||
|
|
2769
|
+
function M() {
|
|
2770
|
+
if (s || e || g.current) {
|
|
2769
2771
|
P();
|
|
2770
2772
|
return;
|
|
2771
2773
|
}
|
|
@@ -2777,27 +2779,27 @@ const Dl = 250, Pl = 120, va = /* @__PURE__ */ p.forwardRef(function({ preventCy
|
|
|
2777
2779
|
o();
|
|
2778
2780
|
return;
|
|
2779
2781
|
}
|
|
2780
|
-
const z = i.findIndex((
|
|
2782
|
+
const z = i.findIndex((b) => b === l);
|
|
2781
2783
|
if (z === -1) return;
|
|
2782
|
-
const
|
|
2783
|
-
u(
|
|
2784
|
+
const J = i[z + 1];
|
|
2785
|
+
u(J);
|
|
2784
2786
|
}
|
|
2785
|
-
function
|
|
2786
|
-
|
|
2787
|
-
|
|
2788
|
-
},
|
|
2787
|
+
function A() {
|
|
2788
|
+
C.current = window.setTimeout(() => {
|
|
2789
|
+
g.current = !0;
|
|
2790
|
+
}, Tl);
|
|
2789
2791
|
}
|
|
2790
2792
|
function P() {
|
|
2791
|
-
|
|
2793
|
+
C.current && window.clearTimeout(C.current), g.current = !1;
|
|
2792
2794
|
}
|
|
2793
2795
|
return /* @__PURE__ */ p.createElement("div", {
|
|
2794
|
-
onClick:
|
|
2796
|
+
onClick: T,
|
|
2795
2797
|
onPointerCancel: P,
|
|
2796
|
-
onPointerDown: (
|
|
2797
|
-
f && d(
|
|
2798
|
+
onPointerDown: (v) => {
|
|
2799
|
+
f && d(v), A();
|
|
2798
2800
|
},
|
|
2799
|
-
onPointerMove: (
|
|
2800
|
-
f && R(
|
|
2801
|
+
onPointerMove: (v) => {
|
|
2802
|
+
f && R(v);
|
|
2801
2803
|
},
|
|
2802
2804
|
// onPointerUp is already handled by the content component
|
|
2803
2805
|
ref: r,
|
|
@@ -2810,12 +2812,12 @@ const Dl = 250, Pl = 120, va = /* @__PURE__ */ p.forwardRef(function({ preventCy
|
|
|
2810
2812
|
"aria-hidden": "true"
|
|
2811
2813
|
}, t));
|
|
2812
2814
|
});
|
|
2813
|
-
|
|
2814
|
-
function
|
|
2815
|
+
wa.displayName = "Drawer.Handle";
|
|
2816
|
+
function Ol({ onDrag: e, onOpenChange: t, ...n }) {
|
|
2815
2817
|
const { onNestedDrag: r, onNestedOpenChange: o, onNestedRelease: s } = Qe();
|
|
2816
2818
|
if (!r)
|
|
2817
2819
|
throw new Error("Drawer.NestedRoot must be placed in another drawer");
|
|
2818
|
-
return /* @__PURE__ */ p.createElement(
|
|
2820
|
+
return /* @__PURE__ */ p.createElement(ma, {
|
|
2819
2821
|
nested: !0,
|
|
2820
2822
|
onClose: () => {
|
|
2821
2823
|
o(!1);
|
|
@@ -2830,24 +2832,24 @@ function jl({ onDrag: e, onOpenChange: t, ...n }) {
|
|
|
2830
2832
|
...n
|
|
2831
2833
|
});
|
|
2832
2834
|
}
|
|
2833
|
-
function
|
|
2835
|
+
function Il(e) {
|
|
2834
2836
|
const t = Qe(), { container: n = t.container, ...r } = e;
|
|
2835
|
-
return /* @__PURE__ */ p.createElement(
|
|
2837
|
+
return /* @__PURE__ */ p.createElement(cs, {
|
|
2836
2838
|
container: n,
|
|
2837
2839
|
...r
|
|
2838
2840
|
});
|
|
2839
2841
|
}
|
|
2840
2842
|
const he = {
|
|
2841
|
-
Root:
|
|
2842
|
-
NestedRoot:
|
|
2843
|
-
Content:
|
|
2844
|
-
Overlay:
|
|
2845
|
-
Trigger:
|
|
2846
|
-
Portal:
|
|
2847
|
-
Handle:
|
|
2848
|
-
Close:
|
|
2849
|
-
Title:
|
|
2850
|
-
Description:
|
|
2843
|
+
Root: ma,
|
|
2844
|
+
NestedRoot: Ol,
|
|
2845
|
+
Content: va,
|
|
2846
|
+
Overlay: ga,
|
|
2847
|
+
Trigger: as,
|
|
2848
|
+
Portal: Il,
|
|
2849
|
+
Handle: wa,
|
|
2850
|
+
Close: os,
|
|
2851
|
+
Title: ss,
|
|
2852
|
+
Description: is
|
|
2851
2853
|
}, en = ({
|
|
2852
2854
|
shouldScaleBackground: e = !0,
|
|
2853
2855
|
...t
|
|
@@ -2859,23 +2861,23 @@ const he = {
|
|
|
2859
2861
|
}
|
|
2860
2862
|
);
|
|
2861
2863
|
en.displayName = "Drawer";
|
|
2862
|
-
const
|
|
2864
|
+
const ya = he.Trigger, Al = he.Portal, kl = he.Close, xa = h.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ a.jsx(
|
|
2863
2865
|
he.Overlay,
|
|
2864
2866
|
{
|
|
2865
2867
|
ref: n,
|
|
2866
|
-
className:
|
|
2868
|
+
className: F("fixed inset-0 z-50 bg-black/80", e),
|
|
2867
2869
|
...t
|
|
2868
2870
|
}
|
|
2869
2871
|
));
|
|
2870
2872
|
xa.displayName = he.Overlay.displayName;
|
|
2871
2873
|
const tn = h.forwardRef(
|
|
2872
|
-
({ className: e, children: t, hideBar: n = !0, ...r }, o) => /* @__PURE__ */ a.jsxs(
|
|
2874
|
+
({ className: e, children: t, hideBar: n = !0, ...r }, o) => /* @__PURE__ */ a.jsxs(Al, { children: [
|
|
2873
2875
|
/* @__PURE__ */ a.jsx(xa, {}),
|
|
2874
2876
|
/* @__PURE__ */ a.jsxs(
|
|
2875
2877
|
he.Content,
|
|
2876
2878
|
{
|
|
2877
2879
|
ref: o,
|
|
2878
|
-
className:
|
|
2880
|
+
className: F(
|
|
2879
2881
|
"fixed inset-x-0 bottom-0 z-50 mt-24 flex h-auto flex-col rounded-t-[10px] border bg-background",
|
|
2880
2882
|
e
|
|
2881
2883
|
),
|
|
@@ -2893,7 +2895,7 @@ const nn = h.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ a.jsx(
|
|
|
2893
2895
|
he.Title,
|
|
2894
2896
|
{
|
|
2895
2897
|
ref: n,
|
|
2896
|
-
className:
|
|
2898
|
+
className: F(
|
|
2897
2899
|
"text-lg font-semibold leading-none tracking-tight",
|
|
2898
2900
|
e
|
|
2899
2901
|
),
|
|
@@ -2901,16 +2903,16 @@ const nn = h.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ a.jsx(
|
|
|
2901
2903
|
}
|
|
2902
2904
|
));
|
|
2903
2905
|
nn.displayName = he.Title.displayName;
|
|
2904
|
-
const
|
|
2906
|
+
const $l = h.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ a.jsx(
|
|
2905
2907
|
he.Description,
|
|
2906
2908
|
{
|
|
2907
2909
|
ref: n,
|
|
2908
|
-
className:
|
|
2910
|
+
className: F("text-sm text-muted-foreground", e),
|
|
2909
2911
|
...t
|
|
2910
2912
|
}
|
|
2911
2913
|
));
|
|
2912
|
-
|
|
2913
|
-
const
|
|
2914
|
+
$l.displayName = he.Description.displayName;
|
|
2915
|
+
const ba = () => {
|
|
2914
2916
|
const e = Ae(), [t, n] = Ie(!1), r = Qn(() => n(!1), []);
|
|
2915
2917
|
Ce(() => {
|
|
2916
2918
|
if (t)
|
|
@@ -2922,126 +2924,115 @@ const ya = () => {
|
|
|
2922
2924
|
window.removeEventListener("keydown", s);
|
|
2923
2925
|
};
|
|
2924
2926
|
}, [t, n]);
|
|
2925
|
-
const o = e.plugins.find(
|
|
2927
|
+
const o = e.plugins.find(Ls);
|
|
2926
2928
|
return o ? /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
|
|
2927
2929
|
/* @__PURE__ */ a.jsxs(
|
|
2928
2930
|
"button",
|
|
2929
2931
|
{
|
|
2930
2932
|
type: "button",
|
|
2931
2933
|
onClick: () => n(!0),
|
|
2932
|
-
className: "flex items-center border border-input hover:bg-accent hover:text-accent-foreground p-4 relative h-8 justify-start rounded-lg bg-background text-sm text-muted-foreground shadow-none w-
|
|
2934
|
+
className: "flex items-center border border-input hover:bg-accent hover:text-accent-foreground p-4 relative h-8 justify-start rounded-lg bg-background text-sm text-muted-foreground shadow-none w-full sm:w-72",
|
|
2933
2935
|
children: [
|
|
2934
2936
|
/* @__PURE__ */ a.jsxs("div", { className: "flex items-center gap-2 flex-grow", children: [
|
|
2935
|
-
/* @__PURE__ */ a.jsx(
|
|
2937
|
+
/* @__PURE__ */ a.jsx(Go, { size: 14 }),
|
|
2936
2938
|
"Search"
|
|
2937
2939
|
] }),
|
|
2938
2940
|
/* @__PURE__ */ a.jsx("kbd", { className: "absolute right-[0.3rem] top-[0.3rem] hidden h-5 select-none items-center gap-1 rounded border bg-muted px-1.5 font-mono text-[11px] font-medium opacity-100 sm:flex", children: "⌘K" })
|
|
2939
2941
|
]
|
|
2940
2942
|
}
|
|
2941
2943
|
),
|
|
2942
|
-
/* @__PURE__ */ a.jsx(
|
|
2944
|
+
/* @__PURE__ */ a.jsx(Vn, { fallback: null, children: o.renderSearch({
|
|
2943
2945
|
isOpen: t,
|
|
2944
2946
|
onClose: r
|
|
2945
2947
|
}) })
|
|
2946
2948
|
] }) : null;
|
|
2947
|
-
},
|
|
2948
|
-
const { topNavigation: e } = Ae();
|
|
2949
|
+
}, Sa = (e) => (t) => t.display === "auth" && e || t.display === "anon" && !e || !t.display || t.display === "always", Fl = () => {
|
|
2950
|
+
const { topNavigation: e } = Ae(), { isAuthenticated: t } = vt();
|
|
2951
|
+
return e.length <= 1 ? /* @__PURE__ */ a.jsx("style", { children: ":root { --top-nav-height: 0px; }" }) : /* @__PURE__ */ a.jsx("nav", { className: "hidden lg:block border-b text-sm px-12 h-[--top-nav-height]", children: /* @__PURE__ */ a.jsx("ul", { className: "flex flex-row items-center gap-8", children: e.filter(Sa(t)).map((n) => /* @__PURE__ */ a.jsx("li", { children: /* @__PURE__ */ a.jsx(
|
|
2952
|
+
Je,
|
|
2953
|
+
{
|
|
2954
|
+
className: ({ isActive: r }) => zn(
|
|
2955
|
+
"block py-3.5 font-medium -mb-px border-b-2",
|
|
2956
|
+
r ? "border-primary text-foreground" : "border-transparent text-foreground/75 hover:text-foreground hover:border-accent-foreground/25"
|
|
2957
|
+
),
|
|
2958
|
+
to: n.id,
|
|
2959
|
+
children: n.label
|
|
2960
|
+
}
|
|
2961
|
+
) }, n.label)) }) });
|
|
2962
|
+
}, Ll = () => {
|
|
2963
|
+
const { topNavigation: e } = Ae(), { isAuthenticated: t } = vt();
|
|
2949
2964
|
return /* @__PURE__ */ a.jsxs(en, { direction: "right", children: [
|
|
2950
|
-
/* @__PURE__ */ a.jsx("div", { className: "flex lg:hidden justify-self-end", children: /* @__PURE__ */ a.jsx(
|
|
2965
|
+
/* @__PURE__ */ a.jsx("div", { className: "flex lg:hidden justify-self-end", children: /* @__PURE__ */ a.jsx(ya, { className: "lg:hidden", children: /* @__PURE__ */ a.jsx(Wo, { size: 22 }) }) }),
|
|
2951
2966
|
/* @__PURE__ */ a.jsxs(
|
|
2952
2967
|
tn,
|
|
2953
2968
|
{
|
|
2954
|
-
className: "lg:hidden h-screen right-0 left-auto w-[320px] rounded-none",
|
|
2969
|
+
className: "lg:hidden h-screen right-0 left-auto w-[320px] rounded-none overflow-auto",
|
|
2955
2970
|
"aria-describedby": void 0,
|
|
2956
2971
|
children: [
|
|
2957
2972
|
/* @__PURE__ */ a.jsx(Un, { children: /* @__PURE__ */ a.jsx(nn, { children: "Navigation" }) }),
|
|
2958
|
-
/* @__PURE__ */ a.jsx(
|
|
2959
|
-
/* @__PURE__ */ a.jsx("ul", { className: "flex flex-col items-center gap-4 p-4", children: e.
|
|
2960
|
-
|
|
2973
|
+
/* @__PURE__ */ a.jsx("div", { className: "flex p-4", children: /* @__PURE__ */ a.jsx(ba, {}) }),
|
|
2974
|
+
/* @__PURE__ */ a.jsx("ul", { className: "flex flex-col items-center gap-4 p-4", children: e.filter(Sa(t)).map((n) => /* @__PURE__ */ a.jsx("li", { children: /* @__PURE__ */ a.jsx(
|
|
2975
|
+
Je,
|
|
2961
2976
|
{
|
|
2962
|
-
className: ({ isActive:
|
|
2977
|
+
className: ({ isActive: r }) => zn(
|
|
2963
2978
|
"block font-medium border-b-2",
|
|
2964
|
-
|
|
2979
|
+
r ? "border-primary text-foreground" : "border-transparent text-foreground/75 hover:text-foreground hover:border-accent-foreground/25"
|
|
2965
2980
|
),
|
|
2966
|
-
to:
|
|
2967
|
-
children: /* @__PURE__ */ a.jsx(
|
|
2981
|
+
to: n.id,
|
|
2982
|
+
children: /* @__PURE__ */ a.jsx(kl, { children: n.label })
|
|
2968
2983
|
}
|
|
2969
|
-
) },
|
|
2984
|
+
) }, n.label)) })
|
|
2970
2985
|
]
|
|
2971
2986
|
}
|
|
2972
2987
|
)
|
|
2973
2988
|
] });
|
|
2974
|
-
},
|
|
2975
|
-
|
|
2976
|
-
|
|
2977
|
-
}, kl = ({ id: e, label: t, default: n }) => {
|
|
2978
|
-
var u;
|
|
2979
|
-
const { sidebars: r } = Ae(), o = Yn(), s = r[e], i = n ?? (s ? ko(s, (m) => {
|
|
2980
|
-
if (m.type === "doc") return Ze(m.id);
|
|
2981
|
-
}) : Ze(e));
|
|
2982
|
-
if (!i)
|
|
2983
|
-
throw new Error(
|
|
2984
|
-
`No links found in top navigation for top navigation '${e}'. Check that the sidebar isn't empty or that a default link set.`
|
|
2985
|
-
);
|
|
2986
|
-
const l = ((u = o.data.topNavItem) == null ? void 0 : u.id) === e;
|
|
2987
|
-
return /* @__PURE__ */ a.jsx(
|
|
2988
|
-
yt,
|
|
2989
|
-
{
|
|
2990
|
-
className: zn(
|
|
2991
|
-
"block py-3.5 font-medium -mb-px border-b-2",
|
|
2992
|
-
l ? "border-primary text-foreground" : "border-transparent text-foreground/75 hover:text-foreground hover:border-accent-foreground/25"
|
|
2993
|
-
),
|
|
2994
|
-
to: i,
|
|
2995
|
-
children: t
|
|
2996
|
-
}
|
|
2997
|
-
);
|
|
2998
|
-
}, ba = ({ item: e }) => e.children ? /* @__PURE__ */ a.jsxs(el, { children: [
|
|
2999
|
-
/* @__PURE__ */ a.jsx(Zr, { children: e.label }),
|
|
3000
|
-
/* @__PURE__ */ a.jsx(Zi, { children: /* @__PURE__ */ a.jsx(ea, { children: e.children.map((t, n) => (
|
|
2989
|
+
}, Ca = ({ item: e }) => e.children ? /* @__PURE__ */ a.jsxs(al, { children: [
|
|
2990
|
+
/* @__PURE__ */ a.jsx(ea, { children: e.label }),
|
|
2991
|
+
/* @__PURE__ */ a.jsx(rl, { children: /* @__PURE__ */ a.jsx(ta, { children: e.children.map((t, n) => (
|
|
3001
2992
|
// eslint-disable-next-line react/no-array-index-key
|
|
3002
|
-
/* @__PURE__ */ a.jsx(
|
|
2993
|
+
/* @__PURE__ */ a.jsx(Ca, { item: t }, n)
|
|
3003
2994
|
)) }) })
|
|
3004
|
-
] }, e.label) : /* @__PURE__ */ a.jsx(
|
|
3005
|
-
const t =
|
|
2995
|
+
] }, e.label) : /* @__PURE__ */ a.jsx($t, { to: e.path ?? "", children: /* @__PURE__ */ a.jsx(ra, { children: e.label }, e.label) }), Ma = Gn(function() {
|
|
2996
|
+
const t = vt(), [n, r] = vo(), { isAuthenticated: o, profile: s, isAuthEnabled: i } = vt(), l = Ae(), { page: u, plugins: m } = l, f = m.filter((d) => $s(d)).flatMap((d) => d.getProfileMenuItems(l)).map((d) => /* @__PURE__ */ a.jsx(Ca, { item: d }, d.label)), c = n ? Yo : Xo;
|
|
3006
2997
|
return /* @__PURE__ */ a.jsxs("header", { className: "sticky lg:top-0 z-10 bg-background/80 backdrop-blur w-full", children: [
|
|
3007
|
-
/* @__PURE__ */ a.jsx(
|
|
2998
|
+
/* @__PURE__ */ a.jsx(il, {}),
|
|
3008
2999
|
/* @__PURE__ */ a.jsxs("div", { className: "max-w-screen-2xl mx-auto", children: [
|
|
3009
3000
|
/* @__PURE__ */ a.jsxs("div", { className: "grid grid-cols-2 lg:grid-cols-[calc(var(--side-nav-width))_1fr] lg:gap-12 items-center border-b px-10 lg:px-12 h-[--top-header-height]", children: [
|
|
3010
|
-
/* @__PURE__ */ a.jsx("div", { className: "flex", children: /* @__PURE__ */ a.jsx(
|
|
3001
|
+
/* @__PURE__ */ a.jsx("div", { className: "flex", children: /* @__PURE__ */ a.jsx($t, { to: "/", children: /* @__PURE__ */ a.jsxs("div", { className: "flex items-center gap-3.5", children: [
|
|
3011
3002
|
(u == null ? void 0 : u.logo) && /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
|
|
3012
3003
|
/* @__PURE__ */ a.jsx(
|
|
3013
3004
|
"img",
|
|
3014
3005
|
{
|
|
3015
|
-
src:
|
|
3006
|
+
src: u.logo.src.light,
|
|
3016
3007
|
alt: u.logo.alt ?? u.pageTitle,
|
|
3017
3008
|
style: { width: u.logo.width },
|
|
3018
|
-
className:
|
|
3009
|
+
className: F("h-10", n && "hidden"),
|
|
3019
3010
|
loading: "lazy"
|
|
3020
3011
|
}
|
|
3021
3012
|
),
|
|
3022
3013
|
/* @__PURE__ */ a.jsx(
|
|
3023
3014
|
"img",
|
|
3024
3015
|
{
|
|
3025
|
-
src:
|
|
3016
|
+
src: u.logo.src.dark,
|
|
3026
3017
|
alt: u.logo.alt ?? u.pageTitle,
|
|
3027
3018
|
style: { width: u.logo.width },
|
|
3028
|
-
className:
|
|
3019
|
+
className: F("h-10", !n && "hidden"),
|
|
3029
3020
|
loading: "lazy"
|
|
3030
3021
|
}
|
|
3031
3022
|
)
|
|
3032
3023
|
] }),
|
|
3033
3024
|
/* @__PURE__ */ a.jsx("span", { className: "font-bold text-2xl text-foreground/85 tracking-wide", children: u == null ? void 0 : u.pageTitle })
|
|
3034
3025
|
] }) }) }),
|
|
3035
|
-
/* @__PURE__ */ a.jsxs("div", { className: "grid grid-cols-
|
|
3036
|
-
/* @__PURE__ */ a.jsx("div", { className: "w-full justify-center hidden
|
|
3037
|
-
/* @__PURE__ */ a.jsx(
|
|
3026
|
+
/* @__PURE__ */ a.jsxs("div", { className: "grid grid-cols-1 lg:grid-cols-[--sidecar-grid-cols] items-center gap-8", children: [
|
|
3027
|
+
/* @__PURE__ */ a.jsx("div", { className: "w-full justify-center hidden lg:flex", children: /* @__PURE__ */ a.jsx(ba, {}) }),
|
|
3028
|
+
/* @__PURE__ */ a.jsx(Ll, {}),
|
|
3038
3029
|
/* @__PURE__ */ a.jsxs("div", { className: "hidden lg:flex items-center justify-self-end text-sm gap-2", children: [
|
|
3039
|
-
/* @__PURE__ */ a.jsx(
|
|
3040
|
-
i && !o ? /* @__PURE__ */ a.jsx(Nt, { variant: "ghost", onClick: () => t.login(), children: "Login" }) : f.length > 0 && /* @__PURE__ */ a.jsxs(
|
|
3041
|
-
/* @__PURE__ */ a.jsx(
|
|
3042
|
-
/* @__PURE__ */ a.jsxs(
|
|
3043
|
-
/* @__PURE__ */ a.jsx(
|
|
3044
|
-
/* @__PURE__ */ a.jsx(
|
|
3030
|
+
/* @__PURE__ */ a.jsx(ye, { name: "head-navigation-start" }),
|
|
3031
|
+
i && !o ? /* @__PURE__ */ a.jsx(Nt, { variant: "ghost", onClick: () => t.login(), children: "Login" }) : f.length > 0 && /* @__PURE__ */ a.jsxs(tl, { modal: !1, children: [
|
|
3032
|
+
/* @__PURE__ */ a.jsx(nl, { asChild: !0, children: /* @__PURE__ */ a.jsx(Nt, { variant: "ghost", children: s != null && s.email ? `${s.email}` : "My Account" }) }),
|
|
3033
|
+
/* @__PURE__ */ a.jsxs(na, { className: "w-56", children: [
|
|
3034
|
+
/* @__PURE__ */ a.jsx(aa, { children: "My Account" }),
|
|
3035
|
+
/* @__PURE__ */ a.jsx(oa, {}),
|
|
3045
3036
|
f
|
|
3046
3037
|
] })
|
|
3047
3038
|
] }),
|
|
@@ -3055,18 +3046,18 @@ const ya = () => {
|
|
|
3055
3046
|
children: /* @__PURE__ */ a.jsx(c, { size: 18 })
|
|
3056
3047
|
}
|
|
3057
3048
|
),
|
|
3058
|
-
/* @__PURE__ */ a.jsx(
|
|
3049
|
+
/* @__PURE__ */ a.jsx(ye, { name: "head-navigation-end" })
|
|
3059
3050
|
] })
|
|
3060
3051
|
] })
|
|
3061
3052
|
] }),
|
|
3062
|
-
/* @__PURE__ */ a.jsx(
|
|
3063
|
-
/* @__PURE__ */ a.jsx(
|
|
3064
|
-
/* @__PURE__ */ a.jsx(
|
|
3053
|
+
/* @__PURE__ */ a.jsx(ye, { name: "top-navigation-before" }),
|
|
3054
|
+
/* @__PURE__ */ a.jsx(Fl, {}),
|
|
3055
|
+
/* @__PURE__ */ a.jsx(ye, { name: "top-navigation-after" })
|
|
3065
3056
|
] })
|
|
3066
3057
|
] });
|
|
3067
|
-
}),
|
|
3068
|
-
Header:
|
|
3069
|
-
},
|
|
3058
|
+
}), Ra = {
|
|
3059
|
+
Header: Ma
|
|
3060
|
+
}, Bl = qn(Ra), Hl = Bl.Provider, Ul = (e) => {
|
|
3070
3061
|
const [t, n] = Ie(!1);
|
|
3071
3062
|
Ce(() => {
|
|
3072
3063
|
const s = localStorage.getItem("theme"), i = window.matchMedia("(prefers-color-scheme: dark)"), l = s === "dark" || !s && i.matches;
|
|
@@ -3076,69 +3067,69 @@ const ya = () => {
|
|
|
3076
3067
|
const s = !t;
|
|
3077
3068
|
document.documentElement.classList.toggle("dark", s), localStorage.setItem("theme", s ? "dark" : "light"), n(s);
|
|
3078
3069
|
}, [t]), o = [t, r];
|
|
3079
|
-
return /* @__PURE__ */ a.jsx(
|
|
3080
|
-
},
|
|
3070
|
+
return /* @__PURE__ */ a.jsx(wo.Provider, { value: o, ...e });
|
|
3071
|
+
}, zl = ({
|
|
3081
3072
|
children: e,
|
|
3082
3073
|
context: t
|
|
3083
|
-
}) => (
|
|
3074
|
+
}) => (Ho({
|
|
3084
3075
|
queryFn: async () => (await t.initialize(), !0),
|
|
3085
3076
|
queryKey: ["zudoku-initialize"]
|
|
3086
|
-
}), /* @__PURE__ */ a.jsx(
|
|
3077
|
+
}), /* @__PURE__ */ a.jsx(Uo.Provider, { value: t, children: e })), Kl = ({
|
|
3087
3078
|
children: e,
|
|
3088
3079
|
...t
|
|
3089
3080
|
}) => {
|
|
3090
3081
|
var c, d;
|
|
3091
3082
|
const n = mt(
|
|
3092
|
-
() => ({ ...
|
|
3083
|
+
() => ({ ...Ra, ...t.overrides }),
|
|
3093
3084
|
[t.overrides]
|
|
3094
3085
|
), r = mt(() => {
|
|
3095
|
-
var
|
|
3086
|
+
var C;
|
|
3096
3087
|
return {
|
|
3097
|
-
...(t.plugins ?? []).filter(
|
|
3098
|
-
(
|
|
3099
|
-
).reduce((
|
|
3100
|
-
...
|
|
3101
|
-
...(
|
|
3088
|
+
...(t.plugins ?? []).filter(Us).flatMap(
|
|
3089
|
+
(g) => g.getMdxComponents ? [g.getMdxComponents()] : []
|
|
3090
|
+
).reduce((g, T) => ({ ...g, ...T }), {}),
|
|
3091
|
+
...yo,
|
|
3092
|
+
...(C = t.mdx) == null ? void 0 : C.components
|
|
3102
3093
|
};
|
|
3103
|
-
}, [(c = t.mdx) == null ? void 0 : c.components, t.plugins]), { stagger: o } =
|
|
3094
|
+
}, [(c = t.mdx) == null ? void 0 : c.components, t.plugins]), { stagger: o } = Eo(Tt), [s, i] = Ie(!1), l = mt(
|
|
3104
3095
|
() => s ? { stagger: !0 } : { stagger: o },
|
|
3105
3096
|
[o, s]
|
|
3106
|
-
), u =
|
|
3097
|
+
), u = Ya();
|
|
3107
3098
|
Ce(() => {
|
|
3108
3099
|
s || i(!0);
|
|
3109
3100
|
}, [s, u.location]);
|
|
3110
|
-
const [m] = Ie(() => new
|
|
3111
|
-
var
|
|
3112
|
-
return /* @__PURE__ */ a.jsx(
|
|
3101
|
+
const [m] = Ie(() => new Ks(t)), f = (d = t.plugins) == null ? void 0 : d.filter(Hs).map((R, C) => {
|
|
3102
|
+
var g;
|
|
3103
|
+
return /* @__PURE__ */ a.jsx(Do, { children: (g = R.getHead) == null ? void 0 : g.call(R) }, C);
|
|
3113
3104
|
});
|
|
3114
|
-
return /* @__PURE__ */ a.jsxs(
|
|
3105
|
+
return /* @__PURE__ */ a.jsxs(zo, { client: rr, children: [
|
|
3115
3106
|
/* @__PURE__ */ a.jsx(kt, { children: f }),
|
|
3116
|
-
/* @__PURE__ */ a.jsx(Tt.Provider, { value: l, children: /* @__PURE__ */ a.jsx(
|
|
3107
|
+
/* @__PURE__ */ a.jsx(Tt.Provider, { value: l, children: /* @__PURE__ */ a.jsx(zl, { context: m, children: /* @__PURE__ */ a.jsx(za, { components: r, children: /* @__PURE__ */ a.jsx(Ul, { children: /* @__PURE__ */ a.jsx(Hl, { value: n, children: /* @__PURE__ */ a.jsx(eo, { slotlets: t.slotlets, children: /* @__PURE__ */ a.jsx(xo, { children: e ?? /* @__PURE__ */ a.jsx(An, {}) }) }) }) }) }) }) })
|
|
3117
3108
|
] });
|
|
3118
|
-
},
|
|
3119
|
-
|
|
3120
|
-
const
|
|
3109
|
+
}, ql = Gn(Kl), rn = (e) => /* @__PURE__ */ a.jsx(As, { FallbackComponent: qs, children: /* @__PURE__ */ a.jsx(ql, { ...e }) });
|
|
3110
|
+
rn.displayName = "DevPortal";
|
|
3111
|
+
const Ql = ({
|
|
3121
3112
|
category: e,
|
|
3122
3113
|
level: t
|
|
3123
3114
|
}) => {
|
|
3124
|
-
var
|
|
3125
|
-
const n =
|
|
3115
|
+
var R, C;
|
|
3116
|
+
const n = Xn(), r = Ka(e), [o, s] = Ie(!1), i = e.collapsible ?? !0, l = e.collapsed ?? !0, u = !!(!i || !l || r), [m, f] = Ie(u), c = Xa(wt(n == null ? void 0 : n.id, (R = e.link) == null ? void 0 : R.id));
|
|
3126
3117
|
Ce(() => {
|
|
3127
|
-
|
|
3128
|
-
}, [
|
|
3129
|
-
const
|
|
3118
|
+
r && f(!0);
|
|
3119
|
+
}, [r]);
|
|
3120
|
+
const d = i && /* @__PURE__ */ a.jsx(
|
|
3130
3121
|
"button",
|
|
3131
3122
|
{
|
|
3132
3123
|
type: "button",
|
|
3133
|
-
onClick: (
|
|
3134
|
-
|
|
3124
|
+
onClick: (g) => {
|
|
3125
|
+
g.preventDefault(), f((T) => !T), s(!0);
|
|
3135
3126
|
},
|
|
3136
3127
|
children: /* @__PURE__ */ a.jsx(
|
|
3137
|
-
|
|
3128
|
+
Zn,
|
|
3138
3129
|
{
|
|
3139
3130
|
size: 16,
|
|
3140
|
-
className:
|
|
3141
|
-
|
|
3131
|
+
className: F(
|
|
3132
|
+
o && "transition",
|
|
3142
3133
|
"shrink-0 group-data-[state=open]:rotate-90"
|
|
3143
3134
|
)
|
|
3144
3135
|
}
|
|
@@ -3146,83 +3137,92 @@ const zl = ({
|
|
|
3146
3137
|
}
|
|
3147
3138
|
);
|
|
3148
3139
|
return /* @__PURE__ */ a.jsxs(
|
|
3149
|
-
|
|
3140
|
+
No,
|
|
3150
3141
|
{
|
|
3151
|
-
className:
|
|
3152
|
-
defaultOpen:
|
|
3153
|
-
open:
|
|
3154
|
-
onOpenChange: () =>
|
|
3142
|
+
className: "flex flex-col",
|
|
3143
|
+
defaultOpen: u,
|
|
3144
|
+
open: m,
|
|
3145
|
+
onOpenChange: () => f(!0),
|
|
3155
3146
|
children: [
|
|
3156
|
-
/* @__PURE__ */ a.jsx(
|
|
3147
|
+
/* @__PURE__ */ a.jsx(To, { className: "group", asChild: !0, disabled: !i, children: /* @__PURE__ */ a.jsxs(
|
|
3157
3148
|
"div",
|
|
3158
3149
|
{
|
|
3159
|
-
|
|
3160
|
-
|
|
3161
|
-
|
|
3162
|
-
|
|
3163
|
-
|
|
3150
|
+
onClick: () => s(!0),
|
|
3151
|
+
className: Ze({
|
|
3152
|
+
isActive: !1,
|
|
3153
|
+
isTopLevel: t === 0,
|
|
3154
|
+
className: [
|
|
3155
|
+
"text-start",
|
|
3156
|
+
i ? "cursor-pointer" : "cursor-default hover:bg-transparent"
|
|
3157
|
+
]
|
|
3158
|
+
}),
|
|
3164
3159
|
children: [
|
|
3165
3160
|
e.icon && /* @__PURE__ */ a.jsx(
|
|
3166
3161
|
e.icon,
|
|
3167
3162
|
{
|
|
3168
3163
|
size: 16,
|
|
3169
|
-
className:
|
|
3164
|
+
className: F(
|
|
3165
|
+
"align-[-0.125em] -translate-x-1",
|
|
3166
|
+
c && "text-primary"
|
|
3167
|
+
)
|
|
3170
3168
|
}
|
|
3171
3169
|
),
|
|
3172
|
-
((
|
|
3173
|
-
|
|
3170
|
+
((C = e.link) == null ? void 0 : C.type) === "doc" ? /* @__PURE__ */ a.jsx(
|
|
3171
|
+
Je,
|
|
3174
3172
|
{
|
|
3175
|
-
to:
|
|
3173
|
+
to: wt(n == null ? void 0 : n.id, e.link.id),
|
|
3176
3174
|
className: "flex-1",
|
|
3177
|
-
onClick: () =>
|
|
3178
|
-
|
|
3175
|
+
onClick: () => {
|
|
3176
|
+
c && !m && f(!0);
|
|
3177
|
+
},
|
|
3178
|
+
children: /* @__PURE__ */ a.jsxs(
|
|
3179
3179
|
"div",
|
|
3180
3180
|
{
|
|
3181
|
-
className:
|
|
3181
|
+
className: F(
|
|
3182
3182
|
"flex items-center gap-2 justify-between w-full",
|
|
3183
|
-
|
|
3183
|
+
c ? "text-primary" : "text-foreground/80"
|
|
3184
3184
|
),
|
|
3185
3185
|
children: [
|
|
3186
3186
|
/* @__PURE__ */ a.jsx("div", { className: "truncate", children: e.label }),
|
|
3187
|
-
|
|
3187
|
+
d
|
|
3188
3188
|
]
|
|
3189
3189
|
}
|
|
3190
3190
|
)
|
|
3191
3191
|
}
|
|
3192
3192
|
) : /* @__PURE__ */ a.jsxs("div", { className: "flex items-center justify-between w-full", children: [
|
|
3193
3193
|
/* @__PURE__ */ a.jsx("div", { className: "flex gap-2 truncate w-full", children: e.label }),
|
|
3194
|
-
|
|
3194
|
+
d
|
|
3195
3195
|
] })
|
|
3196
3196
|
]
|
|
3197
3197
|
}
|
|
3198
3198
|
) }),
|
|
3199
3199
|
/* @__PURE__ */ a.jsx(
|
|
3200
|
-
|
|
3200
|
+
_o,
|
|
3201
3201
|
{
|
|
3202
|
-
className:
|
|
3202
|
+
className: F(
|
|
3203
3203
|
// CollapsibleContent class is used to animate and it should only be applied when the user has triggered the toggle
|
|
3204
|
-
|
|
3205
|
-
"ms-[calc(var(--padding-nav-item)*1.125)]"
|
|
3204
|
+
o && "CollapsibleContent"
|
|
3206
3205
|
),
|
|
3207
|
-
children: /* @__PURE__ */ a.jsx("ul", { className: "mt-1 border-l
|
|
3206
|
+
children: /* @__PURE__ */ a.jsx("ul", { className: "mt-1 border-l ms-0.5", children: e.items.map((g) => /* @__PURE__ */ a.jsx(
|
|
3208
3207
|
At,
|
|
3209
3208
|
{
|
|
3210
3209
|
level: t + 1,
|
|
3211
|
-
item:
|
|
3210
|
+
item: g
|
|
3212
3211
|
},
|
|
3213
|
-
("id" in
|
|
3212
|
+
("id" in g ? g.id : "") + ("href" in g ? g.href : "") + g.label
|
|
3214
3213
|
)) })
|
|
3215
3214
|
}
|
|
3216
3215
|
)
|
|
3217
3216
|
]
|
|
3218
3217
|
}
|
|
3219
3218
|
);
|
|
3220
|
-
},
|
|
3219
|
+
}, Ze = bo(
|
|
3221
3220
|
"flex items-center gap-2 px-[--padding-nav-item] py-1.5 rounded-lg hover:bg-accent transition-colors duration-300",
|
|
3222
3221
|
{
|
|
3223
3222
|
variants: {
|
|
3224
3223
|
isTopLevel: {
|
|
3225
|
-
true: "font-
|
|
3224
|
+
true: "font-medium -mx-[--padding-nav-item]",
|
|
3225
|
+
false: "-mr-[--padding-nav-item] ml-[--padding-nav-item]"
|
|
3226
3226
|
},
|
|
3227
3227
|
isActive: {
|
|
3228
3228
|
true: "text-primary font-medium",
|
|
@@ -3232,26 +3232,30 @@ const zl = ({
|
|
|
3232
3232
|
true: "text-foreground/30",
|
|
3233
3233
|
false: ""
|
|
3234
3234
|
}
|
|
3235
|
+
},
|
|
3236
|
+
defaultVariants: {
|
|
3237
|
+
isActive: !1
|
|
3235
3238
|
}
|
|
3236
3239
|
}
|
|
3237
|
-
),
|
|
3240
|
+
), Ea = "data-anchor", At = ({
|
|
3238
3241
|
item: e,
|
|
3239
3242
|
level: t = 0
|
|
3240
3243
|
}) => {
|
|
3241
|
-
|
|
3244
|
+
var s, i;
|
|
3245
|
+
const n = Xn(), { activeAnchor: r } = Bt(), [o] = Za();
|
|
3242
3246
|
switch (e.type) {
|
|
3243
3247
|
case "category":
|
|
3244
|
-
return /* @__PURE__ */ a.jsx(
|
|
3248
|
+
return /* @__PURE__ */ a.jsx(Ql, { category: e, level: t });
|
|
3245
3249
|
case "doc":
|
|
3246
3250
|
return /* @__PURE__ */ a.jsxs(
|
|
3247
|
-
|
|
3251
|
+
Je,
|
|
3248
3252
|
{
|
|
3249
|
-
className: ({ isActive:
|
|
3250
|
-
to:
|
|
3253
|
+
className: ({ isActive: l }) => Ze({ isActive: l, isTopLevel: t === 0 }),
|
|
3254
|
+
to: wt(n == null ? void 0 : n.id, e.id),
|
|
3251
3255
|
children: [
|
|
3252
3256
|
e.icon && /* @__PURE__ */ a.jsx(e.icon, { size: 16, className: "align-[-0.125em]" }),
|
|
3253
3257
|
e.badge ? /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
|
|
3254
|
-
/* @__PURE__ */ a.jsx("span", { className: "truncate", title: e.label, children: e.label }),
|
|
3258
|
+
/* @__PURE__ */ a.jsx("span", { className: "truncate flex-1", title: e.label, children: e.label }),
|
|
3255
3259
|
/* @__PURE__ */ a.jsx(Mt, { ...e.badge })
|
|
3256
3260
|
] }) : e.label
|
|
3257
3261
|
]
|
|
@@ -3259,17 +3263,15 @@ const zl = ({
|
|
|
3259
3263
|
);
|
|
3260
3264
|
case "link":
|
|
3261
3265
|
return e.href.startsWith("#") ? /* @__PURE__ */ a.jsx(
|
|
3262
|
-
|
|
3266
|
+
qa,
|
|
3263
3267
|
{
|
|
3264
|
-
to: { hash: e.href, search:
|
|
3265
|
-
[
|
|
3266
|
-
className:
|
|
3267
|
-
|
|
3268
|
-
t === 0
|
|
3269
|
-
|
|
3270
|
-
|
|
3271
|
-
})
|
|
3272
|
-
),
|
|
3268
|
+
to: { hash: e.href, search: o.toString() },
|
|
3269
|
+
[Ea]: e.href.slice(1),
|
|
3270
|
+
className: Ze({
|
|
3271
|
+
isActive: e.href.slice(1) === r,
|
|
3272
|
+
isTopLevel: t === 0,
|
|
3273
|
+
className: ((s = e.badge) == null ? void 0 : s.placement) !== "start" && "justify-between"
|
|
3274
|
+
}),
|
|
3273
3275
|
children: e.badge ? /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
|
|
3274
3276
|
/* @__PURE__ */ a.jsx("span", { className: "truncate", title: e.label, children: e.label }),
|
|
3275
3277
|
/* @__PURE__ */ a.jsx(Mt, { ...e.badge })
|
|
@@ -3278,25 +3280,21 @@ const zl = ({
|
|
|
3278
3280
|
) : e.href.startsWith("http") ? /* @__PURE__ */ a.jsxs(
|
|
3279
3281
|
"a",
|
|
3280
3282
|
{
|
|
3281
|
-
className:
|
|
3282
|
-
Je({ isTopLevel: t === 0 }),
|
|
3283
|
-
"block"
|
|
3284
|
-
),
|
|
3283
|
+
className: Ze({ isTopLevel: t === 0 }),
|
|
3285
3284
|
href: e.href,
|
|
3286
3285
|
target: "_blank",
|
|
3287
3286
|
rel: "noopener noreferrer",
|
|
3288
3287
|
children: [
|
|
3289
3288
|
/* @__PURE__ */ a.jsx("span", { className: "whitespace-normal", children: e.label }),
|
|
3290
|
-
/* @__PURE__ */ a.
|
|
3291
|
-
" ",
|
|
3292
|
-
/* @__PURE__ */ a.jsx(Go, { className: "inline ml-1", size: 12 })
|
|
3293
|
-
] })
|
|
3289
|
+
/* @__PURE__ */ a.jsx("span", { className: "whitespace-nowrap", children: /* @__PURE__ */ a.jsx(Zo, { className: "inline -translate-y-0.5", size: 12 }) })
|
|
3294
3290
|
]
|
|
3295
3291
|
}
|
|
3296
3292
|
) : /* @__PURE__ */ a.jsx(
|
|
3297
|
-
|
|
3293
|
+
Je,
|
|
3298
3294
|
{
|
|
3299
|
-
className:
|
|
3295
|
+
className: Ze({
|
|
3296
|
+
className: ((i = e.badge) == null ? void 0 : i.placement) !== "start" && "justify-between"
|
|
3297
|
+
}),
|
|
3300
3298
|
to: e.href,
|
|
3301
3299
|
children: e.badge ? /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
|
|
3302
3300
|
/* @__PURE__ */ a.jsx("span", { className: "truncate", title: e.label, children: e.label }),
|
|
@@ -3305,17 +3303,17 @@ const zl = ({
|
|
|
3305
3303
|
}
|
|
3306
3304
|
);
|
|
3307
3305
|
}
|
|
3308
|
-
},
|
|
3306
|
+
}, Vl = (e, t = { block: "center" }) => {
|
|
3309
3307
|
if (!e) return;
|
|
3310
3308
|
const n = e.getBoundingClientRect();
|
|
3311
3309
|
n.top >= 0 && n.left >= 0 && n.bottom <= (window.innerHeight || document.documentElement.clientHeight) && n.right <= (window.innerWidth || document.documentElement.clientWidth) || e.scrollIntoView(t);
|
|
3312
|
-
},
|
|
3313
|
-
const e =
|
|
3310
|
+
}, Gl = () => {
|
|
3311
|
+
const e = Ft(), { setActiveAnchor: t } = Bt();
|
|
3314
3312
|
Ce(() => {
|
|
3315
3313
|
if (!e.hash) return;
|
|
3316
3314
|
const n = decodeURIComponent(e.hash.split("/")[0].slice(1)), r = () => {
|
|
3317
|
-
const o = document.getElementById(n), s = document.querySelector(`[${
|
|
3318
|
-
return o ? (o.scrollIntoView(),
|
|
3315
|
+
const o = document.getElementById(n), s = document.querySelector(`[${Ea}="${n}"]`);
|
|
3316
|
+
return o ? (o.scrollIntoView(), Vl(s), requestIdleCallback(() => t(n)), !0) : !1;
|
|
3319
3317
|
};
|
|
3320
3318
|
if (!r()) {
|
|
3321
3319
|
const o = new MutationObserver((s, i) => {
|
|
@@ -3324,16 +3322,16 @@ const zl = ({
|
|
|
3324
3322
|
return o.observe(document.body, { childList: !0, subtree: !0 }), () => o.disconnect();
|
|
3325
3323
|
}
|
|
3326
3324
|
}, [e.hash, t]);
|
|
3327
|
-
},
|
|
3328
|
-
const e =
|
|
3325
|
+
}, Wl = () => {
|
|
3326
|
+
const e = Ft(), t = Ht(e.pathname);
|
|
3329
3327
|
Ce(() => {
|
|
3330
3328
|
t.current !== e.pathname && (window.scrollTo(0, 0), t.current = e.pathname);
|
|
3331
3329
|
}, [e.pathname]);
|
|
3332
|
-
},
|
|
3330
|
+
}, Da = Po(({ children: e, className: t, pushMainContent: n }, r) => /* @__PURE__ */ a.jsx(
|
|
3333
3331
|
"nav",
|
|
3334
3332
|
{
|
|
3335
3333
|
"data-navigation": String(n),
|
|
3336
|
-
className:
|
|
3334
|
+
className: F(
|
|
3337
3335
|
"scrollbar peer hidden lg:flex flex-col fixed text-sm overflow-y-auto shrink-0",
|
|
3338
3336
|
"px-[--padding-nav-item] -mx-[--padding-nav-item] pb-20 mt-[--padding-content-top]",
|
|
3339
3337
|
"w-[--side-nav-width] h-[calc(100%-var(--header-height))] scroll-pt-2 gap-2",
|
|
@@ -3343,37 +3341,37 @@ const zl = ({
|
|
|
3343
3341
|
children: e
|
|
3344
3342
|
}
|
|
3345
3343
|
));
|
|
3346
|
-
|
|
3347
|
-
const
|
|
3348
|
-
const e = Ht(null), t =
|
|
3344
|
+
Da.displayName = "SidebarWrapper";
|
|
3345
|
+
const Yl = () => {
|
|
3346
|
+
const e = Ht(null), t = Ko();
|
|
3349
3347
|
return /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
|
|
3350
3348
|
/* @__PURE__ */ a.jsxs(
|
|
3351
|
-
|
|
3349
|
+
Da,
|
|
3352
3350
|
{
|
|
3353
3351
|
ref: e,
|
|
3354
|
-
pushMainContent: t.data.
|
|
3352
|
+
pushMainContent: t.data.items.length > 0,
|
|
3355
3353
|
children: [
|
|
3356
|
-
/* @__PURE__ */ a.jsx(
|
|
3357
|
-
t.data.
|
|
3358
|
-
/* @__PURE__ */ a.jsx(
|
|
3354
|
+
/* @__PURE__ */ a.jsx(ye, { name: "zudoku-before-navigation" }),
|
|
3355
|
+
t.data.items.map((n) => /* @__PURE__ */ a.jsx(At, { item: n }, n.label)),
|
|
3356
|
+
/* @__PURE__ */ a.jsx(ye, { name: "zudoku-after-navigation" })
|
|
3359
3357
|
]
|
|
3360
3358
|
}
|
|
3361
3359
|
),
|
|
3362
3360
|
/* @__PURE__ */ a.jsxs(
|
|
3363
3361
|
tn,
|
|
3364
3362
|
{
|
|
3365
|
-
className: "lg:hidden h-screen left-0 p-6 w-[320px] rounded-none",
|
|
3363
|
+
className: "lg:hidden h-screen left-0 p-6 w-[320px] rounded-none overflow-auto",
|
|
3366
3364
|
"aria-describedby": void 0,
|
|
3367
3365
|
children: [
|
|
3368
3366
|
/* @__PURE__ */ a.jsx(Un, { children: /* @__PURE__ */ a.jsx(nn, { children: "Sidebar" }) }),
|
|
3369
|
-
t.data.
|
|
3367
|
+
t.data.items.map((n) => /* @__PURE__ */ a.jsx(At, { item: n }, n.label))
|
|
3370
3368
|
]
|
|
3371
3369
|
}
|
|
3372
3370
|
)
|
|
3373
3371
|
] });
|
|
3374
|
-
},
|
|
3375
|
-
const t =
|
|
3376
|
-
|
|
3372
|
+
}, Xl = ({ children: e }) => {
|
|
3373
|
+
const t = Ft(), { setActiveAnchor: n } = Bt(), { meta: r, authentication: o } = Ae();
|
|
3374
|
+
Gl(), Wl();
|
|
3377
3375
|
const s = Ht(t.pathname);
|
|
3378
3376
|
return Ce(() => {
|
|
3379
3377
|
var i;
|
|
@@ -3386,24 +3384,24 @@ const Vl = () => {
|
|
|
3386
3384
|
(r == null ? void 0 : r.description) && /* @__PURE__ */ a.jsx("meta", { name: "description", content: r.description }),
|
|
3387
3385
|
(r == null ? void 0 : r.favicon) && /* @__PURE__ */ a.jsx("link", { rel: "icon", href: r.favicon })
|
|
3388
3386
|
] }),
|
|
3389
|
-
/* @__PURE__ */ a.jsx(
|
|
3390
|
-
/* @__PURE__ */ a.jsx(
|
|
3391
|
-
/* @__PURE__ */ a.jsx(
|
|
3387
|
+
/* @__PURE__ */ a.jsx(ye, { name: "layout-before-head" }),
|
|
3388
|
+
/* @__PURE__ */ a.jsx(Ma, {}),
|
|
3389
|
+
/* @__PURE__ */ a.jsx(ye, { name: "layout-after-head" }),
|
|
3392
3390
|
/* @__PURE__ */ a.jsx("div", { className: "w-full max-w-screen-2xl mx-auto px-10 lg:px-12", children: /* @__PURE__ */ a.jsx(
|
|
3393
|
-
|
|
3391
|
+
Vn,
|
|
3394
3392
|
{
|
|
3395
|
-
fallback: /* @__PURE__ */ a.jsx("main", { className: "grid h-[calc(100vh-var(--header-height))] place-items-center", children: /* @__PURE__ */ a.jsx(
|
|
3393
|
+
fallback: /* @__PURE__ */ a.jsx("main", { className: "grid h-[calc(100vh-var(--header-height))] place-items-center", children: /* @__PURE__ */ a.jsx(us, {}) }),
|
|
3396
3394
|
children: /* @__PURE__ */ a.jsxs(en, { direction: "left", children: [
|
|
3397
|
-
/* @__PURE__ */ a.jsx(
|
|
3395
|
+
/* @__PURE__ */ a.jsx(Yl, {}),
|
|
3398
3396
|
/* @__PURE__ */ a.jsx(
|
|
3399
3397
|
"div",
|
|
3400
3398
|
{
|
|
3401
|
-
className:
|
|
3399
|
+
className: F(
|
|
3402
3400
|
"lg:hidden -mx-10 px-10 py-2 sticky bg-background/80 backdrop-blur z-10 top-0 left-0 right-0 border-b",
|
|
3403
3401
|
"peer-data-[navigation=false]:hidden"
|
|
3404
3402
|
),
|
|
3405
|
-
children: /* @__PURE__ */ a.jsxs(
|
|
3406
|
-
/* @__PURE__ */ a.jsx(
|
|
3403
|
+
children: /* @__PURE__ */ a.jsxs(ya, { className: "flex items-center gap-2", children: [
|
|
3404
|
+
/* @__PURE__ */ a.jsx(Jo, { size: 16, strokeWidth: 1.5 }),
|
|
3407
3405
|
/* @__PURE__ */ a.jsx("span", { className: "text-sm", children: "Menu" })
|
|
3408
3406
|
] })
|
|
3409
3407
|
}
|
|
@@ -3411,7 +3409,7 @@ const Vl = () => {
|
|
|
3411
3409
|
/* @__PURE__ */ a.jsxs(
|
|
3412
3410
|
"main",
|
|
3413
3411
|
{
|
|
3414
|
-
className:
|
|
3412
|
+
className: F(
|
|
3415
3413
|
"h-full dark:border-white/10 translate-x-0",
|
|
3416
3414
|
"lg:overflow-visible",
|
|
3417
3415
|
// This works in tandem with the `SidebarWrapper` component
|
|
@@ -3419,9 +3417,9 @@ const Vl = () => {
|
|
|
3419
3417
|
"lg:peer-data-[navigation=true]:translate-x-[--side-nav-width] lg:peer-data-[navigation=true]:pl-12"
|
|
3420
3418
|
),
|
|
3421
3419
|
children: [
|
|
3422
|
-
/* @__PURE__ */ a.jsx(
|
|
3420
|
+
/* @__PURE__ */ a.jsx(ye, { name: "zudoku-before-content" }),
|
|
3423
3421
|
e ?? /* @__PURE__ */ a.jsx(An, {}),
|
|
3424
|
-
/* @__PURE__ */ a.jsx(
|
|
3422
|
+
/* @__PURE__ */ a.jsx(ye, { name: "zudoku-after-content" })
|
|
3425
3423
|
]
|
|
3426
3424
|
}
|
|
3427
3425
|
)
|
|
@@ -3429,18 +3427,22 @@ const Vl = () => {
|
|
|
3429
3427
|
}
|
|
3430
3428
|
) })
|
|
3431
3429
|
] });
|
|
3432
|
-
},
|
|
3430
|
+
}, gc = Qa, vc = rn, wc = Xl, yc = to, xc = ds, bc = Ps, Sc = js, Cc = kt, Mc = Ae, Rc = Ja, Ec = rn, Dc = So, Pc = Oo, jc = Nt, Nc = $t;
|
|
3433
3431
|
export {
|
|
3434
|
-
|
|
3435
|
-
|
|
3436
|
-
|
|
3437
|
-
|
|
3438
|
-
|
|
3439
|
-
|
|
3440
|
-
|
|
3441
|
-
|
|
3442
|
-
|
|
3443
|
-
|
|
3444
|
-
|
|
3432
|
+
bc as Bootstrap,
|
|
3433
|
+
Sc as BootstrapStatic,
|
|
3434
|
+
jc as Button,
|
|
3435
|
+
Dc as Callout,
|
|
3436
|
+
Pc as ClientOnly,
|
|
3437
|
+
vc as DevPortal,
|
|
3438
|
+
Cc as Head,
|
|
3439
|
+
wc as Layout,
|
|
3440
|
+
Nc as Link,
|
|
3441
|
+
yc as RouterError,
|
|
3442
|
+
xc as ServerError,
|
|
3443
|
+
Ec as Zudoku,
|
|
3444
|
+
Rc as useAuth,
|
|
3445
|
+
gc as useMDXComponents,
|
|
3446
|
+
Mc as useZudoku
|
|
3445
3447
|
};
|
|
3446
3448
|
//# sourceMappingURL=zudoku.components.js.map
|