@medixdeck/ui 0.1.15 → 0.1.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +7 -7
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +7 -1
- package/dist/index.js +646 -644
- package/dist/index.js.map +1 -1
- package/dist/manifest.json +22 -0
- package/dist/sw.js +12 -0
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -9,17 +9,17 @@ var Ka = (e, t, n, o, r, s, i, l) => {
|
|
|
9
9
|
(Array.isArray(e) ? e : [e]).forEach((y) => {
|
|
10
10
|
let b = y === "class", x = b && s ? r.map((v) => s[v] || v) : r;
|
|
11
11
|
b ? (c.classList.remove(...x), c.classList.add(s && s[m] ? s[m] : m)) : c.setAttribute(y, m);
|
|
12
|
-
}),
|
|
12
|
+
}), h(m);
|
|
13
13
|
}
|
|
14
|
-
function
|
|
14
|
+
function h(m) {
|
|
15
15
|
l && u.includes(m) && (c.style.colorScheme = m);
|
|
16
16
|
}
|
|
17
|
-
function
|
|
17
|
+
function p() {
|
|
18
18
|
return window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light";
|
|
19
19
|
}
|
|
20
20
|
if (o) d(o);
|
|
21
21
|
else try {
|
|
22
|
-
let m = localStorage.getItem(t) || n, y = i && m === "system" ?
|
|
22
|
+
let m = localStorage.getItem(t) || n, y = i && m === "system" ? p() : m;
|
|
23
23
|
d(y);
|
|
24
24
|
} catch {
|
|
25
25
|
}
|
|
@@ -27,43 +27,43 @@ var Ka = (e, t, n, o, r, s, i, l) => {
|
|
|
27
27
|
}, themes: [] }, Xa = () => {
|
|
28
28
|
var e;
|
|
29
29
|
return (e = _.useContext(Xn)) != null ? e : Za;
|
|
30
|
-
}, qa = (e) => _.useContext(Xn) ? _.createElement(_.Fragment, null, e.children) : _.createElement(Qa, { ...e }), Ja = ["light", "dark"], Qa = ({ forcedTheme: e, disableTransitionOnChange: t = !1, enableSystem: n = !0, enableColorScheme: o = !0, storageKey: r = "theme", themes: s = Ja, defaultTheme: i = n ? "system" : "light", attribute: l = "data-theme", value: c, children: u, nonce: d, scriptProps:
|
|
31
|
-
let [
|
|
32
|
-
let
|
|
33
|
-
if (!
|
|
34
|
-
k === "system" && n && (
|
|
35
|
-
let T = c ? c[
|
|
30
|
+
}, qa = (e) => _.useContext(Xn) ? _.createElement(_.Fragment, null, e.children) : _.createElement(Qa, { ...e }), Ja = ["light", "dark"], Qa = ({ forcedTheme: e, disableTransitionOnChange: t = !1, enableSystem: n = !0, enableColorScheme: o = !0, storageKey: r = "theme", themes: s = Ja, defaultTheme: i = n ? "system" : "light", attribute: l = "data-theme", value: c, children: u, nonce: d, scriptProps: h }) => {
|
|
31
|
+
let [p, m] = _.useState(() => tl(r, i)), [y, b] = _.useState(() => p === "system" ? en() : p), x = c ? Object.values(c) : s, v = _.useCallback((k) => {
|
|
32
|
+
let M = k;
|
|
33
|
+
if (!M) return;
|
|
34
|
+
k === "system" && n && (M = en());
|
|
35
|
+
let T = c ? c[M] : M, S = t ? nl(d) : null, F = document.documentElement, L = (I) => {
|
|
36
36
|
I === "class" ? (F.classList.remove(...x), T && F.classList.add(T)) : I.startsWith("data-") && (T ? F.setAttribute(I, T) : F.removeAttribute(I));
|
|
37
37
|
};
|
|
38
|
-
if (Array.isArray(l) ? l.forEach(
|
|
39
|
-
let I = Mo.includes(i) ? i : null, E = Mo.includes(
|
|
38
|
+
if (Array.isArray(l) ? l.forEach(L) : L(l), o) {
|
|
39
|
+
let I = Mo.includes(i) ? i : null, E = Mo.includes(M) ? M : I;
|
|
40
40
|
F.style.colorScheme = E;
|
|
41
41
|
}
|
|
42
42
|
S == null || S();
|
|
43
43
|
}, [d]), w = _.useCallback((k) => {
|
|
44
|
-
let
|
|
45
|
-
m(
|
|
44
|
+
let M = typeof k == "function" ? k(p) : k;
|
|
45
|
+
m(M);
|
|
46
46
|
try {
|
|
47
|
-
localStorage.setItem(r,
|
|
47
|
+
localStorage.setItem(r, M);
|
|
48
48
|
} catch {
|
|
49
49
|
}
|
|
50
|
-
}, [
|
|
51
|
-
let
|
|
52
|
-
b(
|
|
53
|
-
}, [
|
|
50
|
+
}, [p]), C = _.useCallback((k) => {
|
|
51
|
+
let M = en(k);
|
|
52
|
+
b(M), p === "system" && n && !e && v("system");
|
|
53
|
+
}, [p, e]);
|
|
54
54
|
_.useEffect(() => {
|
|
55
55
|
let k = window.matchMedia(ai);
|
|
56
56
|
return k.addListener(C), C(k), () => k.removeListener(C);
|
|
57
57
|
}, [C]), _.useEffect(() => {
|
|
58
|
-
let k = (
|
|
59
|
-
|
|
58
|
+
let k = (M) => {
|
|
59
|
+
M.key === r && (M.newValue ? m(M.newValue) : w(i));
|
|
60
60
|
};
|
|
61
61
|
return window.addEventListener("storage", k), () => window.removeEventListener("storage", k);
|
|
62
62
|
}, [w]), _.useEffect(() => {
|
|
63
|
-
v(e ??
|
|
64
|
-
}, [e,
|
|
65
|
-
let D = _.useMemo(() => ({ theme:
|
|
66
|
-
return _.createElement(Xn.Provider, { value: D }, _.createElement(el, { forcedTheme: e, storageKey: r, attribute: l, enableSystem: n, enableColorScheme: o, defaultTheme: i, value: c, themes: s, nonce: d, scriptProps:
|
|
63
|
+
v(e ?? p);
|
|
64
|
+
}, [e, p]);
|
|
65
|
+
let D = _.useMemo(() => ({ theme: p, setTheme: w, forcedTheme: e, resolvedTheme: p === "system" ? y : p, themes: n ? [...s, "system"] : s, systemTheme: n ? y : void 0 }), [p, w, e, y, n, s]);
|
|
66
|
+
return _.createElement(Xn.Provider, { value: D }, _.createElement(el, { forcedTheme: e, storageKey: r, attribute: l, enableSystem: n, enableColorScheme: o, defaultTheme: i, value: c, themes: s, nonce: d, scriptProps: h }), u);
|
|
67
67
|
}, el = _.memo(({ forcedTheme: e, storageKey: t, attribute: n, enableSystem: o, enableColorScheme: r, defaultTheme: s, value: i, themes: l, nonce: c, scriptProps: u }) => {
|
|
68
68
|
let d = JSON.stringify([n, t, s, e, l, i, o, r]).slice(1, -1);
|
|
69
69
|
return _.createElement("script", { ...u, suppressHydrationWarning: !0, nonce: typeof window > "u" ? c : "", dangerouslySetInnerHTML: { __html: `(${Ka.toString()})(${d})` } });
|
|
@@ -725,8 +725,8 @@ const Po = {
|
|
|
725
725
|
style: c,
|
|
726
726
|
as: u = "button",
|
|
727
727
|
href: d,
|
|
728
|
-
target:
|
|
729
|
-
rel:
|
|
728
|
+
target: h,
|
|
729
|
+
rel: p,
|
|
730
730
|
...m
|
|
731
731
|
}, y) => {
|
|
732
732
|
const b = Po[n] || Po.blue, x = Bo[t] || Bo.md, v = {
|
|
@@ -793,7 +793,7 @@ const Po = {
|
|
|
793
793
|
};
|
|
794
794
|
break;
|
|
795
795
|
}
|
|
796
|
-
const [C, D] = B.useState(!1), [k,
|
|
796
|
+
const [C, D] = B.useState(!1), [k, M] = B.useState(!1);
|
|
797
797
|
let T = {};
|
|
798
798
|
if ((C || k) && !i && !o)
|
|
799
799
|
switch (e) {
|
|
@@ -837,16 +837,16 @@ const Po = {
|
|
|
837
837
|
ref: y,
|
|
838
838
|
type: u === "button" ? m.type ?? "button" : void 0,
|
|
839
839
|
href: d,
|
|
840
|
-
target:
|
|
841
|
-
rel:
|
|
840
|
+
target: h,
|
|
841
|
+
rel: p,
|
|
842
842
|
disabled: u === "button" ? i || o : void 0,
|
|
843
843
|
style: S,
|
|
844
844
|
onMouseEnter: () => D(!0),
|
|
845
845
|
onMouseLeave: () => {
|
|
846
|
-
D(!1),
|
|
846
|
+
D(!1), M(!1);
|
|
847
847
|
},
|
|
848
|
-
onMouseDown: () =>
|
|
849
|
-
onMouseUp: () =>
|
|
848
|
+
onMouseDown: () => M(!0),
|
|
849
|
+
onMouseUp: () => M(!1),
|
|
850
850
|
onFocus: (F) => {
|
|
851
851
|
F.currentTarget.style.boxShadow = `0 0 0 2px #FFFFFF, 0 0 0 4px ${b.solid}`;
|
|
852
852
|
},
|
|
@@ -856,12 +856,12 @@ const Po = {
|
|
|
856
856
|
...m,
|
|
857
857
|
"aria-disabled": u !== "button" && (i || o) ? !0 : m["aria-disabled"],
|
|
858
858
|
onClick: (F) => {
|
|
859
|
-
var
|
|
859
|
+
var L;
|
|
860
860
|
if (u !== "button" && (i || o)) {
|
|
861
861
|
F.preventDefault();
|
|
862
862
|
return;
|
|
863
863
|
}
|
|
864
|
-
(
|
|
864
|
+
(L = m.onClick) == null || L.call(m, F);
|
|
865
865
|
},
|
|
866
866
|
children: o ? /* @__PURE__ */ a(
|
|
867
867
|
f,
|
|
@@ -907,22 +907,22 @@ const hl = {
|
|
|
907
907
|
style: i,
|
|
908
908
|
...l
|
|
909
909
|
}, c) => {
|
|
910
|
-
const u = hl[n], d = pl[t], [
|
|
910
|
+
const u = hl[n], d = pl[t], [h, p] = B.useState(!1), [m, y] = B.useState(!1);
|
|
911
911
|
let b;
|
|
912
912
|
switch (e) {
|
|
913
913
|
case "solid":
|
|
914
|
-
b = { background:
|
|
914
|
+
b = { background: h ? m ? u.solidActive : u.solidHover : u.solid, color: "#fff" };
|
|
915
915
|
break;
|
|
916
916
|
case "outline":
|
|
917
917
|
b = {
|
|
918
|
-
background:
|
|
918
|
+
background: h ? u.tint : "transparent",
|
|
919
919
|
color: u.fg,
|
|
920
920
|
border: `1.5px solid ${u.solid}`
|
|
921
921
|
};
|
|
922
922
|
break;
|
|
923
923
|
case "ghost":
|
|
924
924
|
default:
|
|
925
|
-
b = { background:
|
|
925
|
+
b = { background: h ? u.tint : "transparent", color: u.fg };
|
|
926
926
|
break;
|
|
927
927
|
}
|
|
928
928
|
return /* @__PURE__ */ a(
|
|
@@ -946,9 +946,9 @@ const hl = {
|
|
|
946
946
|
...b,
|
|
947
947
|
...i
|
|
948
948
|
},
|
|
949
|
-
onMouseEnter: () =>
|
|
949
|
+
onMouseEnter: () => p(!0),
|
|
950
950
|
onMouseLeave: () => {
|
|
951
|
-
|
|
951
|
+
p(!1), y(!1);
|
|
952
952
|
},
|
|
953
953
|
onMouseDown: () => y(!0),
|
|
954
954
|
onMouseUp: () => y(!1),
|
|
@@ -978,20 +978,20 @@ const gl = {
|
|
|
978
978
|
}, ci = B.forwardRef(
|
|
979
979
|
({ variant: e = "subtle", status: t = "neutral", size: n = "md", rounded: o, children: r, style: s, ...i }, l) => {
|
|
980
980
|
const c = gl[t], u = yl[n];
|
|
981
|
-
let d,
|
|
981
|
+
let d, h, p = "1px solid transparent";
|
|
982
982
|
switch (e) {
|
|
983
983
|
case "solid":
|
|
984
|
-
d = c.solid,
|
|
984
|
+
d = c.solid, h = c.solidText;
|
|
985
985
|
break;
|
|
986
986
|
case "outline":
|
|
987
|
-
d = "transparent",
|
|
987
|
+
d = "transparent", h = c.tintText, p = `1px solid ${c.border}`;
|
|
988
988
|
break;
|
|
989
989
|
case "surface":
|
|
990
|
-
d = c.tint,
|
|
990
|
+
d = c.tint, h = c.tintText, p = `1px solid ${c.border}20`;
|
|
991
991
|
break;
|
|
992
992
|
case "subtle":
|
|
993
993
|
default:
|
|
994
|
-
d = c.tint,
|
|
994
|
+
d = c.tint, h = c.tintText;
|
|
995
995
|
break;
|
|
996
996
|
}
|
|
997
997
|
const m = {
|
|
@@ -1003,9 +1003,9 @@ const gl = {
|
|
|
1003
1003
|
letterSpacing: "0.03em",
|
|
1004
1004
|
textTransform: "none",
|
|
1005
1005
|
borderRadius: o ? "100px" : 4,
|
|
1006
|
-
border:
|
|
1006
|
+
border: p,
|
|
1007
1007
|
background: d,
|
|
1008
|
-
color:
|
|
1008
|
+
color: h,
|
|
1009
1009
|
whiteSpace: "nowrap",
|
|
1010
1010
|
...u,
|
|
1011
1011
|
...s
|
|
@@ -1376,7 +1376,7 @@ function Ut({
|
|
|
1376
1376
|
className: o,
|
|
1377
1377
|
style: r
|
|
1378
1378
|
}) {
|
|
1379
|
-
const { mounted: s, themeMode: i } = $t(), l = s ? i === "dark" : !1, c = wl[e], u = l ? Cl[e] : Sl[e],
|
|
1379
|
+
const { mounted: s, themeMode: i } = $t(), l = s ? i === "dark" : !1, c = wl[e], u = l ? Cl[e] : Sl[e], h = {
|
|
1380
1380
|
display: "inline-flex",
|
|
1381
1381
|
alignItems: "center",
|
|
1382
1382
|
gap: `${Math.round(n * 0.3)}px`,
|
|
@@ -1387,7 +1387,7 @@ function Ut({
|
|
|
1387
1387
|
"span",
|
|
1388
1388
|
{
|
|
1389
1389
|
className: o,
|
|
1390
|
-
style:
|
|
1390
|
+
style: h,
|
|
1391
1391
|
role: "img",
|
|
1392
1392
|
"aria-label": "MedixDeck logo",
|
|
1393
1393
|
suppressHydrationWarning: !0,
|
|
@@ -1506,8 +1506,8 @@ const Dl = B.forwardRef(
|
|
|
1506
1506
|
resize: "vertical",
|
|
1507
1507
|
maxLength: n,
|
|
1508
1508
|
value: s,
|
|
1509
|
-
onChange: (
|
|
1510
|
-
u(
|
|
1509
|
+
onChange: (h) => {
|
|
1510
|
+
u(h.target.value.length), r == null || r(h);
|
|
1511
1511
|
},
|
|
1512
1512
|
_placeholder: { color: "text.muted" },
|
|
1513
1513
|
_focus: {
|
|
@@ -1590,7 +1590,7 @@ const Al = {
|
|
|
1590
1590
|
},
|
|
1591
1591
|
children: [
|
|
1592
1592
|
t && /* @__PURE__ */ a("option", { value: "", disabled: !0, children: t }),
|
|
1593
|
-
e.map((
|
|
1593
|
+
e.map((h) => /* @__PURE__ */ a("option", { value: h.value, disabled: h.disabled, children: h.label }, h.value)),
|
|
1594
1594
|
s
|
|
1595
1595
|
]
|
|
1596
1596
|
}
|
|
@@ -1619,22 +1619,22 @@ const hi = {
|
|
|
1619
1619
|
name: c,
|
|
1620
1620
|
value: u,
|
|
1621
1621
|
id: d
|
|
1622
|
-
},
|
|
1623
|
-
const
|
|
1622
|
+
}, h) => {
|
|
1623
|
+
const p = hi[e], m = d ?? B.useId(), [y, b] = B.useState(n), [x, v] = B.useState(!1), w = t !== void 0 ? t : y, C = (k) => {
|
|
1624
1624
|
t === void 0 && b(k.target.checked), o == null || o(k.target.checked);
|
|
1625
1625
|
}, D = {
|
|
1626
1626
|
width: 18,
|
|
1627
1627
|
height: 18,
|
|
1628
1628
|
borderRadius: 4,
|
|
1629
|
-
border: `2px solid ${w || s ?
|
|
1630
|
-
background: w || s ?
|
|
1629
|
+
border: `2px solid ${w || s ? p.solid : "var(--medix-form-border, #CBD5E1)"}`,
|
|
1630
|
+
background: w || s ? p.solid : "transparent",
|
|
1631
1631
|
display: "inline-flex",
|
|
1632
1632
|
alignItems: "center",
|
|
1633
1633
|
justifyContent: "center",
|
|
1634
1634
|
flexShrink: 0,
|
|
1635
1635
|
marginTop: 2,
|
|
1636
1636
|
transition: "background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease",
|
|
1637
|
-
boxShadow: x ? `0 0 0 3px ${
|
|
1637
|
+
boxShadow: x ? `0 0 0 3px ${p.ring}` : "none",
|
|
1638
1638
|
pointerEvents: "none"
|
|
1639
1639
|
};
|
|
1640
1640
|
return /* @__PURE__ */ g(f, { opacity: r ? 0.55 : 1, children: [
|
|
@@ -1653,7 +1653,7 @@ const hi = {
|
|
|
1653
1653
|
/* @__PURE__ */ a(
|
|
1654
1654
|
"input",
|
|
1655
1655
|
{
|
|
1656
|
-
ref:
|
|
1656
|
+
ref: h,
|
|
1657
1657
|
id: m,
|
|
1658
1658
|
type: "checkbox",
|
|
1659
1659
|
name: c,
|
|
@@ -1710,8 +1710,8 @@ function E1({
|
|
|
1710
1710
|
colorScheme: r = "blue",
|
|
1711
1711
|
direction: s = "column"
|
|
1712
1712
|
}) {
|
|
1713
|
-
const i = hi[r], [l, c] = B.useState(""), u = t !== void 0 ? t : l, d = (
|
|
1714
|
-
t === void 0 && c(
|
|
1713
|
+
const i = hi[r], [l, c] = B.useState(""), u = t !== void 0 ? t : l, d = (h) => {
|
|
1714
|
+
t === void 0 && c(h), n == null || n(h);
|
|
1715
1715
|
};
|
|
1716
1716
|
return /* @__PURE__ */ a(
|
|
1717
1717
|
f,
|
|
@@ -1720,19 +1720,19 @@ function E1({
|
|
|
1720
1720
|
flexDirection: s,
|
|
1721
1721
|
gap: s === "row" ? "5" : "3",
|
|
1722
1722
|
role: "radiogroup",
|
|
1723
|
-
children: o.map((
|
|
1724
|
-
const
|
|
1723
|
+
children: o.map((h) => {
|
|
1724
|
+
const p = u === h.value;
|
|
1725
1725
|
return /* @__PURE__ */ a(
|
|
1726
1726
|
El,
|
|
1727
1727
|
{
|
|
1728
|
-
option:
|
|
1728
|
+
option: h,
|
|
1729
1729
|
name: e,
|
|
1730
|
-
isSelected:
|
|
1730
|
+
isSelected: p,
|
|
1731
1731
|
onChange: d,
|
|
1732
1732
|
solidColor: i.solid,
|
|
1733
1733
|
ring: i.ring
|
|
1734
1734
|
},
|
|
1735
|
-
|
|
1735
|
+
h.value
|
|
1736
1736
|
);
|
|
1737
1737
|
})
|
|
1738
1738
|
}
|
|
@@ -1843,29 +1843,29 @@ const Rl = {
|
|
|
1843
1843
|
name: c,
|
|
1844
1844
|
id: u
|
|
1845
1845
|
}, d) => {
|
|
1846
|
-
const
|
|
1847
|
-
n === void 0 && b(
|
|
1846
|
+
const h = Rl[e], p = Pl[t], m = u ?? B.useId(), [y, b] = B.useState(o), [x, v] = B.useState(!1), w = n !== void 0 ? n : y, C = (M) => {
|
|
1847
|
+
n === void 0 && b(M.target.checked), r == null || r(M.target.checked);
|
|
1848
1848
|
}, D = {
|
|
1849
1849
|
position: "relative",
|
|
1850
1850
|
display: "inline-flex",
|
|
1851
1851
|
alignItems: "center",
|
|
1852
|
-
width:
|
|
1853
|
-
height:
|
|
1854
|
-
borderRadius:
|
|
1855
|
-
background: w ?
|
|
1852
|
+
width: p.width,
|
|
1853
|
+
height: p.height,
|
|
1854
|
+
borderRadius: p.height,
|
|
1855
|
+
background: w ? h.track : "var(--medix-form-border, #CBD5E1)",
|
|
1856
1856
|
transition: "background 0.2s ease, box-shadow 0.2s ease",
|
|
1857
|
-
boxShadow: x ? `0 0 0 3px ${
|
|
1857
|
+
boxShadow: x ? `0 0 0 3px ${h.ring}` : "none",
|
|
1858
1858
|
cursor: s ? "not-allowed" : "pointer",
|
|
1859
1859
|
flexShrink: 0
|
|
1860
1860
|
}, k = {
|
|
1861
1861
|
position: "absolute",
|
|
1862
|
-
width:
|
|
1863
|
-
height:
|
|
1862
|
+
width: p.thumbSize,
|
|
1863
|
+
height: p.thumbSize,
|
|
1864
1864
|
borderRadius: "50%",
|
|
1865
1865
|
background: "#fff",
|
|
1866
1866
|
boxShadow: "0 1px 4px rgba(0,0,0,0.22)",
|
|
1867
|
-
top:
|
|
1868
|
-
left: w ?
|
|
1867
|
+
top: p.thumbOffset,
|
|
1868
|
+
left: w ? p.width - p.thumbSize - p.thumbOffset : p.thumbOffset,
|
|
1869
1869
|
transition: "left 0.18s ease"
|
|
1870
1870
|
};
|
|
1871
1871
|
return /* @__PURE__ */ g(f, { display: "flex", alignItems: "flex-start", gap: "3", opacity: s ? 0.55 : 1, children: [
|
|
@@ -1994,41 +1994,41 @@ function Il({
|
|
|
1994
1994
|
helperText: u,
|
|
1995
1995
|
errorMessage: d
|
|
1996
1996
|
}) {
|
|
1997
|
-
const [
|
|
1998
|
-
var F,
|
|
1997
|
+
const [h, p] = B.useState(n), [m, y] = B.useState(null), b = t !== void 0, v = (b ? t : h).split("").slice(0, e), w = B.useRef([]), C = s ? "#DC2626" : "var(--medix-form-border)", D = s ? "#DC2626" : "#0685FF", k = (T, S) => {
|
|
1998
|
+
var F, L, I;
|
|
1999
1999
|
if (T.key === "Backspace") {
|
|
2000
2000
|
T.preventDefault();
|
|
2001
2001
|
const E = [...v];
|
|
2002
2002
|
if (E[S]) {
|
|
2003
2003
|
E[S] = "";
|
|
2004
|
-
const
|
|
2005
|
-
b ||
|
|
2004
|
+
const z = E.join("");
|
|
2005
|
+
b || p(z), o == null || o(z);
|
|
2006
2006
|
} else if (S > 0) {
|
|
2007
2007
|
(F = w.current[S - 1]) == null || F.focus(), E[S - 1] = "";
|
|
2008
|
-
const
|
|
2009
|
-
b ||
|
|
2008
|
+
const z = E.join("");
|
|
2009
|
+
b || p(z), o == null || o(z);
|
|
2010
2010
|
}
|
|
2011
|
-
} else T.key === "ArrowLeft" && S > 0 ? (
|
|
2012
|
-
},
|
|
2013
|
-
var E,
|
|
2011
|
+
} else T.key === "ArrowLeft" && S > 0 ? (L = w.current[S - 1]) == null || L.focus() : T.key === "ArrowRight" && S < e - 1 && ((I = w.current[S + 1]) == null || I.focus());
|
|
2012
|
+
}, M = (T, S) => {
|
|
2013
|
+
var E, z;
|
|
2014
2014
|
const F = T.target.value.replace(/\D/g, "");
|
|
2015
2015
|
if (!F) return;
|
|
2016
2016
|
if (F.length > 1) {
|
|
2017
|
-
const V = F.split("").slice(0, e),
|
|
2017
|
+
const V = F.split("").slice(0, e), O = [...Array(e).fill("")];
|
|
2018
2018
|
V.forEach((W, K) => {
|
|
2019
|
-
|
|
2019
|
+
O[K] = W;
|
|
2020
2020
|
});
|
|
2021
|
-
const j =
|
|
2022
|
-
b ||
|
|
2021
|
+
const j = O.join("");
|
|
2022
|
+
b || p(j), o == null || o(j);
|
|
2023
2023
|
const oe = Math.min(V.length, e - 1);
|
|
2024
2024
|
(E = w.current[oe]) == null || E.focus(), j.length === e && (r == null || r(j));
|
|
2025
2025
|
return;
|
|
2026
2026
|
}
|
|
2027
|
-
const
|
|
2028
|
-
for (;
|
|
2029
|
-
|
|
2030
|
-
const I =
|
|
2031
|
-
b ||
|
|
2027
|
+
const L = [...v];
|
|
2028
|
+
for (; L.length < e; ) L.push("");
|
|
2029
|
+
L[S] = F;
|
|
2030
|
+
const I = L.join("");
|
|
2031
|
+
b || p(I), o == null || o(I), S < e - 1 && ((z = w.current[S + 1]) == null || z.focus()), I.replace(/\s/g, "").length === e && (r == null || r(I));
|
|
2032
2032
|
};
|
|
2033
2033
|
return /* @__PURE__ */ g(f, { w: "fit-content", children: [
|
|
2034
2034
|
c && /* @__PURE__ */ a(P, { mb: "2", fontSize: "sm", fontWeight: "medium", color: "text.heading", fontFamily: "var(--font-body)", children: c }),
|
|
@@ -2043,7 +2043,7 @@ function Il({
|
|
|
2043
2043
|
pattern: "\\d*",
|
|
2044
2044
|
maxLength: 1,
|
|
2045
2045
|
value: v[S] ?? "",
|
|
2046
|
-
onChange: (F) =>
|
|
2046
|
+
onChange: (F) => M(F, S),
|
|
2047
2047
|
onKeyDown: (F) => k(F, S),
|
|
2048
2048
|
onFocus: (F) => {
|
|
2049
2049
|
F.target.select(), y(S);
|
|
@@ -2098,9 +2098,9 @@ var zl = ["cdnSuffix", "cdnUrl", "countryCode", "style", "svg"], Ol = "https://c
|
|
|
2098
2098
|
if (typeof i != "string")
|
|
2099
2099
|
return null;
|
|
2100
2100
|
if (u) {
|
|
2101
|
-
var
|
|
2101
|
+
var h = "" + s + i.toLowerCase() + "." + o;
|
|
2102
2102
|
return vn("img", Object.assign({}, d, {
|
|
2103
|
-
src:
|
|
2103
|
+
src: h,
|
|
2104
2104
|
style: Rt({
|
|
2105
2105
|
display: "inline-block",
|
|
2106
2106
|
width: "1em",
|
|
@@ -2109,7 +2109,7 @@ var zl = ["cdnSuffix", "cdnUrl", "countryCode", "style", "svg"], Ol = "https://c
|
|
|
2109
2109
|
}, l)
|
|
2110
2110
|
}));
|
|
2111
2111
|
}
|
|
2112
|
-
var
|
|
2112
|
+
var p = i.toUpperCase().replace(/./g, function(m) {
|
|
2113
2113
|
return String.fromCodePoint(m.charCodeAt(0) + jl);
|
|
2114
2114
|
});
|
|
2115
2115
|
return vn("span", Object.assign({
|
|
@@ -2121,7 +2121,7 @@ var zl = ["cdnSuffix", "cdnUrl", "countryCode", "style", "svg"], Ol = "https://c
|
|
|
2121
2121
|
lineHeight: "1em",
|
|
2122
2122
|
verticalAlign: "middle"
|
|
2123
2123
|
}, l)
|
|
2124
|
-
}),
|
|
2124
|
+
}), p);
|
|
2125
2125
|
};
|
|
2126
2126
|
const Nl = {
|
|
2127
2127
|
"+1": "US",
|
|
@@ -2400,18 +2400,18 @@ function B1({
|
|
|
2400
2400
|
errorMessage: c,
|
|
2401
2401
|
label: u,
|
|
2402
2402
|
helperText: d,
|
|
2403
|
-
isDisabled:
|
|
2404
|
-
id:
|
|
2403
|
+
isDisabled: h = !1,
|
|
2404
|
+
id: p
|
|
2405
2405
|
}) {
|
|
2406
|
-
const m = B.useId(), y =
|
|
2407
|
-
const
|
|
2408
|
-
D(
|
|
2406
|
+
const m = B.useId(), y = p ?? m, b = s ?? (r ? Nl[r] : void 0), x = (b ? Ae.find((E) => E.country === b) : void 0) ?? Ae.find((E) => E.code === r) ?? Ae.find((E) => E.country === "NG") ?? Ae[0], [v, w] = B.useState(x.country), [C, D] = B.useState(e), [k, M] = B.useState(!1), T = Ae.find((E) => E.country === v) ?? x, S = (E) => {
|
|
2407
|
+
const z = E.target.value.replace(/[^\d\s\-]/g, "");
|
|
2408
|
+
D(z), t == null || t(`${T.code}${z.replace(/\s/g, "")}`);
|
|
2409
2409
|
}, F = (E) => {
|
|
2410
|
-
const
|
|
2411
|
-
w(
|
|
2412
|
-
const V = Ae.find((
|
|
2410
|
+
const z = E.target.value;
|
|
2411
|
+
w(z);
|
|
2412
|
+
const V = Ae.find((O) => O.country === z) ?? x;
|
|
2413
2413
|
t == null || t(`${V.code}${C.replace(/\s/g, "")}`);
|
|
2414
|
-
},
|
|
2414
|
+
}, L = l ? "#DC2626" : k ? "#0685FF" : "var(--medix-form-border)", I = k ? `0 0 0 3px ${l ? "rgba(220,38,38,0.15)" : "rgba(6,133,255,0.15)"}` : "none";
|
|
2415
2415
|
return /* @__PURE__ */ g(f, { w: "100%", children: [
|
|
2416
2416
|
u && /* @__PURE__ */ a(
|
|
2417
2417
|
"label",
|
|
@@ -2436,10 +2436,10 @@ function B1({
|
|
|
2436
2436
|
overflow: "hidden",
|
|
2437
2437
|
borderRadius: "10px",
|
|
2438
2438
|
transition: "border-color 0.15s, box-shadow 0.15s",
|
|
2439
|
-
opacity:
|
|
2440
|
-
pointerEvents:
|
|
2439
|
+
opacity: h ? 0.5 : 1,
|
|
2440
|
+
pointerEvents: h ? "none" : void 0,
|
|
2441
2441
|
style: {
|
|
2442
|
-
border: `1.5px solid ${
|
|
2442
|
+
border: `1.5px solid ${L}`,
|
|
2443
2443
|
boxShadow: I,
|
|
2444
2444
|
background: "var(--medix-form-bg)"
|
|
2445
2445
|
},
|
|
@@ -2506,10 +2506,10 @@ function B1({
|
|
|
2506
2506
|
type: "tel",
|
|
2507
2507
|
value: C,
|
|
2508
2508
|
onChange: S,
|
|
2509
|
-
onFocus: () =>
|
|
2510
|
-
onBlur: () =>
|
|
2509
|
+
onFocus: () => M(!0),
|
|
2510
|
+
onBlur: () => M(!1),
|
|
2511
2511
|
placeholder: i,
|
|
2512
|
-
disabled:
|
|
2512
|
+
disabled: h,
|
|
2513
2513
|
"aria-invalid": l,
|
|
2514
2514
|
style: {
|
|
2515
2515
|
flex: 1,
|
|
@@ -2575,21 +2575,21 @@ function pi({
|
|
|
2575
2575
|
const [s, i] = U(() => e ? new Date(e) : /* @__PURE__ */ new Date());
|
|
2576
2576
|
ne(() => {
|
|
2577
2577
|
e && i((k) => {
|
|
2578
|
-
const
|
|
2579
|
-
return k.getFullYear() ===
|
|
2578
|
+
const M = new Date(e);
|
|
2579
|
+
return k.getFullYear() === M.getFullYear() && k.getMonth() === M.getMonth() ? k : M;
|
|
2580
2580
|
});
|
|
2581
2581
|
}, [e]);
|
|
2582
|
-
const l = s.getFullYear(), c = s.getMonth(), u = !n || l > n.getFullYear() || l === n.getFullYear() && c > n.getMonth(), d = !o || l < o.getFullYear() || l === o.getFullYear() && c < o.getMonth(),
|
|
2582
|
+
const l = s.getFullYear(), c = s.getMonth(), u = !n || l > n.getFullYear() || l === n.getFullYear() && c > n.getMonth(), d = !o || l < o.getFullYear() || l === o.getFullYear() && c < o.getMonth(), h = () => {
|
|
2583
2583
|
i(new Date(l, c - 1, 1));
|
|
2584
|
-
},
|
|
2584
|
+
}, p = () => {
|
|
2585
2585
|
i(new Date(l, c + 1, 1));
|
|
2586
2586
|
}, m = () => {
|
|
2587
2587
|
const k = /* @__PURE__ */ new Date();
|
|
2588
2588
|
i(k), t && !Vo(k.getDate(), k.getMonth(), k.getFullYear(), n, o) && t(k);
|
|
2589
|
-
}, y = Io(l, c), b = Gl(Ul(l, c)), x = Io(l, c - 1), w = (b + y > 35 ? 42 : 35) - (b + y), C = (k,
|
|
2589
|
+
}, y = Io(l, c), b = Gl(Ul(l, c)), x = Io(l, c - 1), w = (b + y > 35 ? 42 : 35) - (b + y), C = (k, M, T) => e ? e.getDate() === k && e.getMonth() === M && e.getFullYear() === T : !1, D = () => {
|
|
2590
2590
|
const k = [];
|
|
2591
|
-
for (let
|
|
2592
|
-
const T = x - b +
|
|
2591
|
+
for (let M = 0; M < b; M++) {
|
|
2592
|
+
const T = x - b + M + 1;
|
|
2593
2593
|
k.push(
|
|
2594
2594
|
/* @__PURE__ */ a(
|
|
2595
2595
|
nn,
|
|
@@ -2597,34 +2597,34 @@ function pi({
|
|
|
2597
2597
|
day: T,
|
|
2598
2598
|
isMuted: !0
|
|
2599
2599
|
},
|
|
2600
|
-
`prev-${
|
|
2600
|
+
`prev-${M}`
|
|
2601
2601
|
)
|
|
2602
2602
|
);
|
|
2603
2603
|
}
|
|
2604
|
-
for (let
|
|
2605
|
-
const T = Vo(
|
|
2604
|
+
for (let M = 1; M <= y; M++) {
|
|
2605
|
+
const T = Vo(M, c, l, n, o);
|
|
2606
2606
|
k.push(
|
|
2607
2607
|
/* @__PURE__ */ a(
|
|
2608
2608
|
nn,
|
|
2609
2609
|
{
|
|
2610
|
-
day:
|
|
2611
|
-
isActive: C(
|
|
2610
|
+
day: M,
|
|
2611
|
+
isActive: C(M, c, l),
|
|
2612
2612
|
isDisabled: T,
|
|
2613
|
-
onClick: T ? void 0 : () => t == null ? void 0 : t(new Date(l, c,
|
|
2613
|
+
onClick: T ? void 0 : () => t == null ? void 0 : t(new Date(l, c, M))
|
|
2614
2614
|
},
|
|
2615
|
-
`curr-${
|
|
2615
|
+
`curr-${M}`
|
|
2616
2616
|
)
|
|
2617
2617
|
);
|
|
2618
2618
|
}
|
|
2619
|
-
for (let
|
|
2619
|
+
for (let M = 1; M <= w; M++)
|
|
2620
2620
|
k.push(
|
|
2621
2621
|
/* @__PURE__ */ a(
|
|
2622
2622
|
nn,
|
|
2623
2623
|
{
|
|
2624
|
-
day:
|
|
2624
|
+
day: M,
|
|
2625
2625
|
isMuted: !0
|
|
2626
2626
|
},
|
|
2627
|
-
`next-${
|
|
2627
|
+
`next-${M}`
|
|
2628
2628
|
)
|
|
2629
2629
|
);
|
|
2630
2630
|
return k;
|
|
@@ -2642,13 +2642,13 @@ function pi({
|
|
|
2642
2642
|
children: [
|
|
2643
2643
|
/* @__PURE__ */ g(de, { justify: "space-between", align: "center", mb: "6", children: [
|
|
2644
2644
|
/* @__PURE__ */ g(de, { align: "center", gap: "4", children: [
|
|
2645
|
-
/* @__PURE__ */ a(zo, { enabled: u, onClick:
|
|
2645
|
+
/* @__PURE__ */ a(zo, { enabled: u, onClick: h, direction: "prev" }),
|
|
2646
2646
|
/* @__PURE__ */ g(P, { fontWeight: "semibold", fontSize: "md", color: "text.heading", children: [
|
|
2647
2647
|
$l[c],
|
|
2648
2648
|
" ",
|
|
2649
2649
|
l
|
|
2650
2650
|
] }),
|
|
2651
|
-
/* @__PURE__ */ a(zo, { enabled: d, onClick:
|
|
2651
|
+
/* @__PURE__ */ a(zo, { enabled: d, onClick: p, direction: "next" })
|
|
2652
2652
|
] }),
|
|
2653
2653
|
/* @__PURE__ */ a(
|
|
2654
2654
|
f,
|
|
@@ -2737,31 +2737,31 @@ function I1({
|
|
|
2737
2737
|
isDisabled: c = !1,
|
|
2738
2738
|
placeholder: u = "Select date",
|
|
2739
2739
|
id: d,
|
|
2740
|
-
includeTime:
|
|
2740
|
+
includeTime: h = !1
|
|
2741
2741
|
}) {
|
|
2742
|
-
const [
|
|
2742
|
+
const [p, m] = U(!1), y = Z(null), b = (T) => T != null && T.includes("T") && T.split("T")[1].slice(0, 5) || "00:00";
|
|
2743
2743
|
ne(() => {
|
|
2744
2744
|
function T(S) {
|
|
2745
2745
|
y.current && !y.current.contains(S.target) && m(!1);
|
|
2746
2746
|
}
|
|
2747
2747
|
return document.addEventListener("mousedown", T), () => document.removeEventListener("mousedown", T);
|
|
2748
2748
|
}, []);
|
|
2749
|
-
const x = l ? "#DC2626" :
|
|
2750
|
-
const S = T.getFullYear(), F = String(T.getMonth() + 1).padStart(2, "0"),
|
|
2751
|
-
|
|
2749
|
+
const x = l ? "#DC2626" : p ? "#0685FF" : "var(--medix-form-border)", v = p ? `0 0 0 3px ${l ? "rgba(220,38,38,0.15)" : "rgba(6,133,255,0.15)"}` : "none", w = (T) => {
|
|
2750
|
+
const S = T.getFullYear(), F = String(T.getMonth() + 1).padStart(2, "0"), L = String(T.getDate()).padStart(2, "0");
|
|
2751
|
+
h ? t == null || t(`${S}-${F}-${L}T${b(e)}`) : (t == null || t(`${S}-${F}-${L}`), m(!1));
|
|
2752
2752
|
}, C = (T) => {
|
|
2753
2753
|
const S = T.target.value, F = (e == null ? void 0 : e.split("T")[0]) ?? "";
|
|
2754
2754
|
F && (t == null || t(`${F}T${S}`));
|
|
2755
2755
|
}, D = (T) => {
|
|
2756
2756
|
if (!T)
|
|
2757
2757
|
return;
|
|
2758
|
-
const [S, F,
|
|
2759
|
-
if (!Number.isInteger(I) || !Number.isInteger(E) || !Number.isInteger(
|
|
2758
|
+
const [S, F, L] = T.split("-"), I = Number(S), E = Number(F), z = Number(L == null ? void 0 : L.split("T")[0]);
|
|
2759
|
+
if (!Number.isInteger(I) || !Number.isInteger(E) || !Number.isInteger(z))
|
|
2760
2760
|
return;
|
|
2761
|
-
const V = new Date(I, E - 1,
|
|
2762
|
-
if (!(V.getFullYear() !== I || V.getMonth() !== E - 1 || V.getDate() !==
|
|
2761
|
+
const V = new Date(I, E - 1, z);
|
|
2762
|
+
if (!(V.getFullYear() !== I || V.getMonth() !== E - 1 || V.getDate() !== z))
|
|
2763
2763
|
return V;
|
|
2764
|
-
}, k = D(e == null ? void 0 : e.split("T")[0]),
|
|
2764
|
+
}, k = D(e == null ? void 0 : e.split("T")[0]), M = k && !isNaN(k.getTime()) ? h && (e != null && e.includes("T")) ? `${k.toLocaleDateString("en-US", { year: "numeric", month: "short", day: "numeric" })} ${e.split("T")[1].slice(0, 5)}` : k.toLocaleDateString("en-US", { year: "numeric", month: "short", day: "numeric" }) : "";
|
|
2765
2765
|
return /* @__PURE__ */ g(f, { w: "100%", position: "relative", ref: y, children: [
|
|
2766
2766
|
r && /* @__PURE__ */ a(P, { mb: "1.5", fontSize: "sm", fontWeight: "medium", color: "text.heading", fontFamily: "var(--font-body)", children: r }),
|
|
2767
2767
|
/* @__PURE__ */ g(f, { position: "relative", children: [
|
|
@@ -2771,13 +2771,13 @@ function I1({
|
|
|
2771
2771
|
id: d,
|
|
2772
2772
|
readOnly: !0,
|
|
2773
2773
|
type: "text",
|
|
2774
|
-
value:
|
|
2774
|
+
value: M,
|
|
2775
2775
|
placeholder: u,
|
|
2776
2776
|
disabled: c,
|
|
2777
2777
|
"aria-invalid": l,
|
|
2778
2778
|
"aria-haspopup": "dialog",
|
|
2779
|
-
"aria-expanded":
|
|
2780
|
-
onClick: () => !c && m(!
|
|
2779
|
+
"aria-expanded": p,
|
|
2780
|
+
onClick: () => !c && m(!p),
|
|
2781
2781
|
onKeyDown: (T) => {
|
|
2782
2782
|
c || (T.key === "Enter" || T.key === " " || T.key === "ArrowDown" ? (T.preventDefault(), m(!0)) : T.key === "Escape" && m(!1));
|
|
2783
2783
|
},
|
|
@@ -2819,7 +2819,7 @@ function I1({
|
|
|
2819
2819
|
}
|
|
2820
2820
|
)
|
|
2821
2821
|
] }),
|
|
2822
|
-
|
|
2822
|
+
p && /* @__PURE__ */ g(
|
|
2823
2823
|
f,
|
|
2824
2824
|
{
|
|
2825
2825
|
position: "absolute",
|
|
@@ -2842,7 +2842,7 @@ function I1({
|
|
|
2842
2842
|
maxDate: D(o)
|
|
2843
2843
|
}
|
|
2844
2844
|
),
|
|
2845
|
-
|
|
2845
|
+
h && /* @__PURE__ */ g(f, { px: "5", pb: "4", borderTop: "1px solid", borderColor: "border", children: [
|
|
2846
2846
|
/* @__PURE__ */ a(P, { fontSize: "xs", fontWeight: "medium", color: "text.muted", mb: "1.5", fontFamily: "var(--font-body)", children: "Time" }),
|
|
2847
2847
|
/* @__PURE__ */ a(
|
|
2848
2848
|
"input",
|
|
@@ -2887,14 +2887,14 @@ function V1({
|
|
|
2887
2887
|
errorMessage: c,
|
|
2888
2888
|
isInvalid: u = !1,
|
|
2889
2889
|
isDisabled: d = !1,
|
|
2890
|
-
startPlaceholder:
|
|
2891
|
-
endPlaceholder:
|
|
2890
|
+
startPlaceholder: h = "Start date",
|
|
2891
|
+
endPlaceholder: p = "End date",
|
|
2892
2892
|
id: m
|
|
2893
2893
|
}) {
|
|
2894
2894
|
const [y, b] = U(null), x = Z(null);
|
|
2895
2895
|
ne(() => {
|
|
2896
|
-
function V(
|
|
2897
|
-
x.current && !x.current.contains(
|
|
2896
|
+
function V(O) {
|
|
2897
|
+
x.current && !x.current.contains(O.target) && b(null);
|
|
2898
2898
|
}
|
|
2899
2899
|
return document.addEventListener("mousedown", V), () => document.removeEventListener("mousedown", V);
|
|
2900
2900
|
}, []);
|
|
@@ -2912,19 +2912,19 @@ function V1({
|
|
|
2912
2912
|
colorScheme: "auto",
|
|
2913
2913
|
width: "100%"
|
|
2914
2914
|
}, D = (V) => {
|
|
2915
|
-
const
|
|
2916
|
-
return `${
|
|
2917
|
-
}, k = (V) => r && V < r ? r : s && V > s ? s : V,
|
|
2918
|
-
const
|
|
2919
|
-
y === "start" ? (t == null || t(
|
|
2915
|
+
const O = V.getFullYear(), j = String(V.getMonth() + 1).padStart(2, "0"), oe = String(V.getDate()).padStart(2, "0");
|
|
2916
|
+
return `${O}-${j}-${oe}`;
|
|
2917
|
+
}, k = (V) => r && V < r ? r : s && V > s ? s : V, M = (V) => {
|
|
2918
|
+
const O = k(D(V));
|
|
2919
|
+
y === "start" ? (t == null || t(O), n && n < O && (o == null || o("")), b("end")) : y === "end" && (o == null || o(O), e && e > O && (t == null || t("")), b(null));
|
|
2920
2920
|
}, T = (V) => {
|
|
2921
2921
|
if (!V) return;
|
|
2922
|
-
const [
|
|
2923
|
-
if (!
|
|
2924
|
-
const W = new Date(
|
|
2925
|
-
if (!(W.getFullYear() !==
|
|
2922
|
+
const [O, j, oe] = V.split("-").map(Number);
|
|
2923
|
+
if (!O || j < 1 || j > 12 || oe < 1 || oe > 31) return;
|
|
2924
|
+
const W = new Date(O, j - 1, oe);
|
|
2925
|
+
if (!(W.getFullYear() !== O || W.getMonth() !== j - 1 || W.getDate() !== oe))
|
|
2926
2926
|
return W;
|
|
2927
|
-
}, F = T(y === "start" ? e : n),
|
|
2927
|
+
}, F = T(y === "start" ? e : n), L = T(e), I = T(n), E = L ? L.toLocaleDateString("en-US", { year: "numeric", month: "short", day: "numeric" }) : "", z = I ? I.toLocaleDateString("en-US", { year: "numeric", month: "short", day: "numeric" }) : "";
|
|
2928
2928
|
return /* @__PURE__ */ g(f, { w: "100%", position: "relative", ref: x, children: [
|
|
2929
2929
|
i && /* @__PURE__ */ a(P, { mb: "1.5", fontSize: "sm", fontWeight: "medium", color: "text.heading", fontFamily: "var(--font-body)", children: i }),
|
|
2930
2930
|
/* @__PURE__ */ g(
|
|
@@ -2952,7 +2952,7 @@ function V1({
|
|
|
2952
2952
|
readOnly: !0,
|
|
2953
2953
|
type: "text",
|
|
2954
2954
|
value: E,
|
|
2955
|
-
placeholder:
|
|
2955
|
+
placeholder: h,
|
|
2956
2956
|
disabled: d,
|
|
2957
2957
|
"aria-invalid": u,
|
|
2958
2958
|
"aria-haspopup": "dialog",
|
|
@@ -2970,8 +2970,8 @@ function V1({
|
|
|
2970
2970
|
{
|
|
2971
2971
|
readOnly: !0,
|
|
2972
2972
|
type: "text",
|
|
2973
|
-
value:
|
|
2974
|
-
placeholder:
|
|
2973
|
+
value: z,
|
|
2974
|
+
placeholder: p,
|
|
2975
2975
|
disabled: d,
|
|
2976
2976
|
"aria-invalid": u,
|
|
2977
2977
|
"aria-haspopup": "dialog",
|
|
@@ -3003,11 +3003,11 @@ function V1({
|
|
|
3003
3003
|
pi,
|
|
3004
3004
|
{
|
|
3005
3005
|
value: F,
|
|
3006
|
-
onChange:
|
|
3006
|
+
onChange: M,
|
|
3007
3007
|
minDate: (
|
|
3008
3008
|
// When selecting the end date, the earliest selectable day is the
|
|
3009
3009
|
// chosen start date (if set), otherwise fall back to the prop min.
|
|
3010
|
-
y === "end" ?
|
|
3010
|
+
y === "end" ? L ?? T(r) : T(r)
|
|
3011
3011
|
),
|
|
3012
3012
|
maxDate: T(s)
|
|
3013
3013
|
}
|
|
@@ -3029,25 +3029,25 @@ function z1({
|
|
|
3029
3029
|
isInvalid: l = !1,
|
|
3030
3030
|
isDisabled: c = !1
|
|
3031
3031
|
}) {
|
|
3032
|
-
const [u, d] = U(!1), [
|
|
3032
|
+
const [u, d] = U(!1), [h, p] = U(""), m = Z(null);
|
|
3033
3033
|
ne(() => {
|
|
3034
3034
|
if (t) {
|
|
3035
3035
|
const v = e.find((w) => w.value === t);
|
|
3036
|
-
v &&
|
|
3036
|
+
v && p(v.label);
|
|
3037
3037
|
}
|
|
3038
3038
|
}, [t, e]), ne(() => {
|
|
3039
3039
|
function v(w) {
|
|
3040
3040
|
if (m.current && !m.current.contains(w.target))
|
|
3041
3041
|
if (d(!1), t) {
|
|
3042
3042
|
const C = e.find((D) => D.value === t);
|
|
3043
|
-
C &&
|
|
3043
|
+
C && p(C.label);
|
|
3044
3044
|
} else
|
|
3045
|
-
|
|
3045
|
+
p("");
|
|
3046
3046
|
}
|
|
3047
3047
|
return document.addEventListener("mousedown", v), () => document.removeEventListener("mousedown", v);
|
|
3048
3048
|
}, [t, e]);
|
|
3049
3049
|
const y = e.filter(
|
|
3050
|
-
(v) => v.label.toLowerCase().includes(
|
|
3050
|
+
(v) => v.label.toLowerCase().includes(h.toLowerCase())
|
|
3051
3051
|
), b = l ? "#DC2626" : u ? "#0685FF" : "var(--medix-form-border)", x = u ? `0 0 0 3px ${l ? "rgba(220,38,38,0.15)" : "rgba(6,133,255,0.15)"}` : "none";
|
|
3052
3052
|
return /* @__PURE__ */ g(f, { w: "100%", position: "relative", ref: m, children: [
|
|
3053
3053
|
r && /* @__PURE__ */ a(P, { mb: "1.5", fontSize: "sm", fontWeight: "medium", color: "text.heading", fontFamily: "var(--font-body)", children: r }),
|
|
@@ -3056,11 +3056,11 @@ function z1({
|
|
|
3056
3056
|
"input",
|
|
3057
3057
|
{
|
|
3058
3058
|
type: "text",
|
|
3059
|
-
value:
|
|
3059
|
+
value: h,
|
|
3060
3060
|
placeholder: o,
|
|
3061
3061
|
disabled: c,
|
|
3062
3062
|
onChange: (v) => {
|
|
3063
|
-
|
|
3063
|
+
p(v.target.value), d(!0), v.target.value || n == null || n("");
|
|
3064
3064
|
},
|
|
3065
3065
|
onFocus: () => d(!0),
|
|
3066
3066
|
style: {
|
|
@@ -3122,7 +3122,7 @@ function z1({
|
|
|
3122
3122
|
cursor: "pointer",
|
|
3123
3123
|
_hover: { bg: "bg.subtle" },
|
|
3124
3124
|
onClick: () => {
|
|
3125
|
-
n == null || n(v.value),
|
|
3125
|
+
n == null || n(v.value), p(v.label), d(!1);
|
|
3126
3126
|
},
|
|
3127
3127
|
children: v.label
|
|
3128
3128
|
},
|
|
@@ -3151,10 +3151,10 @@ function O1({
|
|
|
3151
3151
|
dropzoneTitle: u = "Click or drag to upload",
|
|
3152
3152
|
id: d
|
|
3153
3153
|
}) {
|
|
3154
|
-
const [
|
|
3155
|
-
T.preventDefault(), l ||
|
|
3154
|
+
const [h, p] = B.useState(!1), [m, y] = B.useState([]), b = B.useRef(null), x = (T) => {
|
|
3155
|
+
T.preventDefault(), l || p(!0);
|
|
3156
3156
|
}, v = (T) => {
|
|
3157
|
-
T.preventDefault(),
|
|
3157
|
+
T.preventDefault(), p(!1);
|
|
3158
3158
|
}, w = (T) => {
|
|
3159
3159
|
if (!T || T.length === 0) return;
|
|
3160
3160
|
const S = Array.from(T).filter((F) => !(n && F.size > n));
|
|
@@ -3167,9 +3167,9 @@ function O1({
|
|
|
3167
3167
|
{
|
|
3168
3168
|
position: "relative",
|
|
3169
3169
|
border: "1.5px dashed",
|
|
3170
|
-
borderColor: i ? "red.500" :
|
|
3170
|
+
borderColor: i ? "red.500" : h ? "blue.500" : "border",
|
|
3171
3171
|
borderRadius: "xl",
|
|
3172
|
-
bg:
|
|
3172
|
+
bg: h ? "bg.subtle" : "transparent",
|
|
3173
3173
|
px: "6",
|
|
3174
3174
|
py: "8",
|
|
3175
3175
|
textAlign: "center",
|
|
@@ -3181,7 +3181,7 @@ function O1({
|
|
|
3181
3181
|
onDragOver: x,
|
|
3182
3182
|
onDragLeave: v,
|
|
3183
3183
|
onDrop: (T) => {
|
|
3184
|
-
T.preventDefault(),
|
|
3184
|
+
T.preventDefault(), p(!1), !l && w(T.dataTransfer.files);
|
|
3185
3185
|
},
|
|
3186
3186
|
onClick: () => {
|
|
3187
3187
|
var T;
|
|
@@ -3204,7 +3204,7 @@ function O1({
|
|
|
3204
3204
|
}
|
|
3205
3205
|
),
|
|
3206
3206
|
/* @__PURE__ */ a(f, { color: "text.muted", display: "flex", justifyContent: "center", mb: "3", children: Yl }),
|
|
3207
|
-
/* @__PURE__ */ a(P, { fontSize: "sm", fontWeight: "medium", color:
|
|
3207
|
+
/* @__PURE__ */ a(P, { fontSize: "sm", fontWeight: "medium", color: h ? "blue.500" : "text.heading", fontFamily: "var(--font-body)", children: u }),
|
|
3208
3208
|
/* @__PURE__ */ g(P, { fontSize: "xs", color: "text.muted", mt: "1", fontFamily: "var(--font-body)", children: [
|
|
3209
3209
|
e ? `Accepts ${e}` : "All file types supported",
|
|
3210
3210
|
n && ` up to ${Math.round(n / 1024 / 1024)}MB`
|
|
@@ -3830,9 +3830,9 @@ function pc(e, t) {
|
|
|
3830
3830
|
/**
|
|
3831
3831
|
* Schedule a process to run on the next frame.
|
|
3832
3832
|
*/
|
|
3833
|
-
schedule: (d,
|
|
3834
|
-
const y =
|
|
3835
|
-
return
|
|
3833
|
+
schedule: (d, h = !1, p = !1) => {
|
|
3834
|
+
const y = p && r ? n : o;
|
|
3835
|
+
return h && i.add(d), y.add(d), d;
|
|
3836
3836
|
},
|
|
3837
3837
|
/**
|
|
3838
3838
|
* Cancel the provided callback from running on the next frame.
|
|
@@ -3849,8 +3849,8 @@ function pc(e, t) {
|
|
|
3849
3849
|
return;
|
|
3850
3850
|
}
|
|
3851
3851
|
r = !0;
|
|
3852
|
-
const
|
|
3853
|
-
n = o, o =
|
|
3852
|
+
const h = n;
|
|
3853
|
+
n = o, o = h, n.forEach(c), n.clear(), r = !1, s && (s = !1, u.process(d));
|
|
3854
3854
|
}
|
|
3855
3855
|
};
|
|
3856
3856
|
return u;
|
|
@@ -3862,15 +3862,15 @@ function Ei(e, t) {
|
|
|
3862
3862
|
delta: 0,
|
|
3863
3863
|
timestamp: 0,
|
|
3864
3864
|
isProcessing: !1
|
|
3865
|
-
}, s = () => n = !0, i = mt.reduce((C, D) => (C[D] = pc(s), C), {}), { setup: l, read: c, resolveKeyframes: u, preUpdate: d, update:
|
|
3865
|
+
}, s = () => n = !0, i = mt.reduce((C, D) => (C[D] = pc(s), C), {}), { setup: l, read: c, resolveKeyframes: u, preUpdate: d, update: h, preRender: p, render: m, postRender: y } = i, b = () => {
|
|
3866
3866
|
const C = ke.useManualTiming, D = C ? r.timestamp : performance.now();
|
|
3867
|
-
n = !1, C || (r.delta = o ? 1e3 / 60 : Math.max(Math.min(D - r.timestamp, mc), 1)), r.timestamp = D, r.isProcessing = !0, l.process(r), c.process(r), u.process(r), d.process(r),
|
|
3867
|
+
n = !1, C || (r.delta = o ? 1e3 / 60 : Math.max(Math.min(D - r.timestamp, mc), 1)), r.timestamp = D, r.isProcessing = !0, l.process(r), c.process(r), u.process(r), d.process(r), h.process(r), p.process(r), m.process(r), y.process(r), r.isProcessing = !1, n && t && (o = !1, e(b));
|
|
3868
3868
|
}, x = () => {
|
|
3869
3869
|
n = !0, o = !0, r.isProcessing || e(b);
|
|
3870
3870
|
};
|
|
3871
3871
|
return { schedule: mt.reduce((C, D) => {
|
|
3872
3872
|
const k = i[D];
|
|
3873
|
-
return C[D] = (
|
|
3873
|
+
return C[D] = (M, T = !1, S = !1) => (n || x(), k.schedule(M, T, S)), C;
|
|
3874
3874
|
}, {}), cancel: (C) => {
|
|
3875
3875
|
for (let D = 0; D < mt.length; D++)
|
|
3876
3876
|
i[mt[D]].cancel(C);
|
|
@@ -4161,17 +4161,17 @@ function Kc({ duration: e = $.duration, bounce: t = $.bounce, velocity: n = $.ve
|
|
|
4161
4161
|
Ye(e <= /* @__PURE__ */ te($.maxDuration), "Spring duration must be 10 seconds or less", "spring-duration-limit");
|
|
4162
4162
|
let i = 1 - t;
|
|
4163
4163
|
i = be($.minDamping, $.maxDamping, i), e = be($.minDuration, $.maxDuration, /* @__PURE__ */ ie(e)), i < 1 ? (r = (u) => {
|
|
4164
|
-
const d = u * i,
|
|
4165
|
-
return ln -
|
|
4164
|
+
const d = u * i, h = d * e, p = d - n, m = kn(u, i), y = Math.exp(-h);
|
|
4165
|
+
return ln - p / m * y;
|
|
4166
4166
|
}, s = (u) => {
|
|
4167
|
-
const
|
|
4168
|
-
return (-r(u) + ln > 0 ? -1 : 1) * ((
|
|
4167
|
+
const h = u * i * e, p = h * n + n, m = Math.pow(i, 2) * Math.pow(u, 2) * e, y = Math.exp(-h), b = kn(Math.pow(u, 2), i);
|
|
4168
|
+
return (-r(u) + ln > 0 ? -1 : 1) * ((p - m) * y) / b;
|
|
4169
4169
|
}) : (r = (u) => {
|
|
4170
|
-
const d = Math.exp(-u * e),
|
|
4171
|
-
return -ln + d *
|
|
4170
|
+
const d = Math.exp(-u * e), h = (u - n) * e + 1;
|
|
4171
|
+
return -ln + d * h;
|
|
4172
4172
|
}, s = (u) => {
|
|
4173
|
-
const d = Math.exp(-u * e),
|
|
4174
|
-
return d *
|
|
4173
|
+
const d = Math.exp(-u * e), h = (n - u) * (e * e);
|
|
4174
|
+
return d * h;
|
|
4175
4175
|
});
|
|
4176
4176
|
const l = 5 / e, c = Gc(r, s, l);
|
|
4177
4177
|
if (e = /* @__PURE__ */ te(e), isNaN(c))
|
|
@@ -4228,53 +4228,53 @@ function Vt(e = $.visualDuration, t = $.bounce) {
|
|
|
4228
4228
|
bounce: t
|
|
4229
4229
|
} : e;
|
|
4230
4230
|
let { restSpeed: o, restDelta: r } = n;
|
|
4231
|
-
const s = n.keyframes[0], i = n.keyframes[n.keyframes.length - 1], l = { done: !1, value: s }, { stiffness: c, damping: u, mass: d, duration:
|
|
4231
|
+
const s = n.keyframes[0], i = n.keyframes[n.keyframes.length - 1], l = { done: !1, value: s }, { stiffness: c, damping: u, mass: d, duration: h, velocity: p, isResolvedFromDuration: m } = Xc({
|
|
4232
4232
|
...n,
|
|
4233
4233
|
velocity: -/* @__PURE__ */ ie(n.velocity || 0)
|
|
4234
|
-
}), y =
|
|
4234
|
+
}), y = p || 0, b = u / (2 * Math.sqrt(c * d)), x = i - s, v = /* @__PURE__ */ ie(Math.sqrt(c / d)), w = Math.abs(x) < 5;
|
|
4235
4235
|
o || (o = w ? $.restSpeed.granular : $.restSpeed.default), r || (r = w ? $.restDelta.granular : $.restDelta.default);
|
|
4236
|
-
let C, D, k,
|
|
4236
|
+
let C, D, k, M, T, S;
|
|
4237
4237
|
if (b < 1)
|
|
4238
|
-
k = kn(v, b),
|
|
4239
|
-
const I = Math.exp(-b * v *
|
|
4240
|
-
return i - I * (
|
|
4241
|
-
}, T = b * v *
|
|
4238
|
+
k = kn(v, b), M = (y + b * v * x) / k, C = (L) => {
|
|
4239
|
+
const I = Math.exp(-b * v * L);
|
|
4240
|
+
return i - I * (M * Math.sin(k * L) + x * Math.cos(k * L));
|
|
4241
|
+
}, T = b * v * M + x * k, S = b * v * x - M * k, D = (L) => Math.exp(-b * v * L) * (T * Math.sin(k * L) + S * Math.cos(k * L));
|
|
4242
4242
|
else if (b === 1) {
|
|
4243
4243
|
C = (I) => i - Math.exp(-v * I) * (x + (y + v * x) * I);
|
|
4244
|
-
const
|
|
4245
|
-
D = (I) => Math.exp(-v * I) * (v *
|
|
4244
|
+
const L = y + v * x;
|
|
4245
|
+
D = (I) => Math.exp(-v * I) * (v * L * I - y);
|
|
4246
4246
|
} else {
|
|
4247
|
-
const
|
|
4247
|
+
const L = v * Math.sqrt(b * b - 1);
|
|
4248
4248
|
C = (V) => {
|
|
4249
|
-
const
|
|
4250
|
-
return i -
|
|
4249
|
+
const O = Math.exp(-b * v * V), j = Math.min(L * V, 300);
|
|
4250
|
+
return i - O * ((y + b * v * x) * Math.sinh(j) + L * x * Math.cosh(j)) / L;
|
|
4251
4251
|
};
|
|
4252
|
-
const I = (y + b * v * x) /
|
|
4252
|
+
const I = (y + b * v * x) / L, E = b * v * I - x * L, z = b * v * x - I * L;
|
|
4253
4253
|
D = (V) => {
|
|
4254
|
-
const
|
|
4255
|
-
return
|
|
4254
|
+
const O = Math.exp(-b * v * V), j = Math.min(L * V, 300);
|
|
4255
|
+
return O * (E * Math.sinh(j) + z * Math.cosh(j));
|
|
4256
4256
|
};
|
|
4257
4257
|
}
|
|
4258
4258
|
const F = {
|
|
4259
|
-
calculatedDuration: m &&
|
|
4260
|
-
velocity: (
|
|
4261
|
-
next: (
|
|
4259
|
+
calculatedDuration: m && h || null,
|
|
4260
|
+
velocity: (L) => /* @__PURE__ */ te(D(L)),
|
|
4261
|
+
next: (L) => {
|
|
4262
4262
|
if (!m && b < 1) {
|
|
4263
|
-
const E = Math.exp(-b * v *
|
|
4264
|
-
return l.done = Math.abs(j) <= o && Math.abs(i -
|
|
4263
|
+
const E = Math.exp(-b * v * L), z = Math.sin(k * L), V = Math.cos(k * L), O = i - E * (M * z + x * V), j = /* @__PURE__ */ te(E * (T * z + S * V));
|
|
4264
|
+
return l.done = Math.abs(j) <= o && Math.abs(i - O) <= r, l.value = l.done ? i : O, l;
|
|
4265
4265
|
}
|
|
4266
|
-
const I = C(
|
|
4266
|
+
const I = C(L);
|
|
4267
4267
|
if (m)
|
|
4268
|
-
l.done =
|
|
4268
|
+
l.done = L >= h;
|
|
4269
4269
|
else {
|
|
4270
|
-
const E = /* @__PURE__ */ te(D(
|
|
4270
|
+
const E = /* @__PURE__ */ te(D(L));
|
|
4271
4271
|
l.done = Math.abs(E) <= o && Math.abs(i - I) <= r;
|
|
4272
4272
|
}
|
|
4273
4273
|
return l.value = l.done ? i : I, l;
|
|
4274
4274
|
},
|
|
4275
4275
|
toString: () => {
|
|
4276
|
-
const
|
|
4277
|
-
return
|
|
4276
|
+
const L = Math.min(lo(F), It), I = ji((E) => F.next(L * E).value, L, 30);
|
|
4277
|
+
return L + "ms " + I;
|
|
4278
4278
|
},
|
|
4279
4279
|
toTransition: () => {
|
|
4280
4280
|
}
|
|
@@ -4291,22 +4291,22 @@ function Hi(e, t, n) {
|
|
|
4291
4291
|
return vi(n - e(o), t - o);
|
|
4292
4292
|
}
|
|
4293
4293
|
function Fn({ keyframes: e, velocity: t = 0, power: n = 0.8, timeConstant: o = 325, bounceDamping: r = 10, bounceStiffness: s = 500, modifyTarget: i, min: l, max: c, restDelta: u = 0.5, restSpeed: d }) {
|
|
4294
|
-
const
|
|
4294
|
+
const h = e[0], p = {
|
|
4295
4295
|
done: !1,
|
|
4296
|
-
value:
|
|
4296
|
+
value: h
|
|
4297
4297
|
}, m = (S) => l !== void 0 && S < l || c !== void 0 && S > c, y = (S) => l === void 0 ? c : c === void 0 || Math.abs(l - S) < Math.abs(c - S) ? l : c;
|
|
4298
4298
|
let b = n * t;
|
|
4299
|
-
const x =
|
|
4300
|
-
v !== x && (b = v -
|
|
4299
|
+
const x = h + b, v = i === void 0 ? x : i(x);
|
|
4300
|
+
v !== x && (b = v - h);
|
|
4301
4301
|
const w = (S) => -b * Math.exp(-S / o), C = (S) => v + w(S), D = (S) => {
|
|
4302
|
-
const F = w(S),
|
|
4303
|
-
|
|
4302
|
+
const F = w(S), L = C(S);
|
|
4303
|
+
p.done = Math.abs(F) <= u, p.value = p.done ? v : L;
|
|
4304
4304
|
};
|
|
4305
|
-
let k,
|
|
4305
|
+
let k, M;
|
|
4306
4306
|
const T = (S) => {
|
|
4307
|
-
m(
|
|
4308
|
-
keyframes: [
|
|
4309
|
-
velocity: Hi(C, S,
|
|
4307
|
+
m(p.value) && (k = S, M = Vt({
|
|
4308
|
+
keyframes: [p.value, y(p.value)],
|
|
4309
|
+
velocity: Hi(C, S, p.value),
|
|
4310
4310
|
// TODO: This should be passing * 1000
|
|
4311
4311
|
damping: r,
|
|
4312
4312
|
stiffness: s,
|
|
@@ -4318,7 +4318,7 @@ function Fn({ keyframes: e, velocity: t = 0, power: n = 0.8, timeConstant: o = 3
|
|
|
4318
4318
|
calculatedDuration: null,
|
|
4319
4319
|
next: (S) => {
|
|
4320
4320
|
let F = !1;
|
|
4321
|
-
return !
|
|
4321
|
+
return !M && k === void 0 && (F = !0, D(S), T(S)), k !== void 0 && S >= k ? M.next(S - k) : (!F && D(S), p);
|
|
4322
4322
|
}
|
|
4323
4323
|
};
|
|
4324
4324
|
}
|
|
@@ -4345,12 +4345,12 @@ function Qc(e, t, { clamp: n = !0, ease: o, mixer: r } = {}) {
|
|
|
4345
4345
|
const l = Jc(t, o, r), c = l.length, u = (d) => {
|
|
4346
4346
|
if (i && d < e[0])
|
|
4347
4347
|
return t[0];
|
|
4348
|
-
let
|
|
4348
|
+
let h = 0;
|
|
4349
4349
|
if (c > 1)
|
|
4350
|
-
for (;
|
|
4350
|
+
for (; h < e.length - 2 && !(d < e[h + 1]); h++)
|
|
4351
4351
|
;
|
|
4352
|
-
const
|
|
4353
|
-
return l[
|
|
4352
|
+
const p = /* @__PURE__ */ it(e[h], e[h + 1], d);
|
|
4353
|
+
return l[h](p);
|
|
4354
4354
|
};
|
|
4355
4355
|
return n ? (d) => u(be(e[0], e[s - 1], d)) : u;
|
|
4356
4356
|
}
|
|
@@ -4463,21 +4463,21 @@ class zt extends co {
|
|
|
4463
4463
|
const { generator: o, totalDuration: r, mixKeyframes: s, mirroredGenerator: i, resolvedDuration: l, calculatedDuration: c } = this;
|
|
4464
4464
|
if (this.startTime === null)
|
|
4465
4465
|
return o.next(0);
|
|
4466
|
-
const { delay: u = 0, keyframes: d, repeat:
|
|
4466
|
+
const { delay: u = 0, keyframes: d, repeat: h, repeatType: p, repeatDelay: m, type: y, onUpdate: b, finalKeyframe: x } = this.options;
|
|
4467
4467
|
this.speed > 0 ? this.startTime = Math.min(this.startTime, t) : this.speed < 0 && (this.startTime = Math.min(t - r / this.speed, this.startTime)), n ? this.currentTime = t : this.updateTime(t);
|
|
4468
4468
|
const v = this.currentTime - u * (this.playbackSpeed >= 0 ? 1 : -1), w = this.playbackSpeed >= 0 ? v < 0 : v > r;
|
|
4469
4469
|
this.currentTime = Math.max(v, 0), this.state === "finished" && this.holdTime === null && (this.currentTime = r);
|
|
4470
4470
|
let C = this.currentTime, D = o;
|
|
4471
|
-
if (
|
|
4471
|
+
if (h) {
|
|
4472
4472
|
const S = Math.min(this.currentTime, r) / l;
|
|
4473
|
-
let F = Math.floor(S),
|
|
4474
|
-
!
|
|
4473
|
+
let F = Math.floor(S), L = S % 1;
|
|
4474
|
+
!L && S >= 1 && (L = 1), L === 1 && F--, F = Math.min(F, h + 1), !!(F % 2) && (p === "reverse" ? (L = 1 - L, m && (L -= m / l)) : p === "mirror" && (D = i)), C = be(0, 1, L) * l;
|
|
4475
4475
|
}
|
|
4476
4476
|
let k;
|
|
4477
4477
|
w ? (this.delayState.value = d[0], k = this.delayState) : k = D.next(C), s && !w && (k.value = s(k.value));
|
|
4478
|
-
let { done:
|
|
4479
|
-
!w && c !== null && (
|
|
4480
|
-
const T = this.holdTime === null && (this.state === "finished" || this.state === "running" &&
|
|
4478
|
+
let { done: M } = k;
|
|
4479
|
+
!w && c !== null && (M = this.playbackSpeed >= 0 ? this.currentTime >= r : this.currentTime <= 0);
|
|
4480
|
+
const T = this.holdTime === null && (this.state === "finished" || this.state === "running" && M);
|
|
4481
4481
|
return T && y !== Fn && (k.value = Kt(d, this.options, x, this.speed)), b && b(k.value), T && this.finish(), k;
|
|
4482
4482
|
}
|
|
4483
4483
|
/**
|
|
@@ -4773,17 +4773,17 @@ function xd(e, t, n, { delay: o = 0, duration: r = 300, repeat: s = 0, repeatTyp
|
|
|
4773
4773
|
[t]: n
|
|
4774
4774
|
};
|
|
4775
4775
|
c && (d.offset = c);
|
|
4776
|
-
const
|
|
4777
|
-
Array.isArray(
|
|
4778
|
-
const
|
|
4776
|
+
const h = Yi(l, r);
|
|
4777
|
+
Array.isArray(h) && (d.easing = h);
|
|
4778
|
+
const p = {
|
|
4779
4779
|
delay: o,
|
|
4780
4780
|
duration: r,
|
|
4781
|
-
easing: Array.isArray(
|
|
4781
|
+
easing: Array.isArray(h) ? "linear" : h,
|
|
4782
4782
|
fill: "both",
|
|
4783
4783
|
iterations: s + 1,
|
|
4784
4784
|
direction: i === "reverse" ? "alternate" : "normal"
|
|
4785
4785
|
};
|
|
4786
|
-
return u && (
|
|
4786
|
+
return u && (p.pseudoElement = u), e.animate(d, p);
|
|
4787
4787
|
}
|
|
4788
4788
|
function Zi(e) {
|
|
4789
4789
|
return typeof e == "function" && "applyToOptions" in e;
|
|
@@ -4924,8 +4924,8 @@ class Cd extends Xi {
|
|
|
4924
4924
|
const l = new zt({
|
|
4925
4925
|
...i,
|
|
4926
4926
|
autoplay: !1
|
|
4927
|
-
}), c = Math.max(cn, Q.now() - this.startTime), u = be(0, cn, c - cn), d = l.sample(c).value, { name:
|
|
4928
|
-
s &&
|
|
4927
|
+
}), c = Math.max(cn, Q.now() - this.startTime), u = be(0, cn, c - cn), d = l.sample(c).value, { name: h } = this.options;
|
|
4928
|
+
s && h && Ui(s, h, d), n.setWithVelocity(l.sample(Math.max(0, c - u)).value, d, u), l.stop();
|
|
4929
4929
|
}
|
|
4930
4930
|
}
|
|
4931
4931
|
const Jo = (e, t) => t === "zIndex" ? !1 : !!(typeof e == "number" || Array.isArray(e) || typeof e == "string" && // It's animatable if we have a string
|
|
@@ -4979,9 +4979,9 @@ const Ad = /* @__PURE__ */ new Set([
|
|
|
4979
4979
|
"borderLeftColor"
|
|
4980
4980
|
]), Ld = /* @__PURE__ */ xi(() => Object.hasOwnProperty.call(Element.prototype, "animate"));
|
|
4981
4981
|
function Md(e) {
|
|
4982
|
-
var
|
|
4982
|
+
var h;
|
|
4983
4983
|
const { motionValue: t, name: n, repeatDelay: o, repeatType: r, damping: s, type: i, keyframes: l } = e;
|
|
4984
|
-
if (!(((
|
|
4984
|
+
if (!(((h = t == null ? void 0 : t.owner) == null ? void 0 : h.current) instanceof HTMLElement))
|
|
4985
4985
|
return !1;
|
|
4986
4986
|
const { onUpdate: u, transformTemplate: d } = t.owner.getProps();
|
|
4987
4987
|
return Ld() && n && /**
|
|
@@ -4996,13 +4996,13 @@ function Md(e) {
|
|
|
4996
4996
|
}
|
|
4997
4997
|
const Ed = 40;
|
|
4998
4998
|
class Rd extends co {
|
|
4999
|
-
constructor({ autoplay: t = !0, delay: n = 0, type: o = "keyframes", repeat: r = 0, repeatDelay: s = 0, repeatType: i = "loop", keyframes: l, name: c, motionValue: u, element: d, ...
|
|
4999
|
+
constructor({ autoplay: t = !0, delay: n = 0, type: o = "keyframes", repeat: r = 0, repeatDelay: s = 0, repeatType: i = "loop", keyframes: l, name: c, motionValue: u, element: d, ...h }) {
|
|
5000
5000
|
var y;
|
|
5001
5001
|
super(), this.stop = () => {
|
|
5002
5002
|
var b, x;
|
|
5003
5003
|
this._animation && (this._animation.stop(), (b = this.stopTimeline) == null || b.call(this)), (x = this.keyframeResolver) == null || x.cancel();
|
|
5004
5004
|
}, this.createdAt = Q.now();
|
|
5005
|
-
const
|
|
5005
|
+
const p = {
|
|
5006
5006
|
autoplay: t,
|
|
5007
5007
|
delay: n,
|
|
5008
5008
|
type: o,
|
|
@@ -5012,23 +5012,23 @@ class Rd extends co {
|
|
|
5012
5012
|
name: c,
|
|
5013
5013
|
motionValue: u,
|
|
5014
5014
|
element: d,
|
|
5015
|
-
...
|
|
5015
|
+
...h
|
|
5016
5016
|
}, m = (d == null ? void 0 : d.KeyframeResolver) || uo;
|
|
5017
|
-
this.keyframeResolver = new m(l, (b, x, v) => this.onKeyframesResolved(b, x,
|
|
5017
|
+
this.keyframeResolver = new m(l, (b, x, v) => this.onKeyframesResolved(b, x, p, !v), c, u, d), (y = this.keyframeResolver) == null || y.scheduleResolve();
|
|
5018
5018
|
}
|
|
5019
5019
|
onKeyframesResolved(t, n, o, r) {
|
|
5020
5020
|
var v, w;
|
|
5021
5021
|
this.keyframeResolver = void 0;
|
|
5022
5022
|
const { name: s, type: i, velocity: l, delay: c, isHandoff: u, onUpdate: d } = o;
|
|
5023
5023
|
this.resolvedAt = Q.now();
|
|
5024
|
-
let
|
|
5025
|
-
Fd(t, s, i, l) || (
|
|
5024
|
+
let h = !0;
|
|
5025
|
+
Fd(t, s, i, l) || (h = !1, (ke.instantAnimations || !c) && (d == null || d(Kt(t, o, n))), t[0] = t[t.length - 1], Pn(o), o.repeat = 0);
|
|
5026
5026
|
const m = {
|
|
5027
5027
|
startTime: r ? this.resolvedAt ? this.resolvedAt - this.createdAt > Ed ? this.resolvedAt : this.createdAt : this.createdAt : void 0,
|
|
5028
5028
|
finalKeyframe: n,
|
|
5029
5029
|
...o,
|
|
5030
5030
|
keyframes: t
|
|
5031
|
-
}, y =
|
|
5031
|
+
}, y = h && !u && Md(m), b = (w = (v = m.motionValue) == null ? void 0 : v.owner) == null ? void 0 : w.current;
|
|
5032
5032
|
let x;
|
|
5033
5033
|
if (y)
|
|
5034
5034
|
try {
|
|
@@ -5182,8 +5182,8 @@ const ho = (e, t, n, o = {}, r, s) => (i) => {
|
|
|
5182
5182
|
velocity: t.getVelocity(),
|
|
5183
5183
|
...l,
|
|
5184
5184
|
delay: -u,
|
|
5185
|
-
onUpdate: (
|
|
5186
|
-
t.set(
|
|
5185
|
+
onUpdate: (p) => {
|
|
5186
|
+
t.set(p), l.onUpdate && l.onUpdate(p);
|
|
5187
5187
|
},
|
|
5188
5188
|
onComplete: () => {
|
|
5189
5189
|
i(), l.onComplete && l.onComplete();
|
|
@@ -5193,12 +5193,12 @@ const ho = (e, t, n, o = {}, r, s) => (i) => {
|
|
|
5193
5193
|
element: s ? void 0 : r
|
|
5194
5194
|
};
|
|
5195
5195
|
Nd(l) || Object.assign(d, jd(e, d)), d.duration && (d.duration = /* @__PURE__ */ te(d.duration)), d.repeatDelay && (d.repeatDelay = /* @__PURE__ */ te(d.repeatDelay)), d.from !== void 0 && (d.keyframes[0] = d.from);
|
|
5196
|
-
let
|
|
5197
|
-
if ((d.type === !1 || d.duration === 0 && !d.repeatDelay) && (Pn(d), d.delay === 0 && (
|
|
5198
|
-
const
|
|
5199
|
-
if (
|
|
5196
|
+
let h = !1;
|
|
5197
|
+
if ((d.type === !1 || d.duration === 0 && !d.repeatDelay) && (Pn(d), d.delay === 0 && (h = !0)), (ke.instantAnimations || ke.skipAnimations || r != null && r.shouldSkipAnimations) && (h = !0, Pn(d), d.delay = 0), d.allowFlatten = !l.type && !l.ease, h && !s && t.get() !== void 0) {
|
|
5198
|
+
const p = Kt(d.keyframes, l);
|
|
5199
|
+
if (p !== void 0) {
|
|
5200
5200
|
H.update(() => {
|
|
5201
|
-
d.onUpdate(
|
|
5201
|
+
d.onUpdate(p), d.onComplete();
|
|
5202
5202
|
});
|
|
5203
5203
|
return;
|
|
5204
5204
|
}
|
|
@@ -5486,14 +5486,14 @@ function is(e, t, { delay: n = 0, transitionOverride: o, type: r } = {}) {
|
|
|
5486
5486
|
s = s ? ts(s, c) : c;
|
|
5487
5487
|
const u = s == null ? void 0 : s.reduceMotion;
|
|
5488
5488
|
o && (s = o);
|
|
5489
|
-
const d = [],
|
|
5490
|
-
for (const
|
|
5491
|
-
const m = e.getValue(
|
|
5492
|
-
if (y === void 0 ||
|
|
5489
|
+
const d = [], h = r && e.animationState && e.animationState.getState()[r];
|
|
5490
|
+
for (const p in l) {
|
|
5491
|
+
const m = e.getValue(p, e.latestValues[p] ?? null), y = l[p];
|
|
5492
|
+
if (y === void 0 || h && Xd(h, p))
|
|
5493
5493
|
continue;
|
|
5494
5494
|
const b = {
|
|
5495
5495
|
delay: n,
|
|
5496
|
-
...fo(s || {},
|
|
5496
|
+
...fo(s || {}, p)
|
|
5497
5497
|
}, x = m.get();
|
|
5498
5498
|
if (x !== void 0 && !m.isAnimating() && !Array.isArray(y) && y === x && !b.velocity) {
|
|
5499
5499
|
H.update(() => m.set(y));
|
|
@@ -5503,21 +5503,21 @@ function is(e, t, { delay: n = 0, transitionOverride: o, type: r } = {}) {
|
|
|
5503
5503
|
if (window.MotionHandoffAnimation) {
|
|
5504
5504
|
const D = rs(e);
|
|
5505
5505
|
if (D) {
|
|
5506
|
-
const k = window.MotionHandoffAnimation(D,
|
|
5506
|
+
const k = window.MotionHandoffAnimation(D, p, H);
|
|
5507
5507
|
k !== null && (b.startTime = k, v = !0);
|
|
5508
5508
|
}
|
|
5509
5509
|
}
|
|
5510
|
-
In(e,
|
|
5510
|
+
In(e, p);
|
|
5511
5511
|
const w = u ?? e.shouldReduceMotion;
|
|
5512
|
-
m.start(ho(
|
|
5512
|
+
m.start(ho(p, m, y, w && ns.has(p) ? { type: !1 } : b, e, v));
|
|
5513
5513
|
const C = m.animation;
|
|
5514
5514
|
C && d.push(C);
|
|
5515
5515
|
}
|
|
5516
5516
|
if (i) {
|
|
5517
|
-
const
|
|
5517
|
+
const p = () => H.update(() => {
|
|
5518
5518
|
i && Kd(e, i);
|
|
5519
5519
|
});
|
|
5520
|
-
d.length ? Promise.all(d).then(
|
|
5520
|
+
d.length ? Promise.all(d).then(p) : p();
|
|
5521
5521
|
}
|
|
5522
5522
|
return d;
|
|
5523
5523
|
}
|
|
@@ -5527,8 +5527,8 @@ function Vn(e, t, n = {}) {
|
|
|
5527
5527
|
let { transition: r = e.getDefaultTransition() || {} } = o || {};
|
|
5528
5528
|
n.transitionOverride && (r = n.transitionOverride);
|
|
5529
5529
|
const s = o ? () => Promise.all(is(e, o, n)) : () => Promise.resolve(), i = e.variantChildren && e.variantChildren.size ? (u = 0) => {
|
|
5530
|
-
const { delayChildren: d = 0, staggerChildren:
|
|
5531
|
-
return qd(e, t, u, d,
|
|
5530
|
+
const { delayChildren: d = 0, staggerChildren: h, staggerDirection: p } = r;
|
|
5531
|
+
return qd(e, t, u, d, h, p, n);
|
|
5532
5532
|
} : () => Promise.resolve(), { when: l } = r;
|
|
5533
5533
|
if (l) {
|
|
5534
5534
|
const [u, d] = l === "beforeChildren" ? [s, i] : [i, s];
|
|
@@ -5726,10 +5726,10 @@ class cu extends uo {
|
|
|
5726
5726
|
return;
|
|
5727
5727
|
super.readKeyframes();
|
|
5728
5728
|
for (let d = 0; d < t.length; d++) {
|
|
5729
|
-
let
|
|
5730
|
-
if (typeof
|
|
5731
|
-
const
|
|
5732
|
-
|
|
5729
|
+
let h = t[d];
|
|
5730
|
+
if (typeof h == "string" && (h = h.trim(), ro(h))) {
|
|
5731
|
+
const p = es(h, n.current);
|
|
5732
|
+
p !== void 0 && (t[d] = p), d === t.length - 1 && (this.finalKeyframe = h);
|
|
5733
5733
|
}
|
|
5734
5734
|
}
|
|
5735
5735
|
if (this.resolveNoneKeyframes(), !ns.has(o) || t.length !== 2)
|
|
@@ -5742,8 +5742,8 @@ class cu extends uo {
|
|
|
5742
5742
|
if (i !== l)
|
|
5743
5743
|
if (Xo(i) && Xo(l))
|
|
5744
5744
|
for (let d = 0; d < t.length; d++) {
|
|
5745
|
-
const
|
|
5746
|
-
typeof
|
|
5745
|
+
const h = t[d];
|
|
5746
|
+
typeof h == "string" && (t[d] = parseFloat(h));
|
|
5747
5747
|
}
|
|
5748
5748
|
else Se[o] && (this.needsMeasurement = !0);
|
|
5749
5749
|
}
|
|
@@ -5821,19 +5821,19 @@ function fu(e, t, n = {}) {
|
|
|
5821
5821
|
let l = !1, c = !1, u;
|
|
5822
5822
|
const d = () => {
|
|
5823
5823
|
i.removeEventListener("pointerleave", y);
|
|
5824
|
-
}, p = (x) => {
|
|
5825
|
-
u && (u(x), u = void 0), d();
|
|
5826
5824
|
}, h = (x) => {
|
|
5827
|
-
|
|
5825
|
+
u && (u(x), u = void 0), d();
|
|
5826
|
+
}, p = (x) => {
|
|
5827
|
+
l = !1, window.removeEventListener("pointerup", p), window.removeEventListener("pointercancel", p), c && (c = !1, h(x));
|
|
5828
5828
|
}, m = () => {
|
|
5829
|
-
l = !0, window.addEventListener("pointerup",
|
|
5829
|
+
l = !0, window.addEventListener("pointerup", p, r), window.addEventListener("pointercancel", p, r);
|
|
5830
5830
|
}, y = (x) => {
|
|
5831
5831
|
if (x.pointerType !== "touch") {
|
|
5832
5832
|
if (l) {
|
|
5833
5833
|
c = !0;
|
|
5834
5834
|
return;
|
|
5835
5835
|
}
|
|
5836
|
-
|
|
5836
|
+
h(x);
|
|
5837
5837
|
}
|
|
5838
5838
|
}, b = (x) => {
|
|
5839
5839
|
if (!uu(x))
|
|
@@ -5894,13 +5894,13 @@ function bu(e, t, n = {}) {
|
|
|
5894
5894
|
return;
|
|
5895
5895
|
Ft.add(c), n.stopPropagation && ir.add(l);
|
|
5896
5896
|
const u = t(c, l), d = (m, y) => {
|
|
5897
|
-
window.removeEventListener("pointerup",
|
|
5898
|
-
}, p = (m) => {
|
|
5899
|
-
d(m, c === window || c === document || n.useGlobalTarget || ps(c, m.target));
|
|
5897
|
+
window.removeEventListener("pointerup", h), window.removeEventListener("pointercancel", p), Ft.has(c) && Ft.delete(c), rr(m) && typeof u == "function" && u(m, { success: y });
|
|
5900
5898
|
}, h = (m) => {
|
|
5899
|
+
d(m, c === window || c === document || n.useGlobalTarget || ps(c, m.target));
|
|
5900
|
+
}, p = (m) => {
|
|
5901
5901
|
d(m, !1);
|
|
5902
5902
|
};
|
|
5903
|
-
window.addEventListener("pointerup",
|
|
5903
|
+
window.addEventListener("pointerup", h, r), window.addEventListener("pointercancel", p, r);
|
|
5904
5904
|
};
|
|
5905
5905
|
return o.forEach((l) => {
|
|
5906
5906
|
(n.useGlobalTarget ? window : l).addEventListener("pointerdown", i, r), kt(l) && (l.addEventListener("focus", (u) => yu(u, r)), !pu(l) && !l.hasAttribute("tabindex") && (l.tabIndex = 0));
|
|
@@ -6068,9 +6068,9 @@ class Iu {
|
|
|
6068
6068
|
};
|
|
6069
6069
|
const { latestValues: u, renderState: d } = l;
|
|
6070
6070
|
this.latestValues = u, this.baseTarget = { ...u }, this.initialValues = n.initial ? { ...u } : {}, this.renderState = d, this.parent = t, this.props = n, this.presenceContext = o, this.depth = t ? t.depth + 1 : 0, this.reducedMotionConfig = r, this.skipAnimationsConfig = s, this.options = c, this.blockInitialAnimation = !!i, this.isControllingVariants = Zt(n), this.isVariantNode = gs(n), this.isVariantNode && (this.variantChildren = /* @__PURE__ */ new Set()), this.manuallyAnimateOnMount = !!(t && t.current);
|
|
6071
|
-
const { willChange:
|
|
6072
|
-
for (const m in
|
|
6073
|
-
const y =
|
|
6071
|
+
const { willChange: h, ...p } = this.scrapeMotionValuesFromProps(n, {}, this);
|
|
6072
|
+
for (const m in p) {
|
|
6073
|
+
const y = p[m];
|
|
6074
6074
|
u[m] !== void 0 && q(y) && y.set(u[m]);
|
|
6075
6075
|
}
|
|
6076
6076
|
}
|
|
@@ -6100,16 +6100,16 @@ class Iu {
|
|
|
6100
6100
|
}
|
|
6101
6101
|
bindToMotionValue(t, n) {
|
|
6102
6102
|
if (this.valueSubscriptions.has(t) && this.valueSubscriptions.get(t)(), n.accelerate && Ji.has(t) && this.current instanceof HTMLElement) {
|
|
6103
|
-
const { factory: i, keyframes: l, times: c, ease: u, duration: d } = n.accelerate,
|
|
6103
|
+
const { factory: i, keyframes: l, times: c, ease: u, duration: d } = n.accelerate, h = new Xi({
|
|
6104
6104
|
element: this.current,
|
|
6105
6105
|
name: t,
|
|
6106
6106
|
keyframes: l,
|
|
6107
6107
|
times: c,
|
|
6108
6108
|
ease: u,
|
|
6109
6109
|
duration: /* @__PURE__ */ te(d)
|
|
6110
|
-
}),
|
|
6110
|
+
}), p = i(h);
|
|
6111
6111
|
this.valueSubscriptions.set(t, () => {
|
|
6112
|
-
|
|
6112
|
+
p(), h.cancel();
|
|
6113
6113
|
});
|
|
6114
6114
|
return;
|
|
6115
6115
|
}
|
|
@@ -6555,11 +6555,11 @@ function Ts(e, {
|
|
|
6555
6555
|
return;
|
|
6556
6556
|
}
|
|
6557
6557
|
e.attrs = e.style, e.style = {};
|
|
6558
|
-
const { attrs:
|
|
6559
|
-
|
|
6558
|
+
const { attrs: h, style: p } = e;
|
|
6559
|
+
h.transform && (p.transform = h.transform, delete h.transform), (p.transform || h.transformOrigin) && (p.transformOrigin = h.transformOrigin ?? "50% 50%", delete h.transformOrigin), p.transform && (p.transformBox = (d == null ? void 0 : d.transformBox) ?? "fill-box", delete h.transformBox);
|
|
6560
6560
|
for (const m of Zu)
|
|
6561
|
-
|
|
6562
|
-
t !== void 0 && (
|
|
6561
|
+
h[m] !== void 0 && (p[m] = h[m], delete h[m]);
|
|
6562
|
+
t !== void 0 && (h.x = t), n !== void 0 && (h.y = n), o !== void 0 && (h.scale = o), r !== void 0 && Yu(h, r, s, i, !1);
|
|
6563
6563
|
}
|
|
6564
6564
|
const Ds = /* @__PURE__ */ new Set([
|
|
6565
6565
|
"baseFrequency",
|
|
@@ -6659,11 +6659,11 @@ function tf(e) {
|
|
|
6659
6659
|
}
|
|
6660
6660
|
function nf(e) {
|
|
6661
6661
|
let t = tf(e), n = yr(), o = !0, r = !1;
|
|
6662
|
-
const s = (u) => (d,
|
|
6662
|
+
const s = (u) => (d, h) => {
|
|
6663
6663
|
var m;
|
|
6664
|
-
const
|
|
6665
|
-
if (
|
|
6666
|
-
const { transition: y, transitionEnd: b, ...x } =
|
|
6664
|
+
const p = Ie(e, h, u === "exit" ? (m = e.presenceContext) == null ? void 0 : m.custom : void 0);
|
|
6665
|
+
if (p) {
|
|
6666
|
+
const { transition: y, transitionEnd: b, ...x } = p;
|
|
6667
6667
|
d = { ...d, ...x, ...b };
|
|
6668
6668
|
}
|
|
6669
6669
|
return d;
|
|
@@ -6672,18 +6672,18 @@ function nf(e) {
|
|
|
6672
6672
|
t = u(e);
|
|
6673
6673
|
}
|
|
6674
6674
|
function l(u) {
|
|
6675
|
-
const { props: d } = e,
|
|
6675
|
+
const { props: d } = e, h = Ms(e.parent) || {}, p = [], m = /* @__PURE__ */ new Set();
|
|
6676
6676
|
let y = {}, b = 1 / 0;
|
|
6677
6677
|
for (let v = 0; v < ef; v++) {
|
|
6678
|
-
const w = Qu[v], C = n[w], D = d[w] !== void 0 ? d[w] :
|
|
6679
|
-
|
|
6680
|
-
let T = D ===
|
|
6678
|
+
const w = Qu[v], C = n[w], D = d[w] !== void 0 ? d[w] : h[w], k = at(D), M = w === u ? C.isActive : null;
|
|
6679
|
+
M === !1 && (b = v);
|
|
6680
|
+
let T = D === h[w] && D !== d[w] && k;
|
|
6681
6681
|
if (T && (o || r) && e.manuallyAnimateOnMount && (T = !1), C.protectedKeys = { ...y }, // If it isn't active and hasn't *just* been set as inactive
|
|
6682
|
-
!C.isActive &&
|
|
6682
|
+
!C.isActive && M === null || // If we didn't and don't have any defined prop for this animation type
|
|
6683
6683
|
!D && !C.prevProp || // Or if the prop doesn't define an animation
|
|
6684
6684
|
Yt(D) || typeof D == "boolean")
|
|
6685
6685
|
continue;
|
|
6686
|
-
if (w === "exit" && C.isActive &&
|
|
6686
|
+
if (w === "exit" && C.isActive && M !== !0) {
|
|
6687
6687
|
C.prevResolvedValues && (y = {
|
|
6688
6688
|
...y,
|
|
6689
6689
|
...C.prevResolvedValues
|
|
@@ -6693,28 +6693,28 @@ function nf(e) {
|
|
|
6693
6693
|
const S = of(C.prevProp, D);
|
|
6694
6694
|
let F = S || // If we're making this variant active, we want to always make it active
|
|
6695
6695
|
w === u && C.isActive && !T && k || // If we removed a higher-priority variant (i is in reverse order)
|
|
6696
|
-
v > b && k,
|
|
6696
|
+
v > b && k, L = !1;
|
|
6697
6697
|
const I = Array.isArray(D) ? D : [D];
|
|
6698
6698
|
let E = I.reduce(s(w), {});
|
|
6699
|
-
|
|
6700
|
-
const { prevResolvedValues:
|
|
6701
|
-
...
|
|
6699
|
+
M === !1 && (E = {});
|
|
6700
|
+
const { prevResolvedValues: z = {} } = C, V = {
|
|
6701
|
+
...z,
|
|
6702
6702
|
...E
|
|
6703
|
-
},
|
|
6704
|
-
F = !0, m.has(W) && (
|
|
6703
|
+
}, O = (W) => {
|
|
6704
|
+
F = !0, m.has(W) && (L = !0, m.delete(W)), C.needsAnimating[W] = !0;
|
|
6705
6705
|
const K = e.getValue(W);
|
|
6706
6706
|
K && (K.liveStyle = !1);
|
|
6707
6707
|
};
|
|
6708
6708
|
for (const W in V) {
|
|
6709
|
-
const K = E[W], ae =
|
|
6709
|
+
const K = E[W], ae = z[W];
|
|
6710
6710
|
if (y.hasOwnProperty(W))
|
|
6711
6711
|
continue;
|
|
6712
6712
|
let he = !1;
|
|
6713
|
-
Bn(K) && Bn(ae) ? he = !Es(K, ae) : he = K !== ae, he ? K != null ?
|
|
6713
|
+
Bn(K) && Bn(ae) ? he = !Es(K, ae) : he = K !== ae, he ? K != null ? O(W) : m.add(W) : K !== void 0 && m.has(W) ? O(W) : C.protectedKeys[W] = !0;
|
|
6714
6714
|
}
|
|
6715
6715
|
C.prevProp = D, C.prevResolvedValues = E, C.isActive && (y = { ...y, ...E }), (o || r) && e.blockInitialAnimation && (F = !1);
|
|
6716
6716
|
const j = T && S;
|
|
6717
|
-
F && (!j ||
|
|
6717
|
+
F && (!j || L) && p.push(...I.map((W) => {
|
|
6718
6718
|
const K = { type: w };
|
|
6719
6719
|
if (typeof W == "string" && (o || r) && !j && e.manuallyAnimateOnMount && e.parent) {
|
|
6720
6720
|
const { parent: ae } = e, he = Ie(ae, W);
|
|
@@ -6738,23 +6738,23 @@ function nf(e) {
|
|
|
6738
6738
|
m.forEach((w) => {
|
|
6739
6739
|
const C = e.getBaseTarget(w), D = e.getValue(w);
|
|
6740
6740
|
D && (D.liveStyle = !0), v[w] = C ?? null;
|
|
6741
|
-
}),
|
|
6741
|
+
}), p.push({ animation: v });
|
|
6742
6742
|
}
|
|
6743
|
-
let x = !!
|
|
6744
|
-
return o && (d.initial === !1 || d.initial === d.animate) && !e.manuallyAnimateOnMount && (x = !1), o = !1, r = !1, x ? t(
|
|
6743
|
+
let x = !!p.length;
|
|
6744
|
+
return o && (d.initial === !1 || d.initial === d.animate) && !e.manuallyAnimateOnMount && (x = !1), o = !1, r = !1, x ? t(p) : Promise.resolve();
|
|
6745
6745
|
}
|
|
6746
6746
|
function c(u, d) {
|
|
6747
|
-
var
|
|
6747
|
+
var p;
|
|
6748
6748
|
if (n[u].isActive === d)
|
|
6749
6749
|
return Promise.resolve();
|
|
6750
|
-
(
|
|
6750
|
+
(p = e.variantChildren) == null || p.forEach((m) => {
|
|
6751
6751
|
var y;
|
|
6752
6752
|
return (y = m.animationState) == null ? void 0 : y.setActive(u, d);
|
|
6753
6753
|
}), n[u].isActive = d;
|
|
6754
|
-
const
|
|
6754
|
+
const h = l(u);
|
|
6755
6755
|
for (const m in n)
|
|
6756
6756
|
n[m].protectedKeys = {};
|
|
6757
|
-
return
|
|
6757
|
+
return h;
|
|
6758
6758
|
}
|
|
6759
6759
|
return {
|
|
6760
6760
|
animateChanges: l,
|
|
@@ -6871,8 +6871,8 @@ function mf(e, t, n) {
|
|
|
6871
6871
|
let o = "";
|
|
6872
6872
|
const r = e.x.translate / t.x, s = e.y.translate / t.y, i = (n == null ? void 0 : n.z) || 0;
|
|
6873
6873
|
if ((r || s || i) && (o = `translate3d(${r}px, ${s}px, ${i}px) `), (t.x !== 1 || t.y !== 1) && (o += `scale(${1 / t.x}, ${1 / t.y}) `), n) {
|
|
6874
|
-
const { transformPerspective: u, rotate: d, rotateX:
|
|
6875
|
-
u && (o = `perspective(${u}px) ${o}`), d && (o += `rotate(${d}deg) `),
|
|
6874
|
+
const { transformPerspective: u, rotate: d, rotateX: h, rotateY: p, skewX: m, skewY: y } = n;
|
|
6875
|
+
u && (o = `perspective(${u}px) ${o}`), d && (o += `rotate(${d}deg) `), h && (o += `rotateX(${h}deg) `), p && (o += `rotateY(${p}deg) `), m && (o += `skewX(${m}deg) `), y && (o += `skewY(${y}deg) `);
|
|
6876
6876
|
}
|
|
6877
6877
|
const l = e.x.scale * t.x, c = e.y.scale * t.y;
|
|
6878
6878
|
return (l !== 1 || c !== 1) && (o += `scale(${l}, ${c})`), o || "none";
|
|
@@ -7048,22 +7048,22 @@ function Ws({ attachResizeListener: e, defaultParent: t, measureScroll: n, check
|
|
|
7048
7048
|
this.isSVG = xo(i) && !Du(i), this.instance = i;
|
|
7049
7049
|
const { layoutId: l, layout: c, visualElement: u } = this.options;
|
|
7050
7050
|
if (u && !u.current && u.mount(i), this.root.nodes.add(this), this.parent && this.parent.children.add(this), this.root.hasTreeAnimated && (c || l) && (this.isLayoutDirty = !0), e) {
|
|
7051
|
-
let d,
|
|
7052
|
-
const
|
|
7051
|
+
let d, h = 0;
|
|
7052
|
+
const p = () => this.root.updateBlockedByResize = !1;
|
|
7053
7053
|
H.read(() => {
|
|
7054
|
-
|
|
7054
|
+
h = window.innerWidth;
|
|
7055
7055
|
}), e(i, () => {
|
|
7056
7056
|
const m = window.innerWidth;
|
|
7057
|
-
m !==
|
|
7057
|
+
m !== h && (h = m, this.root.updateBlockedByResize = !0, d && d(), d = Cf(p, 250), Mt.hasAnimatedSinceResize && (Mt.hasAnimatedSinceResize = !1, this.nodes.forEach(Ir)));
|
|
7058
7058
|
});
|
|
7059
7059
|
}
|
|
7060
|
-
l && this.root.registerSharedNode(l, this), this.options.animate !== !1 && u && (l || c) && this.addEventListener("didUpdate", ({ delta: d, hasLayoutChanged:
|
|
7060
|
+
l && this.root.registerSharedNode(l, this), this.options.animate !== !1 && u && (l || c) && this.addEventListener("didUpdate", ({ delta: d, hasLayoutChanged: h, hasRelativeLayoutChanged: p, layout: m }) => {
|
|
7061
7061
|
if (this.isTreeAnimationBlocked()) {
|
|
7062
7062
|
this.target = void 0, this.relativeTarget = void 0;
|
|
7063
7063
|
return;
|
|
7064
7064
|
}
|
|
7065
|
-
const y = this.options.transition || u.getDefaultTransition() || Hf, { onLayoutAnimationStart: b, onLayoutAnimationComplete: x } = u.getProps(), v = !this.targetLayout || !Is(this.targetLayout, m), w = !
|
|
7066
|
-
if (this.options.layoutRoot || this.resumeFrom || w ||
|
|
7065
|
+
const y = this.options.transition || u.getDefaultTransition() || Hf, { onLayoutAnimationStart: b, onLayoutAnimationComplete: x } = u.getProps(), v = !this.targetLayout || !Is(this.targetLayout, m), w = !h && p;
|
|
7066
|
+
if (this.options.layoutRoot || this.resumeFrom || w || h && (v || !this.currentAnimation)) {
|
|
7067
7067
|
this.resumeFrom && (this.resumingFrom = this.resumeFrom, this.resumingFrom.resumingFrom = void 0);
|
|
7068
7068
|
const C = {
|
|
7069
7069
|
...fo(y, "layout"),
|
|
@@ -7072,7 +7072,7 @@ function Ws({ attachResizeListener: e, defaultParent: t, measureScroll: n, check
|
|
|
7072
7072
|
};
|
|
7073
7073
|
(u.shouldReduceMotion || this.options.layoutRoot) && (C.delay = 0, C.type = !1), this.startAnimation(C), this.setAnimationOrigin(d, w);
|
|
7074
7074
|
} else
|
|
7075
|
-
|
|
7075
|
+
h || Ir(this), this.isLead() && this.options.onExitComplete && this.options.onExitComplete();
|
|
7076
7076
|
this.targetLayout = m;
|
|
7077
7077
|
});
|
|
7078
7078
|
}
|
|
@@ -7111,8 +7111,8 @@ function Ws({ attachResizeListener: e, defaultParent: t, measureScroll: n, check
|
|
|
7111
7111
|
return;
|
|
7112
7112
|
this.isLayoutDirty = !0;
|
|
7113
7113
|
for (let d = 0; d < this.path.length; d++) {
|
|
7114
|
-
const
|
|
7115
|
-
|
|
7114
|
+
const h = this.path[d];
|
|
7115
|
+
h.shouldResetTransform = !0, (typeof h.latestValues.x == "string" || typeof h.latestValues.y == "string") && (h.isLayoutDirty = !0), h.updateScroll("snapshot"), h.options.layoutRoot && h.willUpdate(!1);
|
|
7116
7116
|
}
|
|
7117
7117
|
const { layoutId: l, layout: c } = this.options;
|
|
7118
7118
|
if (l === void 0 && !c)
|
|
@@ -7213,20 +7213,20 @@ function Ws({ attachResizeListener: e, defaultParent: t, measureScroll: n, check
|
|
|
7213
7213
|
if (le(l, i), (c = this.scroll) != null && c.wasRoot)
|
|
7214
7214
|
return l;
|
|
7215
7215
|
for (let u = 0; u < this.path.length; u++) {
|
|
7216
|
-
const d = this.path[u], { scroll:
|
|
7217
|
-
d !== this.root &&
|
|
7216
|
+
const d = this.path[u], { scroll: h, options: p } = d;
|
|
7217
|
+
d !== this.root && h && p.layoutScroll && (h.wasRoot && le(l, i), me(l.x, h.offset.x), me(l.y, h.offset.y));
|
|
7218
7218
|
}
|
|
7219
7219
|
return l;
|
|
7220
7220
|
}
|
|
7221
7221
|
applyTransform(i, l = !1, c) {
|
|
7222
|
-
var d,
|
|
7222
|
+
var d, h;
|
|
7223
7223
|
const u = c || Y();
|
|
7224
7224
|
le(u, i);
|
|
7225
|
-
for (let
|
|
7226
|
-
const m = this.path[
|
|
7225
|
+
for (let p = 0; p < this.path.length; p++) {
|
|
7226
|
+
const m = this.path[p];
|
|
7227
7227
|
!l && m.options.layoutScroll && m.scroll && m !== m.root && (me(u.x, -m.scroll.offset.x), me(u.y, -m.scroll.offset.y)), Ee(m.latestValues) && At(u, m.latestValues, (d = m.layout) == null ? void 0 : d.layoutBox);
|
|
7228
7228
|
}
|
|
7229
|
-
return Ee(this.latestValues) && At(u, this.latestValues, (
|
|
7229
|
+
return Ee(this.latestValues) && At(u, this.latestValues, (h = this.layout) == null ? void 0 : h.layoutBox), u;
|
|
7230
7230
|
}
|
|
7231
7231
|
removeTransform(i) {
|
|
7232
7232
|
var c;
|
|
@@ -7236,8 +7236,8 @@ function Ws({ attachResizeListener: e, defaultParent: t, measureScroll: n, check
|
|
|
7236
7236
|
const d = this.path[u];
|
|
7237
7237
|
if (!Ee(d.latestValues))
|
|
7238
7238
|
continue;
|
|
7239
|
-
let
|
|
7240
|
-
d.instance && (jn(d.latestValues) && d.updateSnapshot(),
|
|
7239
|
+
let h;
|
|
7240
|
+
d.instance && (jn(d.latestValues) && d.updateSnapshot(), h = Y(), le(h, d.measurePageBox())), kr(l, d.latestValues, (c = d.snapshot) == null ? void 0 : c.layoutBox, h);
|
|
7241
7241
|
}
|
|
7242
7242
|
return Ee(this.latestValues) && kr(l, this.latestValues), l;
|
|
7243
7243
|
}
|
|
@@ -7264,12 +7264,12 @@ function Ws({ attachResizeListener: e, defaultParent: t, measureScroll: n, check
|
|
|
7264
7264
|
const c = !!this.resumingFrom || this !== l;
|
|
7265
7265
|
if (!(i || c && this.isSharedProjectionDirty || this.isProjectionDirty || (m = this.parent) != null && m.isProjectionDirty || this.attemptToResolveRelativeTarget || this.root.updateBlockedByResize))
|
|
7266
7266
|
return;
|
|
7267
|
-
const { layout: d, layoutId:
|
|
7268
|
-
if (!this.layout || !(d ||
|
|
7267
|
+
const { layout: d, layoutId: h } = this.options;
|
|
7268
|
+
if (!this.layout || !(d || h))
|
|
7269
7269
|
return;
|
|
7270
7270
|
this.resolvedRelativeTargetAt = X.timestamp;
|
|
7271
|
-
const
|
|
7272
|
-
|
|
7271
|
+
const p = this.getClosestProjectingParent();
|
|
7272
|
+
p && this.linkedParentVersion !== p.layoutVersion && !p.options.layoutRoot && this.removeRelativeTarget(), !this.targetDelta && !this.relativeTarget && (this.options.layoutAnchor !== !1 && p && p.layout ? this.createRelativeTarget(p, this.layout.layoutBox, p.layout.layoutBox) : this.removeRelativeTarget()), !(!this.relativeTarget && !this.targetDelta) && (this.target || (this.target = Y(), this.targetWithTransforms = Y()), this.relativeTarget && this.relativeTargetOrigin && this.relativeParent && this.relativeParent.target ? (this.forceRelativeParentToResolveTarget(), df(this.target, this.relativeTarget, this.relativeParent.target, this.options.layoutAnchor || void 0)) : this.targetDelta ? (this.resumingFrom ? this.applyTransform(this.layout.layoutBox, !1, this.target) : le(this.target, this.layout.layoutBox), Ss(this.target, this.targetDelta)) : le(this.target, this.layout.layoutBox), this.attemptToResolveRelativeTarget && (this.attemptToResolveRelativeTarget = !1, this.options.layoutAnchor !== !1 && p && !!p.resumingFrom == !!this.resumingFrom && !p.options.layoutScroll && p.target && this.animationProgress !== 1 ? this.createRelativeTarget(p, this.target, p.target) : this.relativeParent = this.relativeTarget = void 0));
|
|
7273
7273
|
}
|
|
7274
7274
|
getClosestProjectingParent() {
|
|
7275
7275
|
if (!(!this.parent || jn(this.parent.latestValues) || ws(this.parent.latestValues)))
|
|
@@ -7294,14 +7294,14 @@ function Ws({ attachResizeListener: e, defaultParent: t, measureScroll: n, check
|
|
|
7294
7294
|
if (this.isTreeAnimating = !!(this.parent && this.parent.isTreeAnimating || this.currentAnimation || this.pendingAnimation), this.isTreeAnimating || (this.targetDelta = this.relativeTarget = void 0), !this.layout || !(u || d))
|
|
7295
7295
|
return;
|
|
7296
7296
|
le(this.layoutCorrected, this.layout.layoutBox);
|
|
7297
|
-
const
|
|
7297
|
+
const h = this.treeScale.x, p = this.treeScale.y;
|
|
7298
7298
|
Ou(this.layoutCorrected, this.treeScale, this.path, l), i.layout && !i.target && (this.treeScale.x !== 1 || this.treeScale.y !== 1) && (i.target = i.layout.layoutBox, i.targetWithTransforms = Y());
|
|
7299
7299
|
const { target: m } = i;
|
|
7300
7300
|
if (!m) {
|
|
7301
7301
|
this.prevProjectionDelta && (this.createProjectionDeltas(), this.scheduleRender());
|
|
7302
7302
|
return;
|
|
7303
7303
|
}
|
|
7304
|
-
!this.projectionDelta || !this.prevProjectionDelta ? this.createProjectionDeltas() : (br(this.prevProjectionDelta.x, this.projectionDelta.x), br(this.prevProjectionDelta.y, this.projectionDelta.y)), ot(this.projectionDelta, this.layoutCorrected, m, this.latestValues), (this.treeScale.x !==
|
|
7304
|
+
!this.projectionDelta || !this.prevProjectionDelta ? this.createProjectionDeltas() : (br(this.prevProjectionDelta.x, this.projectionDelta.x), br(this.prevProjectionDelta.y, this.projectionDelta.y)), ot(this.projectionDelta, this.layoutCorrected, m, this.latestValues), (this.treeScale.x !== h || this.treeScale.y !== p || !Lr(this.projectionDelta.x, this.prevProjectionDelta.x) || !Lr(this.projectionDelta.y, this.prevProjectionDelta.y)) && (this.hasProjected = !0, this.scheduleRender(), this.notifyListeners("projectionUpdate", m));
|
|
7305
7305
|
}
|
|
7306
7306
|
hide() {
|
|
7307
7307
|
this.isVisible = !1;
|
|
@@ -7321,14 +7321,14 @@ function Ws({ attachResizeListener: e, defaultParent: t, measureScroll: n, check
|
|
|
7321
7321
|
this.prevProjectionDelta = Ne(), this.projectionDelta = Ne(), this.projectionDeltaWithTransform = Ne();
|
|
7322
7322
|
}
|
|
7323
7323
|
setAnimationOrigin(i, l = !1) {
|
|
7324
|
-
const c = this.snapshot, u = c ? c.latestValues : {}, d = { ...this.latestValues },
|
|
7324
|
+
const c = this.snapshot, u = c ? c.latestValues : {}, d = { ...this.latestValues }, h = Ne();
|
|
7325
7325
|
(!this.relativeParent || !this.relativeParent.options.layoutRoot) && (this.relativeTarget = this.relativeTargetOrigin = void 0), this.attemptToResolveRelativeTarget = !l;
|
|
7326
|
-
const
|
|
7326
|
+
const p = Y(), m = c ? c.source : void 0, y = this.layout ? this.layout.source : void 0, b = m !== y, x = this.getStack(), v = !x || x.members.length <= 1, w = !!(b && !v && this.options.crossfade === !0 && !this.path.some(jf));
|
|
7327
7327
|
this.animationProgress = 0;
|
|
7328
7328
|
let C;
|
|
7329
7329
|
this.mixTargetDelta = (D) => {
|
|
7330
7330
|
const k = D / 1e3;
|
|
7331
|
-
Vr(
|
|
7331
|
+
Vr(h.x, i.x, k), Vr(h.y, i.y, k), this.setTargetDelta(h), this.relativeTarget && this.relativeTargetOrigin && this.layout && this.relativeParent && this.relativeParent.layout && (jt(p, this.layout.layoutBox, this.relativeParent.layout.layoutBox, this.options.layoutAnchor || void 0), Wf(this.relativeTarget, this.relativeTargetOrigin, p, k), C && pf(this.relativeTarget, C) && (this.isProjectionDirty = !1), C || (C = Y()), le(C, this.relativeTarget)), b && (this.animationValues = d, yf(d, u, this.latestValues, k, w, v)), this.root.scheduleUpdateProjection(), this.scheduleRender(), this.animationProgress = k;
|
|
7332
7332
|
}, this.mixTargetDelta(this.options.layoutRoot ? 1e3 : 0);
|
|
7333
7333
|
}
|
|
7334
7334
|
startAnimation(i) {
|
|
@@ -7363,10 +7363,10 @@ function Ws({ attachResizeListener: e, defaultParent: t, measureScroll: n, check
|
|
|
7363
7363
|
if (!(!l || !c || !u)) {
|
|
7364
7364
|
if (this !== i && this.layout && u && js(this.options.animationType, this.layout.layoutBox, u.layoutBox)) {
|
|
7365
7365
|
c = this.target || Y();
|
|
7366
|
-
const
|
|
7367
|
-
c.x.min = i.target.x.min, c.x.max = c.x.min +
|
|
7368
|
-
const
|
|
7369
|
-
c.y.min = i.target.y.min, c.y.max = c.y.min +
|
|
7366
|
+
const h = ee(this.layout.layoutBox.x);
|
|
7367
|
+
c.x.min = i.target.x.min, c.x.max = c.x.min + h;
|
|
7368
|
+
const p = ee(this.layout.layoutBox.y);
|
|
7369
|
+
c.y.min = i.target.y.min, c.y.max = c.y.min + p;
|
|
7370
7370
|
}
|
|
7371
7371
|
le(l, c), At(l, d), ot(this.projectionDeltaWithTransform, this.layoutCorrected, l, d);
|
|
7372
7372
|
}
|
|
@@ -7443,14 +7443,14 @@ function Ws({ attachResizeListener: e, defaultParent: t, measureScroll: n, check
|
|
|
7443
7443
|
i.visibility = "";
|
|
7444
7444
|
const d = u.animationValues || u.latestValues;
|
|
7445
7445
|
this.applyTransformsToTarget();
|
|
7446
|
-
let
|
|
7447
|
-
c && (
|
|
7448
|
-
const { x:
|
|
7449
|
-
i.transformOrigin = `${
|
|
7446
|
+
let h = mf(this.projectionDeltaWithTransform, this.treeScale, d);
|
|
7447
|
+
c && (h = c(d, h)), i.transform = h;
|
|
7448
|
+
const { x: p, y: m } = this.projectionDelta;
|
|
7449
|
+
i.transformOrigin = `${p.origin * 100}% ${m.origin * 100}% 0`, u.animationValues ? i.opacity = u === this ? d.opacity ?? this.latestValues.opacity ?? 1 : this.preserveOpacity ? this.latestValues.opacity : d.opacityExit : i.opacity = u === this ? d.opacity !== void 0 ? d.opacity : "" : d.opacityExit !== void 0 ? d.opacityExit : 0;
|
|
7450
7450
|
for (const y in Nn) {
|
|
7451
7451
|
if (d[y] === void 0)
|
|
7452
7452
|
continue;
|
|
7453
|
-
const { correct: b, applyTo: x, isCSSVariable: v } = Nn[y], w =
|
|
7453
|
+
const { correct: b, applyTo: x, isCSSVariable: v } = Nn[y], w = h === "none" ? d[y] : b(d[y], u);
|
|
7454
7454
|
if (x) {
|
|
7455
7455
|
const C = x.length;
|
|
7456
7456
|
for (let D = 0; D < C; D++)
|
|
@@ -7481,16 +7481,16 @@ function Af(e) {
|
|
|
7481
7481
|
if (e.isLead() && e.layout && t && e.hasListeners("didUpdate")) {
|
|
7482
7482
|
const { layoutBox: o, measuredBox: r } = e.layout, { animationType: s } = e.options, i = t.source !== e.layout.source;
|
|
7483
7483
|
if (s === "size")
|
|
7484
|
-
pe((
|
|
7485
|
-
const
|
|
7486
|
-
|
|
7484
|
+
pe((h) => {
|
|
7485
|
+
const p = i ? t.measuredBox[h] : t.layoutBox[h], m = ee(p);
|
|
7486
|
+
p.min = o[h].min, p.max = p.min + m;
|
|
7487
7487
|
});
|
|
7488
7488
|
else if (s === "x" || s === "y") {
|
|
7489
|
-
const
|
|
7490
|
-
_n(i ? t.measuredBox[
|
|
7491
|
-
} else js(s, t.layoutBox, o) && pe((
|
|
7492
|
-
const
|
|
7493
|
-
|
|
7489
|
+
const h = s === "x" ? "y" : "x";
|
|
7490
|
+
_n(i ? t.measuredBox[h] : t.layoutBox[h], o[h]);
|
|
7491
|
+
} else js(s, t.layoutBox, o) && pe((h) => {
|
|
7492
|
+
const p = i ? t.measuredBox[h] : t.layoutBox[h], m = ee(o[h]);
|
|
7493
|
+
p.max = p.min + m, e.relativeTarget && !e.currentAnimation && (e.isProjectionDirty = !0, e.relativeTarget[h].max = e.relativeTarget[h].min + m);
|
|
7494
7494
|
});
|
|
7495
7495
|
const l = Ne();
|
|
7496
7496
|
ot(l, o, t.layoutBox);
|
|
@@ -7499,14 +7499,14 @@ function Af(e) {
|
|
|
7499
7499
|
const u = !Bs(l);
|
|
7500
7500
|
let d = !1;
|
|
7501
7501
|
if (!e.resumeFrom) {
|
|
7502
|
-
const
|
|
7503
|
-
if (
|
|
7504
|
-
const { snapshot:
|
|
7505
|
-
if (
|
|
7502
|
+
const h = e.getClosestProjectingParent();
|
|
7503
|
+
if (h && !h.resumeFrom) {
|
|
7504
|
+
const { snapshot: p, layout: m } = h;
|
|
7505
|
+
if (p && m) {
|
|
7506
7506
|
const y = e.options.layoutAnchor || void 0, b = Y();
|
|
7507
|
-
jt(b, t.layoutBox,
|
|
7507
|
+
jt(b, t.layoutBox, p.layoutBox, y);
|
|
7508
7508
|
const x = Y();
|
|
7509
|
-
jt(x, o, m.layoutBox, y), Is(b, x) || (d = !0),
|
|
7509
|
+
jt(x, o, m.layoutBox, y), Is(b, x) || (d = !0), h.options.layoutRoot && (e.relativeTarget = x, e.relativeTargetOrigin = b, e.relativeParent = h);
|
|
7510
7510
|
}
|
|
7511
7511
|
}
|
|
7512
7512
|
}
|
|
@@ -7669,7 +7669,7 @@ class Kf extends _.Component {
|
|
|
7669
7669
|
}
|
|
7670
7670
|
}
|
|
7671
7671
|
function Yf({ children: e, isPresent: t, anchorX: n, anchorY: o, root: r, pop: s }) {
|
|
7672
|
-
var
|
|
7672
|
+
var p;
|
|
7673
7673
|
const i = ct(), l = Z(null), c = Z({
|
|
7674
7674
|
width: 0,
|
|
7675
7675
|
height: 0,
|
|
@@ -7677,7 +7677,7 @@ function Yf({ children: e, isPresent: t, anchorX: n, anchorY: o, root: r, pop: s
|
|
|
7677
7677
|
left: 0,
|
|
7678
7678
|
right: 0,
|
|
7679
7679
|
bottom: 0
|
|
7680
|
-
}), { nonce: u } = J(ko), d = ((
|
|
7680
|
+
}), { nonce: u } = J(ko), d = ((p = e.props) == null ? void 0 : p.ref) ?? (e == null ? void 0 : e.ref), h = Gf(l, d);
|
|
7681
7681
|
return Zn(() => {
|
|
7682
7682
|
const { width: m, height: y, top: b, left: x, right: v, bottom: w } = c.current;
|
|
7683
7683
|
if (t || s === !1 || !l.current || !m || !y)
|
|
@@ -7686,8 +7686,8 @@ function Yf({ children: e, isPresent: t, anchorX: n, anchorY: o, root: r, pop: s
|
|
|
7686
7686
|
l.current.dataset.motionPopId = i;
|
|
7687
7687
|
const k = document.createElement("style");
|
|
7688
7688
|
u && (k.nonce = u);
|
|
7689
|
-
const
|
|
7690
|
-
return
|
|
7689
|
+
const M = r ?? document.head;
|
|
7690
|
+
return M.appendChild(k), k.sheet && k.sheet.insertRule(`
|
|
7691
7691
|
[data-motion-pop-id="${i}"] {
|
|
7692
7692
|
position: absolute !important;
|
|
7693
7693
|
width: ${m}px !important;
|
|
@@ -7697,14 +7697,14 @@ function Yf({ children: e, isPresent: t, anchorX: n, anchorY: o, root: r, pop: s
|
|
|
7697
7697
|
}
|
|
7698
7698
|
`), () => {
|
|
7699
7699
|
var T;
|
|
7700
|
-
(T = l.current) == null || T.removeAttribute("data-motion-pop-id"),
|
|
7700
|
+
(T = l.current) == null || T.removeAttribute("data-motion-pop-id"), M.contains(k) && M.removeChild(k);
|
|
7701
7701
|
};
|
|
7702
|
-
}, [t]), a(Kf, { isPresent: t, childRef: l, sizeRef: c, pop: s, children: s === !1 ? e : _.cloneElement(e, { ref:
|
|
7702
|
+
}, [t]), a(Kf, { isPresent: t, childRef: l, sizeRef: c, pop: s, children: s === !1 ? e : _.cloneElement(e, { ref: h }) });
|
|
7703
7703
|
}
|
|
7704
7704
|
const Zf = ({ children: e, initial: t, isPresent: n, onExitComplete: o, custom: r, presenceAffectsLayout: s, mode: i, anchorX: l, anchorY: c, root: u }) => {
|
|
7705
|
-
const d = Jn(Xf),
|
|
7706
|
-
let
|
|
7707
|
-
id:
|
|
7705
|
+
const d = Jn(Xf), h = ct();
|
|
7706
|
+
let p = !0, m = ze(() => (p = !1, {
|
|
7707
|
+
id: h,
|
|
7708
7708
|
initial: t,
|
|
7709
7709
|
isPresent: n,
|
|
7710
7710
|
custom: r,
|
|
@@ -7717,7 +7717,7 @@ const Zf = ({ children: e, initial: t, isPresent: n, onExitComplete: o, custom:
|
|
|
7717
7717
|
},
|
|
7718
7718
|
register: (y) => (d.set(y, !1), () => d.delete(y))
|
|
7719
7719
|
}), [n, d, o]);
|
|
7720
|
-
return s &&
|
|
7720
|
+
return s && p && (m = { ...m }), ze(() => {
|
|
7721
7721
|
d.forEach((y, b) => d.set(b, !1));
|
|
7722
7722
|
}, [n]), _.useEffect(() => {
|
|
7723
7723
|
!n && !d.size && o && o();
|
|
@@ -7746,27 +7746,27 @@ function Nr(e) {
|
|
|
7746
7746
|
}), t;
|
|
7747
7747
|
}
|
|
7748
7748
|
const Ht = ({ children: e, custom: t, initial: n = !0, onExitComplete: o, presenceAffectsLayout: r = !0, mode: s = "sync", propagate: i = !1, anchorX: l = "left", anchorY: c = "top", root: u }) => {
|
|
7749
|
-
const [d,
|
|
7749
|
+
const [d, h] = Ns(i), p = ze(() => Nr(e), [e]), m = i && !d ? [] : p.map(yt), y = Z(!0), b = Z(p), x = Jn(() => /* @__PURE__ */ new Map()), v = Z(/* @__PURE__ */ new Set()), [w, C] = U(p), [D, k] = U(p);
|
|
7750
7750
|
mi(() => {
|
|
7751
|
-
y.current = !1, b.current =
|
|
7751
|
+
y.current = !1, b.current = p;
|
|
7752
7752
|
for (let S = 0; S < D.length; S++) {
|
|
7753
7753
|
const F = yt(D[S]);
|
|
7754
7754
|
m.includes(F) ? (x.delete(F), v.current.delete(F)) : x.get(F) !== !0 && x.set(F, !1);
|
|
7755
7755
|
}
|
|
7756
7756
|
}, [D, m.length, m.join("-")]);
|
|
7757
|
-
const
|
|
7758
|
-
if (
|
|
7759
|
-
let S = [...
|
|
7757
|
+
const M = [];
|
|
7758
|
+
if (p !== w) {
|
|
7759
|
+
let S = [...p];
|
|
7760
7760
|
for (let F = 0; F < D.length; F++) {
|
|
7761
|
-
const
|
|
7762
|
-
m.includes(I) || (S.splice(F, 0,
|
|
7761
|
+
const L = D[F], I = yt(L);
|
|
7762
|
+
m.includes(I) || (S.splice(F, 0, L), M.push(L));
|
|
7763
7763
|
}
|
|
7764
|
-
return s === "wait" &&
|
|
7764
|
+
return s === "wait" && M.length && (S = M), k(Nr(S)), C(p), null;
|
|
7765
7765
|
}
|
|
7766
7766
|
process.env.NODE_ENV !== "production" && s === "wait" && D.length > 1 && console.warn(`You're attempting to animate multiple children within AnimatePresence, but its mode is set to "wait". This will lead to odd visual behaviour.`);
|
|
7767
7767
|
const { forceRender: T } = J(qn);
|
|
7768
7768
|
return a(fe, { children: D.map((S) => {
|
|
7769
|
-
const F = yt(S),
|
|
7769
|
+
const F = yt(S), L = i && !d ? !1 : p === D || m.includes(F), I = () => {
|
|
7770
7770
|
if (v.current.has(F))
|
|
7771
7771
|
return;
|
|
7772
7772
|
if (x.has(F))
|
|
@@ -7774,11 +7774,11 @@ const Ht = ({ children: e, custom: t, initial: n = !0, onExitComplete: o, presen
|
|
|
7774
7774
|
else
|
|
7775
7775
|
return;
|
|
7776
7776
|
let E = !0;
|
|
7777
|
-
x.forEach((
|
|
7778
|
-
|
|
7779
|
-
}), E && (T == null || T(), k(b.current), i && (
|
|
7777
|
+
x.forEach((z) => {
|
|
7778
|
+
z || (E = !1);
|
|
7779
|
+
}), E && (T == null || T(), k(b.current), i && (h == null || h()), o && o());
|
|
7780
7780
|
};
|
|
7781
|
-
return a(Zf, { isPresent:
|
|
7781
|
+
return a(Zf, { isPresent: L, initial: !y.current || n ? void 0 : !1, custom: t, presenceAffectsLayout: r, mode: s, root: u, onExitComplete: L ? void 0 : I, anchorX: l, anchorY: c, children: S }, F);
|
|
7782
7782
|
}) });
|
|
7783
7783
|
}, _s = Ke({ strict: !1 }), _r = {
|
|
7784
7784
|
animation: [
|
|
@@ -7982,10 +7982,10 @@ function To(e) {
|
|
|
7982
7982
|
);
|
|
7983
7983
|
}
|
|
7984
7984
|
function ch(e, t, n, { latestValues: o }, r, s = !1, i) {
|
|
7985
|
-
const c = (i ?? To(e) ? ah : sh)(t, o, r, e), u = th(t, typeof e == "string", s), d = e !== ii ? { ...u, ...c, ref: n } : {}, { children:
|
|
7985
|
+
const c = (i ?? To(e) ? ah : sh)(t, o, r, e), u = th(t, typeof e == "string", s), d = e !== ii ? { ...u, ...c, ref: n } : {}, { children: h } = t, p = ze(() => q(h) ? h.get() : h, [h]);
|
|
7986
7986
|
return vn(e, {
|
|
7987
7987
|
...d,
|
|
7988
|
-
children:
|
|
7988
|
+
children: p
|
|
7989
7989
|
});
|
|
7990
7990
|
}
|
|
7991
7991
|
function dh({ scrapeMotionValuesFromProps: e, createRenderState: t }, n, o, r) {
|
|
@@ -7996,18 +7996,18 @@ function dh({ scrapeMotionValuesFromProps: e, createRenderState: t }, n, o, r) {
|
|
|
7996
7996
|
}
|
|
7997
7997
|
function uh(e, t, n, o) {
|
|
7998
7998
|
const r = {}, s = o(e, {});
|
|
7999
|
-
for (const
|
|
8000
|
-
r[
|
|
7999
|
+
for (const p in s)
|
|
8000
|
+
r[p] = Lt(s[p]);
|
|
8001
8001
|
let { initial: i, animate: l } = e;
|
|
8002
8002
|
const c = Zt(e), u = gs(e);
|
|
8003
8003
|
t && u && !c && e.inherit !== !1 && (i === void 0 && (i = t.initial), l === void 0 && (l = t.animate));
|
|
8004
8004
|
let d = n ? n.initial === !1 : !1;
|
|
8005
8005
|
d = d || i === !1;
|
|
8006
|
-
const
|
|
8007
|
-
if (
|
|
8008
|
-
const
|
|
8009
|
-
for (let m = 0; m <
|
|
8010
|
-
const y = po(e,
|
|
8006
|
+
const h = d ? l : i;
|
|
8007
|
+
if (h && typeof h != "boolean" && !Yt(h)) {
|
|
8008
|
+
const p = Array.isArray(h) ? h : [h];
|
|
8009
|
+
for (let m = 0; m < p.length; m++) {
|
|
8010
|
+
const y = po(e, p[m]);
|
|
8011
8011
|
if (y) {
|
|
8012
8012
|
const { transitionEnd: b, transition: x, ...v } = y;
|
|
8013
8013
|
for (const w in v) {
|
|
@@ -8060,19 +8060,19 @@ function Oe(e) {
|
|
|
8060
8060
|
}
|
|
8061
8061
|
function gh(e, t, n, o, r, s) {
|
|
8062
8062
|
var C, D;
|
|
8063
|
-
const { visualElement: i } = J(Xt), l = J(_s), c = J(Gt), u = J(ko), d = u.reducedMotion,
|
|
8064
|
-
o = o || l.renderer, !
|
|
8063
|
+
const { visualElement: i } = J(Xt), l = J(_s), c = J(Gt), u = J(ko), d = u.reducedMotion, h = u.skipAnimations, p = Z(null), m = Z(!1);
|
|
8064
|
+
o = o || l.renderer, !p.current && o && (p.current = o(e, {
|
|
8065
8065
|
visualState: t,
|
|
8066
8066
|
parent: i,
|
|
8067
8067
|
props: n,
|
|
8068
8068
|
presenceContext: c,
|
|
8069
8069
|
blockInitialAnimation: c ? c.initial === !1 : !1,
|
|
8070
8070
|
reducedMotionConfig: d,
|
|
8071
|
-
skipAnimations:
|
|
8071
|
+
skipAnimations: h,
|
|
8072
8072
|
isSVG: s
|
|
8073
|
-
}), m.current &&
|
|
8074
|
-
const y =
|
|
8075
|
-
y && !y.projection && r && (y.type === "html" || y.type === "svg") && yh(
|
|
8073
|
+
}), m.current && p.current && (p.current.manuallyAnimateOnMount = !0));
|
|
8074
|
+
const y = p.current, b = J(Zs);
|
|
8075
|
+
y && !y.projection && r && (y.type === "html" || y.type === "svg") && yh(p.current, n, r, b);
|
|
8076
8076
|
const x = Z(!1);
|
|
8077
8077
|
Zn(() => {
|
|
8078
8078
|
y && x.current && y.update(n, c);
|
|
@@ -8088,7 +8088,7 @@ function gh(e, t, n, o, r, s) {
|
|
|
8088
8088
|
}), y;
|
|
8089
8089
|
}
|
|
8090
8090
|
function yh(e, t, n, o) {
|
|
8091
|
-
const { layoutId: r, layout: s, drag: i, dragConstraints: l, layoutScroll: c, layoutRoot: u, layoutAnchor: d, layoutCrossfade:
|
|
8091
|
+
const { layoutId: r, layout: s, drag: i, dragConstraints: l, layoutScroll: c, layoutRoot: u, layoutAnchor: d, layoutCrossfade: h } = t;
|
|
8092
8092
|
e.projection = new n(e.latestValues, t["data-framer-portal-id"] ? void 0 : Xs(e.parent)), e.projection.setOptions({
|
|
8093
8093
|
layoutId: r,
|
|
8094
8094
|
layout: s,
|
|
@@ -8103,7 +8103,7 @@ function yh(e, t, n, o) {
|
|
|
8103
8103
|
*/
|
|
8104
8104
|
animationType: typeof s == "string" ? s : "both",
|
|
8105
8105
|
initialPromotionConfig: o,
|
|
8106
|
-
crossfade:
|
|
8106
|
+
crossfade: h,
|
|
8107
8107
|
layoutScroll: c,
|
|
8108
8108
|
layoutRoot: u,
|
|
8109
8109
|
layoutAnchor: d
|
|
@@ -8117,18 +8117,18 @@ function mn(e, { forwardMotionProps: t = !1, type: n } = {}, o, r) {
|
|
|
8117
8117
|
o && Jf(o);
|
|
8118
8118
|
const s = n ? n === "svg" : To(e), i = s ? hh : fh;
|
|
8119
8119
|
function l(u, d) {
|
|
8120
|
-
let
|
|
8121
|
-
const
|
|
8120
|
+
let h;
|
|
8121
|
+
const p = {
|
|
8122
8122
|
...J(ko),
|
|
8123
8123
|
...u,
|
|
8124
8124
|
layoutId: bh(u)
|
|
8125
|
-
}, { isStatic: m } =
|
|
8125
|
+
}, { isStatic: m } = p, y = oh(u), b = i(u, m);
|
|
8126
8126
|
if (!m && typeof window < "u") {
|
|
8127
|
-
xh(
|
|
8128
|
-
const x = vh(
|
|
8129
|
-
|
|
8127
|
+
xh(p, o);
|
|
8128
|
+
const x = vh(p);
|
|
8129
|
+
h = x.MeasureLayout, y.visualElement = gh(e, b, p, r, x.ProjectionNode, s);
|
|
8130
8130
|
}
|
|
8131
|
-
return g(Xt.Provider, { value: y, children: [
|
|
8131
|
+
return g(Xt.Provider, { value: y, children: [h && y.visualElement ? a(h, { visualElement: y.visualElement, ...p }) : null, ch(e, u, mh(b, y.visualElement, d), b, m, t, s)] });
|
|
8132
8132
|
}
|
|
8133
8133
|
l.displayName = `motion.${typeof e == "string" ? e : `create(${e.displayName ?? e.name ?? ""})`}`;
|
|
8134
8134
|
const c = ga(l);
|
|
@@ -8217,9 +8217,9 @@ class Fh extends De {
|
|
|
8217
8217
|
if (typeof i == "string") {
|
|
8218
8218
|
const c = Ie(this.node, i, l);
|
|
8219
8219
|
if (c) {
|
|
8220
|
-
const { transition: u, transitionEnd: d, ...
|
|
8221
|
-
for (const
|
|
8222
|
-
(s = this.node.getValue(
|
|
8220
|
+
const { transition: u, transitionEnd: d, ...h } = c;
|
|
8221
|
+
for (const p in h)
|
|
8222
|
+
(s = this.node.getValue(p)) == null || s.jump(h[p]);
|
|
8223
8223
|
}
|
|
8224
8224
|
}
|
|
8225
8225
|
this.node.animationState.reset(), this.node.animationState.animateChanges();
|
|
@@ -8295,10 +8295,10 @@ class Js {
|
|
|
8295
8295
|
}, !bo(t))
|
|
8296
8296
|
return;
|
|
8297
8297
|
this.dragSnapToOrigin = s, this.handlers = n, this.transformPagePoint = o, this.distanceThreshold = i, this.contextWindow = r || window;
|
|
8298
|
-
const c = ht(t), u = bt(c, this.transformPagePoint), { point: d } = u, { timestamp:
|
|
8299
|
-
this.history = [{ ...d, timestamp:
|
|
8300
|
-
const { onSessionStart:
|
|
8301
|
-
|
|
8298
|
+
const c = ht(t), u = bt(c, this.transformPagePoint), { point: d } = u, { timestamp: h } = X;
|
|
8299
|
+
this.history = [{ ...d, timestamp: h }];
|
|
8300
|
+
const { onSessionStart: p } = n;
|
|
8301
|
+
p && p(t, gn(u, this.history)), this.removeListeners = dt(rt(this.contextWindow, "pointermove", this.handlePointerMove), rt(this.contextWindow, "pointerup", this.handlePointerUp), rt(this.contextWindow, "pointercancel", this.handlePointerUp)), l && this.startScrollTracking(l);
|
|
8302
8302
|
}
|
|
8303
8303
|
/**
|
|
8304
8304
|
* Start tracking scroll on ancestors and window.
|
|
@@ -8444,13 +8444,13 @@ class Oh {
|
|
|
8444
8444
|
const { presenceContext: r } = this.visualElement;
|
|
8445
8445
|
if (r && r.isPresent === !1)
|
|
8446
8446
|
return;
|
|
8447
|
-
const s = (
|
|
8448
|
-
n && this.snapToCursor(ht(
|
|
8449
|
-
}, i = (
|
|
8447
|
+
const s = (h) => {
|
|
8448
|
+
n && this.snapToCursor(ht(h).point), this.stopAnimation();
|
|
8449
|
+
}, i = (h, p) => {
|
|
8450
8450
|
const { drag: m, dragPropagation: y, onDragStart: b } = this.getProps();
|
|
8451
8451
|
if (m && !y && (this.openDragLock && this.openDragLock(), this.openDragLock = du(m), !this.openDragLock))
|
|
8452
8452
|
return;
|
|
8453
|
-
this.latestPointerEvent =
|
|
8453
|
+
this.latestPointerEvent = h, this.latestPanInfo = p, this.isDragging = !0, this.currentDirection = null, this.resolveConstraints(), this.visualElement.projection && (this.visualElement.projection.isAnimationBlocked = !0, this.visualElement.projection.target = void 0), pe((v) => {
|
|
8454
8454
|
let w = this.getAxisMotionValue(v).get() || 0;
|
|
8455
8455
|
if (ye.test(w)) {
|
|
8456
8456
|
const { projection: C } = this.visualElement;
|
|
@@ -8460,25 +8460,25 @@ class Oh {
|
|
|
8460
8460
|
}
|
|
8461
8461
|
}
|
|
8462
8462
|
this.originPoint[v] = w;
|
|
8463
|
-
}), b && H.update(() => b(
|
|
8463
|
+
}), b && H.update(() => b(h, p), !1, !0), In(this.visualElement, "transform");
|
|
8464
8464
|
const { animationState: x } = this.visualElement;
|
|
8465
8465
|
x && x.setActive("whileDrag", !0);
|
|
8466
|
-
}, l = (
|
|
8467
|
-
this.latestPointerEvent =
|
|
8466
|
+
}, l = (h, p) => {
|
|
8467
|
+
this.latestPointerEvent = h, this.latestPanInfo = p;
|
|
8468
8468
|
const { dragPropagation: m, dragDirectionLock: y, onDirectionLock: b, onDrag: x } = this.getProps();
|
|
8469
8469
|
if (!m && !this.openDragLock)
|
|
8470
8470
|
return;
|
|
8471
|
-
const { offset: v } =
|
|
8471
|
+
const { offset: v } = p;
|
|
8472
8472
|
if (y && this.currentDirection === null) {
|
|
8473
8473
|
this.currentDirection = jh(v), this.currentDirection !== null && b && b(this.currentDirection);
|
|
8474
8474
|
return;
|
|
8475
8475
|
}
|
|
8476
|
-
this.updateAxis("x",
|
|
8477
|
-
}, c = (
|
|
8478
|
-
this.latestPointerEvent =
|
|
8476
|
+
this.updateAxis("x", p.point, v), this.updateAxis("y", p.point, v), this.visualElement.render(), x && H.update(() => x(h, p), !1, !0);
|
|
8477
|
+
}, c = (h, p) => {
|
|
8478
|
+
this.latestPointerEvent = h, this.latestPanInfo = p, this.stop(h, p), this.latestPointerEvent = null, this.latestPanInfo = null;
|
|
8479
8479
|
}, u = () => {
|
|
8480
|
-
const { dragSnapToOrigin:
|
|
8481
|
-
(
|
|
8480
|
+
const { dragSnapToOrigin: h } = this.getProps();
|
|
8481
|
+
(h || this.constraints) && this.startAnimation({ x: 0, y: 0 });
|
|
8482
8482
|
}, { dragSnapToOrigin: d } = this.getProps();
|
|
8483
8483
|
this.panSession = new Js(t, {
|
|
8484
8484
|
onSessionStart: s,
|
|
@@ -8561,18 +8561,18 @@ class Oh {
|
|
|
8561
8561
|
const { drag: n, dragMomentum: o, dragElastic: r, dragTransition: s, dragSnapToOrigin: i, onDragTransitionEnd: l } = this.getProps(), c = this.constraints || {}, u = pe((d) => {
|
|
8562
8562
|
if (!xt(d, n, this.currentDirection))
|
|
8563
8563
|
return;
|
|
8564
|
-
let
|
|
8565
|
-
(i === !0 || i === d) && (
|
|
8566
|
-
const
|
|
8564
|
+
let h = c && c[d] || {};
|
|
8565
|
+
(i === !0 || i === d) && (h = { min: 0, max: 0 });
|
|
8566
|
+
const p = r ? 200 : 1e6, m = r ? 40 : 1e7, y = {
|
|
8567
8567
|
type: "inertia",
|
|
8568
8568
|
velocity: o ? t[d] : 0,
|
|
8569
|
-
bounceStiffness:
|
|
8569
|
+
bounceStiffness: p,
|
|
8570
8570
|
bounceDamping: m,
|
|
8571
8571
|
timeConstant: 750,
|
|
8572
8572
|
restDelta: 1,
|
|
8573
8573
|
restSpeed: 10,
|
|
8574
8574
|
...s,
|
|
8575
|
-
...
|
|
8575
|
+
...h
|
|
8576
8576
|
};
|
|
8577
8577
|
return this.startAxisValueAnimation(d, y);
|
|
8578
8578
|
});
|
|
@@ -8640,8 +8640,8 @@ class Oh {
|
|
|
8640
8640
|
return;
|
|
8641
8641
|
zh.set(this.visualElement, this);
|
|
8642
8642
|
const t = this.visualElement.current, n = rt(t, "pointerdown", (u) => {
|
|
8643
|
-
const { drag: d, dragListener:
|
|
8644
|
-
d &&
|
|
8643
|
+
const { drag: d, dragListener: h = !0 } = this.getProps(), p = u.target, m = p !== t && gu(p);
|
|
8644
|
+
d && h && !m && this.start(u);
|
|
8645
8645
|
});
|
|
8646
8646
|
let o;
|
|
8647
8647
|
const r = () => {
|
|
@@ -8650,9 +8650,9 @@ class Oh {
|
|
|
8650
8650
|
}, { projection: s } = this.visualElement, i = s.addEventListener("measure", r);
|
|
8651
8651
|
s && !s.layout && (s.root && s.root.updateScroll(), s.updateLayout()), H.read(r);
|
|
8652
8652
|
const l = lt(window, "resize", () => this.scalePositionWithinConstraints()), c = s.addEventListener("didUpdate", (({ delta: u, hasLayoutChanged: d }) => {
|
|
8653
|
-
this.isDragging && d && (pe((
|
|
8654
|
-
const
|
|
8655
|
-
|
|
8653
|
+
this.isDragging && d && (pe((h) => {
|
|
8654
|
+
const p = this.getAxisMotionValue(h);
|
|
8655
|
+
p && (this.originPoint[h] += u[h].translate, p.set(p.get() + u[h].translate));
|
|
8656
8656
|
}), this.visualElement.render());
|
|
8657
8657
|
}));
|
|
8658
8658
|
return () => {
|
|
@@ -8900,7 +8900,7 @@ class Qh extends De {
|
|
|
8900
8900
|
if (this.isInView === d || (this.isInView = d, s && !d && this.hasEnteredView))
|
|
8901
8901
|
return;
|
|
8902
8902
|
d && (this.hasEnteredView = !0), this.node.animationState && this.node.animationState.setActive("whileInView", d);
|
|
8903
|
-
const { onViewportEnter:
|
|
8903
|
+
const { onViewportEnter: h, onViewportLeave: p } = this.node.getProps(), m = d ? h : p;
|
|
8904
8904
|
m && m(u);
|
|
8905
8905
|
};
|
|
8906
8906
|
this.stopObserver = qh(this.node.current, i, l);
|
|
@@ -9124,12 +9124,12 @@ const vt = [
|
|
|
9124
9124
|
{ value: "system", label: "System theme", shortLabel: "System", icon: /* @__PURE__ */ a(up, {}) }
|
|
9125
9125
|
];
|
|
9126
9126
|
function pp({ scheme: e }) {
|
|
9127
|
-
const { mounted: t, themeMode: n, themeSetting: o, setThemeMode: r } = $t(), [s, i] = U(!1), l = Z(null), c = t ? o : void 0, u = vt.find((
|
|
9127
|
+
const { mounted: t, themeMode: n, themeSetting: o, setThemeMode: r } = $t(), [s, i] = U(!1), l = Z(null), c = t ? o : void 0, u = vt.find((p) => p.value === c) || vt[0];
|
|
9128
9128
|
ne(() => {
|
|
9129
|
-
const
|
|
9129
|
+
const p = (m) => {
|
|
9130
9130
|
l.current && !l.current.contains(m.target) && i(!1);
|
|
9131
9131
|
};
|
|
9132
|
-
return document.addEventListener("mousedown",
|
|
9132
|
+
return document.addEventListener("mousedown", p), () => document.removeEventListener("mousedown", p);
|
|
9133
9133
|
}, []);
|
|
9134
9134
|
const d = /* @__PURE__ */ a(
|
|
9135
9135
|
f,
|
|
@@ -9143,18 +9143,18 @@ function pp({ scheme: e }) {
|
|
|
9143
9143
|
borderRadius: "full",
|
|
9144
9144
|
p: "1",
|
|
9145
9145
|
"aria-label": "Theme mode switcher",
|
|
9146
|
-
children: vt.map((
|
|
9147
|
-
const m = c ===
|
|
9146
|
+
children: vt.map((p) => {
|
|
9147
|
+
const m = c === p.value, y = p.value === "dark" ? e.activeBgDarkStrong : p.value === "system" ? e.hoverBgDark : e.hoverBgLight;
|
|
9148
9148
|
return /* @__PURE__ */ g(
|
|
9149
9149
|
f,
|
|
9150
9150
|
{
|
|
9151
9151
|
as: "button",
|
|
9152
9152
|
onClick: () => {
|
|
9153
|
-
t && r(
|
|
9153
|
+
t && r(p.value);
|
|
9154
9154
|
},
|
|
9155
9155
|
"aria-pressed": m,
|
|
9156
|
-
"aria-label":
|
|
9157
|
-
title: t &&
|
|
9156
|
+
"aria-label": p.label,
|
|
9157
|
+
title: t && p.value === "system" ? `System theme (currently ${n})` : p.label,
|
|
9158
9158
|
display: "inline-flex",
|
|
9159
9159
|
alignItems: "center",
|
|
9160
9160
|
gap: "2",
|
|
@@ -9170,7 +9170,7 @@ function pp({ scheme: e }) {
|
|
|
9170
9170
|
_hover: t ? { bg: m ? y : "bg", color: "text.heading" } : void 0,
|
|
9171
9171
|
_focusVisible: { outline: "2px solid", outlineColor: e.chakraToken, outlineOffset: "2px" },
|
|
9172
9172
|
children: [
|
|
9173
|
-
/* @__PURE__ */ a(f, { display: "inline-flex", alignItems: "center", justifyContent: "center", flexShrink: 0, children:
|
|
9173
|
+
/* @__PURE__ */ a(f, { display: "inline-flex", alignItems: "center", justifyContent: "center", flexShrink: 0, children: p.icon }),
|
|
9174
9174
|
/* @__PURE__ */ a(
|
|
9175
9175
|
f,
|
|
9176
9176
|
{
|
|
@@ -9179,16 +9179,16 @@ function pp({ scheme: e }) {
|
|
|
9179
9179
|
fontWeight: m ? "700" : "600",
|
|
9180
9180
|
fontFamily: "var(--font-body)",
|
|
9181
9181
|
whiteSpace: "nowrap",
|
|
9182
|
-
children:
|
|
9182
|
+
children: p.shortLabel
|
|
9183
9183
|
}
|
|
9184
9184
|
)
|
|
9185
9185
|
]
|
|
9186
9186
|
},
|
|
9187
|
-
|
|
9187
|
+
p.value
|
|
9188
9188
|
);
|
|
9189
9189
|
})
|
|
9190
9190
|
}
|
|
9191
|
-
),
|
|
9191
|
+
), h = /* @__PURE__ */ g(f, { display: { base: "block", md: "none" }, position: "relative", ref: l, children: [
|
|
9192
9192
|
/* @__PURE__ */ a(
|
|
9193
9193
|
f,
|
|
9194
9194
|
{
|
|
@@ -9207,7 +9207,7 @@ function pp({ scheme: e }) {
|
|
|
9207
9207
|
opacity: t ? 1 : 0.6,
|
|
9208
9208
|
_hover: t ? { bg: "bg" } : void 0,
|
|
9209
9209
|
onClick: () => {
|
|
9210
|
-
t && i((
|
|
9210
|
+
t && i((p) => !p);
|
|
9211
9211
|
},
|
|
9212
9212
|
"aria-label": "Theme mode switcher",
|
|
9213
9213
|
"aria-expanded": s,
|
|
@@ -9231,8 +9231,8 @@ function pp({ scheme: e }) {
|
|
|
9231
9231
|
zIndex: "popover",
|
|
9232
9232
|
overflow: "hidden",
|
|
9233
9233
|
py: "1",
|
|
9234
|
-
children: vt.map((
|
|
9235
|
-
const m = c ===
|
|
9234
|
+
children: vt.map((p) => {
|
|
9235
|
+
const m = c === p.value;
|
|
9236
9236
|
return /* @__PURE__ */ g(
|
|
9237
9237
|
f,
|
|
9238
9238
|
{
|
|
@@ -9250,7 +9250,7 @@ function pp({ scheme: e }) {
|
|
|
9250
9250
|
cursor: "pointer",
|
|
9251
9251
|
textAlign: "left",
|
|
9252
9252
|
onClick: () => {
|
|
9253
|
-
r(
|
|
9253
|
+
r(p.value), i(!1);
|
|
9254
9254
|
},
|
|
9255
9255
|
_hover: { bg: e.hoverBgLight, color: e.chakraToken },
|
|
9256
9256
|
_dark: {
|
|
@@ -9258,7 +9258,7 @@ function pp({ scheme: e }) {
|
|
|
9258
9258
|
_hover: { bg: e.hoverBgDark }
|
|
9259
9259
|
},
|
|
9260
9260
|
children: [
|
|
9261
|
-
/* @__PURE__ */ a(f, { flexShrink: 0, children:
|
|
9261
|
+
/* @__PURE__ */ a(f, { flexShrink: 0, children: p.icon }),
|
|
9262
9262
|
/* @__PURE__ */ a(
|
|
9263
9263
|
f,
|
|
9264
9264
|
{
|
|
@@ -9266,12 +9266,12 @@ function pp({ scheme: e }) {
|
|
|
9266
9266
|
fontSize: "sm",
|
|
9267
9267
|
fontWeight: m ? "600" : "500",
|
|
9268
9268
|
fontFamily: "var(--font-body)",
|
|
9269
|
-
children:
|
|
9269
|
+
children: p.label
|
|
9270
9270
|
}
|
|
9271
9271
|
)
|
|
9272
9272
|
]
|
|
9273
9273
|
},
|
|
9274
|
-
|
|
9274
|
+
p.value
|
|
9275
9275
|
);
|
|
9276
9276
|
})
|
|
9277
9277
|
}
|
|
@@ -9279,7 +9279,7 @@ function pp({ scheme: e }) {
|
|
|
9279
9279
|
] });
|
|
9280
9280
|
return /* @__PURE__ */ g(fe, { children: [
|
|
9281
9281
|
d,
|
|
9282
|
-
|
|
9282
|
+
h
|
|
9283
9283
|
] });
|
|
9284
9284
|
}
|
|
9285
9285
|
function ra({
|
|
@@ -9289,9 +9289,9 @@ function ra({
|
|
|
9289
9289
|
scheme: o
|
|
9290
9290
|
}) {
|
|
9291
9291
|
var x;
|
|
9292
|
-
const [r, s] = U(!1), [i, l] = U(!1), c = e.isActive ?? !1, u = ((x = e.subItems) == null ? void 0 : x.some((v) => v.isActive)) ?? !1, [d,
|
|
9292
|
+
const [r, s] = U(!1), [i, l] = U(!1), c = e.isActive ?? !1, u = ((x = e.subItems) == null ? void 0 : x.some((v) => v.isActive)) ?? !1, [d, h] = U(c || u), p = !!(e.subItems && e.subItems.length > 0), m = ct();
|
|
9293
9293
|
ne(() => {
|
|
9294
|
-
|
|
9294
|
+
h(c || u);
|
|
9295
9295
|
}, [c, u]);
|
|
9296
9296
|
const y = c, b = /* @__PURE__ */ g(
|
|
9297
9297
|
f,
|
|
@@ -9302,16 +9302,16 @@ function ra({
|
|
|
9302
9302
|
px: "3",
|
|
9303
9303
|
py: "2.5",
|
|
9304
9304
|
borderRadius: "lg",
|
|
9305
|
-
borderLeftRadius:
|
|
9306
|
-
borderTopLeftRadius:
|
|
9307
|
-
borderBottomLeftRadius:
|
|
9305
|
+
borderLeftRadius: p ? "lg" : "none",
|
|
9306
|
+
borderTopLeftRadius: p ? "lg" : "none",
|
|
9307
|
+
borderBottomLeftRadius: p ? "lg" : "none",
|
|
9308
9308
|
position: "relative",
|
|
9309
9309
|
onMouseEnter: () => s(!0),
|
|
9310
9310
|
onMouseLeave: () => s(!1),
|
|
9311
|
-
onClick:
|
|
9311
|
+
onClick: p ? void 0 : n,
|
|
9312
9312
|
style: {
|
|
9313
9313
|
background: c ? o.activeBgLight : r ? o.hoverBgLight : "transparent",
|
|
9314
|
-
boxShadow: c && !
|
|
9314
|
+
boxShadow: c && !p ? `inset 3px 0 0 ${o.solid}` : void 0,
|
|
9315
9315
|
outline: i ? `2px solid ${o.solid}` : void 0,
|
|
9316
9316
|
outlineOffset: i ? "2px" : void 0,
|
|
9317
9317
|
transition: "background 0.15s ease, box-shadow 0.15s ease"
|
|
@@ -9349,7 +9349,7 @@ function ra({
|
|
|
9349
9349
|
children: e.label
|
|
9350
9350
|
}
|
|
9351
9351
|
),
|
|
9352
|
-
typeof e.badge == "number" && !
|
|
9352
|
+
typeof e.badge == "number" && !p && /* @__PURE__ */ a(
|
|
9353
9353
|
f,
|
|
9354
9354
|
{
|
|
9355
9355
|
as: "span",
|
|
@@ -9370,7 +9370,7 @@ function ra({
|
|
|
9370
9370
|
children: e.badge
|
|
9371
9371
|
}
|
|
9372
9372
|
),
|
|
9373
|
-
e.hasDot && !
|
|
9373
|
+
e.hasDot && !p && /* @__PURE__ */ a(
|
|
9374
9374
|
f,
|
|
9375
9375
|
{
|
|
9376
9376
|
as: "span",
|
|
@@ -9383,7 +9383,7 @@ function ra({
|
|
|
9383
9383
|
"aria-label": "New notification"
|
|
9384
9384
|
}
|
|
9385
9385
|
),
|
|
9386
|
-
|
|
9386
|
+
p && /* @__PURE__ */ a(
|
|
9387
9387
|
f,
|
|
9388
9388
|
{
|
|
9389
9389
|
flexShrink: 0,
|
|
@@ -9395,7 +9395,7 @@ function ra({
|
|
|
9395
9395
|
}
|
|
9396
9396
|
);
|
|
9397
9397
|
return /* @__PURE__ */ g(fe, { children: [
|
|
9398
|
-
|
|
9398
|
+
p ? (
|
|
9399
9399
|
// Render as a native <button> so keyboard users can toggle via Enter/Space
|
|
9400
9400
|
// and assistive tech can announce aria-expanded / aria-controls.
|
|
9401
9401
|
/* @__PURE__ */ a(
|
|
@@ -9404,7 +9404,7 @@ function ra({
|
|
|
9404
9404
|
type: "button",
|
|
9405
9405
|
"aria-expanded": d,
|
|
9406
9406
|
"aria-controls": m,
|
|
9407
|
-
onClick: () =>
|
|
9407
|
+
onClick: () => h((v) => !v),
|
|
9408
9408
|
onFocus: (v) => {
|
|
9409
9409
|
l(v.currentTarget.matches(":focus-visible"));
|
|
9410
9410
|
},
|
|
@@ -9422,7 +9422,7 @@ function ra({
|
|
|
9422
9422
|
}
|
|
9423
9423
|
)
|
|
9424
9424
|
) : t(e, b),
|
|
9425
|
-
|
|
9425
|
+
p && /* @__PURE__ */ a(
|
|
9426
9426
|
ge.div,
|
|
9427
9427
|
{
|
|
9428
9428
|
id: m,
|
|
@@ -9856,23 +9856,23 @@ function wp({
|
|
|
9856
9856
|
children: /* @__PURE__ */ a(vp, { data: c, renderLink: s })
|
|
9857
9857
|
}
|
|
9858
9858
|
),
|
|
9859
|
-
/* @__PURE__ */ a(f, { flex: "1", overflowY: "auto", py: "3", px: "3", children: t.map((
|
|
9860
|
-
|
|
9859
|
+
/* @__PURE__ */ a(f, { flex: "1", overflowY: "auto", py: "3", px: "3", children: t.map((h, p) => /* @__PURE__ */ g(f, { mb: "4", children: [
|
|
9860
|
+
h.groupLabel && /* @__PURE__ */ a(
|
|
9861
9861
|
f,
|
|
9862
9862
|
{
|
|
9863
9863
|
px: "3",
|
|
9864
9864
|
pb: "2",
|
|
9865
|
-
pt:
|
|
9865
|
+
pt: p > 0 ? "2" : void 0,
|
|
9866
9866
|
fontSize: "10px",
|
|
9867
9867
|
fontWeight: "700",
|
|
9868
9868
|
letterSpacing: "widest",
|
|
9869
9869
|
textTransform: "uppercase",
|
|
9870
9870
|
color: "text.muted",
|
|
9871
9871
|
fontFamily: "var(--font-body)",
|
|
9872
|
-
children:
|
|
9872
|
+
children: h.groupLabel
|
|
9873
9873
|
}
|
|
9874
9874
|
),
|
|
9875
|
-
/* @__PURE__ */ a(f, { display: "flex", flexDirection: "column", gap: "0.5", children:
|
|
9875
|
+
/* @__PURE__ */ a(f, { display: "flex", flexDirection: "column", gap: "0.5", children: h.items.map((m) => /* @__PURE__ */ a(
|
|
9876
9876
|
ra,
|
|
9877
9877
|
{
|
|
9878
9878
|
item: m,
|
|
@@ -9882,7 +9882,7 @@ function wp({
|
|
|
9882
9882
|
},
|
|
9883
9883
|
m.href
|
|
9884
9884
|
)) })
|
|
9885
|
-
] },
|
|
9885
|
+
] }, p)) }),
|
|
9886
9886
|
/* @__PURE__ */ a(
|
|
9887
9887
|
f,
|
|
9888
9888
|
{
|
|
@@ -9951,10 +9951,10 @@ function Sp({
|
|
|
9951
9951
|
onLogout: c,
|
|
9952
9952
|
scheme: u
|
|
9953
9953
|
}) {
|
|
9954
|
-
const [d,
|
|
9954
|
+
const [d, h] = U(!1), p = Z(null), m = ct(), y = `user-menu-button-${m}`, b = `user-menu-dropdown-${m}`;
|
|
9955
9955
|
return ne(() => {
|
|
9956
9956
|
const x = (v) => {
|
|
9957
|
-
|
|
9957
|
+
p.current && !p.current.contains(v.target) && h(!1);
|
|
9958
9958
|
};
|
|
9959
9959
|
return document.addEventListener("mousedown", x), () => document.removeEventListener("mousedown", x);
|
|
9960
9960
|
}, []), /* @__PURE__ */ g(
|
|
@@ -10029,7 +10029,7 @@ function Sp({
|
|
|
10029
10029
|
] }),
|
|
10030
10030
|
i,
|
|
10031
10031
|
/* @__PURE__ */ a(pp, { scheme: u }),
|
|
10032
|
-
/* @__PURE__ */ g(f, { position: "relative", ref:
|
|
10032
|
+
/* @__PURE__ */ g(f, { position: "relative", ref: p, children: [
|
|
10033
10033
|
/* @__PURE__ */ g(
|
|
10034
10034
|
f,
|
|
10035
10035
|
{
|
|
@@ -10044,7 +10044,7 @@ function Sp({
|
|
|
10044
10044
|
borderRadius: "full",
|
|
10045
10045
|
p: "1",
|
|
10046
10046
|
_hover: { bg: "bg.subtle" },
|
|
10047
|
-
onClick: () =>
|
|
10047
|
+
onClick: () => h((x) => !x),
|
|
10048
10048
|
"aria-haspopup": "menu",
|
|
10049
10049
|
"aria-expanded": d,
|
|
10050
10050
|
"aria-controls": d ? b : void 0,
|
|
@@ -10109,7 +10109,7 @@ function Sp({
|
|
|
10109
10109
|
{
|
|
10110
10110
|
icon: /* @__PURE__ */ a(ap, {}),
|
|
10111
10111
|
label: "My Profile",
|
|
10112
|
-
onClick: () =>
|
|
10112
|
+
onClick: () => h(!1),
|
|
10113
10113
|
scheme: u
|
|
10114
10114
|
}
|
|
10115
10115
|
),
|
|
@@ -10118,7 +10118,7 @@ function Sp({
|
|
|
10118
10118
|
{
|
|
10119
10119
|
icon: /* @__PURE__ */ a(lp, {}),
|
|
10120
10120
|
label: "Settings",
|
|
10121
|
-
onClick: () =>
|
|
10121
|
+
onClick: () => h(!1),
|
|
10122
10122
|
scheme: u
|
|
10123
10123
|
}
|
|
10124
10124
|
)
|
|
@@ -10131,7 +10131,7 @@ function Sp({
|
|
|
10131
10131
|
isDanger: x.isDanger,
|
|
10132
10132
|
onClick: () => {
|
|
10133
10133
|
var w;
|
|
10134
|
-
|
|
10134
|
+
h(!1), (w = x.onClick) == null || w.call(x);
|
|
10135
10135
|
},
|
|
10136
10136
|
scheme: u
|
|
10137
10137
|
},
|
|
@@ -10145,7 +10145,7 @@ function Sp({
|
|
|
10145
10145
|
label: "Log out",
|
|
10146
10146
|
isDanger: !0,
|
|
10147
10147
|
onClick: () => {
|
|
10148
|
-
|
|
10148
|
+
h(!1), c == null || c();
|
|
10149
10149
|
},
|
|
10150
10150
|
scheme: u
|
|
10151
10151
|
}
|
|
@@ -10219,12 +10219,12 @@ function Cp({
|
|
|
10219
10219
|
dropdownItems: c,
|
|
10220
10220
|
topBarSlot: u,
|
|
10221
10221
|
sidebarWidth: d = 220,
|
|
10222
|
-
colorScheme:
|
|
10223
|
-
mobileNavItems:
|
|
10222
|
+
colorScheme: h = "blue",
|
|
10223
|
+
mobileNavItems: p,
|
|
10224
10224
|
scoreCard: m,
|
|
10225
10225
|
...y
|
|
10226
10226
|
}) {
|
|
10227
|
-
const [b, x] = U(!1), v = rp[
|
|
10227
|
+
const [b, x] = U(!1), v = rp[h], w = !!(p && p.length > 0), C = r ?? hp();
|
|
10228
10228
|
return /* @__PURE__ */ g(
|
|
10229
10229
|
f,
|
|
10230
10230
|
{
|
|
@@ -10236,7 +10236,7 @@ function Cp({
|
|
|
10236
10236
|
/* @__PURE__ */ a(
|
|
10237
10237
|
wp,
|
|
10238
10238
|
{
|
|
10239
|
-
logo: t ?? /* @__PURE__ */ a(Ut, { variant:
|
|
10239
|
+
logo: t ?? /* @__PURE__ */ a(Ut, { variant: h, height: 26 }),
|
|
10240
10240
|
navGroups: n,
|
|
10241
10241
|
isOpen: b,
|
|
10242
10242
|
onClose: () => x(!1),
|
|
@@ -10292,7 +10292,7 @@ function Cp({
|
|
|
10292
10292
|
w && /* @__PURE__ */ a(
|
|
10293
10293
|
gp,
|
|
10294
10294
|
{
|
|
10295
|
-
items:
|
|
10295
|
+
items: p,
|
|
10296
10296
|
renderLink: l,
|
|
10297
10297
|
scheme: v
|
|
10298
10298
|
}
|
|
@@ -10368,14 +10368,14 @@ function $1({
|
|
|
10368
10368
|
secondaryCtaLabel: c,
|
|
10369
10369
|
secondaryCtaHref: u,
|
|
10370
10370
|
onSecondaryCtaClick: d,
|
|
10371
|
-
ctaSlot:
|
|
10372
|
-
renderLink:
|
|
10371
|
+
ctaSlot: h,
|
|
10372
|
+
renderLink: p = Bp,
|
|
10373
10373
|
isSticky: m = !1,
|
|
10374
10374
|
colorScheme: y = "blue",
|
|
10375
10375
|
variant: b = "solid",
|
|
10376
10376
|
...x
|
|
10377
10377
|
}) {
|
|
10378
|
-
const [v, w] = B.useState(!1), C = Mp[y], D = i ?? r, k = l ?? s,
|
|
10378
|
+
const [v, w] = B.useState(!1), C = Mp[y], D = i ?? r, k = l ?? s, M = b === "blur" ? { background: "rgba(10,18,32,0.85)", backdropFilter: "blur(12px)" } : {}, T = ({ mobile: S = !1 }) => /* @__PURE__ */ g(
|
|
10379
10379
|
f,
|
|
10380
10380
|
{
|
|
10381
10381
|
display: "flex",
|
|
@@ -10442,7 +10442,7 @@ function $1({
|
|
|
10442
10442
|
top: m ? "0" : void 0,
|
|
10443
10443
|
zIndex: m ? "sticky" : void 0,
|
|
10444
10444
|
bg: b === "transparent" ? "transparent" : b === "blur" ? void 0 : "bg",
|
|
10445
|
-
style:
|
|
10445
|
+
style: M,
|
|
10446
10446
|
borderBottom: "1px solid",
|
|
10447
10447
|
borderColor: b === "transparent" ? "transparent" : "border",
|
|
10448
10448
|
transition: "background 0.2s ease, border-color 0.2s ease",
|
|
@@ -10473,7 +10473,7 @@ function $1({
|
|
|
10473
10473
|
m: "0",
|
|
10474
10474
|
p: "0",
|
|
10475
10475
|
flex: "1",
|
|
10476
|
-
children: t.map((S) => /* @__PURE__ */ a(f, { as: "li", children:
|
|
10476
|
+
children: t.map((S) => /* @__PURE__ */ a(f, { as: "li", children: p(
|
|
10477
10477
|
S,
|
|
10478
10478
|
/* @__PURE__ */ a(
|
|
10479
10479
|
f,
|
|
@@ -10497,7 +10497,7 @@ function $1({
|
|
|
10497
10497
|
) }, S.href))
|
|
10498
10498
|
}
|
|
10499
10499
|
),
|
|
10500
|
-
/* @__PURE__ */ a(f, { display: { base: "none", md: "flex" }, alignItems: "center", flexShrink: 0, children:
|
|
10500
|
+
/* @__PURE__ */ a(f, { display: { base: "none", md: "flex" }, alignItems: "center", flexShrink: 0, children: h ?? /* @__PURE__ */ a(T, {}) }),
|
|
10501
10501
|
/* @__PURE__ */ a(
|
|
10502
10502
|
f,
|
|
10503
10503
|
{
|
|
@@ -10566,7 +10566,7 @@ function $1({
|
|
|
10566
10566
|
initial: "hidden",
|
|
10567
10567
|
animate: "visible",
|
|
10568
10568
|
style: { listStyle: "none", margin: 0, padding: 0, display: "flex", flexDirection: "column", gap: 4 },
|
|
10569
|
-
children: t.map((S) => /* @__PURE__ */ a(ge.li, { variants: Ap, children:
|
|
10569
|
+
children: t.map((S) => /* @__PURE__ */ a(ge.li, { variants: Ap, children: p(
|
|
10570
10570
|
S,
|
|
10571
10571
|
/* @__PURE__ */ a(
|
|
10572
10572
|
f,
|
|
@@ -10589,7 +10589,7 @@ function $1({
|
|
|
10589
10589
|
) }, S.href))
|
|
10590
10590
|
}
|
|
10591
10591
|
),
|
|
10592
|
-
/* @__PURE__ */ a(ge.div, { variants: Lp, initial: "hidden", animate: "visible", children: /* @__PURE__ */ a(f, { mt: "4", children:
|
|
10592
|
+
/* @__PURE__ */ a(ge.div, { variants: Lp, initial: "hidden", animate: "visible", children: /* @__PURE__ */ a(f, { mt: "4", children: h ?? /* @__PURE__ */ a(T, { mobile: !0 }) }) })
|
|
10593
10593
|
]
|
|
10594
10594
|
}
|
|
10595
10595
|
)
|
|
@@ -10687,7 +10687,7 @@ function Np({
|
|
|
10687
10687
|
certifications: u,
|
|
10688
10688
|
...d
|
|
10689
10689
|
}) {
|
|
10690
|
-
const
|
|
10690
|
+
const h = (/* @__PURE__ */ new Date()).getFullYear(), p = r ?? `© ${h} MedixDeck Health Solution Ltd. All Rights Reserved.`, [m, y] = U(""), [b, x] = U(!1), [v, w] = U(!1), C = Ip[c], { mounted: D, themeMode: k, toggleThemeMode: M } = $t(), T = (S) => {
|
|
10691
10691
|
S.preventDefault(), i != null && i.onSubmit && m && (i.onSubmit(m), y(""));
|
|
10692
10692
|
};
|
|
10693
10693
|
return /* @__PURE__ */ a(
|
|
@@ -10883,7 +10883,7 @@ function Np({
|
|
|
10883
10883
|
color: "text.body",
|
|
10884
10884
|
fontFamily: "var(--font-body)",
|
|
10885
10885
|
textAlign: { base: "center", md: "left" },
|
|
10886
|
-
children:
|
|
10886
|
+
children: p
|
|
10887
10887
|
}
|
|
10888
10888
|
),
|
|
10889
10889
|
/* @__PURE__ */ g(Lo, { gap: 6, flexWrap: "wrap", justify: "center", alignItems: "center", children: [
|
|
@@ -10907,7 +10907,7 @@ function Np({
|
|
|
10907
10907
|
f,
|
|
10908
10908
|
{
|
|
10909
10909
|
as: "button",
|
|
10910
|
-
onClick:
|
|
10910
|
+
onClick: M,
|
|
10911
10911
|
display: "inline-flex",
|
|
10912
10912
|
alignItems: "center",
|
|
10913
10913
|
justifyContent: "center",
|
|
@@ -11084,9 +11084,9 @@ function G1({
|
|
|
11084
11084
|
...l
|
|
11085
11085
|
}) {
|
|
11086
11086
|
var y;
|
|
11087
|
-
const [c, u] = B.useState(t ?? ((y = e[0]) == null ? void 0 : y.id)), d = n ?? c,
|
|
11087
|
+
const [c, u] = B.useState(t ?? ((y = e[0]) == null ? void 0 : y.id)), d = n ?? c, h = (b) => {
|
|
11088
11088
|
u(b), o == null || o(b);
|
|
11089
|
-
},
|
|
11089
|
+
}, p = e.find((b) => b.id === d), m = Up[s];
|
|
11090
11090
|
return /* @__PURE__ */ g(f, { ...l, children: [
|
|
11091
11091
|
/* @__PURE__ */ a(
|
|
11092
11092
|
f,
|
|
@@ -11112,9 +11112,9 @@ function G1({
|
|
|
11112
11112
|
"aria-selected": x,
|
|
11113
11113
|
"aria-disabled": b.disabled,
|
|
11114
11114
|
tabIndex: b.disabled ? -1 : 0,
|
|
11115
|
-
onClick: () => !b.disabled &&
|
|
11115
|
+
onClick: () => !b.disabled && h(b.id),
|
|
11116
11116
|
onKeyDown: (v) => {
|
|
11117
|
-
(v.key === "Enter" || v.key === " ") && !b.disabled &&
|
|
11117
|
+
(v.key === "Enter" || v.key === " ") && !b.disabled && h(b.id);
|
|
11118
11118
|
},
|
|
11119
11119
|
display: "flex",
|
|
11120
11120
|
alignItems: "center",
|
|
@@ -11175,7 +11175,7 @@ function G1({
|
|
|
11175
11175
|
})
|
|
11176
11176
|
}
|
|
11177
11177
|
),
|
|
11178
|
-
i && (
|
|
11178
|
+
i && (p == null ? void 0 : p.content) && /* @__PURE__ */ a(f, { role: "tabpanel", mt: "4", children: p.content })
|
|
11179
11179
|
] });
|
|
11180
11180
|
}
|
|
11181
11181
|
function Gp(e, t, n) {
|
|
@@ -11235,7 +11235,7 @@ function K1({
|
|
|
11235
11235
|
transition: "all 0.15s",
|
|
11236
11236
|
border: "none",
|
|
11237
11237
|
userSelect: "none"
|
|
11238
|
-
},
|
|
11238
|
+
}, h = ({
|
|
11239
11239
|
children: y,
|
|
11240
11240
|
disabled: b,
|
|
11241
11241
|
onClick: x,
|
|
@@ -11273,7 +11273,7 @@ function K1({
|
|
|
11273
11273
|
C && w && /* @__PURE__ */ a(f, { as: "span", display: "flex", alignItems: "center", children: w })
|
|
11274
11274
|
]
|
|
11275
11275
|
}
|
|
11276
|
-
),
|
|
11276
|
+
), p = /* @__PURE__ */ a("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2.5", strokeLinecap: "round", strokeLinejoin: "round", children: /* @__PURE__ */ a("path", { d: "M15 18l-6-6 6-6" }) }), m = /* @__PURE__ */ a("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2.5", strokeLinecap: "round", strokeLinejoin: "round", children: /* @__PURE__ */ a("path", { d: "M9 18l6-6-6-6" }) });
|
|
11277
11277
|
return /* @__PURE__ */ g(
|
|
11278
11278
|
f,
|
|
11279
11279
|
{
|
|
@@ -11286,14 +11286,14 @@ function K1({
|
|
|
11286
11286
|
flexWrap: "wrap",
|
|
11287
11287
|
...l,
|
|
11288
11288
|
children: [
|
|
11289
|
-
s && /* @__PURE__ */ a(
|
|
11289
|
+
s && /* @__PURE__ */ a(h, { disabled: n === 1, onClick: () => o == null ? void 0 : o(1), label: "First page", icon: p, children: "First" }),
|
|
11290
11290
|
/* @__PURE__ */ a(
|
|
11291
|
-
|
|
11291
|
+
h,
|
|
11292
11292
|
{
|
|
11293
11293
|
disabled: n === 1,
|
|
11294
11294
|
onClick: () => o == null ? void 0 : o(n - 1),
|
|
11295
11295
|
label: "Previous page",
|
|
11296
|
-
icon:
|
|
11296
|
+
icon: p,
|
|
11297
11297
|
children: "Prev"
|
|
11298
11298
|
}
|
|
11299
11299
|
),
|
|
@@ -11345,7 +11345,7 @@ function K1({
|
|
|
11345
11345
|
}
|
|
11346
11346
|
),
|
|
11347
11347
|
/* @__PURE__ */ a(
|
|
11348
|
-
|
|
11348
|
+
h,
|
|
11349
11349
|
{
|
|
11350
11350
|
disabled: n === c,
|
|
11351
11351
|
onClick: () => o == null ? void 0 : o(n + 1),
|
|
@@ -11356,7 +11356,7 @@ function K1({
|
|
|
11356
11356
|
}
|
|
11357
11357
|
),
|
|
11358
11358
|
s && /* @__PURE__ */ a(
|
|
11359
|
-
|
|
11359
|
+
h,
|
|
11360
11360
|
{
|
|
11361
11361
|
disabled: n === c,
|
|
11362
11362
|
onClick: () => o == null ? void 0 : o(c),
|
|
@@ -11390,7 +11390,7 @@ function Y1({
|
|
|
11390
11390
|
}) {
|
|
11391
11391
|
const i = r === "blue" ? "#0685FF" : "#7700CC", l = r === "blue" ? "rgba(6,133,255,0.10)" : "rgba(119,0,204,0.10)";
|
|
11392
11392
|
return o === "vertical" ? /* @__PURE__ */ a(f, { display: "flex", flexDirection: "column", alignItems: "flex-start", ...s, children: e.map((u, d) => {
|
|
11393
|
-
const
|
|
11393
|
+
const h = d + 1 < t, p = d + 1 === t, m = d === e.length - 1;
|
|
11394
11394
|
return /* @__PURE__ */ g(f, { display: "flex", flexDirection: "row", alignItems: "flex-start", gap: "3", children: [
|
|
11395
11395
|
/* @__PURE__ */ g(f, { display: "flex", flexDirection: "column", alignItems: "center", children: [
|
|
11396
11396
|
/* @__PURE__ */ a(
|
|
@@ -11403,15 +11403,15 @@ function Y1({
|
|
|
11403
11403
|
display: "flex",
|
|
11404
11404
|
alignItems: "center",
|
|
11405
11405
|
justifyContent: "center",
|
|
11406
|
-
bg:
|
|
11406
|
+
bg: h || p ? i : "bg.subtle",
|
|
11407
11407
|
border: "2px solid",
|
|
11408
|
-
borderColor:
|
|
11408
|
+
borderColor: h || p ? i : "var(--chakra-colors-border, #E2E8F0)",
|
|
11409
11409
|
color: "white",
|
|
11410
11410
|
fontSize: "sm",
|
|
11411
11411
|
fontWeight: "bold",
|
|
11412
11412
|
fontFamily: "var(--font-body)",
|
|
11413
11413
|
transition: "all 0.25s",
|
|
11414
|
-
children:
|
|
11414
|
+
children: h ? oi : u.icon ?? d + 1
|
|
11415
11415
|
}
|
|
11416
11416
|
),
|
|
11417
11417
|
!m && /* @__PURE__ */ a(
|
|
@@ -11420,7 +11420,7 @@ function Y1({
|
|
|
11420
11420
|
w: "2px",
|
|
11421
11421
|
flex: "1",
|
|
11422
11422
|
minH: "8",
|
|
11423
|
-
bg:
|
|
11423
|
+
bg: h ? i : "border",
|
|
11424
11424
|
my: "1",
|
|
11425
11425
|
transition: "background 0.25s"
|
|
11426
11426
|
}
|
|
@@ -11431,8 +11431,8 @@ function Y1({
|
|
|
11431
11431
|
f,
|
|
11432
11432
|
{
|
|
11433
11433
|
fontSize: "sm",
|
|
11434
|
-
fontWeight:
|
|
11435
|
-
color:
|
|
11434
|
+
fontWeight: p ? "semibold" : "medium",
|
|
11435
|
+
color: h || p ? i : "text.muted",
|
|
11436
11436
|
fontFamily: "var(--font-body)",
|
|
11437
11437
|
transition: "color 0.25s",
|
|
11438
11438
|
children: u.title
|
|
@@ -11451,7 +11451,7 @@ function Y1({
|
|
|
11451
11451
|
"aria-label": "Progress steps",
|
|
11452
11452
|
...s,
|
|
11453
11453
|
children: e.map((u, d) => {
|
|
11454
|
-
const
|
|
11454
|
+
const h = d + 1 < t, p = d + 1 === t, m = d + 1 > t, y = d === e.length - 1, b = m ? "bg.subtle" : i, x = h ? oi : u.icon ? u.icon : (
|
|
11455
11455
|
// Step number — use Chakra color prop, not inline style CSS var
|
|
11456
11456
|
/* @__PURE__ */ a(
|
|
11457
11457
|
f,
|
|
@@ -11471,7 +11471,7 @@ function Y1({
|
|
|
11471
11471
|
f,
|
|
11472
11472
|
{
|
|
11473
11473
|
role: "listitem",
|
|
11474
|
-
"aria-current":
|
|
11474
|
+
"aria-current": p ? "step" : void 0,
|
|
11475
11475
|
display: "inline-flex",
|
|
11476
11476
|
alignItems: "center",
|
|
11477
11477
|
gap: "0",
|
|
@@ -11510,7 +11510,7 @@ function Y1({
|
|
|
11510
11510
|
{
|
|
11511
11511
|
as: "span",
|
|
11512
11512
|
fontSize: "sm",
|
|
11513
|
-
fontWeight:
|
|
11513
|
+
fontWeight: p || h ? "semibold" : "medium",
|
|
11514
11514
|
fontFamily: "var(--font-body)",
|
|
11515
11515
|
color: w,
|
|
11516
11516
|
whiteSpace: "nowrap",
|
|
@@ -11535,7 +11535,7 @@ function Y1({
|
|
|
11535
11535
|
{
|
|
11536
11536
|
h: "1.5px",
|
|
11537
11537
|
w: "10",
|
|
11538
|
-
bg:
|
|
11538
|
+
bg: h ? i : "var(--chakra-colors-border, #E2E8F0)",
|
|
11539
11539
|
borderRadius: "full",
|
|
11540
11540
|
transition: "background 0.25s ease"
|
|
11541
11541
|
}
|
|
@@ -11584,7 +11584,7 @@ const Kp = {
|
|
|
11584
11584
|
children: l,
|
|
11585
11585
|
...c
|
|
11586
11586
|
}, u) => {
|
|
11587
|
-
const d = Kp[e],
|
|
11587
|
+
const d = Kp[e], h = t === "solid" ? d.color : d.bg, p = t === "solid" ? "white" : "inherit", m = t === "left-accent" ? `4px solid ${d.color}` : void 0, y = t === "subtle" ? `1px solid ${d.border}` : void 0;
|
|
11588
11588
|
return /* @__PURE__ */ g(
|
|
11589
11589
|
f,
|
|
11590
11590
|
{
|
|
@@ -11595,10 +11595,10 @@ const Kp = {
|
|
|
11595
11595
|
gap: "3",
|
|
11596
11596
|
p: "4",
|
|
11597
11597
|
borderRadius: "md",
|
|
11598
|
-
bg:
|
|
11598
|
+
bg: h,
|
|
11599
11599
|
border: y,
|
|
11600
11600
|
borderLeft: m,
|
|
11601
|
-
color:
|
|
11601
|
+
color: p,
|
|
11602
11602
|
...c,
|
|
11603
11603
|
children: [
|
|
11604
11604
|
/* @__PURE__ */ a(
|
|
@@ -12694,8 +12694,8 @@ const Yn = {
|
|
|
12694
12694
|
declineButtonText: c,
|
|
12695
12695
|
containerClasses: u,
|
|
12696
12696
|
contentClasses: d,
|
|
12697
|
-
buttonClasses:
|
|
12698
|
-
buttonWrapperClasses:
|
|
12697
|
+
buttonClasses: h,
|
|
12698
|
+
buttonWrapperClasses: p,
|
|
12699
12699
|
declineButtonClasses: m,
|
|
12700
12700
|
buttonId: y,
|
|
12701
12701
|
declineButtonId: b,
|
|
@@ -12705,17 +12705,17 @@ const Yn = {
|
|
|
12705
12705
|
ButtonComponent: C,
|
|
12706
12706
|
overlay: D,
|
|
12707
12707
|
overlayClasses: k,
|
|
12708
|
-
overlayStyle:
|
|
12708
|
+
overlayStyle: M,
|
|
12709
12709
|
ariaAcceptLabel: T,
|
|
12710
12710
|
ariaDeclineLabel: S,
|
|
12711
12711
|
customContainerAttributes: F,
|
|
12712
|
-
customContentAttributes:
|
|
12712
|
+
customContentAttributes: L,
|
|
12713
12713
|
customButtonProps: I,
|
|
12714
12714
|
customDeclineButtonProps: E,
|
|
12715
|
-
customButtonWrapperAttributes:
|
|
12715
|
+
customButtonWrapperAttributes: z
|
|
12716
12716
|
} = this.props;
|
|
12717
|
-
let V = {},
|
|
12718
|
-
switch (i ? (V = Object.assign({}, n),
|
|
12717
|
+
let V = {}, O = {}, j = {}, oe = {}, W = {};
|
|
12718
|
+
switch (i ? (V = Object.assign({}, n), O = Object.assign({}, o), j = Object.assign({}, r), oe = Object.assign({}, s), W = Object.assign({}, M)) : (V = Object.assign({}, { ...this.state.style, ...n }), oe = Object.assign({}, { ...this.state.contentStyle, ...s }), W = Object.assign({}, { ...this.state.overlayStyle, ...M }), x ? (O = Object.assign({}, o), j = Object.assign({}, r)) : (O = Object.assign({}, { ...this.state.buttonStyle, ...o }), j = Object.assign(
|
|
12719
12719
|
{},
|
|
12720
12720
|
{ ...this.state.declineButtonStyle, ...r }
|
|
12721
12721
|
))), t) {
|
|
@@ -12748,8 +12748,8 @@ const Yn = {
|
|
|
12748
12748
|
C,
|
|
12749
12749
|
{
|
|
12750
12750
|
key: "acceptButton",
|
|
12751
|
-
style:
|
|
12752
|
-
className:
|
|
12751
|
+
style: O,
|
|
12752
|
+
className: h,
|
|
12753
12753
|
id: y,
|
|
12754
12754
|
"aria-label": T,
|
|
12755
12755
|
onClick: () => {
|
|
@@ -12781,7 +12781,7 @@ const Yn = {
|
|
|
12781
12781
|
ae
|
|
12782
12782
|
)
|
|
12783
12783
|
},
|
|
12784
|
-
/* @__PURE__ */ B.createElement("div", { className: `${u}`, style: V, ...F }, /* @__PURE__ */ B.createElement("div", { style: oe, className: d, ...
|
|
12784
|
+
/* @__PURE__ */ B.createElement("div", { className: `${u}`, style: V, ...F }, /* @__PURE__ */ B.createElement("div", { style: oe, className: d, ...L }, this.props.children), /* @__PURE__ */ B.createElement("div", { className: `${p}`, ...z }, K.map((ae) => ae)))
|
|
12785
12785
|
);
|
|
12786
12786
|
}
|
|
12787
12787
|
};
|
|
@@ -12914,42 +12914,44 @@ function b1({
|
|
|
12914
12914
|
appName: l = "this app",
|
|
12915
12915
|
icon: c,
|
|
12916
12916
|
position: u = "bottom",
|
|
12917
|
-
|
|
12917
|
+
delaySeconds: d = 0,
|
|
12918
|
+
forceVisible: h,
|
|
12918
12919
|
forceIOS: p
|
|
12919
12920
|
}) {
|
|
12920
|
-
const
|
|
12921
|
+
const m = li(), [y, b] = U(!1), [x, v] = U(!1), w = Z(null), C = Z(null);
|
|
12921
12922
|
ne(() => {
|
|
12922
|
-
|
|
12923
|
-
|
|
12924
|
-
|
|
12925
|
-
|
|
12926
|
-
|
|
12927
|
-
if (
|
|
12928
|
-
|
|
12929
|
-
|
|
12930
|
-
|
|
12931
|
-
|
|
12932
|
-
|
|
12923
|
+
const F = () => {
|
|
12924
|
+
d > 0 ? C.current = setTimeout(() => b(!0), d * 1e3) : b(!0);
|
|
12925
|
+
}, L = () => {
|
|
12926
|
+
C.current && clearTimeout(C.current);
|
|
12927
|
+
};
|
|
12928
|
+
if (h)
|
|
12929
|
+
return p && v(!0), F(), L;
|
|
12930
|
+
if (f1() || p1(r)) return L;
|
|
12931
|
+
if (h1())
|
|
12932
|
+
return v(!0), F(), L;
|
|
12933
|
+
const I = (z) => {
|
|
12934
|
+
z.preventDefault(), w.current = z, F();
|
|
12933
12935
|
};
|
|
12934
|
-
window.addEventListener("beforeinstallprompt",
|
|
12935
|
-
const
|
|
12936
|
-
return window.addEventListener("appinstalled",
|
|
12937
|
-
window.removeEventListener("beforeinstallprompt",
|
|
12936
|
+
window.addEventListener("beforeinstallprompt", I);
|
|
12937
|
+
const E = () => b(!1);
|
|
12938
|
+
return window.addEventListener("appinstalled", E), () => {
|
|
12939
|
+
window.removeEventListener("beforeinstallprompt", I), window.removeEventListener("appinstalled", E), L();
|
|
12938
12940
|
};
|
|
12939
|
-
}, [r]);
|
|
12940
|
-
const
|
|
12941
|
-
if (
|
|
12941
|
+
}, [r, d, h, p]);
|
|
12942
|
+
const D = Ce(async () => {
|
|
12943
|
+
if (w.current) {
|
|
12942
12944
|
try {
|
|
12943
|
-
await
|
|
12945
|
+
await w.current.prompt(), (await w.current.userChoice).outcome === "accepted" && (s == null || s());
|
|
12944
12946
|
} catch {
|
|
12945
12947
|
}
|
|
12946
|
-
|
|
12948
|
+
w.current = null;
|
|
12947
12949
|
}
|
|
12948
|
-
|
|
12949
|
-
}, [s]),
|
|
12950
|
-
m1(),
|
|
12951
|
-
}, [i]),
|
|
12952
|
-
return /* @__PURE__ */ a(Ht, { children:
|
|
12950
|
+
b(!1);
|
|
12951
|
+
}, [s]), k = Ce(() => {
|
|
12952
|
+
m1(), b(!1), i == null || i();
|
|
12953
|
+
}, [i]), M = m ? "#152035" : "#FFFFFF", T = m ? "#1E3050" : "#E4E8F0", S = m ? "rgba(0,0,0,0.4)" : "rgba(0,0,0,0.08)";
|
|
12954
|
+
return /* @__PURE__ */ a(Ht, { children: y && /* @__PURE__ */ a(
|
|
12953
12955
|
ge.div,
|
|
12954
12956
|
{
|
|
12955
12957
|
initial: { opacity: 0, y: u === "bottom" ? 80 : -80, x: "-50%" },
|
|
@@ -12971,9 +12973,9 @@ function b1({
|
|
|
12971
12973
|
borderRadius: "16px",
|
|
12972
12974
|
p: { base: "4", md: "5" },
|
|
12973
12975
|
style: {
|
|
12974
|
-
background:
|
|
12975
|
-
border: `1px solid ${
|
|
12976
|
-
boxShadow: `0 8px 32px ${
|
|
12976
|
+
background: M,
|
|
12977
|
+
border: `1px solid ${T}`,
|
|
12978
|
+
boxShadow: `0 8px 32px ${S}`
|
|
12977
12979
|
},
|
|
12978
12980
|
children: /* @__PURE__ */ g(de, { gap: "4", align: "flex-start", children: [
|
|
12979
12981
|
c ?? /* @__PURE__ */ a(y1, {}),
|
|
@@ -12989,23 +12991,23 @@ function b1({
|
|
|
12989
12991
|
children: e
|
|
12990
12992
|
}
|
|
12991
12993
|
),
|
|
12992
|
-
|
|
12994
|
+
x ? /* @__PURE__ */ g(f, { children: [
|
|
12993
12995
|
/* @__PURE__ */ g(P, { fontSize: "sm", color: "text.muted", lineHeight: "1.5", fontFamily: "var(--font-body)", mb: "3", children: [
|
|
12994
12996
|
"To install ",
|
|
12995
12997
|
l,
|
|
12996
12998
|
", tap the",
|
|
12997
12999
|
" ",
|
|
12998
|
-
/* @__PURE__ */ a("span", { style: { display: "inline-flex", verticalAlign: "middle", margin: "0 2px" }, children: /* @__PURE__ */ a(g1, { size: 16, color:
|
|
13000
|
+
/* @__PURE__ */ a("span", { style: { display: "inline-flex", verticalAlign: "middle", margin: "0 2px" }, children: /* @__PURE__ */ a(g1, { size: 16, color: m ? "#70B6FF" : "#0685FF" }) }),
|
|
12999
13001
|
" ",
|
|
13000
13002
|
"Share button in Safari, then select",
|
|
13001
13003
|
" ",
|
|
13002
|
-
/* @__PURE__ */ a("span", { style: { fontWeight: 700, color:
|
|
13004
|
+
/* @__PURE__ */ a("span", { style: { fontWeight: 700, color: m ? "#F0F6FF" : "#111926" }, children: '"Add to Home Screen"' }),
|
|
13003
13005
|
"."
|
|
13004
13006
|
] }),
|
|
13005
13007
|
/* @__PURE__ */ a(de, { gap: "3", mb: "3", flexWrap: "wrap", children: [
|
|
13006
13008
|
{ step: "1", text: "Tap Share" },
|
|
13007
13009
|
{ step: "2", text: "Add to Home Screen" }
|
|
13008
|
-
].map((
|
|
13010
|
+
].map((F) => /* @__PURE__ */ g(
|
|
13009
13011
|
de,
|
|
13010
13012
|
{
|
|
13011
13013
|
align: "center",
|
|
@@ -13032,23 +13034,23 @@ function b1({
|
|
|
13032
13034
|
fontWeight: 700,
|
|
13033
13035
|
fontFamily: "var(--font-body)"
|
|
13034
13036
|
},
|
|
13035
|
-
children:
|
|
13037
|
+
children: F.step
|
|
13036
13038
|
}
|
|
13037
13039
|
),
|
|
13038
|
-
/* @__PURE__ */ a(P, { fontSize: "xs", fontWeight: "600", color: "text.body", fontFamily: "var(--font-body)", children:
|
|
13040
|
+
/* @__PURE__ */ a(P, { fontSize: "xs", fontWeight: "600", color: "text.body", fontFamily: "var(--font-body)", children: F.text })
|
|
13039
13041
|
]
|
|
13040
13042
|
},
|
|
13041
|
-
|
|
13043
|
+
F.step
|
|
13042
13044
|
)) })
|
|
13043
13045
|
] }) : /* @__PURE__ */ a(P, { fontSize: "sm", color: "text.muted", lineHeight: "1.5", fontFamily: "var(--font-body)", mb: "3", children: t }),
|
|
13044
13046
|
/* @__PURE__ */ g(de, { gap: "3", align: "center", children: [
|
|
13045
|
-
!
|
|
13047
|
+
!x && /* @__PURE__ */ a(
|
|
13046
13048
|
re,
|
|
13047
13049
|
{
|
|
13048
13050
|
variant: "solid",
|
|
13049
13051
|
colorScheme: "blue",
|
|
13050
13052
|
size: "sm",
|
|
13051
|
-
onClick:
|
|
13053
|
+
onClick: D,
|
|
13052
13054
|
children: n
|
|
13053
13055
|
}
|
|
13054
13056
|
),
|
|
@@ -13058,8 +13060,8 @@ function b1({
|
|
|
13058
13060
|
variant: "ghost",
|
|
13059
13061
|
colorScheme: "gray",
|
|
13060
13062
|
size: "sm",
|
|
13061
|
-
onClick:
|
|
13062
|
-
children:
|
|
13063
|
+
onClick: k,
|
|
13064
|
+
children: x ? "Got it" : o
|
|
13063
13065
|
}
|
|
13064
13066
|
)
|
|
13065
13067
|
] })
|
|
@@ -13069,7 +13071,7 @@ function b1({
|
|
|
13069
13071
|
{
|
|
13070
13072
|
as: "button",
|
|
13071
13073
|
"aria-label": "Close install prompt",
|
|
13072
|
-
onClick:
|
|
13074
|
+
onClick: k,
|
|
13073
13075
|
display: "flex",
|
|
13074
13076
|
alignItems: "center",
|
|
13075
13077
|
justifyContent: "center",
|
|
@@ -13109,8 +13111,8 @@ function r0({
|
|
|
13109
13111
|
}) {
|
|
13110
13112
|
const s = x1[o], [i, l] = B.useState(new Set(n)), c = (u) => {
|
|
13111
13113
|
l((d) => {
|
|
13112
|
-
const
|
|
13113
|
-
return
|
|
13114
|
+
const h = new Set(d);
|
|
13115
|
+
return h.has(u) ? h.delete(u) : (t || h.clear(), h.add(u)), h;
|
|
13114
13116
|
});
|
|
13115
13117
|
};
|
|
13116
13118
|
return /* @__PURE__ */ a(f, { display: "flex", flexDirection: "column", gap: "4", ...r, children: e.map((u) => {
|
|
@@ -13316,7 +13318,7 @@ function s0({
|
|
|
13316
13318
|
colorScheme: l = "blue",
|
|
13317
13319
|
...c
|
|
13318
13320
|
}) {
|
|
13319
|
-
const u = !!(s || i), d = w1(o),
|
|
13321
|
+
const u = !!(s || i), d = w1(o), h = v1[l], p = {
|
|
13320
13322
|
display: "block",
|
|
13321
13323
|
textDecoration: "none",
|
|
13322
13324
|
background: "transparent",
|
|
@@ -13376,7 +13378,7 @@ function s0({
|
|
|
13376
13378
|
style: {
|
|
13377
13379
|
fontSize: 22,
|
|
13378
13380
|
fontWeight: 700,
|
|
13379
|
-
color:
|
|
13381
|
+
color: h.solid,
|
|
13380
13382
|
lineHeight: 1,
|
|
13381
13383
|
fontFamily: "var(--font-heading)"
|
|
13382
13384
|
},
|
|
@@ -13411,7 +13413,7 @@ function s0({
|
|
|
13411
13413
|
py: "1",
|
|
13412
13414
|
mb: "3",
|
|
13413
13415
|
borderRadius: "full",
|
|
13414
|
-
bg:
|
|
13416
|
+
bg: h.token,
|
|
13415
13417
|
color: "white",
|
|
13416
13418
|
fontSize: "xs",
|
|
13417
13419
|
fontWeight: "medium",
|
|
@@ -13452,7 +13454,7 @@ function s0({
|
|
|
13452
13454
|
]
|
|
13453
13455
|
}
|
|
13454
13456
|
);
|
|
13455
|
-
return s ? /* @__PURE__ */ a("a", { href: s, style:
|
|
13457
|
+
return s ? /* @__PURE__ */ a("a", { href: s, style: p, onClick: i, children: m }) : i ? /* @__PURE__ */ a("button", { type: "button", style: p, onClick: i, children: m }) : m;
|
|
13456
13458
|
}
|
|
13457
13459
|
function a0({
|
|
13458
13460
|
columns: e,
|
|
@@ -13466,17 +13468,17 @@ function a0({
|
|
|
13466
13468
|
onSort: c,
|
|
13467
13469
|
striped: u = !1,
|
|
13468
13470
|
onRowClick: d,
|
|
13469
|
-
caption:
|
|
13470
|
-
style:
|
|
13471
|
+
caption: h,
|
|
13472
|
+
style: p,
|
|
13471
13473
|
className: m
|
|
13472
13474
|
}) {
|
|
13473
13475
|
const [y, b] = B.useState(i), [x, v] = B.useState(l), w = i ?? y, C = i ? l : x, D = (F) => {
|
|
13474
|
-
const
|
|
13475
|
-
b(F), v(
|
|
13476
|
-
}, k = B.useMemo(() => !w || c ? t : [...t].sort((F,
|
|
13477
|
-
const I = F[w], E =
|
|
13478
|
-
return C === "asc" ?
|
|
13479
|
-
}), [t, w, C, c]),
|
|
13476
|
+
const L = w === F && C === "asc" ? "desc" : "asc";
|
|
13477
|
+
b(F), v(L), c == null || c(F, L);
|
|
13478
|
+
}, k = B.useMemo(() => !w || c ? t : [...t].sort((F, L) => {
|
|
13479
|
+
const I = F[w], E = L[w], z = String(I ?? ""), V = String(E ?? ""), O = z.localeCompare(V, void 0, { numeric: !0, sensitivity: "base" });
|
|
13480
|
+
return C === "asc" ? O : -O;
|
|
13481
|
+
}), [t, w, C, c]), M = ({ colKey: F }) => w !== F ? /* @__PURE__ */ a("span", { style: { opacity: 0.3, marginLeft: 4 }, children: "↕" }) : /* @__PURE__ */ a("span", { style: { marginLeft: 4 }, children: C === "asc" ? "↑" : "↓" }), T = {
|
|
13480
13482
|
padding: "12px 16px",
|
|
13481
13483
|
textAlign: "left",
|
|
13482
13484
|
fontSize: "12px",
|
|
@@ -13505,15 +13507,15 @@ function a0({
|
|
|
13505
13507
|
bg: "bg.surface",
|
|
13506
13508
|
boxShadow: "card-light",
|
|
13507
13509
|
_dark: { boxShadow: "card-dark" },
|
|
13508
|
-
style:
|
|
13510
|
+
style: p,
|
|
13509
13511
|
className: m,
|
|
13510
13512
|
children: /* @__PURE__ */ a(f, { overflowX: "auto", children: /* @__PURE__ */ g(
|
|
13511
13513
|
"table",
|
|
13512
13514
|
{
|
|
13513
13515
|
style: { width: "100%", borderCollapse: "collapse" },
|
|
13514
|
-
"aria-label":
|
|
13516
|
+
"aria-label": h,
|
|
13515
13517
|
children: [
|
|
13516
|
-
|
|
13518
|
+
h && /* @__PURE__ */ a("caption", { style: { display: "none" }, children: h }),
|
|
13517
13519
|
/* @__PURE__ */ a("thead", { children: /* @__PURE__ */ a("tr", { style: { background: "var(--chakra-colors-bg-subtle, #F6F6F6)" }, children: e.map((F) => /* @__PURE__ */ a(
|
|
13518
13520
|
"th",
|
|
13519
13521
|
{
|
|
@@ -13527,12 +13529,12 @@ function a0({
|
|
|
13527
13529
|
"aria-sort": w === F.key ? C === "asc" ? "ascending" : "descending" : void 0,
|
|
13528
13530
|
children: /* @__PURE__ */ g("span", { style: { display: "inline-flex", alignItems: "center" }, children: [
|
|
13529
13531
|
F.label,
|
|
13530
|
-
(F.sortable || s) && /* @__PURE__ */ a(
|
|
13532
|
+
(F.sortable || s) && /* @__PURE__ */ a(M, { colKey: F.key })
|
|
13531
13533
|
] })
|
|
13532
13534
|
},
|
|
13533
13535
|
F.key
|
|
13534
13536
|
)) }) }),
|
|
13535
|
-
/* @__PURE__ */ a("tbody", { children: o ? Array.from({ length: 5 }).map((F,
|
|
13537
|
+
/* @__PURE__ */ a("tbody", { children: o ? Array.from({ length: 5 }).map((F, L) => /* @__PURE__ */ a("tr", { children: e.map((I) => /* @__PURE__ */ a("td", { style: S, children: /* @__PURE__ */ a(
|
|
13536
13538
|
f,
|
|
13537
13539
|
{
|
|
13538
13540
|
h: "4",
|
|
@@ -13541,14 +13543,14 @@ function a0({
|
|
|
13541
13543
|
w: `${60 + Math.random() * 30}%`,
|
|
13542
13544
|
style: { animation: "medix-shimmer 1.5s infinite" }
|
|
13543
13545
|
}
|
|
13544
|
-
) }, I.key)) },
|
|
13545
|
-
const I = String(F[n] ??
|
|
13546
|
+
) }, I.key)) }, L)) : k.length === 0 ? /* @__PURE__ */ a("tr", { children: /* @__PURE__ */ a("td", { colSpan: e.length, style: { ...S, textAlign: "center", padding: "48px 16px" }, children: /* @__PURE__ */ a(P, { color: "text.muted", fontFamily: "var(--font-body)", children: r }) }) }) : k.map((F, L) => {
|
|
13547
|
+
const I = String(F[n] ?? L);
|
|
13546
13548
|
return /* @__PURE__ */ a(
|
|
13547
13549
|
"tr",
|
|
13548
13550
|
{
|
|
13549
|
-
onClick: () => d == null ? void 0 : d(F,
|
|
13551
|
+
onClick: () => d == null ? void 0 : d(F, L),
|
|
13550
13552
|
style: {
|
|
13551
|
-
background: u &&
|
|
13553
|
+
background: u && L % 2 === 1 ? "var(--chakra-colors-bg-subtle, #F6F6F6)" : void 0,
|
|
13552
13554
|
cursor: d ? "pointer" : "default",
|
|
13553
13555
|
borderBottom: "1px solid var(--chakra-colors-border, #E2E8F0)",
|
|
13554
13556
|
transition: "background 0.1s"
|
|
@@ -13563,7 +13565,7 @@ function a0({
|
|
|
13563
13565
|
"td",
|
|
13564
13566
|
{
|
|
13565
13567
|
style: { ...S, textAlign: E.align ?? "left" },
|
|
13566
|
-
children: E.render ? E.render(F[E.key], F,
|
|
13568
|
+
children: E.render ? E.render(F[E.key], F, L) : String(F[E.key] ?? "—")
|
|
13567
13569
|
},
|
|
13568
13570
|
E.key
|
|
13569
13571
|
))
|
|
@@ -13589,8 +13591,8 @@ function l0({
|
|
|
13589
13591
|
isVerified: c = !1,
|
|
13590
13592
|
isAvailable: u = !1,
|
|
13591
13593
|
availabilityLabel: d = "Available",
|
|
13592
|
-
onBookClick:
|
|
13593
|
-
onViewClick:
|
|
13594
|
+
onBookClick: h,
|
|
13595
|
+
onViewClick: p,
|
|
13594
13596
|
variant: m = "standard",
|
|
13595
13597
|
...y
|
|
13596
13598
|
}) {
|
|
@@ -13666,7 +13668,7 @@ function l0({
|
|
|
13666
13668
|
/* @__PURE__ */ a(f, { fontSize: "xl", fontWeight: "bold", color: "text.heading", fontFamily: "var(--font-heading)", children: l })
|
|
13667
13669
|
] }),
|
|
13668
13670
|
/* @__PURE__ */ g(f, { display: "flex", gap: "3", alignItems: "center", children: [
|
|
13669
|
-
|
|
13671
|
+
p && /* @__PURE__ */ a(
|
|
13670
13672
|
f,
|
|
13671
13673
|
{
|
|
13672
13674
|
as: "button",
|
|
@@ -13681,11 +13683,11 @@ function l0({
|
|
|
13681
13683
|
cursor: "pointer",
|
|
13682
13684
|
transition: "all 0.15s",
|
|
13683
13685
|
_hover: { color: "blue.500" },
|
|
13684
|
-
onClick:
|
|
13686
|
+
onClick: p,
|
|
13685
13687
|
children: "view"
|
|
13686
13688
|
}
|
|
13687
13689
|
),
|
|
13688
|
-
|
|
13690
|
+
h && /* @__PURE__ */ a(
|
|
13689
13691
|
f,
|
|
13690
13692
|
{
|
|
13691
13693
|
as: "button",
|
|
@@ -13701,7 +13703,7 @@ function l0({
|
|
|
13701
13703
|
cursor: "pointer",
|
|
13702
13704
|
transition: "all 0.15s",
|
|
13703
13705
|
_hover: { bg: "blue.600" },
|
|
13704
|
-
onClick:
|
|
13706
|
+
onClick: h,
|
|
13705
13707
|
children: "Consult Now"
|
|
13706
13708
|
}
|
|
13707
13709
|
)
|
|
@@ -13743,7 +13745,7 @@ function l0({
|
|
|
13743
13745
|
] })
|
|
13744
13746
|
] })
|
|
13745
13747
|
] }),
|
|
13746
|
-
|
|
13748
|
+
p && /* @__PURE__ */ a(
|
|
13747
13749
|
f,
|
|
13748
13750
|
{
|
|
13749
13751
|
as: "button",
|
|
@@ -13755,7 +13757,7 @@ function l0({
|
|
|
13755
13757
|
border: "none",
|
|
13756
13758
|
cursor: "pointer",
|
|
13757
13759
|
_hover: { color: "blue.500" },
|
|
13758
|
-
onClick:
|
|
13760
|
+
onClick: p,
|
|
13759
13761
|
pt: "1",
|
|
13760
13762
|
children: "View"
|
|
13761
13763
|
}
|
|
@@ -13783,7 +13785,7 @@ function l0({
|
|
|
13783
13785
|
/* @__PURE__ */ a(f, { fontSize: "sm", color: "text.muted", fontFamily: "var(--font-body)", children: "Consultation fee" }),
|
|
13784
13786
|
/* @__PURE__ */ a(f, { fontSize: "xl", fontWeight: "bold", color: "text.heading", fontFamily: "var(--font-heading)", children: l })
|
|
13785
13787
|
] }),
|
|
13786
|
-
|
|
13788
|
+
h && /* @__PURE__ */ a(
|
|
13787
13789
|
f,
|
|
13788
13790
|
{
|
|
13789
13791
|
as: "button",
|
|
@@ -13799,7 +13801,7 @@ function l0({
|
|
|
13799
13801
|
cursor: "pointer",
|
|
13800
13802
|
transition: "all 0.15s",
|
|
13801
13803
|
_hover: { bg: "blue.600" },
|
|
13802
|
-
onClick:
|
|
13804
|
+
onClick: h,
|
|
13803
13805
|
children: "Consult Now"
|
|
13804
13806
|
}
|
|
13805
13807
|
)
|
|
@@ -13892,7 +13894,7 @@ function l0({
|
|
|
13892
13894
|
/* @__PURE__ */ a(f, { fontSize: "xl", fontWeight: "bold", color: "text.heading", fontFamily: "var(--font-heading)", children: l })
|
|
13893
13895
|
] }),
|
|
13894
13896
|
/* @__PURE__ */ g(f, { display: "flex", gap: "3", alignItems: "center", children: [
|
|
13895
|
-
|
|
13897
|
+
p && /* @__PURE__ */ a(
|
|
13896
13898
|
f,
|
|
13897
13899
|
{
|
|
13898
13900
|
as: "button",
|
|
@@ -13909,11 +13911,11 @@ function l0({
|
|
|
13909
13911
|
cursor: "pointer",
|
|
13910
13912
|
transition: "all 0.15s",
|
|
13911
13913
|
_hover: { borderColor: "blue.400", color: "blue.500" },
|
|
13912
|
-
onClick:
|
|
13914
|
+
onClick: p,
|
|
13913
13915
|
children: "view"
|
|
13914
13916
|
}
|
|
13915
13917
|
),
|
|
13916
|
-
|
|
13918
|
+
h && /* @__PURE__ */ a(
|
|
13917
13919
|
f,
|
|
13918
13920
|
{
|
|
13919
13921
|
as: "button",
|
|
@@ -13929,7 +13931,7 @@ function l0({
|
|
|
13929
13931
|
cursor: "pointer",
|
|
13930
13932
|
transition: "all 0.15s",
|
|
13931
13933
|
_hover: { bg: "blue.600" },
|
|
13932
|
-
onClick:
|
|
13934
|
+
onClick: h,
|
|
13933
13935
|
children: "Consult Now"
|
|
13934
13936
|
}
|
|
13935
13937
|
)
|
|
@@ -13990,7 +13992,7 @@ function d0({
|
|
|
13990
13992
|
onJoin: u,
|
|
13991
13993
|
...d
|
|
13992
13994
|
}) {
|
|
13993
|
-
const
|
|
13995
|
+
const h = C1[i];
|
|
13994
13996
|
return /* @__PURE__ */ g(
|
|
13995
13997
|
f,
|
|
13996
13998
|
{
|
|
@@ -14022,9 +14024,9 @@ function d0({
|
|
|
14022
14024
|
/* @__PURE__ */ a(
|
|
14023
14025
|
ci,
|
|
14024
14026
|
{
|
|
14025
|
-
status:
|
|
14027
|
+
status: h.color,
|
|
14026
14028
|
size: "sm",
|
|
14027
|
-
children:
|
|
14029
|
+
children: h.label
|
|
14028
14030
|
}
|
|
14029
14031
|
)
|
|
14030
14032
|
] }),
|