@memobit/libs 1.0.70 → 1.0.72
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.css +1 -1
- package/dist/index.esm.js +529 -529
- package/dist/version.json +4 -4
- package/package.json +1 -1
package/dist/index.esm.js
CHANGED
|
@@ -10140,32 +10140,32 @@ var c1 = ({ title: t, position: r = "top", delay: c = 200, children: n, disabled
|
|
|
10140
10140
|
left: 0
|
|
10141
10141
|
}), u = F(null), g = F(null), v = F(null), w = F(null), f = F(!1), y = m !== void 0, b = y ? 150 : 0, C = () => {
|
|
10142
10142
|
if (!v.current || !w.current) return;
|
|
10143
|
-
const
|
|
10144
|
-
let N =
|
|
10143
|
+
const k = v.current.firstElementChild?.getBoundingClientRect();
|
|
10144
|
+
let N = k && k.width > 0 ? k : v.current.getBoundingClientRect();
|
|
10145
10145
|
if (N.width === 0 && N.height === 0) {
|
|
10146
10146
|
const J = document.createRange();
|
|
10147
10147
|
J.selectNodeContents(v.current);
|
|
10148
10148
|
const A = J.getBoundingClientRect();
|
|
10149
10149
|
(A.width > 0 || A.height > 0) && (N = A);
|
|
10150
10150
|
}
|
|
10151
|
-
const
|
|
10151
|
+
const M = w.current.getBoundingClientRect(), R = 8;
|
|
10152
10152
|
let H = 0, E = 0;
|
|
10153
10153
|
switch (r) {
|
|
10154
10154
|
case "top":
|
|
10155
|
-
H = N.top -
|
|
10155
|
+
H = N.top - M.height - R, E = N.left + N.width / 2 - M.width / 2;
|
|
10156
10156
|
break;
|
|
10157
10157
|
case "bottom":
|
|
10158
|
-
H = N.bottom + R, E = N.left + N.width / 2 -
|
|
10158
|
+
H = N.bottom + R, E = N.left + N.width / 2 - M.width / 2;
|
|
10159
10159
|
break;
|
|
10160
10160
|
case "left":
|
|
10161
|
-
H = N.top + N.height / 2 -
|
|
10161
|
+
H = N.top + N.height / 2 - M.height / 2, E = N.left - M.width - R;
|
|
10162
10162
|
break;
|
|
10163
10163
|
case "right":
|
|
10164
|
-
H = N.top + N.height / 2 -
|
|
10164
|
+
H = N.top + N.height / 2 - M.height / 2, E = N.right + R;
|
|
10165
10165
|
break;
|
|
10166
10166
|
}
|
|
10167
10167
|
const I = 8;
|
|
10168
|
-
E < I && (E = I), E +
|
|
10168
|
+
E < I && (E = I), E + M.width > window.innerWidth - I && (E = window.innerWidth - M.width - I), H < I && (H = I), H + M.height > window.innerHeight - I && (H = window.innerHeight - M.height - I), p({
|
|
10169
10169
|
top: H,
|
|
10170
10170
|
left: E
|
|
10171
10171
|
});
|
|
@@ -10175,23 +10175,23 @@ var c1 = ({ title: t, position: r = "top", delay: c = 200, children: n, disabled
|
|
|
10175
10175
|
}, c));
|
|
10176
10176
|
}, z = () => {
|
|
10177
10177
|
f.current || (u.current && clearTimeout(u.current), b > 0 ? g.current = setTimeout(() => i(!1), b) : i(!1));
|
|
10178
|
-
}, V = (
|
|
10179
|
-
|
|
10178
|
+
}, V = (k) => {
|
|
10179
|
+
k.pointerType !== "touch" && k.pointerType !== "pen" || s || (f.current = !0, u.current && (clearTimeout(u.current), u.current = null), k.stopPropagation(), i((N) => !N));
|
|
10180
10180
|
};
|
|
10181
10181
|
Y(() => (a && (C(), window.addEventListener("scroll", C, !0), window.addEventListener("resize", C)), () => {
|
|
10182
10182
|
window.removeEventListener("scroll", C, !0), window.removeEventListener("resize", C);
|
|
10183
10183
|
}), [a]), Y(() => {
|
|
10184
10184
|
if (!a) return;
|
|
10185
|
-
const
|
|
10185
|
+
const k = (N) => {
|
|
10186
10186
|
v.current?.contains(N.target) || w.current?.contains(N.target) || i(!1);
|
|
10187
10187
|
};
|
|
10188
|
-
return document.addEventListener("pointerdown",
|
|
10189
|
-
document.removeEventListener("pointerdown",
|
|
10188
|
+
return document.addEventListener("pointerdown", k), () => {
|
|
10189
|
+
document.removeEventListener("pointerdown", k), f.current = !1;
|
|
10190
10190
|
};
|
|
10191
10191
|
}, [a]), Y(() => () => {
|
|
10192
10192
|
u.current && clearTimeout(u.current), g.current && clearTimeout(g.current);
|
|
10193
10193
|
}, []);
|
|
10194
|
-
const
|
|
10194
|
+
const x = () => {
|
|
10195
10195
|
y && g.current && (clearTimeout(g.current), g.current = null);
|
|
10196
10196
|
}, _ = () => {
|
|
10197
10197
|
y && (g.current = setTimeout(() => i(!1), b));
|
|
@@ -10214,7 +10214,7 @@ var c1 = ({ title: t, position: r = "top", delay: c = 200, children: n, disabled
|
|
|
10214
10214
|
...o !== void 0 && { maxWidth: typeof o == "number" ? `${o}px` : o },
|
|
10215
10215
|
...m !== void 0 && { maxHeight: typeof m == "number" ? `${m}px` : m }
|
|
10216
10216
|
},
|
|
10217
|
-
onMouseEnter:
|
|
10217
|
+
onMouseEnter: x,
|
|
10218
10218
|
onMouseLeave: _,
|
|
10219
10219
|
children: [t, /* @__PURE__ */ e("div", { className: `tooltip__arrow tooltip__arrow--${r}` })]
|
|
10220
10220
|
}), document.body)] });
|
|
@@ -10384,7 +10384,7 @@ var c1 = ({ title: t, position: r = "top", delay: c = 200, children: n, disabled
|
|
|
10384
10384
|
t.hours,
|
|
10385
10385
|
t.minutes,
|
|
10386
10386
|
t.seconds
|
|
10387
|
-
]),
|
|
10387
|
+
]), x = l1(() => y === "hours" ? {
|
|
10388
10388
|
degrees: t.hours % 12 * 30,
|
|
10389
10389
|
radius: c === "24h" && nc(t.hours) ? C.innerRadius : C.outerRadius
|
|
10390
10390
|
} : {
|
|
@@ -10398,7 +10398,7 @@ var c1 = ({ title: t, position: r = "top", delay: c = 200, children: n, disabled
|
|
|
10398
10398
|
t.hours,
|
|
10399
10399
|
t.minutes,
|
|
10400
10400
|
t.seconds
|
|
10401
|
-
]), _ = T0(C.center,
|
|
10401
|
+
]), _ = T0(C.center, x.radius, x.degrees), k = (S, $) => {
|
|
10402
10402
|
const e1 = w.current?.getBoundingClientRect();
|
|
10403
10403
|
if (!e1 || e1.width === 0) return;
|
|
10404
10404
|
const O = o / e1.width, Z = (S - e1.left) * O - C.center, W = ($ - e1.top) * O - C.center, X = Math.sqrt(Z * Z + W * W);
|
|
@@ -10427,9 +10427,9 @@ var c1 = ({ title: t, position: r = "top", delay: c = 200, children: n, disabled
|
|
|
10427
10427
|
seconds: C1
|
|
10428
10428
|
};
|
|
10429
10429
|
}, N = (S) => {
|
|
10430
|
-
const $ =
|
|
10430
|
+
const $ = k(S.clientX, S.clientY);
|
|
10431
10431
|
$ && r($);
|
|
10432
|
-
},
|
|
10432
|
+
}, M = (S) => {
|
|
10433
10433
|
m || (f.current = !0, S.currentTarget.setPointerCapture(S.pointerId), N(S));
|
|
10434
10434
|
}, R = (S) => {
|
|
10435
10435
|
m || !f.current || N(S);
|
|
@@ -10539,7 +10539,7 @@ var c1 = ({ title: t, position: r = "top", delay: c = 200, children: n, disabled
|
|
|
10539
10539
|
height: o,
|
|
10540
10540
|
viewBox: `0 0 ${o} ${o}`,
|
|
10541
10541
|
tabIndex: m ? -1 : 0,
|
|
10542
|
-
onPointerDown:
|
|
10542
|
+
onPointerDown: M,
|
|
10543
10543
|
onPointerMove: R,
|
|
10544
10544
|
onPointerUp: H,
|
|
10545
10545
|
onKeyDown: I,
|
|
@@ -10597,43 +10597,43 @@ var c1 = ({ title: t, position: r = "top", delay: c = 200, children: n, disabled
|
|
|
10597
10597
|
x: G1 + r * Math.sin(Z2(t)),
|
|
10598
10598
|
y: G1 - r * Math.cos(Z2(t))
|
|
10599
10599
|
}), Pa = ({ disabled: t = !1, label: r, max: c = r2, min: n = 0, onChange: s, size: d = 120, step: o = 1, tickStep: m = 45, keyboardStep: a, showValue: i = !0, value: h, variant: p = "accent" }) => {
|
|
10600
|
-
const u = F(null), g = F(!1), v = Math.max(1, c - n), w = D((
|
|
10601
|
-
const N = o > 0 ? Math.round(
|
|
10600
|
+
const u = F(null), g = F(!1), v = Math.max(1, c - n), w = D((k) => {
|
|
10601
|
+
const N = o > 0 ? Math.round(k / o) * o : k;
|
|
10602
10602
|
return Math.min(c, Math.max(n, N));
|
|
10603
10603
|
}, [
|
|
10604
10604
|
c,
|
|
10605
10605
|
n,
|
|
10606
10606
|
o
|
|
10607
|
-
]), f = D((
|
|
10608
|
-
const
|
|
10609
|
-
if (!
|
|
10610
|
-
const R =
|
|
10607
|
+
]), f = D((k, N) => {
|
|
10608
|
+
const M = u.current;
|
|
10609
|
+
if (!M) return null;
|
|
10610
|
+
const R = M.getBoundingClientRect(), H = k - (R.left + R.width / 2), E = N - (R.top + R.height / 2);
|
|
10611
10611
|
return H === 0 && E === 0 ? null : (Math.atan2(H, -E) * 180 / Math.PI + r2) % r2;
|
|
10612
|
-
}, []), y = D((
|
|
10613
|
-
const
|
|
10614
|
-
|
|
10612
|
+
}, []), y = D((k, N) => {
|
|
10613
|
+
const M = f(k, N);
|
|
10614
|
+
M !== null && s(w(M));
|
|
10615
10615
|
}, [
|
|
10616
10616
|
f,
|
|
10617
10617
|
w,
|
|
10618
10618
|
s
|
|
10619
|
-
]), b = D((
|
|
10620
|
-
t || (
|
|
10621
|
-
}, [t, y]), C = D((
|
|
10622
|
-
!g.current || t || y(
|
|
10623
|
-
}, [t, y]), L = D((
|
|
10624
|
-
g.current && (
|
|
10625
|
-
}, []), z = D((
|
|
10619
|
+
]), b = D((k) => {
|
|
10620
|
+
t || (k.preventDefault(), k.currentTarget.setPointerCapture(k.pointerId), g.current = !0, y(k.clientX, k.clientY));
|
|
10621
|
+
}, [t, y]), C = D((k) => {
|
|
10622
|
+
!g.current || t || y(k.clientX, k.clientY);
|
|
10623
|
+
}, [t, y]), L = D((k) => {
|
|
10624
|
+
g.current && (k.currentTarget.releasePointerCapture(k.pointerId), g.current = !1);
|
|
10625
|
+
}, []), z = D((k) => {
|
|
10626
10626
|
if (t) return;
|
|
10627
|
-
const N = a ?? (o > 0 ? o : 1),
|
|
10628
|
-
if (
|
|
10629
|
-
|
|
10627
|
+
const N = a ?? (o > 0 ? o : 1), M = k.key === "PageUp" ? N * 10 : k.key === "PageDown" ? -N * 10 : 0, R = k.key === "ArrowRight" || k.key === "ArrowUp" ? N : k.key === "ArrowLeft" || k.key === "ArrowDown" ? -N : 0;
|
|
10628
|
+
if (k.key === "Home") {
|
|
10629
|
+
k.preventDefault(), s(n);
|
|
10630
10630
|
return;
|
|
10631
10631
|
}
|
|
10632
|
-
if (
|
|
10633
|
-
|
|
10632
|
+
if (k.key === "End") {
|
|
10633
|
+
k.preventDefault(), s(c);
|
|
10634
10634
|
return;
|
|
10635
10635
|
}
|
|
10636
|
-
|
|
10636
|
+
M === 0 && R === 0 || (k.preventDefault(), s(w(h + M + R)));
|
|
10637
10637
|
}, [
|
|
10638
10638
|
w,
|
|
10639
10639
|
t,
|
|
@@ -10645,14 +10645,14 @@ var c1 = ({ title: t, position: r = "top", delay: c = 200, children: n, disabled
|
|
|
10645
10645
|
h
|
|
10646
10646
|
]), V = l1(() => {
|
|
10647
10647
|
if (!m || m <= 0) return [];
|
|
10648
|
-
const
|
|
10649
|
-
for (let N = n; N < n + v; N += m)
|
|
10650
|
-
return
|
|
10648
|
+
const k = [];
|
|
10649
|
+
for (let N = n; N < n + v; N += m) k.push(N);
|
|
10650
|
+
return k;
|
|
10651
10651
|
}, [
|
|
10652
10652
|
n,
|
|
10653
10653
|
v,
|
|
10654
10654
|
m
|
|
10655
|
-
]),
|
|
10655
|
+
]), x = (Math.min(c, Math.max(n, h)) - n) / v, _ = c2(h, p0);
|
|
10656
10656
|
return /* @__PURE__ */ l("div", {
|
|
10657
10657
|
className: [
|
|
10658
10658
|
"angle-slider",
|
|
@@ -10677,22 +10677,22 @@ var c1 = ({ title: t, position: r = "top", delay: c = 200, children: n, disabled
|
|
|
10677
10677
|
cy: G1,
|
|
10678
10678
|
r: p0
|
|
10679
10679
|
}),
|
|
10680
|
-
V.map((
|
|
10681
|
-
const N = c2(
|
|
10680
|
+
V.map((k) => {
|
|
10681
|
+
const N = c2(k, p0), M = c2(k, p0 - 6);
|
|
10682
10682
|
return /* @__PURE__ */ e("line", {
|
|
10683
10683
|
className: "angle-slider__tick",
|
|
10684
|
-
x1:
|
|
10684
|
+
x1: M.x,
|
|
10685
10685
|
x2: N.x,
|
|
10686
|
-
y1:
|
|
10686
|
+
y1: M.y,
|
|
10687
10687
|
y2: N.y
|
|
10688
|
-
},
|
|
10688
|
+
}, k);
|
|
10689
10689
|
}),
|
|
10690
10690
|
/* @__PURE__ */ e("circle", {
|
|
10691
10691
|
className: "angle-slider__progress",
|
|
10692
10692
|
cx: G1,
|
|
10693
10693
|
cy: G1,
|
|
10694
10694
|
r: p0,
|
|
10695
|
-
strokeDasharray: `${G2 *
|
|
10695
|
+
strokeDasharray: `${G2 * x} ${G2}`,
|
|
10696
10696
|
transform: `rotate(-90 ${G1} ${G1})`
|
|
10697
10697
|
}),
|
|
10698
10698
|
/* @__PURE__ */ e("line", {
|
|
@@ -11451,7 +11451,7 @@ var Ia = ({ name: t, size: r = "medium", shape: c = "rounded", className: n = ""
|
|
|
11451
11451
|
}), [y, b] = B("days"), [C, L] = B(() => {
|
|
11452
11452
|
const G = (h ?? w).getFullYear();
|
|
11453
11453
|
return Math.floor(G / e0) * e0;
|
|
11454
|
-
}), [z, V] = B(null),
|
|
11454
|
+
}), [z, V] = B(null), x = h ?? w, _ = g ?? z, k = l1(() => k3(x.getFullYear(), x.getMonth(), o), [x, o]), N = o === 1 ? bc : _c, M = (G) => n && l2(G, n) || s && yc(G, s) ? !0 : d ? typeof d == "function" ? d(G) : d.some((K) => Z1(K, G)) : !1, R = (G) => {
|
|
11455
11455
|
if (!t) return !1;
|
|
11456
11456
|
if (c === "single" && t instanceof Date) return Z1(G, t);
|
|
11457
11457
|
if (c === "range") {
|
|
@@ -11465,8 +11465,8 @@ var Ia = ({ name: t, size: r = "medium", shape: c = "rounded", className: n = ""
|
|
|
11465
11465
|
return v1 > K.getTime() && v1 < h1.getTime();
|
|
11466
11466
|
}
|
|
11467
11467
|
return !1;
|
|
11468
|
-
}, E = (G) => c === "range" && _ ? G.getTime() > _.getTime() : !1, I = (G) => G.getMonth() ===
|
|
11469
|
-
if (!
|
|
11468
|
+
}, E = (G) => c === "range" && _ ? G.getTime() > _.getTime() : !1, I = (G) => G.getMonth() === x.getMonth(), J = (G) => {
|
|
11469
|
+
if (!M(G)) {
|
|
11470
11470
|
if (c === "single") r?.(G);
|
|
11471
11471
|
else if (c === "range") if (!_) v ? v(G) : (V(G), r?.(void 0));
|
|
11472
11472
|
else {
|
|
@@ -11485,10 +11485,10 @@ var Ia = ({ name: t, size: r = "medium", shape: c = "rounded", className: n = ""
|
|
|
11485
11485
|
}
|
|
11486
11486
|
}
|
|
11487
11487
|
}, A = () => {
|
|
11488
|
-
const G = y0(
|
|
11488
|
+
const G = y0(x, -1);
|
|
11489
11489
|
p ? p(G) : f(G);
|
|
11490
11490
|
}, T = () => {
|
|
11491
|
-
const G = y0(
|
|
11491
|
+
const G = y0(x, 1);
|
|
11492
11492
|
p ? p(G) : f(G);
|
|
11493
11493
|
}, S = () => {
|
|
11494
11494
|
const G = /* @__PURE__ */ new Date(), K = new Date(G.getFullYear(), G.getMonth(), 1);
|
|
@@ -11496,22 +11496,22 @@ var Ia = ({ name: t, size: r = "medium", shape: c = "rounded", className: n = ""
|
|
|
11496
11496
|
}, $ = () => {
|
|
11497
11497
|
u && b("months");
|
|
11498
11498
|
}, e1 = () => {
|
|
11499
|
-
u && (L(Math.floor(
|
|
11499
|
+
u && (L(Math.floor(x.getFullYear() / e0) * e0), b("years"));
|
|
11500
11500
|
}, O = (G) => {
|
|
11501
|
-
const K = new Date(
|
|
11501
|
+
const K = new Date(x.getFullYear(), G, 1);
|
|
11502
11502
|
p ? p(K) : f(K), b("days");
|
|
11503
11503
|
}, Z = (G) => {
|
|
11504
|
-
const K = new Date(G,
|
|
11504
|
+
const K = new Date(G, x.getMonth(), 1);
|
|
11505
11505
|
p ? p(K) : f(K), b("months");
|
|
11506
11506
|
}, W = () => {
|
|
11507
11507
|
L(C - e0);
|
|
11508
11508
|
}, X = () => {
|
|
11509
11509
|
L(C + e0);
|
|
11510
11510
|
}, m1 = () => {
|
|
11511
|
-
const G = new Date(
|
|
11511
|
+
const G = new Date(x.getFullYear() - 1, x.getMonth(), 1);
|
|
11512
11512
|
p ? p(G) : f(G);
|
|
11513
11513
|
}, t1 = () => {
|
|
11514
|
-
const G = new Date(
|
|
11514
|
+
const G = new Date(x.getFullYear() + 1, x.getMonth(), 1);
|
|
11515
11515
|
p ? p(G) : f(G);
|
|
11516
11516
|
}, C1 = () => {
|
|
11517
11517
|
const G = [];
|
|
@@ -11519,7 +11519,7 @@ var Ia = ({ name: t, size: r = "medium", shape: c = "rounded", className: n = ""
|
|
|
11519
11519
|
return G;
|
|
11520
11520
|
}, f1 = (G) => {
|
|
11521
11521
|
const K = ["calendar__day"];
|
|
11522
|
-
return I(G) ? (R(G) && K.push("calendar__day--selected"), H(G) && K.push("calendar__day--in-range"), E(G) && K.push("calendar__day--hover-range")) : K.push("calendar__day--other-month"), j0(G) && K.push("calendar__day--today"), M2(G) && K.push("calendar__day--weekend"),
|
|
11522
|
+
return I(G) ? (R(G) && K.push("calendar__day--selected"), H(G) && K.push("calendar__day--in-range"), E(G) && K.push("calendar__day--hover-range")) : K.push("calendar__day--other-month"), j0(G) && K.push("calendar__day--today"), M2(G) && K.push("calendar__day--weekend"), M(G) && K.push("calendar__day--disabled"), K.join(" ");
|
|
11523
11523
|
}, A1 = () => y === "years" ? /* @__PURE__ */ l("div", {
|
|
11524
11524
|
className: "calendar__header",
|
|
11525
11525
|
children: [
|
|
@@ -11566,7 +11566,7 @@ var Ia = ({ name: t, size: r = "medium", shape: c = "rounded", className: n = ""
|
|
|
11566
11566
|
type: "button",
|
|
11567
11567
|
className: "calendar__header-button",
|
|
11568
11568
|
onClick: e1,
|
|
11569
|
-
children:
|
|
11569
|
+
children: x.getFullYear()
|
|
11570
11570
|
}),
|
|
11571
11571
|
/* @__PURE__ */ e(c1, {
|
|
11572
11572
|
title: "Next year",
|
|
@@ -11594,17 +11594,17 @@ var Ia = ({ name: t, size: r = "medium", shape: c = "rounded", className: n = ""
|
|
|
11594
11594
|
className: "calendar__month-year",
|
|
11595
11595
|
children: a ? /* @__PURE__ */ e("span", {
|
|
11596
11596
|
className: "calendar__header-label",
|
|
11597
|
-
children: n2[
|
|
11597
|
+
children: n2[x.getMonth()]
|
|
11598
11598
|
}) : /* @__PURE__ */ l(d1, { children: [/* @__PURE__ */ e("button", {
|
|
11599
11599
|
type: "button",
|
|
11600
11600
|
className: "calendar__header-button",
|
|
11601
11601
|
onClick: $,
|
|
11602
|
-
children: n2[
|
|
11602
|
+
children: n2[x.getMonth()]
|
|
11603
11603
|
}), /* @__PURE__ */ e("button", {
|
|
11604
11604
|
type: "button",
|
|
11605
11605
|
className: "calendar__header-button",
|
|
11606
11606
|
onClick: e1,
|
|
11607
|
-
children:
|
|
11607
|
+
children: x.getFullYear()
|
|
11608
11608
|
})] })
|
|
11609
11609
|
}),
|
|
11610
11610
|
/* @__PURE__ */ e(c1, {
|
|
@@ -11618,7 +11618,7 @@ var Ia = ({ name: t, size: r = "medium", shape: c = "rounded", className: n = ""
|
|
|
11618
11618
|
})
|
|
11619
11619
|
]
|
|
11620
11620
|
}), a1 = () => {
|
|
11621
|
-
const G = C1(), K = (/* @__PURE__ */ new Date()).getFullYear(), h1 =
|
|
11621
|
+
const G = C1(), K = (/* @__PURE__ */ new Date()).getFullYear(), h1 = x.getFullYear();
|
|
11622
11622
|
return /* @__PURE__ */ e("div", {
|
|
11623
11623
|
className: "calendar__years-grid",
|
|
11624
11624
|
children: G.map((v1) => /* @__PURE__ */ e("button", {
|
|
@@ -11629,12 +11629,12 @@ var Ia = ({ name: t, size: r = "medium", shape: c = "rounded", className: n = ""
|
|
|
11629
11629
|
}, v1))
|
|
11630
11630
|
});
|
|
11631
11631
|
}, u1 = () => {
|
|
11632
|
-
const G = (/* @__PURE__ */ new Date()).getMonth(), K = (/* @__PURE__ */ new Date()).getFullYear(), h1 =
|
|
11632
|
+
const G = (/* @__PURE__ */ new Date()).getMonth(), K = (/* @__PURE__ */ new Date()).getFullYear(), h1 = x.getMonth(), v1 = x.getFullYear();
|
|
11633
11633
|
return /* @__PURE__ */ e("div", {
|
|
11634
11634
|
className: "calendar__months-grid",
|
|
11635
11635
|
children: n2.map((k1, M1) => /* @__PURE__ */ e("button", {
|
|
11636
11636
|
type: "button",
|
|
11637
|
-
className: `calendar__month-item ${M1 === h1 && v1 ===
|
|
11637
|
+
className: `calendar__month-item ${M1 === h1 && v1 === x.getFullYear() ? "calendar__month-item--selected" : ""} ${M1 === G && K === x.getFullYear() ? "calendar__month-item--current" : ""}`,
|
|
11638
11638
|
onClick: () => O(M1),
|
|
11639
11639
|
children: k1.substring(0, 3)
|
|
11640
11640
|
}, k1))
|
|
@@ -11665,13 +11665,13 @@ var Ia = ({ name: t, size: r = "medium", shape: c = "rounded", className: n = ""
|
|
|
11665
11665
|
}),
|
|
11666
11666
|
/* @__PURE__ */ e("div", {
|
|
11667
11667
|
className: "calendar__days",
|
|
11668
|
-
children:
|
|
11668
|
+
children: k.map((G, K) => /* @__PURE__ */ e("div", {
|
|
11669
11669
|
className: "calendar__week",
|
|
11670
11670
|
children: G.map((h1, v1) => /* @__PURE__ */ e("button", {
|
|
11671
11671
|
type: "button",
|
|
11672
11672
|
className: f1(h1),
|
|
11673
11673
|
onClick: () => J(h1),
|
|
11674
|
-
disabled:
|
|
11674
|
+
disabled: M(h1),
|
|
11675
11675
|
title: h1.toDateString(),
|
|
11676
11676
|
children: h1.getDate()
|
|
11677
11677
|
}, v1))
|
|
@@ -11850,8 +11850,8 @@ var Ia = ({ name: t, size: r = "medium", shape: c = "rounded", className: n = ""
|
|
|
11850
11850
|
]
|
|
11851
11851
|
}), li = ({ children: t, className: r = "", defaultCollapsed: c = !1, icon: n, isCollapsed: s, onToggle: d, rightDetails: o, title: m, toggleAccent: a, toggleHighlight: i, toggleMiddleIcon: h, toggleSize: p, toggleSpaceBetween: u, toggleSwap: g, toggleTint: v = "plain", toggleVariant: w, withCard: f = !1 }) => {
|
|
11852
11852
|
const [y, b] = B(c), C = s !== void 0, L = C ? s : y, z = () => {
|
|
11853
|
-
const
|
|
11854
|
-
C || b(
|
|
11853
|
+
const x = !L;
|
|
11854
|
+
C || b(x), d?.(x);
|
|
11855
11855
|
}, V = !!o;
|
|
11856
11856
|
return /* @__PURE__ */ l("div", {
|
|
11857
11857
|
className: `collapsible-section ${f ? "collapsible-section--with-card" : ""} ${r} ${L ? "collapsible-section__collapsed" : ""}`,
|
|
@@ -12452,28 +12452,28 @@ var Ia = ({ name: t, size: r = "medium", shape: c = "rounded", className: n = ""
|
|
|
12452
12452
|
} else n === "fireworks" && (C = Array.from({ length: b }, () => U2(w, f, y)));
|
|
12453
12453
|
const L = (z) => {
|
|
12454
12454
|
if (!i.current) return;
|
|
12455
|
-
const V = z - a.current,
|
|
12456
|
-
if (v.clearRect(0, 0, w, f), n === "confetti" ? (
|
|
12457
|
-
_.x += _.vx, _.y += _.vy, _.vy += 0.08, _.vx += (Math.random() - 0.5) * 0.1, _.angle += _.spin,
|
|
12455
|
+
const V = z - a.current, x = Math.min(V / r, 1);
|
|
12456
|
+
if (v.clearRect(0, 0, w, f), n === "confetti" ? (x < 0.6 && Math.random() < 0.3 && C.push(F2(w, f, y)), C = C.filter((_) => _.opacity > 0 && _.y < f + 20), C.forEach((_) => {
|
|
12457
|
+
_.x += _.vx, _.y += _.vy, _.vy += 0.08, _.vx += (Math.random() - 0.5) * 0.1, _.angle += _.spin, x > 0.6 && (_.opacity -= 0.015), o2(v, _);
|
|
12458
12458
|
})) : n === "burst" ? (C = C.filter((_) => _.opacity > 0), C.forEach((_) => {
|
|
12459
12459
|
_.x += _.vx, _.y += _.vy, _.vy += 0.15, _.vx *= 0.98, _.angle += _.spin, _.opacity -= 0.012, o2(v, _);
|
|
12460
|
-
})) : n === "fireworks" && (
|
|
12460
|
+
})) : n === "fireworks" && (x < 0.85 && Math.random() < 0.04 && C.push(U2(w, f, y)), C = C.filter((_) => _.exploded ? _.children?.some((k) => k.opacity > 0) ?? !1 : _.y > -f * 0.1), C.forEach((_) => {
|
|
12461
12461
|
if (_.exploded)
|
|
12462
|
-
_.children?.forEach((
|
|
12463
|
-
|
|
12462
|
+
_.children?.forEach((k) => {
|
|
12463
|
+
k.x += k.vx, k.y += k.vy, k.vy += 0.06, k.vx *= 0.97, k.angle += k.spin, k.opacity -= 0.014, o2(v, k);
|
|
12464
12464
|
});
|
|
12465
12465
|
else if (_.trail?.push({
|
|
12466
12466
|
x: _.x,
|
|
12467
12467
|
y: _.y
|
|
12468
|
-
}), (_.trail?.length ?? 0) > 12 && _.trail?.shift(), _.trail?.forEach((
|
|
12469
|
-
const
|
|
12470
|
-
v.save(), v.globalAlpha =
|
|
12468
|
+
}), (_.trail?.length ?? 0) > 12 && _.trail?.shift(), _.trail?.forEach((k, N) => {
|
|
12469
|
+
const M = (N + 1) / (_.trail?.length ?? 1) * 0.6;
|
|
12470
|
+
v.save(), v.globalAlpha = M, v.fillStyle = _.color, v.beginPath(), v.arc(k.x, k.y, 2, 0, Math.PI * 2), v.fill(), v.restore();
|
|
12471
12471
|
}), v.save(), v.globalAlpha = 1, v.fillStyle = _.color, v.beginPath(), v.arc(_.x, _.y, 3, 0, Math.PI * 2), v.fill(), v.restore(), _.x += _.vx, _.y += _.vy, _.vy += 0.18, _.vy >= 0) {
|
|
12472
12472
|
_.exploded = !0;
|
|
12473
|
-
const
|
|
12474
|
-
_.children = Array.from({ length:
|
|
12473
|
+
const k = 60 + Math.floor(Math.random() * 40);
|
|
12474
|
+
_.children = Array.from({ length: k }, () => Sc(_.x, _.y, y)), v.save(), v.globalAlpha = 0.8, v.fillStyle = "#ffffff", v.beginPath(), v.arc(_.x, _.y, 12, 0, Math.PI * 2), v.fill(), v.restore();
|
|
12475
12475
|
}
|
|
12476
|
-
})),
|
|
12476
|
+
})), x >= 1 || C.length === 0) {
|
|
12477
12477
|
p();
|
|
12478
12478
|
return;
|
|
12479
12479
|
}
|
|
@@ -12560,7 +12560,7 @@ var Ia = ({ name: t, size: r = "medium", shape: c = "rounded", className: n = ""
|
|
|
12560
12560
|
const p = n.getBoundingClientRect(), u = o.current.getBoundingClientRect(), g = {
|
|
12561
12561
|
width: window.innerWidth,
|
|
12562
12562
|
height: window.innerHeight
|
|
12563
|
-
}, v = (
|
|
12563
|
+
}, v = (x, _) => x >= R1 && _ >= R1 && x + u.height <= g.height - R1 && _ + u.width <= g.width - R1, w = {
|
|
12564
12564
|
bottom: {
|
|
12565
12565
|
top: p.bottom + s,
|
|
12566
12566
|
left: p.left + (p.width - u.width) / 2
|
|
@@ -12585,20 +12585,20 @@ var Ia = ({ name: t, size: r = "medium", shape: c = "rounded", className: n = ""
|
|
|
12585
12585
|
"top",
|
|
12586
12586
|
"right",
|
|
12587
12587
|
"left"
|
|
12588
|
-
].find((
|
|
12589
|
-
const _ = w[
|
|
12588
|
+
].find((x) => {
|
|
12589
|
+
const _ = w[x];
|
|
12590
12590
|
return v(_.top, _.left);
|
|
12591
12591
|
}) || "bottom", { top: y, left: b } = w[f];
|
|
12592
12592
|
else {
|
|
12593
|
-
const
|
|
12594
|
-
v(
|
|
12593
|
+
const x = w[d];
|
|
12594
|
+
v(x.top, x.left) ? (f = d, { top: y, left: b } = x) : (f = [
|
|
12595
12595
|
"bottom",
|
|
12596
12596
|
"top",
|
|
12597
12597
|
"right",
|
|
12598
12598
|
"left"
|
|
12599
12599
|
].filter((_) => _ !== d).find((_) => {
|
|
12600
|
-
const
|
|
12601
|
-
return v(
|
|
12600
|
+
const k = w[_];
|
|
12601
|
+
return v(k.top, k.left);
|
|
12602
12602
|
}) || d, { top: y, left: b } = w[f]);
|
|
12603
12603
|
}
|
|
12604
12604
|
(f === "top" || f === "bottom") && (b < R1 && (b = R1), b + u.width > g.width - R1 && (b = g.width - u.width - R1)), (f === "left" || f === "right") && (y < R1 && (y = R1), y + u.height > g.height - R1 && (y = g.height - u.height - R1));
|
|
@@ -13067,10 +13067,10 @@ var Ia = ({ name: t, size: r = "medium", shape: c = "rounded", className: n = ""
|
|
|
13067
13067
|
hours: 0,
|
|
13068
13068
|
minutes: 0,
|
|
13069
13069
|
seconds: 0
|
|
13070
|
-
}), [L, z] = B(null), [V,
|
|
13070
|
+
}), [L, z] = B(null), [V, x] = B({
|
|
13071
13071
|
position: "fixed",
|
|
13072
13072
|
visibility: "hidden"
|
|
13073
|
-
}), _ = F(null),
|
|
13073
|
+
}), _ = F(null), k = F(null);
|
|
13074
13074
|
Y(() => {
|
|
13075
13075
|
n && t instanceof Date && C({
|
|
13076
13076
|
hours: t.getHours(),
|
|
@@ -13082,14 +13082,14 @@ var Ia = ({ name: t, size: r = "medium", shape: c = "rounded", className: n = ""
|
|
|
13082
13082
|
Y(() => {
|
|
13083
13083
|
if (v) return;
|
|
13084
13084
|
const S = ($) => {
|
|
13085
|
-
N && _.current &&
|
|
13085
|
+
N && _.current && k.current && !_.current.contains($.target) && !k.current.contains($.target) && (z(null), y(!1));
|
|
13086
13086
|
};
|
|
13087
13087
|
return document.addEventListener("mousedown", S), () => document.removeEventListener("mousedown", S);
|
|
13088
13088
|
}, [v, N]);
|
|
13089
|
-
const
|
|
13090
|
-
if (v || !N || !_.current || !
|
|
13091
|
-
const S = _.current.getBoundingClientRect(), $ =
|
|
13092
|
-
|
|
13089
|
+
const M = D(() => {
|
|
13090
|
+
if (v || !N || !_.current || !k.current) return;
|
|
13091
|
+
const S = _.current.getBoundingClientRect(), $ = k.current.getBoundingClientRect(), e1 = 16, O = 8, Z = window.innerHeight - S.bottom - e1, W = S.top - e1, X = Z < $.height && W > $.height ? S.top - $.height - O : S.bottom + O, m1 = Math.max(e1, Math.min(X, window.innerHeight - $.height - e1)), t1 = Math.max(e1, Math.min(S.left, window.innerWidth - $.width - e1));
|
|
13092
|
+
x({
|
|
13093
13093
|
position: "fixed",
|
|
13094
13094
|
top: `${m1}px`,
|
|
13095
13095
|
left: `${t1}px`,
|
|
@@ -13098,22 +13098,22 @@ var Ia = ({ name: t, size: r = "medium", shape: c = "rounded", className: n = ""
|
|
|
13098
13098
|
}, [v, N]);
|
|
13099
13099
|
Y(() => {
|
|
13100
13100
|
if (v || !N) {
|
|
13101
|
-
|
|
13101
|
+
x({
|
|
13102
13102
|
position: "fixed",
|
|
13103
13103
|
visibility: "hidden"
|
|
13104
13104
|
});
|
|
13105
13105
|
return;
|
|
13106
13106
|
}
|
|
13107
|
-
const S = requestAnimationFrame(() => requestAnimationFrame(
|
|
13108
|
-
window.addEventListener("resize",
|
|
13109
|
-
const $ = new ResizeObserver(() =>
|
|
13110
|
-
return
|
|
13111
|
-
cancelAnimationFrame(S), $.disconnect(), window.removeEventListener("resize",
|
|
13107
|
+
const S = requestAnimationFrame(() => requestAnimationFrame(M));
|
|
13108
|
+
window.addEventListener("resize", M), window.addEventListener("scroll", M, !0);
|
|
13109
|
+
const $ = new ResizeObserver(() => M());
|
|
13110
|
+
return k.current && $.observe(k.current), () => {
|
|
13111
|
+
cancelAnimationFrame(S), $.disconnect(), window.removeEventListener("resize", M), window.removeEventListener("scroll", M, !0);
|
|
13112
13112
|
};
|
|
13113
13113
|
}, [
|
|
13114
13114
|
v,
|
|
13115
13115
|
N,
|
|
13116
|
-
|
|
13116
|
+
M
|
|
13117
13117
|
]);
|
|
13118
13118
|
const R = () => {
|
|
13119
13119
|
if (!t) return "";
|
|
@@ -13183,11 +13183,11 @@ var Ia = ({ name: t, size: r = "medium", shape: c = "rounded", className: n = ""
|
|
|
13183
13183
|
})]
|
|
13184
13184
|
})]
|
|
13185
13185
|
}), N && (v ? /* @__PURE__ */ e("div", {
|
|
13186
|
-
ref:
|
|
13186
|
+
ref: k,
|
|
13187
13187
|
className: "datepicker__dropdown datepicker__dropdown--inline",
|
|
13188
13188
|
children: T()
|
|
13189
13189
|
}) : q1(/* @__PURE__ */ l("div", {
|
|
13190
|
-
ref:
|
|
13190
|
+
ref: k,
|
|
13191
13191
|
className: "datepicker__dropdown",
|
|
13192
13192
|
style: V,
|
|
13193
13193
|
children: [/* @__PURE__ */ e("button", {
|
|
@@ -13209,8 +13209,8 @@ var Ia = ({ name: t, size: r = "medium", shape: c = "rounded", className: n = ""
|
|
|
13209
13209
|
o < c.length && (d++, o++);
|
|
13210
13210
|
}
|
|
13211
13211
|
return d / n.length >= s;
|
|
13212
|
-
}, D0 = ({ allowCustomValue: t = !1, autofocus: r = !1, className: c = "", disabled: n = !1, error: s, highlighted: d = !1, id: o, label: m, maxVisibleSelectedLabels: a = 1, multilineChips: i = !1, multiple: h = !1, name: p, onChange: u, onSearchChange: g, options: v, placeholder: w = "Select an option", searchable: f = !0, searchValue: y, selectedCountDisplay: b = "inline", showChips: C = !1, sortSelectedFirst: L = !1, success: z, usePortal: V = !0, value:
|
|
13213
|
-
const [
|
|
13212
|
+
}, D0 = ({ allowCustomValue: t = !1, autofocus: r = !1, className: c = "", disabled: n = !1, error: s, highlighted: d = !1, id: o, label: m, maxVisibleSelectedLabels: a = 1, multilineChips: i = !1, multiple: h = !1, name: p, onChange: u, onSearchChange: g, options: v, placeholder: w = "Select an option", searchable: f = !0, searchValue: y, selectedCountDisplay: b = "inline", showChips: C = !1, sortSelectedFirst: L = !1, success: z, usePortal: V = !0, value: x, valueAsChip: _ = !0 }) => {
|
|
13213
|
+
const [k, N] = B(!1), [M, R] = B(y || ""), [H, E] = B(v), [I, J] = B(-1), [A, T] = B([]), [S, $] = B({
|
|
13214
13214
|
top: 0,
|
|
13215
13215
|
bottom: 0,
|
|
13216
13216
|
left: 0,
|
|
@@ -13218,73 +13218,73 @@ var Ia = ({ name: t, size: r = "medium", shape: c = "rounded", className: n = ""
|
|
|
13218
13218
|
maxHeight: 300
|
|
13219
13219
|
}), [e1, O] = B(!1), Z = F(null), W = F([]), X = F(null), m1 = F(null), t1 = $0(), C1 = o ?? `dropdown-${t1}`, f1 = F(null);
|
|
13220
13220
|
Y(() => {
|
|
13221
|
-
if (
|
|
13221
|
+
if (k && L && h) {
|
|
13222
13222
|
const Q = new Set(A.map((s1) => s1.value)), q = [], r1 = [];
|
|
13223
13223
|
v.forEach((s1) => (Q.has(s1.value) ? q : r1).push(s1)), f1.current = [...q, ...r1];
|
|
13224
|
-
} else
|
|
13224
|
+
} else k || (f1.current = null);
|
|
13225
13225
|
}, [
|
|
13226
|
-
|
|
13226
|
+
k,
|
|
13227
13227
|
L,
|
|
13228
13228
|
h,
|
|
13229
13229
|
v
|
|
13230
13230
|
]), Y(() => {
|
|
13231
13231
|
const Q = f1.current ?? v;
|
|
13232
|
-
if (!f || !
|
|
13232
|
+
if (!f || !M) E(Q);
|
|
13233
13233
|
else {
|
|
13234
|
-
const q = Y2(
|
|
13234
|
+
const q = Y2(M), r1 = Q.filter((s1) => Y2(s1.label).includes(q));
|
|
13235
13235
|
E(r1);
|
|
13236
13236
|
}
|
|
13237
13237
|
J(-1);
|
|
13238
13238
|
}, [
|
|
13239
|
-
|
|
13239
|
+
M,
|
|
13240
13240
|
v,
|
|
13241
13241
|
f,
|
|
13242
|
-
|
|
13242
|
+
k
|
|
13243
13243
|
]);
|
|
13244
|
-
const A1 = F(
|
|
13244
|
+
const A1 = F(x);
|
|
13245
13245
|
Y(() => {
|
|
13246
13246
|
const Q = A1.current;
|
|
13247
|
-
A1.current =
|
|
13248
|
-
const q = !Object.is(Q,
|
|
13249
|
-
if (
|
|
13247
|
+
A1.current = x;
|
|
13248
|
+
const q = !Object.is(Q, x);
|
|
13249
|
+
if (x == null) {
|
|
13250
13250
|
q && (T([]), R(""));
|
|
13251
13251
|
return;
|
|
13252
13252
|
}
|
|
13253
|
-
if (h && Array.isArray(
|
|
13253
|
+
if (h && Array.isArray(x) && x.length === 0) {
|
|
13254
13254
|
q && (T([]), R(""));
|
|
13255
13255
|
return;
|
|
13256
13256
|
}
|
|
13257
|
-
if (!h &&
|
|
13257
|
+
if (!h && x === "") {
|
|
13258
13258
|
q && (T([]), R(""));
|
|
13259
13259
|
return;
|
|
13260
13260
|
}
|
|
13261
13261
|
if (v.length > 0) {
|
|
13262
|
-
if (h && Array.isArray(
|
|
13263
|
-
const r1 = v.filter((s1) => typeof s1.value == "number" ?
|
|
13262
|
+
if (h && Array.isArray(x)) {
|
|
13263
|
+
const r1 = v.filter((s1) => typeof s1.value == "number" ? x.includes(s1.value) : x.includes(s1.value.toString()));
|
|
13264
13264
|
T(r1), q && R("");
|
|
13265
|
-
} else if (!h && (typeof
|
|
13266
|
-
const r1 = v.find((s1) => typeof s1.value == "number" && typeof
|
|
13265
|
+
} else if (!h && (typeof x == "string" || typeof x == "number")) {
|
|
13266
|
+
const r1 = v.find((s1) => typeof s1.value == "number" && typeof x == "number" ? s1.value === x : s1.value.toString() === x.toString());
|
|
13267
13267
|
if (r1)
|
|
13268
13268
|
T([r1]), q && R(r1.label);
|
|
13269
|
-
else if (t && typeof
|
|
13269
|
+
else if (t && typeof x == "string" && x.trim()) {
|
|
13270
13270
|
const s1 = {
|
|
13271
|
-
label:
|
|
13272
|
-
value:
|
|
13271
|
+
label: x.trim(),
|
|
13272
|
+
value: x.trim(),
|
|
13273
13273
|
className: "custom-option"
|
|
13274
13274
|
};
|
|
13275
|
-
T([s1]), q && R(
|
|
13275
|
+
T([s1]), q && R(x.trim());
|
|
13276
13276
|
} else q && (T([]), R(""));
|
|
13277
13277
|
}
|
|
13278
|
-
} else if (t && !h && typeof
|
|
13278
|
+
} else if (t && !h && typeof x == "string" && x.trim()) {
|
|
13279
13279
|
const r1 = {
|
|
13280
|
-
label:
|
|
13281
|
-
value:
|
|
13280
|
+
label: x.trim(),
|
|
13281
|
+
value: x.trim(),
|
|
13282
13282
|
className: "custom-option"
|
|
13283
13283
|
};
|
|
13284
|
-
T([r1]), q && R(
|
|
13284
|
+
T([r1]), q && R(x.trim());
|
|
13285
13285
|
} else q && (T([]), R(""));
|
|
13286
13286
|
}, [
|
|
13287
|
-
|
|
13287
|
+
x,
|
|
13288
13288
|
v,
|
|
13289
13289
|
h,
|
|
13290
13290
|
f,
|
|
@@ -13292,7 +13292,7 @@ var Ia = ({ name: t, size: r = "medium", shape: c = "rounded", className: n = ""
|
|
|
13292
13292
|
]), Y(() => {
|
|
13293
13293
|
f && y !== void 0 && R(y);
|
|
13294
13294
|
}, [y, f]), Y(() => {
|
|
13295
|
-
if (!
|
|
13295
|
+
if (!k || !Z.current) return;
|
|
13296
13296
|
const Q = () => {
|
|
13297
13297
|
if (!Z.current) return;
|
|
13298
13298
|
const r1 = Z.current.getBoundingClientRect(), s1 = window.visualViewport, Q1 = s1?.offsetTop ?? 0, E0 = Q1 + (s1?.height ?? window.innerHeight), F1 = 300, q0 = 8, M0 = E0 - r1.bottom, k0 = r1.top - Q1, h0 = M0 < F1 && k0 > M0;
|
|
@@ -13312,17 +13312,17 @@ var Ia = ({ name: t, size: r = "medium", shape: c = "rounded", className: n = ""
|
|
|
13312
13312
|
return window.addEventListener("scroll", Q, !0), window.addEventListener("resize", Q), q?.addEventListener("resize", Q), q?.addEventListener("scroll", Q), () => {
|
|
13313
13313
|
window.removeEventListener("scroll", Q, !0), window.removeEventListener("resize", Q), q?.removeEventListener("resize", Q), q?.removeEventListener("scroll", Q);
|
|
13314
13314
|
};
|
|
13315
|
-
}, [
|
|
13315
|
+
}, [k, V]), Y(() => {
|
|
13316
13316
|
const Q = (q) => {
|
|
13317
13317
|
if (Z.current && !Z.current.contains(q.target)) {
|
|
13318
|
-
if (V &&
|
|
13318
|
+
if (V && k) {
|
|
13319
13319
|
const r1 = document.querySelector(".dropdown-menu--portal");
|
|
13320
13320
|
if (r1 && r1.contains(q.target)) return;
|
|
13321
13321
|
}
|
|
13322
|
-
if (t && !h &&
|
|
13323
|
-
const r1 = v.find((s1) => s1.label.toLowerCase() ===
|
|
13324
|
-
label:
|
|
13325
|
-
value:
|
|
13322
|
+
if (t && !h && M.trim() && !(A.length > 0 && A[0].label.toLowerCase() === M.trim().toLowerCase())) {
|
|
13323
|
+
const r1 = v.find((s1) => s1.label.toLowerCase() === M.toLowerCase() || s1.value.toString() === M) || {
|
|
13324
|
+
label: M.trim(),
|
|
13325
|
+
value: M.trim(),
|
|
13326
13326
|
className: "custom-option"
|
|
13327
13327
|
};
|
|
13328
13328
|
T([r1]), R(r1.label), N(!1), u && u(r1, p);
|
|
@@ -13336,8 +13336,8 @@ var Ia = ({ name: t, size: r = "medium", shape: c = "rounded", className: n = ""
|
|
|
13336
13336
|
};
|
|
13337
13337
|
}, [
|
|
13338
13338
|
t,
|
|
13339
|
-
x,
|
|
13340
13339
|
M,
|
|
13340
|
+
k,
|
|
13341
13341
|
h,
|
|
13342
13342
|
p,
|
|
13343
13343
|
u,
|
|
@@ -13355,15 +13355,15 @@ var Ia = ({ name: t, size: r = "medium", shape: c = "rounded", className: n = ""
|
|
|
13355
13355
|
} else
|
|
13356
13356
|
R(Q.label), T([Q]), N(!1), u && u(Q, p);
|
|
13357
13357
|
}, u1 = () => {
|
|
13358
|
-
if (!t || !
|
|
13359
|
-
const Q = v.find((r1) => r1.label.toLowerCase() ===
|
|
13358
|
+
if (!t || !M.trim()) return;
|
|
13359
|
+
const Q = v.find((r1) => r1.label.toLowerCase() === M.toLowerCase() || r1.value.toString() === M);
|
|
13360
13360
|
if (Q) {
|
|
13361
13361
|
a1(Q);
|
|
13362
13362
|
return;
|
|
13363
13363
|
}
|
|
13364
13364
|
const q = {
|
|
13365
|
-
label:
|
|
13366
|
-
value:
|
|
13365
|
+
label: M.trim(),
|
|
13366
|
+
value: M.trim(),
|
|
13367
13367
|
className: "custom-option"
|
|
13368
13368
|
};
|
|
13369
13369
|
if (h) {
|
|
@@ -13377,40 +13377,40 @@ var Ia = ({ name: t, size: r = "medium", shape: c = "rounded", className: n = ""
|
|
|
13377
13377
|
}, K = () => {
|
|
13378
13378
|
T([]), (!f || !h) && R(""), N(!1), u && u(h ? [] : null, p);
|
|
13379
13379
|
}, h1 = (Q) => {
|
|
13380
|
-
R(Q),
|
|
13380
|
+
R(Q), k || N(!0), g?.(Q);
|
|
13381
13381
|
}, v1 = () => {
|
|
13382
13382
|
n || (N(!0), !h && f && A.length > 0 && R(""), (h || f) && X.current?.focus());
|
|
13383
13383
|
}, k1 = () => {
|
|
13384
|
-
n || (N(!
|
|
13384
|
+
n || (N(!k), k || (J(-1), !h && f && A.length > 0 && R(""), (h || f) && X.current?.focus()));
|
|
13385
13385
|
}, M1 = (Q) => {
|
|
13386
13386
|
if (!n) {
|
|
13387
|
-
if (!
|
|
13387
|
+
if (!k) {
|
|
13388
13388
|
(Q.key === "ArrowDown" || Q.key === "Enter") && (N(!0), Q.preventDefault());
|
|
13389
13389
|
return;
|
|
13390
13390
|
}
|
|
13391
13391
|
switch (Q.key) {
|
|
13392
13392
|
case "ArrowDown":
|
|
13393
|
-
if (Q.preventDefault(), t &&
|
|
13393
|
+
if (Q.preventDefault(), t && M && H.length === 0) return;
|
|
13394
13394
|
J((q) => {
|
|
13395
|
-
const r1 = q < (t &&
|
|
13395
|
+
const r1 = q < (t && M && !H.some((s1) => s1.label.toLowerCase() === M.toLowerCase()) ? H.length : H.length - 1) ? q + 1 : 0;
|
|
13396
13396
|
return r1 < H.length && W.current[r1] && W.current[r1]?.scrollIntoView({ block: "nearest" }), r1;
|
|
13397
13397
|
});
|
|
13398
13398
|
break;
|
|
13399
13399
|
case "ArrowUp":
|
|
13400
|
-
if (Q.preventDefault(), t &&
|
|
13400
|
+
if (Q.preventDefault(), t && M && H.length === 0) return;
|
|
13401
13401
|
J((q) => {
|
|
13402
|
-
const r1 = t &&
|
|
13402
|
+
const r1 = t && M && !H.some((Q1) => Q1.label.toLowerCase() === M.toLowerCase()) ? H.length : H.length - 1, s1 = q > 0 ? q - 1 : r1;
|
|
13403
13403
|
return s1 < H.length && W.current[s1] && W.current[s1]?.scrollIntoView({ block: "nearest" }), s1;
|
|
13404
13404
|
});
|
|
13405
13405
|
break;
|
|
13406
13406
|
case "Enter":
|
|
13407
|
-
Q.preventDefault(), I >= 0 && I < H.length ? a1(H[I]) : (t &&
|
|
13407
|
+
Q.preventDefault(), I >= 0 && I < H.length ? a1(H[I]) : (t && M && I === H.length || t && M && H.length === 0) && u1();
|
|
13408
13408
|
break;
|
|
13409
13409
|
case "Escape":
|
|
13410
13410
|
Q.preventDefault(), N(!1), !h && A.length > 0 ? R(A[0].label) : h && f && R("");
|
|
13411
13411
|
break;
|
|
13412
13412
|
case "Backspace":
|
|
13413
|
-
h &&
|
|
13413
|
+
h && M === "" && A.length > 0 && (Q.preventDefault(), G(A[A.length - 1]));
|
|
13414
13414
|
break;
|
|
13415
13415
|
default:
|
|
13416
13416
|
break;
|
|
@@ -13422,11 +13422,11 @@ var Ia = ({ name: t, size: r = "medium", shape: c = "rounded", className: n = ""
|
|
|
13422
13422
|
if (A.length <= Q) return A.map((s1) => s1.label).join(", ");
|
|
13423
13423
|
const q = A.slice(0, Q).map((s1) => s1.label).join(", "), r1 = A.length - Q;
|
|
13424
13424
|
return `${q} (+${r1} ${r1 === 1 ? "other" : "others"})`;
|
|
13425
|
-
}, c0 = () => h && C || f &&
|
|
13425
|
+
}, c0 = () => h && C || f && k ? M : A.length > 0 ? h ? j1() : A[0].label : "", V1 = () => h && C ? A.length > 0 ? "" : w : k && f ? w : A.length > 0 ? "" : w, S1 = () => !h || A.length === 0 || b === "none" ? null : b === "floating" ? /* @__PURE__ */ l("div", {
|
|
13426
13426
|
className: "dropdown-selected-count",
|
|
13427
13427
|
children: [A.length, " selected"]
|
|
13428
|
-
}) : null, W1 = () => !!(t &&
|
|
13429
|
-
if (!
|
|
13428
|
+
}) : null, W1 = () => !!(t && M && M.trim() && !H.some((Q) => Q.label.toLowerCase() === M.toLowerCase() || Q.value.toString() === M)), s0 = () => {
|
|
13429
|
+
if (!k || n) return null;
|
|
13430
13430
|
const Q = /* @__PURE__ */ e("div", {
|
|
13431
13431
|
ref: m1,
|
|
13432
13432
|
className: `dropdown-menu ${V ? "dropdown-menu--portal" : ""} ${e1 ? "dropdown-menu--upward" : ""}`,
|
|
@@ -13498,7 +13498,7 @@ var Ia = ({ name: t, size: r = "medium", shape: c = "rounded", className: n = ""
|
|
|
13498
13498
|
className: "dropdown-option-label",
|
|
13499
13499
|
children: [/* @__PURE__ */ e(j, { name: "plus" }), /* @__PURE__ */ l("span", { children: [
|
|
13500
13500
|
"Create “",
|
|
13501
|
-
|
|
13501
|
+
M,
|
|
13502
13502
|
"”"
|
|
13503
13503
|
] })]
|
|
13504
13504
|
})
|
|
@@ -13510,7 +13510,7 @@ var Ia = ({ name: t, size: r = "medium", shape: c = "rounded", className: n = ""
|
|
|
13510
13510
|
})
|
|
13511
13511
|
});
|
|
13512
13512
|
return V ? q1(Q, document.body) : Q;
|
|
13513
|
-
}, L1 = !h && A.length === 1 ? A[0] : null, P1 = _ && !
|
|
13513
|
+
}, L1 = !h && A.length === 1 ? A[0] : null, P1 = _ && !k && !h && A.length > 0, K1 = !!(L1?.icon && !M && !P1), l0 = !!(L1?.suffixIcon && !P1), n0 = h && C;
|
|
13514
13514
|
return /* @__PURE__ */ l("div", {
|
|
13515
13515
|
className: `dropdown-container ${s ? "dropdown-error" : ""} ${z ? "dropdown-success" : ""} ${d ? "dropdown-highlighted" : ""} ${h ? "multiple" : ""} ${n ? "disabled" : ""} ${h ? `count-display-${b}` : ""} ${c}`,
|
|
13516
13516
|
ref: Z,
|
|
@@ -13583,7 +13583,7 @@ var Ia = ({ name: t, size: r = "medium", shape: c = "rounded", className: n = ""
|
|
|
13583
13583
|
})
|
|
13584
13584
|
}),
|
|
13585
13585
|
/* @__PURE__ */ e("span", {
|
|
13586
|
-
className: `dropdown-action-button dropdown-toggle-button ${
|
|
13586
|
+
className: `dropdown-action-button dropdown-toggle-button ${k ? "open" : ""}`,
|
|
13587
13587
|
children: /* @__PURE__ */ e(U, {
|
|
13588
13588
|
variant: "plain",
|
|
13589
13589
|
onClick: k1,
|
|
@@ -13631,12 +13631,12 @@ var Ia = ({ name: t, size: r = "medium", shape: c = "rounded", className: n = ""
|
|
|
13631
13631
|
id: o,
|
|
13632
13632
|
max: a,
|
|
13633
13633
|
min: i,
|
|
13634
|
-
ref: (
|
|
13635
|
-
V.current =
|
|
13634
|
+
ref: (k) => {
|
|
13635
|
+
V.current = k, typeof L == "function" ? L(k) : L && (L.current = k);
|
|
13636
13636
|
},
|
|
13637
13637
|
value: C ?? "",
|
|
13638
13638
|
onBlur: h,
|
|
13639
|
-
onChange: (
|
|
13639
|
+
onChange: (k) => p?.(k.target.value || void 0),
|
|
13640
13640
|
onClick: u,
|
|
13641
13641
|
onKeyDown: g,
|
|
13642
13642
|
onKeyUp: v,
|
|
@@ -13661,8 +13661,8 @@ var Ia = ({ name: t, size: r = "medium", shape: c = "rounded", className: n = ""
|
|
|
13661
13661
|
type: "button",
|
|
13662
13662
|
className: "input-date-picker",
|
|
13663
13663
|
onClick: () => {
|
|
13664
|
-
const
|
|
13665
|
-
|
|
13664
|
+
const k = V.current;
|
|
13665
|
+
k && !n && !w && k.showPicker();
|
|
13666
13666
|
},
|
|
13667
13667
|
disabled: n || w,
|
|
13668
13668
|
tabIndex: -1,
|
|
@@ -14633,21 +14633,21 @@ var rl = (t) => !Number.isFinite(t) || t >= 1 ? 0 : String(t).split(".")[1]?.len
|
|
|
14633
14633
|
}, o.id ?? o.label ?? m))
|
|
14634
14634
|
]
|
|
14635
14635
|
}), vi = ({ width: t = "280px", className: r = "", isOpen: c, onClose: n, isMobile: s, showOverlay: d = !0, contained: o = !1, flush: m = !1, shadow: a = "none", header: i, navigation: h = [], actions: p = [], filters: u = [], filtersCount: g, collapsibleFilters: v = !1, onFilterChange: w, onClearFilters: f, options: y = [], onOptionChange: b, viewToggle: C, groupBy: L, visibleColumns: z }) => {
|
|
14636
|
-
const V = L2(),
|
|
14636
|
+
const V = L2(), x = s ?? V?.isMobile ?? !1, _ = c ?? (x ? V?.isOpen ?? !1 : !0), k = n ?? V?.close ?? (() => {
|
|
14637
14637
|
}), N = [
|
|
14638
14638
|
"control-panel",
|
|
14639
14639
|
_ ? "control-panel--open" : "control-panel--closed",
|
|
14640
|
-
|
|
14640
|
+
x ? "control-panel--mobile" : "",
|
|
14641
14641
|
o ? "control-panel--contained" : "",
|
|
14642
14642
|
m ? "control-panel--flush" : "",
|
|
14643
14643
|
r
|
|
14644
|
-
].filter(Boolean).join(" "),
|
|
14644
|
+
].filter(Boolean).join(" "), M = ["control-panel__overlay", o ? "control-panel__overlay--contained" : ""].filter(Boolean).join(" "), R = {
|
|
14645
14645
|
"--control-panel-width": t,
|
|
14646
14646
|
"--control-panel-shadow": a
|
|
14647
14647
|
}, H = y.length === 0 ? [] : "type" in y[0] ? [{ options: y }] : y, E = !!(C || L || z || H.length > 0), I = u.length > 0 || g !== void 0 && g > 0, J = typeof v == "number" ? v : v ? 1 : 1 / 0, A = u.length >= J, T = ["control-panel__filters", A ? "control-panel__filters--collapsible" : ""].filter(Boolean).join(" ");
|
|
14648
|
-
return /* @__PURE__ */ l(d1, { children: [d &&
|
|
14649
|
-
className:
|
|
14650
|
-
onClick:
|
|
14648
|
+
return /* @__PURE__ */ l(d1, { children: [d && x && _ && /* @__PURE__ */ e("div", {
|
|
14649
|
+
className: M,
|
|
14650
|
+
onClick: k
|
|
14651
14651
|
}), /* @__PURE__ */ l("aside", {
|
|
14652
14652
|
className: N,
|
|
14653
14653
|
style: R,
|
|
@@ -14659,19 +14659,19 @@ var rl = (t) => !Number.isFinite(t) || t >= 1 ? 0 : String(t).split(".")[1]?.len
|
|
|
14659
14659
|
appName: i.appName ?? i.siteName,
|
|
14660
14660
|
heading: i.heading,
|
|
14661
14661
|
onClick: i.onClick ? () => {
|
|
14662
|
-
i.onClick?.(),
|
|
14662
|
+
i.onClick?.(), x && k();
|
|
14663
14663
|
} : void 0
|
|
14664
14664
|
}),
|
|
14665
14665
|
p.length > 0 && /* @__PURE__ */ e("div", {
|
|
14666
14666
|
className: "control-panel__actions",
|
|
14667
14667
|
children: p.map((S) => /* @__PURE__ */ e(il, {
|
|
14668
14668
|
action: S,
|
|
14669
|
-
onActionComplete:
|
|
14669
|
+
onActionComplete: x ? k : void 0
|
|
14670
14670
|
}, S.id))
|
|
14671
14671
|
}),
|
|
14672
14672
|
h.length > 0 && /* @__PURE__ */ e(tl, {
|
|
14673
14673
|
navigation: h,
|
|
14674
|
-
onNavigate:
|
|
14674
|
+
onNavigate: x ? k : void 0
|
|
14675
14675
|
}),
|
|
14676
14676
|
I && /* @__PURE__ */ l("div", {
|
|
14677
14677
|
className: T,
|
|
@@ -14700,7 +14700,7 @@ var rl = (t) => !Number.isFinite(t) || t >= 1 ? 0 : String(t).split(".")[1]?.len
|
|
|
14700
14700
|
normalizedOptionGroups: H,
|
|
14701
14701
|
onOptionChange: b,
|
|
14702
14702
|
viewToggle: C,
|
|
14703
|
-
onViewToggleComplete:
|
|
14703
|
+
onViewToggleComplete: x ? k : void 0,
|
|
14704
14704
|
groupBy: L,
|
|
14705
14705
|
visibleColumns: z
|
|
14706
14706
|
})
|
|
@@ -14873,8 +14873,8 @@ var rl = (t) => !Number.isFinite(t) || t >= 1 ? 0 : String(t).split(".")[1]?.len
|
|
|
14873
14873
|
const C = u.current, L = C?.parentElement;
|
|
14874
14874
|
if (!C || !L) return;
|
|
14875
14875
|
let z = 0;
|
|
14876
|
-
for (const
|
|
14877
|
-
const V = L.clientWidth - z - ((h("desktop") ? ml : pl) * 2 + dl * 2 + ul * 2 + K2 * 6),
|
|
14876
|
+
for (const k of L.children) k !== C && (z += k.offsetWidth + K2);
|
|
14877
|
+
const V = L.clientWidth - z - ((h("desktop") ? ml : pl) * 2 + dl * 2 + ul * 2 + K2 * 6), x = Math.floor(V / 53), _ = Math.min(vl, Math.max(0, Math.floor(x / 2)));
|
|
14878
14878
|
v(_);
|
|
14879
14879
|
}, [h]);
|
|
14880
14880
|
Y(() => {
|
|
@@ -15037,9 +15037,9 @@ var rl = (t) => !Number.isFinite(t) || t >= 1 ? 0 : String(t).split(".")[1]?.len
|
|
|
15037
15037
|
}) : n;
|
|
15038
15038
|
};
|
|
15039
15039
|
function Ml({ data: t, columns: r, rowKey: c, card: n, actions: s, timeline: d, onRowClick: o, rowHref: m, rowClassName: a, empty: i, selectable: h, selectedIds: p = [], pinnedIds: u, onToggleSelect: g, cardMaxWidth: v, isMobile: w = !1, groups: f, showGroupCount: y = !0, collapsible: b = !1, collapsedGroups: C, onToggleGroup: L }) {
|
|
15040
|
-
const z = r.filter((
|
|
15041
|
-
id: d.idAccessor(
|
|
15042
|
-
date: d.dateAccessor(
|
|
15040
|
+
const z = r.filter((M) => !M.hideInCard && !(w && M.hideInMobile)), V = l1(() => new Set(u ?? []), [u]), x = `data-view__cards${v !== void 0 ? " data-view__cards--grid" : ""}`, _ = v !== void 0 ? { "--data-view-card-max-width": bl(v) } : void 0, k = l1(() => d ? z2(t.map((M) => ({
|
|
15041
|
+
id: d.idAccessor(M),
|
|
15042
|
+
date: d.dateAccessor(M)
|
|
15043
15043
|
})), d.granularity) : /* @__PURE__ */ new Map(), [t, d]);
|
|
15044
15044
|
if (t.length === 0)
|
|
15045
15045
|
return i ? /* @__PURE__ */ e(i0, {
|
|
@@ -15049,9 +15049,9 @@ function Ml({ data: t, columns: r, rowKey: c, card: n, actions: s, timeline: d,
|
|
|
15049
15049
|
primary: i.primary,
|
|
15050
15050
|
secondary: i.secondary
|
|
15051
15051
|
}) : /* @__PURE__ */ e(i0, { title: "No data available" });
|
|
15052
|
-
const N = (
|
|
15053
|
-
const H =
|
|
15054
|
-
W.metaKey || W.ctrlKey || W.shiftKey || W.altKey || W.button !== 0 || o && (W.preventDefault(), o(
|
|
15052
|
+
const N = (M, R) => {
|
|
15053
|
+
const H = k.get(R), E = c(M, R), I = h && p.includes(E), J = V.has(E), A = m?.(M), T = !!o || !!A, S = n?.accentColor?.(M), $ = `data-view__card ${T ? "data-view__card--clickable" : ""} ${I ? "data-view__card--selected" : ""} ${J ? "data-view__card--pinned" : ""} ${S ? "data-view__card--accent" : ""} ${a?.(M) || ""}`, e1 = S ? { "--data-view-card-accent-color": S } : void 0, O = (W) => {
|
|
15054
|
+
W.metaKey || W.ctrlKey || W.shiftKey || W.altKey || W.button !== 0 || o && (W.preventDefault(), o(M, W));
|
|
15055
15055
|
}, Z = /* @__PURE__ */ l(d1, { children: [
|
|
15056
15056
|
J && /* @__PURE__ */ e(c1, {
|
|
15057
15057
|
title: "Pinned",
|
|
@@ -15073,10 +15073,10 @@ function Ml({ data: t, columns: r, rowKey: c, card: n, actions: s, timeline: d,
|
|
|
15073
15073
|
}),
|
|
15074
15074
|
n?.media && /* @__PURE__ */ e("div", {
|
|
15075
15075
|
className: "data-view__card-media",
|
|
15076
|
-
children: n.media(
|
|
15076
|
+
children: n.media(M)
|
|
15077
15077
|
}),
|
|
15078
15078
|
n && (() => {
|
|
15079
|
-
const W = n.icon?.(
|
|
15079
|
+
const W = n.icon?.(M);
|
|
15080
15080
|
return /* @__PURE__ */ l("div", {
|
|
15081
15081
|
className: "data-view__card-header",
|
|
15082
15082
|
children: [/* @__PURE__ */ l("div", {
|
|
@@ -15098,16 +15098,16 @@ function Ml({ data: t, columns: r, rowKey: c, card: n, actions: s, timeline: d,
|
|
|
15098
15098
|
}),
|
|
15099
15099
|
/* @__PURE__ */ e("span", {
|
|
15100
15100
|
className: "data-view__card-title",
|
|
15101
|
-
children: n.title(
|
|
15101
|
+
children: n.title(M)
|
|
15102
15102
|
})
|
|
15103
15103
|
]
|
|
15104
15104
|
}), n.subtitle && /* @__PURE__ */ e("span", {
|
|
15105
15105
|
className: "data-view__card-subtitle",
|
|
15106
|
-
children: n.subtitle(
|
|
15106
|
+
children: n.subtitle(M)
|
|
15107
15107
|
})]
|
|
15108
15108
|
}), n.badges && /* @__PURE__ */ e("div", {
|
|
15109
15109
|
className: "data-view__card-badges",
|
|
15110
|
-
children: n.badges(
|
|
15110
|
+
children: n.badges(M)
|
|
15111
15111
|
})]
|
|
15112
15112
|
});
|
|
15113
15113
|
})(),
|
|
@@ -15120,14 +15120,14 @@ function Ml({ data: t, columns: r, rowKey: c, card: n, actions: s, timeline: d,
|
|
|
15120
15120
|
children: R3(W)
|
|
15121
15121
|
}), /* @__PURE__ */ e("span", {
|
|
15122
15122
|
className: "data-view__card-value",
|
|
15123
|
-
children: B3(W,
|
|
15123
|
+
children: B3(W, M)
|
|
15124
15124
|
})]
|
|
15125
15125
|
}, W.key))
|
|
15126
15126
|
}),
|
|
15127
15127
|
s && /* @__PURE__ */ e("div", {
|
|
15128
15128
|
className: "data-view__card-actions",
|
|
15129
15129
|
onClick: (W) => W.stopPropagation(),
|
|
15130
|
-
children: s(
|
|
15130
|
+
children: s(M)
|
|
15131
15131
|
})
|
|
15132
15132
|
] });
|
|
15133
15133
|
return /* @__PURE__ */ l(w1.Fragment, { children: [H && /* @__PURE__ */ e(_l, { marker: H }), A ? /* @__PURE__ */ e("a", {
|
|
@@ -15139,17 +15139,17 @@ function Ml({ data: t, columns: r, rowKey: c, card: n, actions: s, timeline: d,
|
|
|
15139
15139
|
}) : /* @__PURE__ */ e("div", {
|
|
15140
15140
|
className: $,
|
|
15141
15141
|
style: e1,
|
|
15142
|
-
onClick: o ? (W) => o(
|
|
15142
|
+
onClick: o ? (W) => o(M, W) : void 0,
|
|
15143
15143
|
children: Z
|
|
15144
15144
|
})] }, E);
|
|
15145
15145
|
};
|
|
15146
15146
|
if (f) {
|
|
15147
|
-
let
|
|
15147
|
+
let M = 0;
|
|
15148
15148
|
return /* @__PURE__ */ e("div", {
|
|
15149
15149
|
className: "data-view__groups",
|
|
15150
15150
|
children: f.map((R) => {
|
|
15151
|
-
const H =
|
|
15152
|
-
|
|
15151
|
+
const H = M;
|
|
15152
|
+
M += R.items.length;
|
|
15153
15153
|
const E = b && C?.has(R.key);
|
|
15154
15154
|
return /* @__PURE__ */ l("section", {
|
|
15155
15155
|
className: "data-view__group",
|
|
@@ -15172,7 +15172,7 @@ function Ml({ data: t, columns: r, rowKey: c, card: n, actions: s, timeline: d,
|
|
|
15172
15172
|
})
|
|
15173
15173
|
]
|
|
15174
15174
|
}), !E && /* @__PURE__ */ e("div", {
|
|
15175
|
-
className:
|
|
15175
|
+
className: x,
|
|
15176
15176
|
style: _,
|
|
15177
15177
|
children: R.items.map((I, J) => N(I, H + J))
|
|
15178
15178
|
})]
|
|
@@ -15181,9 +15181,9 @@ function Ml({ data: t, columns: r, rowKey: c, card: n, actions: s, timeline: d,
|
|
|
15181
15181
|
});
|
|
15182
15182
|
}
|
|
15183
15183
|
return /* @__PURE__ */ e("div", {
|
|
15184
|
-
className:
|
|
15184
|
+
className: x,
|
|
15185
15185
|
style: _,
|
|
15186
|
-
children: t.map((
|
|
15186
|
+
children: t.map((M, R) => N(M, R))
|
|
15187
15187
|
});
|
|
15188
15188
|
}
|
|
15189
15189
|
function kl({ config: t }) {
|
|
@@ -15295,7 +15295,7 @@ function zl({ state: t }) {
|
|
|
15295
15295
|
children: /* @__PURE__ */ e(j, { name: t === "asc" ? "arrow-up" : t === "desc" ? "arrow-down" : "arrow-bidirectional-vertical" })
|
|
15296
15296
|
});
|
|
15297
15297
|
}
|
|
15298
|
-
function Ci({ columns: t, data: r, rowKey: c, pinnedIds: n, selectable: s = !1, onSelectionChange: d, selectedIds: o, pageSizeOptions: m = J2, initialPageSize: a = J2[1], showPageSize: i = !0, card: h, actions: p, actionsWidth: u, timeline: g, onRowClick: v, rowHref: w, rowClassName: f, rowDetail: y, empty: b, initialSortKey: C = null, initialSortDirection: L = "asc", sortKey: z, sortDirection: V, onSortChange:
|
|
15298
|
+
function Ci({ columns: t, data: r, rowKey: c, pinnedIds: n, selectable: s = !1, onSelectionChange: d, selectedIds: o, pageSizeOptions: m = J2, initialPageSize: a = J2[1], showPageSize: i = !0, card: h, actions: p, actionsWidth: u, timeline: g, onRowClick: v, rowHref: w, rowClassName: f, rowDetail: y, empty: b, initialSortKey: C = null, initialSortDirection: L = "asc", sortKey: z, sortDirection: V, onSortChange: x, miniSort: _, showCardSortControls: k = !0, desktopView: N = "table", cardMaxWidth: M, className: R, onPageChange: H, onPageSizeChange: E, currentPage: I, totalItems: J, group: A, showResultsCount: T = !0, totalCount: S, itemNoun: $, columnSelector: e1 }) {
|
|
15299
15299
|
const { isMobile: O } = b0(), [Z, W] = B(C), [X, m1] = B(L), [t1, C1] = B([]), f1 = o ?? t1, [A1, a1] = B(1), u1 = I ?? A1, [G, K] = B(a), [h1, v1] = B(() => t.reduce((P, i1) => (i1.width && (P[i1.key] = i1.width), P), {})), [k1, M1] = B(/* @__PURE__ */ new Set()), T1 = (P) => {
|
|
15300
15300
|
M1((i1) => {
|
|
15301
15301
|
const g1 = new Set(i1);
|
|
@@ -15304,7 +15304,7 @@ function Ci({ columns: t, data: r, rowKey: c, pinnedIds: n, selectable: s = !1,
|
|
|
15304
15304
|
}, j1 = (P, i1) => c?.(P, i1) ?? i1, c0 = (P) => {
|
|
15305
15305
|
I === void 0 && a1(P), H?.(P);
|
|
15306
15306
|
}, V1 = z !== void 0 ? z : Z, S1 = V ?? X, W1 = (P, i1) => {
|
|
15307
|
-
z === void 0 && W(P), V === void 0 && m1(i1),
|
|
15307
|
+
z === void 0 && W(P), V === void 0 && m1(i1), x?.({
|
|
15308
15308
|
key: P,
|
|
15309
15309
|
direction: i1
|
|
15310
15310
|
}), c0(1);
|
|
@@ -15448,7 +15448,7 @@ function Ci({ columns: t, data: r, rowKey: c, pinnedIds: n, selectable: s = !1,
|
|
|
15448
15448
|
className: `data-view data-view--cards${R ? ` ${R}` : ""}`,
|
|
15449
15449
|
children: [
|
|
15450
15450
|
D2(i4),
|
|
15451
|
-
|
|
15451
|
+
k && n4 && /* @__PURE__ */ l("div", {
|
|
15452
15452
|
className: "data-view__card-sort-bar",
|
|
15453
15453
|
children: [/* @__PURE__ */ e("div", {
|
|
15454
15454
|
className: "data-view__card-sort-field",
|
|
@@ -15503,7 +15503,7 @@ function Ci({ columns: t, data: r, rowKey: c, pinnedIds: n, selectable: s = !1,
|
|
|
15503
15503
|
selectable: s,
|
|
15504
15504
|
selectedIds: f1,
|
|
15505
15505
|
pinnedIds: n,
|
|
15506
|
-
cardMaxWidth:
|
|
15506
|
+
cardMaxWidth: M,
|
|
15507
15507
|
isMobile: O,
|
|
15508
15508
|
groups: Q1 ?? void 0,
|
|
15509
15509
|
showGroupCount: A?.showCount !== !1,
|
|
@@ -15711,9 +15711,9 @@ var a0 = (t) => {
|
|
|
15711
15711
|
const [i, h] = B({}), [p, u] = B(() => /* @__PURE__ */ new Date()), [g, v] = B(null), [w, f] = B(d), [y, b] = B({
|
|
15712
15712
|
position: "fixed",
|
|
15713
15713
|
visibility: "hidden"
|
|
15714
|
-
}), [C, L] = B(r?.start ?? ""), [z, V] = B(r?.end ?? ""),
|
|
15714
|
+
}), [C, L] = B(r?.start ?? ""), [z, V] = B(r?.end ?? ""), x = F(null), _ = F(null), k = r ?? i, N = a0(k.start), M = a0(k.end), R = N && M ? {
|
|
15715
15715
|
start: N,
|
|
15716
|
-
end:
|
|
15716
|
+
end: M
|
|
15717
15717
|
} : void 0, H = (X) => {
|
|
15718
15718
|
r || h(X), c?.(X);
|
|
15719
15719
|
}, E = (X) => {
|
|
@@ -15725,14 +15725,14 @@ var a0 = (t) => {
|
|
|
15725
15725
|
v(X);
|
|
15726
15726
|
}, J = (X) => /^\d{4}-\d{2}-\d{2}$/.test(X) && a0(X) !== void 0, A = () => {
|
|
15727
15727
|
J(C) ? H({
|
|
15728
|
-
...
|
|
15728
|
+
...k,
|
|
15729
15729
|
start: C
|
|
15730
|
-
}) : L(
|
|
15730
|
+
}) : L(k.start ?? "");
|
|
15731
15731
|
}, T = () => {
|
|
15732
15732
|
J(z) ? H({
|
|
15733
|
-
...
|
|
15733
|
+
...k,
|
|
15734
15734
|
end: z
|
|
15735
|
-
}) : V(
|
|
15735
|
+
}) : V(k.end ?? "");
|
|
15736
15736
|
}, S = (X) => {
|
|
15737
15737
|
const m1 = /* @__PURE__ */ new Date(), t1 = /* @__PURE__ */ new Date();
|
|
15738
15738
|
t1.setDate(t1.getDate() - X), H({
|
|
@@ -15741,13 +15741,13 @@ var a0 = (t) => {
|
|
|
15741
15741
|
});
|
|
15742
15742
|
};
|
|
15743
15743
|
Y(() => {
|
|
15744
|
-
L(
|
|
15745
|
-
}, [
|
|
15746
|
-
V(
|
|
15747
|
-
}, [
|
|
15744
|
+
L(k.start ?? "");
|
|
15745
|
+
}, [k.start]), Y(() => {
|
|
15746
|
+
V(k.end ?? "");
|
|
15747
|
+
}, [k.end]);
|
|
15748
15748
|
const $ = l1(() => y0(p, 1), [p]), e1 = d || w, O = !d && w, Z = D(() => {
|
|
15749
|
-
if (!O || !
|
|
15750
|
-
const X =
|
|
15749
|
+
if (!O || !x.current || !_.current) return;
|
|
15750
|
+
const X = x.current.getBoundingClientRect(), m1 = _.current.getBoundingClientRect(), t1 = 16, C1 = 8, f1 = window.innerHeight - X.bottom - t1, A1 = X.top - t1, a1 = f1 < m1.height && A1 > m1.height ? X.top - m1.height - C1 : X.bottom + C1, u1 = Math.max(t1, Math.min(a1, window.innerHeight - m1.height - t1)), G = X.left, K = Math.max(t1, Math.min(G, window.innerWidth - m1.width - t1));
|
|
15751
15751
|
b({
|
|
15752
15752
|
position: "fixed",
|
|
15753
15753
|
top: `${u1}px`,
|
|
@@ -15773,7 +15773,7 @@ var a0 = (t) => {
|
|
|
15773
15773
|
if (!O) return;
|
|
15774
15774
|
const X = (t1) => {
|
|
15775
15775
|
const C1 = t1.target;
|
|
15776
|
-
|
|
15776
|
+
x.current?.contains(C1) || _.current?.contains(C1) || f(!1);
|
|
15777
15777
|
}, m1 = (t1) => {
|
|
15778
15778
|
t1.key === "Escape" && f(!1);
|
|
15779
15779
|
};
|
|
@@ -15844,7 +15844,7 @@ var a0 = (t) => {
|
|
|
15844
15844
|
})]
|
|
15845
15845
|
});
|
|
15846
15846
|
return /* @__PURE__ */ l("div", {
|
|
15847
|
-
ref:
|
|
15847
|
+
ref: x,
|
|
15848
15848
|
className: "date-range-picker",
|
|
15849
15849
|
children: [
|
|
15850
15850
|
t && m && m.length > 0 ? /* @__PURE__ */ l("div", {
|
|
@@ -15957,16 +15957,16 @@ var a0 = (t) => {
|
|
|
15957
15957
|
if (Y(() => {
|
|
15958
15958
|
t && (e3 += 1, V(e3));
|
|
15959
15959
|
}, [t]), Y(() => {
|
|
15960
|
-
const
|
|
15960
|
+
const M = (R) => {
|
|
15961
15961
|
R.key === "Escape" && t && r();
|
|
15962
15962
|
};
|
|
15963
|
-
return document.addEventListener("keydown",
|
|
15963
|
+
return document.addEventListener("keydown", M), () => document.removeEventListener("keydown", M);
|
|
15964
15964
|
}, [t, r]), !t) return null;
|
|
15965
|
-
const
|
|
15965
|
+
const x = (M) => typeof M == "number" ? `${M}px` : M, _ = Nl + z * 2, k = {
|
|
15966
15966
|
"--drawer-width": n,
|
|
15967
|
-
"--drawer-max-width":
|
|
15968
|
-
"--drawer-margin":
|
|
15969
|
-
"--drawer-border-radius":
|
|
15967
|
+
"--drawer-max-width": x(s),
|
|
15968
|
+
"--drawer-margin": x(d),
|
|
15969
|
+
"--drawer-border-radius": x(o),
|
|
15970
15970
|
"--drawer-shadow": m,
|
|
15971
15971
|
zIndex: _ + 1
|
|
15972
15972
|
}, N = L || b || C;
|
|
@@ -15976,7 +15976,7 @@ var a0 = (t) => {
|
|
|
15976
15976
|
style: { zIndex: _ }
|
|
15977
15977
|
}), /* @__PURE__ */ l("div", {
|
|
15978
15978
|
className: `drawer drawer--${c} ${p}`,
|
|
15979
|
-
style:
|
|
15979
|
+
style: k,
|
|
15980
15980
|
children: [
|
|
15981
15981
|
/* @__PURE__ */ l("div", {
|
|
15982
15982
|
className: "drawer__header",
|
|
@@ -16001,21 +16001,21 @@ var a0 = (t) => {
|
|
|
16001
16001
|
}),
|
|
16002
16002
|
w.length > 0 && /* @__PURE__ */ e("div", {
|
|
16003
16003
|
className: "drawer__header-actions",
|
|
16004
|
-
children: w.map((
|
|
16004
|
+
children: w.map((M) => {
|
|
16005
16005
|
const R = /* @__PURE__ */ e(U, {
|
|
16006
|
-
disabled:
|
|
16007
|
-
onClick:
|
|
16008
|
-
icon:
|
|
16009
|
-
emojiIcon:
|
|
16010
|
-
size:
|
|
16011
|
-
variant:
|
|
16012
|
-
children:
|
|
16013
|
-
}), H =
|
|
16006
|
+
disabled: M.disabled,
|
|
16007
|
+
onClick: M.onClick,
|
|
16008
|
+
icon: M.icon,
|
|
16009
|
+
emojiIcon: M.emojiIcon,
|
|
16010
|
+
size: M.size ?? "small",
|
|
16011
|
+
variant: M.variant ?? "ghost",
|
|
16012
|
+
children: M.label
|
|
16013
|
+
}), H = M.title ?? M.label;
|
|
16014
16014
|
return H ? /* @__PURE__ */ e(c1, {
|
|
16015
16015
|
title: H,
|
|
16016
16016
|
position: "bottom",
|
|
16017
16017
|
children: R
|
|
16018
|
-
},
|
|
16018
|
+
}, M.id) : /* @__PURE__ */ e(w1.Fragment, { children: R }, M.id);
|
|
16019
16019
|
})
|
|
16020
16020
|
}),
|
|
16021
16021
|
!v && /* @__PURE__ */ e(c1, {
|
|
@@ -16159,14 +16159,14 @@ function R0({ className: t, dragEnabled: r, event: c, isDragging: n, onClick: s,
|
|
|
16159
16159
|
var Bl = 8, I0 = () => {
|
|
16160
16160
|
};
|
|
16161
16161
|
function Al({ activeHours: t, className: r, date: c, dayEndHour: n = 24, dayStartHour: s = 0, defaultDurationMinutes: d = 30, emptyLabel: o = "Nothing scheduled", events: m, hourHeight: a = 44, isOpen: i, onAdd: h, onClose: p, onDateChange: u, onEventClick: g, position: v = "right", renderEvent: w, width: f = "min(480px, 100vw)" }) {
|
|
16162
|
-
const y = F(null), b = l1(() => V2(m, [B1(c)])[0], [c, m]), C = l1(() => Array.from({ length: Math.max(n - s, 1) }, (
|
|
16162
|
+
const y = F(null), b = l1(() => V2(m, [B1(c)])[0], [c, m]), C = l1(() => Array.from({ length: Math.max(n - s, 1) }, (N, M) => s + M), [s, n]), L = l1(() => D3(b.timed, s, n, d), [
|
|
16163
16163
|
b.timed,
|
|
16164
16164
|
n,
|
|
16165
16165
|
s,
|
|
16166
16166
|
d
|
|
16167
16167
|
]), z = l1(() => {
|
|
16168
|
-
const
|
|
16169
|
-
return
|
|
16168
|
+
const N = b.timed.map((M) => M.start.getHours());
|
|
16169
|
+
return N.length > 0 ? Math.min(...N) : t?.start ?? Bl;
|
|
16170
16170
|
}, [t, b.timed]);
|
|
16171
16171
|
Y(() => {
|
|
16172
16172
|
!i || !y.current || (y.current.scrollTop = Math.max(z - s - 1, 0) * a);
|
|
@@ -16181,10 +16181,10 @@ function Al({ activeHours: t, className: r, date: c, dayEndHour: n = 24, dayStar
|
|
|
16181
16181
|
onSwipeLeft: () => u?.(H0(B1(c), 1)),
|
|
16182
16182
|
onSwipeRight: () => u?.(H0(B1(c), -1)),
|
|
16183
16183
|
restraint: 50
|
|
16184
|
-
}),
|
|
16185
|
-
const
|
|
16186
|
-
return
|
|
16187
|
-
}, _ = C.length * a;
|
|
16184
|
+
}), x = (N) => {
|
|
16185
|
+
const M = B1(c);
|
|
16186
|
+
return M.setHours(N, 0, 0, 0), M;
|
|
16187
|
+
}, _ = C.length * a, k = { flex: `1 0 ${a}px` };
|
|
16188
16188
|
return /* @__PURE__ */ l(N2, {
|
|
16189
16189
|
className: ["day-agenda", r ?? ""].filter(Boolean).join(" "),
|
|
16190
16190
|
isOpen: i,
|
|
@@ -16208,15 +16208,15 @@ function Al({ activeHours: t, className: r, date: c, dayEndHour: n = 24, dayStar
|
|
|
16208
16208
|
children: "All day"
|
|
16209
16209
|
}), /* @__PURE__ */ e("div", {
|
|
16210
16210
|
className: "day-agenda__all-day-cell",
|
|
16211
|
-
children: b.allDay.map((
|
|
16211
|
+
children: b.allDay.map((N) => /* @__PURE__ */ e(R0, {
|
|
16212
16212
|
dragEnabled: !1,
|
|
16213
|
-
event:
|
|
16213
|
+
event: N,
|
|
16214
16214
|
isDragging: !1,
|
|
16215
16215
|
onClick: g,
|
|
16216
16216
|
onDragEnd: I0,
|
|
16217
16217
|
onDragStart: I0,
|
|
16218
16218
|
renderEvent: w
|
|
16219
|
-
},
|
|
16219
|
+
}, N.id))
|
|
16220
16220
|
})]
|
|
16221
16221
|
}),
|
|
16222
16222
|
/* @__PURE__ */ l("div", {
|
|
@@ -16225,27 +16225,27 @@ function Al({ activeHours: t, className: r, date: c, dayEndHour: n = 24, dayStar
|
|
|
16225
16225
|
...V,
|
|
16226
16226
|
children: [/* @__PURE__ */ e("div", {
|
|
16227
16227
|
className: "day-agenda__gutter",
|
|
16228
|
-
style: {
|
|
16229
|
-
children: C.map((
|
|
16230
|
-
className: ["day-agenda__gutter-hour", W0(
|
|
16231
|
-
style:
|
|
16232
|
-
children: /* @__PURE__ */ e("span", { children: E3(
|
|
16233
|
-
},
|
|
16228
|
+
style: { minHeight: _ },
|
|
16229
|
+
children: C.map((N) => /* @__PURE__ */ e("div", {
|
|
16230
|
+
className: ["day-agenda__gutter-hour", W0(N, t) ? "" : "day-agenda__gutter-hour--inactive"].filter(Boolean).join(" "),
|
|
16231
|
+
style: k,
|
|
16232
|
+
children: /* @__PURE__ */ e("span", { children: E3(N) })
|
|
16233
|
+
}, N))
|
|
16234
16234
|
}), /* @__PURE__ */ l("div", {
|
|
16235
16235
|
className: "day-agenda__column",
|
|
16236
|
-
style: {
|
|
16237
|
-
children: [C.map((
|
|
16236
|
+
style: { minHeight: _ },
|
|
16237
|
+
children: [C.map((N) => /* @__PURE__ */ e("div", {
|
|
16238
16238
|
className: [
|
|
16239
16239
|
"day-agenda__slot",
|
|
16240
|
-
W0(
|
|
16240
|
+
W0(N, t) ? "" : "day-agenda__slot--inactive",
|
|
16241
16241
|
h ? "day-agenda__slot--clickable" : ""
|
|
16242
16242
|
].filter(Boolean).join(" "),
|
|
16243
|
-
onClick: () => h?.(
|
|
16244
|
-
style:
|
|
16245
|
-
},
|
|
16243
|
+
onClick: () => h?.(x(N)),
|
|
16244
|
+
style: k
|
|
16245
|
+
}, N)), L.map((N) => /* @__PURE__ */ e(R0, {
|
|
16246
16246
|
className: "event-calendar__chip--positioned day-agenda__chip",
|
|
16247
16247
|
dragEnabled: !1,
|
|
16248
|
-
event:
|
|
16248
|
+
event: N.event,
|
|
16249
16249
|
isDragging: !1,
|
|
16250
16250
|
onClick: g,
|
|
16251
16251
|
onDragEnd: I0,
|
|
@@ -16253,12 +16253,12 @@ function Al({ activeHours: t, className: r, date: c, dayEndHour: n = 24, dayStar
|
|
|
16253
16253
|
renderEvent: w,
|
|
16254
16254
|
showTime: !0,
|
|
16255
16255
|
style: {
|
|
16256
|
-
top: `${
|
|
16257
|
-
height: `${
|
|
16258
|
-
left: `calc(${
|
|
16259
|
-
width: `calc(${
|
|
16256
|
+
top: `${N.top}%`,
|
|
16257
|
+
height: `${N.height}%`,
|
|
16258
|
+
left: `calc(${N.left}% + var(--spacing-2))`,
|
|
16259
|
+
width: `calc(${N.width}% - var(--spacing-4))`
|
|
16260
16260
|
}
|
|
16261
|
-
},
|
|
16261
|
+
}, N.event.id))]
|
|
16262
16262
|
})]
|
|
16263
16263
|
})
|
|
16264
16264
|
]
|
|
@@ -21687,7 +21687,7 @@ var Il = ({ text: t }) => /* @__PURE__ */ e(d1, { children: l1(() => Pl(t), [t])
|
|
|
21687
21687
|
"Sat"
|
|
21688
21688
|
];
|
|
21689
21689
|
function Kl({ date: t, dragEnabled: r, draggingId: c, emptyLabel: n, events: s, firstDayOfWeek: d, maxEventsPerDay: o, onDayClick: m, onDragEnd: a, onDragStart: i, onDrop: h, onEventClick: p, onOpenDay: u, renderEvent: g, showWeekNumbers: v }) {
|
|
21690
|
-
const [w, f] = B(null), [y, b] = B(null), C = l1(() => k3(t.getFullYear(), t.getMonth(), d), [t, d]), L = l1(() => C.flat(), [C]), z = l1(() => V2(s, L), [s, L]), V = l1(() => new Map(z.map((H) => [H.date.toDateString(), H])), [z]),
|
|
21690
|
+
const [w, f] = B(null), [y, b] = B(null), C = l1(() => k3(t.getFullYear(), t.getMonth(), d), [t, d]), L = l1(() => C.flat(), [C]), z = l1(() => V2(s, L), [s, L]), V = l1(() => new Map(z.map((H) => [H.date.toDateString(), H])), [z]), x = l1(() => d === 1 ? [...u2.slice(1), u2[0]] : u2, [d]), _ = t.getMonth(), k = s.length > 0, N = /* @__PURE__ */ new Date(), M = (H, E) => {
|
|
21691
21691
|
H.preventDefault(), b(null), h(E, !0);
|
|
21692
21692
|
}, R = (H, E) => {
|
|
21693
21693
|
!r || c === null || (H.preventDefault(), H.dataTransfer.dropEffect = "move", b(E));
|
|
@@ -21700,7 +21700,7 @@ function Kl({ date: t, dragEnabled: r, draggingId: c, emptyLabel: n, events: s,
|
|
|
21700
21700
|
children: [v && /* @__PURE__ */ e("div", {
|
|
21701
21701
|
className: "event-calendar__week-number event-calendar__week-number--head",
|
|
21702
21702
|
children: "Wk"
|
|
21703
|
-
}),
|
|
21703
|
+
}), x.map((H) => /* @__PURE__ */ e("div", {
|
|
21704
21704
|
className: "event-calendar__weekday",
|
|
21705
21705
|
children: H
|
|
21706
21706
|
}, H))]
|
|
@@ -21726,7 +21726,7 @@ function Kl({ date: t, dragEnabled: r, draggingId: c, emptyLabel: n, events: s,
|
|
|
21726
21726
|
onClick: () => m?.(I),
|
|
21727
21727
|
onDragLeave: () => b((Z) => Z === J ? null : Z),
|
|
21728
21728
|
onDragOver: (Z) => R(Z, J),
|
|
21729
|
-
onDrop: (Z) =>
|
|
21729
|
+
onDrop: (Z) => M(Z, I),
|
|
21730
21730
|
children: [u ? /* @__PURE__ */ e("button", {
|
|
21731
21731
|
className: "event-calendar__day-number event-calendar__day-number--button",
|
|
21732
21732
|
onClick: (Z) => {
|
|
@@ -21780,7 +21780,7 @@ function Kl({ date: t, dragEnabled: r, draggingId: c, emptyLabel: n, events: s,
|
|
|
21780
21780
|
})]
|
|
21781
21781
|
}, E))
|
|
21782
21782
|
}),
|
|
21783
|
-
!
|
|
21783
|
+
!k && n && /* @__PURE__ */ e("div", {
|
|
21784
21784
|
className: "event-calendar__empty",
|
|
21785
21785
|
children: n
|
|
21786
21786
|
})
|
|
@@ -21789,60 +21789,60 @@ function Kl({ date: t, dragEnabled: r, draggingId: c, emptyLabel: n, events: s,
|
|
|
21789
21789
|
}
|
|
21790
21790
|
var Ql = 8;
|
|
21791
21791
|
function Jl({ activeHours: t, date: r, dayEndHour: c, dayStartHour: n, defaultDurationMinutes: s, dragEnabled: d, draggingId: o, events: m, firstDayOfWeek: a, hourHeight: i, onDayClick: h, onDragEnd: p, onDragStart: u, onDrop: g, onEventClick: v, renderEvent: w }) {
|
|
21792
|
-
const [f, y] = B(null), b = F(null), C = l1(() => $3(r, a), [r, a]), L = l1(() => V2(m, C), [m, C]), z = l1(() => Array.from({ length: Math.max(c - n, 1) }, (
|
|
21793
|
-
const
|
|
21794
|
-
return
|
|
21792
|
+
const [f, y] = B(null), b = F(null), C = l1(() => $3(r, a), [r, a]), L = l1(() => V2(m, C), [m, C]), z = l1(() => Array.from({ length: Math.max(c - n, 1) }, (M, R) => n + R), [n, c]), V = L.some((M) => M.allDay.length > 0), x = z.length * i, _ = l1(() => {
|
|
21793
|
+
const M = L.flatMap((R) => R.timed.map((H) => H.start.getHours()));
|
|
21794
|
+
return M.length > 0 ? Math.min(...M) : t?.start ?? Ql;
|
|
21795
21795
|
}, [t, L]);
|
|
21796
21796
|
Y(() => {
|
|
21797
21797
|
if (!b.current) return;
|
|
21798
|
-
const
|
|
21799
|
-
b.current.scrollTop =
|
|
21798
|
+
const M = Math.max(_ - n - 1, 0);
|
|
21799
|
+
b.current.scrollTop = M * i;
|
|
21800
21800
|
}, [
|
|
21801
21801
|
n,
|
|
21802
21802
|
_,
|
|
21803
21803
|
i
|
|
21804
21804
|
]);
|
|
21805
|
-
const
|
|
21806
|
-
const H = B1(
|
|
21805
|
+
const k = (M, R) => {
|
|
21806
|
+
const H = B1(M);
|
|
21807
21807
|
return H.setHours(R, 0, 0, 0), H;
|
|
21808
|
-
}, N = (
|
|
21809
|
-
!d || o === null || (
|
|
21808
|
+
}, N = (M, R) => {
|
|
21809
|
+
!d || o === null || (M.preventDefault(), M.dataTransfer.dropEffect = "move", y(R));
|
|
21810
21810
|
};
|
|
21811
21811
|
return /* @__PURE__ */ l("div", {
|
|
21812
21812
|
className: "event-calendar__week-view",
|
|
21813
21813
|
children: [
|
|
21814
21814
|
/* @__PURE__ */ l("div", {
|
|
21815
21815
|
className: "event-calendar__week-head",
|
|
21816
|
-
children: [/* @__PURE__ */ e("div", { className: "event-calendar__gutter-spacer" }), C.map((
|
|
21816
|
+
children: [/* @__PURE__ */ e("div", { className: "event-calendar__gutter-spacer" }), C.map((M) => /* @__PURE__ */ l("div", {
|
|
21817
21817
|
className: [
|
|
21818
21818
|
"event-calendar__week-day-head",
|
|
21819
|
-
j0(
|
|
21820
|
-
M2(
|
|
21819
|
+
j0(M) ? "event-calendar__week-day-head--today" : "",
|
|
21820
|
+
M2(M) ? "event-calendar__week-day-head--weekend" : ""
|
|
21821
21821
|
].filter(Boolean).join(" "),
|
|
21822
21822
|
children: [/* @__PURE__ */ e("span", {
|
|
21823
21823
|
className: "event-calendar__week-day-name",
|
|
21824
|
-
children:
|
|
21824
|
+
children: M.toLocaleDateString(void 0, { weekday: "short" })
|
|
21825
21825
|
}), /* @__PURE__ */ e("span", {
|
|
21826
21826
|
className: "event-calendar__week-day-number",
|
|
21827
|
-
children:
|
|
21827
|
+
children: M.getDate()
|
|
21828
21828
|
})]
|
|
21829
|
-
},
|
|
21829
|
+
}, M.toDateString()))]
|
|
21830
21830
|
}),
|
|
21831
21831
|
V && /* @__PURE__ */ l("div", {
|
|
21832
21832
|
className: "event-calendar__all-day",
|
|
21833
21833
|
children: [/* @__PURE__ */ e("div", {
|
|
21834
21834
|
className: "event-calendar__gutter-label",
|
|
21835
21835
|
children: "All day"
|
|
21836
|
-
}), L.map((
|
|
21837
|
-
const R = `allday-${
|
|
21836
|
+
}), L.map((M) => {
|
|
21837
|
+
const R = `allday-${M.date.toDateString()}`;
|
|
21838
21838
|
return /* @__PURE__ */ e("div", {
|
|
21839
21839
|
className: ["event-calendar__all-day-cell", f === R ? "event-calendar__all-day-cell--drop-target" : ""].filter(Boolean).join(" "),
|
|
21840
21840
|
onDragLeave: () => y((H) => H === R ? null : H),
|
|
21841
21841
|
onDragOver: (H) => N(H, R),
|
|
21842
21842
|
onDrop: (H) => {
|
|
21843
|
-
H.preventDefault(), y(null), g(
|
|
21843
|
+
H.preventDefault(), y(null), g(M.date, !0);
|
|
21844
21844
|
},
|
|
21845
|
-
children:
|
|
21845
|
+
children: M.allDay.map((H) => /* @__PURE__ */ e(R0, {
|
|
21846
21846
|
dragEnabled: d,
|
|
21847
21847
|
event: H,
|
|
21848
21848
|
isDragging: o === H.id,
|
|
@@ -21859,19 +21859,19 @@ function Jl({ activeHours: t, date: r, dayEndHour: c, dayStartHour: n, defaultDu
|
|
|
21859
21859
|
ref: b,
|
|
21860
21860
|
children: [/* @__PURE__ */ e("div", {
|
|
21861
21861
|
className: "event-calendar__gutter",
|
|
21862
|
-
style: { height:
|
|
21863
|
-
children: z.map((
|
|
21864
|
-
className: ["event-calendar__gutter-hour", W0(
|
|
21862
|
+
style: { height: x },
|
|
21863
|
+
children: z.map((M) => /* @__PURE__ */ e("div", {
|
|
21864
|
+
className: ["event-calendar__gutter-hour", W0(M, t) ? "" : "event-calendar__gutter-hour--inactive"].filter(Boolean).join(" "),
|
|
21865
21865
|
style: { height: i },
|
|
21866
|
-
children: /* @__PURE__ */ e("span", { children: E3(
|
|
21867
|
-
},
|
|
21868
|
-
}), L.map((
|
|
21869
|
-
const R = D3(
|
|
21866
|
+
children: /* @__PURE__ */ e("span", { children: E3(M) })
|
|
21867
|
+
}, M))
|
|
21868
|
+
}), L.map((M) => {
|
|
21869
|
+
const R = D3(M.timed, n, c, s);
|
|
21870
21870
|
return /* @__PURE__ */ l("div", {
|
|
21871
|
-
className: ["event-calendar__week-column", j0(
|
|
21872
|
-
style: { height:
|
|
21871
|
+
className: ["event-calendar__week-column", j0(M.date) ? "event-calendar__week-column--today" : ""].filter(Boolean).join(" "),
|
|
21872
|
+
style: { height: x },
|
|
21873
21873
|
children: [z.map((H) => {
|
|
21874
|
-
const E = `${
|
|
21874
|
+
const E = `${M.date.toDateString()}-${H}`;
|
|
21875
21875
|
return /* @__PURE__ */ e("div", {
|
|
21876
21876
|
className: [
|
|
21877
21877
|
"event-calendar__slot",
|
|
@@ -21879,11 +21879,11 @@ function Jl({ activeHours: t, date: r, dayEndHour: c, dayStartHour: n, defaultDu
|
|
|
21879
21879
|
f === E ? "event-calendar__slot--drop-target" : "",
|
|
21880
21880
|
h ? "event-calendar__slot--clickable" : ""
|
|
21881
21881
|
].filter(Boolean).join(" "),
|
|
21882
|
-
onClick: () => h?.(M
|
|
21882
|
+
onClick: () => h?.(k(M.date, H)),
|
|
21883
21883
|
onDragLeave: () => y((I) => I === E ? null : I),
|
|
21884
21884
|
onDragOver: (I) => N(I, E),
|
|
21885
21885
|
onDrop: (I) => {
|
|
21886
|
-
I.preventDefault(), y(null), g(M
|
|
21886
|
+
I.preventDefault(), y(null), g(k(M.date, H), !1);
|
|
21887
21887
|
},
|
|
21888
21888
|
style: { height: i }
|
|
21889
21889
|
}, E);
|
|
@@ -21904,7 +21904,7 @@ function Jl({ activeHours: t, date: r, dayEndHour: c, dayStartHour: n, defaultDu
|
|
|
21904
21904
|
width: `calc(${H.width}% - var(--spacing-4))`
|
|
21905
21905
|
}
|
|
21906
21906
|
}, H.event.id))]
|
|
21907
|
-
},
|
|
21907
|
+
}, M.date.toDateString());
|
|
21908
21908
|
})]
|
|
21909
21909
|
})
|
|
21910
21910
|
]
|
|
@@ -21926,7 +21926,7 @@ var en = [{
|
|
|
21926
21926
|
return n.getFullYear() !== s.getFullYear() ? `${n.getDate()} ${N0(n)} ${n.getFullYear()} – ${s.getDate()} ${N0(s)} ${s.getFullYear()}` : n.getMonth() !== s.getMonth() ? `${n.getDate()} ${N0(n)} – ${s.getDate()} ${N0(s)} ${s.getFullYear()}` : `${n.getDate()} – ${s.getDate()} ${N0(s)} ${s.getFullYear()}`;
|
|
21927
21927
|
};
|
|
21928
21928
|
function ki({ activeHours: t, className: r, date: c, dayAgenda: n = !1, dayEndHour: s = 24, dayStartHour: d = 0, defaultDurationMinutes: o = 30, emptyLabel: m, events: a, firstDayOfWeek: i = 0, headerExtra: h, hourHeight: p = 44, maxEventsPerDay: u = 3, onDateChange: g, onDayClick: v, onEventClick: w, onEventDrop: f, onViewChange: y, renderEvent: b, showHeader: C = !0, showWeekNumbers: L = !1, swipeNavigation: z = !0, view: V }) {
|
|
21929
|
-
const [
|
|
21929
|
+
const [x, _] = B(() => B1(c ?? /* @__PURE__ */ new Date())), [k, N] = B(V ?? "month"), [M, R] = B(null), [H, E] = B(null), I = c ?? x, J = V ?? k, A = !!f, T = D((t1) => {
|
|
21930
21930
|
g && g(t1), c || _(t1);
|
|
21931
21931
|
}, [c, g]), S = D((t1) => {
|
|
21932
21932
|
y && y(t1), V || N(t1);
|
|
@@ -21937,8 +21937,8 @@ function ki({ activeHours: t, className: r, date: c, dayAgenda: n = !1, dayEndHo
|
|
|
21937
21937
|
J,
|
|
21938
21938
|
T
|
|
21939
21939
|
]), e1 = D((t1, C1) => {
|
|
21940
|
-
!
|
|
21941
|
-
}, [
|
|
21940
|
+
!M || !f || (f(M, Hl(M, t1, C1)), R(null));
|
|
21941
|
+
}, [M, f]), O = D((t1) => E(B1(t1)), []), Z = D((t1) => {
|
|
21942
21942
|
if (n) {
|
|
21943
21943
|
O(t1.start);
|
|
21944
21944
|
return;
|
|
@@ -21960,7 +21960,7 @@ function ki({ activeHours: t, className: r, date: c, dayAgenda: n = !1, dayEndHo
|
|
|
21960
21960
|
activeHours: t,
|
|
21961
21961
|
date: I,
|
|
21962
21962
|
dragEnabled: A,
|
|
21963
|
-
draggingId:
|
|
21963
|
+
draggingId: M?.id ?? null,
|
|
21964
21964
|
events: a,
|
|
21965
21965
|
firstDayOfWeek: i,
|
|
21966
21966
|
onDayClick: v,
|
|
@@ -22189,7 +22189,7 @@ var xi = ({ label: t, accept: r, multiple: c = !1, showPreview: n = !0, onFiles:
|
|
|
22189
22189
|
const [y, b] = B(s), [C, L] = B(() => n ?? {
|
|
22190
22190
|
x: Math.max(0, (window.innerWidth - s.width) / 2),
|
|
22191
22191
|
y: Math.max(0, (window.innerHeight - s.height) / 3)
|
|
22192
|
-
}), [z, V] = B(!1), [
|
|
22192
|
+
}), [z, V] = B(!1), [x, _] = B(!1), k = F(null), N = F(null), M = D((S, $) => ({
|
|
22193
22193
|
x: Math.min(Math.max(S.x, v2 - $.width), window.innerWidth - v2),
|
|
22194
22194
|
y: Math.min(Math.max(S.y, 0), window.innerHeight - v2)
|
|
22195
22195
|
}), []), R = D(() => {
|
|
@@ -22202,7 +22202,7 @@ var xi = ({ label: t, accept: r, multiple: c = !1, showPreview: n = !0, onFiles:
|
|
|
22202
22202
|
C,
|
|
22203
22203
|
y
|
|
22204
22204
|
]), H = D((S, $) => {
|
|
22205
|
-
|
|
22205
|
+
x || (S.preventDefault(), S.stopPropagation(), S.currentTarget.setPointerCapture(S.pointerId), N.current = {
|
|
22206
22206
|
direction: $,
|
|
22207
22207
|
pointerId: S.pointerId,
|
|
22208
22208
|
startPointer: {
|
|
@@ -22215,7 +22215,7 @@ var xi = ({ label: t, accept: r, multiple: c = !1, showPreview: n = !0, onFiles:
|
|
|
22215
22215
|
}
|
|
22216
22216
|
});
|
|
22217
22217
|
}, [
|
|
22218
|
-
|
|
22218
|
+
x,
|
|
22219
22219
|
C,
|
|
22220
22220
|
y
|
|
22221
22221
|
]), E = D((S) => {
|
|
@@ -22223,7 +22223,7 @@ var xi = ({ label: t, accept: r, multiple: c = !1, showPreview: n = !0, onFiles:
|
|
|
22223
22223
|
if (!$ || $.pointerId !== S.pointerId) return;
|
|
22224
22224
|
const e1 = S.clientX - $.startPointer.x, O = S.clientY - $.startPointer.y, { startRect: Z, direction: W } = $;
|
|
22225
22225
|
if (!W) {
|
|
22226
|
-
L(
|
|
22226
|
+
L(M({
|
|
22227
22227
|
x: Z.x + e1,
|
|
22228
22228
|
y: Z.y + O
|
|
22229
22229
|
}, Z));
|
|
@@ -22238,7 +22238,7 @@ var xi = ({ label: t, accept: r, multiple: c = !1, showPreview: n = !0, onFiles:
|
|
|
22238
22238
|
y: C1
|
|
22239
22239
|
});
|
|
22240
22240
|
}, [
|
|
22241
|
-
|
|
22241
|
+
M,
|
|
22242
22242
|
a,
|
|
22243
22243
|
i
|
|
22244
22244
|
]), I = D((S) => {
|
|
@@ -22246,7 +22246,7 @@ var xi = ({ label: t, accept: r, multiple: c = !1, showPreview: n = !0, onFiles:
|
|
|
22246
22246
|
}, [R]), J = D(() => {
|
|
22247
22247
|
_((S) => {
|
|
22248
22248
|
if (S) {
|
|
22249
|
-
const $ =
|
|
22249
|
+
const $ = k.current;
|
|
22250
22250
|
return $ && (L({
|
|
22251
22251
|
x: $.x,
|
|
22252
22252
|
y: $.y
|
|
@@ -22255,7 +22255,7 @@ var xi = ({ label: t, accept: r, multiple: c = !1, showPreview: n = !0, onFiles:
|
|
|
22255
22255
|
width: $.width
|
|
22256
22256
|
})), !1;
|
|
22257
22257
|
}
|
|
22258
|
-
return
|
|
22258
|
+
return k.current = {
|
|
22259
22259
|
...C,
|
|
22260
22260
|
...y
|
|
22261
22261
|
}, V(!1), !0;
|
|
@@ -22273,14 +22273,14 @@ var xi = ({ label: t, accept: r, multiple: c = !1, showPreview: n = !0, onFiles:
|
|
|
22273
22273
|
h
|
|
22274
22274
|
]), Y(() => {
|
|
22275
22275
|
if (!o) return;
|
|
22276
|
-
const S = () => L(($) =>
|
|
22276
|
+
const S = () => L(($) => M($, y));
|
|
22277
22277
|
return window.addEventListener("resize", S), () => window.removeEventListener("resize", S);
|
|
22278
22278
|
}, [
|
|
22279
|
-
|
|
22279
|
+
M,
|
|
22280
22280
|
o,
|
|
22281
22281
|
y
|
|
22282
22282
|
]), !o) return null;
|
|
22283
|
-
const A =
|
|
22283
|
+
const A = x ? {
|
|
22284
22284
|
"--_window-z": f,
|
|
22285
22285
|
height: `calc(100vh - ${Z0 * 2}px)`,
|
|
22286
22286
|
left: Z0,
|
|
@@ -22295,7 +22295,7 @@ var xi = ({ label: t, accept: r, multiple: c = !1, showPreview: n = !0, onFiles:
|
|
|
22295
22295
|
}, T = /* @__PURE__ */ l("div", {
|
|
22296
22296
|
className: [
|
|
22297
22297
|
"floating-window",
|
|
22298
|
-
|
|
22298
|
+
x ? "floating-window--maximized" : "",
|
|
22299
22299
|
z ? "floating-window--minimized" : "",
|
|
22300
22300
|
r
|
|
22301
22301
|
].filter(Boolean).join(" "),
|
|
@@ -22327,13 +22327,13 @@ var xi = ({ label: t, accept: r, multiple: c = !1, showPreview: n = !0, onFiles:
|
|
|
22327
22327
|
})
|
|
22328
22328
|
}),
|
|
22329
22329
|
u && /* @__PURE__ */ e(c1, {
|
|
22330
|
-
title:
|
|
22330
|
+
title: x ? "Restore" : "Maximize",
|
|
22331
22331
|
children: /* @__PURE__ */ e("button", {
|
|
22332
22332
|
className: "floating-window__action",
|
|
22333
22333
|
onClick: J,
|
|
22334
22334
|
onPointerDown: (S) => S.stopPropagation(),
|
|
22335
22335
|
type: "button",
|
|
22336
|
-
children:
|
|
22336
|
+
children: x ? "❐" : "□"
|
|
22337
22337
|
})
|
|
22338
22338
|
}),
|
|
22339
22339
|
/* @__PURE__ */ e(c1, {
|
|
@@ -22356,7 +22356,7 @@ var xi = ({ label: t, accept: r, multiple: c = !1, showPreview: n = !0, onFiles:
|
|
|
22356
22356
|
className: "floating-window__footer",
|
|
22357
22357
|
children: d
|
|
22358
22358
|
})] }),
|
|
22359
|
-
u && !
|
|
22359
|
+
u && !x && !z && cn.map((S) => /* @__PURE__ */ e("span", {
|
|
22360
22360
|
className: `floating-window__handle floating-window__handle--${S}`,
|
|
22361
22361
|
onPointerDown: ($) => H($, S),
|
|
22362
22362
|
onPointerMove: E,
|
|
@@ -22628,26 +22628,26 @@ var xi = ({ label: t, accept: r, multiple: c = !1, showPreview: n = !0, onFiles:
|
|
|
22628
22628
|
]
|
|
22629
22629
|
});
|
|
22630
22630
|
}, an = /^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/, on = (t) => !t || t.trim() === "" ? !0 : an.test(t.trim()), Bi = z1(({ autoComplete: t = "on", autoFocus: r, disabled: c, error: n = "Please enter a valid email address", highlighted: s, id: d, label: o, maxLength: m, onBlur: a, onChange: i, onClick: h, onKeyDown: p, onKeyUp: u, onValidate: g, placeholder: v, readOnly: w = !1, required: f = !1, showValidation: y = !1, success: b, validateOn: C = "blur", value: L }, z) => {
|
|
22631
|
-
const [V,
|
|
22631
|
+
const [V, x] = B(!0), [_, k] = B(!1), N = (E) => f && (!E || E.trim() === "") ? !1 : !E || E.trim() === "" ? !0 : on(E);
|
|
22632
22632
|
Y(() => {
|
|
22633
22633
|
if (L !== void 0) {
|
|
22634
22634
|
const E = N(L);
|
|
22635
|
-
|
|
22635
|
+
x(E), g?.(E);
|
|
22636
22636
|
}
|
|
22637
22637
|
}, [
|
|
22638
22638
|
L,
|
|
22639
22639
|
g,
|
|
22640
22640
|
f
|
|
22641
22641
|
]);
|
|
22642
|
-
const
|
|
22642
|
+
const M = (E) => {
|
|
22643
22643
|
if (i?.(E), C === "change" || C === "both") {
|
|
22644
22644
|
const I = N(E);
|
|
22645
|
-
|
|
22645
|
+
x(I), k(!0), g?.(I);
|
|
22646
22646
|
}
|
|
22647
22647
|
}, R = (E) => {
|
|
22648
|
-
if (
|
|
22648
|
+
if (k(!0), C === "blur" || C === "both") {
|
|
22649
22649
|
const I = N(E.target.value);
|
|
22650
|
-
|
|
22650
|
+
x(I), g?.(I);
|
|
22651
22651
|
}
|
|
22652
22652
|
a?.(E);
|
|
22653
22653
|
}, H = y && _ && !V;
|
|
@@ -22674,7 +22674,7 @@ var xi = ({ label: t, accept: r, multiple: c = !1, showPreview: n = !0, onFiles:
|
|
|
22674
22674
|
ref: z,
|
|
22675
22675
|
value: L,
|
|
22676
22676
|
onBlur: R,
|
|
22677
|
-
onChange: (E) =>
|
|
22677
|
+
onChange: (E) => M(E.target.value),
|
|
22678
22678
|
onClick: h,
|
|
22679
22679
|
onKeyDown: p,
|
|
22680
22680
|
onKeyUp: u,
|
|
@@ -22763,11 +22763,11 @@ function dn(t) {
|
|
|
22763
22763
|
return t.filter((r) => r.type === "token").length;
|
|
22764
22764
|
}
|
|
22765
22765
|
var mn = z1(({ mask: t, value: r, onChange: c, onComplete: n, placeholder: s, label: d, hint: o, error: m, highlighted: a, size: i = "md", variant: h = "default", disabled: p = !1, readOnly: u = !1, maskChar: g = "_", mono: v = !0, icon: w, suffix: f, className: y = "", id: b, name: C, autoComplete: L }, z) => {
|
|
22766
|
-
const V = w1.useMemo(() => hn(t), [t]),
|
|
22766
|
+
const V = w1.useMemo(() => hn(t), [t]), x = w1.useMemo(() => dn(V), [V]), _ = $0(), k = b ?? _, [N, M] = B(() => r !== void 0 ? r : ""), R = F(null);
|
|
22767
22767
|
u3(z, () => ({
|
|
22768
22768
|
focus: () => R.current?.focus(),
|
|
22769
22769
|
clear: () => {
|
|
22770
|
-
|
|
22770
|
+
M(""), c?.("", "");
|
|
22771
22771
|
},
|
|
22772
22772
|
getRawValue: () => N
|
|
22773
22773
|
}));
|
|
@@ -22787,10 +22787,10 @@ var mn = z1(({ mask: t, value: r, onChange: c, onComplete: n, placeholder: s, la
|
|
|
22787
22787
|
if ($.key === "Backspace") {
|
|
22788
22788
|
$.preventDefault();
|
|
22789
22789
|
const X = N.slice(0, -1), { masked: m1 } = g2(X, V, g);
|
|
22790
|
-
|
|
22790
|
+
M(X), c?.(X, m1);
|
|
22791
22791
|
return;
|
|
22792
22792
|
}
|
|
22793
|
-
if ($.key.length !== 1 || $.ctrlKey || $.metaKey || ($.preventDefault(), N.length >=
|
|
22793
|
+
if ($.key.length !== 1 || $.ctrlKey || $.metaKey || ($.preventDefault(), N.length >= x)) return;
|
|
22794
22794
|
const e1 = $.key;
|
|
22795
22795
|
let O = 0;
|
|
22796
22796
|
for (const X of V) if (X.type === "token") {
|
|
@@ -22801,23 +22801,23 @@ var mn = z1(({ mask: t, value: r, onChange: c, onComplete: n, placeholder: s, la
|
|
|
22801
22801
|
O++;
|
|
22802
22802
|
}
|
|
22803
22803
|
const { masked: Z, rawAccepted: W } = g2(N + e1, V, g);
|
|
22804
|
-
|
|
22804
|
+
M(W), c?.(W, Z), W.length === x && n?.(W, Z);
|
|
22805
22805
|
}, [
|
|
22806
22806
|
p,
|
|
22807
22807
|
u,
|
|
22808
22808
|
N,
|
|
22809
22809
|
V,
|
|
22810
22810
|
g,
|
|
22811
|
-
|
|
22811
|
+
x,
|
|
22812
22812
|
c,
|
|
22813
22813
|
n
|
|
22814
|
-
]), T = s ?? V.map(($) => $.type === "literal" ? $.char : g).join(""), S = N.length ===
|
|
22814
|
+
]), T = s ?? V.map(($) => $.type === "literal" ? $.char : g).join(""), S = N.length === x;
|
|
22815
22815
|
return /* @__PURE__ */ l("div", {
|
|
22816
22816
|
className: J,
|
|
22817
22817
|
children: [
|
|
22818
22818
|
d && /* @__PURE__ */ e("label", {
|
|
22819
22819
|
className: "input-mask__label",
|
|
22820
|
-
htmlFor:
|
|
22820
|
+
htmlFor: k,
|
|
22821
22821
|
children: d
|
|
22822
22822
|
}),
|
|
22823
22823
|
/* @__PURE__ */ l("div", {
|
|
@@ -22829,7 +22829,7 @@ var mn = z1(({ mask: t, value: r, onChange: c, onComplete: n, placeholder: s, la
|
|
|
22829
22829
|
}),
|
|
22830
22830
|
/* @__PURE__ */ e("input", {
|
|
22831
22831
|
ref: R,
|
|
22832
|
-
id:
|
|
22832
|
+
id: k,
|
|
22833
22833
|
name: C,
|
|
22834
22834
|
type: "text",
|
|
22835
22835
|
inputMode: "text",
|
|
@@ -22849,7 +22849,7 @@ var mn = z1(({ mask: t, value: r, onChange: c, onComplete: n, placeholder: s, la
|
|
|
22849
22849
|
children: [
|
|
22850
22850
|
N.length,
|
|
22851
22851
|
"/",
|
|
22852
|
-
|
|
22852
|
+
x
|
|
22853
22853
|
]
|
|
22854
22854
|
}),
|
|
22855
22855
|
f && /* @__PURE__ */ e("span", {
|
|
@@ -22931,9 +22931,9 @@ function un(t) {
|
|
|
22931
22931
|
return t.split("").filter((r) => r === "#").length;
|
|
22932
22932
|
}
|
|
22933
22933
|
var vn = z1(({ autoFocus: t, disabled: r, error: c, format: n = pn, highlighted: s, id: d, label: o, onBlur: m, onChange: a, onClick: i, onKeyDown: h, placeholder: p, readOnly: u = !1, required: g = !1, success: v, value: w }, f) => {
|
|
22934
|
-
const y = w !== void 0, [b, C] = B(() => w ? w2(f2(w), n) : ""), L = y ? w2(f2(w ?? ""), n) : b, z = p ?? n.replace(/#/g, "0"), V = n.length,
|
|
22935
|
-
const
|
|
22936
|
-
y || C(R), a?.(R,
|
|
22934
|
+
const y = w !== void 0, [b, C] = B(() => w ? w2(f2(w), n) : ""), L = y ? w2(f2(w ?? ""), n) : b, z = p ?? n.replace(/#/g, "0"), V = n.length, x = (_) => {
|
|
22935
|
+
const k = f2(_), N = un(n), M = k.slice(0, N), R = w2(M, n);
|
|
22936
|
+
y || C(R), a?.(R, M);
|
|
22937
22937
|
};
|
|
22938
22938
|
return /* @__PURE__ */ l("div", {
|
|
22939
22939
|
className: "input-phone-wrapper",
|
|
@@ -22975,7 +22975,7 @@ var vn = z1(({ autoFocus: t, disabled: r, error: c, format: n = pn, highlighted:
|
|
|
22975
22975
|
type: "tel",
|
|
22976
22976
|
value: L,
|
|
22977
22977
|
onBlur: m,
|
|
22978
|
-
onChange: (_) =>
|
|
22978
|
+
onChange: (_) => x(_.target.value),
|
|
22979
22979
|
onClick: i,
|
|
22980
22980
|
onKeyDown: h
|
|
22981
22981
|
})]
|
|
@@ -22993,7 +22993,7 @@ var vn = z1(({ autoFocus: t, disabled: r, error: c, format: n = pn, highlighted:
|
|
|
22993
22993
|
});
|
|
22994
22994
|
vn.displayName = "InputPhone";
|
|
22995
22995
|
var gn = /[^0-9]/g, wn = /[^0-9a-zA-Z]/g, Di = ({ autoFocus: t = !1, disabled: r = !1, error: c, id: n, label: s, length: d = 6, groupSize: o, onChange: m, onComplete: a, secret: i = !1, success: h, type: p = "numeric", value: u }) => {
|
|
22996
|
-
const g = F([]), v = F(!1), w = D((
|
|
22996
|
+
const g = F([]), v = F(!1), w = D((x) => x.replace(p === "numeric" ? gn : wn, "").slice(0, d), [d, p]), f = w(u), y = f.split("");
|
|
22997
22997
|
Y(() => {
|
|
22998
22998
|
f.length === d && !v.current && (v.current = !0, a?.(f)), f.length < d && (v.current = !1);
|
|
22999
22999
|
}, [
|
|
@@ -23003,59 +23003,59 @@ var gn = /[^0-9]/g, wn = /[^0-9a-zA-Z]/g, Di = ({ autoFocus: t = !1, disabled: r
|
|
|
23003
23003
|
]), Y(() => {
|
|
23004
23004
|
t && g.current[0]?.focus();
|
|
23005
23005
|
}, [t]);
|
|
23006
|
-
const b = D((
|
|
23007
|
-
const _ = g.current[Math.min(Math.max(
|
|
23006
|
+
const b = D((x) => {
|
|
23007
|
+
const _ = g.current[Math.min(Math.max(x, 0), d - 1)];
|
|
23008
23008
|
_?.focus(), _?.select();
|
|
23009
|
-
}, [d]), C = D((
|
|
23010
|
-
const _ =
|
|
23009
|
+
}, [d]), C = D((x) => {
|
|
23010
|
+
const _ = x.join("").replace(/\s/g, "");
|
|
23011
23011
|
m(w(_));
|
|
23012
|
-
}, [m, w]), L = D((
|
|
23013
|
-
const
|
|
23014
|
-
if (!
|
|
23012
|
+
}, [m, w]), L = D((x, _) => {
|
|
23013
|
+
const k = y[x] ?? "", N = k && _.startsWith(k) ? _.slice(k.length) : _, M = w(N);
|
|
23014
|
+
if (!M) return;
|
|
23015
23015
|
const R = [...y];
|
|
23016
|
-
|
|
23017
|
-
|
|
23018
|
-
}), C(R), b(
|
|
23016
|
+
M.split("").forEach((H, E) => {
|
|
23017
|
+
x + E < d && (R[x + E] = H);
|
|
23018
|
+
}), C(R), b(x + M.length);
|
|
23019
23019
|
}, [
|
|
23020
23020
|
y,
|
|
23021
23021
|
C,
|
|
23022
23022
|
b,
|
|
23023
23023
|
d,
|
|
23024
23024
|
w
|
|
23025
|
-
]), z = D((
|
|
23026
|
-
if (
|
|
23027
|
-
|
|
23028
|
-
const
|
|
23029
|
-
if (
|
|
23030
|
-
|
|
23025
|
+
]), z = D((x, _) => {
|
|
23026
|
+
if (x.key === "Backspace") {
|
|
23027
|
+
x.preventDefault();
|
|
23028
|
+
const k = [...y];
|
|
23029
|
+
if (k[_]) {
|
|
23030
|
+
k.splice(_, 1), C(k);
|
|
23031
23031
|
return;
|
|
23032
23032
|
}
|
|
23033
|
-
_ > 0 && (
|
|
23033
|
+
_ > 0 && (k.splice(_ - 1, 1), C(k), b(_ - 1));
|
|
23034
23034
|
return;
|
|
23035
23035
|
}
|
|
23036
|
-
if (
|
|
23037
|
-
|
|
23038
|
-
const
|
|
23039
|
-
|
|
23036
|
+
if (x.key === "Delete") {
|
|
23037
|
+
x.preventDefault();
|
|
23038
|
+
const k = [...y];
|
|
23039
|
+
k.splice(_, 1), C(k);
|
|
23040
23040
|
return;
|
|
23041
23041
|
}
|
|
23042
|
-
if (
|
|
23043
|
-
|
|
23042
|
+
if (x.key === "ArrowLeft") {
|
|
23043
|
+
x.preventDefault(), b(_ - 1);
|
|
23044
23044
|
return;
|
|
23045
23045
|
}
|
|
23046
|
-
|
|
23046
|
+
x.key === "ArrowRight" && (x.preventDefault(), b(_ + 1));
|
|
23047
23047
|
}, [
|
|
23048
23048
|
y,
|
|
23049
23049
|
C,
|
|
23050
23050
|
b
|
|
23051
|
-
]), V = D((
|
|
23052
|
-
|
|
23053
|
-
const
|
|
23054
|
-
if (!
|
|
23051
|
+
]), V = D((x, _) => {
|
|
23052
|
+
x.preventDefault();
|
|
23053
|
+
const k = w(x.clipboardData.getData("text"));
|
|
23054
|
+
if (!k) return;
|
|
23055
23055
|
const N = [...y];
|
|
23056
|
-
|
|
23057
|
-
_ + R < d && (N[_ + R] =
|
|
23058
|
-
}), C(N), b(_ +
|
|
23056
|
+
k.split("").forEach((M, R) => {
|
|
23057
|
+
_ + R < d && (N[_ + R] = M);
|
|
23058
|
+
}), C(N), b(_ + k.length);
|
|
23059
23059
|
}, [
|
|
23060
23060
|
y,
|
|
23061
23061
|
C,
|
|
@@ -23077,20 +23077,20 @@ var gn = /[^0-9]/g, wn = /[^0-9a-zA-Z]/g, Di = ({ autoFocus: t = !1, disabled: r
|
|
|
23077
23077
|
}),
|
|
23078
23078
|
/* @__PURE__ */ e("div", {
|
|
23079
23079
|
className: "input-pin-cells",
|
|
23080
|
-
children: Array.from({ length: d }, (
|
|
23080
|
+
children: Array.from({ length: d }, (x, _) => /* @__PURE__ */ e("input", {
|
|
23081
23081
|
autoComplete: _ === 0 ? "one-time-code" : "off",
|
|
23082
23082
|
className: `input-pin-cell${y[_] ? " input-pin-cell--filled" : ""}${o && _ > 0 && _ % o === 0 ? " input-pin-cell--group-start" : ""}`,
|
|
23083
23083
|
disabled: r,
|
|
23084
23084
|
id: n ? `${n}-${_}` : void 0,
|
|
23085
23085
|
inputMode: p === "numeric" ? "numeric" : "text",
|
|
23086
23086
|
maxLength: d,
|
|
23087
|
-
onChange: (
|
|
23088
|
-
onFocus: (
|
|
23089
|
-
onKeyDown: (
|
|
23090
|
-
onPaste: (
|
|
23087
|
+
onChange: (k) => L(_, k.target.value),
|
|
23088
|
+
onFocus: (k) => k.target.select(),
|
|
23089
|
+
onKeyDown: (k) => z(k, _),
|
|
23090
|
+
onPaste: (k) => V(k, _),
|
|
23091
23091
|
type: i ? "password" : "text",
|
|
23092
|
-
ref: (
|
|
23093
|
-
g.current[_] =
|
|
23092
|
+
ref: (k) => {
|
|
23093
|
+
g.current[_] = k;
|
|
23094
23094
|
},
|
|
23095
23095
|
value: y[_] ?? ""
|
|
23096
23096
|
}, _))
|
|
@@ -23151,7 +23151,7 @@ var gn = /[^0-9]/g, wn = /[^0-9a-zA-Z]/g, Di = ({ autoFocus: t = !1, disabled: r
|
|
|
23151
23151
|
seconds: 0
|
|
23152
23152
|
};
|
|
23153
23153
|
}, Ti = z1(({ autoFocus: t, disabled: r, error: c, highlighted: n, id: s, label: d, max: o, min: m, minuteStep: a = 1, onBlur: i, onChange: h, onClick: p, onKeyDown: u, onKeyUp: g, readOnly: v = !1, required: w = !1, success: f, value: y, withClock: b = !1 }, C) => {
|
|
23154
|
-
const [L, z] = B(!1), V = F(null),
|
|
23154
|
+
const [L, z] = B(!1), V = F(null), x = (_) => {
|
|
23155
23155
|
h?.(`${r3(_.hours)}:${r3(_.minutes)}`);
|
|
23156
23156
|
};
|
|
23157
23157
|
return /* @__PURE__ */ l("div", {
|
|
@@ -23210,7 +23210,7 @@ var gn = /[^0-9]/g, wn = /[^0-9a-zA-Z]/g, Di = ({ autoFocus: t = !1, disabled: r
|
|
|
23210
23210
|
collapsibleClock: !1,
|
|
23211
23211
|
label: "",
|
|
23212
23212
|
minuteStep: a,
|
|
23213
|
-
onChange:
|
|
23213
|
+
onChange: x,
|
|
23214
23214
|
value: fn(y),
|
|
23215
23215
|
withClock: !0
|
|
23216
23216
|
})
|
|
@@ -23228,13 +23228,13 @@ var gn = /[^0-9]/g, wn = /[^0-9a-zA-Z]/g, Di = ({ autoFocus: t = !1, disabled: r
|
|
|
23228
23228
|
const [L, z] = B(void 0), V = (N) => {
|
|
23229
23229
|
if (!N)
|
|
23230
23230
|
return z(void 0), u?.(!0), !0;
|
|
23231
|
-
const
|
|
23232
|
-
return z(
|
|
23233
|
-
},
|
|
23231
|
+
const M = yn(N);
|
|
23232
|
+
return z(M ? void 0 : y ?? Cn), u?.(M), M;
|
|
23233
|
+
}, x = (N) => {
|
|
23234
23234
|
a?.(N), L && V(N);
|
|
23235
23235
|
}, _ = (N) => {
|
|
23236
23236
|
V(N.target.value), m?.(N);
|
|
23237
|
-
},
|
|
23237
|
+
}, k = c ?? L;
|
|
23238
23238
|
return /* @__PURE__ */ l("div", {
|
|
23239
23239
|
className: `input-url-wrapper${n ? " input-url-highlighted" : ""}`,
|
|
23240
23240
|
children: [
|
|
@@ -23250,23 +23250,23 @@ var gn = /[^0-9]/g, wn = /[^0-9a-zA-Z]/g, Di = ({ autoFocus: t = !1, disabled: r
|
|
|
23250
23250
|
autoFocus: t,
|
|
23251
23251
|
disabled: r,
|
|
23252
23252
|
type: "url",
|
|
23253
|
-
className: `input-url${
|
|
23253
|
+
className: `input-url${k ? " input-url-error" : ""}${f ? " input-url-success" : ""}`,
|
|
23254
23254
|
id: s,
|
|
23255
23255
|
maxLength: o,
|
|
23256
23256
|
placeholder: g,
|
|
23257
23257
|
ref: C,
|
|
23258
23258
|
value: b,
|
|
23259
23259
|
onBlur: _,
|
|
23260
|
-
onChange: (N) =>
|
|
23260
|
+
onChange: (N) => x(N.target.value),
|
|
23261
23261
|
onClick: i,
|
|
23262
23262
|
onKeyDown: h,
|
|
23263
23263
|
onKeyUp: p,
|
|
23264
23264
|
readOnly: v,
|
|
23265
23265
|
required: w
|
|
23266
23266
|
}),
|
|
23267
|
-
|
|
23267
|
+
k && /* @__PURE__ */ e("span", {
|
|
23268
23268
|
className: "input-url-error-message",
|
|
23269
|
-
children:
|
|
23269
|
+
children: k
|
|
23270
23270
|
}),
|
|
23271
23271
|
f && /* @__PURE__ */ e("span", {
|
|
23272
23272
|
className: "input-url-success-message",
|
|
@@ -23745,20 +23745,20 @@ var gn = /[^0-9]/g, wn = /[^0-9a-zA-Z]/g, Di = ({ autoFocus: t = !1, disabled: r
|
|
|
23745
23745
|
return c === "custom" ? t.customColor || c3.default : c === "random" ? xn(r) : c3[c];
|
|
23746
23746
|
}, Fi = ({ className: t = "", data: r = [], emptyLabel: c, gap: n = 1, size: s = "medium", valueFormatter: d, valuePosition: o = "inside" }) => {
|
|
23747
23747
|
const m = Mn[s], a = o === "outside" ? Math.round(m * 0.18) : 0, i = m / 2, h = Math.max(i - Math.max(n, 1), 1), p = `${-a} ${-a} ${m + a * 2} ${m + a * 2}`, u = l1(() => {
|
|
23748
|
-
const L = r.filter((
|
|
23748
|
+
const L = r.filter((x) => Number.isFinite(x.value) && x.value > 0), z = L.reduce((x, _) => x + _.value, 0);
|
|
23749
23749
|
if (z <= 0) return [];
|
|
23750
23750
|
let V = 0;
|
|
23751
|
-
return L.map((
|
|
23752
|
-
const
|
|
23753
|
-
return V =
|
|
23754
|
-
color: Ln(
|
|
23755
|
-
endAngle:
|
|
23751
|
+
return L.map((x, _) => {
|
|
23752
|
+
const k = x.value / z * 360, N = V, M = _ === L.length - 1 ? 360 : V + k, R = N + (M - N) / 2;
|
|
23753
|
+
return V = M, {
|
|
23754
|
+
color: Ln(x, _),
|
|
23755
|
+
endAngle: M,
|
|
23756
23756
|
index: _,
|
|
23757
|
-
label: d ? d(
|
|
23757
|
+
label: d ? d(x.value, x, _) : x.value,
|
|
23758
23758
|
midAngle: R,
|
|
23759
|
-
path: kn(i, h, N,
|
|
23759
|
+
path: kn(i, h, N, M),
|
|
23760
23760
|
startAngle: N,
|
|
23761
|
-
value:
|
|
23761
|
+
value: x.value
|
|
23762
23762
|
};
|
|
23763
23763
|
});
|
|
23764
23764
|
}, [
|
|
@@ -23801,7 +23801,7 @@ var gn = /[^0-9]/g, wn = /[^0-9a-zA-Z]/g, Di = ({ autoFocus: t = !1, disabled: r
|
|
|
23801
23801
|
strokeWidth: b
|
|
23802
23802
|
}, `${L.index}-${L.value}-${L.startAngle}`))),
|
|
23803
23803
|
g && C && o === "outside" && u.map((L) => {
|
|
23804
|
-
const z = w0(i, i, f, L.midAngle), V = w0(i, i, y, L.midAngle),
|
|
23804
|
+
const z = w0(i, i, f, L.midAngle), V = w0(i, i, y, L.midAngle), x = w0(i, i, w, L.midAngle), _ = x.x >= i;
|
|
23805
23805
|
return /* @__PURE__ */ l("g", {
|
|
23806
23806
|
className: "pie-chart__outside-label-group",
|
|
23807
23807
|
children: [/* @__PURE__ */ e("line", {
|
|
@@ -23813,8 +23813,8 @@ var gn = /[^0-9]/g, wn = /[^0-9a-zA-Z]/g, Di = ({ autoFocus: t = !1, disabled: r
|
|
|
23813
23813
|
stroke: L.color
|
|
23814
23814
|
}), /* @__PURE__ */ e("text", {
|
|
23815
23815
|
className: "pie-chart__value-label pie-chart__value-label--outside",
|
|
23816
|
-
x:
|
|
23817
|
-
y:
|
|
23816
|
+
x: x.x,
|
|
23817
|
+
y: x.y,
|
|
23818
23818
|
textAnchor: _ ? "start" : "end",
|
|
23819
23819
|
dominantBaseline: "central",
|
|
23820
23820
|
fill: L.color,
|
|
@@ -24198,7 +24198,7 @@ var gn = /[^0-9]/g, wn = /[^0-9a-zA-Z]/g, Di = ({ autoFocus: t = !1, disabled: r
|
|
|
24198
24198
|
n,
|
|
24199
24199
|
s,
|
|
24200
24200
|
i
|
|
24201
|
-
]),
|
|
24201
|
+
]), x = D((T, S) => {
|
|
24202
24202
|
const $ = V(S);
|
|
24203
24203
|
return T === "lower" ? [Math.min($, L - y), L] : [C, Math.max($, C + y)];
|
|
24204
24204
|
}, [
|
|
@@ -24211,28 +24211,28 @@ var gn = /[^0-9]/g, wn = /[^0-9a-zA-Z]/g, Di = ({ autoFocus: t = !1, disabled: r
|
|
|
24211
24211
|
if (!S) return null;
|
|
24212
24212
|
const $ = S.getBoundingClientRect();
|
|
24213
24213
|
return $.width === 0 ? null : s + Math.min(1, Math.max(0, (T - $.left) / $.width)) * f;
|
|
24214
|
-
}, [s, f]),
|
|
24214
|
+
}, [s, f]), k = D((T, S) => {
|
|
24215
24215
|
t || (T.preventDefault(), T.stopPropagation(), T.currentTarget.setPointerCapture(T.pointerId), w.current = S);
|
|
24216
24216
|
}, [t]), N = D((T) => {
|
|
24217
24217
|
const S = w.current;
|
|
24218
24218
|
if (!S || t) return;
|
|
24219
24219
|
const $ = _(T.clientX);
|
|
24220
|
-
$ !== null && o(
|
|
24220
|
+
$ !== null && o(x(S, $));
|
|
24221
24221
|
}, [
|
|
24222
|
-
|
|
24222
|
+
x,
|
|
24223
24223
|
t,
|
|
24224
24224
|
o,
|
|
24225
24225
|
_
|
|
24226
|
-
]),
|
|
24226
|
+
]), M = D((T) => {
|
|
24227
24227
|
w.current && (T.currentTarget.releasePointerCapture(T.pointerId), w.current = null, m?.(u));
|
|
24228
24228
|
}, [m, u]), R = D((T) => {
|
|
24229
24229
|
if (t) return;
|
|
24230
24230
|
const S = _(T.clientX);
|
|
24231
24231
|
if (S === null) return;
|
|
24232
|
-
const $ = Math.abs(S - C) <= Math.abs(S - L) ? "lower" : "upper", e1 =
|
|
24232
|
+
const $ = Math.abs(S - C) <= Math.abs(S - L) ? "lower" : "upper", e1 = x($, S);
|
|
24233
24233
|
o(e1), m?.(e1);
|
|
24234
24234
|
}, [
|
|
24235
|
-
|
|
24235
|
+
x,
|
|
24236
24236
|
t,
|
|
24237
24237
|
C,
|
|
24238
24238
|
o,
|
|
@@ -24244,10 +24244,10 @@ var gn = /[^0-9]/g, wn = /[^0-9a-zA-Z]/g, Di = ({ autoFocus: t = !1, disabled: r
|
|
|
24244
24244
|
const $ = S === "lower" ? C : L, e1 = i > 0 ? i : 1, O = T.key === "ArrowLeft" || T.key === "ArrowDown" ? $ - e1 : T.key === "ArrowRight" || T.key === "ArrowUp" ? $ + e1 : T.key === "PageDown" ? $ - e1 * 10 : T.key === "PageUp" ? $ + e1 * 10 : T.key === "Home" ? s : T.key === "End" ? n : null;
|
|
24245
24245
|
if (O === null) return;
|
|
24246
24246
|
T.preventDefault();
|
|
24247
|
-
const Z =
|
|
24247
|
+
const Z = x(S, O);
|
|
24248
24248
|
o(Z), m?.(Z);
|
|
24249
24249
|
}, [
|
|
24250
|
-
|
|
24250
|
+
x,
|
|
24251
24251
|
t,
|
|
24252
24252
|
C,
|
|
24253
24253
|
n,
|
|
@@ -24305,9 +24305,9 @@ var gn = /[^0-9]/g, wn = /[^0-9a-zA-Z]/g, Di = ({ autoFocus: t = !1, disabled: r
|
|
|
24305
24305
|
className: "range-slider__thumb range-slider__thumb--lower",
|
|
24306
24306
|
disabled: t,
|
|
24307
24307
|
onKeyDown: (T) => H(T, "lower"),
|
|
24308
|
-
onPointerDown: (T) =>
|
|
24308
|
+
onPointerDown: (T) => k(T, "lower"),
|
|
24309
24309
|
onPointerMove: N,
|
|
24310
|
-
onPointerUp:
|
|
24310
|
+
onPointerUp: M,
|
|
24311
24311
|
style: { left: `${J}%` },
|
|
24312
24312
|
title: z(C),
|
|
24313
24313
|
type: "button"
|
|
@@ -24316,9 +24316,9 @@ var gn = /[^0-9]/g, wn = /[^0-9a-zA-Z]/g, Di = ({ autoFocus: t = !1, disabled: r
|
|
|
24316
24316
|
className: "range-slider__thumb range-slider__thumb--upper",
|
|
24317
24317
|
disabled: t,
|
|
24318
24318
|
onKeyDown: (T) => H(T, "upper"),
|
|
24319
|
-
onPointerDown: (T) =>
|
|
24319
|
+
onPointerDown: (T) => k(T, "upper"),
|
|
24320
24320
|
onPointerMove: N,
|
|
24321
|
-
onPointerUp:
|
|
24321
|
+
onPointerUp: M,
|
|
24322
24322
|
style: { left: `${A}%` },
|
|
24323
24323
|
title: z(L),
|
|
24324
24324
|
type: "button"
|
|
@@ -24968,7 +24968,7 @@ ${s.textContent ?? ""}
|
|
|
24968
24968
|
o(c === "markdown" ? Rn(u1) : u1), setTimeout(() => {
|
|
24969
24969
|
p.current = !1;
|
|
24970
24970
|
}, 0);
|
|
24971
|
-
}, [c, o]), { snapshotForUndo: f, undo: y, redo: b } = Pn(h, p, w), { showLinkPrompt: C, linkUrl: L, setLinkUrl: z, linkText: V, setLinkText:
|
|
24971
|
+
}, [c, o]), { snapshotForUndo: f, undo: y, redo: b } = Pn(h, p, w), { showLinkPrompt: C, linkUrl: L, setLinkUrl: z, linkText: V, setLinkText: x, editingAnchorRef: _, openLinkPrompt: k, confirmLink: N, cancelLink: M } = In({
|
|
24972
24972
|
editorRef: h,
|
|
24973
24973
|
snapshotForUndo: f,
|
|
24974
24974
|
emitChange: w
|
|
@@ -25033,13 +25033,13 @@ ${s.textContent ?? ""}
|
|
|
25033
25033
|
}, [W]), C1 = D((a1) => {
|
|
25034
25034
|
const u1 = a1.target, G = u1.closest("a");
|
|
25035
25035
|
if (G) {
|
|
25036
|
-
a1.preventDefault(),
|
|
25036
|
+
a1.preventDefault(), k(G), Z();
|
|
25037
25037
|
return;
|
|
25038
25038
|
}
|
|
25039
25039
|
const K = u1.closest("table");
|
|
25040
25040
|
K ? E(K) : I(), Z();
|
|
25041
25041
|
}, [
|
|
25042
|
-
|
|
25042
|
+
k,
|
|
25043
25043
|
Z,
|
|
25044
25044
|
E,
|
|
25045
25045
|
I
|
|
@@ -25101,7 +25101,7 @@ ${s.textContent ?? ""}
|
|
|
25101
25101
|
exec: W,
|
|
25102
25102
|
applyHeading: X,
|
|
25103
25103
|
insertTaskList: m1,
|
|
25104
|
-
openLinkPrompt: () =>
|
|
25104
|
+
openLinkPrompt: () => k(),
|
|
25105
25105
|
insertTable: t1,
|
|
25106
25106
|
undo: y,
|
|
25107
25107
|
redo: b
|
|
@@ -25110,10 +25110,10 @@ ${s.textContent ?? ""}
|
|
|
25110
25110
|
isEditing: !!_.current,
|
|
25111
25111
|
linkText: V,
|
|
25112
25112
|
linkUrl: L,
|
|
25113
|
-
setLinkText:
|
|
25113
|
+
setLinkText: x,
|
|
25114
25114
|
setLinkUrl: z,
|
|
25115
25115
|
confirmLink: N,
|
|
25116
|
-
cancelLink:
|
|
25116
|
+
cancelLink: M
|
|
25117
25117
|
}),
|
|
25118
25118
|
R && H && /* @__PURE__ */ e(jn, {
|
|
25119
25119
|
pos: H,
|
|
@@ -25268,7 +25268,7 @@ ${s.textContent ?? ""}
|
|
|
25268
25268
|
const [u, g] = B(""), v = j3(), w = m ?? v?.isMobile ?? !1, f = d ?? (w ? v?.isOpen ?? !1 : !0), y = o ?? v?.close ?? (() => {
|
|
25269
25269
|
}), b = p && u ? t.map((_) => ({
|
|
25270
25270
|
..._,
|
|
25271
|
-
items: _.items.filter((
|
|
25271
|
+
items: _.items.filter((k) => k.label.toLowerCase().includes(u.toLowerCase()))
|
|
25272
25272
|
})).filter((_) => _.items.length > 0) : t, C = [
|
|
25273
25273
|
"sidebar",
|
|
25274
25274
|
f ? "sidebar--open" : "sidebar--closed",
|
|
@@ -25280,7 +25280,7 @@ ${s.textContent ?? ""}
|
|
|
25280
25280
|
"--sidebar-shadow": h
|
|
25281
25281
|
}, V = (_) => {
|
|
25282
25282
|
_.onClick?.(), w && y();
|
|
25283
|
-
},
|
|
25283
|
+
}, x = (_) => /* @__PURE__ */ l("button", {
|
|
25284
25284
|
className: [
|
|
25285
25285
|
"sidebar__link",
|
|
25286
25286
|
_.isActive ? "sidebar__link--active" : "",
|
|
@@ -25334,7 +25334,7 @@ ${s.textContent ?? ""}
|
|
|
25334
25334
|
}),
|
|
25335
25335
|
b.length > 0 && /* @__PURE__ */ e("nav", {
|
|
25336
25336
|
className: "sidebar__nav",
|
|
25337
|
-
children: b.map((_,
|
|
25337
|
+
children: b.map((_, k) => /* @__PURE__ */ l("section", {
|
|
25338
25338
|
className: "sidebar__section",
|
|
25339
25339
|
children: [
|
|
25340
25340
|
(_.title || _.heading || _.icon || _.description) && /* @__PURE__ */ l("div", {
|
|
@@ -25359,10 +25359,10 @@ ${s.textContent ?? ""}
|
|
|
25359
25359
|
children: _.description
|
|
25360
25360
|
})]
|
|
25361
25361
|
}),
|
|
25362
|
-
_.items.map((N) => s ? s(N) :
|
|
25363
|
-
_.showDivider &&
|
|
25362
|
+
_.items.map((N) => s ? s(N) : x(N)),
|
|
25363
|
+
_.showDivider && k < b.length - 1 && /* @__PURE__ */ e("div", { className: "sidebar__divider" })
|
|
25364
25364
|
]
|
|
25365
|
-
}, _.id ?? _.title ??
|
|
25365
|
+
}, _.id ?? _.title ?? k))
|
|
25366
25366
|
})
|
|
25367
25367
|
]
|
|
25368
25368
|
})] });
|
|
@@ -25528,39 +25528,39 @@ var so = ({ variant: t = "text", animation: r = "pulse", width: c, height: n, bo
|
|
|
25528
25528
|
Y(() => {
|
|
25529
25529
|
h((V) => V.length === a.length ? V : a);
|
|
25530
25530
|
}, [a]);
|
|
25531
|
-
const g = D((V) => o[V]?.minSize ?? qn, [o]), v = D((V,
|
|
25532
|
-
const N = g(V),
|
|
25533
|
-
let H =
|
|
25534
|
-
return H < N && (H = r && H < N / 2 ? 0 : N), R - H <
|
|
25535
|
-
}, [r, g]), w = D((V, [
|
|
25536
|
-
const
|
|
25537
|
-
return h(
|
|
25538
|
-
}, [i]), f = D((V,
|
|
25531
|
+
const g = D((V) => o[V]?.minSize ?? qn, [o]), v = D((V, x, _, k) => {
|
|
25532
|
+
const N = g(V), M = g(V + 1), R = x + _;
|
|
25533
|
+
let H = x + k;
|
|
25534
|
+
return H < N && (H = r && H < N / 2 ? 0 : N), R - H < M && (H = r && R - H < M / 2 ? R : R - M), [H, R - H];
|
|
25535
|
+
}, [r, g]), w = D((V, [x, _]) => {
|
|
25536
|
+
const k = i.map((N, M) => M === V ? x : M === V + 1 ? _ : N);
|
|
25537
|
+
return h(k), k;
|
|
25538
|
+
}, [i]), f = D((V, x) => {
|
|
25539
25539
|
V.preventDefault(), V.currentTarget.setPointerCapture(V.pointerId), u.current = {
|
|
25540
|
-
index:
|
|
25541
|
-
startA: i[
|
|
25542
|
-
startB: i[
|
|
25540
|
+
index: x,
|
|
25541
|
+
startA: i[x],
|
|
25542
|
+
startB: i[x + 1],
|
|
25543
25543
|
startPosition: d === "horizontal" ? V.clientX : V.clientY
|
|
25544
25544
|
};
|
|
25545
25545
|
}, [d, i]), y = D((V) => {
|
|
25546
|
-
const
|
|
25547
|
-
if (!
|
|
25548
|
-
const
|
|
25546
|
+
const x = u.current, _ = p.current;
|
|
25547
|
+
if (!x || !_) return;
|
|
25548
|
+
const k = _.getBoundingClientRect(), N = d === "horizontal" ? k.width : k.height;
|
|
25549
25549
|
if (N === 0) return;
|
|
25550
|
-
const
|
|
25551
|
-
w(
|
|
25550
|
+
const M = ((d === "horizontal" ? V.clientX : V.clientY) - x.startPosition) / N * 100;
|
|
25551
|
+
w(x.index, v(x.index, x.startA, x.startB, M));
|
|
25552
25552
|
}, [
|
|
25553
25553
|
w,
|
|
25554
25554
|
d,
|
|
25555
25555
|
v
|
|
25556
25556
|
]), b = D((V) => {
|
|
25557
25557
|
u.current && (V.currentTarget.releasePointerCapture(V.pointerId), u.current = null, s?.(i));
|
|
25558
|
-
}, [s, i]), C = D((V,
|
|
25559
|
-
const _ = d === "horizontal" ? "ArrowLeft" : "ArrowUp",
|
|
25560
|
-
if (V.key !== _ && V.key !==
|
|
25558
|
+
}, [s, i]), C = D((V, x) => {
|
|
25559
|
+
const _ = d === "horizontal" ? "ArrowLeft" : "ArrowUp", k = d === "horizontal" ? "ArrowRight" : "ArrowDown";
|
|
25560
|
+
if (V.key !== _ && V.key !== k) return;
|
|
25561
25561
|
V.preventDefault();
|
|
25562
|
-
const N = V.key ===
|
|
25563
|
-
s?.(w(
|
|
25562
|
+
const N = V.key === k ? 1 : -1;
|
|
25563
|
+
s?.(w(x, v(x, i[x], i[x + 1], N * n)));
|
|
25564
25564
|
}, [
|
|
25565
25565
|
w,
|
|
25566
25566
|
n,
|
|
@@ -25583,15 +25583,15 @@ var so = ({ variant: t = "text", animation: r = "pulse", width: c, height: n, bo
|
|
|
25583
25583
|
].filter(Boolean).join(" "),
|
|
25584
25584
|
ref: p,
|
|
25585
25585
|
style: z,
|
|
25586
|
-
children: o.map((V,
|
|
25587
|
-
className: `splitter__pane${i[
|
|
25588
|
-
style: { flexBasis: `${i[
|
|
25586
|
+
children: o.map((V, x) => /* @__PURE__ */ l(p3, { children: [/* @__PURE__ */ e("div", {
|
|
25587
|
+
className: `splitter__pane${i[x] === 0 ? " splitter__pane--collapsed" : ""}`,
|
|
25588
|
+
style: { flexBasis: `${i[x]}%` },
|
|
25589
25589
|
children: V.content
|
|
25590
|
-
}),
|
|
25590
|
+
}), x < o.length - 1 && /* @__PURE__ */ e("div", {
|
|
25591
25591
|
className: "splitter__gutter",
|
|
25592
25592
|
onDoubleClick: L,
|
|
25593
|
-
onKeyDown: (_) => C(_,
|
|
25594
|
-
onPointerDown: (_) => f(_,
|
|
25593
|
+
onKeyDown: (_) => C(_, x),
|
|
25594
|
+
onPointerDown: (_) => f(_, x),
|
|
25595
25595
|
onPointerMove: y,
|
|
25596
25596
|
onPointerUp: b,
|
|
25597
25597
|
tabIndex: 0,
|
|
@@ -25687,9 +25687,9 @@ function n3({ state: t }) {
|
|
|
25687
25687
|
var a3 = 10, go = ({ data: t, label: r, title: c, tooltip: n, enableSearch: s = !1, onRowClick: d }) => {
|
|
25688
25688
|
const [o, m] = B(!1), [a, i] = B(!1), [h, p] = B(""), [u, g] = B(null), [v, w] = B("asc"), f = l1(() => h.trim() ? t.filter((_) => _.name.toLowerCase().includes(h.toLowerCase())) : t, [t, h]), y = l1(() => {
|
|
25689
25689
|
if (!u) return f;
|
|
25690
|
-
const _ = [...f].sort((
|
|
25691
|
-
const
|
|
25692
|
-
return typeof
|
|
25690
|
+
const _ = [...f].sort((k, N) => {
|
|
25691
|
+
const M = u === "name" ? k.name : k.value, R = u === "name" ? N.name : N.value;
|
|
25692
|
+
return typeof M == "number" && typeof R == "number" ? M - R : String(M).localeCompare(String(R));
|
|
25693
25693
|
});
|
|
25694
25694
|
return v === "asc" ? _ : _.reverse();
|
|
25695
25695
|
}, [
|
|
@@ -25701,8 +25701,8 @@ var a3 = 10, go = ({ data: t, label: r, title: c, tooltip: n, enableSearch: s =
|
|
|
25701
25701
|
}, z = D(() => {
|
|
25702
25702
|
i(!a);
|
|
25703
25703
|
}, [a]), V = (_) => {
|
|
25704
|
-
u === _ ? w((
|
|
25705
|
-
},
|
|
25704
|
+
u === _ ? w((k) => k === "asc" ? "desc" : "asc") : (g(_), w("asc"));
|
|
25705
|
+
}, x = l1(() => /* @__PURE__ */ l("div", {
|
|
25706
25706
|
className: "list-suggestions-list",
|
|
25707
25707
|
children: [
|
|
25708
25708
|
/* @__PURE__ */ e(c1, {
|
|
@@ -25734,7 +25734,7 @@ var a3 = 10, go = ({ data: t, label: r, title: c, tooltip: n, enableSearch: s =
|
|
|
25734
25734
|
children: ["Value", /* @__PURE__ */ e(n3, { state: u === "value" ? v : "unsorted" })]
|
|
25735
25735
|
})]
|
|
25736
25736
|
}),
|
|
25737
|
-
b.map((_,
|
|
25737
|
+
b.map((_, k) => /* @__PURE__ */ l("div", {
|
|
25738
25738
|
className: `list-suggestions-list-row ${d ? "list-suggestions-list-row--clickable" : ""}`,
|
|
25739
25739
|
onClick: () => d?.(_),
|
|
25740
25740
|
tabIndex: d ? 0 : void 0,
|
|
@@ -25746,7 +25746,7 @@ var a3 = 10, go = ({ data: t, label: r, title: c, tooltip: n, enableSearch: s =
|
|
|
25746
25746
|
typeof _.value == "string" && _.value,
|
|
25747
25747
|
_.unit
|
|
25748
25748
|
] })]
|
|
25749
|
-
}, `list-suggestions-list-row-${
|
|
25749
|
+
}, `list-suggestions-list-row-${k}`)),
|
|
25750
25750
|
b.length === 0 && /* @__PURE__ */ e("div", {
|
|
25751
25751
|
className: "list-suggestions-list-empty",
|
|
25752
25752
|
children: "No results found"
|
|
@@ -25784,7 +25784,7 @@ var a3 = 10, go = ({ data: t, label: r, title: c, tooltip: n, enableSearch: s =
|
|
|
25784
25784
|
r,
|
|
25785
25785
|
" suggestions"
|
|
25786
25786
|
]
|
|
25787
|
-
}) }), o &&
|
|
25787
|
+
}) }), o && x]
|
|
25788
25788
|
});
|
|
25789
25789
|
}, f0 = [
|
|
25790
25790
|
{
|
|
@@ -26349,10 +26349,10 @@ var a3 = 10, go = ({ data: t, label: r, title: c, tooltip: n, enableSearch: s =
|
|
|
26349
26349
|
if (!(z.ctrlKey || z.metaKey || z.altKey) && !C(z.target))
|
|
26350
26350
|
if (z.key === "[" || z.key === "]") {
|
|
26351
26351
|
z.preventDefault();
|
|
26352
|
-
const V = f0.map((N) => N.value),
|
|
26353
|
-
if (
|
|
26354
|
-
const _ =
|
|
26355
|
-
o(k
|
|
26352
|
+
const V = f0.map((N) => N.value), x = s && s.length > 0 ? V.filter((N) => s.includes(N)) : V;
|
|
26353
|
+
if (x.length === 0) return;
|
|
26354
|
+
const _ = x.indexOf(p), k = ((_ === -1 ? 0 : _) + (z.key === "]" ? 1 : -1) + x.length) % x.length;
|
|
26355
|
+
o(x[k]);
|
|
26356
26356
|
} else z.key === "Escape" && d && (z.preventDefault(), o(null), a(null));
|
|
26357
26357
|
};
|
|
26358
26358
|
return window.addEventListener("keydown", L), () => window.removeEventListener("keydown", L);
|
|
@@ -26497,7 +26497,7 @@ var a3 = 10, go = ({ data: t, label: r, title: c, tooltip: n, enableSearch: s =
|
|
|
26497
26497
|
label: "Glow",
|
|
26498
26498
|
value: "glow-effect"
|
|
26499
26499
|
}
|
|
26500
|
-
], [f, y] = B(""), [b, C] = B(!1), [L, z] = B(!1), [V,
|
|
26500
|
+
], [f, y] = B(""), [b, C] = B(!1), [L, z] = B(!1), [V, x] = B("all"), _ = F(null), k = F(!1), N = n?.trim().toLowerCase() ?? "", M = l1(() => {
|
|
26501
26501
|
let A = f0;
|
|
26502
26502
|
if (c && c.length > 0) {
|
|
26503
26503
|
const T = new Set(c);
|
|
@@ -26517,14 +26517,14 @@ var a3 = 10, go = ({ data: t, label: r, title: c, tooltip: n, enableSearch: s =
|
|
|
26517
26517
|
c
|
|
26518
26518
|
]);
|
|
26519
26519
|
Y(() => {
|
|
26520
|
-
t ? (y(""), C(!1), z(!1),
|
|
26520
|
+
t ? (y(""), C(!1), z(!1), x("all")) : k.current = !1;
|
|
26521
26521
|
}, [t]), Y(() => {
|
|
26522
|
-
if (!t || f || b || L || V !== "all" ||
|
|
26522
|
+
if (!t || f || b || L || V !== "all" || k.current) return;
|
|
26523
26523
|
const A = window.requestAnimationFrame(() => {
|
|
26524
26524
|
_.current?.scrollIntoView({
|
|
26525
26525
|
block: "center",
|
|
26526
26526
|
inline: "nearest"
|
|
26527
|
-
}),
|
|
26527
|
+
}), k.current = !0;
|
|
26528
26528
|
});
|
|
26529
26529
|
return () => window.cancelAnimationFrame(A);
|
|
26530
26530
|
}, [
|
|
@@ -26611,16 +26611,16 @@ var a3 = 10, go = ({ data: t, label: r, title: c, tooltip: n, enableSearch: s =
|
|
|
26611
26611
|
children: ta.map((A) => /* @__PURE__ */ e("button", {
|
|
26612
26612
|
type: "button",
|
|
26613
26613
|
className: `theme-settings__appearance-option ${V === A.value ? "theme-settings__appearance-option--active" : ""}`,
|
|
26614
|
-
onClick: () =>
|
|
26614
|
+
onClick: () => x(A.value),
|
|
26615
26615
|
children: A.label
|
|
26616
26616
|
}, A.value))
|
|
26617
26617
|
}),
|
|
26618
26618
|
/* @__PURE__ */ e("div", {
|
|
26619
26619
|
className: "theme-settings__grid",
|
|
26620
|
-
children:
|
|
26620
|
+
children: M.length === 0 ? /* @__PURE__ */ e("div", {
|
|
26621
26621
|
className: "theme-settings__empty",
|
|
26622
26622
|
children: "No themes found"
|
|
26623
|
-
}) :
|
|
26623
|
+
}) : M.map((A) => /* @__PURE__ */ l("button", {
|
|
26624
26624
|
ref: a === A.value ? _ : null,
|
|
26625
26625
|
type: "button",
|
|
26626
26626
|
className: `theme-settings__swatch ${a === A.value ? "theme-settings__swatch--active" : ""}`,
|
|
@@ -26962,11 +26962,11 @@ var a3 = 10, go = ({ data: t, label: r, title: c, tooltip: n, enableSearch: s =
|
|
|
26962
26962
|
Y(() => {
|
|
26963
26963
|
C.current = a, L.current = i;
|
|
26964
26964
|
}, [a, i]);
|
|
26965
|
-
const
|
|
26965
|
+
const x = D((R) => {
|
|
26966
26966
|
b.current = R, v(R);
|
|
26967
26967
|
}, []), _ = D(() => {
|
|
26968
26968
|
z.current !== null && (clearTimeout(z.current), z.current = null), V.current !== null && (cancelAnimationFrame(V.current), V.current = null);
|
|
26969
|
-
}, []),
|
|
26969
|
+
}, []), k = D((R) => {
|
|
26970
26970
|
V.current = requestAnimationFrame(() => {
|
|
26971
26971
|
V.current = requestAnimationFrame(R);
|
|
26972
26972
|
});
|
|
@@ -26976,19 +26976,19 @@ var a3 = 10, go = ({ data: t, label: r, title: c, tooltip: n, enableSearch: s =
|
|
|
26976
26976
|
const R = p === "collapse";
|
|
26977
26977
|
if (h) {
|
|
26978
26978
|
if (b.current === "entered") return;
|
|
26979
|
-
|
|
26980
|
-
|
|
26979
|
+
x("entering"), R && f(0), k(() => {
|
|
26980
|
+
x("entered"), R && y.current && f(y.current.scrollHeight);
|
|
26981
26981
|
}), z.current = setTimeout(() => {
|
|
26982
26982
|
R && f("auto"), C.current?.();
|
|
26983
26983
|
}, d + s);
|
|
26984
26984
|
return;
|
|
26985
26985
|
}
|
|
26986
|
-
b.current !== "unmounted" && (R && y.current && (f(y.current.scrollHeight),
|
|
26987
|
-
|
|
26986
|
+
b.current !== "unmounted" && (R && y.current && (f(y.current.scrollHeight), k(() => f(0))), x("exiting"), z.current = setTimeout(() => {
|
|
26987
|
+
x("unmounted"), f("auto"), L.current?.();
|
|
26988
26988
|
}, d));
|
|
26989
26989
|
}, [
|
|
26990
|
-
M,
|
|
26991
26990
|
k,
|
|
26991
|
+
x,
|
|
26992
26992
|
_,
|
|
26993
26993
|
s,
|
|
26994
26994
|
d,
|
|
@@ -26999,7 +26999,7 @@ var a3 = 10, go = ({ data: t, label: r, title: c, tooltip: n, enableSearch: s =
|
|
|
26999
26999
|
y.current = R;
|
|
27000
27000
|
}, []);
|
|
27001
27001
|
if (g === "unmounted" && !m) return null;
|
|
27002
|
-
const
|
|
27002
|
+
const M = {
|
|
27003
27003
|
transitionDelay: g === "entering" || g === "entered" ? `${s}ms` : void 0,
|
|
27004
27004
|
transitionDuration: `${d}ms`,
|
|
27005
27005
|
transitionTimingFunction: o,
|
|
@@ -27014,7 +27014,7 @@ var a3 = 10, go = ({ data: t, label: r, title: c, tooltip: n, enableSearch: s =
|
|
|
27014
27014
|
n
|
|
27015
27015
|
].filter(Boolean).join(" "),
|
|
27016
27016
|
ref: N,
|
|
27017
|
-
style:
|
|
27017
|
+
style: M,
|
|
27018
27018
|
children: c
|
|
27019
27019
|
});
|
|
27020
27020
|
}, ia = ({ open: t }) => /* @__PURE__ */ e("svg", {
|
|
@@ -27106,29 +27106,29 @@ var a3 = 10, go = ({ data: t, label: r, title: c, tooltip: n, enableSearch: s =
|
|
|
27106
27106
|
});
|
|
27107
27107
|
}, oa = 96, sa = 6;
|
|
27108
27108
|
function xo({ items: t, renderItem: r, getKey: c, rowHeight: n, overscan: s = sa, maxHeight: d, empty: o, className: m = "", rowClassName: a = "" }) {
|
|
27109
|
-
const i = F(null), [h, p] = B(0), [u, g] = B(0), [v, w] = B(() => window.innerHeight), [f, y] = B(oa), b = n && n > 0 ? n : f, C = D((
|
|
27110
|
-
p(
|
|
27109
|
+
const i = F(null), [h, p] = B(0), [u, g] = B(0), [v, w] = B(() => window.innerHeight), [f, y] = B(oa), b = n && n > 0 ? n : f, C = D((M) => {
|
|
27110
|
+
p(M.currentTarget.scrollTop);
|
|
27111
27111
|
}, []);
|
|
27112
27112
|
Y(() => {
|
|
27113
|
-
const
|
|
27114
|
-
return window.addEventListener("resize",
|
|
27113
|
+
const M = () => w(window.innerHeight);
|
|
27114
|
+
return window.addEventListener("resize", M), () => window.removeEventListener("resize", M);
|
|
27115
27115
|
}, []), Y(() => {
|
|
27116
|
-
const
|
|
27117
|
-
if (!
|
|
27116
|
+
const M = i.current;
|
|
27117
|
+
if (!M) return;
|
|
27118
27118
|
const R = new ResizeObserver((H) => {
|
|
27119
27119
|
const E = H[0]?.contentRect.height ?? 0;
|
|
27120
27120
|
g((I) => Math.abs(I - E) > 0.5 ? E : I);
|
|
27121
27121
|
});
|
|
27122
|
-
return R.observe(
|
|
27122
|
+
return R.observe(M), g(M.clientHeight), () => R.disconnect();
|
|
27123
27123
|
}, []), I2(() => {
|
|
27124
27124
|
i.current && (i.current.scrollTop = 0), p(0);
|
|
27125
27125
|
}, [t]);
|
|
27126
|
-
const L = t.length, z = Math.ceil(Math.min(u || v, v) / b), V = Math.max(1, z + s * 2),
|
|
27126
|
+
const L = t.length, z = Math.ceil(Math.min(u || v, v) / b), V = Math.max(1, z + s * 2), x = Math.max(0, L - V), _ = Math.min(x, Math.max(0, Math.floor(h / b) - s)), k = Math.min(L, _ + V), N = Math.max(0, L - k);
|
|
27127
27127
|
return I2(() => {
|
|
27128
27128
|
if (n) return;
|
|
27129
|
-
const
|
|
27130
|
-
if (!
|
|
27131
|
-
const R =
|
|
27129
|
+
const M = i.current;
|
|
27130
|
+
if (!M) return;
|
|
27131
|
+
const R = M.querySelectorAll("[data-virtual-row]"), H = R[0];
|
|
27132
27132
|
if (!H) return;
|
|
27133
27133
|
const E = R[1] ? R[1].offsetTop - H.offsetTop : H.offsetHeight;
|
|
27134
27134
|
E > 0 && y((I) => Math.abs(I - E) > 0.5 ? E : I);
|
|
@@ -27146,13 +27146,13 @@ function xo({ items: t, renderItem: r, getKey: c, rowHeight: n, overscan: s = sa
|
|
|
27146
27146
|
className: "virtual-list__spacer",
|
|
27147
27147
|
style: { height: _ * b }
|
|
27148
27148
|
}),
|
|
27149
|
-
t.slice(_,
|
|
27149
|
+
t.slice(_, k).map((M, R) => {
|
|
27150
27150
|
const H = _ + R;
|
|
27151
27151
|
return /* @__PURE__ */ e("div", {
|
|
27152
27152
|
className: `virtual-list__row ${a}`.trim(),
|
|
27153
27153
|
"data-virtual-row": "",
|
|
27154
|
-
children: r(
|
|
27155
|
-
}, c(
|
|
27154
|
+
children: r(M, H)
|
|
27155
|
+
}, c(M, H));
|
|
27156
27156
|
}),
|
|
27157
27157
|
N > 0 && /* @__PURE__ */ e("div", {
|
|
27158
27158
|
className: "virtual-list__spacer",
|
|
@@ -27508,7 +27508,7 @@ function No({ isOpen: t, onClose: r }) {
|
|
|
27508
27508
|
});
|
|
27509
27509
|
}
|
|
27510
27510
|
function Vo({ redirectPath: t = "/" }) {
|
|
27511
|
-
const { login: r, verifyMfa: c, config: n, isAuthenticated: s } = H2(), [d, o] = B("credentials"), [m, a] = B(""), [i, h] = B(""), [p, u] = B(!1), [g, v] = B("totp"), [w, f] = B(""), [y, b] = B(!1), [C, L] = B(""), [z, V] = B(!1), [
|
|
27511
|
+
const { login: r, verifyMfa: c, config: n, isAuthenticated: s } = H2(), [d, o] = B("credentials"), [m, a] = B(""), [i, h] = B(""), [p, u] = B(!1), [g, v] = B("totp"), [w, f] = B(""), [y, b] = B(!1), [C, L] = B(""), [z, V] = B(!1), [x, _] = B(!1);
|
|
27512
27512
|
Y(() => {
|
|
27513
27513
|
s && (window.location.href = t);
|
|
27514
27514
|
}, [s, t]), Y(() => {
|
|
@@ -27518,7 +27518,7 @@ function Vo({ redirectPath: t = "/" }) {
|
|
|
27518
27518
|
window.history.replaceState({}, "", H);
|
|
27519
27519
|
}
|
|
27520
27520
|
}, []);
|
|
27521
|
-
const
|
|
27521
|
+
const k = async (H) => {
|
|
27522
27522
|
if (H.preventDefault(), L(""), !m || !i) {
|
|
27523
27523
|
L("Username and password are required");
|
|
27524
27524
|
return;
|
|
@@ -27549,7 +27549,7 @@ function Vo({ redirectPath: t = "/" }) {
|
|
|
27549
27549
|
} finally {
|
|
27550
27550
|
V(!1);
|
|
27551
27551
|
}
|
|
27552
|
-
},
|
|
27552
|
+
}, M = () => {
|
|
27553
27553
|
o("credentials"), f(""), L("");
|
|
27554
27554
|
}, R = g === "email" ? "Enter the code we emailed you. You can also use a recovery code." : "Enter the code from your authenticator app. You can also use a recovery code.";
|
|
27555
27555
|
return /* @__PURE__ */ l(d1, { children: [/* @__PURE__ */ e("div", {
|
|
@@ -27560,7 +27560,7 @@ function Vo({ redirectPath: t = "/" }) {
|
|
|
27560
27560
|
className: "LoginPage__title",
|
|
27561
27561
|
children: n.appName || "Login"
|
|
27562
27562
|
}), d === "credentials" ? /* @__PURE__ */ l("form", {
|
|
27563
|
-
onSubmit:
|
|
27563
|
+
onSubmit: k,
|
|
27564
27564
|
className: "LoginPage__form",
|
|
27565
27565
|
children: [
|
|
27566
27566
|
/* @__PURE__ */ e(N1, {
|
|
@@ -27637,13 +27637,13 @@ function Vo({ redirectPath: t = "/" }) {
|
|
|
27637
27637
|
icon: "clear",
|
|
27638
27638
|
disabled: z,
|
|
27639
27639
|
fullWidth: !0,
|
|
27640
|
-
onClick:
|
|
27640
|
+
onClick: M,
|
|
27641
27641
|
children: "Back"
|
|
27642
27642
|
})
|
|
27643
27643
|
]
|
|
27644
27644
|
})]
|
|
27645
27645
|
})
|
|
27646
|
-
}),
|
|
27646
|
+
}), x && /* @__PURE__ */ e(S2, {
|
|
27647
27647
|
message: "Your session has expired. Please log in again.",
|
|
27648
27648
|
type: "warning",
|
|
27649
27649
|
onClose: () => _(!1)
|
|
@@ -28519,7 +28519,7 @@ var Ca = (function() {
|
|
|
28519
28519
|
"imageSettings"
|
|
28520
28520
|
]), { style: w } = v, f = b2(v, ["style"]), y = g?.src, b = w1.useRef(null), C = w1.useRef(null), L = w1.useCallback((H) => {
|
|
28521
28521
|
b.current = H, typeof c == "function" ? c(H) : c && (c.current = H);
|
|
28522
|
-
}, [c]), [z, V] = w1.useState(!1), { margin:
|
|
28522
|
+
}, [c]), [z, V] = w1.useState(!1), { margin: x, cells: _, numCells: k, calculatedImageSettings: N } = r4({
|
|
28523
28523
|
value: s,
|
|
28524
28524
|
level: o,
|
|
28525
28525
|
minVersion: h,
|
|
@@ -28538,17 +28538,17 @@ var Ca = (function() {
|
|
|
28538
28538
|
A && N.excavation != null && (I = t4(_, N.excavation));
|
|
28539
28539
|
const T = window.devicePixelRatio || 1;
|
|
28540
28540
|
H.height = H.width = d * T;
|
|
28541
|
-
const S = d /
|
|
28542
|
-
E.scale(S, S), E.fillStyle = m, E.fillRect(0, 0,
|
|
28541
|
+
const S = d / k * T;
|
|
28542
|
+
E.scale(S, S), E.fillStyle = m, E.fillRect(0, 0, k, k), E.fillStyle = a, Ca ? E.fill(new Path2D(e4(I, x))) : _.forEach(function($, e1) {
|
|
28543
28543
|
$.forEach(function(O, Z) {
|
|
28544
|
-
O && E.fillRect(Z +
|
|
28544
|
+
O && E.fillRect(Z + x, e1 + x, 1, 1);
|
|
28545
28545
|
});
|
|
28546
|
-
}), N && (E.globalAlpha = N.opacity), A && E.drawImage(J, N.x +
|
|
28546
|
+
}), N && (E.globalAlpha = N.opacity), A && E.drawImage(J, N.x + x, N.y + x, N.w, N.h);
|
|
28547
28547
|
}
|
|
28548
28548
|
}), w1.useEffect(() => {
|
|
28549
28549
|
V(!1);
|
|
28550
28550
|
}, [y]);
|
|
28551
|
-
const
|
|
28551
|
+
const M = _2({
|
|
28552
28552
|
height: d,
|
|
28553
28553
|
width: d
|
|
28554
28554
|
}, w);
|
|
@@ -28563,7 +28563,7 @@ var Ca = (function() {
|
|
|
28563
28563
|
ref: C,
|
|
28564
28564
|
crossOrigin: N?.crossOrigin
|
|
28565
28565
|
})), /* @__PURE__ */ w1.createElement(w1.Fragment, null, /* @__PURE__ */ w1.createElement("canvas", _2({
|
|
28566
|
-
style:
|
|
28566
|
+
style: M,
|
|
28567
28567
|
height: d,
|
|
28568
28568
|
width: d,
|
|
28569
28569
|
ref: L,
|
|
@@ -28624,7 +28624,7 @@ var c4 = w1.forwardRef(function(r, c) {
|
|
|
28624
28624
|
});
|
|
28625
28625
|
c4.displayName = "QRCodeSVG";
|
|
28626
28626
|
function Ro({ isOpen: t, onClose: r }) {
|
|
28627
|
-
const { config: c } = H2(), [n, s] = B("loading"), [d, o] = B(!1), [m, a] = B(null), [i, h] = B(""), [p, u] = B(""), [g, v] = B(""), [w, f] = B(""), [y, b] = B([]), [C, L] = B(""), [z, V] = B(!1), [
|
|
28627
|
+
const { config: c } = H2(), [n, s] = B("loading"), [d, o] = B(!1), [m, a] = B(null), [i, h] = B(""), [p, u] = B(""), [g, v] = B(""), [w, f] = B(""), [y, b] = B([]), [C, L] = B(""), [z, V] = B(!1), [x, _] = B(null), k = D(async (O, Z) => {
|
|
28628
28628
|
const W = document.cookie.match(/(?:^|;\s*)csrf_token=([^;]+)/), X = W ? decodeURIComponent(W[1]) : null, m1 = { "Content-Type": "application/json" };
|
|
28629
28629
|
X && (m1["X-CSRF-Token"] = X);
|
|
28630
28630
|
const t1 = await fetch(`${c.apiBaseUrl}${O}`, {
|
|
@@ -28647,7 +28647,7 @@ function Ro({ isOpen: t, onClose: r }) {
|
|
|
28647
28647
|
Y(() => {
|
|
28648
28648
|
t && (v(""), f(""), L(""), b([]), N());
|
|
28649
28649
|
}, [t, N]);
|
|
28650
|
-
const
|
|
28650
|
+
const M = async (O) => {
|
|
28651
28651
|
V(!0), L("");
|
|
28652
28652
|
try {
|
|
28653
28653
|
await O();
|
|
@@ -28656,27 +28656,27 @@ function Ro({ isOpen: t, onClose: r }) {
|
|
|
28656
28656
|
} finally {
|
|
28657
28657
|
V(!1);
|
|
28658
28658
|
}
|
|
28659
|
-
}, R = () =>
|
|
28660
|
-
const O = await
|
|
28659
|
+
}, R = () => M(async () => {
|
|
28660
|
+
const O = await k("/auth/mfaSetupTotp");
|
|
28661
28661
|
h(O.secret || ""), u(O.otpauthUri || ""), v(""), s("totp-setup");
|
|
28662
|
-
}), H = () =>
|
|
28663
|
-
const O = await
|
|
28662
|
+
}), H = () => M(async () => {
|
|
28663
|
+
const O = await k("/auth/mfaConfirmTotp", { code: g.trim() });
|
|
28664
28664
|
b(O.recoveryCodes || []), s("recovery");
|
|
28665
|
-
}), E = () =>
|
|
28666
|
-
await
|
|
28667
|
-
}), I = () =>
|
|
28668
|
-
const O = await
|
|
28665
|
+
}), E = () => M(async () => {
|
|
28666
|
+
await k("/auth/mfaEnableEmail"), v(""), s("email-setup");
|
|
28667
|
+
}), I = () => M(async () => {
|
|
28668
|
+
const O = await k("/auth/mfaConfirmEmail", { code: g.trim() });
|
|
28669
28669
|
b(O.recoveryCodes || []), s("recovery");
|
|
28670
|
-
}), J = () =>
|
|
28671
|
-
await
|
|
28670
|
+
}), J = () => M(async () => {
|
|
28671
|
+
await k("/auth/mfaDisable", { password: w }), _({
|
|
28672
28672
|
message: "Two-factor authentication disabled.",
|
|
28673
28673
|
type: "success"
|
|
28674
28674
|
}), f(""), await N();
|
|
28675
|
-
}), A = () =>
|
|
28676
|
-
const O = await
|
|
28675
|
+
}), A = () => M(async () => {
|
|
28676
|
+
const O = await k("/auth/mfaRegenRecovery", { password: w });
|
|
28677
28677
|
b(O.recoveryCodes || []), f(""), s("recovery");
|
|
28678
|
-
}), T = () =>
|
|
28679
|
-
await
|
|
28678
|
+
}), T = () => M(async () => {
|
|
28679
|
+
await k("/auth/mfaForgetDevices"), _({
|
|
28680
28680
|
message: "All trusted devices have been signed out.",
|
|
28681
28681
|
type: "success"
|
|
28682
28682
|
});
|
|
@@ -28720,7 +28720,7 @@ function Ro({ isOpen: t, onClose: r }) {
|
|
|
28720
28720
|
variant: "default",
|
|
28721
28721
|
fullWidth: !0,
|
|
28722
28722
|
disabled: z,
|
|
28723
|
-
onClick: () =>
|
|
28723
|
+
onClick: () => M(T),
|
|
28724
28724
|
children: "Sign out trusted devices"
|
|
28725
28725
|
}),
|
|
28726
28726
|
/* @__PURE__ */ e(U, {
|
|
@@ -28929,9 +28929,9 @@ function Ro({ isOpen: t, onClose: r }) {
|
|
|
28929
28929
|
className: "MfaSetupModal__error",
|
|
28930
28930
|
children: C
|
|
28931
28931
|
})]
|
|
28932
|
-
}),
|
|
28933
|
-
message:
|
|
28934
|
-
type:
|
|
28932
|
+
}), x && /* @__PURE__ */ e(S2, {
|
|
28933
|
+
message: x.message,
|
|
28934
|
+
type: x.type,
|
|
28935
28935
|
onClose: () => _(null)
|
|
28936
28936
|
})]
|
|
28937
28937
|
});
|
|
@@ -29153,7 +29153,7 @@ var To = (t, r, c) => {
|
|
|
29153
29153
|
} catch {
|
|
29154
29154
|
return t.trim();
|
|
29155
29155
|
}
|
|
29156
|
-
}, ka = "1.0.
|
|
29156
|
+
}, ka = "1.0.72", Fo = 400, xa = "5295b62", La = "2026-09-29T17:19:09.120Z", Uo = "400", za = (t) => {
|
|
29157
29157
|
const r = document.getElementById("mb-version-toast");
|
|
29158
29158
|
if (r) {
|
|
29159
29159
|
r.remove();
|
|
@@ -29177,7 +29177,7 @@ var To = (t, r, c) => {
|
|
|
29177
29177
|
const r = {
|
|
29178
29178
|
...t,
|
|
29179
29179
|
lib: ka,
|
|
29180
|
-
libBuildNumber:
|
|
29180
|
+
libBuildNumber: 400,
|
|
29181
29181
|
libCommit: xa,
|
|
29182
29182
|
libBuildDate: La
|
|
29183
29183
|
};
|