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