@sheetxl/utils-react 0.8.0-beta.12 → 0.8.0-beta.13
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/browser/esm/{BRSmfawI3Q6E-zEp.mjs → C9cj9Q5Dz4HCqZD5.mjs} +2 -2
- package/browser/esm/{CgZsWqv--yJ6E3Od.mjs → CBSoiJLg4s9wQNWS.mjs} +1 -1
- package/browser/esm/index.mjs +808 -787
- package/browser/esm/qXzD8cuG5Vm6-bvO.mjs +100 -0
- package/node/esm/{DFsKZrWF_hSPLITK.mjs → BMnj0YLpW6Ayd6Yv.mjs} +1 -1
- package/node/esm/CV1IAozST8HB0Ur0.mjs +100 -0
- package/node/esm/index.mjs +594 -573
- package/package.json +2 -2
- package/types/src/float/FloatStackContext.d.ts +8 -0
- package/types/src/float/_FloatUtils.d.ts +6 -0
- package/types/src/icons/packs/Base.json.d.ts +35 -0
- package/types/src/theme/zIndex.d.ts +2 -2
- package/browser/esm/Cxre-SkPvvodNriU.mjs +0 -100
- package/node/esm/DFqqRMnmEo_UAEFa.mjs +0 -100
package/node/esm/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license @sheetxl/utils-react - Utils React - Utilities for React capabilities needed for all SheetXL components. - v0.8.0-beta.
|
|
2
|
+
* @license @sheetxl/utils-react - Utils React - Utilities for React capabilities needed for all SheetXL components. - v0.8.0-beta.13
|
|
3
3
|
*
|
|
4
4
|
* (C) 2026-present SheetXL Inc. & Michael T. Ford
|
|
5
5
|
* License: The license can be found at https://www.sheetxl.com/license.
|
|
@@ -9,8 +9,8 @@ import * as d from "react";
|
|
|
9
9
|
import f, { Component as p, cloneElement as m, createContext as g, createElement as _, forwardRef as v, isValidElement as y, lazy as b, memo as w, useCallback as x, useContext as S, useEffect as M, useId as C, useImperativeHandle as E, useLayoutEffect as T, useMemo as L, useReducer as k, useRef as z, useState as A, useSyncExternalStore as D } from "react";
|
|
10
10
|
import { Fragment as P, jsx as R, jsxs as $ } from "react/jsx-runtime";
|
|
11
11
|
import * as B from "detect-it";
|
|
12
|
-
import { createRoot as
|
|
13
|
-
import { createPortal as
|
|
12
|
+
import { createRoot as O } from "react-dom/client";
|
|
13
|
+
import { createPortal as I, unstable_batchedUpdates as H } from "react-dom";
|
|
14
14
|
import { useMergeRefs as N } from "react-merge-refs";
|
|
15
15
|
import F from "clsx";
|
|
16
16
|
import { autoUpdate as W, flip as V, offset as K, shift as j, size as Y, useFloating as X } from "@floating-ui/react-dom";
|
|
@@ -940,14 +940,14 @@ var Ae = class {
|
|
|
940
940
|
};
|
|
941
941
|
}
|
|
942
942
|
}, $e = G({
|
|
943
|
-
EmptyCssProperties: () =>
|
|
943
|
+
EmptyCssProperties: () => Oe,
|
|
944
944
|
createSyntheticEvent: () => qe,
|
|
945
945
|
detectIt: () => Fe,
|
|
946
946
|
edgeCenter: () => Xe,
|
|
947
947
|
edgeTrailingShift: () => Ye,
|
|
948
948
|
focusableNodeNames: () => Be,
|
|
949
949
|
getDevicePixelRatio: () => We,
|
|
950
|
-
isEditable: () =>
|
|
950
|
+
isEditable: () => He,
|
|
951
951
|
replaceRangeText: () => Ne,
|
|
952
952
|
snapDeviceEdge: () => Ke,
|
|
953
953
|
snapDeviceWidth: () => Ve,
|
|
@@ -957,7 +957,7 @@ var Ae = class {
|
|
|
957
957
|
"INPUT",
|
|
958
958
|
"TEXTAREA",
|
|
959
959
|
"SELECT"
|
|
960
|
-
]),
|
|
960
|
+
]), Oe = {}, Ie = /* @__PURE__ */ new Set([
|
|
961
961
|
"button",
|
|
962
962
|
"checkbox",
|
|
963
963
|
"radio",
|
|
@@ -969,10 +969,10 @@ var Ae = class {
|
|
|
969
969
|
"image",
|
|
970
970
|
"hidden"
|
|
971
971
|
]);
|
|
972
|
-
function
|
|
972
|
+
function He(e) {
|
|
973
973
|
if (!e) return !1;
|
|
974
974
|
const t = e.tagName;
|
|
975
|
-
return "TEXTAREA" === t || ("INPUT" === t ? !
|
|
975
|
+
return "TEXTAREA" === t || ("INPUT" === t ? !Ie.has(e.type) : !0 === e.isContentEditable);
|
|
976
976
|
}
|
|
977
977
|
function Ne(e, t, n, r) {
|
|
978
978
|
e.setSelectionRange(t, n);
|
|
@@ -1043,7 +1043,7 @@ function Ue(e, t, n) {
|
|
|
1043
1043
|
const t = e.type ? `[type=${e.type}]` : "", n = e.getAttribute?.("class")?.split(" ").slice(0, 2).join(".") ?? "";
|
|
1044
1044
|
return `${e.tagName.toLowerCase()}${t}${n ? "." + n : ""}`;
|
|
1045
1045
|
})(r),
|
|
1046
|
-
editable:
|
|
1046
|
+
editable: He(r),
|
|
1047
1047
|
delivery: e.nativeEvent ? "synthetic" : "native"
|
|
1048
1048
|
});
|
|
1049
1049
|
}
|
|
@@ -1337,8 +1337,11 @@ var xt = g(null), St = xt.Provider;
|
|
|
1337
1337
|
function Mt() {
|
|
1338
1338
|
return S(xt);
|
|
1339
1339
|
}
|
|
1340
|
-
var Ct = g(null), Et = Ct.Provider, Tt = () => S(Ct)
|
|
1341
|
-
|
|
1340
|
+
var Ct = g(null), Et = Ct.Provider, Tt = () => S(Ct), Lt = () => () => {}, kt = () => {
|
|
1341
|
+
const e = Tt(), t = e?.getRoot();
|
|
1342
|
+
return D(t?.subscribeOpenPopups ?? Lt, () => t?.isPopupOpenOutside(e) ?? !1, () => !1);
|
|
1343
|
+
};
|
|
1344
|
+
function zt(e, t) {
|
|
1342
1345
|
const n = mt(), r = yt(), o = Array.isArray(e) ? e.join("\0") : String(e), i = L(() => Array.isArray(e) ? [...e] : [e], [o]), s = z(t);
|
|
1343
1346
|
s.current = t;
|
|
1344
1347
|
const l = Tt(), a = z(l);
|
|
@@ -1373,7 +1376,7 @@ function Lt(e, t) {
|
|
|
1373
1376
|
r
|
|
1374
1377
|
]);
|
|
1375
1378
|
}
|
|
1376
|
-
function
|
|
1379
|
+
function At(e) {
|
|
1377
1380
|
const t = ut();
|
|
1378
1381
|
M(() => {
|
|
1379
1382
|
if (!t) return;
|
|
@@ -1387,7 +1390,7 @@ function kt(e) {
|
|
|
1387
1390
|
};
|
|
1388
1391
|
}, [t, e]);
|
|
1389
1392
|
}
|
|
1390
|
-
var
|
|
1393
|
+
var Dt = G({
|
|
1391
1394
|
ACCUMULATE: () => ne,
|
|
1392
1395
|
CommandAnchorProvider: () => gt,
|
|
1393
1396
|
CommandButtonEntryLabel: () => fe,
|
|
@@ -1440,20 +1443,20 @@ var zt = G({
|
|
|
1440
1443
|
useCommandRegistry: () => Le,
|
|
1441
1444
|
useCommandResolver: () => mt,
|
|
1442
1445
|
useCommandScope: () => ut,
|
|
1443
|
-
useCommands: () =>
|
|
1444
|
-
useContributeCommands: () =>
|
|
1445
|
-
}),
|
|
1446
|
+
useCommands: () => zt,
|
|
1447
|
+
useContributeCommands: () => At
|
|
1448
|
+
}), Pt = "idle", Rt = g({
|
|
1446
1449
|
mode: "idle",
|
|
1447
1450
|
interrupt: () => {}
|
|
1448
1451
|
});
|
|
1449
|
-
function
|
|
1450
|
-
return S(
|
|
1452
|
+
function $t() {
|
|
1453
|
+
return S(Rt);
|
|
1451
1454
|
}
|
|
1452
|
-
function
|
|
1453
|
-
const t =
|
|
1454
|
-
r(
|
|
1455
|
+
function Bt({ children: e }) {
|
|
1456
|
+
const t = $t(), [n, r] = A(Pt), o = z(null), i = x(() => {
|
|
1457
|
+
r(Pt), null !== o.current && clearTimeout(o.current), o.current = setTimeout(() => r(Pt), 400);
|
|
1455
1458
|
}, []), s = "interrupted" === n || "interrupted" === t?.mode ? "interrupted" : "idle";
|
|
1456
|
-
return R(
|
|
1459
|
+
return R(Rt.Provider, {
|
|
1457
1460
|
value: {
|
|
1458
1461
|
mode: s,
|
|
1459
1462
|
interrupt: i
|
|
@@ -1461,21 +1464,21 @@ function Rt({ children: e }) {
|
|
|
1461
1464
|
children: e
|
|
1462
1465
|
});
|
|
1463
1466
|
}
|
|
1464
|
-
var
|
|
1467
|
+
var Ot = {
|
|
1465
1468
|
Default: "default",
|
|
1466
1469
|
Error: "error",
|
|
1467
1470
|
Success: "success",
|
|
1468
1471
|
Warning: "warning",
|
|
1469
1472
|
Info: "info"
|
|
1470
1473
|
};
|
|
1471
|
-
function
|
|
1474
|
+
function It(e = () => {}, t = () => {}, n = () => {}) {
|
|
1472
1475
|
const r = () => e();
|
|
1473
1476
|
return r.setProgress = t, r.setMessage = n, r;
|
|
1474
1477
|
}
|
|
1475
|
-
function
|
|
1476
|
-
return
|
|
1478
|
+
function Ht() {
|
|
1479
|
+
return It();
|
|
1477
1480
|
}
|
|
1478
|
-
var
|
|
1481
|
+
var Nt = [
|
|
1479
1482
|
"debug",
|
|
1480
1483
|
"log",
|
|
1481
1484
|
"warn",
|
|
@@ -1486,9 +1489,9 @@ var Ht = [
|
|
|
1486
1489
|
"showWindow",
|
|
1487
1490
|
"showOptions",
|
|
1488
1491
|
"showInput"
|
|
1489
|
-
],
|
|
1492
|
+
], Ft = (...e) => {
|
|
1490
1493
|
const t = {};
|
|
1491
|
-
for (const n of
|
|
1494
|
+
for (const n of Nt) for (const r of e) {
|
|
1492
1495
|
const e = r?.[n];
|
|
1493
1496
|
if ("function" == typeof e) {
|
|
1494
1497
|
t[n] = e.bind(r);
|
|
@@ -1496,46 +1499,46 @@ var Ht = [
|
|
|
1496
1499
|
}
|
|
1497
1500
|
}
|
|
1498
1501
|
return t;
|
|
1499
|
-
},
|
|
1502
|
+
}, Wt = {
|
|
1500
1503
|
debug: (e, t) => o.debug(e, t),
|
|
1501
1504
|
log: (e, t) => o.log(e, t),
|
|
1502
1505
|
warn: (e, t) => o.warn(e, t),
|
|
1503
1506
|
error: (e, t) => o.error(e, t),
|
|
1504
1507
|
showMessage: () => {},
|
|
1505
1508
|
showError: (e) => o.error(e),
|
|
1506
|
-
showBusy: () => Promise.resolve(
|
|
1509
|
+
showBusy: () => Promise.resolve(Ht()),
|
|
1507
1510
|
showWindow: () => Promise.resolve(document.createElement("div")),
|
|
1508
1511
|
showOptions: () => Promise.resolve(""),
|
|
1509
1512
|
showInput: () => Promise.resolve({
|
|
1510
1513
|
input: "",
|
|
1511
1514
|
option: ""
|
|
1512
1515
|
})
|
|
1513
|
-
},
|
|
1514
|
-
const n = S(
|
|
1515
|
-
return _(
|
|
1516
|
-
},
|
|
1517
|
-
const e = S(
|
|
1518
|
-
return L(() =>
|
|
1519
|
-
},
|
|
1516
|
+
}, Vt = g(e.EmptyObject), Kt = ({ children: e, notifier: t }) => {
|
|
1517
|
+
const n = S(Vt), r = L(() => Ft(n, t), [n, t]);
|
|
1518
|
+
return _(Vt.Provider, { value: r }, e);
|
|
1519
|
+
}, jt = () => {
|
|
1520
|
+
const e = S(Vt);
|
|
1521
|
+
return L(() => Ft(e, Wt), [e]);
|
|
1522
|
+
}, Yt = (e, t) => {
|
|
1520
1523
|
const n = x((...t) => e?.(...t), t), r = z(null);
|
|
1521
1524
|
r.current = n;
|
|
1522
1525
|
const o = x((...e) => r.current?.(...e), []);
|
|
1523
1526
|
if (r.current) return o;
|
|
1524
|
-
},
|
|
1525
|
-
function
|
|
1526
|
-
const n = x((t) => e ? e(t) :
|
|
1527
|
+
}, Xt = () => {};
|
|
1528
|
+
function Zt(e, t) {
|
|
1529
|
+
const n = x((t) => e ? e(t) : Xt, [e]), r = x(() => t ? t() : null, [t]);
|
|
1527
1530
|
return D(n, r, r);
|
|
1528
1531
|
}
|
|
1529
|
-
function
|
|
1532
|
+
function qt(e, t) {
|
|
1530
1533
|
const n = x((t) => e.subscribe(t), [e]), r = x(() => t(e), [e, t]);
|
|
1531
1534
|
return D(n, r, r);
|
|
1532
1535
|
}
|
|
1533
|
-
var
|
|
1534
|
-
function
|
|
1535
|
-
const n = x((t) => e ? e.subscribe(t) :
|
|
1536
|
+
var Ut = () => {};
|
|
1537
|
+
function Gt(e, t) {
|
|
1538
|
+
const n = x((t) => e ? e.subscribe(t) : Ut, [e]), r = x(() => e ? t(e) : null, [e, t]);
|
|
1536
1539
|
return D(n, r, r);
|
|
1537
1540
|
}
|
|
1538
|
-
function
|
|
1541
|
+
function Jt(e) {
|
|
1539
1542
|
const [t, n] = A("undefined" != typeof window ? window.devicePixelRatio : 1), r = z(null);
|
|
1540
1543
|
return M(() => {
|
|
1541
1544
|
if ("undefined" == typeof window || !("matchMedia" in window)) return;
|
|
@@ -1554,13 +1557,13 @@ function Ut(e) {
|
|
|
1554
1557
|
};
|
|
1555
1558
|
}, [e]), t;
|
|
1556
1559
|
}
|
|
1557
|
-
function
|
|
1560
|
+
function Qt(e) {
|
|
1558
1561
|
if ("undefined" == typeof window) return 1;
|
|
1559
1562
|
const { defaultDpr: t = 1, maxDpr: n = 3, round: r = !0 } = e || {}, o = "undefined" != typeof window && "number" == typeof window.devicePixelRatio ? window.devicePixelRatio : t;
|
|
1560
1563
|
return Math.min(Math.max(1, r ? Math.floor(o) : o), n);
|
|
1561
1564
|
}
|
|
1562
|
-
function
|
|
1563
|
-
const r =
|
|
1565
|
+
function en(e, t, n) {
|
|
1566
|
+
const r = Yt(t, [t]);
|
|
1564
1567
|
M(() => {
|
|
1565
1568
|
const t = (t) => {
|
|
1566
1569
|
e.current && !e.current.contains(t.target) && r(t);
|
|
@@ -1570,7 +1573,7 @@ function Jt(e, t, n) {
|
|
|
1570
1573
|
};
|
|
1571
1574
|
}, [e]);
|
|
1572
1575
|
}
|
|
1573
|
-
function
|
|
1576
|
+
function tn(e = {}) {
|
|
1574
1577
|
const { target: t, onChange: n, onError: r, requestFullScreenOptions: o } = e, [i, s] = A(!1), [l, a] = A(null), [c, u] = A(!1);
|
|
1575
1578
|
M(() => {
|
|
1576
1579
|
s(function() {
|
|
@@ -1606,21 +1609,21 @@ function Qt(e = {}) {
|
|
|
1606
1609
|
toggleFullscreen: f
|
|
1607
1610
|
};
|
|
1608
1611
|
}
|
|
1609
|
-
var
|
|
1612
|
+
var nn = "_portal-root_105xh_14", rn = "_fullscreen_105xh_31", on = 0, sn = () => {
|
|
1610
1613
|
const e = document.fullscreenElement, t = e ?? document.body;
|
|
1611
1614
|
let n = document.querySelector(".portal-root");
|
|
1612
|
-
n || (n = document.createElement("div"), n.className = `portal-root ${
|
|
1615
|
+
n || (n = document.createElement("div"), n.className = `portal-root ${nn}`), n.parentElement !== t && t.appendChild(n);
|
|
1613
1616
|
const r = !!e;
|
|
1614
|
-
return n.classList.toggle("fullscreen", r), n.classList.toggle(
|
|
1617
|
+
return n.classList.toggle("fullscreen", r), n.classList.toggle(rn, r), n;
|
|
1615
1618
|
};
|
|
1616
|
-
function
|
|
1617
|
-
const [e, t] = A(!!document.fullscreenElement), n = x(() =>
|
|
1619
|
+
function ln() {
|
|
1620
|
+
const [e, t] = A(!!document.fullscreenElement), n = x(() => sn(), []);
|
|
1618
1621
|
return M(() => {
|
|
1619
1622
|
const e = () => {
|
|
1620
|
-
t(!!document.fullscreenElement),
|
|
1623
|
+
t(!!document.fullscreenElement), sn();
|
|
1621
1624
|
};
|
|
1622
|
-
return
|
|
1623
|
-
document.removeEventListener("fullscreenchange", e), --
|
|
1625
|
+
return on++, sn(), document.addEventListener("fullscreenchange", e), () => {
|
|
1626
|
+
document.removeEventListener("fullscreenchange", e), --on <= 0 && (on = 0, document.querySelectorAll(".portal-root").forEach((e) => {
|
|
1624
1627
|
e.parentNode?.removeChild(e);
|
|
1625
1628
|
}));
|
|
1626
1629
|
};
|
|
@@ -1629,21 +1632,21 @@ function on() {
|
|
|
1629
1632
|
isFullscreen: e
|
|
1630
1633
|
};
|
|
1631
1634
|
}
|
|
1632
|
-
var
|
|
1635
|
+
var an, cn = "_dragging_at5p4_10", un = /* @__PURE__ */ new Set([
|
|
1633
1636
|
"text",
|
|
1634
1637
|
"search",
|
|
1635
1638
|
"url",
|
|
1636
1639
|
"tel",
|
|
1637
1640
|
"password",
|
|
1638
1641
|
""
|
|
1639
|
-
]),
|
|
1642
|
+
]), hn = (e, t, n) => {
|
|
1640
1643
|
const r = e.getBoundingClientRect();
|
|
1641
1644
|
if (!r.width || !r.height) return null;
|
|
1642
1645
|
const o = Math.min(Math.max(t, r.left + 1), r.right - 1), i = Math.min(Math.max(n, r.top + 1), r.bottom - 1), s = e.ownerDocument, l = s.caretPositionFromPoint?.(o, i);
|
|
1643
1646
|
if (l) return l.offset;
|
|
1644
1647
|
const a = s.caretRangeFromPoint?.(o, i);
|
|
1645
1648
|
return a ? a.startOffset : null;
|
|
1646
|
-
},
|
|
1649
|
+
}, dn = () => {
|
|
1647
1650
|
const e = z(null);
|
|
1648
1651
|
return M(() => () => {
|
|
1649
1652
|
e.current?.();
|
|
@@ -1651,13 +1654,13 @@ var sn, ln = "_dragging_at5p4_10", an = /* @__PURE__ */ new Set([
|
|
|
1651
1654
|
onPointerDown: (t) => {
|
|
1652
1655
|
if (void 0 !== t?.button && 0 !== t.button) return;
|
|
1653
1656
|
if (e.current) return;
|
|
1654
|
-
const n = t?.shiftKey ? null : (r = t?.target, r instanceof HTMLTextAreaElement ? r.disabled ? null : r : r instanceof HTMLInputElement && !r.disabled &&
|
|
1657
|
+
const n = t?.shiftKey ? null : (r = t?.target, r instanceof HTMLTextAreaElement ? r.disabled ? null : r : r instanceof HTMLInputElement && !r.disabled && un.has(r.type) ? r : null);
|
|
1655
1658
|
var r;
|
|
1656
|
-
const o = n && void 0 !== t?.clientX && void 0 !== t?.clientY ?
|
|
1659
|
+
const o = n && void 0 !== t?.clientX && void 0 !== t?.clientY ? hn(n, t.clientX, t.clientY) : null;
|
|
1657
1660
|
let i = null !== n && null !== o, s = t?.clientX ?? 0, l = t?.clientY ?? 0;
|
|
1658
1661
|
const a = (e, t) => {
|
|
1659
1662
|
if (!i || !n || null === o) return;
|
|
1660
|
-
const r =
|
|
1663
|
+
const r = hn(n, e, t);
|
|
1661
1664
|
null !== r && n.setSelectionRange(Math.min(o, r), Math.max(o, r), r < o ? "backward" : "forward");
|
|
1662
1665
|
}, c = (e) => {
|
|
1663
1666
|
s = e.clientX, l = e.clientY, a(s, l);
|
|
@@ -1674,9 +1677,9 @@ var sn, ln = "_dragging_at5p4_10", an = /* @__PURE__ */ new Set([
|
|
|
1674
1677
|
const o = (e) => Math.max(-24, Math.min(24, e));
|
|
1675
1678
|
n.scrollLeft += o(t), n.scrollTop += o(r), a(s, l);
|
|
1676
1679
|
}, 50) : 0, f = () => {
|
|
1677
|
-
e.current = null, h.classList.remove(
|
|
1680
|
+
e.current = null, h.classList.remove(cn), d && window.clearInterval(d), window.removeEventListener("mousedown", u, !0), window.removeEventListener("pointermove", c, !0), window.removeEventListener("pointerup", f, !0), window.removeEventListener("pointercancel", f, !0);
|
|
1678
1681
|
};
|
|
1679
|
-
e.current = f, h.classList.add(
|
|
1682
|
+
e.current = f, h.classList.add(cn), i && window.addEventListener("mousedown", u, {
|
|
1680
1683
|
capture: !0,
|
|
1681
1684
|
once: !0
|
|
1682
1685
|
}), window.addEventListener("pointermove", c, !0), window.addEventListener("pointerup", f, !0), window.addEventListener("pointercancel", f, !0);
|
|
@@ -1686,15 +1689,15 @@ var sn, ln = "_dragging_at5p4_10", an = /* @__PURE__ */ new Set([
|
|
|
1686
1689
|
}
|
|
1687
1690
|
}), []);
|
|
1688
1691
|
};
|
|
1689
|
-
function
|
|
1692
|
+
function fn(e, t) {
|
|
1690
1693
|
const n = (() => {
|
|
1691
|
-
if (void 0 !==
|
|
1694
|
+
if (void 0 !== an) return an;
|
|
1692
1695
|
try {
|
|
1693
|
-
|
|
1696
|
+
an = "undefined" == typeof document ? null : document.createElement("canvas").getContext("2d") ?? null;
|
|
1694
1697
|
} catch {
|
|
1695
|
-
|
|
1698
|
+
an = null;
|
|
1696
1699
|
}
|
|
1697
|
-
return
|
|
1700
|
+
return an;
|
|
1698
1701
|
})();
|
|
1699
1702
|
return n ? (n.font = `${t.style ?? "normal"} ${t.weight ?? "normal"} ${t.size}px ${r = t.family || "sans-serif", r.split(",").map((e) => {
|
|
1700
1703
|
const t = e.trim();
|
|
@@ -1702,9 +1705,9 @@ function hn(e, t) {
|
|
|
1702
1705
|
}).join(", ")}`, n.measureText(e).width) : e.length * t.size * .6;
|
|
1703
1706
|
var r;
|
|
1704
1707
|
}
|
|
1705
|
-
function
|
|
1708
|
+
function pn(e) {
|
|
1706
1709
|
if (!e) throw new Error("must have a PointerHandlerOptions");
|
|
1707
|
-
const { onPointerDown: t, onPointerUp: n, onPointerMoveOrWait: r, processTouch: o = !1 } = e, i =
|
|
1710
|
+
const { onPointerDown: t, onPointerUp: n, onPointerMoveOrWait: r, processTouch: o = !1 } = e, i = Yt(t, [t]), s = Yt(n, [n]), l = Yt(r, [r]), a = z(!1), c = e?.timerInitial ?? 230, u = e?.timerContinuous ?? c / 2, h = z(null), d = z(null), f = z(null), p = z(null), m = x(() => {
|
|
1708
1711
|
p.current && (clearTimeout(p.current), p.current = null);
|
|
1709
1712
|
}, []), g = x((e) => {
|
|
1710
1713
|
p.current = setTimeout(() => {
|
|
@@ -1718,7 +1721,7 @@ function dn(e) {
|
|
|
1718
1721
|
}, e ?? c);
|
|
1719
1722
|
}, []);
|
|
1720
1723
|
M(() => () => m(), []);
|
|
1721
|
-
const _ = o ? "pointer" : "mouse", v =
|
|
1724
|
+
const _ = o ? "pointer" : "mouse", v = Yt((e) => {
|
|
1722
1725
|
document.removeEventListener(`${_}move`, w), document.removeEventListener(`${_}up`, v), document.removeEventListener("pointercancel", v), document.removeEventListener("keydown", S), document.removeEventListener("keyup", C), window.removeEventListener("blur", y), m(), window.requestAnimationFrame(() => {
|
|
1723
1726
|
if (!1 === a.current) return;
|
|
1724
1727
|
a.current = !1;
|
|
@@ -1729,7 +1732,7 @@ function dn(e) {
|
|
|
1729
1732
|
});
|
|
1730
1733
|
}, []), y = x(() => {
|
|
1731
1734
|
!1 !== a.current && d.current && v(d.current);
|
|
1732
|
-
}, []), b =
|
|
1735
|
+
}, []), b = Yt(() => {
|
|
1733
1736
|
m(), g(u), window.requestAnimationFrame(() => {
|
|
1734
1737
|
if (!1 === a.current) return;
|
|
1735
1738
|
const e = d.current, t = h.current;
|
|
@@ -1737,16 +1740,16 @@ function dn(e) {
|
|
|
1737
1740
|
const n = qe(e, t.currentTarget);
|
|
1738
1741
|
l?.(n, f.current, t);
|
|
1739
1742
|
});
|
|
1740
|
-
}, [u]), w =
|
|
1743
|
+
}, [u]), w = Yt((e) => {
|
|
1741
1744
|
d.current = e, b();
|
|
1742
|
-
}, []), S =
|
|
1745
|
+
}, []), S = Yt((e) => {
|
|
1743
1746
|
f.current = {
|
|
1744
1747
|
ctrlKey: e.ctrlKey,
|
|
1745
1748
|
shiftKey: e.shiftKey,
|
|
1746
1749
|
altKey: e.altKey,
|
|
1747
1750
|
metaKey: e.metaKey
|
|
1748
1751
|
}, b();
|
|
1749
|
-
}, []), C =
|
|
1752
|
+
}, []), C = Yt((e) => {
|
|
1750
1753
|
f.current = {
|
|
1751
1754
|
ctrlKey: e.ctrlKey,
|
|
1752
1755
|
shiftKey: e.shiftKey,
|
|
@@ -1754,7 +1757,7 @@ function dn(e) {
|
|
|
1754
1757
|
metaKey: e.metaKey
|
|
1755
1758
|
}, b();
|
|
1756
1759
|
}, [u]);
|
|
1757
|
-
return
|
|
1760
|
+
return Yt((e) => {
|
|
1758
1761
|
e.isDefaultPrevented() || (f.current = {
|
|
1759
1762
|
ctrlKey: e.ctrlKey,
|
|
1760
1763
|
shiftKey: e.shiftKey,
|
|
@@ -1763,8 +1766,8 @@ function dn(e) {
|
|
|
1763
1766
|
}, !1 !== i(e, f.current) && (h.current = e, d.current = e.nativeEvent, document.addEventListener(`${_}up`, v, { passive: !1 }), document.addEventListener(`${_}move`, w, { passive: !1 }), document.addEventListener("pointercancel", v, { passive: !1 }), document.addEventListener("keydown", S, { passive: !1 }), document.addEventListener("keyup", C, { passive: !1 }), window.addEventListener("blur", y, { passive: !0 }), a.current = !0, g(c)));
|
|
1764
1767
|
}, [c, o]);
|
|
1765
1768
|
}
|
|
1766
|
-
function
|
|
1767
|
-
return
|
|
1769
|
+
function mn(e, t) {
|
|
1770
|
+
return pn({
|
|
1768
1771
|
onPointerDown: e,
|
|
1769
1772
|
onPointerMoveOrWait: (t, n, r) => {
|
|
1770
1773
|
e?.(r);
|
|
@@ -1772,63 +1775,63 @@ function fn(e, t) {
|
|
|
1772
1775
|
...t
|
|
1773
1776
|
});
|
|
1774
1777
|
}
|
|
1775
|
-
var
|
|
1778
|
+
var gn = null, _n = /* @__PURE__ */ new Set(), vn = !1, yn = () => "touch" == ("touch" === Fe().primaryInput ? "touch" : "mouse") ? "touch" : gn ?? "mouse", bn = (e) => {
|
|
1776
1779
|
const t = "touch" === e.pointerType ? "touch" : "mouse";
|
|
1777
|
-
if (t ===
|
|
1778
|
-
const n =
|
|
1779
|
-
|
|
1780
|
-
},
|
|
1780
|
+
if (t === gn) return;
|
|
1781
|
+
const n = yn();
|
|
1782
|
+
gn = t, yn() !== n && _n.forEach((e) => e());
|
|
1783
|
+
}, wn = (e) => (_n.add(e), vn || "undefined" == typeof document || (document.addEventListener("pointerdown", bn, {
|
|
1781
1784
|
capture: !0,
|
|
1782
1785
|
passive: !0
|
|
1783
|
-
}),
|
|
1784
|
-
|
|
1785
|
-
}),
|
|
1786
|
+
}), vn = !0), () => {
|
|
1787
|
+
_n.delete(e), 0 === _n.size && vn && (document.removeEventListener("pointerdown", bn, { capture: !0 }), vn = !1);
|
|
1788
|
+
}), xn = () => "mouse", Sn = () => D(wn, yn, xn), Mn = ({ initValue: e, useHookBody: t, applyStateChange: n }) => {
|
|
1786
1789
|
const r = z(e);
|
|
1787
1790
|
if ("function" != typeof t) throw new Error("function expected as hook body parameter. got " + typeof t);
|
|
1788
1791
|
const o = t();
|
|
1789
1792
|
return T(() => {
|
|
1790
1793
|
r.current !== o && (r.current = o, n(o));
|
|
1791
1794
|
}, [n, o]), null;
|
|
1792
|
-
},
|
|
1795
|
+
}, Cn = (e) => {
|
|
1793
1796
|
console && console.warn && console.warn(e);
|
|
1794
|
-
},
|
|
1795
|
-
|
|
1796
|
-
},
|
|
1797
|
+
}, En = globalThis, Tn = 1, Ln = !1, kn = !1, zn = [], An = [], Dn = () => {
|
|
1798
|
+
An.forEach((e) => e());
|
|
1799
|
+
}, Pn = ({ automaticContainerInternalUseOnly: e }) => {
|
|
1797
1800
|
const [t, n] = A([]), r = z([]);
|
|
1798
|
-
return r.current = t, e || !1 !==
|
|
1801
|
+
return r.current = t, e || !1 !== Ln || (kn = !0), M(() => {
|
|
1799
1802
|
let t = !0;
|
|
1800
1803
|
function o() {
|
|
1801
|
-
if (t) return
|
|
1804
|
+
if (t) return An[0] !== o ? (e || !0 !== Ln || Cn("SingletonHooksContainer is mounted after some singleton hook has been used.Your SingletonHooksContainer will not be used in favor of internal one."), void n((e) => [])) : void n([...zn]);
|
|
1802
1805
|
}
|
|
1803
|
-
return
|
|
1804
|
-
t = !1, r.current?.length > 0 &&
|
|
1806
|
+
return An.push(o), Dn(), () => {
|
|
1807
|
+
t = !1, r.current?.length > 0 && Cn("SingletonHooksContainer is unmounted, but it has active singleton hooks. They will be reevaluated once SingletonHooksContainer is mounted again"), An.splice(An.indexOf(o), 1), Dn();
|
|
1805
1808
|
};
|
|
1806
|
-
}, [e]), R(P, { children: t.map(({ hook: e, key: t }) => _(
|
|
1809
|
+
}, [e]), R(P, { children: t.map(({ hook: e, key: t }) => _(Mn, {
|
|
1807
1810
|
...e,
|
|
1808
1811
|
key: t
|
|
1809
1812
|
})) });
|
|
1810
|
-
},
|
|
1811
|
-
const t =
|
|
1812
|
-
return
|
|
1813
|
+
}, Rn = (e) => {
|
|
1814
|
+
const t = Tn++;
|
|
1815
|
+
return zn.push({
|
|
1813
1816
|
hook: e,
|
|
1814
1817
|
key: t
|
|
1815
|
-
}), 0 ===
|
|
1816
|
-
if (
|
|
1817
|
-
const t =
|
|
1818
|
-
|
|
1819
|
-
} else
|
|
1820
|
-
})(
|
|
1821
|
-
|
|
1818
|
+
}), 0 === An.length && !1 === kn && (Ln = !0, ((e) => {
|
|
1819
|
+
if (En.document && En.document.createElement) {
|
|
1820
|
+
const t = En.document.createElement("div");
|
|
1821
|
+
O(t).render(R(e, { automaticContainerInternalUseOnly: !0 }));
|
|
1822
|
+
} else Cn("Can not mount SingletonHooksContainer on server side. Did you manage to run useEffect on server? Please mount SingletonHooksContainer into your components tree manually.");
|
|
1823
|
+
})(Pn)), Dn(), () => {
|
|
1824
|
+
zn.splice(zn.findIndex((e) => e.key === t), 1), Dn();
|
|
1822
1825
|
};
|
|
1823
|
-
},
|
|
1824
|
-
|
|
1826
|
+
}, $n = null;
|
|
1827
|
+
$n || ($n = (e, t, n = {}) => {
|
|
1825
1828
|
let r, o, i = !1, s = !1, l = [], { unmountIfNoConsumers: a = !1 } = n;
|
|
1826
1829
|
const c = (e) => {
|
|
1827
|
-
o = e,
|
|
1830
|
+
o = e, H(() => l.forEach((t) => t(e)));
|
|
1828
1831
|
}, u = () => (s || (o = "function" == typeof e ? e() : e, s = !0), o);
|
|
1829
1832
|
return () => {
|
|
1830
1833
|
const [n, s] = A(u);
|
|
1831
|
-
return M(() => (i || (i = !0, r =
|
|
1834
|
+
return M(() => (i || (i = !0, r = Rn({
|
|
1832
1835
|
initValue: e,
|
|
1833
1836
|
useHookBody: t,
|
|
1834
1837
|
applyStateChange: c
|
|
@@ -1837,32 +1840,32 @@ Pn || (Pn = (e, t, n = {}) => {
|
|
|
1837
1840
|
}), []), n;
|
|
1838
1841
|
};
|
|
1839
1842
|
});
|
|
1840
|
-
var
|
|
1843
|
+
var Bn = $n, On = () => {
|
|
1841
1844
|
console.warn("You must call useEditMode before setting its state.");
|
|
1842
|
-
},
|
|
1845
|
+
}, In = Bn(null, () => {
|
|
1843
1846
|
const [e, t] = A(null);
|
|
1844
|
-
return
|
|
1845
|
-
}),
|
|
1846
|
-
|
|
1847
|
-
},
|
|
1848
|
-
|
|
1849
|
-
},
|
|
1850
|
-
|
|
1851
|
-
}),
|
|
1852
|
-
const e =
|
|
1847
|
+
return On = t, e;
|
|
1848
|
+
}), Hn = (e) => {
|
|
1849
|
+
On((t) => ("function" == typeof e && (e = e(t)), t?.onModeChange?.(e ?? null), e));
|
|
1850
|
+
}, Nn = /* @__PURE__ */ new Set(), Fn = (e, t) => {
|
|
1851
|
+
Nn.forEach((n) => n(e, t)), "done" === t ? e.done?.() : e.cancel?.();
|
|
1852
|
+
}, Wn = (e) => (Nn.add(e), () => {
|
|
1853
|
+
Nn.delete(e);
|
|
1854
|
+
}), Vn = () => {
|
|
1855
|
+
const e = In();
|
|
1853
1856
|
return L(() => ({
|
|
1854
|
-
setMode:
|
|
1857
|
+
setMode: Hn,
|
|
1855
1858
|
getMode: () => e
|
|
1856
1859
|
}), [e]);
|
|
1857
|
-
},
|
|
1858
|
-
function
|
|
1860
|
+
}, Kn = { Active: "language" };
|
|
1861
|
+
function jn() {
|
|
1859
1862
|
return D((e) => t.addChangeListener(e), () => t.getActive(), () => t.getActive());
|
|
1860
1863
|
}
|
|
1861
|
-
function
|
|
1864
|
+
function Yn() {
|
|
1862
1865
|
const e = D((e) => t.addChangeListener(e), () => t.getRevision(), () => t.getRevision());
|
|
1863
1866
|
return L(() => (e, n) => t.lookup(e, n) ?? e, [e]);
|
|
1864
1867
|
}
|
|
1865
|
-
var
|
|
1868
|
+
var Xn = (e, t, n, r) => ({
|
|
1866
1869
|
x: e,
|
|
1867
1870
|
y: t,
|
|
1868
1871
|
width: n,
|
|
@@ -1881,9 +1884,9 @@ var jn = (e, t, n, r) => ({
|
|
|
1881
1884
|
right: e + n,
|
|
1882
1885
|
bottom: t + r
|
|
1883
1886
|
})
|
|
1884
|
-
}),
|
|
1885
|
-
return
|
|
1886
|
-
},
|
|
1887
|
+
}), Zn = (e) => {
|
|
1888
|
+
return Xn(e.textareaRect.left + (e.markerRect.left - e.mirrorRect.left) - e.scrollLeft, e.textareaRect.top + (e.markerRect.top - e.mirrorRect.top) - e.scrollTop, 0, e.markerRect.height);
|
|
1889
|
+
}, qn = [
|
|
1887
1890
|
"paddingTop",
|
|
1888
1891
|
"paddingRight",
|
|
1889
1892
|
"paddingBottom",
|
|
@@ -1913,18 +1916,18 @@ var jn = (e, t, n, r) => ({
|
|
|
1913
1916
|
"wordBreak",
|
|
1914
1917
|
"overflowWrap",
|
|
1915
1918
|
"tabSize"
|
|
1916
|
-
],
|
|
1917
|
-
if (!e || "undefined" == typeof document) return
|
|
1919
|
+
], Un = (e, t, n, r = 0) => {
|
|
1920
|
+
if (!e || "undefined" == typeof document) return Xn(0, 0, 0, 0);
|
|
1918
1921
|
const o = e.value, i = Math.max(0, Math.min(t ?? e.selectionStart ?? o.length, o.length)), s = !n, l = n ?? document.createElement("div");
|
|
1919
1922
|
l.setAttribute("aria-hidden", "true"), ((e, t) => {
|
|
1920
1923
|
const n = getComputedStyle(t), r = e.style;
|
|
1921
|
-
for (const e of
|
|
1924
|
+
for (const e of qn) r[e] = n[e];
|
|
1922
1925
|
r.position = "absolute", r.top = "0", r.left = "0", r.visibility = "hidden", r.pointerEvents = "none", r.overflow = "hidden", r.boxSizing = "border-box", r.height = "auto", r.width = `${t.offsetWidth}px`;
|
|
1923
1926
|
})(l, e), l.textContent = o.slice(0, i);
|
|
1924
1927
|
const a = document.createElement("span");
|
|
1925
1928
|
a.textContent = o.slice(i) || "", l.appendChild(a), s && document.body.appendChild(l);
|
|
1926
1929
|
try {
|
|
1927
|
-
const t = getComputedStyle(e), n = a.getBoundingClientRect(), o = l.getBoundingClientRect(), i = n.height || parseFloat(t.lineHeight) || 1.2 * parseFloat(t.fontSize) || 0, s =
|
|
1930
|
+
const t = getComputedStyle(e), n = a.getBoundingClientRect(), o = l.getBoundingClientRect(), i = n.height || parseFloat(t.lineHeight) || 1.2 * parseFloat(t.fontSize) || 0, s = Zn({
|
|
1928
1931
|
textareaRect: e.getBoundingClientRect(),
|
|
1929
1932
|
mirrorRect: o,
|
|
1930
1933
|
markerRect: {
|
|
@@ -1935,11 +1938,11 @@ var jn = (e, t, n, r) => ({
|
|
|
1935
1938
|
scrollLeft: e.scrollLeft,
|
|
1936
1939
|
scrollTop: e.scrollTop
|
|
1937
1940
|
});
|
|
1938
|
-
return r ?
|
|
1941
|
+
return r ? Xn(s.left - r, s.top, 0, s.height) : s;
|
|
1939
1942
|
} finally {
|
|
1940
1943
|
s ? l.remove() : l.textContent = "";
|
|
1941
1944
|
}
|
|
1942
|
-
},
|
|
1945
|
+
}, Gn = (e) => {
|
|
1943
1946
|
const t = z(null);
|
|
1944
1947
|
M(() => {
|
|
1945
1948
|
if ("undefined" == typeof document) return;
|
|
@@ -1948,12 +1951,12 @@ var jn = (e, t, n, r) => ({
|
|
|
1948
1951
|
e.remove(), t.current = null;
|
|
1949
1952
|
};
|
|
1950
1953
|
}, []);
|
|
1951
|
-
const n = x((n, r) =>
|
|
1954
|
+
const n = x((n, r) => Un(e.current, n, t.current ?? void 0, r), [e]);
|
|
1952
1955
|
return {
|
|
1953
1956
|
getCaretRect: n,
|
|
1954
1957
|
caretAnchor: x((e, t) => ({ getBoundingClientRect: () => n("function" == typeof e ? e() : e, "function" == typeof t ? t() : t) }), [n])
|
|
1955
1958
|
};
|
|
1956
|
-
},
|
|
1959
|
+
}, Jn = Bn({
|
|
1957
1960
|
setClipboard: (e) => {
|
|
1958
1961
|
throw new Error("This is only available via the useClipboard.");
|
|
1959
1962
|
},
|
|
@@ -1969,7 +1972,7 @@ var jn = (e, t, n, r) => ({
|
|
|
1969
1972
|
refNativeLastKey: z(null)
|
|
1970
1973
|
};
|
|
1971
1974
|
});
|
|
1972
|
-
function
|
|
1975
|
+
function Qn(e, t = !0) {
|
|
1973
1976
|
const n = z(e);
|
|
1974
1977
|
M(() => {
|
|
1975
1978
|
if (t) {
|
|
@@ -1979,16 +1982,16 @@ function Gn(e, t = !0) {
|
|
|
1979
1982
|
n.current = e;
|
|
1980
1983
|
});
|
|
1981
1984
|
}
|
|
1982
|
-
var
|
|
1983
|
-
var
|
|
1984
|
-
const [e, t] = A(() =>
|
|
1985
|
-
return
|
|
1986
|
-
null == e && t(
|
|
1985
|
+
var er = !1, tr = 0, nr = "undefined" != typeof document ? T : M, rr = () => "sheetxl-ui-" + tr++;
|
|
1986
|
+
var or = f["useId".toString()], ir = null != or ? or : function() {
|
|
1987
|
+
const [e, t] = A(() => er ? rr() : void 0);
|
|
1988
|
+
return nr(() => {
|
|
1989
|
+
null == e && t(rr());
|
|
1987
1990
|
}, []), M(() => {
|
|
1988
|
-
|
|
1991
|
+
er || (er = !0);
|
|
1989
1992
|
}, []), e;
|
|
1990
|
-
},
|
|
1991
|
-
function
|
|
1993
|
+
}, sr = [];
|
|
1994
|
+
function lr(e, t, n = sr, r) {
|
|
1992
1995
|
const o = z(null), i = z(null);
|
|
1993
1996
|
return E(e ?? i, () => {
|
|
1994
1997
|
const e = void 0 === r ? o.current : r;
|
|
@@ -2008,20 +2011,20 @@ function ir(e, t, n = or, r) {
|
|
|
2008
2011
|
return e;
|
|
2009
2012
|
}, void 0 === r ? n : [...n, r]), o;
|
|
2010
2013
|
}
|
|
2011
|
-
var
|
|
2012
|
-
const e =
|
|
2013
|
-
return e ?
|
|
2014
|
+
var ar = null, cr = () => "undefined" != typeof window ? window.visualViewport ?? null : null, ur = () => {
|
|
2015
|
+
const e = cr();
|
|
2016
|
+
return e ? ar && ar.width === e.width && ar.height === e.height && ar.offsetTop === e.offsetTop && ar.offsetLeft === e.offsetLeft ? ar : ar = {
|
|
2014
2017
|
width: e.width,
|
|
2015
2018
|
height: e.height,
|
|
2016
2019
|
offsetTop: e.offsetTop,
|
|
2017
2020
|
offsetLeft: e.offsetLeft
|
|
2018
2021
|
} : null;
|
|
2019
|
-
},
|
|
2020
|
-
const t =
|
|
2022
|
+
}, hr = (e) => {
|
|
2023
|
+
const t = cr();
|
|
2021
2024
|
return t ? (t.addEventListener("resize", e), t.addEventListener("scroll", e), () => {
|
|
2022
2025
|
t.removeEventListener("resize", e), t.removeEventListener("scroll", e);
|
|
2023
2026
|
}) : () => {};
|
|
2024
|
-
},
|
|
2027
|
+
}, dr = () => () => {}, fr = () => null, pr = (e = !0) => D(e ? hr : dr, e ? ur : fr, fr), mr = "undefined" != typeof window ? T : M, gr = Object.freeze({
|
|
2025
2028
|
x: 0,
|
|
2026
2029
|
y: 0,
|
|
2027
2030
|
width: 0,
|
|
@@ -2031,9 +2034,9 @@ var sr = null, lr = () => "undefined" != typeof window ? window.visualViewport ?
|
|
|
2031
2034
|
bottom: 0,
|
|
2032
2035
|
right: 0
|
|
2033
2036
|
});
|
|
2034
|
-
function
|
|
2035
|
-
const [e, t] = A(null), [n, r] = A(
|
|
2036
|
-
return
|
|
2037
|
+
function _r() {
|
|
2038
|
+
const [e, t] = A(null), [n, r] = A(gr), o = z(n), i = x((e) => t(e), []);
|
|
2039
|
+
return mr(() => {
|
|
2037
2040
|
if (!e || "undefined" == typeof ResizeObserver) return;
|
|
2038
2041
|
const t = (e) => {
|
|
2039
2042
|
var t, n;
|
|
@@ -2073,24 +2076,24 @@ function mr() {
|
|
|
2073
2076
|
return i.observe(e), () => i.disconnect();
|
|
2074
2077
|
}, [e]), [i, n];
|
|
2075
2078
|
}
|
|
2076
|
-
var
|
|
2077
|
-
if (
|
|
2078
|
-
|
|
2079
|
+
var vr = "sxl-history-change", yr = !1, br = () => {
|
|
2080
|
+
if (yr) return;
|
|
2081
|
+
yr = !0;
|
|
2079
2082
|
const e = window.history;
|
|
2080
2083
|
for (const t of ["pushState", "replaceState"]) {
|
|
2081
2084
|
const n = e[t];
|
|
2082
2085
|
e[t] = function(...e) {
|
|
2083
2086
|
const t = n.apply(this, e);
|
|
2084
|
-
return window.dispatchEvent(new Event(
|
|
2087
|
+
return window.dispatchEvent(new Event(vr)), t;
|
|
2085
2088
|
};
|
|
2086
2089
|
}
|
|
2087
|
-
},
|
|
2088
|
-
window.removeEventListener("popstate", e), window.removeEventListener(
|
|
2089
|
-
}),
|
|
2090
|
-
function
|
|
2091
|
-
return D(
|
|
2090
|
+
}, wr = (e) => (br(), window.addEventListener("popstate", e), window.addEventListener(vr, e), () => {
|
|
2091
|
+
window.removeEventListener("popstate", e), window.removeEventListener(vr, e);
|
|
2092
|
+
}), xr = () => window.location.search, Sr = () => "";
|
|
2093
|
+
function Mr() {
|
|
2094
|
+
return D(wr, xr, Sr);
|
|
2092
2095
|
}
|
|
2093
|
-
var
|
|
2096
|
+
var Cr = 3, Er = .5, Tr = 50, Lr = (e) => ({
|
|
2094
2097
|
x: e.x,
|
|
2095
2098
|
y: e.y,
|
|
2096
2099
|
width: e.width,
|
|
@@ -2100,8 +2103,8 @@ var Sr = 3, Mr = .5, Cr = 50, Er = (e) => ({
|
|
|
2100
2103
|
right: e.right,
|
|
2101
2104
|
bottom: e.bottom
|
|
2102
2105
|
});
|
|
2103
|
-
function
|
|
2104
|
-
const { threshold: t =
|
|
2106
|
+
function kr(e = {}) {
|
|
2107
|
+
const { threshold: t = Er, stillnessThreshold: n = Cr, maxHierarchyDepth: r = Tr } = e, [o, i] = _r(), s = z(null), [l, a] = k((e) => e + 1, 0), c = z(void 0), u = z({
|
|
2105
2108
|
x: 0,
|
|
2106
2109
|
y: 0,
|
|
2107
2110
|
width: 0,
|
|
@@ -2122,7 +2125,7 @@ function Tr(e = {}) {
|
|
|
2122
2125
|
const l = () => {
|
|
2123
2126
|
if (!e) return;
|
|
2124
2127
|
const r = e.getBoundingClientRect(), s = u.current;
|
|
2125
|
-
Math.abs(r.x - s.x) > t || Math.abs(r.y - s.y) > t || Math.abs(r.width - s.width) > t || Math.abs(r.height - s.height) > t ? (o || (o = !0, f(
|
|
2128
|
+
Math.abs(r.x - s.x) > t || Math.abs(r.y - s.y) > t || Math.abs(r.width - s.width) > t || Math.abs(r.height - s.height) > t ? (o || (o = !0, f(Lr(r)), a()), i = 0) : i++, o && i >= n && (o = !1, f(Lr(r)), a()), u.current = Lr(r), c.current = requestAnimationFrame(l);
|
|
2126
2129
|
};
|
|
2127
2130
|
c.current = requestAnimationFrame(l);
|
|
2128
2131
|
const h = (e) => {
|
|
@@ -2146,7 +2149,7 @@ function Tr(e = {}) {
|
|
|
2146
2149
|
r
|
|
2147
2150
|
]), [h, d];
|
|
2148
2151
|
}
|
|
2149
|
-
var
|
|
2152
|
+
var zr = w(v((e, t) => {
|
|
2150
2153
|
const { refFocusStart: n, ...r } = e, o = z(null), i = x(() => {
|
|
2151
2154
|
if (n) return void n?.current?.focus();
|
|
2152
2155
|
const e = o.current?.parentElement;
|
|
@@ -2171,11 +2174,11 @@ var Lr = w(v((e, t) => {
|
|
|
2171
2174
|
onFocus: i,
|
|
2172
2175
|
...r
|
|
2173
2176
|
});
|
|
2174
|
-
})),
|
|
2177
|
+
})), Ar = (e) => {
|
|
2175
2178
|
const { render: t, props: n } = e;
|
|
2176
2179
|
return t ? t(n) : null;
|
|
2177
2180
|
};
|
|
2178
|
-
function
|
|
2181
|
+
function Dr(e, t, n = !1) {
|
|
2179
2182
|
if (0 === t) return e;
|
|
2180
2183
|
function r(e, t, n) {
|
|
2181
2184
|
let r = t.x - e.x, i = t.y - e.y, s = Math.sqrt(r * r + i * i);
|
|
@@ -2235,10 +2238,10 @@ function zr(e, t, n = !1) {
|
|
|
2235
2238
|
return e + t.join(" ") + " ";
|
|
2236
2239
|
}, "");
|
|
2237
2240
|
}
|
|
2238
|
-
var
|
|
2239
|
-
const { className: n, style: r, children: o, radius: i = 4, strokeWidth: s = 1, strokeColor: l = "grey", variant: a = "tab", clipInset: c, ...u } = e, [h, { width: d, height: f }] =
|
|
2241
|
+
var Pr = w(v((e, t) => {
|
|
2242
|
+
const { className: n, style: r, children: o, radius: i = 4, strokeWidth: s = 1, strokeColor: l = "grey", variant: a = "tab", clipInset: c, ...u } = e, [h, { width: d, height: f }] = _r(), p = z(null), g = c?.top ?? 0, _ = c?.right ?? 0, v = c?.bottom ?? 0, b = c?.left ?? 0, w = L(() => {
|
|
2240
2243
|
const e = d - _, t = f - v;
|
|
2241
|
-
return
|
|
2244
|
+
return Dr(`M ${b} ${g} L ${e} ${g} L ${e} ${t} L ${b} ${t} Z`, i);
|
|
2242
2245
|
}, [
|
|
2243
2246
|
d,
|
|
2244
2247
|
f,
|
|
@@ -2249,7 +2252,7 @@ var Ar = w(v((e, t) => {
|
|
|
2249
2252
|
b
|
|
2250
2253
|
]), x = L(() => "rounded" === a ? w : ((e, t = 0) => {
|
|
2251
2254
|
const n = e / 2, r = f - n + t;
|
|
2252
|
-
return
|
|
2255
|
+
return Dr(`M 0 ${n} L ${i} ${n} L ${i} ${r} L ${2 * i} ${r} L ${d - 2 * i} ${r} M ${d - 2 * i} ${r} L ${d - i} ${r} L ${d - i} ${n} L ${d} ${n}`, i);
|
|
2253
2256
|
})(s), [
|
|
2254
2257
|
a,
|
|
2255
2258
|
w,
|
|
@@ -2261,7 +2264,7 @@ var Ar = w(v((e, t) => {
|
|
|
2261
2264
|
if (0 === i) return;
|
|
2262
2265
|
if ("rounded" === a) return w;
|
|
2263
2266
|
const e = f - s / 2;
|
|
2264
|
-
return
|
|
2267
|
+
return Dr(`M 0 0 L ${i} 0 L ${i} ${e} L ${d - i} ${e} L ${d - i} 0 L ${d} 0`, i);
|
|
2265
2268
|
}, [
|
|
2266
2269
|
d,
|
|
2267
2270
|
f,
|
|
@@ -2305,11 +2308,11 @@ var Ar = w(v((e, t) => {
|
|
|
2305
2308
|
})
|
|
2306
2309
|
})]
|
|
2307
2310
|
});
|
|
2308
|
-
})),
|
|
2309
|
-
function
|
|
2310
|
-
return S(
|
|
2311
|
+
})), Rr = g(null);
|
|
2312
|
+
function $r() {
|
|
2313
|
+
return S(Rr);
|
|
2311
2314
|
}
|
|
2312
|
-
function
|
|
2315
|
+
function Br(e, t) {
|
|
2313
2316
|
const n = t?.renderError;
|
|
2314
2317
|
let r = null;
|
|
2315
2318
|
const o = () => {
|
|
@@ -2337,13 +2340,13 @@ function Rr(e, t) {
|
|
|
2337
2340
|
const [t, n] = A(i), s = x(() => {
|
|
2338
2341
|
n(() => (r && !r.failed || (r = o()), r.component));
|
|
2339
2342
|
}, []);
|
|
2340
|
-
return R(
|
|
2343
|
+
return R(Rr.Provider, {
|
|
2341
2344
|
value: s,
|
|
2342
2345
|
children: R(t, { ...e })
|
|
2343
2346
|
});
|
|
2344
2347
|
};
|
|
2345
2348
|
}
|
|
2346
|
-
var
|
|
2349
|
+
var Or = class extends p {
|
|
2347
2350
|
constructor(...e) {
|
|
2348
2351
|
super(...e), this.state = { error: null }, this._reportedMessage = null;
|
|
2349
2352
|
}
|
|
@@ -2359,27 +2362,27 @@ var $r = class extends p {
|
|
|
2359
2362
|
render() {
|
|
2360
2363
|
return this.state.error ? this.props.fallback ?? null : this.props.children;
|
|
2361
2364
|
}
|
|
2362
|
-
},
|
|
2363
|
-
const n =
|
|
2365
|
+
}, Ir = ({ children: e, fallback: t }) => {
|
|
2366
|
+
const n = jt(), r = x((e) => {
|
|
2364
2367
|
n.showError(e);
|
|
2365
2368
|
}, [n]);
|
|
2366
|
-
return R(
|
|
2369
|
+
return R(Or, {
|
|
2367
2370
|
fallback: t,
|
|
2368
2371
|
onError: r,
|
|
2369
2372
|
children: e
|
|
2370
2373
|
});
|
|
2371
|
-
},
|
|
2372
|
-
function
|
|
2374
|
+
}, Hr = /\b(?:chrome|moz|safari-web|ms-browser)-extension:\/\//, Nr = /\breact_devtools_backend/;
|
|
2375
|
+
function Fr(e, t) {
|
|
2373
2376
|
const n = `${e ?? ""}\n${t instanceof Error ? t.stack ?? "" : ""}`;
|
|
2374
|
-
return
|
|
2377
|
+
return Hr.test(n) || Nr.test(n);
|
|
2375
2378
|
}
|
|
2376
|
-
var
|
|
2379
|
+
var Wr = class {
|
|
2377
2380
|
constructor(e) {
|
|
2378
2381
|
this.notifier = e, this.handleUnhandledRejection = (e) => {
|
|
2379
2382
|
const t = e.reason;
|
|
2380
|
-
t instanceof Error && t.message && t.message.startsWith("Maximum update depth exceeded") ? console.warn(t) : t instanceof DOMException && "AbortError" === t.name ||
|
|
2383
|
+
t instanceof Error && t.message && t.message.startsWith("Maximum update depth exceeded") ? console.warn(t) : t instanceof DOMException && "AbortError" === t.name || Fr(void 0, t) || (this.notifier.showError(t), t instanceof n && e.preventDefault());
|
|
2381
2384
|
}, this.handleGlobalError = (e) => {
|
|
2382
|
-
"string" == typeof e.message && e.message.includes("ResizeObserver loop") ||
|
|
2385
|
+
"string" == typeof e.message && e.message.includes("ResizeObserver loop") || Fr(e.filename, e.error) || this.notifier.showError(e.error ?? e.message);
|
|
2383
2386
|
}, this.setupGlobalHandlers();
|
|
2384
2387
|
}
|
|
2385
2388
|
setupGlobalHandlers() {
|
|
@@ -2388,19 +2391,19 @@ var Nr = class {
|
|
|
2388
2391
|
cleanup() {
|
|
2389
2392
|
window.removeEventListener("unhandledrejection", this.handleUnhandledRejection), window.removeEventListener("error", this.handleGlobalError);
|
|
2390
2393
|
}
|
|
2391
|
-
},
|
|
2392
|
-
const t =
|
|
2394
|
+
}, Vr = ({ children: e }) => {
|
|
2395
|
+
const t = jt();
|
|
2393
2396
|
return M(() => {
|
|
2394
|
-
const e = new
|
|
2397
|
+
const e = new Wr(t);
|
|
2395
2398
|
return () => {
|
|
2396
2399
|
e.cleanup();
|
|
2397
2400
|
};
|
|
2398
2401
|
}, [t]), R(P, { children: e });
|
|
2399
|
-
},
|
|
2402
|
+
}, Kr = {
|
|
2400
2403
|
grid: 1250,
|
|
2401
2404
|
popup: 1300,
|
|
2402
2405
|
tooltip: 1500
|
|
2403
|
-
},
|
|
2406
|
+
}, jr = (e, t = 0) => Yr(`var(--sxl-z-${e}, ${Kr[e]})`, t), Yr = (e, t) => t ? "number" == typeof e ? e + t : `calc(${e} ${t < 0 ? "-" : "+"} ${Math.abs(t)})` : e, Xr = 7, Zr = {
|
|
2404
2407
|
light: {
|
|
2405
2408
|
"color-base-100": "#ffffff",
|
|
2406
2409
|
"color-base-200": "#f5f5f5",
|
|
@@ -2447,9 +2450,9 @@ var Nr = class {
|
|
|
2447
2450
|
"radius-field": "4px",
|
|
2448
2451
|
"radius-box": "6px",
|
|
2449
2452
|
border: "1px",
|
|
2450
|
-
"z-grid": String(
|
|
2451
|
-
"z-popup": String(
|
|
2452
|
-
"z-tooltip": String(
|
|
2453
|
+
"z-grid": String(Kr.grid),
|
|
2454
|
+
"z-popup": String(Kr.popup),
|
|
2455
|
+
"z-tooltip": String(Kr.tooltip),
|
|
2453
2456
|
"image-background": "none"
|
|
2454
2457
|
},
|
|
2455
2458
|
dark: {
|
|
@@ -2498,31 +2501,31 @@ var Nr = class {
|
|
|
2498
2501
|
"radius-field": "4px",
|
|
2499
2502
|
"radius-box": "6px",
|
|
2500
2503
|
border: "1px",
|
|
2501
|
-
"z-grid": String(
|
|
2502
|
-
"z-popup": String(
|
|
2503
|
-
"z-tooltip": String(
|
|
2504
|
+
"z-grid": String(Kr.grid),
|
|
2505
|
+
"z-popup": String(Kr.popup),
|
|
2506
|
+
"z-tooltip": String(Kr.tooltip),
|
|
2504
2507
|
"image-background": "linear-gradient(rgba(255,255,255,0.10), rgba(255,255,255,0.10))"
|
|
2505
2508
|
}
|
|
2506
|
-
},
|
|
2507
|
-
function
|
|
2509
|
+
}, qr = "--sxl-";
|
|
2510
|
+
function Ur(e) {
|
|
2508
2511
|
const t = {};
|
|
2509
2512
|
for (const n in e) {
|
|
2510
2513
|
const r = e[n];
|
|
2511
2514
|
null != r && (Array.isArray(r) ? r.forEach((e, r) => {
|
|
2512
|
-
null != e && (t[`${
|
|
2513
|
-
}) : t[`${
|
|
2515
|
+
null != e && (t[`${qr}${n}-${r + 1}`] = String(e));
|
|
2516
|
+
}) : t[`${qr}${n}`] = String(r));
|
|
2514
2517
|
}
|
|
2515
2518
|
return t;
|
|
2516
2519
|
}
|
|
2517
|
-
function
|
|
2518
|
-
return
|
|
2520
|
+
function Gr(e, ...t) {
|
|
2521
|
+
return Ur(Object.assign({}, Zr[e], ...t.filter(Boolean)));
|
|
2519
2522
|
}
|
|
2520
|
-
var
|
|
2523
|
+
var Jr = ["light", "dark"], Qr = "--sxl-input-selection", eo = "color-mix(in srgb, var(--sxl-color-primary, rgb(0, 120, 215)) 20%, transparent)", to = `:where(input,textarea,[contenteditable]:not([contenteditable="false"]))::selection{background-color:var(${Qr},${eo});}`, no = [
|
|
2521
2524
|
"sxl-defaults",
|
|
2522
2525
|
"sxl-app",
|
|
2523
2526
|
"sxl-overrides"
|
|
2524
|
-
],
|
|
2525
|
-
function
|
|
2527
|
+
], ro = `@layer ${no.join(", ")};`;
|
|
2528
|
+
function oo(e) {
|
|
2526
2529
|
let t = "";
|
|
2527
2530
|
for (const n in e) {
|
|
2528
2531
|
const r = e[n];
|
|
@@ -2532,53 +2535,53 @@ function no(e) {
|
|
|
2532
2535
|
}
|
|
2533
2536
|
return t;
|
|
2534
2537
|
}
|
|
2535
|
-
function
|
|
2536
|
-
const { app: t =
|
|
2538
|
+
function io(e = {}) {
|
|
2539
|
+
const { app: t = Zr, surfaces: n = {}, hc: r, modeAttr: o = "data-sxl-theme-mode", surfaceAttr: i = "data-sxl-theme-surface", layer: s, scope: l } = e, a = [], c = {
|
|
2537
2540
|
app: {
|
|
2538
2541
|
light: t.light,
|
|
2539
2542
|
dark: t.dark
|
|
2540
2543
|
},
|
|
2541
2544
|
...n
|
|
2542
2545
|
}, u = l ? ":scope" : ":root", h = (e) => l ? `:scope${e},${e}` : e, d = (e) => l ? `:where(:scope[${i}="${e}"],[${i}="${e}"])` : `:where([${i}="${e}"])`, f = (e, t) => `${e} ${t}`;
|
|
2543
|
-
a.push(`:where(${u}){color-scheme:light;${
|
|
2546
|
+
a.push(`:where(${u}){color-scheme:light;${oo(t.light)}}`);
|
|
2544
2547
|
for (const [e, t] of Object.entries(c)) {
|
|
2545
2548
|
const n = t?.light;
|
|
2546
|
-
n && Object.keys(n).length && a.push(`${d(e)}{${
|
|
2549
|
+
n && Object.keys(n).length && a.push(`${d(e)}{${oo(n)}}`);
|
|
2547
2550
|
}
|
|
2548
|
-
for (const e of
|
|
2549
|
-
a.push(`${h(`[${o}="${e}"]`)}{color-scheme:${e};${
|
|
2551
|
+
for (const e of Jr) {
|
|
2552
|
+
a.push(`${h(`[${o}="${e}"]`)}{color-scheme:${e};${oo(t[e])}}`);
|
|
2550
2553
|
for (const [t, n] of Object.entries(c)) {
|
|
2551
2554
|
const r = n?.[e];
|
|
2552
|
-
r && Object.keys(r).length && a.push(`${f(`[${o}="${e}"]`, `[${i}="${t}"]`)}{${
|
|
2555
|
+
r && Object.keys(r).length && a.push(`${f(`[${o}="${e}"]`, `[${i}="${t}"]`)}{${oo(r)}}`);
|
|
2553
2556
|
}
|
|
2554
2557
|
}
|
|
2555
|
-
for (const e of
|
|
2558
|
+
for (const e of Jr) for (const [t, n] of Object.entries(c)) {
|
|
2556
2559
|
const r = n?.[e];
|
|
2557
|
-
r && Object.keys(r).length && a.push(`${h(`[${o}="${e}"][${i}="${t}"]`)}{${
|
|
2560
|
+
r && Object.keys(r).length && a.push(`${h(`[${o}="${e}"][${i}="${t}"]`)}{${oo(r)}}`);
|
|
2558
2561
|
}
|
|
2559
|
-
r && Object.keys(r).length && a.push(`${h(`[${o}="hc"]`)}{${
|
|
2562
|
+
r && Object.keys(r).length && a.push(`${h(`[${o}="hc"]`)}{${oo(r)}}`), a.push(to);
|
|
2560
2563
|
let p = a.join("\n");
|
|
2561
|
-
return l && (p = `@scope (${l}){\n${p}\n}`), s && (p = `${
|
|
2564
|
+
return l && (p = `@scope (${l}){\n${p}\n}`), s && (p = `${ro}\n@layer ${s}{\n${p}\n}`), p;
|
|
2562
2565
|
}
|
|
2563
|
-
var
|
|
2564
|
-
const n = { [
|
|
2565
|
-
return t && (n[
|
|
2566
|
-
},
|
|
2567
|
-
function
|
|
2566
|
+
var so = "data-sxl-theme-mode", lo = "data-sxl-theme-surface", ao = (e, t) => {
|
|
2567
|
+
const n = { [lo]: e };
|
|
2568
|
+
return t && (n[so] = t), n;
|
|
2569
|
+
}, co = (e, t) => `sheetxl-${e}-${t.replace(/[^A-Za-z0-9_-]/g, "")}`;
|
|
2570
|
+
function uo(e) {
|
|
2568
2571
|
const { mode: t } = e || {}, [n, r] = A(() => {
|
|
2569
2572
|
if ("light" === t || "dark" === t) return {
|
|
2570
2573
|
themeMode: t,
|
|
2571
2574
|
source: "prop"
|
|
2572
2575
|
};
|
|
2573
2576
|
if ("undefined" != typeof document) {
|
|
2574
|
-
const e =
|
|
2577
|
+
const e = ho();
|
|
2575
2578
|
if (e) return {
|
|
2576
2579
|
themeMode: e,
|
|
2577
2580
|
source: "class"
|
|
2578
2581
|
};
|
|
2579
2582
|
}
|
|
2580
2583
|
return {
|
|
2581
|
-
themeMode:
|
|
2584
|
+
themeMode: fo(),
|
|
2582
2585
|
source: "media"
|
|
2583
2586
|
};
|
|
2584
2587
|
});
|
|
@@ -2589,13 +2592,13 @@ function ao(e) {
|
|
|
2589
2592
|
themeMode: t,
|
|
2590
2593
|
source: "prop"
|
|
2591
2594
|
})));
|
|
2592
|
-
const e =
|
|
2595
|
+
const e = ho();
|
|
2593
2596
|
if (e) r({
|
|
2594
2597
|
themeMode: e,
|
|
2595
2598
|
source: "class"
|
|
2596
2599
|
});
|
|
2597
2600
|
else {
|
|
2598
|
-
const e =
|
|
2601
|
+
const e = fo();
|
|
2599
2602
|
r({
|
|
2600
2603
|
themeMode: e,
|
|
2601
2604
|
source: "media"
|
|
@@ -2612,16 +2615,16 @@ function ao(e) {
|
|
|
2612
2615
|
};
|
|
2613
2616
|
}, [t]), n;
|
|
2614
2617
|
}
|
|
2615
|
-
function
|
|
2618
|
+
function ho() {
|
|
2616
2619
|
if ("undefined" == typeof document) return null;
|
|
2617
2620
|
const e = [...Array.from(document.body.classList), ...document.documentElement ? Array.from(document.documentElement.classList) : []];
|
|
2618
2621
|
return e.includes("dark") ? "dark" : e.includes("light") ? "light" : null;
|
|
2619
2622
|
}
|
|
2620
|
-
function
|
|
2623
|
+
function fo() {
|
|
2621
2624
|
return "undefined" == typeof window ? "light" : window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light";
|
|
2622
2625
|
}
|
|
2623
|
-
var
|
|
2624
|
-
const { light: t, dark: n, base: r, surfaces: o, mode: i, surface: s, isolate: l = !1, layer: a = "sxl-overrides", children: c } = e, u =
|
|
2626
|
+
var po = g(null), mo = () => S(po), go = (e) => {
|
|
2627
|
+
const { light: t, dark: n, base: r, surfaces: o, mode: i, surface: s, isolate: l = !1, layer: a = "sxl-overrides", children: c } = e, u = mo(), h = L(() => ({
|
|
2625
2628
|
...r?.light ?? {},
|
|
2626
2629
|
...u?.light ?? {},
|
|
2627
2630
|
...t ?? {}
|
|
@@ -2637,7 +2640,7 @@ var ho = g(null), fo = () => S(ho), po = (e) => {
|
|
|
2637
2640
|
r?.dark,
|
|
2638
2641
|
u?.dark,
|
|
2639
2642
|
n
|
|
2640
|
-
]), p =
|
|
2643
|
+
]), p = co("token", C()), { themeMode: m } = uo("light" === i || "dark" === i ? { mode: i } : void 0), g = void 0 === i ? void 0 : "auto" === i ? m : i, _ = g ?? u?.mode, v = L(() => io({
|
|
2641
2644
|
app: {
|
|
2642
2645
|
light: h,
|
|
2643
2646
|
dark: d
|
|
@@ -2664,45 +2667,47 @@ var ho = g(null), fo = () => S(ho), po = (e) => {
|
|
|
2664
2667
|
h,
|
|
2665
2668
|
d
|
|
2666
2669
|
]), b = R("style", { children: v }), w = {};
|
|
2667
|
-
g && (w[
|
|
2670
|
+
g && (w[so] = g), s && (w[lo] = s);
|
|
2668
2671
|
let x = c;
|
|
2669
2672
|
if (l || Object.keys(w).length > 0) {
|
|
2670
2673
|
const e = f.Children.only(c);
|
|
2671
2674
|
l && (w.className = [p, e.props?.className].filter(Boolean).join(" ") || void 0), x = f.cloneElement(e, w);
|
|
2672
2675
|
}
|
|
2673
|
-
return $(
|
|
2676
|
+
return $(po.Provider, {
|
|
2674
2677
|
value: y,
|
|
2675
2678
|
children: [b, x]
|
|
2676
2679
|
});
|
|
2677
2680
|
};
|
|
2678
|
-
function
|
|
2681
|
+
function _o(e, t) {
|
|
2679
2682
|
if (!e || "undefined" == typeof getComputedStyle) return;
|
|
2680
|
-
const n = getComputedStyle(e).getPropertyValue(
|
|
2683
|
+
const n = getComputedStyle(e).getPropertyValue(yo(t)).trim();
|
|
2681
2684
|
return "" === n ? void 0 : n;
|
|
2682
2685
|
}
|
|
2683
|
-
function
|
|
2686
|
+
function vo(e, t) {
|
|
2684
2687
|
const n = {};
|
|
2685
2688
|
if (!e || "undefined" == typeof getComputedStyle) return n;
|
|
2686
2689
|
const r = getComputedStyle(e);
|
|
2687
2690
|
for (const e of t) {
|
|
2688
|
-
const t = r.getPropertyValue(
|
|
2691
|
+
const t = r.getPropertyValue(yo(e)).trim();
|
|
2689
2692
|
"" !== t && (n[e] = t);
|
|
2690
2693
|
}
|
|
2691
2694
|
return n;
|
|
2692
2695
|
}
|
|
2693
|
-
function
|
|
2696
|
+
function yo(e) {
|
|
2694
2697
|
return e.startsWith("--") ? e : `--sxl-${e}`;
|
|
2695
2698
|
}
|
|
2696
|
-
|
|
2697
|
-
var
|
|
2698
|
-
const e = (
|
|
2699
|
-
if (null ===
|
|
2700
|
-
|
|
2701
|
-
const
|
|
2702
|
-
if (!
|
|
2703
|
-
const i =
|
|
2704
|
-
i && e(
|
|
2705
|
-
}, t = {
|
|
2699
|
+
go.displayName = "TokenThemeProvider";
|
|
2700
|
+
var bo = g(null), wo = () => {
|
|
2701
|
+
const e = (t, n) => {
|
|
2702
|
+
if (null === n) return;
|
|
2703
|
+
t.add(n);
|
|
2704
|
+
const r = o.floatByParents.get(n.key);
|
|
2705
|
+
if (!r) return;
|
|
2706
|
+
const i = o.statesByMovables.get(r);
|
|
2707
|
+
i && e(t, i);
|
|
2708
|
+
}, t = /* @__PURE__ */ new Set(), n = /* @__PURE__ */ new Set(), r = () => {
|
|
2709
|
+
n.forEach((e) => e());
|
|
2710
|
+
}, o = {
|
|
2706
2711
|
key: { label: "root" },
|
|
2707
2712
|
isRoot: !0,
|
|
2708
2713
|
parent: null,
|
|
@@ -2712,51 +2717,65 @@ var vo = g(null), yo = () => {
|
|
|
2712
2717
|
onChildVisible: () => {},
|
|
2713
2718
|
onChildHidden: () => {},
|
|
2714
2719
|
closeAll: () => {
|
|
2715
|
-
const e =
|
|
2716
|
-
return e ?
|
|
2720
|
+
const e = o.floatByParents.get(o.key);
|
|
2721
|
+
return e ? o.statesByMovables.get(e)?.close(0) ?? null : null;
|
|
2717
2722
|
},
|
|
2718
2723
|
floatElement: () => null,
|
|
2719
2724
|
anchorElement: () => null,
|
|
2720
|
-
getRoot: () =>
|
|
2725
|
+
getRoot: () => o,
|
|
2721
2726
|
floatByParents: /* @__PURE__ */ new Map(),
|
|
2722
2727
|
statesByMovables: /* @__PURE__ */ new Map(),
|
|
2723
2728
|
lastDebounced: null,
|
|
2724
|
-
debounce(e = null, n, r
|
|
2725
|
-
if (
|
|
2729
|
+
debounce(e = null, t, n, r) {
|
|
2730
|
+
if (o.lastDebounced && (o.lastDebounced.fn.clear(), o.lastDebounced = null), 0 === e) return t;
|
|
2726
2731
|
null === e && (e = 120);
|
|
2727
|
-
const s = i.debounce(() =>
|
|
2728
|
-
return
|
|
2732
|
+
const s = i.debounce(() => t(), e);
|
|
2733
|
+
return o.lastDebounced = {
|
|
2729
2734
|
fn: s,
|
|
2730
|
-
setReferences:
|
|
2731
|
-
isClose:
|
|
2732
|
-
},
|
|
2735
|
+
setReferences: n,
|
|
2736
|
+
isClose: r
|
|
2737
|
+
}, o.lastDebounced.fn;
|
|
2733
2738
|
},
|
|
2734
2739
|
getChildRef(e) {
|
|
2735
|
-
const
|
|
2736
|
-
return
|
|
2740
|
+
const t = o.floatByParents.get(e.key);
|
|
2741
|
+
return t && o.statesByMovables.get(t) || null;
|
|
2737
2742
|
},
|
|
2738
2743
|
descendants(t) {
|
|
2739
2744
|
const n = /* @__PURE__ */ new Set();
|
|
2740
2745
|
return e(n, t), n;
|
|
2741
|
-
}
|
|
2746
|
+
},
|
|
2747
|
+
addOpenPopup: (e) => (t.add(e), r(), () => {
|
|
2748
|
+
t.delete(e), r();
|
|
2749
|
+
}),
|
|
2750
|
+
isPopupOpenOutside(e) {
|
|
2751
|
+
for (const n of t) {
|
|
2752
|
+
let t = !1;
|
|
2753
|
+
for (let r = e; r && !t; r = r.parent) t = r === n;
|
|
2754
|
+
if (!t) return !0;
|
|
2755
|
+
}
|
|
2756
|
+
return !1;
|
|
2757
|
+
},
|
|
2758
|
+
subscribeOpenPopups: (e) => (n.add(e), () => {
|
|
2759
|
+
n.delete(e);
|
|
2760
|
+
})
|
|
2742
2761
|
};
|
|
2743
|
-
return
|
|
2744
|
-
},
|
|
2762
|
+
return o;
|
|
2763
|
+
}, xo = () => S(bo), So = (e) => {
|
|
2745
2764
|
const t = {};
|
|
2746
|
-
return e ? (e.mode && (t[
|
|
2765
|
+
return e ? (e.mode && (t[so] = e.mode), e.surface && (t[lo] = e.surface), {
|
|
2747
2766
|
className: e.classes?.length ? e.classes.join(" ") : void 0,
|
|
2748
2767
|
attrs: t
|
|
2749
2768
|
}) : { attrs: t };
|
|
2750
|
-
},
|
|
2769
|
+
}, Mo = "_float-popper_1z06c_1", Co = "_float-popper-grow_1z06c_14", Eo = "_entered_1z06c_22", To = [0, 2], Lo = (e) => {
|
|
2751
2770
|
const t = "function" == typeof e ? e() : e;
|
|
2752
2771
|
if (!t) return null;
|
|
2753
2772
|
if (1 === t.nodeType) return t;
|
|
2754
2773
|
const n = t.contextElement;
|
|
2755
2774
|
return n && 1 === n.nodeType ? n : null;
|
|
2756
|
-
},
|
|
2757
|
-
const { open: r, children: o, label: i, offsets: s =
|
|
2775
|
+
}, ko = w(v((t, n) => {
|
|
2776
|
+
const { open: r, children: o, label: i, offsets: s = To, anchorEl: l, anchorPosition: a, placement: c = "bottom-start", resizeOnOverflow: u = !0, boundary: h, shift: d = !1, transition: f = !0, container: p, zIndex: m, strategy: g = "absolute", themeFrom: _ = "provider", followAnchor: v = !1, style: y, className: b, onMount: w, onOpening: S, onOpen: C, onClosing: T, onClose: k, ...P } = t;
|
|
2758
2777
|
if (Array.isArray(o)) throw new Error("children can not be an array");
|
|
2759
|
-
const $ =
|
|
2778
|
+
const $ = Yt(w ?? (() => {}), [w]), B = Yt(S ?? (() => {}), [S]), O = Yt(C ?? (() => {}), [C]), H = Yt(T ?? (() => {}), [T]), N = Yt(k ?? (() => {}), [k]), [Z, q] = A(!1), [U, G] = A(!1), [J, Q] = A(!1), [ee, te] = A(), [ne, re] = A(), oe = z(null), ie = z(null), { getPortalContainer: se } = ln(), le = xo(), ae = mo(), ce = L(() => {
|
|
2760
2779
|
const e = le?.themeScope;
|
|
2761
2780
|
return ae?.scopeClass || ae?.mode ? {
|
|
2762
2781
|
classes: ae?.scopeClass ? [...e?.classes ?? [], ae.scopeClass] : e?.classes,
|
|
@@ -2774,11 +2793,11 @@ var vo = g(null), yo = () => {
|
|
|
2774
2793
|
return n.observe(t.documentElement, {
|
|
2775
2794
|
attributes: !0,
|
|
2776
2795
|
subtree: !0,
|
|
2777
|
-
attributeFilter: [
|
|
2796
|
+
attributeFilter: [so, lo]
|
|
2778
2797
|
}), () => n.disconnect();
|
|
2779
2798
|
}, [t]), r = () => `${e?.closest("[data-sxl-theme-mode]")?.getAttribute("data-sxl-theme-mode") ?? ""}\n${e?.closest("[data-sxl-theme-surface]")?.getAttribute("data-sxl-theme-surface") ?? ""}`, [o, i] = D(n, r, r).split("\n"), s = {};
|
|
2780
|
-
return o && (s[
|
|
2781
|
-
})(a ? null :
|
|
2799
|
+
return o && (s[so] = o), i && (s[lo] = i), s;
|
|
2800
|
+
})(a ? null : Lo(l)), he = z(h);
|
|
2782
2801
|
he.current = h;
|
|
2783
2802
|
const de = !!h, fe = d ? "object" == typeof d ? d.padding ?? 0 : 0 : null, { mainAxis: pe, crossAxis: me, alignmentAxis: ge } = Array.isArray(s) ? {
|
|
2784
2803
|
mainAxis: s[1] ?? 0,
|
|
@@ -2827,7 +2846,7 @@ var vo = g(null), yo = () => {
|
|
|
2827
2846
|
return e && (e.width || e.height || e.x || e.y) ? (ie.current = e, e) : ie.current ?? new DOMRect(0, 0, 0, 0);
|
|
2828
2847
|
},
|
|
2829
2848
|
get contextElement() {
|
|
2830
|
-
if (!a) return
|
|
2849
|
+
if (!a) return Lo(l) ?? void 0;
|
|
2831
2850
|
}
|
|
2832
2851
|
}), [a, l]), ye = L(() => v ? (e, t, n) => W(e, t, n, { animationFrame: !0 }) : W, [v]), { refs: be, floatingStyles: we, isPositioned: xe, placement: Se, update: Me } = X({
|
|
2833
2852
|
placement: c,
|
|
@@ -2850,10 +2869,10 @@ var vo = g(null), yo = () => {
|
|
|
2850
2869
|
xe,
|
|
2851
2870
|
U
|
|
2852
2871
|
]), M(() => {
|
|
2853
|
-
r && U ? B?.() : !r && Z &&
|
|
2872
|
+
r && U ? B?.() : !r && Z && H?.();
|
|
2854
2873
|
}, [r, U]), M(() => {
|
|
2855
2874
|
if (Z && U && r) {
|
|
2856
|
-
if (!f) return Q(!0), void
|
|
2875
|
+
if (!f) return Q(!0), void O?.();
|
|
2857
2876
|
const e = requestAnimationFrame(() => Q(!0));
|
|
2858
2877
|
return () => cancelAnimationFrame(e);
|
|
2859
2878
|
}
|
|
@@ -2865,49 +2884,49 @@ var vo = g(null), yo = () => {
|
|
|
2865
2884
|
]), M(() => {
|
|
2866
2885
|
!r && Z && (Q(!1), q(!1), G(!1), N?.());
|
|
2867
2886
|
}, [r, Z]);
|
|
2868
|
-
const Ee =
|
|
2869
|
-
e.target === e.currentTarget && r && J &&
|
|
2887
|
+
const Ee = Yt((e) => {
|
|
2888
|
+
e.target === e.currentTarget && r && J && O?.();
|
|
2870
2889
|
}, [r, J]);
|
|
2871
2890
|
if (!Z) return null;
|
|
2872
|
-
const Te = (Se ?? c).startsWith("bottom") ? "left top" : "center bottom", { className: Le, attrs: ke } =
|
|
2891
|
+
const Te = (Se ?? c).startsWith("bottom") ? "left top" : "center bottom", { className: Le, attrs: ke } = So(ce);
|
|
2873
2892
|
let ze;
|
|
2874
2893
|
ze = "anchor" === _ ? {
|
|
2875
2894
|
...ke,
|
|
2876
2895
|
...ue
|
|
2877
2896
|
} : Le || ke["data-sxl-theme-mode"] || ke["data-sxl-theme-surface"] ? ke : ue;
|
|
2878
|
-
const Ae = m ??
|
|
2879
|
-
return
|
|
2897
|
+
const Ae = m ?? jr("popup"), De = o || e.EmptyArray;
|
|
2898
|
+
return I(R("div", {
|
|
2880
2899
|
ref: Ce,
|
|
2881
|
-
className: F(
|
|
2900
|
+
className: F(Mo, b, Le),
|
|
2882
2901
|
role: void 0,
|
|
2883
2902
|
...ze,
|
|
2884
2903
|
style: {
|
|
2885
2904
|
...we,
|
|
2886
2905
|
maxHeight: u ? ee : void 0,
|
|
2887
2906
|
maxWidth: u ? ne : void 0,
|
|
2888
|
-
zIndex: r ? Ae :
|
|
2907
|
+
zIndex: r ? Ae : Yr(Ae, -1),
|
|
2889
2908
|
pointerEvents: Z && r ? void 0 : "none",
|
|
2890
2909
|
...y
|
|
2891
2910
|
},
|
|
2892
2911
|
...P,
|
|
2893
2912
|
children: f ? R("div", {
|
|
2894
|
-
className: F(
|
|
2913
|
+
className: F(Co, { [Eo]: J }),
|
|
2895
2914
|
style: { transformOrigin: Te },
|
|
2896
2915
|
onTransitionEnd: Ee,
|
|
2897
2916
|
children: De
|
|
2898
2917
|
}) : De
|
|
2899
2918
|
}), p ?? se());
|
|
2900
2919
|
}));
|
|
2901
|
-
|
|
2902
|
-
var
|
|
2920
|
+
ko.displayName = "FloatPopper";
|
|
2921
|
+
var zo = "_float-popup_juap7_1", Ao = (e) => {
|
|
2903
2922
|
const { closeFloat: t, closeFloatAll: n, floatReference: r, popupContainer: o, children: i, className: s, ...l } = e;
|
|
2904
2923
|
return R("div", {
|
|
2905
|
-
className: F("menu",
|
|
2924
|
+
className: F("menu", zo, s),
|
|
2906
2925
|
...l,
|
|
2907
2926
|
children: i
|
|
2908
2927
|
});
|
|
2909
|
-
},
|
|
2910
|
-
const { floatReference: n, popupContainer: r, renderPopupPanel: o =
|
|
2928
|
+
}, Do = "_float-panel_qj0za_1", Po = w(v((e, t) => {
|
|
2929
|
+
const { floatReference: n, popupContainer: r, renderPopupPanel: o = Ao, children: i, className: s, ...l } = e, a = {
|
|
2911
2930
|
popupContainer: r,
|
|
2912
2931
|
floatReference: n,
|
|
2913
2932
|
children: i,
|
|
@@ -2915,19 +2934,19 @@ var Lo = "_float-popup_juap7_1", ko = (e) => {
|
|
|
2915
2934
|
};
|
|
2916
2935
|
return R("div", {
|
|
2917
2936
|
ref: t,
|
|
2918
|
-
className: F(
|
|
2937
|
+
className: F(Do, s),
|
|
2919
2938
|
tabIndex: 0,
|
|
2920
|
-
children: R(
|
|
2939
|
+
children: R(Ar, {
|
|
2921
2940
|
render: o,
|
|
2922
2941
|
props: a
|
|
2923
2942
|
})
|
|
2924
2943
|
});
|
|
2925
2944
|
}));
|
|
2926
|
-
|
|
2927
|
-
var
|
|
2928
|
-
const { open: n, anchorEl: r, anchorPosition: o, label: i, floatReference: s, renderPopupPanel: l =
|
|
2945
|
+
Po.displayName = "FloatPanelSurface";
|
|
2946
|
+
var Ro = w(v((e, t) => {
|
|
2947
|
+
const { open: n, anchorEl: r, anchorPosition: o, label: i, floatReference: s, renderPopupPanel: l = Ao, propsPopper: a, onMount: c, onClosing: u, onClose: h, onOpening: d, onOpen: f, children: p, className: m, ...g } = e, _ = Yt(u ?? (() => {}), [u]), v = Yt(h ?? (() => {}), [h]), y = Yt(d ?? (() => {}), [d]), b = Yt(f ?? (() => {}), [f]), [w, x] = A(), S = z(null), M = Yt((e, t) => {
|
|
2929
2948
|
x(e), c?.(S.current, t);
|
|
2930
|
-
}, [c]), C = L(() => R(
|
|
2949
|
+
}, [c]), C = L(() => R(Po, {
|
|
2931
2950
|
ref: S,
|
|
2932
2951
|
className: m,
|
|
2933
2952
|
floatReference: s,
|
|
@@ -2941,7 +2960,7 @@ var Do = w(v((e, t) => {
|
|
|
2941
2960
|
w,
|
|
2942
2961
|
s
|
|
2943
2962
|
]);
|
|
2944
|
-
return R(
|
|
2963
|
+
return R(ko, {
|
|
2945
2964
|
ref: t,
|
|
2946
2965
|
anchorEl: r,
|
|
2947
2966
|
anchorPosition: o,
|
|
@@ -2956,9 +2975,9 @@ var Do = w(v((e, t) => {
|
|
|
2956
2975
|
children: C
|
|
2957
2976
|
});
|
|
2958
2977
|
}));
|
|
2959
|
-
|
|
2960
|
-
var
|
|
2961
|
-
const { renderFloatPanel: t, renderPopupPanel: n, propsFloatPanel: r, themeScopeClass: o, themeSurface: i, themeMode: s, isolate: l, rootRef: a, children: c } = e, u = S(
|
|
2978
|
+
Ro.displayName = "FloatPanel";
|
|
2979
|
+
var $o = (e) => R(Ro, { ...e }), Bo = (e) => {
|
|
2980
|
+
const { renderFloatPanel: t, renderPopupPanel: n, propsFloatPanel: r, themeScopeClass: o, themeSurface: i, themeMode: s, isolate: l, rootRef: a, children: c } = e, u = S(bo), h = L(() => {
|
|
2962
2981
|
const e = u?.themeScope, l = o ? [...e?.classes ?? [], o] : e?.classes, a = i ?? e?.surface, c = s ?? e?.mode, h = l?.length || a || c ? {
|
|
2963
2982
|
classes: l,
|
|
2964
2983
|
surface: a,
|
|
@@ -2979,12 +2998,12 @@ var Po = (e) => R(Do, { ...e }), Ro = (e) => {
|
|
|
2979
2998
|
s,
|
|
2980
2999
|
u
|
|
2981
3000
|
]), d = Tt();
|
|
2982
|
-
let f = R(
|
|
3001
|
+
let f = R(bo.Provider, {
|
|
2983
3002
|
value: h,
|
|
2984
3003
|
children: c
|
|
2985
3004
|
});
|
|
2986
3005
|
const p = l || !d, m = z(null);
|
|
2987
|
-
p && null === m.current && (m.current =
|
|
3006
|
+
p && null === m.current && (m.current = wo());
|
|
2988
3007
|
const g = p ? m.current : null;
|
|
2989
3008
|
g && (f = R(Et, {
|
|
2990
3009
|
value: g,
|
|
@@ -2998,8 +3017,8 @@ var Po = (e) => R(Do, { ...e }), Ro = (e) => {
|
|
|
2998
3017
|
a.current = null;
|
|
2999
3018
|
});
|
|
3000
3019
|
}, [a, _]), f;
|
|
3001
|
-
},
|
|
3002
|
-
const { anchor: t, autoFocus: n = !0, disableClickAway: r = !1, label: o = null, parentFloat: i = null, onOpen: s, onClose: l, propsPopper: a, renderPopupPanel: c, renderFloatPanel: u } = e ?? {}, h =
|
|
3020
|
+
}, Oo = (e) => {
|
|
3021
|
+
const { anchor: t, autoFocus: n = !0, disableClickAway: r = !1, label: o = null, parentFloat: i = null, onOpen: s, onClose: l, propsPopper: a, renderPopupPanel: c, renderFloatPanel: u } = e ?? {}, h = Yt(s ?? (() => {}), [s]), d = Yt(l ?? (() => {}), [l]), f = xo(), p = u ?? f?.renderFloatPanel ?? $o, m = void 0 === c ? f?.renderPopupPanel ?? Ao : c, g = Tt(), [_, v] = A(null), [y, b] = A(!1), [w, S] = A(!1), C = L(() => i ?? g ?? wo(), []), E = L(() => C.getRoot(), []), T = L(() => ({ label: o }), []), D = z(null), P = z(t);
|
|
3003
3022
|
M(() => {
|
|
3004
3023
|
P.current = t;
|
|
3005
3024
|
}, [t]);
|
|
@@ -3007,22 +3026,22 @@ var Po = (e) => R(Do, { ...e }), Ro = (e) => {
|
|
|
3007
3026
|
const t = E.floatByParents.get(e);
|
|
3008
3027
|
let n = null;
|
|
3009
3028
|
return t && (n = E.statesByMovables.get(t)?.close(0) ?? null), n;
|
|
3010
|
-
}, B = () => $(G.key), [
|
|
3029
|
+
}, B = () => $(G.key), [O, I] = A(null), H = () => {
|
|
3011
3030
|
if (!_) return K(), null;
|
|
3012
3031
|
const e = new Promise((e) => {
|
|
3013
|
-
|
|
3032
|
+
I((t) => [...t ?? [], { resolve: e }]);
|
|
3014
3033
|
});
|
|
3015
3034
|
return B(), E.floatByParents.delete(C.key), v(!1), e;
|
|
3016
3035
|
};
|
|
3017
3036
|
M(() => {
|
|
3018
|
-
if (
|
|
3019
|
-
for (const e of
|
|
3020
|
-
|
|
3037
|
+
if (O) {
|
|
3038
|
+
for (const e of O) e.resolve();
|
|
3039
|
+
I(null);
|
|
3021
3040
|
}
|
|
3022
3041
|
}, [
|
|
3023
3042
|
y,
|
|
3024
3043
|
w,
|
|
3025
|
-
|
|
3044
|
+
O
|
|
3026
3045
|
]);
|
|
3027
3046
|
const N = x(() => {
|
|
3028
3047
|
let e = C;
|
|
@@ -3041,7 +3060,7 @@ var Po = (e) => R(Do, { ...e }), Ro = (e) => {
|
|
|
3041
3060
|
closeFloat: Z,
|
|
3042
3061
|
closeFloatAll: U,
|
|
3043
3062
|
...e
|
|
3044
|
-
}), [m]), Y = null === m, X =
|
|
3063
|
+
}), [m]), Y = null === m, X = Yt((e = 120) => E.debounce(e, W, /* @__PURE__ */ new Set([G]), !1)(), [W]), Z = Yt((e = 60) => E.debounce(e, H, E.descendants(G), !0)(), [H]), q = Yt((e = 360) => E.debounce(e, B, E.descendants(E.getChildRef(G)), !0)(), [B]), U = Yt(N, [N]), G = L(() => ({
|
|
3045
3064
|
key: T,
|
|
3046
3065
|
isRoot: !1,
|
|
3047
3066
|
label: o,
|
|
@@ -3066,6 +3085,8 @@ var Po = (e) => R(Do, { ...e }), Ro = (e) => {
|
|
|
3066
3085
|
E.statesByMovables.delete(T), Z(0);
|
|
3067
3086
|
}, []), M(() => {
|
|
3068
3087
|
_ && !Y && (b(!0), C.onChildVisible());
|
|
3088
|
+
}, [_, Y]), M(() => {
|
|
3089
|
+
if (_ && !Y) return E.addOpenPopup(G);
|
|
3069
3090
|
}, [_, Y]);
|
|
3070
3091
|
const J = x((e) => {
|
|
3071
3092
|
e.which === Q.Escape && (e.preventDefault(), e.stopPropagation(), Z(0));
|
|
@@ -3090,7 +3111,7 @@ var Po = (e) => R(Do, { ...e }), Ro = (e) => {
|
|
|
3090
3111
|
M(() => {
|
|
3091
3112
|
Y && (_ ? h?.() : !1 === _ && d?.()), re(y ? R(Et, {
|
|
3092
3113
|
value: G,
|
|
3093
|
-
children: R(
|
|
3114
|
+
children: R(Ar, {
|
|
3094
3115
|
render: p,
|
|
3095
3116
|
props: {
|
|
3096
3117
|
...f?.propsFloatPanel,
|
|
@@ -3128,7 +3149,7 @@ var Po = (e) => R(Do, { ...e }), Ro = (e) => {
|
|
|
3128
3149
|
f?.propsFloatPanel,
|
|
3129
3150
|
V
|
|
3130
3151
|
]);
|
|
3131
|
-
const oe =
|
|
3152
|
+
const oe = Yt((e) => {
|
|
3132
3153
|
if (0 === E.floatByParents.size) return;
|
|
3133
3154
|
let t = !1;
|
|
3134
3155
|
const n = e.composedPath?.() ?? [], o = (t) => !!t && (n.length > 0 ? n.includes(t) : !!t.contains?.(e.target));
|
|
@@ -3154,8 +3175,8 @@ var Po = (e) => R(Do, { ...e }), Ro = (e) => {
|
|
|
3154
3175
|
reference: G,
|
|
3155
3176
|
isOpen: !0 === _
|
|
3156
3177
|
};
|
|
3157
|
-
},
|
|
3158
|
-
const { onPointerDown: t, style: n, splitDirection: r, paddingBefore: o = 0, paddingAfter: i = 0, disabled: s, key: l, propsHitArea: a =
|
|
3178
|
+
}, Io = {}, Ho = (e) => {
|
|
3179
|
+
const { onPointerDown: t, style: n, splitDirection: r, paddingBefore: o = 0, paddingAfter: i = 0, disabled: s, key: l, propsHitArea: a = Io, ...c } = e, u = "row" === r, { style: h, className: d, ...f } = a;
|
|
3159
3180
|
return R("div", {
|
|
3160
3181
|
style: {
|
|
3161
3182
|
...n,
|
|
@@ -3176,7 +3197,7 @@ var Po = (e) => R(Do, { ...e }), Ro = (e) => {
|
|
|
3176
3197
|
...f
|
|
3177
3198
|
})
|
|
3178
3199
|
}, l);
|
|
3179
|
-
},
|
|
3200
|
+
}, No = {}, Fo = (e, t, n = !0) => null === e ? null : null !== e.pixels ? n ? e.pixels : t - e.pixels : (n ? e.percent : 100 - e.percent) / 100 * t, Wo = (e, t = !0) => e?.percent ? `${t ? e.percent : 100 - e.percent}%` : e?.pixels ? `${e.pixels}px` : void 0, Vo = (e, t) => {
|
|
3180
3201
|
if (null == e) return null;
|
|
3181
3202
|
const n = {
|
|
3182
3203
|
percent: null,
|
|
@@ -3184,8 +3205,8 @@ var Po = (e) => R(Do, { ...e }), Ro = (e) => {
|
|
|
3184
3205
|
};
|
|
3185
3206
|
let r = t;
|
|
3186
3207
|
return "string" == typeof e && ((e = e.trim().toLowerCase()).endsWith("px") ? (e = e.substring(0, e.length - 2), r = !1) : e.endsWith("%") && (e = e.substring(0, e.length - 1), r = !0), e = parseFloat(e)), r ? n.percent = e : n.pixels = e, Object.freeze(n);
|
|
3187
|
-
},
|
|
3188
|
-
const { elementBefore: n, elementAfter: r, splitDirection: o = "row", fixedPane: i = null, position: s, onPositionChange: l, minBefore: a, maxBefore: c, minAfter: u, maxAfter: h, children: d, className: f, style: p, disabled: m = !1, onDragStart: g, onDragResize: _, onDragFinish: v, propsResizer: b =
|
|
3208
|
+
}, Ko = w(v((e, t) => {
|
|
3209
|
+
const { elementBefore: n, elementAfter: r, splitDirection: o = "row", fixedPane: i = null, position: s, onPositionChange: l, minBefore: a, maxBefore: c, minAfter: u, maxAfter: h, children: d, className: f, style: p, disabled: m = !1, onDragStart: g, onDragResize: _, onDragFinish: v, propsResizer: b = No, propsPane: w = No, propsPaneBefore: x = No, propsPaneAfter: S = No, renderResizer: C = Ho } = e;
|
|
3189
3210
|
if (d) throw new Error("Use elementBefore and elementAfter instead of children.");
|
|
3190
3211
|
const E = L(() => y(r) && y(n), [r, n]), T = L(() => {
|
|
3191
3212
|
let e = null;
|
|
@@ -3194,21 +3215,21 @@ var Po = (e) => R(Do, { ...e }), Ro = (e) => {
|
|
|
3194
3215
|
return {
|
|
3195
3216
|
fixedPaneOffset: e,
|
|
3196
3217
|
isPercent: t,
|
|
3197
|
-
minBefore:
|
|
3198
|
-
maxBefore:
|
|
3199
|
-
minAfter:
|
|
3200
|
-
maxAfter:
|
|
3218
|
+
minBefore: Vo(a, t),
|
|
3219
|
+
maxBefore: Vo(c, t),
|
|
3220
|
+
minAfter: Vo(u, t),
|
|
3221
|
+
maxAfter: Vo(h, t)
|
|
3201
3222
|
};
|
|
3202
3223
|
}, [
|
|
3203
3224
|
a,
|
|
3204
3225
|
c,
|
|
3205
3226
|
u,
|
|
3206
3227
|
h
|
|
3207
|
-
]), k =
|
|
3228
|
+
]), k = Yt(l ?? (() => {}), [l]), [D, P] = A(() => Vo(s, null === i));
|
|
3208
3229
|
M(() => {
|
|
3209
|
-
P(
|
|
3230
|
+
P(Vo(s, null === i));
|
|
3210
3231
|
}, [s, i]);
|
|
3211
|
-
const [B, { width:
|
|
3232
|
+
const [B, { width: O, height: I }] = _r(), [H, { width: W, height: V }] = _r(), K = "row" === o ? W : V, j = "row" === o ? O : I, Y = L(() => ((e, t, n, r) => {
|
|
3212
3233
|
const o = [null, null], i = [null, null];
|
|
3213
3234
|
if (e || (e = {
|
|
3214
3235
|
percent: null === r.fixedPaneOffset ? 50 : null,
|
|
@@ -3216,13 +3237,13 @@ var Po = (e) => R(Do, { ...e }), Ro = (e) => {
|
|
|
3216
3237
|
}), 0 === t) return void 0 !== e.pixels && null !== e.pixels ? 1 !== r.fixedPaneOffset ? (o[0] = e.pixels, i[1] = 100) : (o[1] = e.pixels - n, i[0] = 100) : void 0 !== e.percent && null !== e.percent && (1 !== r.fixedPaneOffset ? (i[0] = e.percent, i[1] = 100 - e.percent) : (i[1] = e.percent, i[0] = 100 - e.percent)), {
|
|
3217
3238
|
percents: i,
|
|
3218
3239
|
pixels: o,
|
|
3219
|
-
minBefore:
|
|
3220
|
-
maxBefore:
|
|
3221
|
-
minAfter:
|
|
3222
|
-
maxAfter:
|
|
3240
|
+
minBefore: Wo(r.minBefore, !0),
|
|
3241
|
+
maxBefore: Wo(r.maxBefore, !0),
|
|
3242
|
+
minAfter: Wo(r.minAfter),
|
|
3243
|
+
maxAfter: Wo(r.maxAfter)
|
|
3223
3244
|
};
|
|
3224
|
-
let s =
|
|
3225
|
-
u = (
|
|
3245
|
+
let s = Fo(e, t, 1 !== r.fixedPaneOffset) ?? 0, l = t - n, a = Fo(r.minBefore, l, !0) ?? 0, c = Fo(r.maxBefore, l, !0) ?? l, u = 0, h = 0, d = 0, f = l;
|
|
3246
|
+
u = (Fo(r.maxAfter, t, !1) ?? n) - n, h = Fo(r.minAfter, t, !1) ?? t, d = Math.max(a, u), f = Math.min(c, h), s = Math.max(d, Math.min(s, f)), h = Math.min(l - s, Fo(r.maxAfter, l - s, !0) ?? l), u = Math.min(l - s, Fo(r.minAfter, l - s, !0) ?? l), o[0] = s, o[1] = l - s;
|
|
3226
3247
|
const p = Math.max(0, Math.min(100, s / l * 100));
|
|
3227
3248
|
return i[0] = p, i[1] = 100 - p, {
|
|
3228
3249
|
percents: i,
|
|
@@ -3238,7 +3259,7 @@ var Po = (e) => R(Do, { ...e }), Ro = (e) => {
|
|
|
3238
3259
|
j,
|
|
3239
3260
|
K,
|
|
3240
3261
|
o
|
|
3241
|
-
]), [X, Z] = A(!1), q =
|
|
3262
|
+
]), [X, Z] = A(!1), q = Yt(g ?? (() => {}), [g]), U = Yt(_ ?? (() => {}), [_]), G = Yt(v ?? (() => {}), [v]), J = z(null), Q = z(null), ee = z(null), { style: te, className: ne, ...re } = w, oe = {
|
|
3242
3263
|
minWidth: 0,
|
|
3243
3264
|
minHeight: 0,
|
|
3244
3265
|
maxWidth: "100%",
|
|
@@ -3255,10 +3276,10 @@ var Po = (e) => R(Do, { ...e }), Ro = (e) => {
|
|
|
3255
3276
|
...p,
|
|
3256
3277
|
flexDirection: o,
|
|
3257
3278
|
display: "flex"
|
|
3258
|
-
}, { className: de, style: fe, onPointerDown: pe, ...me } = b, ge =
|
|
3259
|
-
const t =
|
|
3279
|
+
}, { className: de, style: fe, onPointerDown: pe, ...me } = b, ge = Yt((e) => {
|
|
3280
|
+
const t = Vo(e, null === i);
|
|
3260
3281
|
P(t);
|
|
3261
|
-
}, [i]), _e =
|
|
3282
|
+
}, [i]), _e = Yt((e) => {
|
|
3262
3283
|
if (m || !X) return;
|
|
3263
3284
|
const t = be.current?.getBoundingClientRect();
|
|
3264
3285
|
let n = 0;
|
|
@@ -3273,9 +3294,9 @@ var Po = (e) => R(Do, { ...e }), Ro = (e) => {
|
|
|
3273
3294
|
X,
|
|
3274
3295
|
D,
|
|
3275
3296
|
j
|
|
3276
|
-
]), ve =
|
|
3297
|
+
]), ve = Yt((e) => {
|
|
3277
3298
|
if (document.removeEventListener("pointermove", _e), document.removeEventListener("touchmove", _e), document.removeEventListener("pointerup", ve), X && (Z(!1), D)) {
|
|
3278
|
-
if (G(D.pixels ?? 0), !
|
|
3299
|
+
if (G(D.pixels ?? 0), !Vo(s, null === i) || D.pixels !== s) {
|
|
3279
3300
|
const e = D.pixels ?? 0, t = {
|
|
3280
3301
|
pixels: e,
|
|
3281
3302
|
percent: D.percent ?? e / j * 100
|
|
@@ -3290,12 +3311,12 @@ var Po = (e) => R(Do, { ...e }), Ro = (e) => {
|
|
|
3290
3311
|
s,
|
|
3291
3312
|
i,
|
|
3292
3313
|
j
|
|
3293
|
-
]), ye =
|
|
3314
|
+
]), ye = Yt((e) => {
|
|
3294
3315
|
pe?.(e), e.defaultPrevented || m || X || (Z(!0), q(), document.addEventListener("pointermove", _e, { passive: !1 }), document.addEventListener("touchmove", _e, { passive: !1 }), document.addEventListener("pointerup", ve, { passive: !1 }));
|
|
3295
|
-
}, [pe]), be =
|
|
3316
|
+
}, [pe]), be = lr(t, () => ({
|
|
3296
3317
|
setPosition: ge,
|
|
3297
3318
|
isSplitPane: () => !0
|
|
3298
|
-
}), []), we = N([
|
|
3319
|
+
}), []), we = N([H, Q]), xe = L(() => E ? R(Ar, {
|
|
3299
3320
|
render: C,
|
|
3300
3321
|
props: {
|
|
3301
3322
|
ref: we,
|
|
@@ -3380,7 +3401,7 @@ var Po = (e) => R(Do, { ...e }), Ro = (e) => {
|
|
|
3380
3401
|
]
|
|
3381
3402
|
});
|
|
3382
3403
|
}));
|
|
3383
|
-
function
|
|
3404
|
+
function jo(e) {
|
|
3384
3405
|
if ("function" == typeof e) return e;
|
|
3385
3406
|
if ("string" == typeof e) {
|
|
3386
3407
|
const t = e.trim();
|
|
@@ -3413,12 +3434,12 @@ function Vo(e) {
|
|
|
3413
3434
|
return null;
|
|
3414
3435
|
}
|
|
3415
3436
|
}(t);
|
|
3416
|
-
if (e) return
|
|
3437
|
+
if (e) return Zo(e);
|
|
3417
3438
|
}
|
|
3418
3439
|
if (t.startsWith("<")) {
|
|
3419
|
-
if (/^<\s*svg\b/i.test(t)) return
|
|
3440
|
+
if (/^<\s*svg\b/i.test(t)) return Zo(t);
|
|
3420
3441
|
if (/^<\s*path\b/i.test(t)) {
|
|
3421
|
-
const e =
|
|
3442
|
+
const e = Yo(t);
|
|
3422
3443
|
if (e) return { paths: [{ d: e }] };
|
|
3423
3444
|
}
|
|
3424
3445
|
return { paths: [{ d: t }] };
|
|
@@ -3430,7 +3451,7 @@ function Vo(e) {
|
|
|
3430
3451
|
for (const n of e) if ("string" == typeof n) {
|
|
3431
3452
|
const e = String(n).trim();
|
|
3432
3453
|
if (e.startsWith("<path")) {
|
|
3433
|
-
const n =
|
|
3454
|
+
const n = Yo(e);
|
|
3434
3455
|
n && t.push({ d: n });
|
|
3435
3456
|
} else t.push({ d: e });
|
|
3436
3457
|
} else n && "object" == typeof n && "d" in n && "string" == typeof n.d && t.push({ ...n });
|
|
@@ -3438,14 +3459,14 @@ function Vo(e) {
|
|
|
3438
3459
|
}
|
|
3439
3460
|
return e;
|
|
3440
3461
|
}
|
|
3441
|
-
function
|
|
3462
|
+
function Yo(e) {
|
|
3442
3463
|
const t = /\bd\s*=\s*(?:"([^"]+)"|'([^']+)')/i.exec(e);
|
|
3443
3464
|
return t ? t[1] ?? t[2] ?? null : null;
|
|
3444
3465
|
}
|
|
3445
|
-
function
|
|
3466
|
+
function Xo(e) {
|
|
3446
3467
|
if ("svg" in e) return {
|
|
3447
3468
|
...e,
|
|
3448
|
-
svg:
|
|
3469
|
+
svg: jo(e.svg)
|
|
3449
3470
|
};
|
|
3450
3471
|
if ("url" in e) {
|
|
3451
3472
|
const t = "string" == typeof e.url ? { src: e.url } : e.url;
|
|
@@ -3463,7 +3484,7 @@ function jo(e) {
|
|
|
3463
3484
|
}
|
|
3464
3485
|
return e;
|
|
3465
3486
|
}
|
|
3466
|
-
function
|
|
3487
|
+
function Zo(e) {
|
|
3467
3488
|
try {
|
|
3468
3489
|
if ("undefined" != typeof DOMParser) {
|
|
3469
3490
|
const t = new DOMParser().parseFromString(e, "image/svg+xml"), n = t.querySelector("svg")?.getAttribute("viewBox") ?? void 0, r = [];
|
|
@@ -3496,9 +3517,9 @@ function Yo(e) {
|
|
|
3496
3517
|
paths: r
|
|
3497
3518
|
};
|
|
3498
3519
|
}
|
|
3499
|
-
function
|
|
3520
|
+
function qo(e) {
|
|
3500
3521
|
const t = {};
|
|
3501
|
-
for (const [n, r] of Object.entries(e.icons)) t[n] =
|
|
3522
|
+
for (const [n, r] of Object.entries(e.icons)) t[n] = Xo(r);
|
|
3502
3523
|
const n = {
|
|
3503
3524
|
label: e.meta?.label ?? "Unnamed",
|
|
3504
3525
|
version: e.meta?.version ?? "1.0.0",
|
|
@@ -3515,14 +3536,14 @@ function Xo(e) {
|
|
|
3515
3536
|
const e = {};
|
|
3516
3537
|
for (const [t, n] of Object.entries(o)) {
|
|
3517
3538
|
const r = {};
|
|
3518
|
-
for (const [e, t] of Object.entries(n)) r[e] =
|
|
3539
|
+
for (const [e, t] of Object.entries(n)) r[e] = Xo(t);
|
|
3519
3540
|
e[t] = r;
|
|
3520
3541
|
}
|
|
3521
3542
|
r.__overrides = e;
|
|
3522
3543
|
}
|
|
3523
3544
|
return r;
|
|
3524
3545
|
}
|
|
3525
|
-
function
|
|
3546
|
+
function Uo() {
|
|
3526
3547
|
const e = /* @__PURE__ */ new Map(), t = /* @__PURE__ */ new Map();
|
|
3527
3548
|
let n = "base", r = /* @__PURE__ */ new Map();
|
|
3528
3549
|
async function o(t) {
|
|
@@ -3533,7 +3554,7 @@ function Zo() {
|
|
|
3533
3554
|
if (!r.loader) throw new Error(`No loader for icon pack: ${t}`);
|
|
3534
3555
|
r.loading = r.loader().then((e) => {
|
|
3535
3556
|
const t = e && "object" == typeof e && "default" in e ? e.default : e;
|
|
3536
|
-
r.pack =
|
|
3557
|
+
r.pack = qo(t);
|
|
3537
3558
|
}).catch((e) => {
|
|
3538
3559
|
throw r.loading = void 0, e;
|
|
3539
3560
|
});
|
|
@@ -3588,7 +3609,7 @@ function Zo() {
|
|
|
3588
3609
|
return {
|
|
3589
3610
|
register: function(t, r) {
|
|
3590
3611
|
const o = e.get(t) ?? {};
|
|
3591
|
-
"function" == typeof r ? o.loader = r : o.pack =
|
|
3612
|
+
"function" == typeof r ? o.loader = r : o.pack = qo(r), e.set(t, o), n || (n = t);
|
|
3592
3613
|
},
|
|
3593
3614
|
prefetch: async function(e = n) {
|
|
3594
3615
|
const t = Array.isArray(e) ? e : [e];
|
|
@@ -3651,25 +3672,25 @@ function Zo() {
|
|
|
3651
3672
|
}
|
|
3652
3673
|
};
|
|
3653
3674
|
}
|
|
3654
|
-
|
|
3655
|
-
var
|
|
3656
|
-
|
|
3657
|
-
var
|
|
3675
|
+
Ko.displayName = "SplitPane";
|
|
3676
|
+
var Go = Uo();
|
|
3677
|
+
Go.register("base", () => import("./CV1IAozST8HB0Ur0.mjs")), Go.register("cf", () => import("./BMnj0YLpW6Ayd6Yv.mjs"));
|
|
3678
|
+
var Jo = (e) => R("svg", {
|
|
3658
3679
|
...e,
|
|
3659
3680
|
children: R("path", {})
|
|
3660
|
-
}),
|
|
3681
|
+
}), Qo = {
|
|
3661
3682
|
Icon: "_Icon_16f7r_10",
|
|
3662
3683
|
"sxl-walk": "_sxl-walk_16f7r_1"
|
|
3663
|
-
},
|
|
3684
|
+
}, ei = w((t) => {
|
|
3664
3685
|
const { iconKey: n, packKey: r, className: o, style: i, role: s, title: l, size: a, ariaHidden: c, propsSource: u, children: h, ...d } = t, [f, p] = A(null);
|
|
3665
3686
|
M(() => {
|
|
3666
3687
|
let t = !0, o = r, i = n;
|
|
3667
3688
|
if (!i) {
|
|
3668
|
-
const t =
|
|
3689
|
+
const t = Go.getPack(o);
|
|
3669
3690
|
p({
|
|
3670
3691
|
glyph: t ? { svg: e.EmptyArray } : void 0,
|
|
3671
3692
|
pack: t ?? void 0,
|
|
3672
|
-
packKey: o ??
|
|
3693
|
+
packKey: o ?? Go.getActive()
|
|
3673
3694
|
});
|
|
3674
3695
|
return;
|
|
3675
3696
|
}
|
|
@@ -3677,7 +3698,7 @@ var Uo = (e) => R("svg", {
|
|
|
3677
3698
|
const [e, t] = i.split(":");
|
|
3678
3699
|
o = e, i = t;
|
|
3679
3700
|
}
|
|
3680
|
-
return
|
|
3701
|
+
return Go.resolve(i, { packKey: o }).then((e) => {
|
|
3681
3702
|
t && p(e);
|
|
3682
3703
|
}).catch(() => {}), () => {
|
|
3683
3704
|
t = !1;
|
|
@@ -3686,7 +3707,7 @@ var Uo = (e) => R("svg", {
|
|
|
3686
3707
|
const m = f?.pack, g = f?.glyph, _ = f?.packKey;
|
|
3687
3708
|
let v = g ? g.svg : void 0;
|
|
3688
3709
|
const y = g && !v ? g.url : void 0, b = !g || v || y ? void 0 : g.emoji, w = null != a ? "number" == typeof a ? `${a}px` : a : void 0, x = L(() => [
|
|
3689
|
-
|
|
3710
|
+
Qo.Icon,
|
|
3690
3711
|
"icon",
|
|
3691
3712
|
o
|
|
3692
3713
|
].filter(Boolean).join(" "), [o]), S = L(() => {
|
|
@@ -3722,8 +3743,8 @@ var Uo = (e) => R("svg", {
|
|
|
3722
3743
|
return T(R(e, { ...t }));
|
|
3723
3744
|
}
|
|
3724
3745
|
const k = { viewBox: v?.viewBox ?? m?.meta.defaultViewBox ?? "0 0 24 24" };
|
|
3725
|
-
if ("function" == typeof v) return T(v(k) ?? R(
|
|
3726
|
-
if (!v) return T(R(
|
|
3746
|
+
if ("function" == typeof v) return T(v(k) ?? R(Jo, { ...k }));
|
|
3747
|
+
if (!v) return T(R(Jo, { ...k }));
|
|
3727
3748
|
const z = v.paths;
|
|
3728
3749
|
return T(R("svg", {
|
|
3729
3750
|
...k,
|
|
@@ -3738,7 +3759,7 @@ var Uo = (e) => R("svg", {
|
|
|
3738
3759
|
}, t)) : null
|
|
3739
3760
|
}));
|
|
3740
3761
|
});
|
|
3741
|
-
function
|
|
3762
|
+
function ti(e) {
|
|
3742
3763
|
const { isWalking: t = !1, themedType: n = "primary", speed: r = 120, dashGap: o = 3, dashLength: i = 5, iconKey: s, packKey: l, style: a, className: c, ...u } = e, h = L(() => {
|
|
3743
3764
|
if (!t) return;
|
|
3744
3765
|
const e = {
|
|
@@ -3754,7 +3775,7 @@ function Qo(e) {
|
|
|
3754
3775
|
i,
|
|
3755
3776
|
n
|
|
3756
3777
|
]), d = L(() => t ? c + " walking" : c, [t, c]);
|
|
3757
|
-
return R(
|
|
3778
|
+
return R(ei, {
|
|
3758
3779
|
iconKey: s,
|
|
3759
3780
|
packKey: l,
|
|
3760
3781
|
className: d,
|
|
@@ -3765,7 +3786,7 @@ function Qo(e) {
|
|
|
3765
3786
|
...u
|
|
3766
3787
|
});
|
|
3767
3788
|
}
|
|
3768
|
-
var
|
|
3789
|
+
var ni = class {
|
|
3769
3790
|
constructor() {
|
|
3770
3791
|
this.store = /* @__PURE__ */ new Map();
|
|
3771
3792
|
}
|
|
@@ -3778,32 +3799,32 @@ var ei = class {
|
|
|
3778
3799
|
removeItem(e) {
|
|
3779
3800
|
this.store.delete(e);
|
|
3780
3801
|
}
|
|
3781
|
-
},
|
|
3802
|
+
}, ri = g(null), oi = Object.freeze({}), ii = {
|
|
3782
3803
|
parse: (e) => e ? JSON.parse(e) : null,
|
|
3783
3804
|
stringify: JSON.stringify
|
|
3784
|
-
},
|
|
3785
|
-
store: new
|
|
3805
|
+
}, si = /* @__PURE__ */ new Map(), li = {
|
|
3806
|
+
store: new ni(),
|
|
3786
3807
|
namespace: "",
|
|
3787
|
-
serializer:
|
|
3808
|
+
serializer: ii,
|
|
3788
3809
|
onReady: (e) => {
|
|
3789
3810
|
e();
|
|
3790
3811
|
},
|
|
3791
3812
|
debounceMs: 0,
|
|
3792
|
-
defaultValues:
|
|
3813
|
+
defaultValues: oi,
|
|
3793
3814
|
notify: (e, t) => {
|
|
3794
|
-
const n =
|
|
3815
|
+
const n = si.get(e);
|
|
3795
3816
|
n && n.forEach((e) => e(t));
|
|
3796
3817
|
},
|
|
3797
3818
|
subscribeKey: (e, t) => {
|
|
3798
|
-
const n =
|
|
3799
|
-
return n.add(t),
|
|
3800
|
-
const n =
|
|
3801
|
-
n && (n.delete(t), 0 === n.size &&
|
|
3819
|
+
const n = si.get(e) ?? /* @__PURE__ */ new Set();
|
|
3820
|
+
return n.add(t), si.set(e, n), () => {
|
|
3821
|
+
const n = si.get(e);
|
|
3822
|
+
n && (n.delete(t), 0 === n.size && si.delete(e));
|
|
3802
3823
|
};
|
|
3803
3824
|
}
|
|
3804
3825
|
};
|
|
3805
|
-
function
|
|
3806
|
-
const { store: r, namespace: o, serializer: i, debounceMs: s, subscribeKey: l, notify: a, defaultValues: c } = S(
|
|
3826
|
+
function ai(e, t, n = ci) {
|
|
3827
|
+
const { store: r, namespace: o, serializer: i, debounceMs: s, subscribeKey: l, notify: a, defaultValues: c } = S(ri) || li, u = n.serializer ?? i ?? ii, h = z(null), d = L(() => null == e ? null : `${o}:${e}`, [o, e]), f = d ? `${d}::v` : null, p = () => {
|
|
3807
3828
|
if (null != e && Object.prototype.hasOwnProperty.call(c, e)) return c[e];
|
|
3808
3829
|
const n = t;
|
|
3809
3830
|
return "function" == typeof n ? n() : n;
|
|
@@ -3883,11 +3904,11 @@ function si(e, t, n = li) {
|
|
|
3883
3904
|
x(() => E.current(), [])
|
|
3884
3905
|
];
|
|
3885
3906
|
}
|
|
3886
|
-
var
|
|
3887
|
-
function
|
|
3888
|
-
const { store: t, namespace: n = "", serializer: r =
|
|
3889
|
-
|
|
3890
|
-
const a = l.current, c = L(() => "undefined" == typeof window ? new
|
|
3907
|
+
var ci = {};
|
|
3908
|
+
function ui(e) {
|
|
3909
|
+
const { store: t, namespace: n = "", serializer: r = fi, debounceMs: o = 150, defaultValues: i = oi, children: s } = e, l = z(i);
|
|
3910
|
+
pi(l.current, i) || (l.current = i);
|
|
3911
|
+
const a = l.current, c = L(() => "undefined" == typeof window ? new ni() : t ?? new ni(), [t]), u = z(/* @__PURE__ */ new Map()), h = L(() => ({
|
|
3891
3912
|
store: c,
|
|
3892
3913
|
namespace: n,
|
|
3893
3914
|
serializer: r,
|
|
@@ -3920,19 +3941,19 @@ function ai(e) {
|
|
|
3920
3941
|
const t = e.slice(h.namespace.length + 1);
|
|
3921
3942
|
h.notify(t);
|
|
3922
3943
|
});
|
|
3923
|
-
}, [h]), R(
|
|
3944
|
+
}, [h]), R(ri.Provider, {
|
|
3924
3945
|
value: h,
|
|
3925
3946
|
children: s
|
|
3926
3947
|
});
|
|
3927
3948
|
}
|
|
3928
|
-
var
|
|
3949
|
+
var hi, di, fi = {
|
|
3929
3950
|
parse: (e) => null == e ? null : JSON.parse(e),
|
|
3930
3951
|
stringify: JSON.stringify
|
|
3931
|
-
},
|
|
3952
|
+
}, pi = (e, t) => {
|
|
3932
3953
|
if (e === t) return !0;
|
|
3933
3954
|
const n = Object.keys(e);
|
|
3934
3955
|
return n.length === Object.keys(t).length && n.every((n) => Object.prototype.hasOwnProperty.call(t, n) && Object.is(e[n], t[n]));
|
|
3935
|
-
},
|
|
3956
|
+
}, mi = class {
|
|
3936
3957
|
constructor(e = window.localStorage) {
|
|
3937
3958
|
this.storage = e;
|
|
3938
3959
|
}
|
|
@@ -3959,10 +3980,10 @@ var ci, ui, hi = {
|
|
|
3959
3980
|
};
|
|
3960
3981
|
return window.addEventListener("storage", t), () => window.removeEventListener("storage", t);
|
|
3961
3982
|
}
|
|
3962
|
-
},
|
|
3963
|
-
(
|
|
3964
|
-
let t =
|
|
3965
|
-
t || (t = /* @__PURE__ */ new Set(),
|
|
3983
|
+
}, gi = /* @__PURE__ */ new WeakMap();
|
|
3984
|
+
(di = hi || (hi = {})).begin = function(e) {
|
|
3985
|
+
let t = gi.get(e);
|
|
3986
|
+
t || (t = /* @__PURE__ */ new Set(), gi.set(e, t));
|
|
3966
3987
|
let n = () => {};
|
|
3967
3988
|
const r = new Promise((e) => {
|
|
3968
3989
|
n = e;
|
|
@@ -3973,25 +3994,25 @@ var ci, ui, hi = {
|
|
|
3973
3994
|
return () => {
|
|
3974
3995
|
o || (o = !0, i.delete(r), n());
|
|
3975
3996
|
};
|
|
3976
|
-
},
|
|
3977
|
-
return (
|
|
3997
|
+
}, di.isPending = function(e) {
|
|
3998
|
+
return (gi.get(e)?.size ?? 0) > 0;
|
|
3978
3999
|
};
|
|
3979
|
-
var
|
|
3980
|
-
const t =
|
|
4000
|
+
var _i = async (e) => {
|
|
4001
|
+
const t = gi.get(e);
|
|
3981
4002
|
for (; t && t.size > 0;) await Promise.allSettled([...t]);
|
|
3982
|
-
},
|
|
3983
|
-
const n = S(
|
|
4003
|
+
}, vi = g(null), yi = (e) => f.createElement(vi.Provider, { value: e.scope }, e.children), bi = (e, t) => {
|
|
4004
|
+
const n = S(vi), r = void 0 === t ? n : t;
|
|
3984
4005
|
M(() => {
|
|
3985
|
-
if (r && e) return
|
|
4006
|
+
if (r && e) return hi.begin(r);
|
|
3986
4007
|
}, [r, e]);
|
|
3987
|
-
},
|
|
4008
|
+
}, wi = {
|
|
3988
4009
|
Horizontal: "horizontal",
|
|
3989
4010
|
Vertical: "vertical"
|
|
3990
|
-
},
|
|
3991
|
-
const { style: t, orientation: n =
|
|
4011
|
+
}, xi = "_scrollbar_2chse_24", Si = "_track_2chse_35", Mi = "_thumb_2chse_47", Ci = "_scrollbar-button_2chse_96", Ei = "_touch-thumb_2chse_131", Ti = "M 5.4951012,0.62494002 7.1746358,3.4734472 8.8557603,6.3226744 c 0.13425,0.2277477 0.18228,0.4945506 0.1356,0.7535218 -0.04665,0.2589712 -0.18504,0.4935661 -0.3908099,0.6625402 C 8.3948254,7.9076371 8.1348905,8.0001761 7.8664506,7.9999997 H 1.1503225 c -0.30278993,0 -0.59312985,-0.117841 -0.80720983,-0.3275159 -0.2140799,-0.2097042 -0.3343649,-0.4941244 -0.3343649,-0.7907107 -4.5e-4,-0.1955399 0.05205,-0.3876855 0.152205,-0.55688 L 1.8390472,3.4734031 3.5178618,0.62488125 C 3.7217717,0.27898385 4.0986166,0.0658413 4.5064365,0.0658413 c 0.4078199,0 0.7846648,0.21314255 0.9885747,0.55903995 z", Li = "M 0.6632643,3.5136438 3.5117715,1.8341092 6.3609987,0.15298466 c 0.2277477,-0.13425 0.4945506,-0.18228 0.7535218,-0.1356 0.2589712,0.04665 0.4935661,0.18504 0.6625402,0.3908099 0.1689007,0.205725 0.2614397,0.4656599 0.2612633,0.73409984 v 6.7161281 c 0,0.3027899 -0.117841,0.5931298 -0.3275159,0.8072098 -0.2097042,0.2140799 -0.4941244,0.3343649 -0.7907107,0.3343649 -0.1955399,4.5e-4 -0.3876855,-0.05205 -0.55688,-0.152205 L 3.5117274,7.1696978 0.6632056,5.4908832 C 0.31730817,5.2869733 0.10416562,4.9101284 0.10416562,4.5023085 c 0,-0.4078199 0.21314255,-0.7846648 0.55903998,-0.9885747 z", ki = { transform: "rotate(180deg)" }, zi = (e) => {
|
|
4012
|
+
const { style: t, orientation: n = wi.Vertical, isBefore: r, disabled: o, ...i } = e, s = n === wi.Vertical ? Ti : Li;
|
|
3992
4013
|
return R("button", {
|
|
3993
4014
|
style: t,
|
|
3994
|
-
className: F(
|
|
4015
|
+
className: F(Ci, n, "scroll-button"),
|
|
3995
4016
|
disabled: o,
|
|
3996
4017
|
...i,
|
|
3997
4018
|
children: R("svg", {
|
|
@@ -4001,23 +4022,23 @@ var mi = async (e) => {
|
|
|
4001
4022
|
children: R("path", { d: s })
|
|
4002
4023
|
})
|
|
4003
4024
|
});
|
|
4004
|
-
},
|
|
4005
|
-
const { style: t, orientation: n =
|
|
4025
|
+
}, Ai = (e) => {
|
|
4026
|
+
const { style: t, orientation: n = wi.Vertical, isBefore: r, disabled: o, ...i } = e, s = n === wi.Vertical ? Ti : Li;
|
|
4006
4027
|
return R("button", {
|
|
4007
4028
|
style: t,
|
|
4008
|
-
className: F(
|
|
4029
|
+
className: F(Ci, n, "scroll-button"),
|
|
4009
4030
|
disabled: o,
|
|
4010
4031
|
...i,
|
|
4011
4032
|
children: R("svg", {
|
|
4012
4033
|
width: "9",
|
|
4013
4034
|
height: "9",
|
|
4014
4035
|
viewBox: "0 0 9 9",
|
|
4015
|
-
style:
|
|
4036
|
+
style: ki,
|
|
4016
4037
|
children: R("path", { d: s })
|
|
4017
4038
|
})
|
|
4018
4039
|
});
|
|
4019
|
-
},
|
|
4020
|
-
const { style: t, orientation: n =
|
|
4040
|
+
}, Di = (e) => {
|
|
4041
|
+
const { style: t, orientation: n = wi.Vertical, isBefore: r, ...o } = e, i = n === wi.Vertical;
|
|
4021
4042
|
return R("div", {
|
|
4022
4043
|
style: {
|
|
4023
4044
|
display: "flex",
|
|
@@ -4031,7 +4052,7 @@ var mi = async (e) => {
|
|
|
4031
4052
|
},
|
|
4032
4053
|
className: `scrollbar-button ${i ? "vertical" : "horizontal"} edge`,
|
|
4033
4054
|
...o,
|
|
4034
|
-
children: R(
|
|
4055
|
+
children: R(ei, {
|
|
4035
4056
|
style: {
|
|
4036
4057
|
transition: "opacity 240ms ease 0s",
|
|
4037
4058
|
opacity: e.disabled ? 0 : 1,
|
|
@@ -4041,7 +4062,7 @@ var mi = async (e) => {
|
|
|
4041
4062
|
iconKey: "MoreHorizontal"
|
|
4042
4063
|
})
|
|
4043
4064
|
});
|
|
4044
|
-
},
|
|
4065
|
+
}, Pi = 60, Ri = 260, $i = 120, Bi = (e) => {
|
|
4045
4066
|
const { vertical: t, getTrackRect: n, getThumb: r, onStart: o, onDragModeChange: i, edgeHoldIntervalMs: s = 60, pageInitialDelayMs: l = 260, pageRepeatDelayMs: a = 120 } = e;
|
|
4046
4067
|
let c = null, u = null, h = 0, d = 0, f = 1, p = 0, m = 0, g = 0, _ = null;
|
|
4047
4068
|
const v = () => {
|
|
@@ -4091,10 +4112,10 @@ var mi = async (e) => {
|
|
|
4091
4112
|
},
|
|
4092
4113
|
dispose: () => v()
|
|
4093
4114
|
};
|
|
4094
|
-
},
|
|
4115
|
+
}, Oi = (e) => {
|
|
4095
4116
|
const [t, n] = A(null), r = z(e);
|
|
4096
4117
|
r.current = e;
|
|
4097
|
-
const o = L(() =>
|
|
4118
|
+
const o = L(() => Bi({
|
|
4098
4119
|
vertical: r.current.vertical,
|
|
4099
4120
|
getTrackRect: () => r.current.getTrackRect(),
|
|
4100
4121
|
getThumb: () => r.current.getThumb(),
|
|
@@ -4110,16 +4131,16 @@ var mi = async (e) => {
|
|
|
4110
4131
|
onPointerUp: o.onPointerUp,
|
|
4111
4132
|
dragMode: t
|
|
4112
4133
|
};
|
|
4113
|
-
},
|
|
4134
|
+
}, Ii = 22, Hi = 1.8, Ni = 8, Fi = 4, Wi = 8, Vi = -2, Ki = (e = 22) => e / 2 + 8, ji = (e = 22) => e + 16, Yi = g(null), Xi = (e) => {
|
|
4114
4135
|
const { value: t, children: n } = e;
|
|
4115
|
-
return R(
|
|
4136
|
+
return R(Yi.Provider, {
|
|
4116
4137
|
value: t,
|
|
4117
4138
|
children: n
|
|
4118
4139
|
});
|
|
4119
|
-
},
|
|
4120
|
-
const { borderColor: n = "var(--sxl-color-primary, rgb(33, 115, 70))", backgroundColor: r = "var(--sxl-color-base-100, white)", fillColor: o = "var(--sxl-color-neutral, grey)", borderWidth: i = 3, size: s = 22, style: l, className: a, orientation: c =
|
|
4121
|
-
if (!
|
|
4122
|
-
const _ = c ===
|
|
4140
|
+
}, Zi = () => S(Yi), qi = Fe().supportsTouchEvents, Ui = (e) => e < 0 ? 0 : e > 1 ? 1 : e, Gi = w(v((e, t) => {
|
|
4141
|
+
const { borderColor: n = "var(--sxl-color-primary, rgb(33, 115, 70))", backgroundColor: r = "var(--sxl-color-base-100, white)", fillColor: o = "var(--sxl-color-neutral, grey)", borderWidth: i = 3, size: s = 22, style: l, className: a, orientation: c = wi.Vertical, fraction: u = 0, onScrollToFraction: h, onEdgeHold: d, onDraggingChange: f, currentTouchAnchor: p, key: m, ...g } = e;
|
|
4142
|
+
if (!qi) return null;
|
|
4143
|
+
const _ = c === wi.Vertical, v = Zi(), y = Yt(h ?? (() => {}), [h]), b = Yt(d ?? (() => {}), [d]), w = Yt(f ?? (() => {}), [f]), x = z(null), S = N([x, t]), C = Yt((e) => ({
|
|
4123
4144
|
dragging: e,
|
|
4124
4145
|
element: x.current,
|
|
4125
4146
|
source: "touch"
|
|
@@ -4137,11 +4158,11 @@ var mi = async (e) => {
|
|
|
4137
4158
|
count: 0,
|
|
4138
4159
|
timer: null
|
|
4139
4160
|
});
|
|
4140
|
-
k.current.isVertical = _, k.current.fraction =
|
|
4141
|
-
const D =
|
|
4161
|
+
k.current.isVertical = _, k.current.fraction = Ui(u), k.current.hasEdgeHold = !!d;
|
|
4162
|
+
const D = Yt(() => {
|
|
4142
4163
|
const e = k.current;
|
|
4143
4164
|
e.timer && clearTimeout(e.timer), e.timer = null;
|
|
4144
|
-
}, []), P =
|
|
4165
|
+
}, []), P = Yt(() => {
|
|
4145
4166
|
const e = k.current;
|
|
4146
4167
|
if (e.timer = null, !e.edge || !e.dragging) return;
|
|
4147
4168
|
e.count++;
|
|
@@ -4151,12 +4172,12 @@ var mi = async (e) => {
|
|
|
4151
4172
|
heldMs: Date.now() - e.engagedAt,
|
|
4152
4173
|
overshootPx: t
|
|
4153
4174
|
}) && (e.timer = setTimeout(P, 60));
|
|
4154
|
-
}, []), $ =
|
|
4175
|
+
}, []), $ = Yt(() => {
|
|
4155
4176
|
const e = k.current;
|
|
4156
4177
|
if (!e.hasEdgeHold) return;
|
|
4157
4178
|
const t = e.rawFraction < 0 ? -1 : e.rawFraction > 1 ? 1 : 0;
|
|
4158
4179
|
t !== e.edge && (e.edge = t, D(), t && (e.engagedAt = Date.now(), e.count = 0, e.timer = setTimeout(P, 60)));
|
|
4159
|
-
}, []), B =
|
|
4180
|
+
}, []), B = pn(L(() => ({
|
|
4160
4181
|
processTouch: !0,
|
|
4161
4182
|
onPointerDown: (e, t) => {
|
|
4162
4183
|
const n = k.current;
|
|
@@ -4164,7 +4185,7 @@ var mi = async (e) => {
|
|
|
4164
4185
|
},
|
|
4165
4186
|
onPointerMoveOrWait: (e) => {
|
|
4166
4187
|
const t = k.current, n = (t.isVertical ? e.clientY : e.clientX) - t.startAlong;
|
|
4167
|
-
t.rawFraction = t.startFraction + (t.travel > 0 ? n / t.travel : 0), y?.(
|
|
4188
|
+
t.rawFraction = t.startFraction + (t.travel > 0 ? n / t.travel : 0), y?.(Ui(t.rawFraction)), $();
|
|
4168
4189
|
},
|
|
4169
4190
|
onPointerUp: (e) => {
|
|
4170
4191
|
const t = k.current;
|
|
@@ -4175,17 +4196,17 @@ var mi = async (e) => {
|
|
|
4175
4196
|
const e = k.current;
|
|
4176
4197
|
e.timer && clearTimeout(e.timer), e.dragging && (e.dragging = !1, w?.(C(!1)));
|
|
4177
4198
|
}, []), !v?.portalTarget) return null;
|
|
4178
|
-
const
|
|
4199
|
+
const O = 1.8 * s, H = _ ? s : O, W = _ ? O : s, V = _ ? v.viewportHeight : v.viewportWidth, K = _ ? v.height : v.width, j = Math.max(0, K - V), Y = _ ? v.reserveVertical : v.reserveHorizontal, X = Y > 0 ? -2 : 4, Z = Math.max(0, V - Y - O - 4 - X);
|
|
4179
4200
|
k.current.travel = Z;
|
|
4180
|
-
const q = j + 4 +
|
|
4201
|
+
const q = j + 4 + O / 2 + Ui(u) * Z;
|
|
4181
4202
|
let U, G;
|
|
4182
|
-
return _ ? (U = v.width - v.crossInset -
|
|
4183
|
-
className: F("touch-thumb",
|
|
4203
|
+
return _ ? (U = v.width - v.crossInset - H / 2, G = q - W / 2) : (G = v.height - v.crossInset - W / 2, U = q - H / 2), I(R("div", {
|
|
4204
|
+
className: F("touch-thumb", Ei, a, { dragging: E }),
|
|
4184
4205
|
ref: S,
|
|
4185
4206
|
style: {
|
|
4186
4207
|
left: U,
|
|
4187
4208
|
top: G,
|
|
4188
|
-
width:
|
|
4209
|
+
width: H,
|
|
4189
4210
|
height: W,
|
|
4190
4211
|
zIndex: 20,
|
|
4191
4212
|
borderWidth: `${i}px`,
|
|
@@ -4205,15 +4226,15 @@ var mi = async (e) => {
|
|
|
4205
4226
|
...g
|
|
4206
4227
|
}), v.portalTarget, m);
|
|
4207
4228
|
}));
|
|
4208
|
-
|
|
4209
|
-
var
|
|
4210
|
-
const { offset: n = 0, totalSize: r = 0, viewportSize: o = 0, style: i, className: s, orientation: l =
|
|
4211
|
-
|
|
4229
|
+
Gi.displayName = "TouchThumbHandle";
|
|
4230
|
+
var Ji = 24, Qi = w(v((e, t) => {
|
|
4231
|
+
const { offset: n = 0, totalSize: r = 0, viewportSize: o = 0, style: i, className: s, orientation: l = wi.Vertical, onScrollOffset: a, onScroll: c, showCustomScrollButtons: u, scrollButtonIncrement: h = 200, scrollButtonInitialRepeatDelay: d = 260, scrollButtonAdditionalRepeatDelay: f = 120, minThumbSize: p = Ji, maxThumbSize: m, renderScrollButtonStart: g = zi, renderScrollButtonEnd: _ = Ai, propsTouchThumb: v, propsThumb: y, onThumbEdgeHold: b, onThumbDrag: w, onMouseDown: S, ...C } = e, E = "touch" === Sn(), T = u ?? !E;
|
|
4232
|
+
Yt(c ?? (() => {}), [c]);
|
|
4212
4233
|
const [k, D] = A({
|
|
4213
4234
|
offset: 0,
|
|
4214
4235
|
length: 0,
|
|
4215
4236
|
disabled: !1
|
|
4216
|
-
}), B = z(-1),
|
|
4237
|
+
}), B = z(-1), O = l === wi.Vertical, [I, { width: H, height: W }] = _r(), V = O ? W : H, K = z(null), j = N([I, K]), Y = Yt((e, t, n) => {
|
|
4217
4238
|
if (0 === t || 0 === n) {
|
|
4218
4239
|
const e = {
|
|
4219
4240
|
offset: 0,
|
|
@@ -4237,7 +4258,7 @@ var Ui = 24, Gi = w(v((e, t) => {
|
|
|
4237
4258
|
V,
|
|
4238
4259
|
p,
|
|
4239
4260
|
m
|
|
4240
|
-
]), X =
|
|
4261
|
+
]), X = Yt((e) => {
|
|
4241
4262
|
const t = r / V, n = Math.round(e * t);
|
|
4242
4263
|
D(Y(n, o, r)), a?.(n, o, r), B.current = e;
|
|
4243
4264
|
}, [
|
|
@@ -4246,7 +4267,7 @@ var Ui = 24, Gi = w(v((e, t) => {
|
|
|
4246
4267
|
r,
|
|
4247
4268
|
V,
|
|
4248
4269
|
k
|
|
4249
|
-
]), Z =
|
|
4270
|
+
]), Z = Yt((e) => {
|
|
4250
4271
|
D(Y(e, o, r)), a?.(e, o, r), B.current = e;
|
|
4251
4272
|
}, [
|
|
4252
4273
|
a,
|
|
@@ -4260,24 +4281,24 @@ var Ui = 24, Gi = w(v((e, t) => {
|
|
|
4260
4281
|
}, [
|
|
4261
4282
|
o,
|
|
4262
4283
|
r,
|
|
4263
|
-
|
|
4284
|
+
O,
|
|
4264
4285
|
V
|
|
4265
4286
|
]);
|
|
4266
|
-
const q = Math.max(0, r - o), U =
|
|
4287
|
+
const q = Math.max(0, r - o), U = lr(t, () => ({ isScrollbar: () => !0 }), []), G = Yt((e) => {
|
|
4267
4288
|
const t = Math.max(1, Math.floor(.9 * o)), r = e > 0 ? Math.min(q, n + t) : Math.max(0, n - t);
|
|
4268
4289
|
Z(r);
|
|
4269
4290
|
}, [
|
|
4270
4291
|
o,
|
|
4271
4292
|
n,
|
|
4272
4293
|
q
|
|
4273
|
-
]), Q =
|
|
4274
|
-
vertical:
|
|
4294
|
+
]), Q = Oi({
|
|
4295
|
+
vertical: O,
|
|
4275
4296
|
getTrackRect: () => K.current?.getBoundingClientRect() ?? null,
|
|
4276
4297
|
getThumb: () => k.disabled ? null : {
|
|
4277
4298
|
offset: k.offset,
|
|
4278
4299
|
length: k.length
|
|
4279
4300
|
},
|
|
4280
|
-
onStart:
|
|
4301
|
+
onStart: Yt((e) => k.disabled ? null : "thumb" === e ? (w?.({
|
|
4281
4302
|
dragging: !0,
|
|
4282
4303
|
element: ne.current,
|
|
4283
4304
|
source: "thumb"
|
|
@@ -4298,11 +4319,11 @@ var Ui = 24, Gi = w(v((e, t) => {
|
|
|
4298
4319
|
b,
|
|
4299
4320
|
w
|
|
4300
4321
|
])
|
|
4301
|
-
}), ee = "thumb" === Q.dragMode, te =
|
|
4322
|
+
}), ee = "thumb" === Q.dragMode, te = Yt((e) => {
|
|
4302
4323
|
const t = Math.max(1, Math.floor(.9 * o));
|
|
4303
|
-
|
|
4324
|
+
O ? ("ArrowDown" === e.key && X(Math.min(q, n + 1)), "ArrowUp" === e.key && X(Math.max(0, n - 1)), "PageDown" === e.key && X(Math.min(q, n + t)), "PageUp" === e.key && X(Math.max(0, n - t)), "Home" === e.key && X(0), "End" === e.key && X(q)) : ("ArrowRight" === e.key && X(Math.min(q, n + 1)), "ArrowLeft" === e.key && X(Math.max(0, n - 1)), "PageDown" === e.key && X(Math.min(q, n + t)), "PageUp" === e.key && X(Math.max(0, n - t)), "Home" === e.key && X(0), "End" === e.key && X(q));
|
|
4304
4325
|
}, [
|
|
4305
|
-
|
|
4326
|
+
O,
|
|
4306
4327
|
o,
|
|
4307
4328
|
r,
|
|
4308
4329
|
n,
|
|
@@ -4312,11 +4333,11 @@ var Ui = 24, Gi = w(v((e, t) => {
|
|
|
4312
4333
|
if (e) return null;
|
|
4313
4334
|
const t = R("div", {
|
|
4314
4335
|
...y,
|
|
4315
|
-
className: F(
|
|
4336
|
+
className: F(Mi, { disabled: e }),
|
|
4316
4337
|
ref: ne,
|
|
4317
4338
|
role: "slider",
|
|
4318
|
-
"aria-label":
|
|
4319
|
-
"aria-orientation":
|
|
4339
|
+
"aria-label": O ? "Rows" : "Columns",
|
|
4340
|
+
"aria-orientation": O ? "vertical" : "horizontal",
|
|
4320
4341
|
"aria-valuemin": 0,
|
|
4321
4342
|
"aria-valuemax": q,
|
|
4322
4343
|
"aria-valuenow": n,
|
|
@@ -4324,18 +4345,18 @@ var Ui = 24, Gi = w(v((e, t) => {
|
|
|
4324
4345
|
style: {
|
|
4325
4346
|
...y?.style,
|
|
4326
4347
|
position: "relative",
|
|
4327
|
-
[
|
|
4328
|
-
[
|
|
4329
|
-
transform:
|
|
4330
|
-
[
|
|
4348
|
+
[O ? "height" : "width"]: `${k.length}px`,
|
|
4349
|
+
[O ? "width" : "height"]: "100%",
|
|
4350
|
+
transform: O ? `translateY(${k.offset}px)` : `translateX(${k.offset}px)`,
|
|
4351
|
+
[O ? "minHeight" : "minWidth"]: `${p}px`
|
|
4331
4352
|
},
|
|
4332
4353
|
onMouseDown: S
|
|
4333
4354
|
});
|
|
4334
4355
|
if (!E || e) return t;
|
|
4335
4356
|
const r = Math.max(0, V - k.length);
|
|
4336
|
-
return $(P, { children: [t, R(
|
|
4357
|
+
return $(P, { children: [t, R(Gi, {
|
|
4337
4358
|
...v,
|
|
4338
|
-
orientation:
|
|
4359
|
+
orientation: O ? wi.Vertical : wi.Horizontal,
|
|
4339
4360
|
fraction: r > 0 ? k.offset / r : 0,
|
|
4340
4361
|
onScrollToFraction: (e) => X(e * r),
|
|
4341
4362
|
onEdgeHold: b,
|
|
@@ -4346,7 +4367,7 @@ var Ui = 24, Gi = w(v((e, t) => {
|
|
|
4346
4367
|
p,
|
|
4347
4368
|
q,
|
|
4348
4369
|
n,
|
|
4349
|
-
|
|
4370
|
+
O,
|
|
4350
4371
|
E,
|
|
4351
4372
|
S,
|
|
4352
4373
|
v,
|
|
@@ -4354,7 +4375,7 @@ var Ui = 24, Gi = w(v((e, t) => {
|
|
|
4354
4375
|
V,
|
|
4355
4376
|
b,
|
|
4356
4377
|
w
|
|
4357
|
-
]), [oe, ie] = A(null), se =
|
|
4378
|
+
]), [oe, ie] = A(null), se = Yt(() => {
|
|
4358
4379
|
let e;
|
|
4359
4380
|
e = "function" == typeof h ? h(n, o, r) : n - h;
|
|
4360
4381
|
const t = Math.max(0, e);
|
|
@@ -4364,7 +4385,7 @@ var Ui = 24, Gi = w(v((e, t) => {
|
|
|
4364
4385
|
n,
|
|
4365
4386
|
o,
|
|
4366
4387
|
r
|
|
4367
|
-
]), le =
|
|
4388
|
+
]), le = Yt(() => {
|
|
4368
4389
|
let e;
|
|
4369
4390
|
e = "function" == typeof h ? h(n, o, r) : n + h;
|
|
4370
4391
|
const t = Math.min(q, e);
|
|
@@ -4388,7 +4409,7 @@ var Ui = 24, Gi = w(v((e, t) => {
|
|
|
4388
4409
|
ue
|
|
4389
4410
|
]);
|
|
4390
4411
|
M(() => () => ue(), [ue]);
|
|
4391
|
-
const de = L(() => T ? R(
|
|
4412
|
+
const de = L(() => T ? R(Ar, {
|
|
4392
4413
|
render: g,
|
|
4393
4414
|
props: {
|
|
4394
4415
|
orientation: l,
|
|
@@ -4402,7 +4423,7 @@ var Ui = 24, Gi = w(v((e, t) => {
|
|
|
4402
4423
|
l,
|
|
4403
4424
|
n,
|
|
4404
4425
|
oe
|
|
4405
|
-
]), fe = L(() => T ? R(
|
|
4426
|
+
]), fe = L(() => T ? R(Ar, {
|
|
4406
4427
|
render: _,
|
|
4407
4428
|
props: {
|
|
4408
4429
|
orientation: l,
|
|
@@ -4417,10 +4438,10 @@ var Ui = 24, Gi = w(v((e, t) => {
|
|
|
4417
4438
|
n,
|
|
4418
4439
|
q,
|
|
4419
4440
|
oe
|
|
4420
|
-
]), pe =
|
|
4441
|
+
]), pe = O ? "vertical" : "horizontal", me = N([U, t]);
|
|
4421
4442
|
return $("div", {
|
|
4422
4443
|
ref: me,
|
|
4423
|
-
className: F(s,
|
|
4444
|
+
className: F(s, xi, pe, {
|
|
4424
4445
|
dragging: ee,
|
|
4425
4446
|
"has-touch-thumb": E
|
|
4426
4447
|
}),
|
|
@@ -4436,7 +4457,7 @@ var Ui = 24, Gi = w(v((e, t) => {
|
|
|
4436
4457
|
"aria-valuemax": q,
|
|
4437
4458
|
"aria-valuenow": n,
|
|
4438
4459
|
tabIndex: 0,
|
|
4439
|
-
className: F(
|
|
4460
|
+
className: F(Si, "track", pe),
|
|
4440
4461
|
onMouseDown: S,
|
|
4441
4462
|
onPointerDown: Q.onPointerDown,
|
|
4442
4463
|
onPointerMove: Q.onPointerMove,
|
|
@@ -4447,24 +4468,24 @@ var Ui = 24, Gi = w(v((e, t) => {
|
|
|
4447
4468
|
fe
|
|
4448
4469
|
]
|
|
4449
4470
|
});
|
|
4450
|
-
})),
|
|
4451
|
-
let t = null !==
|
|
4452
|
-
return t && (
|
|
4453
|
-
},
|
|
4454
|
-
let i =
|
|
4471
|
+
})), es = Date.now, ts = 1e3, ns = {}, rs = 1, os = (e) => {
|
|
4472
|
+
let t = null !== ns[e];
|
|
4473
|
+
return t && (ns[e] = null), t;
|
|
4474
|
+
}, is = (e, t, n, r = 0, o) => {
|
|
4475
|
+
let i = es(), s = i, l = 0, a = 0, c = 0, u = rs++;
|
|
4455
4476
|
if (u % 20 == 0) {
|
|
4456
4477
|
const e = {};
|
|
4457
|
-
for (let t in
|
|
4458
|
-
|
|
4478
|
+
for (let t in ns) e[t] = !0;
|
|
4479
|
+
ns = e;
|
|
4459
4480
|
}
|
|
4460
4481
|
const h = function(d) {
|
|
4461
|
-
let f = !0 !== d, p =
|
|
4482
|
+
let f = !0 !== d, p = es(), m = !0;
|
|
4462
4483
|
try {
|
|
4463
4484
|
m = (!t || t(u)) ?? !0;
|
|
4464
4485
|
} catch (e) {
|
|
4465
4486
|
m = !1;
|
|
4466
4487
|
}
|
|
4467
|
-
if (!
|
|
4488
|
+
if (!ns[u] || !m) return ns[u] = null, void n?.(60 - a / ((p - i) / ts), u, !1);
|
|
4468
4489
|
if (f) {
|
|
4469
4490
|
c = Math.round((p - s) / 16.666666666666668) - 1;
|
|
4470
4491
|
for (let e = 0; e < Math.min(c, 4); e++) h(!0), a++;
|
|
@@ -4476,17 +4497,17 @@ var Ui = 24, Gi = w(v((e, t) => {
|
|
|
4476
4497
|
} catch (e) {
|
|
4477
4498
|
_ = !1;
|
|
4478
4499
|
}
|
|
4479
|
-
!1 !== _ && 1 !== l || !f ? f && (s = p, requestAnimationFrame(h)) : (
|
|
4500
|
+
!1 !== _ && 1 !== l || !f ? f && (s = p, requestAnimationFrame(h)) : (ns[u] = null, n?.(60 - a / ((p - i) / ts), u, 1 === l || null == r));
|
|
4480
4501
|
};
|
|
4481
|
-
return
|
|
4482
|
-
},
|
|
4502
|
+
return ns[u] = !0, requestAnimationFrame(h), u;
|
|
4503
|
+
}, ss = function(e) {
|
|
4483
4504
|
return Math.pow(e - 1, 3) + 1;
|
|
4484
|
-
},
|
|
4505
|
+
}, ls = function(e) {
|
|
4485
4506
|
return (e /= .5) < 1 ? .5 * Math.pow(e, 3) : .5 * (Math.pow(e - 2, 3) + 2);
|
|
4486
|
-
},
|
|
4507
|
+
}, as = Math.log(1.15) / 100, cs = (e) => {
|
|
4487
4508
|
const t = e[1].pageX - e[0].pageX, n = e[1].pageY - e[0].pageY;
|
|
4488
4509
|
return Math.sqrt(t * t + n * n);
|
|
4489
|
-
},
|
|
4510
|
+
}, us = class {
|
|
4490
4511
|
constructor(e, t) {
|
|
4491
4512
|
this.__isSingleTouch = !1, this.__isTracking = !1, this.__didDecelerationComplete = !1, this.__isGesturing = !1, this.__isZooming = !1, this.__pinchStartDistance = 0, this.__gestureMoveX = 0, this.__gestureMoveY = 0, this.__isDragging = !1, this.__isDecelerating = 0, this.__isAnimating = 0, this.__interruptedAnimation = !1, this.__lastScale = 1, this.__enableScrollX = !0, this.__enableScrollY = !0, this.__clientLeft = 0, this.__clientTop = 0, this.__clientWidth = 0, this.__clientHeight = 0, this.__contentWidth = 0, this.__contentHeight = 0, this.__snapWidth = 100, this.__snapHeight = 100, this.__zoomLevel = 1, this.__scrollLeft = 0, this.__scrollTop = 0, this.__maxScrollLeft = 0, this.__maxScrollTop = 0, this.__scheduledLeft = 0, this.__scheduledTop = 0, this.__scheduledZoom = 0, this.__lastTouchLeft = 0, this.__lastTouchTop = 0, this.__lastTouchMove = 0, this.__positions = [], this.__initialTouchLeft = 0, this.__initialTouchTop = 0, this.__zoomLevelStart = 1, this.__minDecelerationScrollLeft = 0, this.__minDecelerationScrollTop = 0, this.__maxDecelerationScrollLeft = 0, this.__maxDecelerationScrollTop = 0, this.__decelerationVelocityX = 0, this.__decelerationVelocityY = 0, this.__zoomComplete = null, this.__callback = e, this.options = {
|
|
4492
4513
|
scrollingX: !0,
|
|
@@ -4540,7 +4561,7 @@ var Ui = 24, Gi = w(v((e, t) => {
|
|
|
4540
4561
|
}
|
|
4541
4562
|
zoomTo(e, t = !1, n, r, o) {
|
|
4542
4563
|
if (!this.options.zooming) throw new Error("Zooming is not enabled!");
|
|
4543
|
-
o && (this.__zoomComplete = o), this.__isDecelerating && (
|
|
4564
|
+
o && (this.__zoomComplete = o), this.__isDecelerating && (os(this.__isDecelerating), this.__isDecelerating = 0);
|
|
4544
4565
|
const i = this.__zoomLevel;
|
|
4545
4566
|
void 0 === n && (n = this.__clientWidth / 2), void 0 === r && (r = this.__clientHeight / 2), e = Math.max(Math.min(e, this.options.maxZoom), this.options.minZoom), this.__computeScrollMax(e);
|
|
4546
4567
|
const s = e / i;
|
|
@@ -4559,7 +4580,7 @@ var Ui = 24, Gi = w(v((e, t) => {
|
|
|
4559
4580
|
this.zoomTo(this.__zoomLevel * e, t, n, r, o);
|
|
4560
4581
|
}
|
|
4561
4582
|
scrollTo(e, t, n = !1, r) {
|
|
4562
|
-
if (this.__isDecelerating && (
|
|
4583
|
+
if (this.__isDecelerating && (os(this.__isDecelerating), this.__isDecelerating = 0), void 0 !== r && r !== this.__zoomLevel) {
|
|
4563
4584
|
if (!this.options.zooming) throw new Error("Zooming is not enabled!");
|
|
4564
4585
|
e *= r, t *= r, this.__computeScrollMax(r);
|
|
4565
4586
|
} else r = this.__zoomLevel;
|
|
@@ -4570,16 +4591,16 @@ var Ui = 24, Gi = w(v((e, t) => {
|
|
|
4570
4591
|
this.scrollTo(r + (e || 0), o + (t || 0), n);
|
|
4571
4592
|
}
|
|
4572
4593
|
doMouseZoom(e, t, n, r) {
|
|
4573
|
-
const o = Math.exp(-e *
|
|
4594
|
+
const o = Math.exp(-e * as);
|
|
4574
4595
|
return this.zoomTo(this.__zoomLevel * o, !1, n - this.__clientLeft, r - this.__clientTop);
|
|
4575
4596
|
}
|
|
4576
4597
|
doTouchStart(e, t) {
|
|
4577
4598
|
if (void 0 === e.length) throw new Error("Invalid touch list: " + e);
|
|
4578
4599
|
if (t instanceof Date && (t = t.valueOf()), "number" != typeof t) throw new Error("Invalid timestamp value: " + t);
|
|
4579
4600
|
let n, r;
|
|
4580
|
-
this.__interruptedAnimation = !0, this.__isDecelerating && (
|
|
4601
|
+
this.__interruptedAnimation = !0, this.__isDecelerating && (os(this.__isDecelerating), this.__isDecelerating = 0, this.__interruptedAnimation = !0), this.__isAnimating && (os(this.__isAnimating), this.__isAnimating = 0, this.__interruptedAnimation = !0);
|
|
4581
4602
|
let o = 1 === e.length;
|
|
4582
|
-
o ? (n = e[0].pageX, r = e[0].pageY) : (n = Math.abs(e[0].pageX + e[1].pageX) / 2, r = Math.abs(e[0].pageY + e[1].pageY) / 2), this.__initialTouchLeft = n, this.__initialTouchTop = r, this.__zoomLevelStart = this.__zoomLevel, this.__pinchStartDistance = o ? 0 :
|
|
4603
|
+
o ? (n = e[0].pageX, r = e[0].pageY) : (n = Math.abs(e[0].pageX + e[1].pageX) / 2, r = Math.abs(e[0].pageY + e[1].pageY) / 2), this.__initialTouchLeft = n, this.__initialTouchTop = r, this.__zoomLevelStart = this.__zoomLevel, this.__pinchStartDistance = o ? 0 : cs(e), this.__isGesturing = !o && !!this.options.zooming, this.__gestureMoveX = 0, this.__gestureMoveY = 0, this.__lastTouchLeft = n, this.__lastTouchTop = r, this.__lastTouchMove = t, this.__lastScale = 1, this.__enableScrollX = !o && !!this.options.scrollingX, this.__enableScrollY = !o && !!this.options.scrollingY, this.__isTracking = !0, this.__didDecelerationComplete = !1, this.__isDragging = !o, this.__isSingleTouch = o, this.__positions = [], this.__enableScrollX, this.__enableScrollY, this.__isDragging, this.__maxScrollLeft, this.__maxScrollTop;
|
|
4583
4604
|
}
|
|
4584
4605
|
doTouchMove(e, t) {
|
|
4585
4606
|
if (void 0 === e.length) throw new Error("Invalid touch list: " + e);
|
|
@@ -4588,7 +4609,7 @@ var Ui = 24, Gi = w(v((e, t) => {
|
|
|
4588
4609
|
let n, r;
|
|
4589
4610
|
2 === e.length ? (n = Math.abs(e[0].pageX + e[1].pageX) / 2, r = Math.abs(e[0].pageY + e[1].pageY) / 2) : (n = e[0].pageX, r = e[0].pageY);
|
|
4590
4611
|
let o = this.__positions;
|
|
4591
|
-
const i = 2 === e.length && this.__pinchStartDistance > 0 ?
|
|
4612
|
+
const i = 2 === e.length && this.__pinchStartDistance > 0 ? cs(e) / this.__pinchStartDistance : 1;
|
|
4592
4613
|
if (this.__isDragging) {
|
|
4593
4614
|
let e = n - this.__lastTouchLeft, s = r - this.__lastTouchTop;
|
|
4594
4615
|
this.__gestureMoveX = e, this.__gestureMoveY = s;
|
|
@@ -4635,14 +4656,14 @@ var Ui = 24, Gi = w(v((e, t) => {
|
|
|
4635
4656
|
}
|
|
4636
4657
|
__publish(e, t, n, r = !1) {
|
|
4637
4658
|
const o = this.__isAnimating;
|
|
4638
|
-
if (o && (
|
|
4659
|
+
if (o && (os(o), this.__isAnimating = 0), r && this.options.animating) {
|
|
4639
4660
|
this.__scheduledLeft = e, this.__scheduledTop = t, this.__scheduledZoom = n;
|
|
4640
4661
|
const r = this.__scrollLeft, i = this.__scrollTop, s = this.__zoomLevel, l = e - r, a = t - i, c = n - s, u = (e, t, n = !1) => {
|
|
4641
4662
|
n && (this.__scrollLeft = r + l * e, this.__scrollTop = i + a * e, this.__zoomLevel = s + c * e, this.__callback && this.__callback(this.__scrollLeft, this.__scrollTop, this.__zoomLevel));
|
|
4642
4663
|
}, h = (e) => this.__isAnimating === e, d = (e, t, n = !1) => {
|
|
4643
4664
|
t === this.__isAnimating && (this.__isAnimating = 0), (this.__didDecelerationComplete || n) && this.options.scrollingComplete?.(), this.options.zooming && (this.__computeScrollMax(), this.__zoomComplete && (this.__zoomComplete(), this.__zoomComplete = null));
|
|
4644
4665
|
};
|
|
4645
|
-
this.__isAnimating =
|
|
4666
|
+
this.__isAnimating = is(u, h, d, this.options.animationDuration, o ? ss : ls);
|
|
4646
4667
|
} else this.__scheduledLeft = this.__scrollLeft = e, this.__scheduledTop = this.__scrollTop = t, this.__scheduledZoom = this.__zoomLevel = n, this.__callback && this.__callback(e, t, n), this.options.zooming && (this.__computeScrollMax(), this.__zoomComplete && (this.__zoomComplete(), this.__zoomComplete = null));
|
|
4647
4668
|
}
|
|
4648
4669
|
__computeScrollMax(e = this.__zoomLevel) {
|
|
@@ -4654,7 +4675,7 @@ var Ui = 24, Gi = w(v((e, t) => {
|
|
|
4654
4675
|
this.__minDecelerationScrollLeft = Math.floor(e / n) * n, this.__minDecelerationScrollTop = Math.floor(t / r) * r, this.__maxDecelerationScrollLeft = Math.ceil(e / n) * n, this.__maxDecelerationScrollTop = Math.ceil(t / r) * r;
|
|
4655
4676
|
} else this.__minDecelerationScrollLeft = 0, this.__minDecelerationScrollTop = 0, this.__maxDecelerationScrollLeft = this.__maxScrollLeft, this.__maxDecelerationScrollTop = this.__maxScrollTop;
|
|
4656
4677
|
const t = this.options.snapping ? 4 : .1;
|
|
4657
|
-
this.__isDecelerating =
|
|
4678
|
+
this.__isDecelerating = is((e, t, n = !1) => {
|
|
4658
4679
|
this.__stepThroughDeceleration(n);
|
|
4659
4680
|
}, () => {
|
|
4660
4681
|
const e = Math.abs(this.__decelerationVelocityX) >= t || Math.abs(this.__decelerationVelocityY) >= t;
|
|
@@ -4680,11 +4701,11 @@ var Ui = 24, Gi = w(v((e, t) => {
|
|
|
4680
4701
|
t < this.__minDecelerationScrollLeft ? e = this.__minDecelerationScrollLeft - t : t > this.__maxDecelerationScrollLeft && (e = this.__maxDecelerationScrollLeft - t), n < this.__minDecelerationScrollTop ? r = this.__minDecelerationScrollTop - n : n > this.__maxDecelerationScrollTop && (r = this.__maxDecelerationScrollTop - n), 0 !== e && (e * this.__decelerationVelocityX <= 0 ? this.__decelerationVelocityX += e * o : this.__decelerationVelocityX = e * i), 0 !== r && (r * this.__decelerationVelocityY <= 0 ? this.__decelerationVelocityY += r * o : this.__decelerationVelocityY = r * i);
|
|
4681
4702
|
}
|
|
4682
4703
|
}
|
|
4683
|
-
},
|
|
4704
|
+
}, hs = /* @__PURE__ */ new Set([
|
|
4684
4705
|
"auto",
|
|
4685
4706
|
"scroll",
|
|
4686
4707
|
"overlay"
|
|
4687
|
-
]),
|
|
4708
|
+
]), ds = /* @__PURE__ */ new Set(["contain", "none"]), fs = (e, t) => {
|
|
4688
4709
|
const { deltaX: n, deltaY: r, shiftKey: o } = e, i = o || Math.abs(n) > Math.abs(r), s = o ? r : i ? n : r;
|
|
4689
4710
|
if (0 === s) return null;
|
|
4690
4711
|
let l = e.target instanceof Element ? e.target : null;
|
|
@@ -4693,21 +4714,21 @@ var Ui = 24, Gi = w(v((e, t) => {
|
|
|
4693
4714
|
const e = i ? l.scrollWidth - l.clientWidth : l.scrollHeight - l.clientHeight;
|
|
4694
4715
|
if (e > 0) {
|
|
4695
4716
|
const t = getComputedStyle(l);
|
|
4696
|
-
if (
|
|
4717
|
+
if (hs.has(i ? t.overflowX : t.overflowY)) {
|
|
4697
4718
|
const n = i ? l.scrollLeft : l.scrollTop;
|
|
4698
4719
|
if (s < 0 ? n > 0 : n < e - 1) return "native";
|
|
4699
|
-
if (
|
|
4720
|
+
if (ds.has(i ? t.overscrollBehaviorX : t.overscrollBehaviorY)) return "contained";
|
|
4700
4721
|
}
|
|
4701
4722
|
}
|
|
4702
4723
|
l = l.parentElement;
|
|
4703
4724
|
}
|
|
4704
4725
|
return null;
|
|
4705
|
-
},
|
|
4726
|
+
}, ps = 100 / 3, ms = G({
|
|
4706
4727
|
PANE_SCROLLER_ATTRIBUTE: () => "data-sxl-pane-scroller",
|
|
4707
|
-
defaultRenderScrollbar: () =>
|
|
4708
|
-
getScrollTo: () =>
|
|
4709
|
-
getWheelOwner: () =>
|
|
4710
|
-
}),
|
|
4728
|
+
defaultRenderScrollbar: () => _s,
|
|
4729
|
+
getScrollTo: () => gs,
|
|
4730
|
+
getWheelOwner: () => fs
|
|
4731
|
+
}), gs = (e, t, n, r, o = 0) => {
|
|
4711
4732
|
for (let o = 0; o < n.length; o++) {
|
|
4712
4733
|
const i = n[o].getBoundingClientRect();
|
|
4713
4734
|
let s = i.left - t, l = s + i.width;
|
|
@@ -4716,20 +4737,20 @@ var Ui = 24, Gi = w(v((e, t) => {
|
|
|
4716
4737
|
} else if (Math.ceil(l) > Math.ceil(e) + 2) return l;
|
|
4717
4738
|
}
|
|
4718
4739
|
return o;
|
|
4719
|
-
},
|
|
4740
|
+
}, _s = (e) => R(Qi, { ...e }), vs = (e) => {
|
|
4720
4741
|
const t = e.ownerDocument?.defaultView;
|
|
4721
4742
|
return t ? t.getComputedStyle(e).touchAction : "";
|
|
4722
|
-
},
|
|
4743
|
+
}, ys = (e) => {
|
|
4723
4744
|
const t = e.trim();
|
|
4724
4745
|
return "" === t || "auto" === t || "manipulation" === t || t.split(/\s+/).some((e) => e.startsWith("pan-"));
|
|
4725
|
-
},
|
|
4726
|
-
const { children: n, viewport: r, disableMouseWheel: o = !1, onWheelScroll: i, zoomable: s = !1, showHorizontalScrollbar: l = !0, showVerticalScrollbar: a = !0, renderScrollCorner: c =
|
|
4746
|
+
}, bs = "_scrollpane_zdrii_2", ws = "_scrollpane-content_zdrii_20", xs = "_scrollpane-content-cell_zdrii_33", Ss = "_vertical-container_zdrii_42", Ms = "_horizontal-container_zdrii_50", Cs = "_corner-container_zdrii_59", Es = "_touch-thumb-overlay_zdrii_68", Ts = w(v((e, t) => {
|
|
4747
|
+
const { children: n, viewport: r, disableMouseWheel: o = !1, onWheelScroll: i, zoomable: s = !1, showHorizontalScrollbar: l = !0, showVerticalScrollbar: a = !0, renderScrollCorner: c = Ls, renderScrollbarHorizontal: u = _s, renderScrollbarVertical: h = _s, style: d, className: f, disableTouch: p, ...m } = e, g = l && u, _ = a && h, v = Gt(r, (e) => e.getMetrics()), y = x((e, t) => {
|
|
4727
4748
|
if (!r) return;
|
|
4728
4749
|
const n = r.getTarget();
|
|
4729
4750
|
r.setTarget(e.left ?? n.left, e.top ?? n.top, t);
|
|
4730
|
-
}, [r]), b =
|
|
4751
|
+
}, [r]), b = lr(t, () => ({ isScrollPane: () => !0 }), []);
|
|
4731
4752
|
M(() => {}, []);
|
|
4732
|
-
const w = z(null), S =
|
|
4753
|
+
const w = z(null), S = Yt((e) => {
|
|
4733
4754
|
r?.requestZoom(e);
|
|
4734
4755
|
}, [r]), C = z({
|
|
4735
4756
|
active: !1,
|
|
@@ -4748,7 +4769,7 @@ var Ui = 24, Gi = w(v((e, t) => {
|
|
|
4748
4769
|
panY: 0,
|
|
4749
4770
|
phase: "end"
|
|
4750
4771
|
}), r && w.current?.setZoomLevel(r.getZoom()));
|
|
4751
|
-
}, [r]), T =
|
|
4772
|
+
}, [r]), T = Yt((e, t, n) => {
|
|
4752
4773
|
const r = w.current;
|
|
4753
4774
|
if (!r) return;
|
|
4754
4775
|
const o = C.current;
|
|
@@ -4763,21 +4784,21 @@ var Ui = 24, Gi = w(v((e, t) => {
|
|
|
4763
4784
|
const e = C.current;
|
|
4764
4785
|
e.endTimer && (clearTimeout(e.endTimer), e.endTimer = null);
|
|
4765
4786
|
}, []), ((e, t) => {
|
|
4766
|
-
const { enabled: n = !0, onScrollBy: r, onWheelScroll: o, onZoomBy: i } = t, s =
|
|
4787
|
+
const { enabled: n = !0, onScrollBy: r, onWheelScroll: o, onZoomBy: i } = t, s = Yt(r, [r]), l = Yt(o ?? (() => {}), [o]), a = Yt(i ?? (() => {}), [i]), c = z(!!i);
|
|
4767
4788
|
c.current = !!i;
|
|
4768
4789
|
const u = z(null), h = z(null), d = z({
|
|
4769
4790
|
deltaY: 0,
|
|
4770
4791
|
clientX: 0,
|
|
4771
4792
|
clientY: 0
|
|
4772
|
-
}), f =
|
|
4793
|
+
}), f = Yt((t) => {
|
|
4773
4794
|
const n = t.shiftKey, { deltaX: r, deltaY: o, deltaMode: i } = t, f = c.current && !n && (t.ctrlKey || t.metaKey);
|
|
4774
4795
|
if (!f && e.current) {
|
|
4775
|
-
const n =
|
|
4796
|
+
const n = fs(t, e.current);
|
|
4776
4797
|
if ("native" === n) return;
|
|
4777
4798
|
if ("contained" === n) return void t.preventDefault();
|
|
4778
4799
|
}
|
|
4779
4800
|
if (t.preventDefault(), f) {
|
|
4780
|
-
const e = 1 === i ?
|
|
4801
|
+
const e = 1 === i ? ps : 2 === i ? 800 : 1, n = d.current;
|
|
4781
4802
|
if (n.deltaY += o * e, n.clientX = t.clientX, n.clientY = t.clientY, h.current) return;
|
|
4782
4803
|
h.current = window.requestAnimationFrame(() => {
|
|
4783
4804
|
h.current = null;
|
|
@@ -4818,7 +4839,7 @@ var Ui = 24, Gi = w(v((e, t) => {
|
|
|
4818
4839
|
onWheelScroll: i,
|
|
4819
4840
|
onZoomBy: s ? T : void 0
|
|
4820
4841
|
});
|
|
4821
|
-
const k = z(!1), D =
|
|
4842
|
+
const k = z(!1), D = Gt(r, (e) => e.getZoom());
|
|
4822
4843
|
M(() => {
|
|
4823
4844
|
w.current && null != D && (C.current.active || (w.current.setZoomLevel(D), C.current.lastZoom = w.current.__zoomLevel));
|
|
4824
4845
|
}, [D]), M(() => {
|
|
@@ -4856,21 +4877,21 @@ var Ui = 24, Gi = w(v((e, t) => {
|
|
|
4856
4877
|
left: e,
|
|
4857
4878
|
top: t
|
|
4858
4879
|
});
|
|
4859
|
-
}, []), B = z(!1),
|
|
4860
|
-
1 === e.touches.length && (B.current = ((e, t, n =
|
|
4880
|
+
}, []), B = z(!1), O = x((e) => {
|
|
4881
|
+
1 === e.touches.length && (B.current = ((e, t, n = vs) => {
|
|
4861
4882
|
let r = e instanceof Element ? e : null;
|
|
4862
4883
|
for (; r && r !== t;) {
|
|
4863
|
-
if (!
|
|
4884
|
+
if (!ys(n(r))) return !0;
|
|
4864
4885
|
r = r.parentElement;
|
|
4865
4886
|
}
|
|
4866
4887
|
return !1;
|
|
4867
4888
|
})(e.target, b.current)), e.touches.length, B.current, B.current || w.current?.doTouchStart(e.touches, e.timeStamp);
|
|
4868
|
-
}, []),
|
|
4889
|
+
}, []), I = x((e) => {
|
|
4869
4890
|
B.current || (e.preventDefault(), 2 === e.touches.length && (C.current.focal = {
|
|
4870
4891
|
clientX: (e.touches[0].clientX + e.touches[1].clientX) / 2,
|
|
4871
4892
|
clientY: (e.touches[0].clientY + e.touches[1].clientY) / 2
|
|
4872
4893
|
}), e.touches.length, w.current, w.current, w.current, w.current?.doTouchMove(e.touches, e.timeStamp));
|
|
4873
|
-
}, []),
|
|
4894
|
+
}, []), H = x((e) => {
|
|
4874
4895
|
B.current ? 0 === e.touches.length && (B.current = !1) : (w.current?.doTouchEnd(e.timeStamp), E());
|
|
4875
4896
|
}, [E]), N = x(({ containerWidth: e, containerHeight: t, totalWidth: n, totalHeight: r }) => {
|
|
4876
4897
|
w.current && w.current.setDimensions(e, t, n, r);
|
|
@@ -4878,7 +4899,7 @@ var Ui = 24, Gi = w(v((e, t) => {
|
|
|
4878
4899
|
M(() => {
|
|
4879
4900
|
const e = b.current, t = !p && Fe().supportsTouchEvents;
|
|
4880
4901
|
if ((t || s) && e && v) {
|
|
4881
|
-
w.current || (w.current = new
|
|
4902
|
+
w.current || (w.current = new us(P, {
|
|
4882
4903
|
scrollingX: !0,
|
|
4883
4904
|
scrollingY: !0,
|
|
4884
4905
|
decelerationRate: .95,
|
|
@@ -4886,7 +4907,7 @@ var Ui = 24, Gi = w(v((e, t) => {
|
|
|
4886
4907
|
zooming: !0,
|
|
4887
4908
|
minZoom: .1,
|
|
4888
4909
|
maxZoom: 4
|
|
4889
|
-
}), w.current.setZoomLevel(r?.getZoom() ?? 1), C.current.lastZoom = w.current.__zoomLevel), t && (e.addEventListener("touchstart",
|
|
4910
|
+
}), w.current.setZoomLevel(r?.getZoom() ?? 1), C.current.lastZoom = w.current.__zoomLevel), t && (e.addEventListener("touchstart", O, { passive: !1 }), e.addEventListener("touchend", H), e.addEventListener("touchmove", I, { passive: !1 }));
|
|
4890
4911
|
const n = r?.getZoom() || 1;
|
|
4891
4912
|
N({
|
|
4892
4913
|
containerWidth: v?.width,
|
|
@@ -4896,7 +4917,7 @@ var Ui = 24, Gi = w(v((e, t) => {
|
|
|
4896
4917
|
});
|
|
4897
4918
|
}
|
|
4898
4919
|
return () => {
|
|
4899
|
-
e?.removeEventListener("touchstart",
|
|
4920
|
+
e?.removeEventListener("touchstart", O), e?.removeEventListener("touchend", H), e?.removeEventListener("touchmove", I);
|
|
4900
4921
|
};
|
|
4901
4922
|
}, [
|
|
4902
4923
|
v?.width,
|
|
@@ -4907,11 +4928,11 @@ var Ui = 24, Gi = w(v((e, t) => {
|
|
|
4907
4928
|
p,
|
|
4908
4929
|
s
|
|
4909
4930
|
]);
|
|
4910
|
-
const W = Fe().supportsTouchEvents, [V, K] = A(null), [j, { width: Y, height: X }] =
|
|
4931
|
+
const W = Fe().supportsTouchEvents, [V, K] = A(null), [j, { width: Y, height: X }] = _r(), Z = x((e) => {
|
|
4911
4932
|
K(e), j(e);
|
|
4912
4933
|
}, [j]), q = L(() => {
|
|
4913
4934
|
if (!V) return null;
|
|
4914
|
-
const e =
|
|
4935
|
+
const e = ji(), t = Math.min(Y, v?.width ?? Y), n = Math.min(X, v?.height ?? X);
|
|
4915
4936
|
return {
|
|
4916
4937
|
portalTarget: V,
|
|
4917
4938
|
width: Y,
|
|
@@ -4920,7 +4941,7 @@ var Ui = 24, Gi = w(v((e, t) => {
|
|
|
4920
4941
|
viewportHeight: n,
|
|
4921
4942
|
reserveVertical: g ? e : 0,
|
|
4922
4943
|
reserveHorizontal: _ ? e : 0,
|
|
4923
|
-
crossInset:
|
|
4944
|
+
crossInset: Ki()
|
|
4924
4945
|
};
|
|
4925
4946
|
}, [
|
|
4926
4947
|
V,
|
|
@@ -4932,10 +4953,10 @@ var Ui = 24, Gi = w(v((e, t) => {
|
|
|
4932
4953
|
_
|
|
4933
4954
|
]), U = L(() => {
|
|
4934
4955
|
if (!_) return null;
|
|
4935
|
-
const e = R(
|
|
4956
|
+
const e = R(Ar, {
|
|
4936
4957
|
render: h,
|
|
4937
4958
|
props: {
|
|
4938
|
-
orientation:
|
|
4959
|
+
orientation: wi.Vertical,
|
|
4939
4960
|
offset: v?.top ?? 0,
|
|
4940
4961
|
viewportSize: v?.height ?? 0,
|
|
4941
4962
|
totalSize: v?.totalHeight ?? 0,
|
|
@@ -4945,7 +4966,7 @@ var Ui = 24, Gi = w(v((e, t) => {
|
|
|
4945
4966
|
}
|
|
4946
4967
|
});
|
|
4947
4968
|
return R("div", {
|
|
4948
|
-
className: F("vertical-container",
|
|
4969
|
+
className: F("vertical-container", Ss),
|
|
4949
4970
|
children: e
|
|
4950
4971
|
});
|
|
4951
4972
|
}, [
|
|
@@ -4955,10 +4976,10 @@ var Ui = 24, Gi = w(v((e, t) => {
|
|
|
4955
4976
|
v?.totalHeight
|
|
4956
4977
|
]), G = L(() => {
|
|
4957
4978
|
if (!g) return null;
|
|
4958
|
-
const e = R(
|
|
4979
|
+
const e = R(Ar, {
|
|
4959
4980
|
render: u,
|
|
4960
4981
|
props: {
|
|
4961
|
-
orientation:
|
|
4982
|
+
orientation: wi.Horizontal,
|
|
4962
4983
|
offset: v?.left ?? 0,
|
|
4963
4984
|
viewportSize: v?.width ?? 0,
|
|
4964
4985
|
totalSize: v?.totalWidth ?? 0,
|
|
@@ -4968,7 +4989,7 @@ var Ui = 24, Gi = w(v((e, t) => {
|
|
|
4968
4989
|
}
|
|
4969
4990
|
});
|
|
4970
4991
|
return R("div", {
|
|
4971
|
-
className: F("horizontal-container",
|
|
4992
|
+
className: F("horizontal-container", Ms),
|
|
4972
4993
|
children: e
|
|
4973
4994
|
});
|
|
4974
4995
|
}, [
|
|
@@ -4977,8 +4998,8 @@ var Ui = 24, Gi = w(v((e, t) => {
|
|
|
4977
4998
|
v?.width,
|
|
4978
4999
|
v?.totalWidth
|
|
4979
5000
|
]), J = L(() => _ && g ? R("div", {
|
|
4980
|
-
className: F("corner-container",
|
|
4981
|
-
children: R(
|
|
5001
|
+
className: F("corner-container", Cs),
|
|
5002
|
+
children: R(Ar, {
|
|
4982
5003
|
render: c,
|
|
4983
5004
|
props: {}
|
|
4984
5005
|
})
|
|
@@ -4988,17 +5009,17 @@ var Ui = 24, Gi = w(v((e, t) => {
|
|
|
4988
5009
|
c
|
|
4989
5010
|
]);
|
|
4990
5011
|
return R("div", {
|
|
4991
|
-
className: F(f, "scrollpane",
|
|
5012
|
+
className: F(f, "scrollpane", bs),
|
|
4992
5013
|
style: d,
|
|
4993
5014
|
...m,
|
|
4994
5015
|
ref: b,
|
|
4995
|
-
children: R(
|
|
5016
|
+
children: R(Xi, {
|
|
4996
5017
|
value: q,
|
|
4997
5018
|
children: $("div", {
|
|
4998
|
-
className: F("scrollpane-content",
|
|
5019
|
+
className: F("scrollpane-content", ws),
|
|
4999
5020
|
children: [
|
|
5000
5021
|
R("div", {
|
|
5001
|
-
className: F("scrollpane-content-cell",
|
|
5022
|
+
className: F("scrollpane-content-cell", xs),
|
|
5002
5023
|
children: n
|
|
5003
5024
|
}),
|
|
5004
5025
|
_ ? U : null,
|
|
@@ -5006,15 +5027,15 @@ var Ui = 24, Gi = w(v((e, t) => {
|
|
|
5006
5027
|
J,
|
|
5007
5028
|
W ? R("div", {
|
|
5008
5029
|
ref: Z,
|
|
5009
|
-
className: F("touch-thumb-overlay",
|
|
5030
|
+
className: F("touch-thumb-overlay", Es)
|
|
5010
5031
|
}) : null
|
|
5011
5032
|
]
|
|
5012
5033
|
})
|
|
5013
5034
|
})
|
|
5014
5035
|
});
|
|
5015
5036
|
}));
|
|
5016
|
-
|
|
5017
|
-
var
|
|
5037
|
+
Ts.displayName = "ScrollPane";
|
|
5038
|
+
var Ls = (e) => {
|
|
5018
5039
|
const { size: t, style: n, ...r } = e;
|
|
5019
5040
|
return R("div", {
|
|
5020
5041
|
className: "corner",
|
|
@@ -5025,7 +5046,7 @@ var Es = (e) => {
|
|
|
5025
5046
|
},
|
|
5026
5047
|
...r
|
|
5027
5048
|
});
|
|
5028
|
-
},
|
|
5049
|
+
}, ks = class {
|
|
5029
5050
|
constructor(e) {
|
|
5030
5051
|
this._bounds = {
|
|
5031
5052
|
minLeft: 0,
|
|
@@ -5144,7 +5165,7 @@ var Es = (e) => {
|
|
|
5144
5165
|
}
|
|
5145
5166
|
_applyBounds(e) {
|
|
5146
5167
|
this._bounds = e;
|
|
5147
|
-
const t =
|
|
5168
|
+
const t = Os(this._target.left, e.minLeft, e.maxLeft), n = Os(this._target.top, e.minTop, e.maxTop);
|
|
5148
5169
|
t === this._target.left && n === this._target.top || (this._target = {
|
|
5149
5170
|
left: t,
|
|
5150
5171
|
top: n
|
|
@@ -5166,12 +5187,12 @@ var Es = (e) => {
|
|
|
5166
5187
|
return this._observe(e, "both");
|
|
5167
5188
|
}
|
|
5168
5189
|
_observe(e, t) {
|
|
5169
|
-
if (!e) return
|
|
5190
|
+
if (!e) return Bs;
|
|
5170
5191
|
const n = (e, n) => {
|
|
5171
5192
|
const r = this._measuredClient;
|
|
5172
5193
|
this._setMeasuredClient("height" === t ? r?.width ?? 0 : e, "width" === t ? r?.height ?? 0 : n);
|
|
5173
5194
|
};
|
|
5174
|
-
if (
|
|
5195
|
+
if (!$s()) return n(0, 0), Bs;
|
|
5175
5196
|
const r = new ResizeObserver((e) => {
|
|
5176
5197
|
const t = e[0]?.contentRect;
|
|
5177
5198
|
t && n(t.width, t.height);
|
|
@@ -5218,17 +5239,17 @@ var Es = (e) => {
|
|
|
5218
5239
|
}
|
|
5219
5240
|
setTarget(e, t, n) {
|
|
5220
5241
|
const r = this._bounds;
|
|
5221
|
-
return e =
|
|
5242
|
+
return e = Os(e, r.minLeft, r.maxLeft), t = Os(t, r.minTop, r.maxTop), this._target.left === e && this._target.top === t ? (this._current.left === e && this._current.top === t || this._ensureTicking(), !1) : (this._target = {
|
|
5222
5243
|
left: e,
|
|
5223
5244
|
top: t
|
|
5224
5245
|
}, n ? this._startAnimation() : this._anim = null, this._ensureTicking(), !0);
|
|
5225
5246
|
}
|
|
5226
5247
|
_startAnimation() {
|
|
5227
|
-
const e = this._current, t = this._target, n = this._effClient(), r = n.width > 0 ? n.width *
|
|
5228
|
-
this._anim = a <=
|
|
5248
|
+
const e = this._current, t = this._target, n = this._effClient(), r = n.width > 0 ? n.width * Ds : 1 / 0, o = n.height > 0 ? n.height * Ds : 1 / 0, i = Os(e.left, t.left - r, t.left + r), s = Os(e.top, t.top - o, t.top + o), l = Math.max(Math.abs(t.left - i), Math.abs(t.top - s)), a = Math.min(200, l * As);
|
|
5249
|
+
this._anim = a <= Ps ? null : {
|
|
5229
5250
|
fromLeft: i,
|
|
5230
5251
|
fromTop: s,
|
|
5231
|
-
start:
|
|
5252
|
+
start: Rs(),
|
|
5232
5253
|
duration: a
|
|
5233
5254
|
};
|
|
5234
5255
|
}
|
|
@@ -5267,7 +5288,7 @@ var Es = (e) => {
|
|
|
5267
5288
|
const e = this._current, t = this._target, n = this._anim;
|
|
5268
5289
|
let r, o, i = !1;
|
|
5269
5290
|
if (n) {
|
|
5270
|
-
const e = (
|
|
5291
|
+
const e = (Rs() - n.start) / n.duration;
|
|
5271
5292
|
if (e >= 1) r = t.left, o = t.top, this._anim = null;
|
|
5272
5293
|
else {
|
|
5273
5294
|
const s = 1 - Math.pow(1 - e, 3);
|
|
@@ -5279,7 +5300,7 @@ var Es = (e) => {
|
|
|
5279
5300
|
top: o
|
|
5280
5301
|
}, this._viewport = null, this._emit()), i;
|
|
5281
5302
|
}
|
|
5282
|
-
},
|
|
5303
|
+
}, zs = 200, As = 2.5, Ds = 1.5, Ps = 17, Rs = () => "undefined" != typeof performance ? performance.now() : Date.now(), $s = () => "undefined" != typeof ResizeObserver, Bs = () => {}, Os = (e, t, n) => Math.min(n, Math.max(t, e)), Is = class {
|
|
5283
5304
|
constructor(e, t, n, r, o) {
|
|
5284
5305
|
this._h = e, this._v = t, this._followH = n, this._followV = r, this._zoomCtrl = o, this._combined = null, this._hSnap = null, this._vSnap = null, this._vp = null, this._vpH = null, this._vpV = null;
|
|
5285
5306
|
}
|
|
@@ -5392,10 +5413,10 @@ var Es = (e) => {
|
|
|
5392
5413
|
setContent(e, t, n = 0, r = 0) {
|
|
5393
5414
|
this._same ? this._h.setContent(e, t, n, r) : (this._followH || this._h.setContentAxis("width", e, n), this._followV || this._v.setContentAxis("height", t, r));
|
|
5394
5415
|
}
|
|
5395
|
-
},
|
|
5396
|
-
const { offset: n = 0, viewportSize: r = 0, totalSize: o = 0, minSize: i = 0, endGap: s =
|
|
5416
|
+
}, Hs = 300, Ns = 100, Fs = 1e6, Ws = 100, Vs = 50, Ks = w(v((e, t) => {
|
|
5417
|
+
const { offset: n = 0, viewportSize: r = 0, totalSize: o = 0, minSize: i = 0, endGap: s = Hs, endScrollIncrement: l = Ns, style: a = Oe, onMouseDown: c, onThumbDrag: u, onScrollOffset: h, onScroll: d, scaleLimit: f = Fs, scaleFactor: p = Ws, precisionFactor: m = Vs, renderScrollbar: g = _s, ..._ } = e;
|
|
5397
5418
|
d && console.warn("onScroll not supported for VirtualScrollbar. Use onScrollOffset instead");
|
|
5398
|
-
const v =
|
|
5419
|
+
const v = Yt(c ?? (() => {}), [c]), [y, b] = A(!1), w = z(0), S = L(() => {
|
|
5399
5420
|
let e = 0 === f ? o : Math.min(o ?? 0, Math.max(i ?? 0, (n ?? 0) + (r ?? 0)) + (s ?? 0));
|
|
5400
5421
|
y && (e = Math.max(e, w.current)), w.current = e;
|
|
5401
5422
|
const t = 0 !== f && e > f ? p : 1, l = t / m, a = Math.ceil(e / t);
|
|
@@ -5417,24 +5438,24 @@ var Es = (e) => {
|
|
|
5417
5438
|
i,
|
|
5418
5439
|
s,
|
|
5419
5440
|
l
|
|
5420
|
-
]), M =
|
|
5441
|
+
]), M = Yt((e, t, n) => {
|
|
5421
5442
|
const r = S.offset;
|
|
5422
5443
|
Math.abs(e - r) < S.precision && (e = r), h?.(e * S.factor, r, S.viewportSize);
|
|
5423
|
-
}, [h, S]), C =
|
|
5444
|
+
}, [h, S]), C = Yt((e, t) => {
|
|
5424
5445
|
const n = 1 + Math.min(3, t.heldMs / 1e3), r = Math.max(0, S.scaledTotalSize - S.scaledViewportSize), o = Math.min(r, Math.max(0, S.scaledOffset + e * l * n));
|
|
5425
5446
|
return o !== S.scaledOffset && (h?.(o, S.scaledViewportSize, S.scaledTotalSize), !0);
|
|
5426
5447
|
}, [
|
|
5427
5448
|
S,
|
|
5428
5449
|
l,
|
|
5429
5450
|
h
|
|
5430
|
-
]), E =
|
|
5451
|
+
]), E = Yt((e) => {
|
|
5431
5452
|
b(e.dragging), u?.(e);
|
|
5432
5453
|
}, [u]), T = x((e) => {}, []), k = x((e) => {
|
|
5433
5454
|
document.removeEventListener("mousemove", T), document.removeEventListener("mouseup", k), b(!1);
|
|
5434
5455
|
}, []), D = x((e) => {
|
|
5435
5456
|
b(!0), v?.(e), document.addEventListener("mousemove", T, { passive: !0 }), document.addEventListener("mouseup", k, { passive: !0 });
|
|
5436
5457
|
}, [T, k]);
|
|
5437
|
-
return R(
|
|
5458
|
+
return R(Ar, {
|
|
5438
5459
|
render: g,
|
|
5439
5460
|
props: {
|
|
5440
5461
|
style: a,
|
|
@@ -5450,8 +5471,8 @@ var Es = (e) => {
|
|
|
5450
5471
|
}
|
|
5451
5472
|
});
|
|
5452
5473
|
}));
|
|
5453
|
-
|
|
5454
|
-
var
|
|
5474
|
+
Ks.displayName = "VirtualScrollbar";
|
|
5475
|
+
var js = "_scrollbar-themed_nj3vu_7", Ys = (e) => ({
|
|
5455
5476
|
"--scrollbar-track-color": e.track,
|
|
5456
5477
|
"--scrollbar-thumb-color": e.thumb,
|
|
5457
5478
|
"--scrollbar-button-color": e.button || e.thumb,
|
|
@@ -5463,11 +5484,11 @@ var Vs = "_scrollbar-themed_nj3vu_7", Ks = (e) => ({
|
|
|
5463
5484
|
"--scrollbar-border-radius": "9999px",
|
|
5464
5485
|
"--scrollbar-border-width": "2px",
|
|
5465
5486
|
"--scrollbar-min-thumb-size": "24px"
|
|
5466
|
-
}),
|
|
5487
|
+
}), Xs = () => {
|
|
5467
5488
|
if ("undefined" == typeof window) return !1;
|
|
5468
5489
|
const e = window.visualViewport;
|
|
5469
5490
|
return !!e && window.innerHeight - e.height * e.scale > 150;
|
|
5470
|
-
},
|
|
5491
|
+
}, Zs = (e) => {
|
|
5471
5492
|
const t = Object.freeze({ ...e }), n = !(t.disabled ?? "mouseOnly" === Fe().deviceType);
|
|
5472
5493
|
let r = {
|
|
5473
5494
|
active: !1,
|
|
@@ -5500,8 +5521,8 @@ var Vs = "_scrollbar-themed_nj3vu_7", Ks = (e) => ({
|
|
|
5500
5521
|
i.delete(e);
|
|
5501
5522
|
})
|
|
5502
5523
|
};
|
|
5503
|
-
},
|
|
5504
|
-
const { store: t, disabled: n, disableScrollIntoView: r, keepOnTap: o, children: i } = e, s = L(() => t ??
|
|
5524
|
+
}, qs = null, Us = g(null), Gs = (e) => {
|
|
5525
|
+
const { store: t, disabled: n, disableScrollIntoView: r, keepOnTap: o, children: i } = e, s = L(() => t ?? Zs({
|
|
5505
5526
|
disabled: n,
|
|
5506
5527
|
disableScrollIntoView: r,
|
|
5507
5528
|
keepOnTap: o
|
|
@@ -5511,12 +5532,12 @@ var Vs = "_scrollbar-themed_nj3vu_7", Ks = (e) => ({
|
|
|
5511
5532
|
r,
|
|
5512
5533
|
o
|
|
5513
5534
|
]);
|
|
5514
|
-
return _(
|
|
5515
|
-
},
|
|
5516
|
-
const e =
|
|
5535
|
+
return _(Us.Provider, { value: s }, i);
|
|
5536
|
+
}, Js = () => S(Us) ?? (qs || (qs = Zs()), qs), Qs = () => {
|
|
5537
|
+
const e = Js();
|
|
5517
5538
|
return D(e.subscribe, e.getState, e.getState), e;
|
|
5518
5539
|
};
|
|
5519
|
-
var
|
|
5540
|
+
var el = {
|
|
5520
5541
|
axis: q.oneOf([
|
|
5521
5542
|
"both",
|
|
5522
5543
|
"x",
|
|
@@ -5568,12 +5589,12 @@ var Js = {
|
|
|
5568
5589
|
const [t] = e;
|
|
5569
5590
|
return "both" === t.axis || "x" === t.axis ? q.number.isRequired(...e) : q.number(...e);
|
|
5570
5591
|
}
|
|
5571
|
-
},
|
|
5592
|
+
}, tl = class extends d.Component {
|
|
5572
5593
|
constructor(...e) {
|
|
5573
5594
|
super(...e), this.handleRefs = {}, this.lastHandleRect = null, this.slack = null, this.lastSize = null;
|
|
5574
5595
|
}
|
|
5575
5596
|
static {
|
|
5576
|
-
this.propTypes =
|
|
5597
|
+
this.propTypes = el;
|
|
5577
5598
|
}
|
|
5578
5599
|
static {
|
|
5579
5600
|
this.defaultProps = {
|
|
@@ -5667,7 +5688,7 @@ var Js = {
|
|
|
5667
5688
|
}), w.className && b.props.className && (w.className = `${b.props.className} ${w.className}`), f.cloneElement(b, w);
|
|
5668
5689
|
var b, w;
|
|
5669
5690
|
}
|
|
5670
|
-
},
|
|
5691
|
+
}, nl = class extends d.Component {
|
|
5671
5692
|
constructor(...e) {
|
|
5672
5693
|
super(...e), this.state = {
|
|
5673
5694
|
width: this.props.width,
|
|
@@ -5681,7 +5702,7 @@ var Js = {
|
|
|
5681
5702
|
}
|
|
5682
5703
|
static {
|
|
5683
5704
|
this.propTypes = {
|
|
5684
|
-
...
|
|
5705
|
+
...el,
|
|
5685
5706
|
children: q.element
|
|
5686
5707
|
};
|
|
5687
5708
|
}
|
|
@@ -5695,7 +5716,7 @@ var Js = {
|
|
|
5695
5716
|
}
|
|
5696
5717
|
render() {
|
|
5697
5718
|
const { handle: e, handleSize: t, onResize: n, onResizeStart: r, onResizeStop: o, draggableOpts: i, minConstraints: s, maxConstraints: l, lockAspectRatio: a, axis: c, width: u, height: h, resizeHandles: d, style: f, transformScale: p, ...m } = this.props;
|
|
5698
|
-
return R(
|
|
5719
|
+
return R(tl, {
|
|
5699
5720
|
axis: c,
|
|
5700
5721
|
draggableOpts: i,
|
|
5701
5722
|
handle: e,
|
|
@@ -5721,4 +5742,4 @@ var Js = {
|
|
|
5721
5742
|
});
|
|
5722
5743
|
}
|
|
5723
5744
|
};
|
|
5724
|
-
export { ne as ACCUMULATE,
|
|
5745
|
+
export { ne as ACCUMULATE, Bt as AnimationModeProvider, Is as AxisViewport, Dt as Command, gt as CommandAnchorProvider, fe as CommandButtonEntryLabel, ce as CommandButtonRegistryContext, he as CommandButtonRegistryProvider, te as CommandButtonType, it as CommandChainContext, vt as CommandFallbackContext, wt as CommandFallbackProvider, St as CommandFocusProvider, lt as CommandOrderContext, oe as CommandRegistry, Te as CommandRegistryContext, ot as CommandResolver, pt as CommandResolverContext, ke as CommandScope, ct as CommandScopeContext, dt as CommandScopeProvider, De as ConstantActivation, ae as DefaultCommandButtonRegistry, Ee as DefaultCommandCatalogService, ie as DefaultCommandRegistry, Go as DefaultIconService, ei as DynamicIcon, Pi as EDGE_HOLD_INTERVAL_MS, Ro as FloatPanel, Po as FloatPanelSurface, ko as FloatPopper, Bo as FloatProvider, Et as FloatStackProvider, Pe as FocusActivation, zr as FocusKeyNavigation, eo as INPUT_SELECTION_TINT, Qr as INPUT_SELECTION_VAR, ni as InMemoryStore, Qe as KeyBindingDispatcher, Q as KeyCodes, J as KeyModifiers, Kn as LanguageStateKey, Re as LayerActivation, mi as LocalStorageStore, Ae as ManualActivation, ee as MouseButtonCodes, Ot as NotifierType, Ri as PAGE_INITIAL_DELAY_MS, $i as PAGE_REPEAT_DELAY_MS, hi as PendingRender, yi as PendingRenderScope, ui as PersistentStateProvider, pe as QUICK_ACTION_TAG, Ir as ReactErrorBoundary, Kt as ReactNotifierProvider, $e as ReactUtils, Ar as RenderSlot, tl as Resizable, nl as ResizableBox, Pr as RoundedTab, zs as SCROLL_ANIMATION_MS, Xr as SERIES_COUNT, no as SXL_THEME_LAYERS, ro as SXL_THEME_LAYER_ORDER, Ts as ScrollPane, ms as ScrollUtils, Qi as Scrollbar, wi as ScrollbarOrientation, Ko as SplitPane, Ho as SplitPaneResizer, so as THEME_MODE_ATTR, lo as THEME_SURFACE_ATTR, Hi as TOUCH_THUMB_ASPECT, Ni as TOUCH_THUMB_MARGIN, Wi as TOUCH_THUMB_MARGIN_CROSS, Vi as TOUCH_THUMB_MARGIN_END, Fi as TOUCH_THUMB_MARGIN_START, Ii as TOUCH_THUMB_SIZE, po as TokenThemeContext, go as TokenThemeProvider, Xi as TouchThumbFrameProvider, Gi as TouchThumbHandle, Vr as UncaughtErrorBoundary, ks as Viewport, Gs as VirtualKeyboardProvider, Ks as VirtualScrollbar, ti as WalkingIcon, Kr as Z_INDEX, we as asCommandCatalog, ht as attachWhenReady, io as buildThemeCSS, Se as chromeToPartial, Zn as composeCaretRect, It as createBusyHandle, Ce as createCommandCatalogService, Uo as createDynamicIconService, Ht as createNoopBusyHandle, ge as createResolvedCommand, co as createThemeScopeClass, Bi as createTrackDrag, Zs as createVirtualKeyboardStore, $o as defaultRenderFloatPanel, Ao as defaultRenderFloatPopupPanel, Di as defaultRenderScrollButtonEdge, Ai as defaultRenderScrollButtonEnd, zi as defaultRenderScrollButtonStart, Ls as defaultRenderScrollCorner, Zr as defaultTheme, Fn as exitEditMode, xe as fetchCatalog, So as floatThemeScopeProps, Qt as getDevicePixelRatio, yn as getInputModality, Ys as getScrollbarCssVariables, Un as getTextareaCaretRect, ur as getVisualViewportRect, Je as isCaretKey, Xs as isVirtualKeyboardUp, tt as keyEventCanonicals, et as keyStrokeToCanonical, Br as lazyComponent, fn as measureUIText, Me as mergeChrome, Yr as offsetZIndex, ye as parseShortcutString, re as reduceDefinitions, ze as resolveAnchorSource, _o as resolveToken, vo as resolveTokens, js as scrollbarThemedClassName, be as serializeShortcut, Hn as setEditMode, Wn as subscribeEditModeExit, wn as subscribeInputModality, hr as subscribeVisualViewport, ao as themeSurfaceProps, Gr as themeVars, Ur as toVars, ji as touchThumbCornerReserve, Ki as touchThumbCrossInset, kr as useAnimatedMeasure, $t as useAnimationMode, qt as useBoundSyncExternalStore, Yt as useCallbackRef, de as useCommandButtonEntry, ue as useCommandButtonRegistry, st as useCommandChain, ft as useCommandElement, _t as useCommandExecute, yt as useCommandFallback, Mt as useCommandFocusRestore, at as useCommandOrder, Le as useCommandRegistry, mt as useCommandResolver, ut as useCommandScope, zt as useCommands, At as useContributeCommands, Jt as useDevicePixelRatio, Vn as useEditMode, Tt as useFloat, kt as useFloatPopupOpen, Oo as useFloatStack, xo as useFloatSurface, tn as useFullscreen, ln as useFullscreenPortal, Jn as useGlobalClipboard, ir as useId, lr as useImperativeElement, Sn as useInputModality, mr as useIsomorphicLayoutEffect, jn as useLanguage, $r as useLazyRetry, Mr as useLocationSearch, _r as useMeasure, mn as useMouseDownAndHoldListener, jt as useNotifier, en as useOnClickOrFocusAway, Gt as useOptionalBoundSyncExternalStore, Zt as useOptionalSyncExternalStore, bi as usePendingRender, ai as usePersistentState, uo as useResolvedThemeMode, pn as useSynchronizedPointerHandler, dn as useTextSelectionDrag, Gn as useTextareaCaretRect, mo as useTokenThemeContext, Zi as useTouchThumbFrame, Qn as useTraceUpdate, Oi as useTrackDrag, Yn as useTranslator, Qs as useVirtualKeyboard, Js as useVirtualKeyboardStore, pr as useVisualViewportRect, _i as whenRenderSettled, jr as zIndexVar };
|