@citrusworx/juiceui 0.8.0 → 0.9.1
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/README.md +54 -5
- package/dist/index.css +2600 -75
- package/dist/index.d.ts +14 -0
- package/dist/index.js +1192 -196
- package/dist/js/juice.d.ts +14 -0
- package/dist/js/src/breadcrumb/breadcrumb-runtime.d.ts +64 -0
- package/dist/js/src/checkbox/checkbox-runtime.d.ts +51 -0
- package/dist/js/src/pagination/pagination-runtime.d.ts +79 -0
- package/dist/js/src/progress/progress-runtime.d.ts +51 -0
- package/dist/js/src/radio/radio-runtime.d.ts +52 -0
- package/dist/js/src/slider/slider-runtime.d.ts +55 -0
- package/dist/js/src/switch/switch-runtime.d.ts +50 -0
- package/dist/themes/aquaflux.css +391 -0
- package/dist/themes/citrusmint.css +347 -0
- package/dist/themes/kiwipress.css +406 -0
- package/dist/themes/retro-afterburn.css +1701 -0
- package/dist/themes/retro-arcade-glow.css +1701 -0
- package/dist/themes/retro-boardwalk.css +1553 -0
- package/dist/themes/retro-denim-dial.css +1553 -0
- package/dist/themes/retro-forest-radio.css +1553 -0
- package/dist/themes/retro-orchard-club.css +1553 -0
- package/dist/themes/retro-poolside-pop.css +1553 -0
- package/dist/themes/retro-signal-garden.css +1553 -0
- package/dist/themes/retro-sunset-motel.css +1553 -0
- package/dist/themes/retro-violet-parlor.css +1553 -0
- package/dist/themes/tide.css +393 -0
- package/package.json +92 -2
package/dist/index.js
CHANGED
|
@@ -1627,17 +1627,17 @@ var tn = {
|
|
|
1627
1627
|
]), rn = (e) => Array.from(e), an = "juice-tooltip-root", on = A(), sn = /* @__PURE__ */ new WeakMap(), cn = (e) => e.trim().toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-+|-+$/g, "") || "tooltip", ln = (e) => M(e.getAttribute("aria-describedby")), un = (e, t) => {
|
|
1628
1628
|
let n = M(e);
|
|
1629
1629
|
return n.includes(t) ? n.join(" ") : [...n, t].join(" ");
|
|
1630
|
-
},
|
|
1630
|
+
}, dn = (e) => !e.hasAttribute("hidden"), fn = () => ct() || lt() || ut() || dt(), pn = (e) => {
|
|
1631
1631
|
let t = e.getAttribute("tooltip-root");
|
|
1632
1632
|
return t && nn.has(t) ? t : "top";
|
|
1633
|
-
},
|
|
1633
|
+
}, mn = (e) => {
|
|
1634
1634
|
switch (e) {
|
|
1635
1635
|
case "top": return "bottom";
|
|
1636
1636
|
case "bottom": return "top";
|
|
1637
1637
|
case "left": return "right";
|
|
1638
1638
|
case "right": return "left";
|
|
1639
1639
|
}
|
|
1640
|
-
},
|
|
1640
|
+
}, hn = (e, t, n, r, i) => {
|
|
1641
1641
|
switch (e) {
|
|
1642
1642
|
case "bottom": return {
|
|
1643
1643
|
top: t.bottom + i,
|
|
@@ -1656,7 +1656,7 @@ var tn = {
|
|
|
1656
1656
|
left: t.left - n - i
|
|
1657
1657
|
};
|
|
1658
1658
|
}
|
|
1659
|
-
},
|
|
1659
|
+
}, gn = (e, t, n, r, i) => {
|
|
1660
1660
|
let a = window.innerWidth, o = window.innerHeight;
|
|
1661
1661
|
switch (e) {
|
|
1662
1662
|
case "bottom": return t + i > o;
|
|
@@ -1664,31 +1664,31 @@ var tn = {
|
|
|
1664
1664
|
case "right": return n + r > a;
|
|
1665
1665
|
case "left": return n < 0;
|
|
1666
1666
|
}
|
|
1667
|
-
},
|
|
1667
|
+
}, _n = (e) => (e ?? "").split(/[,\s]+/).map((e) => e.trim()).filter(Boolean), vn = (e) => {
|
|
1668
1668
|
if (!(e instanceof HTMLElement) || e === document.documentElement || e === document.body) return !1;
|
|
1669
1669
|
let t = window.getComputedStyle(e);
|
|
1670
1670
|
if (t.transform !== "none" || t.perspective !== "none" || t.filter !== "none") return !0;
|
|
1671
1671
|
let n = t.getPropertyValue("backdrop-filter");
|
|
1672
|
-
return n && n !== "none" ||
|
|
1672
|
+
return n && n !== "none" || _n(t.willChange).some((e) => [
|
|
1673
1673
|
"transform",
|
|
1674
1674
|
"perspective",
|
|
1675
1675
|
"filter",
|
|
1676
1676
|
"backdrop-filter"
|
|
1677
|
-
].includes(e)) ? !0 :
|
|
1677
|
+
].includes(e)) ? !0 : _n(t.contain).some((e) => [
|
|
1678
1678
|
"paint",
|
|
1679
1679
|
"layout",
|
|
1680
1680
|
"strict",
|
|
1681
1681
|
"content"
|
|
1682
1682
|
].includes(e));
|
|
1683
|
-
},
|
|
1683
|
+
}, yn = (e) => {
|
|
1684
1684
|
let t = e.parentElement;
|
|
1685
1685
|
for (; t && t !== document.documentElement;) {
|
|
1686
|
-
if (
|
|
1686
|
+
if (vn(t)) return t;
|
|
1687
1687
|
t = t.parentElement;
|
|
1688
1688
|
}
|
|
1689
1689
|
return null;
|
|
1690
|
-
},
|
|
1691
|
-
let r =
|
|
1690
|
+
}, bn = (e, t, n) => {
|
|
1691
|
+
let r = yn(e);
|
|
1692
1692
|
if (!r) return {
|
|
1693
1693
|
top: t,
|
|
1694
1694
|
left: n
|
|
@@ -1698,7 +1698,7 @@ var tn = {
|
|
|
1698
1698
|
top: t - i.top,
|
|
1699
1699
|
left: n - i.left
|
|
1700
1700
|
};
|
|
1701
|
-
},
|
|
1701
|
+
}, xn = (e = {}) => {
|
|
1702
1702
|
if (typeof window > "u" || typeof document > "u") return {
|
|
1703
1703
|
destroy: () => {},
|
|
1704
1704
|
sync: () => {},
|
|
@@ -1730,7 +1730,7 @@ var tn = {
|
|
|
1730
1730
|
if (n instanceof HTMLElement && h(n)) return n;
|
|
1731
1731
|
let r = t.closest("[aria-controls]");
|
|
1732
1732
|
return r instanceof HTMLElement && h(r) ? r : t instanceof HTMLElement && h(t) ? t : null;
|
|
1733
|
-
}, _ = () => u().find(
|
|
1733
|
+
}, _ = () => u().find(dn) ?? null, v = (e) => {
|
|
1734
1734
|
if (e) {
|
|
1735
1735
|
if (p(e)) return e;
|
|
1736
1736
|
let t = d(e);
|
|
@@ -1769,8 +1769,8 @@ var tn = {
|
|
|
1769
1769
|
if (!n) return;
|
|
1770
1770
|
let i = m(e);
|
|
1771
1771
|
e.style.position = "fixed", e.style.right = "auto", e.style.bottom = "auto", e.style.margin = "0", i !== e && (i.style.margin = "0");
|
|
1772
|
-
let a =
|
|
1773
|
-
|
|
1772
|
+
let a = pn(e), o = n.getBoundingClientRect(), s = e.getBoundingClientRect(), c = s.width || e.offsetWidth, l = s.height || e.offsetHeight, u = a, { top: d, left: f } = hn(u, o, c, l, r);
|
|
1773
|
+
gn(u, d, f, c, l) && (u = mn(u), {top: d, left: f} = hn(u, o, c, l, r)), {top: d, left: f} = bn(e, d, f), e.style.top = `${d}px`, e.style.left = `${f}px`;
|
|
1774
1774
|
}, E = (e, t) => {
|
|
1775
1775
|
e.hidden !== !t && (e.hidden = !t);
|
|
1776
1776
|
}, D = () => {
|
|
@@ -1779,20 +1779,20 @@ var tn = {
|
|
|
1779
1779
|
D(), S(e), E(e, !1), w(e);
|
|
1780
1780
|
}, k = (e, n) => {
|
|
1781
1781
|
D(), u().concat(rn(document.querySelectorAll(t.rootSelector))).forEach((t) => {
|
|
1782
|
-
t === e || !
|
|
1782
|
+
t === e || !dn(t) || O(t);
|
|
1783
1783
|
}), C(e, n), S(e), n && x(n, e), E(e, !0), T(e, n);
|
|
1784
1784
|
}, A = (e) => {
|
|
1785
1785
|
let t = v(e);
|
|
1786
1786
|
if (!t) return;
|
|
1787
1787
|
let n = e && h(e) === t ? e : g(e ?? t);
|
|
1788
|
-
if (
|
|
1788
|
+
if (dn(t)) {
|
|
1789
1789
|
S(t), n && x(n, t), T(t, n);
|
|
1790
1790
|
return;
|
|
1791
1791
|
}
|
|
1792
1792
|
k(t, n);
|
|
1793
1793
|
}, j = (e) => {
|
|
1794
1794
|
let t = v(e);
|
|
1795
|
-
!t || !
|
|
1795
|
+
!t || !dn(t) || O(t);
|
|
1796
1796
|
}, M = (e) => {
|
|
1797
1797
|
if (D(), i <= 0) {
|
|
1798
1798
|
O(e);
|
|
@@ -1803,11 +1803,11 @@ var tn = {
|
|
|
1803
1803
|
}, i);
|
|
1804
1804
|
}, F = () => {
|
|
1805
1805
|
u().forEach((e) => {
|
|
1806
|
-
|
|
1806
|
+
dn(e) && T(e);
|
|
1807
1807
|
});
|
|
1808
1808
|
}, I = () => {
|
|
1809
1809
|
u().forEach((e) => {
|
|
1810
|
-
S(e),
|
|
1810
|
+
S(e), dn(e) && T(e);
|
|
1811
1811
|
});
|
|
1812
1812
|
}, L = (e) => {
|
|
1813
1813
|
if (!(e instanceof MouseEvent)) return;
|
|
@@ -1825,7 +1825,7 @@ var tn = {
|
|
|
1825
1825
|
if (r instanceof Node && n.contains(r) || !on(e)) return;
|
|
1826
1826
|
s === n && (s = null);
|
|
1827
1827
|
let i = h(n);
|
|
1828
|
-
!i || !
|
|
1828
|
+
!i || !dn(i) || c && h(c) === i || M(i);
|
|
1829
1829
|
}, z = (e) => {
|
|
1830
1830
|
let t = e.target;
|
|
1831
1831
|
if (!(t instanceof Element)) return;
|
|
@@ -1841,9 +1841,9 @@ var tn = {
|
|
|
1841
1841
|
if (r instanceof Node && n.contains(r) || !on(e)) return;
|
|
1842
1842
|
c === n && (c = null);
|
|
1843
1843
|
let i = h(n);
|
|
1844
|
-
!i || !
|
|
1844
|
+
!i || !dn(i) || s && h(s) === i || M(i);
|
|
1845
1845
|
}, V = (e) => {
|
|
1846
|
-
if (!(e instanceof KeyboardEvent) || e.key !== "Escape" ||
|
|
1846
|
+
if (!(e instanceof KeyboardEvent) || e.key !== "Escape" || fn() || e.defaultPrevented) return;
|
|
1847
1847
|
let t = _();
|
|
1848
1848
|
t && on(e) && (e.preventDefault(), e.stopPropagation(), O(t));
|
|
1849
1849
|
}, H = !1, ee = () => {
|
|
@@ -1874,17 +1874,17 @@ var tn = {
|
|
|
1874
1874
|
show: A,
|
|
1875
1875
|
hide: j
|
|
1876
1876
|
};
|
|
1877
|
-
},
|
|
1878
|
-
|
|
1879
|
-
},
|
|
1880
|
-
|
|
1877
|
+
}, Sn = (e = {}) => xn(e), Cn = null, wn = !1, Tn = null, En = () => {
|
|
1878
|
+
Tn &&= (document.removeEventListener("DOMContentLoaded", Tn), null);
|
|
1879
|
+
}, Dn = () => typeof window > "u" || typeof document > "u" ? null : (wn = !1, En(), Cn ? (Cn.sync(), Cn) : (Cn = xn(), Cn)), On = () => {
|
|
1880
|
+
wn = !0, En(), Cn?.destroy(), Cn = null;
|
|
1881
1881
|
};
|
|
1882
|
-
typeof window < "u" && typeof document < "u" && (document.readyState === "loading" ? (
|
|
1883
|
-
|
|
1884
|
-
}, document.addEventListener("DOMContentLoaded",
|
|
1882
|
+
typeof window < "u" && typeof document < "u" && (document.readyState === "loading" ? (Tn = () => {
|
|
1883
|
+
Tn = null, wn || Dn();
|
|
1884
|
+
}, document.addEventListener("DOMContentLoaded", Tn)) : Dn());
|
|
1885
1885
|
//#endregion
|
|
1886
1886
|
//#region src/js/src/wizard/wizard-runtime.ts
|
|
1887
|
-
var
|
|
1887
|
+
var kn = {
|
|
1888
1888
|
root: typeof document < "u" ? document : {},
|
|
1889
1889
|
shellSelector: "[wizard-shell]",
|
|
1890
1890
|
trackerSelector: "[step-tracker]",
|
|
@@ -1895,20 +1895,20 @@ var On = {
|
|
|
1895
1895
|
nextSelector: "[wizard-next]",
|
|
1896
1896
|
prevSelector: "[wizard-prev]",
|
|
1897
1897
|
completeSelector: "[wizard-complete]"
|
|
1898
|
-
},
|
|
1898
|
+
}, An = (e) => Array.from(e), jn = "juice-wizard-step", Mn = "juice-wizard-page", Nn = A(), Pn = (e) => e instanceof HTMLButtonElement ? !0 : e instanceof HTMLInputElement ? e.type === "button" || e.type === "submit" : e instanceof HTMLAnchorElement ? e.hasAttribute("href") : !1, Fn = (e) => e.trim().toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-+|-+$/g, "") || "wizard", In = (e, t) => {
|
|
1899
1899
|
let n = e.compareDocumentPosition(t);
|
|
1900
1900
|
return n & Node.DOCUMENT_POSITION_FOLLOWING ? -1 : n & Node.DOCUMENT_POSITION_PRECEDING ? 1 : 0;
|
|
1901
|
-
},
|
|
1901
|
+
}, Ln = (e) => {
|
|
1902
1902
|
let t = (e.getAttribute("wizard-shell") || "").trim().toLowerCase();
|
|
1903
1903
|
return t === "linear" ? "linear" : t === "free" ? "free" : "default";
|
|
1904
|
-
},
|
|
1904
|
+
}, Rn = (e) => e.getAttribute("data-step") || e.getAttribute("name") || e.getAttribute("step-page") || (e.id ? e.id : null), zn = (e) => {
|
|
1905
1905
|
let t = /* @__PURE__ */ new Set(), n = e.getAttribute("data-step");
|
|
1906
1906
|
n && t.add(n);
|
|
1907
1907
|
let r = e.getAttribute("name");
|
|
1908
1908
|
r && t.add(r);
|
|
1909
1909
|
let i = e.getAttribute("step-page");
|
|
1910
1910
|
return i && t.add(i), e.id && t.add(e.id), t;
|
|
1911
|
-
},
|
|
1911
|
+
}, Bn = (e, t, n) => t === n ? !0 : e === "linear" ? !1 : e === "free" ? !0 : t < n, Vn = (e) => (e instanceof HTMLButtonElement || e instanceof HTMLInputElement) && e.disabled ? !0 : e.getAttribute("aria-disabled") === "true", Hn = (e = {}) => {
|
|
1912
1912
|
if (typeof window > "u" || typeof document > "u") return {
|
|
1913
1913
|
destroy: () => {},
|
|
1914
1914
|
sync: () => {},
|
|
@@ -1918,22 +1918,22 @@ var On = {
|
|
|
1918
1918
|
current: () => 0
|
|
1919
1919
|
};
|
|
1920
1920
|
let t = {
|
|
1921
|
-
...
|
|
1921
|
+
...kn,
|
|
1922
1922
|
...e
|
|
1923
|
-
}, n = t.root ?? document, r = n, i = () =>
|
|
1923
|
+
}, n = t.root ?? document, r = n, i = () => An(n.querySelectorAll(t.shellSelector)), a = (e) => {
|
|
1924
1924
|
if (!e) return null;
|
|
1925
1925
|
let n = e.closest(t.shellSelector);
|
|
1926
1926
|
return n instanceof HTMLElement ? n : null;
|
|
1927
1927
|
}, o = (e, t) => a(e) === t, s = (e) => {
|
|
1928
1928
|
let n = e.querySelector(t.stepsSelector), r = e.querySelector(t.trackerSelector), i = n ?? r ?? e, a = /* @__PURE__ */ new Set(), s = [];
|
|
1929
|
-
return
|
|
1929
|
+
return An(i.querySelectorAll(t.stepSelector)).forEach((n) => {
|
|
1930
1930
|
n instanceof HTMLElement && n.matches(t.stepSelector) && (!o(n, e) || a.has(n) || n.closest(t.pageSelector) || (a.add(n), s.push(n)));
|
|
1931
|
-
}), s.sort(
|
|
1932
|
-
}, c = (e) =>
|
|
1931
|
+
}), s.sort(In);
|
|
1932
|
+
}, c = (e) => An(e.querySelectorAll(t.pageSelector)).filter((t) => o(t, e)).sort(In), l = (e) => An(e.querySelectorAll(t.navSelector)).filter((t) => o(t, e)), u = (e, t) => An(e.querySelectorAll(t)).filter((t) => o(t, e)), d = (e) => {
|
|
1933
1933
|
let n = /* @__PURE__ */ new Set(), r = [], i = (t) => {
|
|
1934
1934
|
t instanceof HTMLElement && (n.has(t) || !e.contains(t) || !o(t, a(e) ?? e) || (n.add(t), r.push(t)));
|
|
1935
1935
|
};
|
|
1936
|
-
return
|
|
1936
|
+
return An(e.querySelectorAll("button")).forEach(i), An(e.querySelectorAll(`${t.prevSelector}, ${t.nextSelector}`)).forEach(i), r.sort(In);
|
|
1937
1937
|
}, f = (e) => {
|
|
1938
1938
|
let n = u(e, t.prevSelector);
|
|
1939
1939
|
if (n.length > 0) return n;
|
|
@@ -1956,9 +1956,9 @@ var On = {
|
|
|
1956
1956
|
let n = e.querySelector(`#${j(a)}`);
|
|
1957
1957
|
if (n && n.matches(t.pageSelector) && o(n, e)) return n;
|
|
1958
1958
|
}
|
|
1959
|
-
let l =
|
|
1959
|
+
let l = Rn(n);
|
|
1960
1960
|
if (l) {
|
|
1961
|
-
let e = r.find((e) =>
|
|
1961
|
+
let e = r.find((e) => zn(e).has(l));
|
|
1962
1962
|
if (e) return e;
|
|
1963
1963
|
}
|
|
1964
1964
|
let u = i.indexOf(n);
|
|
@@ -1969,9 +1969,9 @@ var On = {
|
|
|
1969
1969
|
let a = r.indexOf(t);
|
|
1970
1970
|
return a >= 0 ? n[a] ?? null : null;
|
|
1971
1971
|
}, _ = (e, t) => {
|
|
1972
|
-
let n = s(e), r = c(e), i = n.findIndex((e) => e.id === t ? !0 :
|
|
1972
|
+
let n = s(e), r = c(e), i = n.findIndex((e) => e.id === t ? !0 : zn(e).has(t));
|
|
1973
1973
|
if (i >= 0) return i;
|
|
1974
|
-
let a = r.findIndex((e) => e.id === t ? !0 :
|
|
1974
|
+
let a = r.findIndex((e) => e.id === t ? !0 : zn(e).has(t));
|
|
1975
1975
|
if (a >= 0) {
|
|
1976
1976
|
let t = g(e, r[a]), i = t ? n.indexOf(t) : a;
|
|
1977
1977
|
return i >= 0 ? i : a;
|
|
@@ -1996,13 +1996,13 @@ var On = {
|
|
|
1996
1996
|
return 0;
|
|
1997
1997
|
}, b = 0, x = (e) => (b += 1, `${e}-${b}`), S = (e) => {
|
|
1998
1998
|
let t = e.getAttribute("name");
|
|
1999
|
-
return t ?
|
|
1999
|
+
return t ? Fn(t) : null;
|
|
2000
2000
|
}, C = (e) => {
|
|
2001
2001
|
let n = e.querySelector(t.stepsSelector);
|
|
2002
2002
|
!n || !o(n, e) || n.tagName === "UL" || n.tagName === "OL" || n.getAttribute("role") || n.setAttribute("role", "list");
|
|
2003
2003
|
}, w = (e, t, n, r, i) => {
|
|
2004
2004
|
let a = s(e), o = S(e), l = a.length > 1 || c(e).length > 1 ? `-${r + 1}` : "";
|
|
2005
|
-
t.id ||= o ? `${o}-step${l}` : x(
|
|
2005
|
+
t.id ||= o ? `${o}-step${l}` : x(jn), Pn(t) || (i && t.getAttribute("tabindex") !== "0" && t.setAttribute("tabindex", "0"), !i && t.getAttribute("tabindex") === "0" && t.removeAttribute("tabindex")), n && (n.id ||= o ? `${o}-page${l}` : x(Mn), 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));
|
|
2006
2006
|
}, T = (e, t) => {
|
|
2007
2007
|
(e instanceof HTMLButtonElement || e instanceof HTMLInputElement) && e.disabled !== t && (e.disabled = t);
|
|
2008
2008
|
let n = String(t);
|
|
@@ -2014,11 +2014,11 @@ var On = {
|
|
|
2014
2014
|
}, D = (e, t) => {
|
|
2015
2015
|
let n = s(e), r = c(e);
|
|
2016
2016
|
if (n.length === 0 && r.length === 0) return;
|
|
2017
|
-
let i = Math.min(Math.max(0, t), v(e)), a =
|
|
2017
|
+
let i = Math.min(Math.max(0, t), v(e)), a = Ln(e);
|
|
2018
2018
|
C(e), n.forEach((t, n) => {
|
|
2019
2019
|
let r = n < i ? "completed" : n === i ? "active" : "pending";
|
|
2020
2020
|
t.getAttribute("step") !== r && t.setAttribute("step", r), n === i ? t.getAttribute("aria-current") !== "step" && t.setAttribute("aria-current", "step") : t.hasAttribute("aria-current") && t.removeAttribute("aria-current");
|
|
2021
|
-
let o =
|
|
2021
|
+
let o = Bn(a, n, i);
|
|
2022
2022
|
w(e, t, h(e, t), n, o), o ? t.getAttribute("aria-disabled") === "true" && t.removeAttribute("aria-disabled") : t.getAttribute("aria-disabled") !== "true" && t.setAttribute("aria-disabled", "true");
|
|
2023
2023
|
});
|
|
2024
2024
|
let o = n[i] ?? null, l = o ? h(e, o) : r[i] ?? null;
|
|
@@ -2026,7 +2026,7 @@ var On = {
|
|
|
2026
2026
|
let a = g(e, t);
|
|
2027
2027
|
E(t, (a ? n.indexOf(a) : r.indexOf(t)) === i), t.getAttribute("role") || t.setAttribute("role", "region");
|
|
2028
2028
|
});
|
|
2029
|
-
let u = e.querySelector("[wizard-content]"), d = l &&
|
|
2029
|
+
let u = e.querySelector("[wizard-content]"), d = l && Rn(l) || o && Rn(o);
|
|
2030
2030
|
u && d && u.getAttribute("data-step") !== d && u.setAttribute("data-step", d);
|
|
2031
2031
|
let _ = i <= 0, y = i >= v(e);
|
|
2032
2032
|
f(e).forEach((e) => T(e, _)), p(e).forEach((e) => T(e, y)), m(e).forEach((e) => T(e, !y));
|
|
@@ -2078,28 +2078,28 @@ var On = {
|
|
|
2078
2078
|
let t = a(e);
|
|
2079
2079
|
if (!t) return;
|
|
2080
2080
|
let n = s(t).indexOf(e);
|
|
2081
|
-
n < 0 ||
|
|
2081
|
+
n < 0 || Bn(Ln(t), n, y(t)) && D(t, n);
|
|
2082
2082
|
}, R = (e) => {
|
|
2083
2083
|
let n = e.target;
|
|
2084
2084
|
if (!(n instanceof Element)) return;
|
|
2085
2085
|
let r = I(n), i = n instanceof HTMLElement ? n.closest(`${t.nextSelector}, ${t.prevSelector}, ${t.completeSelector}, button`) : null;
|
|
2086
|
-
if (i instanceof HTMLElement &&
|
|
2086
|
+
if (i instanceof HTMLElement && Vn(i) && (r === "next" || r === "prev" || r === "complete")) return;
|
|
2087
2087
|
if (r === "complete") {
|
|
2088
|
-
|
|
2088
|
+
Nn(e);
|
|
2089
2089
|
return;
|
|
2090
2090
|
}
|
|
2091
2091
|
if (r === "next") {
|
|
2092
|
-
if (!
|
|
2092
|
+
if (!Nn(e)) return;
|
|
2093
2093
|
M(n);
|
|
2094
2094
|
return;
|
|
2095
2095
|
}
|
|
2096
2096
|
if (r === "prev") {
|
|
2097
|
-
if (!
|
|
2097
|
+
if (!Nn(e)) return;
|
|
2098
2098
|
N(n);
|
|
2099
2099
|
return;
|
|
2100
2100
|
}
|
|
2101
2101
|
let a = F(n);
|
|
2102
|
-
a &&
|
|
2102
|
+
a && Nn(e) && L(a);
|
|
2103
2103
|
}, z = (e) => {
|
|
2104
2104
|
if (!(e instanceof KeyboardEvent) || e.key !== "Enter" && e.key !== " ") return;
|
|
2105
2105
|
let t = e.target;
|
|
@@ -2107,12 +2107,12 @@ var On = {
|
|
|
2107
2107
|
let n = I(t);
|
|
2108
2108
|
if (n === "next" || n === "prev") {
|
|
2109
2109
|
let r = t.closest("button, [wizard-next], [wizard-prev]");
|
|
2110
|
-
if (r instanceof HTMLElement &&
|
|
2110
|
+
if (r instanceof HTMLElement && Pn(r) || !Nn(e)) return;
|
|
2111
2111
|
e.preventDefault(), n === "next" ? M(t) : N(t);
|
|
2112
2112
|
return;
|
|
2113
2113
|
}
|
|
2114
2114
|
let r = F(t);
|
|
2115
|
-
!r ||
|
|
2115
|
+
!r || Pn(r) || Nn(e) && (e.preventDefault(), L(r));
|
|
2116
2116
|
}, B = !1, V = () => {
|
|
2117
2117
|
B || (B = !0, requestAnimationFrame(() => {
|
|
2118
2118
|
B = !1, P();
|
|
@@ -2143,52 +2143,52 @@ var On = {
|
|
|
2143
2143
|
goTo: A,
|
|
2144
2144
|
current: k
|
|
2145
2145
|
};
|
|
2146
|
-
},
|
|
2147
|
-
|
|
2148
|
-
},
|
|
2149
|
-
|
|
2146
|
+
}, Un = (e = {}) => Hn(e), Wn = null, Gn = !1, Kn = null, qn = () => {
|
|
2147
|
+
Kn &&= (document.removeEventListener("DOMContentLoaded", Kn), null);
|
|
2148
|
+
}, Jn = () => typeof window > "u" || typeof document > "u" ? null : (Gn = !1, qn(), Wn ? (Wn.sync(), Wn) : (Wn = Hn(), Wn)), Yn = () => {
|
|
2149
|
+
Gn = !0, qn(), Wn?.destroy(), Wn = null;
|
|
2150
2150
|
};
|
|
2151
|
-
typeof window < "u" && typeof document < "u" && (document.readyState === "loading" ? (
|
|
2152
|
-
|
|
2153
|
-
}, document.addEventListener("DOMContentLoaded",
|
|
2151
|
+
typeof window < "u" && typeof document < "u" && (document.readyState === "loading" ? (Kn = () => {
|
|
2152
|
+
Kn = null, Gn || Jn();
|
|
2153
|
+
}, document.addEventListener("DOMContentLoaded", Kn)) : Jn());
|
|
2154
2154
|
//#endregion
|
|
2155
2155
|
//#region src/js/src/combobox/combobox-runtime.ts
|
|
2156
|
-
var
|
|
2156
|
+
var Xn = {
|
|
2157
2157
|
root: typeof document < "u" ? document : {},
|
|
2158
2158
|
rootSelector: "[combobox]",
|
|
2159
2159
|
inputSelector: "[combobox-input]",
|
|
2160
2160
|
triggerSelector: "[combobox-trigger]",
|
|
2161
2161
|
listSelector: "[combobox-list]",
|
|
2162
2162
|
optionSelector: "[combobox-option]"
|
|
2163
|
-
},
|
|
2163
|
+
}, Zn = (e) => Array.from(e), Qn = "juice-combobox-list", $n = "juice-combobox-option", er = 0, tr = (e) => {
|
|
2164
2164
|
let t = "";
|
|
2165
2165
|
do
|
|
2166
|
-
|
|
2166
|
+
er += 1, t = `${e}-${er}`;
|
|
2167
2167
|
while (typeof document < "u" && document.getElementById(t));
|
|
2168
2168
|
return t;
|
|
2169
|
-
},
|
|
2170
|
-
if (
|
|
2169
|
+
}, nr = (e, t, n) => e.id ? e.id : t && !document.getElementById(t) ? (e.id = t, t) : (e.id = tr(n), e.id), X = A(), rr = (e) => e.trim().toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-+|-+$/g, "") || "combobox", ir = (e) => e instanceof HTMLButtonElement ? !0 : e instanceof HTMLAnchorElement ? e.hasAttribute("href") : !1, ar = (e) => e instanceof HTMLInputElement || e instanceof HTMLTextAreaElement, or = (e) => ar(e) ? e.value : e.textContent ?? "", sr = (e, t) => {
|
|
2170
|
+
if (ar(e)) {
|
|
2171
2171
|
e.value = t;
|
|
2172
2172
|
return;
|
|
2173
2173
|
}
|
|
2174
2174
|
e.textContent = t;
|
|
2175
|
-
},
|
|
2175
|
+
}, cr = (e) => e instanceof HTMLInputElement || e instanceof HTMLTextAreaElement ? e.disabled : e.getAttribute("aria-disabled") === "true", lr = (e) => e.isComposing || e.keyCode === 229, ur = () => ct() || lt() || ut(), dr = () => ({
|
|
2176
2176
|
destroy: () => {},
|
|
2177
2177
|
sync: () => {},
|
|
2178
2178
|
open: () => {},
|
|
2179
2179
|
close: () => {},
|
|
2180
2180
|
toggle: () => {},
|
|
2181
2181
|
select: () => {}
|
|
2182
|
-
}),
|
|
2183
|
-
if (typeof window > "u" || typeof document > "u") return
|
|
2182
|
+
}), fr = (e = {}) => {
|
|
2183
|
+
if (typeof window > "u" || typeof document > "u") return dr();
|
|
2184
2184
|
let t = {
|
|
2185
|
-
...
|
|
2185
|
+
...Xn,
|
|
2186
2186
|
...e
|
|
2187
|
-
}, n = t.root ?? document, r = () =>
|
|
2187
|
+
}, n = t.root ?? document, r = () => Zn(n.querySelectorAll(t.rootSelector)), i = (e) => {
|
|
2188
2188
|
if (!e) return null;
|
|
2189
2189
|
let n = e.closest(t.rootSelector);
|
|
2190
2190
|
return n instanceof HTMLElement ? n : null;
|
|
2191
|
-
}, a = (e) => e?.matches(t.rootSelector) ? n instanceof Document ? !0 : n instanceof Node ? n.contains(e) : r().includes(e) : !1, o = (e) =>
|
|
2191
|
+
}, a = (e) => e?.matches(t.rootSelector) ? n instanceof Document ? !0 : n instanceof Node ? n.contains(e) : r().includes(e) : !1, o = (e) => Zn(e.querySelectorAll(t.inputSelector)).find((t) => i(t) === e) ?? null, s = (e) => Zn(e.querySelectorAll(t.listSelector)).find((t) => i(t) === e) ?? null, c = (e) => Zn(e.querySelectorAll(t.triggerSelector)).find((t) => i(t) === e) ?? null, l = (e) => Zn((s(e) ?? e).querySelectorAll(t.optionSelector)).filter((t) => i(t) === e), u = (e) => {
|
|
2192
2192
|
let t = s(e);
|
|
2193
2193
|
return !!(t && !t.hasAttribute("hidden"));
|
|
2194
2194
|
}, d = (e) => l(e).filter((e) => !e.hasAttribute("hidden")), f = (e) => d(e).find((e) => e.getAttribute("combobox-option") === "active") ?? null, p = (e) => {
|
|
@@ -2200,13 +2200,13 @@ var Yn = {
|
|
|
2200
2200
|
return r().find(u) ?? r()[0] ?? null;
|
|
2201
2201
|
}, m = (e) => {
|
|
2202
2202
|
let t = e.getAttribute("name");
|
|
2203
|
-
return t ?
|
|
2203
|
+
return t ? rr(t) : e.id ? rr(e.id) : null;
|
|
2204
2204
|
}, h = (e, t) => {
|
|
2205
2205
|
if (!t || (e.textContent ?? "").trim().toLowerCase().includes(t)) return !0;
|
|
2206
2206
|
let n = e.getAttribute("data-value");
|
|
2207
2207
|
return n != null && n.toLowerCase().includes(t);
|
|
2208
2208
|
}, g = (e) => {
|
|
2209
|
-
let t = o(e), n = t ?
|
|
2209
|
+
let t = o(e), n = t ? or(t).trim().toLowerCase() : "";
|
|
2210
2210
|
if (l(e).forEach((e) => {
|
|
2211
2211
|
let t = h(e, n);
|
|
2212
2212
|
e.hidden !== !t && (e.hidden = !t);
|
|
@@ -2248,20 +2248,20 @@ var Yn = {
|
|
|
2248
2248
|
let t = o(e), n = s(e), r = c(e), i = l(e);
|
|
2249
2249
|
if (!t || !n) return;
|
|
2250
2250
|
let a = m(e);
|
|
2251
|
-
t.getAttribute("role") !== "combobox" && t.setAttribute("role", "combobox"), t.getAttribute("aria-autocomplete") !== "list" && t.setAttribute("aria-autocomplete", "list"),
|
|
2252
|
-
|
|
2253
|
-
}), r && (
|
|
2251
|
+
t.getAttribute("role") !== "combobox" && t.setAttribute("role", "combobox"), t.getAttribute("aria-autocomplete") !== "list" && t.setAttribute("aria-autocomplete", "list"), nr(n, a ? `${a}-list` : null, Qn), n.getAttribute("role") !== "listbox" && n.setAttribute("role", "listbox"), t.getAttribute("aria-controls") !== n.id && t.setAttribute("aria-controls", n.id), i.forEach((e, t) => {
|
|
2252
|
+
nr(e, a ? `${a}-option-${t + 1}` : null, $n), e.getAttribute("role") !== "option" && e.setAttribute("role", "option");
|
|
2253
|
+
}), r && (ir(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")), v(e, u(e));
|
|
2254
2254
|
}, S = (e) => {
|
|
2255
2255
|
x(e), y(e, !1), v(e, !1), b(e, null), _(e);
|
|
2256
2256
|
}, C = (e) => {
|
|
2257
|
-
r().concat(
|
|
2257
|
+
r().concat(Zn(document.querySelectorAll(t.rootSelector))).forEach((t) => {
|
|
2258
2258
|
t === e || !u(t) || S(t);
|
|
2259
2259
|
}), x(e), g(e), y(e, !0), v(e, !0);
|
|
2260
2260
|
}, w = (e) => {
|
|
2261
2261
|
let t = p(e);
|
|
2262
2262
|
if (!t) return;
|
|
2263
2263
|
let n = o(t);
|
|
2264
|
-
if (!(!n ||
|
|
2264
|
+
if (!(!n || cr(n))) {
|
|
2265
2265
|
if (u(t)) {
|
|
2266
2266
|
x(t), g(t), v(t, !0);
|
|
2267
2267
|
return;
|
|
@@ -2284,7 +2284,7 @@ var Yn = {
|
|
|
2284
2284
|
let t = i(e);
|
|
2285
2285
|
if (!t || !a(t)) return;
|
|
2286
2286
|
let n = o(t);
|
|
2287
|
-
!n ||
|
|
2287
|
+
!n || cr(n) || (x(t), sr(n, e.hasAttribute("data-value") ? e.getAttribute("data-value") ?? "" : (e.textContent ?? "").trim()), l(t).forEach((t) => {
|
|
2288
2288
|
let n = String(t === e);
|
|
2289
2289
|
t.getAttribute("aria-selected") !== n && t.setAttribute("aria-selected", n);
|
|
2290
2290
|
}), b(t, e), S(t));
|
|
@@ -2333,12 +2333,12 @@ var Yn = {
|
|
|
2333
2333
|
if (n && a(n)) {
|
|
2334
2334
|
let r = j(t, n);
|
|
2335
2335
|
if (r) {
|
|
2336
|
-
if (!
|
|
2336
|
+
if (!X(e)) return;
|
|
2337
2337
|
D(r);
|
|
2338
2338
|
return;
|
|
2339
2339
|
}
|
|
2340
2340
|
if (M(t, n)) {
|
|
2341
|
-
if (!
|
|
2341
|
+
if (!X(e)) return;
|
|
2342
2342
|
E(n);
|
|
2343
2343
|
let t = o(n);
|
|
2344
2344
|
u(n) && t && document.activeElement !== t && t.focus();
|
|
@@ -2347,7 +2347,7 @@ var Yn = {
|
|
|
2347
2347
|
return;
|
|
2348
2348
|
}
|
|
2349
2349
|
let s = r().filter(u);
|
|
2350
|
-
s.length !== 0 &&
|
|
2350
|
+
s.length !== 0 && X(e) && s.forEach((e) => S(e));
|
|
2351
2351
|
}, F = (e) => {
|
|
2352
2352
|
let t = e.target;
|
|
2353
2353
|
if (!(t instanceof Element)) return;
|
|
@@ -2359,7 +2359,7 @@ var Yn = {
|
|
|
2359
2359
|
let n = i(t);
|
|
2360
2360
|
if (!n || !a(n)) return;
|
|
2361
2361
|
let r = N(t, n);
|
|
2362
|
-
!r ||
|
|
2362
|
+
!r || cr(r) || X(e) && w(n);
|
|
2363
2363
|
}, L = (e) => {
|
|
2364
2364
|
if (!(e instanceof FocusEvent)) return;
|
|
2365
2365
|
let t = e.target;
|
|
@@ -2367,44 +2367,44 @@ var Yn = {
|
|
|
2367
2367
|
let n = i(t);
|
|
2368
2368
|
if (!n || !a(n) || !u(n) || !N(t, n)) return;
|
|
2369
2369
|
let r = e.relatedTarget;
|
|
2370
|
-
r instanceof Node && n.contains(r) ||
|
|
2370
|
+
r instanceof Node && n.contains(r) || X(e) && S(n);
|
|
2371
2371
|
}, R = (e) => {
|
|
2372
2372
|
let t = e.target;
|
|
2373
2373
|
if (!(t instanceof Element)) return;
|
|
2374
2374
|
let n = i(t);
|
|
2375
2375
|
if (!n || !a(n)) return;
|
|
2376
2376
|
let r = N(t, n);
|
|
2377
|
-
!r ||
|
|
2377
|
+
!r || cr(r) || X(e) && w(n);
|
|
2378
2378
|
}, z = (e) => {
|
|
2379
|
-
if (!(e instanceof KeyboardEvent) ||
|
|
2379
|
+
if (!(e instanceof KeyboardEvent) || lr(e)) return;
|
|
2380
2380
|
let t = e.target;
|
|
2381
2381
|
if (!(t instanceof Element)) return;
|
|
2382
2382
|
let n = i(t);
|
|
2383
2383
|
if (!n || !a(n)) return;
|
|
2384
2384
|
let r = N(t, n), s = M(t, n);
|
|
2385
|
-
if (!r && !s || r &&
|
|
2385
|
+
if (!r && !s || r && cr(r)) return;
|
|
2386
2386
|
if (e.key === "Escape") {
|
|
2387
|
-
if (!u(n) ||
|
|
2387
|
+
if (!u(n) || ur() || e.defaultPrevented || !X(e)) return;
|
|
2388
2388
|
e.preventDefault(), e.stopPropagation(), T(n);
|
|
2389
2389
|
return;
|
|
2390
2390
|
}
|
|
2391
2391
|
if (e.key === "Tab") {
|
|
2392
|
-
if (!u(n) || !
|
|
2392
|
+
if (!u(n) || !X(e)) return;
|
|
2393
2393
|
T(n);
|
|
2394
2394
|
return;
|
|
2395
2395
|
}
|
|
2396
2396
|
if (e.key === "ArrowDown") {
|
|
2397
|
-
if (!
|
|
2397
|
+
if (!X(e)) return;
|
|
2398
2398
|
e.preventDefault(), u(n) || w(n), s && !r && o(n)?.focus(), k(n, (e) => e < 0 ? 0 : e + 1);
|
|
2399
2399
|
return;
|
|
2400
2400
|
}
|
|
2401
2401
|
if (e.key === "ArrowUp") {
|
|
2402
|
-
if (!
|
|
2402
|
+
if (!X(e)) return;
|
|
2403
2403
|
e.preventDefault(), u(n) || w(n), s && !r && o(n)?.focus(), k(n, (e, t) => e < 0 ? t - 1 : e - 1);
|
|
2404
2404
|
return;
|
|
2405
2405
|
}
|
|
2406
|
-
if (s && !r && !
|
|
2407
|
-
if (!
|
|
2406
|
+
if (s && !r && !ir(s) && (e.key === "Enter" || e.key === " ")) {
|
|
2407
|
+
if (!X(e)) return;
|
|
2408
2408
|
e.preventDefault(), E(n);
|
|
2409
2409
|
let t = o(n);
|
|
2410
2410
|
u(n) && t && document.activeElement !== t && t.focus();
|
|
@@ -2412,18 +2412,18 @@ var Yn = {
|
|
|
2412
2412
|
}
|
|
2413
2413
|
if (!r || !u(n)) return;
|
|
2414
2414
|
if (e.key === "Home") {
|
|
2415
|
-
if (!
|
|
2415
|
+
if (!X(e)) return;
|
|
2416
2416
|
e.preventDefault(), k(n, () => 0);
|
|
2417
2417
|
return;
|
|
2418
2418
|
}
|
|
2419
2419
|
if (e.key === "End") {
|
|
2420
|
-
if (!
|
|
2420
|
+
if (!X(e)) return;
|
|
2421
2421
|
e.preventDefault(), k(n, (e, t) => t - 1);
|
|
2422
2422
|
return;
|
|
2423
2423
|
}
|
|
2424
2424
|
if (e.key !== "Enter") return;
|
|
2425
2425
|
let c = f(n);
|
|
2426
|
-
c &&
|
|
2426
|
+
c && X(e) && (e.preventDefault(), D(c));
|
|
2427
2427
|
}, B = !1, V = () => {
|
|
2428
2428
|
B || (B = !0, requestAnimationFrame(() => {
|
|
2429
2429
|
B = !1, A();
|
|
@@ -2455,24 +2455,24 @@ var Yn = {
|
|
|
2455
2455
|
toggle: E,
|
|
2456
2456
|
select: O
|
|
2457
2457
|
};
|
|
2458
|
-
},
|
|
2459
|
-
|
|
2460
|
-
},
|
|
2461
|
-
|
|
2458
|
+
}, pr = (e = {}) => fr(e), mr = null, hr = !1, gr = null, _r = () => {
|
|
2459
|
+
gr &&= (document.removeEventListener("DOMContentLoaded", gr), null);
|
|
2460
|
+
}, vr = () => typeof window > "u" || typeof document > "u" ? null : (hr = !1, _r(), mr ? (mr.sync(), mr) : (mr = fr(), mr)), yr = () => {
|
|
2461
|
+
hr = !0, _r(), mr?.destroy(), mr = null;
|
|
2462
2462
|
};
|
|
2463
|
-
typeof window < "u" && typeof document < "u" && (document.readyState === "loading" ? (
|
|
2464
|
-
|
|
2465
|
-
}, document.addEventListener("DOMContentLoaded",
|
|
2463
|
+
typeof window < "u" && typeof document < "u" && (document.readyState === "loading" ? (gr = () => {
|
|
2464
|
+
gr = null, hr || vr();
|
|
2465
|
+
}, document.addEventListener("DOMContentLoaded", gr)) : vr());
|
|
2466
2466
|
//#endregion
|
|
2467
2467
|
//#region src/js/src/banner/banner-runtime.ts
|
|
2468
|
-
var
|
|
2468
|
+
var br = {
|
|
2469
2469
|
root: typeof document < "u" ? document : {},
|
|
2470
2470
|
bannerSelector: "[banner]",
|
|
2471
2471
|
closeSelector: "[banner-close]"
|
|
2472
|
-
},
|
|
2472
|
+
}, xr = "juice-banner:", Sr = (e) => Array.from(e), Cr = A(), wr = (e) => e instanceof HTMLButtonElement ? !0 : e instanceof HTMLAnchorElement ? e.hasAttribute("href") : !1, Tr = (e) => !e.hasAttribute("hidden"), Er = (e) => {
|
|
2473
2473
|
let t = e.getAttribute("banner-tone");
|
|
2474
2474
|
return t === "error" || t === "warning";
|
|
2475
|
-
},
|
|
2475
|
+
}, Dr = (e) => {
|
|
2476
2476
|
let t = e.getAttribute("banner-persist");
|
|
2477
2477
|
if (t !== "session" && t !== "local") return null;
|
|
2478
2478
|
let n = e.getAttribute("name")?.trim(), r = e.id?.trim(), i = n || r;
|
|
@@ -2480,18 +2480,18 @@ var yr = {
|
|
|
2480
2480
|
let a = t === "local" ? typeof localStorage > "u" ? null : localStorage : typeof sessionStorage > "u" ? null : sessionStorage;
|
|
2481
2481
|
return a ? {
|
|
2482
2482
|
storage: a,
|
|
2483
|
-
key: `${
|
|
2483
|
+
key: `${xr}${i}`
|
|
2484
2484
|
} : null;
|
|
2485
|
-
},
|
|
2486
|
-
let t =
|
|
2485
|
+
}, Or = (e) => {
|
|
2486
|
+
let t = Dr(e);
|
|
2487
2487
|
if (!t) return !1;
|
|
2488
2488
|
try {
|
|
2489
2489
|
return t.storage.getItem(t.key) === "1";
|
|
2490
2490
|
} catch {
|
|
2491
2491
|
return !1;
|
|
2492
2492
|
}
|
|
2493
|
-
},
|
|
2494
|
-
let n =
|
|
2493
|
+
}, kr = (e, t) => {
|
|
2494
|
+
let n = Dr(e);
|
|
2495
2495
|
if (n) try {
|
|
2496
2496
|
if (t) {
|
|
2497
2497
|
n.storage.setItem(n.key, "1");
|
|
@@ -2499,7 +2499,7 @@ var yr = {
|
|
|
2499
2499
|
}
|
|
2500
2500
|
n.storage.removeItem(n.key);
|
|
2501
2501
|
} catch {}
|
|
2502
|
-
},
|
|
2502
|
+
}, Ar = (e = {}) => {
|
|
2503
2503
|
if (typeof window > "u" || typeof document > "u") return {
|
|
2504
2504
|
destroy: () => {},
|
|
2505
2505
|
sync: () => {},
|
|
@@ -2507,9 +2507,9 @@ var yr = {
|
|
|
2507
2507
|
dismiss: () => {}
|
|
2508
2508
|
};
|
|
2509
2509
|
let t = {
|
|
2510
|
-
...
|
|
2510
|
+
...br,
|
|
2511
2511
|
...e
|
|
2512
|
-
}, n = t.root ?? document, r = n, i = () =>
|
|
2512
|
+
}, n = t.root ?? document, r = n, i = () => Sr(n.querySelectorAll(t.bannerSelector)), a = (e) => {
|
|
2513
2513
|
if (!e) return null;
|
|
2514
2514
|
let n = e.closest(t.bannerSelector);
|
|
2515
2515
|
return n instanceof HTMLElement ? n : null;
|
|
@@ -2520,25 +2520,25 @@ var yr = {
|
|
|
2520
2520
|
if (t && o(t)) return t;
|
|
2521
2521
|
}
|
|
2522
2522
|
let t = i().filter(o);
|
|
2523
|
-
return t.find(
|
|
2523
|
+
return t.find(Tr) ?? t[0] ?? null;
|
|
2524
2524
|
}, c = (e) => {
|
|
2525
|
-
|
|
2526
|
-
|
|
2525
|
+
Sr(e.querySelectorAll(t.closeSelector)).filter((t) => a(t) === e).forEach((e) => {
|
|
2526
|
+
wr(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");
|
|
2527
2527
|
});
|
|
2528
2528
|
}, l = (e) => {
|
|
2529
|
-
let t =
|
|
2529
|
+
let t = Er(e) ? "alert" : "status";
|
|
2530
2530
|
e.getAttribute("role") !== t && e.setAttribute("role", t), c(e);
|
|
2531
2531
|
}, u = (e, t) => {
|
|
2532
2532
|
e.hidden !== !t && (e.hidden = !t);
|
|
2533
2533
|
}, d = (e) => {
|
|
2534
2534
|
let t = s(e);
|
|
2535
|
-
t && (
|
|
2535
|
+
t && (kr(t, !1), l(t), !Tr(t) && u(t, !0));
|
|
2536
2536
|
}, f = (e) => {
|
|
2537
2537
|
let t = s(e);
|
|
2538
|
-
!t || !
|
|
2538
|
+
!t || !Tr(t) || (kr(t, !0), u(t, !1));
|
|
2539
2539
|
}, p = () => {
|
|
2540
2540
|
i().forEach((e) => {
|
|
2541
|
-
o(e) && (
|
|
2541
|
+
o(e) && (Or(e) && Tr(e) && u(e, !1), l(e));
|
|
2542
2542
|
});
|
|
2543
2543
|
}, m = (e) => {
|
|
2544
2544
|
let n = e.target;
|
|
@@ -2546,14 +2546,14 @@ var yr = {
|
|
|
2546
2546
|
let r = n.closest(t.closeSelector);
|
|
2547
2547
|
if (!(r instanceof HTMLElement)) return;
|
|
2548
2548
|
let i = a(r);
|
|
2549
|
-
!i || !o(i) ||
|
|
2549
|
+
!i || !o(i) || Cr(e) && f(i);
|
|
2550
2550
|
}, h = (e) => {
|
|
2551
2551
|
if (!(e instanceof KeyboardEvent) || e.key !== "Enter" && e.key !== " ") return;
|
|
2552
2552
|
let n = e.target;
|
|
2553
2553
|
if (!(n instanceof Element)) return;
|
|
2554
2554
|
let r = n.closest(t.closeSelector);
|
|
2555
|
-
if (r instanceof HTMLElement && a(r) && !
|
|
2556
|
-
if (!
|
|
2555
|
+
if (r instanceof HTMLElement && a(r) && !wr(r)) {
|
|
2556
|
+
if (!Cr(e)) return;
|
|
2557
2557
|
e.preventDefault(), f(r);
|
|
2558
2558
|
}
|
|
2559
2559
|
}, g = !1, _ = () => {
|
|
@@ -2584,17 +2584,17 @@ var yr = {
|
|
|
2584
2584
|
show: d,
|
|
2585
2585
|
dismiss: f
|
|
2586
2586
|
};
|
|
2587
|
-
},
|
|
2588
|
-
|
|
2589
|
-
},
|
|
2590
|
-
|
|
2587
|
+
}, jr = (e = {}) => Ar(e), Mr = null, Nr = !1, Pr = null, Fr = () => {
|
|
2588
|
+
Pr &&= (document.removeEventListener("DOMContentLoaded", Pr), null);
|
|
2589
|
+
}, Ir = () => typeof window > "u" || typeof document > "u" ? null : (Nr = !1, Fr(), Mr ? (Mr.sync(), Mr) : (Mr = Ar(), Mr)), Lr = () => {
|
|
2590
|
+
Nr = !0, Fr(), Mr?.destroy(), Mr = null;
|
|
2591
2591
|
};
|
|
2592
|
-
typeof window < "u" && typeof document < "u" && (document.readyState === "loading" ? (
|
|
2593
|
-
|
|
2594
|
-
}, document.addEventListener("DOMContentLoaded",
|
|
2592
|
+
typeof window < "u" && typeof document < "u" && (document.readyState === "loading" ? (Pr = () => {
|
|
2593
|
+
Pr = null, Nr || Ir();
|
|
2594
|
+
}, document.addEventListener("DOMContentLoaded", Pr)) : Ir());
|
|
2595
2595
|
//#endregion
|
|
2596
2596
|
//#region src/js/src/menu/menu-runtime.ts
|
|
2597
|
-
var
|
|
2597
|
+
var Rr = {
|
|
2598
2598
|
root: typeof document < "u" ? document : {},
|
|
2599
2599
|
rootSelector: "[menu-root]",
|
|
2600
2600
|
buttonSelector: "[menu-button]",
|
|
@@ -2602,48 +2602,48 @@ var Lr = {
|
|
|
2602
2602
|
itemSelector: "[menuitem]",
|
|
2603
2603
|
separatorSelector: "[menu-separator]",
|
|
2604
2604
|
labelSelector: "[menu-label]"
|
|
2605
|
-
},
|
|
2605
|
+
}, Z = (e) => Array.from(e), zr = "juice-menu", Br = "juice-menuitem", Vr = 0, Hr = (e) => {
|
|
2606
2606
|
let t = "";
|
|
2607
2607
|
do
|
|
2608
|
-
|
|
2608
|
+
Vr += 1, t = `${e}-${Vr}`;
|
|
2609
2609
|
while (typeof document < "u" && document.getElementById(t));
|
|
2610
2610
|
return t;
|
|
2611
|
-
},
|
|
2611
|
+
}, Ur = (e, t, n) => e.id ? e.id : t && !document.getElementById(t) ? (e.id = t, t) : (e.id = Hr(n), e.id), Q = A(), Wr = /* @__PURE__ */ new WeakMap(), Gr = /* @__PURE__ */ new WeakMap(), Kr = (e) => e.trim().toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-+|-+$/g, "") || "menu", qr = (e) => e instanceof HTMLButtonElement ? !0 : e instanceof HTMLAnchorElement ? e.hasAttribute("href") : !1, Jr = (e) => !!(e.getAttribute("aria-disabled") === "true" || e instanceof HTMLButtonElement && e.disabled || e instanceof HTMLInputElement && e.disabled), Yr = () => ({
|
|
2612
2612
|
destroy: () => {},
|
|
2613
2613
|
sync: () => {},
|
|
2614
2614
|
open: () => {},
|
|
2615
2615
|
close: () => {},
|
|
2616
2616
|
toggle: () => {},
|
|
2617
2617
|
select: () => {}
|
|
2618
|
-
}),
|
|
2619
|
-
if (typeof window > "u" || typeof document > "u") return
|
|
2618
|
+
}), Xr = (e = {}) => {
|
|
2619
|
+
if (typeof window > "u" || typeof document > "u") return Yr();
|
|
2620
2620
|
let t = {
|
|
2621
|
-
...
|
|
2621
|
+
...Rr,
|
|
2622
2622
|
...e
|
|
2623
|
-
}, n = t.root ?? document, r = () =>
|
|
2623
|
+
}, n = t.root ?? document, r = () => Z(n.querySelectorAll(t.rootSelector)), i = (e) => {
|
|
2624
2624
|
if (!e) return null;
|
|
2625
2625
|
let n = e.closest(t.rootSelector);
|
|
2626
2626
|
return n instanceof HTMLElement ? n : null;
|
|
2627
|
-
}, a = (e) => e?.matches(t.rootSelector) ? n instanceof Document ? !0 : n instanceof Node ? n.contains(e) : r().includes(e) : !1, o = (e) =>
|
|
2627
|
+
}, a = (e) => e?.matches(t.rootSelector) ? n instanceof Document ? !0 : n instanceof Node ? n.contains(e) : r().includes(e) : !1, o = (e) => Z(e.querySelectorAll(t.menuSelector)).find((t) => i(t) === e) ?? null, s = (e, t) => {
|
|
2628
2628
|
let n = o(t);
|
|
2629
2629
|
return !!(n && n.contains(e));
|
|
2630
2630
|
}, c = (e) => {
|
|
2631
2631
|
let n = o(e);
|
|
2632
|
-
return n ?
|
|
2633
|
-
}, l = (e) => c(e).filter((e) => !e.hasAttribute("hidden") && !
|
|
2632
|
+
return n ? Z(n.querySelectorAll(t.itemSelector)).filter((t) => i(t) === e) : [];
|
|
2633
|
+
}, l = (e) => c(e).filter((e) => !e.hasAttribute("hidden") && !Jr(e)), u = (e) => {
|
|
2634
2634
|
let n = o(e);
|
|
2635
|
-
return n ?
|
|
2635
|
+
return n ? Z(n.querySelectorAll(t.separatorSelector)).filter((t) => i(t) === e) : [];
|
|
2636
2636
|
}, d = (e) => {
|
|
2637
|
-
let n =
|
|
2637
|
+
let n = Z(e.querySelectorAll(t.buttonSelector)).find((t) => i(t) === e && !s(t, e));
|
|
2638
2638
|
if (n) return n;
|
|
2639
|
-
let r =
|
|
2639
|
+
let r = Z(e.querySelectorAll("[aria-haspopup=\"menu\"]")).find((t) => i(t) === e && !s(t, e));
|
|
2640
2640
|
if (r) return r;
|
|
2641
2641
|
let a = o(e);
|
|
2642
2642
|
if (a?.id) {
|
|
2643
|
-
let t =
|
|
2643
|
+
let t = Z(e.querySelectorAll("[aria-controls]")).find((t) => i(t) !== e || s(t, e) ? !1 : N(t).includes(a.id));
|
|
2644
2644
|
if (t) return t;
|
|
2645
2645
|
}
|
|
2646
|
-
return
|
|
2646
|
+
return Z(e.querySelectorAll("button, [role=\"button\"], a[href]")).find((t) => i(t) === e && !s(t, e)) ?? null;
|
|
2647
2647
|
}, f = (e) => {
|
|
2648
2648
|
let t = o(e);
|
|
2649
2649
|
return !!(t && !t.hasAttribute("hidden"));
|
|
@@ -2656,10 +2656,10 @@ var Lr = {
|
|
|
2656
2656
|
return r().find(f) ?? r()[0] ?? null;
|
|
2657
2657
|
}, h = (e) => {
|
|
2658
2658
|
let t = e.getAttribute("name");
|
|
2659
|
-
if (t) return
|
|
2660
|
-
if (e.id) return
|
|
2659
|
+
if (t) return Kr(t);
|
|
2660
|
+
if (e.id) return Kr(e.id);
|
|
2661
2661
|
let n = o(e);
|
|
2662
|
-
return n?.id ?
|
|
2662
|
+
return n?.id ? Kr(n.id) : null;
|
|
2663
2663
|
}, g = (e, t) => {
|
|
2664
2664
|
let n = d(e);
|
|
2665
2665
|
if (!n) return;
|
|
@@ -2671,8 +2671,8 @@ var Lr = {
|
|
|
2671
2671
|
}, v = (e, t) => {
|
|
2672
2672
|
let n = f(e);
|
|
2673
2673
|
c(e).forEach((r) => {
|
|
2674
|
-
if (r === t && n && !
|
|
2675
|
-
r.getAttribute("menuitem") !== "active" && r.setAttribute("menuitem", "active"), r.getAttribute("tabindex") !== "0" && r.setAttribute("tabindex", "0"),
|
|
2674
|
+
if (r === t && n && !Jr(r)) {
|
|
2675
|
+
r.getAttribute("menuitem") !== "active" && r.setAttribute("menuitem", "active"), r.getAttribute("tabindex") !== "0" && r.setAttribute("tabindex", "0"), Wr.set(e, r);
|
|
2676
2676
|
return;
|
|
2677
2677
|
}
|
|
2678
2678
|
r.getAttribute("menuitem") === "active" && r.setAttribute("menuitem", ""), r.getAttribute("tabindex") !== "-1" && r.setAttribute("tabindex", "-1");
|
|
@@ -2684,27 +2684,27 @@ var Lr = {
|
|
|
2684
2684
|
if (n.length === 0) return null;
|
|
2685
2685
|
if (t === "last") return n[n.length - 1] ?? null;
|
|
2686
2686
|
if (t === "first") return n[0] ?? null;
|
|
2687
|
-
let r =
|
|
2687
|
+
let r = Wr.get(e);
|
|
2688
2688
|
return r && n.includes(r) ? r : n.find((e) => e.getAttribute("menuitem") === "active") ?? n[0] ?? null;
|
|
2689
2689
|
}, x = (e) => {
|
|
2690
2690
|
let t = o(e);
|
|
2691
2691
|
if (!t) return;
|
|
2692
2692
|
let n = d(e), r = c(e), i = h(e);
|
|
2693
|
-
|
|
2694
|
-
|
|
2693
|
+
Ur(t, i ? `${i}-menu` : null, zr), t.getAttribute("role") !== "menu" && t.setAttribute("role", "menu"), r.forEach((e, t) => {
|
|
2694
|
+
Ur(e, i ? `${i}-item-${t + 1}` : null, Br), e.getAttribute("role") !== "menuitem" && e.setAttribute("role", "menuitem");
|
|
2695
2695
|
}), u(e).forEach((e) => {
|
|
2696
2696
|
e.getAttribute("role") !== "separator" && e.setAttribute("role", "separator");
|
|
2697
|
-
}), n && (
|
|
2697
|
+
}), n && (qr(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)), g(e, f(e)), v(e, f(e) ? b(e) : null);
|
|
2698
2698
|
}, S = (e, t) => {
|
|
2699
2699
|
let n = document.activeElement instanceof HTMLElement ? document.activeElement : null, r = t && !s(t, e) ? t : n && !s(n, e) ? n : d(e);
|
|
2700
|
-
r &&
|
|
2700
|
+
r && Gr.set(e, r);
|
|
2701
2701
|
}, C = (e) => {
|
|
2702
|
-
let t =
|
|
2703
|
-
|
|
2702
|
+
let t = Gr.get(e) ?? d(e);
|
|
2703
|
+
Gr.delete(e), t?.isConnected && typeof t.focus == "function" && t.focus();
|
|
2704
2704
|
}, w = (e, t) => {
|
|
2705
|
-
x(e), _(e, !1), g(e, !1), v(e, null), t ? C(e) :
|
|
2705
|
+
x(e), _(e, !1), g(e, !1), v(e, null), t ? C(e) : Gr.delete(e);
|
|
2706
2706
|
}, T = (e, n, i = "previous") => {
|
|
2707
|
-
r().concat(
|
|
2707
|
+
r().concat(Z(document.querySelectorAll(t.rootSelector))).forEach((t) => {
|
|
2708
2708
|
t === e || !f(t) || w(t, !1);
|
|
2709
2709
|
}), S(e, n ?? d(e)), x(e), _(e, !0), g(e, !0);
|
|
2710
2710
|
let a = b(e, i);
|
|
@@ -2735,7 +2735,7 @@ var Lr = {
|
|
|
2735
2735
|
}
|
|
2736
2736
|
}, k = (e) => {
|
|
2737
2737
|
let t = i(e);
|
|
2738
|
-
!t || !a(t) ||
|
|
2738
|
+
!t || !a(t) || Jr(e) || e.click();
|
|
2739
2739
|
}, A = (e) => {
|
|
2740
2740
|
if (e) {
|
|
2741
2741
|
if (e.matches(t.itemSelector)) {
|
|
@@ -2773,7 +2773,7 @@ var Lr = {
|
|
|
2773
2773
|
let n = i(t);
|
|
2774
2774
|
if (!n || !a(n)) return;
|
|
2775
2775
|
let r = P(t, n);
|
|
2776
|
-
!r || !
|
|
2776
|
+
!r || !Jr(r) || Q(e) && (e.preventDefault(), e.stopPropagation(), e.stopImmediatePropagation());
|
|
2777
2777
|
}, R = (e) => {
|
|
2778
2778
|
let t = e.target;
|
|
2779
2779
|
if (!(t instanceof Element)) return;
|
|
@@ -2781,35 +2781,35 @@ var Lr = {
|
|
|
2781
2781
|
if (n && a(n)) {
|
|
2782
2782
|
let r = P(t, n);
|
|
2783
2783
|
if (r) {
|
|
2784
|
-
if (
|
|
2785
|
-
|
|
2784
|
+
if (Jr(r) || !Q(e)) return;
|
|
2785
|
+
Wr.set(n, r), w(n, !0);
|
|
2786
2786
|
return;
|
|
2787
2787
|
}
|
|
2788
2788
|
if (F(t, n)) {
|
|
2789
|
-
if (!o(n) ||
|
|
2789
|
+
if (!o(n) || !Q(e)) return;
|
|
2790
2790
|
e.preventDefault(), O(n);
|
|
2791
2791
|
return;
|
|
2792
2792
|
}
|
|
2793
2793
|
if (s(t, n)) return;
|
|
2794
2794
|
let i = I();
|
|
2795
|
-
if (!i || i !== n ||
|
|
2795
|
+
if (!i || i !== n || !Q(e)) return;
|
|
2796
2796
|
w(i, !1);
|
|
2797
2797
|
return;
|
|
2798
2798
|
}
|
|
2799
2799
|
let r = I();
|
|
2800
|
-
r &&
|
|
2800
|
+
r && Q(e) && w(r, !1);
|
|
2801
2801
|
}, z = (e) => {
|
|
2802
2802
|
if (!(e instanceof KeyboardEvent)) return;
|
|
2803
2803
|
let t = e.target;
|
|
2804
2804
|
if (!(t instanceof Element)) return;
|
|
2805
2805
|
let n = i(t), r = I();
|
|
2806
2806
|
if (e.key === "Escape") {
|
|
2807
|
-
if (!r || ct() || e.defaultPrevented ||
|
|
2807
|
+
if (!r || ct() || e.defaultPrevented || !Q(e)) return;
|
|
2808
2808
|
e.preventDefault(), e.stopPropagation(), D(r);
|
|
2809
2809
|
return;
|
|
2810
2810
|
}
|
|
2811
2811
|
if (e.key === "Tab") {
|
|
2812
|
-
if (!r ||
|
|
2812
|
+
if (!r || !Q(e)) return;
|
|
2813
2813
|
D(r, !0);
|
|
2814
2814
|
return;
|
|
2815
2815
|
}
|
|
@@ -2817,49 +2817,49 @@ var Lr = {
|
|
|
2817
2817
|
let s = F(t, n), c = P(t, n);
|
|
2818
2818
|
if (e.key === "ArrowDown") {
|
|
2819
2819
|
if (!f(n)) {
|
|
2820
|
-
if (!s || !o(n) ||
|
|
2820
|
+
if (!s || !o(n) || !Q(e)) return;
|
|
2821
2821
|
e.preventDefault(), E(s, "first");
|
|
2822
2822
|
return;
|
|
2823
2823
|
}
|
|
2824
|
-
if (!c && !s ||
|
|
2824
|
+
if (!c && !s || !Q(e)) return;
|
|
2825
2825
|
e.preventDefault(), j(n, (e) => e < 0 ? 0 : e + 1);
|
|
2826
2826
|
return;
|
|
2827
2827
|
}
|
|
2828
2828
|
if (e.key === "ArrowUp") {
|
|
2829
2829
|
if (!f(n)) {
|
|
2830
|
-
if (!s || !o(n) ||
|
|
2830
|
+
if (!s || !o(n) || !Q(e)) return;
|
|
2831
2831
|
e.preventDefault(), E(s, "last");
|
|
2832
2832
|
return;
|
|
2833
2833
|
}
|
|
2834
|
-
if (!c && !s ||
|
|
2834
|
+
if (!c && !s || !Q(e)) return;
|
|
2835
2835
|
e.preventDefault(), j(n, (e, t) => e < 0 ? t - 1 : e - 1);
|
|
2836
2836
|
return;
|
|
2837
2837
|
}
|
|
2838
2838
|
if (!f(n)) {
|
|
2839
|
-
if (s && o(n) && !
|
|
2840
|
-
if (
|
|
2839
|
+
if (s && o(n) && !qr(s) && (e.key === "Enter" || e.key === " ")) {
|
|
2840
|
+
if (!Q(e)) return;
|
|
2841
2841
|
e.preventDefault(), O(n);
|
|
2842
2842
|
}
|
|
2843
2843
|
return;
|
|
2844
2844
|
}
|
|
2845
2845
|
if (e.key === "Home") {
|
|
2846
|
-
if (!c && !s ||
|
|
2846
|
+
if (!c && !s || !Q(e)) return;
|
|
2847
2847
|
e.preventDefault(), j(n, () => 0);
|
|
2848
2848
|
return;
|
|
2849
2849
|
}
|
|
2850
2850
|
if (e.key === "End") {
|
|
2851
|
-
if (!c && !s ||
|
|
2851
|
+
if (!c && !s || !Q(e)) return;
|
|
2852
2852
|
e.preventDefault(), j(n, (e, t) => t - 1);
|
|
2853
2853
|
return;
|
|
2854
2854
|
}
|
|
2855
2855
|
if (!(e.key !== "Enter" && e.key !== " ")) {
|
|
2856
|
-
if (c && !
|
|
2857
|
-
if (
|
|
2856
|
+
if (c && !Jr(c)) {
|
|
2857
|
+
if (!Q(e)) return;
|
|
2858
2858
|
e.preventDefault(), c.click();
|
|
2859
2859
|
return;
|
|
2860
2860
|
}
|
|
2861
|
-
if (s && !
|
|
2862
|
-
if (
|
|
2861
|
+
if (s && !qr(s) && (e.key === "Enter" || e.key === " ")) {
|
|
2862
|
+
if (!Q(e)) return;
|
|
2863
2863
|
e.preventDefault(), O(n);
|
|
2864
2864
|
}
|
|
2865
2865
|
}
|
|
@@ -2896,17 +2896,1013 @@ var Lr = {
|
|
|
2896
2896
|
toggle: O,
|
|
2897
2897
|
select: A
|
|
2898
2898
|
};
|
|
2899
|
-
},
|
|
2900
|
-
|
|
2901
|
-
},
|
|
2902
|
-
|
|
2899
|
+
}, Zr = (e = {}) => Xr(e), Qr = null, $r = !1, ei = null, ti = () => {
|
|
2900
|
+
ei &&= (document.removeEventListener("DOMContentLoaded", ei), null);
|
|
2901
|
+
}, ni = () => typeof window > "u" || typeof document > "u" ? null : ($r = !1, ti(), Qr ? (Qr.sync(), Qr) : (Qr = Xr(), Qr)), ri = () => {
|
|
2902
|
+
$r = !0, ti(), Qr?.destroy(), Qr = null;
|
|
2903
|
+
};
|
|
2904
|
+
typeof window < "u" && typeof document < "u" && (document.readyState === "loading" ? (ei = () => {
|
|
2905
|
+
ei = null, $r || ni();
|
|
2906
|
+
}, document.addEventListener("DOMContentLoaded", ei)) : ni());
|
|
2907
|
+
//#endregion
|
|
2908
|
+
//#region src/js/src/switch/switch-runtime.ts
|
|
2909
|
+
var ii = {
|
|
2910
|
+
root: typeof document < "u" ? document : {},
|
|
2911
|
+
switchSelector: "[switch]"
|
|
2912
|
+
}, ai = (e) => Array.from(e), oi = A(), si = (e) => e instanceof HTMLInputElement && e.type === "checkbox", ci = (e) => e instanceof HTMLButtonElement, li = (e) => ci(e) || si(e), ui = (e) => e.getAttribute("aria-disabled") === "true" || e instanceof HTMLButtonElement && e.disabled || e instanceof HTMLInputElement && e.disabled ? !0 : e.hasAttribute("disabled"), di = (e) => si(e) && e.checked ? !0 : e.getAttribute("aria-checked") === "true", fi = (e, t) => {
|
|
2913
|
+
let n = t ? "true" : "false";
|
|
2914
|
+
e.getAttribute("aria-checked") !== n && e.setAttribute("aria-checked", n), si(e) && e.checked !== t && (e.checked = t);
|
|
2915
|
+
}, pi = () => ({
|
|
2916
|
+
destroy: () => {},
|
|
2917
|
+
sync: () => {},
|
|
2918
|
+
toggle: () => {},
|
|
2919
|
+
check: () => {},
|
|
2920
|
+
uncheck: () => {},
|
|
2921
|
+
setChecked: () => {},
|
|
2922
|
+
isChecked: () => !1
|
|
2923
|
+
}), mi = (e = {}) => {
|
|
2924
|
+
if (typeof window > "u" || typeof document > "u") return pi();
|
|
2925
|
+
let t = {
|
|
2926
|
+
...ii,
|
|
2927
|
+
...e
|
|
2928
|
+
}, n = t.root ?? document, r = n, i = () => ai(n.querySelectorAll(t.switchSelector)).filter(li), a = (e) => !e?.matches(t.switchSelector) || !li(e) ? !1 : n instanceof Document ? !0 : n instanceof Node ? n.contains(e) : i().includes(e), o = (e) => {
|
|
2929
|
+
if (!e) return null;
|
|
2930
|
+
let n = e.closest(t.switchSelector);
|
|
2931
|
+
return !(n instanceof HTMLElement) || !a(n) ? null : n;
|
|
2932
|
+
}, s = (e) => {
|
|
2933
|
+
if (e) {
|
|
2934
|
+
if (a(e)) return e;
|
|
2935
|
+
let t = o(e);
|
|
2936
|
+
if (t) return t;
|
|
2937
|
+
}
|
|
2938
|
+
return i().find(a) ?? null;
|
|
2939
|
+
}, c = (e) => {
|
|
2940
|
+
e.getAttribute("role") !== "switch" && e.setAttribute("role", "switch"), ci(e) && !e.hasAttribute("type") && (e.type = "button"), fi(e, di(e));
|
|
2941
|
+
}, l = (e, t) => {
|
|
2942
|
+
let n = s(e);
|
|
2943
|
+
!n || ui(n) || (c(n), fi(n, t));
|
|
2944
|
+
}, u = (e) => {
|
|
2945
|
+
let t = s(e);
|
|
2946
|
+
!t || ui(t) || l(t, !di(t));
|
|
2947
|
+
}, d = (e) => {
|
|
2948
|
+
l(e, !0);
|
|
2949
|
+
}, f = (e) => {
|
|
2950
|
+
l(e, !1);
|
|
2951
|
+
}, p = (e, t) => {
|
|
2952
|
+
l(t, e);
|
|
2953
|
+
}, m = (e) => {
|
|
2954
|
+
let t = s(e);
|
|
2955
|
+
return t ? di(t) : !1;
|
|
2956
|
+
}, h = () => {
|
|
2957
|
+
i().forEach((e) => {
|
|
2958
|
+
a(e) && c(e);
|
|
2959
|
+
});
|
|
2960
|
+
}, g = (e) => {
|
|
2961
|
+
let t = e.target;
|
|
2962
|
+
if (!(t instanceof Element)) return;
|
|
2963
|
+
let n = o(t instanceof HTMLElement ? t : t.parentElement);
|
|
2964
|
+
!n || ui(n) || !ci(n) || oi(e) && (e.preventDefault(), u(n));
|
|
2965
|
+
}, _ = (e) => {
|
|
2966
|
+
let t = e.target;
|
|
2967
|
+
!(t instanceof HTMLElement) || !si(t) || !a(t) || ui(t) || oi(e) && fi(t, t.checked);
|
|
2968
|
+
}, v = (e) => {
|
|
2969
|
+
if (!(e instanceof KeyboardEvent) || e.key !== "Enter" && e.key !== " ") return;
|
|
2970
|
+
let t = e.target;
|
|
2971
|
+
if (!(t instanceof Element)) return;
|
|
2972
|
+
let n = o(t instanceof HTMLElement ? t : t.parentElement);
|
|
2973
|
+
!n || ui(n) || oi(e) && (e.preventDefault(), u(n));
|
|
2974
|
+
}, y = !1, b = () => {
|
|
2975
|
+
y || (y = !0, requestAnimationFrame(() => {
|
|
2976
|
+
y = !1, h();
|
|
2977
|
+
}));
|
|
2978
|
+
}, x = typeof MutationObserver < "u" ? new MutationObserver(() => b()) : null;
|
|
2979
|
+
return r.addEventListener("click", g), r.addEventListener("change", _), r.addEventListener("keydown", v), x && n instanceof Node && x.observe(n, {
|
|
2980
|
+
childList: !0,
|
|
2981
|
+
subtree: !0,
|
|
2982
|
+
attributes: !0,
|
|
2983
|
+
attributeFilter: [
|
|
2984
|
+
"switch",
|
|
2985
|
+
"role",
|
|
2986
|
+
"aria-checked",
|
|
2987
|
+
"aria-disabled",
|
|
2988
|
+
"disabled",
|
|
2989
|
+
"type",
|
|
2990
|
+
"checked"
|
|
2991
|
+
]
|
|
2992
|
+
}), h(), {
|
|
2993
|
+
destroy: () => {
|
|
2994
|
+
r.removeEventListener("click", g), r.removeEventListener("change", _), r.removeEventListener("keydown", v), x?.disconnect();
|
|
2995
|
+
},
|
|
2996
|
+
sync: h,
|
|
2997
|
+
toggle: u,
|
|
2998
|
+
check: d,
|
|
2999
|
+
uncheck: f,
|
|
3000
|
+
setChecked: p,
|
|
3001
|
+
isChecked: m
|
|
3002
|
+
};
|
|
3003
|
+
}, hi = (e = {}) => mi(e), gi = null, _i = !1, vi = null, yi = () => {
|
|
3004
|
+
vi &&= (document.removeEventListener("DOMContentLoaded", vi), null);
|
|
3005
|
+
}, bi = () => typeof window > "u" || typeof document > "u" ? null : (_i = !1, yi(), gi ? (gi.sync(), gi) : (gi = mi(), gi)), xi = () => {
|
|
3006
|
+
_i = !0, yi(), gi?.destroy(), gi = null;
|
|
3007
|
+
};
|
|
3008
|
+
typeof window < "u" && typeof document < "u" && (document.readyState === "loading" ? (vi = () => {
|
|
3009
|
+
vi = null, _i || bi();
|
|
3010
|
+
}, document.addEventListener("DOMContentLoaded", vi)) : bi());
|
|
3011
|
+
//#endregion
|
|
3012
|
+
//#region src/js/src/slider/slider-runtime.ts
|
|
3013
|
+
var Si = 1, Ci = 10, wi = {
|
|
3014
|
+
root: typeof document < "u" ? document : {},
|
|
3015
|
+
sliderSelector: "[slider]:not([slider=\"vertical\"])"
|
|
3016
|
+
}, Ti = (e) => Array.from(e), Ei = A(), Di = (e, t, n) => Math.min(n, Math.max(t, e)), Oi = (e) => {
|
|
3017
|
+
if (!Number.isFinite(e) || Object.is(e, -0)) return "0";
|
|
3018
|
+
let t = Math.round(e * 1e6) / 1e6;
|
|
3019
|
+
return String(t);
|
|
3020
|
+
}, ki = (e, t) => {
|
|
3021
|
+
let n = e.getAttribute(t);
|
|
3022
|
+
if (n == null) return null;
|
|
3023
|
+
let r = n.trim();
|
|
3024
|
+
if (r === "") return null;
|
|
3025
|
+
let i = Number(r);
|
|
3026
|
+
return Number.isFinite(i) ? i : null;
|
|
3027
|
+
}, Ai = (e) => {
|
|
3028
|
+
let t = e.closest("[slider]");
|
|
3029
|
+
return t instanceof HTMLElement ? t : null;
|
|
3030
|
+
}, $ = (e) => {
|
|
3031
|
+
let t = e.querySelectorAll("[slider-thumb]");
|
|
3032
|
+
for (let n of t) if (Ai(n) === e) return n;
|
|
3033
|
+
return null;
|
|
3034
|
+
}, ji = (e) => !!(e instanceof HTMLButtonElement || e instanceof HTMLInputElement || e instanceof HTMLSelectElement || e instanceof HTMLTextAreaElement || e instanceof HTMLAnchorElement && e.hasAttribute("href")), Mi = (e) => e.getAttribute("aria-disabled") === "true" || (e instanceof HTMLButtonElement || e instanceof HTMLInputElement || e instanceof HTMLSelectElement || e instanceof HTMLTextAreaElement || e instanceof HTMLFieldSetElement || e instanceof HTMLOptGroupElement || e instanceof HTMLOptionElement) && e.disabled ? !0 : e.hasAttribute("disabled"), Ni = (e, t) => Mi(e) || Mi(t), Pi = (e, t) => {
|
|
3035
|
+
let n = ki(t, "aria-valuemin") ?? ki(e, "aria-valuemin") ?? 0, r = ki(t, "aria-valuemax") ?? ki(e, "aria-valuemax") ?? 100, i = r < n ? n : r;
|
|
3036
|
+
return {
|
|
3037
|
+
min: n,
|
|
3038
|
+
max: i,
|
|
3039
|
+
value: Di(ki(t, "aria-valuenow") ?? ki(e, "aria-valuenow") ?? n, n, i)
|
|
3040
|
+
};
|
|
3041
|
+
}, Fi = (e, t, n) => n === t ? 0 : Di((e - t) / (n - t), 0, 1), Ii = (e, t) => t + Math.round((e - t) / Si) * Si, Li = (e, t, n, r, i) => {
|
|
3042
|
+
let a = e.getBoundingClientRect().width;
|
|
3043
|
+
if (!(a > 0) || i === r) return r;
|
|
3044
|
+
let o = t.getBoundingClientRect().width, s = o > 0 && o < a ? o / 2 : 0, c = a - s * 2;
|
|
3045
|
+
return c > 0 ? Di(Ii(r + Di((n - e.getBoundingClientRect().left - s) / c, 0, 1) * (i - r), r), r, i) : r;
|
|
3046
|
+
}, Ri = (e, t) => {
|
|
3047
|
+
if (typeof e.setPointerCapture == "function") try {
|
|
3048
|
+
e.setPointerCapture(t);
|
|
3049
|
+
} catch {}
|
|
3050
|
+
}, zi = (e, t) => {
|
|
3051
|
+
if (typeof e.releasePointerCapture == "function") try {
|
|
3052
|
+
if (typeof e.hasPointerCapture == "function" && !e.hasPointerCapture(t)) return;
|
|
3053
|
+
e.releasePointerCapture(t);
|
|
3054
|
+
} catch {}
|
|
3055
|
+
}, Bi = (e) => {
|
|
3056
|
+
if (typeof e.focus == "function") try {
|
|
3057
|
+
e.focus({ preventScroll: !0 });
|
|
3058
|
+
} catch {
|
|
3059
|
+
e.focus();
|
|
3060
|
+
}
|
|
3061
|
+
}, Vi = () => ({
|
|
3062
|
+
destroy: () => {},
|
|
3063
|
+
sync: () => {},
|
|
3064
|
+
setValue: () => {},
|
|
3065
|
+
getValue: () => 0,
|
|
3066
|
+
increment: () => {},
|
|
3067
|
+
decrement: () => {}
|
|
3068
|
+
}), Hi = (e = {}) => {
|
|
3069
|
+
if (typeof window > "u" || typeof document > "u") return Vi();
|
|
3070
|
+
let t = {
|
|
3071
|
+
...wi,
|
|
3072
|
+
...e
|
|
3073
|
+
}, n = t.root ?? document, r = n, i = !1, a = null, o = () => Ti(n.querySelectorAll(t.sliderSelector)).filter((e) => $(e) !== null), s = (e) => !e?.matches(t.sliderSelector) || !$(e) ? !1 : n instanceof Document ? !0 : n instanceof Node ? n.contains(e) : o().includes(e), c = (e) => {
|
|
3074
|
+
if (!e) return null;
|
|
3075
|
+
let t = Ai(e);
|
|
3076
|
+
return !t || !s(t) ? null : t;
|
|
3077
|
+
}, l = (e) => {
|
|
3078
|
+
if (e) {
|
|
3079
|
+
if (s(e)) return e;
|
|
3080
|
+
let t = c(e);
|
|
3081
|
+
if (t) return t;
|
|
3082
|
+
}
|
|
3083
|
+
return o().find((e) => s(e)) ?? null;
|
|
3084
|
+
}, u = (e, t, n, r, i) => {
|
|
3085
|
+
e.getAttribute("role") === "slider" && e.removeAttribute("role"), t.getAttribute("role") !== "slider" && t.setAttribute("role", "slider"), !ji(t) && !t.hasAttribute("tabindex") && t.setAttribute("tabindex", "0"), t instanceof HTMLButtonElement && !t.hasAttribute("type") && (t.type = "button");
|
|
3086
|
+
let a = Oi(n), o = Oi(r), s = Oi(i);
|
|
3087
|
+
t.getAttribute("aria-valuemin") !== a && t.setAttribute("aria-valuemin", a), t.getAttribute("aria-valuemax") !== o && t.setAttribute("aria-valuemax", o), t.getAttribute("aria-valuenow") !== s && t.setAttribute("aria-valuenow", s), t.getAttribute("aria-orientation") !== "horizontal" && t.setAttribute("aria-orientation", "horizontal");
|
|
3088
|
+
let c = Oi(Fi(i, n, r));
|
|
3089
|
+
e.style.getPropertyValue("--juice-slider-ratio").trim() !== c && e.style.setProperty("--juice-slider-ratio", c);
|
|
3090
|
+
}, d = (e, t, n) => {
|
|
3091
|
+
let r = $(e);
|
|
3092
|
+
if (!r || Ni(e, r)) return;
|
|
3093
|
+
let i = Pi(e, r), a = Di(n ? Ii(t, i.min) : t, i.min, i.max);
|
|
3094
|
+
u(e, r, i.min, i.max, a);
|
|
3095
|
+
}, f = () => {
|
|
3096
|
+
i || o().forEach((e) => {
|
|
3097
|
+
if (!s(e)) return;
|
|
3098
|
+
let t = $(e);
|
|
3099
|
+
if (!t) return;
|
|
3100
|
+
let n = Pi(e, t);
|
|
3101
|
+
u(e, t, n.min, n.max, n.value);
|
|
3102
|
+
});
|
|
3103
|
+
}, p = (e, t) => {
|
|
3104
|
+
if (!Number.isFinite(e)) return;
|
|
3105
|
+
let n = l(t);
|
|
3106
|
+
n && d(n, e, !1);
|
|
3107
|
+
}, m = (e) => {
|
|
3108
|
+
let t = l(e);
|
|
3109
|
+
if (!t) return 0;
|
|
3110
|
+
let n = $(t);
|
|
3111
|
+
return n ? Pi(t, n).value : 0;
|
|
3112
|
+
}, h = (e, t) => {
|
|
3113
|
+
let n = l(e);
|
|
3114
|
+
if (!n) return;
|
|
3115
|
+
let r = $(n);
|
|
3116
|
+
!r || Ni(n, r) || d(n, Pi(n, r).value + t, !1);
|
|
3117
|
+
}, g = (e, t) => {
|
|
3118
|
+
let n = l(e);
|
|
3119
|
+
if (!n) return;
|
|
3120
|
+
let r = $(n);
|
|
3121
|
+
if (!r || Ni(n, r)) return;
|
|
3122
|
+
let i = Pi(n, r);
|
|
3123
|
+
d(n, t === "min" ? i.min : i.max, !1);
|
|
3124
|
+
}, _ = () => {
|
|
3125
|
+
a &&= (zi(a.thumb, a.pointerId), null);
|
|
3126
|
+
}, v = (e, t, n) => {
|
|
3127
|
+
if (Ni(e, t)) return;
|
|
3128
|
+
let r = Pi(e, t), i = Li(e, t, n, r.min, r.max);
|
|
3129
|
+
u(e, t, r.min, r.max, i);
|
|
3130
|
+
}, y = (e) => {
|
|
3131
|
+
if (!(e instanceof PointerEvent) || e.button !== 0) return;
|
|
3132
|
+
let t = e.target;
|
|
3133
|
+
if (!(t instanceof Element)) return;
|
|
3134
|
+
let n = c(t instanceof HTMLElement ? t : t.parentElement);
|
|
3135
|
+
if (!n) return;
|
|
3136
|
+
let r = $(n);
|
|
3137
|
+
!r || Ni(n, r) || a || Ei(e) && (e.preventDefault(), Bi(r), v(n, r, e.clientX), a = {
|
|
3138
|
+
host: n,
|
|
3139
|
+
thumb: r,
|
|
3140
|
+
pointerId: e.pointerId
|
|
3141
|
+
}, Ri(r, e.pointerId));
|
|
3142
|
+
}, b = (e) => {
|
|
3143
|
+
if (!(!(e instanceof PointerEvent) || !a) && e.pointerId === a.pointerId) {
|
|
3144
|
+
if (!s(a.host)) {
|
|
3145
|
+
_();
|
|
3146
|
+
return;
|
|
3147
|
+
}
|
|
3148
|
+
Ei(e) && (e.preventDefault(), v(a.host, a.thumb, e.clientX));
|
|
3149
|
+
}
|
|
3150
|
+
}, x = (e) => {
|
|
3151
|
+
!(e instanceof PointerEvent) || !a || e.pointerId === a.pointerId && (Ei(e), _());
|
|
3152
|
+
}, S = (e) => {
|
|
3153
|
+
if (!(e instanceof KeyboardEvent) || e.altKey || e.ctrlKey || e.metaKey || e.isComposing) return;
|
|
3154
|
+
let t = e.target;
|
|
3155
|
+
if (!(t instanceof Element)) return;
|
|
3156
|
+
let n = t instanceof HTMLElement ? t : t.parentElement, r = c(n);
|
|
3157
|
+
if (!r) return;
|
|
3158
|
+
let i = $(r);
|
|
3159
|
+
if (!i || !n || n !== i && !i.contains(n) || Ni(r, i)) return;
|
|
3160
|
+
let a = null, o = null;
|
|
3161
|
+
switch (e.key) {
|
|
3162
|
+
case "ArrowLeft":
|
|
3163
|
+
case "ArrowDown":
|
|
3164
|
+
a = -Si;
|
|
3165
|
+
break;
|
|
3166
|
+
case "ArrowRight":
|
|
3167
|
+
case "ArrowUp":
|
|
3168
|
+
a = Si;
|
|
3169
|
+
break;
|
|
3170
|
+
case "PageDown":
|
|
3171
|
+
a = -Ci;
|
|
3172
|
+
break;
|
|
3173
|
+
case "PageUp":
|
|
3174
|
+
a = Ci;
|
|
3175
|
+
break;
|
|
3176
|
+
case "Home":
|
|
3177
|
+
o = "min";
|
|
3178
|
+
break;
|
|
3179
|
+
case "End":
|
|
3180
|
+
o = "max";
|
|
3181
|
+
break;
|
|
3182
|
+
default: return;
|
|
3183
|
+
}
|
|
3184
|
+
if (Ei(e)) {
|
|
3185
|
+
if (e.preventDefault(), o) {
|
|
3186
|
+
g(i, o);
|
|
3187
|
+
return;
|
|
3188
|
+
}
|
|
3189
|
+
a != null && h(i, a);
|
|
3190
|
+
}
|
|
3191
|
+
}, C = !1, w = () => {
|
|
3192
|
+
C || i || (C = !0, requestAnimationFrame(() => {
|
|
3193
|
+
C = !1, f();
|
|
3194
|
+
}));
|
|
3195
|
+
}, T = typeof MutationObserver < "u" ? new MutationObserver(() => w()) : null;
|
|
3196
|
+
return r.addEventListener("pointerdown", y), r.addEventListener("pointermove", b), r.addEventListener("pointerup", x), r.addEventListener("pointercancel", x), r.addEventListener("keydown", S), T && n instanceof Node && T.observe(n, {
|
|
3197
|
+
childList: !0,
|
|
3198
|
+
subtree: !0,
|
|
3199
|
+
attributes: !0,
|
|
3200
|
+
attributeFilter: [
|
|
3201
|
+
"slider",
|
|
3202
|
+
"slider-thumb",
|
|
3203
|
+
"role",
|
|
3204
|
+
"aria-valuemin",
|
|
3205
|
+
"aria-valuemax",
|
|
3206
|
+
"aria-valuenow",
|
|
3207
|
+
"aria-orientation",
|
|
3208
|
+
"aria-disabled",
|
|
3209
|
+
"aria-valuetext",
|
|
3210
|
+
"disabled",
|
|
3211
|
+
"tabindex",
|
|
3212
|
+
"type"
|
|
3213
|
+
]
|
|
3214
|
+
}), f(), {
|
|
3215
|
+
destroy: () => {
|
|
3216
|
+
i = !0, _(), r.removeEventListener("pointerdown", y), r.removeEventListener("pointermove", b), r.removeEventListener("pointerup", x), r.removeEventListener("pointercancel", x), r.removeEventListener("keydown", S), T?.disconnect();
|
|
3217
|
+
},
|
|
3218
|
+
sync: f,
|
|
3219
|
+
setValue: p,
|
|
3220
|
+
getValue: m,
|
|
3221
|
+
increment: (e) => h(e, Si),
|
|
3222
|
+
decrement: (e) => h(e, -Si)
|
|
3223
|
+
};
|
|
3224
|
+
}, Ui = (e = {}) => Hi(e), Wi = null, Gi = !1, Ki = null, qi = () => {
|
|
3225
|
+
!Ki || typeof document > "u" || (document.removeEventListener("DOMContentLoaded", Ki), Ki = null);
|
|
3226
|
+
}, Ji = () => typeof window > "u" || typeof document > "u" ? null : (Gi = !1, qi(), Wi ? (Wi.sync(), Wi) : (Wi = Hi(), Wi)), Yi = () => {
|
|
3227
|
+
Gi = !0, qi(), Wi?.destroy(), Wi = null;
|
|
3228
|
+
};
|
|
3229
|
+
typeof window < "u" && typeof document < "u" && (document.readyState === "loading" ? (Ki = () => {
|
|
3230
|
+
Ki = null, Gi || Ji();
|
|
3231
|
+
}, document.addEventListener("DOMContentLoaded", Ki)) : Ji());
|
|
3232
|
+
//#endregion
|
|
3233
|
+
//#region src/js/src/checkbox/checkbox-runtime.ts
|
|
3234
|
+
var Xi = {
|
|
3235
|
+
root: typeof document < "u" ? document : {},
|
|
3236
|
+
checkboxSelector: "[checkbox]"
|
|
3237
|
+
}, Zi = (e) => Array.from(e), Qi = A(), $i = (e) => e instanceof HTMLInputElement && e.type === "checkbox", ea = (e) => e instanceof HTMLButtonElement, ta = (e) => ea(e) || $i(e), na = (e) => e.getAttribute("aria-disabled") === "true" || e instanceof HTMLButtonElement && e.disabled || e instanceof HTMLInputElement && e.disabled ? !0 : e.hasAttribute("disabled"), ra = (e) => $i(e) && e.checked ? !0 : e.getAttribute("aria-checked") === "true", ia = (e, t) => {
|
|
3238
|
+
let n = t ? "true" : "false";
|
|
3239
|
+
e.getAttribute("aria-checked") !== n && e.setAttribute("aria-checked", n), $i(e) && e.checked !== t && (e.checked = t);
|
|
3240
|
+
}, aa = () => ({
|
|
3241
|
+
destroy: () => {},
|
|
3242
|
+
sync: () => {},
|
|
3243
|
+
toggle: () => {},
|
|
3244
|
+
check: () => {},
|
|
3245
|
+
uncheck: () => {},
|
|
3246
|
+
setChecked: () => {},
|
|
3247
|
+
isChecked: () => !1
|
|
3248
|
+
}), oa = (e = {}) => {
|
|
3249
|
+
if (typeof window > "u" || typeof document > "u") return aa();
|
|
3250
|
+
let t = {
|
|
3251
|
+
...Xi,
|
|
3252
|
+
...e
|
|
3253
|
+
}, n = t.root ?? document, r = n, i = () => Zi(n.querySelectorAll(t.checkboxSelector)).filter(ta), a = (e) => !e?.matches(t.checkboxSelector) || !ta(e) ? !1 : n instanceof Document ? !0 : n instanceof Node ? n.contains(e) : i().includes(e), o = (e) => {
|
|
3254
|
+
if (!e) return null;
|
|
3255
|
+
let n = e.closest(t.checkboxSelector);
|
|
3256
|
+
return !(n instanceof HTMLElement) || !a(n) ? null : n;
|
|
3257
|
+
}, s = (e) => {
|
|
3258
|
+
if (e) {
|
|
3259
|
+
if (a(e)) return e;
|
|
3260
|
+
let t = o(e);
|
|
3261
|
+
if (t) return t;
|
|
3262
|
+
}
|
|
3263
|
+
return i().find(a) ?? null;
|
|
3264
|
+
}, c = (e) => {
|
|
3265
|
+
e.getAttribute("role") !== "checkbox" && e.setAttribute("role", "checkbox"), ea(e) && !e.hasAttribute("type") && (e.type = "button"), ia(e, ra(e));
|
|
3266
|
+
}, l = (e, t) => {
|
|
3267
|
+
let n = s(e);
|
|
3268
|
+
!n || na(n) || (c(n), ia(n, t));
|
|
3269
|
+
}, u = (e) => {
|
|
3270
|
+
let t = s(e);
|
|
3271
|
+
!t || na(t) || l(t, !ra(t));
|
|
3272
|
+
}, d = (e) => {
|
|
3273
|
+
l(e, !0);
|
|
3274
|
+
}, f = (e) => {
|
|
3275
|
+
l(e, !1);
|
|
3276
|
+
}, p = (e, t) => {
|
|
3277
|
+
l(t, e);
|
|
3278
|
+
}, m = (e) => {
|
|
3279
|
+
let t = s(e);
|
|
3280
|
+
return t ? ra(t) : !1;
|
|
3281
|
+
}, h = () => {
|
|
3282
|
+
i().forEach((e) => {
|
|
3283
|
+
a(e) && c(e);
|
|
3284
|
+
});
|
|
3285
|
+
}, g = (e) => {
|
|
3286
|
+
let t = e.target;
|
|
3287
|
+
if (!(t instanceof Element)) return;
|
|
3288
|
+
let n = o(t instanceof HTMLElement ? t : t.parentElement);
|
|
3289
|
+
!n || na(n) || !ea(n) || Qi(e) && (e.preventDefault(), u(n));
|
|
3290
|
+
}, _ = (e) => {
|
|
3291
|
+
let t = e.target;
|
|
3292
|
+
!(t instanceof HTMLElement) || !$i(t) || !a(t) || na(t) || Qi(e) && ia(t, t.checked);
|
|
3293
|
+
}, v = (e) => {
|
|
3294
|
+
if (!(e instanceof KeyboardEvent) || e.key !== "Enter" && e.key !== " ") return;
|
|
3295
|
+
let t = e.target;
|
|
3296
|
+
if (!(t instanceof Element)) return;
|
|
3297
|
+
let n = o(t instanceof HTMLElement ? t : t.parentElement);
|
|
3298
|
+
!n || na(n) || Qi(e) && (e.preventDefault(), u(n));
|
|
3299
|
+
}, y = !1, b = () => {
|
|
3300
|
+
y || (y = !0, requestAnimationFrame(() => {
|
|
3301
|
+
y = !1, h();
|
|
3302
|
+
}));
|
|
3303
|
+
}, x = typeof MutationObserver < "u" ? new MutationObserver(() => b()) : null;
|
|
3304
|
+
return r.addEventListener("click", g), r.addEventListener("change", _), r.addEventListener("keydown", v), x && n instanceof Node && x.observe(n, {
|
|
3305
|
+
childList: !0,
|
|
3306
|
+
subtree: !0,
|
|
3307
|
+
attributes: !0,
|
|
3308
|
+
attributeFilter: [
|
|
3309
|
+
"checkbox",
|
|
3310
|
+
"role",
|
|
3311
|
+
"aria-checked",
|
|
3312
|
+
"aria-disabled",
|
|
3313
|
+
"disabled",
|
|
3314
|
+
"type",
|
|
3315
|
+
"checked"
|
|
3316
|
+
]
|
|
3317
|
+
}), h(), {
|
|
3318
|
+
destroy: () => {
|
|
3319
|
+
r.removeEventListener("click", g), r.removeEventListener("change", _), r.removeEventListener("keydown", v), x?.disconnect();
|
|
3320
|
+
},
|
|
3321
|
+
sync: h,
|
|
3322
|
+
toggle: u,
|
|
3323
|
+
check: d,
|
|
3324
|
+
uncheck: f,
|
|
3325
|
+
setChecked: p,
|
|
3326
|
+
isChecked: m
|
|
3327
|
+
};
|
|
3328
|
+
}, sa = (e = {}) => oa(e), ca = null, la = !1, ua = null, da = () => {
|
|
3329
|
+
ua &&= (document.removeEventListener("DOMContentLoaded", ua), null);
|
|
3330
|
+
}, fa = () => typeof window > "u" || typeof document > "u" ? null : (la = !1, da(), ca ? (ca.sync(), ca) : (ca = oa(), ca)), pa = () => {
|
|
3331
|
+
la = !0, da(), ca?.destroy(), ca = null;
|
|
3332
|
+
};
|
|
3333
|
+
typeof window < "u" && typeof document < "u" && (document.readyState === "loading" ? (ua = () => {
|
|
3334
|
+
ua = null, la || fa();
|
|
3335
|
+
}, document.addEventListener("DOMContentLoaded", ua)) : fa());
|
|
3336
|
+
//#endregion
|
|
3337
|
+
//#region src/js/src/radio/radio-runtime.ts
|
|
3338
|
+
var ma = {
|
|
3339
|
+
root: typeof document < "u" ? document : {},
|
|
3340
|
+
radiogroupSelector: "[radiogroup]",
|
|
3341
|
+
radioSelector: "[radio]"
|
|
3342
|
+
}, ha = new Set(["ArrowRight", "ArrowDown"]), ga = new Set(["ArrowLeft", "ArrowUp"]), _a = (e) => Array.from(e), va = A(), ya = (e) => e instanceof HTMLInputElement && e.type === "radio", ba = (e) => e instanceof HTMLButtonElement, xa = (e) => ba(e) || ya(e), Sa = (e) => e.getAttribute("aria-disabled") === "true" || e instanceof HTMLButtonElement && e.disabled || e instanceof HTMLInputElement && e.disabled ? !0 : e.hasAttribute("disabled"), Ca = (e) => ya(e) && e.checked ? !0 : e.getAttribute("aria-checked") === "true", wa = (e, t) => {
|
|
3343
|
+
let n = t ? "true" : "false";
|
|
3344
|
+
e.getAttribute("aria-checked") !== n && e.setAttribute("aria-checked", n), ya(e) && e.checked !== t && (e.checked = t);
|
|
3345
|
+
}, Ta = () => ({
|
|
3346
|
+
destroy: () => {},
|
|
3347
|
+
sync: () => {},
|
|
3348
|
+
select: () => {},
|
|
3349
|
+
getChecked: () => null
|
|
3350
|
+
}), Ea = (e = {}) => {
|
|
3351
|
+
if (typeof window > "u" || typeof document > "u") return Ta();
|
|
3352
|
+
let t = {
|
|
3353
|
+
...ma,
|
|
3354
|
+
...e
|
|
3355
|
+
}, n = t.root ?? document, r = n, i = !1, a = () => _a(n.querySelectorAll(t.radiogroupSelector)), o = (e) => e?.matches(t.radiogroupSelector) ? n instanceof Document ? !0 : n instanceof Node ? n.contains(e) : a().includes(e) : !1, s = (e) => {
|
|
3356
|
+
if (!e) return null;
|
|
3357
|
+
let n = e.closest(t.radiogroupSelector);
|
|
3358
|
+
return !(n instanceof HTMLElement) || !o(n) ? null : n;
|
|
3359
|
+
}, c = (e) => _a(e.querySelectorAll(t.radioSelector)).filter((n) => xa(n) ? n.closest(t.radiogroupSelector) === e : !1), l = (e) => {
|
|
3360
|
+
if (!e?.matches(t.radioSelector) || !xa(e)) return !1;
|
|
3361
|
+
let n = e.closest(t.radiogroupSelector);
|
|
3362
|
+
return !(n instanceof HTMLElement) || n === e ? !1 : o(n);
|
|
3363
|
+
}, u = (e) => {
|
|
3364
|
+
if (!e) return null;
|
|
3365
|
+
if (l(e)) return e;
|
|
3366
|
+
let n = e.closest(t.radioSelector);
|
|
3367
|
+
return !(n instanceof HTMLElement) || !l(n) ? null : n;
|
|
3368
|
+
}, d = (e) => u(e instanceof HTMLElement ? e : e.parentElement), f = (e) => {
|
|
3369
|
+
e.getAttribute("role") !== "radio" && e.setAttribute("role", "radio"), ba(e) && !e.hasAttribute("type") && (e.type = "button");
|
|
3370
|
+
}, p = (e, t) => {
|
|
3371
|
+
let n = t && !Sa(t) ? t : e.find((e) => !Sa(e)) ?? null;
|
|
3372
|
+
e.forEach((e) => {
|
|
3373
|
+
let t = e === n ? "0" : "-1";
|
|
3374
|
+
e.getAttribute("tabindex") !== t && e.setAttribute("tabindex", t);
|
|
3375
|
+
});
|
|
3376
|
+
}, m = (e, t) => {
|
|
3377
|
+
e.getAttribute("role") !== "radiogroup" && e.setAttribute("role", "radiogroup");
|
|
3378
|
+
let n = c(e);
|
|
3379
|
+
i = !0;
|
|
3380
|
+
try {
|
|
3381
|
+
n.forEach((e) => {
|
|
3382
|
+
f(e), wa(e, e === t);
|
|
3383
|
+
}), p(n, t);
|
|
3384
|
+
} finally {
|
|
3385
|
+
i = !1;
|
|
3386
|
+
}
|
|
3387
|
+
}, h = (e) => {
|
|
3388
|
+
m(e, c(e).find((e) => Ca(e)) ?? null);
|
|
3389
|
+
}, g = (e) => {
|
|
3390
|
+
let t = u(e);
|
|
3391
|
+
if (!t || Sa(t)) return;
|
|
3392
|
+
let n = s(t);
|
|
3393
|
+
n && m(n, t);
|
|
3394
|
+
}, _ = (e) => {
|
|
3395
|
+
let t = null;
|
|
3396
|
+
return t = e ? o(e) ? e : s(e) : a().find((e) => o(e)) ?? null, t ? c(t).find((e) => Ca(e)) ?? null : null;
|
|
3397
|
+
}, v = () => {
|
|
3398
|
+
a().forEach((e) => {
|
|
3399
|
+
o(e) && h(e);
|
|
3400
|
+
});
|
|
3401
|
+
}, y = (e) => {
|
|
3402
|
+
let t = e.target;
|
|
3403
|
+
if (!(t instanceof Element)) return;
|
|
3404
|
+
let n = d(t);
|
|
3405
|
+
!n || Sa(n) || !ba(n) || va(e) && (e.preventDefault(), g(n));
|
|
3406
|
+
}, b = (e) => {
|
|
3407
|
+
let t = e.target;
|
|
3408
|
+
!(t instanceof HTMLElement) || !ya(t) || !l(t) || Sa(t) || i || t.checked && va(e) && g(t);
|
|
3409
|
+
}, x = (e, t) => {
|
|
3410
|
+
let n = s(e);
|
|
3411
|
+
if (!n) return;
|
|
3412
|
+
let r = c(n).filter((e) => !Sa(e));
|
|
3413
|
+
if (r.length === 0) return;
|
|
3414
|
+
let i = r.indexOf(e), a = r[((i < 0 ? t > 0 ? -1 : 0 : i) + t + r.length) % r.length];
|
|
3415
|
+
a && (g(a), a.focus());
|
|
3416
|
+
}, S = (e) => {
|
|
3417
|
+
if (!(e instanceof KeyboardEvent) || e.altKey || e.ctrlKey || e.metaKey) return;
|
|
3418
|
+
let t = e.target;
|
|
3419
|
+
if (!(t instanceof Element)) return;
|
|
3420
|
+
let n = d(t);
|
|
3421
|
+
if (!(!n || Sa(n))) {
|
|
3422
|
+
if (ha.has(e.key) || ga.has(e.key)) {
|
|
3423
|
+
if (!va(e)) return;
|
|
3424
|
+
e.preventDefault(), x(n, ha.has(e.key) ? 1 : -1);
|
|
3425
|
+
return;
|
|
3426
|
+
}
|
|
3427
|
+
e.key !== "Enter" && e.key !== " " || va(e) && (e.preventDefault(), g(n));
|
|
3428
|
+
}
|
|
3429
|
+
}, C = !1, w = () => {
|
|
3430
|
+
C || (C = !0, requestAnimationFrame(() => {
|
|
3431
|
+
C = !1, v();
|
|
3432
|
+
}));
|
|
3433
|
+
}, T = typeof MutationObserver < "u" ? new MutationObserver(() => w()) : null;
|
|
3434
|
+
return r.addEventListener("click", y), r.addEventListener("change", b), r.addEventListener("keydown", S), T && n instanceof Node && T.observe(n, {
|
|
3435
|
+
childList: !0,
|
|
3436
|
+
subtree: !0,
|
|
3437
|
+
attributes: !0,
|
|
3438
|
+
attributeFilter: [
|
|
3439
|
+
"radiogroup",
|
|
3440
|
+
"radio",
|
|
3441
|
+
"role",
|
|
3442
|
+
"aria-checked",
|
|
3443
|
+
"aria-disabled",
|
|
3444
|
+
"disabled",
|
|
3445
|
+
"type",
|
|
3446
|
+
"checked",
|
|
3447
|
+
"tabindex"
|
|
3448
|
+
]
|
|
3449
|
+
}), v(), {
|
|
3450
|
+
destroy: () => {
|
|
3451
|
+
r.removeEventListener("click", y), r.removeEventListener("change", b), r.removeEventListener("keydown", S), T?.disconnect();
|
|
3452
|
+
},
|
|
3453
|
+
sync: v,
|
|
3454
|
+
select: g,
|
|
3455
|
+
getChecked: _
|
|
3456
|
+
};
|
|
3457
|
+
}, Da = (e = {}) => Ea(e), Oa = null, ka = !1, Aa = null, ja = () => {
|
|
3458
|
+
Aa &&= (document.removeEventListener("DOMContentLoaded", Aa), null);
|
|
3459
|
+
}, Ma = () => typeof window > "u" || typeof document > "u" ? null : (ka = !1, ja(), Oa ? (Oa.sync(), Oa) : (Oa = Ea(), Oa)), Na = () => {
|
|
3460
|
+
ka = !0, ja(), Oa?.destroy(), Oa = null;
|
|
3461
|
+
};
|
|
3462
|
+
typeof window < "u" && typeof document < "u" && (document.readyState === "loading" ? (Aa = () => {
|
|
3463
|
+
Aa = null, ka || Ma();
|
|
3464
|
+
}, document.addEventListener("DOMContentLoaded", Aa)) : Ma());
|
|
3465
|
+
//#endregion
|
|
3466
|
+
//#region src/js/src/breadcrumb/breadcrumb-runtime.ts
|
|
3467
|
+
var Pa = {
|
|
3468
|
+
root: typeof document < "u" ? document : {},
|
|
3469
|
+
breadcrumbSelector: "[breadcrumb]",
|
|
3470
|
+
itemSelector: "[breadcrumb-item]"
|
|
3471
|
+
}, Fa = "a, [breadcrumb-link]", Ia = new Set([
|
|
3472
|
+
"OL",
|
|
3473
|
+
"UL",
|
|
3474
|
+
"MENU"
|
|
3475
|
+
]), La = (e) => Array.from(e), Ra = (e) => {
|
|
3476
|
+
let t = e.getAttribute("aria-label");
|
|
3477
|
+
if (t !== null && t.trim() !== "") return !0;
|
|
3478
|
+
let n = e.getAttribute("aria-labelledby");
|
|
3479
|
+
if (n !== null && n.trim() !== "") return !0;
|
|
3480
|
+
let r = e.getAttribute("title");
|
|
3481
|
+
return r !== null && r.trim() !== "";
|
|
3482
|
+
}, za = (e) => {
|
|
3483
|
+
let t = e.getAttribute("role");
|
|
3484
|
+
return t ? t === "navigation" : e.tagName === "NAV";
|
|
3485
|
+
}, Ba = () => ({
|
|
3486
|
+
destroy: () => {},
|
|
3487
|
+
sync: () => {},
|
|
3488
|
+
setCurrent: () => {}
|
|
3489
|
+
}), Va = (e = {}) => {
|
|
3490
|
+
if (typeof window > "u" || typeof document > "u") return Ba();
|
|
3491
|
+
let t = {
|
|
3492
|
+
...Pa,
|
|
3493
|
+
...e
|
|
3494
|
+
}, n = t.root ?? document, r = (e) => e?.matches(t.breadcrumbSelector) ? n instanceof Document ? !0 : n instanceof Node ? n === e || n.contains(e) : !1 : !1, i = () => {
|
|
3495
|
+
let e = La(n.querySelectorAll(t.breadcrumbSelector)).filter(r);
|
|
3496
|
+
return n instanceof HTMLElement && r(n) ? [n, ...e] : e;
|
|
3497
|
+
}, a = (e, n) => n.closest(t.breadcrumbSelector) === e, o = (e) => {
|
|
3498
|
+
let n = La(e.querySelectorAll(t.itemSelector)).filter((t) => a(e, t));
|
|
3499
|
+
return n.length ? n : La(e.children).filter((e) => e instanceof HTMLElement && e.matches(Fa));
|
|
3500
|
+
}, s = (e) => {
|
|
3501
|
+
let t = La(e.querySelectorAll("[aria-current=\"page\"]")).filter((t) => a(e, t));
|
|
3502
|
+
return e.getAttribute("aria-current") === "page" ? [e, ...t] : t;
|
|
3503
|
+
}, c = (e) => e.matches(t.itemSelector) ? La(e.querySelectorAll(Fa)).filter((n) => n.closest(t.itemSelector) === e) : [], l = (e) => {
|
|
3504
|
+
if (e.matches(Fa)) return e;
|
|
3505
|
+
let t = c(e);
|
|
3506
|
+
return t[t.length - 1] ?? e;
|
|
3507
|
+
}, u = (e) => {
|
|
3508
|
+
e.getAttribute("aria-current") !== "page" && e.setAttribute("aria-current", "page");
|
|
3509
|
+
}, d = (e, t) => {
|
|
3510
|
+
s(e).forEach((e) => {
|
|
3511
|
+
e !== t && e.removeAttribute("aria-current");
|
|
3512
|
+
});
|
|
3513
|
+
}, f = (e) => {
|
|
3514
|
+
let t = e.getAttribute("role"), n = Ia.has(e.tagName);
|
|
3515
|
+
!t && !n && e.tagName !== "NAV" && e.setAttribute("role", "navigation"), za(e) && !Ra(e) && e.setAttribute("aria-label", "Breadcrumb");
|
|
3516
|
+
}, p = (e) => {
|
|
3517
|
+
if (e) {
|
|
3518
|
+
if (r(e)) return e;
|
|
3519
|
+
let n = e.closest(t.breadcrumbSelector);
|
|
3520
|
+
return n instanceof HTMLElement && r(n) ? n : null;
|
|
3521
|
+
}
|
|
3522
|
+
return i()[0] ?? null;
|
|
3523
|
+
}, m = (e, t) => o(e).find((e) => e === t || e.contains(t)) ?? null, h = (e) => {
|
|
3524
|
+
f(e);
|
|
3525
|
+
let t = s(e);
|
|
3526
|
+
if (t.length > 0) {
|
|
3527
|
+
d(e, t[0]);
|
|
3528
|
+
return;
|
|
3529
|
+
}
|
|
3530
|
+
let n = o(e), r = n[n.length - 1];
|
|
3531
|
+
r && u(l(r));
|
|
3532
|
+
}, g = () => {
|
|
3533
|
+
i().forEach((e) => {
|
|
3534
|
+
r(e) && h(e);
|
|
3535
|
+
});
|
|
3536
|
+
}, _ = (e, t) => {
|
|
3537
|
+
let n = e instanceof HTMLElement ? e : null, r = p(t ?? n);
|
|
3538
|
+
if (!r) return;
|
|
3539
|
+
let i = typeof e == "number" ? o(r)[e] ?? null : m(r, e);
|
|
3540
|
+
if (!i || !r.contains(i)) return;
|
|
3541
|
+
let a = n && n !== i && i.contains(n) && n.matches(Fa) ? n : l(i);
|
|
3542
|
+
d(r, a), u(a);
|
|
3543
|
+
}, v = !1, y = 0, b = () => {
|
|
3544
|
+
v || (v = !0, y = requestAnimationFrame(() => {
|
|
3545
|
+
v = !1, g();
|
|
3546
|
+
}));
|
|
3547
|
+
}, x = typeof MutationObserver < "u" ? new MutationObserver(() => b()) : null;
|
|
3548
|
+
return x && n instanceof Node && x.observe(n, {
|
|
3549
|
+
childList: !0,
|
|
3550
|
+
subtree: !0,
|
|
3551
|
+
attributes: !0,
|
|
3552
|
+
attributeFilter: [
|
|
3553
|
+
"breadcrumb",
|
|
3554
|
+
"breadcrumb-item",
|
|
3555
|
+
"breadcrumb-link",
|
|
3556
|
+
"aria-current",
|
|
3557
|
+
"aria-label",
|
|
3558
|
+
"aria-labelledby",
|
|
3559
|
+
"role",
|
|
3560
|
+
"title"
|
|
3561
|
+
]
|
|
3562
|
+
}), g(), {
|
|
3563
|
+
destroy: () => {
|
|
3564
|
+
v &&= (cancelAnimationFrame(y), !1), x?.disconnect();
|
|
3565
|
+
},
|
|
3566
|
+
sync: g,
|
|
3567
|
+
setCurrent: _
|
|
3568
|
+
};
|
|
3569
|
+
}, Ha = (e = {}) => Va(e), Ua = null, Wa = !1, Ga = null, Ka = () => {
|
|
3570
|
+
!Ga || typeof document > "u" || (document.removeEventListener("DOMContentLoaded", Ga), Ga = null);
|
|
3571
|
+
}, qa = () => typeof window > "u" || typeof document > "u" ? null : (Wa = !1, Ka(), Ua ? (Ua.sync(), Ua) : (Ua = Va(), Ua)), Ja = () => {
|
|
3572
|
+
Wa = !0, Ka(), Ua?.destroy(), Ua = null;
|
|
3573
|
+
};
|
|
3574
|
+
typeof window < "u" && typeof document < "u" && (document.readyState === "loading" ? (Ga = () => {
|
|
3575
|
+
Ga = null, Wa || qa();
|
|
3576
|
+
}, document.addEventListener("DOMContentLoaded", Ga)) : qa());
|
|
3577
|
+
//#endregion
|
|
3578
|
+
//#region src/js/src/progress/progress-runtime.ts
|
|
3579
|
+
var Ya = {
|
|
3580
|
+
root: typeof document < "u" ? document : {},
|
|
3581
|
+
progressSelector: "[progress]"
|
|
3582
|
+
}, Xa = (e) => Array.from(e), Za = (e, t, n) => Math.min(n, Math.max(t, e)), Qa = (e) => {
|
|
3583
|
+
if (!Number.isFinite(e) || Object.is(e, -0)) return "0";
|
|
3584
|
+
let t = Math.round(e * 1e6) / 1e6;
|
|
3585
|
+
return String(t);
|
|
3586
|
+
}, $a = (e, t) => {
|
|
3587
|
+
let n = e.getAttribute(t);
|
|
3588
|
+
if (n == null) return null;
|
|
3589
|
+
let r = n.trim();
|
|
3590
|
+
if (r === "") return null;
|
|
3591
|
+
let i = Number(r);
|
|
3592
|
+
return Number.isFinite(i) ? i : null;
|
|
3593
|
+
}, eo = (e, t, n) => n === t ? 0 : Za((e - t) / (n - t), 0, 1), to = /* @__PURE__ */ new WeakMap(), no = (e) => {
|
|
3594
|
+
let t = to.get(e);
|
|
3595
|
+
return t || (t = {
|
|
3596
|
+
value: null,
|
|
3597
|
+
hidValueNow: !1
|
|
3598
|
+
}, to.set(e, t)), t;
|
|
3599
|
+
}, ro = (e) => {
|
|
3600
|
+
let t = $a(e, "aria-valuemin") ?? 0, n = $a(e, "aria-valuemax") ?? 100;
|
|
3601
|
+
return {
|
|
3602
|
+
min: t,
|
|
3603
|
+
max: n < t ? t : n
|
|
3604
|
+
};
|
|
3605
|
+
}, io = (e) => e.getAttribute("progress") === "indeterminate", ao = (e, t) => {
|
|
3606
|
+
let { min: n, max: r } = ro(e), i = no(e), a = $a(e, "aria-valuenow"), o;
|
|
3607
|
+
return o = t != null && Number.isFinite(t) ? Za(t, n, r) : a == null ? i.hidValueNow && i.value != null ? Za(i.value, n, r) : n : Za(a, n, r), {
|
|
3608
|
+
min: n,
|
|
3609
|
+
max: r,
|
|
3610
|
+
value: o
|
|
3611
|
+
};
|
|
3612
|
+
}, oo = () => ({
|
|
3613
|
+
destroy: () => {},
|
|
3614
|
+
sync: () => {},
|
|
3615
|
+
setValue: () => {},
|
|
3616
|
+
getValue: () => 0,
|
|
3617
|
+
setIndeterminate: () => {},
|
|
3618
|
+
isIndeterminate: () => !1
|
|
3619
|
+
}), so = (e = {}) => {
|
|
3620
|
+
if (typeof window > "u" || typeof document > "u") return oo();
|
|
3621
|
+
let t = {
|
|
3622
|
+
...Ya,
|
|
3623
|
+
...e
|
|
3624
|
+
}, n = t.root ?? document, r = !1, i = (e) => e?.matches(t.progressSelector) ? n instanceof Document ? !0 : n instanceof Node ? n === e || n.contains(e) : !1 : !1, a = () => {
|
|
3625
|
+
let e = Xa(n.querySelectorAll(t.progressSelector)).filter(i);
|
|
3626
|
+
return n instanceof HTMLElement && i(n) ? [n, ...e.filter((e) => e !== n)] : e;
|
|
3627
|
+
}, o = (e) => {
|
|
3628
|
+
if (!e) return null;
|
|
3629
|
+
let n = e.closest(t.progressSelector);
|
|
3630
|
+
return !(n instanceof HTMLElement) || !i(n) ? null : n;
|
|
3631
|
+
}, s = (e) => {
|
|
3632
|
+
if (e) {
|
|
3633
|
+
if (i(e)) return e;
|
|
3634
|
+
let t = o(e);
|
|
3635
|
+
if (t) return t;
|
|
3636
|
+
}
|
|
3637
|
+
return a().find((e) => i(e)) ?? null;
|
|
3638
|
+
}, c = (e, t) => {
|
|
3639
|
+
let n = io(e), { min: r, max: i, value: a } = ao(e, t), o = no(e);
|
|
3640
|
+
o.value = a, o.hidValueNow = n, e.getAttribute("role") !== "progressbar" && e.setAttribute("role", "progressbar");
|
|
3641
|
+
let s = Qa(r), c = Qa(i), l = Qa(a);
|
|
3642
|
+
e.getAttribute("aria-valuemin") !== s && e.setAttribute("aria-valuemin", s), e.getAttribute("aria-valuemax") !== c && e.setAttribute("aria-valuemax", c), n ? e.hasAttribute("aria-valuenow") && e.removeAttribute("aria-valuenow") : e.getAttribute("aria-valuenow") !== l && e.setAttribute("aria-valuenow", l);
|
|
3643
|
+
let u = Qa(eo(a, r, i));
|
|
3644
|
+
e.style.getPropertyValue("--juice-progress-ratio").trim() !== u && e.style.setProperty("--juice-progress-ratio", u);
|
|
3645
|
+
}, l = () => {
|
|
3646
|
+
r || a().forEach((e) => {
|
|
3647
|
+
i(e) && c(e);
|
|
3648
|
+
});
|
|
3649
|
+
}, u = (e, t) => {
|
|
3650
|
+
if (!Number.isFinite(e)) return;
|
|
3651
|
+
let n = s(t);
|
|
3652
|
+
n && c(n, e);
|
|
3653
|
+
}, d = (e) => {
|
|
3654
|
+
let t = s(e);
|
|
3655
|
+
return t ? ao(t).value : 0;
|
|
3656
|
+
}, f = (e, t) => {
|
|
3657
|
+
let n = s(t);
|
|
3658
|
+
n && (e ? n.getAttribute("progress") !== "indeterminate" && n.setAttribute("progress", "indeterminate") : n.getAttribute("progress") !== "" && n.setAttribute("progress", ""), c(n));
|
|
3659
|
+
}, p = (e) => {
|
|
3660
|
+
let t = s(e);
|
|
3661
|
+
return t ? io(t) : !1;
|
|
3662
|
+
}, m = !1, h = 0, g = () => {
|
|
3663
|
+
m || r || (m = !0, h = requestAnimationFrame(() => {
|
|
3664
|
+
m = !1, l();
|
|
3665
|
+
}));
|
|
3666
|
+
}, _ = typeof MutationObserver < "u" ? new MutationObserver(() => g()) : null;
|
|
3667
|
+
return _ && n instanceof Node && _.observe(n, {
|
|
3668
|
+
childList: !0,
|
|
3669
|
+
subtree: !0,
|
|
3670
|
+
attributes: !0,
|
|
3671
|
+
attributeFilter: [
|
|
3672
|
+
"progress",
|
|
3673
|
+
"role",
|
|
3674
|
+
"aria-valuemin",
|
|
3675
|
+
"aria-valuemax",
|
|
3676
|
+
"aria-valuenow",
|
|
3677
|
+
"aria-valuetext"
|
|
3678
|
+
]
|
|
3679
|
+
}), l(), {
|
|
3680
|
+
destroy: () => {
|
|
3681
|
+
r = !0, m &&= (cancelAnimationFrame(h), !1), _?.disconnect();
|
|
3682
|
+
},
|
|
3683
|
+
sync: l,
|
|
3684
|
+
setValue: u,
|
|
3685
|
+
getValue: d,
|
|
3686
|
+
setIndeterminate: f,
|
|
3687
|
+
isIndeterminate: p
|
|
3688
|
+
};
|
|
3689
|
+
}, co = (e = {}) => so(e), lo = null, uo = !1, fo = null, po = () => {
|
|
3690
|
+
!fo || typeof document > "u" || (document.removeEventListener("DOMContentLoaded", fo), fo = null);
|
|
3691
|
+
}, mo = () => typeof window > "u" || typeof document > "u" ? null : (uo = !1, po(), lo ? (lo.sync(), lo) : (lo = so(), lo)), ho = () => {
|
|
3692
|
+
uo = !0, po(), lo?.destroy(), lo = null;
|
|
3693
|
+
};
|
|
3694
|
+
typeof window < "u" && typeof document < "u" && (document.readyState === "loading" ? (fo = () => {
|
|
3695
|
+
fo = null, uo || mo();
|
|
3696
|
+
}, document.addEventListener("DOMContentLoaded", fo)) : mo());
|
|
3697
|
+
//#endregion
|
|
3698
|
+
//#region src/js/src/pagination/pagination-runtime.ts
|
|
3699
|
+
var go = {
|
|
3700
|
+
root: typeof document < "u" ? document : {},
|
|
3701
|
+
paginationSelector: "[pagination]",
|
|
3702
|
+
itemSelector: "[pagination-item]"
|
|
3703
|
+
}, _o = new Set([
|
|
3704
|
+
"OL",
|
|
3705
|
+
"UL",
|
|
3706
|
+
"MENU"
|
|
3707
|
+
]), vo = new Set(["ArrowRight", "ArrowDown"]), yo = new Set(["ArrowLeft", "ArrowUp"]), bo = "a, button, [pagination-link]", xo = (e) => Array.from(e), So = A(), Co = /* @__PURE__ */ new WeakSet(), wo = /* @__PURE__ */ new WeakSet(), To = (e) => {
|
|
3708
|
+
let t = e.getAttribute("aria-label");
|
|
3709
|
+
if (t !== null && t.trim() !== "") return !0;
|
|
3710
|
+
let n = e.getAttribute("aria-labelledby");
|
|
3711
|
+
if (n !== null && n.trim() !== "") return !0;
|
|
3712
|
+
let r = e.getAttribute("title");
|
|
3713
|
+
return r !== null && r.trim() !== "";
|
|
3714
|
+
}, Eo = (e) => {
|
|
3715
|
+
let t = e.getAttribute("role");
|
|
3716
|
+
return t ? t === "navigation" : e.tagName === "NAV";
|
|
3717
|
+
}, Do = (e) => e instanceof HTMLElement ? e instanceof HTMLInputElement || e instanceof HTMLTextAreaElement || e instanceof HTMLSelectElement ? !0 : e.isContentEditable : !1, Oo = (e) => e.getAttribute("aria-disabled") === "true" || e instanceof HTMLButtonElement && e.disabled || e instanceof HTMLInputElement && e.disabled ? !0 : e.hasAttribute("disabled"), ko = (e) => {
|
|
3718
|
+
let t = [e.textContent, e.getAttribute("aria-label")];
|
|
3719
|
+
for (let e of t) {
|
|
3720
|
+
let t = e?.trim() ?? "";
|
|
3721
|
+
if (/^\d+$/.test(t)) return Number(t);
|
|
3722
|
+
}
|
|
3723
|
+
return null;
|
|
3724
|
+
}, Ao = () => ({
|
|
3725
|
+
destroy: () => {},
|
|
3726
|
+
sync: () => {},
|
|
3727
|
+
setCurrent: () => {}
|
|
3728
|
+
}), jo = (e = {}) => {
|
|
3729
|
+
if (typeof window > "u" || typeof document > "u") return Ao();
|
|
3730
|
+
let t = {
|
|
3731
|
+
...go,
|
|
3732
|
+
...e
|
|
3733
|
+
}, n = t.root ?? document, r = n, i = [
|
|
3734
|
+
t.itemSelector,
|
|
3735
|
+
"[pagination-prev]",
|
|
3736
|
+
"[pagination-next]",
|
|
3737
|
+
"[pagination-ellipsis]",
|
|
3738
|
+
"[pagination-status]",
|
|
3739
|
+
"[pagination-link]",
|
|
3740
|
+
"a",
|
|
3741
|
+
"button"
|
|
3742
|
+
].join(", "), a = (e) => e?.matches(t.paginationSelector) ? n instanceof Document ? !0 : n instanceof Node ? n === e || n.contains(e) : !1 : !1, o = () => {
|
|
3743
|
+
let e = xo(n.querySelectorAll(t.paginationSelector)).filter(a);
|
|
3744
|
+
return n instanceof HTMLElement && a(n) ? [n, ...e] : e;
|
|
3745
|
+
}, s = (e, n) => n.closest(t.paginationSelector) === e, c = (e, t, n) => {
|
|
3746
|
+
if (t.matches(n)) return !0;
|
|
3747
|
+
let r = t.querySelector(n);
|
|
3748
|
+
return !!(r && s(e, r));
|
|
3749
|
+
}, l = (e, t) => c(e, t, "[pagination-ellipsis]") ? "ellipsis" : c(e, t, "[pagination-status]") ? "status" : c(e, t, "[pagination-prev]") ? "prev" : c(e, t, "[pagination-next]") ? "next" : "page", u = (e, t) => t.matches(bo) && !t.matches("[pagination-ellipsis], [pagination-status]") ? t : xo(t.querySelectorAll(bo)).find((t) => s(e, t) && !t.closest("[pagination-ellipsis], [pagination-status]")) ?? t, d = (e) => {
|
|
3750
|
+
let t = xo(e.querySelectorAll(i)).filter((t) => s(e, t)), n = [];
|
|
3751
|
+
return t.forEach((t) => {
|
|
3752
|
+
n.some((e) => e.element.contains(t)) || n.push({
|
|
3753
|
+
element: t,
|
|
3754
|
+
kind: l(e, t),
|
|
3755
|
+
target: u(e, t)
|
|
3756
|
+
});
|
|
3757
|
+
}), n;
|
|
3758
|
+
}, f = (e) => {
|
|
3759
|
+
let t = xo(e.querySelectorAll("[aria-current=\"page\"]")).filter((t) => s(e, t));
|
|
3760
|
+
return e.getAttribute("aria-current") === "page" ? [e, ...t] : t;
|
|
3761
|
+
}, p = (e) => {
|
|
3762
|
+
e.getAttribute("aria-current") !== "page" && e.setAttribute("aria-current", "page");
|
|
3763
|
+
}, m = (e, t) => {
|
|
3764
|
+
f(e).forEach((e) => {
|
|
3765
|
+
e !== t && e.removeAttribute("aria-current");
|
|
3766
|
+
});
|
|
3767
|
+
}, h = (e) => {
|
|
3768
|
+
let t = e.getAttribute("role"), n = _o.has(e.tagName);
|
|
3769
|
+
!t && !n && e.tagName !== "NAV" && e.setAttribute("role", "navigation"), Eo(e) && !To(e) && e.setAttribute("aria-label", "Pagination");
|
|
3770
|
+
}, g = (e) => Oo(e.target) || e.element !== e.target && Oo(e.element), _ = (e) => {
|
|
3771
|
+
let t = e.target;
|
|
3772
|
+
if (!Co.has(t)) {
|
|
3773
|
+
if (wo.has(t)) {
|
|
3774
|
+
g(e) || wo.delete(t);
|
|
3775
|
+
return;
|
|
3776
|
+
}
|
|
3777
|
+
g(e) && wo.add(t);
|
|
3778
|
+
}
|
|
3779
|
+
}, v = (e, t) => {
|
|
3780
|
+
if (!wo.has(e)) {
|
|
3781
|
+
if (t) {
|
|
3782
|
+
Co.add(e), e.getAttribute("aria-disabled") !== "true" && e.setAttribute("aria-disabled", "true"), e instanceof HTMLButtonElement && !e.disabled && (e.disabled = !0);
|
|
3783
|
+
return;
|
|
3784
|
+
}
|
|
3785
|
+
Co.has(e) && (Co.delete(e), e.getAttribute("aria-disabled") === "true" && e.removeAttribute("aria-disabled"), e instanceof HTMLButtonElement && e.disabled && (e.disabled = !1));
|
|
3786
|
+
}
|
|
3787
|
+
}, y = (e, t) => {
|
|
3788
|
+
let n = f(e);
|
|
3789
|
+
if (n.length > 0) {
|
|
3790
|
+
m(e, n[0]);
|
|
3791
|
+
return;
|
|
3792
|
+
}
|
|
3793
|
+
let r = t.find((e) => e.kind === "page");
|
|
3794
|
+
r && p(r.target);
|
|
3795
|
+
}, b = (e, t) => {
|
|
3796
|
+
let n = t.filter((e) => e.kind === "page"), r = f(e)[0] ?? null, i = r ? n.find((e) => e.element === r || e.target === r || e.element.contains(r)) ?? null : null, a = !1, o = !1;
|
|
3797
|
+
if (i) {
|
|
3798
|
+
let e = t.indexOf(i), r = t.some((t, n) => t.kind === "ellipsis" && n < e), s = t.some((t, n) => t.kind === "ellipsis" && n > e);
|
|
3799
|
+
a = i === n[0] && !r, o = i === n[n.length - 1] && !s, (ko(i.target) === 1 || ko(i.element) === 1) && (a = !0);
|
|
3800
|
+
}
|
|
3801
|
+
let s = !!i;
|
|
3802
|
+
t.forEach((e) => {
|
|
3803
|
+
if (e.kind !== "prev" && e.kind !== "next") return;
|
|
3804
|
+
_(e);
|
|
3805
|
+
let t = s && (e.kind === "prev" ? a : o);
|
|
3806
|
+
v(e.target, t);
|
|
3807
|
+
});
|
|
3808
|
+
}, x = (e) => {
|
|
3809
|
+
if (!a(e)) return;
|
|
3810
|
+
h(e);
|
|
3811
|
+
let t = d(e);
|
|
3812
|
+
y(e, t), b(e, t);
|
|
3813
|
+
}, S = () => {
|
|
3814
|
+
o().forEach((e) => {
|
|
3815
|
+
x(e);
|
|
3816
|
+
});
|
|
3817
|
+
}, C = (e) => {
|
|
3818
|
+
if (e) {
|
|
3819
|
+
if (a(e)) return e;
|
|
3820
|
+
let n = e.closest(t.paginationSelector);
|
|
3821
|
+
return n instanceof HTMLElement && a(n) ? n : null;
|
|
3822
|
+
}
|
|
3823
|
+
return o()[0] ?? null;
|
|
3824
|
+
}, w = (e, t) => {
|
|
3825
|
+
let n = e instanceof HTMLElement ? e : null, r = C(t ?? n);
|
|
3826
|
+
if (!r) return;
|
|
3827
|
+
let i = d(r).filter((e) => e.kind === "page"), a = typeof e == "number" ? Number.isInteger(e) ? i[e] ?? null : null : i.find((t) => t.element === e || t.target === e || t.element.contains(e)) ?? null;
|
|
3828
|
+
if (!a || !r.contains(a.element)) return;
|
|
3829
|
+
let o = n && n !== a.element && a.element.contains(n) && n.matches(bo) ? n : a.target;
|
|
3830
|
+
m(r, o), p(o), x(r);
|
|
3831
|
+
}, T = (e) => {
|
|
3832
|
+
let t = /* @__PURE__ */ new Set();
|
|
3833
|
+
return d(e).filter((e) => e.kind !== "page" && e.kind !== "prev" && e.kind !== "next" || t.has(e.target) ? !1 : (t.add(e.target), !0));
|
|
3834
|
+
}, E = (e) => {
|
|
3835
|
+
let t = e.closest(bo);
|
|
3836
|
+
return !(t instanceof HTMLElement) || t.matches("[pagination-ellipsis], [pagination-status]") || t.closest("[pagination-ellipsis], [pagination-status]") ? null : t;
|
|
3837
|
+
}, D = (e) => {
|
|
3838
|
+
let n = e.target;
|
|
3839
|
+
if (!(n instanceof Element)) return;
|
|
3840
|
+
let r = E(n);
|
|
3841
|
+
if (!r) return;
|
|
3842
|
+
let i = r.closest(t.paginationSelector);
|
|
3843
|
+
if (!(i instanceof HTMLElement) || !a(i)) return;
|
|
3844
|
+
let o = d(i).find((e) => e.target === r);
|
|
3845
|
+
(Oo(r) || o && g(o)) && So(e) && e.preventDefault();
|
|
3846
|
+
}, O = (e) => {
|
|
3847
|
+
if (!(e instanceof KeyboardEvent) || e.altKey || e.ctrlKey || e.metaKey || e.shiftKey || e.defaultPrevented) return;
|
|
3848
|
+
let n = e.target;
|
|
3849
|
+
if (!(n instanceof Element) || Do(n)) return;
|
|
3850
|
+
let r = E(n);
|
|
3851
|
+
if (!r) return;
|
|
3852
|
+
let i = r.closest(t.paginationSelector);
|
|
3853
|
+
if (!(i instanceof HTMLElement) || !a(i)) return;
|
|
3854
|
+
let o = T(i), s = o.findIndex((e) => e.target === r);
|
|
3855
|
+
if (s < 0) return;
|
|
3856
|
+
let c = (e) => !g(e), l;
|
|
3857
|
+
if (e.key === "Home") l = o.find(c);
|
|
3858
|
+
else if (e.key === "End") l = [...o].reverse().find(c);
|
|
3859
|
+
else if (vo.has(e.key)) l = o.slice(s + 1).find(c);
|
|
3860
|
+
else if (yo.has(e.key)) l = o.slice(0, s).reverse().find(c);
|
|
3861
|
+
else return;
|
|
3862
|
+
So(e) && (e.preventDefault(), l && l.target !== r && l.target.focus());
|
|
3863
|
+
}, k = !1, A = !1, j = 0, M = () => {
|
|
3864
|
+
k || A || (A = !0, j = requestAnimationFrame(() => {
|
|
3865
|
+
A = !1, k || S();
|
|
3866
|
+
}));
|
|
3867
|
+
}, N = typeof MutationObserver < "u" ? new MutationObserver(() => M()) : null;
|
|
3868
|
+
return r.addEventListener("click", D), r.addEventListener("keydown", O), N && n instanceof Node && N.observe(n, {
|
|
3869
|
+
childList: !0,
|
|
3870
|
+
subtree: !0,
|
|
3871
|
+
attributes: !0,
|
|
3872
|
+
attributeFilter: [
|
|
3873
|
+
"pagination",
|
|
3874
|
+
"pagination-item",
|
|
3875
|
+
"pagination-link",
|
|
3876
|
+
"pagination-prev",
|
|
3877
|
+
"pagination-next",
|
|
3878
|
+
"pagination-ellipsis",
|
|
3879
|
+
"pagination-status",
|
|
3880
|
+
"aria-current",
|
|
3881
|
+
"aria-label",
|
|
3882
|
+
"aria-labelledby",
|
|
3883
|
+
"aria-disabled",
|
|
3884
|
+
"disabled",
|
|
3885
|
+
"role",
|
|
3886
|
+
"title"
|
|
3887
|
+
]
|
|
3888
|
+
}), S(), {
|
|
3889
|
+
destroy: () => {
|
|
3890
|
+
k = !0, A &&= (cancelAnimationFrame(j), !1), N?.disconnect(), r.removeEventListener("click", D), r.removeEventListener("keydown", O);
|
|
3891
|
+
},
|
|
3892
|
+
sync: S,
|
|
3893
|
+
setCurrent: w
|
|
3894
|
+
};
|
|
3895
|
+
}, Mo = (e = {}) => jo(e), No = null, Po = !1, Fo = null, Io = () => {
|
|
3896
|
+
!Fo || typeof document > "u" || (document.removeEventListener("DOMContentLoaded", Fo), Fo = null);
|
|
3897
|
+
}, Lo = () => typeof window > "u" || typeof document > "u" ? null : (Po = !1, Io(), No ? (No.sync(), No) : (No = jo(), No)), Ro = () => {
|
|
3898
|
+
Po = !0, Io(), No?.destroy(), No = null;
|
|
2903
3899
|
};
|
|
2904
|
-
typeof window < "u" && typeof document < "u" && (document.readyState === "loading" ? (
|
|
2905
|
-
|
|
2906
|
-
}, document.addEventListener("DOMContentLoaded",
|
|
3900
|
+
typeof window < "u" && typeof document < "u" && (document.readyState === "loading" ? (Fo = () => {
|
|
3901
|
+
Fo = null, Po || Lo();
|
|
3902
|
+
}, document.addEventListener("DOMContentLoaded", Fo)) : Lo());
|
|
2907
3903
|
//#endregion
|
|
2908
3904
|
//#region src/tokens/index.ts
|
|
2909
|
-
var
|
|
3905
|
+
var zo = {
|
|
2910
3906
|
colors: {
|
|
2911
3907
|
families: [
|
|
2912
3908
|
"black",
|
|
@@ -3074,4 +4070,4 @@ var ri = {
|
|
|
3074
4070
|
themes: {}
|
|
3075
4071
|
};
|
|
3076
4072
|
//#endregion
|
|
3077
|
-
export { v as Accordion, te as createAccordion,
|
|
4073
|
+
export { v as Accordion, te as createAccordion, Ar as createBanner, Va as createBreadcrumb, oa as createCheckbox, fr as createCombobox, $e as createDrawer, Xr as createMenu, Le as createModal, T as createNavigation, jo as createPagination, qt as createPopover, so as createProgress, Ea as createRadio, Hi as createSlider, mi as createSwitch, ge as createTabs, bt as createToast, xn as createTooltip, Hn as createWizard, ne as initAccordion, jr as initBanner, Ha as initBreadcrumb, sa as initCheckbox, pr as initCombobox, et as initDrawer, Zr as initMenu, Re as initModal, E as initNavigation, Mo as initPagination, Jt as initPopover, co as initProgress, Da as initRadio, Ui as initSlider, hi as initSwitch, _e as initTabs, xt as initToast, Sn as initTooltip, Un as initWizard, oe as startAccordionRuntime, Ir as startBannerRuntime, qa as startBreadcrumbRuntime, fa as startCheckboxRuntime, vr as startComboboxRuntime, at as startDrawerRuntime, ni as startMenuRuntime, Ue as startModalRuntime, O as startNavigationRuntime, Lo as startPaginationRuntime, $t as startPopoverRuntime, mo as startProgressRuntime, Ma as startRadioRuntime, Ji as startSliderRuntime, bi as startSwitchRuntime, Se as startTabsRuntime, Et as startToastRuntime, Dn as startTooltipRuntime, Jn as startWizardRuntime, se as stopAccordionRuntime, Lr as stopBannerRuntime, Ja as stopBreadcrumbRuntime, pa as stopCheckboxRuntime, yr as stopComboboxRuntime, ot as stopDrawerRuntime, ri as stopMenuRuntime, We as stopModalRuntime, k as stopNavigationRuntime, Ro as stopPaginationRuntime, en as stopPopoverRuntime, ho as stopProgressRuntime, Na as stopRadioRuntime, Yi as stopSliderRuntime, xi as stopSwitchRuntime, Ce as stopTabsRuntime, Dt as stopToastRuntime, On as stopTooltipRuntime, Yn as stopWizardRuntime, zo as tokens };
|