@pfct/purple 1.16.2 → 1.17.0
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/chunks/Accordion.DYya7dTN.js +1 -0
- package/dist/chunks/Accordion.DgWTtf1u.js +716 -0
- package/dist/chunks/Divider.CptJ_x2Y.js +1 -0
- package/dist/chunks/{Divider.DBtnaPqJ.js → Divider.DR-c4z_i.js} +16 -13
- package/dist/chunks/DotLottie.BQNTv0XO.js +5 -0
- package/dist/chunks/DotLottie.qOfU0HjI.js +1993 -0
- package/dist/chunks/Switch.D7T_jbtK.js +207 -0
- package/dist/chunks/Switch.DUWZASi8.js +1 -0
- package/dist/chunks/Toast.Bnm65xmy.js +1 -0
- package/dist/chunks/Toast.C7OnkFjA.js +698 -0
- package/dist/chunks/{bottomSheet.BGKwHjuP.js → bottomSheet.DCURoJ3z.js} +1 -1
- package/dist/chunks/{bottomSheet.C99fAuQK.js → bottomSheet.DqOEMG09.js} +1 -1
- package/dist/chunks/checkbox.DjQsU_Pk.js +1 -0
- package/dist/chunks/{checkbox.DNdnhspb.js → checkbox.Dl8nNqLc.js} +100 -92
- package/dist/chunks/dist.AclwPuO5.js +1 -0
- package/dist/chunks/{dist.BskID78S.js → dist.B0edyUiC.js} +176 -178
- package/dist/chunks/dist.B4GZ3aX4.js +111 -0
- package/dist/chunks/dist.BE2xxxwt.js +96 -0
- package/dist/chunks/dist.Ba6P-3sU.js +1 -0
- package/dist/chunks/dist.BaV_5zx8.js +186 -0
- package/dist/chunks/{dist.CDZCWPu4.js → dist.BnLwXMBJ.js} +8 -4
- package/dist/chunks/dist.BpQ7SpeW.js +227 -0
- package/dist/chunks/dist.Bui5aGSB.js +197 -0
- package/dist/chunks/dist.CBOTGT1c.js +1 -0
- package/dist/chunks/dist.CIvT5XE_.js +1 -0
- package/dist/chunks/dist.CKG-hzoQ.js +1 -0
- package/dist/chunks/{dist.QtpYoD01.js → dist.CVClT59R.js} +8 -3
- package/dist/chunks/dist.CcSbgqVt.js +1 -0
- package/dist/chunks/dist.Cf8FjzvS.js +1 -0
- package/dist/chunks/{dist.DIjdcvlQ.js → dist.Cx1JFVV3.js} +48 -59
- package/dist/chunks/dist.D7s7BenH.js +1 -0
- package/dist/chunks/dist.DQ5uOc4y.js +1 -0
- package/dist/chunks/dist.DWzqVshx.js +16 -0
- package/dist/chunks/dist.DfLaHIBc.js +1 -0
- package/dist/chunks/dist.DomaJxrX.js +1 -0
- package/dist/chunks/dist.e7n2cf43.js +144 -0
- package/dist/chunks/dist.gUJz6qTg.js +185 -0
- package/dist/chunks/dist.zJ3rbM0i.js +1 -0
- package/dist/chunks/drawer.Cots0_ea.js +7 -0
- package/dist/chunks/drawer.ftfBm36h.js +1836 -0
- package/dist/chunks/es2015.CfvYaoE5.js +41 -0
- package/dist/chunks/{es2015.ByVyszJo.js → es2015.DCKfm2VN.js} +168 -187
- package/dist/chunks/{src.D-VoFbup.js → src.BAhu5d2_.js} +1 -1
- package/dist/chunks/{src.CmgILXZE.js → src.DlM6Ki-I.js} +5 -5
- package/dist/chunks/tooltip.8vKL7w2a.js +1 -0
- package/dist/chunks/tooltip.D9PoXwtV.js +448 -0
- package/dist/components/Accordion/index.cjs.js +1 -1
- package/dist/components/Accordion/index.esm.js +1 -1
- package/dist/components/Control/Switch/index.cjs.js +1 -1
- package/dist/components/Control/Switch/index.esm.js +1 -1
- package/dist/components/Control/index.cjs.js +1 -1
- package/dist/components/Control/index.esm.js +2 -2
- package/dist/components/Divider/index.cjs.js +1 -1
- package/dist/components/Divider/index.esm.js +1 -1
- package/dist/components/LegacyModal/index.cjs.js +1 -1
- package/dist/components/LegacyModal/index.esm.js +1 -1
- package/dist/components/MiniButton/IconMiniButton/index.cjs.js +1 -1
- package/dist/components/MiniButton/IconMiniButton/index.esm.js +1 -1
- package/dist/components/MiniButton/UnderLineMiniButton/index.cjs.js +1 -1
- package/dist/components/MiniButton/UnderLineMiniButton/index.esm.js +1 -1
- package/dist/components/Modal/index.cjs.js +1 -1
- package/dist/components/Modal/index.esm.js +1 -1
- package/dist/components/Pagination/index.cjs.js +1 -1
- package/dist/components/Pagination/index.esm.js +1 -1
- package/dist/components/Tabs/FillTabs/index.cjs.js +1 -1
- package/dist/components/Tabs/FillTabs/index.esm.js +1 -1
- package/dist/components/Tabs/index.cjs.js +1 -1
- package/dist/components/Tabs/index.esm.js +1 -1
- package/dist/components/Tag/index.cjs.js +1 -1
- package/dist/components/Tag/index.esm.js +1 -1
- package/dist/components/Terms/index.cjs.js +1 -1
- package/dist/components/Terms/index.esm.js +3 -3
- package/dist/components/Toast/index.cjs.js +1 -1
- package/dist/components/Toast/index.esm.js +1 -1
- package/dist/components/index.cjs.js +1 -1
- package/dist/components/index.esm.js +8 -8
- package/dist/components/ui/bottomSheet.cjs.js +1 -1
- package/dist/components/ui/bottomSheet.esm.js +1 -1
- package/dist/components/ui/button.cjs.js +1 -1
- package/dist/components/ui/button.esm.js +1 -1
- package/dist/components/ui/checkbox.cjs.js +1 -1
- package/dist/components/ui/checkbox.esm.js +1 -1
- package/dist/components/ui/dialog.cjs.js +1 -1
- package/dist/components/ui/dialog.esm.js +1 -1
- package/dist/components/ui/drawer.cjs.js +1 -1
- package/dist/components/ui/drawer.esm.js +1 -1
- package/dist/components/ui/impact-tooltip.cjs.js +1 -1
- package/dist/components/ui/impact-tooltip.esm.js +1 -1
- package/dist/components/ui/select.cjs.js +1 -1
- package/dist/components/ui/select.esm.js +3 -3
- package/dist/components/ui/tooltip.cjs.js +1 -1
- package/dist/components/ui/tooltip.esm.js +1 -1
- package/dist/components/ui/typography.cjs.js +1 -1
- package/dist/components/ui/typography.esm.js +1 -1
- package/dist/icons/src/aliases/aliases.cjs.js +1 -1
- package/dist/icons/src/aliases/aliases.d.ts +1 -1
- package/dist/icons/src/aliases/aliases.d.ts.map +1 -1
- package/dist/icons/src/aliases/aliases.esm.js +3 -3
- package/dist/icons/src/aliases/index.cjs.js +1 -1
- package/dist/icons/src/aliases/index.esm.js +3 -3
- package/dist/icons/src/aliases/prefixed.cjs.js +1 -1
- package/dist/icons/src/aliases/prefixed.d.ts +9 -9
- package/dist/icons/src/aliases/prefixed.d.ts.map +1 -1
- package/dist/icons/src/aliases/prefixed.esm.js +3 -3
- package/dist/icons/src/aliases/suffixed.cjs.js +1 -1
- package/dist/icons/src/aliases/suffixed.d.ts +10 -10
- package/dist/icons/src/aliases/suffixed.d.ts.map +1 -1
- package/dist/icons/src/aliases/suffixed.esm.js +3 -3
- package/dist/icons/src/icons/index.cjs.js +1 -1
- package/dist/icons/src/icons/index.esm.js +3 -3
- package/dist/index.cjs.js +1 -1
- package/dist/index.esm.js +12 -12
- package/dist/library/DotLottie/index.cjs.js +1 -1
- package/dist/library/DotLottie/index.d.ts +13 -0
- package/dist/library/DotLottie/index.d.ts.map +1 -1
- package/dist/library/DotLottie/index.esm.js +1 -1
- package/dist/library/Lottie/index.cjs.js +1 -1
- package/dist/library/Lottie/index.d.ts +13 -0
- package/dist/library/Lottie/index.d.ts.map +1 -1
- package/dist/library/Lottie/index.esm.js +25 -25
- package/dist/library/index.cjs.js +1 -1
- package/dist/library/index.esm.js +1 -1
- package/package.json +4 -4
- package/dist/chunks/Accordion.Cs1f4aQZ.js +0 -373
- package/dist/chunks/Accordion.ZIp0NsA0.js +0 -1
- package/dist/chunks/Divider.BIS4pXEy.js +0 -1
- package/dist/chunks/DotLottie.CaDygpsw.js +0 -73962
- package/dist/chunks/DotLottie.Cf-SL2bJ.js +0 -5
- package/dist/chunks/Switch.C6xwIjJR.js +0 -1
- package/dist/chunks/Switch.D_myxCrS.js +0 -200
- package/dist/chunks/Toast.Cjdk4za6.js +0 -1
- package/dist/chunks/Toast.D1-VfeA2.js +0 -685
- package/dist/chunks/checkbox.CfWB_nqn.js +0 -1
- package/dist/chunks/dist.B2wZmrK1.js +0 -98
- package/dist/chunks/dist.B8tpQk-4.js +0 -1
- package/dist/chunks/dist.BC0-iqKU.js +0 -1
- package/dist/chunks/dist.BGATFz6w.js +0 -1
- package/dist/chunks/dist.BQIeYu70.js +0 -1
- package/dist/chunks/dist.BWsA5f1f.js +0 -1
- package/dist/chunks/dist.BixLWWwb.js +0 -71
- package/dist/chunks/dist.Bxqi8VAi.js +0 -1
- package/dist/chunks/dist.C8FJXTu6.js +0 -10
- package/dist/chunks/dist.C8NniehT.js +0 -1
- package/dist/chunks/dist.C8k7jQIp.js +0 -87
- package/dist/chunks/dist.CEJ-WCY_.js +0 -44
- package/dist/chunks/dist.CIQdvun-.js +0 -1
- package/dist/chunks/dist.Cff8LOoN.js +0 -67
- package/dist/chunks/dist.CmRTDXGG.js +0 -1
- package/dist/chunks/dist.CwMFqhEQ.js +0 -146
- package/dist/chunks/dist.CwWM0zXK.js +0 -25
- package/dist/chunks/dist.CyhalHxz.js +0 -1
- package/dist/chunks/dist.Czpint58.js +0 -1
- package/dist/chunks/dist.D3cPoDZ_.js +0 -194
- package/dist/chunks/dist.D4mQo5QB.js +0 -1
- package/dist/chunks/dist.D5ataprQ.js +0 -1
- package/dist/chunks/dist.D6A3yc_d.js +0 -11
- package/dist/chunks/dist.DKOi9kq6.js +0 -1
- package/dist/chunks/dist.DhCw5vjE.js +0 -1
- package/dist/chunks/dist.DrfVZqiO.js +0 -186
- package/dist/chunks/dist.SHmlpKFY.js +0 -1
- package/dist/chunks/dist.kg7EEYPp.js +0 -12
- package/dist/chunks/drawer.Cji5AtcU.js +0 -1720
- package/dist/chunks/drawer.Gt1AjdVH.js +0 -7
- package/dist/chunks/es2015.D2emqwtq.js +0 -41
- package/dist/chunks/tooltip.DGgNTZ5B.js +0 -444
- package/dist/chunks/tooltip.vEwTtt8v.js +0 -1
|
@@ -1,1720 +0,0 @@
|
|
|
1
|
-
import { t as e } from "./dist.CwWM0zXK.js";
|
|
2
|
-
import { n as t, t as n } from "./dist.CEJ-WCY_.js";
|
|
3
|
-
import { t as r } from "./dist.kg7EEYPp.js";
|
|
4
|
-
import { t as i } from "./utils.UNiIm9Bz.js";
|
|
5
|
-
import { t as a } from "./dist.C8FJXTu6.js";
|
|
6
|
-
import { n as o, r as s, t as c } from "./es2015.ByVyszJo.js";
|
|
7
|
-
import * as l from "react";
|
|
8
|
-
import u, { useEffect as d, useLayoutEffect as f, useMemo as p } from "react";
|
|
9
|
-
import { Fragment as m, jsx as h, jsxs as g } from "react/jsx-runtime";
|
|
10
|
-
import * as _ from "react-dom";
|
|
11
|
-
typeof window < "u" && window.document && window.document.createElement;
|
|
12
|
-
function v(e, t, { checkForDefaultPrevented: n = !0 } = {}) {
|
|
13
|
-
return function(r) {
|
|
14
|
-
if (e?.(r), n === !1 || !r.defaultPrevented) return t?.(r);
|
|
15
|
-
};
|
|
16
|
-
}
|
|
17
|
-
//#endregion
|
|
18
|
-
//#region node_modules/vaul/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-context/dist/index.mjs
|
|
19
|
-
function y(e, t) {
|
|
20
|
-
let n = l.createContext(t);
|
|
21
|
-
n.displayName = e + "Context";
|
|
22
|
-
let r = (e) => {
|
|
23
|
-
let { children: t, ...r } = e, i = l.useMemo(() => r, Object.values(r));
|
|
24
|
-
return /* @__PURE__ */ h(n.Provider, {
|
|
25
|
-
value: i,
|
|
26
|
-
children: t
|
|
27
|
-
});
|
|
28
|
-
};
|
|
29
|
-
r.displayName = e + "Provider";
|
|
30
|
-
function i(r) {
|
|
31
|
-
let i = l.useContext(n);
|
|
32
|
-
if (i) return i;
|
|
33
|
-
if (t !== void 0) return t;
|
|
34
|
-
throw Error(`\`${r}\` must be used within \`${e}\``);
|
|
35
|
-
}
|
|
36
|
-
return [r, i];
|
|
37
|
-
}
|
|
38
|
-
function b(e, t = []) {
|
|
39
|
-
let n = [];
|
|
40
|
-
function r(t, r) {
|
|
41
|
-
let i = l.createContext(r);
|
|
42
|
-
i.displayName = t + "Context";
|
|
43
|
-
let a = n.length;
|
|
44
|
-
n = [...n, r];
|
|
45
|
-
let o = (t) => {
|
|
46
|
-
let { scope: n, children: r, ...o } = t, s = n?.[e]?.[a] || i, c = l.useMemo(() => o, Object.values(o));
|
|
47
|
-
return /* @__PURE__ */ h(s.Provider, {
|
|
48
|
-
value: c,
|
|
49
|
-
children: r
|
|
50
|
-
});
|
|
51
|
-
};
|
|
52
|
-
o.displayName = t + "Provider";
|
|
53
|
-
function s(n, o) {
|
|
54
|
-
let s = o?.[e]?.[a] || i, c = l.useContext(s);
|
|
55
|
-
if (c) return c;
|
|
56
|
-
if (r !== void 0) return r;
|
|
57
|
-
throw Error(`\`${n}\` must be used within \`${t}\``);
|
|
58
|
-
}
|
|
59
|
-
return [o, s];
|
|
60
|
-
}
|
|
61
|
-
let i = () => {
|
|
62
|
-
let t = n.map((e) => l.createContext(e));
|
|
63
|
-
return function(n) {
|
|
64
|
-
let r = n?.[e] || t;
|
|
65
|
-
return l.useMemo(() => ({ [`__scope${e}`]: {
|
|
66
|
-
...n,
|
|
67
|
-
[e]: r
|
|
68
|
-
} }), [n, r]);
|
|
69
|
-
};
|
|
70
|
-
};
|
|
71
|
-
return i.scopeName = e, [r, x(i, ...t)];
|
|
72
|
-
}
|
|
73
|
-
function x(...e) {
|
|
74
|
-
let t = e[0];
|
|
75
|
-
if (e.length === 1) return t;
|
|
76
|
-
let n = () => {
|
|
77
|
-
let n = e.map((e) => ({
|
|
78
|
-
useScope: e(),
|
|
79
|
-
scopeName: e.scopeName
|
|
80
|
-
}));
|
|
81
|
-
return function(e) {
|
|
82
|
-
let r = n.reduce((t, { useScope: n, scopeName: r }) => {
|
|
83
|
-
let i = n(e)[`__scope${r}`];
|
|
84
|
-
return {
|
|
85
|
-
...t,
|
|
86
|
-
...i
|
|
87
|
-
};
|
|
88
|
-
}, {});
|
|
89
|
-
return l.useMemo(() => ({ [`__scope${t.scopeName}`]: r }), [r]);
|
|
90
|
-
};
|
|
91
|
-
};
|
|
92
|
-
return n.scopeName = t.scopeName, n;
|
|
93
|
-
}
|
|
94
|
-
//#endregion
|
|
95
|
-
//#region node_modules/vaul/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-slot/dist/index.mjs
|
|
96
|
-
// @__NO_SIDE_EFFECTS__
|
|
97
|
-
function S(t) {
|
|
98
|
-
let n = l.forwardRef((n, r) => {
|
|
99
|
-
let { children: i, ...a } = n, o = null, s = !1, c = [];
|
|
100
|
-
E(i) && typeof O == "function" && (i = O(i._payload)), l.Children.forEach(i, (e) => {
|
|
101
|
-
if (te(e)) {
|
|
102
|
-
s = !0;
|
|
103
|
-
let t = e, n = "child" in t.props ? t.props.child : t.props.children;
|
|
104
|
-
E(n) && typeof O == "function" && (n = O(n._payload)), o = C(t, n), c.push(o?.props?.children);
|
|
105
|
-
} else c.push(e);
|
|
106
|
-
}), o ? o = l.cloneElement(o, void 0, c) : !s && l.Children.count(i) === 1 && l.isValidElement(i) && (o = i);
|
|
107
|
-
let u = o ? T(o) : void 0, d = e(r, u);
|
|
108
|
-
if (!o) {
|
|
109
|
-
if (i || i === 0) throw Error(s ? ie(t) : re(t));
|
|
110
|
-
return i;
|
|
111
|
-
}
|
|
112
|
-
let f = w(a, o.props ?? {});
|
|
113
|
-
return o.type !== l.Fragment && (f.ref = r ? d : u), l.cloneElement(o, f);
|
|
114
|
-
});
|
|
115
|
-
return n.displayName = `${t}.Slot`, n;
|
|
116
|
-
}
|
|
117
|
-
var ee = Symbol.for("radix.slottable"), C = (e, t) => {
|
|
118
|
-
if ("child" in e.props) {
|
|
119
|
-
let t = e.props.child;
|
|
120
|
-
return l.isValidElement(t) ? l.cloneElement(t, void 0, e.props.children(t.props.children)) : null;
|
|
121
|
-
}
|
|
122
|
-
return l.isValidElement(t) ? t : null;
|
|
123
|
-
};
|
|
124
|
-
function w(e, t) {
|
|
125
|
-
let n = { ...t };
|
|
126
|
-
for (let r in t) {
|
|
127
|
-
let i = e[r], a = t[r];
|
|
128
|
-
/^on[A-Z]/.test(r) ? i && a ? n[r] = (...e) => {
|
|
129
|
-
let t = a(...e);
|
|
130
|
-
return i(...e), t;
|
|
131
|
-
} : i && (n[r] = i) : r === "style" ? n[r] = {
|
|
132
|
-
...i,
|
|
133
|
-
...a
|
|
134
|
-
} : r === "className" && (n[r] = [i, a].filter(Boolean).join(" "));
|
|
135
|
-
}
|
|
136
|
-
return {
|
|
137
|
-
...e,
|
|
138
|
-
...n
|
|
139
|
-
};
|
|
140
|
-
}
|
|
141
|
-
function T(e) {
|
|
142
|
-
let t = Object.getOwnPropertyDescriptor(e.props, "ref")?.get, n = t && "isReactWarning" in t && t.isReactWarning;
|
|
143
|
-
return n ? e.ref : (t = Object.getOwnPropertyDescriptor(e, "ref")?.get, n = t && "isReactWarning" in t && t.isReactWarning, n ? e.props.ref : e.props.ref || e.ref);
|
|
144
|
-
}
|
|
145
|
-
function te(e) {
|
|
146
|
-
return l.isValidElement(e) && typeof e.type == "function" && "__radixId" in e.type && e.type.__radixId === ee;
|
|
147
|
-
}
|
|
148
|
-
var ne = Symbol.for("react.lazy");
|
|
149
|
-
function E(e) {
|
|
150
|
-
return typeof e == "object" && !!e && "$$typeof" in e && e.$$typeof === ne && "_payload" in e && D(e._payload);
|
|
151
|
-
}
|
|
152
|
-
function D(e) {
|
|
153
|
-
return typeof e == "object" && !!e && "then" in e;
|
|
154
|
-
}
|
|
155
|
-
var re = (e) => `${e} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`, ie = (e) => `${e} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`, O = l.use, k = [
|
|
156
|
-
"a",
|
|
157
|
-
"button",
|
|
158
|
-
"div",
|
|
159
|
-
"form",
|
|
160
|
-
"h2",
|
|
161
|
-
"h3",
|
|
162
|
-
"img",
|
|
163
|
-
"input",
|
|
164
|
-
"label",
|
|
165
|
-
"li",
|
|
166
|
-
"nav",
|
|
167
|
-
"ol",
|
|
168
|
-
"p",
|
|
169
|
-
"select",
|
|
170
|
-
"span",
|
|
171
|
-
"svg",
|
|
172
|
-
"ul"
|
|
173
|
-
].reduce((e, t) => {
|
|
174
|
-
let n = /* @__PURE__ */ S(`Primitive.${t}`), r = l.forwardRef((e, r) => {
|
|
175
|
-
let { asChild: i, ...a } = e, o = i ? n : t;
|
|
176
|
-
return typeof window < "u" && (window[Symbol.for("radix-ui")] = !0), /* @__PURE__ */ h(o, {
|
|
177
|
-
...a,
|
|
178
|
-
ref: r
|
|
179
|
-
});
|
|
180
|
-
});
|
|
181
|
-
return r.displayName = `Primitive.${t}`, {
|
|
182
|
-
...e,
|
|
183
|
-
[t]: r
|
|
184
|
-
};
|
|
185
|
-
}, {});
|
|
186
|
-
function ae(e, t) {
|
|
187
|
-
e && _.flushSync(() => e.dispatchEvent(t));
|
|
188
|
-
}
|
|
189
|
-
//#endregion
|
|
190
|
-
//#region node_modules/@radix-ui/react-use-escape-keydown/dist/index.mjs
|
|
191
|
-
function oe(e, t = globalThis?.document) {
|
|
192
|
-
let n = a(e);
|
|
193
|
-
l.useEffect(() => {
|
|
194
|
-
let e = (e) => {
|
|
195
|
-
e.key === "Escape" && n(e);
|
|
196
|
-
};
|
|
197
|
-
return t.addEventListener("keydown", e, { capture: !0 }), () => t.removeEventListener("keydown", e, { capture: !0 });
|
|
198
|
-
}, [n, t]);
|
|
199
|
-
}
|
|
200
|
-
//#endregion
|
|
201
|
-
//#region node_modules/vaul/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-dismissable-layer/dist/index.mjs
|
|
202
|
-
var se = "DismissableLayer", A = "dismissableLayer.update", j = "dismissableLayer.pointerDownOutside", ce = "dismissableLayer.focusOutside", M, N = l.createContext({
|
|
203
|
-
layers: /* @__PURE__ */ new Set(),
|
|
204
|
-
layersWithOutsidePointerEventsDisabled: /* @__PURE__ */ new Set(),
|
|
205
|
-
branches: /* @__PURE__ */ new Set()
|
|
206
|
-
}), P = l.forwardRef((t, n) => {
|
|
207
|
-
let { disableOutsidePointerEvents: r = !1, onEscapeKeyDown: i, onPointerDownOutside: a, onFocusOutside: o, onInteractOutside: s, onDismiss: c, ...u } = t, d = l.useContext(N), [f, p] = l.useState(null), m = f?.ownerDocument ?? globalThis?.document, [, g] = l.useState({}), _ = e(n, (e) => p(e)), y = Array.from(d.layers), [b] = [...d.layersWithOutsidePointerEventsDisabled].slice(-1), x = y.indexOf(b), S = f ? y.indexOf(f) : -1, ee = d.layersWithOutsidePointerEventsDisabled.size > 0, C = S >= x, w = F((e) => {
|
|
208
|
-
let t = e.target, n = [...d.branches].some((e) => e.contains(t));
|
|
209
|
-
!C || n || (a?.(e), s?.(e), e.defaultPrevented || c?.());
|
|
210
|
-
}, m), T = de((e) => {
|
|
211
|
-
let t = e.target;
|
|
212
|
-
[...d.branches].some((e) => e.contains(t)) || (o?.(e), s?.(e), e.defaultPrevented || c?.());
|
|
213
|
-
}, m);
|
|
214
|
-
return oe((e) => {
|
|
215
|
-
S === d.layers.size - 1 && (i?.(e), !e.defaultPrevented && c && (e.preventDefault(), c()));
|
|
216
|
-
}, m), l.useEffect(() => {
|
|
217
|
-
if (f) return r && (d.layersWithOutsidePointerEventsDisabled.size === 0 && (M = m.body.style.pointerEvents, m.body.style.pointerEvents = "none"), d.layersWithOutsidePointerEventsDisabled.add(f)), d.layers.add(f), fe(), () => {
|
|
218
|
-
r && (d.layersWithOutsidePointerEventsDisabled.delete(f), d.layersWithOutsidePointerEventsDisabled.size === 0 && (m.body.style.pointerEvents = M));
|
|
219
|
-
};
|
|
220
|
-
}, [
|
|
221
|
-
f,
|
|
222
|
-
m,
|
|
223
|
-
r,
|
|
224
|
-
d
|
|
225
|
-
]), l.useEffect(() => () => {
|
|
226
|
-
f && (d.layers.delete(f), d.layersWithOutsidePointerEventsDisabled.delete(f), fe());
|
|
227
|
-
}, [f, d]), l.useEffect(() => {
|
|
228
|
-
let e = () => g({});
|
|
229
|
-
return document.addEventListener(A, e), () => document.removeEventListener(A, e);
|
|
230
|
-
}, []), /* @__PURE__ */ h(k.div, {
|
|
231
|
-
...u,
|
|
232
|
-
ref: _,
|
|
233
|
-
style: {
|
|
234
|
-
pointerEvents: ee ? C ? "auto" : "none" : void 0,
|
|
235
|
-
...t.style
|
|
236
|
-
},
|
|
237
|
-
onFocusCapture: v(t.onFocusCapture, T.onFocusCapture),
|
|
238
|
-
onBlurCapture: v(t.onBlurCapture, T.onBlurCapture),
|
|
239
|
-
onPointerDownCapture: v(t.onPointerDownCapture, w.onPointerDownCapture)
|
|
240
|
-
});
|
|
241
|
-
});
|
|
242
|
-
P.displayName = se;
|
|
243
|
-
var le = "DismissableLayerBranch", ue = l.forwardRef((t, n) => {
|
|
244
|
-
let r = l.useContext(N), i = l.useRef(null), a = e(n, i);
|
|
245
|
-
return l.useEffect(() => {
|
|
246
|
-
let e = i.current;
|
|
247
|
-
if (e) return r.branches.add(e), () => {
|
|
248
|
-
r.branches.delete(e);
|
|
249
|
-
};
|
|
250
|
-
}, [r.branches]), /* @__PURE__ */ h(k.div, {
|
|
251
|
-
...t,
|
|
252
|
-
ref: a
|
|
253
|
-
});
|
|
254
|
-
});
|
|
255
|
-
ue.displayName = le;
|
|
256
|
-
function F(e, t = globalThis?.document) {
|
|
257
|
-
let n = a(e), r = l.useRef(!1), i = l.useRef(() => {});
|
|
258
|
-
return l.useEffect(() => {
|
|
259
|
-
let e = (e) => {
|
|
260
|
-
if (e.target && !r.current) {
|
|
261
|
-
let r = function() {
|
|
262
|
-
I(j, n, a, { discrete: !0 });
|
|
263
|
-
}, a = { originalEvent: e };
|
|
264
|
-
e.pointerType === "touch" ? (t.removeEventListener("click", i.current), i.current = r, t.addEventListener("click", i.current, { once: !0 })) : r();
|
|
265
|
-
} else t.removeEventListener("click", i.current);
|
|
266
|
-
r.current = !1;
|
|
267
|
-
}, a = window.setTimeout(() => {
|
|
268
|
-
t.addEventListener("pointerdown", e);
|
|
269
|
-
}, 0);
|
|
270
|
-
return () => {
|
|
271
|
-
window.clearTimeout(a), t.removeEventListener("pointerdown", e), t.removeEventListener("click", i.current);
|
|
272
|
-
};
|
|
273
|
-
}, [t, n]), { onPointerDownCapture: () => r.current = !0 };
|
|
274
|
-
}
|
|
275
|
-
function de(e, t = globalThis?.document) {
|
|
276
|
-
let n = a(e), r = l.useRef(!1);
|
|
277
|
-
return l.useEffect(() => {
|
|
278
|
-
let e = (e) => {
|
|
279
|
-
e.target && !r.current && I(ce, n, { originalEvent: e }, { discrete: !1 });
|
|
280
|
-
};
|
|
281
|
-
return t.addEventListener("focusin", e), () => t.removeEventListener("focusin", e);
|
|
282
|
-
}, [t, n]), {
|
|
283
|
-
onFocusCapture: () => r.current = !0,
|
|
284
|
-
onBlurCapture: () => r.current = !1
|
|
285
|
-
};
|
|
286
|
-
}
|
|
287
|
-
function fe() {
|
|
288
|
-
let e = new CustomEvent(A);
|
|
289
|
-
document.dispatchEvent(e);
|
|
290
|
-
}
|
|
291
|
-
function I(e, t, n, { discrete: r }) {
|
|
292
|
-
let i = n.originalEvent.target, a = new CustomEvent(e, {
|
|
293
|
-
bubbles: !1,
|
|
294
|
-
cancelable: !0,
|
|
295
|
-
detail: n
|
|
296
|
-
});
|
|
297
|
-
t && i.addEventListener(e, t, { once: !0 }), r ? ae(i, a) : i.dispatchEvent(a);
|
|
298
|
-
}
|
|
299
|
-
//#endregion
|
|
300
|
-
//#region node_modules/vaul/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-focus-scope/dist/index.mjs
|
|
301
|
-
var L = "focusScope.autoFocusOnMount", R = "focusScope.autoFocusOnUnmount", pe = {
|
|
302
|
-
bubbles: !1,
|
|
303
|
-
cancelable: !0
|
|
304
|
-
}, me = "FocusScope", z = l.forwardRef((t, n) => {
|
|
305
|
-
let { loop: r = !1, trapped: i = !1, onMountAutoFocus: o, onUnmountAutoFocus: s, ...c } = t, [u, d] = l.useState(null), f = a(o), p = a(s), m = l.useRef(null), g = e(n, (e) => d(e)), _ = l.useRef({
|
|
306
|
-
paused: !1,
|
|
307
|
-
pause() {
|
|
308
|
-
this.paused = !0;
|
|
309
|
-
},
|
|
310
|
-
resume() {
|
|
311
|
-
this.paused = !1;
|
|
312
|
-
}
|
|
313
|
-
}).current;
|
|
314
|
-
l.useEffect(() => {
|
|
315
|
-
if (i) {
|
|
316
|
-
let e = function(e) {
|
|
317
|
-
if (_.paused || !u) return;
|
|
318
|
-
let t = e.target;
|
|
319
|
-
u.contains(t) ? m.current = t : V(m.current, { select: !0 });
|
|
320
|
-
}, t = function(e) {
|
|
321
|
-
if (_.paused || !u) return;
|
|
322
|
-
let t = e.relatedTarget;
|
|
323
|
-
t !== null && (u.contains(t) || V(m.current, { select: !0 }));
|
|
324
|
-
}, n = function(e) {
|
|
325
|
-
if (document.activeElement === document.body) for (let t of e) t.removedNodes.length > 0 && V(u);
|
|
326
|
-
};
|
|
327
|
-
document.addEventListener("focusin", e), document.addEventListener("focusout", t);
|
|
328
|
-
let r = new MutationObserver(n);
|
|
329
|
-
return u && r.observe(u, {
|
|
330
|
-
childList: !0,
|
|
331
|
-
subtree: !0
|
|
332
|
-
}), () => {
|
|
333
|
-
document.removeEventListener("focusin", e), document.removeEventListener("focusout", t), r.disconnect();
|
|
334
|
-
};
|
|
335
|
-
}
|
|
336
|
-
}, [
|
|
337
|
-
i,
|
|
338
|
-
u,
|
|
339
|
-
_.paused
|
|
340
|
-
]), l.useEffect(() => {
|
|
341
|
-
if (u) {
|
|
342
|
-
H.add(_);
|
|
343
|
-
let e = document.activeElement;
|
|
344
|
-
if (!u.contains(e)) {
|
|
345
|
-
let t = new CustomEvent(L, pe);
|
|
346
|
-
u.addEventListener(L, f), u.dispatchEvent(t), t.defaultPrevented || (he(Se(B(u)), { select: !0 }), document.activeElement === e && V(u));
|
|
347
|
-
}
|
|
348
|
-
return () => {
|
|
349
|
-
u.removeEventListener(L, f), setTimeout(() => {
|
|
350
|
-
let t = new CustomEvent(R, pe);
|
|
351
|
-
u.addEventListener(R, p), u.dispatchEvent(t), t.defaultPrevented || V(e ?? document.body, { select: !0 }), u.removeEventListener(R, p), H.remove(_);
|
|
352
|
-
}, 0);
|
|
353
|
-
};
|
|
354
|
-
}
|
|
355
|
-
}, [
|
|
356
|
-
u,
|
|
357
|
-
f,
|
|
358
|
-
p,
|
|
359
|
-
_
|
|
360
|
-
]);
|
|
361
|
-
let v = l.useCallback((e) => {
|
|
362
|
-
if (!r && !i || _.paused) return;
|
|
363
|
-
let t = e.key === "Tab" && !e.altKey && !e.ctrlKey && !e.metaKey, n = document.activeElement;
|
|
364
|
-
if (t && n) {
|
|
365
|
-
let t = e.currentTarget, [i, a] = ge(t);
|
|
366
|
-
i && a ? !e.shiftKey && n === a ? (e.preventDefault(), r && V(i, { select: !0 })) : e.shiftKey && n === i && (e.preventDefault(), r && V(a, { select: !0 })) : n === t && e.preventDefault();
|
|
367
|
-
}
|
|
368
|
-
}, [
|
|
369
|
-
r,
|
|
370
|
-
i,
|
|
371
|
-
_.paused
|
|
372
|
-
]);
|
|
373
|
-
return /* @__PURE__ */ h(k.div, {
|
|
374
|
-
tabIndex: -1,
|
|
375
|
-
...c,
|
|
376
|
-
ref: g,
|
|
377
|
-
onKeyDown: v
|
|
378
|
-
});
|
|
379
|
-
});
|
|
380
|
-
z.displayName = me;
|
|
381
|
-
function he(e, { select: t = !1 } = {}) {
|
|
382
|
-
let n = document.activeElement;
|
|
383
|
-
for (let r of e) if (V(r, { select: t }), document.activeElement !== n) return;
|
|
384
|
-
}
|
|
385
|
-
function ge(e) {
|
|
386
|
-
let t = B(e);
|
|
387
|
-
return [_e(t, e), _e(t.reverse(), e)];
|
|
388
|
-
}
|
|
389
|
-
function B(e) {
|
|
390
|
-
let t = [], n = document.createTreeWalker(e, NodeFilter.SHOW_ELEMENT, { acceptNode: (e) => {
|
|
391
|
-
let t = e.tagName === "INPUT" && e.type === "hidden";
|
|
392
|
-
return e.disabled || e.hidden || t ? NodeFilter.FILTER_SKIP : e.tabIndex >= 0 ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP;
|
|
393
|
-
} });
|
|
394
|
-
for (; n.nextNode();) t.push(n.currentNode);
|
|
395
|
-
return t;
|
|
396
|
-
}
|
|
397
|
-
function _e(e, t) {
|
|
398
|
-
for (let n of e) if (!ve(n, { upTo: t })) return n;
|
|
399
|
-
}
|
|
400
|
-
function ve(e, { upTo: t }) {
|
|
401
|
-
if (getComputedStyle(e).visibility === "hidden") return !0;
|
|
402
|
-
for (; e;) {
|
|
403
|
-
if (t !== void 0 && e === t) return !1;
|
|
404
|
-
if (getComputedStyle(e).display === "none") return !0;
|
|
405
|
-
e = e.parentElement;
|
|
406
|
-
}
|
|
407
|
-
return !1;
|
|
408
|
-
}
|
|
409
|
-
function ye(e) {
|
|
410
|
-
return e instanceof HTMLInputElement && "select" in e;
|
|
411
|
-
}
|
|
412
|
-
function V(e, { select: t = !1 } = {}) {
|
|
413
|
-
if (e && e.focus) {
|
|
414
|
-
let n = document.activeElement;
|
|
415
|
-
e.focus({ preventScroll: !0 }), e !== n && ye(e) && t && e.select();
|
|
416
|
-
}
|
|
417
|
-
}
|
|
418
|
-
var H = be();
|
|
419
|
-
function be() {
|
|
420
|
-
let e = [];
|
|
421
|
-
return {
|
|
422
|
-
add(t) {
|
|
423
|
-
let n = e[0];
|
|
424
|
-
t !== n && n?.pause(), e = xe(e, t), e.unshift(t);
|
|
425
|
-
},
|
|
426
|
-
remove(t) {
|
|
427
|
-
e = xe(e, t), e[0]?.resume();
|
|
428
|
-
}
|
|
429
|
-
};
|
|
430
|
-
}
|
|
431
|
-
function xe(e, t) {
|
|
432
|
-
let n = [...e], r = n.indexOf(t);
|
|
433
|
-
return r !== -1 && n.splice(r, 1), n;
|
|
434
|
-
}
|
|
435
|
-
function Se(e) {
|
|
436
|
-
return e.filter((e) => e.tagName !== "A");
|
|
437
|
-
}
|
|
438
|
-
//#endregion
|
|
439
|
-
//#region node_modules/vaul/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-portal/dist/index.mjs
|
|
440
|
-
var U = "Portal", Ce = l.forwardRef((e, n) => {
|
|
441
|
-
let { container: r, ...i } = e, [a, o] = l.useState(!1);
|
|
442
|
-
t(() => o(!0), []);
|
|
443
|
-
let s = r || a && globalThis?.document?.body;
|
|
444
|
-
return s ? _.createPortal(/* @__PURE__ */ h(k.div, {
|
|
445
|
-
...i,
|
|
446
|
-
ref: n
|
|
447
|
-
}), s) : null;
|
|
448
|
-
});
|
|
449
|
-
Ce.displayName = U;
|
|
450
|
-
//#endregion
|
|
451
|
-
//#region node_modules/vaul/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-presence/dist/index.mjs
|
|
452
|
-
function we(e, t) {
|
|
453
|
-
return l.useReducer((e, n) => t[e][n] ?? e, e);
|
|
454
|
-
}
|
|
455
|
-
var W = (e) => {
|
|
456
|
-
let { present: t, children: n } = e, r = Te(t), i = typeof n == "function" ? n({ present: r.isPresent }) : l.Children.only(n), a = De(r.ref, ke(i));
|
|
457
|
-
return typeof n == "function" || r.isPresent ? l.cloneElement(i, { ref: a }) : null;
|
|
458
|
-
};
|
|
459
|
-
W.displayName = "Presence";
|
|
460
|
-
function Te(e) {
|
|
461
|
-
let [n, r] = l.useState(), i = l.useRef(null), a = l.useRef(e), o = l.useRef("none"), [s, c] = we(e ? "mounted" : "unmounted", {
|
|
462
|
-
mounted: {
|
|
463
|
-
UNMOUNT: "unmounted",
|
|
464
|
-
ANIMATION_OUT: "unmountSuspended"
|
|
465
|
-
},
|
|
466
|
-
unmountSuspended: {
|
|
467
|
-
MOUNT: "mounted",
|
|
468
|
-
ANIMATION_END: "unmounted"
|
|
469
|
-
},
|
|
470
|
-
unmounted: { MOUNT: "mounted" }
|
|
471
|
-
});
|
|
472
|
-
return l.useEffect(() => {
|
|
473
|
-
let e = Oe(i.current);
|
|
474
|
-
o.current = s === "mounted" ? e : "none";
|
|
475
|
-
}, [s]), t(() => {
|
|
476
|
-
let t = i.current, n = a.current;
|
|
477
|
-
if (n !== e) {
|
|
478
|
-
let r = o.current, i = Oe(t);
|
|
479
|
-
e ? c("MOUNT") : i === "none" || t?.display === "none" ? c("UNMOUNT") : c(n && r !== i ? "ANIMATION_OUT" : "UNMOUNT"), a.current = e;
|
|
480
|
-
}
|
|
481
|
-
}, [e, c]), t(() => {
|
|
482
|
-
if (n) {
|
|
483
|
-
let e, t = n.ownerDocument.defaultView ?? window, r = (r) => {
|
|
484
|
-
let o = Oe(i.current).includes(CSS.escape(r.animationName));
|
|
485
|
-
if (r.target === n && o && (c("ANIMATION_END"), !a.current)) {
|
|
486
|
-
let r = n.style.animationFillMode;
|
|
487
|
-
n.style.animationFillMode = "forwards", e = t.setTimeout(() => {
|
|
488
|
-
n.style.animationFillMode === "forwards" && (n.style.animationFillMode = r);
|
|
489
|
-
});
|
|
490
|
-
}
|
|
491
|
-
}, s = (e) => {
|
|
492
|
-
e.target === n && (o.current = Oe(i.current));
|
|
493
|
-
};
|
|
494
|
-
return n.addEventListener("animationstart", s), n.addEventListener("animationcancel", r), n.addEventListener("animationend", r), () => {
|
|
495
|
-
t.clearTimeout(e), n.removeEventListener("animationstart", s), n.removeEventListener("animationcancel", r), n.removeEventListener("animationend", r);
|
|
496
|
-
};
|
|
497
|
-
} else c("ANIMATION_END");
|
|
498
|
-
}, [n, c]), {
|
|
499
|
-
isPresent: ["mounted", "unmountSuspended"].includes(s),
|
|
500
|
-
ref: l.useCallback((e) => {
|
|
501
|
-
i.current = e ? getComputedStyle(e) : null, r(e);
|
|
502
|
-
}, [])
|
|
503
|
-
};
|
|
504
|
-
}
|
|
505
|
-
function Ee(e, t) {
|
|
506
|
-
if (typeof e == "function") return e(t);
|
|
507
|
-
e != null && (e.current = t);
|
|
508
|
-
}
|
|
509
|
-
function De(...e) {
|
|
510
|
-
let t = l.useRef(e);
|
|
511
|
-
return t.current = e, l.useCallback((e) => {
|
|
512
|
-
let n = t.current, r = !1, i = n.map((t) => {
|
|
513
|
-
let n = Ee(t, e);
|
|
514
|
-
return !r && typeof n == "function" && (r = !0), n;
|
|
515
|
-
});
|
|
516
|
-
if (r) return () => {
|
|
517
|
-
for (let e = 0; e < i.length; e++) {
|
|
518
|
-
let t = i[e];
|
|
519
|
-
typeof t == "function" ? t() : Ee(n[e], null);
|
|
520
|
-
}
|
|
521
|
-
};
|
|
522
|
-
}, []);
|
|
523
|
-
}
|
|
524
|
-
function Oe(e) {
|
|
525
|
-
return e?.animationName || "none";
|
|
526
|
-
}
|
|
527
|
-
function ke(e) {
|
|
528
|
-
let t = Object.getOwnPropertyDescriptor(e.props, "ref")?.get, n = t && "isReactWarning" in t && t.isReactWarning;
|
|
529
|
-
return n ? e.ref : (t = Object.getOwnPropertyDescriptor(e, "ref")?.get, n = t && "isReactWarning" in t && t.isReactWarning, n ? e.props.ref : e.props.ref || e.ref);
|
|
530
|
-
}
|
|
531
|
-
//#endregion
|
|
532
|
-
//#region node_modules/vaul/node_modules/@radix-ui/react-dialog/dist/index.mjs
|
|
533
|
-
var Ae = "Dialog", [je, Me] = b(Ae), [Ne, G] = je(Ae), Pe = (e) => {
|
|
534
|
-
let { __scopeDialog: t, children: i, open: a, defaultOpen: o, onOpenChange: s, modal: c = !0 } = e, u = l.useRef(null), d = l.useRef(null), [f, p] = n({
|
|
535
|
-
prop: a,
|
|
536
|
-
defaultProp: o ?? !1,
|
|
537
|
-
onChange: s,
|
|
538
|
-
caller: Ae
|
|
539
|
-
});
|
|
540
|
-
return /* @__PURE__ */ h(Ne, {
|
|
541
|
-
scope: t,
|
|
542
|
-
triggerRef: u,
|
|
543
|
-
contentRef: d,
|
|
544
|
-
contentId: r(),
|
|
545
|
-
titleId: r(),
|
|
546
|
-
descriptionId: r(),
|
|
547
|
-
open: f,
|
|
548
|
-
onOpenChange: p,
|
|
549
|
-
onOpenToggle: l.useCallback(() => p((e) => !e), [p]),
|
|
550
|
-
modal: c,
|
|
551
|
-
children: i
|
|
552
|
-
});
|
|
553
|
-
};
|
|
554
|
-
Pe.displayName = Ae;
|
|
555
|
-
var Fe = "DialogTrigger", Ie = l.forwardRef((t, n) => {
|
|
556
|
-
let { __scopeDialog: r, ...i } = t, a = G(Fe, r), o = e(n, a.triggerRef);
|
|
557
|
-
return /* @__PURE__ */ h(k.button, {
|
|
558
|
-
type: "button",
|
|
559
|
-
"aria-haspopup": "dialog",
|
|
560
|
-
"aria-expanded": a.open,
|
|
561
|
-
"aria-controls": a.open ? a.contentId : void 0,
|
|
562
|
-
"data-state": tt(a.open),
|
|
563
|
-
...i,
|
|
564
|
-
ref: o,
|
|
565
|
-
onClick: v(t.onClick, a.onOpenToggle)
|
|
566
|
-
});
|
|
567
|
-
});
|
|
568
|
-
Ie.displayName = Fe;
|
|
569
|
-
var Le = "DialogPortal", [Re, ze] = je(Le, { forceMount: void 0 }), Be = (e) => {
|
|
570
|
-
let { __scopeDialog: t, forceMount: n, children: r, container: i } = e, a = G(Le, t);
|
|
571
|
-
return /* @__PURE__ */ h(Re, {
|
|
572
|
-
scope: t,
|
|
573
|
-
forceMount: n,
|
|
574
|
-
children: l.Children.map(r, (e) => /* @__PURE__ */ h(W, {
|
|
575
|
-
present: n || a.open,
|
|
576
|
-
children: /* @__PURE__ */ h(Ce, {
|
|
577
|
-
asChild: !0,
|
|
578
|
-
container: i,
|
|
579
|
-
children: e
|
|
580
|
-
})
|
|
581
|
-
}))
|
|
582
|
-
});
|
|
583
|
-
};
|
|
584
|
-
Be.displayName = Le;
|
|
585
|
-
var Ve = "DialogOverlay", He = l.forwardRef((e, t) => {
|
|
586
|
-
let n = ze(Ve, e.__scopeDialog), { forceMount: r = n.forceMount, ...i } = e, a = G(Ve, e.__scopeDialog);
|
|
587
|
-
return a.modal ? /* @__PURE__ */ h(W, {
|
|
588
|
-
present: r || a.open,
|
|
589
|
-
children: /* @__PURE__ */ h(We, {
|
|
590
|
-
...i,
|
|
591
|
-
ref: t
|
|
592
|
-
})
|
|
593
|
-
}) : null;
|
|
594
|
-
});
|
|
595
|
-
He.displayName = Ve;
|
|
596
|
-
var Ue = /* @__PURE__ */ S("DialogOverlay.RemoveScroll"), We = l.forwardRef((e, t) => {
|
|
597
|
-
let { __scopeDialog: n, ...r } = e, i = G(Ve, n);
|
|
598
|
-
return /* @__PURE__ */ h(o, {
|
|
599
|
-
as: Ue,
|
|
600
|
-
allowPinchZoom: !0,
|
|
601
|
-
shards: [i.contentRef],
|
|
602
|
-
children: /* @__PURE__ */ h(k.div, {
|
|
603
|
-
"data-state": tt(i.open),
|
|
604
|
-
...r,
|
|
605
|
-
ref: t,
|
|
606
|
-
style: {
|
|
607
|
-
pointerEvents: "auto",
|
|
608
|
-
...r.style
|
|
609
|
-
}
|
|
610
|
-
})
|
|
611
|
-
});
|
|
612
|
-
}), K = "DialogContent", Ge = l.forwardRef((e, t) => {
|
|
613
|
-
let n = ze(K, e.__scopeDialog), { forceMount: r = n.forceMount, ...i } = e, a = G(K, e.__scopeDialog);
|
|
614
|
-
return /* @__PURE__ */ h(W, {
|
|
615
|
-
present: r || a.open,
|
|
616
|
-
children: a.modal ? /* @__PURE__ */ h(Ke, {
|
|
617
|
-
...i,
|
|
618
|
-
ref: t
|
|
619
|
-
}) : /* @__PURE__ */ h(qe, {
|
|
620
|
-
...i,
|
|
621
|
-
ref: t
|
|
622
|
-
})
|
|
623
|
-
});
|
|
624
|
-
});
|
|
625
|
-
Ge.displayName = K;
|
|
626
|
-
var Ke = l.forwardRef((t, n) => {
|
|
627
|
-
let r = G(K, t.__scopeDialog), i = l.useRef(null), a = e(n, r.contentRef, i);
|
|
628
|
-
return l.useEffect(() => {
|
|
629
|
-
let e = i.current;
|
|
630
|
-
if (e) return c(e);
|
|
631
|
-
}, []), /* @__PURE__ */ h(Je, {
|
|
632
|
-
...t,
|
|
633
|
-
ref: a,
|
|
634
|
-
trapFocus: r.open,
|
|
635
|
-
disableOutsidePointerEvents: r.open,
|
|
636
|
-
onCloseAutoFocus: v(t.onCloseAutoFocus, (e) => {
|
|
637
|
-
e.preventDefault(), r.triggerRef.current?.focus();
|
|
638
|
-
}),
|
|
639
|
-
onPointerDownOutside: v(t.onPointerDownOutside, (e) => {
|
|
640
|
-
let t = e.detail.originalEvent, n = t.button === 0 && t.ctrlKey === !0;
|
|
641
|
-
(t.button === 2 || n) && e.preventDefault();
|
|
642
|
-
}),
|
|
643
|
-
onFocusOutside: v(t.onFocusOutside, (e) => e.preventDefault())
|
|
644
|
-
});
|
|
645
|
-
}), qe = l.forwardRef((e, t) => {
|
|
646
|
-
let n = G(K, e.__scopeDialog), r = l.useRef(!1), i = l.useRef(!1);
|
|
647
|
-
return /* @__PURE__ */ h(Je, {
|
|
648
|
-
...e,
|
|
649
|
-
ref: t,
|
|
650
|
-
trapFocus: !1,
|
|
651
|
-
disableOutsidePointerEvents: !1,
|
|
652
|
-
onCloseAutoFocus: (t) => {
|
|
653
|
-
e.onCloseAutoFocus?.(t), t.defaultPrevented || (r.current || n.triggerRef.current?.focus(), t.preventDefault()), r.current = !1, i.current = !1;
|
|
654
|
-
},
|
|
655
|
-
onInteractOutside: (t) => {
|
|
656
|
-
e.onInteractOutside?.(t), t.defaultPrevented || (r.current = !0, t.detail.originalEvent.type === "pointerdown" && (i.current = !0));
|
|
657
|
-
let a = t.target;
|
|
658
|
-
n.triggerRef.current?.contains(a) && t.preventDefault(), t.detail.originalEvent.type === "focusin" && i.current && t.preventDefault();
|
|
659
|
-
}
|
|
660
|
-
});
|
|
661
|
-
}), Je = l.forwardRef((t, n) => {
|
|
662
|
-
let { __scopeDialog: r, trapFocus: i, onOpenAutoFocus: a, onCloseAutoFocus: o, ...c } = t, u = G(K, r), d = l.useRef(null), f = e(n, d);
|
|
663
|
-
return s(), /* @__PURE__ */ g(m, { children: [/* @__PURE__ */ h(z, {
|
|
664
|
-
asChild: !0,
|
|
665
|
-
loop: !0,
|
|
666
|
-
trapped: i,
|
|
667
|
-
onMountAutoFocus: a,
|
|
668
|
-
onUnmountAutoFocus: o,
|
|
669
|
-
children: /* @__PURE__ */ h(P, {
|
|
670
|
-
role: "dialog",
|
|
671
|
-
id: u.contentId,
|
|
672
|
-
"aria-describedby": u.descriptionId,
|
|
673
|
-
"aria-labelledby": u.titleId,
|
|
674
|
-
"data-state": tt(u.open),
|
|
675
|
-
...c,
|
|
676
|
-
ref: f,
|
|
677
|
-
onDismiss: () => u.onOpenChange(!1)
|
|
678
|
-
})
|
|
679
|
-
}), /* @__PURE__ */ g(m, { children: [/* @__PURE__ */ h(at, { titleId: u.titleId }), /* @__PURE__ */ h(st, {
|
|
680
|
-
contentRef: d,
|
|
681
|
-
descriptionId: u.descriptionId
|
|
682
|
-
})] })] });
|
|
683
|
-
}), Ye = "DialogTitle", Xe = l.forwardRef((e, t) => {
|
|
684
|
-
let { __scopeDialog: n, ...r } = e, i = G(Ye, n);
|
|
685
|
-
return /* @__PURE__ */ h(k.h2, {
|
|
686
|
-
id: i.titleId,
|
|
687
|
-
...r,
|
|
688
|
-
ref: t
|
|
689
|
-
});
|
|
690
|
-
});
|
|
691
|
-
Xe.displayName = Ye;
|
|
692
|
-
var Ze = "DialogDescription", Qe = l.forwardRef((e, t) => {
|
|
693
|
-
let { __scopeDialog: n, ...r } = e, i = G(Ze, n);
|
|
694
|
-
return /* @__PURE__ */ h(k.p, {
|
|
695
|
-
id: i.descriptionId,
|
|
696
|
-
...r,
|
|
697
|
-
ref: t
|
|
698
|
-
});
|
|
699
|
-
});
|
|
700
|
-
Qe.displayName = Ze;
|
|
701
|
-
var $e = "DialogClose", et = l.forwardRef((e, t) => {
|
|
702
|
-
let { __scopeDialog: n, ...r } = e, i = G($e, n);
|
|
703
|
-
return /* @__PURE__ */ h(k.button, {
|
|
704
|
-
type: "button",
|
|
705
|
-
...r,
|
|
706
|
-
ref: t,
|
|
707
|
-
onClick: v(e.onClick, () => i.onOpenChange(!1))
|
|
708
|
-
});
|
|
709
|
-
});
|
|
710
|
-
et.displayName = $e;
|
|
711
|
-
function tt(e) {
|
|
712
|
-
return e ? "open" : "closed";
|
|
713
|
-
}
|
|
714
|
-
var nt = "DialogTitleWarning", [rt, it] = y(nt, {
|
|
715
|
-
contentName: K,
|
|
716
|
-
titleName: Ye,
|
|
717
|
-
docsSlug: "dialog"
|
|
718
|
-
}), at = ({ titleId: e }) => {
|
|
719
|
-
let t = it(nt), n = `\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
|
|
720
|
-
|
|
721
|
-
If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
722
|
-
|
|
723
|
-
For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;
|
|
724
|
-
return l.useEffect(() => {
|
|
725
|
-
e && (document.getElementById(e) || console.error(n));
|
|
726
|
-
}, [n, e]), null;
|
|
727
|
-
}, ot = "DialogDescriptionWarning", st = ({ contentRef: e, descriptionId: t }) => {
|
|
728
|
-
let n = `Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${it(ot).contentName}}.`;
|
|
729
|
-
return l.useEffect(() => {
|
|
730
|
-
let r = e.current?.getAttribute("aria-describedby");
|
|
731
|
-
t && r && (document.getElementById(t) || console.warn(n));
|
|
732
|
-
}, [
|
|
733
|
-
n,
|
|
734
|
-
e,
|
|
735
|
-
t
|
|
736
|
-
]), null;
|
|
737
|
-
}, ct = Pe, lt = Ie, ut = Be, dt = He, ft = Ge, pt = Xe, mt = Qe, ht = et;
|
|
738
|
-
//#endregion
|
|
739
|
-
//#region node_modules/vaul/dist/index.mjs
|
|
740
|
-
function gt(e) {
|
|
741
|
-
if (!e || typeof document > "u") return;
|
|
742
|
-
let t = document.head || document.getElementsByTagName("head")[0], n = document.createElement("style");
|
|
743
|
-
n.type = "text/css", t.appendChild(n), n.styleSheet ? n.styleSheet.cssText = e : n.appendChild(document.createTextNode(e));
|
|
744
|
-
}
|
|
745
|
-
var _t = u.createContext({
|
|
746
|
-
drawerRef: { current: null },
|
|
747
|
-
overlayRef: { current: null },
|
|
748
|
-
onPress: () => {},
|
|
749
|
-
onRelease: () => {},
|
|
750
|
-
onDrag: () => {},
|
|
751
|
-
onNestedDrag: () => {},
|
|
752
|
-
onNestedOpenChange: () => {},
|
|
753
|
-
onNestedRelease: () => {},
|
|
754
|
-
openProp: void 0,
|
|
755
|
-
dismissible: !1,
|
|
756
|
-
isOpen: !1,
|
|
757
|
-
isDragging: !1,
|
|
758
|
-
keyboardIsOpen: { current: !1 },
|
|
759
|
-
snapPointsOffset: null,
|
|
760
|
-
snapPoints: null,
|
|
761
|
-
handleOnly: !1,
|
|
762
|
-
modal: !1,
|
|
763
|
-
shouldFade: !1,
|
|
764
|
-
activeSnapPoint: null,
|
|
765
|
-
onOpenChange: () => {},
|
|
766
|
-
setActiveSnapPoint: () => {},
|
|
767
|
-
closeDrawer: () => {},
|
|
768
|
-
direction: "bottom",
|
|
769
|
-
shouldAnimate: { current: !0 },
|
|
770
|
-
shouldScaleBackground: !1,
|
|
771
|
-
setBackgroundColorOnScale: !0,
|
|
772
|
-
noBodyStyles: !1,
|
|
773
|
-
container: null,
|
|
774
|
-
autoFocus: !1
|
|
775
|
-
}), q = () => {
|
|
776
|
-
let e = u.useContext(_t);
|
|
777
|
-
if (!e) throw Error("useDrawerContext must be used within a Drawer.Root");
|
|
778
|
-
return e;
|
|
779
|
-
};
|
|
780
|
-
gt("[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(\n[data-state=closed]\n){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)}}");
|
|
781
|
-
function vt() {
|
|
782
|
-
let e = navigator.userAgent;
|
|
783
|
-
return typeof window < "u" && (/Firefox/.test(e) && /Mobile/.test(e) || /FxiOS/.test(e));
|
|
784
|
-
}
|
|
785
|
-
function yt() {
|
|
786
|
-
return wt(/^Mac/);
|
|
787
|
-
}
|
|
788
|
-
function bt() {
|
|
789
|
-
return wt(/^iPhone/);
|
|
790
|
-
}
|
|
791
|
-
function xt() {
|
|
792
|
-
return /^((?!chrome|android).)*safari/i.test(navigator.userAgent);
|
|
793
|
-
}
|
|
794
|
-
function St() {
|
|
795
|
-
return wt(/^iPad/) || yt() && navigator.maxTouchPoints > 1;
|
|
796
|
-
}
|
|
797
|
-
function Ct() {
|
|
798
|
-
return bt() || St();
|
|
799
|
-
}
|
|
800
|
-
function wt(e) {
|
|
801
|
-
return typeof window < "u" && window.navigator != null ? e.test(window.navigator.platform) : void 0;
|
|
802
|
-
}
|
|
803
|
-
var Tt = 24, Et = typeof window < "u" ? f : d;
|
|
804
|
-
function Dt(...e) {
|
|
805
|
-
return (...t) => {
|
|
806
|
-
for (let n of e) typeof n == "function" && n(...t);
|
|
807
|
-
};
|
|
808
|
-
}
|
|
809
|
-
var Ot = typeof document < "u" && window.visualViewport;
|
|
810
|
-
function kt(e) {
|
|
811
|
-
let t = window.getComputedStyle(e);
|
|
812
|
-
return /(auto|scroll)/.test(t.overflow + t.overflowX + t.overflowY);
|
|
813
|
-
}
|
|
814
|
-
function At(e) {
|
|
815
|
-
for (kt(e) && (e = e.parentElement); e && !kt(e);) e = e.parentElement;
|
|
816
|
-
return e || document.scrollingElement || document.documentElement;
|
|
817
|
-
}
|
|
818
|
-
var jt = /* @__PURE__ */ new Set([
|
|
819
|
-
"checkbox",
|
|
820
|
-
"radio",
|
|
821
|
-
"range",
|
|
822
|
-
"color",
|
|
823
|
-
"file",
|
|
824
|
-
"image",
|
|
825
|
-
"button",
|
|
826
|
-
"submit",
|
|
827
|
-
"reset"
|
|
828
|
-
]), Mt = 0, Nt;
|
|
829
|
-
function Pt(e = {}) {
|
|
830
|
-
let { isDisabled: t } = e;
|
|
831
|
-
Et(() => {
|
|
832
|
-
if (!t) return Mt++, Mt === 1 && Ct() && (Nt = Ft()), () => {
|
|
833
|
-
Mt--, Mt === 0 && Nt?.();
|
|
834
|
-
};
|
|
835
|
-
}, [t]);
|
|
836
|
-
}
|
|
837
|
-
function Ft() {
|
|
838
|
-
let e, t = 0, n = (n) => {
|
|
839
|
-
e = At(n.target), !(e === document.documentElement && e === document.body) && (t = n.changedTouches[0].pageY);
|
|
840
|
-
}, r = (n) => {
|
|
841
|
-
if (!e || e === document.documentElement || e === document.body) {
|
|
842
|
-
n.preventDefault();
|
|
843
|
-
return;
|
|
844
|
-
}
|
|
845
|
-
let r = n.changedTouches[0].pageY, i = e.scrollTop, a = e.scrollHeight - e.clientHeight;
|
|
846
|
-
a !== 0 && ((i <= 0 && r > t || i >= a && r < t) && n.preventDefault(), t = r);
|
|
847
|
-
}, i = (e) => {
|
|
848
|
-
let t = e.target;
|
|
849
|
-
Rt(t) && t !== document.activeElement && (e.preventDefault(), t.style.transform = "translateY(-2000px)", t.focus(), requestAnimationFrame(() => {
|
|
850
|
-
t.style.transform = "";
|
|
851
|
-
}));
|
|
852
|
-
}, a = (e) => {
|
|
853
|
-
let t = e.target;
|
|
854
|
-
Rt(t) && (t.style.transform = "translateY(-2000px)", requestAnimationFrame(() => {
|
|
855
|
-
t.style.transform = "", Ot && (Ot.height < window.innerHeight ? requestAnimationFrame(() => {
|
|
856
|
-
Lt(t);
|
|
857
|
-
}) : Ot.addEventListener("resize", () => Lt(t), { once: !0 }));
|
|
858
|
-
}));
|
|
859
|
-
}, o = () => {
|
|
860
|
-
window.scrollTo(0, 0);
|
|
861
|
-
}, s = window.pageXOffset, c = window.pageYOffset, l = Dt(It(document.documentElement, "paddingRight", `${window.innerWidth - document.documentElement.clientWidth}px`));
|
|
862
|
-
window.scrollTo(0, 0);
|
|
863
|
-
let u = Dt(J(document, "touchstart", n, {
|
|
864
|
-
passive: !1,
|
|
865
|
-
capture: !0
|
|
866
|
-
}), J(document, "touchmove", r, {
|
|
867
|
-
passive: !1,
|
|
868
|
-
capture: !0
|
|
869
|
-
}), J(document, "touchend", i, {
|
|
870
|
-
passive: !1,
|
|
871
|
-
capture: !0
|
|
872
|
-
}), J(document, "focus", a, !0), J(window, "scroll", o));
|
|
873
|
-
return () => {
|
|
874
|
-
l(), u(), window.scrollTo(s, c);
|
|
875
|
-
};
|
|
876
|
-
}
|
|
877
|
-
function It(e, t, n) {
|
|
878
|
-
let r = e.style[t];
|
|
879
|
-
return e.style[t] = n, () => {
|
|
880
|
-
e.style[t] = r;
|
|
881
|
-
};
|
|
882
|
-
}
|
|
883
|
-
function J(e, t, n, r) {
|
|
884
|
-
return e.addEventListener(t, n, r), () => {
|
|
885
|
-
e.removeEventListener(t, n, r);
|
|
886
|
-
};
|
|
887
|
-
}
|
|
888
|
-
function Lt(e) {
|
|
889
|
-
let t = document.scrollingElement || document.documentElement;
|
|
890
|
-
for (; e && e !== t;) {
|
|
891
|
-
let t = At(e);
|
|
892
|
-
if (t !== document.documentElement && t !== document.body && t !== e) {
|
|
893
|
-
let n = t.getBoundingClientRect().top, r = e.getBoundingClientRect().top;
|
|
894
|
-
e.getBoundingClientRect().bottom > t.getBoundingClientRect().bottom + Tt && (t.scrollTop += r - n);
|
|
895
|
-
}
|
|
896
|
-
e = t.parentElement;
|
|
897
|
-
}
|
|
898
|
-
}
|
|
899
|
-
function Rt(e) {
|
|
900
|
-
return e instanceof HTMLInputElement && !jt.has(e.type) || e instanceof HTMLTextAreaElement || e instanceof HTMLElement && e.isContentEditable;
|
|
901
|
-
}
|
|
902
|
-
function zt(e, t) {
|
|
903
|
-
typeof e == "function" ? e(t) : e != null && (e.current = t);
|
|
904
|
-
}
|
|
905
|
-
function Bt(...e) {
|
|
906
|
-
return (t) => e.forEach((e) => zt(e, t));
|
|
907
|
-
}
|
|
908
|
-
function Vt(...e) {
|
|
909
|
-
return l.useCallback(Bt(...e), e);
|
|
910
|
-
}
|
|
911
|
-
var Ht = /* @__PURE__ */ new WeakMap();
|
|
912
|
-
function Y(e, t, n = !1) {
|
|
913
|
-
if (!e || !(e instanceof HTMLElement)) return;
|
|
914
|
-
let r = {};
|
|
915
|
-
Object.entries(t).forEach(([t, n]) => {
|
|
916
|
-
if (t.startsWith("--")) {
|
|
917
|
-
e.style.setProperty(t, n);
|
|
918
|
-
return;
|
|
919
|
-
}
|
|
920
|
-
r[t] = e.style[t], e.style[t] = n;
|
|
921
|
-
}), !n && Ht.set(e, r);
|
|
922
|
-
}
|
|
923
|
-
function Ut(e, t) {
|
|
924
|
-
if (!e || !(e instanceof HTMLElement)) return;
|
|
925
|
-
let n = Ht.get(e);
|
|
926
|
-
n && (e.style[t] = n[t]);
|
|
927
|
-
}
|
|
928
|
-
var X = (e) => {
|
|
929
|
-
switch (e) {
|
|
930
|
-
case "top":
|
|
931
|
-
case "bottom": return !0;
|
|
932
|
-
case "left":
|
|
933
|
-
case "right": return !1;
|
|
934
|
-
default: return e;
|
|
935
|
-
}
|
|
936
|
-
};
|
|
937
|
-
function Wt(e, t) {
|
|
938
|
-
if (!e) return null;
|
|
939
|
-
let n = window.getComputedStyle(e), r = n.transform || n.webkitTransform || n.mozTransform, i = r.match(/^matrix3d\((.+)\)$/);
|
|
940
|
-
return i ? parseFloat(i[1].split(", ")[X(t) ? 13 : 12]) : (i = r.match(/^matrix\((.+)\)$/), i ? parseFloat(i[1].split(", ")[X(t) ? 5 : 4]) : null);
|
|
941
|
-
}
|
|
942
|
-
function Gt(e) {
|
|
943
|
-
return 8 * (Math.log(e + 1) - 2);
|
|
944
|
-
}
|
|
945
|
-
function Kt(e, t) {
|
|
946
|
-
if (!e) return () => {};
|
|
947
|
-
let n = e.style.cssText;
|
|
948
|
-
return Object.assign(e.style, t), () => {
|
|
949
|
-
e.style.cssText = n;
|
|
950
|
-
};
|
|
951
|
-
}
|
|
952
|
-
var Z = {
|
|
953
|
-
DURATION: .5,
|
|
954
|
-
EASE: [
|
|
955
|
-
.32,
|
|
956
|
-
.72,
|
|
957
|
-
0,
|
|
958
|
-
1
|
|
959
|
-
]
|
|
960
|
-
}, qt = .4, Jt = .25, Yt = 100, Xt = 8, Zt = 16, Qt = 26, $t = "vaul-dragging";
|
|
961
|
-
function en(e) {
|
|
962
|
-
let t = u.useRef(e);
|
|
963
|
-
return u.useEffect(() => {
|
|
964
|
-
t.current = e;
|
|
965
|
-
}), u.useMemo(() => (...e) => t.current == null ? void 0 : t.current.call(t, ...e), []);
|
|
966
|
-
}
|
|
967
|
-
function tn({ defaultProp: e, onChange: t }) {
|
|
968
|
-
let n = u.useState(e), [r] = n, i = u.useRef(r), a = en(t);
|
|
969
|
-
return u.useEffect(() => {
|
|
970
|
-
i.current !== r && (a(r), i.current = r);
|
|
971
|
-
}, [
|
|
972
|
-
r,
|
|
973
|
-
i,
|
|
974
|
-
a
|
|
975
|
-
]), n;
|
|
976
|
-
}
|
|
977
|
-
function nn({ prop: e, defaultProp: t, onChange: n = () => {} }) {
|
|
978
|
-
let [r, i] = tn({
|
|
979
|
-
defaultProp: t,
|
|
980
|
-
onChange: n
|
|
981
|
-
}), a = e !== void 0, o = a ? e : r, s = en(n);
|
|
982
|
-
return [o, u.useCallback((t) => {
|
|
983
|
-
if (a) {
|
|
984
|
-
let n = typeof t == "function" ? t(e) : t;
|
|
985
|
-
n !== e && s(n);
|
|
986
|
-
} else i(t);
|
|
987
|
-
}, [
|
|
988
|
-
a,
|
|
989
|
-
e,
|
|
990
|
-
i,
|
|
991
|
-
s
|
|
992
|
-
])];
|
|
993
|
-
}
|
|
994
|
-
function rn({ activeSnapPointProp: e, setActiveSnapPointProp: t, snapPoints: n, drawerRef: r, overlayRef: i, fadeFromIndex: a, onSnapPointChange: o, direction: s = "bottom", container: c, snapToSequentialPoint: l }) {
|
|
995
|
-
let [d, f] = nn({
|
|
996
|
-
prop: e,
|
|
997
|
-
defaultProp: n?.[0],
|
|
998
|
-
onChange: t
|
|
999
|
-
}), [p, m] = u.useState(typeof window < "u" ? {
|
|
1000
|
-
innerWidth: window.innerWidth,
|
|
1001
|
-
innerHeight: window.innerHeight
|
|
1002
|
-
} : void 0);
|
|
1003
|
-
u.useEffect(() => {
|
|
1004
|
-
function e() {
|
|
1005
|
-
m({
|
|
1006
|
-
innerWidth: window.innerWidth,
|
|
1007
|
-
innerHeight: window.innerHeight
|
|
1008
|
-
});
|
|
1009
|
-
}
|
|
1010
|
-
return window.addEventListener("resize", e), () => window.removeEventListener("resize", e);
|
|
1011
|
-
}, []);
|
|
1012
|
-
let h = u.useMemo(() => d === n?.[n.length - 1] || null, [n, d]), g = u.useMemo(() => n?.findIndex((e) => e === d) ?? null, [n, d]), _ = n && n.length > 0 && (a || a === 0) && !Number.isNaN(a) && n[a] === d || !n, v = u.useMemo(() => {
|
|
1013
|
-
let e = c ? {
|
|
1014
|
-
width: c.getBoundingClientRect().width,
|
|
1015
|
-
height: c.getBoundingClientRect().height
|
|
1016
|
-
} : typeof window < "u" ? {
|
|
1017
|
-
width: window.innerWidth,
|
|
1018
|
-
height: window.innerHeight
|
|
1019
|
-
} : {
|
|
1020
|
-
width: 0,
|
|
1021
|
-
height: 0
|
|
1022
|
-
};
|
|
1023
|
-
return n?.map((t) => {
|
|
1024
|
-
let n = typeof t == "string", r = 0;
|
|
1025
|
-
if (n && (r = parseInt(t, 10)), X(s)) {
|
|
1026
|
-
let i = n ? r : p ? t * e.height : 0;
|
|
1027
|
-
return p ? s === "bottom" ? e.height - i : -e.height + i : i;
|
|
1028
|
-
}
|
|
1029
|
-
let i = n ? r : p ? t * e.width : 0;
|
|
1030
|
-
return p ? s === "right" ? e.width - i : -e.width + i : i;
|
|
1031
|
-
}) ?? [];
|
|
1032
|
-
}, [
|
|
1033
|
-
n,
|
|
1034
|
-
p,
|
|
1035
|
-
c
|
|
1036
|
-
]), y = u.useMemo(() => g === null ? null : v?.[g], [v, g]), b = u.useCallback((e) => {
|
|
1037
|
-
let t = v?.findIndex((t) => t === e) ?? null;
|
|
1038
|
-
o(t), Y(r.current, {
|
|
1039
|
-
transition: `transform ${Z.DURATION}s cubic-bezier(${Z.EASE.join(",")})`,
|
|
1040
|
-
transform: X(s) ? `translate3d(0, ${e}px, 0)` : `translate3d(${e}px, 0, 0)`
|
|
1041
|
-
}), v && t !== v.length - 1 && a !== void 0 && t !== a && t < a ? Y(i.current, {
|
|
1042
|
-
transition: `opacity ${Z.DURATION}s cubic-bezier(${Z.EASE.join(",")})`,
|
|
1043
|
-
opacity: "0"
|
|
1044
|
-
}) : Y(i.current, {
|
|
1045
|
-
transition: `opacity ${Z.DURATION}s cubic-bezier(${Z.EASE.join(",")})`,
|
|
1046
|
-
opacity: "1"
|
|
1047
|
-
}), f(n?.[Math.max(t, 0)]);
|
|
1048
|
-
}, [
|
|
1049
|
-
r.current,
|
|
1050
|
-
n,
|
|
1051
|
-
v,
|
|
1052
|
-
a,
|
|
1053
|
-
i,
|
|
1054
|
-
f
|
|
1055
|
-
]);
|
|
1056
|
-
u.useEffect(() => {
|
|
1057
|
-
if (d || e) {
|
|
1058
|
-
let t = n?.findIndex((t) => t === e || t === d) ?? -1;
|
|
1059
|
-
v && t !== -1 && typeof v[t] == "number" && b(v[t]);
|
|
1060
|
-
}
|
|
1061
|
-
}, [
|
|
1062
|
-
d,
|
|
1063
|
-
e,
|
|
1064
|
-
n,
|
|
1065
|
-
v,
|
|
1066
|
-
b
|
|
1067
|
-
]);
|
|
1068
|
-
function x({ draggedDistance: e, closeDrawer: t, velocity: r, dismissible: o }) {
|
|
1069
|
-
if (a === void 0) return;
|
|
1070
|
-
let c = s === "bottom" || s === "right" ? (y ?? 0) - e : (y ?? 0) + e, u = g === a - 1, d = g === 0, f = e > 0;
|
|
1071
|
-
if (u && Y(i.current, { transition: `opacity ${Z.DURATION}s cubic-bezier(${Z.EASE.join(",")})` }), !l && r > 2 && !f) {
|
|
1072
|
-
o ? t() : b(v[0]);
|
|
1073
|
-
return;
|
|
1074
|
-
}
|
|
1075
|
-
if (!l && r > 2 && f && v && n) {
|
|
1076
|
-
b(v[n.length - 1]);
|
|
1077
|
-
return;
|
|
1078
|
-
}
|
|
1079
|
-
let p = v?.reduce((e, t) => typeof e != "number" || typeof t != "number" ? e : Math.abs(t - c) < Math.abs(e - c) ? t : e), m = X(s) ? window.innerHeight : window.innerWidth;
|
|
1080
|
-
if (r > qt && Math.abs(e) < m * .4) {
|
|
1081
|
-
let e = f ? 1 : -1;
|
|
1082
|
-
if (e > 0 && h && n) {
|
|
1083
|
-
b(v[n.length - 1]);
|
|
1084
|
-
return;
|
|
1085
|
-
}
|
|
1086
|
-
if (d && e < 0 && o && t(), g === null) return;
|
|
1087
|
-
b(v[g + e]);
|
|
1088
|
-
return;
|
|
1089
|
-
}
|
|
1090
|
-
b(p);
|
|
1091
|
-
}
|
|
1092
|
-
function S({ draggedDistance: e }) {
|
|
1093
|
-
if (y === null) return;
|
|
1094
|
-
let t = s === "bottom" || s === "right" ? y - e : y + e;
|
|
1095
|
-
(s === "bottom" || s === "right") && t < v[v.length - 1] || (s === "top" || s === "left") && t > v[v.length - 1] || Y(r.current, { transform: X(s) ? `translate3d(0, ${t}px, 0)` : `translate3d(${t}px, 0, 0)` });
|
|
1096
|
-
}
|
|
1097
|
-
function ee(e, t) {
|
|
1098
|
-
if (!n || typeof g != "number" || !v || a === void 0) return null;
|
|
1099
|
-
let r = g === a - 1;
|
|
1100
|
-
if (g >= a && t) return 0;
|
|
1101
|
-
if (r && !t) return 1;
|
|
1102
|
-
if (!_ && !r) return null;
|
|
1103
|
-
let i = r ? g + 1 : g - 1, o = r ? v[i] - v[i - 1] : v[i + 1] - v[i], s = e / Math.abs(o);
|
|
1104
|
-
return r ? 1 - s : s;
|
|
1105
|
-
}
|
|
1106
|
-
return {
|
|
1107
|
-
isLastSnapPoint: h,
|
|
1108
|
-
activeSnapPoint: d,
|
|
1109
|
-
shouldFade: _,
|
|
1110
|
-
getPercentageDragged: ee,
|
|
1111
|
-
setActiveSnapPoint: f,
|
|
1112
|
-
activeSnapPointIndex: g,
|
|
1113
|
-
onRelease: x,
|
|
1114
|
-
onDrag: S,
|
|
1115
|
-
snapPointsOffset: v
|
|
1116
|
-
};
|
|
1117
|
-
}
|
|
1118
|
-
function an() {
|
|
1119
|
-
let { direction: e, isOpen: t, shouldScaleBackground: n, setBackgroundColorOnScale: r, noBodyStyles: i } = q(), a = u.useRef(null), o = p(() => document.body.style.backgroundColor, []);
|
|
1120
|
-
function s() {
|
|
1121
|
-
return (window.innerWidth - Qt) / window.innerWidth;
|
|
1122
|
-
}
|
|
1123
|
-
u.useEffect(() => {
|
|
1124
|
-
if (t && n) {
|
|
1125
|
-
a.current && clearTimeout(a.current);
|
|
1126
|
-
let t = document.querySelector("[data-vaul-drawer-wrapper]") || document.querySelector("[vaul-drawer-wrapper]");
|
|
1127
|
-
if (!t) return;
|
|
1128
|
-
r && !i && Kt(document.body, { background: "black" }), Kt(t, {
|
|
1129
|
-
transformOrigin: X(e) ? "top" : "left",
|
|
1130
|
-
transitionProperty: "transform, border-radius",
|
|
1131
|
-
transitionDuration: `${Z.DURATION}s`,
|
|
1132
|
-
transitionTimingFunction: `cubic-bezier(${Z.EASE.join(",")})`
|
|
1133
|
-
});
|
|
1134
|
-
let n = Kt(t, {
|
|
1135
|
-
borderRadius: `${Xt}px`,
|
|
1136
|
-
overflow: "hidden",
|
|
1137
|
-
...X(e) ? { transform: `scale(${s()}) translate3d(0, calc(env(safe-area-inset-top) + 14px), 0)` } : { transform: `scale(${s()}) translate3d(calc(env(safe-area-inset-top) + 14px), 0, 0)` }
|
|
1138
|
-
});
|
|
1139
|
-
return () => {
|
|
1140
|
-
n(), a.current = window.setTimeout(() => {
|
|
1141
|
-
o ? document.body.style.background = o : document.body.style.removeProperty("background");
|
|
1142
|
-
}, Z.DURATION * 1e3);
|
|
1143
|
-
};
|
|
1144
|
-
}
|
|
1145
|
-
}, [
|
|
1146
|
-
t,
|
|
1147
|
-
n,
|
|
1148
|
-
o
|
|
1149
|
-
]);
|
|
1150
|
-
}
|
|
1151
|
-
var Q = null;
|
|
1152
|
-
function on({ isOpen: e, modal: t, nested: n, hasBeenOpened: r, preventScrollRestoration: i, noBodyStyles: a }) {
|
|
1153
|
-
let [o, s] = u.useState(() => typeof window < "u" ? window.location.href : ""), c = u.useRef(0), l = u.useCallback(() => {
|
|
1154
|
-
if (xt() && Q === null && e && !a) {
|
|
1155
|
-
Q = {
|
|
1156
|
-
position: document.body.style.position,
|
|
1157
|
-
top: document.body.style.top,
|
|
1158
|
-
left: document.body.style.left,
|
|
1159
|
-
height: document.body.style.height,
|
|
1160
|
-
right: "unset"
|
|
1161
|
-
};
|
|
1162
|
-
let { scrollX: e, innerHeight: t } = window;
|
|
1163
|
-
document.body.style.setProperty("position", "fixed", "important"), Object.assign(document.body.style, {
|
|
1164
|
-
top: `${-c.current}px`,
|
|
1165
|
-
left: `${-e}px`,
|
|
1166
|
-
right: "0px",
|
|
1167
|
-
height: "auto"
|
|
1168
|
-
}), window.setTimeout(() => window.requestAnimationFrame(() => {
|
|
1169
|
-
let e = t - window.innerHeight;
|
|
1170
|
-
e && c.current >= t && (document.body.style.top = `${-(c.current + e)}px`);
|
|
1171
|
-
}), 300);
|
|
1172
|
-
}
|
|
1173
|
-
}, [e]), d = u.useCallback(() => {
|
|
1174
|
-
if (xt() && Q !== null && !a) {
|
|
1175
|
-
let e = -parseInt(document.body.style.top, 10), t = -parseInt(document.body.style.left, 10);
|
|
1176
|
-
Object.assign(document.body.style, Q), window.requestAnimationFrame(() => {
|
|
1177
|
-
if (i && o !== window.location.href) {
|
|
1178
|
-
s(window.location.href);
|
|
1179
|
-
return;
|
|
1180
|
-
}
|
|
1181
|
-
window.scrollTo(t, e);
|
|
1182
|
-
}), Q = null;
|
|
1183
|
-
}
|
|
1184
|
-
}, [o]);
|
|
1185
|
-
return u.useEffect(() => {
|
|
1186
|
-
function e() {
|
|
1187
|
-
c.current = window.scrollY;
|
|
1188
|
-
}
|
|
1189
|
-
return e(), window.addEventListener("scroll", e), () => {
|
|
1190
|
-
window.removeEventListener("scroll", e);
|
|
1191
|
-
};
|
|
1192
|
-
}, []), u.useEffect(() => {
|
|
1193
|
-
if (t) return () => {
|
|
1194
|
-
typeof document > "u" || document.querySelector("[data-vaul-drawer]") || d();
|
|
1195
|
-
};
|
|
1196
|
-
}, [t, d]), u.useEffect(() => {
|
|
1197
|
-
n || !r || (e ? (!window.matchMedia("(display-mode: standalone)").matches && l(), t || window.setTimeout(() => {
|
|
1198
|
-
d();
|
|
1199
|
-
}, 500)) : d());
|
|
1200
|
-
}, [
|
|
1201
|
-
e,
|
|
1202
|
-
r,
|
|
1203
|
-
o,
|
|
1204
|
-
t,
|
|
1205
|
-
n,
|
|
1206
|
-
l,
|
|
1207
|
-
d
|
|
1208
|
-
]), { restorePositionSetting: d };
|
|
1209
|
-
}
|
|
1210
|
-
function sn({ open: e, onOpenChange: t, children: n, onDrag: r, onRelease: i, snapPoints: a, shouldScaleBackground: o = !1, setBackgroundColorOnScale: s = !0, closeThreshold: c = Jt, scrollLockTimeout: l = Yt, dismissible: d = !0, handleOnly: f = !1, fadeFromIndex: p = a && a.length - 1, activeSnapPoint: m, setActiveSnapPoint: h, fixed: g, modal: _ = !0, onClose: v, nested: y, noBodyStyles: b = !1, direction: x = "bottom", defaultOpen: S = !1, disablePreventScroll: ee = !0, snapToSequentialPoint: C = !1, preventScrollRestoration: w = !1, repositionInputs: T = !0, onAnimationEnd: te, container: ne, autoFocus: E = !1 }) {
|
|
1211
|
-
let [D = !1, re] = nn({
|
|
1212
|
-
defaultProp: S,
|
|
1213
|
-
prop: e,
|
|
1214
|
-
onChange: (e) => {
|
|
1215
|
-
t?.(e), !e && !y && V(), setTimeout(() => {
|
|
1216
|
-
te?.(e);
|
|
1217
|
-
}, Z.DURATION * 1e3), e && !_ && typeof window < "u" && window.requestAnimationFrame(() => {
|
|
1218
|
-
document.body.style.pointerEvents = "auto";
|
|
1219
|
-
}), e || (document.body.style.pointerEvents = "auto");
|
|
1220
|
-
}
|
|
1221
|
-
}), [ie, O] = u.useState(!1), [k, ae] = u.useState(!1), [oe, se] = u.useState(!1), A = u.useRef(null), j = u.useRef(null), ce = u.useRef(null), M = u.useRef(null), N = u.useRef(null), P = u.useRef(!1), le = u.useRef(null), ue = u.useRef(0), F = u.useRef(!1), de = u.useRef(!S), fe = u.useRef(0), I = u.useRef(null), L = u.useRef(I.current?.getBoundingClientRect().height || 0), R = u.useRef(I.current?.getBoundingClientRect().width || 0), pe = u.useRef(0), { activeSnapPoint: me, activeSnapPointIndex: z, setActiveSnapPoint: he, onRelease: ge, snapPointsOffset: B, onDrag: _e, shouldFade: ve, getPercentageDragged: ye } = rn({
|
|
1222
|
-
snapPoints: a,
|
|
1223
|
-
activeSnapPointProp: m,
|
|
1224
|
-
setActiveSnapPointProp: h,
|
|
1225
|
-
drawerRef: I,
|
|
1226
|
-
fadeFromIndex: p,
|
|
1227
|
-
overlayRef: A,
|
|
1228
|
-
onSnapPointChange: u.useCallback((e) => {
|
|
1229
|
-
a && e === B.length - 1 && (j.current = /* @__PURE__ */ new Date());
|
|
1230
|
-
}, []),
|
|
1231
|
-
direction: x,
|
|
1232
|
-
container: ne,
|
|
1233
|
-
snapToSequentialPoint: C
|
|
1234
|
-
});
|
|
1235
|
-
Pt({ isDisabled: !D || k || !_ || oe || !ie || !T || !ee });
|
|
1236
|
-
let { restorePositionSetting: V } = on({
|
|
1237
|
-
isOpen: D,
|
|
1238
|
-
modal: _,
|
|
1239
|
-
nested: y ?? !1,
|
|
1240
|
-
hasBeenOpened: ie,
|
|
1241
|
-
preventScrollRestoration: w,
|
|
1242
|
-
noBodyStyles: b
|
|
1243
|
-
});
|
|
1244
|
-
function H() {
|
|
1245
|
-
return (window.innerWidth - Qt) / window.innerWidth;
|
|
1246
|
-
}
|
|
1247
|
-
function be(e) {
|
|
1248
|
-
!d && !a || I.current && !I.current.contains(e.target) || (L.current = I.current?.getBoundingClientRect().height || 0, R.current = I.current?.getBoundingClientRect().width || 0, ae(!0), ce.current = /* @__PURE__ */ new Date(), Ct() && window.addEventListener("touchend", () => P.current = !1, { once: !0 }), e.target.setPointerCapture(e.pointerId), ue.current = X(x) ? e.pageY : e.pageX);
|
|
1249
|
-
}
|
|
1250
|
-
function xe(e, t) {
|
|
1251
|
-
let n = e, r = window.getSelection()?.toString(), i = I.current ? Wt(I.current, x) : null, a = /* @__PURE__ */ new Date();
|
|
1252
|
-
if (n.tagName === "SELECT" || n.hasAttribute("data-vaul-no-drag") || n.closest("[data-vaul-no-drag]")) return !1;
|
|
1253
|
-
if (x === "right" || x === "left") return !0;
|
|
1254
|
-
if (j.current && a.getTime() - j.current.getTime() < 500) return !1;
|
|
1255
|
-
if (i !== null && (x === "bottom" ? i > 0 : i < 0)) return !0;
|
|
1256
|
-
if (r && r.length > 0) return !1;
|
|
1257
|
-
if (N.current && a.getTime() - N.current.getTime() < l && i === 0 || t) return N.current = a, !1;
|
|
1258
|
-
for (; n;) {
|
|
1259
|
-
if (n.scrollHeight > n.clientHeight) {
|
|
1260
|
-
if (n.scrollTop !== 0) return N.current = /* @__PURE__ */ new Date(), !1;
|
|
1261
|
-
if (n.getAttribute("role") === "dialog") return !0;
|
|
1262
|
-
}
|
|
1263
|
-
n = n.parentNode;
|
|
1264
|
-
}
|
|
1265
|
-
return !0;
|
|
1266
|
-
}
|
|
1267
|
-
function Se(e) {
|
|
1268
|
-
if (I.current && k) {
|
|
1269
|
-
let t = x === "bottom" || x === "right" ? 1 : -1, n = (ue.current - (X(x) ? e.pageY : e.pageX)) * t, i = n > 0, s = a && !d && !i;
|
|
1270
|
-
if (s && z === 0) return;
|
|
1271
|
-
let c = Math.abs(n), l = document.querySelector("[data-vaul-drawer-wrapper]"), u = c / (x === "bottom" || x === "top" ? L.current : R.current), f = ye(c, i);
|
|
1272
|
-
if (f !== null && (u = f), s && u >= 1 || !P.current && !xe(e.target, i)) return;
|
|
1273
|
-
if (I.current.classList.add($t), P.current = !0, Y(I.current, { transition: "none" }), Y(A.current, { transition: "none" }), a && _e({ draggedDistance: n }), i && !a) {
|
|
1274
|
-
let e = Gt(n), r = Math.min(e * -1, 0) * t;
|
|
1275
|
-
Y(I.current, { transform: X(x) ? `translate3d(0, ${r}px, 0)` : `translate3d(${r}px, 0, 0)` });
|
|
1276
|
-
return;
|
|
1277
|
-
}
|
|
1278
|
-
let m = 1 - u;
|
|
1279
|
-
if ((ve || p && z === p - 1) && (r?.(e, u), Y(A.current, {
|
|
1280
|
-
opacity: `${m}`,
|
|
1281
|
-
transition: "none"
|
|
1282
|
-
}, !0)), l && A.current && o) {
|
|
1283
|
-
let e = Math.min(H() + u * (1 - H()), 1), t = 8 - u * 8, n = Math.max(0, 14 - u * 14);
|
|
1284
|
-
Y(l, {
|
|
1285
|
-
borderRadius: `${t}px`,
|
|
1286
|
-
transform: X(x) ? `scale(${e}) translate3d(0, ${n}px, 0)` : `scale(${e}) translate3d(${n}px, 0, 0)`,
|
|
1287
|
-
transition: "none"
|
|
1288
|
-
}, !0);
|
|
1289
|
-
}
|
|
1290
|
-
if (!a) {
|
|
1291
|
-
let e = c * t;
|
|
1292
|
-
Y(I.current, { transform: X(x) ? `translate3d(0, ${e}px, 0)` : `translate3d(${e}px, 0, 0)` });
|
|
1293
|
-
}
|
|
1294
|
-
}
|
|
1295
|
-
}
|
|
1296
|
-
u.useEffect(() => {
|
|
1297
|
-
window.requestAnimationFrame(() => {
|
|
1298
|
-
de.current = !0;
|
|
1299
|
-
});
|
|
1300
|
-
}, []), u.useEffect(() => {
|
|
1301
|
-
var e;
|
|
1302
|
-
function t() {
|
|
1303
|
-
if (!I.current || !T) return;
|
|
1304
|
-
let e = document.activeElement;
|
|
1305
|
-
if (Rt(e) || F.current) {
|
|
1306
|
-
let e = window.visualViewport?.height || 0, t = window.innerHeight, n = t - e, r = I.current.getBoundingClientRect().height || 0, i = r > t * .8;
|
|
1307
|
-
pe.current ||= r;
|
|
1308
|
-
let o = I.current.getBoundingClientRect().top;
|
|
1309
|
-
if (Math.abs(fe.current - n) > 60 && (F.current = !F.current), a && a.length > 0 && B && z) {
|
|
1310
|
-
let e = B[z] || 0;
|
|
1311
|
-
n += e;
|
|
1312
|
-
}
|
|
1313
|
-
if (fe.current = n, r > e || F.current) {
|
|
1314
|
-
let t = I.current.getBoundingClientRect().height, r = t;
|
|
1315
|
-
t > e && (r = e - (i ? o : Qt)), g ? I.current.style.height = `${t - Math.max(n, 0)}px` : I.current.style.height = `${Math.max(r, e - o)}px`;
|
|
1316
|
-
} else vt() || (I.current.style.height = `${pe.current}px`);
|
|
1317
|
-
a && a.length > 0 && !F.current ? I.current.style.bottom = "0px" : I.current.style.bottom = `${Math.max(n, 0)}px`;
|
|
1318
|
-
}
|
|
1319
|
-
}
|
|
1320
|
-
return (e = window.visualViewport) == null || e.addEventListener("resize", t), () => window.visualViewport?.removeEventListener("resize", t);
|
|
1321
|
-
}, [
|
|
1322
|
-
z,
|
|
1323
|
-
a,
|
|
1324
|
-
B
|
|
1325
|
-
]);
|
|
1326
|
-
function U(e) {
|
|
1327
|
-
we(), v?.(), e || re(!1), setTimeout(() => {
|
|
1328
|
-
a && he(a[0]);
|
|
1329
|
-
}, Z.DURATION * 1e3);
|
|
1330
|
-
}
|
|
1331
|
-
function Ce() {
|
|
1332
|
-
if (!I.current) return;
|
|
1333
|
-
let e = document.querySelector("[data-vaul-drawer-wrapper]"), t = Wt(I.current, x);
|
|
1334
|
-
Y(I.current, {
|
|
1335
|
-
transform: "translate3d(0, 0, 0)",
|
|
1336
|
-
transition: `transform ${Z.DURATION}s cubic-bezier(${Z.EASE.join(",")})`
|
|
1337
|
-
}), Y(A.current, {
|
|
1338
|
-
transition: `opacity ${Z.DURATION}s cubic-bezier(${Z.EASE.join(",")})`,
|
|
1339
|
-
opacity: "1"
|
|
1340
|
-
}), o && t && t > 0 && D && Y(e, {
|
|
1341
|
-
borderRadius: `${Xt}px`,
|
|
1342
|
-
overflow: "hidden",
|
|
1343
|
-
...X(x) ? {
|
|
1344
|
-
transform: `scale(${H()}) translate3d(0, calc(env(safe-area-inset-top) + 14px), 0)`,
|
|
1345
|
-
transformOrigin: "top"
|
|
1346
|
-
} : {
|
|
1347
|
-
transform: `scale(${H()}) translate3d(calc(env(safe-area-inset-top) + 14px), 0, 0)`,
|
|
1348
|
-
transformOrigin: "left"
|
|
1349
|
-
},
|
|
1350
|
-
transitionProperty: "transform, border-radius",
|
|
1351
|
-
transitionDuration: `${Z.DURATION}s`,
|
|
1352
|
-
transitionTimingFunction: `cubic-bezier(${Z.EASE.join(",")})`
|
|
1353
|
-
}, !0);
|
|
1354
|
-
}
|
|
1355
|
-
function we() {
|
|
1356
|
-
!k || !I.current || (I.current.classList.remove($t), P.current = !1, ae(!1), M.current = /* @__PURE__ */ new Date());
|
|
1357
|
-
}
|
|
1358
|
-
function W(e) {
|
|
1359
|
-
if (!k || !I.current) return;
|
|
1360
|
-
I.current.classList.remove($t), P.current = !1, ae(!1), M.current = /* @__PURE__ */ new Date();
|
|
1361
|
-
let t = Wt(I.current, x);
|
|
1362
|
-
if (!e || !xe(e.target, !1) || !t || Number.isNaN(t) || ce.current === null) return;
|
|
1363
|
-
let n = M.current.getTime() - ce.current.getTime(), r = ue.current - (X(x) ? e.pageY : e.pageX), o = Math.abs(r) / n;
|
|
1364
|
-
if (o > .05 && (se(!0), setTimeout(() => {
|
|
1365
|
-
se(!1);
|
|
1366
|
-
}, 200)), a) {
|
|
1367
|
-
ge({
|
|
1368
|
-
draggedDistance: r * (x === "bottom" || x === "right" ? 1 : -1),
|
|
1369
|
-
closeDrawer: U,
|
|
1370
|
-
velocity: o,
|
|
1371
|
-
dismissible: d
|
|
1372
|
-
}), i?.(e, !0);
|
|
1373
|
-
return;
|
|
1374
|
-
}
|
|
1375
|
-
if (x === "bottom" || x === "right" ? r > 0 : r < 0) {
|
|
1376
|
-
Ce(), i?.(e, !0);
|
|
1377
|
-
return;
|
|
1378
|
-
}
|
|
1379
|
-
if (o > qt) {
|
|
1380
|
-
U(), i?.(e, !1);
|
|
1381
|
-
return;
|
|
1382
|
-
}
|
|
1383
|
-
let s = Math.min(I.current.getBoundingClientRect().height ?? 0, window.innerHeight), l = Math.min(I.current.getBoundingClientRect().width ?? 0, window.innerWidth);
|
|
1384
|
-
if (Math.abs(t) >= (x === "left" || x === "right" ? l : s) * c) {
|
|
1385
|
-
U(), i?.(e, !1);
|
|
1386
|
-
return;
|
|
1387
|
-
}
|
|
1388
|
-
i?.(e, !0), Ce();
|
|
1389
|
-
}
|
|
1390
|
-
u.useEffect(() => (D && (Y(document.documentElement, { scrollBehavior: "auto" }), j.current = /* @__PURE__ */ new Date()), () => {
|
|
1391
|
-
Ut(document.documentElement, "scrollBehavior");
|
|
1392
|
-
}), [D]);
|
|
1393
|
-
function Te(e) {
|
|
1394
|
-
let t = e ? (window.innerWidth - Zt) / window.innerWidth : 1, n = e ? -16 : 0;
|
|
1395
|
-
le.current && window.clearTimeout(le.current), Y(I.current, {
|
|
1396
|
-
transition: `transform ${Z.DURATION}s cubic-bezier(${Z.EASE.join(",")})`,
|
|
1397
|
-
transform: X(x) ? `scale(${t}) translate3d(0, ${n}px, 0)` : `scale(${t}) translate3d(${n}px, 0, 0)`
|
|
1398
|
-
}), !e && I.current && (le.current = setTimeout(() => {
|
|
1399
|
-
let e = Wt(I.current, x);
|
|
1400
|
-
Y(I.current, {
|
|
1401
|
-
transition: "none",
|
|
1402
|
-
transform: X(x) ? `translate3d(0, ${e}px, 0)` : `translate3d(${e}px, 0, 0)`
|
|
1403
|
-
});
|
|
1404
|
-
}, 500));
|
|
1405
|
-
}
|
|
1406
|
-
function Ee(e, t) {
|
|
1407
|
-
if (t < 0) return;
|
|
1408
|
-
let n = (window.innerWidth - Zt) / window.innerWidth, r = n + t * (1 - n), i = -16 + t * Zt;
|
|
1409
|
-
Y(I.current, {
|
|
1410
|
-
transform: X(x) ? `scale(${r}) translate3d(0, ${i}px, 0)` : `scale(${r}) translate3d(${i}px, 0, 0)`,
|
|
1411
|
-
transition: "none"
|
|
1412
|
-
});
|
|
1413
|
-
}
|
|
1414
|
-
function De(e, t) {
|
|
1415
|
-
let n = X(x) ? window.innerHeight : window.innerWidth, r = t ? (n - Zt) / n : 1, i = t ? -16 : 0;
|
|
1416
|
-
t && Y(I.current, {
|
|
1417
|
-
transition: `transform ${Z.DURATION}s cubic-bezier(${Z.EASE.join(",")})`,
|
|
1418
|
-
transform: X(x) ? `scale(${r}) translate3d(0, ${i}px, 0)` : `scale(${r}) translate3d(${i}px, 0, 0)`
|
|
1419
|
-
});
|
|
1420
|
-
}
|
|
1421
|
-
return u.useEffect(() => {
|
|
1422
|
-
_ || window.requestAnimationFrame(() => {
|
|
1423
|
-
document.body.style.pointerEvents = "auto";
|
|
1424
|
-
});
|
|
1425
|
-
}, [_]), /*#__PURE__*/ u.createElement(ct, {
|
|
1426
|
-
defaultOpen: S,
|
|
1427
|
-
onOpenChange: (e) => {
|
|
1428
|
-
!d && !e || (e ? O(!0) : U(!0), re(e));
|
|
1429
|
-
},
|
|
1430
|
-
open: D
|
|
1431
|
-
}, /*#__PURE__*/ u.createElement(_t.Provider, { value: {
|
|
1432
|
-
activeSnapPoint: me,
|
|
1433
|
-
snapPoints: a,
|
|
1434
|
-
setActiveSnapPoint: he,
|
|
1435
|
-
drawerRef: I,
|
|
1436
|
-
overlayRef: A,
|
|
1437
|
-
onOpenChange: t,
|
|
1438
|
-
onPress: be,
|
|
1439
|
-
onRelease: W,
|
|
1440
|
-
onDrag: Se,
|
|
1441
|
-
dismissible: d,
|
|
1442
|
-
shouldAnimate: de,
|
|
1443
|
-
handleOnly: f,
|
|
1444
|
-
isOpen: D,
|
|
1445
|
-
isDragging: k,
|
|
1446
|
-
shouldFade: ve,
|
|
1447
|
-
closeDrawer: U,
|
|
1448
|
-
onNestedDrag: Ee,
|
|
1449
|
-
onNestedOpenChange: Te,
|
|
1450
|
-
onNestedRelease: De,
|
|
1451
|
-
keyboardIsOpen: F,
|
|
1452
|
-
modal: _,
|
|
1453
|
-
snapPointsOffset: B,
|
|
1454
|
-
activeSnapPointIndex: z,
|
|
1455
|
-
direction: x,
|
|
1456
|
-
shouldScaleBackground: o,
|
|
1457
|
-
setBackgroundColorOnScale: s,
|
|
1458
|
-
noBodyStyles: b,
|
|
1459
|
-
container: ne,
|
|
1460
|
-
autoFocus: E
|
|
1461
|
-
} }, n));
|
|
1462
|
-
}
|
|
1463
|
-
var cn = /*#__PURE__*/ u.forwardRef(function({ ...e }, t) {
|
|
1464
|
-
let { overlayRef: n, snapPoints: r, onRelease: i, shouldFade: a, isOpen: o, modal: s, shouldAnimate: c } = q(), l = Vt(t, n), d = r && r.length > 0;
|
|
1465
|
-
if (!s) return null;
|
|
1466
|
-
let f = u.useCallback((e) => i(e), [i]);
|
|
1467
|
-
return /*#__PURE__*/ u.createElement(dt, {
|
|
1468
|
-
onMouseUp: f,
|
|
1469
|
-
ref: l,
|
|
1470
|
-
"data-vaul-overlay": "",
|
|
1471
|
-
"data-vaul-snap-points": o && d ? "true" : "false",
|
|
1472
|
-
"data-vaul-snap-points-overlay": o && a ? "true" : "false",
|
|
1473
|
-
"data-vaul-animate": c?.current ? "true" : "false",
|
|
1474
|
-
...e
|
|
1475
|
-
});
|
|
1476
|
-
});
|
|
1477
|
-
cn.displayName = "Drawer.Overlay";
|
|
1478
|
-
var ln = /*#__PURE__*/ u.forwardRef(function({ onPointerDownOutside: e, style: t, onOpenAutoFocus: n, ...r }, i) {
|
|
1479
|
-
let { drawerRef: a, onPress: o, onRelease: s, onDrag: c, keyboardIsOpen: l, snapPointsOffset: d, activeSnapPointIndex: f, modal: p, isOpen: m, direction: h, snapPoints: g, container: _, handleOnly: v, shouldAnimate: y, autoFocus: b } = q(), [x, S] = u.useState(!1), ee = Vt(i, a), C = u.useRef(null), w = u.useRef(null), T = u.useRef(!1), te = g && g.length > 0;
|
|
1480
|
-
an();
|
|
1481
|
-
let ne = (e, t, n = 0) => {
|
|
1482
|
-
if (T.current) return !0;
|
|
1483
|
-
let r = Math.abs(e.y), i = Math.abs(e.x), a = i > r, o = ["bottom", "right"].includes(t) ? 1 : -1;
|
|
1484
|
-
if (t === "left" || t === "right") {
|
|
1485
|
-
if (!(e.x * o < 0) && i >= 0 && i <= n) return a;
|
|
1486
|
-
} else if (!(e.y * o < 0) && r >= 0 && r <= n) return !a;
|
|
1487
|
-
return T.current = !0, !0;
|
|
1488
|
-
};
|
|
1489
|
-
u.useEffect(() => {
|
|
1490
|
-
te && window.requestAnimationFrame(() => {
|
|
1491
|
-
S(!0);
|
|
1492
|
-
});
|
|
1493
|
-
}, []);
|
|
1494
|
-
function E(e) {
|
|
1495
|
-
C.current = null, T.current = !1, s(e);
|
|
1496
|
-
}
|
|
1497
|
-
return /*#__PURE__*/ u.createElement(ft, {
|
|
1498
|
-
"data-vaul-drawer-direction": h,
|
|
1499
|
-
"data-vaul-drawer": "",
|
|
1500
|
-
"data-vaul-delayed-snap-points": x ? "true" : "false",
|
|
1501
|
-
"data-vaul-snap-points": m && te ? "true" : "false",
|
|
1502
|
-
"data-vaul-custom-container": _ ? "true" : "false",
|
|
1503
|
-
"data-vaul-animate": y?.current ? "true" : "false",
|
|
1504
|
-
...r,
|
|
1505
|
-
ref: ee,
|
|
1506
|
-
style: d && d.length > 0 ? {
|
|
1507
|
-
"--snap-point-height": `${d[f ?? 0]}px`,
|
|
1508
|
-
...t
|
|
1509
|
-
} : t,
|
|
1510
|
-
onPointerDown: (e) => {
|
|
1511
|
-
v || (r.onPointerDown == null || r.onPointerDown.call(r, e), C.current = {
|
|
1512
|
-
x: e.pageX,
|
|
1513
|
-
y: e.pageY
|
|
1514
|
-
}, o(e));
|
|
1515
|
-
},
|
|
1516
|
-
onOpenAutoFocus: (e) => {
|
|
1517
|
-
n?.(e), b || e.preventDefault();
|
|
1518
|
-
},
|
|
1519
|
-
onPointerDownOutside: (t) => {
|
|
1520
|
-
if (e?.(t), !p || t.defaultPrevented) {
|
|
1521
|
-
t.preventDefault();
|
|
1522
|
-
return;
|
|
1523
|
-
}
|
|
1524
|
-
l.current &&= !1;
|
|
1525
|
-
},
|
|
1526
|
-
onFocusOutside: (e) => {
|
|
1527
|
-
if (!p) {
|
|
1528
|
-
e.preventDefault();
|
|
1529
|
-
return;
|
|
1530
|
-
}
|
|
1531
|
-
},
|
|
1532
|
-
onPointerMove: (e) => {
|
|
1533
|
-
if (w.current = e, v || (r.onPointerMove == null || r.onPointerMove.call(r, e), !C.current)) return;
|
|
1534
|
-
let t = e.pageY - C.current.y, n = e.pageX - C.current.x, i = e.pointerType === "touch" ? 10 : 2;
|
|
1535
|
-
ne({
|
|
1536
|
-
x: n,
|
|
1537
|
-
y: t
|
|
1538
|
-
}, h, i) ? c(e) : (Math.abs(n) > i || Math.abs(t) > i) && (C.current = null);
|
|
1539
|
-
},
|
|
1540
|
-
onPointerUp: (e) => {
|
|
1541
|
-
r.onPointerUp == null || r.onPointerUp.call(r, e), C.current = null, T.current = !1, s(e);
|
|
1542
|
-
},
|
|
1543
|
-
onPointerOut: (e) => {
|
|
1544
|
-
r.onPointerOut == null || r.onPointerOut.call(r, e), E(w.current);
|
|
1545
|
-
},
|
|
1546
|
-
onContextMenu: (e) => {
|
|
1547
|
-
r.onContextMenu == null || r.onContextMenu.call(r, e), w.current && E(w.current);
|
|
1548
|
-
}
|
|
1549
|
-
});
|
|
1550
|
-
});
|
|
1551
|
-
ln.displayName = "Drawer.Content";
|
|
1552
|
-
var un = 250, dn = 120, fn = /*#__PURE__*/ u.forwardRef(function({ preventCycle: e = !1, children: t, ...n }, r) {
|
|
1553
|
-
let { closeDrawer: i, isDragging: a, snapPoints: o, activeSnapPoint: s, setActiveSnapPoint: c, dismissible: l, handleOnly: d, isOpen: f, onPress: p, onDrag: m } = q(), h = u.useRef(null), g = u.useRef(!1);
|
|
1554
|
-
function _() {
|
|
1555
|
-
if (g.current) {
|
|
1556
|
-
b();
|
|
1557
|
-
return;
|
|
1558
|
-
}
|
|
1559
|
-
window.setTimeout(() => {
|
|
1560
|
-
v();
|
|
1561
|
-
}, dn);
|
|
1562
|
-
}
|
|
1563
|
-
function v() {
|
|
1564
|
-
if (a || e || g.current) {
|
|
1565
|
-
b();
|
|
1566
|
-
return;
|
|
1567
|
-
}
|
|
1568
|
-
if (b(), !o || o.length === 0) {
|
|
1569
|
-
l || i();
|
|
1570
|
-
return;
|
|
1571
|
-
}
|
|
1572
|
-
if (s === o[o.length - 1] && l) {
|
|
1573
|
-
i();
|
|
1574
|
-
return;
|
|
1575
|
-
}
|
|
1576
|
-
let t = o.findIndex((e) => e === s);
|
|
1577
|
-
if (t === -1) return;
|
|
1578
|
-
let n = o[t + 1];
|
|
1579
|
-
c(n);
|
|
1580
|
-
}
|
|
1581
|
-
function y() {
|
|
1582
|
-
h.current = window.setTimeout(() => {
|
|
1583
|
-
g.current = !0;
|
|
1584
|
-
}, un);
|
|
1585
|
-
}
|
|
1586
|
-
function b() {
|
|
1587
|
-
h.current && window.clearTimeout(h.current), g.current = !1;
|
|
1588
|
-
}
|
|
1589
|
-
return /*#__PURE__*/ u.createElement("div", {
|
|
1590
|
-
onClick: _,
|
|
1591
|
-
onPointerCancel: b,
|
|
1592
|
-
onPointerDown: (e) => {
|
|
1593
|
-
d && p(e), y();
|
|
1594
|
-
},
|
|
1595
|
-
onPointerMove: (e) => {
|
|
1596
|
-
d && m(e);
|
|
1597
|
-
},
|
|
1598
|
-
ref: r,
|
|
1599
|
-
"data-vaul-drawer-visible": f ? "true" : "false",
|
|
1600
|
-
"data-vaul-handle": "",
|
|
1601
|
-
"aria-hidden": "true",
|
|
1602
|
-
...n
|
|
1603
|
-
}, /*#__PURE__*/ u.createElement("span", {
|
|
1604
|
-
"data-vaul-handle-hitarea": "",
|
|
1605
|
-
"aria-hidden": "true"
|
|
1606
|
-
}, t));
|
|
1607
|
-
});
|
|
1608
|
-
fn.displayName = "Drawer.Handle";
|
|
1609
|
-
function pn({ onDrag: e, onOpenChange: t, open: n, ...r }) {
|
|
1610
|
-
let { onNestedDrag: i, onNestedOpenChange: a, onNestedRelease: o } = q();
|
|
1611
|
-
if (!i) throw Error("Drawer.NestedRoot must be placed in another drawer");
|
|
1612
|
-
return /*#__PURE__*/ u.createElement(sn, {
|
|
1613
|
-
nested: !0,
|
|
1614
|
-
open: n,
|
|
1615
|
-
onClose: () => {
|
|
1616
|
-
a(!1);
|
|
1617
|
-
},
|
|
1618
|
-
onDrag: (t, n) => {
|
|
1619
|
-
i(t, n), e?.(t, n);
|
|
1620
|
-
},
|
|
1621
|
-
onOpenChange: (e) => {
|
|
1622
|
-
e && a(e), t?.(e);
|
|
1623
|
-
},
|
|
1624
|
-
onRelease: o,
|
|
1625
|
-
...r
|
|
1626
|
-
});
|
|
1627
|
-
}
|
|
1628
|
-
function mn(e) {
|
|
1629
|
-
let t = q(), { container: n = t.container, ...r } = e;
|
|
1630
|
-
return /*#__PURE__*/ u.createElement(ut, {
|
|
1631
|
-
container: n,
|
|
1632
|
-
...r
|
|
1633
|
-
});
|
|
1634
|
-
}
|
|
1635
|
-
var $ = {
|
|
1636
|
-
Root: sn,
|
|
1637
|
-
NestedRoot: pn,
|
|
1638
|
-
Content: ln,
|
|
1639
|
-
Overlay: cn,
|
|
1640
|
-
Trigger: lt,
|
|
1641
|
-
Portal: mn,
|
|
1642
|
-
Handle: fn,
|
|
1643
|
-
Close: ht,
|
|
1644
|
-
Title: pt,
|
|
1645
|
-
Description: mt
|
|
1646
|
-
};
|
|
1647
|
-
//#endregion
|
|
1648
|
-
//#region src/components/ui/drawer.tsx
|
|
1649
|
-
function hn({ ...e }) {
|
|
1650
|
-
return /* @__PURE__ */ h($.Root, {
|
|
1651
|
-
"data-slot": "drawer",
|
|
1652
|
-
...e
|
|
1653
|
-
});
|
|
1654
|
-
}
|
|
1655
|
-
function gn({ ...e }) {
|
|
1656
|
-
return /* @__PURE__ */ h($.Trigger, {
|
|
1657
|
-
"data-slot": "drawer-trigger",
|
|
1658
|
-
...e
|
|
1659
|
-
});
|
|
1660
|
-
}
|
|
1661
|
-
function _n({ ...e }) {
|
|
1662
|
-
return /* @__PURE__ */ h($.Portal, {
|
|
1663
|
-
"data-slot": "drawer-portal",
|
|
1664
|
-
...e
|
|
1665
|
-
});
|
|
1666
|
-
}
|
|
1667
|
-
function vn({ ...e }) {
|
|
1668
|
-
return /* @__PURE__ */ h($.Close, {
|
|
1669
|
-
"data-slot": "drawer-close",
|
|
1670
|
-
...e
|
|
1671
|
-
});
|
|
1672
|
-
}
|
|
1673
|
-
function yn({ className: e, ...t }) {
|
|
1674
|
-
return /* @__PURE__ */ h($.Overlay, {
|
|
1675
|
-
className: i("data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-1000 bg-black/50 data-[state=closed]:animate-out data-[state=open]:animate-in", e),
|
|
1676
|
-
"data-slot": "drawer-overlay",
|
|
1677
|
-
...t
|
|
1678
|
-
});
|
|
1679
|
-
}
|
|
1680
|
-
function bn({ className: e, children: t, ...n }) {
|
|
1681
|
-
return /* @__PURE__ */ g(_n, {
|
|
1682
|
-
"data-slot": "drawer-portal",
|
|
1683
|
-
children: [/* @__PURE__ */ h(yn, {}), /* @__PURE__ */ h($.Content, {
|
|
1684
|
-
className: i("group/drawer-content fixed z-1000 flex h-auto flex-col bg-white", "data-[vaul-drawer-direction=top]:inset-x-0 data-[vaul-drawer-direction=top]:top-0 data-[vaul-drawer-direction=top]:mb-24 data-[vaul-drawer-direction=top]:max-h-[80vh] data-[vaul-drawer-direction=top]:rounded-b-lg data-[vaul-drawer-direction=top]:border-b", "data-[vaul-drawer-direction=bottom]:inset-x-0 data-[vaul-drawer-direction=bottom]:bottom-0 data-[vaul-drawer-direction=bottom]:mt-24 data-[vaul-drawer-direction=bottom]:max-h-[80vh] data-[vaul-drawer-direction=bottom]:rounded-t-lg data-[vaul-drawer-direction=bottom]:border-0", "data-[vaul-drawer-direction=right]:inset-y-0 data-[vaul-drawer-direction=right]:right-0 data-[vaul-drawer-direction=right]:w-3/4 data-[vaul-drawer-direction=right]:border-l data-[vaul-drawer-direction=right]:sm:max-w-sm", "data-[vaul-drawer-direction=left]:inset-y-0 data-[vaul-drawer-direction=left]:left-0 data-[vaul-drawer-direction=left]:w-3/4 data-[vaul-drawer-direction=left]:border-r data-[vaul-drawer-direction=left]:sm:max-w-sm", e),
|
|
1685
|
-
"data-slot": "drawer-content",
|
|
1686
|
-
...n,
|
|
1687
|
-
children: t
|
|
1688
|
-
})]
|
|
1689
|
-
});
|
|
1690
|
-
}
|
|
1691
|
-
function xn({ className: e, ...t }) {
|
|
1692
|
-
return /* @__PURE__ */ h("div", {
|
|
1693
|
-
className: i("flex flex-col gap-2 p-5", e),
|
|
1694
|
-
"data-slot": "drawer-header",
|
|
1695
|
-
...t
|
|
1696
|
-
});
|
|
1697
|
-
}
|
|
1698
|
-
function Sn({ className: e, ...t }) {
|
|
1699
|
-
return /* @__PURE__ */ h("div", {
|
|
1700
|
-
className: i("mt-auto flex flex-col gap-2 p-5", e),
|
|
1701
|
-
"data-slot": "drawer-footer",
|
|
1702
|
-
...t
|
|
1703
|
-
});
|
|
1704
|
-
}
|
|
1705
|
-
function Cn({ className: e, ...t }) {
|
|
1706
|
-
return /* @__PURE__ */ h($.Title, {
|
|
1707
|
-
className: i("font-semibold text-foreground", e),
|
|
1708
|
-
"data-slot": "drawer-title",
|
|
1709
|
-
...t
|
|
1710
|
-
});
|
|
1711
|
-
}
|
|
1712
|
-
function wn({ className: e, ...t }) {
|
|
1713
|
-
return /* @__PURE__ */ h($.Description, {
|
|
1714
|
-
className: i("text-muted-foreground text-sm", e),
|
|
1715
|
-
"data-slot": "drawer-description",
|
|
1716
|
-
...t
|
|
1717
|
-
});
|
|
1718
|
-
}
|
|
1719
|
-
//#endregion
|
|
1720
|
-
export { Sn as a, _n as c, wn as i, Cn as l, vn as n, xn as o, bn as r, yn as s, hn as t, gn as u };
|