@synnaxlabs/pluto 0.44.7 → 0.45.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{Animated-DdcRuSba.js → Animated-B9bcEALW.js} +2 -2
- package/dist/Animated-EQN_Zecr.cjs +1 -0
- package/dist/{LinePlot-BIZ1E3Rb.js → LinePlot-82qQ7-BC.js} +890 -850
- package/dist/LinePlot-Do2q5AyX.cjs +53 -0
- package/dist/Toggle-BKrbt8lh.cjs +1 -0
- package/dist/{Toggle-DfINNQZ3.js → Toggle-BNABJ5M2.js} +2 -2
- package/dist/{Video-CMuBiBcp.js → Video-B4UWip-3.js} +1 -1
- package/dist/{Video-CbaEeyGH.cjs → Video-CgaO8bTm.cjs} +1 -1
- package/dist/button.cjs +1 -1
- package/dist/button.js +1 -1
- package/dist/color.cjs +1 -1
- package/dist/color.js +1 -1
- package/dist/{css-BlHGoCgb.js → css-BUXMI9PB.js} +1082 -990
- package/dist/css-CmXY6iPo.cjs +8 -0
- package/dist/css.cjs +1 -1
- package/dist/css.js +2 -2
- package/dist/dialog.cjs +1 -1
- package/dist/dialog.js +1 -1
- package/dist/eraser-C1jjA5cv.cjs +63 -0
- package/dist/{eraser-BstNvEkO.js → eraser-DXDDmPgV.js} +3097 -2742
- package/dist/ether.cjs +1 -1
- package/dist/ether.js +9 -9
- package/dist/external-5DC2xiKR.cjs +1 -0
- package/dist/{external-ClD0dLdB.js → external-65blLb4-.js} +2 -2
- package/dist/external-B8KPEzPt.cjs +1 -0
- package/dist/external-BEkAplsH.cjs +1 -0
- package/dist/external-BIykXq97.cjs +1 -0
- package/dist/{external-GS2AbOOd.js → external-BKOEKFd7.js} +3 -3
- package/dist/{external-V3Tbt95R.js → external-BOvnkwzO.js} +4 -4
- package/dist/{external-J5kFGShS.js → external-BSeWLcfY.js} +5 -4
- package/dist/external-Bqmws2bv.cjs +1 -0
- package/dist/external-CFsDBQGs.cjs +1 -0
- package/dist/{external-CsZA1s33.js → external-CGX7u75x.js} +2 -2
- package/dist/external-CJKfUQ-9.cjs +1 -0
- package/dist/{external-DkZwoQZk.js → external-CPW2TrSs.js} +43 -45
- package/dist/external-CijGOPm7.cjs +1 -0
- package/dist/external-DCQ725nK.cjs +1 -0
- package/dist/{external-CtRU4mkG.js → external-DLo-151g.js} +13 -10
- package/dist/external-DTLy0px_.js +380 -0
- package/dist/external-DWfn7Yhk.cjs +1 -0
- package/dist/external-DcNW5o-8.cjs +1 -0
- package/dist/{external-FrSPoRvt.js → external-Gh_0tAJ0.js} +2 -2
- package/dist/external-J1Ji-Eku.js +92 -0
- package/dist/{external-Ds3Wz9sk.js → external-SQa3Pr0s.js} +3 -3
- package/dist/external-W69NXl-R.js +84 -0
- package/dist/{external-BNwo0Mju.js → external-_ninRYLQ.js} +3 -3
- package/dist/{external-DSkHe-2Y.cjs → external-kaUzEm1U.cjs} +2 -2
- package/dist/external-mOr1FzAd.cjs +1 -0
- package/dist/flex.cjs +1 -1
- package/dist/flex.js +1 -1
- package/dist/{fontString-Cp4X6CqQ.cjs → fontString-4EFXWlQp.cjs} +1 -1
- package/dist/{fontString-Ca1-oixk.js → fontString-D_jEa-uI.js} +2 -2
- package/dist/header.cjs +1 -1
- package/dist/header.js +1 -1
- package/dist/index.cjs +7 -7
- package/dist/index.js +14308 -13556
- package/dist/input.cjs +1 -1
- package/dist/input.js +1 -1
- package/dist/list.cjs +1 -1
- package/dist/list.js +1 -1
- package/dist/main-2qH2bggR.cjs +92 -0
- package/dist/{Editable-BrtvNf66.js → main-jKCzbrWn.js} +8859 -8684
- package/dist/menu.cjs +1 -1
- package/dist/menu.js +1 -1
- package/dist/pluto.css +1 -1
- package/dist/src/button/Button.d.ts +3 -2
- package/dist/src/button/Button.d.ts.map +1 -1
- package/dist/src/color/BaseSwatch.d.ts.map +1 -1
- package/dist/src/dialog/Frame.d.ts.map +1 -1
- package/dist/src/dialog/position.d.ts.map +1 -1
- package/dist/src/flex/Box.d.ts +4 -4
- package/dist/src/flux/core/store.d.ts +38 -27
- package/dist/src/flux/core/store.d.ts.map +1 -1
- package/dist/src/flux/form.d.ts.map +1 -1
- package/dist/src/flux/form.spec.d.ts.map +1 -1
- package/dist/src/flux/list.d.ts +3 -1
- package/dist/src/flux/list.d.ts.map +1 -1
- package/dist/src/flux/list.spec.d.ts.map +1 -1
- package/dist/src/flux/result.spec.d.ts.map +1 -1
- package/dist/src/flux/retrieve.spec.d.ts.map +1 -1
- package/dist/src/flux/update.d.ts +3 -5
- package/dist/src/flux/update.d.ts.map +1 -1
- package/dist/src/flux/update.spec.d.ts.map +1 -1
- package/dist/src/form/Context.d.ts +1 -0
- package/dist/src/form/Context.d.ts.map +1 -1
- package/dist/src/form/state.d.ts +5 -1
- package/dist/src/form/state.d.ts.map +1 -1
- package/dist/src/form/use.d.ts.map +1 -1
- package/dist/src/form/useField.d.ts +3 -2
- package/dist/src/form/useField.d.ts.map +1 -1
- package/dist/src/generic/Generic.d.ts.map +1 -1
- package/dist/src/group/queries.d.ts +4 -3
- package/dist/src/group/queries.d.ts.map +1 -1
- package/dist/src/hardware/task/queries.d.ts +2 -1
- package/dist/src/hardware/task/queries.d.ts.map +1 -1
- package/dist/src/header/Header.d.ts +2 -1
- package/dist/src/header/Header.d.ts.map +1 -1
- package/dist/src/hooks/index.d.ts +1 -0
- package/dist/src/hooks/index.d.ts.map +1 -1
- package/dist/src/hooks/useCursorDrag/useCursorDrag.d.ts.map +1 -1
- package/dist/src/hooks/useCursorDrag/useVirtualCursorDragWebKit.d.ts.map +1 -1
- package/dist/src/hooks/useCursorDrag/useVirtualCursorDragWebView.d.ts.map +1 -1
- package/dist/src/icon/Fitting.d.ts +2 -0
- package/dist/src/icon/Fitting.d.ts.map +1 -0
- package/dist/src/icon/LabJack.d.ts +3 -0
- package/dist/src/icon/LabJack.d.ts.map +1 -0
- package/dist/src/icon/NI.d.ts +2 -0
- package/dist/src/icon/NI.d.ts.map +1 -0
- package/dist/src/icon/OPC.d.ts +2 -0
- package/dist/src/icon/OPC.d.ts.map +1 -0
- package/dist/src/icon/Process.d.ts +2 -0
- package/dist/src/icon/Process.d.ts.map +1 -0
- package/dist/src/icon/Pump.d.ts +2 -0
- package/dist/src/icon/Pump.d.ts.map +1 -0
- package/dist/src/icon/Tank.d.ts +2 -0
- package/dist/src/icon/Tank.d.ts.map +1 -0
- package/dist/src/icon/Valve.d.ts +2 -0
- package/dist/src/icon/Valve.d.ts.map +1 -0
- package/dist/src/icon/external.d.ts +5 -0
- package/dist/src/icon/external.d.ts.map +1 -1
- package/dist/src/icon/registry.d.ts +8 -2
- package/dist/src/icon/registry.d.ts.map +1 -1
- package/dist/src/index.d.ts +2 -1
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/input/DateTime.d.ts.map +1 -1
- package/dist/src/input/HelpText.d.ts.map +1 -1
- package/dist/src/label/queries.d.ts +1 -1
- package/dist/src/label/queries.d.ts.map +1 -1
- package/dist/src/list/Frame.d.ts.map +1 -1
- package/dist/src/list/Items.d.ts +1 -1
- package/dist/src/list/Items.d.ts.map +1 -1
- package/dist/src/list/external.d.ts +1 -0
- package/dist/src/list/external.d.ts.map +1 -1
- package/dist/src/list/pager.spec.d.ts.map +1 -1
- package/dist/src/list/useCombinedData.d.ts +8 -0
- package/dist/src/list/useCombinedData.d.ts.map +1 -0
- package/dist/src/list/useCombinedData.spec.d.ts +2 -0
- package/dist/src/list/useCombinedData.spec.d.ts.map +1 -0
- package/dist/src/mosaic/use.d.ts.map +1 -1
- package/dist/src/ontology/queries.d.ts +2 -2
- package/dist/src/pluto/Pluto.d.ts +2 -0
- package/dist/src/pluto/Pluto.d.ts.map +1 -1
- package/dist/src/ranger/queries.d.ts +3 -2
- package/dist/src/ranger/queries.d.ts.map +1 -1
- package/dist/src/schematic/external.d.ts +3 -0
- package/dist/src/schematic/external.d.ts.map +1 -0
- package/dist/src/schematic/index.d.ts.map +1 -0
- package/dist/src/schematic/symbol/Custom.d.ts +15 -0
- package/dist/src/schematic/symbol/Custom.d.ts.map +1 -0
- package/dist/src/schematic/symbol/Custom.spec.d.ts +2 -0
- package/dist/src/schematic/symbol/Custom.spec.d.ts.map +1 -0
- package/dist/src/{vis/schematic → schematic/symbol}/Forms.d.ts +7 -5
- package/dist/src/schematic/symbol/Forms.d.ts.map +1 -0
- package/dist/src/schematic/symbol/Grid.d.ts.map +1 -0
- package/dist/src/{vis/schematic/primitives → schematic/symbol}/Primitives.d.ts +18 -7
- package/dist/src/schematic/symbol/Primitives.d.ts.map +1 -0
- package/dist/src/schematic/symbol/SelectOrientation.d.ts.map +1 -0
- package/dist/src/{vis/schematic → schematic/symbol}/Symbols.d.ts +18 -8
- package/dist/src/schematic/symbol/Symbols.d.ts.map +1 -0
- package/dist/src/schematic/symbol/external.d.ts +6 -0
- package/dist/src/schematic/symbol/external.d.ts.map +1 -0
- package/dist/src/schematic/symbol/extractRegions.d.ts +3 -0
- package/dist/src/schematic/symbol/extractRegions.d.ts.map +1 -0
- package/dist/src/schematic/symbol/extractRegions.spec.d.ts +2 -0
- package/dist/src/schematic/symbol/extractRegions.spec.d.ts.map +1 -0
- package/dist/src/schematic/symbol/index.d.ts +2 -0
- package/dist/src/schematic/symbol/index.d.ts.map +1 -0
- package/dist/src/schematic/symbol/queries.d.ts +179 -0
- package/dist/src/schematic/symbol/queries.d.ts.map +1 -0
- package/dist/src/schematic/symbol/queries.spec.d.ts +2 -0
- package/dist/src/schematic/symbol/queries.spec.d.ts.map +1 -0
- package/dist/src/{vis/schematic → schematic/symbol}/registry.d.ts +15 -6
- package/dist/src/schematic/symbol/registry.d.ts.map +1 -0
- package/dist/src/select/use.d.ts.map +1 -1
- package/dist/src/showcase/InputShowcase.d.ts +3 -0
- package/dist/src/showcase/InputShowcase.d.ts.map +1 -1
- package/dist/src/status/aether/aggregator.d.ts +2 -2
- package/dist/src/table/aether/Table.d.ts +4 -0
- package/dist/src/table/aether/Table.d.ts.map +1 -1
- package/dist/src/table/cells/Cells.d.ts +7 -1
- package/dist/src/table/cells/Cells.d.ts.map +1 -1
- package/dist/src/table/cells/registry.d.ts.map +1 -1
- package/dist/src/tabs/Selector.d.ts +3 -2
- package/dist/src/tabs/Selector.d.ts.map +1 -1
- package/dist/src/tabs/Tabs.d.ts +2 -2
- package/dist/src/tabs/Tabs.d.ts.map +1 -1
- package/dist/src/telem/aether/transformers.d.ts.map +1 -1
- package/dist/src/telem/client/streamer.d.ts.map +1 -1
- package/dist/src/telem/control/aether/chip.d.ts +2 -2
- package/dist/src/telem/control/aether/controller.d.ts +1 -1
- package/dist/src/telem/control/aether/indicator.d.ts +7 -7
- package/dist/src/telem/control/aether/legend.d.ts +2 -2
- package/dist/src/telem/control/aether/state.d.ts +1 -1
- package/dist/src/theming/Provider.d.ts +2 -1
- package/dist/src/theming/Provider.d.ts.map +1 -1
- package/dist/src/theming/aether/provider.d.ts +129 -129
- package/dist/src/theming/core/theme.d.ts +131 -131
- package/dist/src/tree/Tree.d.ts.map +1 -1
- package/dist/src/triggers/Text.d.ts.map +1 -1
- package/dist/src/triggers/hooks.d.ts.map +1 -1
- package/dist/src/triggers/triggers.d.ts +11 -11
- package/dist/src/vis/axis/axis.d.ts +2 -2
- package/dist/src/vis/diagram/aether/Diagram.d.ts +4 -0
- package/dist/src/vis/diagram/aether/Diagram.d.ts.map +1 -1
- package/dist/src/vis/legend/Grouped.d.ts.map +1 -1
- package/dist/src/vis/line/Line.d.ts.map +1 -1
- package/dist/src/vis/line/aether/line.d.ts +1 -1
- package/dist/src/vis/line/aether/line.d.ts.map +1 -1
- package/dist/src/vis/lineplot/aether/XAxis.d.ts +4 -4
- package/dist/src/vis/lineplot/aether/YAxis.d.ts +4 -4
- package/dist/src/vis/lineplot/aether/axis.d.ts +2 -2
- package/dist/src/vis/lineplot/range/Annotation.d.ts.map +1 -1
- package/dist/src/vis/lineplot/range/aether/annotation.d.ts +4 -4
- package/dist/src/vis/lineplot/tooltip/aether/tooltip.d.ts +8 -8
- package/dist/src/vis/lineplot/useBoundQuerier.d.ts.map +1 -1
- package/dist/src/vis/log/aether/Log.d.ts +3 -3
- package/dist/src/vis/measure/aether/measure.d.ts +8 -8
- package/dist/src/vis/rule/aether/aether.d.ts +2 -2
- package/dist/src/vis/setpoint/aether/setpoint.d.ts +3 -3
- package/dist/src/vis/setpoint/aether/setpoint.d.ts.map +1 -1
- package/dist/src/vis/setpoint/use.d.ts +2 -2
- package/dist/src/vis/setpoint/use.d.ts.map +1 -1
- package/dist/src/vis/value/RedlineForm.d.ts.map +1 -1
- package/dist/src/vis/value/TelemForm.d.ts.map +1 -1
- package/dist/src/vis/value/aether/value.d.ts +23 -3
- package/dist/src/vis/value/aether/value.d.ts.map +1 -1
- package/dist/src/vis/value/use.d.ts +8 -2
- package/dist/src/vis/value/use.d.ts.map +1 -1
- package/dist/tabs.cjs +1 -1
- package/dist/tabs.js +1 -1
- package/dist/text.cjs +1 -1
- package/dist/text.js +2 -2
- package/dist/theming.cjs +1 -1
- package/dist/theming.js +2 -2
- package/dist/tree.cjs +1 -1
- package/dist/tree.js +1 -1
- package/dist/triggers.cjs +1 -1
- package/dist/triggers.js +1 -1
- package/dist/{units-D8blpqyN.js → units-BPvO622s.js} +3 -3
- package/dist/units-DkdMPsxa.cjs +1 -0
- package/dist/video.cjs +1 -1
- package/dist/video.js +1 -1
- package/package.json +6 -6
- package/dist/Animated-D5LYKEkW.cjs +0 -1
- package/dist/Editable-7Abx7gK5.cjs +0 -92
- package/dist/LinePlot-DslwDvAo.cjs +0 -53
- package/dist/Toggle-BVFmU1mL.cjs +0 -1
- package/dist/css-CZ_XGkIB.cjs +0 -8
- package/dist/eraser-DiJNbabo.cjs +0 -63
- package/dist/external-B33LW5pz.cjs +0 -1
- package/dist/external-C3hm9xgd.cjs +0 -1
- package/dist/external-CE5Gf1U4.cjs +0 -1
- package/dist/external-CSkXMvdW.js +0 -82
- package/dist/external-C_25EtbW.js +0 -374
- package/dist/external-CoEPLcYb.js +0 -69
- package/dist/external-CoVeaXHg.cjs +0 -1
- package/dist/external-Cs-XdMNw.cjs +0 -1
- package/dist/external-D-FHwqls.cjs +0 -1
- package/dist/external-D91gCQ3U.cjs +0 -1
- package/dist/external-DE-uFhwW.cjs +0 -1
- package/dist/external-DXm6LsSg.cjs +0 -1
- package/dist/external-IBErJ3kF.cjs +0 -1
- package/dist/external-mX8u0eSb.cjs +0 -1
- package/dist/external-vdf1a_j1.cjs +0 -1
- package/dist/src/vis/schematic/Forms.d.ts.map +0 -1
- package/dist/src/vis/schematic/Grid.d.ts.map +0 -1
- package/dist/src/vis/schematic/SelectOrientation.d.ts.map +0 -1
- package/dist/src/vis/schematic/Symbols.d.ts.map +0 -1
- package/dist/src/vis/schematic/external.d.ts +0 -4
- package/dist/src/vis/schematic/external.d.ts.map +0 -1
- package/dist/src/vis/schematic/index.d.ts.map +0 -1
- package/dist/src/vis/schematic/primitives/Primitives.d.ts.map +0 -1
- package/dist/src/vis/schematic/primitives/index.d.ts +0 -2
- package/dist/src/vis/schematic/primitives/index.d.ts.map +0 -1
- package/dist/src/vis/schematic/registry.d.ts.map +0 -1
- package/dist/units-Cqxg-SBx.cjs +0 -1
- /package/dist/src/{vis/schematic → schematic}/index.d.ts +0 -0
- /package/dist/src/{vis/schematic → schematic/symbol}/Grid.d.ts +0 -0
- /package/dist/src/{vis/schematic → schematic/symbol}/SelectOrientation.d.ts +0 -0
|
@@ -1,45 +1,56 @@
|
|
|
1
1
|
import S, { z as a } from "zod";
|
|
2
|
-
const
|
|
2
|
+
const fn = (t) => {
|
|
3
3
|
const e = t.replace(/_[a-z]/g, (r) => r[1].toUpperCase());
|
|
4
4
|
return e.length > 1 && e[0] === e[0].toUpperCase() && e[1] === e[1].toUpperCase() || e.length === 0 ? e : e[0].toLowerCase() + e.slice(1);
|
|
5
|
-
},
|
|
6
|
-
const e = (r, n =
|
|
5
|
+
}, qe = (t) => {
|
|
6
|
+
const e = (r, n = nt) => {
|
|
7
7
|
if (typeof r == "string") return t(r);
|
|
8
8
|
if (Array.isArray(r)) return r.map((o) => e(o, n));
|
|
9
|
-
if (!
|
|
10
|
-
n =
|
|
9
|
+
if (!Qe(r)) return r;
|
|
10
|
+
n = pn(n);
|
|
11
11
|
const s = {}, i = r;
|
|
12
12
|
return "toJSON" in i && typeof i.toJSON == "function" ? e(i.toJSON(), n) : (Object.keys(i).forEach((o) => {
|
|
13
13
|
let c = i[o];
|
|
14
14
|
const h = t(o);
|
|
15
|
-
n.recursive && (
|
|
15
|
+
n.recursive && (Qe(c) ? Wt(c) || (c = e(c, n)) : n.recursiveInArray && Ft(c) && (c = [...c].map((l) => {
|
|
16
16
|
let d = l;
|
|
17
|
-
return
|
|
17
|
+
return Qe(l) ? Wt(d) || (d = e(l, n)) : Ft(l) && (d = e({ key: l }, n).key), d;
|
|
18
18
|
}))), s[h] = c;
|
|
19
19
|
}), s);
|
|
20
20
|
};
|
|
21
21
|
return e;
|
|
22
|
-
},
|
|
22
|
+
}, bt = qe(fn), dn = (t) => (
|
|
23
23
|
// Don't convert the first character and don't convert a character that is after a
|
|
24
24
|
// non-alphanumeric character
|
|
25
25
|
t.replace(
|
|
26
26
|
/([a-z0-9])([A-Z])/g,
|
|
27
27
|
(e, r, n) => `${r}_${n.toLowerCase()}`
|
|
28
28
|
)
|
|
29
|
-
),
|
|
29
|
+
), Qt = qe(dn), _t = (t) => t.length === 0 ? t : t[0].toUpperCase() + t.slice(1), gn = [Number, String, Uint8Array], nt = {
|
|
30
30
|
recursive: !0,
|
|
31
31
|
recursiveInArray: !0
|
|
32
|
-
},
|
|
32
|
+
}, pn = (t = nt) => (t.recursive == null ? t = nt : t.recursiveInArray ??= !1, t), Ft = (t) => t != null && Array.isArray(t), Qe = (t) => t != null && typeof t == "object" && !Array.isArray(t), Wt = (t) => gn.some((e) => t instanceof e), mn = (t) => t.replace(/\s+/g, "-").replace(
|
|
33
33
|
/([a-z0-9])([A-Z])/g,
|
|
34
34
|
(e, r, n) => `${r}-${n.toLowerCase()}`
|
|
35
|
-
).toLowerCase(),
|
|
35
|
+
).toLowerCase(), yn = qe(mn), wn = (t) => {
|
|
36
|
+
if (t.length === 0) return t;
|
|
37
|
+
let e = t.replace(/[_-]/g, " ");
|
|
38
|
+
return e = e.replace(
|
|
39
|
+
/([a-z0-9])([A-Z])/g,
|
|
40
|
+
(r, n, s) => `${n} ${s}`
|
|
41
|
+
), e = e.replace(
|
|
42
|
+
/([A-Z]+)([A-Z][a-z])/g,
|
|
43
|
+
(r, n, s) => `${n} ${s}`
|
|
44
|
+
), e = e.replace(/\s+/g, " ").trim(), e = e.replace(/\b\w/g, (r) => r.toUpperCase()), e;
|
|
45
|
+
}, bn = qe(wn), Mo = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
36
46
|
__proto__: null,
|
|
37
|
-
camelToSnake:
|
|
38
|
-
capitalize:
|
|
39
|
-
snakeToCamel:
|
|
40
|
-
toKebab:
|
|
47
|
+
camelToSnake: Qt,
|
|
48
|
+
capitalize: _t,
|
|
49
|
+
snakeToCamel: bt,
|
|
50
|
+
toKebab: yn,
|
|
51
|
+
toProperNoun: bn
|
|
41
52
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
42
|
-
let
|
|
53
|
+
let On = class {
|
|
43
54
|
contentType = "application/json";
|
|
44
55
|
decoder;
|
|
45
56
|
encoder;
|
|
@@ -53,15 +64,15 @@ let pn = class {
|
|
|
53
64
|
return this.decodeString(this.decoder.decode(e), r);
|
|
54
65
|
}
|
|
55
66
|
decodeString(e, r) {
|
|
56
|
-
const n = JSON.parse(e), s =
|
|
67
|
+
const n = JSON.parse(e), s = bt(n);
|
|
57
68
|
return r != null ? r.parse(s) : s;
|
|
58
69
|
}
|
|
59
70
|
encodeString(e) {
|
|
60
|
-
const r =
|
|
71
|
+
const r = Qt(e);
|
|
61
72
|
return JSON.stringify(r, (n, s) => ArrayBuffer.isView(s) ? Array.from(s) : typeof s == "bigint" ? s.toString() : s);
|
|
62
73
|
}
|
|
63
74
|
};
|
|
64
|
-
const
|
|
75
|
+
const st = new On(), it = (t) => [...new Set(t)], vn = (t, e, r = !0) => {
|
|
65
76
|
const n = /* @__PURE__ */ new Map();
|
|
66
77
|
return t.forEach((s) => {
|
|
67
78
|
const i = e(s);
|
|
@@ -71,12 +82,12 @@ const et = new pn(), tt = (t) => [...new Set(t)], mn = (t, e, r = !0) => {
|
|
|
71
82
|
}
|
|
72
83
|
n.set(i, s);
|
|
73
84
|
}), Array.from(n.values());
|
|
74
|
-
},
|
|
85
|
+
}, Ao = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
75
86
|
__proto__: null,
|
|
76
|
-
by:
|
|
77
|
-
unique:
|
|
78
|
-
}, Symbol.toStringTag, { value: "Module" }));
|
|
79
|
-
let
|
|
87
|
+
by: vn,
|
|
88
|
+
unique: it
|
|
89
|
+
}, Symbol.toStringTag, { value: "Module" })), A = (t) => t != null && typeof t == "object" && "value" in t;
|
|
90
|
+
let ee = class {
|
|
80
91
|
/** The underlying primitive value */
|
|
81
92
|
value;
|
|
82
93
|
constructor(e) {
|
|
@@ -96,8 +107,8 @@ let _ = class {
|
|
|
96
107
|
return this.value.toString();
|
|
97
108
|
}
|
|
98
109
|
};
|
|
99
|
-
const
|
|
100
|
-
if (
|
|
110
|
+
const Ot = (t) => t != null && typeof t == "object" && "toString" in t, er = (t) => {
|
|
111
|
+
if (Ot(t)) return t?.toString().length === 0;
|
|
101
112
|
switch (typeof t) {
|
|
102
113
|
case "string":
|
|
103
114
|
return t.length === 0;
|
|
@@ -114,14 +125,15 @@ const yt = (t) => t != null && typeof t == "object" && "toString" in t, Jt = (t)
|
|
|
114
125
|
default:
|
|
115
126
|
return !1;
|
|
116
127
|
}
|
|
117
|
-
},
|
|
128
|
+
}, xn = (t) => !er(t), Uo = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
118
129
|
__proto__: null,
|
|
119
|
-
ValueExtension:
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
130
|
+
ValueExtension: ee,
|
|
131
|
+
isCrudeValueExtension: A,
|
|
132
|
+
isNonZero: xn,
|
|
133
|
+
isStringer: Ot,
|
|
134
|
+
isZero: er
|
|
135
|
+
}, Symbol.toStringTag, { value: "Module" })), ze = (t, e = !1) => {
|
|
136
|
+
const r = Ot(t) ? "stringer" : typeof t;
|
|
125
137
|
let n;
|
|
126
138
|
switch (r) {
|
|
127
139
|
case "string":
|
|
@@ -145,19 +157,19 @@ const yt = (t) => t != null && typeof t == "object" && "toString" in t, Jt = (t)
|
|
|
145
157
|
default:
|
|
146
158
|
return console.warn(`sortFunc: unknown type ${r}`), () => -1;
|
|
147
159
|
}
|
|
148
|
-
return e ?
|
|
149
|
-
},
|
|
150
|
-
const n =
|
|
160
|
+
return e ? rr(n) : n;
|
|
161
|
+
}, $n = (t, e, r) => {
|
|
162
|
+
const n = ze(e[t], r);
|
|
151
163
|
return (s, i) => n(s[t], i[t]);
|
|
152
|
-
},
|
|
164
|
+
}, Tn = (t, e) => t.length !== e.length ? t.length - e.length : t.every((r, n) => r === e[n]) ? 0 : -1, tr = (t, e) => {
|
|
153
165
|
if (t.length !== e.length) return t.length - e.length;
|
|
154
166
|
if (t.length === 0) return 0;
|
|
155
|
-
const r =
|
|
167
|
+
const r = ze(t[0]), n = [...t].sort(r), s = [...e].sort(r);
|
|
156
168
|
return n.every((i, o) => i === s[o]) ? 0 : -1;
|
|
157
|
-
},
|
|
158
|
-
const r =
|
|
159
|
-
return
|
|
160
|
-
},
|
|
169
|
+
}, Sn = (t, e) => {
|
|
170
|
+
const r = it(t), n = it(e);
|
|
171
|
+
return tr(r, n);
|
|
172
|
+
}, Nn = (t, e) => t === e ? 0 : t === "first" && e === "last" ? 1 : -1, rr = (t) => (e, r) => t(r, e), se = 0, Me = -1, Ee = 1, nr = (t) => t < se, sr = (t) => t > se, In = (t) => t >= se, ir = (t) => t === se, Mn = (t, e) => {
|
|
161
173
|
const r = /([a-zA-Z]+)|(\d+)/g, n = t.replace(/[\s_.-]+/g, "").match(r), s = e.replace(/[\s_.-]+/g, "").match(r);
|
|
162
174
|
if (!n || !s) return 0;
|
|
163
175
|
for (let i = 0; i < Math.min(n.length, s.length); i++) {
|
|
@@ -171,57 +183,57 @@ const yt = (t) => t != null && typeof t == "object" && "toString" in t, Jt = (t)
|
|
|
171
183
|
} else return isNaN(Number(o)) ? -1 : 1;
|
|
172
184
|
}
|
|
173
185
|
return n.length - s.length;
|
|
174
|
-
},
|
|
186
|
+
}, Co = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
175
187
|
__proto__: null,
|
|
176
|
-
EQUAL:
|
|
177
|
-
GREATER_THAN:
|
|
178
|
-
LESS_THAN:
|
|
179
|
-
isEqualTo:
|
|
180
|
-
isGreaterThan:
|
|
181
|
-
isGreaterThanEqual:
|
|
182
|
-
isLessThan:
|
|
183
|
-
newF:
|
|
184
|
-
newFieldF:
|
|
185
|
-
order:
|
|
186
|
-
primitiveArrays:
|
|
187
|
-
reverseF:
|
|
188
|
-
stringsWithNumbers:
|
|
189
|
-
uniqueUnorderedPrimitiveArrays:
|
|
190
|
-
unorderedPrimitiveArrays:
|
|
191
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
188
|
+
EQUAL: se,
|
|
189
|
+
GREATER_THAN: Ee,
|
|
190
|
+
LESS_THAN: Me,
|
|
191
|
+
isEqualTo: ir,
|
|
192
|
+
isGreaterThan: sr,
|
|
193
|
+
isGreaterThanEqual: In,
|
|
194
|
+
isLessThan: nr,
|
|
195
|
+
newF: ze,
|
|
196
|
+
newFieldF: $n,
|
|
197
|
+
order: Nn,
|
|
198
|
+
primitiveArrays: Tn,
|
|
199
|
+
reverseF: rr,
|
|
200
|
+
stringsWithNumbers: Mn,
|
|
201
|
+
uniqueUnorderedPrimitiveArrays: Sn,
|
|
202
|
+
unorderedPrimitiveArrays: tr
|
|
203
|
+
}, Symbol.toStringTag, { value: "Module" })), Ze = a.tuple([a.number(), a.number()]);
|
|
192
204
|
a.tuple([a.bigint(), a.bigint()]);
|
|
193
|
-
const
|
|
205
|
+
const vt = a.object({ width: a.number(), height: a.number() }), En = a.object({
|
|
194
206
|
signedWidth: a.number(),
|
|
195
207
|
signedHeight: a.number()
|
|
196
|
-
}),
|
|
197
|
-
a.enum(Sn);
|
|
198
|
-
const Nn = ["start", "center", "end"], In = ["signedWidth", "signedHeight"];
|
|
199
|
-
a.enum(In);
|
|
200
|
-
const ge = a.object({ x: a.number(), y: a.number() }), tr = a.object({ clientX: a.number(), clientY: a.number() }), qe = ["x", "y"], wt = a.enum(qe), rr = ["top", "right", "bottom", "left"], Mn = a.enum(rr), ke = ["left", "right"], Ot = a.enum(ke), ze = ["top", "bottom"], vt = a.enum(ze), xt = ["center"], rt = a.enum(xt), En = [...rr, ...xt], Tt = a.enum(En);
|
|
201
|
-
a.enum(Nn);
|
|
202
|
-
const An = ["first", "last"];
|
|
208
|
+
}), An = ["width", "height"];
|
|
203
209
|
a.enum(An);
|
|
204
|
-
const
|
|
205
|
-
a.
|
|
206
|
-
a.
|
|
207
|
-
|
|
210
|
+
const Bn = ["start", "center", "end"], Un = ["signedWidth", "signedHeight"];
|
|
211
|
+
a.enum(Un);
|
|
212
|
+
const pe = a.object({ x: a.number(), y: a.number() }), ar = a.object({ clientX: a.number(), clientY: a.number() }), Ye = ["x", "y"], xt = a.enum(Ye), $t = ["top", "right", "bottom", "left"], Cn = a.enum($t), Fe = ["left", "right"], Tt = a.enum(Fe), We = ["top", "bottom"], St = a.enum(We), Nt = ["center"], at = a.enum(Nt), jn = [...$t, ...Nt], It = a.enum(jn);
|
|
213
|
+
a.enum(Bn);
|
|
214
|
+
const Rn = ["first", "last"];
|
|
215
|
+
a.enum(Rn);
|
|
216
|
+
const or = a.object({ lower: a.number(), upper: a.number() }), Ln = a.object({ lower: a.bigint(), upper: a.bigint() });
|
|
217
|
+
a.union([or, Ze]);
|
|
218
|
+
a.union([Ln, Ze]);
|
|
219
|
+
const Dn = a.enum([...xt.options, ...It.options]);
|
|
208
220
|
a.enum(["x", "left", "right"]);
|
|
209
221
|
a.enum(["y", "top", "bottom"]);
|
|
210
|
-
const
|
|
222
|
+
const Pn = a.union([xt, It, a.instanceof(String)]), ie = (t) => (e, r) => {
|
|
211
223
|
if (typeof e == "bigint") {
|
|
212
|
-
if (
|
|
224
|
+
if (Le(r))
|
|
213
225
|
return t(e, BigInt(r));
|
|
214
226
|
const n = t(Number(e), Number(r));
|
|
215
227
|
return typeof n == "number" ? BigInt(Math.round(n)) : n;
|
|
216
228
|
}
|
|
217
229
|
return t(Number(e), Number(r));
|
|
218
|
-
}, q =
|
|
230
|
+
}, q = ie((t, e) => t - e), ae = ie((t, e) => t + e), kn = (t, e, r = 1e-4) => Math.abs(t - e) < r, ot = (t, e) => {
|
|
219
231
|
const r = typeof t == "bigint", n = typeof e == "bigint";
|
|
220
|
-
return r && n ? t === e : r &&
|
|
221
|
-
},
|
|
232
|
+
return r && n ? t === e : r && Le(e) ? t === BigInt(e) : n && Le(t) ? e === BigInt(t) : t === e;
|
|
233
|
+
}, qn = (t) => {
|
|
222
234
|
const e = 10 ** Math.floor(Math.log10(t));
|
|
223
235
|
return Math.round(t / e) * e;
|
|
224
|
-
},
|
|
236
|
+
}, ur = ie((t, e) => t <= e ? t : e), Le = (t) => typeof t == "bigint" ? !0 : Number.isInteger(t), zn = ie((t, e) => t >= e ? t : e), lr = (t) => typeof t == "bigint" ? t < 0n ? -t : t : t < 0 ? -t : t, C = ie((t, e) => t * e), Oe = ie((t, e) => t / e), b = (t, e, r) => {
|
|
225
237
|
const n = {};
|
|
226
238
|
if (typeof e == "object" && (r = e, e = void 0), r = { makeValid: !0, ...r }, typeof t == "number" || typeof t == "bigint")
|
|
227
239
|
e != null ? (n.lower = t, n.upper = e) : (n.lower = typeof t == "bigint" ? 0n : 0, n.upper = t);
|
|
@@ -230,64 +242,64 @@ const Cn = a.union([wt, Tt, a.instanceof(String)]), se = (t) => (e, r) => {
|
|
|
230
242
|
[n.lower, n.upper] = t;
|
|
231
243
|
} else
|
|
232
244
|
n.lower = t.lower, n.upper = t.upper;
|
|
233
|
-
return r?.makeValid ?
|
|
234
|
-
},
|
|
245
|
+
return r?.makeValid ? cr(n) : n;
|
|
246
|
+
}, Zn = Object.freeze({ lower: 0, upper: 0 }), Yn = Object.freeze({ lower: -1 / 0, upper: 1 / 0 }), Fn = Object.freeze({ lower: 0, upper: 1 }), Wn = Object.freeze({ lower: -1, upper: 1 }), Vn = (t, e) => {
|
|
235
247
|
if (t == null && e == null) return !0;
|
|
236
248
|
if (t == null || e == null) return !1;
|
|
237
249
|
const r = b(t), n = b(e);
|
|
238
250
|
return r?.lower === n?.lower && r?.upper === n?.upper;
|
|
239
|
-
},
|
|
251
|
+
}, cr = (t) => t.lower > t.upper ? { lower: t.upper, upper: t.lower } : t, ut = (t, e) => {
|
|
240
252
|
const r = b(t);
|
|
241
253
|
return e < r.lower ? r.lower : e >= r.upper ? r.upper - (typeof r.upper == "number" ? 1 : 1n) : e;
|
|
242
|
-
},
|
|
254
|
+
}, j = (t, e) => {
|
|
243
255
|
const r = b(t);
|
|
244
256
|
if (typeof e == "number" || typeof e == "bigint")
|
|
245
257
|
return e >= r.lower && e < r.upper;
|
|
246
258
|
const n = b(e);
|
|
247
259
|
return n.lower >= r.lower && n.upper <= r.upper;
|
|
248
|
-
},
|
|
260
|
+
}, Gn = (t, e) => {
|
|
249
261
|
const r = b(t), n = b(e);
|
|
250
|
-
return r.lower === n.lower ? !0 : n.upper === r.lower || n.lower === r.upper ? !1 :
|
|
251
|
-
},
|
|
262
|
+
return r.lower === n.lower ? !0 : n.upper === r.lower || n.lower === r.upper ? !1 : j(r, n.upper) || j(r, n.lower) || j(n, r.upper) || j(n, r.lower);
|
|
263
|
+
}, ve = (t) => {
|
|
252
264
|
const e = b(t);
|
|
253
265
|
return e.upper - e.lower;
|
|
254
|
-
},
|
|
266
|
+
}, Hn = (t) => {
|
|
255
267
|
const e = b(t);
|
|
256
268
|
return typeof e.lower == "bigint" ? e.lower === 0n && e.upper === 0n : e.lower === 0 && e.upper === 0;
|
|
257
|
-
},
|
|
258
|
-
const e =
|
|
269
|
+
}, Jn = (t) => {
|
|
270
|
+
const e = ve(t);
|
|
259
271
|
return typeof e == "number" ? e === 0 : e === 0n;
|
|
260
|
-
},
|
|
272
|
+
}, Xn = (t) => {
|
|
261
273
|
const e = b(t);
|
|
262
274
|
return typeof e.lower == "bigint" ? !0 : Number.isFinite(e.lower) && Number.isFinite(e.upper);
|
|
263
|
-
},
|
|
275
|
+
}, Kn = (t) => {
|
|
264
276
|
const e = b(t);
|
|
265
277
|
return (e.upper + e.lower) / 2;
|
|
266
|
-
},
|
|
278
|
+
}, hr = (t) => ({
|
|
267
279
|
lower: Math.min(...t.map((e) => b(e).lower)),
|
|
268
280
|
upper: Math.max(...t.map((e) => b(e).upper))
|
|
269
|
-
}),
|
|
281
|
+
}), Qn = (t) => ({
|
|
270
282
|
lower: Math.max(...t.map((e) => b(e).lower)),
|
|
271
283
|
upper: Math.min(...t.map((e) => b(e).upper))
|
|
272
|
-
}),
|
|
284
|
+
}), _n = (t) => {
|
|
273
285
|
const e = b(t), r = typeof e.lower == "bigint";
|
|
274
|
-
return Array.from({ length: Number(
|
|
275
|
-
},
|
|
276
|
-
const r = t.map((i) => b(i)), n = r.findIndex((i) =>
|
|
286
|
+
return Array.from({ length: Number(ve(t)) }, (n, s) => r ? e.lower + BigInt(s) : e.lower + s);
|
|
287
|
+
}, lt = (t, e) => {
|
|
288
|
+
const r = t.map((i) => b(i)), n = r.findIndex((i) => j(i, e) || e < i.lower);
|
|
277
289
|
if (n === -1) return { index: t.length, position: 0 };
|
|
278
290
|
const s = r[n];
|
|
279
|
-
return
|
|
280
|
-
},
|
|
291
|
+
return j(s, e) ? { index: n, position: Number(e - s.lower) } : { index: n, position: 0 };
|
|
292
|
+
}, _e = {
|
|
281
293
|
removeBefore: 0,
|
|
282
294
|
removeAfter: 0,
|
|
283
295
|
insertInto: 0,
|
|
284
296
|
deleteInBetween: 0
|
|
285
|
-
},
|
|
297
|
+
}, es = (t, e) => {
|
|
286
298
|
const r = t.map((l) => b(l)), n = b(e);
|
|
287
|
-
if (r.length === 0) return
|
|
288
|
-
const s =
|
|
289
|
-
if (s.index === t.length) return { ...
|
|
290
|
-
if (i.index === 0) return { ...
|
|
299
|
+
if (r.length === 0) return _e;
|
|
300
|
+
const s = lt(r, n.lower), i = lt(r, n.upper);
|
|
301
|
+
if (s.index === t.length) return { ..._e, insertInto: t.length };
|
|
302
|
+
if (i.index === 0) return { ..._e, removeAfter: i.position };
|
|
291
303
|
if (s.index === i.index)
|
|
292
304
|
return s.position !== 0 && i.position !== 0 ? null : {
|
|
293
305
|
removeAfter: i.position,
|
|
@@ -295,28 +307,28 @@ const Cn = a.union([wt, Tt, a.instanceof(String)]), se = (t) => (e, r) => {
|
|
|
295
307
|
insertInto: s.index,
|
|
296
308
|
deleteInBetween: 0
|
|
297
309
|
};
|
|
298
|
-
let o = i.index - s.index, c = s.index, h = q(Number(
|
|
310
|
+
let o = i.index - s.index, c = s.index, h = q(Number(ve(r[s.index])), s.position);
|
|
299
311
|
return s.position !== 0 ? (o -= 1, c += 1) : h = 0, {
|
|
300
312
|
removeBefore: h,
|
|
301
313
|
removeAfter: i.position,
|
|
302
314
|
insertInto: c,
|
|
303
315
|
deleteInBetween: o
|
|
304
316
|
};
|
|
305
|
-
},
|
|
317
|
+
}, fr = (t, e, r) => {
|
|
306
318
|
const n = t.map((c) => b(c)), s = r > 0 ? 1 : r < 0 ? -1 : 0;
|
|
307
319
|
if (s === 0) return e;
|
|
308
320
|
let i = r, o = e;
|
|
309
|
-
for (;
|
|
321
|
+
for (; ot(i, 0) === !1; ) {
|
|
310
322
|
const c = n.findIndex((h) => s > 0 ? o >= h.lower && o < h.upper : o > h.lower && o <= h.upper);
|
|
311
323
|
if (c !== -1) {
|
|
312
324
|
const h = n[c];
|
|
313
325
|
let l;
|
|
314
326
|
if (s > 0 ? l = q(h.upper, o) : l = q(o, h.lower), l > 0) {
|
|
315
|
-
const d =
|
|
316
|
-
if (o =
|
|
327
|
+
const d = ur(lr(i), l);
|
|
328
|
+
if (o = ae(
|
|
317
329
|
o,
|
|
318
330
|
s > 0 ? d : -d
|
|
319
|
-
), i = q(i, s > 0 ? d : -d),
|
|
331
|
+
), i = q(i, s > 0 ? d : -d), ot(i, 0)) return o;
|
|
320
332
|
continue;
|
|
321
333
|
}
|
|
322
334
|
}
|
|
@@ -332,7 +344,7 @@ const Cn = a.union([wt, Tt, a.instanceof(String)]), se = (t) => (e, r) => {
|
|
|
332
344
|
}
|
|
333
345
|
}
|
|
334
346
|
return o;
|
|
335
|
-
},
|
|
347
|
+
}, dr = (t, e, r) => {
|
|
336
348
|
const n = t.map((o) => b(o));
|
|
337
349
|
if (e === r) return typeof e == "bigint" ? 0n : 0;
|
|
338
350
|
const s = e < r ? b([e, r]) : b([r, e]);
|
|
@@ -345,276 +357,277 @@ const Cn = a.union([wt, Tt, a.instanceof(String)]), se = (t) => (e, r) => {
|
|
|
345
357
|
}
|
|
346
358
|
}
|
|
347
359
|
return i;
|
|
348
|
-
},
|
|
360
|
+
}, jo = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
349
361
|
__proto__: null,
|
|
350
|
-
CLIP:
|
|
351
|
-
DECIMAL:
|
|
352
|
-
INFINITE:
|
|
353
|
-
ZERO:
|
|
354
|
-
bounds:
|
|
355
|
-
buildInsertionPlan:
|
|
356
|
-
clamp:
|
|
362
|
+
CLIP: Wn,
|
|
363
|
+
DECIMAL: Fn,
|
|
364
|
+
INFINITE: Yn,
|
|
365
|
+
ZERO: Zn,
|
|
366
|
+
bounds: or,
|
|
367
|
+
buildInsertionPlan: es,
|
|
368
|
+
clamp: ut,
|
|
357
369
|
construct: b,
|
|
358
|
-
contains:
|
|
359
|
-
distance:
|
|
360
|
-
equals:
|
|
361
|
-
findInsertPosition:
|
|
362
|
-
isFinite:
|
|
363
|
-
isZero:
|
|
364
|
-
linspace:
|
|
365
|
-
makeValid:
|
|
366
|
-
max:
|
|
367
|
-
mean:
|
|
368
|
-
min:
|
|
369
|
-
overlapsWith:
|
|
370
|
-
span:
|
|
371
|
-
spanIsZero:
|
|
372
|
-
traverse:
|
|
373
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
370
|
+
contains: j,
|
|
371
|
+
distance: dr,
|
|
372
|
+
equals: Vn,
|
|
373
|
+
findInsertPosition: lt,
|
|
374
|
+
isFinite: Xn,
|
|
375
|
+
isZero: Hn,
|
|
376
|
+
linspace: _n,
|
|
377
|
+
makeValid: cr,
|
|
378
|
+
max: hr,
|
|
379
|
+
mean: Kn,
|
|
380
|
+
min: Qn,
|
|
381
|
+
overlapsWith: Gn,
|
|
382
|
+
span: ve,
|
|
383
|
+
spanIsZero: Jn,
|
|
384
|
+
traverse: fr
|
|
385
|
+
}, Symbol.toStringTag, { value: "Module" })), gr = Dn, k = (t) => Ye.includes(t) ? t : We.includes(t) ? "y" : "x", ts = (t) => k(t) === "x" ? "y" : "x", rs = (t) => k(t) === "x" ? "width" : "height", ns = (t) => k(t) === "x" ? "left" : "top", ss = (t) => gr.safeParse(t).success, is = (t) => k(t) === "x" ? "signedWidth" : "signedHeight", as = (t) => t === "center" ? !1 : k(t) === "x", os = (t) => k(t) === "y", us = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
374
386
|
__proto__: null,
|
|
375
|
-
DIRECTIONS:
|
|
376
|
-
construct:
|
|
377
|
-
crude:
|
|
378
|
-
dimension:
|
|
379
|
-
direction:
|
|
380
|
-
isDirection:
|
|
381
|
-
isX:
|
|
382
|
-
isY:
|
|
383
|
-
location:
|
|
384
|
-
signedDimension:
|
|
385
|
-
swap:
|
|
386
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
387
|
+
DIRECTIONS: Ye,
|
|
388
|
+
construct: k,
|
|
389
|
+
crude: gr,
|
|
390
|
+
dimension: rs,
|
|
391
|
+
direction: xt,
|
|
392
|
+
isDirection: ss,
|
|
393
|
+
isX: as,
|
|
394
|
+
isY: os,
|
|
395
|
+
location: ns,
|
|
396
|
+
signedDimension: is,
|
|
397
|
+
swap: ts
|
|
398
|
+
}, Symbol.toStringTag, { value: "Module" })), ls = Tt, cs = St, hs = at, fs = {
|
|
387
399
|
top: "bottom",
|
|
388
400
|
right: "left",
|
|
389
401
|
bottom: "top",
|
|
390
402
|
left: "right",
|
|
391
403
|
center: "center"
|
|
392
|
-
},
|
|
404
|
+
}, ds = {
|
|
393
405
|
top: "left",
|
|
394
406
|
right: "top",
|
|
395
407
|
bottom: "right",
|
|
396
408
|
left: "bottom",
|
|
397
409
|
center: "center"
|
|
398
|
-
},
|
|
399
|
-
const e =
|
|
410
|
+
}, gs = Pn, G = (t) => t instanceof String || !Ye.includes(t) ? t : t === "x" ? "left" : "top", ps = (t) => fs[G(t)], ms = (t) => ds[G(t)], me = (t) => {
|
|
411
|
+
const e = G(t);
|
|
400
412
|
return e === "top" || e === "bottom" ? "y" : "x";
|
|
401
|
-
},
|
|
402
|
-
x:
|
|
403
|
-
y:
|
|
404
|
-
}),
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
413
|
+
}, ys = a.object({
|
|
414
|
+
x: Tt.or(at),
|
|
415
|
+
y: St.or(at)
|
|
416
|
+
}), pr = a.object({ x: Tt, y: St }), xe = Object.freeze({ x: "left", y: "top" }), Mt = Object.freeze({ x: "right", y: "top" }), Ve = Object.freeze({ x: "left", y: "bottom" }), Et = Object.freeze({ x: "right", y: "bottom" }), At = Object.freeze({ x: "center", y: "center" }), Bt = Object.freeze({ x: "center", y: "top" }), Ut = Object.freeze({ x: "center", y: "bottom" }), Ct = Object.freeze({ x: "right", y: "center" }), jt = Object.freeze({ x: "left", y: "center" }), ws = Object.freeze([
|
|
417
|
+
jt,
|
|
418
|
+
Ct,
|
|
419
|
+
Bt,
|
|
420
|
+
Ut,
|
|
421
|
+
xe,
|
|
408
422
|
Mt,
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
Nt
|
|
414
|
-
]), Bt = (t, e) => t.x === e.x && t.y === e.y, gs = (t, e) => {
|
|
423
|
+
Ve,
|
|
424
|
+
Et,
|
|
425
|
+
At
|
|
426
|
+
]), Rt = (t, e) => t.x === e.x && t.y === e.y, bs = (t, e) => {
|
|
415
427
|
if (typeof e == "object") {
|
|
416
428
|
let r = !0;
|
|
417
429
|
return "x" in e && (t.x === e.x || (r = !1)), "y" in e && (t.y === e.y || (r = !1)), r;
|
|
418
430
|
}
|
|
419
431
|
return t.x === e || t.y === e;
|
|
420
|
-
},
|
|
432
|
+
}, mr = (t) => [t.x, t.y], Ae = (t) => me(G(t)) === "x", Os = (t) => me(G(t)) === "y", vs = (t) => `${t.x}${_t(t.y)}`, xs = (t, e) => {
|
|
421
433
|
let r, n;
|
|
422
|
-
if (typeof t == "object" && "x" in t ? (r = t.x, n = t.y) : (r =
|
|
434
|
+
if (typeof t == "object" && "x" in t ? (r = t.x, n = t.y) : (r = G(t), n = G(e ?? t)), me(r) === me(n) && r !== "center" && n !== "center")
|
|
423
435
|
throw new Error(
|
|
424
436
|
`[XYLocation] - encountered two locations with the same direction: ${r.toString()} - ${n.toString()}`
|
|
425
437
|
);
|
|
426
|
-
const s = { ...
|
|
427
|
-
return r === "center" ?
|
|
428
|
-
},
|
|
438
|
+
const s = { ...At };
|
|
439
|
+
return r === "center" ? Ae(n) ? [s.x, s.y] = [n, r] : [s.x, s.y] = [r, n] : n === "center" ? Ae(r) ? [s.x, s.y] = [r, n] : [s.x, s.y] = [n, r] : Ae(r) ? [s.x, s.y] = [r, n] : [s.x, s.y] = [n, r], s;
|
|
440
|
+
}, $s = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
429
441
|
__proto__: null,
|
|
430
|
-
BOTTOM_CENTER:
|
|
431
|
-
BOTTOM_LEFT:
|
|
432
|
-
BOTTOM_RIGHT:
|
|
433
|
-
CENTER:
|
|
434
|
-
CENTER_LEFT:
|
|
435
|
-
CENTER_LOCATIONS:
|
|
436
|
-
CENTER_RIGHT:
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
442
|
+
BOTTOM_CENTER: Ut,
|
|
443
|
+
BOTTOM_LEFT: Ve,
|
|
444
|
+
BOTTOM_RIGHT: Et,
|
|
445
|
+
CENTER: At,
|
|
446
|
+
CENTER_LEFT: jt,
|
|
447
|
+
CENTER_LOCATIONS: Nt,
|
|
448
|
+
CENTER_RIGHT: Ct,
|
|
449
|
+
OUTER_LOCATIONS: $t,
|
|
450
|
+
TOP_CENTER: Bt,
|
|
451
|
+
TOP_LEFT: xe,
|
|
452
|
+
TOP_RIGHT: Mt,
|
|
453
|
+
XY_LOCATIONS: ws,
|
|
454
|
+
X_LOCATIONS: Fe,
|
|
455
|
+
Y_LOCATIONS: We,
|
|
456
|
+
center: hs,
|
|
457
|
+
construct: G,
|
|
458
|
+
constructXY: xs,
|
|
459
|
+
corner: pr,
|
|
460
|
+
crude: gs,
|
|
461
|
+
direction: me,
|
|
462
|
+
isX: Ae,
|
|
463
|
+
isY: Os,
|
|
464
|
+
location: It,
|
|
465
|
+
outer: Cn,
|
|
466
|
+
rotate90: ms,
|
|
467
|
+
swap: ps,
|
|
468
|
+
x: ls,
|
|
469
|
+
xy: ys,
|
|
470
|
+
xyCouple: mr,
|
|
471
|
+
xyEquals: Rt,
|
|
472
|
+
xyMatches: bs,
|
|
473
|
+
xyToString: vs,
|
|
474
|
+
y: cs
|
|
475
|
+
}, Symbol.toStringTag, { value: "Module" })), ct = a.union([
|
|
463
476
|
a.number(),
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
477
|
+
pe,
|
|
478
|
+
Ze,
|
|
479
|
+
vt,
|
|
480
|
+
En,
|
|
481
|
+
ar
|
|
469
482
|
]), v = (t, e) => {
|
|
470
483
|
if (typeof t == "string") {
|
|
471
484
|
if (e === void 0) throw new Error("The y coordinate must be given.");
|
|
472
485
|
return t === "x" ? { x: e, y: 0 } : { x: 0, y: e };
|
|
473
486
|
}
|
|
474
487
|
return typeof t == "number" ? { x: t, y: e ?? t } : Array.isArray(t) ? { x: t[0], y: t[1] } : "signedWidth" in t ? { x: t.signedWidth, y: t.signedHeight } : "clientX" in t ? { x: t.clientX, y: t.clientY } : "width" in t ? { x: t.width, y: t.height } : { x: t.x, y: t.y };
|
|
475
|
-
},
|
|
488
|
+
}, P = Object.freeze({ x: 0, y: 0 }), yr = Object.freeze({ x: 1, y: 1 }), Ts = Object.freeze({ x: 1 / 0, y: 1 / 0 }), Ss = Object.freeze({ x: NaN, y: NaN }), De = (t, e, r = 0) => {
|
|
476
489
|
const n = v(t), s = v(e);
|
|
477
490
|
return r === 0 ? n.x === s.x && n.y === s.y : Math.abs(n.x - s.x) <= r && Math.abs(n.y - s.y) <= r;
|
|
478
|
-
},
|
|
491
|
+
}, Ns = (t) => De(t, P), Lt = (t, e, r) => {
|
|
479
492
|
const n = v(t), s = v(e, r);
|
|
480
493
|
return { x: n.x * s.x, y: n.y * s.y };
|
|
481
|
-
},
|
|
494
|
+
}, wr = (t, e) => {
|
|
482
495
|
const r = v(t);
|
|
483
496
|
return { x: r.x + e, y: r.y };
|
|
484
|
-
},
|
|
497
|
+
}, br = (t, e) => {
|
|
485
498
|
const r = v(t);
|
|
486
499
|
return { x: r.x, y: r.y + e };
|
|
487
|
-
},
|
|
500
|
+
}, ye = (t, e, r, ...n) => {
|
|
488
501
|
if (typeof e == "string") {
|
|
489
502
|
if (typeof r != "number") throw new Error("The value must be a number.");
|
|
490
|
-
return e === "x" ?
|
|
503
|
+
return e === "x" ? wr(t, r) : br(t, r);
|
|
491
504
|
}
|
|
492
505
|
if (typeof e == "object" && "x" in e && typeof e.x == "string") {
|
|
493
506
|
const s = v(r), i = v(t);
|
|
494
507
|
return e.x === "left" ? s.x = -s.x : e.x === "center" && (s.x = 0), e.y === "top" ? s.y = -s.y : e.y === "center" && (s.y = 0), { x: i.x + s.x, y: i.y + s.y };
|
|
495
508
|
}
|
|
496
|
-
return [t, e, r ??
|
|
509
|
+
return [t, e, r ?? P, ...n].reduce((s, i) => {
|
|
497
510
|
const o = v(i);
|
|
498
511
|
return { x: s.x + o.x, y: s.y + o.y };
|
|
499
|
-
},
|
|
500
|
-
},
|
|
512
|
+
}, P);
|
|
513
|
+
}, Is = (t, e, r) => {
|
|
501
514
|
const n = v(t);
|
|
502
515
|
return e === "x" ? { x: r, y: n.y } : { x: n.x, y: r };
|
|
503
|
-
},
|
|
516
|
+
}, Ms = (t, e) => {
|
|
504
517
|
const r = v(t), n = v(e);
|
|
505
518
|
return Math.sqrt((r.x - n.x) ** 2 + (r.y - n.y) ** 2);
|
|
506
|
-
},
|
|
519
|
+
}, Es = (t, e) => {
|
|
507
520
|
const r = v(t), n = v(e);
|
|
508
521
|
return { x: n.x - r.x, y: n.y - r.y };
|
|
509
|
-
},
|
|
522
|
+
}, As = (t) => {
|
|
510
523
|
const e = v(t);
|
|
511
524
|
return Number.isNaN(e.x) || Number.isNaN(e.y);
|
|
512
|
-
},
|
|
525
|
+
}, Bs = (t) => {
|
|
513
526
|
const e = v(t);
|
|
514
527
|
return Number.isFinite(e.x) && Number.isFinite(e.y);
|
|
515
|
-
},
|
|
528
|
+
}, Us = (t) => {
|
|
516
529
|
const e = v(t);
|
|
517
530
|
return [e.x, e.y];
|
|
518
|
-
},
|
|
531
|
+
}, Cs = (t) => {
|
|
519
532
|
const e = v(t);
|
|
520
533
|
return { left: e.x, top: e.y };
|
|
521
|
-
},
|
|
534
|
+
}, ht = (t, e = 0) => {
|
|
522
535
|
const r = v(t);
|
|
523
536
|
return { x: Number(r.x.toFixed(e)), y: Number(r.y.toFixed(e)) };
|
|
524
|
-
},
|
|
537
|
+
}, ue = (t, e) => {
|
|
525
538
|
const r = v(t), n = v(e);
|
|
526
539
|
return { x: r.x - n.x, y: r.y - n.y };
|
|
527
|
-
},
|
|
540
|
+
}, le = (t) => {
|
|
528
541
|
const e = v(t), r = Math.hypot(e.x, e.y);
|
|
529
542
|
return r === 0 ? { x: 0, y: 0 } : { x: -e.y / r, y: e.x / r };
|
|
530
|
-
},
|
|
543
|
+
}, Or = (t) => {
|
|
531
544
|
const e = v(t), r = Math.hypot(e.x, e.y);
|
|
532
545
|
return r === 0 ? { x: 0, y: 0 } : { x: e.x / r, y: e.y / r };
|
|
533
|
-
},
|
|
534
|
-
const e = t.reduce((r, n) =>
|
|
535
|
-
return
|
|
536
|
-
},
|
|
546
|
+
}, vr = (...t) => {
|
|
547
|
+
const e = t.reduce((r, n) => ye(r, n), P);
|
|
548
|
+
return Lt(e, 1 / t.length);
|
|
549
|
+
}, js = (t, e) => {
|
|
537
550
|
const r = [];
|
|
538
551
|
for (let n = 0; n < t.length; n++) {
|
|
539
552
|
const s = t[n];
|
|
540
553
|
let i, o, c, h;
|
|
541
554
|
if (n === 0) {
|
|
542
|
-
const l = t[n + 1], d =
|
|
543
|
-
o =
|
|
555
|
+
const l = t[n + 1], d = ue(l, s);
|
|
556
|
+
o = le(d), c = o, h = e;
|
|
544
557
|
} else if (n === t.length - 1) {
|
|
545
|
-
const l = t[n - 1], d =
|
|
546
|
-
i =
|
|
558
|
+
const l = t[n - 1], d = ue(s, l);
|
|
559
|
+
i = le(d), c = i, h = e;
|
|
547
560
|
} else {
|
|
548
|
-
const l = t[n - 1], d = t[n + 1],
|
|
549
|
-
i =
|
|
550
|
-
const
|
|
551
|
-
(
|
|
552
|
-
),
|
|
553
|
-
|
|
561
|
+
const l = t[n - 1], d = t[n + 1], y = ue(s, l), p = ue(d, s);
|
|
562
|
+
i = le(y), o = le(p);
|
|
563
|
+
const L = Math.acos(
|
|
564
|
+
(y.x * p.x + y.y * p.y) / (Math.hypot(y.x, y.y) * Math.hypot(p.x, p.y))
|
|
565
|
+
), B = Math.sin(L / 2);
|
|
566
|
+
B === 0 ? h = e : h = e / B, c = Or(vr(i, o));
|
|
554
567
|
}
|
|
555
|
-
r.push(
|
|
568
|
+
r.push(Lt(c, h));
|
|
556
569
|
}
|
|
557
570
|
return r;
|
|
558
|
-
},
|
|
571
|
+
}, Rs = (t) => {
|
|
559
572
|
const e = v(t);
|
|
560
573
|
return { x: e.y, y: e.x };
|
|
561
|
-
},
|
|
574
|
+
}, ft = (t) => {
|
|
562
575
|
const e = v(t);
|
|
563
576
|
return { x: Math.round(e.x), y: Math.round(e.y) };
|
|
564
|
-
},
|
|
577
|
+
}, Ro = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
565
578
|
__proto__: null,
|
|
566
|
-
INFINITY:
|
|
567
|
-
NAN:
|
|
568
|
-
ONE:
|
|
569
|
-
ZERO:
|
|
570
|
-
average:
|
|
571
|
-
calculateMiters:
|
|
572
|
-
clientXY:
|
|
579
|
+
INFINITY: Ts,
|
|
580
|
+
NAN: Ss,
|
|
581
|
+
ONE: yr,
|
|
582
|
+
ZERO: P,
|
|
583
|
+
average: vr,
|
|
584
|
+
calculateMiters: js,
|
|
585
|
+
clientXY: ar,
|
|
573
586
|
construct: v,
|
|
574
|
-
couple:
|
|
575
|
-
crudeZ:
|
|
576
|
-
css:
|
|
577
|
-
distance:
|
|
578
|
-
equals:
|
|
579
|
-
isFinite:
|
|
580
|
-
isNan:
|
|
581
|
-
isZero:
|
|
582
|
-
normal:
|
|
583
|
-
normalize:
|
|
584
|
-
round:
|
|
585
|
-
scale:
|
|
586
|
-
set:
|
|
587
|
-
sub:
|
|
588
|
-
swap:
|
|
589
|
-
translate:
|
|
590
|
-
translateX:
|
|
591
|
-
translateY:
|
|
592
|
-
translation:
|
|
593
|
-
truncate:
|
|
594
|
-
xy:
|
|
595
|
-
}, Symbol.toStringTag, { value: "Module" })), Te = a.union([a.number(), a.string()]),
|
|
587
|
+
couple: Us,
|
|
588
|
+
crudeZ: ct,
|
|
589
|
+
css: Cs,
|
|
590
|
+
distance: Ms,
|
|
591
|
+
equals: De,
|
|
592
|
+
isFinite: Bs,
|
|
593
|
+
isNan: As,
|
|
594
|
+
isZero: Ns,
|
|
595
|
+
normal: le,
|
|
596
|
+
normalize: Or,
|
|
597
|
+
round: ft,
|
|
598
|
+
scale: Lt,
|
|
599
|
+
set: Is,
|
|
600
|
+
sub: ue,
|
|
601
|
+
swap: Rs,
|
|
602
|
+
translate: ye,
|
|
603
|
+
translateX: wr,
|
|
604
|
+
translateY: br,
|
|
605
|
+
translation: Es,
|
|
606
|
+
truncate: ht,
|
|
607
|
+
xy: pe
|
|
608
|
+
}, Symbol.toStringTag, { value: "Module" })), Te = a.union([a.number(), a.string()]), Ls = a.object({
|
|
596
609
|
top: Te,
|
|
597
610
|
left: Te,
|
|
598
611
|
width: Te,
|
|
599
612
|
height: Te
|
|
600
|
-
}),
|
|
613
|
+
}), Ds = a.object({
|
|
601
614
|
left: a.number(),
|
|
602
615
|
top: a.number(),
|
|
603
616
|
right: a.number(),
|
|
604
617
|
bottom: a.number()
|
|
605
|
-
}),
|
|
606
|
-
one:
|
|
607
|
-
two:
|
|
608
|
-
root:
|
|
609
|
-
}),
|
|
618
|
+
}), Ps = a.object({
|
|
619
|
+
one: pe,
|
|
620
|
+
two: pe,
|
|
621
|
+
root: pr
|
|
622
|
+
}), xr = { one: P, two: P, root: xe }, ks = { one: P, two: yr, root: Ve }, $r = (t, e) => ({
|
|
610
623
|
one: t.one,
|
|
611
624
|
two: t.two,
|
|
612
625
|
root: e ?? t.root
|
|
613
|
-
}),
|
|
626
|
+
}), $ = (t, e, r = 0, n = 0, s) => {
|
|
614
627
|
const i = {
|
|
615
|
-
one: { ...
|
|
616
|
-
two: { ...
|
|
617
|
-
root: s ??
|
|
628
|
+
one: { ...P },
|
|
629
|
+
two: { ...P },
|
|
630
|
+
root: s ?? xe
|
|
618
631
|
};
|
|
619
632
|
if (typeof t == "number") {
|
|
620
633
|
if (typeof e != "number")
|
|
@@ -628,219 +641,219 @@ const Cn = a.union([wt, Tt, a.instanceof(String)]), se = (t) => (e, r) => {
|
|
|
628
641
|
x: i.one.x + e.signedWidth,
|
|
629
642
|
y: i.one.y + e.signedHeight
|
|
630
643
|
} : i.two = e, i));
|
|
631
|
-
},
|
|
632
|
-
const n =
|
|
644
|
+
}, qs = (t, e, r) => {
|
|
645
|
+
const n = $(t);
|
|
633
646
|
if (typeof e == "string") {
|
|
634
647
|
if (r == null) throw new Error("Invalid arguments for resize");
|
|
635
|
-
const s =
|
|
636
|
-
return
|
|
648
|
+
const s = k(e);
|
|
649
|
+
return $(
|
|
637
650
|
n.one,
|
|
638
651
|
void 0,
|
|
639
|
-
s === "x" ? r :
|
|
640
|
-
s === "y" ? r :
|
|
652
|
+
s === "x" ? r : H(n),
|
|
653
|
+
s === "y" ? r : J(n),
|
|
641
654
|
n.root
|
|
642
655
|
);
|
|
643
656
|
}
|
|
644
|
-
return
|
|
645
|
-
},
|
|
646
|
-
const n =
|
|
657
|
+
return $(n.one, e, void 0, void 0, n.root);
|
|
658
|
+
}, zs = (t, e, r = !0) => {
|
|
659
|
+
const n = $(t);
|
|
647
660
|
let s = (i, o) => i < o;
|
|
648
|
-
return r && (s = (i, o) => i <= o), "one" in e ? s(
|
|
649
|
-
},
|
|
650
|
-
width:
|
|
651
|
-
height:
|
|
652
|
-
}),
|
|
653
|
-
signedWidth:
|
|
654
|
-
signedHeight:
|
|
655
|
-
}),
|
|
656
|
-
top:
|
|
657
|
-
left:
|
|
658
|
-
width:
|
|
659
|
-
height:
|
|
660
|
-
}),
|
|
661
|
-
const n =
|
|
661
|
+
return r && (s = (i, o) => i <= o), "one" in e ? s(W(n), W(e)) && s(K(e), K(n)) && s(V(n), V(e)) && s(Q(e), Q(n)) : s(W(n), e.x) && s(e.x, K(n)) && s(V(n), e.y) && s(e.y, Q(n));
|
|
662
|
+
}, Zs = (t, e) => De(t.one, e.one) && De(t.two, e.two) && Rt(t.root, e.root), Tr = (t) => ({
|
|
663
|
+
width: H(t),
|
|
664
|
+
height: J(t)
|
|
665
|
+
}), Ys = (t) => ({
|
|
666
|
+
signedWidth: Ge(t),
|
|
667
|
+
signedHeight: He(t)
|
|
668
|
+
}), Fs = (t) => ({
|
|
669
|
+
top: V(t),
|
|
670
|
+
left: W(t),
|
|
671
|
+
width: H(t),
|
|
672
|
+
height: J(t)
|
|
673
|
+
}), Dt = (t, e, r = !1) => {
|
|
674
|
+
const n = k(e) === "y" ? He(t) : Ge(t);
|
|
662
675
|
return r ? n : Math.abs(n);
|
|
663
|
-
},
|
|
664
|
-
const r =
|
|
676
|
+
}, z = (t, e) => {
|
|
677
|
+
const r = $(t);
|
|
665
678
|
return {
|
|
666
|
-
x: e.x === "center" ?
|
|
667
|
-
y: e.y === "center" ?
|
|
679
|
+
x: e.x === "center" ? dt(r).x : _(r, e.x),
|
|
680
|
+
y: e.y === "center" ? dt(r).y : _(r, e.y)
|
|
668
681
|
};
|
|
669
|
-
},
|
|
670
|
-
const r =
|
|
671
|
-
return
|
|
672
|
-
},
|
|
673
|
-
const e =
|
|
682
|
+
}, _ = (t, e) => {
|
|
683
|
+
const r = $(t), n = mr(r.root).includes(e) ? Math.min : Math.max;
|
|
684
|
+
return Fe.includes(e) ? n(r.one.x, r.two.x) : n(r.one.y, r.two.y);
|
|
685
|
+
}, Ws = (t) => t.one.x === t.two.x && t.one.y === t.two.y, H = (t) => Dt(t, "x"), J = (t) => Dt(t, "y"), Ge = (t) => {
|
|
686
|
+
const e = $(t);
|
|
674
687
|
return e.two.x - e.one.x;
|
|
675
|
-
},
|
|
676
|
-
const e =
|
|
688
|
+
}, He = (t) => {
|
|
689
|
+
const e = $(t);
|
|
677
690
|
return e.two.y - e.one.y;
|
|
678
|
-
},
|
|
679
|
-
x:
|
|
680
|
-
y:
|
|
681
|
-
}),
|
|
682
|
-
const e =
|
|
683
|
-
return e.root.x === "left" ?
|
|
684
|
-
},
|
|
685
|
-
const e =
|
|
686
|
-
return e.root.y === "top" ?
|
|
687
|
-
},
|
|
688
|
-
const e =
|
|
691
|
+
}, Sr = (t) => z(t, xe), Vs = (t) => z(t, Bt), Gs = (t) => z(t, Mt), Hs = (t) => z(t, Ve), Js = (t) => z(t, Ut), Xs = (t) => z(t, Et), Ks = (t) => z(t, jt), Qs = (t) => z(t, Ct), K = (t) => _(t, "right"), Q = (t) => _(t, "bottom"), W = (t) => _(t, "left"), V = (t) => _(t, "top"), dt = (t) => ye(Sr(t), {
|
|
692
|
+
x: Ge(t) / 2,
|
|
693
|
+
y: He(t) / 2
|
|
694
|
+
}), Pt = (t) => {
|
|
695
|
+
const e = $(t);
|
|
696
|
+
return e.root.x === "left" ? W(e) : K(e);
|
|
697
|
+
}, kt = (t) => {
|
|
698
|
+
const e = $(t);
|
|
699
|
+
return e.root.y === "top" ? V(e) : Q(e);
|
|
700
|
+
}, _s = (t) => ({ x: Pt(t), y: kt(t) }), Be = (t) => {
|
|
701
|
+
const e = $(t);
|
|
689
702
|
return { lower: e.one.x, upper: e.two.x };
|
|
690
|
-
},
|
|
691
|
-
const e =
|
|
703
|
+
}, Ue = (t) => {
|
|
704
|
+
const e = $(t);
|
|
692
705
|
return { lower: e.one.y, upper: e.two.y };
|
|
693
|
-
},
|
|
694
|
-
const r =
|
|
706
|
+
}, ei = (t, e) => $r(t, e), ti = (t, e) => {
|
|
707
|
+
const r = $(t), n = Fe.includes(e) ? "x" : We.includes(e) ? "y" : null;
|
|
695
708
|
if (n === null) throw new Error(`Invalid location: ${e}`);
|
|
696
709
|
const s = e === "top" || e === "left" ? Math.min : Math.max, i = { ...r.one }, o = { ...r.two };
|
|
697
710
|
return i[n] = s(r.one[n], r.two[n]), o[n] = s(r.one[n], r.two[n]), [i, o];
|
|
698
|
-
},
|
|
699
|
-
const r =
|
|
700
|
-
return
|
|
701
|
-
},
|
|
711
|
+
}, ri = (t, e) => {
|
|
712
|
+
const r = $(t), n = $(e), s = Pt(n) + (H(n) - H(r)) / 2, i = kt(n) + (J(n) - J(r)) / 2;
|
|
713
|
+
return $({ x: s, y: i }, Tr(r));
|
|
714
|
+
}, Nr = (t) => typeof t != "object" || t == null ? !1 : "one" in t && "two" in t && "root" in t, ni = (t) => H(t) / J(t), si = (t, e, r) => {
|
|
702
715
|
if (typeof e == "string") {
|
|
703
716
|
if (r == null) throw new Error("Undefined amount passed into box.translate");
|
|
704
|
-
const s =
|
|
717
|
+
const s = k(e);
|
|
705
718
|
e = v(s, r);
|
|
706
719
|
}
|
|
707
|
-
const n =
|
|
708
|
-
return
|
|
709
|
-
|
|
710
|
-
|
|
720
|
+
const n = $(t);
|
|
721
|
+
return $(
|
|
722
|
+
ye(n.one, e),
|
|
723
|
+
ye(n.two, e),
|
|
711
724
|
void 0,
|
|
712
725
|
void 0,
|
|
713
726
|
n.root
|
|
714
727
|
);
|
|
715
|
-
},
|
|
716
|
-
const r = Math.max(
|
|
717
|
-
return r > s || n > i ?
|
|
718
|
-
},
|
|
719
|
-
const r =
|
|
720
|
-
return
|
|
721
|
-
|
|
722
|
-
|
|
728
|
+
}, ii = (t, e) => {
|
|
729
|
+
const r = Math.max(W(t), W(e)), n = Math.max(V(t), V(e)), s = Math.min(K(t), K(e)), i = Math.min(Q(t), Q(e));
|
|
730
|
+
return r > s || n > i ? xr : $({ x: r, y: n }, { x: s, y: i }, void 0, void 0, t.root);
|
|
731
|
+
}, ai = (t) => H(t) * J(t), oi = (t, e) => {
|
|
732
|
+
const r = $(t);
|
|
733
|
+
return $(
|
|
734
|
+
ht(r.one, e),
|
|
735
|
+
ht(r.two, e),
|
|
723
736
|
void 0,
|
|
724
737
|
void 0,
|
|
725
738
|
r.root
|
|
726
739
|
);
|
|
727
|
-
},
|
|
740
|
+
}, ui = (t, e, r, n, s, i) => {
|
|
728
741
|
const o = { x: t, y: e }, c = { x: t + r, y: e + n };
|
|
729
|
-
return s.x !== i.x && (s.x === "center" ? (o.x -= r / 2, c.x -= r / 2) : (o.x -= r, c.x -= r)), s.y !== i.y && (s.y === "center" ? (o.y -= n / 2, c.y -= n / 2) : (o.y -= n, c.y -= n)),
|
|
730
|
-
},
|
|
731
|
-
const e =
|
|
732
|
-
return
|
|
733
|
-
},
|
|
742
|
+
return s.x !== i.x && (s.x === "center" ? (o.x -= r / 2, c.x -= r / 2) : (o.x -= r, c.x -= r)), s.y !== i.y && (s.y === "center" ? (o.y -= n / 2, c.y -= n / 2) : (o.y -= n, c.y -= n)), $(o, c, void 0, void 0, i);
|
|
743
|
+
}, li = (t) => {
|
|
744
|
+
const e = $(t);
|
|
745
|
+
return $(ft(e.one), ft(e.two), void 0, void 0, e.root);
|
|
746
|
+
}, Lo = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
734
747
|
__proto__: null,
|
|
735
|
-
DECIMAL:
|
|
736
|
-
ZERO:
|
|
737
|
-
area:
|
|
738
|
-
areaIsZero:
|
|
739
|
-
aspect:
|
|
740
|
-
bottom:
|
|
741
|
-
bottomCenter:
|
|
742
|
-
bottomLeft:
|
|
743
|
-
bottomRight:
|
|
744
|
-
box:
|
|
745
|
-
center:
|
|
746
|
-
centerLeft:
|
|
747
|
-
centerRight:
|
|
748
|
-
construct:
|
|
749
|
-
constructWithAlternateRoot:
|
|
750
|
-
contains:
|
|
751
|
-
copy:
|
|
752
|
-
css:
|
|
753
|
-
cssBox:
|
|
754
|
-
dim:
|
|
755
|
-
dims:
|
|
756
|
-
domRect:
|
|
757
|
-
edgePoints:
|
|
758
|
-
equals:
|
|
759
|
-
height:
|
|
760
|
-
intersection:
|
|
761
|
-
isBox:
|
|
762
|
-
left:
|
|
763
|
-
loc:
|
|
764
|
-
positionInCenter:
|
|
765
|
-
reRoot:
|
|
766
|
-
resize:
|
|
767
|
-
right:
|
|
768
|
-
root:
|
|
769
|
-
round:
|
|
770
|
-
signedDims:
|
|
771
|
-
signedHeight:
|
|
772
|
-
signedWidth:
|
|
773
|
-
top:
|
|
774
|
-
topCenter:
|
|
775
|
-
topLeft:
|
|
776
|
-
topRight:
|
|
777
|
-
translate:
|
|
778
|
-
truncate:
|
|
779
|
-
width:
|
|
780
|
-
x:
|
|
781
|
-
xBounds:
|
|
782
|
-
xyLoc:
|
|
783
|
-
y:
|
|
784
|
-
yBounds:
|
|
785
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
748
|
+
DECIMAL: ks,
|
|
749
|
+
ZERO: xr,
|
|
750
|
+
area: ai,
|
|
751
|
+
areaIsZero: Ws,
|
|
752
|
+
aspect: ni,
|
|
753
|
+
bottom: Q,
|
|
754
|
+
bottomCenter: Js,
|
|
755
|
+
bottomLeft: Hs,
|
|
756
|
+
bottomRight: Xs,
|
|
757
|
+
box: Ps,
|
|
758
|
+
center: dt,
|
|
759
|
+
centerLeft: Ks,
|
|
760
|
+
centerRight: Qs,
|
|
761
|
+
construct: $,
|
|
762
|
+
constructWithAlternateRoot: ui,
|
|
763
|
+
contains: zs,
|
|
764
|
+
copy: $r,
|
|
765
|
+
css: Fs,
|
|
766
|
+
cssBox: Ls,
|
|
767
|
+
dim: Dt,
|
|
768
|
+
dims: Tr,
|
|
769
|
+
domRect: Ds,
|
|
770
|
+
edgePoints: ti,
|
|
771
|
+
equals: Zs,
|
|
772
|
+
height: J,
|
|
773
|
+
intersection: ii,
|
|
774
|
+
isBox: Nr,
|
|
775
|
+
left: W,
|
|
776
|
+
loc: _,
|
|
777
|
+
positionInCenter: ri,
|
|
778
|
+
reRoot: ei,
|
|
779
|
+
resize: qs,
|
|
780
|
+
right: K,
|
|
781
|
+
root: _s,
|
|
782
|
+
round: li,
|
|
783
|
+
signedDims: Ys,
|
|
784
|
+
signedHeight: He,
|
|
785
|
+
signedWidth: Ge,
|
|
786
|
+
top: V,
|
|
787
|
+
topCenter: Vs,
|
|
788
|
+
topLeft: Sr,
|
|
789
|
+
topRight: Gs,
|
|
790
|
+
translate: si,
|
|
791
|
+
truncate: oi,
|
|
792
|
+
width: H,
|
|
793
|
+
x: Pt,
|
|
794
|
+
xBounds: Be,
|
|
795
|
+
xyLoc: z,
|
|
796
|
+
y: kt,
|
|
797
|
+
yBounds: Ue
|
|
798
|
+
}, Symbol.toStringTag, { value: "Module" })), Ir = a.object({ signedWidth: a.number(), signedHeight: a.number() }), ci = a.union([vt, Ir, pe, Ze]), hi = { width: 0, height: 0 }, fi = { width: 1, height: 1 }, R = (t, e) => typeof t == "number" ? { width: t, height: e ?? t } : Array.isArray(t) ? { width: t[0], height: t[1] } : "x" in t ? { width: t.x, height: t.y } : "signedWidth" in t ? { width: t.signedWidth, height: t.signedHeight } : { ...t }, di = (t, e) => {
|
|
786
799
|
if (e == null) return !1;
|
|
787
|
-
const r =
|
|
800
|
+
const r = R(t), n = R(e);
|
|
788
801
|
return r.width === n.width && r.height === n.height;
|
|
789
|
-
},
|
|
790
|
-
const e =
|
|
802
|
+
}, gi = (t) => {
|
|
803
|
+
const e = R(t);
|
|
791
804
|
return { width: e.height, height: e.width };
|
|
792
|
-
},
|
|
793
|
-
const e =
|
|
805
|
+
}, pi = (t) => {
|
|
806
|
+
const e = R(t);
|
|
794
807
|
return `0 0 ${e.width} ${e.height}`;
|
|
795
|
-
},
|
|
796
|
-
const e =
|
|
808
|
+
}, mi = (t) => {
|
|
809
|
+
const e = R(t);
|
|
797
810
|
return [e.width, e.height];
|
|
798
|
-
},
|
|
799
|
-
width: Math.max(...t.map((e) =>
|
|
800
|
-
height: Math.max(...t.map((e) =>
|
|
801
|
-
}),
|
|
802
|
-
width: Math.min(...t.map((e) =>
|
|
803
|
-
height: Math.min(...t.map((e) =>
|
|
804
|
-
}),
|
|
805
|
-
const r =
|
|
811
|
+
}, yi = (t) => ({
|
|
812
|
+
width: Math.max(...t.map((e) => R(e).width)),
|
|
813
|
+
height: Math.max(...t.map((e) => R(e).height))
|
|
814
|
+
}), wi = (t) => ({
|
|
815
|
+
width: Math.min(...t.map((e) => R(e).width)),
|
|
816
|
+
height: Math.min(...t.map((e) => R(e).height))
|
|
817
|
+
}), bi = (t, e) => {
|
|
818
|
+
const r = R(t);
|
|
806
819
|
return { width: r.width * e, height: r.height * e };
|
|
807
|
-
},
|
|
820
|
+
}, Do = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
808
821
|
__proto__: null,
|
|
809
|
-
DECIMAL:
|
|
810
|
-
ZERO:
|
|
811
|
-
construct:
|
|
812
|
-
couple:
|
|
813
|
-
crude:
|
|
814
|
-
dimensions:
|
|
815
|
-
equals:
|
|
816
|
-
max:
|
|
817
|
-
min:
|
|
818
|
-
scale:
|
|
819
|
-
signed:
|
|
820
|
-
svgViewBox:
|
|
821
|
-
swap:
|
|
822
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
822
|
+
DECIMAL: fi,
|
|
823
|
+
ZERO: hi,
|
|
824
|
+
construct: R,
|
|
825
|
+
couple: mi,
|
|
826
|
+
crude: ci,
|
|
827
|
+
dimensions: vt,
|
|
828
|
+
equals: di,
|
|
829
|
+
max: yi,
|
|
830
|
+
min: wi,
|
|
831
|
+
scale: bi,
|
|
832
|
+
signed: Ir,
|
|
833
|
+
svgViewBox: pi,
|
|
834
|
+
swap: gi
|
|
835
|
+
}, Symbol.toStringTag, { value: "Module" })), Oi = (t, e, r) => e !== void 0 && t < e ? e : r !== void 0 && t > r ? r : t, vi = a.object({ offset: ct, scale: ct }), xi = a.object({ offset: a.number(), scale: a.number() }), $i = (t) => (e, r, n, s) => r === "dimension" ? [e, n] : [
|
|
823
836
|
e,
|
|
824
837
|
s ? n - t : n + t
|
|
825
|
-
],
|
|
838
|
+
], Ti = (t) => (e, r, n, s) => [
|
|
826
839
|
e,
|
|
827
840
|
s ? n / t : n * t
|
|
828
|
-
],
|
|
841
|
+
], Si = (t) => (e, r, n) => {
|
|
829
842
|
if (e === null) return [t, n];
|
|
830
843
|
const { lower: s, upper: i } = e, { lower: o, upper: c } = t, h = i - s, l = c - o;
|
|
831
844
|
if (r === "dimension") return [t, n * (l / h)];
|
|
832
845
|
const d = (n - s) * (l / h) + o;
|
|
833
846
|
return [t, d];
|
|
834
|
-
},
|
|
847
|
+
}, Ni = (t) => (e, r, n) => [t, n], Ii = () => (t, e, r) => {
|
|
835
848
|
if (t === null) throw new Error("cannot invert without bounds");
|
|
836
849
|
if (e === "dimension") return [t, r];
|
|
837
850
|
const { lower: n, upper: s } = t;
|
|
838
851
|
return [t, s - (r - n)];
|
|
839
|
-
},
|
|
852
|
+
}, Mi = (t) => (e, r, n) => {
|
|
840
853
|
const { lower: s, upper: i } = t;
|
|
841
|
-
return n =
|
|
854
|
+
return n = Oi(n, s, i), [e, n];
|
|
842
855
|
};
|
|
843
|
-
let
|
|
856
|
+
let gt = class re {
|
|
844
857
|
ops = [];
|
|
845
858
|
currBounds = null;
|
|
846
859
|
currType = null;
|
|
@@ -854,7 +867,7 @@ let ct = class te {
|
|
|
854
867
|
* @param value - The amount to translate by.
|
|
855
868
|
*/
|
|
856
869
|
static translate(e) {
|
|
857
|
-
return new
|
|
870
|
+
return new re().translate(e);
|
|
858
871
|
}
|
|
859
872
|
/**
|
|
860
873
|
* @returns a new scale with a magnification as its first operation. Any number provided
|
|
@@ -862,10 +875,10 @@ let ct = class te {
|
|
|
862
875
|
* @param value - The amount to translate by.
|
|
863
876
|
*/
|
|
864
877
|
static magnify(e) {
|
|
865
|
-
return new
|
|
878
|
+
return new re().magnify(e);
|
|
866
879
|
}
|
|
867
880
|
static scale(e, r) {
|
|
868
|
-
return new
|
|
881
|
+
return new re().scale(e, r);
|
|
869
882
|
}
|
|
870
883
|
/**
|
|
871
884
|
* @returns a copy of the scale with a translation as its next operation. Any
|
|
@@ -874,7 +887,7 @@ let ct = class te {
|
|
|
874
887
|
* @param value - The amount to translate by.
|
|
875
888
|
*/
|
|
876
889
|
translate(e) {
|
|
877
|
-
const r = this.new(), n =
|
|
890
|
+
const r = this.new(), n = $i(e);
|
|
878
891
|
return n.type = "translate", r.ops.push(n), r;
|
|
879
892
|
}
|
|
880
893
|
/**
|
|
@@ -884,23 +897,23 @@ let ct = class te {
|
|
|
884
897
|
* @param value - The amount to magnify by.
|
|
885
898
|
*/
|
|
886
899
|
magnify(e) {
|
|
887
|
-
const r = this.new(), n =
|
|
900
|
+
const r = this.new(), n = Ti(e);
|
|
888
901
|
return n.type = "magnify", r.ops.push(n), r;
|
|
889
902
|
}
|
|
890
903
|
scale(e, r) {
|
|
891
|
-
const n = b(e, r), s = this.new(), i =
|
|
904
|
+
const n = b(e, r), s = this.new(), i = Si(n);
|
|
892
905
|
return i.type = "scale", s.ops.push(i), s;
|
|
893
906
|
}
|
|
894
907
|
clamp(e, r) {
|
|
895
|
-
const n = b(e, r), s = this.new(), i =
|
|
908
|
+
const n = b(e, r), s = this.new(), i = Mi(n);
|
|
896
909
|
return i.type = "clamp", s.ops.push(i), s;
|
|
897
910
|
}
|
|
898
911
|
reBound(e, r) {
|
|
899
|
-
const n = b(e, r), s = this.new(), i =
|
|
912
|
+
const n = b(e, r), s = this.new(), i = Ni(n);
|
|
900
913
|
return i.type = "re-bound", s.ops.push(i), s;
|
|
901
914
|
}
|
|
902
915
|
invert() {
|
|
903
|
-
const e =
|
|
916
|
+
const e = Ii();
|
|
904
917
|
e.type = "invert";
|
|
905
918
|
const r = this.new();
|
|
906
919
|
return r.ops.push(e), r;
|
|
@@ -912,7 +925,7 @@ let ct = class te {
|
|
|
912
925
|
return this.exec("dimension", e);
|
|
913
926
|
}
|
|
914
927
|
new() {
|
|
915
|
-
const e = new
|
|
928
|
+
const e = new re();
|
|
916
929
|
return e.ops = this.ops.slice(), e.reversed = this.reversed, e;
|
|
917
930
|
}
|
|
918
931
|
exec(e, r) {
|
|
@@ -938,34 +951,34 @@ let ct = class te {
|
|
|
938
951
|
get transform() {
|
|
939
952
|
return { scale: this.dim(1), offset: this.pos(0) };
|
|
940
953
|
}
|
|
941
|
-
static IDENTITY = new
|
|
942
|
-
},
|
|
954
|
+
static IDENTITY = new re();
|
|
955
|
+
}, Ei = class D {
|
|
943
956
|
x;
|
|
944
957
|
y;
|
|
945
958
|
currRoot;
|
|
946
|
-
constructor(e = new
|
|
959
|
+
constructor(e = new gt(), r = new gt(), n = null) {
|
|
947
960
|
this.x = e, this.y = r, this.currRoot = n;
|
|
948
961
|
}
|
|
949
962
|
static translate(e, r) {
|
|
950
|
-
return new
|
|
963
|
+
return new D().translate(e, r);
|
|
951
964
|
}
|
|
952
965
|
static translateX(e) {
|
|
953
|
-
return new
|
|
966
|
+
return new D().translateX(e);
|
|
954
967
|
}
|
|
955
968
|
static translateY(e) {
|
|
956
|
-
return new
|
|
969
|
+
return new D().translateY(e);
|
|
957
970
|
}
|
|
958
971
|
static clamp(e) {
|
|
959
|
-
return new
|
|
972
|
+
return new D().clamp(e);
|
|
960
973
|
}
|
|
961
974
|
static magnify(e) {
|
|
962
|
-
return new
|
|
975
|
+
return new D().magnify(e);
|
|
963
976
|
}
|
|
964
977
|
static scale(e) {
|
|
965
|
-
return new
|
|
978
|
+
return new D().scale(e);
|
|
966
979
|
}
|
|
967
980
|
static reBound(e) {
|
|
968
|
-
return new
|
|
981
|
+
return new D().reBound(e);
|
|
969
982
|
}
|
|
970
983
|
translate(e, r) {
|
|
971
984
|
const n = v(e, r), s = this.copy();
|
|
@@ -985,22 +998,22 @@ let ct = class te {
|
|
|
985
998
|
}
|
|
986
999
|
scale(e) {
|
|
987
1000
|
const r = this.copy();
|
|
988
|
-
if (
|
|
1001
|
+
if (Nr(e)) {
|
|
989
1002
|
const n = this.currRoot;
|
|
990
|
-
return r.currRoot = e.root, n != null && !
|
|
1003
|
+
return r.currRoot = e.root, n != null && !Rt(n, e.root) && (n.x !== e.root.x && (r.x = r.x.invert()), n.y !== e.root.y && (r.y = r.y.invert())), r.x = r.x.scale(Be(e)), r.y = r.y.scale(Ue(e)), r;
|
|
991
1004
|
}
|
|
992
1005
|
return r.x = r.x.scale(e.width), r.y = r.y.scale(e.height), r;
|
|
993
1006
|
}
|
|
994
1007
|
reBound(e) {
|
|
995
1008
|
const r = this.copy();
|
|
996
|
-
return r.x = this.x.reBound(
|
|
1009
|
+
return r.x = this.x.reBound(Be(e)), r.y = this.y.reBound(Ue(e)), r;
|
|
997
1010
|
}
|
|
998
1011
|
clamp(e) {
|
|
999
1012
|
const r = this.copy();
|
|
1000
|
-
return r.x = this.x.clamp(
|
|
1013
|
+
return r.x = this.x.clamp(Be(e)), r.y = this.y.clamp(Ue(e)), r;
|
|
1001
1014
|
}
|
|
1002
1015
|
copy() {
|
|
1003
|
-
const e = new
|
|
1016
|
+
const e = new D();
|
|
1004
1017
|
return e.currRoot = this.currRoot, e.x = this.x, e.y = this.y, e;
|
|
1005
1018
|
}
|
|
1006
1019
|
reverse() {
|
|
@@ -1014,7 +1027,7 @@ let ct = class te {
|
|
|
1014
1027
|
return { x: this.x.dim(e.x), y: this.y.dim(e.y) };
|
|
1015
1028
|
}
|
|
1016
1029
|
box(e) {
|
|
1017
|
-
return
|
|
1030
|
+
return $(
|
|
1018
1031
|
this.pos(e.one),
|
|
1019
1032
|
this.pos(e.two),
|
|
1020
1033
|
0,
|
|
@@ -1028,31 +1041,31 @@ let ct = class te {
|
|
|
1028
1041
|
offset: this.pos({ x: 0, y: 0 })
|
|
1029
1042
|
};
|
|
1030
1043
|
}
|
|
1031
|
-
static IDENTITY = new
|
|
1044
|
+
static IDENTITY = new D();
|
|
1032
1045
|
};
|
|
1033
|
-
const
|
|
1046
|
+
const Po = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1034
1047
|
__proto__: null,
|
|
1035
|
-
Scale:
|
|
1036
|
-
XY:
|
|
1037
|
-
crudeXYTransform:
|
|
1038
|
-
transform:
|
|
1048
|
+
Scale: gt,
|
|
1049
|
+
XY: Ei,
|
|
1050
|
+
crudeXYTransform: vi,
|
|
1051
|
+
transform: xi
|
|
1039
1052
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
1040
|
-
let
|
|
1053
|
+
let Mr = (t, e = 21) => (r = e) => {
|
|
1041
1054
|
let n = "", s = r | 0;
|
|
1042
1055
|
for (; s--; )
|
|
1043
1056
|
n += t[Math.random() * t.length | 0];
|
|
1044
1057
|
return n;
|
|
1045
1058
|
};
|
|
1046
|
-
const
|
|
1059
|
+
const Er = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz", Ai = `0123456789${Er}`, Ar = 11, Bi = Mr(Er, 1), Ui = Mr(Ai, Ar - 1), qt = () => `${Bi()}${Ui()}`, ko = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1047
1060
|
__proto__: null,
|
|
1048
|
-
LENGTH:
|
|
1049
|
-
create:
|
|
1050
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
1061
|
+
LENGTH: Ar,
|
|
1062
|
+
create: qt
|
|
1063
|
+
}, Symbol.toStringTag, { value: "Module" })), Ci = (t, e) => (r) => r instanceof e || typeof r == "object" && r !== null && "discriminator" in r && r.discriminator === t, ji = a.enum(["static", "dynamic"]), Ri = a.union([
|
|
1051
1064
|
a.tuple([a.int()]),
|
|
1052
1065
|
a.tuple([a.int(), a.int().min(1).max(12)]),
|
|
1053
1066
|
a.tuple([a.int(), a.int().min(1).max(12), a.int().min(1).max(31)])
|
|
1054
|
-
]),
|
|
1055
|
-
const r = new
|
|
1067
|
+
]), Br = (t, e) => {
|
|
1068
|
+
const r = new w(e);
|
|
1056
1069
|
if (![
|
|
1057
1070
|
O.DAY,
|
|
1058
1071
|
O.HOUR,
|
|
@@ -1066,9 +1079,9 @@ const Sr = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz", Si = `0123456
|
|
|
1066
1079
|
"Invalid argument for remainder. Must be an even TimeSpan or Timestamp"
|
|
1067
1080
|
);
|
|
1068
1081
|
const n = t.valueOf() % r.valueOf();
|
|
1069
|
-
return t instanceof
|
|
1082
|
+
return t instanceof w ? new w(n) : new O(n);
|
|
1070
1083
|
};
|
|
1071
|
-
let
|
|
1084
|
+
let w = class f extends ee {
|
|
1072
1085
|
constructor(e, r = "UTC") {
|
|
1073
1086
|
if (e == null) super(f.now().valueOf());
|
|
1074
1087
|
else if (e instanceof Date)
|
|
@@ -1078,7 +1091,7 @@ let y = class f extends _ {
|
|
|
1078
1091
|
else if (Array.isArray(e)) super(f.parseDate(e));
|
|
1079
1092
|
else {
|
|
1080
1093
|
let n = 0n;
|
|
1081
|
-
e instanceof Number && (e = e.valueOf()), r === "local" && (n = f.utcOffset.valueOf()), typeof e == "number" && (isFinite(e) ? e = Math.trunc(e) : (isNaN(e) && (e = 0), e === 1 / 0 ? e = f.MAX : e = f.MIN)), super(BigInt(e.valueOf()) + n);
|
|
1094
|
+
e instanceof Number && (e = e.valueOf()), r === "local" && (n = f.utcOffset.valueOf()), typeof e == "number" && (isFinite(e) ? e = Math.trunc(e) : (isNaN(e) && (e = 0), e === 1 / 0 ? e = f.MAX : e = f.MIN)), A(e) && (e = e.value), super(BigInt(e.valueOf()) + n);
|
|
1082
1095
|
}
|
|
1083
1096
|
}
|
|
1084
1097
|
static parseDate([e = 1970, r = 1, n = 1]) {
|
|
@@ -1191,7 +1204,7 @@ let y = class f extends _ {
|
|
|
1191
1204
|
* valid, regardless of the TimeStamp order.
|
|
1192
1205
|
*/
|
|
1193
1206
|
range(e) {
|
|
1194
|
-
return new
|
|
1207
|
+
return new X(this, e).makeValid();
|
|
1195
1208
|
}
|
|
1196
1209
|
/**
|
|
1197
1210
|
* Creates a TimeRange starting at the TimeStamp and spanning the given
|
|
@@ -1260,7 +1273,7 @@ let y = class f extends _ {
|
|
|
1260
1273
|
* TimeSpan.
|
|
1261
1274
|
*/
|
|
1262
1275
|
add(e) {
|
|
1263
|
-
return new f(
|
|
1276
|
+
return new f(ae(this.valueOf(), new O(e).valueOf()));
|
|
1264
1277
|
}
|
|
1265
1278
|
/**
|
|
1266
1279
|
* Subtracts a TimeSpan from the TimeStamp.
|
|
@@ -1358,13 +1371,27 @@ let y = class f extends _ {
|
|
|
1358
1371
|
get hour() {
|
|
1359
1372
|
return this.date().getUTCHours();
|
|
1360
1373
|
}
|
|
1374
|
+
/**
|
|
1375
|
+
* @returns the integer hour that the timestamp corresponds to within its day in local time.
|
|
1376
|
+
*/
|
|
1377
|
+
get localHour() {
|
|
1378
|
+
return this.date().getHours();
|
|
1379
|
+
}
|
|
1380
|
+
/**
|
|
1381
|
+
* @returns a copy of the timestamp with the hour changed.
|
|
1382
|
+
* @param hour the value to set the hour to.
|
|
1383
|
+
*/
|
|
1384
|
+
setLocalHour(e) {
|
|
1385
|
+
const r = this.date();
|
|
1386
|
+
return r.setHours(e), new f(r);
|
|
1387
|
+
}
|
|
1361
1388
|
/**
|
|
1362
1389
|
* @returns a copy of the timestamp with the hour changed.
|
|
1363
1390
|
* @param hour the value to set the hour to.
|
|
1364
1391
|
*/
|
|
1365
1392
|
setHour(e) {
|
|
1366
1393
|
const r = this.date();
|
|
1367
|
-
return r.setUTCHours(e), new f(r
|
|
1394
|
+
return r.setUTCHours(e), new f(r);
|
|
1368
1395
|
}
|
|
1369
1396
|
/** @returns the integer minute that the timestamp corresponds to within its hour. */
|
|
1370
1397
|
get minute() {
|
|
@@ -1424,7 +1451,7 @@ let y = class f extends _ {
|
|
|
1424
1451
|
* @example TimeStamp.now().remainder(TimeStamp.DAY) // => TimeStamp representing the current day
|
|
1425
1452
|
*/
|
|
1426
1453
|
remainder(e) {
|
|
1427
|
-
return
|
|
1454
|
+
return Br(this, e);
|
|
1428
1455
|
}
|
|
1429
1456
|
/** @returns true if the day portion TimeStamp is today, false otherwise. */
|
|
1430
1457
|
get isToday() {
|
|
@@ -1537,7 +1564,7 @@ let y = class f extends _ {
|
|
|
1537
1564
|
a.bigint().transform((e) => new f(e)),
|
|
1538
1565
|
a.date().transform((e) => new f(e)),
|
|
1539
1566
|
a.custom((e) => e instanceof O).transform((e) => new f(e)),
|
|
1540
|
-
|
|
1567
|
+
Ri.transform((e) => new f(e))
|
|
1541
1568
|
]);
|
|
1542
1569
|
/**
|
|
1543
1570
|
* Sorts two timestamps.
|
|
@@ -1550,9 +1577,9 @@ let y = class f extends _ {
|
|
|
1550
1577
|
static sort(e, r) {
|
|
1551
1578
|
return Number(e.valueOf() - r.valueOf());
|
|
1552
1579
|
}
|
|
1553
|
-
}, O = class g extends
|
|
1580
|
+
}, O = class g extends ee {
|
|
1554
1581
|
constructor(e) {
|
|
1555
|
-
typeof e == "number" && (e = Math.trunc(e.valueOf())), super(BigInt(e.valueOf()));
|
|
1582
|
+
typeof e == "number" && (e = Math.trunc(e.valueOf())), A(e) && (e = e.value), super(BigInt(e.valueOf()));
|
|
1556
1583
|
}
|
|
1557
1584
|
/**
|
|
1558
1585
|
* Creates a TimeSpan representing the given number of seconds.
|
|
@@ -1561,7 +1588,7 @@ let y = class f extends _ {
|
|
|
1561
1588
|
* @returns A TimeSpan representing the given number of seconds.
|
|
1562
1589
|
*/
|
|
1563
1590
|
static fromSeconds(e) {
|
|
1564
|
-
return e instanceof g ? e : e instanceof E ? e.period : e instanceof
|
|
1591
|
+
return e instanceof g ? e : e instanceof E ? e.period : e instanceof w ? new g(e) : (A(e) && (e = e.value), ["number", "bigint"].includes(typeof e) ? g.seconds(e) : new g(e));
|
|
1565
1592
|
}
|
|
1566
1593
|
/**
|
|
1567
1594
|
* Creates a TimeSpan representing the given number of milliseconds.
|
|
@@ -1570,7 +1597,7 @@ let y = class f extends _ {
|
|
|
1570
1597
|
* @returns A TimeSpan representing the given number of milliseconds.
|
|
1571
1598
|
*/
|
|
1572
1599
|
static fromMilliseconds(e) {
|
|
1573
|
-
return e instanceof g ? e : e instanceof E ? e.period : e instanceof
|
|
1600
|
+
return e instanceof g ? e : e instanceof E ? e.period : e instanceof w ? new g(e) : (A(e) && (e = e.value), ["number", "bigint"].includes(typeof e) ? g.milliseconds(e) : new g(e));
|
|
1574
1601
|
}
|
|
1575
1602
|
/**
|
|
1576
1603
|
* @returns the primitive value of the TimeSpan. Overrides standard JS valueOf()
|
|
@@ -1622,7 +1649,7 @@ let y = class f extends _ {
|
|
|
1622
1649
|
* @returns A new TimeSpan representing the remainder.
|
|
1623
1650
|
*/
|
|
1624
1651
|
remainder(e) {
|
|
1625
|
-
return
|
|
1652
|
+
return Br(this, e);
|
|
1626
1653
|
}
|
|
1627
1654
|
/**
|
|
1628
1655
|
* Truncates the TimeSpan to the nearest multiple of the given span.
|
|
@@ -1641,9 +1668,9 @@ let y = class f extends _ {
|
|
|
1641
1668
|
* @returns A string representation of the TimeSpan.
|
|
1642
1669
|
*/
|
|
1643
1670
|
toString() {
|
|
1644
|
-
const e = this.truncate(g.DAY), r = this.truncate(g.HOUR), n = this.truncate(g.MINUTE), s = this.truncate(g.SECOND), i = this.truncate(g.MILLISECOND), o = this.truncate(g.MICROSECOND), c = this.truncate(g.NANOSECOND), h = e, l = r.sub(e), d = n.sub(r),
|
|
1645
|
-
let
|
|
1646
|
-
return h.isZero || (
|
|
1671
|
+
const e = this.truncate(g.DAY), r = this.truncate(g.HOUR), n = this.truncate(g.MINUTE), s = this.truncate(g.SECOND), i = this.truncate(g.MILLISECOND), o = this.truncate(g.MICROSECOND), c = this.truncate(g.NANOSECOND), h = e, l = r.sub(e), d = n.sub(r), y = s.sub(n), p = i.sub(s), L = o.sub(i), B = c.sub(o);
|
|
1672
|
+
let Z = "";
|
|
1673
|
+
return h.isZero || (Z += `${h.days}d `), l.isZero || (Z += `${l.hours}h `), d.isZero || (Z += `${d.minutes}m `), y.isZero || (Z += `${y.seconds}s `), p.isZero || (Z += `${p.milliseconds}ms `), L.isZero || (Z += `${L.microseconds}µs `), B.isZero || (Z += `${B.nanoseconds}ns`), Z.trim();
|
|
1647
1674
|
}
|
|
1648
1675
|
/**
|
|
1649
1676
|
* Multiplies the TimeSpan by a scalar value.
|
|
@@ -1652,7 +1679,7 @@ let y = class f extends _ {
|
|
|
1652
1679
|
* @returns A new TimeSpan that is this TimeSpan multiplied by the provided value.
|
|
1653
1680
|
*/
|
|
1654
1681
|
mult(e) {
|
|
1655
|
-
return new g(
|
|
1682
|
+
return new g(C(this.valueOf(), e));
|
|
1656
1683
|
}
|
|
1657
1684
|
/**
|
|
1658
1685
|
* Divides the TimeSpan by a scalar value.
|
|
@@ -1661,7 +1688,7 @@ let y = class f extends _ {
|
|
|
1661
1688
|
* @returns A new TimeSpan that is this TimeSpan divided by the provided value.
|
|
1662
1689
|
*/
|
|
1663
1690
|
div(e) {
|
|
1664
|
-
return new g(
|
|
1691
|
+
return new g(Oe(this.valueOf(), e));
|
|
1665
1692
|
}
|
|
1666
1693
|
/** @returns the decimal number of days in the TimeSpan. */
|
|
1667
1694
|
get days() {
|
|
@@ -1741,7 +1768,7 @@ let y = class f extends _ {
|
|
|
1741
1768
|
* @returns A TimeSpan representing the given number of microseconds.
|
|
1742
1769
|
*/
|
|
1743
1770
|
static microseconds(e = 1) {
|
|
1744
|
-
return g.nanoseconds(
|
|
1771
|
+
return g.nanoseconds(C(e, 1e3));
|
|
1745
1772
|
}
|
|
1746
1773
|
/** A microsecond. */
|
|
1747
1774
|
static MICROSECOND = g.microseconds(1);
|
|
@@ -1752,7 +1779,7 @@ let y = class f extends _ {
|
|
|
1752
1779
|
* @returns A TimeSpan representing the given number of milliseconds.
|
|
1753
1780
|
*/
|
|
1754
1781
|
static milliseconds(e = 1) {
|
|
1755
|
-
return g.microseconds(
|
|
1782
|
+
return g.microseconds(C(e, 1e3));
|
|
1756
1783
|
}
|
|
1757
1784
|
/** A millisecond. */
|
|
1758
1785
|
static MILLISECOND = g.milliseconds(1);
|
|
@@ -1763,7 +1790,7 @@ let y = class f extends _ {
|
|
|
1763
1790
|
* @returns A TimeSpan representing the given number of seconds.
|
|
1764
1791
|
*/
|
|
1765
1792
|
static seconds(e = 1) {
|
|
1766
|
-
return g.milliseconds(
|
|
1793
|
+
return g.milliseconds(C(e, 1e3));
|
|
1767
1794
|
}
|
|
1768
1795
|
/** A second. */
|
|
1769
1796
|
static SECOND = g.seconds(1);
|
|
@@ -1774,7 +1801,7 @@ let y = class f extends _ {
|
|
|
1774
1801
|
* @returns A TimeSpan representing the given number of minutes.
|
|
1775
1802
|
*/
|
|
1776
1803
|
static minutes(e = 1) {
|
|
1777
|
-
return g.seconds(
|
|
1804
|
+
return g.seconds(C(e, 60));
|
|
1778
1805
|
}
|
|
1779
1806
|
/** A minute. */
|
|
1780
1807
|
static MINUTE = g.minutes(1);
|
|
@@ -1785,7 +1812,7 @@ let y = class f extends _ {
|
|
|
1785
1812
|
* @returns A TimeSpan representing the given number of hours.
|
|
1786
1813
|
*/
|
|
1787
1814
|
static hours(e) {
|
|
1788
|
-
return g.minutes(
|
|
1815
|
+
return g.minutes(C(e, 60));
|
|
1789
1816
|
}
|
|
1790
1817
|
/** Represents an hour. */
|
|
1791
1818
|
static HOUR = g.hours(1);
|
|
@@ -1796,7 +1823,7 @@ let y = class f extends _ {
|
|
|
1796
1823
|
* @returns A TimeSpan representing the given number of days.
|
|
1797
1824
|
*/
|
|
1798
1825
|
static days(e) {
|
|
1799
|
-
return g.hours(
|
|
1826
|
+
return g.hours(C(e, 24));
|
|
1800
1827
|
}
|
|
1801
1828
|
/** Represents a day. */
|
|
1802
1829
|
static DAY = g.days(1);
|
|
@@ -1813,13 +1840,13 @@ let y = class f extends _ {
|
|
|
1813
1840
|
a.number().transform((e) => new g(e)),
|
|
1814
1841
|
a.bigint().transform((e) => new g(e)),
|
|
1815
1842
|
a.instanceof(g),
|
|
1816
|
-
a.instanceof(
|
|
1843
|
+
a.instanceof(w).transform((e) => new g(e)),
|
|
1817
1844
|
a.custom((e) => e instanceof E).transform((e) => new g(e))
|
|
1818
1845
|
]);
|
|
1819
1846
|
};
|
|
1820
|
-
class E extends
|
|
1847
|
+
class E extends ee {
|
|
1821
1848
|
constructor(e) {
|
|
1822
|
-
super(e.valueOf());
|
|
1849
|
+
A(e) && (e = e.value), super(e.valueOf());
|
|
1823
1850
|
}
|
|
1824
1851
|
/** @returns a pretty string representation of the rate in the format "X Hz". */
|
|
1825
1852
|
toString() {
|
|
@@ -1873,7 +1900,7 @@ class E extends _ {
|
|
|
1873
1900
|
* @returns A TimeSpan that corresponds to the given number of bytes.
|
|
1874
1901
|
*/
|
|
1875
1902
|
byteSpan(e, r) {
|
|
1876
|
-
return this.span(e.valueOf() / r.valueOf());
|
|
1903
|
+
return this.span(e.valueOf() / new I(r).valueOf());
|
|
1877
1904
|
}
|
|
1878
1905
|
/**
|
|
1879
1906
|
* Adds another Rate to this Rate.
|
|
@@ -1882,7 +1909,7 @@ class E extends _ {
|
|
|
1882
1909
|
* @returns A new Rate representing the sum of the two rates.
|
|
1883
1910
|
*/
|
|
1884
1911
|
add(e) {
|
|
1885
|
-
return new E(
|
|
1912
|
+
return new E(ae(this.valueOf(), new E(e).valueOf()));
|
|
1886
1913
|
}
|
|
1887
1914
|
/**
|
|
1888
1915
|
* Subtracts another Rate from this Rate.
|
|
@@ -1891,7 +1918,7 @@ class E extends _ {
|
|
|
1891
1918
|
* @returns A new Rate representing the difference of the two rates.
|
|
1892
1919
|
*/
|
|
1893
1920
|
sub(e) {
|
|
1894
|
-
return new E(q(this.valueOf(), e.valueOf()));
|
|
1921
|
+
return new E(q(this.valueOf(), new E(e).valueOf()));
|
|
1895
1922
|
}
|
|
1896
1923
|
/**
|
|
1897
1924
|
* Multiplies this Rate by a scalar value.
|
|
@@ -1900,7 +1927,7 @@ class E extends _ {
|
|
|
1900
1927
|
* @returns A new Rate representing this Rate multiplied by the value.
|
|
1901
1928
|
*/
|
|
1902
1929
|
mult(e) {
|
|
1903
|
-
return new E(
|
|
1930
|
+
return new E(C(this.valueOf(), e));
|
|
1904
1931
|
}
|
|
1905
1932
|
/**
|
|
1906
1933
|
* Divides this Rate by a scalar value.
|
|
@@ -1909,7 +1936,7 @@ class E extends _ {
|
|
|
1909
1936
|
* @returns A new Rate representing this Rate divided by the value.
|
|
1910
1937
|
*/
|
|
1911
1938
|
div(e) {
|
|
1912
|
-
return new E(
|
|
1939
|
+
return new E(Oe(this.valueOf(), e));
|
|
1913
1940
|
}
|
|
1914
1941
|
/**
|
|
1915
1942
|
* Creates a Rate representing the given number of Hz.
|
|
@@ -1935,7 +1962,7 @@ class E extends _ {
|
|
|
1935
1962
|
a.instanceof(E)
|
|
1936
1963
|
]);
|
|
1937
1964
|
}
|
|
1938
|
-
let I = class M extends
|
|
1965
|
+
let I = class M extends ee {
|
|
1939
1966
|
/**
|
|
1940
1967
|
* Creates a Density representing the given number of bytes per value.
|
|
1941
1968
|
*
|
|
@@ -1944,7 +1971,7 @@ let I = class M extends _ {
|
|
|
1944
1971
|
* @returns A Density representing the given number of bytes per value.
|
|
1945
1972
|
*/
|
|
1946
1973
|
constructor(e) {
|
|
1947
|
-
super(e.valueOf());
|
|
1974
|
+
A(e) && (e = e.value), super(e.valueOf());
|
|
1948
1975
|
}
|
|
1949
1976
|
/**
|
|
1950
1977
|
* Calculates the number of values in the given Size.
|
|
@@ -1962,7 +1989,7 @@ let I = class M extends _ {
|
|
|
1962
1989
|
* @returns A Size representing the given number of values.
|
|
1963
1990
|
*/
|
|
1964
1991
|
size(e) {
|
|
1965
|
-
return new
|
|
1992
|
+
return new Pe(e * this.valueOf());
|
|
1966
1993
|
}
|
|
1967
1994
|
/**
|
|
1968
1995
|
* Adds another Density to this Density.
|
|
@@ -1971,7 +1998,7 @@ let I = class M extends _ {
|
|
|
1971
1998
|
* @returns A new Density representing the sum of the two densities.
|
|
1972
1999
|
*/
|
|
1973
2000
|
add(e) {
|
|
1974
|
-
return new M(
|
|
2001
|
+
return new M(ae(this.valueOf(), new M(e).valueOf()));
|
|
1975
2002
|
}
|
|
1976
2003
|
/**
|
|
1977
2004
|
* Subtracts another Density from this Density.
|
|
@@ -1980,7 +2007,7 @@ let I = class M extends _ {
|
|
|
1980
2007
|
* @returns A new Density representing the difference of the two densities.
|
|
1981
2008
|
*/
|
|
1982
2009
|
sub(e) {
|
|
1983
|
-
return new M(q(this.valueOf(), e.valueOf()));
|
|
2010
|
+
return new M(q(this.valueOf(), new M(e).valueOf()));
|
|
1984
2011
|
}
|
|
1985
2012
|
/**
|
|
1986
2013
|
* Multiplies this Density by a scalar value.
|
|
@@ -1989,7 +2016,7 @@ let I = class M extends _ {
|
|
|
1989
2016
|
* @returns A new Density representing this Density multiplied by the value.
|
|
1990
2017
|
*/
|
|
1991
2018
|
mult(e) {
|
|
1992
|
-
return new M(
|
|
2019
|
+
return new M(C(this.valueOf(), e));
|
|
1993
2020
|
}
|
|
1994
2021
|
/**
|
|
1995
2022
|
* Divides this Density by a scalar value.
|
|
@@ -1998,7 +2025,7 @@ let I = class M extends _ {
|
|
|
1998
2025
|
* @returns A new Density representing this Density divided by the value.
|
|
1999
2026
|
*/
|
|
2000
2027
|
div(e) {
|
|
2001
|
-
return new M(
|
|
2028
|
+
return new M(Oe(this.valueOf(), e));
|
|
2002
2029
|
}
|
|
2003
2030
|
/** Unknown/Invalid Density. */
|
|
2004
2031
|
static UNKNOWN = new M(0);
|
|
@@ -2017,7 +2044,7 @@ let I = class M extends _ {
|
|
|
2017
2044
|
a.number().transform((e) => new M(e)),
|
|
2018
2045
|
a.instanceof(M)
|
|
2019
2046
|
]);
|
|
2020
|
-
},
|
|
2047
|
+
}, X = class U {
|
|
2021
2048
|
/**
|
|
2022
2049
|
* The starting TimeStamp of the TimeRange.
|
|
2023
2050
|
*
|
|
@@ -2043,7 +2070,7 @@ let I = class M extends _ {
|
|
|
2043
2070
|
* @param end - A TimeStamp representing the end of the range.
|
|
2044
2071
|
*/
|
|
2045
2072
|
constructor(e, r) {
|
|
2046
|
-
typeof e == "object" && "start" in e ? (this.start = new
|
|
2073
|
+
typeof e == "object" && "start" in e ? (this.start = new w(e.start), this.end = new w(e.end)) : (this.start = new w(e), this.end = new w(r));
|
|
2047
2074
|
}
|
|
2048
2075
|
/** @returns The TimeSpan occupied by the TimeRange. */
|
|
2049
2076
|
get span() {
|
|
@@ -2085,7 +2112,7 @@ let I = class M extends _ {
|
|
|
2085
2112
|
* @returns A TimeRange with the start and end swapped.
|
|
2086
2113
|
*/
|
|
2087
2114
|
swap() {
|
|
2088
|
-
return new
|
|
2115
|
+
return new U(this.end, this.start);
|
|
2089
2116
|
}
|
|
2090
2117
|
get numericBounds() {
|
|
2091
2118
|
return {
|
|
@@ -2137,11 +2164,11 @@ let I = class M extends _ {
|
|
|
2137
2164
|
const n = this.makeValid();
|
|
2138
2165
|
if (this.equals(e)) return !0;
|
|
2139
2166
|
if (e.end.equals(n.start) || n.end.equals(e.start)) return !1;
|
|
2140
|
-
const s =
|
|
2167
|
+
const s = w.max(n.start, e.start), i = w.min(n.end, e.end);
|
|
2141
2168
|
return i.before(s) ? !1 : new O(i.sub(s)).greaterThanOrEqual(r);
|
|
2142
2169
|
}
|
|
2143
2170
|
contains(e) {
|
|
2144
|
-
return e instanceof
|
|
2171
|
+
return e instanceof U ? this.contains(e.start) && this.contains(e.end) : this.start.beforeEq(e) && this.end.after(e);
|
|
2145
2172
|
}
|
|
2146
2173
|
/**
|
|
2147
2174
|
* Returns a new TimeRange that is bound by the given TimeRange.
|
|
@@ -2155,25 +2182,25 @@ let I = class M extends _ {
|
|
|
2155
2182
|
* console.log(bounded); // TimeRange(1500, 2000)
|
|
2156
2183
|
*/
|
|
2157
2184
|
boundBy(e) {
|
|
2158
|
-
const r = new
|
|
2185
|
+
const r = new U(this.start, this.end);
|
|
2159
2186
|
return e.start.after(this.start) && (r.start = e.start), e.start.after(this.end) && (r.end = e.start), e.end.before(this.end) && (r.end = e.end), e.end.before(this.start) && (r.start = e.end), r;
|
|
2160
2187
|
}
|
|
2161
2188
|
static max(...e) {
|
|
2162
|
-
return new
|
|
2163
|
-
|
|
2164
|
-
|
|
2189
|
+
return new U(
|
|
2190
|
+
w.min(...e.map((r) => r.start)),
|
|
2191
|
+
w.max(...e.map((r) => r.end))
|
|
2165
2192
|
);
|
|
2166
2193
|
}
|
|
2167
2194
|
/** The maximum possible time range. */
|
|
2168
|
-
static MAX = new
|
|
2195
|
+
static MAX = new U(w.MIN, w.MAX);
|
|
2169
2196
|
/** The minimum possible time range. */
|
|
2170
|
-
static MIN = new
|
|
2197
|
+
static MIN = new U(w.MAX, w.MIN);
|
|
2171
2198
|
/** A time range whose start and end are both zero. */
|
|
2172
|
-
static ZERO = new
|
|
2199
|
+
static ZERO = new U(w.ZERO, w.ZERO);
|
|
2173
2200
|
/** A zod schema for validating and transforming time ranges */
|
|
2174
2201
|
static z = a.union([
|
|
2175
|
-
a.object({ start:
|
|
2176
|
-
a.instanceof(
|
|
2202
|
+
a.object({ start: w.z, end: w.z }).transform((e) => new U(e.start, e.end)),
|
|
2203
|
+
a.instanceof(U)
|
|
2177
2204
|
]);
|
|
2178
2205
|
/**
|
|
2179
2206
|
* Sorts two time ranges. The range with the earlier start time is considered less than
|
|
@@ -2187,7 +2214,7 @@ let I = class M extends _ {
|
|
|
2187
2214
|
* equal.
|
|
2188
2215
|
*/
|
|
2189
2216
|
static sort(e, r) {
|
|
2190
|
-
return
|
|
2217
|
+
return w.sort(e.start, r.start) || w.sort(e.end, r.end);
|
|
2191
2218
|
}
|
|
2192
2219
|
/**
|
|
2193
2220
|
* Simplify takes the list of `TimeRange`s, makes all of them valid, sorts them, and
|
|
@@ -2197,17 +2224,17 @@ let I = class M extends _ {
|
|
|
2197
2224
|
* @returns A list of simplified `TimeRange`s.
|
|
2198
2225
|
*/
|
|
2199
2226
|
static simplify(e) {
|
|
2200
|
-
return e.map((r) => r.makeValid()).sort((r, n) =>
|
|
2227
|
+
return e.map((r) => r.makeValid()).sort((r, n) => U.sort(r, n)).reduce((r, n) => {
|
|
2201
2228
|
if (n.isZero) return r;
|
|
2202
2229
|
if (r.length === 0)
|
|
2203
2230
|
return r.push(n), r;
|
|
2204
2231
|
const s = r[r.length - 1];
|
|
2205
|
-
return s.overlapsWith(n) || s.end.equals(n.start) ? s.end =
|
|
2232
|
+
return s.overlapsWith(n) || s.end.equals(n.start) ? s.end = w.max(s.end, n.end) : r.push(n), r;
|
|
2206
2233
|
}, []);
|
|
2207
2234
|
}
|
|
2208
|
-
},
|
|
2235
|
+
}, T = class u extends ee {
|
|
2209
2236
|
constructor(e) {
|
|
2210
|
-
if (e instanceof u || typeof e == "string" || typeof e.valueOf() == "string")
|
|
2237
|
+
if (A(e) && (e = e.value), e instanceof u || typeof e == "string" || typeof e.valueOf() == "string")
|
|
2211
2238
|
super(e.valueOf());
|
|
2212
2239
|
else {
|
|
2213
2240
|
const r = u.ARRAY_CONSTRUCTOR_DATA_TYPES.get(e.constructor.name);
|
|
@@ -2423,25 +2450,25 @@ let I = class M extends _ {
|
|
|
2423
2450
|
a.string().transform((e) => new u(e)),
|
|
2424
2451
|
a.instanceof(u)
|
|
2425
2452
|
]);
|
|
2426
|
-
},
|
|
2453
|
+
}, Pe = class m extends ee {
|
|
2427
2454
|
constructor(e) {
|
|
2428
|
-
super(e.valueOf());
|
|
2455
|
+
A(e) && (e = e.value), super(e.valueOf());
|
|
2429
2456
|
}
|
|
2430
2457
|
/** @returns true if the Size is larger than the other size. */
|
|
2431
2458
|
largerThan(e) {
|
|
2432
|
-
return this.valueOf() > e.valueOf();
|
|
2459
|
+
return A(e) && (e = e.value), this.valueOf() > e.valueOf();
|
|
2433
2460
|
}
|
|
2434
2461
|
/** @returns true if the Size is smaller than the other size. */
|
|
2435
2462
|
smallerThan(e) {
|
|
2436
|
-
return this.valueOf() < e.valueOf();
|
|
2463
|
+
return A(e) && (e = e.value), this.valueOf() < e.valueOf();
|
|
2437
2464
|
}
|
|
2438
2465
|
/** @returns a new Size representing the sum of the two Sizes. */
|
|
2439
2466
|
add(e) {
|
|
2440
|
-
return new
|
|
2467
|
+
return A(e) && (e = e.value), new m(ae(this.valueOf(), e.valueOf()));
|
|
2441
2468
|
}
|
|
2442
2469
|
/** @returns a new Size representing the difference of the two Sizes. */
|
|
2443
2470
|
sub(e) {
|
|
2444
|
-
return new
|
|
2471
|
+
return A(e) && (e = e.value), new m(q(this.valueOf(), e.valueOf()));
|
|
2445
2472
|
}
|
|
2446
2473
|
/**
|
|
2447
2474
|
* Multiplies this Size by a scalar value.
|
|
@@ -2450,7 +2477,7 @@ let I = class M extends _ {
|
|
|
2450
2477
|
* @returns A new Size representing this Size multiplied by the value.
|
|
2451
2478
|
*/
|
|
2452
2479
|
mult(e) {
|
|
2453
|
-
return new
|
|
2480
|
+
return new m(C(this.valueOf(), e));
|
|
2454
2481
|
}
|
|
2455
2482
|
/**
|
|
2456
2483
|
* Divides this Size by a scalar value.
|
|
@@ -2459,37 +2486,39 @@ let I = class M extends _ {
|
|
|
2459
2486
|
* @returns A new Size representing this Size divided by the value.
|
|
2460
2487
|
*/
|
|
2461
2488
|
div(e) {
|
|
2462
|
-
return new
|
|
2489
|
+
return new m(Oe(this.valueOf(), e));
|
|
2463
2490
|
}
|
|
2464
2491
|
/** @returns a new Size representing the truncated value of the Size. */
|
|
2465
2492
|
truncate(e) {
|
|
2466
|
-
return new
|
|
2493
|
+
return new m(
|
|
2494
|
+
Math.trunc(this.valueOf() / new m(e).valueOf()) * new m(e).valueOf()
|
|
2495
|
+
);
|
|
2467
2496
|
}
|
|
2468
2497
|
/** @returns a new Size representing the remainder of the Size. */
|
|
2469
2498
|
remainder(e) {
|
|
2470
|
-
return
|
|
2499
|
+
return m.bytes(this.valueOf() % new m(e).valueOf());
|
|
2471
2500
|
}
|
|
2472
2501
|
/** @returns the number of gigabytes in the Size. */
|
|
2473
2502
|
get gigabytes() {
|
|
2474
|
-
return this.valueOf() /
|
|
2503
|
+
return this.valueOf() / m.GIGABYTE.valueOf();
|
|
2475
2504
|
}
|
|
2476
2505
|
/** @returns the number of megabytes in the Size. */
|
|
2477
2506
|
get megabytes() {
|
|
2478
|
-
return this.valueOf() /
|
|
2507
|
+
return this.valueOf() / m.MEGABYTE.valueOf();
|
|
2479
2508
|
}
|
|
2480
2509
|
/** @returns the number of kilobytes in the Size. */
|
|
2481
2510
|
get kilobytes() {
|
|
2482
|
-
return this.valueOf() /
|
|
2511
|
+
return this.valueOf() / m.KILOBYTE.valueOf();
|
|
2483
2512
|
}
|
|
2484
2513
|
/** @returns the number of terabytes in the Size. */
|
|
2485
2514
|
get terabytes() {
|
|
2486
|
-
return this.valueOf() /
|
|
2515
|
+
return this.valueOf() / m.TERABYTE.valueOf();
|
|
2487
2516
|
}
|
|
2488
2517
|
/** @returns a nicely formatted string representation of the Size. */
|
|
2489
2518
|
toString() {
|
|
2490
|
-
const e = this.truncate(
|
|
2491
|
-
let
|
|
2492
|
-
return o.isZero || (
|
|
2519
|
+
const e = this.truncate(m.TERABYTE), r = this.truncate(m.GIGABYTE), n = this.truncate(m.MEGABYTE), s = this.truncate(m.KILOBYTE), i = this.truncate(m.BYTE), o = e, c = r.sub(e), h = n.sub(r), l = s.sub(n), d = i.sub(s);
|
|
2520
|
+
let y = "";
|
|
2521
|
+
return o.isZero || (y += `${o.terabytes}TB `), c.isZero || (y += `${c.gigabytes}GB `), h.isZero || (y += `${h.megabytes}MB `), l.isZero || (y += `${l.kilobytes}KB `), (!d.isZero || y === "") && (y += `${d.valueOf()}B`), y.trim();
|
|
2493
2522
|
}
|
|
2494
2523
|
/**
|
|
2495
2524
|
* Creates a Size from the given number of bytes.
|
|
@@ -2498,10 +2527,10 @@ let I = class M extends _ {
|
|
|
2498
2527
|
* @returns A Size representing the given number of bytes.
|
|
2499
2528
|
*/
|
|
2500
2529
|
static bytes(e = 1) {
|
|
2501
|
-
return new
|
|
2530
|
+
return new m(e);
|
|
2502
2531
|
}
|
|
2503
2532
|
/** A single byte */
|
|
2504
|
-
static BYTE = new
|
|
2533
|
+
static BYTE = new m(1);
|
|
2505
2534
|
/**
|
|
2506
2535
|
* Creates a Size from the given number if kilobytes.
|
|
2507
2536
|
*
|
|
@@ -2509,10 +2538,10 @@ let I = class M extends _ {
|
|
|
2509
2538
|
* @returns A Size representing the given number of kilobytes.
|
|
2510
2539
|
*/
|
|
2511
2540
|
static kilobytes(e = 1) {
|
|
2512
|
-
return
|
|
2541
|
+
return m.bytes(new m(e).valueOf() * 1e3);
|
|
2513
2542
|
}
|
|
2514
2543
|
/** A kilobyte */
|
|
2515
|
-
static KILOBYTE =
|
|
2544
|
+
static KILOBYTE = m.kilobytes(1);
|
|
2516
2545
|
/**
|
|
2517
2546
|
* Creates a Size from the given number of megabytes.
|
|
2518
2547
|
*
|
|
@@ -2520,10 +2549,10 @@ let I = class M extends _ {
|
|
|
2520
2549
|
* @returns A Size representing the given number of megabytes.
|
|
2521
2550
|
*/
|
|
2522
2551
|
static megabytes(e = 1) {
|
|
2523
|
-
return
|
|
2552
|
+
return m.kilobytes(new m(e).valueOf() * 1e3);
|
|
2524
2553
|
}
|
|
2525
2554
|
/** A megabyte */
|
|
2526
|
-
static MEGABYTE =
|
|
2555
|
+
static MEGABYTE = m.megabytes(1);
|
|
2527
2556
|
/**
|
|
2528
2557
|
* Creates a Size from the given number of gigabytes.
|
|
2529
2558
|
*
|
|
@@ -2531,10 +2560,10 @@ let I = class M extends _ {
|
|
|
2531
2560
|
* @returns A Size representing the given number of gigabytes.
|
|
2532
2561
|
*/
|
|
2533
2562
|
static gigabytes(e = 1) {
|
|
2534
|
-
return
|
|
2563
|
+
return m.megabytes(new m(e).valueOf() * 1e3);
|
|
2535
2564
|
}
|
|
2536
2565
|
/** A gigabyte */
|
|
2537
|
-
static GIGABYTE =
|
|
2566
|
+
static GIGABYTE = m.gigabytes(1);
|
|
2538
2567
|
/**
|
|
2539
2568
|
* Creates a Size from the given number of terabytes.
|
|
2540
2569
|
*
|
|
@@ -2542,23 +2571,23 @@ let I = class M extends _ {
|
|
|
2542
2571
|
* @returns A Size representing the given number of terabytes.
|
|
2543
2572
|
*/
|
|
2544
2573
|
static terabytes(e) {
|
|
2545
|
-
return
|
|
2574
|
+
return m.gigabytes(new m(e).valueOf() * 1e3);
|
|
2546
2575
|
}
|
|
2547
2576
|
/** A terabyte. */
|
|
2548
|
-
static TERABYTE =
|
|
2577
|
+
static TERABYTE = m.terabytes(1);
|
|
2549
2578
|
/** The zero value for Size */
|
|
2550
|
-
static ZERO = new
|
|
2579
|
+
static ZERO = new m(0);
|
|
2551
2580
|
/** A zod schema for a Size. */
|
|
2552
2581
|
static z = a.union([
|
|
2553
|
-
a.number().transform((e) => new
|
|
2554
|
-
a.instanceof(
|
|
2582
|
+
a.number().transform((e) => new m(e)),
|
|
2583
|
+
a.instanceof(m)
|
|
2555
2584
|
]);
|
|
2556
2585
|
/** @returns true if the Size is zero. */
|
|
2557
2586
|
get isZero() {
|
|
2558
2587
|
return this.valueOf() === 0;
|
|
2559
2588
|
}
|
|
2560
2589
|
};
|
|
2561
|
-
const
|
|
2590
|
+
const qo = a.union([
|
|
2562
2591
|
a.instanceof(Uint8Array),
|
|
2563
2592
|
a.instanceof(Uint16Array),
|
|
2564
2593
|
a.instanceof(Uint32Array),
|
|
@@ -2569,40 +2598,40 @@ const jo = a.union([
|
|
|
2569
2598
|
a.instanceof(Int16Array),
|
|
2570
2599
|
a.instanceof(Int32Array),
|
|
2571
2600
|
a.instanceof(BigInt64Array)
|
|
2572
|
-
]),
|
|
2601
|
+
]), Ur = (t) => {
|
|
2573
2602
|
const e = typeof t;
|
|
2574
|
-
return e === "string" || e === "number" || e === "boolean" || e === "bigint" || t instanceof
|
|
2575
|
-
},
|
|
2576
|
-
function
|
|
2577
|
-
return typeof t == "string" &&
|
|
2603
|
+
return e === "string" || e === "number" || e === "boolean" || e === "bigint" || t instanceof w || t instanceof O || t instanceof Date;
|
|
2604
|
+
}, Li = (t, e, r, n = 0) => t.usesBigInt && !e.usesBigInt ? Number(r) - Number(n) : !t.usesBigInt && e.usesBigInt ? BigInt(r.valueOf()) - BigInt(n.valueOf()) : Ce(r, -n), Ce = (t, e) => e == 0 ? t : t == 0 ? e : typeof t == "bigint" && typeof e == "bigint" || typeof t == "number" && typeof e == "number" ? t + e : Number(t) + Number(e), Di = /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/i;
|
|
2605
|
+
function Pi(t) {
|
|
2606
|
+
return typeof t == "string" && Di.test(t);
|
|
2578
2607
|
}
|
|
2579
2608
|
const N = [];
|
|
2580
2609
|
for (let t = 0; t < 256; ++t)
|
|
2581
2610
|
N.push((t + 256).toString(16).slice(1));
|
|
2582
|
-
function
|
|
2611
|
+
function ki(t, e = 0) {
|
|
2583
2612
|
return (N[t[e + 0]] + N[t[e + 1]] + N[t[e + 2]] + N[t[e + 3]] + "-" + N[t[e + 4]] + N[t[e + 5]] + "-" + N[t[e + 6]] + N[t[e + 7]] + "-" + N[t[e + 8]] + N[t[e + 9]] + "-" + N[t[e + 10]] + N[t[e + 11]] + N[t[e + 12]] + N[t[e + 13]] + N[t[e + 14]] + N[t[e + 15]]).toLowerCase();
|
|
2584
2613
|
}
|
|
2585
|
-
function
|
|
2586
|
-
const r =
|
|
2587
|
-
if (!
|
|
2614
|
+
function qi(t, e = 0) {
|
|
2615
|
+
const r = ki(t, e);
|
|
2616
|
+
if (!Pi(r))
|
|
2588
2617
|
throw TypeError("Stringified UUID is invalid");
|
|
2589
2618
|
return r;
|
|
2590
2619
|
}
|
|
2591
2620
|
typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto);
|
|
2592
|
-
const
|
|
2593
|
-
[Symbol.iterator]: () =>
|
|
2621
|
+
const Cr = (t, e) => qi(t, e), Y = -1, pt = {
|
|
2622
|
+
[Symbol.iterator]: () => pt,
|
|
2594
2623
|
next: () => ({ done: !0, value: void 0 })
|
|
2595
|
-
},
|
|
2624
|
+
}, zi = a.string().transform(
|
|
2596
2625
|
(t) => new Uint8Array(
|
|
2597
2626
|
atob(t).split("").map((e) => e.charCodeAt(0))
|
|
2598
2627
|
).buffer
|
|
2599
|
-
),
|
|
2628
|
+
), Zi = a.union([a.null(), a.undefined()]).transform(() => new Uint8Array().buffer), mt = 10, jr = (t, e) => {
|
|
2600
2629
|
if (t === "number" && !e.isNumeric)
|
|
2601
2630
|
throw new Error(`cannot convert series of type ${e.toString()} to number`);
|
|
2602
2631
|
if (t === "bigint" && !e.usesBigInt)
|
|
2603
2632
|
throw new Error(`cannot convert series of type ${e.toString()} to bigint`);
|
|
2604
|
-
},
|
|
2605
|
-
let
|
|
2633
|
+
}, Rr = "sy_x_telem_series";
|
|
2634
|
+
let Lr = class F {
|
|
2606
2635
|
/**
|
|
2607
2636
|
* A unique identifier for the series. If specified by the user, it is their
|
|
2608
2637
|
* responsibility to ensure that it is unique. If not specified, a new ID will be
|
|
@@ -2613,7 +2642,7 @@ let Ur = class F {
|
|
|
2613
2642
|
* A discriminator used for identifying instances of the series class even
|
|
2614
2643
|
* when bundlers mangle the class name.
|
|
2615
2644
|
*/
|
|
2616
|
-
discriminator =
|
|
2645
|
+
discriminator = Rr;
|
|
2617
2646
|
/** The data type of the series. */
|
|
2618
2647
|
dataType;
|
|
2619
2648
|
/**
|
|
@@ -2629,7 +2658,7 @@ let Ur = class F {
|
|
|
2629
2658
|
/** The underlying data. */
|
|
2630
2659
|
_data;
|
|
2631
2660
|
/** The time range occupied by the series' data. */
|
|
2632
|
-
timeRange =
|
|
2661
|
+
timeRange = X.ZERO;
|
|
2633
2662
|
/**
|
|
2634
2663
|
* Alignment defines the location of the series relative to other series in a logical
|
|
2635
2664
|
* group. Useful for defining the position of the series within a channel's data.
|
|
@@ -2646,7 +2675,7 @@ let Ur = class F {
|
|
|
2646
2675
|
/** A cached maximum value. */
|
|
2647
2676
|
cachedMax;
|
|
2648
2677
|
/** The write position of the buffer. */
|
|
2649
|
-
writePos =
|
|
2678
|
+
writePos = Y;
|
|
2650
2679
|
/** Tracks the number of entities currently using this array. */
|
|
2651
2680
|
_refCount = 0;
|
|
2652
2681
|
/** Caches the length of the array for variable length data types. */
|
|
@@ -2658,16 +2687,16 @@ let Ur = class F {
|
|
|
2658
2687
|
* can be constructed into a series.
|
|
2659
2688
|
*/
|
|
2660
2689
|
static crudeZ = a.object({
|
|
2661
|
-
timeRange:
|
|
2662
|
-
dataType:
|
|
2690
|
+
timeRange: X.z.optional(),
|
|
2691
|
+
dataType: T.z,
|
|
2663
2692
|
alignment: a.coerce.bigint().optional(),
|
|
2664
2693
|
data: a.union([
|
|
2665
|
-
|
|
2666
|
-
|
|
2694
|
+
zi,
|
|
2695
|
+
Zi,
|
|
2667
2696
|
a.instanceof(ArrayBuffer),
|
|
2668
2697
|
a.instanceof(Uint8Array)
|
|
2669
2698
|
]),
|
|
2670
|
-
glBufferUsage:
|
|
2699
|
+
glBufferUsage: ji.optional().default("static").optional()
|
|
2671
2700
|
});
|
|
2672
2701
|
/**
|
|
2673
2702
|
* A zod schema that validates and constructs a series from it's crude
|
|
@@ -2748,7 +2777,7 @@ let Ur = class F {
|
|
|
2748
2777
|
* @throws Error if data type cannot be inferred from input
|
|
2749
2778
|
*/
|
|
2750
2779
|
constructor(e) {
|
|
2751
|
-
|
|
2780
|
+
Yi(e) && (e = { data: e }), e.data ??= [];
|
|
2752
2781
|
const {
|
|
2753
2782
|
dataType: r,
|
|
2754
2783
|
timeRange: n,
|
|
@@ -2756,22 +2785,22 @@ let Ur = class F {
|
|
|
2756
2785
|
glBufferUsage: i = "static",
|
|
2757
2786
|
alignment: o = 0n,
|
|
2758
2787
|
alignmentMultiple: c = 1n,
|
|
2759
|
-
key: h =
|
|
2788
|
+
key: h = qt(),
|
|
2760
2789
|
data: l
|
|
2761
2790
|
} = e;
|
|
2762
|
-
if (
|
|
2791
|
+
if (Dr(l)) {
|
|
2763
2792
|
const p = l;
|
|
2764
2793
|
this.key = p.key, this.dataType = p.dataType, this.sampleOffset = p.sampleOffset, this.gl = p.gl, this._data = p._data, this.timeRange = p.timeRange, this.alignment = p.alignment, this.alignmentMultiple = p.alignmentMultiple, this.cachedMin = p.cachedMin, this.cachedMax = p.cachedMax, this.writePos = p.writePos, this._refCount = p._refCount, this.cachedLength = p.cachedLength;
|
|
2765
2794
|
return;
|
|
2766
2795
|
}
|
|
2767
|
-
const d =
|
|
2768
|
-
if (r != null) this.dataType = new
|
|
2796
|
+
const d = Ur(l), y = Array.isArray(l);
|
|
2797
|
+
if (r != null) this.dataType = new T(r);
|
|
2769
2798
|
else {
|
|
2770
2799
|
if (l instanceof ArrayBuffer)
|
|
2771
2800
|
throw new Error(
|
|
2772
2801
|
"cannot infer data type from an ArrayBuffer instance when constructing a Series. Please provide a data type."
|
|
2773
2802
|
);
|
|
2774
|
-
if (
|
|
2803
|
+
if (y || d) {
|
|
2775
2804
|
let p = l;
|
|
2776
2805
|
if (!d) {
|
|
2777
2806
|
if (l.length === 0)
|
|
@@ -2780,38 +2809,38 @@ let Ur = class F {
|
|
|
2780
2809
|
);
|
|
2781
2810
|
p = l[0];
|
|
2782
2811
|
}
|
|
2783
|
-
if (typeof p == "string") this.dataType =
|
|
2784
|
-
else if (typeof p == "number") this.dataType =
|
|
2785
|
-
else if (typeof p == "bigint") this.dataType =
|
|
2786
|
-
else if (typeof p == "boolean") this.dataType =
|
|
2787
|
-
else if (p instanceof
|
|
2788
|
-
this.dataType =
|
|
2789
|
-
else if (typeof p == "object") this.dataType =
|
|
2812
|
+
if (typeof p == "string") this.dataType = T.STRING;
|
|
2813
|
+
else if (typeof p == "number") this.dataType = T.FLOAT64;
|
|
2814
|
+
else if (typeof p == "bigint") this.dataType = T.INT64;
|
|
2815
|
+
else if (typeof p == "boolean") this.dataType = T.BOOLEAN;
|
|
2816
|
+
else if (p instanceof w || p instanceof Date || p instanceof w)
|
|
2817
|
+
this.dataType = T.TIMESTAMP;
|
|
2818
|
+
else if (typeof p == "object") this.dataType = T.JSON;
|
|
2790
2819
|
else
|
|
2791
2820
|
throw new Error(
|
|
2792
2821
|
`cannot infer data type of ${typeof p} when constructing a Series from a JS array`
|
|
2793
2822
|
);
|
|
2794
|
-
} else this.dataType = new
|
|
2823
|
+
} else this.dataType = new T(l);
|
|
2795
2824
|
}
|
|
2796
|
-
if (!
|
|
2797
|
-
else if (
|
|
2825
|
+
if (!y && !d) this._data = l;
|
|
2826
|
+
else if (y && l.length === 0)
|
|
2798
2827
|
this._data = new this.dataType.Array([]).buffer;
|
|
2799
2828
|
else {
|
|
2800
2829
|
let p = d ? [l] : l;
|
|
2801
|
-
const
|
|
2802
|
-
(
|
|
2830
|
+
const L = p[0];
|
|
2831
|
+
(L instanceof w || L instanceof Date || L instanceof O) && (p = p.map((B) => new w(B).valueOf())), this.dataType.equals(T.STRING) ? (this.cachedLength = p.length, this._data = new TextEncoder().encode(`${p.join(`
|
|
2803
2832
|
`)}
|
|
2804
|
-
`).buffer) : this.dataType.equals(
|
|
2805
|
-
`${p.map((
|
|
2833
|
+
`).buffer) : this.dataType.equals(T.JSON) ? (this.cachedLength = p.length, this._data = new TextEncoder().encode(
|
|
2834
|
+
`${p.map((B) => st.encodeString(B)).join(`
|
|
2806
2835
|
`)}
|
|
2807
2836
|
`
|
|
2808
|
-
).buffer) : this.dataType.usesBigInt && typeof
|
|
2809
|
-
p.map((
|
|
2810
|
-
).buffer : !this.dataType.usesBigInt && typeof
|
|
2837
|
+
).buffer) : this.dataType.usesBigInt && typeof L == "number" ? this._data = new this.dataType.Array(
|
|
2838
|
+
p.map((B) => BigInt(Math.round(B)))
|
|
2839
|
+
).buffer : !this.dataType.usesBigInt && typeof L == "bigint" ? this._data = new this.dataType.Array(
|
|
2811
2840
|
p.map(Number)
|
|
2812
2841
|
).buffer : this._data = new this.dataType.Array(p).buffer;
|
|
2813
2842
|
}
|
|
2814
|
-
this.key = h, this.alignment = o, this.alignmentMultiple = c, this.sampleOffset = s ?? 0, this.timeRange = n ??
|
|
2843
|
+
this.key = h, this.alignment = o, this.alignmentMultiple = c, this.sampleOffset = s ?? 0, this.timeRange = n ?? X.ZERO, this.gl = {
|
|
2815
2844
|
control: null,
|
|
2816
2845
|
buffer: null,
|
|
2817
2846
|
prevBuffer: 0,
|
|
@@ -2828,7 +2857,7 @@ let Ur = class F {
|
|
|
2828
2857
|
static alloc({ capacity: e, dataType: r, ...n }) {
|
|
2829
2858
|
if (e === 0)
|
|
2830
2859
|
throw new Error("[Series] - cannot allocate an array of length 0");
|
|
2831
|
-
const s = new new
|
|
2860
|
+
const s = new new T(r).Array(e), i = new F({ data: s.buffer, dataType: r, ...n });
|
|
2832
2861
|
return i.writePos = 0, i;
|
|
2833
2862
|
}
|
|
2834
2863
|
/**
|
|
@@ -2871,12 +2900,12 @@ let Ur = class F {
|
|
|
2871
2900
|
return this.dataType.isVariable ? this.writeVariable(e) : this.writeFixed(e);
|
|
2872
2901
|
}
|
|
2873
2902
|
writeVariable(e) {
|
|
2874
|
-
if (this.writePos ===
|
|
2903
|
+
if (this.writePos === Y) return 0;
|
|
2875
2904
|
const r = this.byteCapacity.valueOf() - this.writePos, n = e.subBytes(0, r);
|
|
2876
2905
|
return this.writeToUnderlyingData(n), this.writePos += n.byteLength.valueOf(), this.cachedLength != null && (this.cachedLength += n.length, this.calculateCachedLength()), n.length;
|
|
2877
2906
|
}
|
|
2878
2907
|
writeFixed(e) {
|
|
2879
|
-
if (this.writePos ===
|
|
2908
|
+
if (this.writePos === Y) return 0;
|
|
2880
2909
|
const r = this.capacity - this.writePos, n = e.sub(0, r);
|
|
2881
2910
|
return this.writeToUnderlyingData(n), this.cachedLength = void 0, this.maybeRecomputeMinMax(n), this.writePos += n.length, n.length;
|
|
2882
2911
|
}
|
|
@@ -2899,7 +2928,7 @@ let Ur = class F {
|
|
|
2899
2928
|
* @returns A typed array containing the series data.
|
|
2900
2929
|
*/
|
|
2901
2930
|
get data() {
|
|
2902
|
-
return this.writePos ===
|
|
2931
|
+
return this.writePos === Y ? this.underlyingData : new this.dataType.Array(this._data, 0, this.writePos);
|
|
2903
2932
|
}
|
|
2904
2933
|
/**
|
|
2905
2934
|
* Returns an array of the values in the series as strings.
|
|
@@ -2918,16 +2947,16 @@ let Ur = class F {
|
|
|
2918
2947
|
* @returns An array of values parsed from the JSON series.
|
|
2919
2948
|
*/
|
|
2920
2949
|
parseJSON(e) {
|
|
2921
|
-
if (!this.dataType.equals(
|
|
2950
|
+
if (!this.dataType.equals(T.JSON))
|
|
2922
2951
|
throw new Error("cannot parse non-JSON series as JSON");
|
|
2923
|
-
return this.toStrings().map((r) => e.parse(
|
|
2952
|
+
return this.toStrings().map((r) => e.parse(st.decodeString(r)));
|
|
2924
2953
|
}
|
|
2925
2954
|
/**
|
|
2926
2955
|
* Returns the capacity of the series in bytes.
|
|
2927
2956
|
* @returns The size of the underlying buffer in bytes.
|
|
2928
2957
|
*/
|
|
2929
2958
|
get byteCapacity() {
|
|
2930
|
-
return new
|
|
2959
|
+
return new Pe(this.underlyingData.byteLength);
|
|
2931
2960
|
}
|
|
2932
2961
|
/**
|
|
2933
2962
|
* Returns the capacity of the series in samples.
|
|
@@ -2943,7 +2972,7 @@ let Ur = class F {
|
|
|
2943
2972
|
* @returns The size of the data in bytes.
|
|
2944
2973
|
*/
|
|
2945
2974
|
get byteLength() {
|
|
2946
|
-
return this.writePos ===
|
|
2975
|
+
return this.writePos === Y ? this.byteCapacity : this.dataType.isVariable ? new Pe(this.writePos) : this.dataType.density.size(this.writePos);
|
|
2947
2976
|
}
|
|
2948
2977
|
/**
|
|
2949
2978
|
* Returns the number of samples in this array.
|
|
@@ -2951,7 +2980,7 @@ let Ur = class F {
|
|
|
2951
2980
|
* @returns The number of samples in the series.
|
|
2952
2981
|
*/
|
|
2953
2982
|
get length() {
|
|
2954
|
-
return this.cachedLength != null ? this.cachedLength : this.dataType.isVariable ? this.calculateCachedLength() : this.writePos ===
|
|
2983
|
+
return this.cachedLength != null ? this.cachedLength : this.dataType.isVariable ? this.calculateCachedLength() : this.writePos === Y ? this.byteCapacity.valueOf() / this.dataType.density.valueOf() : this.writePos;
|
|
2955
2984
|
}
|
|
2956
2985
|
calculateCachedLength() {
|
|
2957
2986
|
if (!this.dataType.isVariable)
|
|
@@ -2959,7 +2988,7 @@ let Ur = class F {
|
|
|
2959
2988
|
let e = 0;
|
|
2960
2989
|
const r = [0];
|
|
2961
2990
|
return this.data.forEach((n, s) => {
|
|
2962
|
-
n ===
|
|
2991
|
+
n === mt && (e++, r.push(s + 1));
|
|
2963
2992
|
}), this._cachedIndexes = r, this.cachedLength = e, e;
|
|
2964
2993
|
}
|
|
2965
2994
|
/**
|
|
@@ -2975,7 +3004,7 @@ let Ur = class F {
|
|
|
2975
3004
|
if (this.dataType.equals(e)) return this;
|
|
2976
3005
|
const n = new e.Array(this.length);
|
|
2977
3006
|
for (let s = 0; s < this.length; s++)
|
|
2978
|
-
n[s] =
|
|
3007
|
+
n[s] = Li(this.dataType, e, this.data[s], r);
|
|
2979
3008
|
return new F({
|
|
2980
3009
|
data: n.buffer,
|
|
2981
3010
|
dataType: e,
|
|
@@ -2987,7 +3016,7 @@ let Ur = class F {
|
|
|
2987
3016
|
}
|
|
2988
3017
|
calcRawMax() {
|
|
2989
3018
|
if (this.length === 0) return -1 / 0;
|
|
2990
|
-
if (this.dataType.equals(
|
|
3019
|
+
if (this.dataType.equals(T.TIMESTAMP))
|
|
2991
3020
|
this.cachedMax = this.data[this.data.length - 1];
|
|
2992
3021
|
else if (this.dataType.usesBigInt) {
|
|
2993
3022
|
const e = this.data;
|
|
@@ -3005,11 +3034,11 @@ let Ur = class F {
|
|
|
3005
3034
|
calcMax() {
|
|
3006
3035
|
if (this.dataType.isVariable)
|
|
3007
3036
|
throw new Error("cannot calculate maximum on a variable length data type");
|
|
3008
|
-
return this.writePos === 0 ? -1 / 0 : (this.cachedMax ??= this.calcRawMax(),
|
|
3037
|
+
return this.writePos === 0 ? -1 / 0 : (this.cachedMax ??= this.calcRawMax(), Ce(this.cachedMax, this.sampleOffset));
|
|
3009
3038
|
}
|
|
3010
3039
|
calcRawMin() {
|
|
3011
3040
|
if (this.length === 0) return 1 / 0;
|
|
3012
|
-
if (this.dataType.equals(
|
|
3041
|
+
if (this.dataType.equals(T.TIMESTAMP)) this.cachedMin = this.data[0];
|
|
3013
3042
|
else if (this.dataType.usesBigInt) {
|
|
3014
3043
|
const e = this.data;
|
|
3015
3044
|
this.cachedMin = e.reduce((r, n) => r < n ? r : n);
|
|
@@ -3026,7 +3055,7 @@ let Ur = class F {
|
|
|
3026
3055
|
calcMin() {
|
|
3027
3056
|
if (this.dataType.isVariable)
|
|
3028
3057
|
throw new Error("cannot calculate minimum on a variable length data type");
|
|
3029
|
-
return this.writePos === 0 ? 1 / 0 : (this.cachedMin ??= this.calcRawMin(),
|
|
3058
|
+
return this.writePos === 0 ? 1 / 0 : (this.cachedMin ??= this.calcRawMin(), Ce(this.cachedMin, this.sampleOffset));
|
|
3030
3059
|
}
|
|
3031
3060
|
/** @returns the bounds of the series. */
|
|
3032
3061
|
get bounds() {
|
|
@@ -3052,18 +3081,18 @@ let Ur = class F {
|
|
|
3052
3081
|
}
|
|
3053
3082
|
at(e, r = !1) {
|
|
3054
3083
|
if (this.dataType.isVariable) return this.atVariable(e, r ?? !1);
|
|
3055
|
-
if (this.dataType.equals(
|
|
3084
|
+
if (this.dataType.equals(T.UUID)) return this.atUUID(e, r);
|
|
3056
3085
|
e < 0 && (e = this.length + e);
|
|
3057
3086
|
const n = this.data[e];
|
|
3058
3087
|
if (n == null) {
|
|
3059
3088
|
if (r === !0) throw new Error(`[series] - no value at index ${e}`);
|
|
3060
3089
|
return;
|
|
3061
3090
|
}
|
|
3062
|
-
return
|
|
3091
|
+
return Ce(n, this.sampleOffset);
|
|
3063
3092
|
}
|
|
3064
3093
|
atUUID(e, r) {
|
|
3065
3094
|
e < 0 && (e = this.length + e);
|
|
3066
|
-
const n =
|
|
3095
|
+
const n = Cr(
|
|
3067
3096
|
new Uint8Array(this.buffer, e * this.dataType.density.valueOf())
|
|
3068
3097
|
);
|
|
3069
3098
|
if (n == null) {
|
|
@@ -3079,7 +3108,7 @@ let Ur = class F {
|
|
|
3079
3108
|
else {
|
|
3080
3109
|
e < 0 && (e = this.length + e);
|
|
3081
3110
|
for (let o = 0; o < this.data.length; o++)
|
|
3082
|
-
if (this.data[o] ===
|
|
3111
|
+
if (this.data[o] === mt) {
|
|
3083
3112
|
if (e === 0) {
|
|
3084
3113
|
s = o;
|
|
3085
3114
|
break;
|
|
@@ -3092,7 +3121,7 @@ let Ur = class F {
|
|
|
3092
3121
|
}
|
|
3093
3122
|
}
|
|
3094
3123
|
const i = this.data.slice(n, s);
|
|
3095
|
-
return this.dataType.equals(
|
|
3124
|
+
return this.dataType.equals(T.STRING) ? new TextDecoder().decode(i) : bt(JSON.parse(new TextDecoder().decode(i)));
|
|
3096
3125
|
}
|
|
3097
3126
|
/**
|
|
3098
3127
|
* @returns the index of the first sample that is greater than or equal to the given value.
|
|
@@ -3101,7 +3130,7 @@ let Ur = class F {
|
|
|
3101
3130
|
*/
|
|
3102
3131
|
binarySearch(e) {
|
|
3103
3132
|
let r = 0, n = this.length - 1;
|
|
3104
|
-
const s =
|
|
3133
|
+
const s = ze(e);
|
|
3105
3134
|
for (; r <= n; ) {
|
|
3106
3135
|
const i = Math.floor((r + n) / 2), o = s(this.at(i, !0), e);
|
|
3107
3136
|
if (o === 0) return i;
|
|
@@ -3117,11 +3146,11 @@ let Ur = class F {
|
|
|
3117
3146
|
* be the same buffer previously passed to {@method acquire} or {@method updateGLBuffer}.
|
|
3118
3147
|
*/
|
|
3119
3148
|
updateGLBuffer(e) {
|
|
3120
|
-
if (this.gl.control = e, !this.dataType.equals(
|
|
3149
|
+
if (this.gl.control = e, !this.dataType.equals(T.FLOAT32) && !this.dataType.equals(T.UINT8))
|
|
3121
3150
|
throw new Error("Only FLOAT32 and UINT8 arrays can be used in WebGL");
|
|
3122
3151
|
const { buffer: r, bufferUsage: n, prevBuffer: s } = this.gl;
|
|
3123
3152
|
if (r == null && (this.gl.buffer = e.createBuffer()), this.writePos !== s)
|
|
3124
|
-
if (e.bindBuffer(e.ARRAY_BUFFER, this.gl.buffer), this.writePos !==
|
|
3153
|
+
if (e.bindBuffer(e.ARRAY_BUFFER, this.gl.buffer), this.writePos !== Y) {
|
|
3125
3154
|
s === 0 && e.bufferData(e.ARRAY_BUFFER, this.byteCapacity.valueOf(), e.STATIC_DRAW);
|
|
3126
3155
|
const i = this.dataType.density.size(s).valueOf(), o = this.underlyingData.slice(this.gl.prevBuffer, this.writePos);
|
|
3127
3156
|
e.bufferSubData(e.ARRAY_BUFFER, i, o.buffer), this.gl.prevBuffer = this.writePos;
|
|
@@ -3130,10 +3159,10 @@ let Ur = class F {
|
|
|
3130
3159
|
e.ARRAY_BUFFER,
|
|
3131
3160
|
this.buffer,
|
|
3132
3161
|
n === "static" ? e.STATIC_DRAW : e.DYNAMIC_DRAW
|
|
3133
|
-
), this.gl.prevBuffer =
|
|
3162
|
+
), this.gl.prevBuffer = Y;
|
|
3134
3163
|
}
|
|
3135
3164
|
as(e) {
|
|
3136
|
-
return
|
|
3165
|
+
return jr(e, this.dataType), this;
|
|
3137
3166
|
}
|
|
3138
3167
|
/** @returns a digest containing information about the series. */
|
|
3139
3168
|
get digest() {
|
|
@@ -3142,8 +3171,9 @@ let Ur = class F {
|
|
|
3142
3171
|
dataType: this.dataType.toString(),
|
|
3143
3172
|
sampleOffset: this.sampleOffset,
|
|
3144
3173
|
alignment: {
|
|
3145
|
-
lower:
|
|
3146
|
-
upper:
|
|
3174
|
+
lower: Gt(this.alignmentBounds.lower),
|
|
3175
|
+
upper: Gt(this.alignmentBounds.upper),
|
|
3176
|
+
multiple: this.alignmentMultiple
|
|
3147
3177
|
},
|
|
3148
3178
|
timeRange: this.timeRange.toString(),
|
|
3149
3179
|
length: this.length,
|
|
@@ -3180,10 +3210,10 @@ let Ur = class F {
|
|
|
3180
3210
|
}
|
|
3181
3211
|
[Symbol.iterator]() {
|
|
3182
3212
|
if (this.dataType.isVariable) {
|
|
3183
|
-
const e = new
|
|
3184
|
-
return this.dataType.equals(
|
|
3213
|
+
const e = new Fi(this);
|
|
3214
|
+
return this.dataType.equals(T.JSON) ? new Wi(e) : e;
|
|
3185
3215
|
}
|
|
3186
|
-
return this.dataType.equals(
|
|
3216
|
+
return this.dataType.equals(T.UUID) ? new Vi(this) : new Gi(this);
|
|
3187
3217
|
}
|
|
3188
3218
|
/**
|
|
3189
3219
|
* Returns a slice of the series from start to end.
|
|
@@ -3210,7 +3240,7 @@ let Ur = class F {
|
|
|
3210
3240
|
* @returns An iterator over the specified range.
|
|
3211
3241
|
*/
|
|
3212
3242
|
subIterator(e, r) {
|
|
3213
|
-
return new
|
|
3243
|
+
return new Vt(this, e, r ?? this.length);
|
|
3214
3244
|
}
|
|
3215
3245
|
/**
|
|
3216
3246
|
* Returns an iterator over a portion of the series based on alignment.
|
|
@@ -3224,7 +3254,7 @@ let Ur = class F {
|
|
|
3224
3254
|
), s = Math.ceil(
|
|
3225
3255
|
Number(r - this.alignment) / Number(this.alignmentMultiple)
|
|
3226
3256
|
);
|
|
3227
|
-
return new
|
|
3257
|
+
return new Vt(this, n, s);
|
|
3228
3258
|
}
|
|
3229
3259
|
subBytes(e, r) {
|
|
3230
3260
|
if (e >= 0 && (r == null || r >= this.byteLength.valueOf())) return this;
|
|
@@ -3259,7 +3289,7 @@ let Ur = class F {
|
|
|
3259
3289
|
return new F({
|
|
3260
3290
|
data: this.buffer,
|
|
3261
3291
|
dataType: this.dataType,
|
|
3262
|
-
timeRange:
|
|
3292
|
+
timeRange: X.ZERO,
|
|
3263
3293
|
sampleOffset: this.sampleOffset,
|
|
3264
3294
|
glBufferUsage: "static",
|
|
3265
3295
|
alignment: e
|
|
@@ -3283,20 +3313,21 @@ let Ur = class F {
|
|
|
3283
3313
|
return e += "])", e;
|
|
3284
3314
|
}
|
|
3285
3315
|
};
|
|
3286
|
-
const
|
|
3287
|
-
|
|
3316
|
+
const Yi = (t) => t == null ? !1 : Array.isArray(t) || t instanceof ArrayBuffer || ArrayBuffer.isView(t) && !(t instanceof DataView) || t instanceof Lr ? !0 : Ur(t), Dr = Ci(Rr, Lr);
|
|
3317
|
+
class Vt {
|
|
3288
3318
|
series;
|
|
3289
3319
|
end;
|
|
3290
3320
|
index;
|
|
3291
3321
|
constructor(e, r, n) {
|
|
3292
3322
|
this.series = e;
|
|
3293
3323
|
const s = b(0, e.length + 1);
|
|
3294
|
-
this.end =
|
|
3324
|
+
this.end = ut(s, n), this.index = ut(s, r);
|
|
3295
3325
|
}
|
|
3296
3326
|
next() {
|
|
3297
3327
|
return this.index >= this.end ? { done: !0, value: void 0 } : { done: !1, value: this.series.at(this.index++, !0) };
|
|
3298
3328
|
}
|
|
3299
|
-
}
|
|
3329
|
+
}
|
|
3330
|
+
let Fi = class {
|
|
3300
3331
|
series;
|
|
3301
3332
|
index;
|
|
3302
3333
|
decoder;
|
|
@@ -3309,11 +3340,11 @@ let Zt = class {
|
|
|
3309
3340
|
}
|
|
3310
3341
|
next() {
|
|
3311
3342
|
const e = this.index, r = this.series.data;
|
|
3312
|
-
for (; this.index < r.length && r[this.index] !==
|
|
3343
|
+
for (; this.index < r.length && r[this.index] !== mt; ) this.index++;
|
|
3313
3344
|
const n = this.index;
|
|
3314
3345
|
return e === n ? { done: !0, value: void 0 } : (this.index++, { done: !1, value: this.decoder.decode(this.series.buffer.slice(e, n)) });
|
|
3315
3346
|
}
|
|
3316
|
-
},
|
|
3347
|
+
}, Wi = class Pr {
|
|
3317
3348
|
wrapped;
|
|
3318
3349
|
static schema = a.record(a.string(), a.unknown());
|
|
3319
3350
|
constructor(e) {
|
|
@@ -3323,26 +3354,25 @@ let Zt = class {
|
|
|
3323
3354
|
const e = this.wrapped.next();
|
|
3324
3355
|
return e.done === !0 ? { done: !0, value: void 0 } : {
|
|
3325
3356
|
done: !1,
|
|
3326
|
-
value:
|
|
3357
|
+
value: st.decodeString(e.value, Pr.schema)
|
|
3327
3358
|
};
|
|
3328
3359
|
}
|
|
3329
|
-
},
|
|
3360
|
+
}, Vi = class {
|
|
3330
3361
|
series;
|
|
3331
3362
|
index;
|
|
3332
3363
|
data;
|
|
3333
3364
|
density;
|
|
3334
3365
|
constructor(e) {
|
|
3335
|
-
if (!e.dataType.equals(
|
|
3366
|
+
if (!e.dataType.equals(T.UUID))
|
|
3336
3367
|
throw new Error("cannot create a UUID series iterator for a non-UUID series");
|
|
3337
|
-
this.series = e, this.index = 0, this.data = new Uint8Array(e.buffer), this.density =
|
|
3368
|
+
this.series = e, this.index = 0, this.data = new Uint8Array(e.buffer), this.density = T.UUID.density.valueOf();
|
|
3338
3369
|
}
|
|
3339
3370
|
next() {
|
|
3340
3371
|
if (this.index >= this.series.length) return { done: !0, value: void 0 };
|
|
3341
|
-
const e =
|
|
3372
|
+
const e = Cr(this.data, this.index * this.density);
|
|
3342
3373
|
return this.index++, { done: !1, value: e };
|
|
3343
3374
|
}
|
|
3344
|
-
}
|
|
3345
|
-
class Zi {
|
|
3375
|
+
}, Gi = class {
|
|
3346
3376
|
series;
|
|
3347
3377
|
index;
|
|
3348
3378
|
constructor(e) {
|
|
@@ -3354,8 +3384,7 @@ class Zi {
|
|
|
3354
3384
|
value: this.series.at(this.index++, !0)
|
|
3355
3385
|
};
|
|
3356
3386
|
}
|
|
3357
|
-
}
|
|
3358
|
-
let Po = class {
|
|
3387
|
+
}, Fo = class {
|
|
3359
3388
|
/** The array of series in this collection */
|
|
3360
3389
|
series;
|
|
3361
3390
|
/**
|
|
@@ -3408,14 +3437,14 @@ let Po = class {
|
|
|
3408
3437
|
this.series = e;
|
|
3409
3438
|
}
|
|
3410
3439
|
as(e) {
|
|
3411
|
-
return
|
|
3440
|
+
return jr(e, this.dataType), this;
|
|
3412
3441
|
}
|
|
3413
3442
|
/**
|
|
3414
3443
|
* Returns the data type of the series in this collection. If the collection is empty,
|
|
3415
3444
|
* returns DataType.UNKNOWN.
|
|
3416
3445
|
*/
|
|
3417
3446
|
get dataType() {
|
|
3418
|
-
return this.series.length === 0 ?
|
|
3447
|
+
return this.series.length === 0 ? T.UNKNOWN : this.series[0].dataType;
|
|
3419
3448
|
}
|
|
3420
3449
|
/**
|
|
3421
3450
|
* Returns the combined time range of all series in the collection. If the collection
|
|
@@ -3423,7 +3452,7 @@ let Po = class {
|
|
|
3423
3452
|
* series to the end of the last series.
|
|
3424
3453
|
*/
|
|
3425
3454
|
get timeRange() {
|
|
3426
|
-
return this.series.length === 0 ?
|
|
3455
|
+
return this.series.length === 0 ? X.ZERO : new X(
|
|
3427
3456
|
this.series[0].timeRange.start,
|
|
3428
3457
|
this.series[this.series.length - 1].timeRange.end
|
|
3429
3458
|
);
|
|
@@ -3450,7 +3479,7 @@ let Po = class {
|
|
|
3450
3479
|
const r = () => new Error(
|
|
3451
3480
|
`cannot push a ${e.dataType.toString()} series to a ${this.dataType.toString()} multi-series`
|
|
3452
3481
|
), n = e.dataType.equals(this.dataType);
|
|
3453
|
-
if (
|
|
3482
|
+
if (Dr(e)) {
|
|
3454
3483
|
if (this.series.length !== 0 && !n) throw r();
|
|
3455
3484
|
this.series.push(e);
|
|
3456
3485
|
} else {
|
|
@@ -3468,7 +3497,7 @@ let Po = class {
|
|
|
3468
3497
|
}
|
|
3469
3498
|
atAlignment(e, r) {
|
|
3470
3499
|
for (const n of this.series)
|
|
3471
|
-
if (
|
|
3500
|
+
if (j(n.alignmentBounds, e))
|
|
3472
3501
|
return n.atAlignment(e, r);
|
|
3473
3502
|
if (r) throw new Error(`[series] - no value at alignment ${e}`);
|
|
3474
3503
|
}
|
|
@@ -3487,7 +3516,7 @@ let Po = class {
|
|
|
3487
3516
|
* @returns An iterator over the specified range.
|
|
3488
3517
|
*/
|
|
3489
3518
|
subIterator(e, r) {
|
|
3490
|
-
return new
|
|
3519
|
+
return new et(this, e, r ?? this.length);
|
|
3491
3520
|
}
|
|
3492
3521
|
/**
|
|
3493
3522
|
* Returns an iterator over a portion of the multi-series based on alignment.
|
|
@@ -3497,13 +3526,13 @@ let Po = class {
|
|
|
3497
3526
|
*/
|
|
3498
3527
|
subAlignmentIterator(e, r) {
|
|
3499
3528
|
if (e >= this.alignmentBounds.upper || r <= this.alignmentBounds.lower)
|
|
3500
|
-
return
|
|
3529
|
+
return pt;
|
|
3501
3530
|
let n = 0;
|
|
3502
3531
|
for (let i = 0; i < this.series.length; i++) {
|
|
3503
3532
|
const o = this.series[i];
|
|
3504
3533
|
if (e < o.alignment) break;
|
|
3505
3534
|
if (e >= o.alignmentBounds.upper) n += o.length;
|
|
3506
|
-
else if (
|
|
3535
|
+
else if (j(o.alignmentBounds, e)) {
|
|
3507
3536
|
n += Math.ceil(
|
|
3508
3537
|
Number(e - o.alignment) / Number(o.alignmentMultiple)
|
|
3509
3538
|
);
|
|
@@ -3515,14 +3544,14 @@ let Po = class {
|
|
|
3515
3544
|
const o = this.series[i];
|
|
3516
3545
|
if (r < o.alignment) break;
|
|
3517
3546
|
if (r >= o.alignmentBounds.upper) s += o.length;
|
|
3518
|
-
else if (
|
|
3547
|
+
else if (j(o.alignmentBounds, r)) {
|
|
3519
3548
|
s += Math.ceil(
|
|
3520
3549
|
Number(r - o.alignment) / Number(o.alignmentMultiple)
|
|
3521
3550
|
);
|
|
3522
3551
|
break;
|
|
3523
3552
|
}
|
|
3524
3553
|
}
|
|
3525
|
-
return new
|
|
3554
|
+
return new et(this, n, s);
|
|
3526
3555
|
}
|
|
3527
3556
|
/**
|
|
3528
3557
|
* Returns an iterator over the specified alignment range and span.
|
|
@@ -3531,19 +3560,19 @@ let Po = class {
|
|
|
3531
3560
|
* @returns An iterator over the specified range.
|
|
3532
3561
|
*/
|
|
3533
3562
|
subAlignmentSpanIterator(e, r) {
|
|
3534
|
-
if (e >= this.alignmentBounds.upper) return
|
|
3563
|
+
if (e >= this.alignmentBounds.upper) return pt;
|
|
3535
3564
|
r = Math.min(r, Number(this.distance(e, this.alignmentBounds.upper)));
|
|
3536
3565
|
let n = 0;
|
|
3537
3566
|
for (let s = 0; s < this.series.length; s++) {
|
|
3538
3567
|
const i = this.series[s];
|
|
3539
3568
|
if (e < i.alignment) break;
|
|
3540
3569
|
if (e >= i.alignmentBounds.upper) n += i.length;
|
|
3541
|
-
else if (
|
|
3570
|
+
else if (j(i.alignmentBounds, e)) {
|
|
3542
3571
|
n += Number(e - i.alignment);
|
|
3543
3572
|
break;
|
|
3544
3573
|
}
|
|
3545
3574
|
}
|
|
3546
|
-
return new
|
|
3575
|
+
return new et(this, n, n + r);
|
|
3547
3576
|
}
|
|
3548
3577
|
/**
|
|
3549
3578
|
* Updates the WebGL buffer for all series in the collection.
|
|
@@ -3556,13 +3585,13 @@ let Po = class {
|
|
|
3556
3585
|
* Returns the bounds containing the minimum and maximum values across all series.
|
|
3557
3586
|
*/
|
|
3558
3587
|
get bounds() {
|
|
3559
|
-
return
|
|
3588
|
+
return hr(this.series.map((e) => e.bounds));
|
|
3560
3589
|
}
|
|
3561
3590
|
/**
|
|
3562
3591
|
* Returns the sum of the byte lengths of all series.
|
|
3563
3592
|
*/
|
|
3564
3593
|
get byteLength() {
|
|
3565
|
-
return new
|
|
3594
|
+
return new Pe(this.series.reduce((e, r) => e + r.byteLength.valueOf(), 0));
|
|
3566
3595
|
}
|
|
3567
3596
|
/**
|
|
3568
3597
|
* Returns a combined typed array containing all data from all series.
|
|
@@ -3583,7 +3612,7 @@ let Po = class {
|
|
|
3583
3612
|
*/
|
|
3584
3613
|
traverseAlignment(e, r) {
|
|
3585
3614
|
const n = this.series.map((s) => s.alignmentBounds);
|
|
3586
|
-
return
|
|
3615
|
+
return fr(n, e, r);
|
|
3587
3616
|
}
|
|
3588
3617
|
/**
|
|
3589
3618
|
* Acquires a reference to the WebGL buffer for all series.
|
|
@@ -3606,7 +3635,7 @@ let Po = class {
|
|
|
3606
3635
|
*/
|
|
3607
3636
|
distance(e, r) {
|
|
3608
3637
|
const n = this.series.map((s) => s.alignmentBounds);
|
|
3609
|
-
return
|
|
3638
|
+
return dr(n, e, r);
|
|
3610
3639
|
}
|
|
3611
3640
|
/**
|
|
3612
3641
|
* Parses a JSON multi-series into an array of values using the provided zod schema.
|
|
@@ -3616,7 +3645,7 @@ let Po = class {
|
|
|
3616
3645
|
* @returns An array of values parsed from the JSON series.
|
|
3617
3646
|
*/
|
|
3618
3647
|
parseJSON(e) {
|
|
3619
|
-
if (!this.dataType.equals(
|
|
3648
|
+
if (!this.dataType.equals(T.JSON))
|
|
3620
3649
|
throw new Error("cannot parse non-JSON series as JSON");
|
|
3621
3650
|
return this.series.flatMap((r) => r.parseJSON(e));
|
|
3622
3651
|
}
|
|
@@ -3629,7 +3658,7 @@ let Po = class {
|
|
|
3629
3658
|
next() {
|
|
3630
3659
|
return { done: !0, value: void 0 };
|
|
3631
3660
|
}
|
|
3632
|
-
} : new
|
|
3661
|
+
} : new Hi(this.series);
|
|
3633
3662
|
}
|
|
3634
3663
|
/**
|
|
3635
3664
|
* Returns an array of the values in the multi-series as strings.
|
|
@@ -3639,7 +3668,8 @@ let Po = class {
|
|
|
3639
3668
|
toStrings() {
|
|
3640
3669
|
return this.series.flatMap((e) => e.toStrings());
|
|
3641
3670
|
}
|
|
3642
|
-
}
|
|
3671
|
+
};
|
|
3672
|
+
class Hi {
|
|
3643
3673
|
series;
|
|
3644
3674
|
seriesIndex;
|
|
3645
3675
|
internal;
|
|
@@ -3653,8 +3683,8 @@ let Po = class {
|
|
|
3653
3683
|
[Symbol.iterator]() {
|
|
3654
3684
|
return this;
|
|
3655
3685
|
}
|
|
3656
|
-
}
|
|
3657
|
-
class
|
|
3686
|
+
}
|
|
3687
|
+
let et = class {
|
|
3658
3688
|
series;
|
|
3659
3689
|
index;
|
|
3660
3690
|
end;
|
|
@@ -3667,52 +3697,52 @@ class Xe {
|
|
|
3667
3697
|
[Symbol.iterator]() {
|
|
3668
3698
|
return this;
|
|
3669
3699
|
}
|
|
3670
|
-
}
|
|
3671
|
-
const
|
|
3700
|
+
};
|
|
3701
|
+
const Gt = (t) => {
|
|
3672
3702
|
const e = t >> 32n, r = t & 0xffffffffn;
|
|
3673
3703
|
return { domain: e, sample: r };
|
|
3674
3704
|
};
|
|
3675
3705
|
a.object({ key: a.string(), value: a.string() });
|
|
3676
|
-
const
|
|
3706
|
+
const Ji = a.record(
|
|
3677
3707
|
a.union([a.number(), a.string(), a.symbol()]),
|
|
3678
3708
|
a.unknown()
|
|
3679
|
-
),
|
|
3709
|
+
), zt = (t) => Object.entries(t), Xi = (t, e) => Object.fromEntries(zt(t).map(([r, n]) => [r, e(n, r)])), Ki = (t) => Object.fromEntries(zt(t).filter(([e, r]) => r !== void 0)), Qi = (t, ...e) => {
|
|
3680
3710
|
const r = { ...t };
|
|
3681
3711
|
for (const n of e) delete r[n];
|
|
3682
3712
|
return r;
|
|
3683
|
-
},
|
|
3713
|
+
}, Go = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
3684
3714
|
__proto__: null,
|
|
3685
|
-
entries:
|
|
3686
|
-
map:
|
|
3687
|
-
omit:
|
|
3688
|
-
purgeUndefined:
|
|
3689
|
-
unknownZ:
|
|
3690
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
3715
|
+
entries: zt,
|
|
3716
|
+
map: Xi,
|
|
3717
|
+
omit: Qi,
|
|
3718
|
+
purgeUndefined: Ki,
|
|
3719
|
+
unknownZ: Ji
|
|
3720
|
+
}, Symbol.toStringTag, { value: "Module" })), kr = () => typeof process < "u" && process.versions != null && process.versions.node != null ? "node" : typeof window > "u" || window.document === void 0 ? "webworker" : "browser", _i = kr(), qr = ["macOS", "Windows", "Linux"], ea = ["macos", "windows", "linux"], ta = {
|
|
3691
3721
|
macos: "macOS",
|
|
3692
3722
|
windows: "Windows",
|
|
3693
3723
|
linux: "Linux"
|
|
3694
|
-
},
|
|
3695
|
-
a.enum(
|
|
3696
|
-
),
|
|
3724
|
+
}, ra = a.enum(qr).or(
|
|
3725
|
+
a.enum(ea).transform((t) => ta[t])
|
|
3726
|
+
), na = () => {
|
|
3697
3727
|
if (typeof window > "u") return;
|
|
3698
3728
|
const t = window.navigator.userAgent.toLowerCase();
|
|
3699
3729
|
if (t.includes("mac")) return "macOS";
|
|
3700
3730
|
if (t.includes("win")) return "Windows";
|
|
3701
3731
|
if (t.includes("linux")) return "Linux";
|
|
3702
3732
|
};
|
|
3703
|
-
let
|
|
3704
|
-
const
|
|
3733
|
+
let tt;
|
|
3734
|
+
const sa = (t = {}) => {
|
|
3705
3735
|
const { force: e, default: r } = t;
|
|
3706
|
-
return e ??
|
|
3707
|
-
},
|
|
3736
|
+
return e ?? tt ?? (tt = na(), tt ?? r);
|
|
3737
|
+
}, Ho = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
3708
3738
|
__proto__: null,
|
|
3709
|
-
OPERATING_SYSTEMS:
|
|
3710
|
-
RUNTIME:
|
|
3711
|
-
detect:
|
|
3712
|
-
getOS:
|
|
3713
|
-
osZ:
|
|
3714
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
3715
|
-
class
|
|
3739
|
+
OPERATING_SYSTEMS: qr,
|
|
3740
|
+
RUNTIME: _i,
|
|
3741
|
+
detect: kr,
|
|
3742
|
+
getOS: sa,
|
|
3743
|
+
osZ: ra
|
|
3744
|
+
}, Symbol.toStringTag, { value: "Module" })), ia = (...t) => t.map(zr).join(""), zr = (t) => (t.endsWith("/") || (t += "/"), t.startsWith("/") && (t = t.slice(1)), t), aa = (t) => t.endsWith("/") ? t.slice(0, -1) : t;
|
|
3745
|
+
class je {
|
|
3716
3746
|
protocol;
|
|
3717
3747
|
host;
|
|
3718
3748
|
port;
|
|
@@ -3724,7 +3754,7 @@ class Ce {
|
|
|
3724
3754
|
* @param pathPrefix - A path prefix to use for all requests. Defaults to "".
|
|
3725
3755
|
*/
|
|
3726
3756
|
constructor({ host: e, port: r, protocol: n = "", pathPrefix: s = "" }) {
|
|
3727
|
-
this.protocol = n, this.host = e, this.port = r, this.path =
|
|
3757
|
+
this.protocol = n, this.host = e, this.port = r, this.path = zr(s);
|
|
3728
3758
|
}
|
|
3729
3759
|
/**
|
|
3730
3760
|
* Replaces creates a new URL with the specified properties replaced.
|
|
@@ -3732,7 +3762,7 @@ class Ce {
|
|
|
3732
3762
|
* @returns a new URL.
|
|
3733
3763
|
*/
|
|
3734
3764
|
replace(e) {
|
|
3735
|
-
return new
|
|
3765
|
+
return new je({
|
|
3736
3766
|
host: e.host ?? this.host,
|
|
3737
3767
|
port: e.port ?? this.port,
|
|
3738
3768
|
protocol: e.protocol ?? this.protocol,
|
|
@@ -3745,40 +3775,40 @@ class Ce {
|
|
|
3745
3775
|
* @returns a new URL.
|
|
3746
3776
|
*/
|
|
3747
3777
|
child(e) {
|
|
3748
|
-
return new
|
|
3778
|
+
return new je({
|
|
3749
3779
|
...this,
|
|
3750
|
-
pathPrefix:
|
|
3780
|
+
pathPrefix: ia(this.path, e)
|
|
3751
3781
|
});
|
|
3752
3782
|
}
|
|
3753
3783
|
/** @returns a string representation of the url */
|
|
3754
3784
|
toString() {
|
|
3755
|
-
return
|
|
3785
|
+
return aa(
|
|
3756
3786
|
`${this.protocol}://${this.host}:${this.port}/${this.path}`
|
|
3757
3787
|
);
|
|
3758
3788
|
}
|
|
3759
|
-
static UNKNOWN = new
|
|
3789
|
+
static UNKNOWN = new je({ host: "unknown", port: 0 });
|
|
3760
3790
|
}
|
|
3761
|
-
const
|
|
3791
|
+
const oa = 2, ua = 3, la = 2, ca = (t, e) => {
|
|
3762
3792
|
if (Number.isNaN(t) || !Number.isFinite(t)) return t;
|
|
3763
|
-
const r =
|
|
3793
|
+
const r = ve(e);
|
|
3764
3794
|
if (r == 0) return t;
|
|
3765
3795
|
let n;
|
|
3766
|
-
r >= 1e3 ? n =
|
|
3796
|
+
r >= 1e3 ? n = oa : r >= 1 ? n = ua : n = Math.ceil(-Math.log10(r)) + la;
|
|
3767
3797
|
const s = 10 ** n;
|
|
3768
3798
|
return Math.round(t * s) / s;
|
|
3769
|
-
},
|
|
3799
|
+
}, Jo = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
3770
3800
|
__proto__: null,
|
|
3771
|
-
abs:
|
|
3772
|
-
add:
|
|
3773
|
-
closeTo:
|
|
3774
|
-
div:
|
|
3775
|
-
equal:
|
|
3776
|
-
isInteger:
|
|
3777
|
-
max:
|
|
3778
|
-
min:
|
|
3779
|
-
mult:
|
|
3780
|
-
roundBySpan:
|
|
3781
|
-
roundToNearestMagnitude:
|
|
3801
|
+
abs: lr,
|
|
3802
|
+
add: ae,
|
|
3803
|
+
closeTo: kn,
|
|
3804
|
+
div: Oe,
|
|
3805
|
+
equal: ot,
|
|
3806
|
+
isInteger: Le,
|
|
3807
|
+
max: zn,
|
|
3808
|
+
min: ur,
|
|
3809
|
+
mult: C,
|
|
3810
|
+
roundBySpan: ca,
|
|
3811
|
+
roundToNearestMagnitude: qn,
|
|
3782
3812
|
sub: q
|
|
3783
3813
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
3784
3814
|
a.object({
|
|
@@ -3786,66 +3816,120 @@ a.object({
|
|
|
3786
3816
|
maxRetries: a.number().optional(),
|
|
3787
3817
|
scale: a.number().optional()
|
|
3788
3818
|
});
|
|
3789
|
-
const
|
|
3819
|
+
const ha = /^#?([0-9a-f]{6}|[0-9a-f]{8})$/i, ke = a.string().regex(ha), ne = a.number().min(0).max(255), Zr = a.number().min(0).max(1), Je = a.tuple([ne, ne, ne, Zr]), fa = a.tuple([ne, ne, ne]), da = a.object({ rgba255: Je }), ga = a.number().min(0).max(360), pa = a.number().min(0).max(100), ma = a.number().min(0).max(100), Yr = a.tuple([ga, pa, ma, Zr]), Xe = a.union([ke, fa, Je, Yr, da]), Ke = Xe.transform((t) => x(t)), ya = (t) => Ke.safeParse(t).success, wa = (t) => Je.safeParse(t).success, ba = (t) => {
|
|
3790
3820
|
if (t == null) return;
|
|
3791
|
-
const e =
|
|
3792
|
-
if (e.success) return
|
|
3821
|
+
const e = Ke.safeParse(t);
|
|
3822
|
+
if (e.success) return Wr(e.data);
|
|
3793
3823
|
if (typeof t == "string") return t;
|
|
3794
3824
|
throw e.error;
|
|
3795
3825
|
}, x = (t, e = 1) => {
|
|
3796
|
-
if (t =
|
|
3826
|
+
if (t = Xe.parse(t), typeof t == "string") return Re(t, e);
|
|
3797
3827
|
if (Array.isArray(t)) {
|
|
3798
3828
|
if (t.length < 3 || t.length > 4)
|
|
3799
3829
|
throw new Error(`Invalid color: [${t.join(", ")}]`);
|
|
3800
3830
|
return t.length === 3 ? [...t, e] : t;
|
|
3801
3831
|
}
|
|
3802
3832
|
return t.rgba255;
|
|
3803
|
-
},
|
|
3833
|
+
}, Fr = (t, e) => {
|
|
3804
3834
|
if (t == null || e == null) return t == e;
|
|
3805
3835
|
const r = x(t), n = x(e);
|
|
3806
3836
|
return r.every((s, i) => s === n[i]);
|
|
3807
|
-
},
|
|
3837
|
+
}, Oa = (t) => {
|
|
3808
3838
|
if (t == null) return;
|
|
3809
3839
|
const [e, r, n, s] = x(t);
|
|
3810
|
-
return `#${
|
|
3811
|
-
},
|
|
3840
|
+
return `#${Se(e)}${Se(r)}${Se(n)}${s === 1 ? "" : Se(s * 255)}`;
|
|
3841
|
+
}, Wr = (t) => {
|
|
3812
3842
|
const [e, r, n, s] = x(t);
|
|
3813
3843
|
return `rgba(${e}, ${r}, ${n}, ${s})`;
|
|
3814
|
-
},
|
|
3844
|
+
}, va = (t) => `rgb(${Vr(t)})`, Vr = (t) => {
|
|
3815
3845
|
const [e, r, n] = x(t);
|
|
3816
3846
|
return `${e}, ${r}, ${n}`;
|
|
3817
|
-
},
|
|
3818
|
-
ce(t) / 255,
|
|
3847
|
+
}, xa = (t) => [...Zt(t), ge(t)], Zt = (t) => [
|
|
3819
3848
|
he(t) / 255,
|
|
3820
|
-
fe(t) / 255
|
|
3821
|
-
|
|
3849
|
+
fe(t) / 255,
|
|
3850
|
+
de(t) / 255
|
|
3851
|
+
], he = (t) => x(t)[0], fe = (t) => x(t)[1], de = (t) => x(t)[2], ge = (t) => x(t)[3], $a = (t) => Fr(Yt, t), Ta = (t) => Ca(x(t)), Sa = (t, e) => {
|
|
3822
3852
|
const [r, n, s] = x(t);
|
|
3823
3853
|
if (e > 100)
|
|
3824
3854
|
throw new Error(`Color opacity must be between 0 and 100, got ${e}`);
|
|
3825
3855
|
return e > 1 && (e /= 100), [r, n, s, e];
|
|
3826
|
-
},
|
|
3827
|
-
const [e, r, n] =
|
|
3856
|
+
}, we = (t) => {
|
|
3857
|
+
const [e, r, n] = Zt(t).map(
|
|
3828
3858
|
(s) => s <= 0.03928 ? s / 12.92 : ((s + 0.055) / 1.055) ** 2.4
|
|
3829
3859
|
);
|
|
3830
3860
|
return Number((0.2126 * e + 0.7152 * r + 0.0722 * n).toFixed(3));
|
|
3831
|
-
},
|
|
3832
|
-
const [e, r, n] =
|
|
3861
|
+
}, Na = (t) => {
|
|
3862
|
+
const [e, r, n] = Zt(t);
|
|
3833
3863
|
return 1 - (Math.max(e, r, n) - Math.min(e, r, n));
|
|
3834
|
-
},
|
|
3835
|
-
const r = x(t), n = x(e), s =
|
|
3864
|
+
}, yt = (t, e) => {
|
|
3865
|
+
const r = x(t), n = x(e), s = we(r), i = we(n);
|
|
3836
3866
|
return (Math.max(s, i) + 0.5) / (Math.min(s, i) + 0.5);
|
|
3837
|
-
},
|
|
3867
|
+
}, Ia = (t, ...e) => {
|
|
3838
3868
|
if (e.length === 0)
|
|
3839
3869
|
throw new Error("[Color.pickByContrast] - must provide at least one color");
|
|
3840
|
-
const r = x(t), [n] = e.sort((s, i) =>
|
|
3870
|
+
const r = x(t), [n] = e.sort((s, i) => yt(r, i) - yt(r, s));
|
|
3841
3871
|
return x(n);
|
|
3842
|
-
},
|
|
3843
|
-
|
|
3844
|
-
|
|
3845
|
-
|
|
3846
|
-
t.length === 8 ?
|
|
3847
|
-
]),
|
|
3848
|
-
|
|
3872
|
+
}, Ma = (t) => we(t) < 0.5, Ea = (t) => we(t) > 0.5, Re = (t, e = 1) => (t = ke.parse(t), t = Aa(t), [
|
|
3873
|
+
Ne(t, 0),
|
|
3874
|
+
Ne(t, 2),
|
|
3875
|
+
Ne(t, 4),
|
|
3876
|
+
t.length === 8 ? Ne(t, 6) / 255 : e
|
|
3877
|
+
]), Yt = [0, 0, 0, 0], Se = (t) => Math.floor(t).toString(16).padStart(2, "0"), Ne = (t, e) => parseInt(t.slice(e, e + 2), 16), Aa = (t) => t.startsWith("#") ? t.slice(1) : t, Ht = {
|
|
3878
|
+
black: "#000000",
|
|
3879
|
+
white: "#ffffff",
|
|
3880
|
+
red: "#ff0000",
|
|
3881
|
+
green: "#008000",
|
|
3882
|
+
blue: "#0000ff",
|
|
3883
|
+
yellow: "#ffff00",
|
|
3884
|
+
cyan: "#00ffff",
|
|
3885
|
+
magenta: "#ff00ff",
|
|
3886
|
+
silver: "#c0c0c0",
|
|
3887
|
+
gray: "#808080",
|
|
3888
|
+
grey: "#808080",
|
|
3889
|
+
maroon: "#800000",
|
|
3890
|
+
olive: "#808000",
|
|
3891
|
+
lime: "#00ff00",
|
|
3892
|
+
aqua: "#00ffff",
|
|
3893
|
+
teal: "#008080",
|
|
3894
|
+
navy: "#000080",
|
|
3895
|
+
fuchsia: "#ff00ff",
|
|
3896
|
+
purple: "#800080",
|
|
3897
|
+
orange: "#ffa500",
|
|
3898
|
+
brown: "#a52a2a",
|
|
3899
|
+
tan: "#d2b48c",
|
|
3900
|
+
gold: "#ffd700",
|
|
3901
|
+
indigo: "#4b0082",
|
|
3902
|
+
violet: "#ee82ee",
|
|
3903
|
+
pink: "#ffc0cb",
|
|
3904
|
+
coral: "#ff7f50",
|
|
3905
|
+
salmon: "#fa8072",
|
|
3906
|
+
khaki: "#f0e68c",
|
|
3907
|
+
crimson: "#dc143c",
|
|
3908
|
+
transparent: "transparent"
|
|
3909
|
+
}, Ba = (t) => {
|
|
3910
|
+
if (!t) return;
|
|
3911
|
+
const e = t.trim().toLowerCase();
|
|
3912
|
+
if (!(e === "transparent" || e === "none")) {
|
|
3913
|
+
if (e.startsWith("#")) {
|
|
3914
|
+
if (e.length === 4) {
|
|
3915
|
+
const r = e[1], n = e[2], s = e[3], i = `#${r}${r}${n}${n}${s}${s}`;
|
|
3916
|
+
if (ke.safeParse(i).success) return Re(i);
|
|
3917
|
+
}
|
|
3918
|
+
return (e.length === 7 || e.length === 9) && ke.safeParse(e).success ? Re(e) : void 0;
|
|
3919
|
+
}
|
|
3920
|
+
if (e.startsWith("rgb")) {
|
|
3921
|
+
const r = e.match(
|
|
3922
|
+
/rgba?\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*([\d.]+))?\s*\)/
|
|
3923
|
+
);
|
|
3924
|
+
if (r) {
|
|
3925
|
+
const [, n, s, i, o] = r;
|
|
3926
|
+
return [parseInt(n), parseInt(s), parseInt(i), o ? parseFloat(o) : 1];
|
|
3927
|
+
}
|
|
3928
|
+
}
|
|
3929
|
+
if (Ht[e]) return Re(Ht[e]);
|
|
3930
|
+
}
|
|
3931
|
+
}, Ua = (t) => {
|
|
3932
|
+
t = Yr.parse(t);
|
|
3849
3933
|
let [e, r, n] = t;
|
|
3850
3934
|
const s = t[3];
|
|
3851
3935
|
e /= 360, r /= 100, n /= 100;
|
|
@@ -3854,11 +3938,11 @@ const aa = /^#?([0-9a-f]{6}|[0-9a-f]{8})$/i, Pr = a.string().regex(aa), re = a.n
|
|
|
3854
3938
|
i = o = c = n;
|
|
3855
3939
|
else {
|
|
3856
3940
|
const h = n < 0.5 ? n * (1 + r) : n + r - n * r, l = 2 * n - h;
|
|
3857
|
-
i =
|
|
3941
|
+
i = rt(l, h, e + 1 / 3), o = rt(l, h, e), c = rt(l, h, e - 1 / 3);
|
|
3858
3942
|
}
|
|
3859
3943
|
return [Math.round(i * 255), Math.round(o * 255), Math.round(c * 255), s];
|
|
3860
|
-
},
|
|
3861
|
-
t =
|
|
3944
|
+
}, rt = (t, e, r) => (r < 0 && (r += 1), r > 1 && (r -= 1), r < 1 / 6 ? t + (e - t) * 6 * r : r < 1 / 2 ? e : r < 2 / 3 ? t + (e - t) * (2 / 3 - r) * 6 : t), Ca = (t) => {
|
|
3945
|
+
t = Je.parse(t);
|
|
3862
3946
|
let [e, r, n] = t;
|
|
3863
3947
|
const s = t[3];
|
|
3864
3948
|
e /= 255, r /= 255, n /= 255;
|
|
@@ -3871,13 +3955,13 @@ const aa = /^#?([0-9a-f]{6}|[0-9a-f]{8})$/i, Pr = a.string().regex(aa), re = a.n
|
|
|
3871
3955
|
h = l > 0.5 ? d / (2 - i - o) : d / (i + o), i === e ? c = (r - n) / d + (r < n ? 6 : 0) : i === r ? c = (n - e) / d + 2 : c = (e - r) / d + 4, c /= 6;
|
|
3872
3956
|
}
|
|
3873
3957
|
return c *= 360, h *= 100, l *= 100, [Math.round(c), Math.round(h), Math.round(l), s];
|
|
3874
|
-
},
|
|
3958
|
+
}, ja = x("#000000"), Ra = x("#ffffff"), Gr = a.object({
|
|
3875
3959
|
key: a.string(),
|
|
3876
|
-
color:
|
|
3960
|
+
color: Xe,
|
|
3877
3961
|
position: a.number(),
|
|
3878
3962
|
switched: a.boolean().optional()
|
|
3879
|
-
}),
|
|
3880
|
-
if (t.length === 0) return
|
|
3963
|
+
}), La = a.array(Gr), Da = (t, e) => {
|
|
3964
|
+
if (t.length === 0) return Yt;
|
|
3881
3965
|
if (t = t.slice().sort((r, n) => r.position - n.position), e <= t[0].position) return x(t[0].color);
|
|
3882
3966
|
if (e >= t[t.length - 1].position)
|
|
3883
3967
|
return x(t[t.length - 1].color);
|
|
@@ -3887,161 +3971,162 @@ const aa = /^#?([0-9a-f]{6}|[0-9a-f]{8})$/i, Pr = a.string().regex(aa), re = a.n
|
|
|
3887
3971
|
if (e === n.position) return x(n.color);
|
|
3888
3972
|
if (e === s.position) return x(s.color);
|
|
3889
3973
|
const i = (e - n.position) / (s.position - n.position), o = x(n.color), c = x(s.color), h = Math.round(
|
|
3890
|
-
ce(o) + i * (ce(c) - ce(o))
|
|
3891
|
-
), l = Math.round(
|
|
3892
3974
|
he(o) + i * (he(c) - he(o))
|
|
3893
|
-
),
|
|
3975
|
+
), l = Math.round(
|
|
3894
3976
|
fe(o) + i * (fe(c) - fe(o))
|
|
3895
|
-
),
|
|
3896
|
-
|
|
3977
|
+
), d = Math.round(
|
|
3978
|
+
de(o) + i * (de(c) - de(o))
|
|
3979
|
+
), y = ge(o) + i * (ge(c) - ge(o));
|
|
3980
|
+
return x([h, l, d, y]);
|
|
3897
3981
|
}
|
|
3898
3982
|
return x(t[t.length - 1].color);
|
|
3899
|
-
},
|
|
3983
|
+
}, Pa = a.object({
|
|
3900
3984
|
key: a.string(),
|
|
3901
3985
|
name: a.string(),
|
|
3902
|
-
color:
|
|
3903
|
-
}),
|
|
3986
|
+
color: Ke
|
|
3987
|
+
}), ka = a.object({
|
|
3904
3988
|
key: a.string(),
|
|
3905
3989
|
name: a.string(),
|
|
3906
|
-
swatches: a.array(
|
|
3907
|
-
}),
|
|
3990
|
+
swatches: a.array(Pa)
|
|
3991
|
+
}), qa = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
3908
3992
|
__proto__: null,
|
|
3909
|
-
BLACK:
|
|
3910
|
-
WHITE:
|
|
3911
|
-
ZERO:
|
|
3912
|
-
aValue:
|
|
3913
|
-
bValue:
|
|
3914
|
-
colorZ:
|
|
3993
|
+
BLACK: ja,
|
|
3994
|
+
WHITE: Ra,
|
|
3995
|
+
ZERO: Yt,
|
|
3996
|
+
aValue: ge,
|
|
3997
|
+
bValue: de,
|
|
3998
|
+
colorZ: Ke,
|
|
3915
3999
|
construct: x,
|
|
3916
|
-
contrast:
|
|
3917
|
-
crudeZ:
|
|
3918
|
-
cssString:
|
|
3919
|
-
equals:
|
|
3920
|
-
|
|
3921
|
-
|
|
3922
|
-
|
|
3923
|
-
|
|
3924
|
-
|
|
3925
|
-
|
|
3926
|
-
|
|
3927
|
-
|
|
3928
|
-
|
|
3929
|
-
|
|
3930
|
-
|
|
3931
|
-
|
|
3932
|
-
|
|
3933
|
-
|
|
3934
|
-
|
|
3935
|
-
|
|
3936
|
-
|
|
3937
|
-
|
|
3938
|
-
|
|
3939
|
-
|
|
3940
|
-
|
|
3941
|
-
|
|
3942
|
-
|
|
3943
|
-
|
|
3944
|
-
|
|
3945
|
-
|
|
4000
|
+
contrast: yt,
|
|
4001
|
+
crudeZ: Xe,
|
|
4002
|
+
cssString: ba,
|
|
4003
|
+
equals: Fr,
|
|
4004
|
+
fromCSS: Ba,
|
|
4005
|
+
fromGradient: Da,
|
|
4006
|
+
fromHSLA: Ua,
|
|
4007
|
+
gValue: fe,
|
|
4008
|
+
gradientZ: La,
|
|
4009
|
+
grayness: Na,
|
|
4010
|
+
hex: Oa,
|
|
4011
|
+
hsla: Ta,
|
|
4012
|
+
isColor: wa,
|
|
4013
|
+
isCrude: ya,
|
|
4014
|
+
isDark: Ma,
|
|
4015
|
+
isLight: Ea,
|
|
4016
|
+
isZero: $a,
|
|
4017
|
+
luminance: we,
|
|
4018
|
+
paletteZ: ka,
|
|
4019
|
+
pickByContrast: Ia,
|
|
4020
|
+
rValue: he,
|
|
4021
|
+
rgbCSS: va,
|
|
4022
|
+
rgbString: Vr,
|
|
4023
|
+
rgba1: xa,
|
|
4024
|
+
rgbaCSS: Wr,
|
|
4025
|
+
setAlpha: Sa,
|
|
4026
|
+
stopZ: Gr
|
|
4027
|
+
}, Symbol.toStringTag, { value: "Module" })), Hr = a.int().min(0).max(255), Jr = 255, Xr = 0, za = {
|
|
4028
|
+
lower: Xr,
|
|
4029
|
+
upper: Jr + 1
|
|
4030
|
+
}, Kr = a.object({
|
|
3946
4031
|
name: a.string(),
|
|
3947
4032
|
key: a.string()
|
|
3948
4033
|
}), be = (t) => a.object({
|
|
3949
|
-
subject:
|
|
4034
|
+
subject: Kr,
|
|
3950
4035
|
resource: t,
|
|
3951
|
-
authority:
|
|
3952
|
-
}),
|
|
4036
|
+
authority: Hr
|
|
4037
|
+
}), Za = (...t) => (e) => e.filter((r) => {
|
|
3953
4038
|
let n = !1;
|
|
3954
4039
|
return r.to != null && (n = t.includes(r.to.resource)), r.from != null && !n && (n = t.includes(r.from.resource)), n;
|
|
3955
|
-
}),
|
|
4040
|
+
}), Qr = (t) => a.object({
|
|
3956
4041
|
from: be(t),
|
|
3957
4042
|
to: a.null()
|
|
3958
|
-
}),
|
|
4043
|
+
}), _r = (t) => a.object({
|
|
3959
4044
|
from: a.null(),
|
|
3960
4045
|
to: be(t)
|
|
3961
|
-
}),
|
|
3962
|
-
|
|
3963
|
-
|
|
4046
|
+
}), Ya = (t) => a.union([
|
|
4047
|
+
Qr(t),
|
|
4048
|
+
_r(t),
|
|
3964
4049
|
a.object({
|
|
3965
4050
|
from: be(t),
|
|
3966
4051
|
to: be(t)
|
|
3967
4052
|
})
|
|
3968
|
-
]),
|
|
4053
|
+
]), Xo = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
3969
4054
|
__proto__: null,
|
|
3970
|
-
ABSOLUTE_AUTHORITY:
|
|
3971
|
-
AUTHORITY_BOUNDS:
|
|
3972
|
-
ZERO_AUTHORITY:
|
|
3973
|
-
acquireZ:
|
|
3974
|
-
authorityZ:
|
|
3975
|
-
filterTransfersByChannelKey:
|
|
3976
|
-
releaseZ:
|
|
4055
|
+
ABSOLUTE_AUTHORITY: Jr,
|
|
4056
|
+
AUTHORITY_BOUNDS: za,
|
|
4057
|
+
ZERO_AUTHORITY: Xr,
|
|
4058
|
+
acquireZ: _r,
|
|
4059
|
+
authorityZ: Hr,
|
|
4060
|
+
filterTransfersByChannelKey: Za,
|
|
4061
|
+
releaseZ: Qr,
|
|
3977
4062
|
stateZ: be,
|
|
3978
|
-
subjectZ:
|
|
3979
|
-
transferZ:
|
|
3980
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
4063
|
+
subjectZ: Kr,
|
|
4064
|
+
transferZ: Ya
|
|
4065
|
+
}, Symbol.toStringTag, { value: "Module" })), Fa = (t) => Object.getOwnPropertySymbols(globalThis).includes(t), Wa = (t, e) => {
|
|
3981
4066
|
const r = Symbol.for(t);
|
|
3982
|
-
if (!
|
|
4067
|
+
if (!Fa(r)) {
|
|
3983
4068
|
const n = e();
|
|
3984
4069
|
Object.defineProperty(globalThis, r, { value: n });
|
|
3985
4070
|
}
|
|
3986
4071
|
return () => globalThis[r];
|
|
3987
|
-
},
|
|
3988
|
-
static discriminator =
|
|
3989
|
-
discriminator =
|
|
4072
|
+
}, en = "sy_x_error", Va = (t) => (e) => e != null && typeof e == "object" && "type" in e && typeof e.type == "string" ? e.type.startsWith(t) : e instanceof Error ? e.message.startsWith(t) : typeof e != "string" ? !1 : e.startsWith(t), tn = (t) => class ce extends Error {
|
|
4073
|
+
static discriminator = en;
|
|
4074
|
+
discriminator = ce.discriminator;
|
|
3990
4075
|
static TYPE = t;
|
|
3991
|
-
type =
|
|
3992
|
-
static matches =
|
|
3993
|
-
matches =
|
|
4076
|
+
type = ce.TYPE;
|
|
4077
|
+
static matches = Va(t);
|
|
4078
|
+
matches = ce.matches;
|
|
3994
4079
|
constructor(r, n) {
|
|
3995
|
-
super(r, n), this.name =
|
|
4080
|
+
super(r, n), this.name = ce.TYPE;
|
|
3996
4081
|
}
|
|
3997
4082
|
static sub(r) {
|
|
3998
|
-
return
|
|
4083
|
+
return tn(`${t}.${r}`);
|
|
3999
4084
|
}
|
|
4000
|
-
},
|
|
4085
|
+
}, Ga = (t) => {
|
|
4001
4086
|
if (t == null || typeof t != "object") return !1;
|
|
4002
4087
|
const e = t;
|
|
4003
|
-
if (e.discriminator !==
|
|
4088
|
+
if (e.discriminator !== en) return !1;
|
|
4004
4089
|
if (!("type" in e))
|
|
4005
4090
|
throw new Error(
|
|
4006
4091
|
`X Error is missing its type property: ${JSON.stringify(e)}`
|
|
4007
4092
|
);
|
|
4008
4093
|
return !0;
|
|
4009
|
-
},
|
|
4010
|
-
class
|
|
4094
|
+
}, oe = "unknown", Jt = "nil";
|
|
4095
|
+
class Ha {
|
|
4011
4096
|
providers = [];
|
|
4012
4097
|
register(e) {
|
|
4013
4098
|
this.providers.push(e);
|
|
4014
4099
|
}
|
|
4015
4100
|
encode(e) {
|
|
4016
|
-
if (e == null) return { type:
|
|
4017
|
-
if (
|
|
4101
|
+
if (e == null) return { type: Jt, data: "" };
|
|
4102
|
+
if (Ga(e))
|
|
4018
4103
|
for (const r of this.providers) {
|
|
4019
4104
|
const n = r.encode(e);
|
|
4020
4105
|
if (n != null) return n;
|
|
4021
4106
|
}
|
|
4022
|
-
if (e instanceof Error) return { type:
|
|
4023
|
-
if (typeof e == "string") return { type:
|
|
4107
|
+
if (e instanceof Error) return { type: oe, data: e.message };
|
|
4108
|
+
if (typeof e == "string") return { type: oe, data: e };
|
|
4024
4109
|
try {
|
|
4025
|
-
return { type:
|
|
4110
|
+
return { type: oe, data: JSON.stringify(e) };
|
|
4026
4111
|
} catch {
|
|
4027
|
-
return { type:
|
|
4112
|
+
return { type: oe, data: "unable to encode error information" };
|
|
4028
4113
|
}
|
|
4029
4114
|
}
|
|
4030
4115
|
decode(e) {
|
|
4031
|
-
if (e == null || e.type ===
|
|
4032
|
-
if (e.type ===
|
|
4116
|
+
if (e == null || e.type === Jt) return null;
|
|
4117
|
+
if (e.type === oe) return new Xt(e.data);
|
|
4033
4118
|
for (const r of this.providers) {
|
|
4034
4119
|
const n = r.decode(e);
|
|
4035
4120
|
if (n != null) return n;
|
|
4036
4121
|
}
|
|
4037
|
-
return new
|
|
4122
|
+
return new Xt(e.data);
|
|
4038
4123
|
}
|
|
4039
4124
|
}
|
|
4040
|
-
|
|
4041
|
-
class
|
|
4125
|
+
Wa("synnax-error-registry", () => new Ha());
|
|
4126
|
+
class Xt extends tn("unknown") {
|
|
4042
4127
|
}
|
|
4043
4128
|
a.object({ type: a.string(), data: a.string() });
|
|
4044
|
-
const
|
|
4129
|
+
const Ko = () => new Promise((t) => setTimeout(t, 0)), Ja = S.object({
|
|
4045
4130
|
jsonrpc: S.literal("2.0"),
|
|
4046
4131
|
method: S.string(),
|
|
4047
4132
|
// params should be z.union([z.record(z.string(), z.json()),
|
|
@@ -4049,12 +4134,12 @@ const Wo = () => new Promise((t) => setTimeout(t, 0)), Ya = S.object({
|
|
|
4049
4134
|
// definition of params then in the JSON-RPC spec.
|
|
4050
4135
|
params: S.any().optional(),
|
|
4051
4136
|
id: S.union([S.string(), S.number(), S.null()]).optional()
|
|
4052
|
-
}),
|
|
4137
|
+
}), rn = S.object({
|
|
4053
4138
|
jsonrpc: S.literal("2.0"),
|
|
4054
4139
|
id: S.union([S.string(), S.number(), S.null()])
|
|
4055
|
-
}),
|
|
4140
|
+
}), Xa = rn.extend({
|
|
4056
4141
|
result: S.json()
|
|
4057
|
-
}),
|
|
4142
|
+
}), Ka = rn.extend({
|
|
4058
4143
|
error: S.object({
|
|
4059
4144
|
code: S.number().int(),
|
|
4060
4145
|
// This should be z.string(), but the VSCode JSON RPC implementation uses a looser
|
|
@@ -4062,31 +4147,31 @@ const Wo = () => new Promise((t) => setTimeout(t, 0)), Ya = S.object({
|
|
|
4062
4147
|
message: S.string().optional(),
|
|
4063
4148
|
data: S.json().optional()
|
|
4064
4149
|
})
|
|
4065
|
-
}),
|
|
4066
|
-
S.union([
|
|
4067
|
-
const
|
|
4150
|
+
}), Qa = S.union([Xa, Ka]);
|
|
4151
|
+
S.union([Ja, Qa]);
|
|
4152
|
+
const _a = (t, e, r) => {
|
|
4068
4153
|
const n = t.get(e);
|
|
4069
4154
|
return n === void 0 ? (t.set(e, r), r) : n;
|
|
4070
|
-
},
|
|
4155
|
+
}, Qo = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
4071
4156
|
__proto__: null,
|
|
4072
|
-
getOrSetDefault:
|
|
4073
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
4157
|
+
getOrSetDefault: _a
|
|
4158
|
+
}, Symbol.toStringTag, { value: "Module" })), wt = a.string().regex(/^\d+\.\d+\.\d+$/), $e = (t, e, r = {}) => {
|
|
4074
4159
|
r.checkMajor ??= !0, r.checkMinor ??= !0, r.checkPatch ??= !0;
|
|
4075
|
-
const n =
|
|
4160
|
+
const n = wt.parse(t), s = wt.parse(e), [i, o, c] = n.split(".").map(Number), [h, l, d] = s.split(".").map(Number);
|
|
4076
4161
|
if (r.checkMajor) {
|
|
4077
|
-
if (i < h) return
|
|
4078
|
-
if (i > h) return
|
|
4162
|
+
if (i < h) return Me;
|
|
4163
|
+
if (i > h) return Ee;
|
|
4079
4164
|
}
|
|
4080
4165
|
if (r.checkMinor) {
|
|
4081
|
-
if (o < l) return
|
|
4082
|
-
if (o > l) return
|
|
4166
|
+
if (o < l) return Me;
|
|
4167
|
+
if (o > l) return Ee;
|
|
4083
4168
|
}
|
|
4084
4169
|
if (r.checkPatch) {
|
|
4085
|
-
if (c < d) return
|
|
4086
|
-
if (c > d) return
|
|
4170
|
+
if (c < d) return Me;
|
|
4171
|
+
if (c > d) return Ee;
|
|
4087
4172
|
}
|
|
4088
|
-
return
|
|
4089
|
-
},
|
|
4173
|
+
return se;
|
|
4174
|
+
}, eo = (t, e, r = {}) => ir($e(t, e, r)), nn = (t, e, r = {}) => sr($e(t, e, r)), to = (t, e, r = {}) => nr($e(t, e, r)), ro = ({
|
|
4090
4175
|
name: t,
|
|
4091
4176
|
migrate: e
|
|
4092
4177
|
}) => (r) => {
|
|
@@ -4096,14 +4181,14 @@ const Ha = (t, e, r) => {
|
|
|
4096
4181
|
} catch (n) {
|
|
4097
4182
|
throw console.log(`${t} failed to migrate from ${r.version}`), console.error(n), n;
|
|
4098
4183
|
}
|
|
4099
|
-
},
|
|
4184
|
+
}, no = ({
|
|
4100
4185
|
name: t,
|
|
4101
4186
|
migrations: e,
|
|
4102
4187
|
targetSchema: r,
|
|
4103
4188
|
defaultVersion: n,
|
|
4104
4189
|
def: s
|
|
4105
4190
|
}) => {
|
|
4106
|
-
const i = Object.keys(e).sort(
|
|
4191
|
+
const i = Object.keys(e).sort($e).pop();
|
|
4107
4192
|
if (i == null)
|
|
4108
4193
|
return (l) => {
|
|
4109
4194
|
if (l.version ??= n, l.version !== s.version)
|
|
@@ -4122,9 +4207,9 @@ const Ha = (t, e, r) => {
|
|
|
4122
4207
|
let c = !1;
|
|
4123
4208
|
const h = (l) => {
|
|
4124
4209
|
try {
|
|
4125
|
-
if (o === 0 ||
|
|
4210
|
+
if (o === 0 || nn(l.version, i))
|
|
4126
4211
|
return console.log(c ? `${t} ${l.version} now up to date` : `${t} version ${l.version} is up to date with target version ${s.version}`), l;
|
|
4127
|
-
const d = l.version,
|
|
4212
|
+
const d = l.version, y = e[d], p = y(l);
|
|
4128
4213
|
return c = !0, h(p);
|
|
4129
4214
|
} catch (d) {
|
|
4130
4215
|
return console.log(
|
|
@@ -4148,16 +4233,16 @@ const Ha = (t, e, r) => {
|
|
|
4148
4233
|
return console.log(`${t} failed to parse final result. Exiting with default`), console.error(d), s;
|
|
4149
4234
|
}
|
|
4150
4235
|
};
|
|
4151
|
-
},
|
|
4236
|
+
}, _o = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
4152
4237
|
__proto__: null,
|
|
4153
|
-
compareSemVer:
|
|
4154
|
-
createMigration:
|
|
4155
|
-
migrator:
|
|
4156
|
-
semVerNewer:
|
|
4157
|
-
semVerOlder:
|
|
4158
|
-
semVerZ:
|
|
4159
|
-
versionsEqual:
|
|
4160
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
4238
|
+
compareSemVer: $e,
|
|
4239
|
+
createMigration: ro,
|
|
4240
|
+
migrator: no,
|
|
4241
|
+
semVerNewer: nn,
|
|
4242
|
+
semVerOlder: to,
|
|
4243
|
+
semVerZ: wt,
|
|
4244
|
+
versionsEqual: eo
|
|
4245
|
+
}, Symbol.toStringTag, { value: "Module" })), sn = ["standard", "scientific", "engineering"], so = a.enum(sn), io = (t, e, r) => {
|
|
4161
4246
|
if (Number.isNaN(t)) return "NaN";
|
|
4162
4247
|
if (t === 1 / 0) return "∞";
|
|
4163
4248
|
if (t === -1 / 0) return "-∞";
|
|
@@ -4166,28 +4251,28 @@ const Ha = (t, e, r) => {
|
|
|
4166
4251
|
return e === 0 ? "0ᴇ0" : `0.${"0".repeat(e)}ᴇ0`;
|
|
4167
4252
|
let n;
|
|
4168
4253
|
return r === "scientific" ? n = Math.floor(Math.log10(Math.abs(t))) : n = Math.floor(Math.log10(Math.abs(t)) / 3) * 3, `${(t / 10 ** n).toFixed(e)}ᴇ${n}`;
|
|
4169
|
-
},
|
|
4254
|
+
}, eu = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
4170
4255
|
__proto__: null,
|
|
4171
|
-
NOTATIONS:
|
|
4172
|
-
notationZ:
|
|
4173
|
-
stringifyNumber:
|
|
4174
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
4256
|
+
NOTATIONS: sn,
|
|
4257
|
+
notationZ: so,
|
|
4258
|
+
stringifyNumber: io
|
|
4259
|
+
}, Symbol.toStringTag, { value: "Module" })), tu = (t) => Array.isArray(t) ? [...t] : typeof t == "object" && t !== null ? { ...t } : t, an = a.enum([
|
|
4175
4260
|
"success",
|
|
4176
4261
|
"info",
|
|
4177
4262
|
"warning",
|
|
4178
4263
|
"error",
|
|
4179
4264
|
"loading",
|
|
4180
4265
|
"disabled"
|
|
4181
|
-
]),
|
|
4266
|
+
]), ao = (t) => a.object({
|
|
4182
4267
|
key: a.string(),
|
|
4183
|
-
variant:
|
|
4268
|
+
variant: an,
|
|
4184
4269
|
message: a.string(),
|
|
4185
4270
|
description: a.string().optional(),
|
|
4186
|
-
time:
|
|
4271
|
+
time: w.z,
|
|
4187
4272
|
details: t ?? a.unknown().optional()
|
|
4188
|
-
}),
|
|
4273
|
+
}), oo = (t, e) => {
|
|
4189
4274
|
if (!(t instanceof Error)) throw t;
|
|
4190
|
-
return
|
|
4275
|
+
return on({
|
|
4191
4276
|
variant: "error",
|
|
4192
4277
|
message: e ?? t.message,
|
|
4193
4278
|
description: e != null ? t.message : void 0,
|
|
@@ -4195,22 +4280,29 @@ const Ha = (t, e, r) => {
|
|
|
4195
4280
|
stack: t.stack ?? ""
|
|
4196
4281
|
}
|
|
4197
4282
|
});
|
|
4198
|
-
},
|
|
4199
|
-
key:
|
|
4200
|
-
time:
|
|
4283
|
+
}, on = (t) => ({
|
|
4284
|
+
key: qt(),
|
|
4285
|
+
time: w.now(),
|
|
4201
4286
|
...t
|
|
4202
|
-
}),
|
|
4287
|
+
}), uo = (t, e = []) => {
|
|
4288
|
+
if (t != null)
|
|
4289
|
+
return Array.isArray(e) ? e.includes(t) ? t : void 0 : e === t ? t : void 0;
|
|
4290
|
+
}, lo = (t, e = []) => {
|
|
4291
|
+
if (t != null)
|
|
4292
|
+
return Array.isArray(e) ? e.includes(t) ? void 0 : t : e === t ? void 0 : t;
|
|
4293
|
+
}, ru = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
4203
4294
|
__proto__: null,
|
|
4204
|
-
create:
|
|
4205
|
-
|
|
4206
|
-
|
|
4207
|
-
|
|
4208
|
-
|
|
4209
|
-
|
|
4295
|
+
create: on,
|
|
4296
|
+
fromException: oo,
|
|
4297
|
+
keepVariants: uo,
|
|
4298
|
+
removeVariants: lo,
|
|
4299
|
+
statusZ: ao,
|
|
4300
|
+
variantZ: an
|
|
4301
|
+
}, Symbol.toStringTag, { value: "Module" })), co = (t, e = "") => {
|
|
4210
4302
|
if (typeof t == "string") return t;
|
|
4211
4303
|
const r = t.length;
|
|
4212
4304
|
return r === 0 ? e : r === 1 ? t[0] : r === 2 ? `${t[0]} and ${t[1]}` : `${t.slice(0, -1).join(", ")}, and ${t[r - 1]}`;
|
|
4213
|
-
},
|
|
4305
|
+
}, ho = (t) => {
|
|
4214
4306
|
const e = t.split(" "), r = /* @__PURE__ */ new Set(), n = e.map((o) => o.charAt(0).toLowerCase()).join("");
|
|
4215
4307
|
r.add(n.replace(/-/g, "_")), r.add(n.replace(/(.)(.)/g, "$1_$2").replace(/-/g, "_"));
|
|
4216
4308
|
const s = /\d+/g;
|
|
@@ -4228,13 +4320,13 @@ const Ha = (t, e, r) => {
|
|
|
4228
4320
|
return r.add(i.join("").replace(/-/g, "_")), r.add(i.join("_").replace(/-/g, "_")), Array.from(r).filter(
|
|
4229
4321
|
(o) => o.length >= 2 && o.length <= 12 && !/^\d/.test(o)
|
|
4230
4322
|
);
|
|
4231
|
-
},
|
|
4323
|
+
}, fo = (t, e) => t.startsWith(e) ? t.slice(e.length) : t, nu = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
4232
4324
|
__proto__: null,
|
|
4233
|
-
createShortIdentifiers:
|
|
4234
|
-
naturalLanguageJoin:
|
|
4235
|
-
trimPrefix:
|
|
4236
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
4237
|
-
var
|
|
4325
|
+
createShortIdentifiers: ho,
|
|
4326
|
+
naturalLanguageJoin: co,
|
|
4327
|
+
trimPrefix: fo
|
|
4328
|
+
}, Symbol.toStringTag, { value: "Module" })), go = new Error("request for lock canceled");
|
|
4329
|
+
var po = function(t, e, r, n) {
|
|
4238
4330
|
function s(i) {
|
|
4239
4331
|
return i instanceof r ? i : new r(function(o) {
|
|
4240
4332
|
o(i);
|
|
@@ -4244,15 +4336,15 @@ var uo = function(t, e, r, n) {
|
|
|
4244
4336
|
function c(d) {
|
|
4245
4337
|
try {
|
|
4246
4338
|
l(n.next(d));
|
|
4247
|
-
} catch (
|
|
4248
|
-
o(
|
|
4339
|
+
} catch (y) {
|
|
4340
|
+
o(y);
|
|
4249
4341
|
}
|
|
4250
4342
|
}
|
|
4251
4343
|
function h(d) {
|
|
4252
4344
|
try {
|
|
4253
4345
|
l(n.throw(d));
|
|
4254
|
-
} catch (
|
|
4255
|
-
o(
|
|
4346
|
+
} catch (y) {
|
|
4347
|
+
o(y);
|
|
4256
4348
|
}
|
|
4257
4349
|
}
|
|
4258
4350
|
function l(d) {
|
|
@@ -4261,20 +4353,20 @@ var uo = function(t, e, r, n) {
|
|
|
4261
4353
|
l((n = n.apply(t, e || [])).next());
|
|
4262
4354
|
});
|
|
4263
4355
|
};
|
|
4264
|
-
class
|
|
4265
|
-
constructor(e, r =
|
|
4356
|
+
class mo {
|
|
4357
|
+
constructor(e, r = go) {
|
|
4266
4358
|
this._value = e, this._cancelError = r, this._queue = [], this._weightedWaiters = [];
|
|
4267
4359
|
}
|
|
4268
4360
|
acquire(e = 1, r = 0) {
|
|
4269
4361
|
if (e <= 0)
|
|
4270
4362
|
throw new Error(`invalid weight ${e}: must be positive`);
|
|
4271
4363
|
return new Promise((n, s) => {
|
|
4272
|
-
const i = { resolve: n, reject: s, weight: e, priority: r }, o =
|
|
4364
|
+
const i = { resolve: n, reject: s, weight: e, priority: r }, o = un(this._queue, (c) => r <= c.priority);
|
|
4273
4365
|
o === -1 && e <= this._value ? this._dispatchItem(i) : this._queue.splice(o + 1, 0, i);
|
|
4274
4366
|
});
|
|
4275
4367
|
}
|
|
4276
4368
|
runExclusive(e) {
|
|
4277
|
-
return
|
|
4369
|
+
return po(this, arguments, void 0, function* (r, n = 1, s = 0) {
|
|
4278
4370
|
const [i, o] = yield this.acquire(n, s);
|
|
4279
4371
|
try {
|
|
4280
4372
|
return yield r(i);
|
|
@@ -4287,7 +4379,7 @@ class lo {
|
|
|
4287
4379
|
if (e <= 0)
|
|
4288
4380
|
throw new Error(`invalid weight ${e}: must be positive`);
|
|
4289
4381
|
return this._couldLockImmediately(e, r) ? Promise.resolve() : new Promise((n) => {
|
|
4290
|
-
this._weightedWaiters[e - 1] || (this._weightedWaiters[e - 1] = []),
|
|
4382
|
+
this._weightedWaiters[e - 1] || (this._weightedWaiters[e - 1] = []), yo(this._weightedWaiters[e - 1], { resolve: n, priority: r });
|
|
4291
4383
|
});
|
|
4292
4384
|
}
|
|
4293
4385
|
isLocked() {
|
|
@@ -4342,17 +4434,17 @@ class lo {
|
|
|
4342
4434
|
return (this._queue.length === 0 || this._queue[0].priority < r) && e <= this._value;
|
|
4343
4435
|
}
|
|
4344
4436
|
}
|
|
4345
|
-
function
|
|
4346
|
-
const r =
|
|
4437
|
+
function yo(t, e) {
|
|
4438
|
+
const r = un(t, (n) => e.priority <= n.priority);
|
|
4347
4439
|
t.splice(r + 1, 0, e);
|
|
4348
4440
|
}
|
|
4349
|
-
function
|
|
4441
|
+
function un(t, e) {
|
|
4350
4442
|
for (let r = t.length - 1; r >= 0; r--)
|
|
4351
4443
|
if (e(t[r]))
|
|
4352
4444
|
return r;
|
|
4353
4445
|
return -1;
|
|
4354
4446
|
}
|
|
4355
|
-
var
|
|
4447
|
+
var wo = function(t, e, r, n) {
|
|
4356
4448
|
function s(i) {
|
|
4357
4449
|
return i instanceof r ? i : new r(function(o) {
|
|
4358
4450
|
o(i);
|
|
@@ -4362,15 +4454,15 @@ var ho = function(t, e, r, n) {
|
|
|
4362
4454
|
function c(d) {
|
|
4363
4455
|
try {
|
|
4364
4456
|
l(n.next(d));
|
|
4365
|
-
} catch (
|
|
4366
|
-
o(
|
|
4457
|
+
} catch (y) {
|
|
4458
|
+
o(y);
|
|
4367
4459
|
}
|
|
4368
4460
|
}
|
|
4369
4461
|
function h(d) {
|
|
4370
4462
|
try {
|
|
4371
4463
|
l(n.throw(d));
|
|
4372
|
-
} catch (
|
|
4373
|
-
o(
|
|
4464
|
+
} catch (y) {
|
|
4465
|
+
o(y);
|
|
4374
4466
|
}
|
|
4375
4467
|
}
|
|
4376
4468
|
function l(d) {
|
|
@@ -4379,12 +4471,12 @@ var ho = function(t, e, r, n) {
|
|
|
4379
4471
|
l((n = n.apply(t, e || [])).next());
|
|
4380
4472
|
});
|
|
4381
4473
|
};
|
|
4382
|
-
class
|
|
4474
|
+
class bo {
|
|
4383
4475
|
constructor(e) {
|
|
4384
|
-
this._semaphore = new
|
|
4476
|
+
this._semaphore = new mo(1, e);
|
|
4385
4477
|
}
|
|
4386
4478
|
acquire() {
|
|
4387
|
-
return
|
|
4479
|
+
return wo(this, arguments, void 0, function* (e = 0) {
|
|
4388
4480
|
const [, r] = yield this._semaphore.acquire(1, e);
|
|
4389
4481
|
return r;
|
|
4390
4482
|
});
|
|
@@ -4405,34 +4497,34 @@ class fo {
|
|
|
4405
4497
|
return this._semaphore.cancel();
|
|
4406
4498
|
}
|
|
4407
4499
|
}
|
|
4408
|
-
class
|
|
4500
|
+
class ln extends bo {
|
|
4409
4501
|
constructor(e) {
|
|
4410
4502
|
super(), Object.assign(this, e);
|
|
4411
4503
|
}
|
|
4412
4504
|
}
|
|
4413
|
-
const
|
|
4505
|
+
const Oo = (t) => new ln(t), su = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
4414
4506
|
__proto__: null,
|
|
4415
|
-
mutex:
|
|
4416
|
-
newMutex:
|
|
4507
|
+
mutex: ln,
|
|
4508
|
+
newMutex: Oo
|
|
4417
4509
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
4418
|
-
function
|
|
4510
|
+
function cn(t) {
|
|
4419
4511
|
var e, r, n = "";
|
|
4420
4512
|
if (typeof t == "string" || typeof t == "number") n += t;
|
|
4421
4513
|
else if (typeof t == "object") if (Array.isArray(t)) {
|
|
4422
4514
|
var s = t.length;
|
|
4423
|
-
for (e = 0; e < s; e++) t[e] && (r =
|
|
4515
|
+
for (e = 0; e < s; e++) t[e] && (r = cn(t[e])) && (n && (n += " "), n += r);
|
|
4424
4516
|
} else for (r in t) t[r] && (n && (n += " "), n += r);
|
|
4425
4517
|
return n;
|
|
4426
4518
|
}
|
|
4427
|
-
function
|
|
4428
|
-
for (var t, e, r = 0, n = "", s = arguments.length; r < s; r++) (t = arguments[r]) && (e =
|
|
4519
|
+
function vo() {
|
|
4520
|
+
for (var t, e, r = 0, n = "", s = arguments.length; r < s; r++) (t = arguments[r]) && (e = cn(t)) && (n && (n += " "), n += e);
|
|
4429
4521
|
return n;
|
|
4430
4522
|
}
|
|
4431
|
-
const
|
|
4432
|
-
const e = (...r) =>
|
|
4433
|
-
return e.B = (...r) => t +
|
|
4523
|
+
const xo = vo, te = "-", Kt = "__", Ie = "--", hn = (t) => {
|
|
4524
|
+
const e = (...r) => xo(...r);
|
|
4525
|
+
return e.B = (...r) => t + te + r.join(te), e.E = (r) => t + Kt + r, e.M = (...r) => t + Ie + r.join("-"), e.BM = (r, ...n) => e.B(r) + Ie + n.join("-"), e.BE = (r, ...n) => e.B(r) + Kt + n.join(te), e.BEM = (r, n, ...s) => e.BE(r, n) + Ie + s.join(te), e.extend = (r) => hn(e.B(r)), e.var = (...r) => Ie + t + te + r.join(te), e;
|
|
4434
4526
|
};
|
|
4435
|
-
class
|
|
4527
|
+
class $o {
|
|
4436
4528
|
rows = [];
|
|
4437
4529
|
columns = [];
|
|
4438
4530
|
prefix;
|
|
@@ -4461,55 +4553,55 @@ class yo {
|
|
|
4461
4553
|
};
|
|
4462
4554
|
}
|
|
4463
4555
|
}
|
|
4464
|
-
const
|
|
4556
|
+
const To = (t, e) => Object.entries(e).forEach(
|
|
4465
4557
|
([r, n]) => n != null && t.style.setProperty(r, `${n}`)
|
|
4466
|
-
),
|
|
4558
|
+
), So = (t, e) => Array.from(t.style).forEach((r) => {
|
|
4467
4559
|
r.startsWith(e) && t.style.removeProperty(r);
|
|
4468
|
-
}),
|
|
4469
|
-
const e =
|
|
4470
|
-
return e.visible = (r) => e.M(r ? "visible" : "hidden"), e.expanded = (r) => e.M(r ? "expanded" : "collapsed"), e.loc = (r) => e.M("location",
|
|
4560
|
+
}), No = (t) => {
|
|
4561
|
+
const e = hn(t);
|
|
4562
|
+
return e.visible = (r) => e.M(r ? "visible" : "hidden"), e.expanded = (r) => e.M(r ? "expanded" : "collapsed"), e.loc = (r) => e.M("location", $s.construct(r)), e.disabled = (r) => r === !0 && e.M("disabled"), e.align = (r) => e.M(r), e.dir = (r) => r != null && e.M("direction", us.construct(r)), e.sharp = (r) => r !== !1 && e.M("sharp"), e.rounded = (r) => r !== !1 && e.M("rounded"), e.bordered = (r) => typeof r == "boolean" ? r && e.M("bordered") : r != null ? e.M(`bordered-${r.toString()}`) : e.M("bordered"), e.selected = (r) => r && e.M("selected"), e.altColor = (r) => r && e.M("alt-color"), e.editable = (r) => r && e.M("editable"), e.noSelect = e.M("no-select"), e.applyVars = To, e.removeVars = So, e.newGridBuilder = (r) => new $o(r), e.dropRegion = (r) => r && e.B("haul-drop-region"), e.px = (r) => `${r}px`, e.inheritDims = (r = !0) => r && e.M("inherit-dims"), e.shade = (r) => r != null && e.M(`shade-${r}`), e.colorVar = (r) => {
|
|
4471
4563
|
if (!(r == null || r === !1))
|
|
4472
|
-
return typeof r == "number" ? `var(--${t}-gray-l${r})` :
|
|
4564
|
+
return typeof r == "number" ? `var(--${t}-gray-l${r})` : qa.cssString(r);
|
|
4473
4565
|
}, e.levelSizeVar = (r) => `var(--${t}-${r}-size)`, e.level = (r) => e.M(`level-${r}`), e;
|
|
4474
|
-
},
|
|
4566
|
+
}, iu = No("pluto");
|
|
4475
4567
|
export {
|
|
4476
|
-
|
|
4477
|
-
|
|
4478
|
-
|
|
4479
|
-
|
|
4480
|
-
|
|
4481
|
-
|
|
4482
|
-
|
|
4483
|
-
|
|
4484
|
-
|
|
4485
|
-
|
|
4486
|
-
|
|
4487
|
-
|
|
4488
|
-
|
|
4489
|
-
|
|
4490
|
-
|
|
4491
|
-
|
|
4492
|
-
|
|
4493
|
-
|
|
4494
|
-
|
|
4495
|
-
|
|
4496
|
-
|
|
4568
|
+
nu as $,
|
|
4569
|
+
Lr as A,
|
|
4570
|
+
I as B,
|
|
4571
|
+
iu as C,
|
|
4572
|
+
ko as G,
|
|
4573
|
+
Lo as H,
|
|
4574
|
+
Ro as K,
|
|
4575
|
+
X as O,
|
|
4576
|
+
Oi as R,
|
|
4577
|
+
Ho as S,
|
|
4578
|
+
Mo as U,
|
|
4579
|
+
Fo as W,
|
|
4580
|
+
Do as _,
|
|
4581
|
+
Po as a,
|
|
4582
|
+
tu as b,
|
|
4583
|
+
Ao as c,
|
|
4584
|
+
jo as d,
|
|
4585
|
+
Uo as e,
|
|
4586
|
+
qa as f,
|
|
4587
|
+
T as g,
|
|
4588
|
+
qo as h,
|
|
4497
4589
|
O as i,
|
|
4498
|
-
|
|
4499
|
-
|
|
4500
|
-
|
|
4501
|
-
|
|
4502
|
-
|
|
4503
|
-
|
|
4504
|
-
|
|
4505
|
-
|
|
4506
|
-
|
|
4507
|
-
|
|
4508
|
-
|
|
4509
|
-
|
|
4510
|
-
|
|
4511
|
-
|
|
4512
|
-
|
|
4513
|
-
|
|
4514
|
-
|
|
4590
|
+
E as j,
|
|
4591
|
+
Jo as k,
|
|
4592
|
+
Pe as l,
|
|
4593
|
+
su as m,
|
|
4594
|
+
hn as n,
|
|
4595
|
+
Co as o,
|
|
4596
|
+
us as p,
|
|
4597
|
+
$s as q,
|
|
4598
|
+
w as r,
|
|
4599
|
+
Xo as s,
|
|
4600
|
+
Ko as t,
|
|
4601
|
+
vo as u,
|
|
4602
|
+
_o as v,
|
|
4603
|
+
eu as w,
|
|
4604
|
+
ru as x,
|
|
4605
|
+
Qo as y,
|
|
4606
|
+
Go as z
|
|
4515
4607
|
};
|