@withgus/debug 0.1.0 → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +10 -10
- package/dist/index.js +364 -363
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import * as c from "react";
|
|
2
|
-
import E, { useState as qe, useMemo as
|
|
3
|
-
import * as
|
|
4
|
-
import
|
|
5
|
-
import { create as
|
|
2
|
+
import E, { useState as qe, useMemo as rr, useLayoutEffect as ar, useEffect as Jt, useCallback as or } from "react";
|
|
3
|
+
import * as sr from "react-dom";
|
|
4
|
+
import ir from "react-dom";
|
|
5
|
+
import { create as cr } from "zustand";
|
|
6
6
|
var Fe = { exports: {} }, De = {};
|
|
7
7
|
/**
|
|
8
8
|
* @license React
|
|
@@ -14,7 +14,7 @@ var Fe = { exports: {} }, De = {};
|
|
|
14
14
|
* LICENSE file in the root directory of this source tree.
|
|
15
15
|
*/
|
|
16
16
|
var At;
|
|
17
|
-
function
|
|
17
|
+
function lr() {
|
|
18
18
|
if (At) return De;
|
|
19
19
|
At = 1;
|
|
20
20
|
var e = Symbol.for("react.transitional.element"), t = Symbol.for("react.fragment");
|
|
@@ -46,7 +46,7 @@ var Ae = {};
|
|
|
46
46
|
* LICENSE file in the root directory of this source tree.
|
|
47
47
|
*/
|
|
48
48
|
var _t;
|
|
49
|
-
function
|
|
49
|
+
function ur() {
|
|
50
50
|
return _t || (_t = 1, process.env.NODE_ENV !== "production" && (function() {
|
|
51
51
|
function e(u) {
|
|
52
52
|
if (u == null) return null;
|
|
@@ -154,7 +154,7 @@ function lr() {
|
|
|
154
154
|
"Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release."
|
|
155
155
|
)), u = this.props.ref, u !== void 0 ? u : null;
|
|
156
156
|
}
|
|
157
|
-
function m(u, D, M, W, le,
|
|
157
|
+
function m(u, D, M, W, le, ve) {
|
|
158
158
|
var L = M.ref;
|
|
159
159
|
return u = {
|
|
160
160
|
$$typeof: N,
|
|
@@ -184,10 +184,10 @@ function lr() {
|
|
|
184
184
|
configurable: !1,
|
|
185
185
|
enumerable: !1,
|
|
186
186
|
writable: !0,
|
|
187
|
-
value:
|
|
187
|
+
value: ve
|
|
188
188
|
}), Object.freeze && (Object.freeze(u.props), Object.freeze(u)), u;
|
|
189
189
|
}
|
|
190
|
-
function p(u, D, M, W, le,
|
|
190
|
+
function p(u, D, M, W, le, ve) {
|
|
191
191
|
var L = D.children;
|
|
192
192
|
if (L !== void 0)
|
|
193
193
|
if (W)
|
|
@@ -220,8 +220,8 @@ React keys must be passed directly to JSX without using spread:
|
|
|
220
220
|
}
|
|
221
221
|
if (L = null, M !== void 0 && (n(M), L = "" + M), i(D) && (n(D.key), L = "" + D.key), "key" in D) {
|
|
222
222
|
M = {};
|
|
223
|
-
for (var
|
|
224
|
-
|
|
223
|
+
for (var he in D)
|
|
224
|
+
he !== "key" && (M[he] = D[he]);
|
|
225
225
|
} else M = D;
|
|
226
226
|
return L && s(
|
|
227
227
|
M,
|
|
@@ -232,7 +232,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
232
232
|
M,
|
|
233
233
|
a(),
|
|
234
234
|
le,
|
|
235
|
-
|
|
235
|
+
ve
|
|
236
236
|
);
|
|
237
237
|
}
|
|
238
238
|
function f(u) {
|
|
@@ -277,11 +277,11 @@ React keys must be passed directly to JSX without using spread:
|
|
|
277
277
|
})()), Ae;
|
|
278
278
|
}
|
|
279
279
|
var kt;
|
|
280
|
-
function
|
|
281
|
-
return kt || (kt = 1, process.env.NODE_ENV === "production" ? Fe.exports =
|
|
280
|
+
function dr() {
|
|
281
|
+
return kt || (kt = 1, process.env.NODE_ENV === "production" ? Fe.exports = lr() : Fe.exports = ur()), Fe.exports;
|
|
282
282
|
}
|
|
283
|
-
var d =
|
|
284
|
-
function
|
|
283
|
+
var d = dr();
|
|
284
|
+
function pe(e, t, { checkForDefaultPrevented: n = !0 } = {}) {
|
|
285
285
|
return function(a) {
|
|
286
286
|
if (e == null || e(a), n === !1 || !a.defaultPrevented)
|
|
287
287
|
return t == null ? void 0 : t(a);
|
|
@@ -311,7 +311,7 @@ function Zt(...e) {
|
|
|
311
311
|
function ye(...e) {
|
|
312
312
|
return c.useCallback(Zt(...e), e);
|
|
313
313
|
}
|
|
314
|
-
function
|
|
314
|
+
function fr(e, t) {
|
|
315
315
|
const n = c.createContext(t), r = (o) => {
|
|
316
316
|
const { children: i, ...s } = o, v = c.useMemo(() => s, Object.values(s));
|
|
317
317
|
return /* @__PURE__ */ d.jsx(n.Provider, { value: v, children: i });
|
|
@@ -325,7 +325,7 @@ function dr(e, t) {
|
|
|
325
325
|
}
|
|
326
326
|
return [r, a];
|
|
327
327
|
}
|
|
328
|
-
function
|
|
328
|
+
function mr(e, t = []) {
|
|
329
329
|
let n = [];
|
|
330
330
|
function r(o, i) {
|
|
331
331
|
const s = c.createContext(i), v = n.length;
|
|
@@ -355,9 +355,9 @@ function fr(e, t = []) {
|
|
|
355
355
|
);
|
|
356
356
|
};
|
|
357
357
|
};
|
|
358
|
-
return a.scopeName = e, [r,
|
|
358
|
+
return a.scopeName = e, [r, pr(a, ...t)];
|
|
359
359
|
}
|
|
360
|
-
function
|
|
360
|
+
function pr(...e) {
|
|
361
361
|
const t = e[0];
|
|
362
362
|
if (e.length === 1) return t;
|
|
363
363
|
const n = () => {
|
|
@@ -376,23 +376,23 @@ function mr(...e) {
|
|
|
376
376
|
return n.scopeName = t.scopeName, n;
|
|
377
377
|
}
|
|
378
378
|
var Me = globalThis != null && globalThis.document ? c.useLayoutEffect : () => {
|
|
379
|
-
},
|
|
380
|
-
}),
|
|
379
|
+
}, vr = c[" useId ".trim().toString()] || (() => {
|
|
380
|
+
}), hr = 0;
|
|
381
381
|
function tt(e) {
|
|
382
|
-
const [t, n] = c.useState(
|
|
382
|
+
const [t, n] = c.useState(vr());
|
|
383
383
|
return Me(() => {
|
|
384
|
-
n((r) => r ?? String(
|
|
384
|
+
n((r) => r ?? String(hr++));
|
|
385
385
|
}, [e]), e || (t ? `radix-${t}` : "");
|
|
386
386
|
}
|
|
387
|
-
var
|
|
388
|
-
function
|
|
387
|
+
var gr = c[" useInsertionEffect ".trim().toString()] || Me;
|
|
388
|
+
function wr({
|
|
389
389
|
prop: e,
|
|
390
390
|
defaultProp: t,
|
|
391
391
|
onChange: n = () => {
|
|
392
392
|
},
|
|
393
393
|
caller: r
|
|
394
394
|
}) {
|
|
395
|
-
const [a, o, i] =
|
|
395
|
+
const [a, o, i] = br({
|
|
396
396
|
defaultProp: t,
|
|
397
397
|
onChange: n
|
|
398
398
|
}), s = e !== void 0, v = s ? e : a;
|
|
@@ -409,7 +409,7 @@ function gr({
|
|
|
409
409
|
(p) => {
|
|
410
410
|
var f;
|
|
411
411
|
if (s) {
|
|
412
|
-
const h =
|
|
412
|
+
const h = yr(p) ? p(e) : p;
|
|
413
413
|
h !== e && ((f = i.current) == null || f.call(i, h));
|
|
414
414
|
} else
|
|
415
415
|
o(p);
|
|
@@ -418,25 +418,25 @@ function gr({
|
|
|
418
418
|
);
|
|
419
419
|
return [v, m];
|
|
420
420
|
}
|
|
421
|
-
function
|
|
421
|
+
function br({
|
|
422
422
|
defaultProp: e,
|
|
423
423
|
onChange: t
|
|
424
424
|
}) {
|
|
425
425
|
const [n, r] = c.useState(e), a = c.useRef(n), o = c.useRef(t);
|
|
426
|
-
return
|
|
426
|
+
return gr(() => {
|
|
427
427
|
o.current = t;
|
|
428
428
|
}, [t]), c.useEffect(() => {
|
|
429
429
|
var i;
|
|
430
430
|
a.current !== n && ((i = o.current) == null || i.call(o, n), a.current = n);
|
|
431
431
|
}, [n, a]), [n, r, o];
|
|
432
432
|
}
|
|
433
|
-
function
|
|
433
|
+
function yr(e) {
|
|
434
434
|
return typeof e == "function";
|
|
435
435
|
}
|
|
436
436
|
// @__NO_SIDE_EFFECTS__
|
|
437
437
|
function Qt(e) {
|
|
438
|
-
const t = /* @__PURE__ */
|
|
439
|
-
const { children: o, ...i } = r, s = c.Children.toArray(o), v = s.find(
|
|
438
|
+
const t = /* @__PURE__ */ Er(e), n = c.forwardRef((r, a) => {
|
|
439
|
+
const { children: o, ...i } = r, s = c.Children.toArray(o), v = s.find(Rr);
|
|
440
440
|
if (v) {
|
|
441
441
|
const m = v.props.children, p = s.map((f) => f === v ? c.Children.count(m) > 1 ? c.Children.only(null) : c.isValidElement(m) ? m.props.children : null : f);
|
|
442
442
|
return /* @__PURE__ */ d.jsx(t, { ...i, ref: a, children: c.isValidElement(m) ? c.cloneElement(m, void 0, p) : null });
|
|
@@ -446,22 +446,22 @@ function Qt(e) {
|
|
|
446
446
|
return n.displayName = `${e}.Slot`, n;
|
|
447
447
|
}
|
|
448
448
|
// @__NO_SIDE_EFFECTS__
|
|
449
|
-
function
|
|
449
|
+
function Er(e) {
|
|
450
450
|
const t = c.forwardRef((n, r) => {
|
|
451
451
|
const { children: a, ...o } = n;
|
|
452
452
|
if (c.isValidElement(a)) {
|
|
453
|
-
const i =
|
|
453
|
+
const i = xr(a), s = Cr(o, a.props);
|
|
454
454
|
return a.type !== c.Fragment && (s.ref = r ? Zt(r, i) : i), c.cloneElement(a, s);
|
|
455
455
|
}
|
|
456
456
|
return c.Children.count(a) > 1 ? c.Children.only(null) : null;
|
|
457
457
|
});
|
|
458
458
|
return t.displayName = `${e}.SlotClone`, t;
|
|
459
459
|
}
|
|
460
|
-
var
|
|
461
|
-
function
|
|
462
|
-
return c.isValidElement(e) && typeof e.type == "function" && "__radixId" in e.type && e.type.__radixId ===
|
|
460
|
+
var Sr = Symbol("radix.slottable");
|
|
461
|
+
function Rr(e) {
|
|
462
|
+
return c.isValidElement(e) && typeof e.type == "function" && "__radixId" in e.type && e.type.__radixId === Sr;
|
|
463
463
|
}
|
|
464
|
-
function
|
|
464
|
+
function Cr(e, t) {
|
|
465
465
|
const n = { ...t };
|
|
466
466
|
for (const r in t) {
|
|
467
467
|
const a = e[r], o = t[r];
|
|
@@ -472,12 +472,12 @@ function Rr(e, t) {
|
|
|
472
472
|
}
|
|
473
473
|
return { ...e, ...n };
|
|
474
474
|
}
|
|
475
|
-
function
|
|
475
|
+
function xr(e) {
|
|
476
476
|
var r, a;
|
|
477
477
|
let t = (r = Object.getOwnPropertyDescriptor(e.props, "ref")) == null ? void 0 : r.get, n = t && "isReactWarning" in t && t.isReactWarning;
|
|
478
478
|
return n ? e.ref : (t = (a = Object.getOwnPropertyDescriptor(e, "ref")) == null ? void 0 : a.get, n = t && "isReactWarning" in t && t.isReactWarning, n ? e.props.ref : e.props.ref || e.ref);
|
|
479
479
|
}
|
|
480
|
-
var
|
|
480
|
+
var Tr = [
|
|
481
481
|
"a",
|
|
482
482
|
"button",
|
|
483
483
|
"div",
|
|
@@ -495,15 +495,15 @@ var xr = [
|
|
|
495
495
|
"span",
|
|
496
496
|
"svg",
|
|
497
497
|
"ul"
|
|
498
|
-
], ie =
|
|
498
|
+
], ie = Tr.reduce((e, t) => {
|
|
499
499
|
const n = /* @__PURE__ */ Qt(`Primitive.${t}`), r = c.forwardRef((a, o) => {
|
|
500
500
|
const { asChild: i, ...s } = a, v = i ? n : t;
|
|
501
501
|
return typeof window < "u" && (window[Symbol.for("radix-ui")] = !0), /* @__PURE__ */ d.jsx(v, { ...s, ref: o });
|
|
502
502
|
});
|
|
503
503
|
return r.displayName = `Primitive.${t}`, { ...e, [t]: r };
|
|
504
504
|
}, {});
|
|
505
|
-
function
|
|
506
|
-
e &&
|
|
505
|
+
function Pr(e, t) {
|
|
506
|
+
e && sr.flushSync(() => e.dispatchEvent(t));
|
|
507
507
|
}
|
|
508
508
|
function Ie(e) {
|
|
509
509
|
const t = c.useRef(e);
|
|
@@ -514,7 +514,7 @@ function Ie(e) {
|
|
|
514
514
|
return (r = t.current) == null ? void 0 : r.call(t, ...n);
|
|
515
515
|
}, []);
|
|
516
516
|
}
|
|
517
|
-
function
|
|
517
|
+
function Nr(e, t = globalThis == null ? void 0 : globalThis.document) {
|
|
518
518
|
const n = Ie(e);
|
|
519
519
|
c.useEffect(() => {
|
|
520
520
|
const r = (a) => {
|
|
@@ -523,7 +523,7 @@ function Pr(e, t = globalThis == null ? void 0 : globalThis.document) {
|
|
|
523
523
|
return t.addEventListener("keydown", r, { capture: !0 }), () => t.removeEventListener("keydown", r, { capture: !0 });
|
|
524
524
|
}, [n, t]);
|
|
525
525
|
}
|
|
526
|
-
var
|
|
526
|
+
var Or = "DismissableLayer", pt = "dismissableLayer.update", Dr = "dismissableLayer.pointerDownOutside", Ar = "dismissableLayer.focusOutside", It, en = c.createContext({
|
|
527
527
|
layers: /* @__PURE__ */ new Set(),
|
|
528
528
|
layersWithOutsidePointerEventsDisabled: /* @__PURE__ */ new Set(),
|
|
529
529
|
branches: /* @__PURE__ */ new Set()
|
|
@@ -537,14 +537,14 @@ var Nr = "DismissableLayer", pt = "dismissableLayer.update", Or = "dismissableLa
|
|
|
537
537
|
onInteractOutside: i,
|
|
538
538
|
onDismiss: s,
|
|
539
539
|
...v
|
|
540
|
-
} = e, m = c.useContext(en), [p, f] = c.useState(null), h = (p == null ? void 0 : p.ownerDocument) ?? (globalThis == null ? void 0 : globalThis.document), [, R] = c.useState({}), N = ye(t, (b) => f(b)), l = Array.from(m.layers), [S] = [...m.layersWithOutsidePointerEventsDisabled].slice(-1), g = l.indexOf(S), T = p ? l.indexOf(p) : -1, P = m.layersWithOutsidePointerEventsDisabled.size > 0, y = T >= g, _ =
|
|
540
|
+
} = e, m = c.useContext(en), [p, f] = c.useState(null), h = (p == null ? void 0 : p.ownerDocument) ?? (globalThis == null ? void 0 : globalThis.document), [, R] = c.useState({}), N = ye(t, (b) => f(b)), l = Array.from(m.layers), [S] = [...m.layersWithOutsidePointerEventsDisabled].slice(-1), g = l.indexOf(S), T = p ? l.indexOf(p) : -1, P = m.layersWithOutsidePointerEventsDisabled.size > 0, y = T >= g, _ = Mr((b) => {
|
|
541
541
|
const O = b.target, w = [...m.branches].some(($) => $.contains(O));
|
|
542
542
|
!y || w || (a == null || a(b), i == null || i(b), b.defaultPrevented || s == null || s());
|
|
543
|
-
}, h), F =
|
|
543
|
+
}, h), F = Ir((b) => {
|
|
544
544
|
const O = b.target;
|
|
545
545
|
[...m.branches].some(($) => $.contains(O)) || (o == null || o(b), i == null || i(b), b.defaultPrevented || s == null || s());
|
|
546
546
|
}, h);
|
|
547
|
-
return
|
|
547
|
+
return Nr((b) => {
|
|
548
548
|
T === m.layers.size - 1 && (r == null || r(b), !b.defaultPrevented && s && (b.preventDefault(), s()));
|
|
549
549
|
}, h), c.useEffect(() => {
|
|
550
550
|
if (p)
|
|
@@ -565,9 +565,9 @@ var Nr = "DismissableLayer", pt = "dismissableLayer.update", Or = "dismissableLa
|
|
|
565
565
|
pointerEvents: P ? y ? "auto" : "none" : void 0,
|
|
566
566
|
...e.style
|
|
567
567
|
},
|
|
568
|
-
onFocusCapture:
|
|
569
|
-
onBlurCapture:
|
|
570
|
-
onPointerDownCapture:
|
|
568
|
+
onFocusCapture: pe(e.onFocusCapture, F.onFocusCapture),
|
|
569
|
+
onBlurCapture: pe(e.onBlurCapture, F.onBlurCapture),
|
|
570
|
+
onPointerDownCapture: pe(
|
|
571
571
|
e.onPointerDownCapture,
|
|
572
572
|
_.onPointerDownCapture
|
|
573
573
|
)
|
|
@@ -575,8 +575,8 @@ var Nr = "DismissableLayer", pt = "dismissableLayer.update", Or = "dismissableLa
|
|
|
575
575
|
);
|
|
576
576
|
}
|
|
577
577
|
);
|
|
578
|
-
tn.displayName =
|
|
579
|
-
var
|
|
578
|
+
tn.displayName = Or;
|
|
579
|
+
var _r = "DismissableLayerBranch", kr = c.forwardRef((e, t) => {
|
|
580
580
|
const n = c.useContext(en), r = c.useRef(null), a = ye(t, r);
|
|
581
581
|
return c.useEffect(() => {
|
|
582
582
|
const o = r.current;
|
|
@@ -586,8 +586,8 @@ var Ar = "DismissableLayerBranch", _r = c.forwardRef((e, t) => {
|
|
|
586
586
|
};
|
|
587
587
|
}, [n.branches]), /* @__PURE__ */ d.jsx(ie.div, { ...e, ref: a });
|
|
588
588
|
});
|
|
589
|
-
|
|
590
|
-
function
|
|
589
|
+
kr.displayName = _r;
|
|
590
|
+
function Mr(e, t = globalThis == null ? void 0 : globalThis.document) {
|
|
591
591
|
const n = Ie(e), r = c.useRef(!1), a = c.useRef(() => {
|
|
592
592
|
});
|
|
593
593
|
return c.useEffect(() => {
|
|
@@ -595,7 +595,7 @@ function kr(e, t = globalThis == null ? void 0 : globalThis.document) {
|
|
|
595
595
|
if (s.target && !r.current) {
|
|
596
596
|
let v = function() {
|
|
597
597
|
nn(
|
|
598
|
-
|
|
598
|
+
Dr,
|
|
599
599
|
n,
|
|
600
600
|
m,
|
|
601
601
|
{ discrete: !0 }
|
|
@@ -617,11 +617,11 @@ function kr(e, t = globalThis == null ? void 0 : globalThis.document) {
|
|
|
617
617
|
onPointerDownCapture: () => r.current = !0
|
|
618
618
|
};
|
|
619
619
|
}
|
|
620
|
-
function
|
|
620
|
+
function Ir(e, t = globalThis == null ? void 0 : globalThis.document) {
|
|
621
621
|
const n = Ie(e), r = c.useRef(!1);
|
|
622
622
|
return c.useEffect(() => {
|
|
623
623
|
const a = (o) => {
|
|
624
|
-
o.target && !r.current && nn(
|
|
624
|
+
o.target && !r.current && nn(Ar, n, { originalEvent: o }, {
|
|
625
625
|
discrete: !1
|
|
626
626
|
});
|
|
627
627
|
};
|
|
@@ -637,9 +637,9 @@ function jt() {
|
|
|
637
637
|
}
|
|
638
638
|
function nn(e, t, n, { discrete: r }) {
|
|
639
639
|
const a = n.originalEvent.target, o = new CustomEvent(e, { bubbles: !1, cancelable: !0, detail: n });
|
|
640
|
-
t && a.addEventListener(e, t, { once: !0 }), r ?
|
|
640
|
+
t && a.addEventListener(e, t, { once: !0 }), r ? Pr(a, o) : a.dispatchEvent(o);
|
|
641
641
|
}
|
|
642
|
-
var nt = "focusScope.autoFocusOnMount", rt = "focusScope.autoFocusOnUnmount", $t = { bubbles: !1, cancelable: !0 },
|
|
642
|
+
var nt = "focusScope.autoFocusOnMount", rt = "focusScope.autoFocusOnUnmount", $t = { bubbles: !1, cancelable: !0 }, jr = "FocusScope", rn = c.forwardRef((e, t) => {
|
|
643
643
|
const {
|
|
644
644
|
loop: n = !1,
|
|
645
645
|
trapped: r = !1,
|
|
@@ -660,15 +660,15 @@ var nt = "focusScope.autoFocusOnMount", rt = "focusScope.autoFocusOnUnmount", $t
|
|
|
660
660
|
let l = function(P) {
|
|
661
661
|
if (R.paused || !s) return;
|
|
662
662
|
const y = P.target;
|
|
663
|
-
s.contains(y) ? f.current = y :
|
|
663
|
+
s.contains(y) ? f.current = y : me(f.current, { select: !0 });
|
|
664
664
|
}, S = function(P) {
|
|
665
665
|
if (R.paused || !s) return;
|
|
666
666
|
const y = P.relatedTarget;
|
|
667
|
-
y !== null && (s.contains(y) ||
|
|
667
|
+
y !== null && (s.contains(y) || me(f.current, { select: !0 }));
|
|
668
668
|
}, g = function(P) {
|
|
669
669
|
if (document.activeElement === document.body)
|
|
670
670
|
for (const _ of P)
|
|
671
|
-
_.removedNodes.length > 0 &&
|
|
671
|
+
_.removedNodes.length > 0 && me(s);
|
|
672
672
|
};
|
|
673
673
|
document.addEventListener("focusin", l), document.addEventListener("focusout", S);
|
|
674
674
|
const T = new MutationObserver(g);
|
|
@@ -682,12 +682,12 @@ var nt = "focusScope.autoFocusOnMount", rt = "focusScope.autoFocusOnUnmount", $t
|
|
|
682
682
|
const l = document.activeElement;
|
|
683
683
|
if (!s.contains(l)) {
|
|
684
684
|
const g = new CustomEvent(nt, $t);
|
|
685
|
-
s.addEventListener(nt, m), s.dispatchEvent(g), g.defaultPrevented || (
|
|
685
|
+
s.addEventListener(nt, m), s.dispatchEvent(g), g.defaultPrevented || ($r(Ur(an(s)), { select: !0 }), document.activeElement === l && me(s));
|
|
686
686
|
}
|
|
687
687
|
return () => {
|
|
688
688
|
s.removeEventListener(nt, m), setTimeout(() => {
|
|
689
689
|
const g = new CustomEvent(rt, $t);
|
|
690
|
-
s.addEventListener(rt, p), s.dispatchEvent(g), g.defaultPrevented ||
|
|
690
|
+
s.addEventListener(rt, p), s.dispatchEvent(g), g.defaultPrevented || me(l ?? document.body, { select: !0 }), s.removeEventListener(rt, p), Ft.remove(R);
|
|
691
691
|
}, 0);
|
|
692
692
|
};
|
|
693
693
|
}
|
|
@@ -697,21 +697,21 @@ var nt = "focusScope.autoFocusOnMount", rt = "focusScope.autoFocusOnUnmount", $t
|
|
|
697
697
|
if (!n && !r || R.paused) return;
|
|
698
698
|
const S = l.key === "Tab" && !l.altKey && !l.ctrlKey && !l.metaKey, g = document.activeElement;
|
|
699
699
|
if (S && g) {
|
|
700
|
-
const T = l.currentTarget, [P, y] =
|
|
701
|
-
P && y ? !l.shiftKey && g === y ? (l.preventDefault(), n &&
|
|
700
|
+
const T = l.currentTarget, [P, y] = Lr(T);
|
|
701
|
+
P && y ? !l.shiftKey && g === y ? (l.preventDefault(), n && me(P, { select: !0 })) : l.shiftKey && g === P && (l.preventDefault(), n && me(y, { select: !0 })) : g === T && l.preventDefault();
|
|
702
702
|
}
|
|
703
703
|
},
|
|
704
704
|
[n, r, R.paused]
|
|
705
705
|
);
|
|
706
706
|
return /* @__PURE__ */ d.jsx(ie.div, { tabIndex: -1, ...i, ref: h, onKeyDown: N });
|
|
707
707
|
});
|
|
708
|
-
rn.displayName =
|
|
709
|
-
function
|
|
708
|
+
rn.displayName = jr;
|
|
709
|
+
function $r(e, { select: t = !1 } = {}) {
|
|
710
710
|
const n = document.activeElement;
|
|
711
711
|
for (const r of e)
|
|
712
|
-
if (
|
|
712
|
+
if (me(r, { select: t }), document.activeElement !== n) return;
|
|
713
713
|
}
|
|
714
|
-
function
|
|
714
|
+
function Lr(e) {
|
|
715
715
|
const t = an(e), n = Lt(t, e), r = Lt(t.reverse(), e);
|
|
716
716
|
return [n, r];
|
|
717
717
|
}
|
|
@@ -727,9 +727,9 @@ function an(e) {
|
|
|
727
727
|
}
|
|
728
728
|
function Lt(e, t) {
|
|
729
729
|
for (const n of e)
|
|
730
|
-
if (!
|
|
730
|
+
if (!Fr(n, { upTo: t })) return n;
|
|
731
731
|
}
|
|
732
|
-
function
|
|
732
|
+
function Fr(e, { upTo: t }) {
|
|
733
733
|
if (getComputedStyle(e).visibility === "hidden") return !0;
|
|
734
734
|
for (; e; ) {
|
|
735
735
|
if (t !== void 0 && e === t) return !1;
|
|
@@ -738,17 +738,17 @@ function Lr(e, { upTo: t }) {
|
|
|
738
738
|
}
|
|
739
739
|
return !1;
|
|
740
740
|
}
|
|
741
|
-
function
|
|
741
|
+
function Wr(e) {
|
|
742
742
|
return e instanceof HTMLInputElement && "select" in e;
|
|
743
743
|
}
|
|
744
|
-
function
|
|
744
|
+
function me(e, { select: t = !1 } = {}) {
|
|
745
745
|
if (e && e.focus) {
|
|
746
746
|
const n = document.activeElement;
|
|
747
|
-
e.focus({ preventScroll: !0 }), e !== n &&
|
|
747
|
+
e.focus({ preventScroll: !0 }), e !== n && Wr(e) && t && e.select();
|
|
748
748
|
}
|
|
749
749
|
}
|
|
750
|
-
var Ft =
|
|
751
|
-
function
|
|
750
|
+
var Ft = Br();
|
|
751
|
+
function Br() {
|
|
752
752
|
let e = [];
|
|
753
753
|
return {
|
|
754
754
|
add(t) {
|
|
@@ -765,27 +765,27 @@ function Wt(e, t) {
|
|
|
765
765
|
const n = [...e], r = n.indexOf(t);
|
|
766
766
|
return r !== -1 && n.splice(r, 1), n;
|
|
767
767
|
}
|
|
768
|
-
function
|
|
768
|
+
function Ur(e) {
|
|
769
769
|
return e.filter((t) => t.tagName !== "A");
|
|
770
770
|
}
|
|
771
|
-
var
|
|
771
|
+
var Hr = "Portal", on = c.forwardRef((e, t) => {
|
|
772
772
|
var s;
|
|
773
773
|
const { container: n, ...r } = e, [a, o] = c.useState(!1);
|
|
774
774
|
Me(() => o(!0), []);
|
|
775
775
|
const i = n || a && ((s = globalThis == null ? void 0 : globalThis.document) == null ? void 0 : s.body);
|
|
776
|
-
return i ?
|
|
776
|
+
return i ? ir.createPortal(/* @__PURE__ */ d.jsx(ie.div, { ...r, ref: t }), i) : null;
|
|
777
777
|
});
|
|
778
|
-
on.displayName =
|
|
779
|
-
function
|
|
778
|
+
on.displayName = Hr;
|
|
779
|
+
function Vr(e, t) {
|
|
780
780
|
return c.useReducer((n, r) => t[n][r] ?? n, e);
|
|
781
781
|
}
|
|
782
782
|
var Je = (e) => {
|
|
783
|
-
const { present: t, children: n } = e, r =
|
|
783
|
+
const { present: t, children: n } = e, r = Yr(t), a = typeof n == "function" ? n({ present: r.isPresent }) : c.Children.only(n), o = ye(r.ref, zr(a));
|
|
784
784
|
return typeof n == "function" || r.isPresent ? c.cloneElement(a, { ref: o }) : null;
|
|
785
785
|
};
|
|
786
786
|
Je.displayName = "Presence";
|
|
787
|
-
function
|
|
788
|
-
const [t, n] = c.useState(), r = c.useRef(null), a = c.useRef(e), o = c.useRef("none"), i = e ? "mounted" : "unmounted", [s, v] =
|
|
787
|
+
function Yr(e) {
|
|
788
|
+
const [t, n] = c.useState(), r = c.useRef(null), a = c.useRef(e), o = c.useRef("none"), i = e ? "mounted" : "unmounted", [s, v] = Vr(i, {
|
|
789
789
|
mounted: {
|
|
790
790
|
UNMOUNT: "unmounted",
|
|
791
791
|
ANIMATION_OUT: "unmountSuspended"
|
|
@@ -836,13 +836,13 @@ function Vr(e) {
|
|
|
836
836
|
function We(e) {
|
|
837
837
|
return (e == null ? void 0 : e.animationName) || "none";
|
|
838
838
|
}
|
|
839
|
-
function
|
|
839
|
+
function zr(e) {
|
|
840
840
|
var r, a;
|
|
841
841
|
let t = (r = Object.getOwnPropertyDescriptor(e.props, "ref")) == null ? void 0 : r.get, n = t && "isReactWarning" in t && t.isReactWarning;
|
|
842
842
|
return n ? e.ref : (t = (a = Object.getOwnPropertyDescriptor(e, "ref")) == null ? void 0 : a.get, n = t && "isReactWarning" in t && t.isReactWarning, n ? e.props.ref : e.props.ref || e.ref);
|
|
843
843
|
}
|
|
844
844
|
var at = 0;
|
|
845
|
-
function
|
|
845
|
+
function qr() {
|
|
846
846
|
c.useEffect(() => {
|
|
847
847
|
const e = document.querySelectorAll("[data-radix-focus-guard]");
|
|
848
848
|
return document.body.insertAdjacentElement("afterbegin", e[0] ?? Bt()), document.body.insertAdjacentElement("beforeend", e[1] ?? Bt()), at++, () => {
|
|
@@ -871,16 +871,16 @@ function sn(e, t) {
|
|
|
871
871
|
t.indexOf(r[a]) < 0 && Object.prototype.propertyIsEnumerable.call(e, r[a]) && (n[r[a]] = e[r[a]]);
|
|
872
872
|
return n;
|
|
873
873
|
}
|
|
874
|
-
function
|
|
874
|
+
function Xr(e, t, n) {
|
|
875
875
|
if (n || arguments.length === 2) for (var r = 0, a = t.length, o; r < a; r++)
|
|
876
876
|
(o || !(r in t)) && (o || (o = Array.prototype.slice.call(t, 0, r)), o[r] = t[r]);
|
|
877
877
|
return e.concat(o || Array.prototype.slice.call(t));
|
|
878
878
|
}
|
|
879
|
-
var Xe = "right-scroll-bar-position", Ge = "width-before-scroll-bar",
|
|
879
|
+
var Xe = "right-scroll-bar-position", Ge = "width-before-scroll-bar", Gr = "with-scroll-bars-hidden", Kr = "--removed-body-scroll-bar-size";
|
|
880
880
|
function ot(e, t) {
|
|
881
881
|
return typeof e == "function" ? e(t) : e && (e.current = t), e;
|
|
882
882
|
}
|
|
883
|
-
function
|
|
883
|
+
function Jr(e, t) {
|
|
884
884
|
var n = qe(function() {
|
|
885
885
|
return {
|
|
886
886
|
// value
|
|
@@ -901,14 +901,14 @@ function Kr(e, t) {
|
|
|
901
901
|
})[0];
|
|
902
902
|
return n.callback = t, n.facade;
|
|
903
903
|
}
|
|
904
|
-
var
|
|
905
|
-
function
|
|
906
|
-
var n =
|
|
904
|
+
var Zr = typeof window < "u" ? c.useLayoutEffect : c.useEffect, Ut = /* @__PURE__ */ new WeakMap();
|
|
905
|
+
function Qr(e, t) {
|
|
906
|
+
var n = Jr(null, function(r) {
|
|
907
907
|
return e.forEach(function(a) {
|
|
908
908
|
return ot(a, r);
|
|
909
909
|
});
|
|
910
910
|
});
|
|
911
|
-
return
|
|
911
|
+
return Zr(function() {
|
|
912
912
|
var r = Ut.get(n);
|
|
913
913
|
if (r) {
|
|
914
914
|
var a = new Set(r), o = new Set(e), i = n.current;
|
|
@@ -921,11 +921,11 @@ function Zr(e, t) {
|
|
|
921
921
|
Ut.set(n, e);
|
|
922
922
|
}, [e]), n;
|
|
923
923
|
}
|
|
924
|
-
function
|
|
924
|
+
function ea(e) {
|
|
925
925
|
return e;
|
|
926
926
|
}
|
|
927
|
-
function
|
|
928
|
-
t === void 0 && (t =
|
|
927
|
+
function ta(e, t) {
|
|
928
|
+
t === void 0 && (t = ea);
|
|
929
929
|
var n = [], r = !1, a = {
|
|
930
930
|
read: function() {
|
|
931
931
|
if (r)
|
|
@@ -979,9 +979,9 @@ function ea(e, t) {
|
|
|
979
979
|
};
|
|
980
980
|
return a;
|
|
981
981
|
}
|
|
982
|
-
function
|
|
982
|
+
function na(e) {
|
|
983
983
|
e === void 0 && (e = {});
|
|
984
|
-
var t =
|
|
984
|
+
var t = ta(null);
|
|
985
985
|
return t.options = se({ async: !0, ssr: !1 }, e), t;
|
|
986
986
|
}
|
|
987
987
|
var cn = function(e) {
|
|
@@ -994,16 +994,16 @@ var cn = function(e) {
|
|
|
994
994
|
return c.createElement(r, se({}, n));
|
|
995
995
|
};
|
|
996
996
|
cn.isSideCarExport = !0;
|
|
997
|
-
function
|
|
997
|
+
function ra(e, t) {
|
|
998
998
|
return e.useMedium(t), cn;
|
|
999
999
|
}
|
|
1000
|
-
var ln =
|
|
1000
|
+
var ln = na(), st = function() {
|
|
1001
1001
|
}, Ze = c.forwardRef(function(e, t) {
|
|
1002
1002
|
var n = c.useRef(null), r = c.useState({
|
|
1003
1003
|
onScrollCapture: st,
|
|
1004
1004
|
onWheelCapture: st,
|
|
1005
1005
|
onTouchMoveCapture: st
|
|
1006
|
-
}), a = r[0], o = r[1], i = e.forwardProps, s = e.children, v = e.className, m = e.removeScrollBar, p = e.enabled, f = e.shards, h = e.sideCar, R = e.noRelative, N = e.noIsolation, l = e.inert, S = e.allowPinchZoom, g = e.as, T = g === void 0 ? "div" : g, P = e.gapMode, y = sn(e, ["forwardProps", "children", "className", "removeScrollBar", "enabled", "shards", "sideCar", "noRelative", "noIsolation", "inert", "allowPinchZoom", "as", "gapMode"]), _ = h, F =
|
|
1006
|
+
}), a = r[0], o = r[1], i = e.forwardProps, s = e.children, v = e.className, m = e.removeScrollBar, p = e.enabled, f = e.shards, h = e.sideCar, R = e.noRelative, N = e.noIsolation, l = e.inert, S = e.allowPinchZoom, g = e.as, T = g === void 0 ? "div" : g, P = e.gapMode, y = sn(e, ["forwardProps", "children", "className", "removeScrollBar", "enabled", "shards", "sideCar", "noRelative", "noIsolation", "inert", "allowPinchZoom", "as", "gapMode"]), _ = h, F = Qr([n, t]), b = se(se({}, y), a);
|
|
1007
1007
|
return c.createElement(
|
|
1008
1008
|
c.Fragment,
|
|
1009
1009
|
null,
|
|
@@ -1020,37 +1020,37 @@ Ze.classNames = {
|
|
|
1020
1020
|
fullWidth: Ge,
|
|
1021
1021
|
zeroRight: Xe
|
|
1022
1022
|
};
|
|
1023
|
-
var
|
|
1023
|
+
var aa = function() {
|
|
1024
1024
|
if (typeof __webpack_nonce__ < "u")
|
|
1025
1025
|
return __webpack_nonce__;
|
|
1026
1026
|
};
|
|
1027
|
-
function
|
|
1027
|
+
function oa() {
|
|
1028
1028
|
if (!document)
|
|
1029
1029
|
return null;
|
|
1030
1030
|
var e = document.createElement("style");
|
|
1031
1031
|
e.type = "text/css";
|
|
1032
|
-
var t =
|
|
1032
|
+
var t = aa();
|
|
1033
1033
|
return t && e.setAttribute("nonce", t), e;
|
|
1034
1034
|
}
|
|
1035
|
-
function
|
|
1035
|
+
function sa(e, t) {
|
|
1036
1036
|
e.styleSheet ? e.styleSheet.cssText = t : e.appendChild(document.createTextNode(t));
|
|
1037
1037
|
}
|
|
1038
|
-
function
|
|
1038
|
+
function ia(e) {
|
|
1039
1039
|
var t = document.head || document.getElementsByTagName("head")[0];
|
|
1040
1040
|
t.appendChild(e);
|
|
1041
1041
|
}
|
|
1042
|
-
var
|
|
1042
|
+
var ca = function() {
|
|
1043
1043
|
var e = 0, t = null;
|
|
1044
1044
|
return {
|
|
1045
1045
|
add: function(n) {
|
|
1046
|
-
e == 0 && (t =
|
|
1046
|
+
e == 0 && (t = oa()) && (sa(t, n), ia(t)), e++;
|
|
1047
1047
|
},
|
|
1048
1048
|
remove: function() {
|
|
1049
1049
|
e--, !e && t && (t.parentNode && t.parentNode.removeChild(t), t = null);
|
|
1050
1050
|
}
|
|
1051
1051
|
};
|
|
1052
|
-
},
|
|
1053
|
-
var e =
|
|
1052
|
+
}, la = function() {
|
|
1053
|
+
var e = ca();
|
|
1054
1054
|
return function(t, n) {
|
|
1055
1055
|
c.useEffect(function() {
|
|
1056
1056
|
return e.add(t), function() {
|
|
@@ -1059,35 +1059,35 @@ var ia = function() {
|
|
|
1059
1059
|
}, [t && n]);
|
|
1060
1060
|
};
|
|
1061
1061
|
}, un = function() {
|
|
1062
|
-
var e =
|
|
1062
|
+
var e = la(), t = function(n) {
|
|
1063
1063
|
var r = n.styles, a = n.dynamic;
|
|
1064
1064
|
return e(r, a), null;
|
|
1065
1065
|
};
|
|
1066
1066
|
return t;
|
|
1067
|
-
},
|
|
1067
|
+
}, ua = {
|
|
1068
1068
|
left: 0,
|
|
1069
1069
|
top: 0,
|
|
1070
1070
|
right: 0,
|
|
1071
1071
|
gap: 0
|
|
1072
1072
|
}, it = function(e) {
|
|
1073
1073
|
return parseInt(e || "", 10) || 0;
|
|
1074
|
-
},
|
|
1074
|
+
}, da = function(e) {
|
|
1075
1075
|
var t = window.getComputedStyle(document.body), n = t[e === "padding" ? "paddingLeft" : "marginLeft"], r = t[e === "padding" ? "paddingTop" : "marginTop"], a = t[e === "padding" ? "paddingRight" : "marginRight"];
|
|
1076
1076
|
return [it(n), it(r), it(a)];
|
|
1077
|
-
},
|
|
1077
|
+
}, fa = function(e) {
|
|
1078
1078
|
if (e === void 0 && (e = "margin"), typeof window > "u")
|
|
1079
|
-
return
|
|
1080
|
-
var t =
|
|
1079
|
+
return ua;
|
|
1080
|
+
var t = da(e), n = document.documentElement.clientWidth, r = window.innerWidth;
|
|
1081
1081
|
return {
|
|
1082
1082
|
left: t[0],
|
|
1083
1083
|
top: t[1],
|
|
1084
1084
|
right: t[2],
|
|
1085
1085
|
gap: Math.max(0, r - n + t[2] - t[0])
|
|
1086
1086
|
};
|
|
1087
|
-
},
|
|
1087
|
+
}, ma = un(), Te = "data-scroll-locked", pa = function(e, t, n, r) {
|
|
1088
1088
|
var a = e.left, o = e.top, i = e.right, s = e.gap;
|
|
1089
1089
|
return n === void 0 && (n = "margin"), `
|
|
1090
|
-
.`.concat(
|
|
1090
|
+
.`.concat(Gr, ` {
|
|
1091
1091
|
overflow: hidden `).concat(r, `;
|
|
1092
1092
|
padding-right: `).concat(s, "px ").concat(r, `;
|
|
1093
1093
|
}
|
|
@@ -1125,26 +1125,26 @@ var ia = function() {
|
|
|
1125
1125
|
}
|
|
1126
1126
|
|
|
1127
1127
|
body[`).concat(Te, `] {
|
|
1128
|
-
`).concat(
|
|
1128
|
+
`).concat(Kr, ": ").concat(s, `px;
|
|
1129
1129
|
}
|
|
1130
1130
|
`);
|
|
1131
1131
|
}, Ht = function() {
|
|
1132
1132
|
var e = parseInt(document.body.getAttribute(Te) || "0", 10);
|
|
1133
1133
|
return isFinite(e) ? e : 0;
|
|
1134
|
-
},
|
|
1134
|
+
}, va = function() {
|
|
1135
1135
|
c.useEffect(function() {
|
|
1136
1136
|
return document.body.setAttribute(Te, (Ht() + 1).toString()), function() {
|
|
1137
1137
|
var e = Ht() - 1;
|
|
1138
1138
|
e <= 0 ? document.body.removeAttribute(Te) : document.body.setAttribute(Te, e.toString());
|
|
1139
1139
|
};
|
|
1140
1140
|
}, []);
|
|
1141
|
-
},
|
|
1141
|
+
}, ha = function(e) {
|
|
1142
1142
|
var t = e.noRelative, n = e.noImportant, r = e.gapMode, a = r === void 0 ? "margin" : r;
|
|
1143
|
-
|
|
1143
|
+
va();
|
|
1144
1144
|
var o = c.useMemo(function() {
|
|
1145
|
-
return
|
|
1145
|
+
return fa(a);
|
|
1146
1146
|
}, [a]);
|
|
1147
|
-
return c.createElement(
|
|
1147
|
+
return c.createElement(ma, { styles: pa(o, !t, a, n ? "" : "!important") });
|
|
1148
1148
|
}, vt = !1;
|
|
1149
1149
|
if (typeof window < "u")
|
|
1150
1150
|
try {
|
|
@@ -1157,7 +1157,7 @@ if (typeof window < "u")
|
|
|
1157
1157
|
} catch {
|
|
1158
1158
|
vt = !1;
|
|
1159
1159
|
}
|
|
1160
|
-
var Re = vt ? { passive: !1 } : !1,
|
|
1160
|
+
var Re = vt ? { passive: !1 } : !1, ga = function(e) {
|
|
1161
1161
|
return e.tagName === "TEXTAREA";
|
|
1162
1162
|
}, dn = function(e, t) {
|
|
1163
1163
|
if (!(e instanceof Element))
|
|
@@ -1166,11 +1166,11 @@ var Re = vt ? { passive: !1 } : !1, ha = function(e) {
|
|
|
1166
1166
|
return (
|
|
1167
1167
|
// not-not-scrollable
|
|
1168
1168
|
n[t] !== "hidden" && // contains scroll inside self
|
|
1169
|
-
!(n.overflowY === n.overflowX && !
|
|
1169
|
+
!(n.overflowY === n.overflowX && !ga(e) && n[t] === "visible")
|
|
1170
1170
|
);
|
|
1171
|
-
}, ga = function(e) {
|
|
1172
|
-
return dn(e, "overflowY");
|
|
1173
1171
|
}, wa = function(e) {
|
|
1172
|
+
return dn(e, "overflowY");
|
|
1173
|
+
}, ba = function(e) {
|
|
1174
1174
|
return dn(e, "overflowX");
|
|
1175
1175
|
}, Vt = function(e, t) {
|
|
1176
1176
|
var n = t.ownerDocument, r = t;
|
|
@@ -1185,14 +1185,14 @@ var Re = vt ? { passive: !1 } : !1, ha = function(e) {
|
|
|
1185
1185
|
r = r.parentNode;
|
|
1186
1186
|
} while (r && r !== n.body);
|
|
1187
1187
|
return !1;
|
|
1188
|
-
},
|
|
1188
|
+
}, ya = function(e) {
|
|
1189
1189
|
var t = e.scrollTop, n = e.scrollHeight, r = e.clientHeight;
|
|
1190
1190
|
return [
|
|
1191
1191
|
t,
|
|
1192
1192
|
n,
|
|
1193
1193
|
r
|
|
1194
1194
|
];
|
|
1195
|
-
},
|
|
1195
|
+
}, Ea = function(e) {
|
|
1196
1196
|
var t = e.scrollLeft, n = e.scrollWidth, r = e.clientWidth;
|
|
1197
1197
|
return [
|
|
1198
1198
|
t,
|
|
@@ -1200,13 +1200,13 @@ var Re = vt ? { passive: !1 } : !1, ha = function(e) {
|
|
|
1200
1200
|
r
|
|
1201
1201
|
];
|
|
1202
1202
|
}, fn = function(e, t) {
|
|
1203
|
-
return e === "v" ?
|
|
1203
|
+
return e === "v" ? wa(t) : ba(t);
|
|
1204
1204
|
}, mn = function(e, t) {
|
|
1205
|
-
return e === "v" ?
|
|
1206
|
-
},
|
|
1205
|
+
return e === "v" ? ya(t) : Ea(t);
|
|
1206
|
+
}, Sa = function(e, t) {
|
|
1207
1207
|
return e === "h" && t === "rtl" ? -1 : 1;
|
|
1208
|
-
},
|
|
1209
|
-
var o =
|
|
1208
|
+
}, Ra = function(e, t, n, r, a) {
|
|
1209
|
+
var o = Sa(e, window.getComputedStyle(t).direction), i = o * r, s = n.target, v = t.contains(s), m = !1, p = i > 0, f = 0, h = 0;
|
|
1210
1210
|
do {
|
|
1211
1211
|
if (!s)
|
|
1212
1212
|
break;
|
|
@@ -1226,22 +1226,22 @@ var Re = vt ? { passive: !1 } : !1, ha = function(e) {
|
|
|
1226
1226
|
return [e.deltaX, e.deltaY];
|
|
1227
1227
|
}, zt = function(e) {
|
|
1228
1228
|
return e && "current" in e ? e.current : e;
|
|
1229
|
-
},
|
|
1229
|
+
}, Ca = function(e, t) {
|
|
1230
1230
|
return e[0] === t[0] && e[1] === t[1];
|
|
1231
|
-
},
|
|
1231
|
+
}, xa = function(e) {
|
|
1232
1232
|
return `
|
|
1233
1233
|
.block-interactivity-`.concat(e, ` {pointer-events: none;}
|
|
1234
1234
|
.allow-interactivity-`).concat(e, ` {pointer-events: all;}
|
|
1235
1235
|
`);
|
|
1236
|
-
},
|
|
1237
|
-
function
|
|
1238
|
-
var t = c.useRef([]), n = c.useRef([0, 0]), r = c.useRef(), a = c.useState(
|
|
1236
|
+
}, Ta = 0, Ce = [];
|
|
1237
|
+
function Pa(e) {
|
|
1238
|
+
var t = c.useRef([]), n = c.useRef([0, 0]), r = c.useRef(), a = c.useState(Ta++)[0], o = c.useState(un)[0], i = c.useRef(e);
|
|
1239
1239
|
c.useEffect(function() {
|
|
1240
1240
|
i.current = e;
|
|
1241
1241
|
}, [e]), c.useEffect(function() {
|
|
1242
1242
|
if (e.inert) {
|
|
1243
1243
|
document.body.classList.add("block-interactivity-".concat(a));
|
|
1244
|
-
var l =
|
|
1244
|
+
var l = Xr([e.lockRef.current], (e.shards || []).map(zt), !0).filter(Boolean);
|
|
1245
1245
|
return l.forEach(function(S) {
|
|
1246
1246
|
return S.classList.add("allow-interactivity-".concat(a));
|
|
1247
1247
|
}), function() {
|
|
@@ -1268,12 +1268,12 @@ function Ta(e) {
|
|
|
1268
1268
|
if (!r.current && "changedTouches" in l && (P || y) && (r.current = _), !_)
|
|
1269
1269
|
return !0;
|
|
1270
1270
|
var Y = r.current || _;
|
|
1271
|
-
return
|
|
1271
|
+
return Ra(Y, S, l, Y === "h" ? P : y);
|
|
1272
1272
|
}, []), v = c.useCallback(function(l) {
|
|
1273
1273
|
var S = l;
|
|
1274
1274
|
if (!(!Ce.length || Ce[Ce.length - 1] !== o)) {
|
|
1275
1275
|
var g = "deltaY" in S ? Yt(S) : Ue(S), T = t.current.filter(function(_) {
|
|
1276
|
-
return _.name === S.type && (_.target === S.target || S.target === _.shadowParent) &&
|
|
1276
|
+
return _.name === S.type && (_.target === S.target || S.target === _.shadowParent) && Ca(_.delta, g);
|
|
1277
1277
|
})[0];
|
|
1278
1278
|
if (T && T.should) {
|
|
1279
1279
|
S.cancelable && S.preventDefault();
|
|
@@ -1287,7 +1287,7 @@ function Ta(e) {
|
|
|
1287
1287
|
}
|
|
1288
1288
|
}
|
|
1289
1289
|
}, []), m = c.useCallback(function(l, S, g, T) {
|
|
1290
|
-
var P = { name: l, delta: S, target: g, should: T, shadowParent:
|
|
1290
|
+
var P = { name: l, delta: S, target: g, should: T, shadowParent: Na(g) };
|
|
1291
1291
|
t.current.push(P), setTimeout(function() {
|
|
1292
1292
|
t.current = t.current.filter(function(y) {
|
|
1293
1293
|
return y !== P;
|
|
@@ -1315,28 +1315,28 @@ function Ta(e) {
|
|
|
1315
1315
|
return c.createElement(
|
|
1316
1316
|
c.Fragment,
|
|
1317
1317
|
null,
|
|
1318
|
-
N ? c.createElement(o, { styles:
|
|
1319
|
-
R ? c.createElement(
|
|
1318
|
+
N ? c.createElement(o, { styles: xa(a) }) : null,
|
|
1319
|
+
R ? c.createElement(ha, { noRelative: e.noRelative, gapMode: e.gapMode }) : null
|
|
1320
1320
|
);
|
|
1321
1321
|
}
|
|
1322
|
-
function
|
|
1322
|
+
function Na(e) {
|
|
1323
1323
|
for (var t = null; e !== null; )
|
|
1324
1324
|
e instanceof ShadowRoot && (t = e.host, e = e.host), e = e.parentNode;
|
|
1325
1325
|
return t;
|
|
1326
1326
|
}
|
|
1327
|
-
const
|
|
1327
|
+
const Oa = ra(ln, Pa);
|
|
1328
1328
|
var pn = c.forwardRef(function(e, t) {
|
|
1329
|
-
return c.createElement(Ze, se({}, e, { ref: t, sideCar:
|
|
1329
|
+
return c.createElement(Ze, se({}, e, { ref: t, sideCar: Oa }));
|
|
1330
1330
|
});
|
|
1331
1331
|
pn.classNames = Ze.classNames;
|
|
1332
|
-
var
|
|
1332
|
+
var Da = function(e) {
|
|
1333
1333
|
if (typeof document > "u")
|
|
1334
1334
|
return null;
|
|
1335
1335
|
var t = Array.isArray(e) ? e[0] : e;
|
|
1336
1336
|
return t.ownerDocument.body;
|
|
1337
1337
|
}, xe = /* @__PURE__ */ new WeakMap(), He = /* @__PURE__ */ new WeakMap(), Ve = {}, ct = 0, vn = function(e) {
|
|
1338
1338
|
return e && (e.host || vn(e.parentNode));
|
|
1339
|
-
},
|
|
1339
|
+
}, Aa = function(e, t) {
|
|
1340
1340
|
return t.map(function(n) {
|
|
1341
1341
|
if (e.contains(n))
|
|
1342
1342
|
return n;
|
|
@@ -1345,8 +1345,8 @@ var Oa = function(e) {
|
|
|
1345
1345
|
}).filter(function(n) {
|
|
1346
1346
|
return !!n;
|
|
1347
1347
|
});
|
|
1348
|
-
},
|
|
1349
|
-
var a =
|
|
1348
|
+
}, _a = function(e, t, n, r) {
|
|
1349
|
+
var a = Aa(t, Array.isArray(e) ? e : [e]);
|
|
1350
1350
|
Ve[n] || (Ve[n] = /* @__PURE__ */ new WeakMap());
|
|
1351
1351
|
var o = Ve[n], i = [], s = /* @__PURE__ */ new Set(), v = new Set(a), m = function(f) {
|
|
1352
1352
|
!f || s.has(f) || (s.add(f), m(f.parentNode));
|
|
@@ -1371,13 +1371,13 @@ var Oa = function(e) {
|
|
|
1371
1371
|
xe.set(f, h), o.set(f, R), h || (He.has(f) || f.removeAttribute(r), He.delete(f)), R || f.removeAttribute(n);
|
|
1372
1372
|
}), ct--, ct || (xe = /* @__PURE__ */ new WeakMap(), xe = /* @__PURE__ */ new WeakMap(), He = /* @__PURE__ */ new WeakMap(), Ve = {});
|
|
1373
1373
|
};
|
|
1374
|
-
},
|
|
1374
|
+
}, ka = function(e, t, n) {
|
|
1375
1375
|
n === void 0 && (n = "data-aria-hidden");
|
|
1376
|
-
var r = Array.from(Array.isArray(e) ? e : [e]), a =
|
|
1377
|
-
return a ? (r.push.apply(r, Array.from(a.querySelectorAll("[aria-live], script"))),
|
|
1376
|
+
var r = Array.from(Array.isArray(e) ? e : [e]), a = Da(e);
|
|
1377
|
+
return a ? (r.push.apply(r, Array.from(a.querySelectorAll("[aria-live], script"))), _a(r, a, n, "aria-hidden")) : function() {
|
|
1378
1378
|
return null;
|
|
1379
1379
|
};
|
|
1380
|
-
}, Qe = "Dialog", [hn] =
|
|
1380
|
+
}, Qe = "Dialog", [hn] = mr(Qe), [Ma, ae] = hn(Qe), gn = (e) => {
|
|
1381
1381
|
const {
|
|
1382
1382
|
__scopeDialog: t,
|
|
1383
1383
|
children: n,
|
|
@@ -1385,14 +1385,14 @@ var Oa = function(e) {
|
|
|
1385
1385
|
defaultOpen: a,
|
|
1386
1386
|
onOpenChange: o,
|
|
1387
1387
|
modal: i = !0
|
|
1388
|
-
} = e, s = c.useRef(null), v = c.useRef(null), [m, p] =
|
|
1388
|
+
} = e, s = c.useRef(null), v = c.useRef(null), [m, p] = wr({
|
|
1389
1389
|
prop: r,
|
|
1390
1390
|
defaultProp: a ?? !1,
|
|
1391
1391
|
onChange: o,
|
|
1392
1392
|
caller: Qe
|
|
1393
1393
|
});
|
|
1394
1394
|
return /* @__PURE__ */ d.jsx(
|
|
1395
|
-
|
|
1395
|
+
Ma,
|
|
1396
1396
|
{
|
|
1397
1397
|
scope: t,
|
|
1398
1398
|
triggerRef: s,
|
|
@@ -1409,7 +1409,7 @@ var Oa = function(e) {
|
|
|
1409
1409
|
);
|
|
1410
1410
|
};
|
|
1411
1411
|
gn.displayName = Qe;
|
|
1412
|
-
var wn = "DialogTrigger",
|
|
1412
|
+
var wn = "DialogTrigger", bn = c.forwardRef(
|
|
1413
1413
|
(e, t) => {
|
|
1414
1414
|
const { __scopeDialog: n, ...r } = e, a = ae(wn, n), o = ye(t, a.triggerRef);
|
|
1415
1415
|
return /* @__PURE__ */ d.jsx(
|
|
@@ -1422,26 +1422,26 @@ var wn = "DialogTrigger", Ma = c.forwardRef(
|
|
|
1422
1422
|
"data-state": yt(a.open),
|
|
1423
1423
|
...r,
|
|
1424
1424
|
ref: o,
|
|
1425
|
-
onClick:
|
|
1425
|
+
onClick: pe(e.onClick, a.onOpenToggle)
|
|
1426
1426
|
}
|
|
1427
1427
|
);
|
|
1428
1428
|
}
|
|
1429
1429
|
);
|
|
1430
|
-
|
|
1431
|
-
var wt = "DialogPortal", [Ia,
|
|
1430
|
+
bn.displayName = wn;
|
|
1431
|
+
var wt = "DialogPortal", [Ia, yn] = hn(wt, {
|
|
1432
1432
|
forceMount: void 0
|
|
1433
|
-
}),
|
|
1433
|
+
}), En = (e) => {
|
|
1434
1434
|
const { __scopeDialog: t, forceMount: n, children: r, container: a } = e, o = ae(wt, t);
|
|
1435
1435
|
return /* @__PURE__ */ d.jsx(Ia, { scope: t, forceMount: n, children: c.Children.map(r, (i) => /* @__PURE__ */ d.jsx(Je, { present: n || o.open, children: /* @__PURE__ */ d.jsx(on, { asChild: !0, container: a, children: i }) })) });
|
|
1436
1436
|
};
|
|
1437
|
-
|
|
1438
|
-
var Ke = "DialogOverlay",
|
|
1437
|
+
En.displayName = wt;
|
|
1438
|
+
var Ke = "DialogOverlay", Sn = c.forwardRef(
|
|
1439
1439
|
(e, t) => {
|
|
1440
|
-
const n =
|
|
1440
|
+
const n = yn(Ke, e.__scopeDialog), { forceMount: r = n.forceMount, ...a } = e, o = ae(Ke, e.__scopeDialog);
|
|
1441
1441
|
return o.modal ? /* @__PURE__ */ d.jsx(Je, { present: r || o.open, children: /* @__PURE__ */ d.jsx($a, { ...a, ref: t }) }) : null;
|
|
1442
1442
|
}
|
|
1443
1443
|
);
|
|
1444
|
-
|
|
1444
|
+
Sn.displayName = Ke;
|
|
1445
1445
|
var ja = /* @__PURE__ */ Qt("DialogOverlay.RemoveScroll"), $a = c.forwardRef(
|
|
1446
1446
|
(e, t) => {
|
|
1447
1447
|
const { __scopeDialog: n, ...r } = e, a = ae(Ke, n);
|
|
@@ -1459,35 +1459,35 @@ var ja = /* @__PURE__ */ Qt("DialogOverlay.RemoveScroll"), $a = c.forwardRef(
|
|
|
1459
1459
|
) })
|
|
1460
1460
|
);
|
|
1461
1461
|
}
|
|
1462
|
-
), be = "DialogContent",
|
|
1462
|
+
), be = "DialogContent", Rn = c.forwardRef(
|
|
1463
1463
|
(e, t) => {
|
|
1464
|
-
const n =
|
|
1464
|
+
const n = yn(be, e.__scopeDialog), { forceMount: r = n.forceMount, ...a } = e, o = ae(be, e.__scopeDialog);
|
|
1465
1465
|
return /* @__PURE__ */ d.jsx(Je, { present: r || o.open, children: o.modal ? /* @__PURE__ */ d.jsx(La, { ...a, ref: t }) : /* @__PURE__ */ d.jsx(Fa, { ...a, ref: t }) });
|
|
1466
1466
|
}
|
|
1467
1467
|
);
|
|
1468
|
-
|
|
1468
|
+
Rn.displayName = be;
|
|
1469
1469
|
var La = c.forwardRef(
|
|
1470
1470
|
(e, t) => {
|
|
1471
1471
|
const n = ae(be, e.__scopeDialog), r = c.useRef(null), a = ye(t, n.contentRef, r);
|
|
1472
1472
|
return c.useEffect(() => {
|
|
1473
1473
|
const o = r.current;
|
|
1474
|
-
if (o) return
|
|
1474
|
+
if (o) return ka(o);
|
|
1475
1475
|
}, []), /* @__PURE__ */ d.jsx(
|
|
1476
|
-
|
|
1476
|
+
Cn,
|
|
1477
1477
|
{
|
|
1478
1478
|
...e,
|
|
1479
1479
|
ref: a,
|
|
1480
1480
|
trapFocus: n.open,
|
|
1481
1481
|
disableOutsidePointerEvents: !0,
|
|
1482
|
-
onCloseAutoFocus:
|
|
1482
|
+
onCloseAutoFocus: pe(e.onCloseAutoFocus, (o) => {
|
|
1483
1483
|
var i;
|
|
1484
1484
|
o.preventDefault(), (i = n.triggerRef.current) == null || i.focus();
|
|
1485
1485
|
}),
|
|
1486
|
-
onPointerDownOutside:
|
|
1486
|
+
onPointerDownOutside: pe(e.onPointerDownOutside, (o) => {
|
|
1487
1487
|
const i = o.detail.originalEvent, s = i.button === 0 && i.ctrlKey === !0;
|
|
1488
1488
|
(i.button === 2 || s) && o.preventDefault();
|
|
1489
1489
|
}),
|
|
1490
|
-
onFocusOutside:
|
|
1490
|
+
onFocusOutside: pe(
|
|
1491
1491
|
e.onFocusOutside,
|
|
1492
1492
|
(o) => o.preventDefault()
|
|
1493
1493
|
)
|
|
@@ -1498,7 +1498,7 @@ var La = c.forwardRef(
|
|
|
1498
1498
|
(e, t) => {
|
|
1499
1499
|
const n = ae(be, e.__scopeDialog), r = c.useRef(!1), a = c.useRef(!1);
|
|
1500
1500
|
return /* @__PURE__ */ d.jsx(
|
|
1501
|
-
|
|
1501
|
+
Cn,
|
|
1502
1502
|
{
|
|
1503
1503
|
...e,
|
|
1504
1504
|
ref: t,
|
|
@@ -1517,10 +1517,10 @@ var La = c.forwardRef(
|
|
|
1517
1517
|
}
|
|
1518
1518
|
);
|
|
1519
1519
|
}
|
|
1520
|
-
),
|
|
1520
|
+
), Cn = c.forwardRef(
|
|
1521
1521
|
(e, t) => {
|
|
1522
1522
|
const { __scopeDialog: n, trapFocus: r, onOpenAutoFocus: a, onCloseAutoFocus: o, ...i } = e, s = ae(be, n), v = c.useRef(null), m = ye(t, v);
|
|
1523
|
-
return
|
|
1523
|
+
return qr(), /* @__PURE__ */ d.jsxs(d.Fragment, { children: [
|
|
1524
1524
|
/* @__PURE__ */ d.jsx(
|
|
1525
1525
|
rn,
|
|
1526
1526
|
{
|
|
@@ -1550,44 +1550,44 @@ var La = c.forwardRef(
|
|
|
1550
1550
|
] })
|
|
1551
1551
|
] });
|
|
1552
1552
|
}
|
|
1553
|
-
), bt = "DialogTitle",
|
|
1553
|
+
), bt = "DialogTitle", xn = c.forwardRef(
|
|
1554
1554
|
(e, t) => {
|
|
1555
1555
|
const { __scopeDialog: n, ...r } = e, a = ae(bt, n);
|
|
1556
1556
|
return /* @__PURE__ */ d.jsx(ie.h2, { id: a.titleId, ...r, ref: t });
|
|
1557
1557
|
}
|
|
1558
1558
|
);
|
|
1559
|
-
|
|
1560
|
-
var
|
|
1559
|
+
xn.displayName = bt;
|
|
1560
|
+
var Tn = "DialogDescription", Wa = c.forwardRef(
|
|
1561
1561
|
(e, t) => {
|
|
1562
|
-
const { __scopeDialog: n, ...r } = e, a = ae(
|
|
1562
|
+
const { __scopeDialog: n, ...r } = e, a = ae(Tn, n);
|
|
1563
1563
|
return /* @__PURE__ */ d.jsx(ie.p, { id: a.descriptionId, ...r, ref: t });
|
|
1564
1564
|
}
|
|
1565
1565
|
);
|
|
1566
|
-
Wa.displayName =
|
|
1567
|
-
var
|
|
1566
|
+
Wa.displayName = Tn;
|
|
1567
|
+
var Pn = "DialogClose", Nn = c.forwardRef(
|
|
1568
1568
|
(e, t) => {
|
|
1569
|
-
const { __scopeDialog: n, ...r } = e, a = ae(
|
|
1569
|
+
const { __scopeDialog: n, ...r } = e, a = ae(Pn, n);
|
|
1570
1570
|
return /* @__PURE__ */ d.jsx(
|
|
1571
1571
|
ie.button,
|
|
1572
1572
|
{
|
|
1573
1573
|
type: "button",
|
|
1574
1574
|
...r,
|
|
1575
1575
|
ref: t,
|
|
1576
|
-
onClick:
|
|
1576
|
+
onClick: pe(e.onClick, () => a.onOpenChange(!1))
|
|
1577
1577
|
}
|
|
1578
1578
|
);
|
|
1579
1579
|
}
|
|
1580
1580
|
);
|
|
1581
|
-
|
|
1581
|
+
Nn.displayName = Pn;
|
|
1582
1582
|
function yt(e) {
|
|
1583
1583
|
return e ? "open" : "closed";
|
|
1584
1584
|
}
|
|
1585
|
-
var
|
|
1585
|
+
var On = "DialogTitleWarning", [Lo, Dn] = fr(On, {
|
|
1586
1586
|
contentName: be,
|
|
1587
1587
|
titleName: bt,
|
|
1588
1588
|
docsSlug: "dialog"
|
|
1589
1589
|
}), Ba = ({ titleId: e }) => {
|
|
1590
|
-
const t = On
|
|
1590
|
+
const t = Dn(On), n = `\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
|
|
1591
1591
|
|
|
1592
1592
|
If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
1593
1593
|
|
|
@@ -1596,19 +1596,19 @@ For more information, see https://radix-ui.com/primitives/docs/components/${t.do
|
|
|
1596
1596
|
e && (document.getElementById(e) || console.error(n));
|
|
1597
1597
|
}, [n, e]), null;
|
|
1598
1598
|
}, Ua = "DialogDescriptionWarning", Ha = ({ contentRef: e, descriptionId: t }) => {
|
|
1599
|
-
const r = `Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${
|
|
1599
|
+
const r = `Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${Dn(Ua).contentName}}.`;
|
|
1600
1600
|
return c.useEffect(() => {
|
|
1601
1601
|
var o;
|
|
1602
1602
|
const a = (o = e.current) == null ? void 0 : o.getAttribute("aria-describedby");
|
|
1603
1603
|
t && a && (document.getElementById(t) || console.warn(r));
|
|
1604
1604
|
}, [r, e, t]), null;
|
|
1605
|
-
}, Va = gn, Ya =
|
|
1606
|
-
function
|
|
1605
|
+
}, Va = gn, Ya = bn, za = En, qa = Sn, Xa = Rn, Ga = xn, Ka = Nn;
|
|
1606
|
+
function Ja(e) {
|
|
1607
1607
|
if (typeof document > "u") return;
|
|
1608
1608
|
let t = document.head || document.getElementsByTagName("head")[0], n = document.createElement("style");
|
|
1609
1609
|
n.type = "text/css", t.appendChild(n), n.styleSheet ? n.styleSheet.cssText = e : n.appendChild(document.createTextNode(e));
|
|
1610
1610
|
}
|
|
1611
|
-
const
|
|
1611
|
+
const An = E.createContext({
|
|
1612
1612
|
drawerRef: {
|
|
1613
1613
|
current: null
|
|
1614
1614
|
},
|
|
@@ -1656,39 +1656,39 @@ const Dn = E.createContext({
|
|
|
1656
1656
|
container: null,
|
|
1657
1657
|
autoFocus: !1
|
|
1658
1658
|
}), je = () => {
|
|
1659
|
-
const e = E.useContext(
|
|
1659
|
+
const e = E.useContext(An);
|
|
1660
1660
|
if (!e)
|
|
1661
1661
|
throw new Error("useDrawerContext must be used within a Drawer.Root");
|
|
1662
1662
|
return e;
|
|
1663
1663
|
};
|
|
1664
|
-
|
|
1664
|
+
Ja(`[data-vaul-drawer]{touch-action:none;will-change:transform;transition:transform .5s cubic-bezier(.32, .72, 0, 1);animation-duration:.5s;animation-timing-function:cubic-bezier(0.32,0.72,0,1)}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=bottom][data-state=open]{animation-name:slideFromBottom}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=bottom][data-state=closed]{animation-name:slideToBottom}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=top][data-state=open]{animation-name:slideFromTop}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=top][data-state=closed]{animation-name:slideToTop}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=left][data-state=open]{animation-name:slideFromLeft}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=left][data-state=closed]{animation-name:slideToLeft}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=right][data-state=open]{animation-name:slideFromRight}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=right][data-state=closed]{animation-name:slideToRight}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=bottom]{transform:translate3d(0,var(--initial-transform,100%),0)}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=top]{transform:translate3d(0,calc(var(--initial-transform,100%) * -1),0)}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=left]{transform:translate3d(calc(var(--initial-transform,100%) * -1),0,0)}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=right]{transform:translate3d(var(--initial-transform,100%),0,0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=top]{transform:translate3d(0,var(--snap-point-height,0),0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=bottom]{transform:translate3d(0,var(--snap-point-height,0),0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=left]{transform:translate3d(var(--snap-point-height,0),0,0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=right]{transform:translate3d(var(--snap-point-height,0),0,0)}[data-vaul-overlay][data-vaul-snap-points=false]{animation-duration:.5s;animation-timing-function:cubic-bezier(0.32,0.72,0,1)}[data-vaul-overlay][data-vaul-snap-points=false][data-state=open]{animation-name:fadeIn}[data-vaul-overlay][data-state=closed]{animation-name:fadeOut}[data-vaul-animate=false]{animation:none!important}[data-vaul-overlay][data-vaul-snap-points=true]{opacity:0;transition:opacity .5s cubic-bezier(.32, .72, 0, 1)}[data-vaul-overlay][data-vaul-snap-points=true]{opacity:1}[data-vaul-drawer]:not([data-vaul-custom-container=true])::after{content:'';position:absolute;background:inherit;background-color:inherit}[data-vaul-drawer][data-vaul-drawer-direction=top]::after{top:initial;bottom:100%;left:0;right:0;height:200%}[data-vaul-drawer][data-vaul-drawer-direction=bottom]::after{top:100%;bottom:initial;left:0;right:0;height:200%}[data-vaul-drawer][data-vaul-drawer-direction=left]::after{left:initial;right:100%;top:0;bottom:0;width:200%}[data-vaul-drawer][data-vaul-drawer-direction=right]::after{left:100%;right:initial;top:0;bottom:0;width:200%}[data-vaul-overlay][data-vaul-snap-points=true]:not([data-vaul-snap-points-overlay=true]):not(
|
|
1665
1665
|
[data-state=closed]
|
|
1666
1666
|
){opacity:0}[data-vaul-overlay][data-vaul-snap-points-overlay=true]{opacity:1}[data-vaul-handle]{display:block;position:relative;opacity:.7;background:#e2e2e4;margin-left:auto;margin-right:auto;height:5px;width:32px;border-radius:1rem;touch-action:pan-y}[data-vaul-handle]:active,[data-vaul-handle]:hover{opacity:1}[data-vaul-handle-hitarea]{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);width:max(100%,2.75rem);height:max(100%,2.75rem);touch-action:inherit}@media (hover:hover) and (pointer:fine){[data-vaul-drawer]{user-select:none}}@media (pointer:fine){[data-vaul-handle-hitarea]:{width:100%;height:100%}}@keyframes fadeIn{from{opacity:0}to{opacity:1}}@keyframes fadeOut{to{opacity:0}}@keyframes slideFromBottom{from{transform:translate3d(0,var(--initial-transform,100%),0)}to{transform:translate3d(0,0,0)}}@keyframes slideToBottom{to{transform:translate3d(0,var(--initial-transform,100%),0)}}@keyframes slideFromTop{from{transform:translate3d(0,calc(var(--initial-transform,100%) * -1),0)}to{transform:translate3d(0,0,0)}}@keyframes slideToTop{to{transform:translate3d(0,calc(var(--initial-transform,100%) * -1),0)}}@keyframes slideFromLeft{from{transform:translate3d(calc(var(--initial-transform,100%) * -1),0,0)}to{transform:translate3d(0,0,0)}}@keyframes slideToLeft{to{transform:translate3d(calc(var(--initial-transform,100%) * -1),0,0)}}@keyframes slideFromRight{from{transform:translate3d(var(--initial-transform,100%),0,0)}to{transform:translate3d(0,0,0)}}@keyframes slideToRight{to{transform:translate3d(var(--initial-transform,100%),0,0)}}`);
|
|
1667
|
-
function
|
|
1667
|
+
function Za() {
|
|
1668
1668
|
const e = navigator.userAgent;
|
|
1669
1669
|
return typeof window < "u" && (/Firefox/.test(e) && /Mobile/.test(e) || // Android Firefox
|
|
1670
1670
|
/FxiOS/.test(e));
|
|
1671
1671
|
}
|
|
1672
|
-
function
|
|
1672
|
+
function Qa() {
|
|
1673
1673
|
return Et(/^Mac/);
|
|
1674
1674
|
}
|
|
1675
|
-
function
|
|
1675
|
+
function eo() {
|
|
1676
1676
|
return Et(/^iPhone/);
|
|
1677
1677
|
}
|
|
1678
1678
|
function qt() {
|
|
1679
1679
|
return /^((?!chrome|android).)*safari/i.test(navigator.userAgent);
|
|
1680
1680
|
}
|
|
1681
|
-
function
|
|
1681
|
+
function to() {
|
|
1682
1682
|
return Et(/^iPad/) || // iPadOS 13 lies and says it's a Mac, but we can distinguish by detecting touch support.
|
|
1683
|
-
|
|
1683
|
+
Qa() && navigator.maxTouchPoints > 1;
|
|
1684
1684
|
}
|
|
1685
|
-
function
|
|
1686
|
-
return
|
|
1685
|
+
function _n() {
|
|
1686
|
+
return eo() || to();
|
|
1687
1687
|
}
|
|
1688
1688
|
function Et(e) {
|
|
1689
1689
|
return typeof window < "u" && window.navigator != null ? e.test(window.navigator.platform) : void 0;
|
|
1690
1690
|
}
|
|
1691
|
-
const
|
|
1691
|
+
const no = 24, ro = typeof window < "u" ? ar : Jt;
|
|
1692
1692
|
function Xt(...e) {
|
|
1693
1693
|
return (...t) => {
|
|
1694
1694
|
for (let n of e)
|
|
@@ -1700,12 +1700,12 @@ function Gt(e) {
|
|
|
1700
1700
|
let t = window.getComputedStyle(e);
|
|
1701
1701
|
return /(auto|scroll)/.test(t.overflow + t.overflowX + t.overflowY);
|
|
1702
1702
|
}
|
|
1703
|
-
function
|
|
1703
|
+
function kn(e) {
|
|
1704
1704
|
for (Gt(e) && (e = e.parentElement); e && !Gt(e); )
|
|
1705
1705
|
e = e.parentElement;
|
|
1706
1706
|
return e || document.scrollingElement || document.documentElement;
|
|
1707
1707
|
}
|
|
1708
|
-
const
|
|
1708
|
+
const ao = /* @__PURE__ */ new Set([
|
|
1709
1709
|
"checkbox",
|
|
1710
1710
|
"radio",
|
|
1711
1711
|
"range",
|
|
@@ -1717,20 +1717,20 @@ const ro = /* @__PURE__ */ new Set([
|
|
|
1717
1717
|
"reset"
|
|
1718
1718
|
]);
|
|
1719
1719
|
let Ye = 0, ut;
|
|
1720
|
-
function
|
|
1720
|
+
function oo(e = {}) {
|
|
1721
1721
|
let { isDisabled: t } = e;
|
|
1722
|
-
|
|
1722
|
+
ro(() => {
|
|
1723
1723
|
if (!t)
|
|
1724
|
-
return Ye++, Ye === 1 &&
|
|
1724
|
+
return Ye++, Ye === 1 && _n() && (ut = so()), () => {
|
|
1725
1725
|
Ye--, Ye === 0 && (ut == null || ut());
|
|
1726
1726
|
};
|
|
1727
1727
|
}, [
|
|
1728
1728
|
t
|
|
1729
1729
|
]);
|
|
1730
1730
|
}
|
|
1731
|
-
function
|
|
1731
|
+
function so() {
|
|
1732
1732
|
let e, t = 0, n = (f) => {
|
|
1733
|
-
e =
|
|
1733
|
+
e = kn(f.target), !(e === document.documentElement && e === document.body) && (t = f.changedTouches[0].pageY);
|
|
1734
1734
|
}, r = (f) => {
|
|
1735
1735
|
if (!e || e === document.documentElement || e === document.body) {
|
|
1736
1736
|
f.preventDefault();
|
|
@@ -1754,7 +1754,7 @@ function oo() {
|
|
|
1754
1754
|
}));
|
|
1755
1755
|
}, i = () => {
|
|
1756
1756
|
window.scrollTo(0, 0);
|
|
1757
|
-
}, s = window.pageXOffset, v = window.pageYOffset, m = Xt(
|
|
1757
|
+
}, s = window.pageXOffset, v = window.pageYOffset, m = Xt(io(document.documentElement, "paddingRight", `${window.innerWidth - document.documentElement.clientWidth}px`));
|
|
1758
1758
|
window.scrollTo(0, 0);
|
|
1759
1759
|
let p = Xt(_e(document, "touchstart", n, {
|
|
1760
1760
|
passive: !1,
|
|
@@ -1770,7 +1770,7 @@ function oo() {
|
|
|
1770
1770
|
m(), p(), window.scrollTo(s, v);
|
|
1771
1771
|
};
|
|
1772
1772
|
}
|
|
1773
|
-
function
|
|
1773
|
+
function io(e, t, n) {
|
|
1774
1774
|
let r = e.style[t];
|
|
1775
1775
|
return e.style[t] = n, () => {
|
|
1776
1776
|
e.style[t] = r;
|
|
@@ -1784,28 +1784,28 @@ function _e(e, t, n, r) {
|
|
|
1784
1784
|
function Kt(e) {
|
|
1785
1785
|
let t = document.scrollingElement || document.documentElement;
|
|
1786
1786
|
for (; e && e !== t; ) {
|
|
1787
|
-
let n =
|
|
1787
|
+
let n = kn(e);
|
|
1788
1788
|
if (n !== document.documentElement && n !== document.body && n !== e) {
|
|
1789
1789
|
let r = n.getBoundingClientRect().top, a = e.getBoundingClientRect().top, o = e.getBoundingClientRect().bottom;
|
|
1790
|
-
const i = n.getBoundingClientRect().bottom +
|
|
1790
|
+
const i = n.getBoundingClientRect().bottom + no;
|
|
1791
1791
|
o > i && (n.scrollTop += a - r);
|
|
1792
1792
|
}
|
|
1793
1793
|
e = n.parentElement;
|
|
1794
1794
|
}
|
|
1795
1795
|
}
|
|
1796
1796
|
function ht(e) {
|
|
1797
|
-
return e instanceof HTMLInputElement && !
|
|
1797
|
+
return e instanceof HTMLInputElement && !ao.has(e.type) || e instanceof HTMLTextAreaElement || e instanceof HTMLElement && e.isContentEditable;
|
|
1798
1798
|
}
|
|
1799
|
-
function
|
|
1799
|
+
function co(e, t) {
|
|
1800
1800
|
typeof e == "function" ? e(t) : e != null && (e.current = t);
|
|
1801
1801
|
}
|
|
1802
|
-
function
|
|
1803
|
-
return (t) => e.forEach((n) =>
|
|
1802
|
+
function lo(...e) {
|
|
1803
|
+
return (t) => e.forEach((n) => co(n, t));
|
|
1804
1804
|
}
|
|
1805
|
-
function
|
|
1806
|
-
return c.useCallback(
|
|
1805
|
+
function Mn(...e) {
|
|
1806
|
+
return c.useCallback(lo(...e), e);
|
|
1807
1807
|
}
|
|
1808
|
-
const
|
|
1808
|
+
const In = /* @__PURE__ */ new WeakMap();
|
|
1809
1809
|
function X(e, t, n = !1) {
|
|
1810
1810
|
if (!e || !(e instanceof HTMLElement)) return;
|
|
1811
1811
|
let r = {};
|
|
@@ -1815,11 +1815,11 @@ function X(e, t, n = !1) {
|
|
|
1815
1815
|
return;
|
|
1816
1816
|
}
|
|
1817
1817
|
r[a] = e.style[a], e.style[a] = o;
|
|
1818
|
-
}), !n &&
|
|
1818
|
+
}), !n && In.set(e, r);
|
|
1819
1819
|
}
|
|
1820
|
-
function
|
|
1820
|
+
function uo(e, t) {
|
|
1821
1821
|
if (!e || !(e instanceof HTMLElement)) return;
|
|
1822
|
-
let n =
|
|
1822
|
+
let n = In.get(e);
|
|
1823
1823
|
n && (e.style[t] = n[t]);
|
|
1824
1824
|
}
|
|
1825
1825
|
const V = (e) => {
|
|
@@ -1844,7 +1844,7 @@ function ze(e, t) {
|
|
|
1844
1844
|
let a = r.match(/^matrix3d\((.+)\)$/);
|
|
1845
1845
|
return a ? parseFloat(a[1].split(", ")[V(t) ? 13 : 12]) : (a = r.match(/^matrix\((.+)\)$/), a ? parseFloat(a[1].split(", ")[V(t) ? 5 : 4]) : null);
|
|
1846
1846
|
}
|
|
1847
|
-
function
|
|
1847
|
+
function fo(e) {
|
|
1848
1848
|
return 8 * (Math.log(e + 1) - 2);
|
|
1849
1849
|
}
|
|
1850
1850
|
function dt(e, t) {
|
|
@@ -1855,7 +1855,7 @@ function dt(e, t) {
|
|
|
1855
1855
|
e.style.cssText = n;
|
|
1856
1856
|
};
|
|
1857
1857
|
}
|
|
1858
|
-
function
|
|
1858
|
+
function mo(...e) {
|
|
1859
1859
|
return (...t) => {
|
|
1860
1860
|
for (const n of e)
|
|
1861
1861
|
typeof n == "function" && n(...t);
|
|
@@ -1869,15 +1869,15 @@ const U = {
|
|
|
1869
1869
|
0,
|
|
1870
1870
|
1
|
|
1871
1871
|
]
|
|
1872
|
-
},
|
|
1873
|
-
function
|
|
1872
|
+
}, jn = 0.4, po = 0.25, vo = 100, $n = 8, we = 16, gt = 26, ft = "vaul-dragging";
|
|
1873
|
+
function Ln(e) {
|
|
1874
1874
|
const t = E.useRef(e);
|
|
1875
1875
|
return E.useEffect(() => {
|
|
1876
1876
|
t.current = e;
|
|
1877
1877
|
}), E.useMemo(() => (...n) => t.current == null ? void 0 : t.current.call(t, ...n), []);
|
|
1878
1878
|
}
|
|
1879
|
-
function
|
|
1880
|
-
const n = E.useState(e), [r] = n, a = E.useRef(r), o =
|
|
1879
|
+
function ho({ defaultProp: e, onChange: t }) {
|
|
1880
|
+
const n = E.useState(e), [r] = n, a = E.useRef(r), o = Ln(t);
|
|
1881
1881
|
return E.useEffect(() => {
|
|
1882
1882
|
a.current !== r && (o(r), a.current = r);
|
|
1883
1883
|
}, [
|
|
@@ -1886,12 +1886,12 @@ function vo({ defaultProp: e, onChange: t }) {
|
|
|
1886
1886
|
o
|
|
1887
1887
|
]), n;
|
|
1888
1888
|
}
|
|
1889
|
-
function
|
|
1889
|
+
function Fn({ prop: e, defaultProp: t, onChange: n = () => {
|
|
1890
1890
|
} }) {
|
|
1891
|
-
const [r, a] =
|
|
1891
|
+
const [r, a] = ho({
|
|
1892
1892
|
defaultProp: t,
|
|
1893
1893
|
onChange: n
|
|
1894
|
-
}), o = e !== void 0, i = o ? e : r, s =
|
|
1894
|
+
}), o = e !== void 0, i = o ? e : r, s = Ln(n), v = E.useCallback((m) => {
|
|
1895
1895
|
if (o) {
|
|
1896
1896
|
const f = typeof m == "function" ? m(e) : m;
|
|
1897
1897
|
f !== e && s(f);
|
|
@@ -1908,8 +1908,8 @@ function Ln({ prop: e, defaultProp: t, onChange: n = () => {
|
|
|
1908
1908
|
v
|
|
1909
1909
|
];
|
|
1910
1910
|
}
|
|
1911
|
-
function
|
|
1912
|
-
const [p, f] =
|
|
1911
|
+
function go({ activeSnapPointProp: e, setActiveSnapPointProp: t, snapPoints: n, drawerRef: r, overlayRef: a, fadeFromIndex: o, onSnapPointChange: i, direction: s = "bottom", container: v, snapToSequentialPoint: m }) {
|
|
1912
|
+
const [p, f] = Fn({
|
|
1913
1913
|
prop: e,
|
|
1914
1914
|
defaultProp: n == null ? void 0 : n[0],
|
|
1915
1915
|
onChange: t
|
|
@@ -2012,7 +2012,7 @@ function ho({ activeSnapPointProp: e, setActiveSnapPointProp: t, snapPoints: n,
|
|
|
2012
2012
|
return;
|
|
2013
2013
|
}
|
|
2014
2014
|
const z = g == null ? void 0 : g.reduce((q, ee) => typeof q != "number" || typeof ee != "number" ? q : Math.abs(ee - B) < Math.abs(q - B) ? ee : q), J = V(s) ? window.innerHeight : window.innerWidth;
|
|
2015
|
-
if (w >
|
|
2015
|
+
if (w > jn && Math.abs(b) < J * 0.4) {
|
|
2016
2016
|
const q = K ? 1 : -1;
|
|
2017
2017
|
if (q > 0 && N && n) {
|
|
2018
2018
|
P(g[n.length - 1]);
|
|
@@ -2053,10 +2053,10 @@ function ho({ activeSnapPointProp: e, setActiveSnapPointProp: t, snapPoints: n,
|
|
|
2053
2053
|
snapPointsOffset: g
|
|
2054
2054
|
};
|
|
2055
2055
|
}
|
|
2056
|
-
const
|
|
2056
|
+
const wo = () => () => {
|
|
2057
2057
|
};
|
|
2058
|
-
function
|
|
2059
|
-
const { direction: e, isOpen: t, shouldScaleBackground: n, setBackgroundColorOnScale: r, noBodyStyles: a } = je(), o = E.useRef(null), i =
|
|
2058
|
+
function bo() {
|
|
2059
|
+
const { direction: e, isOpen: t, shouldScaleBackground: n, setBackgroundColorOnScale: r, noBodyStyles: a } = je(), o = E.useRef(null), i = rr(() => document.body.style.backgroundColor, []);
|
|
2060
2060
|
function s() {
|
|
2061
2061
|
return (window.innerWidth - gt) / window.innerWidth;
|
|
2062
2062
|
}
|
|
@@ -2065,16 +2065,16 @@ function wo() {
|
|
|
2065
2065
|
o.current && clearTimeout(o.current);
|
|
2066
2066
|
const v = document.querySelector("[data-vaul-drawer-wrapper]") || document.querySelector("[vaul-drawer-wrapper]");
|
|
2067
2067
|
if (!v) return;
|
|
2068
|
-
|
|
2068
|
+
mo(r && !a ? dt(document.body, {
|
|
2069
2069
|
background: "black"
|
|
2070
|
-
}) :
|
|
2070
|
+
}) : wo, dt(v, {
|
|
2071
2071
|
transformOrigin: V(e) ? "top" : "left",
|
|
2072
2072
|
transitionProperty: "transform, border-radius",
|
|
2073
2073
|
transitionDuration: `${U.DURATION}s`,
|
|
2074
2074
|
transitionTimingFunction: `cubic-bezier(${U.EASE.join(",")})`
|
|
2075
2075
|
}));
|
|
2076
2076
|
const m = dt(v, {
|
|
2077
|
-
borderRadius: `${
|
|
2077
|
+
borderRadius: `${$n}px`,
|
|
2078
2078
|
overflow: "hidden",
|
|
2079
2079
|
...V(e) ? {
|
|
2080
2080
|
transform: `scale(${s()}) translate3d(0, calc(env(safe-area-inset-top) + 14px), 0)`
|
|
@@ -2095,7 +2095,7 @@ function wo() {
|
|
|
2095
2095
|
]);
|
|
2096
2096
|
}
|
|
2097
2097
|
let ke = null;
|
|
2098
|
-
function
|
|
2098
|
+
function yo({ isOpen: e, modal: t, nested: n, hasBeenOpened: r, preventScrollRestoration: a, noBodyStyles: o }) {
|
|
2099
2099
|
const [i, s] = E.useState(() => typeof window < "u" ? window.location.href : ""), v = E.useRef(0), m = E.useCallback(() => {
|
|
2100
2100
|
if (qt() && ke === null && e && !o) {
|
|
2101
2101
|
ke = {
|
|
@@ -2163,36 +2163,36 @@ function bo({ isOpen: e, modal: t, nested: n, hasBeenOpened: r, preventScrollRes
|
|
|
2163
2163
|
restorePositionSetting: p
|
|
2164
2164
|
};
|
|
2165
2165
|
}
|
|
2166
|
-
function
|
|
2166
|
+
function Eo({ open: e, onOpenChange: t, children: n, onDrag: r, onRelease: a, snapPoints: o, shouldScaleBackground: i = !1, setBackgroundColorOnScale: s = !0, closeThreshold: v = po, scrollLockTimeout: m = vo, dismissible: p = !0, handleOnly: f = !1, fadeFromIndex: h = o && o.length - 1, activeSnapPoint: R, setActiveSnapPoint: N, fixed: l, modal: S = !0, onClose: g, nested: T, noBodyStyles: P = !1, direction: y = "bottom", defaultOpen: _ = !1, disablePreventScroll: F = !0, snapToSequentialPoint: b = !1, preventScrollRestoration: O = !1, repositionInputs: w = !0, onAnimationEnd: $, container: B, autoFocus: Y = !1 }) {
|
|
2167
2167
|
var C, K;
|
|
2168
|
-
const [z = !1, J] =
|
|
2168
|
+
const [z = !1, J] = Fn({
|
|
2169
2169
|
defaultProp: _,
|
|
2170
2170
|
prop: e,
|
|
2171
2171
|
onChange: (x) => {
|
|
2172
|
-
t == null || t(x), !x && !T &&
|
|
2172
|
+
t == null || t(x), !x && !T && Gn(), setTimeout(() => {
|
|
2173
2173
|
$ == null || $(x);
|
|
2174
2174
|
}, U.DURATION * 1e3), x && !S && typeof window < "u" && window.requestAnimationFrame(() => {
|
|
2175
2175
|
document.body.style.pointerEvents = "auto";
|
|
2176
2176
|
}), x || (document.body.style.pointerEvents = "auto");
|
|
2177
2177
|
}
|
|
2178
|
-
}), [q, ee] = E.useState(!1), [ne, ce] = E.useState(!1), [u, D] = E.useState(!1), M = E.useRef(null), W = E.useRef(null), le = E.useRef(null),
|
|
2178
|
+
}), [q, ee] = E.useState(!1), [ne, ce] = E.useState(!1), [u, D] = E.useState(!1), M = E.useRef(null), W = E.useRef(null), le = E.useRef(null), ve = E.useRef(null), L = E.useRef(null), te = E.useRef(!1), he = E.useRef(null), Pe = E.useRef(0), Ee = E.useRef(!1), St = E.useRef(!_), Rt = E.useRef(0), A = E.useRef(null), Ct = E.useRef(((C = A.current) == null ? void 0 : C.getBoundingClientRect().height) || 0), xt = E.useRef(((K = A.current) == null ? void 0 : K.getBoundingClientRect().width) || 0), et = E.useRef(0), Vn = E.useCallback((x) => {
|
|
2179
2179
|
o && x === Ne.length - 1 && (W.current = /* @__PURE__ */ new Date());
|
|
2180
|
-
}, []), { activeSnapPoint:
|
|
2180
|
+
}, []), { activeSnapPoint: Yn, activeSnapPointIndex: Se, setActiveSnapPoint: Tt, onRelease: zn, snapPointsOffset: Ne, onDrag: qn, shouldFade: Pt, getPercentageDragged: Xn } = go({
|
|
2181
2181
|
snapPoints: o,
|
|
2182
2182
|
activeSnapPointProp: R,
|
|
2183
2183
|
setActiveSnapPointProp: N,
|
|
2184
2184
|
drawerRef: A,
|
|
2185
2185
|
fadeFromIndex: h,
|
|
2186
2186
|
overlayRef: M,
|
|
2187
|
-
onSnapPointChange:
|
|
2187
|
+
onSnapPointChange: Vn,
|
|
2188
2188
|
direction: y,
|
|
2189
2189
|
container: B,
|
|
2190
2190
|
snapToSequentialPoint: b
|
|
2191
2191
|
});
|
|
2192
|
-
|
|
2192
|
+
oo({
|
|
2193
2193
|
isDisabled: !z || ne || !S || u || !q || !w || !F
|
|
2194
2194
|
});
|
|
2195
|
-
const { restorePositionSetting:
|
|
2195
|
+
const { restorePositionSetting: Gn } = yo({
|
|
2196
2196
|
isOpen: z,
|
|
2197
2197
|
modal: S,
|
|
2198
2198
|
nested: T ?? !1,
|
|
@@ -2203,9 +2203,9 @@ function yo({ open: e, onOpenChange: t, children: n, onDrag: r, onRelease: a, sn
|
|
|
2203
2203
|
function $e() {
|
|
2204
2204
|
return (window.innerWidth - gt) / window.innerWidth;
|
|
2205
2205
|
}
|
|
2206
|
-
function
|
|
2206
|
+
function Kn(x) {
|
|
2207
2207
|
var I, j;
|
|
2208
|
-
!p && !o || A.current && !A.current.contains(x.target) || (Ct.current = ((I = A.current) == null ? void 0 : I.getBoundingClientRect().height) || 0, xt.current = ((j = A.current) == null ? void 0 : j.getBoundingClientRect().width) || 0, ce(!0), le.current = /* @__PURE__ */ new Date(),
|
|
2208
|
+
!p && !o || A.current && !A.current.contains(x.target) || (Ct.current = ((I = A.current) == null ? void 0 : I.getBoundingClientRect().height) || 0, xt.current = ((j = A.current) == null ? void 0 : j.getBoundingClientRect().width) || 0, ce(!0), le.current = /* @__PURE__ */ new Date(), _n() && window.addEventListener("touchend", () => te.current = !1, {
|
|
2209
2209
|
once: !0
|
|
2210
2210
|
}), x.target.setPointerCapture(x.pointerId), Pe.current = V(y) ? x.pageY : x.pageX);
|
|
2211
2211
|
}
|
|
@@ -2236,22 +2236,22 @@ function yo({ open: e, onOpenChange: t, children: n, onDrag: r, onRelease: a, sn
|
|
|
2236
2236
|
}
|
|
2237
2237
|
return !0;
|
|
2238
2238
|
}
|
|
2239
|
-
function
|
|
2239
|
+
function Jn(x) {
|
|
2240
2240
|
if (A.current && ne) {
|
|
2241
2241
|
const I = y === "bottom" || y === "right" ? 1 : -1, j = (Pe.current - (V(y) ? x.pageY : x.pageX)) * I, k = j > 0, H = o && !p && !k;
|
|
2242
2242
|
if (H && Se === 0) return;
|
|
2243
2243
|
const Q = Math.abs(j), Z = document.querySelector("[data-vaul-drawer-wrapper]"), ue = y === "bottom" || y === "top" ? Ct.current : xt.current;
|
|
2244
2244
|
let re = Q / ue;
|
|
2245
|
-
const
|
|
2246
|
-
if (
|
|
2245
|
+
const ge = Xn(Q, k);
|
|
2246
|
+
if (ge !== null && (re = ge), H && re >= 1 || !te.current && !Nt(x.target, k)) return;
|
|
2247
2247
|
if (A.current.classList.add(ft), te.current = !0, X(A.current, {
|
|
2248
2248
|
transition: "none"
|
|
2249
2249
|
}), X(M.current, {
|
|
2250
2250
|
transition: "none"
|
|
2251
|
-
}), o &&
|
|
2251
|
+
}), o && qn({
|
|
2252
2252
|
draggedDistance: j
|
|
2253
2253
|
}), k && !o) {
|
|
2254
|
-
const oe =
|
|
2254
|
+
const oe = fo(j), Le = Math.min(oe * -1, 0) * I;
|
|
2255
2255
|
X(A.current, {
|
|
2256
2256
|
transform: V(y) ? `translate3d(0, ${Le}px, 0)` : `translate3d(${Le}px, 0, 0)`
|
|
2257
2257
|
});
|
|
@@ -2292,7 +2292,7 @@ function yo({ open: e, onOpenChange: t, children: n, onDrag: r, onRelease: a, sn
|
|
|
2292
2292
|
let Z = Q - H;
|
|
2293
2293
|
const ue = A.current.getBoundingClientRect().height || 0, re = ue > Q * 0.8;
|
|
2294
2294
|
et.current || (et.current = ue);
|
|
2295
|
-
const
|
|
2295
|
+
const ge = A.current.getBoundingClientRect().top;
|
|
2296
2296
|
if (Math.abs(Rt.current - Z) > 60 && (Ee.current = !Ee.current), o && o.length > 0 && Ne && Se) {
|
|
2297
2297
|
const de = Ne[Se] || 0;
|
|
2298
2298
|
Z += de;
|
|
@@ -2300,8 +2300,8 @@ function yo({ open: e, onOpenChange: t, children: n, onDrag: r, onRelease: a, sn
|
|
|
2300
2300
|
if (Rt.current = Z, ue > H || Ee.current) {
|
|
2301
2301
|
const de = A.current.getBoundingClientRect().height;
|
|
2302
2302
|
let oe = de;
|
|
2303
|
-
de > H && (oe = H - (re ?
|
|
2304
|
-
} else
|
|
2303
|
+
de > H && (oe = H - (re ? ge : gt)), l ? A.current.style.height = `${de - Math.max(Z, 0)}px` : A.current.style.height = `${Math.max(oe, H - ge)}px`;
|
|
2304
|
+
} else Za() || (A.current.style.height = `${et.current}px`);
|
|
2305
2305
|
o && o.length > 0 && !Ee.current ? A.current.style.bottom = "0px" : A.current.style.bottom = `${Math.max(Z, 0)}px`;
|
|
2306
2306
|
}
|
|
2307
2307
|
}
|
|
@@ -2315,7 +2315,7 @@ function yo({ open: e, onOpenChange: t, children: n, onDrag: r, onRelease: a, sn
|
|
|
2315
2315
|
Ne
|
|
2316
2316
|
]);
|
|
2317
2317
|
function Oe(x) {
|
|
2318
|
-
|
|
2318
|
+
Zn(), g == null || g(), x || J(!1), setTimeout(() => {
|
|
2319
2319
|
o && Tt(o[0]);
|
|
2320
2320
|
}, U.DURATION * 1e3);
|
|
2321
2321
|
}
|
|
@@ -2329,7 +2329,7 @@ function yo({ open: e, onOpenChange: t, children: n, onDrag: r, onRelease: a, sn
|
|
|
2329
2329
|
transition: `opacity ${U.DURATION}s cubic-bezier(${U.EASE.join(",")})`,
|
|
2330
2330
|
opacity: "1"
|
|
2331
2331
|
}), i && I && I > 0 && z && X(x, {
|
|
2332
|
-
borderRadius: `${
|
|
2332
|
+
borderRadius: `${$n}px`,
|
|
2333
2333
|
overflow: "hidden",
|
|
2334
2334
|
...V(y) ? {
|
|
2335
2335
|
transform: `scale(${$e()}) translate3d(0, calc(env(safe-area-inset-top) + 14px), 0)`,
|
|
@@ -2343,19 +2343,19 @@ function yo({ open: e, onOpenChange: t, children: n, onDrag: r, onRelease: a, sn
|
|
|
2343
2343
|
transitionTimingFunction: `cubic-bezier(${U.EASE.join(",")})`
|
|
2344
2344
|
}, !0);
|
|
2345
2345
|
}
|
|
2346
|
-
function
|
|
2347
|
-
!ne || !A.current || (A.current.classList.remove(ft), te.current = !1, ce(!1),
|
|
2346
|
+
function Zn() {
|
|
2347
|
+
!ne || !A.current || (A.current.classList.remove(ft), te.current = !1, ce(!1), ve.current = /* @__PURE__ */ new Date());
|
|
2348
2348
|
}
|
|
2349
|
-
function
|
|
2349
|
+
function Qn(x) {
|
|
2350
2350
|
if (!ne || !A.current) return;
|
|
2351
|
-
A.current.classList.remove(ft), te.current = !1, ce(!1),
|
|
2351
|
+
A.current.classList.remove(ft), te.current = !1, ce(!1), ve.current = /* @__PURE__ */ new Date();
|
|
2352
2352
|
const I = ze(A.current, y);
|
|
2353
2353
|
if (!x || !Nt(x.target, !1) || !I || Number.isNaN(I) || le.current === null) return;
|
|
2354
|
-
const j =
|
|
2354
|
+
const j = ve.current.getTime() - le.current.getTime(), k = Pe.current - (V(y) ? x.pageY : x.pageX), H = Math.abs(k) / j;
|
|
2355
2355
|
if (H > 0.05 && (D(!0), setTimeout(() => {
|
|
2356
2356
|
D(!1);
|
|
2357
2357
|
}, 200)), o) {
|
|
2358
|
-
|
|
2358
|
+
zn({
|
|
2359
2359
|
draggedDistance: k * (y === "bottom" || y === "right" ? 1 : -1),
|
|
2360
2360
|
closeDrawer: Oe,
|
|
2361
2361
|
velocity: H,
|
|
@@ -2367,15 +2367,15 @@ function yo({ open: e, onOpenChange: t, children: n, onDrag: r, onRelease: a, sn
|
|
|
2367
2367
|
Ot(), a == null || a(x, !0);
|
|
2368
2368
|
return;
|
|
2369
2369
|
}
|
|
2370
|
-
if (H >
|
|
2370
|
+
if (H > jn) {
|
|
2371
2371
|
Oe(), a == null || a(x, !1);
|
|
2372
2372
|
return;
|
|
2373
2373
|
}
|
|
2374
2374
|
var Q;
|
|
2375
2375
|
const Z = Math.min((Q = A.current.getBoundingClientRect().height) != null ? Q : 0, window.innerHeight);
|
|
2376
2376
|
var ue;
|
|
2377
|
-
const re = Math.min((ue = A.current.getBoundingClientRect().width) != null ? ue : 0, window.innerWidth),
|
|
2378
|
-
if (Math.abs(I) >= (
|
|
2377
|
+
const re = Math.min((ue = A.current.getBoundingClientRect().width) != null ? ue : 0, window.innerWidth), ge = y === "left" || y === "right";
|
|
2378
|
+
if (Math.abs(I) >= (ge ? re : Z) * v) {
|
|
2379
2379
|
Oe(), a == null || a(x, !1);
|
|
2380
2380
|
return;
|
|
2381
2381
|
}
|
|
@@ -2384,16 +2384,16 @@ function yo({ open: e, onOpenChange: t, children: n, onDrag: r, onRelease: a, sn
|
|
|
2384
2384
|
E.useEffect(() => (z && (X(document.documentElement, {
|
|
2385
2385
|
scrollBehavior: "auto"
|
|
2386
2386
|
}), W.current = /* @__PURE__ */ new Date()), () => {
|
|
2387
|
-
|
|
2387
|
+
uo(document.documentElement, "scrollBehavior");
|
|
2388
2388
|
}), [
|
|
2389
2389
|
z
|
|
2390
2390
|
]);
|
|
2391
|
-
function
|
|
2392
|
-
const I = x ? (window.innerWidth -
|
|
2393
|
-
|
|
2391
|
+
function er(x) {
|
|
2392
|
+
const I = x ? (window.innerWidth - we) / window.innerWidth : 1, j = x ? -we : 0;
|
|
2393
|
+
he.current && window.clearTimeout(he.current), X(A.current, {
|
|
2394
2394
|
transition: `transform ${U.DURATION}s cubic-bezier(${U.EASE.join(",")})`,
|
|
2395
2395
|
transform: V(y) ? `scale(${I}) translate3d(0, ${j}px, 0)` : `scale(${I}) translate3d(${j}px, 0, 0)`
|
|
2396
|
-
}), !x && A.current && (
|
|
2396
|
+
}), !x && A.current && (he.current = setTimeout(() => {
|
|
2397
2397
|
const k = ze(A.current, y);
|
|
2398
2398
|
X(A.current, {
|
|
2399
2399
|
transition: "none",
|
|
@@ -2401,16 +2401,16 @@ function yo({ open: e, onOpenChange: t, children: n, onDrag: r, onRelease: a, sn
|
|
|
2401
2401
|
});
|
|
2402
2402
|
}, 500));
|
|
2403
2403
|
}
|
|
2404
|
-
function
|
|
2404
|
+
function tr(x, I) {
|
|
2405
2405
|
if (I < 0) return;
|
|
2406
|
-
const j = (window.innerWidth -
|
|
2406
|
+
const j = (window.innerWidth - we) / window.innerWidth, k = j + I * (1 - j), H = -we + I * we;
|
|
2407
2407
|
X(A.current, {
|
|
2408
2408
|
transform: V(y) ? `scale(${k}) translate3d(0, ${H}px, 0)` : `scale(${k}) translate3d(${H}px, 0, 0)`,
|
|
2409
2409
|
transition: "none"
|
|
2410
2410
|
});
|
|
2411
2411
|
}
|
|
2412
|
-
function
|
|
2413
|
-
const j = V(y) ? window.innerHeight : window.innerWidth, k = I ? (j -
|
|
2412
|
+
function nr(x, I) {
|
|
2413
|
+
const j = V(y) ? window.innerHeight : window.innerWidth, k = I ? (j - we) / j : 1, H = I ? -we : 0;
|
|
2414
2414
|
I && X(A.current, {
|
|
2415
2415
|
transition: `transform ${U.DURATION}s cubic-bezier(${U.EASE.join(",")})`,
|
|
2416
2416
|
transform: V(y) ? `scale(${k}) translate3d(0, ${H}px, 0)` : `scale(${k}) translate3d(${H}px, 0, 0)`
|
|
@@ -2428,17 +2428,17 @@ function yo({ open: e, onOpenChange: t, children: n, onDrag: r, onRelease: a, sn
|
|
|
2428
2428
|
!p && !x || (x ? ee(!0) : Oe(!0), J(x));
|
|
2429
2429
|
},
|
|
2430
2430
|
open: z
|
|
2431
|
-
}, /* @__PURE__ */ E.createElement(
|
|
2431
|
+
}, /* @__PURE__ */ E.createElement(An.Provider, {
|
|
2432
2432
|
value: {
|
|
2433
|
-
activeSnapPoint:
|
|
2433
|
+
activeSnapPoint: Yn,
|
|
2434
2434
|
snapPoints: o,
|
|
2435
2435
|
setActiveSnapPoint: Tt,
|
|
2436
2436
|
drawerRef: A,
|
|
2437
2437
|
overlayRef: M,
|
|
2438
2438
|
onOpenChange: t,
|
|
2439
|
-
onPress:
|
|
2440
|
-
onRelease:
|
|
2441
|
-
onDrag:
|
|
2439
|
+
onPress: Kn,
|
|
2440
|
+
onRelease: Qn,
|
|
2441
|
+
onDrag: Jn,
|
|
2442
2442
|
dismissible: p,
|
|
2443
2443
|
shouldAnimate: St,
|
|
2444
2444
|
handleOnly: f,
|
|
@@ -2446,9 +2446,9 @@ function yo({ open: e, onOpenChange: t, children: n, onDrag: r, onRelease: a, sn
|
|
|
2446
2446
|
isDragging: ne,
|
|
2447
2447
|
shouldFade: Pt,
|
|
2448
2448
|
closeDrawer: Oe,
|
|
2449
|
-
onNestedDrag:
|
|
2450
|
-
onNestedOpenChange:
|
|
2451
|
-
onNestedRelease:
|
|
2449
|
+
onNestedDrag: tr,
|
|
2450
|
+
onNestedOpenChange: er,
|
|
2451
|
+
onNestedRelease: nr,
|
|
2452
2452
|
keyboardIsOpen: Ee,
|
|
2453
2453
|
modal: S,
|
|
2454
2454
|
snapPointsOffset: Ne,
|
|
@@ -2462,14 +2462,14 @@ function yo({ open: e, onOpenChange: t, children: n, onDrag: r, onRelease: a, sn
|
|
|
2462
2462
|
}
|
|
2463
2463
|
}, n));
|
|
2464
2464
|
}
|
|
2465
|
-
const
|
|
2466
|
-
const { overlayRef: n, snapPoints: r, onRelease: a, shouldFade: o, isOpen: i, modal: s, shouldAnimate: v } = je(), m =
|
|
2465
|
+
const Wn = /* @__PURE__ */ E.forwardRef(function({ ...e }, t) {
|
|
2466
|
+
const { overlayRef: n, snapPoints: r, onRelease: a, shouldFade: o, isOpen: i, modal: s, shouldAnimate: v } = je(), m = Mn(t, n), p = r && r.length > 0;
|
|
2467
2467
|
if (!s)
|
|
2468
2468
|
return null;
|
|
2469
2469
|
const f = E.useCallback((h) => a(h), [
|
|
2470
2470
|
a
|
|
2471
2471
|
]);
|
|
2472
|
-
return /* @__PURE__ */ E.createElement(
|
|
2472
|
+
return /* @__PURE__ */ E.createElement(qa, {
|
|
2473
2473
|
onMouseUp: f,
|
|
2474
2474
|
ref: m,
|
|
2475
2475
|
"data-vaul-overlay": "",
|
|
@@ -2479,10 +2479,10 @@ const Fn = /* @__PURE__ */ E.forwardRef(function({ ...e }, t) {
|
|
|
2479
2479
|
...e
|
|
2480
2480
|
});
|
|
2481
2481
|
});
|
|
2482
|
-
|
|
2483
|
-
const
|
|
2484
|
-
const { drawerRef: o, onPress: i, onRelease: s, onDrag: v, keyboardIsOpen: m, snapPointsOffset: p, activeSnapPointIndex: f, modal: h, isOpen: R, direction: N, snapPoints: l, container: S, handleOnly: g, shouldAnimate: T, autoFocus: P } = je(), [y, _] = E.useState(!1), F =
|
|
2485
|
-
|
|
2482
|
+
Wn.displayName = "Drawer.Overlay";
|
|
2483
|
+
const Bn = /* @__PURE__ */ E.forwardRef(function({ onPointerDownOutside: e, style: t, onOpenAutoFocus: n, ...r }, a) {
|
|
2484
|
+
const { drawerRef: o, onPress: i, onRelease: s, onDrag: v, keyboardIsOpen: m, snapPointsOffset: p, activeSnapPointIndex: f, modal: h, isOpen: R, direction: N, snapPoints: l, container: S, handleOnly: g, shouldAnimate: T, autoFocus: P } = je(), [y, _] = E.useState(!1), F = Mn(a, o), b = E.useRef(null), O = E.useRef(null), w = E.useRef(!1), $ = l && l.length > 0;
|
|
2485
|
+
bo();
|
|
2486
2486
|
const B = (C, K, z = 0) => {
|
|
2487
2487
|
if (w.current) return !0;
|
|
2488
2488
|
const J = Math.abs(C.y), q = Math.abs(C.x), ee = q > J, ne = [
|
|
@@ -2504,7 +2504,7 @@ const Wn = /* @__PURE__ */ E.forwardRef(function({ onPointerDownOutside: e, styl
|
|
|
2504
2504
|
function Y(C) {
|
|
2505
2505
|
b.current = null, w.current = !1, s(C);
|
|
2506
2506
|
}
|
|
2507
|
-
return /* @__PURE__ */ E.createElement(
|
|
2507
|
+
return /* @__PURE__ */ E.createElement(Xa, {
|
|
2508
2508
|
"data-vaul-drawer-direction": N,
|
|
2509
2509
|
"data-vaul-drawer": "",
|
|
2510
2510
|
"data-vaul-delayed-snap-points": y ? "true" : "false",
|
|
@@ -2558,8 +2558,8 @@ const Wn = /* @__PURE__ */ E.forwardRef(function({ onPointerDownOutside: e, styl
|
|
|
2558
2558
|
}
|
|
2559
2559
|
});
|
|
2560
2560
|
});
|
|
2561
|
-
|
|
2562
|
-
const
|
|
2561
|
+
Bn.displayName = "Drawer.Content";
|
|
2562
|
+
const So = 250, Ro = 120, Un = /* @__PURE__ */ E.forwardRef(function({ preventCycle: e = !1, children: t, ...n }, r) {
|
|
2563
2563
|
const { closeDrawer: a, isDragging: o, snapPoints: i, activeSnapPoint: s, setActiveSnapPoint: v, dismissible: m, handleOnly: p, isOpen: f, onPress: h, onDrag: R } = je(), N = E.useRef(null), l = E.useRef(!1);
|
|
2564
2564
|
function S() {
|
|
2565
2565
|
if (l.current) {
|
|
@@ -2568,7 +2568,7 @@ const Eo = 250, So = 120, Bn = /* @__PURE__ */ E.forwardRef(function({ preventCy
|
|
|
2568
2568
|
}
|
|
2569
2569
|
window.setTimeout(() => {
|
|
2570
2570
|
g();
|
|
2571
|
-
},
|
|
2571
|
+
}, Ro);
|
|
2572
2572
|
}
|
|
2573
2573
|
function g() {
|
|
2574
2574
|
if (o || e || l.current) {
|
|
@@ -2591,7 +2591,7 @@ const Eo = 250, So = 120, Bn = /* @__PURE__ */ E.forwardRef(function({ preventCy
|
|
|
2591
2591
|
function T() {
|
|
2592
2592
|
N.current = window.setTimeout(() => {
|
|
2593
2593
|
l.current = !0;
|
|
2594
|
-
},
|
|
2594
|
+
}, So);
|
|
2595
2595
|
}
|
|
2596
2596
|
function P() {
|
|
2597
2597
|
N.current && window.clearTimeout(N.current), l.current = !1;
|
|
@@ -2616,22 +2616,23 @@ const Eo = 250, So = 120, Bn = /* @__PURE__ */ E.forwardRef(function({ preventCy
|
|
|
2616
2616
|
"aria-hidden": "true"
|
|
2617
2617
|
}, t));
|
|
2618
2618
|
});
|
|
2619
|
-
|
|
2620
|
-
function
|
|
2619
|
+
Un.displayName = "Drawer.Handle";
|
|
2620
|
+
function Co(e) {
|
|
2621
2621
|
const t = je(), { container: n = t.container, ...r } = e;
|
|
2622
|
-
return /* @__PURE__ */ E.createElement(
|
|
2622
|
+
return /* @__PURE__ */ E.createElement(za, {
|
|
2623
2623
|
container: n,
|
|
2624
2624
|
...r
|
|
2625
2625
|
});
|
|
2626
2626
|
}
|
|
2627
|
-
const
|
|
2628
|
-
Root:
|
|
2629
|
-
Content:
|
|
2630
|
-
Overlay:
|
|
2631
|
-
|
|
2632
|
-
|
|
2633
|
-
|
|
2634
|
-
|
|
2627
|
+
const fe = {
|
|
2628
|
+
Root: Eo,
|
|
2629
|
+
Content: Bn,
|
|
2630
|
+
Overlay: Wn,
|
|
2631
|
+
Trigger: Ya,
|
|
2632
|
+
Portal: Co,
|
|
2633
|
+
Handle: Un,
|
|
2634
|
+
Close: Ka,
|
|
2635
|
+
Title: Ga
|
|
2635
2636
|
};
|
|
2636
2637
|
function mt(e, t) {
|
|
2637
2638
|
e.resetHandlers(), t.endpoints.forEach((n) => {
|
|
@@ -2640,7 +2641,7 @@ function mt(e, t) {
|
|
|
2640
2641
|
r && e.use(r());
|
|
2641
2642
|
});
|
|
2642
2643
|
}
|
|
2643
|
-
const G =
|
|
2644
|
+
const G = cr((e, t) => ({
|
|
2644
2645
|
pages: {},
|
|
2645
2646
|
currentPageId: null,
|
|
2646
2647
|
expandedIds: /* @__PURE__ */ new Set(),
|
|
@@ -2764,38 +2765,38 @@ const G = ir((e, t) => ({
|
|
|
2764
2765
|
i && mt(o, i), e({ mockEnabled: !0 });
|
|
2765
2766
|
}
|
|
2766
2767
|
}
|
|
2767
|
-
})),
|
|
2768
|
+
})), Hn = (e) => {
|
|
2768
2769
|
var t;
|
|
2769
2770
|
return e.currentPageId ? ((t = e.pages[e.currentPageId]) == null ? void 0 : t.endpoints) ?? [] : [];
|
|
2770
|
-
},
|
|
2771
|
+
}, xo = (e) => {
|
|
2771
2772
|
if (!e.mockEnabled) return "off";
|
|
2772
|
-
const t =
|
|
2773
|
+
const t = Hn(e);
|
|
2773
2774
|
return t.some(
|
|
2774
2775
|
(n) => ["error", "not_found", "forbidden", "network_error"].includes(
|
|
2775
2776
|
n.selectedScenario
|
|
2776
2777
|
)
|
|
2777
2778
|
) ? "error" : t.some((n) => n.selectedScenario === "loading") ? "warn" : "ok";
|
|
2778
2779
|
};
|
|
2779
|
-
function
|
|
2780
|
+
function To(e) {
|
|
2780
2781
|
return e.scenario === "loading" ? "// pending..." : e.scenario === "network_error" ? "// network error" : e.payload ? JSON.stringify(e.payload, null, 2) : "{}";
|
|
2781
2782
|
}
|
|
2782
|
-
function
|
|
2783
|
+
function Po(e) {
|
|
2783
2784
|
return e ? e < 300 ? "mswd-sc-badge mswd-sc-badge--2xx" : e < 500 ? "mswd-sc-badge mswd-sc-badge--4xx" : "mswd-sc-badge mswd-sc-badge--5xx" : "mswd-sc-badge mswd-sc-badge--err";
|
|
2784
2785
|
}
|
|
2785
|
-
function
|
|
2786
|
+
function No(e, t) {
|
|
2786
2787
|
return t ? e === "loading" ? "mswd-radio mswd-radio--loading" : `mswd-radio ${["error", "not_found", "forbidden", "network_error"].includes(
|
|
2787
2788
|
e
|
|
2788
2789
|
) ? "mswd-radio--error" : "mswd-radio--success"}` : "mswd-radio";
|
|
2789
2790
|
}
|
|
2790
|
-
function
|
|
2791
|
+
function Oo(e) {
|
|
2791
2792
|
return e === "loading" ? "mswd-radio-dot mswd-radio-dot--loading" : `mswd-radio-dot ${["error", "not_found", "forbidden", "network_error"].includes(
|
|
2792
2793
|
e
|
|
2793
2794
|
) ? "mswd-radio-dot--error" : "mswd-radio-dot--success"}`;
|
|
2794
2795
|
}
|
|
2795
|
-
function
|
|
2796
|
+
function Do(e) {
|
|
2796
2797
|
return e === "success" ? "mswd-ep-status mswd-ep-status--success" : e === "loading" ? "mswd-ep-status mswd-ep-status--loading" : "mswd-ep-status mswd-ep-status--error";
|
|
2797
2798
|
}
|
|
2798
|
-
function
|
|
2799
|
+
function Ao({
|
|
2799
2800
|
endpoint: e,
|
|
2800
2801
|
expanded: t,
|
|
2801
2802
|
onToggle: n,
|
|
@@ -2806,7 +2807,7 @@ function Do({
|
|
|
2806
2807
|
/* @__PURE__ */ d.jsxs("button", { className: "mswd-ep-header", onClick: n, children: [
|
|
2807
2808
|
/* @__PURE__ */ d.jsx("span", { className: `mswd-method mswd-method--${e.method}`, children: e.method }),
|
|
2808
2809
|
/* @__PURE__ */ d.jsx("span", { className: "mswd-ep-path", children: e.path }),
|
|
2809
|
-
/* @__PURE__ */ d.jsx("span", { className:
|
|
2810
|
+
/* @__PURE__ */ d.jsx("span", { className: Do(e.selectedScenario), children: (a == null ? void 0 : a.statusCode) ?? (e.selectedScenario === "loading" ? "…" : "ERR") }),
|
|
2810
2811
|
/* @__PURE__ */ d.jsx(
|
|
2811
2812
|
"span",
|
|
2812
2813
|
{
|
|
@@ -2826,12 +2827,12 @@ function Do({
|
|
|
2826
2827
|
className: `mswd-option ${s ? "mswd-option--selected" : ""}`,
|
|
2827
2828
|
onClick: () => r(o.scenario),
|
|
2828
2829
|
children: [
|
|
2829
|
-
/* @__PURE__ */ d.jsx("div", { className:
|
|
2830
|
+
/* @__PURE__ */ d.jsx("div", { className: No(o.scenario, s), children: s && /* @__PURE__ */ d.jsx("div", { className: Oo(o.scenario) }) }),
|
|
2830
2831
|
/* @__PURE__ */ d.jsxs("div", { className: "mswd-opt-info", children: [
|
|
2831
2832
|
/* @__PURE__ */ d.jsx("p", { className: "mswd-opt-label", children: o.label }),
|
|
2832
2833
|
/* @__PURE__ */ d.jsx("p", { className: "mswd-opt-desc", children: o.description })
|
|
2833
2834
|
] }),
|
|
2834
|
-
o.scenario === "loading" ? /* @__PURE__ */ d.jsx("span", { className: "mswd-sc-spinner" }) : /* @__PURE__ */ d.jsx("span", { className:
|
|
2835
|
+
o.scenario === "loading" ? /* @__PURE__ */ d.jsx("span", { className: "mswd-sc-spinner" }) : /* @__PURE__ */ d.jsx("span", { className: Po(o.statusCode), children: o.statusCode ?? "ERR" })
|
|
2835
2836
|
]
|
|
2836
2837
|
}
|
|
2837
2838
|
)
|
|
@@ -2839,12 +2840,12 @@ function Do({
|
|
|
2839
2840
|
}),
|
|
2840
2841
|
/* @__PURE__ */ d.jsxs("div", { className: "mswd-payload", children: [
|
|
2841
2842
|
/* @__PURE__ */ d.jsx("p", { className: "mswd-payload-label", children: "Response preview" }),
|
|
2842
|
-
/* @__PURE__ */ d.jsx("pre", { className: "mswd-payload-code", children:
|
|
2843
|
+
/* @__PURE__ */ d.jsx("pre", { className: "mswd-payload-code", children: To(a) })
|
|
2843
2844
|
] })
|
|
2844
2845
|
] })
|
|
2845
2846
|
] });
|
|
2846
2847
|
}
|
|
2847
|
-
function
|
|
2848
|
+
function _o({
|
|
2848
2849
|
status: e,
|
|
2849
2850
|
onClick: t
|
|
2850
2851
|
}) {
|
|
@@ -2875,7 +2876,7 @@ function Ao({
|
|
|
2875
2876
|
}
|
|
2876
2877
|
);
|
|
2877
2878
|
}
|
|
2878
|
-
function
|
|
2879
|
+
function ko({
|
|
2879
2880
|
enabled: e,
|
|
2880
2881
|
onToggle: t
|
|
2881
2882
|
}) {
|
|
@@ -2894,7 +2895,7 @@ function _o({
|
|
|
2894
2895
|
/* @__PURE__ */ d.jsx("span", { className: `mswd-dot ${e ? "mswd-dot--on" : ""}` })
|
|
2895
2896
|
] });
|
|
2896
2897
|
}
|
|
2897
|
-
function
|
|
2898
|
+
function Mo({
|
|
2898
2899
|
active: e,
|
|
2899
2900
|
disabled: t,
|
|
2900
2901
|
onSelect: n
|
|
@@ -2932,7 +2933,7 @@ function ko({
|
|
|
2932
2933
|
}
|
|
2933
2934
|
);
|
|
2934
2935
|
}
|
|
2935
|
-
function
|
|
2936
|
+
function Fo({
|
|
2936
2937
|
worker: e,
|
|
2937
2938
|
enabled: t = !0,
|
|
2938
2939
|
snapPoints: n = ["500px", 1]
|
|
@@ -2941,41 +2942,41 @@ function Lo({
|
|
|
2941
2942
|
n[0]
|
|
2942
2943
|
), m = G((w) => w._setWorker);
|
|
2943
2944
|
G((w) => w._worker) || m(e);
|
|
2944
|
-
const f = G(
|
|
2945
|
+
const f = G(Hn), h = G((w) => w.expandedIds), R = G((w) => w.globalPreset), N = G((w) => w.pendingChanges), l = G((w) => w.mockEnabled), S = G((w) => w.currentPageId), g = G(xo), T = G((w) => w.toggleMockEnabled), P = G((w) => w.toggleEndpoint), y = G((w) => w.selectScenario), _ = G((w) => w.applyGlobalPreset), F = G((w) => w.applyChanges), b = G((w) => w.resetCurrentPage), O = or(() => {
|
|
2945
2946
|
F(), i(!0), setTimeout(() => i(!1), 1200);
|
|
2946
2947
|
}, [F]);
|
|
2947
|
-
return t ? /* @__PURE__ */ d.
|
|
2948
|
-
|
|
2949
|
-
|
|
2950
|
-
|
|
2951
|
-
|
|
2952
|
-
|
|
2953
|
-
|
|
2954
|
-
|
|
2955
|
-
|
|
2956
|
-
|
|
2957
|
-
|
|
2958
|
-
|
|
2959
|
-
|
|
2960
|
-
/* @__PURE__ */ d.jsx(
|
|
2948
|
+
return t ? /* @__PURE__ */ d.jsx(d.Fragment, { children: /* @__PURE__ */ d.jsxs(
|
|
2949
|
+
fe.Root,
|
|
2950
|
+
{
|
|
2951
|
+
open: r,
|
|
2952
|
+
onOpenChange: a,
|
|
2953
|
+
snapPoints: n,
|
|
2954
|
+
activeSnapPoint: s,
|
|
2955
|
+
setActiveSnapPoint: v,
|
|
2956
|
+
shouldScaleBackground: !1,
|
|
2957
|
+
modal: !0,
|
|
2958
|
+
children: [
|
|
2959
|
+
/* @__PURE__ */ d.jsx(fe.Trigger, { asChild: !0, children: /* @__PURE__ */ d.jsx(_o, { status: g, onClick: () => a(!0) }) }),
|
|
2960
|
+
/* @__PURE__ */ d.jsxs(fe.Portal, { children: [
|
|
2961
|
+
/* @__PURE__ */ d.jsx(fe.Overlay, { className: "mswd-vaul-overlay" }),
|
|
2961
2962
|
/* @__PURE__ */ d.jsxs(
|
|
2962
|
-
|
|
2963
|
+
fe.Content,
|
|
2963
2964
|
{
|
|
2964
2965
|
className: "mswd-vaul-content",
|
|
2965
2966
|
"aria-describedby": void 0,
|
|
2966
2967
|
children: [
|
|
2967
|
-
/* @__PURE__ */ d.jsx(
|
|
2968
|
-
/* @__PURE__ */ d.jsx(
|
|
2968
|
+
/* @__PURE__ */ d.jsx(fe.Handle, { className: "mswd-vaul-handle" }),
|
|
2969
|
+
/* @__PURE__ */ d.jsx(fe.Title, { className: "mswd-sr-only", children: "Debug Drawer" }),
|
|
2969
2970
|
/* @__PURE__ */ d.jsxs("div", { className: "mswd-header", children: [
|
|
2970
2971
|
/* @__PURE__ */ d.jsxs("div", { className: "mswd-header-left", children: [
|
|
2971
2972
|
/* @__PURE__ */ d.jsx("div", { className: "mswd-header-icon", "aria-hidden": "true", children: "⚡" }),
|
|
2972
2973
|
/* @__PURE__ */ d.jsxs("div", { children: [
|
|
2973
|
-
/* @__PURE__ */ d.jsx("p", { className: "mswd-header-title", children: "
|
|
2974
|
+
/* @__PURE__ */ d.jsx("p", { className: "mswd-header-title", children: "Debug" }),
|
|
2974
2975
|
S ? /* @__PURE__ */ d.jsx("p", { className: "mswd-header-sub mswd-header-sub--page", children: S }) : /* @__PURE__ */ d.jsx("p", { className: "mswd-header-sub", children: "mock service worker" })
|
|
2975
2976
|
] })
|
|
2976
2977
|
] }),
|
|
2977
2978
|
/* @__PURE__ */ d.jsx(
|
|
2978
|
-
|
|
2979
|
+
fe.Close,
|
|
2979
2980
|
{
|
|
2980
2981
|
className: "mswd-close-btn",
|
|
2981
2982
|
"aria-label": "Close drawer",
|
|
@@ -2983,7 +2984,7 @@ function Lo({
|
|
|
2983
2984
|
}
|
|
2984
2985
|
)
|
|
2985
2986
|
] }),
|
|
2986
|
-
/* @__PURE__ */ d.jsx(
|
|
2987
|
+
/* @__PURE__ */ d.jsx(ko, { enabled: l, onToggle: T }),
|
|
2987
2988
|
f.length === 0 ? /* @__PURE__ */ d.jsxs("div", { className: "mswd-empty", children: [
|
|
2988
2989
|
/* @__PURE__ */ d.jsx("div", { className: "mswd-empty-icon", "aria-hidden": "true", children: "📭" }),
|
|
2989
2990
|
/* @__PURE__ */ d.jsx("p", { className: "mswd-empty-title", children: "Nenhum endpoint registrado" }),
|
|
@@ -2995,7 +2996,7 @@ function Lo({
|
|
|
2995
2996
|
] })
|
|
2996
2997
|
] }) : /* @__PURE__ */ d.jsxs(d.Fragment, { children: [
|
|
2997
2998
|
/* @__PURE__ */ d.jsx(
|
|
2998
|
-
|
|
2999
|
+
Mo,
|
|
2999
3000
|
{
|
|
3000
3001
|
active: R,
|
|
3001
3002
|
disabled: !l,
|
|
@@ -3021,7 +3022,7 @@ function Lo({
|
|
|
3021
3022
|
className: `mswd-list ${l ? "" : "mswd-list--disabled"}`,
|
|
3022
3023
|
"data-vaul-no-drag": !0,
|
|
3023
3024
|
children: f.map((w) => /* @__PURE__ */ d.jsx(
|
|
3024
|
-
|
|
3025
|
+
Ao,
|
|
3025
3026
|
{
|
|
3026
3027
|
endpoint: w,
|
|
3027
3028
|
expanded: h.has(w.id),
|
|
@@ -3058,18 +3059,18 @@ function Lo({
|
|
|
3058
3059
|
}
|
|
3059
3060
|
)
|
|
3060
3061
|
] })
|
|
3061
|
-
|
|
3062
|
-
|
|
3063
|
-
|
|
3062
|
+
]
|
|
3063
|
+
}
|
|
3064
|
+
) }) : null;
|
|
3064
3065
|
}
|
|
3065
|
-
function
|
|
3066
|
+
function Wo(e) {
|
|
3066
3067
|
const t = G((r) => r.registerPage), n = G((r) => r.setCurrentPage);
|
|
3067
3068
|
Jt(() => {
|
|
3068
3069
|
t(e), n(e.pageId);
|
|
3069
3070
|
}, [e.pageId]);
|
|
3070
3071
|
}
|
|
3071
3072
|
export {
|
|
3072
|
-
|
|
3073
|
+
Fo as DebugDrawer,
|
|
3073
3074
|
G as useDebugDrawerStore,
|
|
3074
|
-
|
|
3075
|
+
Wo as useRegisterMockEndpoints
|
|
3075
3076
|
};
|