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