@ah-automation.nl/component-lib 0.0.9 → 0.0.10
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/components/sidebar-nav.d.ts.map +1 -1
- package/dist/index.js +650 -635
- package/dist/styles.css +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as m, jsxs as Y, Fragment as vt } from "react/jsx-runtime";
|
|
2
2
|
import * as c from "react";
|
|
3
|
-
import
|
|
3
|
+
import A, { useState as gs, useLayoutEffect as yo, forwardRef as xo, createElement as Vn, useMemo as vs, useEffect as bs } from "react";
|
|
4
4
|
import * as on from "react-dom";
|
|
5
5
|
import ws from "react-dom";
|
|
6
6
|
function Co(e) {
|
|
@@ -16,13 +16,13 @@ function So() {
|
|
|
16
16
|
for (var e, t, n = 0, r = "", o = arguments.length; n < o; n++) (e = arguments[n]) && (t = Co(e)) && (r && (r += " "), r += t);
|
|
17
17
|
return r;
|
|
18
18
|
}
|
|
19
|
-
const
|
|
19
|
+
const Dr = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, _r = So, Eo = (e, t) => (n) => {
|
|
20
20
|
var r;
|
|
21
|
-
if (t?.variants == null) return
|
|
21
|
+
if (t?.variants == null) return _r(e, n?.class, n?.className);
|
|
22
22
|
const { variants: o, defaultVariants: a } = t, i = Object.keys(o).map((d) => {
|
|
23
23
|
const f = n?.[d], u = a?.[d];
|
|
24
24
|
if (f === null) return null;
|
|
25
|
-
const h =
|
|
25
|
+
const h = Dr(f) || Dr(u);
|
|
26
26
|
return o[d][h];
|
|
27
27
|
}), s = n && Object.entries(n).reduce((d, f) => {
|
|
28
28
|
let [u, h] = f;
|
|
@@ -44,9 +44,9 @@ const _r = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, Mr = So, E
|
|
|
44
44
|
h
|
|
45
45
|
] : d;
|
|
46
46
|
}, []);
|
|
47
|
-
return
|
|
47
|
+
return _r(e, i, l, n?.class, n?.className);
|
|
48
48
|
};
|
|
49
|
-
function
|
|
49
|
+
function Mr(e, t) {
|
|
50
50
|
if (typeof e == "function")
|
|
51
51
|
return e(t);
|
|
52
52
|
e != null && (e.current = t);
|
|
@@ -55,14 +55,14 @@ function Ro(...e) {
|
|
|
55
55
|
return (t) => {
|
|
56
56
|
let n = !1;
|
|
57
57
|
const r = e.map((o) => {
|
|
58
|
-
const a =
|
|
58
|
+
const a = Mr(o, t);
|
|
59
59
|
return !n && typeof a == "function" && (n = !0), a;
|
|
60
60
|
});
|
|
61
61
|
if (n)
|
|
62
62
|
return () => {
|
|
63
63
|
for (let o = 0; o < r.length; o++) {
|
|
64
64
|
const a = r[o];
|
|
65
|
-
typeof a == "function" ? a() :
|
|
65
|
+
typeof a == "function" ? a() : Mr(e[o], null);
|
|
66
66
|
}
|
|
67
67
|
};
|
|
68
68
|
};
|
|
@@ -154,7 +154,7 @@ var Po = Object.freeze({
|
|
|
154
154
|
clip: "rect(0, 0, 0, 0)",
|
|
155
155
|
whiteSpace: "nowrap",
|
|
156
156
|
wordWrap: "normal"
|
|
157
|
-
}), ks = "VisuallyHidden",
|
|
157
|
+
}), ks = "VisuallyHidden", Ns = c.forwardRef(
|
|
158
158
|
(e, t) => /* @__PURE__ */ m(
|
|
159
159
|
q.span,
|
|
160
160
|
{
|
|
@@ -164,8 +164,8 @@ var Po = Object.freeze({
|
|
|
164
164
|
}
|
|
165
165
|
)
|
|
166
166
|
);
|
|
167
|
-
|
|
168
|
-
function
|
|
167
|
+
Ns.displayName = ks;
|
|
168
|
+
function As(e, t) {
|
|
169
169
|
const n = c.createContext(t), r = (a) => {
|
|
170
170
|
const { children: i, ...s } = a, l = c.useMemo(() => s, Object.values(s));
|
|
171
171
|
return /* @__PURE__ */ m(n.Provider, { value: l, children: i });
|
|
@@ -232,34 +232,34 @@ function Ts(e) {
|
|
|
232
232
|
t,
|
|
233
233
|
{ collectionRef: { current: null }, itemMap: /* @__PURE__ */ new Map() }
|
|
234
234
|
), i = (p) => {
|
|
235
|
-
const { scope: b, children: v } = p,
|
|
236
|
-
return /* @__PURE__ */ m(o, { scope: b, itemMap:
|
|
235
|
+
const { scope: b, children: v } = p, y = A.useRef(null), x = A.useRef(/* @__PURE__ */ new Map()).current;
|
|
236
|
+
return /* @__PURE__ */ m(o, { scope: b, itemMap: x, collectionRef: y, children: v });
|
|
237
237
|
};
|
|
238
238
|
i.displayName = t;
|
|
239
|
-
const s = e + "CollectionSlot", l = /* @__PURE__ */ tt(s), d =
|
|
239
|
+
const s = e + "CollectionSlot", l = /* @__PURE__ */ tt(s), d = A.forwardRef(
|
|
240
240
|
(p, b) => {
|
|
241
|
-
const { scope: v, children:
|
|
242
|
-
return /* @__PURE__ */ m(l, { ref: g, children:
|
|
241
|
+
const { scope: v, children: y } = p, x = a(s, v), g = ie(b, x.collectionRef);
|
|
242
|
+
return /* @__PURE__ */ m(l, { ref: g, children: y });
|
|
243
243
|
}
|
|
244
244
|
);
|
|
245
245
|
d.displayName = s;
|
|
246
|
-
const f = e + "CollectionItemSlot", u = "data-radix-collection-item", h = /* @__PURE__ */ tt(f), w =
|
|
246
|
+
const f = e + "CollectionItemSlot", u = "data-radix-collection-item", h = /* @__PURE__ */ tt(f), w = A.forwardRef(
|
|
247
247
|
(p, b) => {
|
|
248
|
-
const { scope: v, children:
|
|
249
|
-
return
|
|
248
|
+
const { scope: v, children: y, ...x } = p, g = A.useRef(null), R = ie(b, g), k = a(f, v);
|
|
249
|
+
return A.useEffect(() => (k.itemMap.set(g, { ref: g, ...x }), () => {
|
|
250
250
|
k.itemMap.delete(g);
|
|
251
|
-
})), /* @__PURE__ */ m(h, { [u]: "", ref: R, children:
|
|
251
|
+
})), /* @__PURE__ */ m(h, { [u]: "", ref: R, children: y });
|
|
252
252
|
}
|
|
253
253
|
);
|
|
254
254
|
w.displayName = f;
|
|
255
255
|
function C(p) {
|
|
256
256
|
const b = a(e + "CollectionConsumer", p);
|
|
257
|
-
return
|
|
258
|
-
const
|
|
259
|
-
if (!
|
|
260
|
-
const
|
|
257
|
+
return A.useCallback(() => {
|
|
258
|
+
const y = b.collectionRef.current;
|
|
259
|
+
if (!y) return [];
|
|
260
|
+
const x = Array.from(y.querySelectorAll(`[${u}]`));
|
|
261
261
|
return Array.from(b.itemMap.values()).sort(
|
|
262
|
-
(k, S) =>
|
|
262
|
+
(k, S) => x.indexOf(k.ref.current) - x.indexOf(S.ref.current)
|
|
263
263
|
);
|
|
264
264
|
}, [b.collectionRef, b.itemMap]);
|
|
265
265
|
}
|
|
@@ -395,7 +395,7 @@ function We(e) {
|
|
|
395
395
|
n((r) => r ?? String(Fs++));
|
|
396
396
|
}, [e]), e || (t ? `radix-${t}` : "");
|
|
397
397
|
}
|
|
398
|
-
var sn = "Collapsible", [Bs] = st(sn), [Ws,
|
|
398
|
+
var sn = "Collapsible", [Bs] = st(sn), [Ws, or] = Bs(sn), ko = c.forwardRef(
|
|
399
399
|
(e, t) => {
|
|
400
400
|
const {
|
|
401
401
|
__scopeCollapsible: n,
|
|
@@ -421,7 +421,7 @@ var sn = "Collapsible", [Bs] = st(sn), [Ws, ar] = Bs(sn), ko = c.forwardRef(
|
|
|
421
421
|
children: /* @__PURE__ */ m(
|
|
422
422
|
q.div,
|
|
423
423
|
{
|
|
424
|
-
"data-state":
|
|
424
|
+
"data-state": ir(l),
|
|
425
425
|
"data-disabled": a ? "" : void 0,
|
|
426
426
|
...s,
|
|
427
427
|
ref: t
|
|
@@ -432,16 +432,16 @@ var sn = "Collapsible", [Bs] = st(sn), [Ws, ar] = Bs(sn), ko = c.forwardRef(
|
|
|
432
432
|
}
|
|
433
433
|
);
|
|
434
434
|
ko.displayName = sn;
|
|
435
|
-
var
|
|
435
|
+
var No = "CollapsibleTrigger", Ao = c.forwardRef(
|
|
436
436
|
(e, t) => {
|
|
437
|
-
const { __scopeCollapsible: n, ...r } = e, o =
|
|
437
|
+
const { __scopeCollapsible: n, ...r } = e, o = or(No, n);
|
|
438
438
|
return /* @__PURE__ */ m(
|
|
439
439
|
q.button,
|
|
440
440
|
{
|
|
441
441
|
type: "button",
|
|
442
442
|
"aria-controls": o.contentId,
|
|
443
443
|
"aria-expanded": o.open || !1,
|
|
444
|
-
"data-state":
|
|
444
|
+
"data-state": ir(o.open),
|
|
445
445
|
"data-disabled": o.disabled ? "" : void 0,
|
|
446
446
|
disabled: o.disabled,
|
|
447
447
|
...r,
|
|
@@ -451,33 +451,33 @@ var Ao = "CollapsibleTrigger", No = c.forwardRef(
|
|
|
451
451
|
);
|
|
452
452
|
}
|
|
453
453
|
);
|
|
454
|
-
|
|
455
|
-
var
|
|
454
|
+
Ao.displayName = No;
|
|
455
|
+
var ar = "CollapsibleContent", Oo = c.forwardRef(
|
|
456
456
|
(e, t) => {
|
|
457
|
-
const { forceMount: n, ...r } = e, o = ar
|
|
457
|
+
const { forceMount: n, ...r } = e, o = or(ar, e.__scopeCollapsible);
|
|
458
458
|
return /* @__PURE__ */ m(je, { present: n || o.open, children: ({ present: a }) => /* @__PURE__ */ m(Hs, { ...r, ref: t, present: a }) });
|
|
459
459
|
}
|
|
460
460
|
);
|
|
461
|
-
Oo.displayName =
|
|
461
|
+
Oo.displayName = ar;
|
|
462
462
|
var Hs = c.forwardRef((e, t) => {
|
|
463
|
-
const { __scopeCollapsible: n, present: r, children: o, ...a } = e, i = ar
|
|
463
|
+
const { __scopeCollapsible: n, present: r, children: o, ...a } = e, i = or(ar, n), [s, l] = c.useState(r), d = c.useRef(null), f = ie(t, d), u = c.useRef(0), h = u.current, w = c.useRef(0), C = w.current, p = i.open || s, b = c.useRef(p), v = c.useRef(void 0);
|
|
464
464
|
return c.useEffect(() => {
|
|
465
|
-
const
|
|
466
|
-
return () => cancelAnimationFrame(
|
|
465
|
+
const y = requestAnimationFrame(() => b.current = !1);
|
|
466
|
+
return () => cancelAnimationFrame(y);
|
|
467
467
|
}, []), me(() => {
|
|
468
|
-
const
|
|
469
|
-
if (
|
|
468
|
+
const y = d.current;
|
|
469
|
+
if (y) {
|
|
470
470
|
v.current = v.current || {
|
|
471
|
-
transitionDuration:
|
|
472
|
-
animationName:
|
|
473
|
-
},
|
|
474
|
-
const
|
|
475
|
-
u.current =
|
|
471
|
+
transitionDuration: y.style.transitionDuration,
|
|
472
|
+
animationName: y.style.animationName
|
|
473
|
+
}, y.style.transitionDuration = "0s", y.style.animationName = "none";
|
|
474
|
+
const x = y.getBoundingClientRect();
|
|
475
|
+
u.current = x.height, w.current = x.width, b.current || (y.style.transitionDuration = v.current.transitionDuration, y.style.animationName = v.current.animationName), l(r);
|
|
476
476
|
}
|
|
477
477
|
}, [i.open, r]), /* @__PURE__ */ m(
|
|
478
478
|
q.div,
|
|
479
479
|
{
|
|
480
|
-
"data-state":
|
|
480
|
+
"data-state": ir(i.open),
|
|
481
481
|
"data-disabled": i.disabled ? "" : void 0,
|
|
482
482
|
id: i.contentId,
|
|
483
483
|
hidden: !p,
|
|
@@ -492,10 +492,10 @@ var Hs = c.forwardRef((e, t) => {
|
|
|
492
492
|
}
|
|
493
493
|
);
|
|
494
494
|
});
|
|
495
|
-
function
|
|
495
|
+
function ir(e) {
|
|
496
496
|
return e ? "open" : "closed";
|
|
497
497
|
}
|
|
498
|
-
var Vs = ko, Us =
|
|
498
|
+
var Vs = ko, Us = Ao, js = Oo, Gs = c.createContext(void 0);
|
|
499
499
|
function Ks(e) {
|
|
500
500
|
const t = c.useContext(Gs);
|
|
501
501
|
return e || t || "ltr";
|
|
@@ -515,7 +515,7 @@ function Ys(e, t = globalThis?.document) {
|
|
|
515
515
|
return t.addEventListener("keydown", r, { capture: !0 }), () => t.removeEventListener("keydown", r, { capture: !0 });
|
|
516
516
|
}, [n, t]);
|
|
517
517
|
}
|
|
518
|
-
var Xs = "DismissableLayer",
|
|
518
|
+
var Xs = "DismissableLayer", Un = "dismissableLayer.update", qs = "dismissableLayer.pointerDownOutside", Zs = "dismissableLayer.focusOutside", Lr, To = c.createContext({
|
|
519
519
|
layers: /* @__PURE__ */ new Set(),
|
|
520
520
|
layersWithOutsidePointerEventsDisabled: /* @__PURE__ */ new Set(),
|
|
521
521
|
branches: /* @__PURE__ */ new Set()
|
|
@@ -529,7 +529,7 @@ var Xs = "DismissableLayer", jn = "dismissableLayer.update", qs = "dismissableLa
|
|
|
529
529
|
onInteractOutside: i,
|
|
530
530
|
onDismiss: s,
|
|
531
531
|
...l
|
|
532
|
-
} = e, d = c.useContext(To), [f, u] = c.useState(null), h = f?.ownerDocument ?? globalThis?.document, [, w] = c.useState({}), C = ie(t, (S) => u(S)), p = Array.from(d.layers), [b] = [...d.layersWithOutsidePointerEventsDisabled].slice(-1), v = p.indexOf(b),
|
|
532
|
+
} = e, d = c.useContext(To), [f, u] = c.useState(null), h = f?.ownerDocument ?? globalThis?.document, [, w] = c.useState({}), C = ie(t, (S) => u(S)), p = Array.from(d.layers), [b] = [...d.layersWithOutsidePointerEventsDisabled].slice(-1), v = p.indexOf(b), y = f ? p.indexOf(f) : -1, x = d.layersWithOutsidePointerEventsDisabled.size > 0, g = y >= v, R = el((S) => {
|
|
533
533
|
const E = S.target, P = [...d.branches].some((D) => D.contains(E));
|
|
534
534
|
!g || P || (o?.(S), i?.(S), S.defaultPrevented || s?.());
|
|
535
535
|
}, h), k = tl((S) => {
|
|
@@ -537,24 +537,24 @@ var Xs = "DismissableLayer", jn = "dismissableLayer.update", qs = "dismissableLa
|
|
|
537
537
|
[...d.branches].some((D) => D.contains(E)) || (a?.(S), i?.(S), S.defaultPrevented || s?.());
|
|
538
538
|
}, h);
|
|
539
539
|
return Ys((S) => {
|
|
540
|
-
|
|
540
|
+
y === d.layers.size - 1 && (r?.(S), !S.defaultPrevented && s && (S.preventDefault(), s()));
|
|
541
541
|
}, h), c.useEffect(() => {
|
|
542
542
|
if (f)
|
|
543
|
-
return n && (d.layersWithOutsidePointerEventsDisabled.size === 0 && (
|
|
544
|
-
n && d.layersWithOutsidePointerEventsDisabled.size === 1 && (h.body.style.pointerEvents =
|
|
543
|
+
return n && (d.layersWithOutsidePointerEventsDisabled.size === 0 && (Lr = h.body.style.pointerEvents, h.body.style.pointerEvents = "none"), d.layersWithOutsidePointerEventsDisabled.add(f)), d.layers.add(f), $r(), () => {
|
|
544
|
+
n && d.layersWithOutsidePointerEventsDisabled.size === 1 && (h.body.style.pointerEvents = Lr);
|
|
545
545
|
};
|
|
546
546
|
}, [f, h, n, d]), c.useEffect(() => () => {
|
|
547
|
-
f && (d.layers.delete(f), d.layersWithOutsidePointerEventsDisabled.delete(f),
|
|
547
|
+
f && (d.layers.delete(f), d.layersWithOutsidePointerEventsDisabled.delete(f), $r());
|
|
548
548
|
}, [f, d]), c.useEffect(() => {
|
|
549
549
|
const S = () => w({});
|
|
550
|
-
return document.addEventListener(
|
|
550
|
+
return document.addEventListener(Un, S), () => document.removeEventListener(Un, S);
|
|
551
551
|
}, []), /* @__PURE__ */ m(
|
|
552
552
|
q.div,
|
|
553
553
|
{
|
|
554
554
|
...l,
|
|
555
555
|
ref: C,
|
|
556
556
|
style: {
|
|
557
|
-
pointerEvents:
|
|
557
|
+
pointerEvents: x ? g ? "auto" : "none" : void 0,
|
|
558
558
|
...e.style
|
|
559
559
|
},
|
|
560
560
|
onFocusCapture: Z(e.onFocusCapture, k.onFocusCapture),
|
|
@@ -623,15 +623,15 @@ function tl(e, t = globalThis?.document) {
|
|
|
623
623
|
onBlurCapture: () => r.current = !1
|
|
624
624
|
};
|
|
625
625
|
}
|
|
626
|
-
function
|
|
627
|
-
const e = new CustomEvent(
|
|
626
|
+
function $r() {
|
|
627
|
+
const e = new CustomEvent(Un);
|
|
628
628
|
document.dispatchEvent(e);
|
|
629
629
|
}
|
|
630
630
|
function Io(e, t, n, { discrete: r }) {
|
|
631
631
|
const o = n.originalEvent.target, a = new CustomEvent(e, { bubbles: !1, cancelable: !0, detail: n });
|
|
632
632
|
t && o.addEventListener(e, t, { once: !0 }), r ? Ps(o, a) : o.dispatchEvent(a);
|
|
633
633
|
}
|
|
634
|
-
var Rn = "focusScope.autoFocusOnMount", Pn = "focusScope.autoFocusOnUnmount",
|
|
634
|
+
var Rn = "focusScope.autoFocusOnMount", Pn = "focusScope.autoFocusOnUnmount", zr = { bubbles: !1, cancelable: !0 }, nl = "FocusScope", cn = c.forwardRef((e, t) => {
|
|
635
635
|
const {
|
|
636
636
|
loop: n = !1,
|
|
637
637
|
trapped: r = !1,
|
|
@@ -649,37 +649,37 @@ var Rn = "focusScope.autoFocusOnMount", Pn = "focusScope.autoFocusOnUnmount", Fr
|
|
|
649
649
|
}).current;
|
|
650
650
|
c.useEffect(() => {
|
|
651
651
|
if (r) {
|
|
652
|
-
let p = function(
|
|
652
|
+
let p = function(x) {
|
|
653
653
|
if (w.paused || !s) return;
|
|
654
|
-
const g =
|
|
654
|
+
const g = x.target;
|
|
655
655
|
s.contains(g) ? u.current = g : Be(u.current, { select: !0 });
|
|
656
|
-
}, b = function(
|
|
656
|
+
}, b = function(x) {
|
|
657
657
|
if (w.paused || !s) return;
|
|
658
|
-
const g =
|
|
658
|
+
const g = x.relatedTarget;
|
|
659
659
|
g !== null && (s.contains(g) || Be(u.current, { select: !0 }));
|
|
660
|
-
}, v = function(
|
|
660
|
+
}, v = function(x) {
|
|
661
661
|
if (document.activeElement === document.body)
|
|
662
|
-
for (const R of
|
|
662
|
+
for (const R of x)
|
|
663
663
|
R.removedNodes.length > 0 && Be(s);
|
|
664
664
|
};
|
|
665
665
|
document.addEventListener("focusin", p), document.addEventListener("focusout", b);
|
|
666
|
-
const
|
|
667
|
-
return s &&
|
|
668
|
-
document.removeEventListener("focusin", p), document.removeEventListener("focusout", b),
|
|
666
|
+
const y = new MutationObserver(v);
|
|
667
|
+
return s && y.observe(s, { childList: !0, subtree: !0 }), () => {
|
|
668
|
+
document.removeEventListener("focusin", p), document.removeEventListener("focusout", b), y.disconnect();
|
|
669
669
|
};
|
|
670
670
|
}
|
|
671
671
|
}, [r, s, w.paused]), c.useEffect(() => {
|
|
672
672
|
if (s) {
|
|
673
|
-
|
|
673
|
+
Br.add(w);
|
|
674
674
|
const p = document.activeElement;
|
|
675
675
|
if (!s.contains(p)) {
|
|
676
|
-
const v = new CustomEvent(Rn,
|
|
676
|
+
const v = new CustomEvent(Rn, zr);
|
|
677
677
|
s.addEventListener(Rn, d), s.dispatchEvent(v), v.defaultPrevented || (rl(ll(Do(s)), { select: !0 }), document.activeElement === p && Be(s));
|
|
678
678
|
}
|
|
679
679
|
return () => {
|
|
680
680
|
s.removeEventListener(Rn, d), setTimeout(() => {
|
|
681
|
-
const v = new CustomEvent(Pn,
|
|
682
|
-
s.addEventListener(Pn, f), s.dispatchEvent(v), v.defaultPrevented || Be(p ?? document.body, { select: !0 }), s.removeEventListener(Pn, f),
|
|
681
|
+
const v = new CustomEvent(Pn, zr);
|
|
682
|
+
s.addEventListener(Pn, f), s.dispatchEvent(v), v.defaultPrevented || Be(p ?? document.body, { select: !0 }), s.removeEventListener(Pn, f), Br.remove(w);
|
|
683
683
|
}, 0);
|
|
684
684
|
};
|
|
685
685
|
}
|
|
@@ -689,8 +689,8 @@ var Rn = "focusScope.autoFocusOnMount", Pn = "focusScope.autoFocusOnUnmount", Fr
|
|
|
689
689
|
if (!n && !r || w.paused) return;
|
|
690
690
|
const b = p.key === "Tab" && !p.altKey && !p.ctrlKey && !p.metaKey, v = document.activeElement;
|
|
691
691
|
if (b && v) {
|
|
692
|
-
const
|
|
693
|
-
|
|
692
|
+
const y = p.currentTarget, [x, g] = ol(y);
|
|
693
|
+
x && g ? !p.shiftKey && v === g ? (p.preventDefault(), n && Be(x, { select: !0 })) : p.shiftKey && v === x && (p.preventDefault(), n && Be(g, { select: !0 })) : v === y && p.preventDefault();
|
|
694
694
|
}
|
|
695
695
|
},
|
|
696
696
|
[n, r, w.paused]
|
|
@@ -704,7 +704,7 @@ function rl(e, { select: t = !1 } = {}) {
|
|
|
704
704
|
if (Be(r, { select: t }), document.activeElement !== n) return;
|
|
705
705
|
}
|
|
706
706
|
function ol(e) {
|
|
707
|
-
const t = Do(e), n =
|
|
707
|
+
const t = Do(e), n = Fr(t, e), r = Fr(t.reverse(), e);
|
|
708
708
|
return [n, r];
|
|
709
709
|
}
|
|
710
710
|
function Do(e) {
|
|
@@ -717,7 +717,7 @@ function Do(e) {
|
|
|
717
717
|
for (; n.nextNode(); ) t.push(n.currentNode);
|
|
718
718
|
return t;
|
|
719
719
|
}
|
|
720
|
-
function
|
|
720
|
+
function Fr(e, t) {
|
|
721
721
|
for (const n of e)
|
|
722
722
|
if (!al(n, { upTo: t })) return n;
|
|
723
723
|
}
|
|
@@ -739,20 +739,20 @@ function Be(e, { select: t = !1 } = {}) {
|
|
|
739
739
|
e.focus({ preventScroll: !0 }), e !== n && il(e) && t && e.select();
|
|
740
740
|
}
|
|
741
741
|
}
|
|
742
|
-
var
|
|
742
|
+
var Br = sl();
|
|
743
743
|
function sl() {
|
|
744
744
|
let e = [];
|
|
745
745
|
return {
|
|
746
746
|
add(t) {
|
|
747
747
|
const n = e[0];
|
|
748
|
-
t !== n && n?.pause(), e =
|
|
748
|
+
t !== n && n?.pause(), e = Wr(e, t), e.unshift(t);
|
|
749
749
|
},
|
|
750
750
|
remove(t) {
|
|
751
|
-
e =
|
|
751
|
+
e = Wr(e, t), e[0]?.resume();
|
|
752
752
|
}
|
|
753
753
|
};
|
|
754
754
|
}
|
|
755
|
-
function
|
|
755
|
+
function Wr(e, t) {
|
|
756
756
|
const n = [...e], r = n.indexOf(t);
|
|
757
757
|
return r !== -1 && n.splice(r, 1), n;
|
|
758
758
|
}
|
|
@@ -767,26 +767,26 @@ var cl = "Portal", dn = c.forwardRef((e, t) => {
|
|
|
767
767
|
});
|
|
768
768
|
dn.displayName = cl;
|
|
769
769
|
var kn = 0;
|
|
770
|
-
function
|
|
770
|
+
function sr() {
|
|
771
771
|
c.useEffect(() => {
|
|
772
772
|
const e = document.querySelectorAll("[data-radix-focus-guard]");
|
|
773
|
-
return document.body.insertAdjacentElement("afterbegin", e[0] ??
|
|
773
|
+
return document.body.insertAdjacentElement("afterbegin", e[0] ?? Hr()), document.body.insertAdjacentElement("beforeend", e[1] ?? Hr()), kn++, () => {
|
|
774
774
|
kn === 1 && document.querySelectorAll("[data-radix-focus-guard]").forEach((t) => t.remove()), kn--;
|
|
775
775
|
};
|
|
776
776
|
}, []);
|
|
777
777
|
}
|
|
778
|
-
function
|
|
778
|
+
function Hr() {
|
|
779
779
|
const e = document.createElement("span");
|
|
780
780
|
return e.setAttribute("data-radix-focus-guard", ""), e.tabIndex = 0, e.style.outline = "none", e.style.opacity = "0", e.style.position = "fixed", e.style.pointerEvents = "none", e;
|
|
781
781
|
}
|
|
782
|
-
var
|
|
783
|
-
return
|
|
782
|
+
var Ne = function() {
|
|
783
|
+
return Ne = Object.assign || function(t) {
|
|
784
784
|
for (var n, r = 1, o = arguments.length; r < o; r++) {
|
|
785
785
|
n = arguments[r];
|
|
786
786
|
for (var a in n) Object.prototype.hasOwnProperty.call(n, a) && (t[a] = n[a]);
|
|
787
787
|
}
|
|
788
788
|
return t;
|
|
789
|
-
},
|
|
789
|
+
}, Ne.apply(this, arguments);
|
|
790
790
|
};
|
|
791
791
|
function _o(e, t) {
|
|
792
792
|
var n = {};
|
|
@@ -802,7 +802,7 @@ function dl(e, t, n) {
|
|
|
802
802
|
return e.concat(a || Array.prototype.slice.call(t));
|
|
803
803
|
}
|
|
804
804
|
var Yt = "right-scroll-bar-position", Xt = "width-before-scroll-bar", ul = "with-scroll-bars-hidden", fl = "--removed-body-scroll-bar-size";
|
|
805
|
-
function
|
|
805
|
+
function Nn(e, t) {
|
|
806
806
|
return typeof e == "function" ? e(t) : e && (e.current = t), e;
|
|
807
807
|
}
|
|
808
808
|
function pl(e, t) {
|
|
@@ -826,24 +826,24 @@ function pl(e, t) {
|
|
|
826
826
|
})[0];
|
|
827
827
|
return n.callback = t, n.facade;
|
|
828
828
|
}
|
|
829
|
-
var ml = typeof window < "u" ? c.useLayoutEffect : c.useEffect,
|
|
829
|
+
var ml = typeof window < "u" ? c.useLayoutEffect : c.useEffect, Vr = /* @__PURE__ */ new WeakMap();
|
|
830
830
|
function hl(e, t) {
|
|
831
831
|
var n = pl(null, function(r) {
|
|
832
832
|
return e.forEach(function(o) {
|
|
833
|
-
return
|
|
833
|
+
return Nn(o, r);
|
|
834
834
|
});
|
|
835
835
|
});
|
|
836
836
|
return ml(function() {
|
|
837
|
-
var r =
|
|
837
|
+
var r = Vr.get(n);
|
|
838
838
|
if (r) {
|
|
839
839
|
var o = new Set(r), a = new Set(e), i = n.current;
|
|
840
840
|
o.forEach(function(s) {
|
|
841
|
-
a.has(s) ||
|
|
841
|
+
a.has(s) || Nn(s, null);
|
|
842
842
|
}), a.forEach(function(s) {
|
|
843
|
-
o.has(s) ||
|
|
843
|
+
o.has(s) || Nn(s, i);
|
|
844
844
|
});
|
|
845
845
|
}
|
|
846
|
-
|
|
846
|
+
Vr.set(n, e);
|
|
847
847
|
}, [e]), n;
|
|
848
848
|
}
|
|
849
849
|
function gl(e) {
|
|
@@ -907,7 +907,7 @@ function vl(e, t) {
|
|
|
907
907
|
function bl(e) {
|
|
908
908
|
e === void 0 && (e = {});
|
|
909
909
|
var t = vl(null);
|
|
910
|
-
return t.options =
|
|
910
|
+
return t.options = Ne({ async: !0, ssr: !1 }, e), t;
|
|
911
911
|
}
|
|
912
912
|
var Mo = function(e) {
|
|
913
913
|
var t = e.sideCar, n = _o(e, ["sideCar"]);
|
|
@@ -916,24 +916,24 @@ var Mo = function(e) {
|
|
|
916
916
|
var r = t.read();
|
|
917
917
|
if (!r)
|
|
918
918
|
throw new Error("Sidecar medium not found");
|
|
919
|
-
return c.createElement(r,
|
|
919
|
+
return c.createElement(r, Ne({}, n));
|
|
920
920
|
};
|
|
921
921
|
Mo.isSideCarExport = !0;
|
|
922
922
|
function wl(e, t) {
|
|
923
923
|
return e.useMedium(t), Mo;
|
|
924
924
|
}
|
|
925
|
-
var Lo = bl(),
|
|
925
|
+
var Lo = bl(), An = function() {
|
|
926
926
|
}, un = c.forwardRef(function(e, t) {
|
|
927
927
|
var n = c.useRef(null), r = c.useState({
|
|
928
|
-
onScrollCapture:
|
|
929
|
-
onWheelCapture:
|
|
930
|
-
onTouchMoveCapture:
|
|
931
|
-
}), o = r[0], a = r[1], i = e.forwardProps, s = e.children, l = e.className, d = e.removeScrollBar, f = e.enabled, u = e.shards, h = e.sideCar, w = e.noRelative, C = e.noIsolation, p = e.inert, b = e.allowPinchZoom, v = e.as,
|
|
928
|
+
onScrollCapture: An,
|
|
929
|
+
onWheelCapture: An,
|
|
930
|
+
onTouchMoveCapture: An
|
|
931
|
+
}), o = r[0], a = r[1], i = e.forwardProps, s = e.children, l = e.className, d = e.removeScrollBar, f = e.enabled, u = e.shards, h = e.sideCar, w = e.noRelative, C = e.noIsolation, p = e.inert, b = e.allowPinchZoom, v = e.as, y = v === void 0 ? "div" : v, x = e.gapMode, g = _o(e, ["forwardProps", "children", "className", "removeScrollBar", "enabled", "shards", "sideCar", "noRelative", "noIsolation", "inert", "allowPinchZoom", "as", "gapMode"]), R = h, k = hl([n, t]), S = Ne(Ne({}, g), o);
|
|
932
932
|
return c.createElement(
|
|
933
933
|
c.Fragment,
|
|
934
934
|
null,
|
|
935
|
-
f && c.createElement(R, { sideCar: Lo, removeScrollBar: d, shards: u, noRelative: w, noIsolation: C, inert: p, setCallbacks: a, allowPinchZoom: !!b, lockRef: n, gapMode:
|
|
936
|
-
i ? c.cloneElement(c.Children.only(s),
|
|
935
|
+
f && c.createElement(R, { sideCar: Lo, removeScrollBar: d, shards: u, noRelative: w, noIsolation: C, inert: p, setCallbacks: a, allowPinchZoom: !!b, lockRef: n, gapMode: x }),
|
|
936
|
+
i ? c.cloneElement(c.Children.only(s), Ne(Ne({}, S), { ref: k })) : c.createElement(y, Ne({}, S, { className: l, ref: k }), s)
|
|
937
937
|
);
|
|
938
938
|
});
|
|
939
939
|
un.defaultProps = {
|
|
@@ -999,7 +999,7 @@ var El = function() {
|
|
|
999
999
|
}, kl = function(e) {
|
|
1000
1000
|
var t = window.getComputedStyle(document.body), n = t[e === "padding" ? "paddingLeft" : "marginLeft"], r = t[e === "padding" ? "paddingTop" : "marginTop"], o = t[e === "padding" ? "paddingRight" : "marginRight"];
|
|
1001
1001
|
return [On(n), On(r), On(o)];
|
|
1002
|
-
},
|
|
1002
|
+
}, Nl = function(e) {
|
|
1003
1003
|
if (e === void 0 && (e = "margin"), typeof window > "u")
|
|
1004
1004
|
return Pl;
|
|
1005
1005
|
var t = kl(e), n = document.documentElement.clientWidth, r = window.innerWidth;
|
|
@@ -1009,7 +1009,7 @@ var El = function() {
|
|
|
1009
1009
|
right: t[2],
|
|
1010
1010
|
gap: Math.max(0, r - n + t[2] - t[0])
|
|
1011
1011
|
};
|
|
1012
|
-
},
|
|
1012
|
+
}, Al = $o(), ht = "data-scroll-locked", Ol = function(e, t, n, r) {
|
|
1013
1013
|
var o = e.left, a = e.top, i = e.right, s = e.gap;
|
|
1014
1014
|
return n === void 0 && (n = "margin"), `
|
|
1015
1015
|
.`.concat(ul, ` {
|
|
@@ -1053,13 +1053,13 @@ var El = function() {
|
|
|
1053
1053
|
`).concat(fl, ": ").concat(s, `px;
|
|
1054
1054
|
}
|
|
1055
1055
|
`);
|
|
1056
|
-
},
|
|
1056
|
+
}, Ur = function() {
|
|
1057
1057
|
var e = parseInt(document.body.getAttribute(ht) || "0", 10);
|
|
1058
1058
|
return isFinite(e) ? e : 0;
|
|
1059
1059
|
}, Tl = function() {
|
|
1060
1060
|
c.useEffect(function() {
|
|
1061
|
-
return document.body.setAttribute(ht, (
|
|
1062
|
-
var e =
|
|
1061
|
+
return document.body.setAttribute(ht, (Ur() + 1).toString()), function() {
|
|
1062
|
+
var e = Ur() - 1;
|
|
1063
1063
|
e <= 0 ? document.body.removeAttribute(ht) : document.body.setAttribute(ht, e.toString());
|
|
1064
1064
|
};
|
|
1065
1065
|
}, []);
|
|
@@ -1067,22 +1067,22 @@ var El = function() {
|
|
|
1067
1067
|
var t = e.noRelative, n = e.noImportant, r = e.gapMode, o = r === void 0 ? "margin" : r;
|
|
1068
1068
|
Tl();
|
|
1069
1069
|
var a = c.useMemo(function() {
|
|
1070
|
-
return
|
|
1070
|
+
return Nl(o);
|
|
1071
1071
|
}, [o]);
|
|
1072
|
-
return c.createElement(
|
|
1073
|
-
},
|
|
1072
|
+
return c.createElement(Al, { styles: Ol(a, !t, o, n ? "" : "!important") });
|
|
1073
|
+
}, jn = !1;
|
|
1074
1074
|
if (typeof window < "u")
|
|
1075
1075
|
try {
|
|
1076
1076
|
var Ft = Object.defineProperty({}, "passive", {
|
|
1077
1077
|
get: function() {
|
|
1078
|
-
return
|
|
1078
|
+
return jn = !0, !0;
|
|
1079
1079
|
}
|
|
1080
1080
|
});
|
|
1081
1081
|
window.addEventListener("test", Ft, Ft), window.removeEventListener("test", Ft, Ft);
|
|
1082
1082
|
} catch {
|
|
1083
|
-
|
|
1083
|
+
jn = !1;
|
|
1084
1084
|
}
|
|
1085
|
-
var ft =
|
|
1085
|
+
var ft = jn ? { passive: !1 } : !1, Dl = function(e) {
|
|
1086
1086
|
return e.tagName === "TEXTAREA";
|
|
1087
1087
|
}, zo = function(e, t) {
|
|
1088
1088
|
if (!(e instanceof Element))
|
|
@@ -1097,7 +1097,7 @@ var ft = Gn ? { passive: !1 } : !1, Dl = function(e) {
|
|
|
1097
1097
|
return zo(e, "overflowY");
|
|
1098
1098
|
}, Ml = function(e) {
|
|
1099
1099
|
return zo(e, "overflowX");
|
|
1100
|
-
},
|
|
1100
|
+
}, jr = function(e, t) {
|
|
1101
1101
|
var n = t.ownerDocument, r = t;
|
|
1102
1102
|
do {
|
|
1103
1103
|
typeof ShadowRoot < "u" && r instanceof ShadowRoot && (r = r.host);
|
|
@@ -1137,8 +1137,8 @@ var ft = Gn ? { passive: !1 } : !1, Dl = function(e) {
|
|
|
1137
1137
|
break;
|
|
1138
1138
|
var w = Bo(e, s), C = w[0], p = w[1], b = w[2], v = p - b - a * C;
|
|
1139
1139
|
(C || v) && Fo(e, s) && (u += v, h += C);
|
|
1140
|
-
var
|
|
1141
|
-
s =
|
|
1140
|
+
var y = s.parentNode;
|
|
1141
|
+
s = y && y.nodeType === Node.DOCUMENT_FRAGMENT_NODE ? y.host : y;
|
|
1142
1142
|
} while (
|
|
1143
1143
|
// portaled content
|
|
1144
1144
|
!l && s !== document.body || // self content
|
|
@@ -1147,9 +1147,9 @@ var ft = Gn ? { passive: !1 } : !1, Dl = function(e) {
|
|
|
1147
1147
|
return (f && Math.abs(u) < 1 || !f && Math.abs(h) < 1) && (d = !0), d;
|
|
1148
1148
|
}, Bt = function(e) {
|
|
1149
1149
|
return "changedTouches" in e ? [e.changedTouches[0].clientX, e.changedTouches[0].clientY] : [0, 0];
|
|
1150
|
-
},
|
|
1150
|
+
}, Gr = function(e) {
|
|
1151
1151
|
return [e.deltaX, e.deltaY];
|
|
1152
|
-
},
|
|
1152
|
+
}, Kr = function(e) {
|
|
1153
1153
|
return e && "current" in e ? e.current : e;
|
|
1154
1154
|
}, Bl = function(e, t) {
|
|
1155
1155
|
return e[0] === t[0] && e[1] === t[1];
|
|
@@ -1166,7 +1166,7 @@ function Vl(e) {
|
|
|
1166
1166
|
}, [e]), c.useEffect(function() {
|
|
1167
1167
|
if (e.inert) {
|
|
1168
1168
|
document.body.classList.add("block-interactivity-".concat(o));
|
|
1169
|
-
var p = dl([e.lockRef.current], (e.shards || []).map(
|
|
1169
|
+
var p = dl([e.lockRef.current], (e.shards || []).map(Kr), !0).filter(Boolean);
|
|
1170
1170
|
return p.forEach(function(b) {
|
|
1171
1171
|
return b.classList.add("allow-interactivity-".concat(o));
|
|
1172
1172
|
}), function() {
|
|
@@ -1179,49 +1179,49 @@ function Vl(e) {
|
|
|
1179
1179
|
var s = c.useCallback(function(p, b) {
|
|
1180
1180
|
if ("touches" in p && p.touches.length === 2 || p.type === "wheel" && p.ctrlKey)
|
|
1181
1181
|
return !i.current.allowPinchZoom;
|
|
1182
|
-
var v = Bt(p),
|
|
1182
|
+
var v = Bt(p), y = n.current, x = "deltaX" in p ? p.deltaX : y[0] - v[0], g = "deltaY" in p ? p.deltaY : y[1] - v[1], R, k = p.target, S = Math.abs(x) > Math.abs(g) ? "h" : "v";
|
|
1183
1183
|
if ("touches" in p && S === "h" && k.type === "range")
|
|
1184
1184
|
return !1;
|
|
1185
1185
|
var E = window.getSelection(), P = E && E.anchorNode, D = P ? P === k || P.contains(k) : !1;
|
|
1186
1186
|
if (D)
|
|
1187
1187
|
return !1;
|
|
1188
|
-
var z =
|
|
1188
|
+
var z = jr(S, k);
|
|
1189
1189
|
if (!z)
|
|
1190
1190
|
return !0;
|
|
1191
|
-
if (z ? R = S : (R = S === "v" ? "h" : "v", z =
|
|
1191
|
+
if (z ? R = S : (R = S === "v" ? "h" : "v", z = jr(S, k)), !z)
|
|
1192
1192
|
return !1;
|
|
1193
|
-
if (!r.current && "changedTouches" in p && (
|
|
1193
|
+
if (!r.current && "changedTouches" in p && (x || g) && (r.current = R), !R)
|
|
1194
1194
|
return !0;
|
|
1195
1195
|
var H = r.current || R;
|
|
1196
|
-
return Fl(H, b, p, H === "h" ?
|
|
1196
|
+
return Fl(H, b, p, H === "h" ? x : g);
|
|
1197
1197
|
}, []), l = c.useCallback(function(p) {
|
|
1198
1198
|
var b = p;
|
|
1199
1199
|
if (!(!pt.length || pt[pt.length - 1] !== a)) {
|
|
1200
|
-
var v = "deltaY" in b ?
|
|
1200
|
+
var v = "deltaY" in b ? Gr(b) : Bt(b), y = t.current.filter(function(R) {
|
|
1201
1201
|
return R.name === b.type && (R.target === b.target || b.target === R.shadowParent) && Bl(R.delta, v);
|
|
1202
1202
|
})[0];
|
|
1203
|
-
if (
|
|
1203
|
+
if (y && y.should) {
|
|
1204
1204
|
b.cancelable && b.preventDefault();
|
|
1205
1205
|
return;
|
|
1206
1206
|
}
|
|
1207
|
-
if (!
|
|
1208
|
-
var
|
|
1207
|
+
if (!y) {
|
|
1208
|
+
var x = (i.current.shards || []).map(Kr).filter(Boolean).filter(function(R) {
|
|
1209
1209
|
return R.contains(b.target);
|
|
1210
|
-
}), g =
|
|
1210
|
+
}), g = x.length > 0 ? s(b, x[0]) : !i.current.noIsolation;
|
|
1211
1211
|
g && b.cancelable && b.preventDefault();
|
|
1212
1212
|
}
|
|
1213
1213
|
}
|
|
1214
|
-
}, []), d = c.useCallback(function(p, b, v,
|
|
1215
|
-
var
|
|
1216
|
-
t.current.push(
|
|
1214
|
+
}, []), d = c.useCallback(function(p, b, v, y) {
|
|
1215
|
+
var x = { name: p, delta: b, target: v, should: y, shadowParent: Ul(v) };
|
|
1216
|
+
t.current.push(x), setTimeout(function() {
|
|
1217
1217
|
t.current = t.current.filter(function(g) {
|
|
1218
|
-
return g !==
|
|
1218
|
+
return g !== x;
|
|
1219
1219
|
});
|
|
1220
1220
|
}, 1);
|
|
1221
1221
|
}, []), f = c.useCallback(function(p) {
|
|
1222
1222
|
n.current = Bt(p), r.current = void 0;
|
|
1223
1223
|
}, []), u = c.useCallback(function(p) {
|
|
1224
|
-
d(p.type,
|
|
1224
|
+
d(p.type, Gr(p), p.target, s(p, e.lockRef.current));
|
|
1225
1225
|
}, []), h = c.useCallback(function(p) {
|
|
1226
1226
|
d(p.type, Bt(p), p.target, s(p, e.lockRef.current));
|
|
1227
1227
|
}, []);
|
|
@@ -1251,7 +1251,7 @@ function Ul(e) {
|
|
|
1251
1251
|
}
|
|
1252
1252
|
const jl = wl(Lo, Vl);
|
|
1253
1253
|
var fn = c.forwardRef(function(e, t) {
|
|
1254
|
-
return c.createElement(un,
|
|
1254
|
+
return c.createElement(un, Ne({}, e, { ref: t, sideCar: jl }));
|
|
1255
1255
|
});
|
|
1256
1256
|
fn.classNames = un.classNames;
|
|
1257
1257
|
var Gl = function(e) {
|
|
@@ -1296,7 +1296,7 @@ var Gl = function(e) {
|
|
|
1296
1296
|
mt.set(u, h), a.set(u, w), h || (Wt.has(u) || u.removeAttribute(r), Wt.delete(u)), w || u.removeAttribute(n);
|
|
1297
1297
|
}), Tn--, Tn || (mt = /* @__PURE__ */ new WeakMap(), mt = /* @__PURE__ */ new WeakMap(), Wt = /* @__PURE__ */ new WeakMap(), Ht = {});
|
|
1298
1298
|
};
|
|
1299
|
-
},
|
|
1299
|
+
}, lr = function(e, t, n) {
|
|
1300
1300
|
n === void 0 && (n = "data-aria-hidden");
|
|
1301
1301
|
var r = Array.from(Array.isArray(e) ? e : [e]), o = Gl(e);
|
|
1302
1302
|
return o ? (r.push.apply(r, Array.from(o.querySelectorAll("[aria-live], script"))), Yl(r, o, n, "aria-hidden")) : function() {
|
|
@@ -1344,7 +1344,7 @@ var Uo = "DialogTrigger", ql = c.forwardRef(
|
|
|
1344
1344
|
"aria-haspopup": "dialog",
|
|
1345
1345
|
"aria-expanded": o.open,
|
|
1346
1346
|
"aria-controls": o.contentId,
|
|
1347
|
-
"data-state":
|
|
1347
|
+
"data-state": ur(o.open),
|
|
1348
1348
|
...r,
|
|
1349
1349
|
ref: a,
|
|
1350
1350
|
onClick: Z(e.onClick, o.onOpenToggle)
|
|
@@ -1353,13 +1353,13 @@ var Uo = "DialogTrigger", ql = c.forwardRef(
|
|
|
1353
1353
|
}
|
|
1354
1354
|
);
|
|
1355
1355
|
ql.displayName = Uo;
|
|
1356
|
-
var
|
|
1356
|
+
var cr = "DialogPortal", [Zl, jo] = Ho(cr, {
|
|
1357
1357
|
forceMount: void 0
|
|
1358
1358
|
}), Go = (e) => {
|
|
1359
|
-
const { __scopeDialog: t, forceMount: n, children: r, container: o } = e, a = Pe(
|
|
1359
|
+
const { __scopeDialog: t, forceMount: n, children: r, container: o } = e, a = Pe(cr, t);
|
|
1360
1360
|
return /* @__PURE__ */ m(Zl, { scope: t, forceMount: n, children: c.Children.map(r, (i) => /* @__PURE__ */ m(je, { present: n || a.open, children: /* @__PURE__ */ m(dn, { asChild: !0, container: o, children: i }) })) });
|
|
1361
1361
|
};
|
|
1362
|
-
Go.displayName =
|
|
1362
|
+
Go.displayName = cr;
|
|
1363
1363
|
var Zt = "DialogOverlay", Ko = c.forwardRef(
|
|
1364
1364
|
(e, t) => {
|
|
1365
1365
|
const n = jo(Zt, e.__scopeDialog), { forceMount: r = n.forceMount, ...o } = e, a = Pe(Zt, e.__scopeDialog);
|
|
@@ -1376,7 +1376,7 @@ var Ql = /* @__PURE__ */ tt("DialogOverlay.RemoveScroll"), Jl = c.forwardRef(
|
|
|
1376
1376
|
/* @__PURE__ */ m(fn, { as: Ql, allowPinchZoom: !0, shards: [o.contentRef], children: /* @__PURE__ */ m(
|
|
1377
1377
|
q.div,
|
|
1378
1378
|
{
|
|
1379
|
-
"data-state":
|
|
1379
|
+
"data-state": ur(o.open),
|
|
1380
1380
|
...r,
|
|
1381
1381
|
ref: t,
|
|
1382
1382
|
style: { pointerEvents: "auto", ...r.style }
|
|
@@ -1396,7 +1396,7 @@ var ec = c.forwardRef(
|
|
|
1396
1396
|
const n = Pe(rt, e.__scopeDialog), r = c.useRef(null), o = ie(t, n.contentRef, r);
|
|
1397
1397
|
return c.useEffect(() => {
|
|
1398
1398
|
const a = r.current;
|
|
1399
|
-
if (a) return
|
|
1399
|
+
if (a) return lr(a);
|
|
1400
1400
|
}, []), /* @__PURE__ */ m(
|
|
1401
1401
|
Xo,
|
|
1402
1402
|
{
|
|
@@ -1442,7 +1442,7 @@ var ec = c.forwardRef(
|
|
|
1442
1442
|
), Xo = c.forwardRef(
|
|
1443
1443
|
(e, t) => {
|
|
1444
1444
|
const { __scopeDialog: n, trapFocus: r, onOpenAutoFocus: o, onCloseAutoFocus: a, ...i } = e, s = Pe(rt, n), l = c.useRef(null), d = ie(t, l);
|
|
1445
|
-
return
|
|
1445
|
+
return sr(), /* @__PURE__ */ Y(vt, { children: [
|
|
1446
1446
|
/* @__PURE__ */ m(
|
|
1447
1447
|
cn,
|
|
1448
1448
|
{
|
|
@@ -1458,7 +1458,7 @@ var ec = c.forwardRef(
|
|
|
1458
1458
|
id: s.contentId,
|
|
1459
1459
|
"aria-describedby": s.descriptionId,
|
|
1460
1460
|
"aria-labelledby": s.titleId,
|
|
1461
|
-
"data-state":
|
|
1461
|
+
"data-state": ur(s.open),
|
|
1462
1462
|
...i,
|
|
1463
1463
|
ref: d,
|
|
1464
1464
|
onDismiss: () => s.onOpenChange(!1)
|
|
@@ -1472,13 +1472,13 @@ var ec = c.forwardRef(
|
|
|
1472
1472
|
] })
|
|
1473
1473
|
] });
|
|
1474
1474
|
}
|
|
1475
|
-
),
|
|
1475
|
+
), dr = "DialogTitle", qo = c.forwardRef(
|
|
1476
1476
|
(e, t) => {
|
|
1477
|
-
const { __scopeDialog: n, ...r } = e, o = Pe(
|
|
1477
|
+
const { __scopeDialog: n, ...r } = e, o = Pe(dr, n);
|
|
1478
1478
|
return /* @__PURE__ */ m(q.h2, { id: o.titleId, ...r, ref: t });
|
|
1479
1479
|
}
|
|
1480
1480
|
);
|
|
1481
|
-
qo.displayName =
|
|
1481
|
+
qo.displayName = dr;
|
|
1482
1482
|
var Zo = "DialogDescription", Qo = c.forwardRef(
|
|
1483
1483
|
(e, t) => {
|
|
1484
1484
|
const { __scopeDialog: n, ...r } = e, o = Pe(Zo, n);
|
|
@@ -1501,12 +1501,12 @@ var Jo = "DialogClose", ea = c.forwardRef(
|
|
|
1501
1501
|
}
|
|
1502
1502
|
);
|
|
1503
1503
|
ea.displayName = Jo;
|
|
1504
|
-
function
|
|
1504
|
+
function ur(e) {
|
|
1505
1505
|
return e ? "open" : "closed";
|
|
1506
1506
|
}
|
|
1507
|
-
var ta = "DialogTitleWarning", [Yp, na] =
|
|
1507
|
+
var ta = "DialogTitleWarning", [Yp, na] = As(ta, {
|
|
1508
1508
|
contentName: rt,
|
|
1509
|
-
titleName:
|
|
1509
|
+
titleName: dr,
|
|
1510
1510
|
docsSlug: "dialog"
|
|
1511
1511
|
}), nc = ({ titleId: e }) => {
|
|
1512
1512
|
const t = na(ta), n = `\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
|
|
@@ -1550,7 +1550,7 @@ function da(e) {
|
|
|
1550
1550
|
n(void 0);
|
|
1551
1551
|
}, [e]), t;
|
|
1552
1552
|
}
|
|
1553
|
-
var mn = "Checkbox", [ic] = st(mn), [sc,
|
|
1553
|
+
var mn = "Checkbox", [ic] = st(mn), [sc, fr] = ic(mn);
|
|
1554
1554
|
function lc(e) {
|
|
1555
1555
|
const {
|
|
1556
1556
|
__scopeCheckbox: t,
|
|
@@ -1570,7 +1570,7 @@ function lc(e) {
|
|
|
1570
1570
|
defaultProp: o ?? !1,
|
|
1571
1571
|
onChange: l,
|
|
1572
1572
|
caller: mn
|
|
1573
|
-
}), [C, p] = c.useState(null), [b, v] = c.useState(null),
|
|
1573
|
+
}), [C, p] = c.useState(null), [b, v] = c.useState(null), y = c.useRef(!1), x = C ? !!i || !!C.closest("form") : (
|
|
1574
1574
|
// We set this to true by default so that events bubble to forms without JS (SSR)
|
|
1575
1575
|
!0
|
|
1576
1576
|
), g = {
|
|
@@ -1582,10 +1582,10 @@ function lc(e) {
|
|
|
1582
1582
|
name: s,
|
|
1583
1583
|
form: i,
|
|
1584
1584
|
value: f,
|
|
1585
|
-
hasConsumerStoppedPropagationRef:
|
|
1585
|
+
hasConsumerStoppedPropagationRef: y,
|
|
1586
1586
|
required: d,
|
|
1587
1587
|
defaultChecked: He(o) ? !1 : o,
|
|
1588
|
-
isFormControl:
|
|
1588
|
+
isFormControl: x,
|
|
1589
1589
|
bubbleInput: b,
|
|
1590
1590
|
setBubbleInput: v
|
|
1591
1591
|
};
|
|
@@ -1611,12 +1611,12 @@ var ua = "CheckboxTrigger", fa = c.forwardRef(
|
|
|
1611
1611
|
hasConsumerStoppedPropagationRef: h,
|
|
1612
1612
|
isFormControl: w,
|
|
1613
1613
|
bubbleInput: C
|
|
1614
|
-
} =
|
|
1614
|
+
} = fr(ua, e), p = ie(o, f), b = c.useRef(l);
|
|
1615
1615
|
return c.useEffect(() => {
|
|
1616
1616
|
const v = a?.form;
|
|
1617
1617
|
if (v) {
|
|
1618
|
-
const
|
|
1619
|
-
return v.addEventListener("reset",
|
|
1618
|
+
const y = () => u(b.current);
|
|
1619
|
+
return v.addEventListener("reset", y), () => v.removeEventListener("reset", y);
|
|
1620
1620
|
}
|
|
1621
1621
|
}, [a, u]), /* @__PURE__ */ m(
|
|
1622
1622
|
q.button,
|
|
@@ -1635,7 +1635,7 @@ var ua = "CheckboxTrigger", fa = c.forwardRef(
|
|
|
1635
1635
|
v.key === "Enter" && v.preventDefault();
|
|
1636
1636
|
}),
|
|
1637
1637
|
onClick: Z(n, (v) => {
|
|
1638
|
-
u((
|
|
1638
|
+
u((y) => He(y) ? !0 : !y), C && w && (h.current = v.isPropagationStopped(), h.current || v.stopPropagation());
|
|
1639
1639
|
})
|
|
1640
1640
|
}
|
|
1641
1641
|
);
|
|
@@ -1691,7 +1691,7 @@ var pa = c.forwardRef(
|
|
|
1691
1691
|
pa.displayName = mn;
|
|
1692
1692
|
var ma = "CheckboxIndicator", ha = c.forwardRef(
|
|
1693
1693
|
(e, t) => {
|
|
1694
|
-
const { __scopeCheckbox: n, forceMount: r, ...o } = e, a =
|
|
1694
|
+
const { __scopeCheckbox: n, forceMount: r, ...o } = e, a = fr(ma, n);
|
|
1695
1695
|
return /* @__PURE__ */ m(
|
|
1696
1696
|
je,
|
|
1697
1697
|
{
|
|
@@ -1725,17 +1725,17 @@ var ga = "CheckboxBubbleInput", va = c.forwardRef(
|
|
|
1725
1725
|
form: u,
|
|
1726
1726
|
bubbleInput: h,
|
|
1727
1727
|
setBubbleInput: w
|
|
1728
|
-
} =
|
|
1728
|
+
} = fr(ga, e), C = ie(n, w), p = ca(a), b = da(r);
|
|
1729
1729
|
c.useEffect(() => {
|
|
1730
|
-
const
|
|
1731
|
-
if (!
|
|
1732
|
-
const
|
|
1733
|
-
|
|
1730
|
+
const y = h;
|
|
1731
|
+
if (!y) return;
|
|
1732
|
+
const x = window.HTMLInputElement.prototype, R = Object.getOwnPropertyDescriptor(
|
|
1733
|
+
x,
|
|
1734
1734
|
"checked"
|
|
1735
1735
|
).set, k = !o.current;
|
|
1736
1736
|
if (p !== a && R) {
|
|
1737
1737
|
const S = new Event("click", { bubbles: k });
|
|
1738
|
-
|
|
1738
|
+
y.indeterminate = He(a), R.call(y, He(a) ? !1 : a), y.dispatchEvent(S);
|
|
1739
1739
|
}
|
|
1740
1740
|
}, [h, p, a, o]);
|
|
1741
1741
|
const v = c.useRef(He(a) ? !1 : a);
|
|
@@ -1788,7 +1788,7 @@ const dc = ["top", "right", "bottom", "left"], Ve = Math.min, be = Math.max, Qt
|
|
|
1788
1788
|
bottom: "top",
|
|
1789
1789
|
top: "bottom"
|
|
1790
1790
|
};
|
|
1791
|
-
function
|
|
1791
|
+
function Gn(e, t, n) {
|
|
1792
1792
|
return be(e, Ve(t, n));
|
|
1793
1793
|
}
|
|
1794
1794
|
function De(e, t) {
|
|
@@ -1800,38 +1800,38 @@ function _e(e) {
|
|
|
1800
1800
|
function xt(e) {
|
|
1801
1801
|
return e.split("-")[1];
|
|
1802
1802
|
}
|
|
1803
|
-
function
|
|
1803
|
+
function pr(e) {
|
|
1804
1804
|
return e === "x" ? "y" : "x";
|
|
1805
1805
|
}
|
|
1806
|
-
function
|
|
1806
|
+
function mr(e) {
|
|
1807
1807
|
return e === "y" ? "height" : "width";
|
|
1808
1808
|
}
|
|
1809
|
-
function
|
|
1809
|
+
function Ae(e) {
|
|
1810
1810
|
const t = e[0];
|
|
1811
1811
|
return t === "t" || t === "b" ? "y" : "x";
|
|
1812
1812
|
}
|
|
1813
|
-
function
|
|
1814
|
-
return
|
|
1813
|
+
function hr(e) {
|
|
1814
|
+
return pr(Ae(e));
|
|
1815
1815
|
}
|
|
1816
1816
|
function fc(e, t, n) {
|
|
1817
1817
|
n === void 0 && (n = !1);
|
|
1818
|
-
const r = xt(e), o =
|
|
1818
|
+
const r = xt(e), o = hr(e), a = mr(o);
|
|
1819
1819
|
let i = o === "x" ? r === (n ? "end" : "start") ? "right" : "left" : r === "start" ? "bottom" : "top";
|
|
1820
1820
|
return t.reference[a] > t.floating[a] && (i = Jt(i)), [i, Jt(i)];
|
|
1821
1821
|
}
|
|
1822
1822
|
function pc(e) {
|
|
1823
1823
|
const t = Jt(e);
|
|
1824
|
-
return [
|
|
1824
|
+
return [Kn(e), t, Kn(t)];
|
|
1825
1825
|
}
|
|
1826
|
-
function
|
|
1826
|
+
function Kn(e) {
|
|
1827
1827
|
return e.includes("start") ? e.replace("start", "end") : e.replace("end", "start");
|
|
1828
1828
|
}
|
|
1829
|
-
const
|
|
1829
|
+
const Yr = ["left", "right"], Xr = ["right", "left"], mc = ["top", "bottom"], hc = ["bottom", "top"];
|
|
1830
1830
|
function gc(e, t, n) {
|
|
1831
1831
|
switch (e) {
|
|
1832
1832
|
case "top":
|
|
1833
1833
|
case "bottom":
|
|
1834
|
-
return n ? t ?
|
|
1834
|
+
return n ? t ? Xr : Yr : t ? Yr : Xr;
|
|
1835
1835
|
case "left":
|
|
1836
1836
|
case "right":
|
|
1837
1837
|
return t ? mc : hc;
|
|
@@ -1842,7 +1842,7 @@ function gc(e, t, n) {
|
|
|
1842
1842
|
function vc(e, t, n, r) {
|
|
1843
1843
|
const o = xt(e);
|
|
1844
1844
|
let a = gc(_e(e), n === "start", r);
|
|
1845
|
-
return o && (a = a.map((i) => i + "-" + o), t && (a = a.concat(a.map(
|
|
1845
|
+
return o && (a = a.map((i) => i + "-" + o), t && (a = a.concat(a.map(Kn)))), a;
|
|
1846
1846
|
}
|
|
1847
1847
|
function Jt(e) {
|
|
1848
1848
|
const t = _e(e);
|
|
@@ -1883,12 +1883,12 @@ function en(e) {
|
|
|
1883
1883
|
y: n
|
|
1884
1884
|
};
|
|
1885
1885
|
}
|
|
1886
|
-
function
|
|
1886
|
+
function qr(e, t, n) {
|
|
1887
1887
|
let {
|
|
1888
1888
|
reference: r,
|
|
1889
1889
|
floating: o
|
|
1890
1890
|
} = e;
|
|
1891
|
-
const a =
|
|
1891
|
+
const a = Ae(t), i = hr(t), s = mr(i), l = _e(t), d = a === "y", f = r.x + r.width / 2 - o.width / 2, u = r.y + r.height / 2 - o.height / 2, h = r[s] / 2 - o[s] / 2;
|
|
1892
1892
|
let w;
|
|
1893
1893
|
switch (l) {
|
|
1894
1894
|
case "top":
|
|
@@ -1952,12 +1952,12 @@ async function wc(e, t) {
|
|
|
1952
1952
|
boundary: d,
|
|
1953
1953
|
rootBoundary: f,
|
|
1954
1954
|
strategy: l
|
|
1955
|
-
})),
|
|
1955
|
+
})), y = u === "floating" ? {
|
|
1956
1956
|
x: r,
|
|
1957
1957
|
y: o,
|
|
1958
1958
|
width: i.floating.width,
|
|
1959
1959
|
height: i.floating.height
|
|
1960
|
-
} : i.reference,
|
|
1960
|
+
} : i.reference, x = await (a.getOffsetParent == null ? void 0 : a.getOffsetParent(s.floating)), g = await (a.isElement == null ? void 0 : a.isElement(x)) ? await (a.getScale == null ? void 0 : a.getScale(x)) || {
|
|
1961
1961
|
x: 1,
|
|
1962
1962
|
y: 1
|
|
1963
1963
|
} : {
|
|
@@ -1965,10 +1965,10 @@ async function wc(e, t) {
|
|
|
1965
1965
|
y: 1
|
|
1966
1966
|
}, R = en(a.convertOffsetParentRelativeRectToViewportRelativeRect ? await a.convertOffsetParentRelativeRectToViewportRelativeRect({
|
|
1967
1967
|
elements: s,
|
|
1968
|
-
rect:
|
|
1969
|
-
offsetParent:
|
|
1968
|
+
rect: y,
|
|
1969
|
+
offsetParent: x,
|
|
1970
1970
|
strategy: l
|
|
1971
|
-
}) :
|
|
1971
|
+
}) : y);
|
|
1972
1972
|
return {
|
|
1973
1973
|
top: (v.top - R.top + C.top) / g.y,
|
|
1974
1974
|
bottom: (R.bottom - v.bottom + C.bottom) / g.y,
|
|
@@ -1993,7 +1993,7 @@ const yc = 50, xc = async (e, t, n) => {
|
|
|
1993
1993
|
}), {
|
|
1994
1994
|
x: f,
|
|
1995
1995
|
y: u
|
|
1996
|
-
} =
|
|
1996
|
+
} = qr(d, r, l), h = r, w = 0;
|
|
1997
1997
|
const C = {};
|
|
1998
1998
|
for (let p = 0; p < a.length; p++) {
|
|
1999
1999
|
const b = a[p];
|
|
@@ -2001,13 +2001,13 @@ const yc = 50, xc = async (e, t, n) => {
|
|
|
2001
2001
|
continue;
|
|
2002
2002
|
const {
|
|
2003
2003
|
name: v,
|
|
2004
|
-
fn:
|
|
2004
|
+
fn: y
|
|
2005
2005
|
} = b, {
|
|
2006
|
-
x
|
|
2006
|
+
x,
|
|
2007
2007
|
y: g,
|
|
2008
2008
|
data: R,
|
|
2009
2009
|
reset: k
|
|
2010
|
-
} = await
|
|
2010
|
+
} = await y({
|
|
2011
2011
|
x: f,
|
|
2012
2012
|
y: u,
|
|
2013
2013
|
initialPlacement: r,
|
|
@@ -2021,7 +2021,7 @@ const yc = 50, xc = async (e, t, n) => {
|
|
|
2021
2021
|
floating: t
|
|
2022
2022
|
}
|
|
2023
2023
|
});
|
|
2024
|
-
f =
|
|
2024
|
+
f = x ?? f, u = g ?? u, C[v] = {
|
|
2025
2025
|
...C[v],
|
|
2026
2026
|
...R
|
|
2027
2027
|
}, k && w < yc && (w++, typeof k == "object" && (k.placement && (h = k.placement), k.rects && (d = k.rects === !0 ? await i.getElementRects({
|
|
@@ -2031,7 +2031,7 @@ const yc = 50, xc = async (e, t, n) => {
|
|
|
2031
2031
|
}) : k.rects), {
|
|
2032
2032
|
x: f,
|
|
2033
2033
|
y: u
|
|
2034
|
-
} =
|
|
2034
|
+
} = qr(d, h, l)), p = -1);
|
|
2035
2035
|
}
|
|
2036
2036
|
return {
|
|
2037
2037
|
x: f,
|
|
@@ -2061,10 +2061,10 @@ const yc = 50, xc = async (e, t, n) => {
|
|
|
2061
2061
|
const u = wa(f), h = {
|
|
2062
2062
|
x: n,
|
|
2063
2063
|
y: r
|
|
2064
|
-
}, w =
|
|
2065
|
-
let S = k ? k[
|
|
2066
|
-
(!S || !await (i.isElement == null ? void 0 : i.isElement(k))) && (S = s.floating[
|
|
2067
|
-
const E = g / 2 - R / 2, P = S / 2 - p[C] / 2 - 1, D = Ve(u[v], P), z = Ve(u[
|
|
2064
|
+
}, w = hr(o), C = mr(w), p = await i.getDimensions(d), b = w === "y", v = b ? "top" : "left", y = b ? "bottom" : "right", x = b ? "clientHeight" : "clientWidth", g = a.reference[C] + a.reference[w] - h[w] - a.floating[C], R = h[w] - a.reference[w], k = await (i.getOffsetParent == null ? void 0 : i.getOffsetParent(d));
|
|
2065
|
+
let S = k ? k[x] : 0;
|
|
2066
|
+
(!S || !await (i.isElement == null ? void 0 : i.isElement(k))) && (S = s.floating[x] || a.floating[C]);
|
|
2067
|
+
const E = g / 2 - R / 2, P = S / 2 - p[C] / 2 - 1, D = Ve(u[v], P), z = Ve(u[y], P), H = D, N = S - p[C] - z, W = S / 2 - p[C] / 2 + E, U = Gn(H, W, N), _ = !l.arrow && xt(o) != null && W !== U && a.reference[C] / 2 - (W < H ? D : z) - p[C] / 2 < 0, $ = _ ? W < H ? W - H : W - N : 0;
|
|
2068
2068
|
return {
|
|
2069
2069
|
[w]: h[w] + $,
|
|
2070
2070
|
data: {
|
|
@@ -2101,7 +2101,7 @@ const yc = 50, xc = async (e, t, n) => {
|
|
|
2101
2101
|
} = De(e, t);
|
|
2102
2102
|
if ((n = a.arrow) != null && n.alignmentOffset)
|
|
2103
2103
|
return {};
|
|
2104
|
-
const v = _e(o),
|
|
2104
|
+
const v = _e(o), y = Ae(s), x = _e(s) === s, g = await (l.isRTL == null ? void 0 : l.isRTL(d.floating)), R = h || (x || !p ? [Jt(s)] : pc(s)), k = C !== "none";
|
|
2105
2105
|
!h && k && R.push(...vc(s, p, C, g));
|
|
2106
2106
|
const S = [s, ...R], E = await l.detectOverflow(t, b), P = [];
|
|
2107
2107
|
let D = ((r = a.flip) == null ? void 0 : r.overflows) || [];
|
|
@@ -2115,9 +2115,9 @@ const yc = 50, xc = async (e, t, n) => {
|
|
|
2115
2115
|
}], !P.every((W) => W <= 0)) {
|
|
2116
2116
|
var z, H;
|
|
2117
2117
|
const W = (((z = a.flip) == null ? void 0 : z.index) || 0) + 1, U = S[W];
|
|
2118
|
-
if (U && (!(u === "alignment" ?
|
|
2118
|
+
if (U && (!(u === "alignment" ? y !== Ae(U) : !1) || // We leave the current main axis only if every placement on that axis
|
|
2119
2119
|
// overflows the main axis.
|
|
2120
|
-
D.every((M) =>
|
|
2120
|
+
D.every((M) => Ae(M.placement) === y ? M.overflows[0] > 0 : !0)))
|
|
2121
2121
|
return {
|
|
2122
2122
|
data: {
|
|
2123
2123
|
index: W,
|
|
@@ -2131,16 +2131,16 @@ const yc = 50, xc = async (e, t, n) => {
|
|
|
2131
2131
|
if (!_)
|
|
2132
2132
|
switch (w) {
|
|
2133
2133
|
case "bestFit": {
|
|
2134
|
-
var
|
|
2135
|
-
const $ = (
|
|
2134
|
+
var N;
|
|
2135
|
+
const $ = (N = D.filter((M) => {
|
|
2136
2136
|
if (k) {
|
|
2137
|
-
const G =
|
|
2138
|
-
return G ===
|
|
2137
|
+
const G = Ae(M.placement);
|
|
2138
|
+
return G === y || // Create a bias to the `y` side axis due to horizontal
|
|
2139
2139
|
// reading directions favoring greater width.
|
|
2140
2140
|
G === "y";
|
|
2141
2141
|
}
|
|
2142
2142
|
return !0;
|
|
2143
|
-
}).map((M) => [M.placement, M.overflows.filter((G) => G > 0).reduce((G, O) => G + O, 0)]).sort((M, G) => M[1] - G[1])[0]) == null ? void 0 :
|
|
2143
|
+
}).map((M) => [M.placement, M.overflows.filter((G) => G > 0).reduce((G, O) => G + O, 0)]).sort((M, G) => M[1] - G[1])[0]) == null ? void 0 : N[0];
|
|
2144
2144
|
$ && (_ = $);
|
|
2145
2145
|
break;
|
|
2146
2146
|
}
|
|
@@ -2159,7 +2159,7 @@ const yc = 50, xc = async (e, t, n) => {
|
|
|
2159
2159
|
}
|
|
2160
2160
|
};
|
|
2161
2161
|
};
|
|
2162
|
-
function
|
|
2162
|
+
function Zr(e, t) {
|
|
2163
2163
|
return {
|
|
2164
2164
|
top: e.top - t.height,
|
|
2165
2165
|
right: e.right - t.width,
|
|
@@ -2167,7 +2167,7 @@ function Qr(e, t) {
|
|
|
2167
2167
|
left: e.left - t.width
|
|
2168
2168
|
};
|
|
2169
2169
|
}
|
|
2170
|
-
function
|
|
2170
|
+
function Qr(e) {
|
|
2171
2171
|
return dc.some((t) => e[t] >= 0);
|
|
2172
2172
|
}
|
|
2173
2173
|
const Ec = function(e) {
|
|
@@ -2187,11 +2187,11 @@ const Ec = function(e) {
|
|
|
2187
2187
|
const i = await r.detectOverflow(t, {
|
|
2188
2188
|
...a,
|
|
2189
2189
|
elementContext: "reference"
|
|
2190
|
-
}), s =
|
|
2190
|
+
}), s = Zr(i, n.reference);
|
|
2191
2191
|
return {
|
|
2192
2192
|
data: {
|
|
2193
2193
|
referenceHiddenOffsets: s,
|
|
2194
|
-
referenceHidden:
|
|
2194
|
+
referenceHidden: Qr(s)
|
|
2195
2195
|
}
|
|
2196
2196
|
};
|
|
2197
2197
|
}
|
|
@@ -2199,11 +2199,11 @@ const Ec = function(e) {
|
|
|
2199
2199
|
const i = await r.detectOverflow(t, {
|
|
2200
2200
|
...a,
|
|
2201
2201
|
altBoundary: !0
|
|
2202
|
-
}), s =
|
|
2202
|
+
}), s = Zr(i, n.floating);
|
|
2203
2203
|
return {
|
|
2204
2204
|
data: {
|
|
2205
2205
|
escapedOffsets: s,
|
|
2206
|
-
escaped:
|
|
2206
|
+
escaped: Qr(s)
|
|
2207
2207
|
}
|
|
2208
2208
|
};
|
|
2209
2209
|
}
|
|
@@ -2218,7 +2218,7 @@ async function Rc(e, t) {
|
|
|
2218
2218
|
placement: n,
|
|
2219
2219
|
platform: r,
|
|
2220
2220
|
elements: o
|
|
2221
|
-
} = e, a = await (r.isRTL == null ? void 0 : r.isRTL(o.floating)), i = _e(n), s = xt(n), l =
|
|
2221
|
+
} = e, a = await (r.isRTL == null ? void 0 : r.isRTL(o.floating)), i = _e(n), s = xt(n), l = Ae(n) === "y", d = ya.has(i) ? -1 : 1, f = a && l ? -1 : 1, u = De(t, e);
|
|
2222
2222
|
let {
|
|
2223
2223
|
mainAxis: h,
|
|
2224
2224
|
crossAxis: w,
|
|
@@ -2278,12 +2278,12 @@ const Pc = function(e) {
|
|
|
2278
2278
|
limiter: l = {
|
|
2279
2279
|
fn: (v) => {
|
|
2280
2280
|
let {
|
|
2281
|
-
x,
|
|
2282
|
-
y
|
|
2281
|
+
x: y,
|
|
2282
|
+
y: x
|
|
2283
2283
|
} = v;
|
|
2284
2284
|
return {
|
|
2285
|
-
x,
|
|
2286
|
-
y
|
|
2285
|
+
x: y,
|
|
2286
|
+
y: x
|
|
2287
2287
|
};
|
|
2288
2288
|
}
|
|
2289
2289
|
},
|
|
@@ -2291,15 +2291,15 @@ const Pc = function(e) {
|
|
|
2291
2291
|
} = De(e, t), f = {
|
|
2292
2292
|
x: n,
|
|
2293
2293
|
y: r
|
|
2294
|
-
}, u = await a.detectOverflow(t, d), h =
|
|
2294
|
+
}, u = await a.detectOverflow(t, d), h = Ae(_e(o)), w = pr(h);
|
|
2295
2295
|
let C = f[w], p = f[h];
|
|
2296
2296
|
if (i) {
|
|
2297
|
-
const v = w === "y" ? "top" : "left",
|
|
2298
|
-
C =
|
|
2297
|
+
const v = w === "y" ? "top" : "left", y = w === "y" ? "bottom" : "right", x = C + u[v], g = C - u[y];
|
|
2298
|
+
C = Gn(x, C, g);
|
|
2299
2299
|
}
|
|
2300
2300
|
if (s) {
|
|
2301
|
-
const v = h === "y" ? "top" : "left",
|
|
2302
|
-
p =
|
|
2301
|
+
const v = h === "y" ? "top" : "left", y = h === "y" ? "bottom" : "right", x = p + u[v], g = p - u[y];
|
|
2302
|
+
p = Gn(x, p, g);
|
|
2303
2303
|
}
|
|
2304
2304
|
const b = l.fn({
|
|
2305
2305
|
...t,
|
|
@@ -2319,7 +2319,7 @@ const Pc = function(e) {
|
|
|
2319
2319
|
};
|
|
2320
2320
|
}
|
|
2321
2321
|
};
|
|
2322
|
-
},
|
|
2322
|
+
}, Nc = function(e) {
|
|
2323
2323
|
return e === void 0 && (e = {}), {
|
|
2324
2324
|
options: e,
|
|
2325
2325
|
fn(t) {
|
|
@@ -2336,7 +2336,7 @@ const Pc = function(e) {
|
|
|
2336
2336
|
} = De(e, t), f = {
|
|
2337
2337
|
x: n,
|
|
2338
2338
|
y: r
|
|
2339
|
-
}, u =
|
|
2339
|
+
}, u = Ae(o), h = pr(u);
|
|
2340
2340
|
let w = f[h], C = f[u];
|
|
2341
2341
|
const p = De(s, t), b = typeof p == "number" ? {
|
|
2342
2342
|
mainAxis: p,
|
|
@@ -2347,12 +2347,12 @@ const Pc = function(e) {
|
|
|
2347
2347
|
...p
|
|
2348
2348
|
};
|
|
2349
2349
|
if (l) {
|
|
2350
|
-
const
|
|
2350
|
+
const x = h === "y" ? "height" : "width", g = a.reference[h] - a.floating[x] + b.mainAxis, R = a.reference[h] + a.reference[x] - b.mainAxis;
|
|
2351
2351
|
w < g ? w = g : w > R && (w = R);
|
|
2352
2352
|
}
|
|
2353
2353
|
if (d) {
|
|
2354
|
-
var v,
|
|
2355
|
-
const
|
|
2354
|
+
var v, y;
|
|
2355
|
+
const x = h === "y" ? "width" : "height", g = ya.has(_e(o)), R = a.reference[u] - a.floating[x] + (g && ((v = i.offset) == null ? void 0 : v[u]) || 0) + (g ? 0 : b.crossAxis), k = a.reference[u] + a.reference[x] + (g ? 0 : ((y = i.offset) == null ? void 0 : y[u]) || 0) - (g ? b.crossAxis : 0);
|
|
2356
2356
|
C < R ? C = R : C > k && (C = k);
|
|
2357
2357
|
}
|
|
2358
2358
|
return {
|
|
@@ -2361,7 +2361,7 @@ const Pc = function(e) {
|
|
|
2361
2361
|
};
|
|
2362
2362
|
}
|
|
2363
2363
|
};
|
|
2364
|
-
},
|
|
2364
|
+
}, Ac = function(e) {
|
|
2365
2365
|
return e === void 0 && (e = {}), {
|
|
2366
2366
|
name: "size",
|
|
2367
2367
|
options: e,
|
|
@@ -2376,17 +2376,17 @@ const Pc = function(e) {
|
|
|
2376
2376
|
apply: l = () => {
|
|
2377
2377
|
},
|
|
2378
2378
|
...d
|
|
2379
|
-
} = De(e, t), f = await i.detectOverflow(t, d), u = _e(o), h = xt(o), w =
|
|
2379
|
+
} = De(e, t), f = await i.detectOverflow(t, d), u = _e(o), h = xt(o), w = Ae(o) === "y", {
|
|
2380
2380
|
width: C,
|
|
2381
2381
|
height: p
|
|
2382
2382
|
} = a.floating;
|
|
2383
2383
|
let b, v;
|
|
2384
2384
|
u === "top" || u === "bottom" ? (b = u, v = h === (await (i.isRTL == null ? void 0 : i.isRTL(s.floating)) ? "start" : "end") ? "left" : "right") : (v = u, b = h === "end" ? "top" : "bottom");
|
|
2385
|
-
const
|
|
2385
|
+
const y = p - f.top - f.bottom, x = C - f.left - f.right, g = Ve(p - f[b], y), R = Ve(C - f[v], x), k = !t.middlewareData.shift;
|
|
2386
2386
|
let S = g, E = R;
|
|
2387
|
-
if ((n = t.middlewareData.shift) != null && n.enabled.x && (E =
|
|
2388
|
-
const D = be(f.left, 0), z = be(f.right, 0), H = be(f.top, 0),
|
|
2389
|
-
w ? E = C - 2 * (D !== 0 || z !== 0 ? D + z : be(f.left, f.right)) : S = p - 2 * (H !== 0 ||
|
|
2387
|
+
if ((n = t.middlewareData.shift) != null && n.enabled.x && (E = x), (r = t.middlewareData.shift) != null && r.enabled.y && (S = y), k && !h) {
|
|
2388
|
+
const D = be(f.left, 0), z = be(f.right, 0), H = be(f.top, 0), N = be(f.bottom, 0);
|
|
2389
|
+
w ? E = C - 2 * (D !== 0 || z !== 0 ? D + z : be(f.left, f.right)) : S = p - 2 * (H !== 0 || N !== 0 ? H + N : be(f.top, f.bottom));
|
|
2390
2390
|
}
|
|
2391
2391
|
await l({
|
|
2392
2392
|
...t,
|
|
@@ -2425,7 +2425,7 @@ function Ee(e) {
|
|
|
2425
2425
|
function Me(e) {
|
|
2426
2426
|
return hn() ? e instanceof HTMLElement || e instanceof we(e).HTMLElement : !1;
|
|
2427
2427
|
}
|
|
2428
|
-
function
|
|
2428
|
+
function Jr(e) {
|
|
2429
2429
|
return !hn() || typeof ShadowRoot > "u" ? !1 : e instanceof ShadowRoot || e instanceof we(e).ShadowRoot;
|
|
2430
2430
|
}
|
|
2431
2431
|
function It(e) {
|
|
@@ -2454,14 +2454,14 @@ function gn(e) {
|
|
|
2454
2454
|
}
|
|
2455
2455
|
const Tc = /transform|translate|scale|rotate|perspective|filter/, Ic = /paint|layout|strict|content/, Qe = (e) => !!e && e !== "none";
|
|
2456
2456
|
let In;
|
|
2457
|
-
function
|
|
2457
|
+
function gr(e) {
|
|
2458
2458
|
const t = Ee(e) ? Re(e) : e;
|
|
2459
|
-
return Qe(t.transform) || Qe(t.translate) || Qe(t.scale) || Qe(t.rotate) || Qe(t.perspective) || !
|
|
2459
|
+
return Qe(t.transform) || Qe(t.translate) || Qe(t.scale) || Qe(t.rotate) || Qe(t.perspective) || !vr() && (Qe(t.backdropFilter) || Qe(t.filter)) || Tc.test(t.willChange || "") || Ic.test(t.contain || "");
|
|
2460
2460
|
}
|
|
2461
2461
|
function Dc(e) {
|
|
2462
2462
|
let t = Ue(e);
|
|
2463
2463
|
for (; Me(t) && !wt(t); ) {
|
|
2464
|
-
if (
|
|
2464
|
+
if (gr(t))
|
|
2465
2465
|
return t;
|
|
2466
2466
|
if (gn(t))
|
|
2467
2467
|
return null;
|
|
@@ -2469,7 +2469,7 @@ function Dc(e) {
|
|
|
2469
2469
|
}
|
|
2470
2470
|
return null;
|
|
2471
2471
|
}
|
|
2472
|
-
function
|
|
2472
|
+
function vr() {
|
|
2473
2473
|
return In == null && (In = typeof CSS < "u" && CSS.supports && CSS.supports("-webkit-backdrop-filter", "none")), In;
|
|
2474
2474
|
}
|
|
2475
2475
|
function wt(e) {
|
|
@@ -2494,10 +2494,10 @@ function Ue(e) {
|
|
|
2494
2494
|
// Step into the shadow DOM of the parent of a slotted node.
|
|
2495
2495
|
e.assignedSlot || // DOM Element detected.
|
|
2496
2496
|
e.parentNode || // ShadowRoot detected.
|
|
2497
|
-
|
|
2497
|
+
Jr(e) && e.host || // Fallback.
|
|
2498
2498
|
Te(e)
|
|
2499
2499
|
);
|
|
2500
|
-
return
|
|
2500
|
+
return Jr(t) ? t.host : t;
|
|
2501
2501
|
}
|
|
2502
2502
|
function Ca(e) {
|
|
2503
2503
|
const t = Ue(e);
|
|
@@ -2508,12 +2508,12 @@ function Tt(e, t, n) {
|
|
|
2508
2508
|
t === void 0 && (t = []), n === void 0 && (n = !0);
|
|
2509
2509
|
const o = Ca(e), a = o === ((r = e.ownerDocument) == null ? void 0 : r.body), i = we(o);
|
|
2510
2510
|
if (a) {
|
|
2511
|
-
const s =
|
|
2511
|
+
const s = Yn(i);
|
|
2512
2512
|
return t.concat(i, i.visualViewport || [], It(o) ? o : [], s && n ? Tt(s) : []);
|
|
2513
2513
|
} else
|
|
2514
2514
|
return t.concat(o, Tt(o, [], n));
|
|
2515
2515
|
}
|
|
2516
|
-
function
|
|
2516
|
+
function Yn(e) {
|
|
2517
2517
|
return e.parent && Object.getPrototypeOf(e.parent) ? e.frameElement : null;
|
|
2518
2518
|
}
|
|
2519
2519
|
function Sa(e) {
|
|
@@ -2526,11 +2526,11 @@ function Sa(e) {
|
|
|
2526
2526
|
$: s
|
|
2527
2527
|
};
|
|
2528
2528
|
}
|
|
2529
|
-
function
|
|
2529
|
+
function br(e) {
|
|
2530
2530
|
return Ee(e) ? e : e.contextElement;
|
|
2531
2531
|
}
|
|
2532
2532
|
function gt(e) {
|
|
2533
|
-
const t =
|
|
2533
|
+
const t = br(e);
|
|
2534
2534
|
if (!Me(t))
|
|
2535
2535
|
return Oe(1);
|
|
2536
2536
|
const n = t.getBoundingClientRect(), {
|
|
@@ -2547,7 +2547,7 @@ function gt(e) {
|
|
|
2547
2547
|
const _c = /* @__PURE__ */ Oe(0);
|
|
2548
2548
|
function Ea(e) {
|
|
2549
2549
|
const t = we(e);
|
|
2550
|
-
return !
|
|
2550
|
+
return !vr() || !t.visualViewport ? _c : {
|
|
2551
2551
|
x: t.visualViewport.offsetLeft,
|
|
2552
2552
|
y: t.visualViewport.offsetTop
|
|
2553
2553
|
};
|
|
@@ -2557,17 +2557,17 @@ function Mc(e, t, n) {
|
|
|
2557
2557
|
}
|
|
2558
2558
|
function ot(e, t, n, r) {
|
|
2559
2559
|
t === void 0 && (t = !1), n === void 0 && (n = !1);
|
|
2560
|
-
const o = e.getBoundingClientRect(), a =
|
|
2560
|
+
const o = e.getBoundingClientRect(), a = br(e);
|
|
2561
2561
|
let i = Oe(1);
|
|
2562
2562
|
t && (r ? Ee(r) && (i = gt(r)) : i = gt(e));
|
|
2563
2563
|
const s = Mc(a, n, r) ? Ea(a) : Oe(0);
|
|
2564
2564
|
let l = (o.left + s.x) / i.x, d = (o.top + s.y) / i.y, f = o.width / i.x, u = o.height / i.y;
|
|
2565
2565
|
if (a) {
|
|
2566
2566
|
const h = we(a), w = r && Ee(r) ? we(r) : r;
|
|
2567
|
-
let C = h, p =
|
|
2567
|
+
let C = h, p = Yn(C);
|
|
2568
2568
|
for (; p && r && w !== C; ) {
|
|
2569
|
-
const b = gt(p), v = p.getBoundingClientRect(),
|
|
2570
|
-
l *= b.x, d *= b.y, f *= b.x, u *= b.y, l +=
|
|
2569
|
+
const b = gt(p), v = p.getBoundingClientRect(), y = Re(p), x = v.left + (p.clientLeft + parseFloat(y.paddingLeft)) * b.x, g = v.top + (p.clientTop + parseFloat(y.paddingTop)) * b.y;
|
|
2570
|
+
l *= b.x, d *= b.y, f *= b.x, u *= b.y, l += x, d += g, C = we(p), p = Yn(C);
|
|
2571
2571
|
}
|
|
2572
2572
|
}
|
|
2573
2573
|
return en({
|
|
@@ -2629,20 +2629,20 @@ function zc(e) {
|
|
|
2629
2629
|
y: s
|
|
2630
2630
|
};
|
|
2631
2631
|
}
|
|
2632
|
-
const
|
|
2632
|
+
const eo = 25;
|
|
2633
2633
|
function Fc(e, t) {
|
|
2634
2634
|
const n = we(e), r = Te(e), o = n.visualViewport;
|
|
2635
2635
|
let a = r.clientWidth, i = r.clientHeight, s = 0, l = 0;
|
|
2636
2636
|
if (o) {
|
|
2637
2637
|
a = o.width, i = o.height;
|
|
2638
|
-
const f =
|
|
2638
|
+
const f = vr();
|
|
2639
2639
|
(!f || f && t === "fixed") && (s = o.offsetLeft, l = o.offsetTop);
|
|
2640
2640
|
}
|
|
2641
2641
|
const d = bn(r);
|
|
2642
2642
|
if (d <= 0) {
|
|
2643
2643
|
const f = r.ownerDocument, u = f.body, h = getComputedStyle(u), w = f.compatMode === "CSS1Compat" && parseFloat(h.marginLeft) + parseFloat(h.marginRight) || 0, C = Math.abs(r.clientWidth - u.clientWidth - w);
|
|
2644
|
-
C <=
|
|
2645
|
-
} else d <=
|
|
2644
|
+
C <= eo && (a -= C);
|
|
2645
|
+
} else d <= eo && (a += d);
|
|
2646
2646
|
return {
|
|
2647
2647
|
width: a,
|
|
2648
2648
|
height: i,
|
|
@@ -2659,7 +2659,7 @@ function Bc(e, t) {
|
|
|
2659
2659
|
y: d
|
|
2660
2660
|
};
|
|
2661
2661
|
}
|
|
2662
|
-
function
|
|
2662
|
+
function to(e, t, n) {
|
|
2663
2663
|
let r;
|
|
2664
2664
|
if (t === "viewport")
|
|
2665
2665
|
r = Fc(e, n);
|
|
@@ -2690,7 +2690,7 @@ function Wc(e, t) {
|
|
|
2690
2690
|
const a = Re(e).position === "fixed";
|
|
2691
2691
|
let i = a ? Ue(e) : e;
|
|
2692
2692
|
for (; Ee(i) && !wt(i); ) {
|
|
2693
|
-
const s = Re(i), l =
|
|
2693
|
+
const s = Re(i), l = gr(i);
|
|
2694
2694
|
!l && s.position === "fixed" && (o = null), (a ? !l && !o : !l && s.position === "static" && !!o && (o.position === "absolute" || o.position === "fixed") || It(i) && !l && Pa(e, i)) ? r = r.filter((f) => f !== i) : o = s, i = Ue(i);
|
|
2695
2695
|
}
|
|
2696
2696
|
return t.set(e, r), r;
|
|
@@ -2702,10 +2702,10 @@ function Hc(e) {
|
|
|
2702
2702
|
rootBoundary: r,
|
|
2703
2703
|
strategy: o
|
|
2704
2704
|
} = e;
|
|
2705
|
-
const i = [...n === "clippingAncestors" ? gn(t) ? [] : Wc(t, this._c) : [].concat(n), r], s =
|
|
2705
|
+
const i = [...n === "clippingAncestors" ? gn(t) ? [] : Wc(t, this._c) : [].concat(n), r], s = to(t, i[0], o);
|
|
2706
2706
|
let l = s.top, d = s.right, f = s.bottom, u = s.left;
|
|
2707
2707
|
for (let h = 1; h < i.length; h++) {
|
|
2708
|
-
const w =
|
|
2708
|
+
const w = to(t, i[h], o);
|
|
2709
2709
|
l = be(w.top, l), d = Ve(w.right, d), f = Ve(w.bottom, f), u = be(w.left, u);
|
|
2710
2710
|
}
|
|
2711
2711
|
return {
|
|
@@ -2752,7 +2752,7 @@ function Uc(e, t, n) {
|
|
|
2752
2752
|
function Dn(e) {
|
|
2753
2753
|
return Re(e).position === "static";
|
|
2754
2754
|
}
|
|
2755
|
-
function
|
|
2755
|
+
function no(e, t) {
|
|
2756
2756
|
if (!Me(e) || Re(e).position === "fixed")
|
|
2757
2757
|
return null;
|
|
2758
2758
|
if (t)
|
|
@@ -2773,10 +2773,10 @@ function ka(e, t) {
|
|
|
2773
2773
|
}
|
|
2774
2774
|
return n;
|
|
2775
2775
|
}
|
|
2776
|
-
let r =
|
|
2776
|
+
let r = no(e, t);
|
|
2777
2777
|
for (; r && Oc(r) && Dn(r); )
|
|
2778
|
-
r =
|
|
2779
|
-
return r && wt(r) && Dn(r) && !
|
|
2778
|
+
r = no(r, t);
|
|
2779
|
+
return r && wt(r) && Dn(r) && !gr(r) ? n : r || Dc(e) || n;
|
|
2780
2780
|
}
|
|
2781
2781
|
const jc = async function(e) {
|
|
2782
2782
|
const t = this.getOffsetParent || ka, n = this.getDimensions, r = await n(e.floating);
|
|
@@ -2805,7 +2805,7 @@ const Kc = {
|
|
|
2805
2805
|
isElement: Ee,
|
|
2806
2806
|
isRTL: Gc
|
|
2807
2807
|
};
|
|
2808
|
-
function
|
|
2808
|
+
function Na(e, t) {
|
|
2809
2809
|
return e.x === t.x && e.y === t.y && e.width === t.width && e.height === t.height;
|
|
2810
2810
|
}
|
|
2811
2811
|
function Yc(e, t) {
|
|
@@ -2825,7 +2825,7 @@ function Yc(e, t) {
|
|
|
2825
2825
|
} = d;
|
|
2826
2826
|
if (s || t(), !h || !w)
|
|
2827
2827
|
return;
|
|
2828
|
-
const C = Vt(u), p = Vt(o.clientWidth - (f + h)), b = Vt(o.clientHeight - (u + w)), v = Vt(f),
|
|
2828
|
+
const C = Vt(u), p = Vt(o.clientWidth - (f + h)), b = Vt(o.clientHeight - (u + w)), v = Vt(f), x = {
|
|
2829
2829
|
rootMargin: -C + "px " + -p + "px " + -b + "px " + -v + "px",
|
|
2830
2830
|
threshold: be(0, Ve(1, l)) || 1
|
|
2831
2831
|
};
|
|
@@ -2839,16 +2839,16 @@ function Yc(e, t) {
|
|
|
2839
2839
|
i(!1, 1e-7);
|
|
2840
2840
|
}, 1e3);
|
|
2841
2841
|
}
|
|
2842
|
-
S === 1 && !
|
|
2842
|
+
S === 1 && !Na(d, e.getBoundingClientRect()) && i(), g = !1;
|
|
2843
2843
|
}
|
|
2844
2844
|
try {
|
|
2845
2845
|
n = new IntersectionObserver(R, {
|
|
2846
|
-
...
|
|
2846
|
+
...x,
|
|
2847
2847
|
// Handle <iframe>s
|
|
2848
2848
|
root: o.ownerDocument
|
|
2849
2849
|
});
|
|
2850
2850
|
} catch {
|
|
2851
|
-
n = new IntersectionObserver(R,
|
|
2851
|
+
n = new IntersectionObserver(R, x);
|
|
2852
2852
|
}
|
|
2853
2853
|
n.observe(e);
|
|
2854
2854
|
}
|
|
@@ -2862,7 +2862,7 @@ function Xc(e, t, n, r) {
|
|
|
2862
2862
|
elementResize: i = typeof ResizeObserver == "function",
|
|
2863
2863
|
layoutShift: s = typeof IntersectionObserver == "function",
|
|
2864
2864
|
animationFrame: l = !1
|
|
2865
|
-
} = r, d =
|
|
2865
|
+
} = r, d = br(e), f = o || a ? [...d ? Tt(d) : [], ...t ? Tt(t) : []] : [];
|
|
2866
2866
|
f.forEach((v) => {
|
|
2867
2867
|
o && v.addEventListener("scroll", n, {
|
|
2868
2868
|
passive: !0
|
|
@@ -2871,26 +2871,26 @@ function Xc(e, t, n, r) {
|
|
|
2871
2871
|
const u = d && s ? Yc(d, n) : null;
|
|
2872
2872
|
let h = -1, w = null;
|
|
2873
2873
|
i && (w = new ResizeObserver((v) => {
|
|
2874
|
-
let [
|
|
2875
|
-
|
|
2876
|
-
var
|
|
2877
|
-
(
|
|
2874
|
+
let [y] = v;
|
|
2875
|
+
y && y.target === d && w && t && (w.unobserve(t), cancelAnimationFrame(h), h = requestAnimationFrame(() => {
|
|
2876
|
+
var x;
|
|
2877
|
+
(x = w) == null || x.observe(t);
|
|
2878
2878
|
})), n();
|
|
2879
2879
|
}), d && !l && w.observe(d), t && w.observe(t));
|
|
2880
2880
|
let C, p = l ? ot(e) : null;
|
|
2881
2881
|
l && b();
|
|
2882
2882
|
function b() {
|
|
2883
2883
|
const v = ot(e);
|
|
2884
|
-
p && !
|
|
2884
|
+
p && !Na(p, v) && n(), p = v, C = requestAnimationFrame(b);
|
|
2885
2885
|
}
|
|
2886
2886
|
return n(), () => {
|
|
2887
2887
|
var v;
|
|
2888
|
-
f.forEach((
|
|
2889
|
-
o &&
|
|
2888
|
+
f.forEach((y) => {
|
|
2889
|
+
o && y.removeEventListener("scroll", n), a && y.removeEventListener("resize", n);
|
|
2890
2890
|
}), u?.(), (v = w) == null || v.disconnect(), w = null, l && cancelAnimationFrame(C);
|
|
2891
2891
|
};
|
|
2892
2892
|
}
|
|
2893
|
-
const qc = Pc, Zc = kc, Qc = Sc, Jc =
|
|
2893
|
+
const qc = Pc, Zc = kc, Qc = Sc, Jc = Ac, ed = Ec, ro = Cc, td = Nc, nd = (e, t, n) => {
|
|
2894
2894
|
const r = /* @__PURE__ */ new Map(), o = {
|
|
2895
2895
|
platform: Kc,
|
|
2896
2896
|
...n
|
|
@@ -2935,11 +2935,11 @@ function tn(e, t) {
|
|
|
2935
2935
|
}
|
|
2936
2936
|
return e !== e && t !== t;
|
|
2937
2937
|
}
|
|
2938
|
-
function
|
|
2938
|
+
function Aa(e) {
|
|
2939
2939
|
return typeof window > "u" ? 1 : (e.ownerDocument.defaultView || window).devicePixelRatio || 1;
|
|
2940
2940
|
}
|
|
2941
|
-
function
|
|
2942
|
-
const n =
|
|
2941
|
+
function oo(e, t) {
|
|
2942
|
+
const n = Aa(e);
|
|
2943
2943
|
return Math.round(t * n) / n;
|
|
2944
2944
|
}
|
|
2945
2945
|
function _n(e) {
|
|
@@ -2971,11 +2971,11 @@ function ad(e) {
|
|
|
2971
2971
|
isPositioned: !1
|
|
2972
2972
|
}), [h, w] = c.useState(r);
|
|
2973
2973
|
tn(h, r) || w(r);
|
|
2974
|
-
const [C, p] = c.useState(null), [b, v] = c.useState(null),
|
|
2974
|
+
const [C, p] = c.useState(null), [b, v] = c.useState(null), y = c.useCallback((M) => {
|
|
2975
2975
|
M !== k.current && (k.current = M, p(M));
|
|
2976
|
-
}, []),
|
|
2976
|
+
}, []), x = c.useCallback((M) => {
|
|
2977
2977
|
M !== S.current && (S.current = M, v(M));
|
|
2978
|
-
}, []), g = a || C, R = i || b, k = c.useRef(null), S = c.useRef(null), E = c.useRef(f), P = l != null, D = _n(l), z = _n(o), H = _n(d),
|
|
2978
|
+
}, []), g = a || C, R = i || b, k = c.useRef(null), S = c.useRef(null), E = c.useRef(f), P = l != null, D = _n(l), z = _n(o), H = _n(d), N = c.useCallback(() => {
|
|
2979
2979
|
if (!k.current || !S.current)
|
|
2980
2980
|
return;
|
|
2981
2981
|
const M = {
|
|
@@ -3009,16 +3009,16 @@ function ad(e) {
|
|
|
3009
3009
|
}), []), qt(() => {
|
|
3010
3010
|
if (g && (k.current = g), R && (S.current = R), g && R) {
|
|
3011
3011
|
if (D.current)
|
|
3012
|
-
return D.current(g, R,
|
|
3013
|
-
|
|
3012
|
+
return D.current(g, R, N);
|
|
3013
|
+
N();
|
|
3014
3014
|
}
|
|
3015
|
-
}, [g, R,
|
|
3015
|
+
}, [g, R, N, D, P]);
|
|
3016
3016
|
const U = c.useMemo(() => ({
|
|
3017
3017
|
reference: k,
|
|
3018
3018
|
floating: S,
|
|
3019
|
-
setReference:
|
|
3020
|
-
setFloating:
|
|
3021
|
-
}), [
|
|
3019
|
+
setReference: y,
|
|
3020
|
+
setFloating: x
|
|
3021
|
+
}), [y, x]), _ = c.useMemo(() => ({
|
|
3022
3022
|
reference: g,
|
|
3023
3023
|
floating: R
|
|
3024
3024
|
}), [g, R]), $ = c.useMemo(() => {
|
|
@@ -3029,11 +3029,11 @@ function ad(e) {
|
|
|
3029
3029
|
};
|
|
3030
3030
|
if (!_.floating)
|
|
3031
3031
|
return M;
|
|
3032
|
-
const G =
|
|
3032
|
+
const G = oo(_.floating, f.x), O = oo(_.floating, f.y);
|
|
3033
3033
|
return s ? {
|
|
3034
3034
|
...M,
|
|
3035
3035
|
transform: "translate(" + G + "px, " + O + "px)",
|
|
3036
|
-
...
|
|
3036
|
+
...Aa(_.floating) >= 1.5 && {
|
|
3037
3037
|
willChange: "transform"
|
|
3038
3038
|
}
|
|
3039
3039
|
} : {
|
|
@@ -3044,11 +3044,11 @@ function ad(e) {
|
|
|
3044
3044
|
}, [n, s, _.floating, f.x, f.y]);
|
|
3045
3045
|
return c.useMemo(() => ({
|
|
3046
3046
|
...f,
|
|
3047
|
-
update:
|
|
3047
|
+
update: N,
|
|
3048
3048
|
refs: U,
|
|
3049
3049
|
elements: _,
|
|
3050
3050
|
floatingStyles: $
|
|
3051
|
-
}), [f,
|
|
3051
|
+
}), [f, N, U, _, $]);
|
|
3052
3052
|
}
|
|
3053
3053
|
const id = (e) => {
|
|
3054
3054
|
function t(n) {
|
|
@@ -3062,10 +3062,10 @@ const id = (e) => {
|
|
|
3062
3062
|
element: r,
|
|
3063
3063
|
padding: o
|
|
3064
3064
|
} = typeof e == "function" ? e(n) : e;
|
|
3065
|
-
return r && t(r) ? r.current != null ?
|
|
3065
|
+
return r && t(r) ? r.current != null ? ro({
|
|
3066
3066
|
element: r.current,
|
|
3067
3067
|
padding: o
|
|
3068
|
-
}).fn(n) : {} : r ?
|
|
3068
|
+
}).fn(n) : {} : r ? ro({
|
|
3069
3069
|
element: r,
|
|
3070
3070
|
padding: o
|
|
3071
3071
|
}).fn(n) : {};
|
|
@@ -3133,11 +3133,11 @@ var md = "Arrow", Oa = c.forwardRef((e, t) => {
|
|
|
3133
3133
|
);
|
|
3134
3134
|
});
|
|
3135
3135
|
Oa.displayName = md;
|
|
3136
|
-
var hd = Oa,
|
|
3136
|
+
var hd = Oa, wr = "Popper", [Ta, wn] = st(wr), [gd, Ia] = Ta(wr), Da = (e) => {
|
|
3137
3137
|
const { __scopePopper: t, children: n } = e, [r, o] = c.useState(null);
|
|
3138
3138
|
return /* @__PURE__ */ m(gd, { scope: t, anchor: r, onAnchorChange: o, children: n });
|
|
3139
3139
|
};
|
|
3140
|
-
Da.displayName =
|
|
3140
|
+
Da.displayName = wr;
|
|
3141
3141
|
var _a = "PopperAnchor", Ma = c.forwardRef(
|
|
3142
3142
|
(e, t) => {
|
|
3143
3143
|
const { __scopePopper: n, virtualRef: r, ...o } = e, a = Ia(_a, n), i = c.useRef(null), s = ie(t, i), l = c.useRef(null);
|
|
@@ -3148,7 +3148,7 @@ var _a = "PopperAnchor", Ma = c.forwardRef(
|
|
|
3148
3148
|
}
|
|
3149
3149
|
);
|
|
3150
3150
|
Ma.displayName = _a;
|
|
3151
|
-
var
|
|
3151
|
+
var yr = "PopperContent", [vd, bd] = Ta(yr), La = c.forwardRef(
|
|
3152
3152
|
(e, t) => {
|
|
3153
3153
|
const {
|
|
3154
3154
|
__scopePopper: n,
|
|
@@ -3165,7 +3165,7 @@ var xr = "PopperContent", [vd, bd] = Ta(xr), La = c.forwardRef(
|
|
|
3165
3165
|
updatePositionStrategy: w = "optimized",
|
|
3166
3166
|
onPlaced: C,
|
|
3167
3167
|
...p
|
|
3168
|
-
} = e, b = Ia(
|
|
3168
|
+
} = e, b = Ia(yr, n), [v, y] = c.useState(null), x = ie(t, (L) => y(L)), [g, R] = c.useState(null), k = da(g), S = k?.width ?? 0, E = k?.height ?? 0, P = r + (a !== "center" ? "-" + a : ""), D = typeof f == "number" ? f : { top: 0, right: 0, bottom: 0, left: 0, ...f }, z = Array.isArray(d) ? d : [d], H = z.length > 0, N = {
|
|
3169
3169
|
padding: D,
|
|
3170
3170
|
boundary: z.filter(yd),
|
|
3171
3171
|
// with `strategy: 'fixed'`, this is the only way to get it to respect boundaries
|
|
@@ -3186,11 +3186,11 @@ var xr = "PopperContent", [vd, bd] = Ta(xr), La = c.forwardRef(
|
|
|
3186
3186
|
mainAxis: !0,
|
|
3187
3187
|
crossAxis: !1,
|
|
3188
3188
|
limiter: u === "partial" ? cd() : void 0,
|
|
3189
|
-
...
|
|
3189
|
+
...N
|
|
3190
3190
|
}),
|
|
3191
|
-
l && dd({ ...
|
|
3191
|
+
l && dd({ ...N }),
|
|
3192
3192
|
ud({
|
|
3193
|
-
...
|
|
3193
|
+
...N,
|
|
3194
3194
|
apply: ({ elements: L, rects: ee, availableWidth: K, availableHeight: Q }) => {
|
|
3195
3195
|
const { width: X, height: ne } = ee.reference, de = L.floating.style;
|
|
3196
3196
|
de.setProperty("--radix-popper-available-width", `${K}px`), de.setProperty("--radix-popper-available-height", `${Q}px`), de.setProperty("--radix-popper-anchor-width", `${X}px`), de.setProperty("--radix-popper-anchor-height", `${ne}px`);
|
|
@@ -3198,7 +3198,7 @@ var xr = "PopperContent", [vd, bd] = Ta(xr), La = c.forwardRef(
|
|
|
3198
3198
|
}),
|
|
3199
3199
|
g && pd({ element: g, padding: s }),
|
|
3200
3200
|
xd({ arrowWidth: S, arrowHeight: E }),
|
|
3201
|
-
h && fd({ strategy: "referenceHidden", ...
|
|
3201
|
+
h && fd({ strategy: "referenceHidden", ...N })
|
|
3202
3202
|
]
|
|
3203
3203
|
}), [G, O] = Fa(_), ye = nt(C);
|
|
3204
3204
|
me(() => {
|
|
@@ -3246,7 +3246,7 @@ var xr = "PopperContent", [vd, bd] = Ta(xr), La = c.forwardRef(
|
|
|
3246
3246
|
"data-side": G,
|
|
3247
3247
|
"data-align": O,
|
|
3248
3248
|
...p,
|
|
3249
|
-
ref:
|
|
3249
|
+
ref: x,
|
|
3250
3250
|
style: {
|
|
3251
3251
|
...p.style,
|
|
3252
3252
|
// if the PopperContent hasn't been placed yet (not all measurements done)
|
|
@@ -3261,7 +3261,7 @@ var xr = "PopperContent", [vd, bd] = Ta(xr), La = c.forwardRef(
|
|
|
3261
3261
|
);
|
|
3262
3262
|
}
|
|
3263
3263
|
);
|
|
3264
|
-
La.displayName =
|
|
3264
|
+
La.displayName = yr;
|
|
3265
3265
|
var $a = "PopperArrow", wd = {
|
|
3266
3266
|
top: "bottom",
|
|
3267
3267
|
right: "left",
|
|
@@ -3329,8 +3329,8 @@ function Fa(e) {
|
|
|
3329
3329
|
const [t, n = "center"] = e.split("-");
|
|
3330
3330
|
return [t, n];
|
|
3331
3331
|
}
|
|
3332
|
-
var Ba = Da,
|
|
3333
|
-
function
|
|
3332
|
+
var Ba = Da, xr = Ma, Wa = La, Ha = za;
|
|
3333
|
+
function ao(e, [t, n]) {
|
|
3334
3334
|
return Math.min(n, Math.max(t, e));
|
|
3335
3335
|
}
|
|
3336
3336
|
var yn = "Popover", [Va] = st(yn, [
|
|
@@ -3370,7 +3370,7 @@ Ua.displayName = yn;
|
|
|
3370
3370
|
var ja = "PopoverAnchor", Sd = c.forwardRef(
|
|
3371
3371
|
(e, t) => {
|
|
3372
3372
|
const { __scopePopover: n, ...r } = e, o = Ge(ja, n), a = Dt(n), { onCustomAnchorAdd: i, onCustomAnchorRemove: s } = o;
|
|
3373
|
-
return c.useEffect(() => (i(), () => s()), [i, s]), /* @__PURE__ */ m(
|
|
3373
|
+
return c.useEffect(() => (i(), () => s()), [i, s]), /* @__PURE__ */ m(xr, { ...a, ...r, ref: t });
|
|
3374
3374
|
}
|
|
3375
3375
|
);
|
|
3376
3376
|
Sd.displayName = ja;
|
|
@@ -3389,21 +3389,21 @@ var Ga = "PopoverTrigger", Ka = c.forwardRef(
|
|
|
3389
3389
|
onClick: Z(e.onClick, o.onOpenToggle)
|
|
3390
3390
|
}
|
|
3391
3391
|
);
|
|
3392
|
-
return o.hasCustomAnchor ? s : /* @__PURE__ */ m(
|
|
3392
|
+
return o.hasCustomAnchor ? s : /* @__PURE__ */ m(xr, { asChild: !0, ...a, children: s });
|
|
3393
3393
|
}
|
|
3394
3394
|
);
|
|
3395
3395
|
Ka.displayName = Ga;
|
|
3396
|
-
var
|
|
3396
|
+
var Cr = "PopoverPortal", [Ed, Rd] = Va(Cr, {
|
|
3397
3397
|
forceMount: void 0
|
|
3398
3398
|
}), Ya = (e) => {
|
|
3399
|
-
const { __scopePopover: t, forceMount: n, children: r, container: o } = e, a = Ge(
|
|
3399
|
+
const { __scopePopover: t, forceMount: n, children: r, container: o } = e, a = Ge(Cr, t);
|
|
3400
3400
|
return /* @__PURE__ */ m(Ed, { scope: t, forceMount: n, children: /* @__PURE__ */ m(je, { present: n || a.open, children: /* @__PURE__ */ m(dn, { asChild: !0, container: o, children: r }) }) });
|
|
3401
3401
|
};
|
|
3402
|
-
Ya.displayName =
|
|
3402
|
+
Ya.displayName = Cr;
|
|
3403
3403
|
var yt = "PopoverContent", Xa = c.forwardRef(
|
|
3404
3404
|
(e, t) => {
|
|
3405
3405
|
const n = Rd(yt, e.__scopePopover), { forceMount: r = n.forceMount, ...o } = e, a = Ge(yt, e.__scopePopover);
|
|
3406
|
-
return /* @__PURE__ */ m(je, { present: r || a.open, children: a.modal ? /* @__PURE__ */ m(kd, { ...o, ref: t }) : /* @__PURE__ */ m(
|
|
3406
|
+
return /* @__PURE__ */ m(je, { present: r || a.open, children: a.modal ? /* @__PURE__ */ m(kd, { ...o, ref: t }) : /* @__PURE__ */ m(Nd, { ...o, ref: t }) });
|
|
3407
3407
|
}
|
|
3408
3408
|
);
|
|
3409
3409
|
Xa.displayName = yt;
|
|
@@ -3412,7 +3412,7 @@ var Pd = /* @__PURE__ */ tt("PopoverContent.RemoveScroll"), kd = c.forwardRef(
|
|
|
3412
3412
|
const n = Ge(yt, e.__scopePopover), r = c.useRef(null), o = ie(t, r), a = c.useRef(!1);
|
|
3413
3413
|
return c.useEffect(() => {
|
|
3414
3414
|
const i = r.current;
|
|
3415
|
-
if (i) return
|
|
3415
|
+
if (i) return lr(i);
|
|
3416
3416
|
}, []), /* @__PURE__ */ m(fn, { as: Pd, allowPinchZoom: !0, children: /* @__PURE__ */ m(
|
|
3417
3417
|
qa,
|
|
3418
3418
|
{
|
|
@@ -3439,7 +3439,7 @@ var Pd = /* @__PURE__ */ tt("PopoverContent.RemoveScroll"), kd = c.forwardRef(
|
|
|
3439
3439
|
}
|
|
3440
3440
|
) });
|
|
3441
3441
|
}
|
|
3442
|
-
),
|
|
3442
|
+
), Nd = c.forwardRef(
|
|
3443
3443
|
(e, t) => {
|
|
3444
3444
|
const n = Ge(yt, e.__scopePopover), r = c.useRef(!1), o = c.useRef(!1);
|
|
3445
3445
|
return /* @__PURE__ */ m(
|
|
@@ -3474,7 +3474,7 @@ var Pd = /* @__PURE__ */ tt("PopoverContent.RemoveScroll"), kd = c.forwardRef(
|
|
|
3474
3474
|
onInteractOutside: f,
|
|
3475
3475
|
...u
|
|
3476
3476
|
} = e, h = Ge(yt, n), w = Dt(n);
|
|
3477
|
-
return
|
|
3477
|
+
return sr(), /* @__PURE__ */ m(
|
|
3478
3478
|
cn,
|
|
3479
3479
|
{
|
|
3480
3480
|
asChild: !0,
|
|
@@ -3516,7 +3516,7 @@ var Pd = /* @__PURE__ */ tt("PopoverContent.RemoveScroll"), kd = c.forwardRef(
|
|
|
3516
3516
|
}
|
|
3517
3517
|
);
|
|
3518
3518
|
}
|
|
3519
|
-
), Za = "PopoverClose",
|
|
3519
|
+
), Za = "PopoverClose", Ad = c.forwardRef(
|
|
3520
3520
|
(e, t) => {
|
|
3521
3521
|
const { __scopePopover: n, ...r } = e, o = Ge(Za, n);
|
|
3522
3522
|
return /* @__PURE__ */ m(
|
|
@@ -3530,7 +3530,7 @@ var Pd = /* @__PURE__ */ tt("PopoverContent.RemoveScroll"), kd = c.forwardRef(
|
|
|
3530
3530
|
);
|
|
3531
3531
|
}
|
|
3532
3532
|
);
|
|
3533
|
-
|
|
3533
|
+
Ad.displayName = Za;
|
|
3534
3534
|
var Od = "PopoverArrow", Td = c.forwardRef(
|
|
3535
3535
|
(e, t) => {
|
|
3536
3536
|
const { __scopePopover: n, ...r } = e, o = Dt(n);
|
|
@@ -3560,7 +3560,7 @@ var Id = Ua, Dd = Ka, _d = Ya, Md = Xa, Ld = [" ", "Enter", "ArrowUp", "ArrowDow
|
|
|
3560
3560
|
disabled: h,
|
|
3561
3561
|
required: w,
|
|
3562
3562
|
form: C
|
|
3563
|
-
} = e, p = Sn(t), [b, v] = c.useState(null), [
|
|
3563
|
+
} = e, p = Sn(t), [b, v] = c.useState(null), [y, x] = c.useState(null), [g, R] = c.useState(!1), k = Ks(d), [S, E] = bt({
|
|
3564
3564
|
prop: r,
|
|
3565
3565
|
defaultProp: o ?? !1,
|
|
3566
3566
|
onChange: a,
|
|
@@ -3570,7 +3570,7 @@ var Id = Ua, Dd = Ka, _d = Ya, Md = Xa, Ld = [" ", "Enter", "ArrowUp", "ArrowDow
|
|
|
3570
3570
|
defaultProp: s,
|
|
3571
3571
|
onChange: l,
|
|
3572
3572
|
caller: at
|
|
3573
|
-
}), z = c.useRef(null), H = b ? C || !!b.closest("form") : !0, [
|
|
3573
|
+
}), z = c.useRef(null), H = b ? C || !!b.closest("form") : !0, [N, W] = c.useState(/* @__PURE__ */ new Set()), U = Array.from(N).map((_) => _.props.value).join(";");
|
|
3574
3574
|
return /* @__PURE__ */ m(Ba, { ...p, children: /* @__PURE__ */ Y(
|
|
3575
3575
|
Fd,
|
|
3576
3576
|
{
|
|
@@ -3578,8 +3578,8 @@ var Id = Ua, Dd = Ka, _d = Ya, Md = Xa, Ld = [" ", "Enter", "ArrowUp", "ArrowDow
|
|
|
3578
3578
|
scope: t,
|
|
3579
3579
|
trigger: b,
|
|
3580
3580
|
onTriggerChange: v,
|
|
3581
|
-
valueNode:
|
|
3582
|
-
onValueNodeChange:
|
|
3581
|
+
valueNode: y,
|
|
3582
|
+
onValueNodeChange: x,
|
|
3583
3583
|
valueNodeHasChildren: g,
|
|
3584
3584
|
onValueNodeHasChildrenChange: R,
|
|
3585
3585
|
contentId: We(),
|
|
@@ -3621,7 +3621,7 @@ var Id = Ua, Dd = Ka, _d = Ya, Md = Xa, Ld = [" ", "Enter", "ArrowUp", "ArrowDow
|
|
|
3621
3621
|
form: C,
|
|
3622
3622
|
children: [
|
|
3623
3623
|
P === void 0 ? /* @__PURE__ */ m("option", { value: "" }) : null,
|
|
3624
|
-
Array.from(
|
|
3624
|
+
Array.from(N)
|
|
3625
3625
|
]
|
|
3626
3626
|
},
|
|
3627
3627
|
U
|
|
@@ -3634,15 +3634,15 @@ Ja.displayName = at;
|
|
|
3634
3634
|
var ei = "SelectTrigger", ti = c.forwardRef(
|
|
3635
3635
|
(e, t) => {
|
|
3636
3636
|
const { __scopeSelect: n, disabled: r = !1, ...o } = e, a = Sn(n), i = Ke(ei, n), s = i.disabled || r, l = ie(t, i.onTriggerChange), d = Cn(n), f = c.useRef("touch"), [u, h, w] = Si((p) => {
|
|
3637
|
-
const b = d().filter((
|
|
3638
|
-
|
|
3637
|
+
const b = d().filter((x) => !x.disabled), v = b.find((x) => x.value === i.value), y = Ei(b, p, v);
|
|
3638
|
+
y !== void 0 && i.onValueChange(y.value);
|
|
3639
3639
|
}), C = (p) => {
|
|
3640
3640
|
s || (i.onOpenChange(!0), w()), p && (i.triggerPointerDownPosRef.current = {
|
|
3641
3641
|
x: Math.round(p.pageX),
|
|
3642
3642
|
y: Math.round(p.pageY)
|
|
3643
3643
|
});
|
|
3644
3644
|
};
|
|
3645
|
-
return /* @__PURE__ */ m(
|
|
3645
|
+
return /* @__PURE__ */ m(xr, { asChild: !0, ...a, children: /* @__PURE__ */ m(
|
|
3646
3646
|
q.button,
|
|
3647
3647
|
{
|
|
3648
3648
|
type: "button",
|
|
@@ -3739,12 +3739,12 @@ var Se = 10, [si, Ye] = St(it), Ud = "SelectContentImpl", jd = /* @__PURE__ */ t
|
|
|
3739
3739
|
avoidCollisions: b,
|
|
3740
3740
|
//
|
|
3741
3741
|
...v
|
|
3742
|
-
} = e,
|
|
3742
|
+
} = e, y = Ke(it, n), [x, g] = c.useState(null), [R, k] = c.useState(null), S = ie(t, (L) => g(L)), [E, P] = c.useState(null), [D, z] = c.useState(
|
|
3743
3743
|
null
|
|
3744
|
-
), H = Cn(n), [
|
|
3744
|
+
), H = Cn(n), [N, W] = c.useState(!1), U = c.useRef(!1);
|
|
3745
3745
|
c.useEffect(() => {
|
|
3746
|
-
if (
|
|
3747
|
-
}, [
|
|
3746
|
+
if (x) return lr(x);
|
|
3747
|
+
}, [x]), sr();
|
|
3748
3748
|
const _ = c.useCallback(
|
|
3749
3749
|
(L) => {
|
|
3750
3750
|
const [ee, ...K] = H().map((ne) => ne.ref.current), [Q] = K.slice(-1), X = document.activeElement;
|
|
@@ -3753,15 +3753,15 @@ var Se = 10, [si, Ye] = St(it), Ud = "SelectContentImpl", jd = /* @__PURE__ */ t
|
|
|
3753
3753
|
},
|
|
3754
3754
|
[H, R]
|
|
3755
3755
|
), $ = c.useCallback(
|
|
3756
|
-
() => _([E,
|
|
3757
|
-
[_, E,
|
|
3756
|
+
() => _([E, x]),
|
|
3757
|
+
[_, E, x]
|
|
3758
3758
|
);
|
|
3759
3759
|
c.useEffect(() => {
|
|
3760
|
-
|
|
3761
|
-
}, [
|
|
3762
|
-
const { onOpenChange: M, triggerPointerDownPosRef: G } =
|
|
3760
|
+
N && $();
|
|
3761
|
+
}, [N, $]);
|
|
3762
|
+
const { onOpenChange: M, triggerPointerDownPosRef: G } = y;
|
|
3763
3763
|
c.useEffect(() => {
|
|
3764
|
-
if (
|
|
3764
|
+
if (x) {
|
|
3765
3765
|
let L = { x: 0, y: 0 };
|
|
3766
3766
|
const ee = (Q) => {
|
|
3767
3767
|
L = {
|
|
@@ -3769,13 +3769,13 @@ var Se = 10, [si, Ye] = St(it), Ud = "SelectContentImpl", jd = /* @__PURE__ */ t
|
|
|
3769
3769
|
y: Math.abs(Math.round(Q.pageY) - (G.current?.y ?? 0))
|
|
3770
3770
|
};
|
|
3771
3771
|
}, K = (Q) => {
|
|
3772
|
-
L.x <= 10 && L.y <= 10 ? Q.preventDefault() :
|
|
3772
|
+
L.x <= 10 && L.y <= 10 ? Q.preventDefault() : x.contains(Q.target) || M(!1), document.removeEventListener("pointermove", ee), G.current = null;
|
|
3773
3773
|
};
|
|
3774
3774
|
return G.current !== null && (document.addEventListener("pointermove", ee), document.addEventListener("pointerup", K, { capture: !0, once: !0 })), () => {
|
|
3775
3775
|
document.removeEventListener("pointermove", ee), document.removeEventListener("pointerup", K, { capture: !0 });
|
|
3776
3776
|
};
|
|
3777
3777
|
}
|
|
3778
|
-
}, [
|
|
3778
|
+
}, [x, M, G]), c.useEffect(() => {
|
|
3779
3779
|
const L = () => M(!1);
|
|
3780
3780
|
return window.addEventListener("blur", L), window.addEventListener("resize", L), () => {
|
|
3781
3781
|
window.removeEventListener("blur", L), window.removeEventListener("resize", L);
|
|
@@ -3787,16 +3787,16 @@ var Se = 10, [si, Ye] = St(it), Ud = "SelectContentImpl", jd = /* @__PURE__ */ t
|
|
|
3787
3787
|
}), xe = c.useCallback(
|
|
3788
3788
|
(L, ee, K) => {
|
|
3789
3789
|
const Q = !U.current && !K;
|
|
3790
|
-
(
|
|
3790
|
+
(y.value !== void 0 && y.value === ee || Q) && (P(L), Q && (U.current = !0));
|
|
3791
3791
|
},
|
|
3792
|
-
[
|
|
3793
|
-
), he = c.useCallback(() =>
|
|
3792
|
+
[y.value]
|
|
3793
|
+
), he = c.useCallback(() => x?.focus(), [x]), pe = c.useCallback(
|
|
3794
3794
|
(L, ee, K) => {
|
|
3795
3795
|
const Q = !U.current && !K;
|
|
3796
|
-
(
|
|
3796
|
+
(y.value !== void 0 && y.value === ee || Q) && z(L);
|
|
3797
3797
|
},
|
|
3798
|
-
[
|
|
3799
|
-
), oe = r === "popper" ?
|
|
3798
|
+
[y.value]
|
|
3799
|
+
), oe = r === "popper" ? Xn : ci, re = oe === Xn ? {
|
|
3800
3800
|
side: s,
|
|
3801
3801
|
sideOffset: l,
|
|
3802
3802
|
align: d,
|
|
@@ -3812,7 +3812,7 @@ var Se = 10, [si, Ye] = St(it), Ud = "SelectContentImpl", jd = /* @__PURE__ */ t
|
|
|
3812
3812
|
si,
|
|
3813
3813
|
{
|
|
3814
3814
|
scope: n,
|
|
3815
|
-
content:
|
|
3815
|
+
content: x,
|
|
3816
3816
|
viewport: R,
|
|
3817
3817
|
onViewportChange: k,
|
|
3818
3818
|
itemRefCallback: xe,
|
|
@@ -3822,18 +3822,18 @@ var Se = 10, [si, Ye] = St(it), Ud = "SelectContentImpl", jd = /* @__PURE__ */ t
|
|
|
3822
3822
|
focusSelectedItem: $,
|
|
3823
3823
|
selectedItemText: D,
|
|
3824
3824
|
position: r,
|
|
3825
|
-
isPositioned:
|
|
3825
|
+
isPositioned: N,
|
|
3826
3826
|
searchRef: O,
|
|
3827
3827
|
children: /* @__PURE__ */ m(fn, { as: jd, allowPinchZoom: !0, children: /* @__PURE__ */ m(
|
|
3828
3828
|
cn,
|
|
3829
3829
|
{
|
|
3830
3830
|
asChild: !0,
|
|
3831
|
-
trapped:
|
|
3831
|
+
trapped: y.open,
|
|
3832
3832
|
onMountAutoFocus: (L) => {
|
|
3833
3833
|
L.preventDefault();
|
|
3834
3834
|
},
|
|
3835
3835
|
onUnmountAutoFocus: Z(o, (L) => {
|
|
3836
|
-
|
|
3836
|
+
y.trigger?.focus({ preventScroll: !0 }), L.preventDefault();
|
|
3837
3837
|
}),
|
|
3838
3838
|
children: /* @__PURE__ */ m(
|
|
3839
3839
|
ln,
|
|
@@ -3843,14 +3843,14 @@ var Se = 10, [si, Ye] = St(it), Ud = "SelectContentImpl", jd = /* @__PURE__ */ t
|
|
|
3843
3843
|
onEscapeKeyDown: a,
|
|
3844
3844
|
onPointerDownOutside: i,
|
|
3845
3845
|
onFocusOutside: (L) => L.preventDefault(),
|
|
3846
|
-
onDismiss: () =>
|
|
3846
|
+
onDismiss: () => y.onOpenChange(!1),
|
|
3847
3847
|
children: /* @__PURE__ */ m(
|
|
3848
3848
|
oe,
|
|
3849
3849
|
{
|
|
3850
3850
|
role: "listbox",
|
|
3851
|
-
id:
|
|
3852
|
-
"data-state":
|
|
3853
|
-
dir:
|
|
3851
|
+
id: y.contentId,
|
|
3852
|
+
"data-state": y.open ? "open" : "closed",
|
|
3853
|
+
dir: y.dir,
|
|
3854
3854
|
onContextMenu: (L) => L.preventDefault(),
|
|
3855
3855
|
...v,
|
|
3856
3856
|
...re,
|
|
@@ -3887,11 +3887,11 @@ var Se = 10, [si, Ye] = St(it), Ud = "SelectContentImpl", jd = /* @__PURE__ */ t
|
|
|
3887
3887
|
);
|
|
3888
3888
|
li.displayName = Ud;
|
|
3889
3889
|
var Gd = "SelectItemAlignedPosition", ci = c.forwardRef((e, t) => {
|
|
3890
|
-
const { __scopeSelect: n, onPlaced: r, ...o } = e, a = Ke(it, n), i = Ye(it, n), [s, l] = c.useState(null), [d, f] = c.useState(null), u = ie(t, (S) => f(S)), h = Cn(n), w = c.useRef(!1), C = c.useRef(!0), { viewport: p, selectedItem: b, selectedItemText: v, focusSelectedItem:
|
|
3890
|
+
const { __scopeSelect: n, onPlaced: r, ...o } = e, a = Ke(it, n), i = Ye(it, n), [s, l] = c.useState(null), [d, f] = c.useState(null), u = ie(t, (S) => f(S)), h = Cn(n), w = c.useRef(!1), C = c.useRef(!0), { viewport: p, selectedItem: b, selectedItemText: v, focusSelectedItem: y } = i, x = c.useCallback(() => {
|
|
3891
3891
|
if (a.trigger && a.valueNode && s && d && p && b && v) {
|
|
3892
3892
|
const S = a.trigger.getBoundingClientRect(), E = d.getBoundingClientRect(), P = a.valueNode.getBoundingClientRect(), D = v.getBoundingClientRect();
|
|
3893
3893
|
if (a.dir !== "rtl") {
|
|
3894
|
-
const X = D.left - E.left, ne = P.left - X, de = S.left - ne, F = S.width + de, ct = Math.max(F, E.width), dt = window.innerWidth - Se, qe =
|
|
3894
|
+
const X = D.left - E.left, ne = P.left - X, de = S.left - ne, F = S.width + de, ct = Math.max(F, E.width), dt = window.innerWidth - Se, qe = ao(ne, [
|
|
3895
3895
|
Se,
|
|
3896
3896
|
// Prevents the content from going off the starting edge of the
|
|
3897
3897
|
// viewport. It may still go off the ending edge, but this can be
|
|
@@ -3902,13 +3902,13 @@ var Gd = "SelectItemAlignedPosition", ci = c.forwardRef((e, t) => {
|
|
|
3902
3902
|
]);
|
|
3903
3903
|
s.style.minWidth = F + "px", s.style.left = qe + "px";
|
|
3904
3904
|
} else {
|
|
3905
|
-
const X = E.right - D.right, ne = window.innerWidth - P.right - X, de = window.innerWidth - S.right - ne, F = S.width + de, ct = Math.max(F, E.width), dt = window.innerWidth - Se, qe =
|
|
3905
|
+
const X = E.right - D.right, ne = window.innerWidth - P.right - X, de = window.innerWidth - S.right - ne, F = S.width + de, ct = Math.max(F, E.width), dt = window.innerWidth - Se, qe = ao(ne, [
|
|
3906
3906
|
Se,
|
|
3907
3907
|
Math.max(Se, dt - ct)
|
|
3908
3908
|
]);
|
|
3909
3909
|
s.style.minWidth = F + "px", s.style.right = qe + "px";
|
|
3910
3910
|
}
|
|
3911
|
-
const z = h(), H = window.innerHeight - Se * 2,
|
|
3911
|
+
const z = h(), H = window.innerHeight - Se * 2, N = p.scrollHeight, W = window.getComputedStyle(d), U = parseInt(W.borderTopWidth, 10), _ = parseInt(W.paddingTop, 10), $ = parseInt(W.borderBottomWidth, 10), M = parseInt(W.paddingBottom, 10), G = U + _ + N + M + $, O = Math.min(b.offsetHeight * 5, G), ye = window.getComputedStyle(p), xe = parseInt(ye.paddingTop, 10), he = parseInt(ye.paddingBottom, 10), pe = S.top + S.height / 2 - Se, oe = H - pe, re = b.offsetHeight / 2, L = b.offsetTop + re, ee = U + _ + L, K = G - ee;
|
|
3912
3912
|
if (ee <= pe) {
|
|
3913
3913
|
const X = z.length > 0 && b === z[z.length - 1].ref.current;
|
|
3914
3914
|
s.style.bottom = "0px";
|
|
@@ -3942,16 +3942,16 @@ var Gd = "SelectItemAlignedPosition", ci = c.forwardRef((e, t) => {
|
|
|
3942
3942
|
a.dir,
|
|
3943
3943
|
r
|
|
3944
3944
|
]);
|
|
3945
|
-
me(() =>
|
|
3945
|
+
me(() => x(), [x]);
|
|
3946
3946
|
const [g, R] = c.useState();
|
|
3947
3947
|
me(() => {
|
|
3948
3948
|
d && R(window.getComputedStyle(d).zIndex);
|
|
3949
3949
|
}, [d]);
|
|
3950
3950
|
const k = c.useCallback(
|
|
3951
3951
|
(S) => {
|
|
3952
|
-
S && C.current === !0 && (
|
|
3952
|
+
S && C.current === !0 && (x(), y?.(), C.current = !1);
|
|
3953
3953
|
},
|
|
3954
|
-
[
|
|
3954
|
+
[x, y]
|
|
3955
3955
|
);
|
|
3956
3956
|
return /* @__PURE__ */ m(
|
|
3957
3957
|
Yd,
|
|
@@ -3991,7 +3991,7 @@ var Gd = "SelectItemAlignedPosition", ci = c.forwardRef((e, t) => {
|
|
|
3991
3991
|
);
|
|
3992
3992
|
});
|
|
3993
3993
|
ci.displayName = Gd;
|
|
3994
|
-
var Kd = "SelectPopperPosition",
|
|
3994
|
+
var Kd = "SelectPopperPosition", Xn = c.forwardRef((e, t) => {
|
|
3995
3995
|
const {
|
|
3996
3996
|
__scopeSelect: n,
|
|
3997
3997
|
align: r = "start",
|
|
@@ -4019,10 +4019,10 @@ var Kd = "SelectPopperPosition", qn = c.forwardRef((e, t) => {
|
|
|
4019
4019
|
}
|
|
4020
4020
|
);
|
|
4021
4021
|
});
|
|
4022
|
-
|
|
4023
|
-
var [Yd,
|
|
4022
|
+
Xn.displayName = Kd;
|
|
4023
|
+
var [Yd, Sr] = St(it, {}), qn = "SelectViewport", di = c.forwardRef(
|
|
4024
4024
|
(e, t) => {
|
|
4025
|
-
const { __scopeSelect: n, nonce: r, ...o } = e, a = Ye(
|
|
4025
|
+
const { __scopeSelect: n, nonce: r, ...o } = e, a = Ye(qn, n), i = Sr(qn, n), s = ie(t, a.onViewportChange), l = c.useRef(0);
|
|
4026
4026
|
return /* @__PURE__ */ Y(vt, { children: [
|
|
4027
4027
|
/* @__PURE__ */ m(
|
|
4028
4028
|
"style",
|
|
@@ -4060,8 +4060,8 @@ var [Yd, Er] = St(it, {}), Zn = "SelectViewport", di = c.forwardRef(
|
|
|
4060
4060
|
if (w > 0) {
|
|
4061
4061
|
const C = window.innerHeight - Se * 2, p = parseFloat(u.style.minHeight), b = parseFloat(u.style.height), v = Math.max(p, b);
|
|
4062
4062
|
if (v < C) {
|
|
4063
|
-
const
|
|
4064
|
-
u.style.height =
|
|
4063
|
+
const y = v + w, x = Math.min(C, y), g = y - x;
|
|
4064
|
+
u.style.height = x + "px", u.style.bottom === "0px" && (f.scrollTop = g > 0 ? g : 0, u.style.justifyContent = "flex-end");
|
|
4065
4065
|
}
|
|
4066
4066
|
}
|
|
4067
4067
|
}
|
|
@@ -4072,7 +4072,7 @@ var [Yd, Er] = St(it, {}), Zn = "SelectViewport", di = c.forwardRef(
|
|
|
4072
4072
|
] });
|
|
4073
4073
|
}
|
|
4074
4074
|
);
|
|
4075
|
-
di.displayName =
|
|
4075
|
+
di.displayName = qn;
|
|
4076
4076
|
var ui = "SelectGroup", [Xd, qd] = St(ui), Zd = c.forwardRef(
|
|
4077
4077
|
(e, t) => {
|
|
4078
4078
|
const { __scopeSelect: n, ...r } = e, o = We();
|
|
@@ -4097,7 +4097,7 @@ var nn = "SelectItem", [Jd, pi] = St(nn), mi = c.forwardRef(
|
|
|
4097
4097
|
...i
|
|
4098
4098
|
} = e, s = Ke(nn, n), l = Ye(nn, n), d = s.value === r, [f, u] = c.useState(a ?? ""), [h, w] = c.useState(!1), C = ie(
|
|
4099
4099
|
t,
|
|
4100
|
-
(
|
|
4100
|
+
(y) => l.itemRefCallback?.(y, r, o)
|
|
4101
4101
|
), p = We(), b = c.useRef("touch"), v = () => {
|
|
4102
4102
|
o || (s.onValueChange(r), s.onOpenChange(!1));
|
|
4103
4103
|
};
|
|
@@ -4113,8 +4113,8 @@ var nn = "SelectItem", [Jd, pi] = St(nn), mi = c.forwardRef(
|
|
|
4113
4113
|
disabled: o,
|
|
4114
4114
|
textId: p,
|
|
4115
4115
|
isSelected: d,
|
|
4116
|
-
onItemTextChange: c.useCallback((
|
|
4117
|
-
u((
|
|
4116
|
+
onItemTextChange: c.useCallback((y) => {
|
|
4117
|
+
u((x) => x || (y?.textContent ?? "").trim());
|
|
4118
4118
|
}, []),
|
|
4119
4119
|
children: /* @__PURE__ */ m(
|
|
4120
4120
|
xn.ItemSlot,
|
|
@@ -4144,17 +4144,17 @@ var nn = "SelectItem", [Jd, pi] = St(nn), mi = c.forwardRef(
|
|
|
4144
4144
|
onPointerUp: Z(i.onPointerUp, () => {
|
|
4145
4145
|
b.current === "mouse" && v();
|
|
4146
4146
|
}),
|
|
4147
|
-
onPointerDown: Z(i.onPointerDown, (
|
|
4148
|
-
b.current =
|
|
4147
|
+
onPointerDown: Z(i.onPointerDown, (y) => {
|
|
4148
|
+
b.current = y.pointerType;
|
|
4149
4149
|
}),
|
|
4150
|
-
onPointerMove: Z(i.onPointerMove, (
|
|
4151
|
-
b.current =
|
|
4150
|
+
onPointerMove: Z(i.onPointerMove, (y) => {
|
|
4151
|
+
b.current = y.pointerType, o ? l.onItemLeave?.() : b.current === "mouse" && y.currentTarget.focus({ preventScroll: !0 });
|
|
4152
4152
|
}),
|
|
4153
|
-
onPointerLeave: Z(i.onPointerLeave, (
|
|
4154
|
-
|
|
4153
|
+
onPointerLeave: Z(i.onPointerLeave, (y) => {
|
|
4154
|
+
y.currentTarget === document.activeElement && l.onItemLeave?.();
|
|
4155
4155
|
}),
|
|
4156
|
-
onKeyDown: Z(i.onKeyDown, (
|
|
4157
|
-
l.searchRef?.current !== "" &&
|
|
4156
|
+
onKeyDown: Z(i.onKeyDown, (y) => {
|
|
4157
|
+
l.searchRef?.current !== "" && y.key === " " || ($d.includes(y.key) && v(), y.key === " " && y.preventDefault());
|
|
4158
4158
|
})
|
|
4159
4159
|
}
|
|
4160
4160
|
)
|
|
@@ -4190,8 +4190,8 @@ var gi = "SelectItemIndicator", vi = c.forwardRef(
|
|
|
4190
4190
|
}
|
|
4191
4191
|
);
|
|
4192
4192
|
vi.displayName = gi;
|
|
4193
|
-
var
|
|
4194
|
-
const n = Ye(
|
|
4193
|
+
var Zn = "SelectScrollUpButton", bi = c.forwardRef((e, t) => {
|
|
4194
|
+
const n = Ye(Zn, e.__scopeSelect), r = Sr(Zn, e.__scopeSelect), [o, a] = c.useState(!1), i = ie(t, r.onScrollButtonChange);
|
|
4195
4195
|
return me(() => {
|
|
4196
4196
|
if (n.viewport && n.isPositioned) {
|
|
4197
4197
|
let s = function() {
|
|
@@ -4213,9 +4213,9 @@ var Qn = "SelectScrollUpButton", bi = c.forwardRef((e, t) => {
|
|
|
4213
4213
|
}
|
|
4214
4214
|
) : null;
|
|
4215
4215
|
});
|
|
4216
|
-
bi.displayName =
|
|
4217
|
-
var
|
|
4218
|
-
const n = Ye(
|
|
4216
|
+
bi.displayName = Zn;
|
|
4217
|
+
var Qn = "SelectScrollDownButton", wi = c.forwardRef((e, t) => {
|
|
4218
|
+
const n = Ye(Qn, e.__scopeSelect), r = Sr(Qn, e.__scopeSelect), [o, a] = c.useState(!1), i = ie(t, r.onScrollButtonChange);
|
|
4219
4219
|
return me(() => {
|
|
4220
4220
|
if (n.viewport && n.isPositioned) {
|
|
4221
4221
|
let s = function() {
|
|
@@ -4237,7 +4237,7 @@ var Jn = "SelectScrollDownButton", wi = c.forwardRef((e, t) => {
|
|
|
4237
4237
|
}
|
|
4238
4238
|
) : null;
|
|
4239
4239
|
});
|
|
4240
|
-
wi.displayName =
|
|
4240
|
+
wi.displayName = Qn;
|
|
4241
4241
|
var yi = c.forwardRef((e, t) => {
|
|
4242
4242
|
const { __scopeSelect: n, onAutoScroll: r, ...o } = e, a = Ye("SelectScrollButton", n), i = c.useRef(null), s = Cn(n), l = c.useCallback(() => {
|
|
4243
4243
|
i.current !== null && (window.clearInterval(i.current), i.current = null);
|
|
@@ -4269,13 +4269,13 @@ var yi = c.forwardRef((e, t) => {
|
|
|
4269
4269
|
}
|
|
4270
4270
|
);
|
|
4271
4271
|
tu.displayName = eu;
|
|
4272
|
-
var
|
|
4272
|
+
var Jn = "SelectArrow", nu = c.forwardRef(
|
|
4273
4273
|
(e, t) => {
|
|
4274
|
-
const { __scopeSelect: n, ...r } = e, o = Sn(n), a = Ke(
|
|
4274
|
+
const { __scopeSelect: n, ...r } = e, o = Sn(n), a = Ke(Jn, n), i = Ye(Jn, n);
|
|
4275
4275
|
return a.open && i.position === "popper" ? /* @__PURE__ */ m(Ha, { ...o, ...r, ref: t }) : null;
|
|
4276
4276
|
}
|
|
4277
4277
|
);
|
|
4278
|
-
nu.displayName =
|
|
4278
|
+
nu.displayName = Jn;
|
|
4279
4279
|
var ru = "SelectBubbleInput", xi = c.forwardRef(
|
|
4280
4280
|
({ __scopeSelect: e, value: t, ...n }, r) => {
|
|
4281
4281
|
const o = c.useRef(null), a = ie(r, o), i = ca(t);
|
|
@@ -4346,7 +4346,7 @@ const vu = (e, t) => {
|
|
|
4346
4346
|
nextPart: e,
|
|
4347
4347
|
validators: t,
|
|
4348
4348
|
classGroupId: n
|
|
4349
|
-
}), rn = "-",
|
|
4349
|
+
}), rn = "-", io = [], wu = "arbitrary..", yu = (e) => {
|
|
4350
4350
|
const t = Cu(e), {
|
|
4351
4351
|
conflictingClassGroups: n,
|
|
4352
4352
|
conflictingClassGroupModifiers: r
|
|
@@ -4361,9 +4361,9 @@ const vu = (e, t) => {
|
|
|
4361
4361
|
getConflictingClassGroupIds: (i, s) => {
|
|
4362
4362
|
if (s) {
|
|
4363
4363
|
const l = r[i], d = n[i];
|
|
4364
|
-
return l ? d ? vu(d, l) : l : d ||
|
|
4364
|
+
return l ? d ? vu(d, l) : l : d || io;
|
|
4365
4365
|
}
|
|
4366
|
-
return n[i] ||
|
|
4366
|
+
return n[i] || io;
|
|
4367
4367
|
}
|
|
4368
4368
|
};
|
|
4369
4369
|
}, Pi = (e, t, n) => {
|
|
@@ -4396,10 +4396,10 @@ const vu = (e, t) => {
|
|
|
4396
4396
|
const n = Ri();
|
|
4397
4397
|
for (const r in e) {
|
|
4398
4398
|
const o = e[r];
|
|
4399
|
-
|
|
4399
|
+
Er(o, n, r, t);
|
|
4400
4400
|
}
|
|
4401
4401
|
return n;
|
|
4402
|
-
},
|
|
4402
|
+
}, Er = (e, t, n, r) => {
|
|
4403
4403
|
const o = e.length;
|
|
4404
4404
|
for (let a = 0; a < o; a++) {
|
|
4405
4405
|
const i = e[a];
|
|
@@ -4419,8 +4419,8 @@ const vu = (e, t) => {
|
|
|
4419
4419
|
const r = e === "" ? t : ki(t, e);
|
|
4420
4420
|
r.classGroupId = n;
|
|
4421
4421
|
}, Pu = (e, t, n, r) => {
|
|
4422
|
-
if (
|
|
4423
|
-
|
|
4422
|
+
if (Nu(e)) {
|
|
4423
|
+
Er(e(r), t, n, r);
|
|
4424
4424
|
return;
|
|
4425
4425
|
}
|
|
4426
4426
|
t.validators === null && (t.validators = []), t.validators.push(bu(n, e));
|
|
@@ -4428,7 +4428,7 @@ const vu = (e, t) => {
|
|
|
4428
4428
|
const o = Object.entries(e), a = o.length;
|
|
4429
4429
|
for (let i = 0; i < a; i++) {
|
|
4430
4430
|
const [s, l] = o[i];
|
|
4431
|
-
|
|
4431
|
+
Er(l, ki(t, s), n, r);
|
|
4432
4432
|
}
|
|
4433
4433
|
}, ki = (e, t) => {
|
|
4434
4434
|
let n = e;
|
|
@@ -4439,7 +4439,7 @@ const vu = (e, t) => {
|
|
|
4439
4439
|
s || (s = Ri(), n.nextPart.set(i, s)), n = s;
|
|
4440
4440
|
}
|
|
4441
4441
|
return n;
|
|
4442
|
-
},
|
|
4442
|
+
}, Nu = (e) => "isThemeGetter" in e && e.isThemeGetter === !0, Au = (e) => {
|
|
4443
4443
|
if (e < 1)
|
|
4444
4444
|
return {
|
|
4445
4445
|
get: () => {
|
|
@@ -4463,7 +4463,7 @@ const vu = (e, t) => {
|
|
|
4463
4463
|
a in n ? n[a] = i : o(a, i);
|
|
4464
4464
|
}
|
|
4465
4465
|
};
|
|
4466
|
-
},
|
|
4466
|
+
}, er = "!", so = ":", Ou = [], lo = (e, t, n, r, o) => ({
|
|
4467
4467
|
modifiers: e,
|
|
4468
4468
|
hasImportantModifier: t,
|
|
4469
4469
|
baseClassName: n,
|
|
@@ -4481,7 +4481,7 @@ const vu = (e, t) => {
|
|
|
4481
4481
|
for (let p = 0; p < f; p++) {
|
|
4482
4482
|
const b = o[p];
|
|
4483
4483
|
if (i === 0 && s === 0) {
|
|
4484
|
-
if (b ===
|
|
4484
|
+
if (b === so) {
|
|
4485
4485
|
a.push(o.slice(l, p)), l = p + 1;
|
|
4486
4486
|
continue;
|
|
4487
4487
|
}
|
|
@@ -4494,19 +4494,19 @@ const vu = (e, t) => {
|
|
|
4494
4494
|
}
|
|
4495
4495
|
const u = a.length === 0 ? o : o.slice(l);
|
|
4496
4496
|
let h = u, w = !1;
|
|
4497
|
-
u.endsWith(
|
|
4497
|
+
u.endsWith(er) ? (h = u.slice(0, -1), w = !0) : (
|
|
4498
4498
|
/**
|
|
4499
4499
|
* In Tailwind CSS v3 the important modifier was at the start of the base class name. This is still supported for legacy reasons.
|
|
4500
4500
|
* @see https://github.com/dcastil/tailwind-merge/issues/513#issuecomment-2614029864
|
|
4501
4501
|
*/
|
|
4502
|
-
u.startsWith(
|
|
4502
|
+
u.startsWith(er) && (h = u.slice(1), w = !0)
|
|
4503
4503
|
);
|
|
4504
4504
|
const C = d && d > l ? d - l : void 0;
|
|
4505
|
-
return
|
|
4505
|
+
return lo(a, w, h, C);
|
|
4506
4506
|
};
|
|
4507
4507
|
if (t) {
|
|
4508
|
-
const o = t +
|
|
4509
|
-
r = (i) => i.startsWith(o) ? a(i.slice(o.length)) :
|
|
4508
|
+
const o = t + so, a = r;
|
|
4509
|
+
r = (i) => i.startsWith(o) ? a(i.slice(o.length)) : lo(Ou, !1, i, void 0, !0);
|
|
4510
4510
|
}
|
|
4511
4511
|
if (n) {
|
|
4512
4512
|
const o = r;
|
|
@@ -4530,7 +4530,7 @@ const vu = (e, t) => {
|
|
|
4530
4530
|
return o.length > 0 && (o.sort(), r.push(...o)), r;
|
|
4531
4531
|
};
|
|
4532
4532
|
}, Du = (e) => ({
|
|
4533
|
-
cache:
|
|
4533
|
+
cache: Au(e.cacheSize),
|
|
4534
4534
|
parseClassName: Tu(e),
|
|
4535
4535
|
sortModifiers: Iu(e),
|
|
4536
4536
|
...yu(e)
|
|
@@ -4566,14 +4566,14 @@ const vu = (e, t) => {
|
|
|
4566
4566
|
}
|
|
4567
4567
|
b = !1;
|
|
4568
4568
|
}
|
|
4569
|
-
const
|
|
4569
|
+
const y = h.length === 0 ? "" : h.length === 1 ? h[0] : a(h).join(":"), x = w ? y + er : y, g = x + v;
|
|
4570
4570
|
if (i.indexOf(g) > -1)
|
|
4571
4571
|
continue;
|
|
4572
4572
|
i.push(g);
|
|
4573
4573
|
const R = o(v, b);
|
|
4574
4574
|
for (let k = 0; k < R.length; ++k) {
|
|
4575
4575
|
const S = R[k];
|
|
4576
|
-
i.push(
|
|
4576
|
+
i.push(x + S);
|
|
4577
4577
|
}
|
|
4578
4578
|
l = f + (l.length > 0 ? " " + l : l);
|
|
4579
4579
|
}
|
|
@@ -4581,14 +4581,14 @@ const vu = (e, t) => {
|
|
|
4581
4581
|
}, Lu = (...e) => {
|
|
4582
4582
|
let t = 0, n, r, o = "";
|
|
4583
4583
|
for (; t < e.length; )
|
|
4584
|
-
(n = e[t++]) && (r =
|
|
4584
|
+
(n = e[t++]) && (r = Ni(n)) && (o && (o += " "), o += r);
|
|
4585
4585
|
return o;
|
|
4586
|
-
},
|
|
4586
|
+
}, Ni = (e) => {
|
|
4587
4587
|
if (typeof e == "string")
|
|
4588
4588
|
return e;
|
|
4589
4589
|
let t, n = "";
|
|
4590
4590
|
for (let r = 0; r < e.length; r++)
|
|
4591
|
-
e[r] && (t =
|
|
4591
|
+
e[r] && (t = Ni(e[r])) && (n && (n += " "), n += t);
|
|
4592
4592
|
return n;
|
|
4593
4593
|
}, $u = (e, ...t) => {
|
|
4594
4594
|
let n, r, o, a;
|
|
@@ -4606,19 +4606,19 @@ const vu = (e, t) => {
|
|
|
4606
4606
|
}, zu = [], ue = (e) => {
|
|
4607
4607
|
const t = (n) => n[e] || zu;
|
|
4608
4608
|
return t.isThemeGetter = !0, t;
|
|
4609
|
-
},
|
|
4609
|
+
}, Ai = /^\[(?:(\w[\w-]*):)?(.+)\]$/i, Oi = /^\((?:(\w[\w-]*):)?(.+)\)$/i, Fu = /^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/, Bu = /^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/, Wu = /\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/, Hu = /^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/, Vu = /^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/, Uu = /^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/, ze = (e) => Fu.test(e), j = (e) => !!e && !Number.isNaN(Number(e)), Fe = (e) => !!e && Number.isInteger(Number(e)), Mn = (e) => e.endsWith("%") && j(e.slice(0, -1)), Ie = (e) => Bu.test(e), Ti = () => !0, ju = (e) => (
|
|
4610
4610
|
// `colorFunctionRegex` check is necessary because color functions can have percentages in them which which would be incorrectly classified as lengths.
|
|
4611
4611
|
// For example, `hsl(0 0% 0%)` would be classified as a length without this check.
|
|
4612
4612
|
// I could also use lookbehind assertion in `lengthUnitRegex` but that isn't supported widely enough.
|
|
4613
4613
|
Wu.test(e) && !Hu.test(e)
|
|
4614
|
-
),
|
|
4615
|
-
const r =
|
|
4614
|
+
), Rr = () => !1, Gu = (e) => Vu.test(e), Ku = (e) => Uu.test(e), Yu = (e) => !T(e) && !I(e), Xu = (e) => Xe(e, _i, Rr), T = (e) => Ai.test(e), Je = (e) => Xe(e, Mi, ju), co = (e) => Xe(e, rf, j), qu = (e) => Xe(e, $i, Ti), Zu = (e) => Xe(e, Li, Rr), uo = (e) => Xe(e, Ii, Rr), Qu = (e) => Xe(e, Di, Ku), Ut = (e) => Xe(e, zi, Gu), I = (e) => Oi.test(e), kt = (e) => lt(e, Mi), Ju = (e) => lt(e, Li), fo = (e) => lt(e, Ii), ef = (e) => lt(e, _i), tf = (e) => lt(e, Di), jt = (e) => lt(e, zi, !0), nf = (e) => lt(e, $i, !0), Xe = (e, t, n) => {
|
|
4615
|
+
const r = Ai.exec(e);
|
|
4616
4616
|
return r ? r[1] ? t(r[1]) : n(r[2]) : !1;
|
|
4617
4617
|
}, lt = (e, t, n = !1) => {
|
|
4618
4618
|
const r = Oi.exec(e);
|
|
4619
4619
|
return r ? r[1] ? t(r[1]) : n : !1;
|
|
4620
4620
|
}, Ii = (e) => e === "position" || e === "percentage", Di = (e) => e === "image" || e === "url", _i = (e) => e === "length" || e === "size" || e === "bg-size", Mi = (e) => e === "length", rf = (e) => e === "number", Li = (e) => e === "family-name", $i = (e) => e === "number" || e === "weight", zi = (e) => e === "shadow", of = () => {
|
|
4621
|
-
const e = ue("color"), t = ue("font"), n = ue("text"), r = ue("font-weight"), o = ue("tracking"), a = ue("leading"), i = ue("breakpoint"), s = ue("container"), l = ue("spacing"), d = ue("radius"), f = ue("shadow"), u = ue("inset-shadow"), h = ue("text-shadow"), w = ue("drop-shadow"), C = ue("blur"), p = ue("perspective"), b = ue("aspect"), v = ue("ease"),
|
|
4621
|
+
const e = ue("color"), t = ue("font"), n = ue("text"), r = ue("font-weight"), o = ue("tracking"), a = ue("leading"), i = ue("breakpoint"), s = ue("container"), l = ue("spacing"), d = ue("radius"), f = ue("shadow"), u = ue("inset-shadow"), h = ue("text-shadow"), w = ue("drop-shadow"), C = ue("blur"), p = ue("perspective"), b = ue("aspect"), v = ue("ease"), y = ue("animate"), x = () => ["auto", "avoid", "all", "avoid-page", "page", "left", "right", "column"], g = () => [
|
|
4622
4622
|
"center",
|
|
4623
4623
|
"top",
|
|
4624
4624
|
"bottom",
|
|
@@ -4638,7 +4638,7 @@ const vu = (e, t) => {
|
|
|
4638
4638
|
"left-bottom"
|
|
4639
4639
|
], R = () => [...g(), I, T], k = () => ["auto", "hidden", "clip", "visible", "scroll"], S = () => ["auto", "contain", "none"], E = () => [I, T, l], P = () => [ze, "full", "auto", ...E()], D = () => [Fe, "none", "subgrid", I, T], z = () => ["auto", {
|
|
4640
4640
|
span: ["full", Fe, I, T]
|
|
4641
|
-
}, Fe, I, T], H = () => [Fe, "auto", I, T],
|
|
4641
|
+
}, Fe, I, T], H = () => [Fe, "auto", I, T], N = () => ["auto", "min", "max", "fr", I, T], W = () => ["start", "end", "center", "between", "around", "evenly", "stretch", "baseline", "center-safe", "end-safe"], U = () => ["start", "end", "center", "stretch", "center-safe", "end-safe"], _ = () => ["auto", ...E()], $ = () => [ze, "auto", "full", "dvw", "dvh", "lvw", "lvh", "svw", "svh", "min", "max", "fit", ...E()], M = () => [ze, "screen", "full", "dvw", "lvw", "svw", "min", "max", "fit", ...E()], G = () => [ze, "screen", "full", "lh", "dvh", "lvh", "svh", "min", "max", "fit", ...E()], O = () => [e, I, T], ye = () => [...g(), fo, uo, {
|
|
4642
4642
|
position: [I, T]
|
|
4643
4643
|
}], xe = () => ["no-repeat", {
|
|
4644
4644
|
repeat: ["", "x", "y", "space", "round"]
|
|
@@ -4652,7 +4652,7 @@ const vu = (e, t) => {
|
|
|
4652
4652
|
d,
|
|
4653
4653
|
I,
|
|
4654
4654
|
T
|
|
4655
|
-
], re = () => ["", j, kt, Je], L = () => ["solid", "dashed", "dotted", "double"], ee = () => ["normal", "multiply", "screen", "overlay", "darken", "lighten", "color-dodge", "color-burn", "hard-light", "soft-light", "difference", "exclusion", "hue", "saturation", "color", "luminosity"], K = () => [j, Mn,
|
|
4655
|
+
], re = () => ["", j, kt, Je], L = () => ["solid", "dashed", "dotted", "double"], ee = () => ["normal", "multiply", "screen", "overlay", "darken", "lighten", "color-dodge", "color-burn", "hard-light", "soft-light", "difference", "exclusion", "hue", "saturation", "color", "luminosity"], K = () => [j, Mn, fo, uo], Q = () => [
|
|
4656
4656
|
// Deprecated since Tailwind CSS v4.0.0
|
|
4657
4657
|
"",
|
|
4658
4658
|
"none",
|
|
@@ -4712,14 +4712,14 @@ const vu = (e, t) => {
|
|
|
4712
4712
|
* @see https://tailwindcss.com/docs/break-after
|
|
4713
4713
|
*/
|
|
4714
4714
|
"break-after": [{
|
|
4715
|
-
"break-after":
|
|
4715
|
+
"break-after": x()
|
|
4716
4716
|
}],
|
|
4717
4717
|
/**
|
|
4718
4718
|
* Break Before
|
|
4719
4719
|
* @see https://tailwindcss.com/docs/break-before
|
|
4720
4720
|
*/
|
|
4721
4721
|
"break-before": [{
|
|
4722
|
-
"break-before":
|
|
4722
|
+
"break-before": x()
|
|
4723
4723
|
}],
|
|
4724
4724
|
/**
|
|
4725
4725
|
* Break Inside
|
|
@@ -5053,14 +5053,14 @@ const vu = (e, t) => {
|
|
|
5053
5053
|
* @see https://tailwindcss.com/docs/grid-auto-columns
|
|
5054
5054
|
*/
|
|
5055
5055
|
"auto-cols": [{
|
|
5056
|
-
"auto-cols":
|
|
5056
|
+
"auto-cols": N()
|
|
5057
5057
|
}],
|
|
5058
5058
|
/**
|
|
5059
5059
|
* Grid Auto Rows
|
|
5060
5060
|
* @see https://tailwindcss.com/docs/grid-auto-rows
|
|
5061
5061
|
*/
|
|
5062
5062
|
"auto-rows": [{
|
|
5063
|
-
"auto-rows":
|
|
5063
|
+
"auto-rows": N()
|
|
5064
5064
|
}],
|
|
5065
5065
|
/**
|
|
5066
5066
|
* Gap
|
|
@@ -5530,7 +5530,7 @@ const vu = (e, t) => {
|
|
|
5530
5530
|
* @see https://tailwindcss.com/docs/line-clamp
|
|
5531
5531
|
*/
|
|
5532
5532
|
"line-clamp": [{
|
|
5533
|
-
"line-clamp": [j, "none", I,
|
|
5533
|
+
"line-clamp": [j, "none", I, co]
|
|
5534
5534
|
}],
|
|
5535
5535
|
/**
|
|
5536
5536
|
* Line Height
|
|
@@ -6706,7 +6706,7 @@ const vu = (e, t) => {
|
|
|
6706
6706
|
* @see https://tailwindcss.com/docs/animation
|
|
6707
6707
|
*/
|
|
6708
6708
|
animate: [{
|
|
6709
|
-
animate: ["none",
|
|
6709
|
+
animate: ["none", y, I, T]
|
|
6710
6710
|
}],
|
|
6711
6711
|
// ------------------
|
|
6712
6712
|
// --- Transforms ---
|
|
@@ -7171,7 +7171,7 @@ const vu = (e, t) => {
|
|
|
7171
7171
|
* @see https://tailwindcss.com/docs/stroke-width
|
|
7172
7172
|
*/
|
|
7173
7173
|
"stroke-w": [{
|
|
7174
|
-
stroke: [j, kt, Je,
|
|
7174
|
+
stroke: [j, kt, Je, co]
|
|
7175
7175
|
}],
|
|
7176
7176
|
/**
|
|
7177
7177
|
* Stroke
|
|
@@ -7279,7 +7279,7 @@ const sf = Eo(
|
|
|
7279
7279
|
}
|
|
7280
7280
|
}
|
|
7281
7281
|
);
|
|
7282
|
-
function
|
|
7282
|
+
function Pr({
|
|
7283
7283
|
className: e,
|
|
7284
7284
|
variant: t = "default",
|
|
7285
7285
|
size: n = "default",
|
|
@@ -7303,7 +7303,7 @@ const cf = (e) => e.replace(
|
|
|
7303
7303
|
/^([A-Z])|[\s-_]+(\w)/g,
|
|
7304
7304
|
(t, n, r) => r ? r.toUpperCase() : n.toLowerCase()
|
|
7305
7305
|
);
|
|
7306
|
-
const
|
|
7306
|
+
const po = (e) => {
|
|
7307
7307
|
const t = cf(e);
|
|
7308
7308
|
return t.charAt(0).toUpperCase() + t.slice(1);
|
|
7309
7309
|
};
|
|
@@ -7334,7 +7334,7 @@ const ff = xo(
|
|
|
7334
7334
|
children: a,
|
|
7335
7335
|
iconNode: i,
|
|
7336
7336
|
...s
|
|
7337
|
-
}, l) =>
|
|
7337
|
+
}, l) => Vn(
|
|
7338
7338
|
"svg",
|
|
7339
7339
|
{
|
|
7340
7340
|
ref: l,
|
|
@@ -7348,25 +7348,25 @@ const ff = xo(
|
|
|
7348
7348
|
...s
|
|
7349
7349
|
},
|
|
7350
7350
|
[
|
|
7351
|
-
...i.map(([d, f]) =>
|
|
7351
|
+
...i.map(([d, f]) => Vn(d, f)),
|
|
7352
7352
|
...Array.isArray(a) ? a : [a]
|
|
7353
7353
|
]
|
|
7354
7354
|
)
|
|
7355
7355
|
);
|
|
7356
7356
|
const _t = (e, t) => {
|
|
7357
7357
|
const n = xo(
|
|
7358
|
-
({ className: r, ...o }, a) =>
|
|
7358
|
+
({ className: r, ...o }, a) => Vn(ff, {
|
|
7359
7359
|
ref: a,
|
|
7360
7360
|
iconNode: t,
|
|
7361
7361
|
className: Fi(
|
|
7362
|
-
`lucide-${lf(
|
|
7362
|
+
`lucide-${lf(po(e))}`,
|
|
7363
7363
|
`lucide-${e}`,
|
|
7364
7364
|
r
|
|
7365
7365
|
),
|
|
7366
7366
|
...o
|
|
7367
7367
|
})
|
|
7368
7368
|
);
|
|
7369
|
-
return n.displayName =
|
|
7369
|
+
return n.displayName = po(e), n;
|
|
7370
7370
|
};
|
|
7371
7371
|
const pf = [["path", { d: "M20 6 9 17l-5-5", key: "1gmf2c" }]], Bi = _t("check", pf);
|
|
7372
7372
|
const mf = [["path", { d: "m6 9 6 6 6-6", key: "qrunsl" }]], En = _t("chevron-down", mf);
|
|
@@ -7384,7 +7384,7 @@ function yf(e) {
|
|
|
7384
7384
|
let t = document.head || document.getElementsByTagName("head")[0], n = document.createElement("style");
|
|
7385
7385
|
n.type = "text/css", t.appendChild(n), n.styleSheet ? n.styleSheet.cssText = e : n.appendChild(document.createTextNode(e));
|
|
7386
7386
|
}
|
|
7387
|
-
const Hi =
|
|
7387
|
+
const Hi = A.createContext({
|
|
7388
7388
|
drawerRef: {
|
|
7389
7389
|
current: null
|
|
7390
7390
|
},
|
|
@@ -7432,7 +7432,7 @@ const Hi = N.createContext({
|
|
|
7432
7432
|
container: null,
|
|
7433
7433
|
autoFocus: !1
|
|
7434
7434
|
}), Mt = () => {
|
|
7435
|
-
const e =
|
|
7435
|
+
const e = A.useContext(Hi);
|
|
7436
7436
|
if (!e)
|
|
7437
7437
|
throw new Error("useDrawerContext must be used within a Drawer.Root");
|
|
7438
7438
|
return e;
|
|
@@ -7446,38 +7446,38 @@ function xf() {
|
|
|
7446
7446
|
/FxiOS/.test(e));
|
|
7447
7447
|
}
|
|
7448
7448
|
function Cf() {
|
|
7449
|
-
return
|
|
7449
|
+
return kr(/^Mac/);
|
|
7450
7450
|
}
|
|
7451
7451
|
function Sf() {
|
|
7452
|
-
return
|
|
7452
|
+
return kr(/^iPhone/);
|
|
7453
7453
|
}
|
|
7454
|
-
function
|
|
7454
|
+
function mo() {
|
|
7455
7455
|
return /^((?!chrome|android).)*safari/i.test(navigator.userAgent);
|
|
7456
7456
|
}
|
|
7457
7457
|
function Ef() {
|
|
7458
|
-
return
|
|
7458
|
+
return kr(/^iPad/) || // iPadOS 13 lies and says it's a Mac, but we can distinguish by detecting touch support.
|
|
7459
7459
|
Cf() && navigator.maxTouchPoints > 1;
|
|
7460
7460
|
}
|
|
7461
7461
|
function Vi() {
|
|
7462
7462
|
return Sf() || Ef();
|
|
7463
7463
|
}
|
|
7464
|
-
function
|
|
7464
|
+
function kr(e) {
|
|
7465
7465
|
return typeof window < "u" && window.navigator != null ? e.test(window.navigator.platform) : void 0;
|
|
7466
7466
|
}
|
|
7467
7467
|
const Rf = 24, Pf = typeof window < "u" ? yo : bs;
|
|
7468
|
-
function
|
|
7468
|
+
function ho(...e) {
|
|
7469
7469
|
return (...t) => {
|
|
7470
7470
|
for (let n of e)
|
|
7471
7471
|
typeof n == "function" && n(...t);
|
|
7472
7472
|
};
|
|
7473
7473
|
}
|
|
7474
7474
|
const Ln = typeof document < "u" && window.visualViewport;
|
|
7475
|
-
function
|
|
7475
|
+
function go(e) {
|
|
7476
7476
|
let t = window.getComputedStyle(e);
|
|
7477
7477
|
return /(auto|scroll)/.test(t.overflow + t.overflowX + t.overflowY);
|
|
7478
7478
|
}
|
|
7479
7479
|
function Ui(e) {
|
|
7480
|
-
for (
|
|
7480
|
+
for (go(e) && (e = e.parentElement); e && !go(e); )
|
|
7481
7481
|
e = e.parentElement;
|
|
7482
7482
|
return e || document.scrollingElement || document.documentElement;
|
|
7483
7483
|
}
|
|
@@ -7493,18 +7493,18 @@ const kf = /* @__PURE__ */ new Set([
|
|
|
7493
7493
|
"reset"
|
|
7494
7494
|
]);
|
|
7495
7495
|
let Gt = 0, $n;
|
|
7496
|
-
function
|
|
7496
|
+
function Nf(e = {}) {
|
|
7497
7497
|
let { isDisabled: t } = e;
|
|
7498
7498
|
Pf(() => {
|
|
7499
7499
|
if (!t)
|
|
7500
|
-
return Gt++, Gt === 1 && Vi() && ($n =
|
|
7500
|
+
return Gt++, Gt === 1 && Vi() && ($n = Af()), () => {
|
|
7501
7501
|
Gt--, Gt === 0 && $n?.();
|
|
7502
7502
|
};
|
|
7503
7503
|
}, [
|
|
7504
7504
|
t
|
|
7505
7505
|
]);
|
|
7506
7506
|
}
|
|
7507
|
-
function
|
|
7507
|
+
function Af() {
|
|
7508
7508
|
let e, t = 0, n = (u) => {
|
|
7509
7509
|
e = Ui(u.target), !(e === document.documentElement && e === document.body) && (t = u.changedTouches[0].pageY);
|
|
7510
7510
|
}, r = (u) => {
|
|
@@ -7516,32 +7516,32 @@ function Nf() {
|
|
|
7516
7516
|
C !== 0 && ((w <= 0 && h > t || w >= C && h < t) && u.preventDefault(), t = h);
|
|
7517
7517
|
}, o = (u) => {
|
|
7518
7518
|
let h = u.target;
|
|
7519
|
-
|
|
7519
|
+
tr(h) && h !== document.activeElement && (u.preventDefault(), h.style.transform = "translateY(-2000px)", h.focus(), requestAnimationFrame(() => {
|
|
7520
7520
|
h.style.transform = "";
|
|
7521
7521
|
}));
|
|
7522
7522
|
}, a = (u) => {
|
|
7523
7523
|
let h = u.target;
|
|
7524
|
-
|
|
7524
|
+
tr(h) && (h.style.transform = "translateY(-2000px)", requestAnimationFrame(() => {
|
|
7525
7525
|
h.style.transform = "", Ln && (Ln.height < window.innerHeight ? requestAnimationFrame(() => {
|
|
7526
|
-
|
|
7527
|
-
}) : Ln.addEventListener("resize", () =>
|
|
7526
|
+
vo(h);
|
|
7527
|
+
}) : Ln.addEventListener("resize", () => vo(h), {
|
|
7528
7528
|
once: !0
|
|
7529
7529
|
}));
|
|
7530
7530
|
}));
|
|
7531
7531
|
}, i = () => {
|
|
7532
7532
|
window.scrollTo(0, 0);
|
|
7533
|
-
}, s = window.pageXOffset, l = window.pageYOffset, d =
|
|
7533
|
+
}, s = window.pageXOffset, l = window.pageYOffset, d = ho(Of(document.documentElement, "paddingRight", `${window.innerWidth - document.documentElement.clientWidth}px`));
|
|
7534
7534
|
window.scrollTo(0, 0);
|
|
7535
|
-
let f =
|
|
7535
|
+
let f = ho(Nt(document, "touchstart", n, {
|
|
7536
7536
|
passive: !1,
|
|
7537
7537
|
capture: !0
|
|
7538
|
-
}),
|
|
7538
|
+
}), Nt(document, "touchmove", r, {
|
|
7539
7539
|
passive: !1,
|
|
7540
7540
|
capture: !0
|
|
7541
|
-
}),
|
|
7541
|
+
}), Nt(document, "touchend", o, {
|
|
7542
7542
|
passive: !1,
|
|
7543
7543
|
capture: !0
|
|
7544
|
-
}),
|
|
7544
|
+
}), Nt(document, "focus", a, !0), Nt(window, "scroll", i));
|
|
7545
7545
|
return () => {
|
|
7546
7546
|
d(), f(), window.scrollTo(s, l);
|
|
7547
7547
|
};
|
|
@@ -7552,12 +7552,12 @@ function Of(e, t, n) {
|
|
|
7552
7552
|
e.style[t] = r;
|
|
7553
7553
|
};
|
|
7554
7554
|
}
|
|
7555
|
-
function
|
|
7555
|
+
function Nt(e, t, n, r) {
|
|
7556
7556
|
return e.addEventListener(t, n, r), () => {
|
|
7557
7557
|
e.removeEventListener(t, n, r);
|
|
7558
7558
|
};
|
|
7559
7559
|
}
|
|
7560
|
-
function
|
|
7560
|
+
function vo(e) {
|
|
7561
7561
|
let t = document.scrollingElement || document.documentElement;
|
|
7562
7562
|
for (; e && e !== t; ) {
|
|
7563
7563
|
let n = Ui(e);
|
|
@@ -7569,7 +7569,7 @@ function bo(e) {
|
|
|
7569
7569
|
e = n.parentElement;
|
|
7570
7570
|
}
|
|
7571
7571
|
}
|
|
7572
|
-
function
|
|
7572
|
+
function tr(e) {
|
|
7573
7573
|
return e instanceof HTMLInputElement && !kf.has(e.type) || e instanceof HTMLTextAreaElement || e instanceof HTMLElement && e.isContentEditable;
|
|
7574
7574
|
}
|
|
7575
7575
|
function Tf(e, t) {
|
|
@@ -7645,16 +7645,16 @@ const se = {
|
|
|
7645
7645
|
0,
|
|
7646
7646
|
1
|
|
7647
7647
|
]
|
|
7648
|
-
}, Ki = 0.4, Lf = 0.25, $f = 100, Yi = 8, et = 16,
|
|
7648
|
+
}, Ki = 0.4, Lf = 0.25, $f = 100, Yi = 8, et = 16, nr = 26, Fn = "vaul-dragging";
|
|
7649
7649
|
function Xi(e) {
|
|
7650
|
-
const t =
|
|
7651
|
-
return
|
|
7650
|
+
const t = A.useRef(e);
|
|
7651
|
+
return A.useEffect(() => {
|
|
7652
7652
|
t.current = e;
|
|
7653
|
-
}),
|
|
7653
|
+
}), A.useMemo(() => (...n) => t.current == null ? void 0 : t.current.call(t, ...n), []);
|
|
7654
7654
|
}
|
|
7655
7655
|
function zf({ defaultProp: e, onChange: t }) {
|
|
7656
|
-
const n =
|
|
7657
|
-
return
|
|
7656
|
+
const n = A.useState(e), [r] = n, o = A.useRef(r), a = Xi(t);
|
|
7657
|
+
return A.useEffect(() => {
|
|
7658
7658
|
o.current !== r && (a(r), o.current = r);
|
|
7659
7659
|
}, [
|
|
7660
7660
|
r,
|
|
@@ -7667,7 +7667,7 @@ function qi({ prop: e, defaultProp: t, onChange: n = () => {
|
|
|
7667
7667
|
const [r, o] = zf({
|
|
7668
7668
|
defaultProp: t,
|
|
7669
7669
|
onChange: n
|
|
7670
|
-
}), a = e !== void 0, i = a ? e : r, s = Xi(n), l =
|
|
7670
|
+
}), a = e !== void 0, i = a ? e : r, s = Xi(n), l = A.useCallback((d) => {
|
|
7671
7671
|
if (a) {
|
|
7672
7672
|
const u = typeof d == "function" ? d(e) : d;
|
|
7673
7673
|
u !== e && s(u);
|
|
@@ -7689,11 +7689,11 @@ function Ff({ activeSnapPointProp: e, setActiveSnapPointProp: t, snapPoints: n,
|
|
|
7689
7689
|
prop: e,
|
|
7690
7690
|
defaultProp: n?.[0],
|
|
7691
7691
|
onChange: t
|
|
7692
|
-
}), [h, w] =
|
|
7692
|
+
}), [h, w] = A.useState(typeof window < "u" ? {
|
|
7693
7693
|
innerWidth: window.innerWidth,
|
|
7694
7694
|
innerHeight: window.innerHeight
|
|
7695
7695
|
} : void 0);
|
|
7696
|
-
|
|
7696
|
+
A.useEffect(() => {
|
|
7697
7697
|
function S() {
|
|
7698
7698
|
w({
|
|
7699
7699
|
innerWidth: window.innerWidth,
|
|
@@ -7702,16 +7702,16 @@ function Ff({ activeSnapPointProp: e, setActiveSnapPointProp: t, snapPoints: n,
|
|
|
7702
7702
|
}
|
|
7703
7703
|
return window.addEventListener("resize", S), () => window.removeEventListener("resize", S);
|
|
7704
7704
|
}, []);
|
|
7705
|
-
const C =
|
|
7705
|
+
const C = A.useMemo(() => f === n?.[n.length - 1] || null, [
|
|
7706
7706
|
n,
|
|
7707
7707
|
f
|
|
7708
|
-
]), p =
|
|
7708
|
+
]), p = A.useMemo(() => {
|
|
7709
7709
|
var S;
|
|
7710
7710
|
return (S = n?.findIndex((E) => E === f)) != null ? S : null;
|
|
7711
7711
|
}, [
|
|
7712
7712
|
n,
|
|
7713
7713
|
f
|
|
7714
|
-
]), b = n && n.length > 0 && (a || a === 0) && !Number.isNaN(a) && n[a] === f || !n, v =
|
|
7714
|
+
]), b = n && n.length > 0 && (a || a === 0) && !Number.isNaN(a) && n[a] === f || !n, v = A.useMemo(() => {
|
|
7715
7715
|
const S = l ? {
|
|
7716
7716
|
width: l.getBoundingClientRect().width,
|
|
7717
7717
|
height: l.getBoundingClientRect().height
|
|
@@ -7727,8 +7727,8 @@ function Ff({ activeSnapPointProp: e, setActiveSnapPointProp: t, snapPoints: n,
|
|
|
7727
7727
|
const D = typeof P == "string";
|
|
7728
7728
|
let z = 0;
|
|
7729
7729
|
if (D && (z = parseInt(P, 10)), ce(s)) {
|
|
7730
|
-
const
|
|
7731
|
-
return h ? s === "bottom" ? S.height -
|
|
7730
|
+
const N = D ? z : h ? P * S.height : 0;
|
|
7731
|
+
return h ? s === "bottom" ? S.height - N : -S.height + N : N;
|
|
7732
7732
|
}
|
|
7733
7733
|
const H = D ? z : h ? P * S.width : 0;
|
|
7734
7734
|
return h ? s === "right" ? S.width - H : -S.width + H : H;
|
|
@@ -7737,10 +7737,10 @@ function Ff({ activeSnapPointProp: e, setActiveSnapPointProp: t, snapPoints: n,
|
|
|
7737
7737
|
n,
|
|
7738
7738
|
h,
|
|
7739
7739
|
l
|
|
7740
|
-
]),
|
|
7740
|
+
]), y = A.useMemo(() => p !== null ? v?.[p] : null, [
|
|
7741
7741
|
v,
|
|
7742
7742
|
p
|
|
7743
|
-
]),
|
|
7743
|
+
]), x = A.useCallback((S) => {
|
|
7744
7744
|
var E;
|
|
7745
7745
|
const P = (E = v?.findIndex((D) => D === S)) != null ? E : null;
|
|
7746
7746
|
i(P), fe(r.current, {
|
|
@@ -7761,48 +7761,48 @@ function Ff({ activeSnapPointProp: e, setActiveSnapPointProp: t, snapPoints: n,
|
|
|
7761
7761
|
o,
|
|
7762
7762
|
u
|
|
7763
7763
|
]);
|
|
7764
|
-
|
|
7764
|
+
A.useEffect(() => {
|
|
7765
7765
|
if (f || e) {
|
|
7766
7766
|
var S;
|
|
7767
7767
|
const E = (S = n?.findIndex((P) => P === e || P === f)) != null ? S : -1;
|
|
7768
|
-
v && E !== -1 && typeof v[E] == "number" &&
|
|
7768
|
+
v && E !== -1 && typeof v[E] == "number" && x(v[E]);
|
|
7769
7769
|
}
|
|
7770
7770
|
}, [
|
|
7771
7771
|
f,
|
|
7772
7772
|
e,
|
|
7773
7773
|
n,
|
|
7774
7774
|
v,
|
|
7775
|
-
|
|
7775
|
+
x
|
|
7776
7776
|
]);
|
|
7777
7777
|
function g({ draggedDistance: S, closeDrawer: E, velocity: P, dismissible: D }) {
|
|
7778
7778
|
if (a === void 0) return;
|
|
7779
|
-
const z = s === "bottom" || s === "right" ? (
|
|
7779
|
+
const z = s === "bottom" || s === "right" ? (y ?? 0) - S : (y ?? 0) + S, H = p === a - 1, N = p === 0, W = S > 0;
|
|
7780
7780
|
if (H && fe(o.current, {
|
|
7781
7781
|
transition: `opacity ${se.DURATION}s cubic-bezier(${se.EASE.join(",")})`
|
|
7782
7782
|
}), !d && P > 2 && !W) {
|
|
7783
|
-
D ? E() :
|
|
7783
|
+
D ? E() : x(v[0]);
|
|
7784
7784
|
return;
|
|
7785
7785
|
}
|
|
7786
7786
|
if (!d && P > 2 && W && v && n) {
|
|
7787
|
-
|
|
7787
|
+
x(v[n.length - 1]);
|
|
7788
7788
|
return;
|
|
7789
7789
|
}
|
|
7790
7790
|
const U = v?.reduce(($, M) => typeof $ != "number" || typeof M != "number" ? $ : Math.abs(M - z) < Math.abs($ - z) ? M : $), _ = ce(s) ? window.innerHeight : window.innerWidth;
|
|
7791
7791
|
if (P > Ki && Math.abs(S) < _ * 0.4) {
|
|
7792
7792
|
const $ = W ? 1 : -1;
|
|
7793
7793
|
if ($ > 0 && C && n) {
|
|
7794
|
-
|
|
7794
|
+
x(v[n.length - 1]);
|
|
7795
7795
|
return;
|
|
7796
7796
|
}
|
|
7797
|
-
if (
|
|
7798
|
-
|
|
7797
|
+
if (N && $ < 0 && D && E(), p === null) return;
|
|
7798
|
+
x(v[p + $]);
|
|
7799
7799
|
return;
|
|
7800
7800
|
}
|
|
7801
|
-
|
|
7801
|
+
x(U);
|
|
7802
7802
|
}
|
|
7803
7803
|
function R({ draggedDistance: S }) {
|
|
7804
|
-
if (
|
|
7805
|
-
const E = s === "bottom" || s === "right" ?
|
|
7804
|
+
if (y === null) return;
|
|
7805
|
+
const E = s === "bottom" || s === "right" ? y - S : y + S;
|
|
7806
7806
|
(s === "bottom" || s === "right") && E < v[v.length - 1] || (s === "top" || s === "left") && E > v[v.length - 1] || fe(r.current, {
|
|
7807
7807
|
transform: ce(s) ? `translate3d(0, ${E}px, 0)` : `translate3d(${E}px, 0, 0)`
|
|
7808
7808
|
});
|
|
@@ -7814,8 +7814,8 @@ function Ff({ activeSnapPointProp: e, setActiveSnapPointProp: t, snapPoints: n,
|
|
|
7814
7814
|
return 0;
|
|
7815
7815
|
if (P && !E) return 1;
|
|
7816
7816
|
if (!b && !P) return null;
|
|
7817
|
-
const z = P ? p + 1 : p - 1, H = P ? v[z] - v[z - 1] : v[z + 1] - v[z],
|
|
7818
|
-
return P ? 1 -
|
|
7817
|
+
const z = P ? p + 1 : p - 1, H = P ? v[z] - v[z - 1] : v[z + 1] - v[z], N = S / Math.abs(H);
|
|
7818
|
+
return P ? 1 - N : N;
|
|
7819
7819
|
}
|
|
7820
7820
|
return {
|
|
7821
7821
|
isLastSnapPoint: C,
|
|
@@ -7832,11 +7832,11 @@ function Ff({ activeSnapPointProp: e, setActiveSnapPointProp: t, snapPoints: n,
|
|
|
7832
7832
|
const Bf = () => () => {
|
|
7833
7833
|
};
|
|
7834
7834
|
function Wf() {
|
|
7835
|
-
const { direction: e, isOpen: t, shouldScaleBackground: n, setBackgroundColorOnScale: r, noBodyStyles: o } = Mt(), a =
|
|
7835
|
+
const { direction: e, isOpen: t, shouldScaleBackground: n, setBackgroundColorOnScale: r, noBodyStyles: o } = Mt(), a = A.useRef(null), i = vs(() => document.body.style.backgroundColor, []);
|
|
7836
7836
|
function s() {
|
|
7837
|
-
return (window.innerWidth -
|
|
7837
|
+
return (window.innerWidth - nr) / window.innerWidth;
|
|
7838
7838
|
}
|
|
7839
|
-
|
|
7839
|
+
A.useEffect(() => {
|
|
7840
7840
|
if (t && n) {
|
|
7841
7841
|
a.current && clearTimeout(a.current);
|
|
7842
7842
|
const l = document.querySelector("[data-vaul-drawer-wrapper]") || document.querySelector("[vaul-drawer-wrapper]");
|
|
@@ -7870,11 +7870,11 @@ function Wf() {
|
|
|
7870
7870
|
i
|
|
7871
7871
|
]);
|
|
7872
7872
|
}
|
|
7873
|
-
let
|
|
7873
|
+
let At = null;
|
|
7874
7874
|
function Hf({ isOpen: e, modal: t, nested: n, hasBeenOpened: r, preventScrollRestoration: o, noBodyStyles: a }) {
|
|
7875
|
-
const [i, s] =
|
|
7876
|
-
if (
|
|
7877
|
-
|
|
7875
|
+
const [i, s] = A.useState(() => typeof window < "u" ? window.location.href : ""), l = A.useRef(0), d = A.useCallback(() => {
|
|
7876
|
+
if (mo() && At === null && e && !a) {
|
|
7877
|
+
At = {
|
|
7878
7878
|
position: document.body.style.position,
|
|
7879
7879
|
top: document.body.style.top,
|
|
7880
7880
|
left: document.body.style.left,
|
|
@@ -7894,28 +7894,28 @@ function Hf({ isOpen: e, modal: t, nested: n, hasBeenOpened: r, preventScrollRes
|
|
|
7894
7894
|
}
|
|
7895
7895
|
}, [
|
|
7896
7896
|
e
|
|
7897
|
-
]), f =
|
|
7898
|
-
if (
|
|
7897
|
+
]), f = A.useCallback(() => {
|
|
7898
|
+
if (mo() && At !== null && !a) {
|
|
7899
7899
|
const u = -parseInt(document.body.style.top, 10), h = -parseInt(document.body.style.left, 10);
|
|
7900
|
-
Object.assign(document.body.style,
|
|
7900
|
+
Object.assign(document.body.style, At), window.requestAnimationFrame(() => {
|
|
7901
7901
|
if (o && i !== window.location.href) {
|
|
7902
7902
|
s(window.location.href);
|
|
7903
7903
|
return;
|
|
7904
7904
|
}
|
|
7905
7905
|
window.scrollTo(h, u);
|
|
7906
|
-
}),
|
|
7906
|
+
}), At = null;
|
|
7907
7907
|
}
|
|
7908
7908
|
}, [
|
|
7909
7909
|
i
|
|
7910
7910
|
]);
|
|
7911
|
-
return
|
|
7911
|
+
return A.useEffect(() => {
|
|
7912
7912
|
function u() {
|
|
7913
7913
|
l.current = window.scrollY;
|
|
7914
7914
|
}
|
|
7915
7915
|
return u(), window.addEventListener("scroll", u), () => {
|
|
7916
7916
|
window.removeEventListener("scroll", u);
|
|
7917
7917
|
};
|
|
7918
|
-
}, []),
|
|
7918
|
+
}, []), A.useEffect(() => {
|
|
7919
7919
|
if (t)
|
|
7920
7920
|
return () => {
|
|
7921
7921
|
typeof document > "u" || document.querySelector("[data-vaul-drawer]") || f();
|
|
@@ -7923,7 +7923,7 @@ function Hf({ isOpen: e, modal: t, nested: n, hasBeenOpened: r, preventScrollRes
|
|
|
7923
7923
|
}, [
|
|
7924
7924
|
t,
|
|
7925
7925
|
f
|
|
7926
|
-
]),
|
|
7926
|
+
]), A.useEffect(() => {
|
|
7927
7927
|
n || !r || (e ? (!window.matchMedia("(display-mode: standalone)").matches && d(), t || window.setTimeout(() => {
|
|
7928
7928
|
f();
|
|
7929
7929
|
}, 500)) : f());
|
|
@@ -7939,21 +7939,21 @@ function Hf({ isOpen: e, modal: t, nested: n, hasBeenOpened: r, preventScrollRes
|
|
|
7939
7939
|
restorePositionSetting: f
|
|
7940
7940
|
};
|
|
7941
7941
|
}
|
|
7942
|
-
function Vf({ open: e, onOpenChange: t, children: n, onDrag: r, onRelease: o, snapPoints: a, shouldScaleBackground: i = !1, setBackgroundColorOnScale: s = !0, closeThreshold: l = Lf, scrollLockTimeout: d = $f, dismissible: f = !0, handleOnly: u = !1, fadeFromIndex: h = a && a.length - 1, activeSnapPoint: w, setActiveSnapPoint: C, fixed: p, modal: b = !0, onClose: v, nested:
|
|
7943
|
-
var
|
|
7942
|
+
function Vf({ open: e, onOpenChange: t, children: n, onDrag: r, onRelease: o, snapPoints: a, shouldScaleBackground: i = !1, setBackgroundColorOnScale: s = !0, closeThreshold: l = Lf, scrollLockTimeout: d = $f, dismissible: f = !0, handleOnly: u = !1, fadeFromIndex: h = a && a.length - 1, activeSnapPoint: w, setActiveSnapPoint: C, fixed: p, modal: b = !0, onClose: v, nested: y, noBodyStyles: x = !1, direction: g = "bottom", defaultOpen: R = !1, disablePreventScroll: k = !0, snapToSequentialPoint: S = !1, preventScrollRestoration: E = !1, repositionInputs: P = !0, onAnimationEnd: D, container: z, autoFocus: H = !1 }) {
|
|
7943
|
+
var N, W;
|
|
7944
7944
|
const [U = !1, _] = qi({
|
|
7945
7945
|
defaultProp: R,
|
|
7946
7946
|
prop: e,
|
|
7947
7947
|
onChange: (V) => {
|
|
7948
|
-
t?.(V), !V && !
|
|
7948
|
+
t?.(V), !V && !y && ls(), setTimeout(() => {
|
|
7949
7949
|
D?.(V);
|
|
7950
7950
|
}, se.DURATION * 1e3), V && !b && typeof window < "u" && window.requestAnimationFrame(() => {
|
|
7951
7951
|
document.body.style.pointerEvents = "auto";
|
|
7952
7952
|
}), V || (document.body.style.pointerEvents = "auto");
|
|
7953
7953
|
}
|
|
7954
|
-
}), [$, M] =
|
|
7954
|
+
}), [$, M] = A.useState(!1), [G, O] = A.useState(!1), [ye, xe] = A.useState(!1), he = A.useRef(null), pe = A.useRef(null), oe = A.useRef(null), re = A.useRef(null), L = A.useRef(null), ee = A.useRef(!1), K = A.useRef(null), Q = A.useRef(0), X = A.useRef(!1), ne = A.useRef(!R), de = A.useRef(0), F = A.useRef(null), ct = A.useRef(((N = F.current) == null ? void 0 : N.getBoundingClientRect().height) || 0), dt = A.useRef(((W = F.current) == null ? void 0 : W.getBoundingClientRect().width) || 0), qe = A.useRef(0), rs = A.useCallback((V) => {
|
|
7955
7955
|
a && V === Rt.length - 1 && (pe.current = /* @__PURE__ */ new Date());
|
|
7956
|
-
}, []), { activeSnapPoint: os, activeSnapPointIndex: ut, setActiveSnapPoint: Nr, onRelease: as, snapPointsOffset: Rt, onDrag: is, shouldFade:
|
|
7956
|
+
}, []), { activeSnapPoint: os, activeSnapPointIndex: ut, setActiveSnapPoint: Nr, onRelease: as, snapPointsOffset: Rt, onDrag: is, shouldFade: Ar, getPercentageDragged: ss } = Ff({
|
|
7957
7957
|
snapPoints: a,
|
|
7958
7958
|
activeSnapPointProp: w,
|
|
7959
7959
|
setActiveSnapPointProp: C,
|
|
@@ -7965,19 +7965,19 @@ function Vf({ open: e, onOpenChange: t, children: n, onDrag: r, onRelease: o, sn
|
|
|
7965
7965
|
container: z,
|
|
7966
7966
|
snapToSequentialPoint: S
|
|
7967
7967
|
});
|
|
7968
|
-
|
|
7968
|
+
Nf({
|
|
7969
7969
|
isDisabled: !U || G || !b || ye || !$ || !P || !k
|
|
7970
7970
|
});
|
|
7971
7971
|
const { restorePositionSetting: ls } = Hf({
|
|
7972
7972
|
isOpen: U,
|
|
7973
7973
|
modal: b,
|
|
7974
|
-
nested:
|
|
7974
|
+
nested: y ?? !1,
|
|
7975
7975
|
hasBeenOpened: $,
|
|
7976
7976
|
preventScrollRestoration: E,
|
|
7977
|
-
noBodyStyles:
|
|
7977
|
+
noBodyStyles: x
|
|
7978
7978
|
});
|
|
7979
7979
|
function Lt() {
|
|
7980
|
-
return (window.innerWidth -
|
|
7980
|
+
return (window.innerWidth - nr) / window.innerWidth;
|
|
7981
7981
|
}
|
|
7982
7982
|
function cs(V) {
|
|
7983
7983
|
var te, ae;
|
|
@@ -7985,7 +7985,7 @@ function Vf({ open: e, onOpenChange: t, children: n, onDrag: r, onRelease: o, sn
|
|
|
7985
7985
|
once: !0
|
|
7986
7986
|
}), V.target.setPointerCapture(V.pointerId), Q.current = ce(g) ? V.pageY : V.pageX);
|
|
7987
7987
|
}
|
|
7988
|
-
function
|
|
7988
|
+
function Or(V, te) {
|
|
7989
7989
|
var ae;
|
|
7990
7990
|
let J = V;
|
|
7991
7991
|
const le = (ae = window.getSelection()) == null ? void 0 : ae.toString(), ve = F.current ? Kt(F.current, g) : null, ge = /* @__PURE__ */ new Date();
|
|
@@ -8019,7 +8019,7 @@ function Vf({ open: e, onOpenChange: t, children: n, onDrag: r, onRelease: o, sn
|
|
|
8019
8019
|
const ve = Math.abs(ae), ge = document.querySelector("[data-vaul-drawer-wrapper]"), Le = g === "bottom" || g === "top" ? ct.current : dt.current;
|
|
8020
8020
|
let Ce = ve / Le;
|
|
8021
8021
|
const Ze = ss(ve, J);
|
|
8022
|
-
if (Ze !== null && (Ce = Ze), le && Ce >= 1 || !ee.current && !
|
|
8022
|
+
if (Ze !== null && (Ce = Ze), le && Ce >= 1 || !ee.current && !Or(V.target, J)) return;
|
|
8023
8023
|
if (F.current.classList.add(Fn), ee.current = !0, fe(F.current, {
|
|
8024
8024
|
transition: "none"
|
|
8025
8025
|
}), fe(he.current, {
|
|
@@ -8034,14 +8034,14 @@ function Vf({ open: e, onOpenChange: t, children: n, onDrag: r, onRelease: o, sn
|
|
|
8034
8034
|
return;
|
|
8035
8035
|
}
|
|
8036
8036
|
const $e = 1 - Ce;
|
|
8037
|
-
if ((
|
|
8037
|
+
if ((Ar || h && ut === h - 1) && (r?.(V, Ce), fe(he.current, {
|
|
8038
8038
|
opacity: `${$e}`,
|
|
8039
8039
|
transition: "none"
|
|
8040
8040
|
}, !0)), ge && he.current && i) {
|
|
8041
|
-
const ke = Math.min(Lt() + Ce * (1 - Lt()), 1), $t = 8 - Ce * 8,
|
|
8041
|
+
const ke = Math.min(Lt() + Ce * (1 - Lt()), 1), $t = 8 - Ce * 8, Ir = Math.max(0, 14 - Ce * 14);
|
|
8042
8042
|
fe(ge, {
|
|
8043
8043
|
borderRadius: `${$t}px`,
|
|
8044
|
-
transform: ce(g) ? `scale(${ke}) translate3d(0, ${
|
|
8044
|
+
transform: ce(g) ? `scale(${ke}) translate3d(0, ${Ir}px, 0)` : `scale(${ke}) translate3d(${Ir}px, 0, 0)`,
|
|
8045
8045
|
transition: "none"
|
|
8046
8046
|
}, !0);
|
|
8047
8047
|
}
|
|
@@ -8053,16 +8053,16 @@ function Vf({ open: e, onOpenChange: t, children: n, onDrag: r, onRelease: o, sn
|
|
|
8053
8053
|
}
|
|
8054
8054
|
}
|
|
8055
8055
|
}
|
|
8056
|
-
|
|
8056
|
+
A.useEffect(() => {
|
|
8057
8057
|
window.requestAnimationFrame(() => {
|
|
8058
8058
|
ne.current = !0;
|
|
8059
8059
|
});
|
|
8060
|
-
}, []),
|
|
8060
|
+
}, []), A.useEffect(() => {
|
|
8061
8061
|
var V;
|
|
8062
8062
|
function te() {
|
|
8063
8063
|
if (!F.current || !P) return;
|
|
8064
8064
|
const ae = document.activeElement;
|
|
8065
|
-
if (
|
|
8065
|
+
if (tr(ae) || X.current) {
|
|
8066
8066
|
var J;
|
|
8067
8067
|
const le = ((J = window.visualViewport) == null ? void 0 : J.height) || 0, ve = window.innerHeight;
|
|
8068
8068
|
let ge = ve - le;
|
|
@@ -8076,7 +8076,7 @@ function Vf({ open: e, onOpenChange: t, children: n, onDrag: r, onRelease: o, sn
|
|
|
8076
8076
|
if (de.current = ge, Le > le || X.current) {
|
|
8077
8077
|
const $e = F.current.getBoundingClientRect().height;
|
|
8078
8078
|
let ke = $e;
|
|
8079
|
-
$e > le && (ke = le - (Ce ? Ze :
|
|
8079
|
+
$e > le && (ke = le - (Ce ? Ze : nr)), p ? F.current.style.height = `${$e - Math.max(ge, 0)}px` : F.current.style.height = `${Math.max(ke, le - Ze)}px`;
|
|
8080
8080
|
} else xf() || (F.current.style.height = `${qe.current}px`);
|
|
8081
8081
|
a && a.length > 0 && !X.current ? F.current.style.bottom = "0px" : F.current.style.bottom = `${Math.max(ge, 0)}px`;
|
|
8082
8082
|
}
|
|
@@ -8095,7 +8095,7 @@ function Vf({ open: e, onOpenChange: t, children: n, onDrag: r, onRelease: o, sn
|
|
|
8095
8095
|
a && Nr(a[0]);
|
|
8096
8096
|
}, se.DURATION * 1e3);
|
|
8097
8097
|
}
|
|
8098
|
-
function
|
|
8098
|
+
function Tr() {
|
|
8099
8099
|
if (!F.current) return;
|
|
8100
8100
|
const V = document.querySelector("[data-vaul-drawer-wrapper]"), te = Kt(F.current, g);
|
|
8101
8101
|
fe(F.current, {
|
|
@@ -8126,7 +8126,7 @@ function Vf({ open: e, onOpenChange: t, children: n, onDrag: r, onRelease: o, sn
|
|
|
8126
8126
|
if (!G || !F.current) return;
|
|
8127
8127
|
F.current.classList.remove(Fn), ee.current = !1, O(!1), re.current = /* @__PURE__ */ new Date();
|
|
8128
8128
|
const te = Kt(F.current, g);
|
|
8129
|
-
if (!V || !
|
|
8129
|
+
if (!V || !Or(V.target, !1) || !te || Number.isNaN(te) || oe.current === null) return;
|
|
8130
8130
|
const ae = re.current.getTime() - oe.current.getTime(), J = Q.current - (ce(g) ? V.pageY : V.pageX), le = Math.abs(J) / ae;
|
|
8131
8131
|
if (le > 0.05 && (xe(!0), setTimeout(() => {
|
|
8132
8132
|
xe(!1);
|
|
@@ -8140,7 +8140,7 @@ function Vf({ open: e, onOpenChange: t, children: n, onDrag: r, onRelease: o, sn
|
|
|
8140
8140
|
return;
|
|
8141
8141
|
}
|
|
8142
8142
|
if (g === "bottom" || g === "right" ? J > 0 : J < 0) {
|
|
8143
|
-
|
|
8143
|
+
Tr(), o?.(V, !0);
|
|
8144
8144
|
return;
|
|
8145
8145
|
}
|
|
8146
8146
|
if (le > Ki) {
|
|
@@ -8155,9 +8155,9 @@ function Vf({ open: e, onOpenChange: t, children: n, onDrag: r, onRelease: o, sn
|
|
|
8155
8155
|
Pt(), o?.(V, !1);
|
|
8156
8156
|
return;
|
|
8157
8157
|
}
|
|
8158
|
-
o?.(V, !0),
|
|
8158
|
+
o?.(V, !0), Tr();
|
|
8159
8159
|
}
|
|
8160
|
-
|
|
8160
|
+
A.useEffect(() => (U && (fe(document.documentElement, {
|
|
8161
8161
|
scrollBehavior: "auto"
|
|
8162
8162
|
}), pe.current = /* @__PURE__ */ new Date()), () => {
|
|
8163
8163
|
Df(document.documentElement, "scrollBehavior");
|
|
@@ -8192,19 +8192,19 @@ function Vf({ open: e, onOpenChange: t, children: n, onDrag: r, onRelease: o, sn
|
|
|
8192
8192
|
transform: ce(g) ? `scale(${J}) translate3d(0, ${le}px, 0)` : `scale(${J}) translate3d(${le}px, 0, 0)`
|
|
8193
8193
|
});
|
|
8194
8194
|
}
|
|
8195
|
-
return
|
|
8195
|
+
return A.useEffect(() => {
|
|
8196
8196
|
b || window.requestAnimationFrame(() => {
|
|
8197
8197
|
document.body.style.pointerEvents = "auto";
|
|
8198
8198
|
});
|
|
8199
8199
|
}, [
|
|
8200
8200
|
b
|
|
8201
|
-
]), /* @__PURE__ */
|
|
8201
|
+
]), /* @__PURE__ */ A.createElement(ra, {
|
|
8202
8202
|
defaultOpen: R,
|
|
8203
8203
|
onOpenChange: (V) => {
|
|
8204
8204
|
!f && !V || (V ? M(!0) : Pt(!0), _(V));
|
|
8205
8205
|
},
|
|
8206
8206
|
open: U
|
|
8207
|
-
}, /* @__PURE__ */
|
|
8207
|
+
}, /* @__PURE__ */ A.createElement(Hi.Provider, {
|
|
8208
8208
|
value: {
|
|
8209
8209
|
activeSnapPoint: os,
|
|
8210
8210
|
snapPoints: a,
|
|
@@ -8220,7 +8220,7 @@ function Vf({ open: e, onOpenChange: t, children: n, onDrag: r, onRelease: o, sn
|
|
|
8220
8220
|
handleOnly: u,
|
|
8221
8221
|
isOpen: U,
|
|
8222
8222
|
isDragging: G,
|
|
8223
|
-
shouldFade:
|
|
8223
|
+
shouldFade: Ar,
|
|
8224
8224
|
closeDrawer: Pt,
|
|
8225
8225
|
onNestedDrag: ms,
|
|
8226
8226
|
onNestedOpenChange: ps,
|
|
@@ -8232,20 +8232,20 @@ function Vf({ open: e, onOpenChange: t, children: n, onDrag: r, onRelease: o, sn
|
|
|
8232
8232
|
direction: g,
|
|
8233
8233
|
shouldScaleBackground: i,
|
|
8234
8234
|
setBackgroundColorOnScale: s,
|
|
8235
|
-
noBodyStyles:
|
|
8235
|
+
noBodyStyles: x,
|
|
8236
8236
|
container: z,
|
|
8237
8237
|
autoFocus: H
|
|
8238
8238
|
}
|
|
8239
8239
|
}, n));
|
|
8240
8240
|
}
|
|
8241
|
-
const Zi = /* @__PURE__ */
|
|
8241
|
+
const Zi = /* @__PURE__ */ A.forwardRef(function({ ...e }, t) {
|
|
8242
8242
|
const { overlayRef: n, snapPoints: r, onRelease: o, shouldFade: a, isOpen: i, modal: s, shouldAnimate: l } = Mt(), d = ji(t, n), f = r && r.length > 0;
|
|
8243
8243
|
if (!s)
|
|
8244
8244
|
return null;
|
|
8245
|
-
const u =
|
|
8245
|
+
const u = A.useCallback((h) => o(h), [
|
|
8246
8246
|
o
|
|
8247
8247
|
]);
|
|
8248
|
-
return /* @__PURE__ */
|
|
8248
|
+
return /* @__PURE__ */ A.createElement(aa, {
|
|
8249
8249
|
onMouseUp: u,
|
|
8250
8250
|
ref: d,
|
|
8251
8251
|
"data-vaul-overlay": "",
|
|
@@ -8256,90 +8256,90 @@ const Zi = /* @__PURE__ */ N.forwardRef(function({ ...e }, t) {
|
|
|
8256
8256
|
});
|
|
8257
8257
|
});
|
|
8258
8258
|
Zi.displayName = "Drawer.Overlay";
|
|
8259
|
-
const Qi = /* @__PURE__ */
|
|
8260
|
-
const { drawerRef: a, onPress: i, onRelease: s, onDrag: l, keyboardIsOpen: d, snapPointsOffset: f, activeSnapPointIndex: u, modal: h, isOpen: w, direction: C, snapPoints: p, container: b, handleOnly: v, shouldAnimate:
|
|
8259
|
+
const Qi = /* @__PURE__ */ A.forwardRef(function({ onPointerDownOutside: e, style: t, onOpenAutoFocus: n, ...r }, o) {
|
|
8260
|
+
const { drawerRef: a, onPress: i, onRelease: s, onDrag: l, keyboardIsOpen: d, snapPointsOffset: f, activeSnapPointIndex: u, modal: h, isOpen: w, direction: C, snapPoints: p, container: b, handleOnly: v, shouldAnimate: y, autoFocus: x } = Mt(), [g, R] = A.useState(!1), k = ji(o, a), S = A.useRef(null), E = A.useRef(null), P = A.useRef(!1), D = p && p.length > 0;
|
|
8261
8261
|
Wf();
|
|
8262
|
-
const z = (
|
|
8262
|
+
const z = (N, W, U = 0) => {
|
|
8263
8263
|
if (P.current) return !0;
|
|
8264
|
-
const _ = Math.abs(
|
|
8264
|
+
const _ = Math.abs(N.y), $ = Math.abs(N.x), M = $ > _, G = [
|
|
8265
8265
|
"bottom",
|
|
8266
8266
|
"right"
|
|
8267
8267
|
].includes(W) ? 1 : -1;
|
|
8268
8268
|
if (W === "left" || W === "right") {
|
|
8269
|
-
if (!(
|
|
8269
|
+
if (!(N.x * G < 0) && $ >= 0 && $ <= U)
|
|
8270
8270
|
return M;
|
|
8271
|
-
} else if (!(
|
|
8271
|
+
} else if (!(N.y * G < 0) && _ >= 0 && _ <= U)
|
|
8272
8272
|
return !M;
|
|
8273
8273
|
return P.current = !0, !0;
|
|
8274
8274
|
};
|
|
8275
|
-
|
|
8275
|
+
A.useEffect(() => {
|
|
8276
8276
|
D && window.requestAnimationFrame(() => {
|
|
8277
8277
|
R(!0);
|
|
8278
8278
|
});
|
|
8279
8279
|
}, []);
|
|
8280
|
-
function H(
|
|
8281
|
-
S.current = null, P.current = !1, s(
|
|
8280
|
+
function H(N) {
|
|
8281
|
+
S.current = null, P.current = !1, s(N);
|
|
8282
8282
|
}
|
|
8283
|
-
return /* @__PURE__ */
|
|
8283
|
+
return /* @__PURE__ */ A.createElement(ia, {
|
|
8284
8284
|
"data-vaul-drawer-direction": C,
|
|
8285
8285
|
"data-vaul-drawer": "",
|
|
8286
8286
|
"data-vaul-delayed-snap-points": g ? "true" : "false",
|
|
8287
8287
|
"data-vaul-snap-points": w && D ? "true" : "false",
|
|
8288
8288
|
"data-vaul-custom-container": b ? "true" : "false",
|
|
8289
|
-
"data-vaul-animate":
|
|
8289
|
+
"data-vaul-animate": y?.current ? "true" : "false",
|
|
8290
8290
|
...r,
|
|
8291
8291
|
ref: k,
|
|
8292
8292
|
style: f && f.length > 0 ? {
|
|
8293
8293
|
"--snap-point-height": `${f[u ?? 0]}px`,
|
|
8294
8294
|
...t
|
|
8295
8295
|
} : t,
|
|
8296
|
-
onPointerDown: (
|
|
8297
|
-
v || (r.onPointerDown == null || r.onPointerDown.call(r,
|
|
8298
|
-
x:
|
|
8299
|
-
y:
|
|
8300
|
-
}, i(
|
|
8296
|
+
onPointerDown: (N) => {
|
|
8297
|
+
v || (r.onPointerDown == null || r.onPointerDown.call(r, N), S.current = {
|
|
8298
|
+
x: N.pageX,
|
|
8299
|
+
y: N.pageY
|
|
8300
|
+
}, i(N));
|
|
8301
8301
|
},
|
|
8302
|
-
onOpenAutoFocus: (
|
|
8303
|
-
n?.(
|
|
8302
|
+
onOpenAutoFocus: (N) => {
|
|
8303
|
+
n?.(N), x || N.preventDefault();
|
|
8304
8304
|
},
|
|
8305
|
-
onPointerDownOutside: (
|
|
8306
|
-
if (e?.(
|
|
8307
|
-
|
|
8305
|
+
onPointerDownOutside: (N) => {
|
|
8306
|
+
if (e?.(N), !h || N.defaultPrevented) {
|
|
8307
|
+
N.preventDefault();
|
|
8308
8308
|
return;
|
|
8309
8309
|
}
|
|
8310
8310
|
d.current && (d.current = !1);
|
|
8311
8311
|
},
|
|
8312
|
-
onFocusOutside: (
|
|
8312
|
+
onFocusOutside: (N) => {
|
|
8313
8313
|
if (!h) {
|
|
8314
|
-
|
|
8314
|
+
N.preventDefault();
|
|
8315
8315
|
return;
|
|
8316
8316
|
}
|
|
8317
8317
|
},
|
|
8318
|
-
onPointerMove: (
|
|
8319
|
-
if (E.current =
|
|
8320
|
-
const W =
|
|
8318
|
+
onPointerMove: (N) => {
|
|
8319
|
+
if (E.current = N, v || (r.onPointerMove == null || r.onPointerMove.call(r, N), !S.current)) return;
|
|
8320
|
+
const W = N.pageY - S.current.y, U = N.pageX - S.current.x, _ = N.pointerType === "touch" ? 10 : 2;
|
|
8321
8321
|
z({
|
|
8322
8322
|
x: U,
|
|
8323
8323
|
y: W
|
|
8324
|
-
}, C, _) ? l(
|
|
8324
|
+
}, C, _) ? l(N) : (Math.abs(U) > _ || Math.abs(W) > _) && (S.current = null);
|
|
8325
8325
|
},
|
|
8326
|
-
onPointerUp: (
|
|
8327
|
-
r.onPointerUp == null || r.onPointerUp.call(r,
|
|
8326
|
+
onPointerUp: (N) => {
|
|
8327
|
+
r.onPointerUp == null || r.onPointerUp.call(r, N), S.current = null, P.current = !1, s(N);
|
|
8328
8328
|
},
|
|
8329
|
-
onPointerOut: (
|
|
8330
|
-
r.onPointerOut == null || r.onPointerOut.call(r,
|
|
8329
|
+
onPointerOut: (N) => {
|
|
8330
|
+
r.onPointerOut == null || r.onPointerOut.call(r, N), H(E.current);
|
|
8331
8331
|
},
|
|
8332
|
-
onContextMenu: (
|
|
8333
|
-
r.onContextMenu == null || r.onContextMenu.call(r,
|
|
8332
|
+
onContextMenu: (N) => {
|
|
8333
|
+
r.onContextMenu == null || r.onContextMenu.call(r, N), E.current && H(E.current);
|
|
8334
8334
|
}
|
|
8335
8335
|
});
|
|
8336
8336
|
});
|
|
8337
8337
|
Qi.displayName = "Drawer.Content";
|
|
8338
|
-
const Uf = 250, jf = 120, Gf = /* @__PURE__ */
|
|
8339
|
-
const { closeDrawer: o, isDragging: a, snapPoints: i, activeSnapPoint: s, setActiveSnapPoint: l, dismissible: d, handleOnly: f, isOpen: u, onPress: h, onDrag: w } = Mt(), C =
|
|
8338
|
+
const Uf = 250, jf = 120, Gf = /* @__PURE__ */ A.forwardRef(function({ preventCycle: e = !1, children: t, ...n }, r) {
|
|
8339
|
+
const { closeDrawer: o, isDragging: a, snapPoints: i, activeSnapPoint: s, setActiveSnapPoint: l, dismissible: d, handleOnly: f, isOpen: u, onPress: h, onDrag: w } = Mt(), C = A.useRef(null), p = A.useRef(!1);
|
|
8340
8340
|
function b() {
|
|
8341
8341
|
if (p.current) {
|
|
8342
|
-
|
|
8342
|
+
x();
|
|
8343
8343
|
return;
|
|
8344
8344
|
}
|
|
8345
8345
|
window.setTimeout(() => {
|
|
@@ -8348,10 +8348,10 @@ const Uf = 250, jf = 120, Gf = /* @__PURE__ */ N.forwardRef(function({ preventCy
|
|
|
8348
8348
|
}
|
|
8349
8349
|
function v() {
|
|
8350
8350
|
if (a || e || p.current) {
|
|
8351
|
-
|
|
8351
|
+
x();
|
|
8352
8352
|
return;
|
|
8353
8353
|
}
|
|
8354
|
-
if (
|
|
8354
|
+
if (x(), !i || i.length === 0) {
|
|
8355
8355
|
d || o();
|
|
8356
8356
|
return;
|
|
8357
8357
|
}
|
|
@@ -8364,19 +8364,19 @@ const Uf = 250, jf = 120, Gf = /* @__PURE__ */ N.forwardRef(function({ preventCy
|
|
|
8364
8364
|
const k = i[R + 1];
|
|
8365
8365
|
l(k);
|
|
8366
8366
|
}
|
|
8367
|
-
function
|
|
8367
|
+
function y() {
|
|
8368
8368
|
C.current = window.setTimeout(() => {
|
|
8369
8369
|
p.current = !0;
|
|
8370
8370
|
}, Uf);
|
|
8371
8371
|
}
|
|
8372
|
-
function
|
|
8372
|
+
function x() {
|
|
8373
8373
|
C.current && window.clearTimeout(C.current), p.current = !1;
|
|
8374
8374
|
}
|
|
8375
|
-
return /* @__PURE__ */
|
|
8375
|
+
return /* @__PURE__ */ A.createElement("div", {
|
|
8376
8376
|
onClick: b,
|
|
8377
|
-
onPointerCancel:
|
|
8377
|
+
onPointerCancel: x,
|
|
8378
8378
|
onPointerDown: (g) => {
|
|
8379
|
-
f && h(g),
|
|
8379
|
+
f && h(g), y();
|
|
8380
8380
|
},
|
|
8381
8381
|
onPointerMove: (g) => {
|
|
8382
8382
|
f && w(g);
|
|
@@ -8387,7 +8387,7 @@ const Uf = 250, jf = 120, Gf = /* @__PURE__ */ N.forwardRef(function({ preventCy
|
|
|
8387
8387
|
"data-vaul-handle": "",
|
|
8388
8388
|
"aria-hidden": "true",
|
|
8389
8389
|
...n
|
|
8390
|
-
}, /* @__PURE__ */
|
|
8390
|
+
}, /* @__PURE__ */ A.createElement("span", {
|
|
8391
8391
|
"data-vaul-handle-hitarea": "",
|
|
8392
8392
|
"aria-hidden": "true"
|
|
8393
8393
|
}, t));
|
|
@@ -8395,7 +8395,7 @@ const Uf = 250, jf = 120, Gf = /* @__PURE__ */ N.forwardRef(function({ preventCy
|
|
|
8395
8395
|
Gf.displayName = "Drawer.Handle";
|
|
8396
8396
|
function Kf(e) {
|
|
8397
8397
|
const t = Mt(), { container: n = t.container, ...r } = e;
|
|
8398
|
-
return /* @__PURE__ */
|
|
8398
|
+
return /* @__PURE__ */ A.createElement(oa, {
|
|
8399
8399
|
container: n,
|
|
8400
8400
|
...r
|
|
8401
8401
|
});
|
|
@@ -8507,7 +8507,7 @@ function Xp({
|
|
|
8507
8507
|
/* @__PURE__ */ m(Jf, { className: "m-0 text-xl font-semibold text-foreground", children: n }),
|
|
8508
8508
|
/* @__PURE__ */ Y("div", { className: "flex items-center gap-3", children: [
|
|
8509
8509
|
a,
|
|
8510
|
-
/* @__PURE__ */ m(qf, { asChild: !0, children: /* @__PURE__ */ Y(
|
|
8510
|
+
/* @__PURE__ */ m(qf, { asChild: !0, children: /* @__PURE__ */ Y(Pr, { variant: "ghost", size: "icon", className: "cursor-pointer", children: [
|
|
8511
8511
|
/* @__PURE__ */ m(Wi, {}),
|
|
8512
8512
|
/* @__PURE__ */ m("span", { className: "sr-only", children: "Close drawer" })
|
|
8513
8513
|
] }) })
|
|
@@ -8521,7 +8521,7 @@ function Xp({
|
|
|
8521
8521
|
}
|
|
8522
8522
|
);
|
|
8523
8523
|
}
|
|
8524
|
-
function
|
|
8524
|
+
function bo({
|
|
8525
8525
|
className: e,
|
|
8526
8526
|
...t
|
|
8527
8527
|
}) {
|
|
@@ -8571,7 +8571,7 @@ function np({
|
|
|
8571
8571
|
}
|
|
8572
8572
|
) });
|
|
8573
8573
|
}
|
|
8574
|
-
const Ji = "flex w-full items-center justify-between gap-1.5 rounded-lg border border-input bg-transparent py-2 pr-2 pl-2.5 text-sm whitespace-nowrap transition-colors outline-none select-none disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 data-placeholder:text-muted-foreground data-[size=default]:h-8 data-[size=sm]:h-7 data-[size=sm]:rounded-[min(var(--radius-md),10px)] *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-1.5 dark:bg-input/30 dark:hover:bg-input/50 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 ring-0 cursor-pointer", es = "relative max-h-(--radix-select-content-available-height) overflow-x-hidden overflow-y-auto rounded-lg bg-popover p-0 text-popover-foreground shadow-md ring-1 ring-foreground/10 z-60",
|
|
8574
|
+
const Ji = "flex w-full items-center justify-between gap-1.5 rounded-lg border border-input bg-transparent py-2 pr-2 pl-2.5 text-sm whitespace-nowrap transition-colors outline-none select-none disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 data-placeholder:text-muted-foreground data-[size=default]:h-8 data-[size=sm]:h-7 data-[size=sm]:rounded-[min(var(--radius-md),10px)] *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-1.5 dark:bg-input/30 dark:hover:bg-input/50 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 ring-0 cursor-pointer", es = "relative max-h-(--radix-select-content-available-height) overflow-x-hidden overflow-y-auto rounded-lg bg-popover p-0 text-popover-foreground shadow-md ring-1 ring-foreground/10 z-60", rr = "relative flex w-full cursor-pointer items-center gap-2 rounded-md px-2 py-1.5 text-sm outline-hidden transition-colors select-none data-disabled:pointer-events-none data-disabled:opacity-50 hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4";
|
|
8575
8575
|
function qp({
|
|
8576
8576
|
options: e,
|
|
8577
8577
|
value: t,
|
|
@@ -8608,9 +8608,9 @@ function qp({
|
|
|
8608
8608
|
return C.forEach((R) => {
|
|
8609
8609
|
g.set(R.value, R.label);
|
|
8610
8610
|
}), g.set(u, f), g;
|
|
8611
|
-
}, [u, f, C]),
|
|
8611
|
+
}, [u, f, C]), y = c.useMemo(() => b.length === 0 ? r : b.length <= 2 ? b.map(
|
|
8612
8612
|
(g) => v.get(g) ?? g
|
|
8613
|
-
).join(", ") : `${b.length} ${h}`, [v, b, r, h]),
|
|
8613
|
+
).join(", ") : `${b.length} ${h}`, [v, b, r, h]), x = c.useCallback(
|
|
8614
8614
|
(g) => {
|
|
8615
8615
|
if (g === u) {
|
|
8616
8616
|
n([u]);
|
|
@@ -8656,7 +8656,7 @@ function qp({
|
|
|
8656
8656
|
s
|
|
8657
8657
|
),
|
|
8658
8658
|
children: [
|
|
8659
|
-
/* @__PURE__ */ m("span", { className: "line-clamp-1 text-left", children:
|
|
8659
|
+
/* @__PURE__ */ m("span", { className: "line-clamp-1 text-left", children: y }),
|
|
8660
8660
|
/* @__PURE__ */ m(En, { className: "size-4 text-muted-foreground" })
|
|
8661
8661
|
]
|
|
8662
8662
|
}
|
|
@@ -8681,13 +8681,13 @@ function qp({
|
|
|
8681
8681
|
"div",
|
|
8682
8682
|
{
|
|
8683
8683
|
className: B(
|
|
8684
|
-
|
|
8684
|
+
rr,
|
|
8685
8685
|
o && "pointer-events-none opacity-50 cursor-not-allowed"
|
|
8686
8686
|
),
|
|
8687
|
-
onClick: () => !o &&
|
|
8687
|
+
onClick: () => !o && x(u),
|
|
8688
8688
|
children: [
|
|
8689
8689
|
/* @__PURE__ */ m(
|
|
8690
|
-
|
|
8690
|
+
bo,
|
|
8691
8691
|
{
|
|
8692
8692
|
checked: b.includes(u),
|
|
8693
8693
|
className: "pointer-events-none"
|
|
@@ -8702,15 +8702,15 @@ function qp({
|
|
|
8702
8702
|
"div",
|
|
8703
8703
|
{
|
|
8704
8704
|
className: B(
|
|
8705
|
-
|
|
8705
|
+
rr,
|
|
8706
8706
|
(o || g.disabled) && "pointer-events-none opacity-50 cursor-not-allowed"
|
|
8707
8707
|
),
|
|
8708
|
-
onClick: () => !o && !g.disabled &&
|
|
8708
|
+
onClick: () => !o && !g.disabled && x(g.value),
|
|
8709
8709
|
role: "option",
|
|
8710
8710
|
"aria-selected": b.includes(g.value),
|
|
8711
8711
|
children: [
|
|
8712
8712
|
/* @__PURE__ */ m(
|
|
8713
|
-
|
|
8713
|
+
bo,
|
|
8714
8714
|
{
|
|
8715
8715
|
checked: b.includes(g.value),
|
|
8716
8716
|
className: "pointer-events-none"
|
|
@@ -8810,7 +8810,7 @@ function dp({
|
|
|
8810
8810
|
children: [
|
|
8811
8811
|
t,
|
|
8812
8812
|
r && /* @__PURE__ */ m(la, { "data-slot": "sheet-close", asChild: !0, children: /* @__PURE__ */ Y(
|
|
8813
|
-
|
|
8813
|
+
Pr,
|
|
8814
8814
|
{
|
|
8815
8815
|
variant: "ghost",
|
|
8816
8816
|
className: "absolute top-3 right-3",
|
|
@@ -8880,14 +8880,14 @@ function yp({
|
|
|
8880
8880
|
}) {
|
|
8881
8881
|
const s = ip(), [l, d] = c.useState(!1), [f, u] = c.useState(e), h = t ?? f, w = c.useCallback(
|
|
8882
8882
|
(v) => {
|
|
8883
|
-
const
|
|
8884
|
-
n ? n(
|
|
8883
|
+
const y = typeof v == "function" ? v(h) : v;
|
|
8884
|
+
n ? n(y) : u(y), document.cookie = `${mp}=${y}; path=/; max-age=${hp}`;
|
|
8885
8885
|
},
|
|
8886
8886
|
[n, h]
|
|
8887
8887
|
), C = c.useCallback(() => s ? d((v) => !v) : w((v) => !v), [s, w, d]);
|
|
8888
8888
|
c.useEffect(() => {
|
|
8889
|
-
const v = (
|
|
8890
|
-
|
|
8889
|
+
const v = (y) => {
|
|
8890
|
+
y.key === wp && (y.metaKey || y.ctrlKey) && (y.preventDefault(), C());
|
|
8891
8891
|
};
|
|
8892
8892
|
return window.addEventListener("keydown", v), () => window.removeEventListener("keydown", v);
|
|
8893
8893
|
}, [C]);
|
|
@@ -9018,7 +9018,7 @@ function Cp({
|
|
|
9018
9018
|
}) {
|
|
9019
9019
|
const { toggleSidebar: r } = ns();
|
|
9020
9020
|
return /* @__PURE__ */ Y(
|
|
9021
|
-
|
|
9021
|
+
Pr,
|
|
9022
9022
|
{
|
|
9023
9023
|
"data-sidebar": "trigger",
|
|
9024
9024
|
"data-slot": "sidebar-trigger",
|
|
@@ -9101,7 +9101,7 @@ function kp({
|
|
|
9101
9101
|
}
|
|
9102
9102
|
);
|
|
9103
9103
|
}
|
|
9104
|
-
function
|
|
9104
|
+
function Np({
|
|
9105
9105
|
className: e,
|
|
9106
9106
|
...t
|
|
9107
9107
|
}) {
|
|
@@ -9115,7 +9115,7 @@ function Ap({
|
|
|
9115
9115
|
}
|
|
9116
9116
|
);
|
|
9117
9117
|
}
|
|
9118
|
-
function
|
|
9118
|
+
function Ap({ className: e, ...t }) {
|
|
9119
9119
|
return /* @__PURE__ */ m(
|
|
9120
9120
|
"ul",
|
|
9121
9121
|
{
|
|
@@ -9251,7 +9251,7 @@ function Wn(e) {
|
|
|
9251
9251
|
function Hn(e, t) {
|
|
9252
9252
|
return e.id ?? `${t}-${e.label}`;
|
|
9253
9253
|
}
|
|
9254
|
-
function
|
|
9254
|
+
function wo(e, t) {
|
|
9255
9255
|
return t ? e.items.some((n) => n.route === t) : !1;
|
|
9256
9256
|
}
|
|
9257
9257
|
function Zp({
|
|
@@ -9284,54 +9284,62 @@ function Zp({
|
|
|
9284
9284
|
originalIndex: e.length + R
|
|
9285
9285
|
}))
|
|
9286
9286
|
].sort((g, R) => g.order !== R.order ? g.order - R.order : g.originalIndex - R.originalIndex), [t, e]), [C, p] = c.useState(() => t.reduce(
|
|
9287
|
-
(
|
|
9287
|
+
(x, g, R) => {
|
|
9288
9288
|
const k = Hn(g, R);
|
|
9289
|
-
return
|
|
9289
|
+
return x[k] = !!(g.defaultOpen || wo(g, n)), x;
|
|
9290
9290
|
},
|
|
9291
9291
|
{}
|
|
9292
9292
|
));
|
|
9293
9293
|
c.useEffect(() => {
|
|
9294
|
-
p((
|
|
9294
|
+
p((x) => t.reduce(
|
|
9295
9295
|
(g, R, k) => {
|
|
9296
|
-
const S = Hn(R, k), E =
|
|
9296
|
+
const S = Hn(R, k), E = x[S], P = wo(R, n);
|
|
9297
9297
|
return typeof E == "boolean" ? (g[S] = P ? !0 : E, g) : (g[S] = !!(R.defaultOpen || P), g);
|
|
9298
9298
|
},
|
|
9299
9299
|
{}
|
|
9300
9300
|
));
|
|
9301
9301
|
}, [n, t]);
|
|
9302
9302
|
const b = c.useCallback(
|
|
9303
|
-
(
|
|
9304
|
-
if (
|
|
9303
|
+
(x, g) => {
|
|
9304
|
+
if (x.disabled) {
|
|
9305
9305
|
g.preventDefault();
|
|
9306
9306
|
return;
|
|
9307
9307
|
}
|
|
9308
|
-
o?.(
|
|
9308
|
+
o?.(x, g);
|
|
9309
9309
|
},
|
|
9310
9310
|
[o]
|
|
9311
9311
|
), v = c.useCallback(
|
|
9312
|
-
(
|
|
9313
|
-
const g =
|
|
9314
|
-
return /* @__PURE__ */ m(
|
|
9315
|
-
/* @__PURE__ */ m(
|
|
9316
|
-
|
|
9312
|
+
(x) => {
|
|
9313
|
+
const g = x.icon, R = x.route === n;
|
|
9314
|
+
return /* @__PURE__ */ m(Ap, { className: "gap-1", children: /* @__PURE__ */ Y(Op, { className: B(u, x.className), children: [
|
|
9315
|
+
/* @__PURE__ */ m(
|
|
9316
|
+
Ip,
|
|
9317
9317
|
{
|
|
9318
|
-
|
|
9319
|
-
|
|
9320
|
-
"
|
|
9321
|
-
|
|
9322
|
-
|
|
9323
|
-
|
|
9324
|
-
|
|
9325
|
-
|
|
9318
|
+
asChild: !0,
|
|
9319
|
+
isActive: R,
|
|
9320
|
+
className: "transition-colors hover:bg-sidebar-accent/55 data-open:hover:bg-sidebar-accent/55",
|
|
9321
|
+
children: /* @__PURE__ */ Y(
|
|
9322
|
+
"a",
|
|
9323
|
+
{
|
|
9324
|
+
href: x.route,
|
|
9325
|
+
"aria-current": R ? "page" : void 0,
|
|
9326
|
+
"aria-disabled": x.disabled,
|
|
9327
|
+
onClick: (k) => b(x, k),
|
|
9328
|
+
children: [
|
|
9329
|
+
g ? /* @__PURE__ */ m(g, { className: "size-4" }) : null,
|
|
9330
|
+
/* @__PURE__ */ m("span", { className: "group-data-[collapsible=icon]:hidden", children: x.label })
|
|
9331
|
+
]
|
|
9332
|
+
}
|
|
9333
|
+
)
|
|
9326
9334
|
}
|
|
9327
|
-
)
|
|
9328
|
-
|
|
9329
|
-
] }) }, `${
|
|
9335
|
+
),
|
|
9336
|
+
x.badge ? /* @__PURE__ */ m(Dp, { children: x.badge }) : null
|
|
9337
|
+
] }) }, `${x.route}-${x.label}`);
|
|
9330
9338
|
},
|
|
9331
9339
|
[n, b, u]
|
|
9332
|
-
),
|
|
9333
|
-
(
|
|
9334
|
-
const R = Hn(
|
|
9340
|
+
), y = c.useCallback(
|
|
9341
|
+
(x, g) => {
|
|
9342
|
+
const R = Hn(x, g), k = C[R] ?? !1, S = x.icon, E = [...x.items].map((P, D) => ({
|
|
9335
9343
|
groupItem: P,
|
|
9336
9344
|
order: Wn(P.order),
|
|
9337
9345
|
index: D
|
|
@@ -9345,45 +9353,52 @@ function Zp({
|
|
|
9345
9353
|
[R]: P
|
|
9346
9354
|
})),
|
|
9347
9355
|
className: "group/collapsible",
|
|
9348
|
-
children: /* @__PURE__ */ Y(Pp, { className:
|
|
9349
|
-
/* @__PURE__ */ m(kp, { asChild: !0, className:
|
|
9356
|
+
children: /* @__PURE__ */ Y(Pp, { className: x.className, children: [
|
|
9357
|
+
/* @__PURE__ */ m(kp, { asChild: !0, className: x.labelClassName, children: /* @__PURE__ */ Y(
|
|
9350
9358
|
op,
|
|
9351
9359
|
{
|
|
9352
9360
|
className: B(
|
|
9353
|
-
"flex h-8 w-full items-center gap-2 rounded-md px-
|
|
9354
|
-
Vn(y, n) && "bg-sidebar-accent text-sidebar-accent-foreground"
|
|
9361
|
+
"flex h-8 w-full items-center gap-2 rounded-md !px-0 text-sm transition-colors hover:cursor-pointer hover:bg-sidebar-accent/55 hover:text-sidebar-accent-foreground"
|
|
9355
9362
|
),
|
|
9356
9363
|
children: [
|
|
9357
9364
|
S ? /* @__PURE__ */ m(S, { className: "size-4" }) : null,
|
|
9358
|
-
/* @__PURE__ */ m("span", { className: "truncate group-data-[collapsible=icon]:hidden", children:
|
|
9365
|
+
/* @__PURE__ */ m("span", { className: "truncate group-data-[collapsible=icon]:hidden", children: x.label }),
|
|
9359
9366
|
/* @__PURE__ */ m(En, { className: "ml-auto size-4 transition-transform group-data-[collapsible=icon]:hidden group-data-[state=open]/collapsible:rotate-180" })
|
|
9360
9367
|
]
|
|
9361
9368
|
}
|
|
9362
9369
|
) }),
|
|
9363
|
-
/* @__PURE__ */ m(ap, { children: /* @__PURE__ */ m(
|
|
9370
|
+
/* @__PURE__ */ m(ap, { children: /* @__PURE__ */ m(Np, { className: x.contentClassName, children: /* @__PURE__ */ m(_p, { className: x.menuClassName + " !m-2", children: E.map((P) => {
|
|
9364
9371
|
const D = P.icon, z = P.route === n;
|
|
9365
9372
|
return /* @__PURE__ */ m(
|
|
9366
9373
|
Mp,
|
|
9367
9374
|
{
|
|
9368
9375
|
className: B(
|
|
9369
9376
|
u,
|
|
9370
|
-
|
|
9377
|
+
x.itemClassName,
|
|
9371
9378
|
P.className
|
|
9372
9379
|
),
|
|
9373
|
-
children: /* @__PURE__ */ m(
|
|
9374
|
-
|
|
9380
|
+
children: /* @__PURE__ */ m(
|
|
9381
|
+
Lp,
|
|
9375
9382
|
{
|
|
9376
|
-
|
|
9377
|
-
|
|
9378
|
-
"
|
|
9379
|
-
|
|
9380
|
-
|
|
9381
|
-
|
|
9382
|
-
|
|
9383
|
-
|
|
9384
|
-
|
|
9383
|
+
asChild: !0,
|
|
9384
|
+
isActive: z,
|
|
9385
|
+
className: "transition-colors hover:bg-sidebar-accent/55",
|
|
9386
|
+
children: /* @__PURE__ */ Y(
|
|
9387
|
+
"a",
|
|
9388
|
+
{
|
|
9389
|
+
href: P.route,
|
|
9390
|
+
"aria-current": z ? "page" : void 0,
|
|
9391
|
+
"aria-disabled": P.disabled,
|
|
9392
|
+
onClick: (H) => b(P, H),
|
|
9393
|
+
children: [
|
|
9394
|
+
D ? /* @__PURE__ */ m(D, { className: "size-4" }) : null,
|
|
9395
|
+
/* @__PURE__ */ m("span", { children: P.label }),
|
|
9396
|
+
P.badge ? /* @__PURE__ */ m("span", { className: "ml-auto text-xs font-medium tabular-nums", children: P.badge }) : null
|
|
9397
|
+
]
|
|
9398
|
+
}
|
|
9399
|
+
)
|
|
9385
9400
|
}
|
|
9386
|
-
)
|
|
9401
|
+
)
|
|
9387
9402
|
},
|
|
9388
9403
|
`${R}-${P.route}-${P.label}`
|
|
9389
9404
|
);
|
|
@@ -9419,7 +9434,7 @@ function Zp({
|
|
|
9419
9434
|
] })
|
|
9420
9435
|
}
|
|
9421
9436
|
),
|
|
9422
|
-
/* @__PURE__ */ m(Rp, { className: B("p-2", d), children: /* @__PURE__ */ m("div", { className: B("flex flex-col gap-1", f), children: w.map((
|
|
9437
|
+
/* @__PURE__ */ m(Rp, { className: B("p-2", d), children: /* @__PURE__ */ m("div", { className: B("flex flex-col gap-1", f), children: w.map((x) => x.kind === "item" ? v(x.item) : y(x.group, x.groupIndex)) }) }),
|
|
9423
9438
|
i ? /* @__PURE__ */ m(
|
|
9424
9439
|
Ep,
|
|
9425
9440
|
{
|
|
@@ -9515,7 +9530,7 @@ function Hp({
|
|
|
9515
9530
|
fu,
|
|
9516
9531
|
{
|
|
9517
9532
|
"data-slot": "select-item",
|
|
9518
|
-
className: B(
|
|
9533
|
+
className: B(rr, e),
|
|
9519
9534
|
...n,
|
|
9520
9535
|
children: [
|
|
9521
9536
|
/* @__PURE__ */ m(pu, { className: "flex-1", children: t }),
|
|
@@ -9601,7 +9616,7 @@ function Qp({
|
|
|
9601
9616
|
) });
|
|
9602
9617
|
}
|
|
9603
9618
|
export {
|
|
9604
|
-
|
|
9619
|
+
Pr as Button,
|
|
9605
9620
|
Xp as GenericDrawer,
|
|
9606
9621
|
qp as MultiSelect,
|
|
9607
9622
|
Zp as SidebarNav,
|