@citrusworx/juiceui 1.0.0 → 1.0.2
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/LICENSE +21 -0
- package/README.md +14 -14
- package/dist/index.css +18212 -26
- package/dist/index.js +702 -680
- package/dist/themes/kiwipress.css +4 -1
- package/package.json +13 -2
- package/dist/components/form/cc/cc.d.ts +0 -1
- package/dist/components/index.d.ts +0 -1
- package/dist/js/juice.d.ts +0 -68
package/dist/index.js
CHANGED
|
@@ -439,14 +439,14 @@ var L = () => {
|
|
|
439
439
|
} catch {
|
|
440
440
|
return null;
|
|
441
441
|
}
|
|
442
|
-
}, K = () => G()?.matches ?? !1,
|
|
442
|
+
}, K = () => G()?.matches ?? !1, ee = (e) => {
|
|
443
443
|
let t = G();
|
|
444
444
|
if (!t) return () => {};
|
|
445
445
|
let n = () => e(t.matches);
|
|
446
446
|
if (typeof t.addEventListener == "function") return t.addEventListener("change", n), () => t.removeEventListener("change", n);
|
|
447
447
|
let r = t;
|
|
448
448
|
return typeof r.addListener == "function" ? (r.addListener(n), () => r.removeListener?.(n)) : () => {};
|
|
449
|
-
},
|
|
449
|
+
}, te = () => {
|
|
450
450
|
let e = !1;
|
|
451
451
|
return {
|
|
452
452
|
get cancelled() {
|
|
@@ -456,18 +456,18 @@ var L = () => {
|
|
|
456
456
|
e = !0;
|
|
457
457
|
}
|
|
458
458
|
};
|
|
459
|
-
},
|
|
459
|
+
}, ne = (e) => {
|
|
460
460
|
let t = e.trim(), n = /^(-?\d*\.?\d+)(ms|s)$/.exec(t);
|
|
461
461
|
if (!n) return 0;
|
|
462
462
|
let r = Number.parseFloat(n[1] ?? "");
|
|
463
463
|
return !Number.isFinite(r) || r <= 0 ? 0 : n[2] === "ms" ? r : r * 1e3;
|
|
464
|
-
},
|
|
464
|
+
}, re = (e) => e.split(",").map((e) => ne(e)).filter((e) => Number.isFinite(e)), ie = (e, t) => {
|
|
465
465
|
let n = 0;
|
|
466
466
|
return e.forEach((e, r) => {
|
|
467
467
|
let i = t[r] ?? t[0] ?? 0;
|
|
468
468
|
n = Math.max(n, e + i);
|
|
469
469
|
}), n;
|
|
470
|
-
},
|
|
470
|
+
}, ae = (e) => {
|
|
471
471
|
if (typeof window > "u" || typeof window.getComputedStyle != "function") return 0;
|
|
472
472
|
let t;
|
|
473
473
|
try {
|
|
@@ -475,9 +475,9 @@ var L = () => {
|
|
|
475
475
|
} catch {
|
|
476
476
|
return 0;
|
|
477
477
|
}
|
|
478
|
-
let n = re(
|
|
478
|
+
let n = ie(re(t.transitionDuration || ""), re(t.transitionDelay || "")), r = ie(re(t.animationDuration || ""), re(t.animationDelay || ""));
|
|
479
479
|
return Math.max(n, r);
|
|
480
|
-
},
|
|
480
|
+
}, oe = (e, t, n = te()) => {
|
|
481
481
|
let r = !1, i = 0, a = () => {}, o = () => {}, s = new Promise((e) => {
|
|
482
482
|
o = e;
|
|
483
483
|
}), c = () => {
|
|
@@ -493,23 +493,23 @@ var L = () => {
|
|
|
493
493
|
immediate: !0,
|
|
494
494
|
finished: s
|
|
495
495
|
};
|
|
496
|
-
if (e.setAttribute("data-motion-state", W(t)), K() ||
|
|
496
|
+
if (e.setAttribute("data-motion-state", W(t)), K() || ae(e) <= 0) return l(!0), {
|
|
497
497
|
immediate: !0,
|
|
498
498
|
finished: s
|
|
499
499
|
};
|
|
500
|
-
let f =
|
|
501
|
-
return e.addEventListener("transitionend", u), e.addEventListener("animationend", u), i = window.setTimeout(() => l(!0), Math.ceil(f)), a =
|
|
500
|
+
let f = ae(e);
|
|
501
|
+
return e.addEventListener("transitionend", u), e.addEventListener("animationend", u), i = window.setTimeout(() => l(!0), Math.ceil(f)), a = ee((e) => {
|
|
502
502
|
e && l(!0);
|
|
503
503
|
}), {
|
|
504
504
|
immediate: !1,
|
|
505
505
|
finished: s
|
|
506
506
|
};
|
|
507
|
-
},
|
|
507
|
+
}, se = () => {
|
|
508
508
|
let e = /* @__PURE__ */ new WeakMap(), t = /* @__PURE__ */ new Set(), n = (n, r, i, a) => {
|
|
509
509
|
e.get(n)?.cancel();
|
|
510
|
-
let o =
|
|
510
|
+
let o = te();
|
|
511
511
|
e.set(n, o), t.add(n);
|
|
512
|
-
let s =
|
|
512
|
+
let s = oe(n, r, o);
|
|
513
513
|
a?.();
|
|
514
514
|
let c = () => {
|
|
515
515
|
o.cancelled || (t.delete(n), i?.());
|
|
@@ -532,23 +532,23 @@ var L = () => {
|
|
|
532
532
|
t.forEach((t) => e.get(t)?.cancel()), t.clear();
|
|
533
533
|
}
|
|
534
534
|
};
|
|
535
|
-
},
|
|
535
|
+
}, ce = {
|
|
536
536
|
root: typeof document < "u" ? document : {},
|
|
537
537
|
accordionSelector: "[accordion]",
|
|
538
538
|
triggerSelector: "[accordion-item]"
|
|
539
|
-
},
|
|
540
|
-
if (t &&
|
|
539
|
+
}, le = (e) => Array.from(e), ue = "juice-accordion-trigger", de = "juice-accordion-panel", fe = (e) => e instanceof HTMLButtonElement ? !0 : e instanceof HTMLAnchorElement ? e.hasAttribute("href") : !1, pe = L(), me = (e) => e.trim().toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-+|-+$/g, "") || "accordion", he = (e) => e.getAttribute("motion") === "accordion", ge = (e, t) => {
|
|
540
|
+
if (t && he(t)) {
|
|
541
541
|
let e = t.getAttribute("data-motion-state");
|
|
542
542
|
if (e === "exiting") return !1;
|
|
543
543
|
if (e === "entering" || e === "entered") return !0;
|
|
544
544
|
}
|
|
545
545
|
return t ? !t.hasAttribute("hidden") : e.getAttribute("aria-expanded") === "true";
|
|
546
|
-
},
|
|
546
|
+
}, _e = (e, t, n) => {
|
|
547
547
|
let r = String(n);
|
|
548
548
|
if (e.getAttribute("aria-expanded") !== r && e.setAttribute("aria-expanded", r), !t) return;
|
|
549
549
|
let i = String(!n);
|
|
550
550
|
t.getAttribute("aria-hidden") !== i && t.setAttribute("aria-hidden", i);
|
|
551
|
-
},
|
|
551
|
+
}, ve = (e = {}) => {
|
|
552
552
|
if (typeof window > "u" || typeof document > "u") return {
|
|
553
553
|
destroy: () => {},
|
|
554
554
|
sync: () => {},
|
|
@@ -559,10 +559,10 @@ var L = () => {
|
|
|
559
559
|
getState: () => null
|
|
560
560
|
};
|
|
561
561
|
let t = {
|
|
562
|
-
...
|
|
562
|
+
...ce,
|
|
563
563
|
...e
|
|
564
|
-
}, n = t.root ?? document, r = n, i =
|
|
565
|
-
i.cancel(e), e.hidden !== !t && (e.hidden = !t), e.style.removeProperty("height"), (
|
|
564
|
+
}, n = t.root ?? document, r = n, i = se(), a = T("accordion"), o = (e, t) => {
|
|
565
|
+
i.cancel(e), e.hidden !== !t && (e.hidden = !t), e.style.removeProperty("height"), (he(e) || e.hasAttribute("data-motion-state")) && e.setAttribute("data-motion-state", t ? "entered" : "exited");
|
|
566
566
|
}, s = (e) => {
|
|
567
567
|
let t = e.getAttribute("data-motion-state");
|
|
568
568
|
if (t === "entering") return;
|
|
@@ -588,8 +588,8 @@ var L = () => {
|
|
|
588
588
|
});
|
|
589
589
|
}, l = (e, t, n) => {
|
|
590
590
|
let r = g(e), i = r ? v(r) : null;
|
|
591
|
-
|
|
592
|
-
}, u = () =>
|
|
591
|
+
_e(e, t, n), t && (!he(t) || K() ? o(t, n) : n ? s(t) : c(t)), r && i && a.note(r, v(r), { baseline: i });
|
|
592
|
+
}, u = () => le(n.querySelectorAll(t.accordionSelector)), d = (e) => le(e.querySelectorAll(t.triggerSelector)).filter((n) => n.closest(t.accordionSelector) === e), f = () => u().flatMap((e) => d(e)), p = 0, m = null, h = (e) => (p += 1, `${e}-${p}`), g = (e) => {
|
|
593
593
|
if (!e) return null;
|
|
594
594
|
let n = e.closest(t.accordionSelector);
|
|
595
595
|
return n instanceof HTMLElement ? n : null;
|
|
@@ -607,7 +607,7 @@ var L = () => {
|
|
|
607
607
|
i = i.nextElementSibling;
|
|
608
608
|
}
|
|
609
609
|
return null;
|
|
610
|
-
}, v = (e) => ({ expanded: d(e).map((e) =>
|
|
610
|
+
}, v = (e) => ({ expanded: d(e).map((e) => ge(e, _(e))) }), y = (e) => e?.matches(t.accordionSelector) ? e : (e ? g(e) : null) || (u()[0] ?? null), b = (e) => {
|
|
611
611
|
if (e) {
|
|
612
612
|
if (e.matches(t.triggerSelector) && g(e)) return e;
|
|
613
613
|
let n = e.closest(t.triggerSelector);
|
|
@@ -616,12 +616,12 @@ var L = () => {
|
|
|
616
616
|
return f()[0] ?? null;
|
|
617
617
|
}, x = (e) => {
|
|
618
618
|
let t = e.getAttribute("name");
|
|
619
|
-
return t ?
|
|
619
|
+
return t ? me(t) : null;
|
|
620
620
|
}, S = (e, t) => {
|
|
621
621
|
let n = g(e);
|
|
622
622
|
if (!n) return;
|
|
623
623
|
let r = d(n), i = Math.max(0, r.indexOf(e)), a = x(n), o = r.length > 1 ? `-${i + 1}` : "";
|
|
624
|
-
e.id ||= a ? `${a}-trigger${o}` : h(
|
|
624
|
+
e.id ||= a ? `${a}-trigger${o}` : h(ue), fe(e) || (e.setAttribute("role", "button"), e.hasAttribute("tabindex") || e.setAttribute("tabindex", "0")), t && (t.id ||= a ? `${a}-panel${o}` : h(de), e.getAttribute("aria-controls") !== t.id && e.setAttribute("aria-controls", t.id), t.getAttribute("role") !== "region" && t.setAttribute("role", "region"), t.getAttribute("aria-labelledby") !== e.id && t.setAttribute("aria-labelledby", e.id));
|
|
625
625
|
}, C = (e) => {
|
|
626
626
|
let t = b(e);
|
|
627
627
|
if (!t) return;
|
|
@@ -631,17 +631,17 @@ var L = () => {
|
|
|
631
631
|
let t = b(e);
|
|
632
632
|
if (!t) return;
|
|
633
633
|
let n = _(t);
|
|
634
|
-
S(t, n), l(t, n, !1), t === m && (m = f().find((e) => e !== t &&
|
|
634
|
+
S(t, n), l(t, n, !1), t === m && (m = f().find((e) => e !== t && ge(e, _(e))) ?? null);
|
|
635
635
|
}, E = (e) => {
|
|
636
636
|
let t = b(e);
|
|
637
|
-
return t ?
|
|
637
|
+
return t ? ge(t, _(t)) : !1;
|
|
638
638
|
}, D = (e) => {
|
|
639
639
|
let t = y(e);
|
|
640
640
|
return t ? v(t) : null;
|
|
641
641
|
}, O = (e) => {
|
|
642
642
|
let t = b(e);
|
|
643
643
|
if (t) {
|
|
644
|
-
if (
|
|
644
|
+
if (ge(t, _(t))) {
|
|
645
645
|
w(t);
|
|
646
646
|
return;
|
|
647
647
|
}
|
|
@@ -652,7 +652,7 @@ var L = () => {
|
|
|
652
652
|
d(e).forEach((e) => {
|
|
653
653
|
let t = _(e);
|
|
654
654
|
if (S(e, t), t) {
|
|
655
|
-
l(e, t,
|
|
655
|
+
l(e, t, ge(e, t));
|
|
656
656
|
return;
|
|
657
657
|
}
|
|
658
658
|
e.hasAttribute("aria-expanded") || e.setAttribute("aria-expanded", "false");
|
|
@@ -662,23 +662,23 @@ var L = () => {
|
|
|
662
662
|
let n = e.target;
|
|
663
663
|
if (!(n instanceof Element)) return;
|
|
664
664
|
let r = n.closest(t.triggerSelector);
|
|
665
|
-
!(r instanceof HTMLElement) || !g(r) ||
|
|
665
|
+
!(r instanceof HTMLElement) || !g(r) || pe(e) && O(r);
|
|
666
666
|
}, j = (e) => {
|
|
667
667
|
let n = e.closest(t.triggerSelector);
|
|
668
|
-
return n instanceof HTMLElement && g(n) &&
|
|
668
|
+
return n instanceof HTMLElement && g(n) && ge(n, _(n)) ? n : f().filter((e) => ge(e, _(e))).find((t) => _(t)?.contains(e)) || (m && g(m) && ge(m, _(m)) ? m : null);
|
|
669
669
|
}, M = (e) => {
|
|
670
670
|
if (!(e instanceof KeyboardEvent)) return;
|
|
671
671
|
let n = e.target;
|
|
672
672
|
if (!(n instanceof Element)) return;
|
|
673
673
|
if (e.key === "Escape") {
|
|
674
674
|
let t = j(n);
|
|
675
|
-
if (!t || !
|
|
675
|
+
if (!t || !pe(e)) return;
|
|
676
676
|
e.preventDefault(), w(t), t.focus();
|
|
677
677
|
return;
|
|
678
678
|
}
|
|
679
679
|
if (e.key !== "Enter" && e.key !== " ") return;
|
|
680
680
|
let r = n.closest(t.triggerSelector);
|
|
681
|
-
!(r instanceof HTMLElement) || !g(r) ||
|
|
681
|
+
!(r instanceof HTMLElement) || !g(r) || fe(r) || pe(e) && (e.preventDefault(), O(r));
|
|
682
682
|
}, N = !1, P = () => {
|
|
683
683
|
N || (N = !0, requestAnimationFrame(() => {
|
|
684
684
|
N = !1, k();
|
|
@@ -706,23 +706,23 @@ var L = () => {
|
|
|
706
706
|
isExpanded: E,
|
|
707
707
|
getState: D
|
|
708
708
|
};
|
|
709
|
-
},
|
|
710
|
-
|
|
711
|
-
},
|
|
712
|
-
|
|
709
|
+
}, ye = (e = {}) => ve(e), be = null, xe = !1, Se = null, Ce = () => {
|
|
710
|
+
Se &&= (document.removeEventListener("DOMContentLoaded", Se), null);
|
|
711
|
+
}, we = () => typeof window > "u" || typeof document > "u" ? null : (xe = !1, Ce(), be ? (be.sync(), be) : (be = ve(), be)), Te = () => {
|
|
712
|
+
xe = !0, Ce(), be?.destroy(), be = null;
|
|
713
713
|
};
|
|
714
|
-
typeof window < "u" && typeof document < "u" && (document.readyState === "loading" ? (
|
|
715
|
-
|
|
716
|
-
}, document.addEventListener("DOMContentLoaded",
|
|
714
|
+
typeof window < "u" && typeof document < "u" && (document.readyState === "loading" ? (Se = () => {
|
|
715
|
+
Se = null, xe || we();
|
|
716
|
+
}, document.addEventListener("DOMContentLoaded", Se)) : we());
|
|
717
717
|
//#endregion
|
|
718
718
|
//#region src/js/src/tabs/tabs-runtime.ts
|
|
719
|
-
var
|
|
719
|
+
var Ee = {
|
|
720
720
|
root: typeof document < "u" ? document : {},
|
|
721
721
|
tabsSelector: "[tabs]",
|
|
722
722
|
listSelector: "[tabs-list]",
|
|
723
723
|
triggerSelector: "[tab]",
|
|
724
724
|
panelSelector: "[tab-panel]"
|
|
725
|
-
},
|
|
725
|
+
}, De = (e) => Array.from(e), Oe = "juice-tabs-trigger", ke = "juice-tabs-panel", Ae = L(), je = (e) => e instanceof HTMLButtonElement ? !0 : e instanceof HTMLAnchorElement ? e.hasAttribute("href") : !1, Me = (e) => e.trim().toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-+|-+$/g, "") || "tabs", Ne = (e) => e instanceof HTMLElement ? e instanceof HTMLInputElement || e instanceof HTMLTextAreaElement || e instanceof HTMLSelectElement ? !0 : e.isContentEditable : !1, Pe = (e = {}) => {
|
|
726
726
|
if (typeof window > "u" || typeof document > "u") return {
|
|
727
727
|
destroy: () => {},
|
|
728
728
|
sync: () => {},
|
|
@@ -731,9 +731,9 @@ var Te = {
|
|
|
731
731
|
getState: () => null
|
|
732
732
|
};
|
|
733
733
|
let t = {
|
|
734
|
-
...
|
|
734
|
+
...Ee,
|
|
735
735
|
...e
|
|
736
|
-
}, n = t.root ?? document, r = n, i = T("tabs"), a = () =>
|
|
736
|
+
}, n = t.root ?? document, r = n, i = T("tabs"), a = () => De(n.querySelectorAll(t.tabsSelector)), o = (e) => {
|
|
737
737
|
let n = e.querySelector(`:scope > ${t.listSelector}`);
|
|
738
738
|
return n instanceof HTMLElement ? n : null;
|
|
739
739
|
}, s = (e) => {
|
|
@@ -753,11 +753,11 @@ var Te = {
|
|
|
753
753
|
let n = o(e) ?? e, r = /* @__PURE__ */ new Set(), i = [], a = (t) => {
|
|
754
754
|
t instanceof HTMLElement && (!l(t, e) || r.has(t) || (r.add(t), i.push(t)));
|
|
755
755
|
};
|
|
756
|
-
return
|
|
756
|
+
return De(n.children).forEach(a), De(n.querySelectorAll(t.triggerSelector)).forEach(a), De(n.querySelectorAll("[role=\"tab\"]")).forEach(a), i.sort((e, t) => {
|
|
757
757
|
let n = e.compareDocumentPosition(t);
|
|
758
758
|
return n & Node.DOCUMENT_POSITION_FOLLOWING ? -1 : n & Node.DOCUMENT_POSITION_PRECEDING ? 1 : 0;
|
|
759
759
|
});
|
|
760
|
-
}, d = (e) =>
|
|
760
|
+
}, d = (e) => De(e.querySelectorAll(t.panelSelector)).filter((t) => s(t) === e), f = () => a().flatMap((e) => u(e)), p = 0, m = (e) => (p += 1, `${e}-${p}`), h = (e) => {
|
|
761
761
|
let n = s(e);
|
|
762
762
|
if (!n) return null;
|
|
763
763
|
let r = e.getAttribute("aria-controls");
|
|
@@ -787,7 +787,7 @@ var Te = {
|
|
|
787
787
|
return f()[0] ?? null;
|
|
788
788
|
}, _ = (e) => {
|
|
789
789
|
let t = e.getAttribute("name");
|
|
790
|
-
return t ?
|
|
790
|
+
return t ? Me(t) : null;
|
|
791
791
|
}, v = (e) => {
|
|
792
792
|
let t = o(e), n = d(e), r = t ?? (n.length === 0 ? e : null);
|
|
793
793
|
if (!r) return;
|
|
@@ -799,7 +799,7 @@ var Te = {
|
|
|
799
799
|
if (!n) return;
|
|
800
800
|
v(n);
|
|
801
801
|
let r = u(n), i = Math.max(0, r.indexOf(e)), a = _(n), o = r.length > 1 ? `-${i + 1}` : "";
|
|
802
|
-
e.id ||= a ? `${a}-tab${o}` : m(
|
|
802
|
+
e.id ||= a ? `${a}-tab${o}` : m(Oe), e.getAttribute("role") !== "tab" && e.setAttribute("role", "tab"), !je(e) && !e.hasAttribute("tabindex") && e.setAttribute("tabindex", "-1"), t && (t.id ||= a ? `${a}-panel${o}` : m(ke), e.getAttribute("aria-controls") !== t.id && e.setAttribute("aria-controls", t.id), t.getAttribute("role") !== "tabpanel" && t.setAttribute("role", "tabpanel"), t.getAttribute("aria-labelledby") !== e.id && t.setAttribute("aria-labelledby", e.id));
|
|
803
803
|
}, b = (e) => e.hasAttribute("active") || e.getAttribute("aria-selected") === "true", x = (e, t, n) => {
|
|
804
804
|
n ? e.hasAttribute("active") || e.setAttribute("active", "") : e.hasAttribute("active") && e.removeAttribute("active");
|
|
805
805
|
let r = String(n);
|
|
@@ -851,7 +851,7 @@ var Te = {
|
|
|
851
851
|
let t = e.target;
|
|
852
852
|
if (!(t instanceof Element)) return;
|
|
853
853
|
let n = j(t);
|
|
854
|
-
n &&
|
|
854
|
+
n && Ae(e) && C(n);
|
|
855
855
|
}, N = (e, t) => {
|
|
856
856
|
let n = s(e);
|
|
857
857
|
if (!n) return;
|
|
@@ -862,30 +862,30 @@ var Te = {
|
|
|
862
862
|
}, P = (e) => {
|
|
863
863
|
if (!(e instanceof KeyboardEvent)) return;
|
|
864
864
|
let t = e.target;
|
|
865
|
-
if (!(t instanceof Element) ||
|
|
865
|
+
if (!(t instanceof Element) || Ne(t)) return;
|
|
866
866
|
let n = j(t);
|
|
867
867
|
if (n && !(e.key === "Escape" || e.key === "ArrowUp" || e.key === "ArrowDown")) {
|
|
868
868
|
if (e.key === "ArrowRight") {
|
|
869
|
-
if (!
|
|
869
|
+
if (!Ae(e)) return;
|
|
870
870
|
e.preventDefault(), N(n, (e, t) => (e + 1) % t);
|
|
871
871
|
return;
|
|
872
872
|
}
|
|
873
873
|
if (e.key === "ArrowLeft") {
|
|
874
|
-
if (!
|
|
874
|
+
if (!Ae(e)) return;
|
|
875
875
|
e.preventDefault(), N(n, (e, t) => (e - 1 + t) % t);
|
|
876
876
|
return;
|
|
877
877
|
}
|
|
878
878
|
if (e.key === "Home") {
|
|
879
|
-
if (!
|
|
879
|
+
if (!Ae(e)) return;
|
|
880
880
|
e.preventDefault(), N(n, () => 0);
|
|
881
881
|
return;
|
|
882
882
|
}
|
|
883
883
|
if (e.key === "End") {
|
|
884
|
-
if (!
|
|
884
|
+
if (!Ae(e)) return;
|
|
885
885
|
e.preventDefault(), N(n, (e, t) => t - 1);
|
|
886
886
|
return;
|
|
887
887
|
}
|
|
888
|
-
e.key !== "Enter" && e.key !== " " ||
|
|
888
|
+
e.key !== "Enter" && e.key !== " " || je(n) || Ae(e) && (e.preventDefault(), C(n));
|
|
889
889
|
}
|
|
890
890
|
}, F = !1, I = () => {
|
|
891
891
|
F || (F = !0, requestAnimationFrame(() => {
|
|
@@ -915,17 +915,17 @@ var Te = {
|
|
|
915
915
|
selected: D,
|
|
916
916
|
getState: O
|
|
917
917
|
};
|
|
918
|
-
},
|
|
919
|
-
|
|
920
|
-
},
|
|
921
|
-
|
|
918
|
+
}, Fe = (e = {}) => Pe(e), Ie = null, Le = !1, Re = null, ze = () => {
|
|
919
|
+
Re &&= (document.removeEventListener("DOMContentLoaded", Re), null);
|
|
920
|
+
}, Be = () => typeof window > "u" || typeof document > "u" ? null : (Le = !1, ze(), Ie ? (Ie.sync(), Ie) : (Ie = Pe(), Ie)), Ve = () => {
|
|
921
|
+
Le = !0, ze(), Ie?.destroy(), Ie = null;
|
|
922
922
|
};
|
|
923
|
-
typeof window < "u" && typeof document < "u" && (document.readyState === "loading" ? (
|
|
924
|
-
|
|
925
|
-
}, document.addEventListener("DOMContentLoaded",
|
|
923
|
+
typeof window < "u" && typeof document < "u" && (document.readyState === "loading" ? (Re = () => {
|
|
924
|
+
Re = null, Le || Be();
|
|
925
|
+
}, document.addEventListener("DOMContentLoaded", Re)) : Be());
|
|
926
926
|
//#endregion
|
|
927
927
|
//#region src/js/src/shared/layer-stack.ts
|
|
928
|
-
var
|
|
928
|
+
var q = [], He = !1, Ue = 0, We = null, Ge = 0, Ke = () => typeof document < "u", qe = (e) => {
|
|
929
929
|
let t = {
|
|
930
930
|
el: e.el,
|
|
931
931
|
kind: e.kind,
|
|
@@ -933,101 +933,101 @@ var J = [], Ve = !1, He = 0, Ue = null, We = 0, Ge = () => typeof document < "u"
|
|
|
933
933
|
dismiss: e.dismiss
|
|
934
934
|
};
|
|
935
935
|
return Object.hasOwn(e, "restoreFocus") && (t.restoreFocus = e.restoreFocus ?? null), e.containsTarget && (t.containsTarget = e.containsTarget), t;
|
|
936
|
-
},
|
|
936
|
+
}, Je = (e, t) => e.containsTarget ? e.containsTarget(t) : t instanceof Node && e.el.contains(t), Ye = (e) => {
|
|
937
937
|
e.isConnected && (e.hasAttribute("tabindex") || e.setAttribute("tabindex", "-1"), e.focus());
|
|
938
|
-
},
|
|
938
|
+
}, Xe = (e, t) => {
|
|
939
939
|
if (!Object.hasOwn(e, "restoreFocus")) return;
|
|
940
940
|
let n = e.restoreFocus ?? null;
|
|
941
941
|
if (n && n.isConnected && t.every((e) => !e.el.contains(n))) {
|
|
942
942
|
n.focus();
|
|
943
943
|
return;
|
|
944
944
|
}
|
|
945
|
-
let r =
|
|
946
|
-
r &&
|
|
947
|
-
}, Xe = () => {
|
|
948
|
-
Ve &&= (Ge() && (document.removeEventListener("keydown", $e, !0), document.removeEventListener("pointerdown", et, !0)), !1);
|
|
945
|
+
let r = q[q.length - 1];
|
|
946
|
+
r && Ye(r.el);
|
|
949
947
|
}, Ze = () => {
|
|
950
|
-
|
|
951
|
-
}, Qe = (
|
|
952
|
-
|
|
953
|
-
|
|
948
|
+
He &&= (Ke() && (document.removeEventListener("keydown", et, !0), document.removeEventListener("pointerdown", tt, !0)), !1);
|
|
949
|
+
}, Qe = () => {
|
|
950
|
+
He || !Ke() || (document.addEventListener("keydown", et, !0), document.addEventListener("pointerdown", tt, !0), He = !0);
|
|
951
|
+
}, $e = (e, t) => {
|
|
952
|
+
if (!Ke()) return;
|
|
953
|
+
let n = q.findIndex((t) => t.el === e);
|
|
954
954
|
if (n === -1) return;
|
|
955
955
|
if (t?.cascade === !1) {
|
|
956
|
-
|
|
956
|
+
q.splice(n, 1), q.length === 0 && Ze();
|
|
957
957
|
return;
|
|
958
958
|
}
|
|
959
|
-
let r =
|
|
959
|
+
let r = q.splice(n), i = r[0];
|
|
960
960
|
try {
|
|
961
961
|
for (let e = r.length - 1; e >= 1; --e) r[e]?.dismiss("cascade");
|
|
962
962
|
} finally {
|
|
963
|
-
i &&
|
|
963
|
+
i && Xe(i, r), q.length === 0 && Ze();
|
|
964
964
|
}
|
|
965
965
|
};
|
|
966
|
-
function
|
|
966
|
+
function et(e) {
|
|
967
967
|
if (e.key !== "Escape" || e.defaultPrevented || e.isComposing) return;
|
|
968
|
-
let t =
|
|
968
|
+
let t = q[q.length - 1];
|
|
969
969
|
if (t) try {
|
|
970
970
|
t.dismiss("escape");
|
|
971
971
|
} finally {
|
|
972
972
|
e.preventDefault(), e.stopPropagation();
|
|
973
973
|
}
|
|
974
974
|
}
|
|
975
|
-
function
|
|
976
|
-
let t = e.target, n =
|
|
977
|
-
for (let e = 0; e < n &&
|
|
978
|
-
let e =
|
|
979
|
-
if (!e ||
|
|
975
|
+
function tt(e) {
|
|
976
|
+
let t = e.target, n = q.length + 1;
|
|
977
|
+
for (let e = 0; e < n && q.length > 0; e += 1) {
|
|
978
|
+
let e = q[q.length - 1];
|
|
979
|
+
if (!e || Je(e, t)) return;
|
|
980
980
|
let n = e.el;
|
|
981
|
-
if (e.dismiss("outside"),
|
|
981
|
+
if (e.dismiss("outside"), q[q.length - 1]?.el === n) return;
|
|
982
982
|
}
|
|
983
983
|
}
|
|
984
|
-
var
|
|
985
|
-
if (!
|
|
986
|
-
let t =
|
|
987
|
-
return n === -1 ?
|
|
988
|
-
},
|
|
989
|
-
|
|
990
|
-
},
|
|
991
|
-
if (!
|
|
992
|
-
|
|
993
|
-
let e =
|
|
984
|
+
var nt = (e) => {
|
|
985
|
+
if (!Ke()) return () => {};
|
|
986
|
+
let t = qe(e), n = q.findIndex((e) => e.el === t.el);
|
|
987
|
+
return n === -1 ? q.push(t) : q[n] = t, Qe(), (e) => $e(t.el, e);
|
|
988
|
+
}, rt = (e) => {
|
|
989
|
+
$e(e, { cascade: !1 });
|
|
990
|
+
}, it = () => Ke() ? q[q.length - 1] ?? null : null, at = (e) => Ke() ? it()?.el === e : !1, ot = () => {
|
|
991
|
+
if (!Ke() || document.body == null) return () => {};
|
|
992
|
+
Ue === 0 && (We = document.body.style.overflow, document.body.style.overflow = "hidden"), Ue += 1;
|
|
993
|
+
let e = Ge, t = !1;
|
|
994
994
|
return () => {
|
|
995
|
-
if (!(t || e !==
|
|
996
|
-
if (!
|
|
997
|
-
|
|
995
|
+
if (!(t || e !== Ge) && (t = !0, Ue = Math.max(0, Ue - 1), !(Ue > 0))) {
|
|
996
|
+
if (!Ke() || document.body == null) {
|
|
997
|
+
We = null;
|
|
998
998
|
return;
|
|
999
999
|
}
|
|
1000
|
-
document.body.style.overflow =
|
|
1000
|
+
document.body.style.overflow = We ?? "", We = null;
|
|
1001
1001
|
}
|
|
1002
1002
|
};
|
|
1003
|
-
},
|
|
1004
|
-
let t = (
|
|
1005
|
-
t <= 0 ?
|
|
1006
|
-
}),
|
|
1003
|
+
}, st = (e) => e !== "cascade", ct = /* @__PURE__ */ new Map(), lt = (e) => (ct.set(e, (ct.get(e) ?? 0) + 1), () => {
|
|
1004
|
+
let t = (ct.get(e) ?? 1) - 1;
|
|
1005
|
+
t <= 0 ? ct.delete(e) : ct.set(e, t);
|
|
1006
|
+
}), ut = (e) => {
|
|
1007
1007
|
if (!(e instanceof Element)) return !1;
|
|
1008
|
-
for (let t of
|
|
1008
|
+
for (let t of ct.keys()) try {
|
|
1009
1009
|
if (e.matches(t)) return !0;
|
|
1010
1010
|
} catch {}
|
|
1011
1011
|
return !1;
|
|
1012
|
-
},
|
|
1013
|
-
|
|
1014
|
-
},
|
|
1015
|
-
|
|
1016
|
-
},
|
|
1017
|
-
|
|
1018
|
-
},
|
|
1019
|
-
|
|
1020
|
-
}),
|
|
1021
|
-
if (
|
|
1022
|
-
},
|
|
1023
|
-
let t = /* @__PURE__ */ new Map(), n =
|
|
1012
|
+
}, dt = !1, ft = null, pt = !1, mt = 0, ht = () => {
|
|
1013
|
+
dt = !1, ft = null, pt = !1;
|
|
1014
|
+
}, gt = (e) => {
|
|
1015
|
+
dt = !0, ft = it()?.el ?? null, pt = ut(e.target);
|
|
1016
|
+
}, _t = () => {
|
|
1017
|
+
ht();
|
|
1018
|
+
}, vt = () => (mt === 0 && typeof window < "u" && window.addEventListener("click", _t), mt += 1, () => {
|
|
1019
|
+
mt = Math.max(0, mt - 1), mt === 0 && typeof window < "u" && (window.removeEventListener("click", _t), ht());
|
|
1020
|
+
}), yt = () => {
|
|
1021
|
+
if (dt) return ft;
|
|
1022
|
+
}, bt = () => pt, xt = (e) => {
|
|
1023
|
+
let t = /* @__PURE__ */ new Map(), n = lt(e.selector), r = vt(), i = (n, r = !1) => {
|
|
1024
1024
|
if (!e.shouldStack(n)) {
|
|
1025
1025
|
a(n);
|
|
1026
1026
|
return;
|
|
1027
1027
|
}
|
|
1028
1028
|
let i = t.get(n);
|
|
1029
1029
|
i && r && (i({ cascade: !1 }), t.delete(n));
|
|
1030
|
-
let o =
|
|
1030
|
+
let o = nt({
|
|
1031
1031
|
el: n,
|
|
1032
1032
|
kind: e.kind,
|
|
1033
1033
|
modal: e.isModal(n),
|
|
@@ -1036,7 +1036,7 @@ var tt = (e) => {
|
|
|
1036
1036
|
t.set(n, o);
|
|
1037
1037
|
}, a = (e) => {
|
|
1038
1038
|
let n = t.get(e);
|
|
1039
|
-
t.delete(e), n ? n({ cascade: !1 }) :
|
|
1039
|
+
t.delete(e), n ? n({ cascade: !1 }) : rt(e);
|
|
1040
1040
|
}, o = (e) => {
|
|
1041
1041
|
let n = t.get(e);
|
|
1042
1042
|
n && (t.delete(e), n());
|
|
@@ -1051,7 +1051,7 @@ var tt = (e) => {
|
|
|
1051
1051
|
e.isClosing(r) || i(r, !1);
|
|
1052
1052
|
}
|
|
1053
1053
|
}, c = (e) => {
|
|
1054
|
-
s(),
|
|
1054
|
+
s(), gt(e);
|
|
1055
1055
|
}, l = (e) => {
|
|
1056
1056
|
!(e instanceof KeyboardEvent) || e.key !== "Escape" || s();
|
|
1057
1057
|
};
|
|
@@ -1066,29 +1066,29 @@ var tt = (e) => {
|
|
|
1066
1066
|
n(), r();
|
|
1067
1067
|
}
|
|
1068
1068
|
};
|
|
1069
|
-
},
|
|
1069
|
+
}, St = [
|
|
1070
1070
|
"a[href]",
|
|
1071
1071
|
"button:not([disabled])",
|
|
1072
1072
|
"textarea:not([disabled])",
|
|
1073
1073
|
"input:not([disabled]):not([type=\"hidden\"])",
|
|
1074
1074
|
"select:not([disabled])",
|
|
1075
1075
|
"[tabindex]:not([tabindex=\"-1\"])"
|
|
1076
|
-
].join(","),
|
|
1077
|
-
let t = e.querySelector("[autofocus]"), n =
|
|
1076
|
+
].join(","), Ct = (e) => !(e.closest("[hidden]") || e.getAttribute("aria-hidden") === "true" || e instanceof HTMLButtonElement && e.disabled || e instanceof HTMLInputElement && e.disabled), wt = (e) => Array.from(e.querySelectorAll(St)).filter(Ct), Tt = (e) => {
|
|
1077
|
+
let t = e.querySelector("[autofocus]"), n = wt(e), r = (t && Ct(t) ? t : null) ?? n[0] ?? e;
|
|
1078
1078
|
r === e && !e.hasAttribute("tabindex") && e.setAttribute("tabindex", "-1"), r.focus();
|
|
1079
|
-
},
|
|
1079
|
+
}, Et = (e, t) => {
|
|
1080
1080
|
if (e.key !== "Tab") return !1;
|
|
1081
|
-
let n =
|
|
1081
|
+
let n = wt(t), r = document.activeElement instanceof HTMLElement ? document.activeElement : null;
|
|
1082
1082
|
if (n.length === 0) return e.preventDefault(), t.hasAttribute("tabindex") || t.setAttribute("tabindex", "-1"), t.focus(), !0;
|
|
1083
1083
|
let i = n[0], a = n[n.length - 1];
|
|
1084
1084
|
return e.shiftKey ? !r || r === i || !t.contains(r) ? (e.preventDefault(), a.focus(), !0) : !0 : !r || r === a || !t.contains(r) ? (e.preventDefault(), i.focus(), !0) : !0;
|
|
1085
|
-
},
|
|
1085
|
+
}, Dt = {
|
|
1086
1086
|
root: typeof document < "u" ? document : {},
|
|
1087
1087
|
overlaySelector: "[modal-overlay]",
|
|
1088
1088
|
dialogSelector: "[modal]",
|
|
1089
1089
|
closeSelector: "[modal-close]",
|
|
1090
1090
|
closeOnBackdrop: !0
|
|
1091
|
-
},
|
|
1091
|
+
}, Ot = (e) => Array.from(e), kt = "juice-modal-overlay", At = "juice-modal-dialog", jt = "juice-modal-title", Mt = L(), Nt = /* @__PURE__ */ new WeakMap(), Pt = (e) => e.trim().toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-+|-+$/g, "") || "modal", Ft = (e) => e instanceof HTMLButtonElement ? !0 : e instanceof HTMLAnchorElement ? e.hasAttribute("href") : !1, J = (e) => !e.hasAttribute("hidden"), It = (e) => e.getAttribute("data-motion-state") === "exiting", Lt = (e = {}) => {
|
|
1092
1092
|
if (typeof window > "u" || typeof document > "u") return {
|
|
1093
1093
|
destroy: () => {},
|
|
1094
1094
|
sync: () => {},
|
|
@@ -1099,13 +1099,13 @@ var tt = (e) => {
|
|
|
1099
1099
|
getState: () => null
|
|
1100
1100
|
};
|
|
1101
1101
|
let t = {
|
|
1102
|
-
...
|
|
1102
|
+
...Dt,
|
|
1103
1103
|
...e
|
|
1104
|
-
}, n = t.root ?? document, r = n, i =
|
|
1104
|
+
}, n = t.root ?? document, r = n, i = se(), a = T("modal"), o, s = 0, c = (e) => (s += 1, `${e}-${s}`), l = () => Ot(n.querySelectorAll(t.overlaySelector)), u = (e) => {
|
|
1105
1105
|
if (!e) return null;
|
|
1106
1106
|
let n = e.closest(t.overlaySelector);
|
|
1107
1107
|
return n instanceof HTMLElement ? n : null;
|
|
1108
|
-
}, d = (e) => V(e, n), f = (e) => e?.matches(t.overlaySelector) ? n instanceof Document ? !0 : n instanceof Node ? n.contains(e) : l().includes(e) : !1, p = (e) =>
|
|
1108
|
+
}, d = (e) => V(e, n), f = (e) => e?.matches(t.overlaySelector) ? n instanceof Document ? !0 : n instanceof Node ? n.contains(e) : l().includes(e) : !1, p = (e) => Ot(e.querySelectorAll(t.dialogSelector)).find((t) => u(t) === e) || Ot(e.querySelectorAll("[role=\"dialog\"]")).find((t) => u(t) === e) || (Ot(e.children).find((e) => e instanceof HTMLElement) ?? e), m = (e) => {
|
|
1109
1109
|
if (u(e)) return null;
|
|
1110
1110
|
for (let t of B(e)) {
|
|
1111
1111
|
let e = d(t);
|
|
@@ -1129,49 +1129,49 @@ var tt = (e) => {
|
|
|
1129
1129
|
if (e) return e;
|
|
1130
1130
|
}
|
|
1131
1131
|
}
|
|
1132
|
-
return l().find(
|
|
1132
|
+
return l().find(J) ?? l()[0] ?? null;
|
|
1133
1133
|
}, g = (e) => {
|
|
1134
1134
|
let t = e.getAttribute("name");
|
|
1135
|
-
return t ?
|
|
1136
|
-
}, _ = (e) => e.id ?
|
|
1135
|
+
return t ? Pt(t) : e.id ? Pt(e.id) : null;
|
|
1136
|
+
}, _ = (e) => e.id ? Ot(document.querySelectorAll("[aria-controls]")).filter((t) => u(t) ? !1 : B(t).includes(e.id)) : [], v = (e, t) => {
|
|
1137
1137
|
let n = String(t);
|
|
1138
1138
|
_(e).forEach((e) => {
|
|
1139
1139
|
e.getAttribute("aria-expanded") !== n && e.setAttribute("aria-expanded", n), e.hasAttribute("aria-haspopup") || e.setAttribute("aria-haspopup", "dialog");
|
|
1140
1140
|
});
|
|
1141
1141
|
}, y = (e) => {
|
|
1142
1142
|
let n = p(e), r = g(e);
|
|
1143
|
-
if (e.id ||= r ? `${r}-overlay` : c(
|
|
1143
|
+
if (e.id ||= r ? `${r}-overlay` : c(kt), n.id ||= r ? `${r}-dialog` : c(At), n.getAttribute("role") !== "dialog" && n.setAttribute("role", "dialog"), n.getAttribute("aria-modal") !== "true" && n.setAttribute("aria-modal", "true"), !n.hasAttribute("aria-labelledby") && !n.hasAttribute("aria-label")) {
|
|
1144
1144
|
let e = n.querySelector("[modal-header] :is(h1,h2,h3,h4,h5,h6), :is(h1,h2,h3,h4,h5,h6)");
|
|
1145
|
-
e && (e.id ||= r ? `${r}-title` : c(
|
|
1145
|
+
e && (e.id ||= r ? `${r}-title` : c(jt), n.setAttribute("aria-labelledby", e.id));
|
|
1146
1146
|
}
|
|
1147
|
-
|
|
1148
|
-
|
|
1147
|
+
Ot(e.querySelectorAll(t.closeSelector)).filter((t) => u(t) === e).forEach((e) => {
|
|
1148
|
+
Ft(e) || (e.setAttribute("role", "button"), e.hasAttribute("tabindex") || e.setAttribute("tabindex", "0")), !e.hasAttribute("aria-label") && !e.hasAttribute("aria-labelledby") && !e.textContent?.trim() && e.setAttribute("aria-label", "Close");
|
|
1149
1149
|
}), _(e).forEach((t) => {
|
|
1150
|
-
|
|
1150
|
+
Ft(t) || (t.setAttribute("role", "button"), t.hasAttribute("tabindex") || t.setAttribute("tabindex", "0")), t.hasAttribute("aria-haspopup") || t.setAttribute("aria-haspopup", "dialog"), t.hasAttribute("aria-expanded") || t.setAttribute("aria-expanded", String(J(e)));
|
|
1151
1151
|
});
|
|
1152
1152
|
}, b = (e, t) => {
|
|
1153
1153
|
let n = document.activeElement instanceof HTMLElement ? document.activeElement : null, r = t && !e.contains(t) ? t : n && !e.contains(n) ? n : null;
|
|
1154
|
-
r &&
|
|
1154
|
+
r && Nt.set(e, r);
|
|
1155
1155
|
}, x = (e) => {
|
|
1156
|
-
let t =
|
|
1157
|
-
|
|
1156
|
+
let t = Nt.get(e);
|
|
1157
|
+
Nt.delete(e), t?.isConnected && t.focus();
|
|
1158
1158
|
}, S = (e) => {
|
|
1159
|
-
|
|
1159
|
+
Tt(p(e));
|
|
1160
1160
|
}, C = (e, t) => {
|
|
1161
|
-
let n = { open:
|
|
1162
|
-
e.hidden !== !t && (e.hidden = !t), a.note(e, { open:
|
|
1161
|
+
let n = { open: J(e) };
|
|
1162
|
+
e.hidden !== !t && (e.hidden = !t), a.note(e, { open: J(e) }, { baseline: n });
|
|
1163
1163
|
}, w = (e, t) => {
|
|
1164
|
-
!
|
|
1165
|
-
o.pop(e), C(e, !1), v(e, !1), t ? x(e) :
|
|
1164
|
+
!J(e) || It(e) || (y(e), i.exit(e, () => {
|
|
1165
|
+
o.pop(e), C(e, !1), v(e, !1), t ? x(e) : Nt.delete(e);
|
|
1166
1166
|
}));
|
|
1167
1167
|
}, E = (e, n) => {
|
|
1168
|
-
l().concat(
|
|
1169
|
-
t === e || !
|
|
1168
|
+
l().concat(Ot(document.querySelectorAll(t.overlaySelector))).forEach((t) => {
|
|
1169
|
+
t === e || !J(t) || It(t) || w(t, !1);
|
|
1170
1170
|
}), b(e, n), y(e), C(e, !0), v(e, !0), o.connect(e, !0), S(e), i.enter(e);
|
|
1171
1171
|
}, D = (e) => {
|
|
1172
1172
|
let t = h(e);
|
|
1173
1173
|
if (t) {
|
|
1174
|
-
if (
|
|
1174
|
+
if (J(t) && !It(t)) {
|
|
1175
1175
|
y(t), v(t, !0), o.connect(t, !1);
|
|
1176
1176
|
return;
|
|
1177
1177
|
}
|
|
@@ -1179,11 +1179,11 @@ var tt = (e) => {
|
|
|
1179
1179
|
}
|
|
1180
1180
|
}, O = (e) => {
|
|
1181
1181
|
let t = h(e);
|
|
1182
|
-
!t || !
|
|
1182
|
+
!t || !J(t) || It(t) || w(t, !0);
|
|
1183
1183
|
}, k = (e) => {
|
|
1184
1184
|
let t = h(e);
|
|
1185
1185
|
if (t) {
|
|
1186
|
-
if (
|
|
1186
|
+
if (J(t) && !It(t)) {
|
|
1187
1187
|
O(t);
|
|
1188
1188
|
return;
|
|
1189
1189
|
}
|
|
@@ -1191,13 +1191,13 @@ var tt = (e) => {
|
|
|
1191
1191
|
}
|
|
1192
1192
|
}, A = (e) => {
|
|
1193
1193
|
let t = h(e);
|
|
1194
|
-
return t ?
|
|
1194
|
+
return t ? J(t) : !1;
|
|
1195
1195
|
}, j = (e) => {
|
|
1196
1196
|
let t = h(e);
|
|
1197
|
-
return t ? { open:
|
|
1197
|
+
return t ? { open: J(t) } : null;
|
|
1198
1198
|
}, M = () => {
|
|
1199
1199
|
l().forEach((e) => {
|
|
1200
|
-
y(e), v(e,
|
|
1200
|
+
y(e), v(e, J(e)), a.note(e, { open: J(e) });
|
|
1201
1201
|
}), o.reconcile();
|
|
1202
1202
|
}, N = (e) => t.closeOnBackdrop ? e.getAttribute("modal-overlay") !== "static" : !1, P = (e) => {
|
|
1203
1203
|
if (!(e instanceof HTMLElement) || u(e)) return null;
|
|
@@ -1211,63 +1211,63 @@ var tt = (e) => {
|
|
|
1211
1211
|
if (r && f(r)) {
|
|
1212
1212
|
let i = n.closest(t.closeSelector) instanceof HTMLElement ? n.closest(t.closeSelector) : null;
|
|
1213
1213
|
if (i && u(i) === r) {
|
|
1214
|
-
if (!
|
|
1214
|
+
if (!Mt(e)) return;
|
|
1215
1215
|
O(r);
|
|
1216
1216
|
return;
|
|
1217
1217
|
}
|
|
1218
1218
|
if (n === r && N(r)) {
|
|
1219
|
-
let t =
|
|
1220
|
-
if ((t === void 0 ?
|
|
1219
|
+
let t = yt();
|
|
1220
|
+
if ((t === void 0 ? it()?.el ?? null : t) !== r || !Mt(e)) return;
|
|
1221
1221
|
O(r);
|
|
1222
1222
|
}
|
|
1223
1223
|
return;
|
|
1224
1224
|
}
|
|
1225
1225
|
let i = P(n);
|
|
1226
|
-
i &&
|
|
1226
|
+
i && Mt(e) && k(i);
|
|
1227
1227
|
}, I = () => {
|
|
1228
|
-
let e =
|
|
1229
|
-
return !e?.modal || e.kind !== "modal" || !f(e.el) || !
|
|
1230
|
-
}, L = (e, t) =>
|
|
1228
|
+
let e = it();
|
|
1229
|
+
return !e?.modal || e.kind !== "modal" || !f(e.el) || !J(e.el) ? null : e.el;
|
|
1230
|
+
}, L = (e, t) => Et(e, p(t)), R = (e) => {
|
|
1231
1231
|
if (!(e instanceof KeyboardEvent)) return;
|
|
1232
1232
|
let n = e.target;
|
|
1233
1233
|
if (!(n instanceof Element)) return;
|
|
1234
1234
|
if (e.key === "Tab") {
|
|
1235
1235
|
let t = I();
|
|
1236
|
-
if (!t || !
|
|
1236
|
+
if (!t || !Mt(e)) return;
|
|
1237
1237
|
L(e, t);
|
|
1238
1238
|
return;
|
|
1239
1239
|
}
|
|
1240
1240
|
if (e.key !== "Enter" && e.key !== " ") return;
|
|
1241
1241
|
let r = n.closest(t.closeSelector);
|
|
1242
|
-
if (r instanceof HTMLElement && u(r) && !
|
|
1243
|
-
if (!
|
|
1242
|
+
if (r instanceof HTMLElement && u(r) && !Ft(r)) {
|
|
1243
|
+
if (!Mt(e)) return;
|
|
1244
1244
|
e.preventDefault(), O(r);
|
|
1245
1245
|
return;
|
|
1246
1246
|
}
|
|
1247
1247
|
let i = P(n);
|
|
1248
|
-
!i ||
|
|
1248
|
+
!i || Ft(i) || Mt(e) && (e.preventDefault(), k(i));
|
|
1249
1249
|
}, z = (e) => {
|
|
1250
1250
|
let t = I();
|
|
1251
1251
|
if (!t) return;
|
|
1252
1252
|
let n = e.target;
|
|
1253
|
-
if (!(n instanceof Node) || t.contains(n) || !
|
|
1253
|
+
if (!(n instanceof Node) || t.contains(n) || !Mt(e)) return;
|
|
1254
1254
|
let r = p(t);
|
|
1255
|
-
(
|
|
1255
|
+
(wt(r)[0] ?? r).focus();
|
|
1256
1256
|
}, H = !1, U = () => {
|
|
1257
1257
|
H || (H = !0, requestAnimationFrame(() => {
|
|
1258
1258
|
H = !1, M();
|
|
1259
1259
|
}));
|
|
1260
1260
|
}, W = typeof MutationObserver < "u" ? new MutationObserver(() => U()) : null;
|
|
1261
|
-
return o =
|
|
1261
|
+
return o = xt({
|
|
1262
1262
|
kind: "modal",
|
|
1263
1263
|
selector: t.overlaySelector,
|
|
1264
1264
|
getOverlays: l,
|
|
1265
|
-
isOpen:
|
|
1266
|
-
isClosing:
|
|
1265
|
+
isOpen: J,
|
|
1266
|
+
isClosing: It,
|
|
1267
1267
|
isModal: () => !0,
|
|
1268
1268
|
shouldStack: () => !0,
|
|
1269
1269
|
dismiss: (e, t) => {
|
|
1270
|
-
f(e) && (t === "outside" && (!
|
|
1270
|
+
f(e) && (t === "outside" && (!bt() || !N(e)) || w(e, st(t)));
|
|
1271
1271
|
}
|
|
1272
1272
|
}), r.addEventListener("click", F), r.addEventListener("keydown", R, !0), r.addEventListener("focusin", z, !0), W && n instanceof Node && W.observe(n, {
|
|
1273
1273
|
childList: !0,
|
|
@@ -1293,23 +1293,23 @@ var tt = (e) => {
|
|
|
1293
1293
|
isOpen: A,
|
|
1294
1294
|
getState: j
|
|
1295
1295
|
};
|
|
1296
|
-
},
|
|
1297
|
-
|
|
1298
|
-
},
|
|
1299
|
-
|
|
1296
|
+
}, Rt = (e = {}) => Lt(e), zt = null, Bt = !1, Vt = null, Ht = () => {
|
|
1297
|
+
Vt &&= (document.removeEventListener("DOMContentLoaded", Vt), null);
|
|
1298
|
+
}, Ut = () => typeof window > "u" || typeof document > "u" ? null : (Bt = !1, Ht(), zt ? (zt.sync(), zt) : (zt = Lt(), zt)), Wt = () => {
|
|
1299
|
+
Bt = !0, Ht(), zt?.destroy(), zt = null;
|
|
1300
1300
|
};
|
|
1301
|
-
typeof window < "u" && typeof document < "u" && (document.readyState === "loading" ? (
|
|
1302
|
-
|
|
1303
|
-
}, document.addEventListener("DOMContentLoaded",
|
|
1301
|
+
typeof window < "u" && typeof document < "u" && (document.readyState === "loading" ? (Vt = () => {
|
|
1302
|
+
Vt = null, Bt || Ut();
|
|
1303
|
+
}, document.addEventListener("DOMContentLoaded", Vt)) : Ut());
|
|
1304
1304
|
//#endregion
|
|
1305
1305
|
//#region src/js/src/drawer/drawer-runtime.ts
|
|
1306
|
-
var
|
|
1306
|
+
var Gt = {
|
|
1307
1307
|
root: typeof document < "u" ? document : {},
|
|
1308
1308
|
overlaySelector: "[drawer-overlay]",
|
|
1309
1309
|
dialogSelector: "[drawer]",
|
|
1310
1310
|
closeSelector: "[drawer-close]",
|
|
1311
1311
|
closeOnBackdrop: !0
|
|
1312
|
-
},
|
|
1312
|
+
}, Kt = (e) => Array.from(e), qt = "juice-drawer-overlay", Jt = "juice-drawer-dialog", Yt = "juice-drawer-title", Xt = L(), Zt = /* @__PURE__ */ new WeakMap(), Qt = (e) => e.trim().toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-+|-+$/g, "") || "drawer", $t = (e) => e instanceof HTMLButtonElement ? !0 : e instanceof HTMLAnchorElement ? e.hasAttribute("href") : !1, Y = (e) => !e.hasAttribute("hidden"), en = (e) => e.getAttribute("data-motion-state") === "exiting", tn = (e = {}) => {
|
|
1313
1313
|
if (typeof window > "u" || typeof document > "u") return {
|
|
1314
1314
|
destroy: () => {},
|
|
1315
1315
|
sync: () => {},
|
|
@@ -1320,13 +1320,13 @@ var Wt = {
|
|
|
1320
1320
|
getState: () => null
|
|
1321
1321
|
};
|
|
1322
1322
|
let t = {
|
|
1323
|
-
...
|
|
1323
|
+
...Gt,
|
|
1324
1324
|
...e
|
|
1325
|
-
}, n = t.root ?? document, r = n, i =
|
|
1325
|
+
}, n = t.root ?? document, r = n, i = se(), a = T("drawer"), o, s = 0, c = (e) => (s += 1, `${e}-${s}`), l = () => Kt(n.querySelectorAll(t.overlaySelector)), u = (e) => {
|
|
1326
1326
|
if (!e) return null;
|
|
1327
1327
|
let n = e.closest(t.overlaySelector);
|
|
1328
1328
|
return n instanceof HTMLElement ? n : null;
|
|
1329
|
-
}, d = (e) => V(e, n), f = (e) => e?.matches(t.overlaySelector) ? n instanceof Document ? !0 : n instanceof Node ? n.contains(e) : l().includes(e) : !1, p = (e) =>
|
|
1329
|
+
}, d = (e) => V(e, n), f = (e) => e?.matches(t.overlaySelector) ? n instanceof Document ? !0 : n instanceof Node ? n.contains(e) : l().includes(e) : !1, p = (e) => Kt(e.querySelectorAll(t.dialogSelector)).find((t) => u(t) === e) || Kt(e.querySelectorAll("[role=\"dialog\"]")).find((t) => u(t) === e) || (Kt(e.children).find((e) => e instanceof HTMLElement) ?? e), m = (e) => {
|
|
1330
1330
|
if (u(e)) return null;
|
|
1331
1331
|
for (let t of B(e)) {
|
|
1332
1332
|
let e = d(t);
|
|
@@ -1350,49 +1350,49 @@ var Wt = {
|
|
|
1350
1350
|
if (e) return e;
|
|
1351
1351
|
}
|
|
1352
1352
|
}
|
|
1353
|
-
return l().find(
|
|
1353
|
+
return l().find(Y) ?? l()[0] ?? null;
|
|
1354
1354
|
}, g = (e) => {
|
|
1355
1355
|
let t = e.getAttribute("name");
|
|
1356
|
-
return t ?
|
|
1357
|
-
}, _ = (e) => e.id ?
|
|
1356
|
+
return t ? Qt(t) : e.id ? Qt(e.id) : null;
|
|
1357
|
+
}, _ = (e) => e.id ? Kt(document.querySelectorAll("[aria-controls]")).filter((t) => u(t) ? !1 : B(t).includes(e.id)) : [], v = (e, t) => {
|
|
1358
1358
|
let n = String(t);
|
|
1359
1359
|
_(e).forEach((e) => {
|
|
1360
1360
|
e.getAttribute("aria-expanded") !== n && e.setAttribute("aria-expanded", n), e.hasAttribute("aria-haspopup") || e.setAttribute("aria-haspopup", "dialog");
|
|
1361
1361
|
});
|
|
1362
1362
|
}, y = (e) => {
|
|
1363
1363
|
let n = p(e), r = g(e);
|
|
1364
|
-
if (e.id ||= r ? `${r}-overlay` : c(
|
|
1364
|
+
if (e.id ||= r ? `${r}-overlay` : c(qt), n.id ||= r ? `${r}-dialog` : c(Jt), n.getAttribute("role") !== "dialog" && n.setAttribute("role", "dialog"), n.getAttribute("aria-modal") !== "true" && n.setAttribute("aria-modal", "true"), !n.hasAttribute("aria-labelledby") && !n.hasAttribute("aria-label")) {
|
|
1365
1365
|
let e = n.querySelector("[drawer-header] :is(h1,h2,h3,h4,h5,h6), :is(h1,h2,h3,h4,h5,h6)");
|
|
1366
|
-
e && (e.id ||= r ? `${r}-title` : c(
|
|
1366
|
+
e && (e.id ||= r ? `${r}-title` : c(Yt), n.setAttribute("aria-labelledby", e.id));
|
|
1367
1367
|
}
|
|
1368
|
-
|
|
1369
|
-
|
|
1368
|
+
Kt(e.querySelectorAll(t.closeSelector)).filter((t) => u(t) === e).forEach((e) => {
|
|
1369
|
+
$t(e) || (e.setAttribute("role", "button"), e.hasAttribute("tabindex") || e.setAttribute("tabindex", "0")), !e.hasAttribute("aria-label") && !e.hasAttribute("aria-labelledby") && !e.textContent?.trim() && e.setAttribute("aria-label", "Close");
|
|
1370
1370
|
}), _(e).forEach((t) => {
|
|
1371
|
-
|
|
1371
|
+
$t(t) || (t.setAttribute("role", "button"), t.hasAttribute("tabindex") || t.setAttribute("tabindex", "0")), t.hasAttribute("aria-haspopup") || t.setAttribute("aria-haspopup", "dialog"), t.hasAttribute("aria-expanded") || t.setAttribute("aria-expanded", String(Y(e)));
|
|
1372
1372
|
});
|
|
1373
1373
|
}, b = (e, t) => {
|
|
1374
1374
|
let n = document.activeElement instanceof HTMLElement ? document.activeElement : null, r = t && !e.contains(t) ? t : n && !e.contains(n) ? n : null;
|
|
1375
|
-
r &&
|
|
1375
|
+
r && Zt.set(e, r);
|
|
1376
1376
|
}, x = (e) => {
|
|
1377
|
-
let t =
|
|
1378
|
-
|
|
1377
|
+
let t = Zt.get(e);
|
|
1378
|
+
Zt.delete(e), t?.isConnected && t.focus();
|
|
1379
1379
|
}, S = (e) => {
|
|
1380
|
-
|
|
1380
|
+
Tt(p(e));
|
|
1381
1381
|
}, C = (e, t) => {
|
|
1382
|
-
let n = { open:
|
|
1383
|
-
e.hidden !== !t && (e.hidden = !t), a.note(e, { open:
|
|
1382
|
+
let n = { open: Y(e) };
|
|
1383
|
+
e.hidden !== !t && (e.hidden = !t), a.note(e, { open: Y(e) }, { baseline: n });
|
|
1384
1384
|
}, w = (e, t) => {
|
|
1385
|
-
!
|
|
1386
|
-
o.pop(e), C(e, !1), v(e, !1), t ? x(e) :
|
|
1385
|
+
!Y(e) || en(e) || (y(e), i.exit(e, () => {
|
|
1386
|
+
o.pop(e), C(e, !1), v(e, !1), t ? x(e) : Zt.delete(e);
|
|
1387
1387
|
}));
|
|
1388
1388
|
}, E = (e, n) => {
|
|
1389
|
-
l().concat(
|
|
1390
|
-
t === e || !
|
|
1389
|
+
l().concat(Kt(document.querySelectorAll(t.overlaySelector))).forEach((t) => {
|
|
1390
|
+
t === e || !Y(t) || en(t) || w(t, !1);
|
|
1391
1391
|
}), b(e, n), y(e), C(e, !0), v(e, !0), o.connect(e, !0), S(e), i.enter(e);
|
|
1392
1392
|
}, D = (e) => {
|
|
1393
1393
|
let t = h(e);
|
|
1394
1394
|
if (t) {
|
|
1395
|
-
if (
|
|
1395
|
+
if (Y(t) && !en(t)) {
|
|
1396
1396
|
y(t), v(t, !0), o.connect(t, !1);
|
|
1397
1397
|
return;
|
|
1398
1398
|
}
|
|
@@ -1400,11 +1400,11 @@ var Wt = {
|
|
|
1400
1400
|
}
|
|
1401
1401
|
}, O = (e) => {
|
|
1402
1402
|
let t = h(e);
|
|
1403
|
-
!t || !
|
|
1403
|
+
!t || !Y(t) || en(t) || w(t, !0);
|
|
1404
1404
|
}, k = (e) => {
|
|
1405
1405
|
let t = h(e);
|
|
1406
1406
|
if (t) {
|
|
1407
|
-
if (
|
|
1407
|
+
if (Y(t) && !en(t)) {
|
|
1408
1408
|
O(t);
|
|
1409
1409
|
return;
|
|
1410
1410
|
}
|
|
@@ -1412,13 +1412,13 @@ var Wt = {
|
|
|
1412
1412
|
}
|
|
1413
1413
|
}, A = (e) => {
|
|
1414
1414
|
let t = h(e);
|
|
1415
|
-
return t ?
|
|
1415
|
+
return t ? Y(t) : !1;
|
|
1416
1416
|
}, j = (e) => {
|
|
1417
1417
|
let t = h(e);
|
|
1418
|
-
return t ? { open:
|
|
1418
|
+
return t ? { open: Y(t) } : null;
|
|
1419
1419
|
}, M = () => {
|
|
1420
1420
|
l().forEach((e) => {
|
|
1421
|
-
y(e), v(e,
|
|
1421
|
+
y(e), v(e, Y(e)), a.note(e, { open: Y(e) });
|
|
1422
1422
|
}), o.reconcile();
|
|
1423
1423
|
}, N = (e) => t.closeOnBackdrop ? e.getAttribute("drawer-overlay") !== "static" : !1, P = (e) => {
|
|
1424
1424
|
if (!(e instanceof HTMLElement) || u(e)) return null;
|
|
@@ -1432,63 +1432,63 @@ var Wt = {
|
|
|
1432
1432
|
if (r && f(r)) {
|
|
1433
1433
|
let i = n.closest(t.closeSelector) instanceof HTMLElement ? n.closest(t.closeSelector) : null;
|
|
1434
1434
|
if (i && u(i) === r) {
|
|
1435
|
-
if (!
|
|
1435
|
+
if (!Xt(e)) return;
|
|
1436
1436
|
O(r);
|
|
1437
1437
|
return;
|
|
1438
1438
|
}
|
|
1439
1439
|
if (n === r && N(r)) {
|
|
1440
|
-
let t =
|
|
1441
|
-
if ((t === void 0 ?
|
|
1440
|
+
let t = yt();
|
|
1441
|
+
if ((t === void 0 ? it()?.el ?? null : t) !== r || !Xt(e)) return;
|
|
1442
1442
|
O(r);
|
|
1443
1443
|
}
|
|
1444
1444
|
return;
|
|
1445
1445
|
}
|
|
1446
1446
|
let i = P(n);
|
|
1447
|
-
i &&
|
|
1447
|
+
i && Xt(e) && k(i);
|
|
1448
1448
|
}, I = () => {
|
|
1449
|
-
let e =
|
|
1450
|
-
return !e?.modal || e.kind !== "drawer" || !f(e.el) || !
|
|
1451
|
-
}, L = (e, t) =>
|
|
1449
|
+
let e = it();
|
|
1450
|
+
return !e?.modal || e.kind !== "drawer" || !f(e.el) || !Y(e.el) ? null : e.el;
|
|
1451
|
+
}, L = (e, t) => Et(e, p(t)), R = (e) => {
|
|
1452
1452
|
if (!(e instanceof KeyboardEvent)) return;
|
|
1453
1453
|
let n = e.target;
|
|
1454
1454
|
if (!(n instanceof Element)) return;
|
|
1455
1455
|
if (e.key === "Tab") {
|
|
1456
1456
|
let t = I();
|
|
1457
|
-
if (!t || !
|
|
1457
|
+
if (!t || !Xt(e)) return;
|
|
1458
1458
|
L(e, t);
|
|
1459
1459
|
return;
|
|
1460
1460
|
}
|
|
1461
1461
|
if (e.key !== "Enter" && e.key !== " ") return;
|
|
1462
1462
|
let r = n.closest(t.closeSelector);
|
|
1463
|
-
if (r instanceof HTMLElement && u(r) &&
|
|
1464
|
-
if (!
|
|
1463
|
+
if (r instanceof HTMLElement && u(r) && !$t(r)) {
|
|
1464
|
+
if (!Xt(e)) return;
|
|
1465
1465
|
e.preventDefault(), O(r);
|
|
1466
1466
|
return;
|
|
1467
1467
|
}
|
|
1468
1468
|
let i = P(n);
|
|
1469
|
-
!i ||
|
|
1469
|
+
!i || $t(i) || Xt(e) && (e.preventDefault(), k(i));
|
|
1470
1470
|
}, z = (e) => {
|
|
1471
1471
|
let t = I();
|
|
1472
1472
|
if (!t) return;
|
|
1473
1473
|
let n = e.target;
|
|
1474
|
-
if (!(n instanceof Node) || t.contains(n) || !
|
|
1474
|
+
if (!(n instanceof Node) || t.contains(n) || !Xt(e)) return;
|
|
1475
1475
|
let r = p(t);
|
|
1476
|
-
(
|
|
1476
|
+
(wt(r)[0] ?? r).focus();
|
|
1477
1477
|
}, H = !1, U = () => {
|
|
1478
1478
|
H || (H = !0, requestAnimationFrame(() => {
|
|
1479
1479
|
H = !1, M();
|
|
1480
1480
|
}));
|
|
1481
1481
|
}, W = typeof MutationObserver < "u" ? new MutationObserver(() => U()) : null;
|
|
1482
|
-
return o =
|
|
1482
|
+
return o = xt({
|
|
1483
1483
|
kind: "drawer",
|
|
1484
1484
|
selector: t.overlaySelector,
|
|
1485
1485
|
getOverlays: l,
|
|
1486
|
-
isOpen:
|
|
1487
|
-
isClosing:
|
|
1486
|
+
isOpen: Y,
|
|
1487
|
+
isClosing: en,
|
|
1488
1488
|
isModal: () => !0,
|
|
1489
1489
|
shouldStack: () => !0,
|
|
1490
1490
|
dismiss: (e, t) => {
|
|
1491
|
-
f(e) && (t === "outside" && (!
|
|
1491
|
+
f(e) && (t === "outside" && (!bt() || !N(e)) || w(e, st(t)));
|
|
1492
1492
|
}
|
|
1493
1493
|
}), r.addEventListener("click", F), r.addEventListener("keydown", R, !0), r.addEventListener("focusin", z, !0), W && n instanceof Node && W.observe(n, {
|
|
1494
1494
|
childList: !0,
|
|
@@ -1514,30 +1514,30 @@ var Wt = {
|
|
|
1514
1514
|
isOpen: A,
|
|
1515
1515
|
getState: j
|
|
1516
1516
|
};
|
|
1517
|
-
},
|
|
1518
|
-
|
|
1519
|
-
},
|
|
1520
|
-
|
|
1517
|
+
}, nn = (e = {}) => tn(e), rn = null, an = !1, on = null, sn = () => {
|
|
1518
|
+
on &&= (document.removeEventListener("DOMContentLoaded", on), null);
|
|
1519
|
+
}, cn = () => typeof window > "u" || typeof document > "u" ? null : (an = !1, sn(), rn ? (rn.sync(), rn) : (rn = tn(), rn)), ln = () => {
|
|
1520
|
+
an = !0, sn(), rn?.destroy(), rn = null;
|
|
1521
1521
|
};
|
|
1522
|
-
typeof window < "u" && typeof document < "u" && (document.readyState === "loading" ? (
|
|
1523
|
-
|
|
1524
|
-
}, document.addEventListener("DOMContentLoaded",
|
|
1522
|
+
typeof window < "u" && typeof document < "u" && (document.readyState === "loading" ? (on = () => {
|
|
1523
|
+
on = null, an || cn();
|
|
1524
|
+
}, document.addEventListener("DOMContentLoaded", on)) : cn());
|
|
1525
1525
|
//#endregion
|
|
1526
1526
|
//#region src/js/src/shared/overlays.ts
|
|
1527
|
-
var
|
|
1527
|
+
var un = (e) => typeof document > "u" ? !1 : !!document.querySelector(e), dn = () => un("[modal-overlay]:not([hidden]), [drawer-overlay]:not([hidden]), [sheet-overlay]:not([hidden])"), fn = () => un("[popover-root]:not([hidden])"), pn = () => un("[menu-root] [menu]:not([hidden])"), mn = () => un("[combobox-list]:not([hidden])"), hn = () => un("[tooltip-root]:not([hidden])"), gn = {
|
|
1528
1528
|
root: typeof document < "u" ? document : {},
|
|
1529
1529
|
regionSelector: "[toast-region]",
|
|
1530
1530
|
toastSelector: "[toast]",
|
|
1531
1531
|
closeSelector: "[toast-close]",
|
|
1532
1532
|
defaultDuration: 5e3
|
|
1533
|
-
},
|
|
1533
|
+
}, _n = (e) => Array.from(e), vn = L(), yn = (e) => e instanceof HTMLButtonElement ? !0 : e instanceof HTMLAnchorElement ? e.hasAttribute("href") : !1, X = (e) => !e.hasAttribute("hidden"), bn = (e) => e.getAttribute("data-motion-state") === "exiting", xn = (e) => !Number.isFinite(e) || e <= 0, Sn = (e, t) => {
|
|
1534
1534
|
if (e == null) return t;
|
|
1535
1535
|
let n = e.trim();
|
|
1536
1536
|
if (!n) return t;
|
|
1537
1537
|
if (n.toLowerCase() === "infinity") return 0;
|
|
1538
1538
|
let r = Number(n);
|
|
1539
1539
|
return Number.isNaN(r) ? t : r;
|
|
1540
|
-
},
|
|
1540
|
+
}, Cn = () => it() != null || dn() || fn() || pn() || mn() || hn(), wn = (e = {}) => {
|
|
1541
1541
|
if (typeof window > "u" || typeof document > "u") return {
|
|
1542
1542
|
destroy: () => {},
|
|
1543
1543
|
sync: () => {},
|
|
@@ -1547,9 +1547,9 @@ var ln = (e) => typeof document > "u" ? !1 : !!document.querySelector(e), un = (
|
|
|
1547
1547
|
getState: () => null
|
|
1548
1548
|
};
|
|
1549
1549
|
let t = {
|
|
1550
|
-
...
|
|
1550
|
+
...gn,
|
|
1551
1551
|
...e
|
|
1552
|
-
}, n = t.root ?? document, r = n, i =
|
|
1552
|
+
}, n = t.root ?? document, r = n, i = se(), a = T("toast"), o = typeof e.defaultDuration == "number" ? e.defaultDuration : gn.defaultDuration, s = /* @__PURE__ */ new WeakMap(), c = /* @__PURE__ */ new Set(), l = [], u = () => _n(n.querySelectorAll(t.regionSelector)), d = (e) => {
|
|
1553
1553
|
if (!e) return null;
|
|
1554
1554
|
let n = e.closest(t.regionSelector);
|
|
1555
1555
|
return n instanceof HTMLElement ? n : null;
|
|
@@ -1557,7 +1557,7 @@ var ln = (e) => typeof document > "u" ? !1 : !!document.querySelector(e), un = (
|
|
|
1557
1557
|
if (!e) return null;
|
|
1558
1558
|
let n = e.closest(t.toastSelector);
|
|
1559
1559
|
return !(n instanceof HTMLElement) || !d(n) ? null : n;
|
|
1560
|
-
}, p = (e) =>
|
|
1560
|
+
}, p = (e) => _n((e ?? n).querySelectorAll(t.toastSelector)).filter((e) => d(e)), m = (e) => !e?.matches(t.toastSelector) || !d(e) ? !1 : n instanceof Document ? !0 : n instanceof Node ? n.contains(e) : p().includes(e), h = (e) => Sn(e.getAttribute("toast-duration"), o), g = (e, t) => e.getAttribute("aria-live") === "assertive" || e.getAttribute("toast-live") === "assertive" || t.getAttribute("aria-live") === "assertive" || t.getAttribute("toast-live") === "assertive", _ = (e, t = !0) => {
|
|
1561
1561
|
let n = l.indexOf(e);
|
|
1562
1562
|
if (n >= 0) {
|
|
1563
1563
|
if (!t) return;
|
|
@@ -1570,9 +1570,9 @@ var ln = (e) => typeof document > "u" ? !1 : !!document.querySelector(e), un = (
|
|
|
1570
1570
|
}, y = () => {
|
|
1571
1571
|
for (let e = l.length - 1; e >= 0; --e) {
|
|
1572
1572
|
let t = l[e];
|
|
1573
|
-
if (t.isConnected && m(t) &&
|
|
1573
|
+
if (t.isConnected && m(t) && X(t)) return t;
|
|
1574
1574
|
}
|
|
1575
|
-
let e = p().filter(
|
|
1575
|
+
let e = p().filter(X);
|
|
1576
1576
|
return e[e.length - 1] ?? null;
|
|
1577
1577
|
}, b = (e) => {
|
|
1578
1578
|
if (e) {
|
|
@@ -1590,12 +1590,12 @@ var ln = (e) => typeof document > "u" ? !1 : !!document.querySelector(e), un = (
|
|
|
1590
1590
|
t?.timeoutId != null && clearTimeout(t.timeoutId), s.delete(e);
|
|
1591
1591
|
}), c.clear();
|
|
1592
1592
|
}, C = (e) => {
|
|
1593
|
-
if (!
|
|
1593
|
+
if (!X(e)) {
|
|
1594
1594
|
x(e);
|
|
1595
1595
|
return;
|
|
1596
1596
|
}
|
|
1597
1597
|
let t = h(e);
|
|
1598
|
-
if (
|
|
1598
|
+
if (xn(t)) {
|
|
1599
1599
|
x(e);
|
|
1600
1600
|
return;
|
|
1601
1601
|
}
|
|
@@ -1621,8 +1621,8 @@ var ln = (e) => typeof document > "u" ? !1 : !!document.querySelector(e), un = (
|
|
|
1621
1621
|
t.startedAt = Date.now(), t.timeoutId = setTimeout(() => P(e), t.remaining);
|
|
1622
1622
|
}
|
|
1623
1623
|
}, D = (e) => {
|
|
1624
|
-
|
|
1625
|
-
|
|
1624
|
+
_n(e.querySelectorAll(t.closeSelector)).filter((t) => f(t) === e).forEach((e) => {
|
|
1625
|
+
yn(e) || (e.setAttribute("role", "button"), e.hasAttribute("tabindex") || e.setAttribute("tabindex", "0")), !e.hasAttribute("aria-label") && !e.hasAttribute("aria-labelledby") && !e.textContent?.trim() && e.setAttribute("aria-label", "Dismiss");
|
|
1626
1626
|
});
|
|
1627
1627
|
}, O = (e) => {
|
|
1628
1628
|
if (!e.hasAttribute("aria-live")) {
|
|
@@ -1634,20 +1634,20 @@ var ln = (e) => typeof document > "u" ? !1 : !!document.querySelector(e), un = (
|
|
|
1634
1634
|
let n = t.getAttribute("toast") === "error" || g(e, t) ? "alert" : "status";
|
|
1635
1635
|
t.getAttribute("role") !== n && t.setAttribute("role", n), D(t);
|
|
1636
1636
|
}, A = (e, t) => {
|
|
1637
|
-
let n = { shown:
|
|
1638
|
-
e.hidden !== !t && (e.hidden = !t), a.note(e, { shown:
|
|
1637
|
+
let n = { shown: X(e) };
|
|
1638
|
+
e.hidden !== !t && (e.hidden = !t), a.note(e, { shown: X(e) }, { baseline: n });
|
|
1639
1639
|
}, j = (e) => {
|
|
1640
1640
|
let t = b(e);
|
|
1641
|
-
return t ?
|
|
1641
|
+
return t ? X(t) : !1;
|
|
1642
1642
|
}, M = (e) => {
|
|
1643
1643
|
let t = b(e);
|
|
1644
|
-
return t ? { shown:
|
|
1644
|
+
return t ? { shown: X(t) } : null;
|
|
1645
1645
|
}, N = (e) => {
|
|
1646
1646
|
let t = b(e);
|
|
1647
1647
|
if (!t) return;
|
|
1648
1648
|
let n = d(t);
|
|
1649
1649
|
if (n) {
|
|
1650
|
-
if (O(n), k(n, t),
|
|
1650
|
+
if (O(n), k(n, t), X(t) && !bn(t)) {
|
|
1651
1651
|
_(t), C(t);
|
|
1652
1652
|
return;
|
|
1653
1653
|
}
|
|
@@ -1655,14 +1655,14 @@ var ln = (e) => typeof document > "u" ? !1 : !!document.querySelector(e), un = (
|
|
|
1655
1655
|
}
|
|
1656
1656
|
}, P = (e) => {
|
|
1657
1657
|
let t = b(e);
|
|
1658
|
-
!t || !
|
|
1658
|
+
!t || !X(t) || bn(t) || (x(t), v(t), i.exit(t, () => {
|
|
1659
1659
|
A(t, !1);
|
|
1660
1660
|
}));
|
|
1661
1661
|
}, F = () => {
|
|
1662
1662
|
u().forEach((e) => {
|
|
1663
1663
|
O(e), p(e).forEach((t) => {
|
|
1664
|
-
if (k(e, t), !
|
|
1665
|
-
if (
|
|
1664
|
+
if (k(e, t), !bn(t)) {
|
|
1665
|
+
if (X(t)) {
|
|
1666
1666
|
_(t, !1), C(t), a.note(t, { shown: !0 });
|
|
1667
1667
|
return;
|
|
1668
1668
|
}
|
|
@@ -1670,7 +1670,7 @@ var ln = (e) => typeof document > "u" ? !1 : !!document.querySelector(e), un = (
|
|
|
1670
1670
|
}
|
|
1671
1671
|
});
|
|
1672
1672
|
}), c.forEach((e) => {
|
|
1673
|
-
(!e.isConnected || !m(e) || !
|
|
1673
|
+
(!e.isConnected || !m(e) || !X(e)) && x(e);
|
|
1674
1674
|
});
|
|
1675
1675
|
}, I = (e) => {
|
|
1676
1676
|
let n = e.target;
|
|
@@ -1678,7 +1678,7 @@ var ln = (e) => typeof document > "u" ? !1 : !!document.querySelector(e), un = (
|
|
|
1678
1678
|
let r = n.closest(t.closeSelector);
|
|
1679
1679
|
if (!(r instanceof HTMLElement)) return;
|
|
1680
1680
|
let i = f(r);
|
|
1681
|
-
!i || !m(i) ||
|
|
1681
|
+
!i || !m(i) || vn(e) && P(i);
|
|
1682
1682
|
}, L = (e, t) => {
|
|
1683
1683
|
let n = e.relatedTarget;
|
|
1684
1684
|
return !(n instanceof Node && t.contains(n));
|
|
@@ -1686,39 +1686,39 @@ var ln = (e) => typeof document > "u" ? !1 : !!document.querySelector(e), un = (
|
|
|
1686
1686
|
let t = e.target;
|
|
1687
1687
|
if (!(t instanceof Element)) return;
|
|
1688
1688
|
let n = f(t instanceof HTMLElement ? t : t.parentElement);
|
|
1689
|
-
!n || !m(n) || !
|
|
1689
|
+
!n || !m(n) || !X(n) || w(n);
|
|
1690
1690
|
}, z = (e) => {
|
|
1691
1691
|
if (!(e instanceof MouseEvent)) return;
|
|
1692
1692
|
let t = e.target;
|
|
1693
1693
|
if (!(t instanceof Element)) return;
|
|
1694
1694
|
let n = f(t instanceof HTMLElement ? t : t.parentElement);
|
|
1695
|
-
!n || !m(n) || !
|
|
1695
|
+
!n || !m(n) || !X(n) || L(e, n) && E(n);
|
|
1696
1696
|
}, B = (e) => {
|
|
1697
1697
|
let t = e.target;
|
|
1698
1698
|
if (!(t instanceof Element)) return;
|
|
1699
1699
|
let n = f(t instanceof HTMLElement ? t : t.parentElement);
|
|
1700
|
-
!n || !m(n) || !
|
|
1700
|
+
!n || !m(n) || !X(n) || w(n);
|
|
1701
1701
|
}, V = (e) => {
|
|
1702
1702
|
if (!(e instanceof FocusEvent)) return;
|
|
1703
1703
|
let t = e.target;
|
|
1704
1704
|
if (!(t instanceof Element)) return;
|
|
1705
1705
|
let n = f(t instanceof HTMLElement ? t : t.parentElement);
|
|
1706
|
-
!n || !m(n) || !
|
|
1706
|
+
!n || !m(n) || !X(n) || L(e, n) && E(n);
|
|
1707
1707
|
}, H = (e) => {
|
|
1708
1708
|
if (!(e instanceof KeyboardEvent)) return;
|
|
1709
1709
|
let n = e.target;
|
|
1710
1710
|
if (!(n instanceof Element)) return;
|
|
1711
1711
|
if (e.key === "Escape") {
|
|
1712
|
-
if (
|
|
1712
|
+
if (Cn() || e.defaultPrevented) return;
|
|
1713
1713
|
let t = y();
|
|
1714
|
-
if (!t || !
|
|
1714
|
+
if (!t || !vn(e)) return;
|
|
1715
1715
|
e.preventDefault(), e.stopPropagation(), P(t);
|
|
1716
1716
|
return;
|
|
1717
1717
|
}
|
|
1718
1718
|
if (e.key !== "Enter" && e.key !== " ") return;
|
|
1719
1719
|
let r = n.closest(t.closeSelector);
|
|
1720
|
-
if (r instanceof HTMLElement && f(r) && !
|
|
1721
|
-
if (!
|
|
1720
|
+
if (r instanceof HTMLElement && f(r) && !yn(r)) {
|
|
1721
|
+
if (!vn(e)) return;
|
|
1722
1722
|
e.preventDefault(), P(r);
|
|
1723
1723
|
}
|
|
1724
1724
|
}, U = !1, W = () => {
|
|
@@ -1750,59 +1750,59 @@ var ln = (e) => typeof document > "u" ? !1 : !!document.querySelector(e), un = (
|
|
|
1750
1750
|
isShown: j,
|
|
1751
1751
|
getState: M
|
|
1752
1752
|
};
|
|
1753
|
-
},
|
|
1754
|
-
|
|
1755
|
-
},
|
|
1756
|
-
|
|
1753
|
+
}, Tn = (e = {}) => wn(e), En = null, Dn = !1, On = null, kn = () => {
|
|
1754
|
+
On &&= (document.removeEventListener("DOMContentLoaded", On), null);
|
|
1755
|
+
}, An = () => typeof window > "u" || typeof document > "u" ? null : (Dn = !1, kn(), En ? (En.sync(), En) : (En = wn(), En)), jn = () => {
|
|
1756
|
+
Dn = !0, kn(), En?.destroy(), En = null;
|
|
1757
1757
|
};
|
|
1758
|
-
typeof window < "u" && typeof document < "u" && (document.readyState === "loading" ? (
|
|
1759
|
-
|
|
1760
|
-
}, document.addEventListener("DOMContentLoaded",
|
|
1758
|
+
typeof window < "u" && typeof document < "u" && (document.readyState === "loading" ? (On = () => {
|
|
1759
|
+
On = null, Dn || An();
|
|
1760
|
+
}, document.addEventListener("DOMContentLoaded", On)) : An());
|
|
1761
1761
|
//#endregion
|
|
1762
1762
|
//#region src/js/src/shared/light-layer.ts
|
|
1763
|
-
var
|
|
1764
|
-
|
|
1765
|
-
},
|
|
1766
|
-
|
|
1767
|
-
},
|
|
1768
|
-
|
|
1769
|
-
},
|
|
1770
|
-
|
|
1771
|
-
}),
|
|
1772
|
-
let t = /* @__PURE__ */ new Set(), n =
|
|
1773
|
-
let i =
|
|
1774
|
-
i && r && (i({ cascade: !1 }),
|
|
1775
|
-
let a =
|
|
1763
|
+
var Mn = /* @__PURE__ */ new Map(), Nn = !1, Pn = 0, Fn = () => {
|
|
1764
|
+
Nn = !1;
|
|
1765
|
+
}, In = () => {
|
|
1766
|
+
Fn();
|
|
1767
|
+
}, Ln = () => Nn, Rn = () => {
|
|
1768
|
+
Nn = !0;
|
|
1769
|
+
}, zn = () => (Pn === 0 && typeof window < "u" && window.addEventListener("click", In), Pn += 1, () => {
|
|
1770
|
+
Pn = Math.max(0, Pn - 1), Pn === 0 && typeof window < "u" && (window.removeEventListener("click", In), Fn());
|
|
1771
|
+
}), Bn = (e) => {
|
|
1772
|
+
let t = /* @__PURE__ */ new Set(), n = zn(), r = (n, r = !1) => {
|
|
1773
|
+
let i = Mn.get(n);
|
|
1774
|
+
i && r && (i({ cascade: !1 }), Mn.delete(n), t.delete(n));
|
|
1775
|
+
let a = nt({
|
|
1776
1776
|
el: n,
|
|
1777
1777
|
kind: e.kind,
|
|
1778
1778
|
modal: !1,
|
|
1779
1779
|
dismiss: (t) => e.dismiss(n, t),
|
|
1780
1780
|
containsTarget: e.containsTarget ? (t) => e.containsTarget?.(n, t) ?? !1 : void 0
|
|
1781
1781
|
});
|
|
1782
|
-
|
|
1782
|
+
Mn.set(n, a), t.add(n);
|
|
1783
1783
|
}, i = (e) => {
|
|
1784
1784
|
t.delete(e);
|
|
1785
|
-
let n =
|
|
1785
|
+
let n = Mn.get(e);
|
|
1786
1786
|
if (!n) {
|
|
1787
|
-
|
|
1787
|
+
rt(e);
|
|
1788
1788
|
return;
|
|
1789
1789
|
}
|
|
1790
|
-
|
|
1790
|
+
Mn.delete(e), n({ cascade: !1 });
|
|
1791
1791
|
}, a = (e) => {
|
|
1792
1792
|
t.delete(e);
|
|
1793
|
-
let n =
|
|
1794
|
-
n && (
|
|
1793
|
+
let n = Mn.get(e);
|
|
1794
|
+
n && (Mn.delete(e), n());
|
|
1795
1795
|
}, o = (e) => {
|
|
1796
|
-
let t =
|
|
1796
|
+
let t = Mn.get(e);
|
|
1797
1797
|
t && queueMicrotask(() => {
|
|
1798
|
-
|
|
1798
|
+
Mn.get(e) === t && a(e);
|
|
1799
1799
|
});
|
|
1800
1800
|
}, s = () => {
|
|
1801
1801
|
let n = e.getElements(), a = new Set(n);
|
|
1802
1802
|
for (let n of [...t]) (!a.has(n) || !n.isConnected || !e.isOpen(n)) && i(n);
|
|
1803
1803
|
for (let t of n) e.isOpen(t) && (e.isClosing?.(t) || r(t, !1));
|
|
1804
1804
|
}, c = () => {
|
|
1805
|
-
|
|
1805
|
+
Nn = !1, s();
|
|
1806
1806
|
}, l = (e) => {
|
|
1807
1807
|
!(e instanceof KeyboardEvent) || e.key !== "Escape" || s();
|
|
1808
1808
|
};
|
|
@@ -1818,28 +1818,28 @@ var jn = /* @__PURE__ */ new Map(), Mn = !1, Nn = 0, Pn = () => {
|
|
|
1818
1818
|
n();
|
|
1819
1819
|
}
|
|
1820
1820
|
};
|
|
1821
|
-
},
|
|
1821
|
+
}, Vn = {
|
|
1822
1822
|
root: typeof document < "u" ? document : {},
|
|
1823
1823
|
rootSelector: "[popover-root]",
|
|
1824
1824
|
panelSelector: "[popover-panel]",
|
|
1825
1825
|
closeSelector: "[popover-close]",
|
|
1826
1826
|
gap: 8
|
|
1827
|
-
},
|
|
1827
|
+
}, Hn = new Set([
|
|
1828
1828
|
"top",
|
|
1829
1829
|
"bottom",
|
|
1830
1830
|
"left",
|
|
1831
1831
|
"right"
|
|
1832
|
-
]),
|
|
1832
|
+
]), Un = (e) => Array.from(e), Wn = "juice-popover-root", Gn = "juice-popover-panel", Kn = "juice-popover-title", qn = L(), Jn = /* @__PURE__ */ new WeakMap(), Yn = /* @__PURE__ */ new WeakMap(), Xn = (e) => e.trim().toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-+|-+$/g, "") || "popover", Zn = (e) => e instanceof HTMLButtonElement ? !0 : e instanceof HTMLAnchorElement ? e.hasAttribute("href") : !1, Z = (e) => !e.hasAttribute("hidden"), Qn = (e) => e.getAttribute("data-motion-state") === "exiting", $n = (e) => {
|
|
1833
1833
|
let t = e.getAttribute("popover-root");
|
|
1834
|
-
return t &&
|
|
1835
|
-
},
|
|
1834
|
+
return t && Hn.has(t) ? t : "bottom";
|
|
1835
|
+
}, er = (e) => {
|
|
1836
1836
|
switch (e) {
|
|
1837
1837
|
case "top": return "bottom";
|
|
1838
1838
|
case "bottom": return "top";
|
|
1839
1839
|
case "left": return "right";
|
|
1840
1840
|
case "right": return "left";
|
|
1841
1841
|
}
|
|
1842
|
-
},
|
|
1842
|
+
}, tr = (e, t, n, r, i) => {
|
|
1843
1843
|
switch (e) {
|
|
1844
1844
|
case "bottom": return {
|
|
1845
1845
|
top: t.bottom + i,
|
|
@@ -1858,7 +1858,7 @@ var jn = /* @__PURE__ */ new Map(), Mn = !1, Nn = 0, Pn = () => {
|
|
|
1858
1858
|
left: t.left - n - i
|
|
1859
1859
|
};
|
|
1860
1860
|
}
|
|
1861
|
-
},
|
|
1861
|
+
}, nr = (e, t, n, r, i) => {
|
|
1862
1862
|
let a = window.innerWidth, o = window.innerHeight;
|
|
1863
1863
|
switch (e) {
|
|
1864
1864
|
case "bottom": return t + i > o;
|
|
@@ -1866,31 +1866,31 @@ var jn = /* @__PURE__ */ new Map(), Mn = !1, Nn = 0, Pn = () => {
|
|
|
1866
1866
|
case "right": return n + r > a;
|
|
1867
1867
|
case "left": return n < 0;
|
|
1868
1868
|
}
|
|
1869
|
-
},
|
|
1869
|
+
}, rr = (e) => (e ?? "").split(/[,\s]+/).map((e) => e.trim()).filter(Boolean), ir = (e) => {
|
|
1870
1870
|
if (!(e instanceof HTMLElement) || e === document.documentElement || e === document.body) return !1;
|
|
1871
1871
|
let t = window.getComputedStyle(e);
|
|
1872
1872
|
if (t.transform !== "none" || t.perspective !== "none" || t.filter !== "none") return !0;
|
|
1873
1873
|
let n = t.getPropertyValue("backdrop-filter");
|
|
1874
|
-
return n && n !== "none" ||
|
|
1874
|
+
return n && n !== "none" || rr(t.willChange).some((e) => [
|
|
1875
1875
|
"transform",
|
|
1876
1876
|
"perspective",
|
|
1877
1877
|
"filter",
|
|
1878
1878
|
"backdrop-filter"
|
|
1879
|
-
].includes(e)) ? !0 :
|
|
1879
|
+
].includes(e)) ? !0 : rr(t.contain).some((e) => [
|
|
1880
1880
|
"paint",
|
|
1881
1881
|
"layout",
|
|
1882
1882
|
"strict",
|
|
1883
1883
|
"content"
|
|
1884
1884
|
].includes(e));
|
|
1885
|
-
},
|
|
1885
|
+
}, ar = (e) => {
|
|
1886
1886
|
let t = e.parentElement;
|
|
1887
1887
|
for (; t && t !== document.documentElement;) {
|
|
1888
|
-
if (
|
|
1888
|
+
if (ir(t)) return t;
|
|
1889
1889
|
t = t.parentElement;
|
|
1890
1890
|
}
|
|
1891
1891
|
return null;
|
|
1892
|
-
},
|
|
1893
|
-
let r =
|
|
1892
|
+
}, or = (e, t, n) => {
|
|
1893
|
+
let r = ar(e);
|
|
1894
1894
|
if (!r) return {
|
|
1895
1895
|
top: t,
|
|
1896
1896
|
left: n
|
|
@@ -1900,7 +1900,7 @@ var jn = /* @__PURE__ */ new Map(), Mn = !1, Nn = 0, Pn = () => {
|
|
|
1900
1900
|
top: t - i.top,
|
|
1901
1901
|
left: n - i.left
|
|
1902
1902
|
};
|
|
1903
|
-
},
|
|
1903
|
+
}, sr = (e = {}) => {
|
|
1904
1904
|
if (typeof window > "u" || typeof document > "u") return {
|
|
1905
1905
|
destroy: () => {},
|
|
1906
1906
|
sync: () => {},
|
|
@@ -1911,13 +1911,13 @@ var jn = /* @__PURE__ */ new Map(), Mn = !1, Nn = 0, Pn = () => {
|
|
|
1911
1911
|
getState: () => null
|
|
1912
1912
|
};
|
|
1913
1913
|
let t = {
|
|
1914
|
-
...
|
|
1914
|
+
...Vn,
|
|
1915
1915
|
...e
|
|
1916
|
-
}, n = t.root ?? document, r =
|
|
1916
|
+
}, n = t.root ?? document, r = se(), i = T("popover"), a, o = typeof e.gap == "number" && Number.isFinite(e.gap) ? e.gap : Vn.gap, s = 0, c = (e) => (s += 1, `${e}-${s}`), l = () => Un(n.querySelectorAll(t.rootSelector)), u = (e) => {
|
|
1917
1917
|
if (!e) return null;
|
|
1918
1918
|
let n = e.closest(t.rootSelector);
|
|
1919
1919
|
return n instanceof HTMLElement ? n : null;
|
|
1920
|
-
}, d = (e) => V(e, n), f = (e) => e?.matches(t.rootSelector) ? n instanceof Document ? !0 : n instanceof Node ? n.contains(e) : l().includes(e) : !1, p = (e) =>
|
|
1920
|
+
}, d = (e) => V(e, n), f = (e) => e?.matches(t.rootSelector) ? n instanceof Document ? !0 : n instanceof Node ? n.contains(e) : l().includes(e) : !1, p = (e) => Un(e.querySelectorAll(t.panelSelector)).find((t) => u(t) === e) || Un(e.querySelectorAll("[role=\"dialog\"]")).find((t) => u(t) === e) || (Un(e.children).find((e) => e instanceof HTMLElement) ?? e), m = (e) => {
|
|
1921
1921
|
if (u(e)) return null;
|
|
1922
1922
|
for (let t of B(e)) {
|
|
1923
1923
|
let e = d(t);
|
|
@@ -1941,60 +1941,60 @@ var jn = /* @__PURE__ */ new Map(), Mn = !1, Nn = 0, Pn = () => {
|
|
|
1941
1941
|
if (e) return e;
|
|
1942
1942
|
}
|
|
1943
1943
|
}
|
|
1944
|
-
return l().find(
|
|
1944
|
+
return l().find(Z) ?? l()[0] ?? null;
|
|
1945
1945
|
}, g = (e) => {
|
|
1946
1946
|
let t = e.getAttribute("name");
|
|
1947
|
-
return t ?
|
|
1948
|
-
}, _ = (e) => e.id ?
|
|
1947
|
+
return t ? Xn(t) : e.id ? Xn(e.id) : null;
|
|
1948
|
+
}, _ = (e) => e.id ? Un(document.querySelectorAll("[aria-controls]")).filter((t) => u(t) ? !1 : B(t).includes(e.id)) : [], v = (e, t) => {
|
|
1949
1949
|
let n = String(t);
|
|
1950
1950
|
_(e).forEach((e) => {
|
|
1951
1951
|
e.getAttribute("aria-expanded") !== n && e.setAttribute("aria-expanded", n), e.hasAttribute("aria-haspopup") || e.setAttribute("aria-haspopup", "dialog");
|
|
1952
1952
|
});
|
|
1953
1953
|
}, y = (e) => {
|
|
1954
1954
|
let n = p(e), r = g(e);
|
|
1955
|
-
if (e.id ||= r ? `${r}-root` : c(
|
|
1955
|
+
if (e.id ||= r ? `${r}-root` : c(Wn), n.id ||= r ? `${r}-panel` : c(Gn), n.getAttribute("role") !== "dialog" && n.setAttribute("role", "dialog"), !n.hasAttribute("aria-labelledby") && !n.hasAttribute("aria-label")) {
|
|
1956
1956
|
let e = n.querySelector("[popover-header] :is(h1,h2,h3,h4,h5,h6), :is(h1,h2,h3,h4,h5,h6)");
|
|
1957
|
-
e && (e.id ||= r ? `${r}-title` : c(
|
|
1957
|
+
e && (e.id ||= r ? `${r}-title` : c(Kn), n.setAttribute("aria-labelledby", e.id));
|
|
1958
1958
|
}
|
|
1959
|
-
|
|
1960
|
-
|
|
1959
|
+
Un(e.querySelectorAll(t.closeSelector)).filter((t) => u(t) === e).forEach((e) => {
|
|
1960
|
+
Zn(e) || (e.setAttribute("role", "button"), e.hasAttribute("tabindex") || e.setAttribute("tabindex", "0")), !e.hasAttribute("aria-label") && !e.hasAttribute("aria-labelledby") && !e.textContent?.trim() && e.setAttribute("aria-label", "Close");
|
|
1961
1961
|
}), _(e).forEach((t) => {
|
|
1962
|
-
|
|
1962
|
+
Zn(t) || (t.setAttribute("role", "button"), t.hasAttribute("tabindex") || t.setAttribute("tabindex", "0")), t.hasAttribute("aria-haspopup") || t.setAttribute("aria-haspopup", "dialog"), t.hasAttribute("aria-expanded") || t.setAttribute("aria-expanded", String(Z(e)));
|
|
1963
1963
|
});
|
|
1964
1964
|
}, b = (e, t) => {
|
|
1965
1965
|
let n = document.activeElement instanceof HTMLElement ? document.activeElement : null, r = t && !e.contains(t) ? t : n && !e.contains(n) ? n : null;
|
|
1966
|
-
r &&
|
|
1966
|
+
r && Jn.set(e, r), t && !e.contains(t) && Yn.set(e, t);
|
|
1967
1967
|
}, x = (e) => {
|
|
1968
|
-
let t =
|
|
1969
|
-
|
|
1968
|
+
let t = Jn.get(e);
|
|
1969
|
+
Jn.delete(e), t?.isConnected && t.focus();
|
|
1970
1970
|
}, S = (e) => {
|
|
1971
|
-
|
|
1971
|
+
Tt(p(e));
|
|
1972
1972
|
}, C = (e) => {
|
|
1973
1973
|
e.style.removeProperty("position"), e.style.removeProperty("top"), e.style.removeProperty("left"), e.style.removeProperty("right"), e.style.removeProperty("bottom"), e.style.removeProperty("margin");
|
|
1974
1974
|
let t = p(e);
|
|
1975
1975
|
t !== e && t.style.removeProperty("margin");
|
|
1976
1976
|
}, w = (e, t) => {
|
|
1977
|
-
let n = t ??
|
|
1977
|
+
let n = t ?? Yn.get(e) ?? _(e)[0] ?? null;
|
|
1978
1978
|
if (!n) return;
|
|
1979
1979
|
let r = p(e);
|
|
1980
1980
|
e.style.position = "fixed", e.style.right = "auto", e.style.bottom = "auto", e.style.margin = "0", r !== e && (r.style.margin = "0");
|
|
1981
|
-
let i =
|
|
1982
|
-
|
|
1981
|
+
let i = $n(e), a = n.getBoundingClientRect(), s = e.getBoundingClientRect(), c = s.width || e.offsetWidth, l = s.height || e.offsetHeight, u = i, { top: d, left: f } = tr(u, a, c, l, o);
|
|
1982
|
+
nr(u, d, f, c, l) && (u = er(u), {top: d, left: f} = tr(u, a, c, l, o)), {top: d, left: f} = or(e, d, f), e.style.top = `${d}px`, e.style.left = `${f}px`;
|
|
1983
1983
|
}, E = (e, t) => {
|
|
1984
|
-
let n = { open:
|
|
1985
|
-
e.hidden !== !t && (e.hidden = !t), i.note(e, { open:
|
|
1984
|
+
let n = { open: Z(e) };
|
|
1985
|
+
e.hidden !== !t && (e.hidden = !t), i.note(e, { open: Z(e) }, { baseline: n });
|
|
1986
1986
|
}, D = (e, t, n = "now") => {
|
|
1987
|
-
!
|
|
1988
|
-
n === "after-pointer" ? a.popAfterPointer(e) : a.pop(e), E(e, !1), v(e, !1), C(e), t ? x(e) :
|
|
1987
|
+
!Z(e) || Qn(e) || (y(e), r.exit(e, () => {
|
|
1988
|
+
n === "after-pointer" ? a.popAfterPointer(e) : a.pop(e), E(e, !1), v(e, !1), C(e), t ? x(e) : Jn.delete(e);
|
|
1989
1989
|
}));
|
|
1990
1990
|
}, O = (e, n) => {
|
|
1991
|
-
l().concat(
|
|
1992
|
-
t === e || !
|
|
1991
|
+
l().concat(Un(document.querySelectorAll(t.rootSelector))).forEach((t) => {
|
|
1992
|
+
t === e || !Z(t) || Qn(t) || D(t, !1);
|
|
1993
1993
|
}), b(e, n), y(e), E(e, !0), v(e, !0), w(e, n), a.connect(e, !0), S(e), r.enter(e);
|
|
1994
1994
|
}, k = (e) => {
|
|
1995
1995
|
let t = h(e);
|
|
1996
1996
|
if (t) {
|
|
1997
|
-
if (
|
|
1997
|
+
if (Z(t) && !Qn(t)) {
|
|
1998
1998
|
y(t), v(t, !0), w(t), a.connect(t, !1);
|
|
1999
1999
|
return;
|
|
2000
2000
|
}
|
|
@@ -2002,11 +2002,11 @@ var jn = /* @__PURE__ */ new Map(), Mn = !1, Nn = 0, Pn = () => {
|
|
|
2002
2002
|
}
|
|
2003
2003
|
}, A = (e, t = !0) => {
|
|
2004
2004
|
let n = h(e);
|
|
2005
|
-
!n || !
|
|
2005
|
+
!n || !Z(n) || Qn(n) || D(n, t);
|
|
2006
2006
|
}, j = (e) => {
|
|
2007
2007
|
let t = h(e);
|
|
2008
2008
|
if (t) {
|
|
2009
|
-
if (
|
|
2009
|
+
if (Z(t) && !Qn(t)) {
|
|
2010
2010
|
A(t);
|
|
2011
2011
|
return;
|
|
2012
2012
|
}
|
|
@@ -2014,17 +2014,17 @@ var jn = /* @__PURE__ */ new Map(), Mn = !1, Nn = 0, Pn = () => {
|
|
|
2014
2014
|
}
|
|
2015
2015
|
}, M = () => {
|
|
2016
2016
|
l().forEach((e) => {
|
|
2017
|
-
|
|
2017
|
+
Z(e) && w(e);
|
|
2018
2018
|
});
|
|
2019
2019
|
}, N = (e) => {
|
|
2020
2020
|
let t = h(e);
|
|
2021
|
-
return t ?
|
|
2021
|
+
return t ? Z(t) : !1;
|
|
2022
2022
|
}, P = (e) => {
|
|
2023
2023
|
let t = h(e);
|
|
2024
|
-
return t ? { open:
|
|
2024
|
+
return t ? { open: Z(t) } : null;
|
|
2025
2025
|
}, F = () => {
|
|
2026
2026
|
l().forEach((e) => {
|
|
2027
|
-
y(e), v(e,
|
|
2027
|
+
y(e), v(e, Z(e)), Z(e) && w(e), i.note(e, { open: Z(e) });
|
|
2028
2028
|
}), a.reconcile();
|
|
2029
2029
|
}, I = (e) => {
|
|
2030
2030
|
let t = e instanceof HTMLElement ? e : e.closest("[aria-controls]");
|
|
@@ -2032,45 +2032,45 @@ var jn = /* @__PURE__ */ new Map(), Mn = !1, Nn = 0, Pn = () => {
|
|
|
2032
2032
|
if (m(t)) return t;
|
|
2033
2033
|
let n = t.closest("[aria-controls]");
|
|
2034
2034
|
return n instanceof HTMLElement && m(n) ? n : null;
|
|
2035
|
-
}, L = () => l().find((e) =>
|
|
2035
|
+
}, L = () => l().find((e) => Z(e) && !Qn(e)) ?? l().find(Z) ?? null, R = (e) => {
|
|
2036
2036
|
let n = e.target;
|
|
2037
2037
|
if (!(n instanceof Element)) return;
|
|
2038
2038
|
let r = u(n);
|
|
2039
2039
|
if (r && f(r)) {
|
|
2040
2040
|
let i = n.closest(t.closeSelector) instanceof HTMLElement ? n.closest(t.closeSelector) : null;
|
|
2041
2041
|
if (i && u(i) === r) {
|
|
2042
|
-
if (!
|
|
2042
|
+
if (!qn(e)) return;
|
|
2043
2043
|
A(r);
|
|
2044
2044
|
}
|
|
2045
2045
|
return;
|
|
2046
2046
|
}
|
|
2047
2047
|
let i = I(n);
|
|
2048
2048
|
if (i) {
|
|
2049
|
-
if (!
|
|
2049
|
+
if (!qn(e)) return;
|
|
2050
2050
|
j(i);
|
|
2051
2051
|
return;
|
|
2052
2052
|
}
|
|
2053
2053
|
let a = L();
|
|
2054
|
-
!a ||
|
|
2055
|
-
}, z = (e, t) =>
|
|
2054
|
+
!a || Qn(a) || Ln() || at(a) && qn(e) && A(a, !1);
|
|
2055
|
+
}, z = (e, t) => Et(e, p(t)), H = (e) => {
|
|
2056
2056
|
if (!(e instanceof KeyboardEvent)) return;
|
|
2057
2057
|
let n = e.target;
|
|
2058
2058
|
if (!(n instanceof Element)) return;
|
|
2059
2059
|
let r = L();
|
|
2060
2060
|
if (r && e.key === "Tab") {
|
|
2061
|
-
if (!
|
|
2061
|
+
if (!at(r) || !qn(e)) return;
|
|
2062
2062
|
z(e, r);
|
|
2063
2063
|
return;
|
|
2064
2064
|
}
|
|
2065
2065
|
if (e.key !== "Enter" && e.key !== " ") return;
|
|
2066
2066
|
let i = n.closest(t.closeSelector);
|
|
2067
|
-
if (i instanceof HTMLElement && u(i) && !
|
|
2068
|
-
if (!
|
|
2067
|
+
if (i instanceof HTMLElement && u(i) && !Zn(i)) {
|
|
2068
|
+
if (!qn(e)) return;
|
|
2069
2069
|
e.preventDefault(), A(i);
|
|
2070
2070
|
return;
|
|
2071
2071
|
}
|
|
2072
2072
|
let a = I(n);
|
|
2073
|
-
!a ||
|
|
2073
|
+
!a || Zn(a) || qn(e) && (e.preventDefault(), j(a));
|
|
2074
2074
|
}, U = !1, W = () => {
|
|
2075
2075
|
U || (U = !0, requestAnimationFrame(() => {
|
|
2076
2076
|
U = !1, F();
|
|
@@ -2079,12 +2079,12 @@ var jn = /* @__PURE__ */ new Map(), Mn = !1, Nn = 0, Pn = () => {
|
|
|
2079
2079
|
G || (G = !0, requestAnimationFrame(() => {
|
|
2080
2080
|
G = !1, M();
|
|
2081
2081
|
}));
|
|
2082
|
-
},
|
|
2083
|
-
return a =
|
|
2082
|
+
}, ee = typeof MutationObserver < "u" ? new MutationObserver(() => W()) : null;
|
|
2083
|
+
return a = Bn({
|
|
2084
2084
|
kind: "popover",
|
|
2085
2085
|
getElements: l,
|
|
2086
|
-
isOpen:
|
|
2087
|
-
isClosing:
|
|
2086
|
+
isOpen: Z,
|
|
2087
|
+
isClosing: Qn,
|
|
2088
2088
|
containsTarget: (e, t) => {
|
|
2089
2089
|
if (t instanceof Node && e.contains(t)) return !0;
|
|
2090
2090
|
if (!(t instanceof Element)) return !1;
|
|
@@ -2094,13 +2094,13 @@ var jn = /* @__PURE__ */ new Map(), Mn = !1, Nn = 0, Pn = () => {
|
|
|
2094
2094
|
dismiss: (e, t) => {
|
|
2095
2095
|
if (f(e)) {
|
|
2096
2096
|
if (t === "outside") {
|
|
2097
|
-
|
|
2097
|
+
Rn(), D(e, !1, "after-pointer");
|
|
2098
2098
|
return;
|
|
2099
2099
|
}
|
|
2100
2100
|
D(e, t === "escape");
|
|
2101
2101
|
}
|
|
2102
2102
|
}
|
|
2103
|
-
}), document.addEventListener("click", R), document.addEventListener("keydown", H, !0), window.addEventListener("resize", K), window.addEventListener("scroll", K, !0),
|
|
2103
|
+
}), document.addEventListener("click", R), document.addEventListener("keydown", H, !0), window.addEventListener("resize", K), window.addEventListener("scroll", K, !0), ee && n instanceof Node && ee.observe(n, {
|
|
2104
2104
|
childList: !0,
|
|
2105
2105
|
subtree: !0,
|
|
2106
2106
|
attributes: !0,
|
|
@@ -2115,7 +2115,7 @@ var jn = /* @__PURE__ */ new Map(), Mn = !1, Nn = 0, Pn = () => {
|
|
|
2115
2115
|
]
|
|
2116
2116
|
}), F(), {
|
|
2117
2117
|
destroy: () => {
|
|
2118
|
-
document.removeEventListener("click", R), document.removeEventListener("keydown", H, !0), window.removeEventListener("resize", K), window.removeEventListener("scroll", K, !0),
|
|
2118
|
+
document.removeEventListener("click", R), document.removeEventListener("keydown", H, !0), window.removeEventListener("resize", K), window.removeEventListener("scroll", K, !0), ee?.disconnect(), r.destroy(), a.destroy();
|
|
2119
2119
|
},
|
|
2120
2120
|
sync: F,
|
|
2121
2121
|
open: k,
|
|
@@ -2124,41 +2124,41 @@ var jn = /* @__PURE__ */ new Map(), Mn = !1, Nn = 0, Pn = () => {
|
|
|
2124
2124
|
isOpen: N,
|
|
2125
2125
|
getState: P
|
|
2126
2126
|
};
|
|
2127
|
-
},
|
|
2128
|
-
|
|
2129
|
-
},
|
|
2130
|
-
|
|
2127
|
+
}, cr = (e = {}) => sr(e), lr = null, ur = !1, dr = null, fr = () => {
|
|
2128
|
+
dr &&= (document.removeEventListener("DOMContentLoaded", dr), null);
|
|
2129
|
+
}, pr = () => typeof window > "u" || typeof document > "u" ? null : (ur = !1, fr(), lr ? (lr.sync(), lr) : (lr = sr(), lr)), mr = () => {
|
|
2130
|
+
ur = !0, fr(), lr?.destroy(), lr = null;
|
|
2131
2131
|
};
|
|
2132
|
-
typeof window < "u" && typeof document < "u" && (document.readyState === "loading" ? (
|
|
2133
|
-
|
|
2134
|
-
}, document.addEventListener("DOMContentLoaded",
|
|
2132
|
+
typeof window < "u" && typeof document < "u" && (document.readyState === "loading" ? (dr = () => {
|
|
2133
|
+
dr = null, ur || pr();
|
|
2134
|
+
}, document.addEventListener("DOMContentLoaded", dr)) : pr());
|
|
2135
2135
|
//#endregion
|
|
2136
2136
|
//#region src/js/src/tooltip/tooltip-runtime.ts
|
|
2137
|
-
var
|
|
2137
|
+
var hr = {
|
|
2138
2138
|
root: typeof document < "u" ? document : {},
|
|
2139
2139
|
rootSelector: "[tooltip-root]",
|
|
2140
2140
|
panelSelector: "[tooltip-panel]",
|
|
2141
2141
|
gap: 8,
|
|
2142
2142
|
hideDelay: 150
|
|
2143
|
-
},
|
|
2143
|
+
}, gr = new Set([
|
|
2144
2144
|
"top",
|
|
2145
2145
|
"bottom",
|
|
2146
2146
|
"left",
|
|
2147
2147
|
"right"
|
|
2148
|
-
]),
|
|
2148
|
+
]), _r = (e) => Array.from(e), vr = "juice-tooltip-root", yr = L(), br = /* @__PURE__ */ new WeakMap(), xr = (e) => e.trim().toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-+|-+$/g, "") || "tooltip", Sr = (e) => z(e.getAttribute("aria-describedby")), Cr = (e, t) => {
|
|
2149
2149
|
let n = z(e);
|
|
2150
2150
|
return n.includes(t) ? n.join(" ") : [...n, t].join(" ");
|
|
2151
|
-
},
|
|
2151
|
+
}, wr = (e) => !e.hasAttribute("hidden"), Tr = (e) => {
|
|
2152
2152
|
let t = e.getAttribute("tooltip-root");
|
|
2153
|
-
return t &&
|
|
2154
|
-
},
|
|
2153
|
+
return t && gr.has(t) ? t : "top";
|
|
2154
|
+
}, Er = (e) => {
|
|
2155
2155
|
switch (e) {
|
|
2156
2156
|
case "top": return "bottom";
|
|
2157
2157
|
case "bottom": return "top";
|
|
2158
2158
|
case "left": return "right";
|
|
2159
2159
|
case "right": return "left";
|
|
2160
2160
|
}
|
|
2161
|
-
},
|
|
2161
|
+
}, Dr = (e, t, n, r, i) => {
|
|
2162
2162
|
switch (e) {
|
|
2163
2163
|
case "bottom": return {
|
|
2164
2164
|
top: t.bottom + i,
|
|
@@ -2177,7 +2177,7 @@ var mr = {
|
|
|
2177
2177
|
left: t.left - n - i
|
|
2178
2178
|
};
|
|
2179
2179
|
}
|
|
2180
|
-
},
|
|
2180
|
+
}, Or = (e, t, n, r, i) => {
|
|
2181
2181
|
let a = window.innerWidth, o = window.innerHeight;
|
|
2182
2182
|
switch (e) {
|
|
2183
2183
|
case "bottom": return t + i > o;
|
|
@@ -2185,31 +2185,31 @@ var mr = {
|
|
|
2185
2185
|
case "right": return n + r > a;
|
|
2186
2186
|
case "left": return n < 0;
|
|
2187
2187
|
}
|
|
2188
|
-
},
|
|
2188
|
+
}, kr = (e) => (e ?? "").split(/[,\s]+/).map((e) => e.trim()).filter(Boolean), Ar = (e) => {
|
|
2189
2189
|
if (!(e instanceof HTMLElement) || e === document.documentElement || e === document.body) return !1;
|
|
2190
2190
|
let t = window.getComputedStyle(e);
|
|
2191
2191
|
if (t.transform !== "none" || t.perspective !== "none" || t.filter !== "none") return !0;
|
|
2192
2192
|
let n = t.getPropertyValue("backdrop-filter");
|
|
2193
|
-
return n && n !== "none" ||
|
|
2193
|
+
return n && n !== "none" || kr(t.willChange).some((e) => [
|
|
2194
2194
|
"transform",
|
|
2195
2195
|
"perspective",
|
|
2196
2196
|
"filter",
|
|
2197
2197
|
"backdrop-filter"
|
|
2198
|
-
].includes(e)) ? !0 :
|
|
2198
|
+
].includes(e)) ? !0 : kr(t.contain).some((e) => [
|
|
2199
2199
|
"paint",
|
|
2200
2200
|
"layout",
|
|
2201
2201
|
"strict",
|
|
2202
2202
|
"content"
|
|
2203
2203
|
].includes(e));
|
|
2204
|
-
},
|
|
2204
|
+
}, jr = (e) => {
|
|
2205
2205
|
let t = e.parentElement;
|
|
2206
2206
|
for (; t && t !== document.documentElement;) {
|
|
2207
|
-
if (
|
|
2207
|
+
if (Ar(t)) return t;
|
|
2208
2208
|
t = t.parentElement;
|
|
2209
2209
|
}
|
|
2210
2210
|
return null;
|
|
2211
|
-
},
|
|
2212
|
-
let r =
|
|
2211
|
+
}, Mr = (e, t, n) => {
|
|
2212
|
+
let r = jr(e);
|
|
2213
2213
|
if (!r) return {
|
|
2214
2214
|
top: t,
|
|
2215
2215
|
left: n
|
|
@@ -2219,7 +2219,7 @@ var mr = {
|
|
|
2219
2219
|
top: t - i.top,
|
|
2220
2220
|
left: n - i.left
|
|
2221
2221
|
};
|
|
2222
|
-
},
|
|
2222
|
+
}, Nr = (e = {}) => {
|
|
2223
2223
|
if (typeof window > "u" || typeof document > "u") return {
|
|
2224
2224
|
destroy: () => {},
|
|
2225
2225
|
sync: () => {},
|
|
@@ -2229,15 +2229,15 @@ var mr = {
|
|
|
2229
2229
|
getState: () => null
|
|
2230
2230
|
};
|
|
2231
2231
|
let t = {
|
|
2232
|
-
...
|
|
2232
|
+
...hr,
|
|
2233
2233
|
...e
|
|
2234
|
-
}, n = T("tooltip"), r = t.root ?? document, i = typeof e.gap == "number" && Number.isFinite(e.gap) ? e.gap :
|
|
2234
|
+
}, n = T("tooltip"), r = t.root ?? document, i = typeof e.gap == "number" && Number.isFinite(e.gap) ? e.gap : hr.gap, a = typeof e.hideDelay == "number" && Number.isFinite(e.hideDelay) ? Math.max(0, e.hideDelay) : hr.hideDelay, o = 0, s = null, c = null, l = null, u = (e) => (o += 1, `${e}-${o}`), d = () => _r(r.querySelectorAll(t.rootSelector)), f = (e) => {
|
|
2235
2235
|
if (!e) return null;
|
|
2236
2236
|
let n = e.closest(t.rootSelector);
|
|
2237
2237
|
return n instanceof HTMLElement ? n : null;
|
|
2238
|
-
}, p = (e) => V(e, r), m = (e) => e?.matches(t.rootSelector) ? r instanceof Document ? !0 : r instanceof Node ? r.contains(e) : d().includes(e) : !1, h = (e) =>
|
|
2238
|
+
}, p = (e) => V(e, r), m = (e) => e?.matches(t.rootSelector) ? r instanceof Document ? !0 : r instanceof Node ? r.contains(e) : d().includes(e) : !1, h = (e) => _r(e.querySelectorAll(t.panelSelector)).find((t) => f(t) === e) || _r(e.querySelectorAll("[role=\"tooltip\"]")).find((t) => f(t) === e) || (_r(e.children).find((e) => e instanceof HTMLElement) ?? e), g = (e) => {
|
|
2239
2239
|
if (f(e)) return null;
|
|
2240
|
-
for (let t of
|
|
2240
|
+
for (let t of Sr(e)) {
|
|
2241
2241
|
let e = p(t);
|
|
2242
2242
|
if (e && m(e)) return e;
|
|
2243
2243
|
}
|
|
@@ -2253,7 +2253,7 @@ var mr = {
|
|
|
2253
2253
|
if (n instanceof HTMLElement && g(n)) return n;
|
|
2254
2254
|
let r = t.closest("[aria-controls]");
|
|
2255
2255
|
return r instanceof HTMLElement && g(r) ? r : t instanceof HTMLElement && g(t) ? t : null;
|
|
2256
|
-
}, v = () => d().find(
|
|
2256
|
+
}, v = () => d().find(wr) ?? null, y = (e) => {
|
|
2257
2257
|
if (e) {
|
|
2258
2258
|
if (m(e)) return e;
|
|
2259
2259
|
let t = f(e);
|
|
@@ -2265,64 +2265,64 @@ var mr = {
|
|
|
2265
2265
|
return v() ?? d()[0] ?? null;
|
|
2266
2266
|
}, b = (e) => {
|
|
2267
2267
|
let t = e.getAttribute("name");
|
|
2268
|
-
return t ?
|
|
2268
|
+
return t ? xr(t) : e.id ? xr(e.id) : null;
|
|
2269
2269
|
}, x = (e) => {
|
|
2270
2270
|
if (!e.id) return [];
|
|
2271
2271
|
let t = /* @__PURE__ */ new Set(), n = [];
|
|
2272
|
-
return
|
|
2272
|
+
return _r(document.querySelectorAll("[aria-describedby], [aria-controls]")).forEach((r) => {
|
|
2273
2273
|
t.has(r) || f(r) || g(r) === e && (t.add(r), n.push(r));
|
|
2274
2274
|
}), n;
|
|
2275
2275
|
}, S = (e, t) => {
|
|
2276
2276
|
if (!t.id) return;
|
|
2277
|
-
let n =
|
|
2277
|
+
let n = Cr(e.getAttribute("aria-describedby"), t.id);
|
|
2278
2278
|
e.getAttribute("aria-describedby") !== n && e.setAttribute("aria-describedby", n);
|
|
2279
2279
|
}, C = (e) => {
|
|
2280
2280
|
let t = h(e), n = b(e);
|
|
2281
|
-
e.id ||= n ? `${n}-root` : u(
|
|
2281
|
+
e.id ||= n ? `${n}-root` : u(vr), t.getAttribute("role") !== "tooltip" && t.setAttribute("role", "tooltip"), x(e).forEach((t) => {
|
|
2282
2282
|
S(t, e);
|
|
2283
2283
|
});
|
|
2284
2284
|
}, w = (e, t) => {
|
|
2285
|
-
t && !e.contains(t) &&
|
|
2285
|
+
t && !e.contains(t) && br.set(e, t);
|
|
2286
2286
|
}, E = (e) => {
|
|
2287
2287
|
e.style.removeProperty("position"), e.style.removeProperty("top"), e.style.removeProperty("left"), e.style.removeProperty("right"), e.style.removeProperty("bottom"), e.style.removeProperty("margin");
|
|
2288
2288
|
let t = h(e);
|
|
2289
2289
|
t !== e && t.style.removeProperty("margin");
|
|
2290
2290
|
}, D = (e, t) => {
|
|
2291
|
-
let n = t ??
|
|
2291
|
+
let n = t ?? br.get(e) ?? x(e)[0] ?? null;
|
|
2292
2292
|
if (!n) return;
|
|
2293
2293
|
let r = h(e);
|
|
2294
2294
|
e.style.position = "fixed", e.style.right = "auto", e.style.bottom = "auto", e.style.margin = "0", r !== e && (r.style.margin = "0");
|
|
2295
|
-
let a =
|
|
2296
|
-
|
|
2295
|
+
let a = Tr(e), o = n.getBoundingClientRect(), s = e.getBoundingClientRect(), c = s.width || e.offsetWidth, l = s.height || e.offsetHeight, u = a, { top: d, left: f } = Dr(u, o, c, l, i);
|
|
2296
|
+
Or(u, d, f, c, l) && (u = Er(u), {top: d, left: f} = Dr(u, o, c, l, i)), {top: d, left: f} = Mr(e, d, f), e.style.top = `${d}px`, e.style.left = `${f}px`;
|
|
2297
2297
|
}, O = (e, t) => {
|
|
2298
|
-
let r = { shown:
|
|
2299
|
-
e.hidden !== !t && (e.hidden = !t), n.note(e, { shown:
|
|
2298
|
+
let r = { shown: wr(e) };
|
|
2299
|
+
e.hidden !== !t && (e.hidden = !t), n.note(e, { shown: wr(e) }, { baseline: r });
|
|
2300
2300
|
}, k = () => {
|
|
2301
2301
|
s != null && (clearTimeout(s), s = null);
|
|
2302
2302
|
}, A = (e) => {
|
|
2303
2303
|
k(), C(e), O(e, !1), E(e);
|
|
2304
2304
|
}, j = (e, n) => {
|
|
2305
|
-
k(), d().concat(
|
|
2306
|
-
t === e || !
|
|
2305
|
+
k(), d().concat(_r(document.querySelectorAll(t.rootSelector))).forEach((t) => {
|
|
2306
|
+
t === e || !wr(t) || A(t);
|
|
2307
2307
|
}), w(e, n), C(e), n && S(n, e), O(e, !0), D(e, n);
|
|
2308
2308
|
}, M = (e) => {
|
|
2309
2309
|
let t = y(e);
|
|
2310
|
-
return t ?
|
|
2310
|
+
return t ? wr(t) : !1;
|
|
2311
2311
|
}, N = (e) => {
|
|
2312
2312
|
let t = y(e);
|
|
2313
|
-
return t ? { shown:
|
|
2313
|
+
return t ? { shown: wr(t) } : null;
|
|
2314
2314
|
}, P = (e) => {
|
|
2315
2315
|
let t = y(e);
|
|
2316
2316
|
if (!t) return;
|
|
2317
2317
|
let n = e && g(e) === t ? e : _(e ?? t);
|
|
2318
|
-
if (
|
|
2318
|
+
if (wr(t)) {
|
|
2319
2319
|
C(t), n && S(n, t), D(t, n);
|
|
2320
2320
|
return;
|
|
2321
2321
|
}
|
|
2322
2322
|
j(t, n);
|
|
2323
2323
|
}, F = (e) => {
|
|
2324
2324
|
let t = y(e);
|
|
2325
|
-
!t || !
|
|
2325
|
+
!t || !wr(t) || A(t);
|
|
2326
2326
|
}, I = (e) => {
|
|
2327
2327
|
if (k(), a <= 0) {
|
|
2328
2328
|
A(e);
|
|
@@ -2333,18 +2333,18 @@ var mr = {
|
|
|
2333
2333
|
}, a);
|
|
2334
2334
|
}, L = () => {
|
|
2335
2335
|
d().forEach((e) => {
|
|
2336
|
-
|
|
2336
|
+
wr(e) && D(e);
|
|
2337
2337
|
});
|
|
2338
2338
|
}, R = () => {
|
|
2339
2339
|
d().forEach((e) => {
|
|
2340
|
-
C(e),
|
|
2340
|
+
C(e), wr(e) && D(e), n.note(e, { shown: wr(e) });
|
|
2341
2341
|
});
|
|
2342
2342
|
}, z = (e) => {
|
|
2343
2343
|
if (!(e instanceof MouseEvent)) return;
|
|
2344
2344
|
let t = e.target;
|
|
2345
2345
|
if (!(t instanceof Element)) return;
|
|
2346
2346
|
let n = _(t);
|
|
2347
|
-
n &&
|
|
2347
|
+
n && yr(e) && (c = n, k(), P(n));
|
|
2348
2348
|
}, H = (e) => {
|
|
2349
2349
|
if (!(e instanceof MouseEvent)) return;
|
|
2350
2350
|
let t = e.target;
|
|
@@ -2352,15 +2352,15 @@ var mr = {
|
|
|
2352
2352
|
let n = _(t);
|
|
2353
2353
|
if (!n) return;
|
|
2354
2354
|
let r = e.relatedTarget;
|
|
2355
|
-
if (r instanceof Node && n.contains(r) || !
|
|
2355
|
+
if (r instanceof Node && n.contains(r) || !yr(e)) return;
|
|
2356
2356
|
c === n && (c = null);
|
|
2357
2357
|
let i = g(n);
|
|
2358
|
-
!i || !
|
|
2358
|
+
!i || !wr(i) || l && g(l) === i || I(i);
|
|
2359
2359
|
}, U = (e) => {
|
|
2360
2360
|
let t = e.target;
|
|
2361
2361
|
if (!(t instanceof Element)) return;
|
|
2362
2362
|
let n = _(t);
|
|
2363
|
-
n &&
|
|
2363
|
+
n && yr(e) && (l = n, k(), P(n));
|
|
2364
2364
|
}, W = (e) => {
|
|
2365
2365
|
if (!(e instanceof FocusEvent)) return;
|
|
2366
2366
|
let t = e.target;
|
|
@@ -2368,24 +2368,24 @@ var mr = {
|
|
|
2368
2368
|
let n = _(t);
|
|
2369
2369
|
if (!n) return;
|
|
2370
2370
|
let r = e.relatedTarget;
|
|
2371
|
-
if (r instanceof Node && n.contains(r) || !
|
|
2371
|
+
if (r instanceof Node && n.contains(r) || !yr(e)) return;
|
|
2372
2372
|
l === n && (l = null);
|
|
2373
2373
|
let i = g(n);
|
|
2374
|
-
!i || !
|
|
2374
|
+
!i || !wr(i) || c && g(c) === i || I(i);
|
|
2375
2375
|
}, G = (e) => {
|
|
2376
2376
|
if (!(e instanceof KeyboardEvent) || e.key !== "Escape" || e.isComposing || e.defaultPrevented) return;
|
|
2377
2377
|
let t = v();
|
|
2378
|
-
t &&
|
|
2379
|
-
}, K = !1,
|
|
2378
|
+
t && yr(e) && (e.preventDefault(), e.stopPropagation(), A(t));
|
|
2379
|
+
}, K = !1, ee = () => {
|
|
2380
2380
|
K || (K = !0, requestAnimationFrame(() => {
|
|
2381
2381
|
K = !1, R();
|
|
2382
2382
|
}));
|
|
2383
|
-
},
|
|
2384
|
-
|
|
2385
|
-
|
|
2383
|
+
}, te = !1, ne = () => {
|
|
2384
|
+
te || (te = !0, requestAnimationFrame(() => {
|
|
2385
|
+
te = !1, L();
|
|
2386
2386
|
}));
|
|
2387
|
-
},
|
|
2388
|
-
return document.addEventListener("mouseover", z), document.addEventListener("mouseout", H), document.addEventListener("focusin", U), document.addEventListener("focusout", W), window.addEventListener("keydown", G, !0), window.addEventListener("resize",
|
|
2387
|
+
}, re = typeof MutationObserver < "u" ? new MutationObserver(() => ee()) : null;
|
|
2388
|
+
return document.addEventListener("mouseover", z), document.addEventListener("mouseout", H), document.addEventListener("focusin", U), document.addEventListener("focusout", W), window.addEventListener("keydown", G, !0), window.addEventListener("resize", ne), window.addEventListener("scroll", ne, !0), re && r instanceof Node && re.observe(r, {
|
|
2389
2389
|
childList: !0,
|
|
2390
2390
|
subtree: !0,
|
|
2391
2391
|
attributes: !0,
|
|
@@ -2398,7 +2398,7 @@ var mr = {
|
|
|
2398
2398
|
]
|
|
2399
2399
|
}), R(), {
|
|
2400
2400
|
destroy: () => {
|
|
2401
|
-
k(), c = null, l = null, document.removeEventListener("mouseover", z), document.removeEventListener("mouseout", H), document.removeEventListener("focusin", U), document.removeEventListener("focusout", W), window.removeEventListener("keydown", G, !0), window.removeEventListener("resize",
|
|
2401
|
+
k(), c = null, l = null, document.removeEventListener("mouseover", z), document.removeEventListener("mouseout", H), document.removeEventListener("focusin", U), document.removeEventListener("focusout", W), window.removeEventListener("keydown", G, !0), window.removeEventListener("resize", ne), window.removeEventListener("scroll", ne, !0), re?.disconnect();
|
|
2402
2402
|
},
|
|
2403
2403
|
sync: R,
|
|
2404
2404
|
show: P,
|
|
@@ -2406,17 +2406,17 @@ var mr = {
|
|
|
2406
2406
|
isShown: M,
|
|
2407
2407
|
getState: N
|
|
2408
2408
|
};
|
|
2409
|
-
},
|
|
2410
|
-
|
|
2411
|
-
},
|
|
2412
|
-
|
|
2409
|
+
}, Pr = (e = {}) => Nr(e), Fr = null, Ir = !1, Lr = null, Rr = () => {
|
|
2410
|
+
Lr &&= (document.removeEventListener("DOMContentLoaded", Lr), null);
|
|
2411
|
+
}, zr = () => typeof window > "u" || typeof document > "u" ? null : (Ir = !1, Rr(), Fr ? (Fr.sync(), Fr) : (Fr = Nr(), Fr)), Br = () => {
|
|
2412
|
+
Ir = !0, Rr(), Fr?.destroy(), Fr = null;
|
|
2413
2413
|
};
|
|
2414
|
-
typeof window < "u" && typeof document < "u" && (document.readyState === "loading" ? (
|
|
2415
|
-
|
|
2416
|
-
}, document.addEventListener("DOMContentLoaded",
|
|
2414
|
+
typeof window < "u" && typeof document < "u" && (document.readyState === "loading" ? (Lr = () => {
|
|
2415
|
+
Lr = null, Ir || zr();
|
|
2416
|
+
}, document.addEventListener("DOMContentLoaded", Lr)) : zr());
|
|
2417
2417
|
//#endregion
|
|
2418
2418
|
//#region src/js/src/wizard/wizard-runtime.ts
|
|
2419
|
-
var
|
|
2419
|
+
var Vr = {
|
|
2420
2420
|
root: typeof document < "u" ? document : {},
|
|
2421
2421
|
shellSelector: "[wizard-shell]",
|
|
2422
2422
|
trackerSelector: "[step-tracker]",
|
|
@@ -2427,20 +2427,20 @@ var Br = {
|
|
|
2427
2427
|
nextSelector: "[wizard-next]",
|
|
2428
2428
|
prevSelector: "[wizard-prev]",
|
|
2429
2429
|
completeSelector: "[wizard-complete]"
|
|
2430
|
-
},
|
|
2430
|
+
}, Hr = (e) => Array.from(e), Ur = "juice-wizard-step", Wr = "juice-wizard-page", Gr = L(), Kr = (e) => e instanceof HTMLButtonElement ? !0 : e instanceof HTMLInputElement ? e.type === "button" || e.type === "submit" : e instanceof HTMLAnchorElement ? e.hasAttribute("href") : !1, qr = (e) => e.trim().toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-+|-+$/g, "") || "wizard", Jr = (e, t) => {
|
|
2431
2431
|
let n = e.compareDocumentPosition(t);
|
|
2432
2432
|
return n & Node.DOCUMENT_POSITION_FOLLOWING ? -1 : n & Node.DOCUMENT_POSITION_PRECEDING ? 1 : 0;
|
|
2433
|
-
},
|
|
2433
|
+
}, Yr = (e) => {
|
|
2434
2434
|
let t = (e.getAttribute("wizard-shell") || "").trim().toLowerCase();
|
|
2435
2435
|
return t === "linear" ? "linear" : t === "free" ? "free" : "default";
|
|
2436
|
-
},
|
|
2436
|
+
}, Xr = (e) => e.getAttribute("data-step") || e.getAttribute("name") || e.getAttribute("step-page") || (e.id ? e.id : null), Zr = (e) => {
|
|
2437
2437
|
let t = /* @__PURE__ */ new Set(), n = e.getAttribute("data-step");
|
|
2438
2438
|
n && t.add(n);
|
|
2439
2439
|
let r = e.getAttribute("name");
|
|
2440
2440
|
r && t.add(r);
|
|
2441
2441
|
let i = e.getAttribute("step-page");
|
|
2442
2442
|
return i && t.add(i), e.id && t.add(e.id), t;
|
|
2443
|
-
},
|
|
2443
|
+
}, Qr = (e, t, n) => t === n ? !0 : e === "linear" ? !1 : e === "free" ? !0 : t < n, $r = (e) => (e instanceof HTMLButtonElement || e instanceof HTMLInputElement) && e.disabled ? !0 : e.getAttribute("aria-disabled") === "true", ei = (e = {}) => {
|
|
2444
2444
|
if (typeof window > "u" || typeof document > "u") return {
|
|
2445
2445
|
destroy: () => {},
|
|
2446
2446
|
sync: () => {},
|
|
@@ -2451,22 +2451,22 @@ var Br = {
|
|
|
2451
2451
|
getState: () => null
|
|
2452
2452
|
};
|
|
2453
2453
|
let t = {
|
|
2454
|
-
...
|
|
2454
|
+
...Vr,
|
|
2455
2455
|
...e
|
|
2456
|
-
}, n = t.root ?? document, r = n, i = T("wizard"), a = () =>
|
|
2456
|
+
}, n = t.root ?? document, r = n, i = T("wizard"), a = () => Hr(n.querySelectorAll(t.shellSelector)), o = (e) => {
|
|
2457
2457
|
if (!e) return null;
|
|
2458
2458
|
let n = e.closest(t.shellSelector);
|
|
2459
2459
|
return n instanceof HTMLElement ? n : null;
|
|
2460
2460
|
}, s = (e, t) => o(e) === t, c = (e) => {
|
|
2461
2461
|
let n = e.querySelector(t.stepsSelector), r = e.querySelector(t.trackerSelector), i = n ?? r ?? e, a = /* @__PURE__ */ new Set(), o = [];
|
|
2462
|
-
return
|
|
2462
|
+
return Hr(i.querySelectorAll(t.stepSelector)).forEach((n) => {
|
|
2463
2463
|
n instanceof HTMLElement && n.matches(t.stepSelector) && (!s(n, e) || a.has(n) || n.closest(t.pageSelector) || (a.add(n), o.push(n)));
|
|
2464
|
-
}), o.sort(
|
|
2465
|
-
}, l = (e) =>
|
|
2464
|
+
}), o.sort(Jr);
|
|
2465
|
+
}, l = (e) => Hr(e.querySelectorAll(t.pageSelector)).filter((t) => s(t, e)).sort(Jr), u = (e) => Hr(e.querySelectorAll(t.navSelector)).filter((t) => s(t, e)), d = (e, t) => Hr(e.querySelectorAll(t)).filter((t) => s(t, e)), f = (e) => {
|
|
2466
2466
|
let n = /* @__PURE__ */ new Set(), r = [], i = (t) => {
|
|
2467
2467
|
t instanceof HTMLElement && (n.has(t) || !e.contains(t) || !s(t, o(e) ?? e) || (n.add(t), r.push(t)));
|
|
2468
2468
|
};
|
|
2469
|
-
return
|
|
2469
|
+
return Hr(e.querySelectorAll("button")).forEach(i), Hr(e.querySelectorAll(`${t.prevSelector}, ${t.nextSelector}`)).forEach(i), r.sort(Jr);
|
|
2470
2470
|
}, p = (e) => {
|
|
2471
2471
|
let n = d(e, t.prevSelector);
|
|
2472
2472
|
if (n.length > 0) return n;
|
|
@@ -2489,9 +2489,9 @@ var Br = {
|
|
|
2489
2489
|
let n = e.querySelector(`#${R(a)}`);
|
|
2490
2490
|
if (n && n.matches(t.pageSelector) && s(n, e)) return n;
|
|
2491
2491
|
}
|
|
2492
|
-
let o =
|
|
2492
|
+
let o = Xr(n);
|
|
2493
2493
|
if (o) {
|
|
2494
|
-
let e = r.find((e) =>
|
|
2494
|
+
let e = r.find((e) => Zr(e).has(o));
|
|
2495
2495
|
if (e) return e;
|
|
2496
2496
|
}
|
|
2497
2497
|
let u = i.indexOf(n);
|
|
@@ -2502,9 +2502,9 @@ var Br = {
|
|
|
2502
2502
|
let a = r.indexOf(t);
|
|
2503
2503
|
return a >= 0 ? n[a] ?? null : null;
|
|
2504
2504
|
}, v = (e, t) => {
|
|
2505
|
-
let n = c(e), r = l(e), i = n.findIndex((e) => e.id === t ? !0 :
|
|
2505
|
+
let n = c(e), r = l(e), i = n.findIndex((e) => e.id === t ? !0 : Zr(e).has(t));
|
|
2506
2506
|
if (i >= 0) return i;
|
|
2507
|
-
let a = r.findIndex((e) => e.id === t ? !0 :
|
|
2507
|
+
let a = r.findIndex((e) => e.id === t ? !0 : Zr(e).has(t));
|
|
2508
2508
|
if (a >= 0) {
|
|
2509
2509
|
let t = _(e, r[a]), i = t ? n.indexOf(t) : a;
|
|
2510
2510
|
return i >= 0 ? i : a;
|
|
@@ -2529,13 +2529,13 @@ var Br = {
|
|
|
2529
2529
|
return 0;
|
|
2530
2530
|
}, x = 0, S = (e) => (x += 1, `${e}-${x}`), C = (e) => {
|
|
2531
2531
|
let t = e.getAttribute("name");
|
|
2532
|
-
return t ?
|
|
2532
|
+
return t ? qr(t) : null;
|
|
2533
2533
|
}, w = (e) => {
|
|
2534
2534
|
let n = e.querySelector(t.stepsSelector);
|
|
2535
2535
|
!n || !s(n, e) || n.tagName === "UL" || n.tagName === "OL" || n.getAttribute("role") || n.setAttribute("role", "list");
|
|
2536
2536
|
}, E = (e, t, n, r, i) => {
|
|
2537
2537
|
let a = c(e), o = C(e), s = a.length > 1 || l(e).length > 1 ? `-${r + 1}` : "";
|
|
2538
|
-
t.id ||= o ? `${o}-step${s}` : S(
|
|
2538
|
+
t.id ||= o ? `${o}-step${s}` : S(Ur), Kr(t) || (i && t.getAttribute("tabindex") !== "0" && t.setAttribute("tabindex", "0"), !i && t.getAttribute("tabindex") === "0" && t.removeAttribute("tabindex")), n && (n.id ||= o ? `${o}-page${s}` : S(Wr), t.getAttribute("aria-controls") !== n.id && t.setAttribute("aria-controls", n.id), n.getAttribute("role") || n.setAttribute("role", "region"), !n.hasAttribute("aria-label") && !n.hasAttribute("aria-labelledby") && n.setAttribute("aria-labelledby", t.id));
|
|
2539
2539
|
}, D = (e, t) => {
|
|
2540
2540
|
(e instanceof HTMLButtonElement || e instanceof HTMLInputElement) && e.disabled !== t && (e.disabled = t);
|
|
2541
2541
|
let n = String(t);
|
|
@@ -2547,11 +2547,11 @@ var Br = {
|
|
|
2547
2547
|
}, k = (e, t) => {
|
|
2548
2548
|
let n = c(e), r = l(e);
|
|
2549
2549
|
if (n.length === 0 && r.length === 0) return;
|
|
2550
|
-
let a = Math.min(Math.max(0, t), y(e)), o =
|
|
2550
|
+
let a = Math.min(Math.max(0, t), y(e)), o = Yr(e);
|
|
2551
2551
|
w(e), n.forEach((t, n) => {
|
|
2552
2552
|
let r = n < a ? "completed" : n === a ? "active" : "pending";
|
|
2553
2553
|
t.getAttribute("step") !== r && t.setAttribute("step", r), n === a ? t.getAttribute("aria-current") !== "step" && t.setAttribute("aria-current", "step") : t.hasAttribute("aria-current") && t.removeAttribute("aria-current");
|
|
2554
|
-
let i =
|
|
2554
|
+
let i = Qr(o, n, a);
|
|
2555
2555
|
E(e, t, g(e, t), n, i), i ? t.getAttribute("aria-disabled") === "true" && t.removeAttribute("aria-disabled") : t.getAttribute("aria-disabled") !== "true" && t.setAttribute("aria-disabled", "true");
|
|
2556
2556
|
});
|
|
2557
2557
|
let s = n[a] ?? null, u = s ? g(e, s) : r[a] ?? null;
|
|
@@ -2559,7 +2559,7 @@ var Br = {
|
|
|
2559
2559
|
let i = _(e, t);
|
|
2560
2560
|
O(t, (i ? n.indexOf(i) : r.indexOf(t)) === a), t.getAttribute("role") || t.setAttribute("role", "region");
|
|
2561
2561
|
});
|
|
2562
|
-
let d = e.querySelector("[wizard-content]"), f = u &&
|
|
2562
|
+
let d = e.querySelector("[wizard-content]"), f = u && Xr(u) || s && Xr(s);
|
|
2563
2563
|
d && f && d.getAttribute("data-step") !== f && d.setAttribute("data-step", f);
|
|
2564
2564
|
let v = a <= 0, b = a >= y(e);
|
|
2565
2565
|
p(e).forEach((e) => D(e, v)), m(e).forEach((e) => D(e, b)), h(e).forEach((e) => D(e, !b)), i.note(e, { current: a });
|
|
@@ -2614,28 +2614,28 @@ var Br = {
|
|
|
2614
2614
|
let t = o(e);
|
|
2615
2615
|
if (!t) return;
|
|
2616
2616
|
let n = c(t).indexOf(e);
|
|
2617
|
-
n < 0 ||
|
|
2617
|
+
n < 0 || Qr(Yr(t), n, b(t)) && k(t, n);
|
|
2618
2618
|
}, V = (e) => {
|
|
2619
2619
|
let n = e.target;
|
|
2620
2620
|
if (!(n instanceof Element)) return;
|
|
2621
2621
|
let r = z(n), i = n instanceof HTMLElement ? n.closest(`${t.nextSelector}, ${t.prevSelector}, ${t.completeSelector}, button`) : null;
|
|
2622
|
-
if (i instanceof HTMLElement &&
|
|
2622
|
+
if (i instanceof HTMLElement && $r(i) && (r === "next" || r === "prev" || r === "complete")) return;
|
|
2623
2623
|
if (r === "complete") {
|
|
2624
|
-
|
|
2624
|
+
Gr(e);
|
|
2625
2625
|
return;
|
|
2626
2626
|
}
|
|
2627
2627
|
if (r === "next") {
|
|
2628
|
-
if (!
|
|
2628
|
+
if (!Gr(e)) return;
|
|
2629
2629
|
P(n);
|
|
2630
2630
|
return;
|
|
2631
2631
|
}
|
|
2632
2632
|
if (r === "prev") {
|
|
2633
|
-
if (!
|
|
2633
|
+
if (!Gr(e)) return;
|
|
2634
2634
|
F(n);
|
|
2635
2635
|
return;
|
|
2636
2636
|
}
|
|
2637
2637
|
let a = L(n);
|
|
2638
|
-
a &&
|
|
2638
|
+
a && Gr(e) && B(a);
|
|
2639
2639
|
}, H = (e) => {
|
|
2640
2640
|
if (!(e instanceof KeyboardEvent) || e.key !== "Enter" && e.key !== " ") return;
|
|
2641
2641
|
let t = e.target;
|
|
@@ -2643,12 +2643,12 @@ var Br = {
|
|
|
2643
2643
|
let n = z(t);
|
|
2644
2644
|
if (n === "next" || n === "prev") {
|
|
2645
2645
|
let r = t.closest("button, [wizard-next], [wizard-prev]");
|
|
2646
|
-
if (r instanceof HTMLElement &&
|
|
2646
|
+
if (r instanceof HTMLElement && Kr(r) || !Gr(e)) return;
|
|
2647
2647
|
e.preventDefault(), n === "next" ? P(t) : F(t);
|
|
2648
2648
|
return;
|
|
2649
2649
|
}
|
|
2650
2650
|
let r = L(t);
|
|
2651
|
-
!r ||
|
|
2651
|
+
!r || Kr(r) || Gr(e) && (e.preventDefault(), B(r));
|
|
2652
2652
|
}, U = !1, W = () => {
|
|
2653
2653
|
U || (U = !0, requestAnimationFrame(() => {
|
|
2654
2654
|
U = !1, I();
|
|
@@ -2680,36 +2680,36 @@ var Br = {
|
|
|
2680
2680
|
current: j,
|
|
2681
2681
|
getState: M
|
|
2682
2682
|
};
|
|
2683
|
-
},
|
|
2684
|
-
|
|
2685
|
-
},
|
|
2686
|
-
|
|
2683
|
+
}, ti = (e = {}) => ei(e), ni = null, ri = !1, ii = null, ai = () => {
|
|
2684
|
+
ii &&= (document.removeEventListener("DOMContentLoaded", ii), null);
|
|
2685
|
+
}, oi = () => typeof window > "u" || typeof document > "u" ? null : (ri = !1, ai(), ni ? (ni.sync(), ni) : (ni = ei(), ni)), si = () => {
|
|
2686
|
+
ri = !0, ai(), ni?.destroy(), ni = null;
|
|
2687
2687
|
};
|
|
2688
|
-
typeof window < "u" && typeof document < "u" && (document.readyState === "loading" ? (
|
|
2689
|
-
|
|
2690
|
-
}, document.addEventListener("DOMContentLoaded",
|
|
2688
|
+
typeof window < "u" && typeof document < "u" && (document.readyState === "loading" ? (ii = () => {
|
|
2689
|
+
ii = null, ri || oi();
|
|
2690
|
+
}, document.addEventListener("DOMContentLoaded", ii)) : oi());
|
|
2691
2691
|
//#endregion
|
|
2692
2692
|
//#region src/js/src/combobox/combobox-runtime.ts
|
|
2693
|
-
var
|
|
2693
|
+
var ci = {
|
|
2694
2694
|
root: typeof document < "u" ? document : {},
|
|
2695
2695
|
rootSelector: "[combobox]",
|
|
2696
2696
|
inputSelector: "[combobox-input]",
|
|
2697
2697
|
triggerSelector: "[combobox-trigger]",
|
|
2698
2698
|
listSelector: "[combobox-list]",
|
|
2699
2699
|
optionSelector: "[combobox-option]"
|
|
2700
|
-
},
|
|
2700
|
+
}, li = (e) => Array.from(e), ui = "juice-combobox-list", di = "juice-combobox-option", fi = 0, pi = (e) => {
|
|
2701
2701
|
let t = "";
|
|
2702
2702
|
do
|
|
2703
|
-
|
|
2703
|
+
fi += 1, t = `${e}-${fi}`;
|
|
2704
2704
|
while (typeof document < "u" && document.getElementById(t));
|
|
2705
2705
|
return t;
|
|
2706
|
-
},
|
|
2707
|
-
if (
|
|
2706
|
+
}, mi = (e, t, n) => e.id ? e.id : t && !document.getElementById(t) ? (e.id = t, t) : (e.id = pi(n), e.id), hi = L(), gi = (e) => e.trim().toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-+|-+$/g, "") || "combobox", _i = (e) => e instanceof HTMLButtonElement ? !0 : e instanceof HTMLAnchorElement ? e.hasAttribute("href") : !1, vi = (e) => e instanceof HTMLInputElement || e instanceof HTMLTextAreaElement, yi = (e) => vi(e) ? e.value : e.textContent ?? "", bi = (e, t) => {
|
|
2707
|
+
if (vi(e)) {
|
|
2708
2708
|
e.value = t;
|
|
2709
2709
|
return;
|
|
2710
2710
|
}
|
|
2711
2711
|
e.textContent = t;
|
|
2712
|
-
},
|
|
2712
|
+
}, xi = (e) => e instanceof HTMLInputElement || e instanceof HTMLTextAreaElement ? e.disabled : e.getAttribute("aria-disabled") === "true", Si = (e) => e.isComposing || e.keyCode === 229, Ci = () => ({
|
|
2713
2713
|
destroy: () => {},
|
|
2714
2714
|
sync: () => {},
|
|
2715
2715
|
open: () => {},
|
|
@@ -2718,16 +2718,16 @@ var si = {
|
|
|
2718
2718
|
select: () => {},
|
|
2719
2719
|
isOpen: () => !1,
|
|
2720
2720
|
getState: () => null
|
|
2721
|
-
}),
|
|
2722
|
-
if (typeof window > "u" || typeof document > "u") return
|
|
2721
|
+
}), wi = (e = {}) => {
|
|
2722
|
+
if (typeof window > "u" || typeof document > "u") return Ci();
|
|
2723
2723
|
let t = {
|
|
2724
|
-
...
|
|
2724
|
+
...ci,
|
|
2725
2725
|
...e
|
|
2726
|
-
}, n = t.root ?? document, r = T("combobox"), i, a = () =>
|
|
2726
|
+
}, n = t.root ?? document, r = T("combobox"), i, a = () => li(n.querySelectorAll(t.rootSelector)), o = (e) => {
|
|
2727
2727
|
if (!e) return null;
|
|
2728
2728
|
let n = e.closest(t.rootSelector);
|
|
2729
2729
|
return n instanceof HTMLElement ? n : null;
|
|
2730
|
-
}, s = (e) => e?.matches(t.rootSelector) ? n instanceof Document ? !0 : n instanceof Node ? n.contains(e) : a().includes(e) : !1, c = (e) =>
|
|
2730
|
+
}, s = (e) => e?.matches(t.rootSelector) ? n instanceof Document ? !0 : n instanceof Node ? n.contains(e) : a().includes(e) : !1, c = (e) => li(e.querySelectorAll(t.inputSelector)).find((t) => o(t) === e) ?? null, l = (e) => li(e.querySelectorAll(t.listSelector)).find((t) => o(t) === e) ?? null, u = (e) => li(e.querySelectorAll(t.triggerSelector)).find((t) => o(t) === e) ?? null, d = (e) => li((l(e) ?? e).querySelectorAll(t.optionSelector)).filter((t) => o(t) === e), f = (e) => {
|
|
2731
2731
|
let t = l(e);
|
|
2732
2732
|
return !!(t && !t.hasAttribute("hidden"));
|
|
2733
2733
|
}, p = (e) => d(e).filter((e) => !e.hasAttribute("hidden")), m = (e) => p(e).find((e) => e.getAttribute("combobox-option") === "active") ?? null, h = (e) => {
|
|
@@ -2739,13 +2739,13 @@ var si = {
|
|
|
2739
2739
|
return a().find(f) ?? a()[0] ?? null;
|
|
2740
2740
|
}, g = (e) => {
|
|
2741
2741
|
let t = e.getAttribute("name");
|
|
2742
|
-
return t ?
|
|
2742
|
+
return t ? gi(t) : e.id ? gi(e.id) : null;
|
|
2743
2743
|
}, _ = (e, t) => {
|
|
2744
2744
|
if (!t || (e.textContent ?? "").trim().toLowerCase().includes(t)) return !0;
|
|
2745
2745
|
let n = e.getAttribute("data-value");
|
|
2746
2746
|
return n != null && n.toLowerCase().includes(t);
|
|
2747
2747
|
}, v = (e) => {
|
|
2748
|
-
let t = c(e), n = t ?
|
|
2748
|
+
let t = c(e), n = t ? yi(t).trim().toLowerCase() : "";
|
|
2749
2749
|
if (d(e).forEach((e) => {
|
|
2750
2750
|
let t = _(e, n);
|
|
2751
2751
|
e.hidden !== !t && (e.hidden = !t);
|
|
@@ -2787,14 +2787,14 @@ var si = {
|
|
|
2787
2787
|
let t = c(e), n = l(e), r = u(e), i = d(e);
|
|
2788
2788
|
if (!t || !n) return;
|
|
2789
2789
|
let a = g(e);
|
|
2790
|
-
t.getAttribute("role") !== "combobox" && t.setAttribute("role", "combobox"), t.getAttribute("aria-autocomplete") !== "list" && t.setAttribute("aria-autocomplete", "list"),
|
|
2791
|
-
|
|
2792
|
-
}), r && (
|
|
2790
|
+
t.getAttribute("role") !== "combobox" && t.setAttribute("role", "combobox"), t.getAttribute("aria-autocomplete") !== "list" && t.setAttribute("aria-autocomplete", "list"), mi(n, a ? `${a}-list` : null, ui), n.getAttribute("role") !== "listbox" && n.setAttribute("role", "listbox"), t.getAttribute("aria-controls") !== n.id && t.setAttribute("aria-controls", n.id), i.forEach((e, t) => {
|
|
2791
|
+
mi(e, a ? `${a}-option-${t + 1}` : null, di), e.getAttribute("role") !== "option" && e.setAttribute("role", "option");
|
|
2792
|
+
}), r && (_i(r) || (r.setAttribute("role", "button"), r.hasAttribute("tabindex") || r.setAttribute("tabindex", "0")), r.getAttribute("aria-controls") !== n.id && r.setAttribute("aria-controls", n.id), r.hasAttribute("aria-haspopup") || r.setAttribute("aria-haspopup", "listbox")), b(e, f(e));
|
|
2793
2793
|
}, w = (e) => {
|
|
2794
2794
|
let t = c(e);
|
|
2795
2795
|
return {
|
|
2796
2796
|
open: f(e),
|
|
2797
|
-
value: t ?
|
|
2797
|
+
value: t ? yi(t) : ""
|
|
2798
2798
|
};
|
|
2799
2799
|
}, E = (e) => {
|
|
2800
2800
|
r.note(e, w(e));
|
|
@@ -2802,14 +2802,14 @@ var si = {
|
|
|
2802
2802
|
let n = f(e);
|
|
2803
2803
|
C(e), x(e, !1), b(e, !1), S(e, null), y(e), n && (t === "after-pointer" ? i.popAfterPointer(e) : i.pop(e)), E(e);
|
|
2804
2804
|
}, O = (e) => {
|
|
2805
|
-
a().concat(
|
|
2805
|
+
a().concat(li(document.querySelectorAll(t.rootSelector))).forEach((t) => {
|
|
2806
2806
|
t === e || !f(t) || D(t);
|
|
2807
2807
|
}), C(e), v(e), x(e, !0), b(e, !0), i.connect(e, !0), E(e);
|
|
2808
2808
|
}, k = (e) => {
|
|
2809
2809
|
let t = h(e);
|
|
2810
2810
|
if (!t) return;
|
|
2811
2811
|
let n = c(t);
|
|
2812
|
-
if (!(!n ||
|
|
2812
|
+
if (!(!n || xi(n))) {
|
|
2813
2813
|
if (f(t)) {
|
|
2814
2814
|
C(t), v(t), b(t, !0), i.connect(t, !1);
|
|
2815
2815
|
return;
|
|
@@ -2838,7 +2838,7 @@ var si = {
|
|
|
2838
2838
|
let t = o(e);
|
|
2839
2839
|
if (!t || !s(t)) return;
|
|
2840
2840
|
let n = c(t);
|
|
2841
|
-
!n ||
|
|
2841
|
+
!n || xi(n) || (C(t), bi(n, e.hasAttribute("data-value") ? e.getAttribute("data-value") ?? "" : (e.textContent ?? "").trim()), d(t).forEach((t) => {
|
|
2842
2842
|
let n = String(t === e);
|
|
2843
2843
|
t.getAttribute("aria-selected") !== n && t.setAttribute("aria-selected", n);
|
|
2844
2844
|
}), S(t, e), D(t));
|
|
@@ -2887,12 +2887,12 @@ var si = {
|
|
|
2887
2887
|
if (n && s(n)) {
|
|
2888
2888
|
let r = R(t, n);
|
|
2889
2889
|
if (r) {
|
|
2890
|
-
if (!
|
|
2890
|
+
if (!hi(e)) return;
|
|
2891
2891
|
P(r);
|
|
2892
2892
|
return;
|
|
2893
2893
|
}
|
|
2894
2894
|
if (z(t, n)) {
|
|
2895
|
-
if (!
|
|
2895
|
+
if (!hi(e)) return;
|
|
2896
2896
|
N(n);
|
|
2897
2897
|
let t = c(n);
|
|
2898
2898
|
f(n) && t && document.activeElement !== t && t.focus();
|
|
@@ -2900,9 +2900,9 @@ var si = {
|
|
|
2900
2900
|
}
|
|
2901
2901
|
return;
|
|
2902
2902
|
}
|
|
2903
|
-
if (
|
|
2904
|
-
let r = a().filter((e) => f(e) &&
|
|
2905
|
-
r.length !== 0 &&
|
|
2903
|
+
if (Ln()) return;
|
|
2904
|
+
let r = a().filter((e) => f(e) && at(e));
|
|
2905
|
+
r.length !== 0 && hi(e) && r.forEach((e) => D(e));
|
|
2906
2906
|
}, H = (e) => {
|
|
2907
2907
|
let t = e.target;
|
|
2908
2908
|
if (!(t instanceof Element)) return;
|
|
@@ -2914,7 +2914,7 @@ var si = {
|
|
|
2914
2914
|
let n = o(t);
|
|
2915
2915
|
if (!n || !s(n)) return;
|
|
2916
2916
|
let r = B(t, n);
|
|
2917
|
-
!r ||
|
|
2917
|
+
!r || xi(r) || hi(e) && k(n);
|
|
2918
2918
|
}, W = (e) => {
|
|
2919
2919
|
if (!(e instanceof FocusEvent)) return;
|
|
2920
2920
|
let t = e.target;
|
|
@@ -2922,39 +2922,39 @@ var si = {
|
|
|
2922
2922
|
let n = o(t);
|
|
2923
2923
|
if (!n || !s(n) || !f(n) || !B(t, n)) return;
|
|
2924
2924
|
let r = e.relatedTarget;
|
|
2925
|
-
r instanceof Node && n.contains(r) ||
|
|
2925
|
+
r instanceof Node && n.contains(r) || hi(e) && D(n);
|
|
2926
2926
|
}, G = (e) => {
|
|
2927
2927
|
let t = e.target;
|
|
2928
2928
|
if (!(t instanceof Element)) return;
|
|
2929
2929
|
let n = o(t);
|
|
2930
2930
|
if (!n || !s(n)) return;
|
|
2931
2931
|
let r = B(t, n);
|
|
2932
|
-
!r ||
|
|
2932
|
+
!r || xi(r) || hi(e) && (k(n), E(n));
|
|
2933
2933
|
}, K = (e) => {
|
|
2934
|
-
if (!(e instanceof KeyboardEvent) ||
|
|
2934
|
+
if (!(e instanceof KeyboardEvent) || Si(e)) return;
|
|
2935
2935
|
let t = e.target;
|
|
2936
2936
|
if (!(t instanceof Element)) return;
|
|
2937
2937
|
let n = o(t);
|
|
2938
2938
|
if (!n || !s(n)) return;
|
|
2939
2939
|
let r = B(t, n), i = z(t, n);
|
|
2940
|
-
if (!r && !i || r &&
|
|
2940
|
+
if (!r && !i || r && xi(r)) return;
|
|
2941
2941
|
if (e.key === "Tab") {
|
|
2942
|
-
if (!f(n) || !
|
|
2942
|
+
if (!f(n) || !at(n) || !hi(e)) return;
|
|
2943
2943
|
A(n);
|
|
2944
2944
|
return;
|
|
2945
2945
|
}
|
|
2946
2946
|
if (e.key === "ArrowDown") {
|
|
2947
|
-
if (!
|
|
2947
|
+
if (!hi(e)) return;
|
|
2948
2948
|
e.preventDefault(), f(n) || k(n), i && !r && c(n)?.focus(), I(n, (e) => e < 0 ? 0 : e + 1);
|
|
2949
2949
|
return;
|
|
2950
2950
|
}
|
|
2951
2951
|
if (e.key === "ArrowUp") {
|
|
2952
|
-
if (!
|
|
2952
|
+
if (!hi(e)) return;
|
|
2953
2953
|
e.preventDefault(), f(n) || k(n), i && !r && c(n)?.focus(), I(n, (e, t) => e < 0 ? t - 1 : e - 1);
|
|
2954
2954
|
return;
|
|
2955
2955
|
}
|
|
2956
|
-
if (i && !r && !
|
|
2957
|
-
if (!
|
|
2956
|
+
if (i && !r && !_i(i) && (e.key === "Enter" || e.key === " ")) {
|
|
2957
|
+
if (!hi(e)) return;
|
|
2958
2958
|
e.preventDefault(), N(n);
|
|
2959
2959
|
let t = c(n);
|
|
2960
2960
|
f(n) && t && document.activeElement !== t && t.focus();
|
|
@@ -2962,37 +2962,37 @@ var si = {
|
|
|
2962
2962
|
}
|
|
2963
2963
|
if (!r || !f(n)) return;
|
|
2964
2964
|
if (e.key === "Home") {
|
|
2965
|
-
if (!
|
|
2965
|
+
if (!hi(e)) return;
|
|
2966
2966
|
e.preventDefault(), I(n, () => 0);
|
|
2967
2967
|
return;
|
|
2968
2968
|
}
|
|
2969
2969
|
if (e.key === "End") {
|
|
2970
|
-
if (!
|
|
2970
|
+
if (!hi(e)) return;
|
|
2971
2971
|
e.preventDefault(), I(n, (e, t) => t - 1);
|
|
2972
2972
|
return;
|
|
2973
2973
|
}
|
|
2974
2974
|
if (e.key !== "Enter") return;
|
|
2975
2975
|
let a = m(n);
|
|
2976
|
-
a &&
|
|
2977
|
-
},
|
|
2978
|
-
|
|
2979
|
-
|
|
2976
|
+
a && hi(e) && (e.preventDefault(), P(a));
|
|
2977
|
+
}, ee = !1, te = () => {
|
|
2978
|
+
ee || (ee = !0, requestAnimationFrame(() => {
|
|
2979
|
+
ee = !1, L();
|
|
2980
2980
|
}));
|
|
2981
|
-
},
|
|
2982
|
-
return i =
|
|
2981
|
+
}, ne = typeof MutationObserver < "u" ? new MutationObserver(() => te()) : null;
|
|
2982
|
+
return i = Bn({
|
|
2983
2983
|
kind: "combobox",
|
|
2984
2984
|
getElements: a,
|
|
2985
2985
|
isOpen: f,
|
|
2986
2986
|
dismiss: (e, t) => {
|
|
2987
2987
|
if (s(e)) {
|
|
2988
2988
|
if (t === "outside") {
|
|
2989
|
-
|
|
2989
|
+
Rn(), D(e, "after-pointer");
|
|
2990
2990
|
return;
|
|
2991
2991
|
}
|
|
2992
2992
|
D(e);
|
|
2993
2993
|
}
|
|
2994
2994
|
}
|
|
2995
|
-
}), document.addEventListener("click", V), document.addEventListener("mousedown", H), document.addEventListener("focusin", U), document.addEventListener("focusout", W), document.addEventListener("input", G), document.addEventListener("keydown", K),
|
|
2995
|
+
}), document.addEventListener("click", V), document.addEventListener("mousedown", H), document.addEventListener("focusin", U), document.addEventListener("focusout", W), document.addEventListener("input", G), document.addEventListener("keydown", K), ne && n instanceof Node && ne.observe(n, {
|
|
2996
2996
|
childList: !0,
|
|
2997
2997
|
subtree: !0,
|
|
2998
2998
|
attributes: !0,
|
|
@@ -3010,7 +3010,7 @@ var si = {
|
|
|
3010
3010
|
]
|
|
3011
3011
|
}), L(), {
|
|
3012
3012
|
destroy: () => {
|
|
3013
|
-
document.removeEventListener("click", V), document.removeEventListener("mousedown", H), document.removeEventListener("focusin", U), document.removeEventListener("focusout", W), document.removeEventListener("input", G), document.removeEventListener("keydown", K),
|
|
3013
|
+
document.removeEventListener("click", V), document.removeEventListener("mousedown", H), document.removeEventListener("focusin", U), document.removeEventListener("focusout", W), document.removeEventListener("input", G), document.removeEventListener("keydown", K), ne?.disconnect(), i.destroy();
|
|
3014
3014
|
},
|
|
3015
3015
|
sync: L,
|
|
3016
3016
|
open: k,
|
|
@@ -3020,24 +3020,24 @@ var si = {
|
|
|
3020
3020
|
isOpen: j,
|
|
3021
3021
|
getState: M
|
|
3022
3022
|
};
|
|
3023
|
-
},
|
|
3024
|
-
|
|
3025
|
-
},
|
|
3026
|
-
|
|
3023
|
+
}, Ti = (e = {}) => wi(e), Ei = null, Di = !1, Oi = null, ki = () => {
|
|
3024
|
+
Oi &&= (document.removeEventListener("DOMContentLoaded", Oi), null);
|
|
3025
|
+
}, Ai = () => typeof window > "u" || typeof document > "u" ? null : (Di = !1, ki(), Ei ? (Ei.sync(), Ei) : (Ei = wi(), Ei)), ji = () => {
|
|
3026
|
+
Di = !0, ki(), Ei?.destroy(), Ei = null;
|
|
3027
3027
|
};
|
|
3028
|
-
typeof window < "u" && typeof document < "u" && (document.readyState === "loading" ? (
|
|
3029
|
-
|
|
3030
|
-
}, document.addEventListener("DOMContentLoaded",
|
|
3028
|
+
typeof window < "u" && typeof document < "u" && (document.readyState === "loading" ? (Oi = () => {
|
|
3029
|
+
Oi = null, Di || Ai();
|
|
3030
|
+
}, document.addEventListener("DOMContentLoaded", Oi)) : Ai());
|
|
3031
3031
|
//#endregion
|
|
3032
3032
|
//#region src/js/src/banner/banner-runtime.ts
|
|
3033
|
-
var
|
|
3033
|
+
var Mi = {
|
|
3034
3034
|
root: typeof document < "u" ? document : {},
|
|
3035
3035
|
bannerSelector: "[banner]",
|
|
3036
3036
|
closeSelector: "[banner-close]"
|
|
3037
|
-
},
|
|
3037
|
+
}, Ni = "juice-banner:", Pi = (e) => Array.from(e), Fi = L(), Ii = (e) => e instanceof HTMLButtonElement ? !0 : e instanceof HTMLAnchorElement ? e.hasAttribute("href") : !1, Li = (e) => !e.hasAttribute("hidden"), Ri = (e) => {
|
|
3038
3038
|
let t = e.getAttribute("banner-tone");
|
|
3039
3039
|
return t === "error" || t === "warning";
|
|
3040
|
-
},
|
|
3040
|
+
}, zi = (e) => {
|
|
3041
3041
|
let t = e.getAttribute("banner-persist");
|
|
3042
3042
|
if (t !== "session" && t !== "local") return null;
|
|
3043
3043
|
let n = e.getAttribute("name")?.trim(), r = e.id?.trim(), i = n || r;
|
|
@@ -3045,18 +3045,18 @@ var ji = {
|
|
|
3045
3045
|
let a = t === "local" ? typeof localStorage > "u" ? null : localStorage : typeof sessionStorage > "u" ? null : sessionStorage;
|
|
3046
3046
|
return a ? {
|
|
3047
3047
|
storage: a,
|
|
3048
|
-
key: `${
|
|
3048
|
+
key: `${Ni}${i}`
|
|
3049
3049
|
} : null;
|
|
3050
|
-
},
|
|
3051
|
-
let t =
|
|
3050
|
+
}, Bi = (e) => {
|
|
3051
|
+
let t = zi(e);
|
|
3052
3052
|
if (!t) return !1;
|
|
3053
3053
|
try {
|
|
3054
3054
|
return t.storage.getItem(t.key) === "1";
|
|
3055
3055
|
} catch {
|
|
3056
3056
|
return !1;
|
|
3057
3057
|
}
|
|
3058
|
-
},
|
|
3059
|
-
let n =
|
|
3058
|
+
}, Vi = (e, t) => {
|
|
3059
|
+
let n = zi(e);
|
|
3060
3060
|
if (n) try {
|
|
3061
3061
|
if (t) {
|
|
3062
3062
|
n.storage.setItem(n.key, "1");
|
|
@@ -3064,7 +3064,7 @@ var ji = {
|
|
|
3064
3064
|
}
|
|
3065
3065
|
n.storage.removeItem(n.key);
|
|
3066
3066
|
} catch {}
|
|
3067
|
-
},
|
|
3067
|
+
}, Hi = (e = {}) => {
|
|
3068
3068
|
if (typeof window > "u" || typeof document > "u") return {
|
|
3069
3069
|
destroy: () => {},
|
|
3070
3070
|
sync: () => {},
|
|
@@ -3074,9 +3074,9 @@ var ji = {
|
|
|
3074
3074
|
getState: () => null
|
|
3075
3075
|
};
|
|
3076
3076
|
let t = {
|
|
3077
|
-
...
|
|
3077
|
+
...Mi,
|
|
3078
3078
|
...e
|
|
3079
|
-
}, n = t.root ?? document, r = n, i = T("banner"), a = () =>
|
|
3079
|
+
}, n = t.root ?? document, r = n, i = T("banner"), a = () => Pi(n.querySelectorAll(t.bannerSelector)), o = (e) => {
|
|
3080
3080
|
if (!e) return null;
|
|
3081
3081
|
let n = e.closest(t.bannerSelector);
|
|
3082
3082
|
return n instanceof HTMLElement ? n : null;
|
|
@@ -3087,32 +3087,32 @@ var ji = {
|
|
|
3087
3087
|
if (t && s(t)) return t;
|
|
3088
3088
|
}
|
|
3089
3089
|
let t = a().filter(s);
|
|
3090
|
-
return t.find(
|
|
3090
|
+
return t.find(Li) ?? t[0] ?? null;
|
|
3091
3091
|
}, l = (e) => {
|
|
3092
|
-
|
|
3093
|
-
|
|
3092
|
+
Pi(e.querySelectorAll(t.closeSelector)).filter((t) => o(t) === e).forEach((e) => {
|
|
3093
|
+
Ii(e) || (e.setAttribute("role", "button"), e.hasAttribute("tabindex") || e.setAttribute("tabindex", "0")), !e.hasAttribute("aria-label") && !e.hasAttribute("aria-labelledby") && !e.textContent?.trim() && e.setAttribute("aria-label", "Dismiss");
|
|
3094
3094
|
});
|
|
3095
3095
|
}, u = (e) => {
|
|
3096
|
-
let t =
|
|
3096
|
+
let t = Ri(e) ? "alert" : "status";
|
|
3097
3097
|
e.getAttribute("role") !== t && e.setAttribute("role", t), l(e);
|
|
3098
3098
|
}, d = (e, t) => {
|
|
3099
|
-
let n = { shown:
|
|
3100
|
-
e.hidden !== !t && (e.hidden = !t), i.note(e, { shown:
|
|
3099
|
+
let n = { shown: Li(e) };
|
|
3100
|
+
e.hidden !== !t && (e.hidden = !t), i.note(e, { shown: Li(e) }, { baseline: n });
|
|
3101
3101
|
}, f = (e) => {
|
|
3102
3102
|
let t = c(e);
|
|
3103
|
-
return t ?
|
|
3103
|
+
return t ? Li(t) : !1;
|
|
3104
3104
|
}, p = (e) => {
|
|
3105
3105
|
let t = c(e);
|
|
3106
|
-
return t ? { shown:
|
|
3106
|
+
return t ? { shown: Li(t) } : null;
|
|
3107
3107
|
}, m = (e) => {
|
|
3108
3108
|
let t = c(e);
|
|
3109
|
-
t && (
|
|
3109
|
+
t && (Vi(t, !1), u(t), !Li(t) && d(t, !0));
|
|
3110
3110
|
}, h = (e) => {
|
|
3111
3111
|
let t = c(e);
|
|
3112
|
-
!t || !
|
|
3112
|
+
!t || !Li(t) || (Vi(t, !0), d(t, !1));
|
|
3113
3113
|
}, g = () => {
|
|
3114
3114
|
a().forEach((e) => {
|
|
3115
|
-
s(e) && (
|
|
3115
|
+
s(e) && (Bi(e) && Li(e) && d(e, !1), u(e), i.note(e, { shown: Li(e) }));
|
|
3116
3116
|
});
|
|
3117
3117
|
}, _ = (e) => {
|
|
3118
3118
|
let n = e.target;
|
|
@@ -3120,14 +3120,14 @@ var ji = {
|
|
|
3120
3120
|
let r = n.closest(t.closeSelector);
|
|
3121
3121
|
if (!(r instanceof HTMLElement)) return;
|
|
3122
3122
|
let i = o(r);
|
|
3123
|
-
!i || !s(i) ||
|
|
3123
|
+
!i || !s(i) || Fi(e) && h(i);
|
|
3124
3124
|
}, v = (e) => {
|
|
3125
3125
|
if (!(e instanceof KeyboardEvent) || e.key !== "Enter" && e.key !== " ") return;
|
|
3126
3126
|
let n = e.target;
|
|
3127
3127
|
if (!(n instanceof Element)) return;
|
|
3128
3128
|
let r = n.closest(t.closeSelector);
|
|
3129
|
-
if (r instanceof HTMLElement && o(r) && !
|
|
3130
|
-
if (!
|
|
3129
|
+
if (r instanceof HTMLElement && o(r) && !Ii(r)) {
|
|
3130
|
+
if (!Fi(e)) return;
|
|
3131
3131
|
e.preventDefault(), h(r);
|
|
3132
3132
|
}
|
|
3133
3133
|
}, y = !1, b = () => {
|
|
@@ -3160,17 +3160,17 @@ var ji = {
|
|
|
3160
3160
|
isShown: f,
|
|
3161
3161
|
getState: p
|
|
3162
3162
|
};
|
|
3163
|
-
},
|
|
3164
|
-
|
|
3165
|
-
},
|
|
3166
|
-
|
|
3163
|
+
}, Ui = (e = {}) => Hi(e), Wi = null, Gi = !1, Ki = null, qi = () => {
|
|
3164
|
+
Ki &&= (document.removeEventListener("DOMContentLoaded", Ki), null);
|
|
3165
|
+
}, Ji = () => typeof window > "u" || typeof document > "u" ? null : (Gi = !1, qi(), Wi ? (Wi.sync(), Wi) : (Wi = Hi(), Wi)), Yi = () => {
|
|
3166
|
+
Gi = !0, qi(), Wi?.destroy(), Wi = null;
|
|
3167
3167
|
};
|
|
3168
|
-
typeof window < "u" && typeof document < "u" && (document.readyState === "loading" ? (
|
|
3169
|
-
|
|
3170
|
-
}, document.addEventListener("DOMContentLoaded",
|
|
3168
|
+
typeof window < "u" && typeof document < "u" && (document.readyState === "loading" ? (Ki = () => {
|
|
3169
|
+
Ki = null, Gi || Ji();
|
|
3170
|
+
}, document.addEventListener("DOMContentLoaded", Ki)) : Ji());
|
|
3171
3171
|
//#endregion
|
|
3172
3172
|
//#region src/js/src/menu/menu-runtime.ts
|
|
3173
|
-
var
|
|
3173
|
+
var Xi = {
|
|
3174
3174
|
root: typeof document < "u" ? document : {},
|
|
3175
3175
|
rootSelector: "[menu-root]",
|
|
3176
3176
|
buttonSelector: "[menu-button]",
|
|
@@ -3178,13 +3178,13 @@ var Yi = {
|
|
|
3178
3178
|
itemSelector: "[menuitem]",
|
|
3179
3179
|
separatorSelector: "[menu-separator]",
|
|
3180
3180
|
labelSelector: "[menu-label]"
|
|
3181
|
-
},
|
|
3181
|
+
}, Zi = (e) => Array.from(e), Qi = "juice-menu", $i = "juice-menuitem", ea = 0, ta = (e) => {
|
|
3182
3182
|
let t = "";
|
|
3183
3183
|
do
|
|
3184
|
-
|
|
3184
|
+
ea += 1, t = `${e}-${ea}`;
|
|
3185
3185
|
while (typeof document < "u" && document.getElementById(t));
|
|
3186
3186
|
return t;
|
|
3187
|
-
},
|
|
3187
|
+
}, na = (e, t, n) => e.id ? e.id : t && !document.getElementById(t) ? (e.id = t, t) : (e.id = ta(n), e.id), Q = L(), ra = /* @__PURE__ */ new WeakMap(), ia = /* @__PURE__ */ new WeakMap(), aa = (e) => e.trim().toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-+|-+$/g, "") || "menu", oa = (e) => e instanceof HTMLButtonElement ? !0 : e instanceof HTMLAnchorElement ? e.hasAttribute("href") : !1, sa = (e) => !!(e.getAttribute("aria-disabled") === "true" || e instanceof HTMLButtonElement && e.disabled || e instanceof HTMLInputElement && e.disabled), ca = () => ({
|
|
3188
3188
|
destroy: () => {},
|
|
3189
3189
|
sync: () => {},
|
|
3190
3190
|
open: () => {},
|
|
@@ -3196,32 +3196,32 @@ var Yi = {
|
|
|
3196
3196
|
}), la = (e = {}) => {
|
|
3197
3197
|
if (typeof window > "u" || typeof document > "u") return ca();
|
|
3198
3198
|
let t = {
|
|
3199
|
-
...
|
|
3199
|
+
...Xi,
|
|
3200
3200
|
...e
|
|
3201
|
-
}, n = t.root ?? document, r = T("menu"), i, a = () =>
|
|
3201
|
+
}, n = t.root ?? document, r = T("menu"), i, a = () => Zi(n.querySelectorAll(t.rootSelector)), o = (e) => {
|
|
3202
3202
|
if (!e) return null;
|
|
3203
3203
|
let n = e.closest(t.rootSelector);
|
|
3204
3204
|
return n instanceof HTMLElement ? n : null;
|
|
3205
|
-
}, s = (e) => e?.matches(t.rootSelector) ? n instanceof Document ? !0 : n instanceof Node ? n.contains(e) : a().includes(e) : !1, c = (e) =>
|
|
3205
|
+
}, s = (e) => e?.matches(t.rootSelector) ? n instanceof Document ? !0 : n instanceof Node ? n.contains(e) : a().includes(e) : !1, c = (e) => Zi(e.querySelectorAll(t.menuSelector)).find((t) => o(t) === e) ?? null, l = (e, t) => {
|
|
3206
3206
|
let n = c(t);
|
|
3207
3207
|
return !!(n && n.contains(e));
|
|
3208
3208
|
}, u = (e) => {
|
|
3209
3209
|
let n = c(e);
|
|
3210
|
-
return n ?
|
|
3210
|
+
return n ? Zi(n.querySelectorAll(t.itemSelector)).filter((t) => o(t) === e) : [];
|
|
3211
3211
|
}, d = (e) => u(e).filter((e) => !e.hasAttribute("hidden") && !sa(e)), f = (e) => {
|
|
3212
3212
|
let n = c(e);
|
|
3213
|
-
return n ?
|
|
3213
|
+
return n ? Zi(n.querySelectorAll(t.separatorSelector)).filter((t) => o(t) === e) : [];
|
|
3214
3214
|
}, p = (e) => {
|
|
3215
|
-
let n =
|
|
3215
|
+
let n = Zi(e.querySelectorAll(t.buttonSelector)).find((t) => o(t) === e && !l(t, e));
|
|
3216
3216
|
if (n) return n;
|
|
3217
|
-
let r =
|
|
3217
|
+
let r = Zi(e.querySelectorAll("[aria-haspopup=\"menu\"]")).find((t) => o(t) === e && !l(t, e));
|
|
3218
3218
|
if (r) return r;
|
|
3219
3219
|
let i = c(e);
|
|
3220
3220
|
if (i?.id) {
|
|
3221
|
-
let t =
|
|
3221
|
+
let t = Zi(e.querySelectorAll("[aria-controls]")).find((t) => o(t) !== e || l(t, e) ? !1 : B(t).includes(i.id));
|
|
3222
3222
|
if (t) return t;
|
|
3223
3223
|
}
|
|
3224
|
-
return
|
|
3224
|
+
return Zi(e.querySelectorAll("button, [role=\"button\"], a[href]")).find((t) => o(t) === e && !l(t, e)) ?? null;
|
|
3225
3225
|
}, m = (e) => {
|
|
3226
3226
|
let t = c(e);
|
|
3227
3227
|
return !!(t && !t.hasAttribute("hidden"));
|
|
@@ -3270,8 +3270,8 @@ var Yi = {
|
|
|
3270
3270
|
let t = c(e);
|
|
3271
3271
|
if (!t) return;
|
|
3272
3272
|
let n = p(e), r = u(e), i = _(e);
|
|
3273
|
-
|
|
3274
|
-
|
|
3273
|
+
na(t, i ? `${i}-menu` : null, Qi), t.getAttribute("role") !== "menu" && t.setAttribute("role", "menu"), r.forEach((e, t) => {
|
|
3274
|
+
na(e, i ? `${i}-item-${t + 1}` : null, $i), e.getAttribute("role") !== "menuitem" && e.setAttribute("role", "menuitem");
|
|
3275
3275
|
}), f(e).forEach((e) => {
|
|
3276
3276
|
e.getAttribute("role") !== "separator" && e.setAttribute("role", "separator");
|
|
3277
3277
|
}), n && (oa(n) || (n.setAttribute("role", "button"), n.hasAttribute("tabindex") || n.setAttribute("tabindex", "0")), n.getAttribute("aria-haspopup") !== "menu" && n.setAttribute("aria-haspopup", "menu"), n.getAttribute("aria-controls") !== t.id && n.setAttribute("aria-controls", t.id)), v(e, m(e)), b(e, m(e) ? S(e) : null);
|
|
@@ -3284,7 +3284,7 @@ var Yi = {
|
|
|
3284
3284
|
}, D = (e, t, n = "now") => {
|
|
3285
3285
|
m(e) && (C(e), y(e, !1), v(e, !1), b(e, null), n === "after-pointer" ? i.popAfterPointer(e) : i.pop(e), t ? E(e) : ia.delete(e));
|
|
3286
3286
|
}, O = (e, n, r = "previous") => {
|
|
3287
|
-
a().concat(
|
|
3287
|
+
a().concat(Zi(document.querySelectorAll(t.rootSelector))).forEach((t) => {
|
|
3288
3288
|
t === e || !m(t) || D(t, !1);
|
|
3289
3289
|
}), w(e, n ?? p(e)), C(e), y(e, !0), v(e, !0);
|
|
3290
3290
|
let o = S(e, r);
|
|
@@ -3359,7 +3359,7 @@ var Yi = {
|
|
|
3359
3359
|
let n = o(t);
|
|
3360
3360
|
if (!n || !s(n)) return;
|
|
3361
3361
|
let r = R(t, n);
|
|
3362
|
-
!r || !sa(r) ||
|
|
3362
|
+
!r || !sa(r) || Q(e) && (e.preventDefault(), e.stopPropagation(), e.stopImmediatePropagation());
|
|
3363
3363
|
}, U = (e) => {
|
|
3364
3364
|
let t = e.target;
|
|
3365
3365
|
if (!(t instanceof Element)) return;
|
|
@@ -3367,30 +3367,30 @@ var Yi = {
|
|
|
3367
3367
|
if (n && s(n)) {
|
|
3368
3368
|
let r = R(t, n);
|
|
3369
3369
|
if (r) {
|
|
3370
|
-
if (sa(r) || !
|
|
3370
|
+
if (sa(r) || !Q(e)) return;
|
|
3371
3371
|
ra.set(n, r), D(n, !0);
|
|
3372
3372
|
return;
|
|
3373
3373
|
}
|
|
3374
3374
|
if (z(t, n)) {
|
|
3375
|
-
if (!c(n) || !
|
|
3375
|
+
if (!c(n) || !Q(e)) return;
|
|
3376
3376
|
e.preventDefault(), j(n);
|
|
3377
3377
|
return;
|
|
3378
3378
|
}
|
|
3379
3379
|
if (l(t, n)) return;
|
|
3380
3380
|
let i = V();
|
|
3381
|
-
if (!i || i !== n || !
|
|
3381
|
+
if (!i || i !== n || !Q(e)) return;
|
|
3382
3382
|
D(i, !1);
|
|
3383
3383
|
return;
|
|
3384
3384
|
}
|
|
3385
3385
|
let r = V();
|
|
3386
|
-
r && (
|
|
3386
|
+
r && (Ln() || at(r) && Q(e) && D(r, !1));
|
|
3387
3387
|
}, W = (e) => {
|
|
3388
3388
|
if (!(e instanceof KeyboardEvent)) return;
|
|
3389
3389
|
let t = e.target;
|
|
3390
3390
|
if (!(t instanceof Element)) return;
|
|
3391
3391
|
let n = o(t), r = V();
|
|
3392
3392
|
if (e.key === "Tab") {
|
|
3393
|
-
if (!r || !
|
|
3393
|
+
if (!r || !at(r) || !Q(e)) return;
|
|
3394
3394
|
A(r, !0);
|
|
3395
3395
|
return;
|
|
3396
3396
|
}
|
|
@@ -3398,49 +3398,49 @@ var Yi = {
|
|
|
3398
3398
|
let i = z(t, n), a = R(t, n);
|
|
3399
3399
|
if (e.key === "ArrowDown") {
|
|
3400
3400
|
if (!m(n)) {
|
|
3401
|
-
if (!i || !c(n) || !
|
|
3401
|
+
if (!i || !c(n) || !Q(e)) return;
|
|
3402
3402
|
e.preventDefault(), k(i, "first");
|
|
3403
3403
|
return;
|
|
3404
3404
|
}
|
|
3405
|
-
if (!a && !i || !
|
|
3405
|
+
if (!a && !i || !Q(e)) return;
|
|
3406
3406
|
e.preventDefault(), P(n, (e) => e < 0 ? 0 : e + 1);
|
|
3407
3407
|
return;
|
|
3408
3408
|
}
|
|
3409
3409
|
if (e.key === "ArrowUp") {
|
|
3410
3410
|
if (!m(n)) {
|
|
3411
|
-
if (!i || !c(n) || !
|
|
3411
|
+
if (!i || !c(n) || !Q(e)) return;
|
|
3412
3412
|
e.preventDefault(), k(i, "last");
|
|
3413
3413
|
return;
|
|
3414
3414
|
}
|
|
3415
|
-
if (!a && !i || !
|
|
3415
|
+
if (!a && !i || !Q(e)) return;
|
|
3416
3416
|
e.preventDefault(), P(n, (e, t) => e < 0 ? t - 1 : e - 1);
|
|
3417
3417
|
return;
|
|
3418
3418
|
}
|
|
3419
3419
|
if (!m(n)) {
|
|
3420
3420
|
if (i && c(n) && !oa(i) && (e.key === "Enter" || e.key === " ")) {
|
|
3421
|
-
if (!
|
|
3421
|
+
if (!Q(e)) return;
|
|
3422
3422
|
e.preventDefault(), j(n);
|
|
3423
3423
|
}
|
|
3424
3424
|
return;
|
|
3425
3425
|
}
|
|
3426
3426
|
if (e.key === "Home") {
|
|
3427
|
-
if (!a && !i || !
|
|
3427
|
+
if (!a && !i || !Q(e)) return;
|
|
3428
3428
|
e.preventDefault(), P(n, () => 0);
|
|
3429
3429
|
return;
|
|
3430
3430
|
}
|
|
3431
3431
|
if (e.key === "End") {
|
|
3432
|
-
if (!a && !i || !
|
|
3432
|
+
if (!a && !i || !Q(e)) return;
|
|
3433
3433
|
e.preventDefault(), P(n, (e, t) => t - 1);
|
|
3434
3434
|
return;
|
|
3435
3435
|
}
|
|
3436
3436
|
if (!(e.key !== "Enter" && e.key !== " ")) {
|
|
3437
3437
|
if (a && !sa(a)) {
|
|
3438
|
-
if (!
|
|
3438
|
+
if (!Q(e)) return;
|
|
3439
3439
|
e.preventDefault(), a.click();
|
|
3440
3440
|
return;
|
|
3441
3441
|
}
|
|
3442
3442
|
if (i && !oa(i) && (e.key === "Enter" || e.key === " ")) {
|
|
3443
|
-
if (!
|
|
3443
|
+
if (!Q(e)) return;
|
|
3444
3444
|
e.preventDefault(), j(n);
|
|
3445
3445
|
}
|
|
3446
3446
|
}
|
|
@@ -3448,21 +3448,21 @@ var Yi = {
|
|
|
3448
3448
|
G || (G = !0, requestAnimationFrame(() => {
|
|
3449
3449
|
G = !1, L();
|
|
3450
3450
|
}));
|
|
3451
|
-
},
|
|
3452
|
-
return i =
|
|
3451
|
+
}, ee = typeof MutationObserver < "u" ? new MutationObserver(() => K()) : null;
|
|
3452
|
+
return i = Bn({
|
|
3453
3453
|
kind: "menu",
|
|
3454
3454
|
getElements: a,
|
|
3455
3455
|
isOpen: m,
|
|
3456
3456
|
dismiss: (e, t) => {
|
|
3457
3457
|
if (s(e)) {
|
|
3458
3458
|
if (t === "outside") {
|
|
3459
|
-
|
|
3459
|
+
Rn(), D(e, !1, "after-pointer");
|
|
3460
3460
|
return;
|
|
3461
3461
|
}
|
|
3462
3462
|
D(e, t === "escape");
|
|
3463
3463
|
}
|
|
3464
3464
|
}
|
|
3465
|
-
}), document.addEventListener("click", H, !0), document.addEventListener("click", U), document.addEventListener("keydown", W),
|
|
3465
|
+
}), document.addEventListener("click", H, !0), document.addEventListener("click", U), document.addEventListener("keydown", W), ee && n instanceof Node && ee.observe(n, {
|
|
3466
3466
|
childList: !0,
|
|
3467
3467
|
subtree: !0,
|
|
3468
3468
|
attributes: !0,
|
|
@@ -3482,7 +3482,7 @@ var Yi = {
|
|
|
3482
3482
|
]
|
|
3483
3483
|
}), L(), {
|
|
3484
3484
|
destroy: () => {
|
|
3485
|
-
document.removeEventListener("click", H, !0), document.removeEventListener("click", U), document.removeEventListener("keydown", W),
|
|
3485
|
+
document.removeEventListener("click", H, !0), document.removeEventListener("click", U), document.removeEventListener("keydown", W), ee?.disconnect(), i.destroy();
|
|
3486
3486
|
},
|
|
3487
3487
|
sync: L,
|
|
3488
3488
|
open: k,
|
|
@@ -4590,7 +4590,7 @@ var $s = {
|
|
|
4590
4590
|
if (e.getAttribute("aria-expanded") !== r && e.setAttribute("aria-expanded", r), !t) return;
|
|
4591
4591
|
let i = String(!n);
|
|
4592
4592
|
t.getAttribute("aria-hidden") !== i && t.setAttribute("aria-hidden", i);
|
|
4593
|
-
}, uc = (e) => e.defaultPrevented ||
|
|
4593
|
+
}, uc = (e) => e.defaultPrevented || dn() || fn(), dc = (e = {}) => {
|
|
4594
4594
|
if (typeof window > "u" || typeof document > "u") return {
|
|
4595
4595
|
destroy: () => {},
|
|
4596
4596
|
sync: () => {},
|
|
@@ -4603,7 +4603,7 @@ var $s = {
|
|
|
4603
4603
|
let t = {
|
|
4604
4604
|
...$s,
|
|
4605
4605
|
...e
|
|
4606
|
-
}, n = t.root ?? document, r = n, i =
|
|
4606
|
+
}, n = t.root ?? document, r = n, i = se(), a = T("disclosure"), o = (e, t) => {
|
|
4607
4607
|
i.cancel(e), e.hidden !== !t && (e.hidden = !t), e.style.removeProperty("height"), (sc(e) || e.hasAttribute("data-motion-state")) && e.setAttribute("data-motion-state", t ? "entered" : "exited");
|
|
4608
4608
|
}, s = (e) => {
|
|
4609
4609
|
let t = e.getAttribute("data-motion-state");
|
|
@@ -6661,7 +6661,7 @@ var Ff = [
|
|
|
6661
6661
|
mp();
|
|
6662
6662
|
let t = {
|
|
6663
6663
|
overlay: e,
|
|
6664
|
-
release:
|
|
6664
|
+
release: ot(),
|
|
6665
6665
|
released: !1
|
|
6666
6666
|
};
|
|
6667
6667
|
return Xf.add(t), () => pp(t);
|
|
@@ -6695,7 +6695,7 @@ var Ff = [
|
|
|
6695
6695
|
let t = {
|
|
6696
6696
|
...Uf,
|
|
6697
6697
|
...e
|
|
6698
|
-
}, n = t.root ?? document, r = n, i =
|
|
6698
|
+
}, n = t.root ?? document, r = n, i = se(), a = T("sheet"), o = /* @__PURE__ */ new Map(), s, c = 0, l = !1, u = null, d = !1, f = (e) => (c += 1, `${e}-${c}`), p = () => Wf(n.querySelectorAll(t.overlaySelector)), m = (e) => {
|
|
6699
6699
|
if (!e) return null;
|
|
6700
6700
|
let n = e.closest(t.overlaySelector);
|
|
6701
6701
|
return n instanceof HTMLElement ? n : null;
|
|
@@ -6745,7 +6745,9 @@ var Ff = [
|
|
|
6745
6745
|
let i = Wf(n.querySelectorAll(":is(h1,h2,h3,h4,h5,h6)")).filter((t) => m(t) === e), a = i.find((e) => e.closest(t.headerSelector)) ?? i[0];
|
|
6746
6746
|
a && (a.id ||= r ? `${r}-title` : f(qf), n.setAttribute("aria-labelledby", a.id));
|
|
6747
6747
|
}
|
|
6748
|
-
Wf(
|
|
6748
|
+
Wf(n.querySelectorAll(t.handleSelector)).filter((t) => m(t) === e).forEach((e) => {
|
|
6749
|
+
sp(n).length > 1 && !(e instanceof HTMLButtonElement) && (e.hasAttribute("role") || e.setAttribute("role", "button"), e.hasAttribute("tabindex") || (e.tabIndex = 0)), (e instanceof HTMLButtonElement || e.getAttribute("role") === "button") && !e.getAttribute("aria-label")?.trim() && !e.getAttribute("aria-labelledby")?.trim() && !e.textContent?.trim() && e.setAttribute("aria-label", "Resize sheet");
|
|
6750
|
+
}), Wf(e.querySelectorAll(t.closeSelector)).filter((t) => m(t) === e).forEach((e) => {
|
|
6749
6751
|
Qf(e) || (e.setAttribute("role", "button"), e.hasAttribute("tabindex") || e.setAttribute("tabindex", "0")), !e.hasAttribute("aria-label") && !e.hasAttribute("aria-labelledby") && !e.textContent?.trim() && e.setAttribute("aria-label", "Close");
|
|
6750
6752
|
}), S(e).forEach((t) => {
|
|
6751
6753
|
Qf(t) || (t.setAttribute("role", "button"), t.hasAttribute("tabindex") || t.setAttribute("tabindex", "0")), t.hasAttribute("aria-haspopup") || t.setAttribute("aria-haspopup", "dialog"), t.hasAttribute("aria-expanded") || t.setAttribute("aria-expanded", String($(e)));
|
|
@@ -6763,85 +6765,93 @@ var Ff = [
|
|
|
6763
6765
|
n && a.note(e, n, t ? { baseline: t } : void 0);
|
|
6764
6766
|
}, O = (e, t) => {
|
|
6765
6767
|
e.getAttribute("detent") !== t && e.setAttribute("detent", t);
|
|
6766
|
-
}, k = (e) => {
|
|
6768
|
+
}, k = (e, t) => {
|
|
6769
|
+
let n = m(e);
|
|
6770
|
+
if (!n || !g(n)) return;
|
|
6771
|
+
let r = _(n);
|
|
6772
|
+
if (!r?.contains(e) || !$(n) || ep(n) || !v(n) || $f(e) || u?.committed || !Jf(t)) return;
|
|
6773
|
+
t.preventDefault();
|
|
6774
|
+
let i = sp(r);
|
|
6775
|
+
i.length < 2 || np() || (O(r, i[(i.indexOf(fp(r)) + 1) % i.length]), D(n));
|
|
6776
|
+
}, A = (e) => {
|
|
6767
6777
|
e.style.height = "", e.style.transform = "";
|
|
6768
|
-
},
|
|
6778
|
+
}, j = (e, t) => ap(e, If[t], op(t)), M = (e, t) => {
|
|
6769
6779
|
let n = e.getBoundingClientRect().height;
|
|
6770
6780
|
if (n > 0) return n;
|
|
6771
6781
|
let r = rp(e.style.height, ip());
|
|
6772
|
-
return r != null && r > 0 ? r :
|
|
6773
|
-
},
|
|
6782
|
+
return r != null && r > 0 ? r : j(e, t);
|
|
6783
|
+
}, N = (e, t) => {
|
|
6774
6784
|
let n = {};
|
|
6775
6785
|
return t.forEach((t) => {
|
|
6776
|
-
n[t] =
|
|
6786
|
+
n[t] = j(e, t);
|
|
6777
6787
|
}), n;
|
|
6778
|
-
},
|
|
6788
|
+
}, P = (e, t, n) => {
|
|
6779
6789
|
let r = t[0] ?? "half", i = Infinity;
|
|
6780
6790
|
return t.forEach((t) => {
|
|
6781
6791
|
let a = Math.abs(n[t] - e);
|
|
6782
6792
|
a < i && (r = t, i = a);
|
|
6783
6793
|
}), r;
|
|
6784
|
-
}, P = (e) => {
|
|
6785
|
-
tp(e) && (o.has(e) || o.set(e, hp(e)));
|
|
6786
6794
|
}, F = (e) => {
|
|
6795
|
+
tp(e) && (o.has(e) || o.set(e, hp(e)));
|
|
6796
|
+
}, I = (e) => {
|
|
6787
6797
|
let t = o.get(e);
|
|
6788
6798
|
t && (o.delete(e), t());
|
|
6789
|
-
},
|
|
6799
|
+
}, L = (e, t) => {
|
|
6790
6800
|
let n = document.activeElement instanceof HTMLElement ? document.activeElement : null, r = t && !e.contains(t) ? t : n && !e.contains(n) ? n : null;
|
|
6791
6801
|
r && Yf.set(e, r);
|
|
6792
|
-
},
|
|
6802
|
+
}, R = (e) => {
|
|
6793
6803
|
let t = Yf.get(e);
|
|
6794
6804
|
Yf.delete(e), t?.isConnected && t.focus();
|
|
6795
|
-
},
|
|
6805
|
+
}, z = (e) => {
|
|
6796
6806
|
let t = _(e);
|
|
6797
|
-
t &&
|
|
6798
|
-
},
|
|
6807
|
+
t && Tt(t);
|
|
6808
|
+
}, H = (e, t) => {
|
|
6799
6809
|
e.hasAttribute("dragging") && e.removeAttribute("dragging");
|
|
6800
6810
|
let n = () => {
|
|
6801
|
-
e.hasAttribute("dragging") ||
|
|
6811
|
+
e.hasAttribute("dragging") || A(e);
|
|
6802
6812
|
};
|
|
6803
6813
|
if (t || K()) {
|
|
6804
6814
|
n();
|
|
6805
6815
|
return;
|
|
6806
6816
|
}
|
|
6807
6817
|
requestAnimationFrame(n);
|
|
6808
|
-
},
|
|
6818
|
+
}, U = (e) => {
|
|
6809
6819
|
let t = u;
|
|
6810
6820
|
if (u = null, !t) return;
|
|
6811
6821
|
let { overlay: n, sheet: r, detent: i, committed: a } = t;
|
|
6812
6822
|
if (!a) return;
|
|
6813
6823
|
d = !0;
|
|
6814
|
-
let o = sp(r), s =
|
|
6824
|
+
let o = sp(r), s = N(r, o), c = o[0] ?? i, l = o[o.length - 1] ?? i, f = t.samples[t.samples.length - 1], p = f ? t.startHeight + (t.startY - f.y) : t.startHeight, m = gp(t.samples);
|
|
6815
6825
|
if (e === "cancel") {
|
|
6816
|
-
O(r, i),
|
|
6826
|
+
O(r, i), H(r, !0), D(n);
|
|
6817
6827
|
return;
|
|
6818
6828
|
}
|
|
6819
6829
|
let h = s[c] ?? t.startHeight, g = p < h - Vf, _ = m >= Rf && p <= h + Lf;
|
|
6820
6830
|
if (e === "close" || g || _) {
|
|
6821
|
-
|
|
6831
|
+
H(r, !0), D(n), W(n, !0);
|
|
6822
6832
|
return;
|
|
6823
6833
|
}
|
|
6824
6834
|
let v = p - m * Bf;
|
|
6825
|
-
O(r, np() ? lp(o) :
|
|
6826
|
-
},
|
|
6835
|
+
O(r, np() ? lp(o) : P(Math.min(Math.max(v, s[c] ?? v), s[l] ?? v), o, s)), H(r, !1), D(n);
|
|
6836
|
+
}, W = (e, t) => {
|
|
6827
6837
|
if (!_(e) || !$(e) || ep(e)) return;
|
|
6828
6838
|
if (u?.overlay === e) {
|
|
6829
6839
|
let e = u;
|
|
6830
|
-
u = null, e.committed &&
|
|
6840
|
+
u = null, e.committed && H(e.sheet, !0);
|
|
6831
6841
|
}
|
|
6832
6842
|
w(e);
|
|
6833
6843
|
let n = tp(e);
|
|
6834
6844
|
i.exit(e, () => {
|
|
6835
6845
|
s.pop(e);
|
|
6836
6846
|
let r = E(e);
|
|
6837
|
-
e.hidden = !0, C(e, !1),
|
|
6847
|
+
e.hidden = !0, C(e, !1), I(e), r ? D(e, r) : D(e), t && n ? R(e) : Yf.delete(e);
|
|
6838
6848
|
});
|
|
6839
|
-
},
|
|
6849
|
+
}, G = (e, t) => {
|
|
6840
6850
|
let n = _(e);
|
|
6841
6851
|
if (!n || !v(e)) return;
|
|
6842
6852
|
let r = E(e) ?? void 0;
|
|
6843
|
-
tp(e) ?
|
|
6844
|
-
},
|
|
6853
|
+
tp(e) ? L(e, t) : Yf.delete(e), w(e), O(n, up(sp(n))), e.hidden &&= !1, C(e, !0), tp(e) ? (F(e), z(e)) : I(e), r ? D(e, r) : D(e), s.connect(e, !0), i.enter(e);
|
|
6854
|
+
}, ee = (e) => {
|
|
6845
6855
|
let t = b(e);
|
|
6846
6856
|
if (!(!t || !v(t))) {
|
|
6847
6857
|
if ($(t) && !ep(t)) {
|
|
@@ -6850,48 +6860,48 @@ var Ff = [
|
|
|
6850
6860
|
e && !dp(e, sp(e)) && (O(e, up(sp(e))), D(t));
|
|
6851
6861
|
return;
|
|
6852
6862
|
}
|
|
6853
|
-
|
|
6863
|
+
G(t, e && y(e) === t ? e : e?.closest("[aria-controls]") instanceof HTMLElement && y(e.closest("[aria-controls]")) === t ? e.closest("[aria-controls]") : null);
|
|
6854
6864
|
}
|
|
6855
|
-
},
|
|
6865
|
+
}, te = (e) => {
|
|
6856
6866
|
let t = b(e);
|
|
6857
|
-
!t || !_(t) || !$(t) || ep(t) ||
|
|
6858
|
-
},
|
|
6867
|
+
!t || !_(t) || !$(t) || ep(t) || W(t, !0);
|
|
6868
|
+
}, ne = (e) => {
|
|
6859
6869
|
let t = b(e);
|
|
6860
6870
|
if (!(!t || !v(t))) {
|
|
6861
6871
|
if ($(t) && !ep(t)) {
|
|
6862
|
-
|
|
6872
|
+
te(t);
|
|
6863
6873
|
return;
|
|
6864
6874
|
}
|
|
6865
|
-
|
|
6875
|
+
ee(e ?? t);
|
|
6866
6876
|
}
|
|
6867
|
-
},
|
|
6877
|
+
}, re = (e) => {
|
|
6868
6878
|
let t = b(e);
|
|
6869
6879
|
return !t || !_(t) ? !1 : $(t);
|
|
6870
|
-
},
|
|
6880
|
+
}, ie = (e) => {
|
|
6871
6881
|
let t = b(e);
|
|
6872
6882
|
return t ? E(t) : null;
|
|
6873
|
-
},
|
|
6883
|
+
}, ae = (e) => {
|
|
6874
6884
|
if ($(e) && tp(e)) {
|
|
6875
|
-
|
|
6885
|
+
F(e);
|
|
6876
6886
|
return;
|
|
6877
6887
|
}
|
|
6878
|
-
|
|
6879
|
-
},
|
|
6888
|
+
I(e);
|
|
6889
|
+
}, oe = () => {
|
|
6880
6890
|
if (!l) {
|
|
6881
6891
|
mp();
|
|
6882
6892
|
for (let e of [...o.keys()]) e.isConnected || o.delete(e);
|
|
6883
6893
|
p().forEach((e) => {
|
|
6884
6894
|
let t = _(e);
|
|
6885
|
-
t && (w(e), C(e, $(e)),
|
|
6895
|
+
t && (w(e), C(e, $(e)), ae(e), $(e) && !ep(e) && !t.hasAttribute("dragging") && !dp(t, sp(t)) && O(t, up(sp(t))), D(e));
|
|
6886
6896
|
}), s.reconcile();
|
|
6887
6897
|
}
|
|
6888
|
-
},
|
|
6898
|
+
}, ce = (e) => !t.closeOnBackdrop || !tp(e) ? !1 : e.getAttribute("sheet-overlay") !== "static", le = (e) => {
|
|
6889
6899
|
if (!(e instanceof HTMLElement) || m(e)) return null;
|
|
6890
6900
|
if (y(e)) return e;
|
|
6891
6901
|
let t = e.closest("[aria-controls]");
|
|
6892
6902
|
return t instanceof HTMLElement && y(t) ? t : null;
|
|
6893
|
-
},
|
|
6894
|
-
if (d) {
|
|
6903
|
+
}, ue = (e) => {
|
|
6904
|
+
if (d && e instanceof MouseEvent && e.detail > 0) {
|
|
6895
6905
|
d = !1, Jf(e) && (e.preventDefault(), e.stopPropagation());
|
|
6896
6906
|
return;
|
|
6897
6907
|
}
|
|
@@ -6903,56 +6913,66 @@ var Ff = [
|
|
|
6903
6913
|
let i = n.closest(t.closeSelector) instanceof HTMLElement ? n.closest(t.closeSelector) : null;
|
|
6904
6914
|
if (i && m(i) === r) {
|
|
6905
6915
|
if (!v(r) || !Jf(e)) return;
|
|
6906
|
-
|
|
6916
|
+
te(r);
|
|
6907
6917
|
return;
|
|
6908
6918
|
}
|
|
6909
|
-
|
|
6910
|
-
|
|
6911
|
-
|
|
6912
|
-
|
|
6919
|
+
let a = n.closest(t.handleSelector);
|
|
6920
|
+
if (a instanceof HTMLElement && m(a) === r) {
|
|
6921
|
+
k(a, e);
|
|
6922
|
+
return;
|
|
6923
|
+
}
|
|
6924
|
+
if (n === r && ce(r)) {
|
|
6925
|
+
let t = yt();
|
|
6926
|
+
if ((t === void 0 ? it()?.el ?? null : t) !== r || !Jf(e)) return;
|
|
6927
|
+
te(r);
|
|
6913
6928
|
}
|
|
6914
6929
|
return;
|
|
6915
6930
|
}
|
|
6916
|
-
let i =
|
|
6931
|
+
let i = le(n);
|
|
6917
6932
|
if (!i) return;
|
|
6918
6933
|
let a = y(i);
|
|
6919
|
-
!a || !v(a) || Jf(e) &&
|
|
6920
|
-
},
|
|
6921
|
-
let e =
|
|
6934
|
+
!a || !v(a) || Jf(e) && ne(i);
|
|
6935
|
+
}, de = () => {
|
|
6936
|
+
let e = it();
|
|
6922
6937
|
return !e?.modal || e.kind !== "sheet" || !g(e.el) || !tp(e.el) || !$(e.el) ? null : e.el;
|
|
6923
|
-
},
|
|
6938
|
+
}, fe = (e, t) => {
|
|
6924
6939
|
let n = _(t);
|
|
6925
|
-
n &&
|
|
6926
|
-
},
|
|
6940
|
+
n && Et(e, n);
|
|
6941
|
+
}, pe = (e) => {
|
|
6927
6942
|
if (!(e instanceof KeyboardEvent)) return;
|
|
6928
6943
|
let n = e.target;
|
|
6929
6944
|
if (!(n instanceof Element)) return;
|
|
6930
6945
|
if (e.key === "Tab") {
|
|
6931
|
-
let t =
|
|
6946
|
+
let t = de();
|
|
6932
6947
|
if (!t || !Jf(e)) return;
|
|
6933
|
-
|
|
6948
|
+
fe(e, t);
|
|
6934
6949
|
return;
|
|
6935
6950
|
}
|
|
6936
6951
|
if (e.key !== "Enter" && e.key !== " ") return;
|
|
6937
|
-
let r = n.closest(t.
|
|
6938
|
-
if (r instanceof HTMLElement &&
|
|
6939
|
-
|
|
6952
|
+
let r = n.closest(t.handleSelector);
|
|
6953
|
+
if (r instanceof HTMLElement && !(r instanceof HTMLButtonElement)) {
|
|
6954
|
+
e.repeat ? e.preventDefault() : k(r, e);
|
|
6955
|
+
return;
|
|
6956
|
+
}
|
|
6957
|
+
let i = n.closest(t.closeSelector);
|
|
6958
|
+
if (i instanceof HTMLElement && m(i) && !Qf(i)) {
|
|
6959
|
+
let t = m(i);
|
|
6940
6960
|
if (!t || !v(t) || !Jf(e)) return;
|
|
6941
|
-
e.preventDefault(),
|
|
6961
|
+
e.preventDefault(), te(i);
|
|
6942
6962
|
return;
|
|
6943
6963
|
}
|
|
6944
|
-
let
|
|
6945
|
-
if (!
|
|
6946
|
-
let
|
|
6947
|
-
!
|
|
6948
|
-
},
|
|
6949
|
-
let t =
|
|
6964
|
+
let a = le(n);
|
|
6965
|
+
if (!a || Qf(a)) return;
|
|
6966
|
+
let o = y(a);
|
|
6967
|
+
!o || !v(o) || Jf(e) && (e.preventDefault(), ne(a));
|
|
6968
|
+
}, me = (e) => {
|
|
6969
|
+
let t = de();
|
|
6950
6970
|
if (!t) return;
|
|
6951
6971
|
let n = e.target;
|
|
6952
6972
|
if (!(n instanceof Node) || t.contains(n) || !Jf(e)) return;
|
|
6953
6973
|
let r = _(t);
|
|
6954
|
-
r && (
|
|
6955
|
-
},
|
|
6974
|
+
r && (wt(r)[0] ?? r).focus();
|
|
6975
|
+
}, he = (e, n) => {
|
|
6956
6976
|
if (e.closest(t.closeSelector)) return null;
|
|
6957
6977
|
let r = e.closest(t.handleSelector);
|
|
6958
6978
|
if (r instanceof HTMLElement && n.contains(r)) return "chrome";
|
|
@@ -6960,7 +6980,7 @@ var Ff = [
|
|
|
6960
6980
|
if (i instanceof HTMLElement && n.contains(i)) return "chrome";
|
|
6961
6981
|
let a = e.closest(t.bodySelector);
|
|
6962
6982
|
return a instanceof HTMLElement && n.contains(a) ? "body" : null;
|
|
6963
|
-
},
|
|
6983
|
+
}, ge = (e, t, n, r) => {
|
|
6964
6984
|
let i = t, a = 0, o = K();
|
|
6965
6985
|
if (t > r) {
|
|
6966
6986
|
let e = t - r;
|
|
@@ -6970,17 +6990,18 @@ var Ff = [
|
|
|
6970
6990
|
i = n, a = o ? 0 : e * Hf;
|
|
6971
6991
|
}
|
|
6972
6992
|
e.style.height = _p(i), e.style.transform = a === 0 ? "" : `translateY(${_p(a)})`;
|
|
6973
|
-
},
|
|
6993
|
+
}, _e = (e) => {
|
|
6974
6994
|
e.committed || (e.committed = !0, i.cancel(e.overlay), e.sheet.hasAttribute("dragging") || e.sheet.setAttribute("dragging", ""), e.overlay.setAttribute("data-motion-state", "entered"), D(e.overlay));
|
|
6975
|
-
},
|
|
6995
|
+
}, ve = (e) => {
|
|
6976
6996
|
if (!(e instanceof PointerEvent) || e.button !== 0 || u) return;
|
|
6997
|
+
d = !1;
|
|
6977
6998
|
let n = e.target;
|
|
6978
6999
|
if (!(n instanceof Element)) return;
|
|
6979
7000
|
let r = m(n instanceof HTMLElement ? n : n.parentElement);
|
|
6980
7001
|
if (!r || !g(r) || !v(r) || !$(r) || ep(r)) return;
|
|
6981
7002
|
let i = _(r);
|
|
6982
7003
|
if (!i) return;
|
|
6983
|
-
let a =
|
|
7004
|
+
let a = he(n, i);
|
|
6984
7005
|
if (!a) return;
|
|
6985
7006
|
if (a === "body") {
|
|
6986
7007
|
let e = n.closest(t.bodySelector);
|
|
@@ -6993,7 +7014,7 @@ var Ff = [
|
|
|
6993
7014
|
sheet: i,
|
|
6994
7015
|
pointerId: e.pointerId,
|
|
6995
7016
|
startY: e.clientY,
|
|
6996
|
-
startHeight:
|
|
7017
|
+
startHeight: M(i, o),
|
|
6997
7018
|
origin: a,
|
|
6998
7019
|
committed: !1,
|
|
6999
7020
|
detent: o,
|
|
@@ -7002,10 +7023,10 @@ var Ff = [
|
|
|
7002
7023
|
t: performance.now()
|
|
7003
7024
|
}]
|
|
7004
7025
|
};
|
|
7005
|
-
},
|
|
7026
|
+
}, ye = (e) => {
|
|
7006
7027
|
if (!(e instanceof PointerEvent) || !u || e.pointerId !== u.pointerId) return;
|
|
7007
7028
|
if (!u.sheet.isConnected || !$(u.overlay)) {
|
|
7008
|
-
|
|
7029
|
+
U("cancel");
|
|
7009
7030
|
return;
|
|
7010
7031
|
}
|
|
7011
7032
|
let t = e.clientY - u.startY;
|
|
@@ -7015,38 +7036,38 @@ var Ff = [
|
|
|
7015
7036
|
u = null;
|
|
7016
7037
|
return;
|
|
7017
7038
|
}
|
|
7018
|
-
|
|
7039
|
+
_e(u);
|
|
7019
7040
|
}
|
|
7020
7041
|
if (!Jf(e)) return;
|
|
7021
7042
|
e.preventDefault(), u.samples.push({
|
|
7022
7043
|
y: e.clientY,
|
|
7023
7044
|
t: performance.now()
|
|
7024
7045
|
}), u.samples.length > 20 && u.samples.shift();
|
|
7025
|
-
let n = sp(u.sheet), r =
|
|
7046
|
+
let n = sp(u.sheet), r = N(u.sheet, n), i = n[0], a = n[n.length - 1];
|
|
7026
7047
|
if (!i || !a) return;
|
|
7027
7048
|
let o = u.startHeight + (u.startY - e.clientY);
|
|
7028
|
-
|
|
7029
|
-
},
|
|
7049
|
+
ge(u.sheet, o, r[i], r[a]);
|
|
7050
|
+
}, be = (e) => {
|
|
7030
7051
|
!(e instanceof PointerEvent) || !u || e.pointerId === u.pointerId && (Jf(e), u.samples.push({
|
|
7031
7052
|
y: e.clientY,
|
|
7032
7053
|
t: performance.now()
|
|
7033
|
-
}),
|
|
7034
|
-
},
|
|
7035
|
-
!(e instanceof PointerEvent) || !u || e.pointerId === u.pointerId && (Jf(e),
|
|
7036
|
-
},
|
|
7054
|
+
}), U("snap"));
|
|
7055
|
+
}, xe = (e) => {
|
|
7056
|
+
!(e instanceof PointerEvent) || !u || e.pointerId === u.pointerId && (Jf(e), U("cancel"));
|
|
7057
|
+
}, Se = () => {
|
|
7037
7058
|
np() && p().forEach((e) => {
|
|
7038
7059
|
if (!$(e) || ep(e)) return;
|
|
7039
7060
|
let t = _(e);
|
|
7040
7061
|
if (!t || t.hasAttribute("dragging")) return;
|
|
7041
7062
|
let n = lp(sp(t));
|
|
7042
|
-
t.getAttribute("detent") !== n && (
|
|
7063
|
+
t.getAttribute("detent") !== n && (A(t), O(t, n), D(e));
|
|
7043
7064
|
});
|
|
7044
|
-
},
|
|
7045
|
-
|
|
7046
|
-
|
|
7065
|
+
}, Ce = !1, we = () => {
|
|
7066
|
+
Ce || l || (Ce = !0, requestAnimationFrame(() => {
|
|
7067
|
+
Ce = !1, !l && oe();
|
|
7047
7068
|
}));
|
|
7048
|
-
},
|
|
7049
|
-
return s =
|
|
7069
|
+
}, Te = typeof MutationObserver < "u" ? new MutationObserver(() => we()) : null, Ee = typeof MutationObserver < "u" ? new MutationObserver(() => Se()) : null;
|
|
7070
|
+
return s = xt({
|
|
7050
7071
|
kind: "sheet",
|
|
7051
7072
|
selector: t.overlaySelector,
|
|
7052
7073
|
getOverlays: p,
|
|
@@ -7055,9 +7076,9 @@ var Ff = [
|
|
|
7055
7076
|
isModal: tp,
|
|
7056
7077
|
shouldStack: (e) => v(e),
|
|
7057
7078
|
dismiss: (e, t) => {
|
|
7058
|
-
_(e) && (t === "escape" && !v(e) || t === "outside" && (!
|
|
7079
|
+
_(e) && (t === "escape" && !v(e) || t === "outside" && (!bt() || !ce(e)) || W(e, st(t)));
|
|
7059
7080
|
}
|
|
7060
|
-
}), r.addEventListener("click",
|
|
7081
|
+
}), r.addEventListener("click", ue), r.addEventListener("keydown", pe, !0), r.addEventListener("focusin", me, !0), r.addEventListener("pointerdown", ve), document.addEventListener("pointermove", ye), document.addEventListener("pointerup", be), document.addEventListener("pointercancel", xe), Te && n instanceof Node && Te.observe(n, {
|
|
7061
7082
|
childList: !0,
|
|
7062
7083
|
subtree: !0,
|
|
7063
7084
|
attributes: !0,
|
|
@@ -7071,25 +7092,26 @@ var Ff = [
|
|
|
7071
7092
|
"sheet-overlay",
|
|
7072
7093
|
"sheet",
|
|
7073
7094
|
"sheet-close",
|
|
7095
|
+
"sheet-handle",
|
|
7074
7096
|
"sheet-detents",
|
|
7075
7097
|
"detent",
|
|
7076
7098
|
"dragging"
|
|
7077
7099
|
]
|
|
7078
|
-
}),
|
|
7100
|
+
}), Ee?.observe(document.documentElement, {
|
|
7079
7101
|
attributes: !0,
|
|
7080
7102
|
attributeFilter: ["keyboard-open"]
|
|
7081
|
-
}),
|
|
7103
|
+
}), oe(), {
|
|
7082
7104
|
destroy: () => {
|
|
7083
|
-
l = !0, u?.committed &&
|
|
7084
|
-
for (let e of [...o.keys()])
|
|
7105
|
+
l = !0, u?.committed && H(u.sheet, !0), u = null, r.removeEventListener("click", ue), r.removeEventListener("keydown", pe, !0), r.removeEventListener("focusin", me, !0), r.removeEventListener("pointerdown", ve), document.removeEventListener("pointermove", ye), document.removeEventListener("pointerup", be), document.removeEventListener("pointercancel", xe), Te?.disconnect(), Ee?.disconnect();
|
|
7106
|
+
for (let e of [...o.keys()]) I(e);
|
|
7085
7107
|
i.destroy(), s.destroy();
|
|
7086
7108
|
},
|
|
7087
|
-
sync:
|
|
7088
|
-
open:
|
|
7089
|
-
close:
|
|
7090
|
-
toggle:
|
|
7091
|
-
isOpen:
|
|
7092
|
-
getState:
|
|
7109
|
+
sync: oe,
|
|
7110
|
+
open: ee,
|
|
7111
|
+
close: te,
|
|
7112
|
+
toggle: ne,
|
|
7113
|
+
isOpen: re,
|
|
7114
|
+
getState: ie
|
|
7093
7115
|
};
|
|
7094
7116
|
}, yp = (e = {}) => vp(e), bp = null, xp = !1, Sp = null, Cp = () => {
|
|
7095
7117
|
Sp &&= (document.removeEventListener("DOMContentLoaded", Sp), null);
|
|
@@ -7269,4 +7291,4 @@ var Ep = {
|
|
|
7269
7291
|
themes: {}
|
|
7270
7292
|
};
|
|
7271
7293
|
//#endregion
|
|
7272
|
-
export { y as Accordion, b as JUICE_CHANGE_EVENT,
|
|
7294
|
+
export { y as Accordion, b as JUICE_CHANGE_EVENT, ve as createAccordion, bu as createAvatar, Hi as createBanner, ns as createBreadcrumb, xo as createCheckbox, wi as createCombobox, dc as createDisclosure, tn as createDrawer, se as createElementMotion, Dl as createField, Ql as createIconButton, Zc as createInput, Df as createKeyboardAvoider, la as createMenu, Lt as createModal, te as createMotionCancelToken, M as createNavigation, Gs as createPagination, sr as createPopover, Td as createPressable, Ss as createProgress, Vo as createRadio, Ic as createSelect, vp as createSheet, no as createSlider, Cc as createSpinner, Da as createSwitch, Qu as createTable, Pe as createTabs, ul as createTextarea, wn as createToast, Nr as createTooltip, nf as createTouchableRow, ei as createWizard, ye as initAccordion, xu as initAvatar, Ui as initBanner, rs as initBreadcrumb, So as initCheckbox, Ti as initCombobox, fc as initDisclosure, nn as initDrawer, Ol as initField, $l as initIconButton, Qc as initInput, Of as initKeyboardAvoider, ua as initMenu, Rt as initModal, N as initNavigation, Ks as initPagination, cr as initPopover, Ed as initPressable, Cs as initProgress, Ho as initRadio, Lc as initSelect, yp as initSheet, ro as initSlider, wc as initSpinner, Oa as initSwitch, $u as initTable, Fe as initTabs, dl as initTextarea, Tn as initToast, Pr as initTooltip, rf as initTouchableRow, ti as initWizard, K as prefersReducedMotion, oe as runMotion, we as startAccordionRuntime, Eu as startAvatarRuntime, Ji as startBannerRuntime, cs as startBreadcrumbRuntime, Do as startCheckboxRuntime, Ai as startComboboxRuntime, _c as startDisclosureRuntime, cn as startDrawerRuntime, Nl as startFieldRuntime, iu as startIconButtonRuntime, rl as startInputRuntime, Nf as startKeyboardAvoiderRuntime, ha as startMenuRuntime, Ut as startModalRuntime, F as startNavigationRuntime, Zs as startPaginationRuntime, pr as startPopoverRuntime, jd as startPressableRuntime, Os as startProgressRuntime, qo as startRadioRuntime, Hc as startSelectRuntime, wp as startSheetRuntime, co as startSliderRuntime, kc as startSpinnerRuntime, Na as startSwitchRuntime, id as startTableRuntime, Be as startTabsRuntime, gl as startTextareaRuntime, An as startToastRuntime, zr as startTooltipRuntime, lf as startTouchableRowRuntime, oi as startWizardRuntime, Te as stopAccordionRuntime, Du as stopAvatarRuntime, Yi as stopBannerRuntime, ls as stopBreadcrumbRuntime, Oo as stopCheckboxRuntime, ji as stopComboboxRuntime, vc as stopDisclosureRuntime, ln as stopDrawerRuntime, Pl as stopFieldRuntime, au as stopIconButtonRuntime, il as stopInputRuntime, Pf as stopKeyboardAvoiderRuntime, ga as stopMenuRuntime, Wt as stopModalRuntime, I as stopNavigationRuntime, Qs as stopPaginationRuntime, mr as stopPopoverRuntime, Md as stopPressableRuntime, ks as stopProgressRuntime, Jo as stopRadioRuntime, Uc as stopSelectRuntime, Tp as stopSheetRuntime, lo as stopSliderRuntime, Ac as stopSpinnerRuntime, Pa as stopSwitchRuntime, ad as stopTableRuntime, Ve as stopTabsRuntime, _l as stopTextareaRuntime, jn as stopToastRuntime, Br as stopTooltipRuntime, uf as stopTouchableRowRuntime, si as stopWizardRuntime, ee as subscribeReducedMotion, Ep as tokens };
|