@cronocode/react-box 3.0.3 → 3.0.5
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/box.cjs +1 -1
- package/box.mjs +15 -15
- package/components/baseSvg.d.ts +3 -0
- package/components/button.cjs +1 -1
- package/components/dropdown.cjs +1 -0
- package/components/dropdown.d.ts +21 -0
- package/components/dropdown.mjs +79 -0
- package/components/flex.mjs +3 -3
- package/components/tooltip.mjs +1 -1
- package/core/boxStyles.d.ts +5 -0
- package/core/variables.d.ts +7 -2
- package/core.cjs +3 -3
- package/core.mjs +462 -269
- package/hooks/useVisibility.d.ts +1 -0
- package/package.json +1 -1
- package/types.d.ts +1 -1
- package/utils/box/boxUtils.d.ts +5 -0
package/core.mjs
CHANGED
|
@@ -1,81 +1,84 @@
|
|
|
1
|
-
import { useMemo as
|
|
2
|
-
function
|
|
3
|
-
return e.reduce((t,
|
|
4
|
-
d && t.push(
|
|
1
|
+
import { useMemo as Q, useLayoutEffect as ce, useEffect as le, useState as fe, useRef as me } from "react";
|
|
2
|
+
function ve(...e) {
|
|
3
|
+
return e.reduce((t, r) => r ? typeof r == "string" ? (t.push(r), t) : Array.isArray(r) ? (t.push(...ve(...r)), t) : (Object.entries(r).forEach(([l, d]) => {
|
|
4
|
+
d && t.push(l);
|
|
5
5
|
}), t) : t, []);
|
|
6
6
|
}
|
|
7
7
|
var n;
|
|
8
8
|
((e) => {
|
|
9
9
|
((t) => {
|
|
10
|
-
function
|
|
10
|
+
function r(d, s) {
|
|
11
11
|
return `${d}${s.replace("/", "-")}`;
|
|
12
12
|
}
|
|
13
|
-
t.fraction =
|
|
14
|
-
function
|
|
13
|
+
t.fraction = r;
|
|
14
|
+
function l(d) {
|
|
15
15
|
return [`${d} path`, `${d} circle`, `${d} rect`, `${d} line`];
|
|
16
16
|
}
|
|
17
|
-
t.svg =
|
|
17
|
+
t.svg = l;
|
|
18
18
|
})(e.ClassName || (e.ClassName = {})), ((t) => {
|
|
19
|
-
function
|
|
20
|
-
return `${
|
|
19
|
+
function r(b) {
|
|
20
|
+
return `${b / 4}rem`;
|
|
21
21
|
}
|
|
22
|
-
t.rem =
|
|
23
|
-
function
|
|
24
|
-
return `${
|
|
22
|
+
t.rem = r;
|
|
23
|
+
function l(b) {
|
|
24
|
+
return `${b}px`;
|
|
25
25
|
}
|
|
26
|
-
t.px =
|
|
27
|
-
function d(
|
|
28
|
-
const [
|
|
29
|
-
return `${+
|
|
26
|
+
t.px = l;
|
|
27
|
+
function d(b, i) {
|
|
28
|
+
const [m, c] = i.split("/");
|
|
29
|
+
return `${+m / +c * 100}%`;
|
|
30
30
|
}
|
|
31
31
|
t.fraction = d;
|
|
32
|
-
function s(
|
|
33
|
-
switch (
|
|
32
|
+
function s(b, i) {
|
|
33
|
+
switch (i) {
|
|
34
34
|
case "fit":
|
|
35
35
|
return "100%";
|
|
36
36
|
case "fit-screen":
|
|
37
|
-
return
|
|
37
|
+
return b.toLocaleLowerCase().includes("height") ? "100vh" : "100vw";
|
|
38
38
|
default:
|
|
39
|
-
return
|
|
39
|
+
return i;
|
|
40
40
|
}
|
|
41
41
|
}
|
|
42
42
|
t.widthHeight = s;
|
|
43
|
-
function
|
|
44
|
-
return (
|
|
43
|
+
function f(b) {
|
|
44
|
+
return (i, m) => `var(--${b}${m});`;
|
|
45
45
|
}
|
|
46
|
-
t.variables =
|
|
47
|
-
function
|
|
48
|
-
return (
|
|
46
|
+
t.variables = f;
|
|
47
|
+
function a(b) {
|
|
48
|
+
return (i, m) => `var(--${b}${m});`;
|
|
49
49
|
}
|
|
50
|
-
t.svgVariables =
|
|
51
|
-
function
|
|
52
|
-
return `repeat(${
|
|
50
|
+
t.svgVariables = a;
|
|
51
|
+
function u(b, i) {
|
|
52
|
+
return `repeat(${i},minmax(0,1fr))`;
|
|
53
53
|
}
|
|
54
|
-
t.gridColumns =
|
|
55
|
-
function b
|
|
56
|
-
return
|
|
54
|
+
t.gridColumns = u;
|
|
55
|
+
function y(b, i) {
|
|
56
|
+
return i === "full-row" ? "1/-1" : `span ${i}/span ${i}`;
|
|
57
57
|
}
|
|
58
|
-
t.gridColumn =
|
|
59
|
-
function
|
|
60
|
-
return `${
|
|
58
|
+
t.gridColumn = y;
|
|
59
|
+
function o(b, i) {
|
|
60
|
+
return `${i}ms`;
|
|
61
61
|
}
|
|
62
|
-
t.ms =
|
|
63
|
-
function v(
|
|
64
|
-
return `${
|
|
62
|
+
t.ms = o;
|
|
63
|
+
function v(b, i) {
|
|
64
|
+
return `${i}deg`;
|
|
65
65
|
}
|
|
66
66
|
t.rotate = v;
|
|
67
|
-
function
|
|
68
|
-
return
|
|
67
|
+
function g(b, i) {
|
|
68
|
+
return i === "xAxis" ? "-1 1" : "1 -1";
|
|
69
69
|
}
|
|
70
|
-
t.flip =
|
|
70
|
+
t.flip = g;
|
|
71
71
|
})(e.Value || (e.Value = {}));
|
|
72
72
|
})(n || (n = {}));
|
|
73
73
|
var W;
|
|
74
74
|
((e) => {
|
|
75
75
|
e.colors = {
|
|
76
|
-
|
|
77
|
-
current: "currentColor",
|
|
76
|
+
currentColor: "currentColor",
|
|
78
77
|
transparent: "transparent",
|
|
78
|
+
green: "green",
|
|
79
|
+
red: "red",
|
|
80
|
+
blue: "blue",
|
|
81
|
+
gray: "gray",
|
|
79
82
|
black: "#000",
|
|
80
83
|
white: "#fff",
|
|
81
84
|
"slate-50": "#f8fafc",
|
|
@@ -266,6 +269,7 @@ var W;
|
|
|
266
269
|
"indigo-900": "#312e81",
|
|
267
270
|
"indigo-950": "#1e1b4b",
|
|
268
271
|
"violet-50": "#f5f3ff",
|
|
272
|
+
"violet-XX": "#9747FF",
|
|
269
273
|
"violet-100": "#ede9fe",
|
|
270
274
|
"violet-200": "#ddd6fe",
|
|
271
275
|
"violet-300": "#c4b5fd",
|
|
@@ -276,6 +280,7 @@ var W;
|
|
|
276
280
|
"violet-800": "#5b21b6",
|
|
277
281
|
"violet-900": "#4c1d95",
|
|
278
282
|
"violet-950": "#2e1065",
|
|
283
|
+
vi: "#7949FF",
|
|
279
284
|
"purple-50": "#faf5ff",
|
|
280
285
|
"purple-100": "#f3e8ff",
|
|
281
286
|
"purple-200": "#e9d5ff",
|
|
@@ -321,22 +326,28 @@ var W;
|
|
|
321
326
|
"rose-900": "#881337",
|
|
322
327
|
"rose-950": "#4c0519"
|
|
323
328
|
};
|
|
324
|
-
const t = {
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
329
|
+
const t = {
|
|
330
|
+
inherit: "inherit",
|
|
331
|
+
none: "none",
|
|
332
|
+
"bg-img-checked": `url("data:image/svg+xml,${encodeURIComponent("<svg xmlns='http://www.w3.org/2000/svg' width='100%' viewBox='0 0 20 20'><path fill='none' stroke='#FFF' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M6 10l3 3l6-6'/></svg>")}")`,
|
|
333
|
+
"bg-img-indeterminate": `url("data:image/svg+xml,${encodeURIComponent(`<svg xmlns='http://www.w3.org/2000/svg' width='100%' viewBox='0 0 20 20'><line stroke='${e.colors["violet-400"]}' x1='4' y1='10' x2='16' y2='10' stroke-width='1' /></svg>`)}")`,
|
|
334
|
+
"bg-img-radio": `url("data:image/svg+xml,${encodeURIComponent("<svg xmlns='http://www.w3.org/2000/svg' width='100%' viewBox='0 0 20 20'><circle fill='#FFF' cx='10' cy='10' r='5'/></svg>")}")`
|
|
335
|
+
}, r = {};
|
|
336
|
+
let l = {};
|
|
337
|
+
function d(a) {
|
|
338
|
+
return a in l ? r[a] = l[a] : a in t ? r[a] = t[a] : a in e.colors ? r[a] = e.colors[a] : r[a] = a, `var(--${a})`;
|
|
328
339
|
}
|
|
329
|
-
e.getVariableValue =
|
|
330
|
-
function
|
|
331
|
-
return Object.entries(
|
|
340
|
+
e.getVariableValue = d;
|
|
341
|
+
function s() {
|
|
342
|
+
return Object.entries(r).map(([a, u]) => `--${a}: ${u};`).join("");
|
|
332
343
|
}
|
|
333
|
-
e.generateVariables =
|
|
334
|
-
function
|
|
335
|
-
|
|
344
|
+
e.generateVariables = s;
|
|
345
|
+
function f(a) {
|
|
346
|
+
l = a;
|
|
336
347
|
}
|
|
337
|
-
e.setUserVariables =
|
|
348
|
+
e.setUserVariables = f;
|
|
338
349
|
})(W || (W = {}));
|
|
339
|
-
const
|
|
350
|
+
const z = W, E = {
|
|
340
351
|
/** The appearance CSS property is used to display UI elements with platform-specific styling, based on the operating system's theme. */
|
|
341
352
|
appearance: [
|
|
342
353
|
{
|
|
@@ -781,8 +792,8 @@ const E = W, j = {
|
|
|
781
792
|
"11/12"
|
|
782
793
|
],
|
|
783
794
|
valueFormat: (e) => {
|
|
784
|
-
const [t,
|
|
785
|
-
return `${+t / +
|
|
795
|
+
const [t, r] = e.split("/");
|
|
796
|
+
return `${+t / +r * 100}%`;
|
|
786
797
|
}
|
|
787
798
|
},
|
|
788
799
|
{
|
|
@@ -833,8 +844,8 @@ const E = W, j = {
|
|
|
833
844
|
"11/12"
|
|
834
845
|
],
|
|
835
846
|
valueFormat: (e) => {
|
|
836
|
-
const [t,
|
|
837
|
-
return `${+t / +
|
|
847
|
+
const [t, r] = e.split("/");
|
|
848
|
+
return `${+t / +r * 100}%`;
|
|
838
849
|
}
|
|
839
850
|
},
|
|
840
851
|
{
|
|
@@ -886,8 +897,8 @@ const E = W, j = {
|
|
|
886
897
|
"11/12"
|
|
887
898
|
],
|
|
888
899
|
valueFormat: (e) => {
|
|
889
|
-
const [t,
|
|
890
|
-
return `${+t / +
|
|
900
|
+
const [t, r] = e.split("/");
|
|
901
|
+
return `${+t / +r * 100}%`;
|
|
891
902
|
}
|
|
892
903
|
},
|
|
893
904
|
{
|
|
@@ -936,8 +947,8 @@ const E = W, j = {
|
|
|
936
947
|
"11/12"
|
|
937
948
|
],
|
|
938
949
|
valueFormat: (e) => {
|
|
939
|
-
const [t,
|
|
940
|
-
return `${+t / +
|
|
950
|
+
const [t, r] = e.split("/");
|
|
951
|
+
return `${+t / +r * 100}%`;
|
|
941
952
|
}
|
|
942
953
|
},
|
|
943
954
|
{
|
|
@@ -988,8 +999,8 @@ const E = W, j = {
|
|
|
988
999
|
"11/12"
|
|
989
1000
|
],
|
|
990
1001
|
valueFormat: (e) => {
|
|
991
|
-
const [t,
|
|
992
|
-
return `${+t / +
|
|
1002
|
+
const [t, r] = e.split("/");
|
|
1003
|
+
return `${+t / +r * 100}%`;
|
|
993
1004
|
}
|
|
994
1005
|
},
|
|
995
1006
|
{
|
|
@@ -1041,8 +1052,8 @@ const E = W, j = {
|
|
|
1041
1052
|
"11/12"
|
|
1042
1053
|
],
|
|
1043
1054
|
valueFormat: (e) => {
|
|
1044
|
-
const [t,
|
|
1045
|
-
return `${+t / +
|
|
1055
|
+
const [t, r] = e.split("/");
|
|
1056
|
+
return `${+t / +r * 100}%`;
|
|
1046
1057
|
}
|
|
1047
1058
|
},
|
|
1048
1059
|
{
|
|
@@ -1459,32 +1470,39 @@ const E = W, j = {
|
|
|
1459
1470
|
],
|
|
1460
1471
|
color: [
|
|
1461
1472
|
{
|
|
1462
|
-
values: Object.keys(
|
|
1473
|
+
values: Object.keys(z.colors),
|
|
1463
1474
|
valueFormat: (e, t) => t(e)
|
|
1464
1475
|
}
|
|
1465
1476
|
],
|
|
1466
1477
|
bgColor: [
|
|
1467
1478
|
{
|
|
1468
|
-
values: Object.keys(
|
|
1479
|
+
values: Object.keys(z.colors),
|
|
1469
1480
|
valueFormat: (e, t) => t(e),
|
|
1470
1481
|
styleName: "background-color"
|
|
1471
1482
|
}
|
|
1472
1483
|
],
|
|
1473
1484
|
borderColor: [
|
|
1474
1485
|
{
|
|
1475
|
-
values: Object.keys(
|
|
1486
|
+
values: Object.keys(z.colors),
|
|
1476
1487
|
valueFormat: (e, t) => t(e),
|
|
1477
1488
|
styleName: "border-color"
|
|
1478
1489
|
}
|
|
1479
1490
|
],
|
|
1480
1491
|
outlineColor: [
|
|
1481
1492
|
{
|
|
1482
|
-
values: Object.keys(
|
|
1493
|
+
values: Object.keys(z.colors),
|
|
1483
1494
|
valueFormat: (e, t) => t(e),
|
|
1484
1495
|
styleName: "outline-color"
|
|
1485
1496
|
}
|
|
1497
|
+
],
|
|
1498
|
+
bgImage: [
|
|
1499
|
+
{
|
|
1500
|
+
values: ["none", "bg-img-checked", "bg-img-indeterminate", "bg-img-radio"],
|
|
1501
|
+
valueFormat: (e, t) => t(e),
|
|
1502
|
+
styleName: "background-image"
|
|
1503
|
+
}
|
|
1486
1504
|
]
|
|
1487
|
-
},
|
|
1505
|
+
}, se = {
|
|
1488
1506
|
hover: ":hover",
|
|
1489
1507
|
focus: ":focus-within",
|
|
1490
1508
|
hasFocus: ":has(:focus)",
|
|
@@ -1497,63 +1515,63 @@ const E = W, j = {
|
|
|
1497
1515
|
hasChecked: ":has(:checked)",
|
|
1498
1516
|
hasRequired: ":has(:required)",
|
|
1499
1517
|
hasDisabled: ":has([disabled])"
|
|
1500
|
-
},
|
|
1518
|
+
}, L = {
|
|
1501
1519
|
indeterminate: ":indeterminate",
|
|
1502
1520
|
checked: ":checked",
|
|
1503
1521
|
required: ":required",
|
|
1504
1522
|
disabled: "[disabled]"
|
|
1505
|
-
},
|
|
1506
|
-
(e, [t],
|
|
1523
|
+
}, Z = { ...se, ...L }, ie = Object.entries(Z).reduce(
|
|
1524
|
+
(e, [t], r) => (e[t] = Math.pow(2, r), e),
|
|
1507
1525
|
{}
|
|
1508
|
-
),
|
|
1526
|
+
), D = Object.entries(Z).reduce(
|
|
1509
1527
|
(e, [t]) => {
|
|
1510
|
-
const
|
|
1511
|
-
return Object.entries(e).forEach(([
|
|
1512
|
-
e[+
|
|
1528
|
+
const r = ie[t];
|
|
1529
|
+
return Object.entries(e).forEach(([l, d]) => {
|
|
1530
|
+
e[+l + r] = [...d, t];
|
|
1513
1531
|
}), e;
|
|
1514
1532
|
},
|
|
1515
1533
|
{ 0: [] }
|
|
1516
|
-
),
|
|
1534
|
+
), K = {
|
|
1517
1535
|
hoverGroup: "hover",
|
|
1518
1536
|
focusGroup: "focus",
|
|
1519
1537
|
activeGroup: "active",
|
|
1520
1538
|
disabledGroup: "disabled"
|
|
1521
|
-
},
|
|
1539
|
+
}, H = {
|
|
1522
1540
|
sm: 640,
|
|
1523
1541
|
md: 768,
|
|
1524
1542
|
lg: 1024,
|
|
1525
1543
|
xl: 1280,
|
|
1526
1544
|
xxl: 1536
|
|
1527
1545
|
};
|
|
1528
|
-
var
|
|
1546
|
+
var q;
|
|
1529
1547
|
((e) => {
|
|
1530
|
-
function t(s,
|
|
1531
|
-
const
|
|
1532
|
-
return
|
|
1533
|
-
|
|
1534
|
-
}),
|
|
1535
|
-
|
|
1536
|
-
}),
|
|
1548
|
+
function t(s, f, a) {
|
|
1549
|
+
const u = { ...s }, y = u.props || {};
|
|
1550
|
+
return f.forEach((o) => {
|
|
1551
|
+
o in u && (y[o] = u[o], delete u[o]);
|
|
1552
|
+
}), a && Object.entries(a).forEach(([o, v]) => {
|
|
1553
|
+
y[o] = v;
|
|
1554
|
+
}), u.props = y, u;
|
|
1537
1555
|
}
|
|
1538
1556
|
e.buildProps = t;
|
|
1539
|
-
function
|
|
1557
|
+
function r(s) {
|
|
1540
1558
|
return !!s && typeof s == "object";
|
|
1541
1559
|
}
|
|
1542
|
-
e.isObject =
|
|
1543
|
-
function
|
|
1544
|
-
return s.reduce((
|
|
1545
|
-
const
|
|
1546
|
-
|
|
1547
|
-
}),
|
|
1560
|
+
e.isObject = r;
|
|
1561
|
+
function l(...s) {
|
|
1562
|
+
return s.reduce((f, a) => (Object.keys(a ?? {}).forEach((u) => {
|
|
1563
|
+
const y = f[u], o = a[u];
|
|
1564
|
+
u in L && typeof o == "boolean" || (u in L && Array.isArray(o) ? f[u] = l(y, o[1] ?? {}) : Array.isArray(y) && Array.isArray(o) ? f[u] = y.concat(...o) : r(y) && r(o) ? f[u] = l(y, o) : f[u] = o);
|
|
1565
|
+
}), f), {});
|
|
1548
1566
|
}
|
|
1549
|
-
e.mergeDeep =
|
|
1550
|
-
function d(s,
|
|
1551
|
-
return s in
|
|
1567
|
+
e.mergeDeep = l;
|
|
1568
|
+
function d(s, f) {
|
|
1569
|
+
return s in f;
|
|
1552
1570
|
}
|
|
1553
1571
|
e.isKeyOf = d;
|
|
1554
|
-
})(
|
|
1555
|
-
const $ =
|
|
1556
|
-
class
|
|
1572
|
+
})(q || (q = {}));
|
|
1573
|
+
const $ = q;
|
|
1574
|
+
class be {
|
|
1557
1575
|
constructor() {
|
|
1558
1576
|
this._index = 0, this._cache = {};
|
|
1559
1577
|
}
|
|
@@ -1561,134 +1579,131 @@ class de {
|
|
|
1561
1579
|
return this._cache[t] || (this._cache[t] = this.getByIndex(this._index++)), this._cache[t];
|
|
1562
1580
|
}
|
|
1563
1581
|
getByIndex(t) {
|
|
1564
|
-
const { first:
|
|
1582
|
+
const { first: r, next: l } = ye, d = t - r.length;
|
|
1565
1583
|
if (d < 0)
|
|
1566
|
-
return
|
|
1567
|
-
const s = Math.floor(d /
|
|
1568
|
-
return this.getByIndex(s) +
|
|
1584
|
+
return r[t];
|
|
1585
|
+
const s = Math.floor(d / l.length), f = d - s * l.length;
|
|
1586
|
+
return this.getByIndex(s) + l[f];
|
|
1569
1587
|
}
|
|
1570
1588
|
}
|
|
1571
|
-
const
|
|
1589
|
+
const ye = {
|
|
1572
1590
|
first: "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ",
|
|
1573
1591
|
next: "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"
|
|
1574
1592
|
};
|
|
1575
|
-
var
|
|
1593
|
+
var R;
|
|
1576
1594
|
((e) => {
|
|
1577
1595
|
e.components = {};
|
|
1578
|
-
})(
|
|
1579
|
-
function
|
|
1580
|
-
const { clean: t, theme:
|
|
1581
|
-
return
|
|
1582
|
-
var
|
|
1596
|
+
})(R || (R = {}));
|
|
1597
|
+
function ge(e) {
|
|
1598
|
+
const { clean: t, theme: r, component: l } = e;
|
|
1599
|
+
return Q(() => {
|
|
1600
|
+
var f;
|
|
1583
1601
|
if (t) return;
|
|
1584
|
-
const d =
|
|
1602
|
+
const d = l == null ? void 0 : l.split(".");
|
|
1585
1603
|
if (!d) return;
|
|
1586
|
-
const s = d.reduce((
|
|
1587
|
-
var
|
|
1588
|
-
return
|
|
1604
|
+
const s = d.reduce((a, u, y) => {
|
|
1605
|
+
var o, v;
|
|
1606
|
+
return y === 0 ? (o = R.components) == null ? void 0 : o[u] : (v = a == null ? void 0 : a.children) == null ? void 0 : v[u];
|
|
1589
1607
|
}, void 0);
|
|
1590
1608
|
if (s)
|
|
1591
|
-
return
|
|
1592
|
-
}, [
|
|
1609
|
+
return r ? $.mergeDeep(s.styles, ((f = s.themes) == null ? void 0 : f[r]) ?? {}) : s.styles;
|
|
1610
|
+
}, [l, t, r]);
|
|
1593
1611
|
}
|
|
1594
|
-
const
|
|
1595
|
-
var
|
|
1596
|
-
const
|
|
1597
|
-
function
|
|
1598
|
-
|
|
1599
|
-
const
|
|
1600
|
-
return
|
|
1601
|
-
|
|
1602
|
-
|
|
1603
|
-
|
|
1604
|
-
const d = a ? $.mergeDeep(a, e) : e;
|
|
1605
|
-
return A.addClassNames(d, u, []), u;
|
|
1606
|
-
}, [e, t, a]);
|
|
1612
|
+
const he = new be(), pe = typeof window < "u" && typeof window.document < "u";
|
|
1613
|
+
var oe;
|
|
1614
|
+
const ne = typeof process == "object" && ((oe = process.env) == null ? void 0 : oe.NODE_ENV) === "test", we = pe && !ne ? ce : le, ue = "_b", S = "_s";
|
|
1615
|
+
function Ne(e, t) {
|
|
1616
|
+
we(A.flush, [e]);
|
|
1617
|
+
const r = ge(e);
|
|
1618
|
+
return Q(() => {
|
|
1619
|
+
const l = [t ? S : ue], d = r ? $.mergeDeep(r, e) : e;
|
|
1620
|
+
return A.addClassNames(d, l, []), l;
|
|
1621
|
+
}, [e, t, r]);
|
|
1607
1622
|
}
|
|
1608
1623
|
var A;
|
|
1609
1624
|
((e) => {
|
|
1610
|
-
let t = !0,
|
|
1611
|
-
function
|
|
1612
|
-
Object.entries(
|
|
1613
|
-
if ($.isKeyOf(
|
|
1614
|
-
|
|
1615
|
-
else if ($.isKeyOf(
|
|
1616
|
-
|
|
1617
|
-
else if ($.isKeyOf(
|
|
1618
|
-
if (Array.isArray(
|
|
1619
|
-
const [
|
|
1620
|
-
|
|
1625
|
+
let t = !0, r = {};
|
|
1626
|
+
function l(o, v, g, b, i) {
|
|
1627
|
+
Object.entries(o).forEach(([m, c]) => {
|
|
1628
|
+
if ($.isKeyOf(m, E))
|
|
1629
|
+
f(m, c, v, g, b, i);
|
|
1630
|
+
else if ($.isKeyOf(m, se))
|
|
1631
|
+
l(c, v, [...g, m], b, i);
|
|
1632
|
+
else if ($.isKeyOf(m, L)) {
|
|
1633
|
+
if (Array.isArray(c)) {
|
|
1634
|
+
const [w, x] = c;
|
|
1635
|
+
l(x, v, [...g, m], b, i);
|
|
1621
1636
|
}
|
|
1622
|
-
$.isObject(
|
|
1623
|
-
} else $.isKeyOf(
|
|
1624
|
-
|
|
1637
|
+
$.isObject(c) && l(c, v, [...g, m], b, i);
|
|
1638
|
+
} else $.isKeyOf(m, H) ? l(c, v, g, m, i) : $.isKeyOf(m, K) && (typeof c == "string" ? v.push(`${K[m]}-${c}`) : Object.entries(c).forEach(([w, x]) => {
|
|
1639
|
+
l(x, v, [...g, K[m]], b, w);
|
|
1625
1640
|
}));
|
|
1626
1641
|
});
|
|
1627
1642
|
}
|
|
1628
|
-
e.addClassNames =
|
|
1643
|
+
e.addClassNames = l;
|
|
1629
1644
|
function d() {
|
|
1630
1645
|
if (!t) return;
|
|
1631
1646
|
console.debug("\x1B[36m%s\x1B[0m", "[react-box]: flush");
|
|
1632
|
-
const
|
|
1647
|
+
const o = Object.entries(E).reduce((m, [c], w) => (m[c] = w, m), {}), v = `:root{--borderColor: black;--outlineColor: black;--lineHeight: 1.2;--fontSize: 14px;--transitionTime: 0.25s;--svgTransitionTime: 0.3s;}#crono-box {position: absolute;top: 0;left: 0;height: 0;}
|
|
1633
1648
|
html{font-size: 16px;font-family: Arial, sans-serif;}
|
|
1634
1649
|
body{margin: 0;line-height: var(--lineHeight);font-size: var(--fontSize);}
|
|
1635
1650
|
a,ul{all: unset;}
|
|
1636
|
-
.${
|
|
1651
|
+
.${ue}{display: block;border: 0 solid var(--borderColor);outline: 0px solid var(--outlineColor);margin: 0;padding: 0;background-color: initial;transition: all var(--transitionTime);box-sizing: border-box;font-family: inherit;font-size: inherit;}
|
|
1637
1652
|
.${S}{display: block;border: 0 solid var(--borderColor);outline: 0px solid var(--outlineColor);margin: 0;padding: 0;transition: all var(--svgTransitionTime);}.${S} path,.${S} circle,.${S} rect,.${S} line {transition: all var(--svgTransitionTime);}
|
|
1638
|
-
`,
|
|
1639
|
-
|
|
1640
|
-
([
|
|
1653
|
+
`, g = Object.entries(r);
|
|
1654
|
+
g.sort(
|
|
1655
|
+
([m], [c]) => (H[m] ?? 0) - (H[c] ?? 0)
|
|
1641
1656
|
);
|
|
1642
|
-
const
|
|
1643
|
-
(
|
|
1644
|
-
const { __parents:
|
|
1645
|
-
|
|
1646
|
-
|
|
1647
|
-
var B,
|
|
1648
|
-
const
|
|
1649
|
-
if (!
|
|
1650
|
-
const
|
|
1651
|
-
|
|
1657
|
+
const b = g.reduce(
|
|
1658
|
+
(m, [c, w]) => (c !== "normal" && m.push(`@media(min-width: ${H[c]}px){`), Object.entries(w).forEach(([x, U]) => {
|
|
1659
|
+
const { __parents: P, ...de } = U, ee = Object.entries(de);
|
|
1660
|
+
ee.sort(([N], [_]) => o[N] - o[_]), ee.forEach(([N, _]) => {
|
|
1661
|
+
_.forEach((C) => {
|
|
1662
|
+
var B, k;
|
|
1663
|
+
const h = E[N].find((F) => Array.isArray(F.values) ? F.values.includes(C) : typeof C == typeof F.values);
|
|
1664
|
+
if (!h) return;
|
|
1665
|
+
const V = a(N, C, +x, c), G = D[+x].map((F) => Z[F]).join(""), p = ((B = h.selector) == null ? void 0 : B.call(h, `.${V}`, G)) ?? `.${V}${G}`, I = Array.isArray(h.styleName) ? h.styleName : [h.styleName ?? N], O = ((k = h.valueFormat) == null ? void 0 : k.call(h, C, z.getVariableValue)) ?? C;
|
|
1666
|
+
m.push(`${p}{${I.map((F) => `${F}:${O}`).join(";")}}`);
|
|
1652
1667
|
});
|
|
1653
|
-
}),
|
|
1654
|
-
const
|
|
1655
|
-
|
|
1656
|
-
|
|
1657
|
-
var
|
|
1658
|
-
const
|
|
1659
|
-
if (!
|
|
1660
|
-
const I =
|
|
1661
|
-
|
|
1668
|
+
}), P && Object.entries(P).forEach(([N, _]) => {
|
|
1669
|
+
const C = Object.entries(_);
|
|
1670
|
+
C.sort(([j], [h]) => o[j] - o[h]), C.forEach(([j, h]) => {
|
|
1671
|
+
h.forEach((V) => {
|
|
1672
|
+
var te, re;
|
|
1673
|
+
const p = E[j].find((T) => Array.isArray(T.values) ? T.values.includes(V) : typeof V == typeof T.values);
|
|
1674
|
+
if (!p) return;
|
|
1675
|
+
const I = a(j, V, +x, c, N), [O] = D[+x], B = ((te = p.selector) == null ? void 0 : te.call(p, `.${O}-${N}:${O} .${I}`, "")) ?? `.${O}-${N}:${O} .${I}`, k = Array.isArray(p.styleName) ? p.styleName : [p.styleName ?? j], F = ((re = p.valueFormat) == null ? void 0 : re.call(p, V, z.getVariableValue)) ?? V;
|
|
1676
|
+
m.push(`${B}{${k.map((T) => `${T}:${F}`).join(";")}}`);
|
|
1662
1677
|
});
|
|
1663
1678
|
});
|
|
1664
1679
|
});
|
|
1665
|
-
}),
|
|
1680
|
+
}), c !== "normal" && m.push("}"), m),
|
|
1666
1681
|
[v]
|
|
1667
1682
|
);
|
|
1668
|
-
|
|
1669
|
-
const
|
|
1670
|
-
|
|
1683
|
+
b.unshift(`:root{${z.generateVariables()}}`);
|
|
1684
|
+
const i = y();
|
|
1685
|
+
i.innerHTML = b.join(""), t = !1;
|
|
1671
1686
|
}
|
|
1672
1687
|
e.flush = d;
|
|
1673
1688
|
function s() {
|
|
1674
|
-
|
|
1689
|
+
r = {};
|
|
1675
1690
|
}
|
|
1676
1691
|
e.clear = s;
|
|
1677
|
-
function
|
|
1692
|
+
function f(o, v, g, b, i = "normal", m) {
|
|
1678
1693
|
if (v == null) return;
|
|
1679
|
-
const
|
|
1680
|
-
|
|
1681
|
-
const
|
|
1682
|
-
|
|
1694
|
+
const c = b.reduce((x, U) => x + ie[U], 0);
|
|
1695
|
+
r[i] ? r[i][c] ? r[i][c][o] || (r[i][c][o] = /* @__PURE__ */ new Set()) : r[i][c] = { [o]: /* @__PURE__ */ new Set() } : r[i] = { [c]: { [o]: /* @__PURE__ */ new Set() } }, m ? (r[i][c].__parents ? r[i][c].__parents[m] ? r[i][c].__parents[m][o] || (r[i][c].__parents[m][o] = /* @__PURE__ */ new Set()) : r[i][c].__parents[m] = { [o]: /* @__PURE__ */ new Set() } : r[i][c].__parents = { [m]: { [o]: /* @__PURE__ */ new Set() } }, r[i][c].__parents[m][o].has(v) || (r[i][c].__parents[m][o].add(v), t = !0)) : r[i][c][o].has(v) || (r[i][c][o].add(v), t = !0);
|
|
1696
|
+
const w = a(o, v, c, i, m);
|
|
1697
|
+
g.push(w);
|
|
1683
1698
|
}
|
|
1684
|
-
function
|
|
1685
|
-
const
|
|
1686
|
-
return
|
|
1699
|
+
function a(o, v, g, b, i) {
|
|
1700
|
+
const m = D[g], c = `${b === "normal" ? "" : `${b}-`}${m.map((w) => `${w}-`).join("")}${i ? `${i}-` : ""}${o}-${v}`;
|
|
1701
|
+
return ne ? c : he.getIdentity(c);
|
|
1687
1702
|
}
|
|
1688
|
-
const
|
|
1689
|
-
function
|
|
1690
|
-
let
|
|
1691
|
-
return
|
|
1703
|
+
const u = "crono-styles";
|
|
1704
|
+
function y() {
|
|
1705
|
+
let o = document.getElementById(u);
|
|
1706
|
+
return o || (o = document.createElement("style"), o.setAttribute("id", u), o.setAttribute("type", "text/css"), document.head.insertBefore(o, document.head.firstChild)), o;
|
|
1692
1707
|
}
|
|
1693
1708
|
})(A || (A = {}));
|
|
1694
1709
|
var ae;
|
|
@@ -1697,143 +1712,321 @@ var ae;
|
|
|
1697
1712
|
})(ae || (ae = {}));
|
|
1698
1713
|
var M;
|
|
1699
1714
|
((e) => {
|
|
1700
|
-
function t(
|
|
1701
|
-
return
|
|
1702
|
-
|
|
1703
|
-
}), Object.entries(d).forEach(([s,
|
|
1704
|
-
const
|
|
1705
|
-
|
|
1706
|
-
}), { extendedProps:
|
|
1715
|
+
function t(r, l, d) {
|
|
1716
|
+
return z.setUserVariables(r), Object.entries(l).forEach(([s, f]) => {
|
|
1717
|
+
E[s] = f;
|
|
1718
|
+
}), Object.entries(d).forEach(([s, f]) => {
|
|
1719
|
+
const a = E[s];
|
|
1720
|
+
E[s] = a ? [...f, ...a] : f;
|
|
1721
|
+
}), { extendedProps: l, extendedPropTypes: d };
|
|
1707
1722
|
}
|
|
1708
1723
|
e.extend = t;
|
|
1709
1724
|
})(M || (M = {}));
|
|
1710
|
-
const
|
|
1725
|
+
const Fe = M;
|
|
1711
1726
|
var X;
|
|
1712
1727
|
((e) => {
|
|
1713
1728
|
const t = {
|
|
1714
1729
|
button: {
|
|
1715
1730
|
styles: {
|
|
1716
|
-
display: "inline-
|
|
1731
|
+
display: "inline-flex",
|
|
1732
|
+
color: "white",
|
|
1733
|
+
bgColor: "violet-500",
|
|
1734
|
+
borderColor: "violet-500",
|
|
1717
1735
|
p: 3,
|
|
1718
1736
|
cursor: "pointer",
|
|
1719
1737
|
b: 1,
|
|
1720
1738
|
borderRadius: 1,
|
|
1721
1739
|
userSelect: "none",
|
|
1740
|
+
hover: {
|
|
1741
|
+
bgColor: "violet-600",
|
|
1742
|
+
borderColor: "violet-600"
|
|
1743
|
+
},
|
|
1722
1744
|
disabled: {
|
|
1723
|
-
cursor: "
|
|
1745
|
+
cursor: "not-allowed",
|
|
1746
|
+
bgColor: "violet-50",
|
|
1747
|
+
color: "gray-400",
|
|
1748
|
+
borderColor: "gray-300"
|
|
1724
1749
|
}
|
|
1725
1750
|
}
|
|
1726
1751
|
},
|
|
1727
|
-
|
|
1752
|
+
textbox: {
|
|
1728
1753
|
styles: {
|
|
1729
|
-
display: "inline-block"
|
|
1754
|
+
display: "inline-block",
|
|
1755
|
+
b: 1,
|
|
1756
|
+
borderColor: "violet-200",
|
|
1757
|
+
bgColor: "violet-50",
|
|
1758
|
+
color: "violet-950",
|
|
1759
|
+
borderRadius: 1,
|
|
1760
|
+
p: 3,
|
|
1761
|
+
transition: "none",
|
|
1762
|
+
hover: {
|
|
1763
|
+
borderColor: "violet-300"
|
|
1764
|
+
},
|
|
1765
|
+
focus: {
|
|
1766
|
+
outline: 1,
|
|
1767
|
+
borderColor: "violet-500",
|
|
1768
|
+
outlineColor: "violet-500"
|
|
1769
|
+
},
|
|
1770
|
+
disabled: {
|
|
1771
|
+
cursor: "not-allowed",
|
|
1772
|
+
bgColor: "violet-50",
|
|
1773
|
+
color: "gray-400",
|
|
1774
|
+
borderColor: "gray-300"
|
|
1775
|
+
}
|
|
1730
1776
|
}
|
|
1731
1777
|
},
|
|
1732
|
-
|
|
1778
|
+
textarea: {
|
|
1733
1779
|
styles: {
|
|
1734
1780
|
display: "inline-block",
|
|
1735
1781
|
b: 1,
|
|
1736
|
-
|
|
1782
|
+
borderColor: "violet-200",
|
|
1783
|
+
bgColor: "violet-50",
|
|
1784
|
+
color: "violet-950",
|
|
1785
|
+
borderRadius: 1,
|
|
1786
|
+
p: 3,
|
|
1787
|
+
transition: "none",
|
|
1788
|
+
hover: {
|
|
1789
|
+
borderColor: "violet-300"
|
|
1790
|
+
},
|
|
1791
|
+
focus: {
|
|
1792
|
+
outline: 1,
|
|
1793
|
+
borderColor: "violet-500",
|
|
1794
|
+
outlineColor: "violet-500"
|
|
1795
|
+
},
|
|
1796
|
+
disabled: {
|
|
1797
|
+
cursor: "not-allowed",
|
|
1798
|
+
bgColor: "violet-50",
|
|
1799
|
+
color: "gray-400",
|
|
1800
|
+
borderColor: "gray-300",
|
|
1801
|
+
resize: "none"
|
|
1802
|
+
}
|
|
1737
1803
|
}
|
|
1738
1804
|
},
|
|
1739
|
-
|
|
1805
|
+
checkbox: {
|
|
1740
1806
|
styles: {
|
|
1741
1807
|
display: "inline-block",
|
|
1808
|
+
appearance: "none",
|
|
1742
1809
|
b: 1,
|
|
1810
|
+
borderColor: "violet-300",
|
|
1743
1811
|
borderRadius: 1,
|
|
1744
|
-
p:
|
|
1812
|
+
p: 2,
|
|
1813
|
+
cursor: "pointer",
|
|
1814
|
+
transition: "none",
|
|
1815
|
+
hover: {
|
|
1816
|
+
borderColor: "violet-500"
|
|
1817
|
+
},
|
|
1818
|
+
focus: {
|
|
1819
|
+
outline: 2,
|
|
1820
|
+
outlineOffset: 2,
|
|
1821
|
+
outlineColor: "violet-500"
|
|
1822
|
+
},
|
|
1823
|
+
checked: {
|
|
1824
|
+
bgColor: "violet-500",
|
|
1825
|
+
borderColor: "violet-500",
|
|
1826
|
+
bgImage: "bg-img-checked"
|
|
1827
|
+
},
|
|
1828
|
+
indeterminate: {
|
|
1829
|
+
color: "violet-500",
|
|
1830
|
+
bgImage: "bg-img-indeterminate"
|
|
1831
|
+
},
|
|
1832
|
+
disabled: {
|
|
1833
|
+
cursor: "not-allowed",
|
|
1834
|
+
bgColor: "violet-100",
|
|
1835
|
+
color: "gray-400",
|
|
1836
|
+
borderColor: "gray-300"
|
|
1837
|
+
}
|
|
1745
1838
|
}
|
|
1746
1839
|
},
|
|
1747
|
-
|
|
1840
|
+
radioButton: {
|
|
1748
1841
|
styles: {
|
|
1749
|
-
|
|
1842
|
+
appearance: "none",
|
|
1843
|
+
b: 1,
|
|
1844
|
+
borderColor: "violet-300",
|
|
1845
|
+
borderRadius: 3,
|
|
1846
|
+
p: 2,
|
|
1847
|
+
cursor: "pointer",
|
|
1848
|
+
transition: "none",
|
|
1849
|
+
hover: {
|
|
1850
|
+
borderColor: "violet-500"
|
|
1851
|
+
},
|
|
1852
|
+
focus: {
|
|
1853
|
+
outline: 2,
|
|
1854
|
+
outlineOffset: 2,
|
|
1855
|
+
outlineColor: "violet-500"
|
|
1856
|
+
},
|
|
1857
|
+
checked: {
|
|
1858
|
+
bgColor: "violet-500",
|
|
1859
|
+
borderColor: "violet-500",
|
|
1860
|
+
bgImage: "bg-img-radio"
|
|
1861
|
+
},
|
|
1862
|
+
disabled: {
|
|
1863
|
+
cursor: "not-allowed",
|
|
1864
|
+
bgColor: "violet-100",
|
|
1865
|
+
color: "gray-400",
|
|
1866
|
+
borderColor: "violet-200"
|
|
1867
|
+
}
|
|
1868
|
+
}
|
|
1869
|
+
},
|
|
1870
|
+
dropdown: {
|
|
1871
|
+
styles: {
|
|
1872
|
+
display: "inline-flex",
|
|
1873
|
+
ai: "center",
|
|
1874
|
+
gap: 2,
|
|
1875
|
+
jc: "space-between",
|
|
1876
|
+
p: 3,
|
|
1877
|
+
cursor: "pointer",
|
|
1878
|
+
bgColor: "violet-50",
|
|
1879
|
+
color: "violet-950",
|
|
1750
1880
|
b: 1,
|
|
1751
|
-
|
|
1881
|
+
borderColor: "violet-200",
|
|
1882
|
+
borderRadius: 1,
|
|
1883
|
+
userSelect: "none",
|
|
1884
|
+
lineHeight: 20,
|
|
1885
|
+
minWidth: 40,
|
|
1886
|
+
transition: "none",
|
|
1887
|
+
hover: {
|
|
1888
|
+
borderColor: "violet-300"
|
|
1889
|
+
},
|
|
1890
|
+
focus: {
|
|
1891
|
+
outline: 1,
|
|
1892
|
+
borderColor: "violet-500",
|
|
1893
|
+
outlineColor: "violet-500"
|
|
1894
|
+
},
|
|
1895
|
+
disabled: {
|
|
1896
|
+
cursor: "not-allowed",
|
|
1897
|
+
bgColor: "violet-50",
|
|
1898
|
+
color: "gray-400",
|
|
1899
|
+
borderColor: "gray-300"
|
|
1900
|
+
}
|
|
1901
|
+
},
|
|
1902
|
+
children: {
|
|
1903
|
+
items: {
|
|
1904
|
+
styles: {
|
|
1905
|
+
p: 1,
|
|
1906
|
+
b: 1,
|
|
1907
|
+
borderRadius: 1,
|
|
1908
|
+
position: "relative",
|
|
1909
|
+
top: 1,
|
|
1910
|
+
bgColor: "white",
|
|
1911
|
+
overflow: "auto",
|
|
1912
|
+
maxHeight: 62,
|
|
1913
|
+
borderColor: "violet-300",
|
|
1914
|
+
color: "violet-950"
|
|
1915
|
+
}
|
|
1916
|
+
},
|
|
1917
|
+
item: {
|
|
1918
|
+
styles: {
|
|
1919
|
+
display: "flex",
|
|
1920
|
+
width: "fit",
|
|
1921
|
+
p: 3,
|
|
1922
|
+
cursor: "pointer",
|
|
1923
|
+
lineHeight: 20,
|
|
1924
|
+
borderRadius: 1,
|
|
1925
|
+
hover: {
|
|
1926
|
+
bgColor: "violet-50"
|
|
1927
|
+
},
|
|
1928
|
+
focus: {
|
|
1929
|
+
bgColor: "violet-50"
|
|
1930
|
+
}
|
|
1931
|
+
}
|
|
1932
|
+
}
|
|
1752
1933
|
}
|
|
1753
1934
|
}
|
|
1754
|
-
// dropdown: {
|
|
1755
|
-
// styles: {
|
|
1756
|
-
// width: 'min-content',
|
|
1757
|
-
// b: 1,
|
|
1758
|
-
// borderRadius: 1,
|
|
1759
|
-
// p: 3,
|
|
1760
|
-
// cursor: 'pointer',
|
|
1761
|
-
// },
|
|
1762
|
-
// children: {
|
|
1763
|
-
// items: {
|
|
1764
|
-
// styles: {
|
|
1765
|
-
// b: 1,
|
|
1766
|
-
// },
|
|
1767
|
-
// },
|
|
1768
|
-
// },
|
|
1769
|
-
// },
|
|
1770
1935
|
};
|
|
1771
|
-
function
|
|
1772
|
-
const { components: d, ...s } =
|
|
1773
|
-
Object.entries(s).forEach(([
|
|
1774
|
-
|
|
1775
|
-
}),
|
|
1936
|
+
function r(l) {
|
|
1937
|
+
const { components: d, ...s } = l, f = d ?? {};
|
|
1938
|
+
Object.entries(s).forEach(([a, u]) => {
|
|
1939
|
+
f[a] = u;
|
|
1940
|
+
}), R.components = $.mergeDeep(t, f);
|
|
1776
1941
|
}
|
|
1777
|
-
e.setup =
|
|
1942
|
+
e.setup = r, R.components = { ...t };
|
|
1778
1943
|
})(X || (X = {}));
|
|
1779
|
-
const
|
|
1944
|
+
const $e = X;
|
|
1780
1945
|
var Y;
|
|
1781
1946
|
((e) => {
|
|
1782
|
-
function t(
|
|
1783
|
-
|
|
1784
|
-
|
|
1785
|
-
|
|
1786
|
-
|
|
1947
|
+
function t(r, l, d) {
|
|
1948
|
+
r !== void 0 && r != null && (d[l] = Array.isArray(r) ? r[0] : r);
|
|
1949
|
+
}
|
|
1950
|
+
e.assignBooleanProp = t;
|
|
1951
|
+
})(Y || (Y = {}));
|
|
1952
|
+
const Ce = Y;
|
|
1953
|
+
function Ve() {
|
|
1954
|
+
return Q(() => {
|
|
1955
|
+
const e = "crono-box";
|
|
1956
|
+
let t = document.getElementById(e);
|
|
1957
|
+
return t || (t = document.createElement("div"), t.id = e, document.body.appendChild(t)), t;
|
|
1958
|
+
}, []);
|
|
1959
|
+
}
|
|
1960
|
+
function ze(e = null) {
|
|
1961
|
+
const [t, r] = fe(!1), l = me(null);
|
|
1962
|
+
return le(() => {
|
|
1963
|
+
function d(a) {
|
|
1964
|
+
const u = e ?? l.current;
|
|
1965
|
+
(u == null ? void 0 : u.contains(a.target)) === !1 && r(!1);
|
|
1966
|
+
}
|
|
1967
|
+
function s() {
|
|
1968
|
+
r(!1);
|
|
1969
|
+
}
|
|
1970
|
+
function f(a) {
|
|
1971
|
+
a.key === "Escape" && r(!1);
|
|
1972
|
+
}
|
|
1973
|
+
return t && (window.addEventListener("mousedown", d), window.addEventListener("resize", s), window.addEventListener("keydown", f)), () => {
|
|
1974
|
+
window.removeEventListener("mousedown", d), window.removeEventListener("resize", s), window.removeEventListener("keydown", f);
|
|
1975
|
+
};
|
|
1976
|
+
}, [e, t]), [t, r, l];
|
|
1977
|
+
}
|
|
1978
|
+
var J;
|
|
1979
|
+
((e) => {
|
|
1980
|
+
function t(l) {
|
|
1981
|
+
const d = Array.from(l.elements).reduce(
|
|
1982
|
+
(s, f) => {
|
|
1983
|
+
const a = f.name;
|
|
1984
|
+
return a && (s[a] || (s[a] = []), s[a].push(f)), s;
|
|
1787
1985
|
},
|
|
1788
1986
|
{}
|
|
1789
1987
|
);
|
|
1790
|
-
return Object.entries(d).reduce((s, [
|
|
1791
|
-
if (
|
|
1792
|
-
const
|
|
1793
|
-
|
|
1988
|
+
return Object.entries(d).reduce((s, [f, a]) => {
|
|
1989
|
+
if (a.length === 1) {
|
|
1990
|
+
const u = a[0];
|
|
1991
|
+
r(s, f, u.type === "checkbox" || u.type === "radio" ? u.checked : u.value);
|
|
1794
1992
|
} else {
|
|
1795
|
-
const
|
|
1796
|
-
|
|
1993
|
+
const u = a.reduce((y, o) => (o.type === "checkbox" || o.type === "radio" ? o.checked && y.push(o.value) : y.push(o.value), y), []);
|
|
1994
|
+
r(s, f, u);
|
|
1797
1995
|
}
|
|
1798
1996
|
return s;
|
|
1799
1997
|
}, {});
|
|
1800
1998
|
}
|
|
1801
1999
|
e.getFormEntries = t;
|
|
1802
|
-
function
|
|
2000
|
+
function r(l, d, s) {
|
|
1803
2001
|
if (d.includes(".")) {
|
|
1804
|
-
const
|
|
1805
|
-
let
|
|
1806
|
-
|
|
1807
|
-
if (
|
|
1808
|
-
const
|
|
1809
|
-
if (
|
|
1810
|
-
const [, v,
|
|
1811
|
-
|
|
2002
|
+
const f = d.split(".");
|
|
2003
|
+
let a = l;
|
|
2004
|
+
f.forEach((u, y) => {
|
|
2005
|
+
if (f.length > y + 1) {
|
|
2006
|
+
const o = u.match(/^(.+)\[(\d)\]$/);
|
|
2007
|
+
if (o) {
|
|
2008
|
+
const [, v, g] = o;
|
|
2009
|
+
a[v] = a[v] || [], a[v][g] = a[v][g] || {}, a = a[v][g];
|
|
1812
2010
|
} else
|
|
1813
|
-
|
|
2011
|
+
a[u] = a[u] || {}, a = a[u];
|
|
1814
2012
|
} else
|
|
1815
|
-
|
|
2013
|
+
a[u] = s;
|
|
1816
2014
|
});
|
|
1817
2015
|
} else
|
|
1818
|
-
|
|
2016
|
+
l[d] = s;
|
|
1819
2017
|
}
|
|
1820
|
-
})(
|
|
1821
|
-
const
|
|
1822
|
-
function Fe() {
|
|
1823
|
-
return J(() => {
|
|
1824
|
-
const e = "crono-box";
|
|
1825
|
-
let t = document.getElementById(e);
|
|
1826
|
-
return t || (t = document.createElement("div"), t.id = e, document.body.appendChild(t)), t;
|
|
1827
|
-
}, []);
|
|
1828
|
-
}
|
|
2018
|
+
})(J || (J = {}));
|
|
2019
|
+
const Ee = J;
|
|
1829
2020
|
export {
|
|
1830
|
-
|
|
1831
|
-
|
|
2021
|
+
Fe as B,
|
|
2022
|
+
Ee as F,
|
|
1832
2023
|
$ as O,
|
|
1833
2024
|
ae as S,
|
|
1834
|
-
|
|
1835
|
-
|
|
1836
|
-
|
|
1837
|
-
|
|
1838
|
-
|
|
2025
|
+
$e as T,
|
|
2026
|
+
z as V,
|
|
2027
|
+
Ce as a,
|
|
2028
|
+
ze as b,
|
|
2029
|
+
ve as c,
|
|
2030
|
+
Ve as d,
|
|
2031
|
+
Ne as u
|
|
1839
2032
|
};
|