@synnaxlabs/pluto 0.44.0 → 0.44.2

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.
Files changed (103) hide show
  1. package/dist/{Animated-Owbkpo6B.js → Animated-D5cL3URg.js} +2 -2
  2. package/dist/{Animated-CCN9ByY6.cjs → Animated-DnsZ5vvU.cjs} +1 -1
  3. package/dist/{Menu-DZ-gh1ky.js → Menu-C-MABQ1r.js} +3 -3
  4. package/dist/{Menu-BSLsdSQe.cjs → Menu-vR5-lqo4.cjs} +1 -1
  5. package/dist/{Toggle-BWcSF1BX.cjs → Toggle-Ckdi4fKV.cjs} +1 -1
  6. package/dist/{Toggle-BUJcWkDS.js → Toggle-Dol9oHzM.js} +1 -1
  7. package/dist/{Video-BcSAFYkH.cjs → Video-BidrtYj_.cjs} +1 -1
  8. package/dist/{Video-DqCXiObt.js → Video-Cm8ZBqid.js} +1 -1
  9. package/dist/button.cjs +1 -1
  10. package/dist/button.js +1 -1
  11. package/dist/color.cjs +1 -1
  12. package/dist/color.js +1 -1
  13. package/dist/css-9yccD6t_.cjs +8 -0
  14. package/dist/{css-Cg4qHNg7.js → css-Dl9aM7Jz.js} +694 -686
  15. package/dist/css.cjs +1 -1
  16. package/dist/css.js +2 -2
  17. package/dist/dialog.cjs +1 -1
  18. package/dist/dialog.js +1 -1
  19. package/dist/{eraser-DeKDbhe4.cjs → eraser-CLWNvWDn.cjs} +20 -20
  20. package/dist/{eraser-BPrMJQSi.js → eraser-CZknVTjw.js} +11 -11
  21. package/dist/ether.cjs +1 -1
  22. package/dist/ether.js +6 -6
  23. package/dist/{external-ZbSTG-v-.js → external-B5RyMtMy.js} +3 -3
  24. package/dist/{external-BZs08bQT.js → external-B8qSW3N8.js} +3 -3
  25. package/dist/{external-D9Mbu0wy.cjs → external-BGCkpetp.cjs} +1 -1
  26. package/dist/{external-D2eCxMkQ.cjs → external-BJ91nMtQ.cjs} +6 -6
  27. package/dist/{external-CO49SSMt.js → external-BYJw6DJV.js} +3 -3
  28. package/dist/{external-JZqEUnPB.js → external-B_NFroo8.js} +4 -4
  29. package/dist/{external-DCftrpz2.js → external-CJZTgfAH.js} +4 -4
  30. package/dist/{external-Be6wSMuJ.cjs → external-CS6l_QN4.cjs} +1 -1
  31. package/dist/{external-bO6dVXFd.js → external-CU_XHLqP.js} +151 -143
  32. package/dist/{external-SZ8meWoz.js → external-CVNscTLA.js} +3 -3
  33. package/dist/{external-CcIlyM7a.cjs → external-CY2bvy20.cjs} +1 -1
  34. package/dist/{external-Cdszmp1I.cjs → external-CkvXTCCL.cjs} +1 -1
  35. package/dist/{external-DVV0t11f.cjs → external-ClD4VLgc.cjs} +1 -1
  36. package/dist/external-CtooTI5M.cjs +1 -0
  37. package/dist/{external-C4JmDQou.cjs → external-DFsKdN71.cjs} +1 -1
  38. package/dist/{external-E3bYM0JI.cjs → external-DNHOS3w0.cjs} +1 -1
  39. package/dist/{external-BhHJuw2t.js → external-DOd9BcLC.js} +2 -2
  40. package/dist/{external-CmXsU6yu.cjs → external-DPqPAgoV.cjs} +1 -1
  41. package/dist/{external-BHiMn0_8.cjs → external-DXY1bIut.cjs} +1 -1
  42. package/dist/{external-D7fvHJwL.cjs → external-DZqxSCvz.cjs} +1 -1
  43. package/dist/{external-Dd9YnYGw.js → external-DnnHYQqD.js} +3 -3
  44. package/dist/{external-fKroctog.js → external-Ylv9Wts9.js} +15 -15
  45. package/dist/{external-O7GBl914.cjs → external-_eEnQPcq.cjs} +1 -1
  46. package/dist/{external-CwWs_qf4.js → external-b2X_jilF.js} +2 -2
  47. package/dist/{external-BXXtl81l.js → external-pm79tCDD.js} +3 -3
  48. package/dist/{external-Dr1KTRgM.js → external-xfHaehZH.js} +27 -27
  49. package/dist/flex.cjs +1 -1
  50. package/dist/flex.js +1 -1
  51. package/dist/{fontString-BCV37JOn.js → fontString-Bm52S4Lo.js} +2 -2
  52. package/dist/{fontString-DUff-KJe.cjs → fontString-BptzSQcY.cjs} +1 -1
  53. package/dist/header.cjs +1 -1
  54. package/dist/header.js +1 -1
  55. package/dist/index.cjs +6 -6
  56. package/dist/index.js +4636 -4601
  57. package/dist/input.cjs +1 -1
  58. package/dist/input.js +1 -1
  59. package/dist/list.cjs +1 -1
  60. package/dist/list.js +1 -1
  61. package/dist/menu.cjs +1 -1
  62. package/dist/menu.js +1 -1
  63. package/dist/{provider-Y8rmJd2z.js → provider-Bp-CLkh2.js} +1734 -1624
  64. package/dist/provider-DBSsDoFS.cjs +53 -0
  65. package/dist/src/channel/LinePlot.d.ts +2 -0
  66. package/dist/src/channel/LinePlot.d.ts.map +1 -1
  67. package/dist/src/dialog/Dialog.d.ts.map +1 -1
  68. package/dist/src/dialog/Frame.d.ts.map +1 -1
  69. package/dist/src/icon/registry.d.ts +1 -0
  70. package/dist/src/icon/registry.d.ts.map +1 -1
  71. package/dist/src/input/Text.d.ts +3 -2
  72. package/dist/src/input/Text.d.ts.map +1 -1
  73. package/dist/src/list/useStaticData.d.ts.map +1 -1
  74. package/dist/src/select/MultipleTrigger.d.ts.map +1 -1
  75. package/dist/src/select/Static.d.ts +1 -1
  76. package/dist/src/select/Static.d.ts.map +1 -1
  77. package/dist/src/telem/aether/transformers.d.ts +28 -2
  78. package/dist/src/telem/aether/transformers.d.ts.map +1 -1
  79. package/dist/src/vis/diagram/Diagram.d.ts +6 -0
  80. package/dist/src/vis/diagram/Diagram.d.ts.map +1 -1
  81. package/dist/src/vis/line/aether/line.d.ts +9 -2
  82. package/dist/src/vis/line/aether/line.d.ts.map +1 -1
  83. package/dist/symbols-B15FeAg9.cjs +92 -0
  84. package/dist/{symbols-DT8-7-NW.js → symbols-Lz5vQQDw.js} +7416 -7399
  85. package/dist/tabs.cjs +1 -1
  86. package/dist/tabs.js +1 -1
  87. package/dist/text.cjs +1 -1
  88. package/dist/text.js +2 -2
  89. package/dist/theming.cjs +1 -1
  90. package/dist/theming.js +2 -2
  91. package/dist/tree.cjs +1 -1
  92. package/dist/tree.js +1 -1
  93. package/dist/triggers.cjs +1 -1
  94. package/dist/triggers.js +1 -1
  95. package/dist/{units-DR4EJndw.cjs → units-BGkvnLO-.cjs} +1 -1
  96. package/dist/{units-ts2tUMPH.js → units-HcS_zslH.js} +1 -1
  97. package/dist/video.cjs +1 -1
  98. package/dist/video.js +1 -1
  99. package/package.json +4 -4
  100. package/dist/css-BR-Ih764.cjs +0 -8
  101. package/dist/external-BKWucUPD.cjs +0 -1
  102. package/dist/provider-Dx_qX7Wi.cjs +0 -53
  103. package/dist/symbols-BtW1eE35.cjs +0 -92
@@ -1,45 +1,45 @@
1
- import v, { z as a } from "zod";
2
- const en = (t) => {
1
+ import x, { z as a } from "zod";
2
+ const tn = (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
- }, ut = (t) => {
5
+ }, lt = (t) => {
6
6
  const e = (r, n = Ge) => {
7
7
  if (typeof r == "string") return t(r);
8
8
  if (Array.isArray(r)) return r.map((o) => e(o, n));
9
9
  if (!Fe(r)) return r;
10
- n = nn(n);
10
+ n = sn(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 l = t(o);
15
- n.recursive && (Fe(c) ? jt(c) || (c = e(c, n)) : n.recursiveInArray && Ct(c) && (c = [...c].map((f) => {
15
+ n.recursive && (Fe(c) ? Rt(c) || (c = e(c, n)) : n.recursiveInArray && jt(c) && (c = [...c].map((f) => {
16
16
  let p = f;
17
- return Fe(f) ? jt(p) || (p = e(f, n)) : Ct(f) && (p = e({ key: f }, n).key), p;
17
+ return Fe(f) ? Rt(p) || (p = e(f, n)) : jt(f) && (p = e({ key: f }, n).key), p;
18
18
  }))), s[l] = c;
19
19
  }), s);
20
20
  };
21
21
  return e;
22
- }, lt = ut(en), tn = (t) => (
22
+ }, ct = lt(tn), rn = (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
- ), zt = ut(tn), Ft = (t) => t.length === 0 ? t : t[0].toUpperCase() + t.slice(1), rn = [Number, String, Uint8Array], Ge = {
29
+ ), Ft = lt(rn), Zt = (t) => t.length === 0 ? t : t[0].toUpperCase() + t.slice(1), nn = [Number, String, Uint8Array], Ge = {
30
30
  recursive: !0,
31
31
  recursiveInArray: !0
32
- }, nn = (t = Ge) => (t.recursive == null ? t = Ge : t.recursiveInArray ??= !1, t), Ct = (t) => t != null && Array.isArray(t), Fe = (t) => t != null && typeof t == "object" && !Array.isArray(t), jt = (t) => rn.some((e) => t instanceof e), sn = (t) => t.replace(/\s+/g, "-").replace(
32
+ }, sn = (t = Ge) => (t.recursive == null ? t = Ge : t.recursiveInArray ??= !1, t), jt = (t) => t != null && Array.isArray(t), Fe = (t) => t != null && typeof t == "object" && !Array.isArray(t), Rt = (t) => nn.some((e) => t instanceof e), an = (t) => t.replace(/\s+/g, "-").replace(
33
33
  /([a-z0-9])([A-Z])/g,
34
34
  (e, r, n) => `${r}-${n.toLowerCase()}`
35
- ).toLowerCase(), an = ut(sn), ao = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
35
+ ).toLowerCase(), on = lt(an), uo = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
36
36
  __proto__: null,
37
- camelToSnake: zt,
38
- capitalize: Ft,
39
- snakeToCamel: lt,
40
- toKebab: an
37
+ camelToSnake: Ft,
38
+ capitalize: Zt,
39
+ snakeToCamel: ct,
40
+ toKebab: on
41
41
  }, Symbol.toStringTag, { value: "Module" }));
42
- let on = class {
42
+ let un = class {
43
43
  contentType = "application/json";
44
44
  decoder;
45
45
  encoder;
@@ -53,15 +53,15 @@ let on = class {
53
53
  return this.decodeString(this.decoder.decode(e), r);
54
54
  }
55
55
  decodeString(e, r) {
56
- const n = JSON.parse(e), s = lt(n);
56
+ const n = JSON.parse(e), s = ct(n);
57
57
  return r != null ? r.parse(s) : s;
58
58
  }
59
59
  encodeString(e) {
60
- const r = zt(e);
60
+ const r = Ft(e);
61
61
  return JSON.stringify(r, (n, s) => ArrayBuffer.isView(s) ? Array.from(s) : typeof s == "bigint" ? s.toString() : s);
62
62
  }
63
63
  };
64
- const He = new on(), Je = (t) => [...new Set(t)], un = (t, e, r = !0) => {
64
+ const He = new un(), Je = (t) => [...new Set(t)], ln = (t, e, r = !0) => {
65
65
  const n = /* @__PURE__ */ new Map();
66
66
  return t.forEach((s) => {
67
67
  const i = e(s);
@@ -71,9 +71,9 @@ const He = new on(), Je = (t) => [...new Set(t)], un = (t, e, r = !0) => {
71
71
  }
72
72
  n.set(i, s);
73
73
  }), Array.from(n.values());
74
- }, uo = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
74
+ }, co = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
75
75
  __proto__: null,
76
- by: un,
76
+ by: ln,
77
77
  unique: Je
78
78
  }, Symbol.toStringTag, { value: "Module" }));
79
79
  let J = class {
@@ -96,8 +96,8 @@ let J = class {
96
96
  return this.value.toString();
97
97
  }
98
98
  };
99
- const ct = (t) => t != null && typeof t == "object" && "toString" in t, ln = (t) => {
100
- if (ct(t)) return t?.toString().length === 0;
99
+ const ht = (t) => t != null && typeof t == "object" && "toString" in t, cn = (t) => {
100
+ if (ht(t)) return t?.toString().length === 0;
101
101
  switch (typeof t) {
102
102
  case "string":
103
103
  return t.length === 0;
@@ -114,13 +114,13 @@ const ct = (t) => t != null && typeof t == "object" && "toString" in t, ln = (t)
114
114
  default:
115
115
  return !1;
116
116
  }
117
- }, co = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
117
+ }, fo = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
118
118
  __proto__: null,
119
119
  ValueExtension: J,
120
- isStringer: ct,
121
- isZero: ln
120
+ isStringer: ht,
121
+ isZero: cn
122
122
  }, Symbol.toStringTag, { value: "Module" })), Be = (t, e = !1) => {
123
- const r = ct(t) ? "stringer" : typeof t;
123
+ const r = ht(t) ? "stringer" : typeof t;
124
124
  let n;
125
125
  switch (r) {
126
126
  case "string":
@@ -144,19 +144,19 @@ const ct = (t) => t != null && typeof t == "object" && "toString" in t, ln = (t)
144
144
  default:
145
145
  return console.warn(`sortFunc: unknown type ${r}`), () => -1;
146
146
  }
147
- return e ? Yt(n) : n;
148
- }, cn = (t, e, r) => {
147
+ return e ? Vt(n) : n;
148
+ }, hn = (t, e, r) => {
149
149
  const n = Be(e[t], r);
150
150
  return (s, i) => n(s[t], i[t]);
151
- }, hn = (t, e) => t.length !== e.length ? t.length - e.length : t.every((r, n) => r === e[n]) ? 0 : -1, Zt = (t, e) => {
151
+ }, fn = (t, e) => t.length !== e.length ? t.length - e.length : t.every((r, n) => r === e[n]) ? 0 : -1, Yt = (t, e) => {
152
152
  if (t.length !== e.length) return t.length - e.length;
153
153
  if (t.length === 0) return 0;
154
154
  const r = Be(t[0]), n = [...t].sort(r), s = [...e].sort(r);
155
155
  return n.every((i, o) => i === s[o]) ? 0 : -1;
156
- }, fn = (t, e) => {
156
+ }, dn = (t, e) => {
157
157
  const r = Je(t), n = Je(e);
158
- return Zt(r, n);
159
- }, dn = (t, e) => t === e ? 0 : t === "first" && e === "last" ? 1 : -1, Yt = (t) => (e, r) => t(r, e), ee = 0, ve = -1, xe = 1, Vt = (t) => t < ee, Wt = (t) => t > ee, gn = (t) => t >= ee, Gt = (t) => t === ee, pn = (t, e) => {
158
+ return Yt(r, n);
159
+ }, gn = (t, e) => t === e ? 0 : t === "first" && e === "last" ? 1 : -1, Vt = (t) => (e, r) => t(r, e), ee = 0, xe = -1, $e = 1, Wt = (t) => t < ee, Gt = (t) => t > ee, pn = (t) => t >= ee, Ht = (t) => t === ee, yn = (t, e) => {
160
160
  const r = /([a-zA-Z]+)|(\d+)/g, n = t.replace(/[\s_.-]+/g, "").match(r), s = e.replace(/[\s_.-]+/g, "").match(r);
161
161
  if (!n || !s) return 0;
162
162
  for (let i = 0; i < Math.min(n.length, s.length); i++) {
@@ -170,43 +170,43 @@ const ct = (t) => t != null && typeof t == "object" && "toString" in t, ln = (t)
170
170
  } else return isNaN(Number(o)) ? -1 : 1;
171
171
  }
172
172
  return n.length - s.length;
173
- }, ho = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
173
+ }, go = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
174
174
  __proto__: null,
175
175
  EQUAL: ee,
176
- GREATER_THAN: xe,
177
- LESS_THAN: ve,
178
- isEqualTo: Gt,
179
- isGreaterThan: Wt,
180
- isGreaterThanEqual: gn,
181
- isLessThan: Vt,
176
+ GREATER_THAN: $e,
177
+ LESS_THAN: xe,
178
+ isEqualTo: Ht,
179
+ isGreaterThan: Gt,
180
+ isGreaterThanEqual: pn,
181
+ isLessThan: Wt,
182
182
  newF: Be,
183
- newFieldF: cn,
184
- order: dn,
185
- primitiveArrays: hn,
186
- reverseF: Yt,
187
- stringsWithNumbers: pn,
188
- uniqueUnorderedPrimitiveArrays: fn,
189
- unorderedPrimitiveArrays: Zt
183
+ newFieldF: hn,
184
+ order: gn,
185
+ primitiveArrays: fn,
186
+ reverseF: Vt,
187
+ stringsWithNumbers: yn,
188
+ uniqueUnorderedPrimitiveArrays: dn,
189
+ unorderedPrimitiveArrays: Yt
190
190
  }, Symbol.toStringTag, { value: "Module" })), Ue = a.tuple([a.number(), a.number()]);
191
191
  a.tuple([a.bigint(), a.bigint()]);
192
- const ht = a.object({ width: a.number(), height: a.number() }), yn = a.object({
192
+ const ft = a.object({ width: a.number(), height: a.number() }), mn = a.object({
193
193
  signedWidth: a.number(),
194
194
  signedHeight: a.number()
195
- }), mn = ["width", "height"];
196
- a.enum(mn);
197
- const bn = ["start", "center", "end"], wn = ["signedWidth", "signedHeight"];
198
- a.enum(wn);
199
- const he = a.object({ x: a.number(), y: a.number() }), Ht = a.object({ clientX: a.number(), clientY: a.number() }), Ce = ["x", "y"], ft = a.enum(Ce), Jt = ["top", "right", "bottom", "left"], On = a.enum(Jt), je = ["left", "right"], dt = a.enum(je), Re = ["top", "bottom"], gt = a.enum(Re), pt = ["center"], Xe = a.enum(pt), $n = [...Jt, ...pt], yt = a.enum($n);
195
+ }), bn = ["width", "height"];
200
196
  a.enum(bn);
201
- const Tn = ["first", "last"];
202
- a.enum(Tn);
203
- const Xt = a.object({ lower: a.number(), upper: a.number() }), vn = a.object({ lower: a.bigint(), upper: a.bigint() });
204
- a.union([Xt, Ue]);
205
- a.union([vn, Ue]);
206
- const xn = a.enum([...ft.options, ...yt.options]), Sn = a.union([ft, yt, a.instanceof(String)]), ae = (t, e) => typeof t == "bigint" ? t - BigInt(e) : t - Number(e), Kt = (t, e) => typeof t == "bigint" ? t + BigInt(e) : t + Number(e), Nn = (t, e, r = 1e-4) => Math.abs(t - e) < r, Ke = (t, e) => typeof t == "bigint" ? t === BigInt(e) : t === Number(e), In = (t) => {
197
+ const wn = ["start", "center", "end"], On = ["signedWidth", "signedHeight"];
198
+ a.enum(On);
199
+ const he = a.object({ x: a.number(), y: a.number() }), Jt = a.object({ clientX: a.number(), clientY: a.number() }), Ce = ["x", "y"], dt = a.enum(Ce), Xt = ["top", "right", "bottom", "left"], vn = a.enum(Xt), je = ["left", "right"], gt = a.enum(je), Re = ["top", "bottom"], pt = a.enum(Re), yt = ["center"], Xe = a.enum(yt), Tn = [...Xt, ...yt], mt = a.enum(Tn);
200
+ a.enum(wn);
201
+ const xn = ["first", "last"];
202
+ a.enum(xn);
203
+ const Kt = a.object({ lower: a.number(), upper: a.number() }), $n = a.object({ lower: a.bigint(), upper: a.bigint() });
204
+ a.union([Kt, Ue]);
205
+ a.union([$n, Ue]);
206
+ const Sn = a.enum([...dt.options, ...mt.options]), Nn = a.union([dt, mt, a.instanceof(String)]), ae = (t, e) => typeof t == "bigint" ? t - BigInt(e) : t - Number(e), Qt = (t, e) => typeof t == "bigint" ? t + BigInt(e) : t + Number(e), In = (t, e, r = 1e-4) => Math.abs(t - e) < r, Ke = (t, e) => typeof t == "bigint" ? t === BigInt(e) : t === Number(e), Mn = (t) => {
207
207
  const e = 10 ** Math.floor(Math.log10(t));
208
208
  return Math.round(t / e) * e;
209
- }, Qt = (t, e) => t <= e ? t : typeof t == "bigint" ? t <= e ? t : BigInt(e) : t <= e ? t : Number(e), Mn = (t, e) => typeof t == "bigint" ? t >= e ? t : BigInt(e) : t >= e ? t : Number(e), _t = (t) => t < 0 ? -t : t, Y = (t, e) => typeof t == "bigint" ? t * BigInt(e) : t * Number(e), En = (t, e) => typeof t == "bigint" ? t / BigInt(e) : t / Number(e), y = (t, e, r) => {
209
+ }, _t = (t, e) => t <= e ? t : typeof t == "bigint" ? t <= e ? t : BigInt(e) : t <= e ? t : Number(e), En = (t, e) => typeof t == "bigint" ? t >= e ? t : BigInt(e) : t >= e ? t : Number(e), er = (t) => t < 0 ? -t : t, Y = (t, e) => typeof t == "bigint" ? t * BigInt(e) : t * Number(e), An = (t, e) => typeof t == "bigint" ? t / BigInt(e) : t / Number(e), y = (t, e, r) => {
210
210
  const n = {};
211
211
  if (typeof e == "object" && (r = e, e = void 0), r = { makeValid: !0, ...r }, typeof t == "number" || typeof t == "bigint")
212
212
  e != null ? (n.lower = t, n.upper = e) : (n.lower = typeof t == "bigint" ? 0n : 0, n.upper = t);
@@ -215,13 +215,13 @@ const xn = a.enum([...ft.options, ...yt.options]), Sn = a.union([ft, yt, a.insta
215
215
  [n.lower, n.upper] = t;
216
216
  } else
217
217
  n.lower = t.lower, n.upper = t.upper;
218
- return r?.makeValid ? er(n) : n;
219
- }, An = Object.freeze({ lower: 0, upper: 0 }), Bn = Object.freeze({ lower: -1 / 0, upper: 1 / 0 }), Un = Object.freeze({ lower: 0, upper: 1 }), Cn = Object.freeze({ lower: -1, upper: 1 }), jn = (t, e) => {
218
+ return r?.makeValid ? tr(n) : n;
219
+ }, Bn = Object.freeze({ lower: 0, upper: 0 }), Un = Object.freeze({ lower: -1 / 0, upper: 1 / 0 }), Cn = Object.freeze({ lower: 0, upper: 1 }), jn = Object.freeze({ lower: -1, upper: 1 }), Rn = (t, e) => {
220
220
  if (t == null && e == null) return !0;
221
221
  if (t == null || e == null) return !1;
222
222
  const r = y(t), n = y(e);
223
223
  return r?.lower === n?.lower && r?.upper === n?.upper;
224
- }, er = (t) => t.lower > t.upper ? { lower: t.upper, upper: t.lower } : t, Qe = (t, e) => {
224
+ }, tr = (t) => t.lower > t.upper ? { lower: t.upper, upper: t.lower } : t, Qe = (t, e) => {
225
225
  const r = y(t);
226
226
  return e < r.lower ? r.lower : e >= r.upper ? r.upper - (typeof r.upper == "number" ? 1 : 1n) : e;
227
227
  }, I = (t, e) => {
@@ -230,31 +230,31 @@ const xn = a.enum([...ft.options, ...yt.options]), Sn = a.union([ft, yt, a.insta
230
230
  return e >= r.lower && e < r.upper;
231
231
  const n = y(e);
232
232
  return n.lower >= r.lower && n.upper <= r.upper;
233
- }, Rn = (t, e) => {
233
+ }, Ln = (t, e) => {
234
234
  const r = y(t), n = y(e);
235
235
  return r.lower === n.lower ? !0 : n.upper === r.lower || n.lower === r.upper ? !1 : I(r, n.upper) || I(r, n.lower) || I(n, r.upper) || I(n, r.lower);
236
236
  }, ye = (t) => {
237
237
  const e = y(t);
238
238
  return e.upper - e.lower;
239
- }, Ln = (t) => {
239
+ }, Dn = (t) => {
240
240
  const e = y(t);
241
241
  return typeof e.lower == "bigint" ? e.lower === 0n && e.upper === 0n : e.lower === 0 && e.upper === 0;
242
- }, Dn = (t) => {
242
+ }, Pn = (t) => {
243
243
  const e = ye(t);
244
244
  return typeof e == "number" ? e === 0 : e === 0n;
245
- }, Pn = (t) => {
245
+ }, qn = (t) => {
246
246
  const e = y(t);
247
247
  return typeof e.lower == "bigint" ? !0 : Number.isFinite(e.lower) && Number.isFinite(e.upper);
248
- }, qn = (t) => {
248
+ }, kn = (t) => {
249
249
  const e = y(t);
250
250
  return (e.upper + e.lower) / 2;
251
- }, tr = (t) => ({
251
+ }, rr = (t) => ({
252
252
  lower: Math.min(...t.map((e) => y(e).lower)),
253
253
  upper: Math.max(...t.map((e) => y(e).upper))
254
- }), kn = (t) => ({
254
+ }), zn = (t) => ({
255
255
  lower: Math.max(...t.map((e) => y(e).lower)),
256
256
  upper: Math.min(...t.map((e) => y(e).upper))
257
- }), zn = (t) => {
257
+ }), Fn = (t) => {
258
258
  const e = y(t), r = typeof e.lower == "bigint";
259
259
  return Array.from({ length: Number(ye(t)) }, (n, s) => r ? e.lower + BigInt(s) : e.lower + s);
260
260
  }, _e = (t, e) => {
@@ -267,7 +267,7 @@ const xn = a.enum([...ft.options, ...yt.options]), Sn = a.union([ft, yt, a.insta
267
267
  removeAfter: 0,
268
268
  insertInto: 0,
269
269
  deleteInBetween: 0
270
- }, Fn = (t, e) => {
270
+ }, Zn = (t, e) => {
271
271
  const r = t.map((f) => y(f)), n = y(e);
272
272
  if (r.length === 0) return Ze;
273
273
  const s = _e(r, n.lower), i = _e(r, n.upper);
@@ -287,7 +287,7 @@ const xn = a.enum([...ft.options, ...yt.options]), Sn = a.union([ft, yt, a.insta
287
287
  insertInto: c,
288
288
  deleteInBetween: o
289
289
  };
290
- }, rr = (t, e, r) => {
290
+ }, nr = (t, e, r) => {
291
291
  const n = t.map((c) => y(c)), s = r > 0 ? 1 : r < 0 ? -1 : 0;
292
292
  if (s === 0) return e;
293
293
  let i = r, o = e;
@@ -297,8 +297,8 @@ const xn = a.enum([...ft.options, ...yt.options]), Sn = a.union([ft, yt, a.insta
297
297
  const l = n[c];
298
298
  let f;
299
299
  if (s > 0 ? f = ae(l.upper, o) : f = ae(o, l.lower), f > 0) {
300
- const p = Qt(_t(i), f);
301
- if (o = Kt(
300
+ const p = _t(er(i), f);
301
+ if (o = Qt(
302
302
  o,
303
303
  s > 0 ? p : -p
304
304
  ), i = ae(i, s > 0 ? p : -p), Ke(i, 0)) return o;
@@ -317,7 +317,7 @@ const xn = a.enum([...ft.options, ...yt.options]), Sn = a.union([ft, yt, a.insta
317
317
  }
318
318
  }
319
319
  return o;
320
- }, nr = (t, e, r) => {
320
+ }, sr = (t, e, r) => {
321
321
  const n = t.map((o) => y(o));
322
322
  if (e === r) return typeof e == "bigint" ? 0n : 0;
323
323
  const s = e < r ? y([e, r]) : y([r, e]);
@@ -330,183 +330,183 @@ const xn = a.enum([...ft.options, ...yt.options]), Sn = a.union([ft, yt, a.insta
330
330
  }
331
331
  }
332
332
  return i;
333
- }, fo = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
333
+ }, po = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
334
334
  __proto__: null,
335
- CLIP: Cn,
336
- DECIMAL: Un,
337
- INFINITE: Bn,
338
- ZERO: An,
339
- bounds: Xt,
340
- buildInsertionPlan: Fn,
335
+ CLIP: jn,
336
+ DECIMAL: Cn,
337
+ INFINITE: Un,
338
+ ZERO: Bn,
339
+ bounds: Kt,
340
+ buildInsertionPlan: Zn,
341
341
  clamp: Qe,
342
342
  construct: y,
343
343
  contains: I,
344
- distance: nr,
345
- equals: jn,
344
+ distance: sr,
345
+ equals: Rn,
346
346
  findInsertPosition: _e,
347
- isFinite: Pn,
348
- isZero: Ln,
349
- linspace: zn,
350
- makeValid: er,
351
- max: tr,
352
- mean: qn,
353
- min: kn,
354
- overlapsWith: Rn,
347
+ isFinite: qn,
348
+ isZero: Dn,
349
+ linspace: Fn,
350
+ makeValid: tr,
351
+ max: rr,
352
+ mean: kn,
353
+ min: zn,
354
+ overlapsWith: Ln,
355
355
  span: ye,
356
- spanIsZero: Dn,
357
- traverse: rr
358
- }, Symbol.toStringTag, { value: "Module" })), sr = xn, Z = (t) => Ce.includes(t) ? t : Re.includes(t) ? "y" : "x", Zn = (t) => Z(t) === "x" ? "y" : "x", Yn = (t) => Z(t) === "x" ? "width" : "height", Vn = (t) => Z(t) === "x" ? "left" : "top", Wn = (t) => sr.safeParse(t).success, Gn = (t) => Z(t) === "x" ? "signedWidth" : "signedHeight", Hn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
356
+ spanIsZero: Pn,
357
+ traverse: nr
358
+ }, Symbol.toStringTag, { value: "Module" })), ir = Sn, Z = (t) => Ce.includes(t) ? t : Re.includes(t) ? "y" : "x", Yn = (t) => Z(t) === "x" ? "y" : "x", Vn = (t) => Z(t) === "x" ? "width" : "height", Wn = (t) => Z(t) === "x" ? "left" : "top", Gn = (t) => ir.safeParse(t).success, Hn = (t) => Z(t) === "x" ? "signedWidth" : "signedHeight", Jn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
359
359
  __proto__: null,
360
360
  DIRECTIONS: Ce,
361
361
  construct: Z,
362
- crude: sr,
363
- dimension: Yn,
364
- direction: ft,
365
- isDirection: Wn,
366
- location: Vn,
367
- signedDimension: Gn,
368
- swap: Zn
369
- }, Symbol.toStringTag, { value: "Module" })), Jn = dt, Xn = gt, Kn = Xe, Qn = {
362
+ crude: ir,
363
+ dimension: Vn,
364
+ direction: dt,
365
+ isDirection: Gn,
366
+ location: Wn,
367
+ signedDimension: Hn,
368
+ swap: Yn
369
+ }, Symbol.toStringTag, { value: "Module" })), Xn = gt, Kn = pt, Qn = Xe, _n = {
370
370
  top: "bottom",
371
371
  right: "left",
372
372
  bottom: "top",
373
373
  left: "right",
374
374
  center: "center"
375
- }, _n = {
375
+ }, es = {
376
376
  top: "left",
377
377
  right: "top",
378
378
  bottom: "right",
379
379
  left: "bottom",
380
380
  center: "center"
381
- }, es = Sn, k = (t) => t instanceof String || !Ce.includes(t) ? t : t === "x" ? "left" : "top", ts = (t) => Qn[k(t)], rs = (t) => _n[k(t)], fe = (t) => {
381
+ }, ts = Nn, k = (t) => t instanceof String || !Ce.includes(t) ? t : t === "x" ? "left" : "top", rs = (t) => _n[k(t)], ns = (t) => es[k(t)], fe = (t) => {
382
382
  const e = k(t);
383
383
  return e === "top" || e === "bottom" ? "y" : "x";
384
- }, ns = a.object({
385
- x: dt.or(Xe),
386
- y: gt.or(Xe)
387
- }), ir = a.object({ x: dt, y: gt }), me = Object.freeze({ x: "left", y: "top" }), mt = Object.freeze({ x: "right", y: "top" }), Le = Object.freeze({ x: "left", y: "bottom" }), bt = Object.freeze({ x: "right", y: "bottom" }), wt = Object.freeze({ x: "center", y: "center" }), Ot = Object.freeze({ x: "center", y: "top" }), $t = Object.freeze({ x: "center", y: "bottom" }), Tt = Object.freeze({ x: "right", y: "center" }), vt = Object.freeze({ x: "left", y: "center" }), ss = Object.freeze([
384
+ }, ss = a.object({
385
+ x: gt.or(Xe),
386
+ y: pt.or(Xe)
387
+ }), ar = a.object({ x: gt, y: pt }), me = Object.freeze({ x: "left", y: "top" }), bt = Object.freeze({ x: "right", y: "top" }), Le = Object.freeze({ x: "left", y: "bottom" }), wt = Object.freeze({ x: "right", y: "bottom" }), Ot = Object.freeze({ x: "center", y: "center" }), vt = Object.freeze({ x: "center", y: "top" }), Tt = Object.freeze({ x: "center", y: "bottom" }), xt = Object.freeze({ x: "right", y: "center" }), $t = Object.freeze({ x: "left", y: "center" }), is = Object.freeze([
388
+ $t,
389
+ xt,
388
390
  vt,
389
391
  Tt,
390
- Ot,
391
- $t,
392
392
  me,
393
- mt,
394
- Le,
395
393
  bt,
396
- wt
397
- ]), xt = (t, e) => t.x === e.x && t.y === e.y, is = (t, e) => {
394
+ Le,
395
+ wt,
396
+ Ot
397
+ ]), St = (t, e) => t.x === e.x && t.y === e.y, as = (t, e) => {
398
398
  if (typeof e == "object") {
399
399
  let r = !0;
400
400
  return "x" in e && (t.x === e.x || (r = !1)), "y" in e && (t.y === e.y || (r = !1)), r;
401
401
  }
402
402
  return t.x === e || t.y === e;
403
- }, ar = (t) => [t.x, t.y], Se = (t) => fe(k(t)) === "x", as = (t) => fe(k(t)) === "y", os = (t) => `${t.x}${Ft(t.y)}`, us = (t, e) => {
403
+ }, or = (t) => [t.x, t.y], Se = (t) => fe(k(t)) === "x", os = (t) => fe(k(t)) === "y", us = (t) => `${t.x}${Zt(t.y)}`, ls = (t, e) => {
404
404
  let r, n;
405
405
  if (typeof t == "object" && "x" in t ? (r = t.x, n = t.y) : (r = k(t), n = k(e ?? t)), fe(r) === fe(n) && r !== "center" && n !== "center")
406
406
  throw new Error(
407
407
  `[XYLocation] - encountered two locations with the same direction: ${r.toString()} - ${n.toString()}`
408
408
  );
409
- const s = { ...wt };
409
+ const s = { ...Ot };
410
410
  return r === "center" ? Se(n) ? [s.x, s.y] = [n, r] : [s.x, s.y] = [r, n] : n === "center" ? Se(r) ? [s.x, s.y] = [r, n] : [s.x, s.y] = [n, r] : Se(r) ? [s.x, s.y] = [r, n] : [s.x, s.y] = [n, r], s;
411
- }, ls = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
411
+ }, cs = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
412
412
  __proto__: null,
413
- BOTTOM_CENTER: $t,
413
+ BOTTOM_CENTER: Tt,
414
414
  BOTTOM_LEFT: Le,
415
- BOTTOM_RIGHT: bt,
416
- CENTER: wt,
417
- CENTER_LEFT: vt,
418
- CENTER_LOCATIONS: pt,
419
- CENTER_RIGHT: Tt,
420
- TOP_CENTER: Ot,
415
+ BOTTOM_RIGHT: wt,
416
+ CENTER: Ot,
417
+ CENTER_LEFT: $t,
418
+ CENTER_LOCATIONS: yt,
419
+ CENTER_RIGHT: xt,
420
+ TOP_CENTER: vt,
421
421
  TOP_LEFT: me,
422
- TOP_RIGHT: mt,
423
- XY_LOCATIONS: ss,
422
+ TOP_RIGHT: bt,
423
+ XY_LOCATIONS: is,
424
424
  X_LOCATIONS: je,
425
425
  Y_LOCATIONS: Re,
426
- center: Kn,
426
+ center: Qn,
427
427
  construct: k,
428
- constructXY: us,
429
- corner: ir,
430
- crude: es,
428
+ constructXY: ls,
429
+ corner: ar,
430
+ crude: ts,
431
431
  direction: fe,
432
432
  isX: Se,
433
- isY: as,
434
- location: yt,
435
- outer: On,
436
- rotate90: rs,
437
- swap: ts,
438
- x: Jn,
439
- xy: ns,
440
- xyCouple: ar,
441
- xyEquals: xt,
442
- xyMatches: is,
443
- xyToString: os,
444
- y: Xn
433
+ isY: os,
434
+ location: mt,
435
+ outer: vn,
436
+ rotate90: ns,
437
+ swap: rs,
438
+ x: Xn,
439
+ xy: ss,
440
+ xyCouple: or,
441
+ xyEquals: St,
442
+ xyMatches: as,
443
+ xyToString: us,
444
+ y: Kn
445
445
  }, Symbol.toStringTag, { value: "Module" })), et = a.union([
446
446
  a.number(),
447
447
  he,
448
448
  Ue,
449
- ht,
450
- yn,
451
- Ht
452
- ]), $ = (t, e) => {
449
+ ft,
450
+ mn,
451
+ Jt
452
+ ]), v = (t, e) => {
453
453
  if (typeof t == "string") {
454
454
  if (e === void 0) throw new Error("The y coordinate must be given.");
455
455
  return t === "x" ? { x: e, y: 0 } : { x: 0, y: e };
456
456
  }
457
457
  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 };
458
- }, U = Object.freeze({ x: 0, y: 0 }), or = Object.freeze({ x: 1, y: 1 }), cs = Object.freeze({ x: 1 / 0, y: 1 / 0 }), hs = Object.freeze({ x: NaN, y: NaN }), Ae = (t, e, r = 0) => {
459
- const n = $(t), s = $(e);
458
+ }, U = Object.freeze({ x: 0, y: 0 }), ur = Object.freeze({ x: 1, y: 1 }), hs = Object.freeze({ x: 1 / 0, y: 1 / 0 }), fs = Object.freeze({ x: NaN, y: NaN }), Ae = (t, e, r = 0) => {
459
+ const n = v(t), s = v(e);
460
460
  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;
461
- }, fs = (t) => Ae(t, U), St = (t, e, r) => {
462
- const n = $(t), s = $(e, r);
461
+ }, ds = (t) => Ae(t, U), Nt = (t, e, r) => {
462
+ const n = v(t), s = v(e, r);
463
463
  return { x: n.x * s.x, y: n.y * s.y };
464
- }, ur = (t, e) => {
465
- const r = $(t);
466
- return { x: r.x + e, y: r.y };
467
464
  }, lr = (t, e) => {
468
- const r = $(t);
465
+ const r = v(t);
466
+ return { x: r.x + e, y: r.y };
467
+ }, cr = (t, e) => {
468
+ const r = v(t);
469
469
  return { x: r.x, y: r.y + e };
470
- }, de = (t, e, r, ...n) => typeof e == "string" && typeof r == "number" ? e === "x" ? ur(t, r) : lr(t, r) : [t, e, r ?? U, ...n].reduce((s, i) => {
471
- const o = $(i);
470
+ }, de = (t, e, r, ...n) => typeof e == "string" && typeof r == "number" ? e === "x" ? lr(t, r) : cr(t, r) : [t, e, r ?? U, ...n].reduce((s, i) => {
471
+ const o = v(i);
472
472
  return { x: s.x + o.x, y: s.y + o.y };
473
- }, U), ds = (t, e, r) => {
474
- const n = $(t);
473
+ }, U), gs = (t, e, r) => {
474
+ const n = v(t);
475
475
  return e === "x" ? { x: r, y: n.y } : { x: n.x, y: r };
476
- }, gs = (t, e) => {
477
- const r = $(t), n = $(e);
478
- return Math.sqrt((r.x - n.x) ** 2 + (r.y - n.y) ** 2);
479
476
  }, ps = (t, e) => {
480
- const r = $(t), n = $(e);
477
+ const r = v(t), n = v(e);
478
+ return Math.sqrt((r.x - n.x) ** 2 + (r.y - n.y) ** 2);
479
+ }, ys = (t, e) => {
480
+ const r = v(t), n = v(e);
481
481
  return { x: n.x - r.x, y: n.y - r.y };
482
- }, ys = (t) => {
483
- const e = $(t);
484
- return Number.isNaN(e.x) || Number.isNaN(e.y);
485
482
  }, ms = (t) => {
486
- const e = $(t);
487
- return Number.isFinite(e.x) && Number.isFinite(e.y);
483
+ const e = v(t);
484
+ return Number.isNaN(e.x) || Number.isNaN(e.y);
488
485
  }, bs = (t) => {
489
- const e = $(t);
490
- return [e.x, e.y];
486
+ const e = v(t);
487
+ return Number.isFinite(e.x) && Number.isFinite(e.y);
491
488
  }, ws = (t) => {
492
- const e = $(t);
489
+ const e = v(t);
490
+ return [e.x, e.y];
491
+ }, Os = (t) => {
492
+ const e = v(t);
493
493
  return { left: e.x, top: e.y };
494
494
  }, tt = (t, e = 0) => {
495
- const r = $(t);
495
+ const r = v(t);
496
496
  return { x: Number(r.x.toFixed(e)), y: Number(r.y.toFixed(e)) };
497
497
  }, ne = (t, e) => {
498
- const r = $(t), n = $(e);
498
+ const r = v(t), n = v(e);
499
499
  return { x: r.x - n.x, y: r.y - n.y };
500
500
  }, se = (t) => {
501
- const e = $(t), r = Math.hypot(e.x, e.y);
501
+ const e = v(t), r = Math.hypot(e.x, e.y);
502
502
  return r === 0 ? { x: 0, y: 0 } : { x: -e.y / r, y: e.x / r };
503
- }, cr = (t) => {
504
- const e = $(t), r = Math.hypot(e.x, e.y);
503
+ }, hr = (t) => {
504
+ const e = v(t), r = Math.hypot(e.x, e.y);
505
505
  return r === 0 ? { x: 0, y: 0 } : { x: e.x / r, y: e.y / r };
506
- }, hr = (...t) => {
506
+ }, fr = (...t) => {
507
507
  const e = t.reduce((r, n) => de(r, n), U);
508
- return St(e, 1 / t.length);
509
- }, Os = (t, e) => {
508
+ return Nt(e, 1 / t.length);
509
+ }, vs = (t, e) => {
510
510
  const r = [];
511
511
  for (let n = 0; n < t.length; n++) {
512
512
  const s = t[n];
@@ -523,63 +523,67 @@ const xn = a.enum([...ft.options, ...yt.options]), Sn = a.union([ft, yt, a.insta
523
523
  const E = Math.acos(
524
524
  (g.x * S.x + g.y * S.y) / (Math.hypot(g.x, g.y) * Math.hypot(S.x, S.y))
525
525
  ), te = Math.sin(E / 2);
526
- te === 0 ? l = e : l = e / te, c = cr(hr(i, o));
526
+ te === 0 ? l = e : l = e / te, c = hr(fr(i, o));
527
527
  }
528
- r.push(St(c, l));
528
+ r.push(Nt(c, l));
529
529
  }
530
530
  return r;
531
- }, $s = (t) => {
532
- const e = $(t);
531
+ }, Ts = (t) => {
532
+ const e = v(t);
533
533
  return { x: e.y, y: e.x };
534
- }, go = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
534
+ }, rt = (t) => {
535
+ const e = v(t);
536
+ return { x: Math.round(e.x), y: Math.round(e.y) };
537
+ }, yo = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
535
538
  __proto__: null,
536
- INFINITY: cs,
537
- NAN: hs,
538
- ONE: or,
539
+ INFINITY: hs,
540
+ NAN: fs,
541
+ ONE: ur,
539
542
  ZERO: U,
540
- average: hr,
541
- calculateMiters: Os,
542
- clientXY: Ht,
543
- construct: $,
544
- couple: bs,
543
+ average: fr,
544
+ calculateMiters: vs,
545
+ clientXY: Jt,
546
+ construct: v,
547
+ couple: ws,
545
548
  crudeZ: et,
546
- css: ws,
547
- distance: gs,
549
+ css: Os,
550
+ distance: ps,
548
551
  equals: Ae,
549
- isFinite: ms,
550
- isNan: ys,
551
- isZero: fs,
552
+ isFinite: bs,
553
+ isNan: ms,
554
+ isZero: ds,
552
555
  normal: se,
553
- normalize: cr,
554
- scale: St,
555
- set: ds,
556
+ normalize: hr,
557
+ round: rt,
558
+ scale: Nt,
559
+ set: gs,
556
560
  sub: ne,
557
- swap: $s,
561
+ swap: Ts,
558
562
  translate: de,
559
- translateX: ur,
560
- translateY: lr,
561
- translation: ps,
563
+ translateX: lr,
564
+ translateY: cr,
565
+ translation: ys,
562
566
  truncate: tt,
563
567
  xy: he
564
- }, Symbol.toStringTag, { value: "Module" })), we = a.union([a.number(), a.string()]), Ts = a.object({
568
+ }, Symbol.toStringTag, { value: "Module" })), we = a.union([a.number(), a.string()]), xs = a.object({
565
569
  top: we,
566
570
  left: we,
567
571
  width: we,
568
572
  height: we
569
- }), vs = a.object({
573
+ }), $s = a.object({
570
574
  left: a.number(),
571
575
  top: a.number(),
572
576
  right: a.number(),
573
577
  bottom: a.number()
574
- }), xs = a.object({
578
+ }), Ss = a.object({
575
579
  one: he,
576
580
  two: he,
577
- root: ir
578
- }), fr = { one: U, two: U, root: me }, Ss = { one: U, two: or, root: Le }, dr = (t, e) => ({
581
+ root: ar
582
+ }), dr = { one: U, two: U, root: me }, Ns = { one: U, two: ur, root: Le }, gr = (t, e) => ({
579
583
  one: t.one,
580
584
  two: t.two,
581
585
  root: e ?? t.root
582
- }), T = (t, e, r = 0, n = 0, s) => {
586
+ }), O = (t, e, r = 0, n = 0, s) => {
583
587
  const i = {
584
588
  one: { ...U },
585
589
  two: { ...U },
@@ -597,12 +601,12 @@ const xn = a.enum([...ft.options, ...yt.options]), Sn = a.union([ft, yt, a.insta
597
601
  x: i.one.x + e.signedWidth,
598
602
  y: i.one.y + e.signedHeight
599
603
  } : i.two = e, i));
600
- }, Ns = (t, e, r) => {
601
- const n = T(t);
604
+ }, Is = (t, e, r) => {
605
+ const n = O(t);
602
606
  if (typeof e == "string") {
603
607
  if (r == null) throw new Error("Invalid arguments for resize");
604
608
  const s = Z(e);
605
- return T(
609
+ return O(
606
610
  n.one,
607
611
  void 0,
608
612
  s === "x" ? r : z(n),
@@ -610,202 +614,206 @@ const xn = a.enum([...ft.options, ...yt.options]), Sn = a.union([ft, yt, a.insta
610
614
  n.root
611
615
  );
612
616
  }
613
- return T(n.one, e, void 0, void 0, n.root);
614
- }, Is = (t, e, r = !0) => {
615
- const n = T(t);
617
+ return O(n.one, e, void 0, void 0, n.root);
618
+ }, Ms = (t, e, r = !0) => {
619
+ const n = O(t);
616
620
  let s = (i, o) => i < o;
617
621
  return r && (s = (i, o) => i <= o), "one" in e ? s(P(n), P(e)) && s(W(e), W(n)) && s(q(n), q(e)) && s(G(e), G(n)) : s(P(n), e.x) && s(e.x, W(n)) && s(q(n), e.y) && s(e.y, G(n));
618
- }, Ms = (t, e) => Ae(t.one, e.one) && Ae(t.two, e.two) && xt(t.root, e.root), gr = (t) => ({
622
+ }, Es = (t, e) => Ae(t.one, e.one) && Ae(t.two, e.two) && St(t.root, e.root), pr = (t) => ({
619
623
  width: z(t),
620
624
  height: F(t)
621
- }), Es = (t) => ({
625
+ }), As = (t) => ({
622
626
  signedWidth: De(t),
623
627
  signedHeight: Pe(t)
624
- }), As = (t) => ({
628
+ }), Bs = (t) => ({
625
629
  top: q(t),
626
630
  left: P(t),
627
631
  width: z(t),
628
632
  height: F(t)
629
- }), Nt = (t, e, r = !1) => {
633
+ }), It = (t, e, r = !1) => {
630
634
  const n = Z(e) === "y" ? Pe(t) : De(t);
631
635
  return r ? n : Math.abs(n);
632
636
  }, j = (t, e) => {
633
- const r = T(t);
637
+ const r = O(t);
634
638
  return {
635
- x: e.x === "center" ? rt(r).x : H(r, e.x),
636
- y: e.y === "center" ? rt(r).y : H(r, e.y)
639
+ x: e.x === "center" ? nt(r).x : H(r, e.x),
640
+ y: e.y === "center" ? nt(r).y : H(r, e.y)
637
641
  };
638
642
  }, H = (t, e) => {
639
- const r = T(t), n = ar(r.root).includes(e) ? Math.min : Math.max;
643
+ const r = O(t), n = or(r.root).includes(e) ? Math.min : Math.max;
640
644
  return je.includes(e) ? n(r.one.x, r.two.x) : n(r.one.y, r.two.y);
641
- }, Bs = (t) => t.one.x === t.two.x && t.one.y === t.two.y, z = (t) => Nt(t, "x"), F = (t) => Nt(t, "y"), De = (t) => {
642
- const e = T(t);
645
+ }, Us = (t) => t.one.x === t.two.x && t.one.y === t.two.y, z = (t) => It(t, "x"), F = (t) => It(t, "y"), De = (t) => {
646
+ const e = O(t);
643
647
  return e.two.x - e.one.x;
644
648
  }, Pe = (t) => {
645
- const e = T(t);
649
+ const e = O(t);
646
650
  return e.two.y - e.one.y;
647
- }, pr = (t) => j(t, me), Us = (t) => j(t, Ot), Cs = (t) => j(t, mt), js = (t) => j(t, Le), Rs = (t) => j(t, $t), Ls = (t) => j(t, bt), Ds = (t) => j(t, vt), Ps = (t) => j(t, Tt), W = (t) => H(t, "right"), G = (t) => H(t, "bottom"), P = (t) => H(t, "left"), q = (t) => H(t, "top"), rt = (t) => de(pr(t), {
651
+ }, yr = (t) => j(t, me), Cs = (t) => j(t, vt), js = (t) => j(t, bt), Rs = (t) => j(t, Le), Ls = (t) => j(t, Tt), Ds = (t) => j(t, wt), Ps = (t) => j(t, $t), qs = (t) => j(t, xt), W = (t) => H(t, "right"), G = (t) => H(t, "bottom"), P = (t) => H(t, "left"), q = (t) => H(t, "top"), nt = (t) => de(yr(t), {
648
652
  x: De(t) / 2,
649
653
  y: Pe(t) / 2
650
- }), It = (t) => {
651
- const e = T(t);
654
+ }), Mt = (t) => {
655
+ const e = O(t);
652
656
  return e.root.x === "left" ? P(e) : W(e);
653
- }, Mt = (t) => {
654
- const e = T(t);
657
+ }, Et = (t) => {
658
+ const e = O(t);
655
659
  return e.root.y === "top" ? q(e) : G(e);
656
- }, qs = (t) => ({ x: It(t), y: Mt(t) }), Ne = (t) => {
657
- const e = T(t);
660
+ }, ks = (t) => ({ x: Mt(t), y: Et(t) }), Ne = (t) => {
661
+ const e = O(t);
658
662
  return { lower: e.one.x, upper: e.two.x };
659
663
  }, Ie = (t) => {
660
- const e = T(t);
664
+ const e = O(t);
661
665
  return { lower: e.one.y, upper: e.two.y };
662
- }, ks = (t, e) => dr(t, e), zs = (t, e) => {
663
- const r = T(t), n = je.includes(e) ? "x" : Re.includes(e) ? "y" : null;
666
+ }, zs = (t, e) => gr(t, e), Fs = (t, e) => {
667
+ const r = O(t), n = je.includes(e) ? "x" : Re.includes(e) ? "y" : null;
664
668
  if (n === null) throw new Error(`Invalid location: ${e}`);
665
669
  const s = e === "top" || e === "left" ? Math.min : Math.max, i = { ...r.one }, o = { ...r.two };
666
670
  return i[n] = s(r.one[n], r.two[n]), o[n] = s(r.one[n], r.two[n]), [i, o];
667
- }, Fs = (t, e) => {
668
- const r = T(t), n = T(e), s = It(n) + (z(n) - z(r)) / 2, i = Mt(n) + (F(n) - F(r)) / 2;
669
- return T({ x: s, y: i }, gr(r));
670
- }, yr = (t) => typeof t != "object" || t == null ? !1 : "one" in t && "two" in t && "root" in t, Zs = (t) => z(t) / F(t), Ys = (t, e, r) => {
671
+ }, Zs = (t, e) => {
672
+ const r = O(t), n = O(e), s = Mt(n) + (z(n) - z(r)) / 2, i = Et(n) + (F(n) - F(r)) / 2;
673
+ return O({ x: s, y: i }, pr(r));
674
+ }, mr = (t) => typeof t != "object" || t == null ? !1 : "one" in t && "two" in t && "root" in t, Ys = (t) => z(t) / F(t), Vs = (t, e, r) => {
671
675
  if (typeof e == "string") {
672
676
  if (r == null) throw new Error("Undefined amount passed into box.translate");
673
677
  const s = Z(e);
674
- e = $(s, r);
678
+ e = v(s, r);
675
679
  }
676
- const n = T(t);
677
- return T(
680
+ const n = O(t);
681
+ return O(
678
682
  de(n.one, e),
679
683
  de(n.two, e),
680
684
  void 0,
681
685
  void 0,
682
686
  n.root
683
687
  );
684
- }, Vs = (t, e) => {
688
+ }, Ws = (t, e) => {
685
689
  const r = Math.max(P(t), P(e)), n = Math.max(q(t), q(e)), s = Math.min(W(t), W(e)), i = Math.min(G(t), G(e));
686
- return r > s || n > i ? fr : T({ x: r, y: n }, { x: s, y: i }, void 0, void 0, t.root);
687
- }, Ws = (t) => z(t) * F(t), Gs = (t, e) => {
688
- const r = T(t);
689
- return T(
690
+ return r > s || n > i ? dr : O({ x: r, y: n }, { x: s, y: i }, void 0, void 0, t.root);
691
+ }, Gs = (t) => z(t) * F(t), Hs = (t, e) => {
692
+ const r = O(t);
693
+ return O(
690
694
  tt(r.one, e),
691
695
  tt(r.two, e),
692
696
  void 0,
693
697
  void 0,
694
698
  r.root
695
699
  );
696
- }, Hs = (t, e, r, n, s, i) => {
700
+ }, Js = (t, e, r, n, s, i) => {
697
701
  const o = { x: t, y: e }, c = { x: t + r, y: e + n };
698
- 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)), T(o, c, void 0, void 0, i);
699
- }, po = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
702
+ 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(o, c, void 0, void 0, i);
703
+ }, Xs = (t) => {
704
+ const e = O(t);
705
+ return O(rt(e.one), rt(e.two), void 0, void 0, e.root);
706
+ }, mo = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
700
707
  __proto__: null,
701
- DECIMAL: Ss,
702
- ZERO: fr,
703
- area: Ws,
704
- areaIsZero: Bs,
705
- aspect: Zs,
708
+ DECIMAL: Ns,
709
+ ZERO: dr,
710
+ area: Gs,
711
+ areaIsZero: Us,
712
+ aspect: Ys,
706
713
  bottom: G,
707
- bottomCenter: Rs,
708
- bottomLeft: js,
709
- bottomRight: Ls,
710
- box: xs,
711
- center: rt,
712
- centerLeft: Ds,
713
- centerRight: Ps,
714
- construct: T,
715
- constructWithAlternateRoot: Hs,
716
- contains: Is,
717
- copy: dr,
718
- css: As,
719
- cssBox: Ts,
720
- dim: Nt,
721
- dims: gr,
722
- domRect: vs,
723
- edgePoints: zs,
724
- equals: Ms,
714
+ bottomCenter: Ls,
715
+ bottomLeft: Rs,
716
+ bottomRight: Ds,
717
+ box: Ss,
718
+ center: nt,
719
+ centerLeft: Ps,
720
+ centerRight: qs,
721
+ construct: O,
722
+ constructWithAlternateRoot: Js,
723
+ contains: Ms,
724
+ copy: gr,
725
+ css: Bs,
726
+ cssBox: xs,
727
+ dim: It,
728
+ dims: pr,
729
+ domRect: $s,
730
+ edgePoints: Fs,
731
+ equals: Es,
725
732
  height: F,
726
- intersection: Vs,
727
- isBox: yr,
733
+ intersection: Ws,
734
+ isBox: mr,
728
735
  left: P,
729
736
  loc: H,
730
- positionInCenter: Fs,
731
- reRoot: ks,
732
- resize: Ns,
737
+ positionInCenter: Zs,
738
+ reRoot: zs,
739
+ resize: Is,
733
740
  right: W,
734
- root: qs,
735
- signedDims: Es,
741
+ root: ks,
742
+ round: Xs,
743
+ signedDims: As,
736
744
  signedHeight: Pe,
737
745
  signedWidth: De,
738
746
  top: q,
739
- topCenter: Us,
740
- topLeft: pr,
741
- topRight: Cs,
742
- translate: Ys,
743
- truncate: Gs,
747
+ topCenter: Cs,
748
+ topLeft: yr,
749
+ topRight: js,
750
+ translate: Vs,
751
+ truncate: Hs,
744
752
  width: z,
745
- x: It,
753
+ x: Mt,
746
754
  xBounds: Ne,
747
755
  xyLoc: j,
748
- y: Mt,
756
+ y: Et,
749
757
  yBounds: Ie
750
- }, Symbol.toStringTag, { value: "Module" })), mr = a.object({ signedWidth: a.number(), signedHeight: a.number() }), Js = a.union([ht, mr, he, Ue]), Xs = { width: 0, height: 0 }, Ks = { width: 1, height: 1 }, M = (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 }, Qs = (t, e) => {
758
+ }, Symbol.toStringTag, { value: "Module" })), br = a.object({ signedWidth: a.number(), signedHeight: a.number() }), Ks = a.union([ft, br, he, Ue]), Qs = { width: 0, height: 0 }, _s = { width: 1, height: 1 }, M = (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 }, ei = (t, e) => {
751
759
  if (e == null) return !1;
752
760
  const r = M(t), n = M(e);
753
761
  return r.width === n.width && r.height === n.height;
754
- }, _s = (t) => {
762
+ }, ti = (t) => {
755
763
  const e = M(t);
756
764
  return { width: e.height, height: e.width };
757
- }, ei = (t) => {
765
+ }, ri = (t) => {
758
766
  const e = M(t);
759
767
  return `0 0 ${e.width} ${e.height}`;
760
- }, ti = (t) => {
768
+ }, ni = (t) => {
761
769
  const e = M(t);
762
770
  return [e.width, e.height];
763
- }, ri = (t) => ({
771
+ }, si = (t) => ({
764
772
  width: Math.max(...t.map((e) => M(e).width)),
765
773
  height: Math.max(...t.map((e) => M(e).height))
766
- }), ni = (t) => ({
774
+ }), ii = (t) => ({
767
775
  width: Math.min(...t.map((e) => M(e).width)),
768
776
  height: Math.min(...t.map((e) => M(e).height))
769
- }), si = (t, e) => {
777
+ }), ai = (t, e) => {
770
778
  const r = M(t);
771
779
  return { width: r.width * e, height: r.height * e };
772
- }, yo = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
780
+ }, bo = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
773
781
  __proto__: null,
774
- DECIMAL: Ks,
775
- ZERO: Xs,
782
+ DECIMAL: _s,
783
+ ZERO: Qs,
776
784
  construct: M,
777
- couple: ti,
778
- crude: Js,
779
- dimensions: ht,
780
- equals: Qs,
781
- max: ri,
782
- min: ni,
783
- scale: si,
784
- signed: mr,
785
- svgViewBox: ei,
786
- swap: _s
787
- }, Symbol.toStringTag, { value: "Module" })), ii = (t, e, r) => e !== void 0 && t < e ? e : r !== void 0 && t > r ? r : t, ai = a.object({ offset: et, scale: et }), oi = a.object({ offset: a.number(), scale: a.number() }), ui = (t) => (e, r, n, s) => r === "dimension" ? [e, n] : [
785
+ couple: ni,
786
+ crude: Ks,
787
+ dimensions: ft,
788
+ equals: ei,
789
+ max: si,
790
+ min: ii,
791
+ scale: ai,
792
+ signed: br,
793
+ svgViewBox: ri,
794
+ swap: ti
795
+ }, Symbol.toStringTag, { value: "Module" })), oi = (t, e, r) => e !== void 0 && t < e ? e : r !== void 0 && t > r ? r : t, ui = a.object({ offset: et, scale: et }), li = a.object({ offset: a.number(), scale: a.number() }), ci = (t) => (e, r, n, s) => r === "dimension" ? [e, n] : [
788
796
  e,
789
797
  s ? n - t : n + t
790
- ], li = (t) => (e, r, n, s) => [
798
+ ], hi = (t) => (e, r, n, s) => [
791
799
  e,
792
800
  s ? n / t : n * t
793
- ], ci = (t) => (e, r, n) => {
801
+ ], fi = (t) => (e, r, n) => {
794
802
  if (e === null) return [t, n];
795
803
  const { lower: s, upper: i } = e, { lower: o, upper: c } = t, l = i - s, f = c - o;
796
804
  if (r === "dimension") return [t, n * (f / l)];
797
805
  const p = (n - s) * (f / l) + o;
798
806
  return [t, p];
799
- }, hi = (t) => (e, r, n) => [t, n], fi = () => (t, e, r) => {
807
+ }, di = (t) => (e, r, n) => [t, n], gi = () => (t, e, r) => {
800
808
  if (t === null) throw new Error("cannot invert without bounds");
801
809
  if (e === "dimension") return [t, r];
802
810
  const { lower: n, upper: s } = t;
803
811
  return [t, s - (r - n)];
804
- }, di = (t) => (e, r, n) => {
812
+ }, pi = (t) => (e, r, n) => {
805
813
  const { lower: s, upper: i } = t;
806
- return n = ii(n, s, i), [e, n];
814
+ return n = oi(n, s, i), [e, n];
807
815
  };
808
- let nt = class K {
816
+ let st = class K {
809
817
  ops = [];
810
818
  currBounds = null;
811
819
  currType = null;
@@ -839,7 +847,7 @@ let nt = class K {
839
847
  * @param value - The amount to translate by.
840
848
  */
841
849
  translate(e) {
842
- const r = this.new(), n = ui(e);
850
+ const r = this.new(), n = ci(e);
843
851
  return n.type = "translate", r.ops.push(n), r;
844
852
  }
845
853
  /**
@@ -849,23 +857,23 @@ let nt = class K {
849
857
  * @param value - The amount to magnify by.
850
858
  */
851
859
  magnify(e) {
852
- const r = this.new(), n = li(e);
860
+ const r = this.new(), n = hi(e);
853
861
  return n.type = "magnify", r.ops.push(n), r;
854
862
  }
855
863
  scale(e, r) {
856
- const n = y(e, r), s = this.new(), i = ci(n);
864
+ const n = y(e, r), s = this.new(), i = fi(n);
857
865
  return i.type = "scale", s.ops.push(i), s;
858
866
  }
859
867
  clamp(e, r) {
860
- const n = y(e, r), s = this.new(), i = di(n);
868
+ const n = y(e, r), s = this.new(), i = pi(n);
861
869
  return i.type = "clamp", s.ops.push(i), s;
862
870
  }
863
871
  reBound(e, r) {
864
- const n = y(e, r), s = this.new(), i = hi(n);
872
+ const n = y(e, r), s = this.new(), i = di(n);
865
873
  return i.type = "re-bound", s.ops.push(i), s;
866
874
  }
867
875
  invert() {
868
- const e = fi();
876
+ const e = gi();
869
877
  e.type = "invert";
870
878
  const r = this.new();
871
879
  return r.ops.push(e), r;
@@ -904,11 +912,11 @@ let nt = class K {
904
912
  return { scale: this.dim(1), offset: this.pos(0) };
905
913
  }
906
914
  static IDENTITY = new K();
907
- }, gi = class A {
915
+ }, yi = class A {
908
916
  x;
909
917
  y;
910
918
  currRoot;
911
- constructor(e = new nt(), r = new nt(), n = null) {
919
+ constructor(e = new st(), r = new st(), n = null) {
912
920
  this.x = e, this.y = r, this.currRoot = n;
913
921
  }
914
922
  static translate(e, r) {
@@ -933,7 +941,7 @@ let nt = class K {
933
941
  return new A().reBound(e);
934
942
  }
935
943
  translate(e, r) {
936
- const n = $(e, r), s = this.copy();
944
+ const n = v(e, r), s = this.copy();
937
945
  return s.x = this.x.translate(n.x), s.y = this.y.translate(n.y), s;
938
946
  }
939
947
  translateX(e) {
@@ -950,9 +958,9 @@ let nt = class K {
950
958
  }
951
959
  scale(e) {
952
960
  const r = this.copy();
953
- if (yr(e)) {
961
+ if (mr(e)) {
954
962
  const n = this.currRoot;
955
- return r.currRoot = e.root, n != null && !xt(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(Ne(e)), r.y = r.y.scale(Ie(e)), r;
963
+ return r.currRoot = e.root, n != null && !St(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(Ne(e)), r.y = r.y.scale(Ie(e)), r;
956
964
  }
957
965
  return r.x = r.x.scale(e.width), r.y = r.y.scale(e.height), r;
958
966
  }
@@ -979,7 +987,7 @@ let nt = class K {
979
987
  return { x: this.x.dim(e.x), y: this.y.dim(e.y) };
980
988
  }
981
989
  box(e) {
982
- return T(
990
+ return O(
983
991
  this.pos(e.one),
984
992
  this.pos(e.two),
985
993
  0,
@@ -995,28 +1003,28 @@ let nt = class K {
995
1003
  }
996
1004
  static IDENTITY = new A();
997
1005
  };
998
- const mo = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1006
+ const wo = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
999
1007
  __proto__: null,
1000
- Scale: nt,
1001
- XY: gi,
1002
- crudeXYTransform: ai,
1003
- transform: oi
1008
+ Scale: st,
1009
+ XY: yi,
1010
+ crudeXYTransform: ui,
1011
+ transform: li
1004
1012
  }, Symbol.toStringTag, { value: "Module" }));
1005
- let pi = (t, e = 21) => (r = e) => {
1013
+ let mi = (t, e = 21) => (r = e) => {
1006
1014
  let n = "", s = r | 0;
1007
1015
  for (; s--; )
1008
1016
  n += t[Math.random() * t.length | 0];
1009
1017
  return n;
1010
1018
  };
1011
- const yi = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz", br = 11, mi = pi(yi, br), Et = () => mi(), bo = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1019
+ const bi = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz", wr = 11, wi = mi(bi, wr), At = () => wi(), Oo = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1012
1020
  __proto__: null,
1013
- LENGTH: br,
1014
- create: Et
1015
- }, Symbol.toStringTag, { value: "Module" })), bi = (t, e) => (r) => r instanceof e || typeof r == "object" && r !== null && "discriminator" in r && r.discriminator === t, wi = a.enum(["static", "dynamic"]), Oi = a.union([
1021
+ LENGTH: wr,
1022
+ create: At
1023
+ }, Symbol.toStringTag, { value: "Module" })), Oi = (t, e) => (r) => r instanceof e || typeof r == "object" && r !== null && "discriminator" in r && r.discriminator === t, vi = a.enum(["static", "dynamic"]), Ti = a.union([
1016
1024
  a.tuple([a.int()]),
1017
1025
  a.tuple([a.int(), a.int().min(1).max(12)]),
1018
1026
  a.tuple([a.int(), a.int().min(1).max(12), a.int().min(1).max(31)])
1019
- ]), wr = (t, e) => {
1027
+ ]), Or = (t, e) => {
1020
1028
  const r = new b(e);
1021
1029
  if (![
1022
1030
  h.DAY,
@@ -1389,7 +1397,7 @@ let b = class d extends J {
1389
1397
  * @example TimeStamp.now().remainder(TimeStamp.DAY) // => TimeStamp representing the current day
1390
1398
  */
1391
1399
  remainder(e) {
1392
- return wr(this, e);
1400
+ return Or(this, e);
1393
1401
  }
1394
1402
  /** @returns true if the day portion TimeStamp is today, false otherwise. */
1395
1403
  get isToday() {
@@ -1502,7 +1510,7 @@ let b = class d extends J {
1502
1510
  a.bigint().transform((e) => new d(e)),
1503
1511
  a.date().transform((e) => new d(e)),
1504
1512
  a.custom((e) => e instanceof h).transform((e) => new d(e)),
1505
- Oi.transform((e) => new d(e))
1513
+ Ti.transform((e) => new d(e))
1506
1514
  ]);
1507
1515
  /**
1508
1516
  * Sorts two timestamps.
@@ -1527,7 +1535,7 @@ class h extends J {
1527
1535
  * @returns A TimeSpan representing the given number of seconds.
1528
1536
  */
1529
1537
  static fromSeconds(e) {
1530
- return e instanceof h ? e : e instanceof Rt ? e.period : e instanceof b ? new h(e) : ["number", "bigint"].includes(typeof e) ? h.seconds(e) : new h(e);
1538
+ return e instanceof h ? e : e instanceof Lt ? e.period : e instanceof b ? new h(e) : ["number", "bigint"].includes(typeof e) ? h.seconds(e) : new h(e);
1531
1539
  }
1532
1540
  /**
1533
1541
  * Creates a TimeSpan representing the given number of milliseconds.
@@ -1536,7 +1544,7 @@ class h extends J {
1536
1544
  * @returns A TimeSpan representing the given number of milliseconds.
1537
1545
  */
1538
1546
  static fromMilliseconds(e) {
1539
- return e instanceof h ? e : e instanceof Rt ? e.period : e instanceof b ? new h(e) : ["number", "bigint"].includes(typeof e) ? h.milliseconds(e) : new h(e);
1547
+ return e instanceof h ? e : e instanceof Lt ? e.period : e instanceof b ? new h(e) : ["number", "bigint"].includes(typeof e) ? h.milliseconds(e) : new h(e);
1540
1548
  }
1541
1549
  /**
1542
1550
  * @returns the primitive value of the TimeSpan. Overrides standard JS valueOf()
@@ -1588,7 +1596,7 @@ class h extends J {
1588
1596
  * @returns A new TimeSpan representing the remainder.
1589
1597
  */
1590
1598
  remainder(e) {
1591
- return wr(this, e);
1599
+ return Or(this, e);
1592
1600
  }
1593
1601
  /**
1594
1602
  * Truncates the TimeSpan to the nearest multiple of the given span.
@@ -1771,7 +1779,7 @@ class h extends J {
1771
1779
  a.instanceof(h)
1772
1780
  ]);
1773
1781
  }
1774
- let Rt = class Q extends J {
1782
+ let Lt = class Q extends J {
1775
1783
  constructor(e) {
1776
1784
  super(e.valueOf());
1777
1785
  }
@@ -2070,7 +2078,7 @@ let Rt = class Q extends J {
2070
2078
  static sort(e, r) {
2071
2079
  return b.sort(e.start, r.start) || b.sort(e.end, r.end);
2072
2080
  }
2073
- }, O = class u extends J {
2081
+ }, T = class u extends J {
2074
2082
  constructor(e) {
2075
2083
  if (e instanceof u || typeof e == "string" || typeof e.valueOf() == "string")
2076
2084
  super(e.valueOf());
@@ -2406,7 +2414,7 @@ class m extends J {
2406
2414
  return this.valueOf() === 0;
2407
2415
  }
2408
2416
  }
2409
- const wo = a.union([
2417
+ const vo = a.union([
2410
2418
  a.instanceof(Uint8Array),
2411
2419
  a.instanceof(Uint16Array),
2412
2420
  a.instanceof(Uint32Array),
@@ -2417,40 +2425,40 @@ const wo = a.union([
2417
2425
  a.instanceof(Int16Array),
2418
2426
  a.instanceof(Int32Array),
2419
2427
  a.instanceof(BigInt64Array)
2420
- ]), Or = (t) => {
2428
+ ]), vr = (t) => {
2421
2429
  const e = typeof t;
2422
2430
  return e === "string" || e === "number" || e === "boolean" || e === "bigint" || t instanceof b || t instanceof h || t instanceof Date;
2423
- }, $i = (t, e, r, n = 0) => t.usesBigInt && !e.usesBigInt ? Number(r) - Number(n) : !t.usesBigInt && e.usesBigInt ? BigInt(r.valueOf()) - BigInt(n.valueOf()) : Me(r, -n), Me = (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), Ti = /^(?:[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;
2424
- function vi(t) {
2425
- return typeof t == "string" && Ti.test(t);
2431
+ }, xi = (t, e, r, n = 0) => t.usesBigInt && !e.usesBigInt ? Number(r) - Number(n) : !t.usesBigInt && e.usesBigInt ? BigInt(r.valueOf()) - BigInt(n.valueOf()) : Me(r, -n), Me = (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), $i = /^(?:[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;
2432
+ function Si(t) {
2433
+ return typeof t == "string" && $i.test(t);
2426
2434
  }
2427
- const x = [];
2435
+ const $ = [];
2428
2436
  for (let t = 0; t < 256; ++t)
2429
- x.push((t + 256).toString(16).slice(1));
2430
- function xi(t, e = 0) {
2431
- return (x[t[e + 0]] + x[t[e + 1]] + x[t[e + 2]] + x[t[e + 3]] + "-" + x[t[e + 4]] + x[t[e + 5]] + "-" + x[t[e + 6]] + x[t[e + 7]] + "-" + x[t[e + 8]] + x[t[e + 9]] + "-" + x[t[e + 10]] + x[t[e + 11]] + x[t[e + 12]] + x[t[e + 13]] + x[t[e + 14]] + x[t[e + 15]]).toLowerCase();
2437
+ $.push((t + 256).toString(16).slice(1));
2438
+ function Ni(t, e = 0) {
2439
+ return ($[t[e + 0]] + $[t[e + 1]] + $[t[e + 2]] + $[t[e + 3]] + "-" + $[t[e + 4]] + $[t[e + 5]] + "-" + $[t[e + 6]] + $[t[e + 7]] + "-" + $[t[e + 8]] + $[t[e + 9]] + "-" + $[t[e + 10]] + $[t[e + 11]] + $[t[e + 12]] + $[t[e + 13]] + $[t[e + 14]] + $[t[e + 15]]).toLowerCase();
2432
2440
  }
2433
- function Si(t, e = 0) {
2434
- const r = xi(t, e);
2435
- if (!vi(r))
2441
+ function Ii(t, e = 0) {
2442
+ const r = Ni(t, e);
2443
+ if (!Si(r))
2436
2444
  throw TypeError("Stringified UUID is invalid");
2437
2445
  return r;
2438
2446
  }
2439
2447
  typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto);
2440
- const $r = (t, e) => Si(t, e), L = -1, st = {
2441
- [Symbol.iterator]: () => st,
2448
+ const Tr = (t, e) => Ii(t, e), L = -1, it = {
2449
+ [Symbol.iterator]: () => it,
2442
2450
  next: () => ({ done: !0, value: void 0 })
2443
- }, Ni = a.string().transform(
2451
+ }, Mi = a.string().transform(
2444
2452
  (t) => new Uint8Array(
2445
2453
  atob(t).split("").map((e) => e.charCodeAt(0))
2446
2454
  ).buffer
2447
- ), Ii = a.union([a.null(), a.undefined()]).transform(() => new Uint8Array().buffer), it = 10, Tr = (t, e) => {
2455
+ ), Ei = a.union([a.null(), a.undefined()]).transform(() => new Uint8Array().buffer), at = 10, xr = (t, e) => {
2448
2456
  if (t === "number" && !e.isNumeric)
2449
2457
  throw new Error(`cannot convert series of type ${e.toString()} to number`);
2450
2458
  if (t === "bigint" && !e.usesBigInt)
2451
2459
  throw new Error(`cannot convert series of type ${e.toString()} to bigint`);
2452
- }, vr = "sy_x_telem_series";
2453
- let xr = class D {
2460
+ }, $r = "sy_x_telem_series";
2461
+ let Sr = class D {
2454
2462
  /**
2455
2463
  * A unique identifier for the series. If specified by the user, it is their
2456
2464
  * responsibility to ensure that it is unique. If not specified, a new ID will be
@@ -2461,7 +2469,7 @@ let xr = class D {
2461
2469
  * A discriminator used for identifying instances of the series class even
2462
2470
  * when bundlers mangle the class name.
2463
2471
  */
2464
- discriminator = vr;
2472
+ discriminator = $r;
2465
2473
  /** The data type of the series. */
2466
2474
  dataType;
2467
2475
  /**
@@ -2501,15 +2509,15 @@ let xr = class D {
2501
2509
  */
2502
2510
  static crudeZ = a.object({
2503
2511
  timeRange: V.z.optional(),
2504
- dataType: O.z,
2512
+ dataType: T.z,
2505
2513
  alignment: a.coerce.bigint().optional(),
2506
2514
  data: a.union([
2507
- Ni,
2508
- Ii,
2515
+ Mi,
2516
+ Ei,
2509
2517
  a.instanceof(ArrayBuffer),
2510
2518
  a.instanceof(Uint8Array)
2511
2519
  ]),
2512
- glBufferUsage: wi.optional().default("static").optional()
2520
+ glBufferUsage: vi.optional().default("static").optional()
2513
2521
  });
2514
2522
  /**
2515
2523
  * A zod schema that validates and constructs a series from it's crude
@@ -2590,23 +2598,23 @@ let xr = class D {
2590
2598
  * @throws Error if data type cannot be inferred from input
2591
2599
  */
2592
2600
  constructor(e) {
2593
- Mi(e) && (e = { data: e }), e.data ??= [];
2601
+ Ai(e) && (e = { data: e }), e.data ??= [];
2594
2602
  const {
2595
2603
  dataType: r,
2596
2604
  timeRange: n,
2597
2605
  sampleOffset: s = 0,
2598
2606
  glBufferUsage: i = "static",
2599
2607
  alignment: o = 0n,
2600
- key: c = Et(),
2608
+ key: c = At(),
2601
2609
  data: l
2602
2610
  } = e;
2603
- if (Sr(l)) {
2611
+ if (Nr(l)) {
2604
2612
  const g = l;
2605
2613
  this.key = g.key, this.dataType = g.dataType, this.sampleOffset = g.sampleOffset, this.gl = g.gl, this._data = g._data, this.timeRange = g.timeRange, this.alignment = g.alignment, this.cachedMin = g.cachedMin, this.cachedMax = g.cachedMax, this.writePos = g.writePos, this._refCount = g._refCount, this.cachedLength = g.cachedLength;
2606
2614
  return;
2607
2615
  }
2608
- const f = Or(l), p = Array.isArray(l);
2609
- if (r != null) this.dataType = new O(r);
2616
+ const f = vr(l), p = Array.isArray(l);
2617
+ if (r != null) this.dataType = new T(r);
2610
2618
  else {
2611
2619
  if (l instanceof ArrayBuffer)
2612
2620
  throw new Error(
@@ -2621,18 +2629,18 @@ let xr = class D {
2621
2629
  );
2622
2630
  g = l[0];
2623
2631
  }
2624
- if (typeof g == "string") this.dataType = O.STRING;
2625
- else if (typeof g == "number") this.dataType = O.FLOAT64;
2626
- else if (typeof g == "bigint") this.dataType = O.INT64;
2627
- else if (typeof g == "boolean") this.dataType = O.BOOLEAN;
2632
+ if (typeof g == "string") this.dataType = T.STRING;
2633
+ else if (typeof g == "number") this.dataType = T.FLOAT64;
2634
+ else if (typeof g == "bigint") this.dataType = T.INT64;
2635
+ else if (typeof g == "boolean") this.dataType = T.BOOLEAN;
2628
2636
  else if (g instanceof b || g instanceof Date || g instanceof b)
2629
- this.dataType = O.TIMESTAMP;
2630
- else if (typeof g == "object") this.dataType = O.JSON;
2637
+ this.dataType = T.TIMESTAMP;
2638
+ else if (typeof g == "object") this.dataType = T.JSON;
2631
2639
  else
2632
2640
  throw new Error(
2633
2641
  `cannot infer data type of ${typeof g} when constructing a Series from a JS array`
2634
2642
  );
2635
- } else this.dataType = new O(l);
2643
+ } else this.dataType = new T(l);
2636
2644
  }
2637
2645
  if (!p && !f) this._data = l;
2638
2646
  else if (p && l.length === 0)
@@ -2640,9 +2648,9 @@ let xr = class D {
2640
2648
  else {
2641
2649
  let g = f ? [l] : l;
2642
2650
  const S = g[0];
2643
- (S instanceof b || S instanceof Date || S instanceof h) && (g = g.map((E) => new b(E).valueOf())), this.dataType.equals(O.STRING) ? (this.cachedLength = g.length, this._data = new TextEncoder().encode(`${g.join(`
2651
+ (S instanceof b || S instanceof Date || S instanceof h) && (g = g.map((E) => new b(E).valueOf())), this.dataType.equals(T.STRING) ? (this.cachedLength = g.length, this._data = new TextEncoder().encode(`${g.join(`
2644
2652
  `)}
2645
- `).buffer) : this.dataType.equals(O.JSON) ? (this.cachedLength = g.length, this._data = new TextEncoder().encode(
2653
+ `).buffer) : this.dataType.equals(T.JSON) ? (this.cachedLength = g.length, this._data = new TextEncoder().encode(
2646
2654
  `${g.map((E) => He.encodeString(E)).join(`
2647
2655
  `)}
2648
2656
  `
@@ -2669,7 +2677,7 @@ let xr = class D {
2669
2677
  static alloc({ capacity: e, dataType: r, ...n }) {
2670
2678
  if (e === 0)
2671
2679
  throw new Error("[Series] - cannot allocate an array of length 0");
2672
- const s = new new O(r).Array(e), i = new D({ data: s.buffer, dataType: r, ...n });
2680
+ const s = new new T(r).Array(e), i = new D({ data: s.buffer, dataType: r, ...n });
2673
2681
  return i.writePos = 0, i;
2674
2682
  }
2675
2683
  /**
@@ -2759,7 +2767,7 @@ let xr = class D {
2759
2767
  * @returns An array of values parsed from the JSON series.
2760
2768
  */
2761
2769
  parseJSON(e) {
2762
- if (!this.dataType.equals(O.JSON))
2770
+ if (!this.dataType.equals(T.JSON))
2763
2771
  throw new Error("cannot parse non-JSON series as JSON");
2764
2772
  return this.toStrings().map((r) => e.parse(He.decodeString(r)));
2765
2773
  }
@@ -2800,7 +2808,7 @@ let xr = class D {
2800
2808
  let e = 0;
2801
2809
  const r = [0];
2802
2810
  return this.data.forEach((n, s) => {
2803
- n === it && (e++, r.push(s + 1));
2811
+ n === at && (e++, r.push(s + 1));
2804
2812
  }), this._cachedIndexes = r, this.cachedLength = e, e;
2805
2813
  }
2806
2814
  /**
@@ -2816,7 +2824,7 @@ let xr = class D {
2816
2824
  if (this.dataType.equals(e)) return this;
2817
2825
  const n = new e.Array(this.length);
2818
2826
  for (let s = 0; s < this.length; s++)
2819
- n[s] = $i(this.dataType, e, this.data[s], r);
2827
+ n[s] = xi(this.dataType, e, this.data[s], r);
2820
2828
  return new D({
2821
2829
  data: n.buffer,
2822
2830
  dataType: e,
@@ -2828,7 +2836,7 @@ let xr = class D {
2828
2836
  }
2829
2837
  calcRawMax() {
2830
2838
  if (this.length === 0) return -1 / 0;
2831
- if (this.dataType.equals(O.TIMESTAMP))
2839
+ if (this.dataType.equals(T.TIMESTAMP))
2832
2840
  this.cachedMax = this.data[this.data.length - 1];
2833
2841
  else if (this.dataType.usesBigInt) {
2834
2842
  const e = this.data;
@@ -2850,7 +2858,7 @@ let xr = class D {
2850
2858
  }
2851
2859
  calcRawMin() {
2852
2860
  if (this.length === 0) return 1 / 0;
2853
- if (this.dataType.equals(O.TIMESTAMP)) this.cachedMin = this.data[0];
2861
+ if (this.dataType.equals(T.TIMESTAMP)) this.cachedMin = this.data[0];
2854
2862
  else if (this.dataType.usesBigInt) {
2855
2863
  const e = this.data;
2856
2864
  this.cachedMin = e.reduce((r, n) => r < n ? r : n);
@@ -2893,7 +2901,7 @@ let xr = class D {
2893
2901
  }
2894
2902
  at(e, r = !1) {
2895
2903
  if (this.dataType.isVariable) return this.atVariable(e, r ?? !1);
2896
- if (this.dataType.equals(O.UUID)) return this.atUUID(e, r);
2904
+ if (this.dataType.equals(T.UUID)) return this.atUUID(e, r);
2897
2905
  e < 0 && (e = this.length + e);
2898
2906
  const n = this.data[e];
2899
2907
  if (n == null) {
@@ -2904,7 +2912,7 @@ let xr = class D {
2904
2912
  }
2905
2913
  atUUID(e, r) {
2906
2914
  e < 0 && (e = this.length + e);
2907
- const n = $r(
2915
+ const n = Tr(
2908
2916
  new Uint8Array(this.buffer, e * this.dataType.density.valueOf())
2909
2917
  );
2910
2918
  if (n == null) {
@@ -2920,7 +2928,7 @@ let xr = class D {
2920
2928
  else {
2921
2929
  e < 0 && (e = this.length + e);
2922
2930
  for (let o = 0; o < this.data.length; o++)
2923
- if (this.data[o] === it) {
2931
+ if (this.data[o] === at) {
2924
2932
  if (e === 0) {
2925
2933
  s = o;
2926
2934
  break;
@@ -2933,7 +2941,7 @@ let xr = class D {
2933
2941
  }
2934
2942
  }
2935
2943
  const i = this.data.slice(n, s);
2936
- return this.dataType.equals(O.STRING) ? new TextDecoder().decode(i) : lt(JSON.parse(new TextDecoder().decode(i)));
2944
+ return this.dataType.equals(T.STRING) ? new TextDecoder().decode(i) : ct(JSON.parse(new TextDecoder().decode(i)));
2937
2945
  }
2938
2946
  /**
2939
2947
  * @returns the index of the first sample that is greater than or equal to the given value.
@@ -2958,7 +2966,7 @@ let xr = class D {
2958
2966
  * be the same buffer previously passed to {@method acquire} or {@method updateGLBuffer}.
2959
2967
  */
2960
2968
  updateGLBuffer(e) {
2961
- if (this.gl.control = e, !this.dataType.equals(O.FLOAT32) && !this.dataType.equals(O.UINT8))
2969
+ if (this.gl.control = e, !this.dataType.equals(T.FLOAT32) && !this.dataType.equals(T.UINT8))
2962
2970
  throw new Error("Only FLOAT32 and UINT8 arrays can be used in WebGL");
2963
2971
  const { buffer: r, bufferUsage: n, prevBuffer: s } = this.gl;
2964
2972
  if (r == null && (this.gl.buffer = e.createBuffer()), this.writePos !== s)
@@ -2974,7 +2982,7 @@ let xr = class D {
2974
2982
  ), this.gl.prevBuffer = L;
2975
2983
  }
2976
2984
  as(e) {
2977
- return Tr(e, this.dataType), this;
2985
+ return xr(e, this.dataType), this;
2978
2986
  }
2979
2987
  /** @returns a digest containing information about the series. */
2980
2988
  get digest() {
@@ -2983,8 +2991,8 @@ let xr = class D {
2983
2991
  dataType: this.dataType.toString(),
2984
2992
  sampleOffset: this.sampleOffset,
2985
2993
  alignment: {
2986
- lower: Dt(this.alignmentBounds.lower),
2987
- upper: Dt(this.alignmentBounds.upper)
2994
+ lower: Pt(this.alignmentBounds.lower),
2995
+ upper: Pt(this.alignmentBounds.upper)
2988
2996
  },
2989
2997
  timeRange: this.timeRange.toString(),
2990
2998
  length: this.length,
@@ -3018,10 +3026,10 @@ let xr = class D {
3018
3026
  }
3019
3027
  [Symbol.iterator]() {
3020
3028
  if (this.dataType.isVariable) {
3021
- const e = new Ei(this);
3022
- return this.dataType.equals(O.JSON) ? new Ai(e) : e;
3029
+ const e = new Bi(this);
3030
+ return this.dataType.equals(T.JSON) ? new Ui(e) : e;
3023
3031
  }
3024
- return this.dataType.equals(O.UUID) ? new Bi(this) : new Ui(this);
3032
+ return this.dataType.equals(T.UUID) ? new Ci(this) : new ji(this);
3025
3033
  }
3026
3034
  /**
3027
3035
  * Returns a slice of the series from start to end.
@@ -3048,7 +3056,7 @@ let xr = class D {
3048
3056
  * @returns An iterator over the specified range.
3049
3057
  */
3050
3058
  subIterator(e, r) {
3051
- return new Lt(this, e, r ?? this.length);
3059
+ return new Dt(this, e, r ?? this.length);
3052
3060
  }
3053
3061
  /**
3054
3062
  * Returns an iterator over a portion of the series based on alignment.
@@ -3057,7 +3065,7 @@ let xr = class D {
3057
3065
  * @returns An iterator over the specified alignment range.
3058
3066
  */
3059
3067
  subAlignmentIterator(e, r) {
3060
- return new Lt(
3068
+ return new Dt(
3061
3069
  this,
3062
3070
  Number(e - this.alignment),
3063
3071
  Number(r - this.alignment)
@@ -3120,8 +3128,8 @@ let xr = class D {
3120
3128
  return e += "])", e;
3121
3129
  }
3122
3130
  };
3123
- const Mi = (t) => t == null ? !1 : Array.isArray(t) || t instanceof ArrayBuffer || ArrayBuffer.isView(t) && !(t instanceof DataView) || t instanceof xr ? !0 : Or(t), Sr = bi(vr, xr);
3124
- let Lt = class {
3131
+ const Ai = (t) => t == null ? !1 : Array.isArray(t) || t instanceof ArrayBuffer || ArrayBuffer.isView(t) && !(t instanceof DataView) || t instanceof Sr ? !0 : vr(t), Nr = Oi($r, Sr);
3132
+ let Dt = class {
3125
3133
  series;
3126
3134
  end;
3127
3135
  index;
@@ -3134,7 +3142,7 @@ let Lt = class {
3134
3142
  return this.index >= this.end ? { done: !0, value: void 0 } : { done: !1, value: this.series.at(this.index++, !0) };
3135
3143
  }
3136
3144
  };
3137
- class Ei {
3145
+ class Bi {
3138
3146
  series;
3139
3147
  index;
3140
3148
  decoder;
@@ -3147,12 +3155,12 @@ class Ei {
3147
3155
  }
3148
3156
  next() {
3149
3157
  const e = this.index, r = this.series.data;
3150
- for (; this.index < r.length && r[this.index] !== it; ) this.index++;
3158
+ for (; this.index < r.length && r[this.index] !== at; ) this.index++;
3151
3159
  const n = this.index;
3152
3160
  return e === n ? { done: !0, value: void 0 } : (this.index++, { done: !1, value: this.decoder.decode(this.series.buffer.slice(e, n)) });
3153
3161
  }
3154
3162
  }
3155
- let Ai = class Nr {
3163
+ let Ui = class Ir {
3156
3164
  wrapped;
3157
3165
  static schema = a.record(a.string(), a.unknown());
3158
3166
  constructor(e) {
@@ -3162,25 +3170,25 @@ let Ai = class Nr {
3162
3170
  const e = this.wrapped.next();
3163
3171
  return e.done === !0 ? { done: !0, value: void 0 } : {
3164
3172
  done: !1,
3165
- value: He.decodeString(e.value, Nr.schema)
3173
+ value: He.decodeString(e.value, Ir.schema)
3166
3174
  };
3167
3175
  }
3168
- }, Bi = class {
3176
+ }, Ci = class {
3169
3177
  series;
3170
3178
  index;
3171
3179
  data;
3172
3180
  density;
3173
3181
  constructor(e) {
3174
- if (!e.dataType.equals(O.UUID))
3182
+ if (!e.dataType.equals(T.UUID))
3175
3183
  throw new Error("cannot create a UUID series iterator for a non-UUID series");
3176
- this.series = e, this.index = 0, this.data = new Uint8Array(e.buffer), this.density = O.UUID.density.valueOf();
3184
+ this.series = e, this.index = 0, this.data = new Uint8Array(e.buffer), this.density = T.UUID.density.valueOf();
3177
3185
  }
3178
3186
  next() {
3179
3187
  if (this.index >= this.series.length) return { done: !0, value: void 0 };
3180
- const e = $r(this.data, this.index * this.density);
3188
+ const e = Tr(this.data, this.index * this.density);
3181
3189
  return this.index++, { done: !1, value: e };
3182
3190
  }
3183
- }, Ui = class {
3191
+ }, ji = class {
3184
3192
  series;
3185
3193
  index;
3186
3194
  constructor(e) {
@@ -3192,7 +3200,7 @@ let Ai = class Nr {
3192
3200
  value: this.series.at(this.index++, !0)
3193
3201
  };
3194
3202
  }
3195
- }, vo = class {
3203
+ }, So = class {
3196
3204
  /** The array of series in this collection */
3197
3205
  series;
3198
3206
  /**
@@ -3245,14 +3253,14 @@ let Ai = class Nr {
3245
3253
  this.series = e;
3246
3254
  }
3247
3255
  as(e) {
3248
- return Tr(e, this.dataType), this;
3256
+ return xr(e, this.dataType), this;
3249
3257
  }
3250
3258
  /**
3251
3259
  * Returns the data type of the series in this collection. If the collection is empty,
3252
3260
  * returns DataType.UNKNOWN.
3253
3261
  */
3254
3262
  get dataType() {
3255
- return this.series.length === 0 ? O.UNKNOWN : this.series[0].dataType;
3263
+ return this.series.length === 0 ? T.UNKNOWN : this.series[0].dataType;
3256
3264
  }
3257
3265
  /**
3258
3266
  * Returns the combined time range of all series in the collection. If the collection
@@ -3287,7 +3295,7 @@ let Ai = class Nr {
3287
3295
  const r = () => new Error(
3288
3296
  `cannot push a ${e.dataType.toString()} series to a ${this.dataType.toString()} multi-series`
3289
3297
  ), n = e.dataType.equals(this.dataType);
3290
- if (Sr(e)) {
3298
+ if (Nr(e)) {
3291
3299
  if (this.series.length !== 0 && !n) throw r();
3292
3300
  this.series.push(e);
3293
3301
  } else {
@@ -3334,7 +3342,7 @@ let Ai = class Nr {
3334
3342
  */
3335
3343
  subAlignmentIterator(e, r) {
3336
3344
  if (e >= this.alignmentBounds.upper || r <= this.alignmentBounds.lower)
3337
- return st;
3345
+ return it;
3338
3346
  let n = 0;
3339
3347
  for (let i = 0; i < this.series.length; i++) {
3340
3348
  const o = this.series[i];
@@ -3364,7 +3372,7 @@ let Ai = class Nr {
3364
3372
  * @returns An iterator over the specified range.
3365
3373
  */
3366
3374
  subAlignmentSpanIterator(e, r) {
3367
- if (e >= this.alignmentBounds.upper) return st;
3375
+ if (e >= this.alignmentBounds.upper) return it;
3368
3376
  r = Math.min(r, Number(this.distance(e, this.alignmentBounds.upper)));
3369
3377
  let n = 0;
3370
3378
  for (let s = 0; s < this.series.length; s++) {
@@ -3389,7 +3397,7 @@ let Ai = class Nr {
3389
3397
  * Returns the bounds containing the minimum and maximum values across all series.
3390
3398
  */
3391
3399
  get bounds() {
3392
- return tr(this.series.map((e) => e.bounds));
3400
+ return rr(this.series.map((e) => e.bounds));
3393
3401
  }
3394
3402
  /**
3395
3403
  * Returns the sum of the byte lengths of all series.
@@ -3416,7 +3424,7 @@ let Ai = class Nr {
3416
3424
  */
3417
3425
  traverseAlignment(e, r) {
3418
3426
  const n = this.series.map((s) => s.alignmentBounds);
3419
- return rr(n, e, r);
3427
+ return nr(n, e, r);
3420
3428
  }
3421
3429
  /**
3422
3430
  * Acquires a reference to the WebGL buffer for all series.
@@ -3439,7 +3447,7 @@ let Ai = class Nr {
3439
3447
  */
3440
3448
  distance(e, r) {
3441
3449
  const n = this.series.map((s) => s.alignmentBounds);
3442
- return nr(n, e, r);
3450
+ return sr(n, e, r);
3443
3451
  }
3444
3452
  /**
3445
3453
  * Parses a JSON multi-series into an array of values using the provided zod schema.
@@ -3449,7 +3457,7 @@ let Ai = class Nr {
3449
3457
  * @returns An array of values parsed from the JSON series.
3450
3458
  */
3451
3459
  parseJSON(e) {
3452
- if (!this.dataType.equals(O.JSON))
3460
+ if (!this.dataType.equals(T.JSON))
3453
3461
  throw new Error("cannot parse non-JSON series as JSON");
3454
3462
  return this.series.flatMap((r) => r.parseJSON(e));
3455
3463
  }
@@ -3462,7 +3470,7 @@ let Ai = class Nr {
3462
3470
  next() {
3463
3471
  return { done: !0, value: void 0 };
3464
3472
  }
3465
- } : new Ci(this.series);
3473
+ } : new Ri(this.series);
3466
3474
  }
3467
3475
  /**
3468
3476
  * Returns an array of the values in the multi-series as strings.
@@ -3472,7 +3480,7 @@ let Ai = class Nr {
3472
3480
  toStrings() {
3473
3481
  return this.series.flatMap((e) => e.toStrings());
3474
3482
  }
3475
- }, Ci = class {
3483
+ }, Ri = class {
3476
3484
  series;
3477
3485
  seriesIndex;
3478
3486
  internal;
@@ -3500,27 +3508,27 @@ let Ai = class Nr {
3500
3508
  return this;
3501
3509
  }
3502
3510
  };
3503
- const Dt = (t) => {
3511
+ const Pt = (t) => {
3504
3512
  const e = t >> 32n, r = t & 0xffffffffn;
3505
3513
  return { domain: e, sample: r };
3506
3514
  };
3507
3515
  a.object({ key: a.string(), value: a.string() });
3508
- const ji = a.record(
3516
+ const Li = a.record(
3509
3517
  a.union([a.number(), a.string(), a.symbol()]),
3510
3518
  a.unknown()
3511
- ), At = (t) => Object.entries(t), Ri = (t, e) => Object.fromEntries(At(t).map(([r, n]) => [r, e(n, r)])), Li = (t) => Object.fromEntries(At(t).filter(([e, r]) => r !== void 0)), Io = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
3519
+ ), Bt = (t) => Object.entries(t), Di = (t, e) => Object.fromEntries(Bt(t).map(([r, n]) => [r, e(n, r)])), Pi = (t) => Object.fromEntries(Bt(t).filter(([e, r]) => r !== void 0)), Eo = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
3512
3520
  __proto__: null,
3513
- entries: At,
3514
- map: Ri,
3515
- purgeUndefined: Li,
3516
- unknownZ: ji
3517
- }, Symbol.toStringTag, { value: "Module" })), Ir = () => typeof process < "u" && process.versions != null && process.versions.node != null ? "node" : typeof window > "u" || window.document === void 0 ? "webworker" : "browser", Di = Ir(), Mr = ["macOS", "Windows", "Linux"], Pi = ["macos", "windows", "linux"], qi = {
3521
+ entries: Bt,
3522
+ map: Di,
3523
+ purgeUndefined: Pi,
3524
+ unknownZ: Li
3525
+ }, Symbol.toStringTag, { value: "Module" })), Mr = () => typeof process < "u" && process.versions != null && process.versions.node != null ? "node" : typeof window > "u" || window.document === void 0 ? "webworker" : "browser", qi = Mr(), Er = ["macOS", "Windows", "Linux"], ki = ["macos", "windows", "linux"], zi = {
3518
3526
  macos: "macOS",
3519
3527
  windows: "Windows",
3520
3528
  linux: "Linux"
3521
- }, ki = a.enum(Mr).or(
3522
- a.enum(Pi).transform((t) => qi[t])
3523
- ), zi = () => {
3529
+ }, Fi = a.enum(Er).or(
3530
+ a.enum(ki).transform((t) => zi[t])
3531
+ ), Zi = () => {
3524
3532
  if (typeof window > "u") return;
3525
3533
  const t = window.navigator.userAgent.toLowerCase();
3526
3534
  if (t.includes("mac")) return "macOS";
@@ -3528,17 +3536,17 @@ const ji = a.record(
3528
3536
  if (t.includes("linux")) return "Linux";
3529
3537
  };
3530
3538
  let Ve;
3531
- const Fi = (t = {}) => {
3539
+ const Yi = (t = {}) => {
3532
3540
  const { force: e, default: r } = t;
3533
- return e ?? Ve ?? (Ve = zi(), Ve ?? r);
3534
- }, Mo = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
3541
+ return e ?? Ve ?? (Ve = Zi(), Ve ?? r);
3542
+ }, Ao = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
3535
3543
  __proto__: null,
3536
- OPERATING_SYSTEMS: Mr,
3537
- RUNTIME: Di,
3538
- detect: Ir,
3539
- getOS: Fi,
3540
- osZ: ki
3541
- }, Symbol.toStringTag, { value: "Module" })), Zi = (...t) => t.map(Er).join(""), Er = (t) => (t.endsWith("/") || (t += "/"), t.startsWith("/") && (t = t.slice(1)), t), Yi = (t) => t.endsWith("/") ? t.slice(0, -1) : t;
3544
+ OPERATING_SYSTEMS: Er,
3545
+ RUNTIME: qi,
3546
+ detect: Mr,
3547
+ getOS: Yi,
3548
+ osZ: Fi
3549
+ }, Symbol.toStringTag, { value: "Module" })), Vi = (...t) => t.map(Ar).join(""), Ar = (t) => (t.endsWith("/") || (t += "/"), t.startsWith("/") && (t = t.slice(1)), t), Wi = (t) => t.endsWith("/") ? t.slice(0, -1) : t;
3542
3550
  class Ee {
3543
3551
  protocol;
3544
3552
  host;
@@ -3551,7 +3559,7 @@ class Ee {
3551
3559
  * @param pathPrefix - A path prefix to use for all requests. Defaults to "".
3552
3560
  */
3553
3561
  constructor({ host: e, port: r, protocol: n = "", pathPrefix: s = "" }) {
3554
- this.protocol = n, this.host = e, this.port = r, this.path = Er(s);
3562
+ this.protocol = n, this.host = e, this.port = r, this.path = Ar(s);
3555
3563
  }
3556
3564
  /**
3557
3565
  * Replaces creates a new URL with the specified properties replaced.
@@ -3574,37 +3582,37 @@ class Ee {
3574
3582
  child(e) {
3575
3583
  return new Ee({
3576
3584
  ...this,
3577
- pathPrefix: Zi(this.path, e)
3585
+ pathPrefix: Vi(this.path, e)
3578
3586
  });
3579
3587
  }
3580
3588
  /** @returns a string representation of the url */
3581
3589
  toString() {
3582
- return Yi(
3590
+ return Wi(
3583
3591
  `${this.protocol}://${this.host}:${this.port}/${this.path}`
3584
3592
  );
3585
3593
  }
3586
3594
  static UNKNOWN = new Ee({ host: "unknown", port: 0 });
3587
3595
  }
3588
- const Vi = 2, Wi = 3, Gi = 2, Hi = (t, e) => {
3596
+ const Gi = 2, Hi = 3, Ji = 2, Xi = (t, e) => {
3589
3597
  if (Number.isNaN(t) || !Number.isFinite(t)) return t;
3590
3598
  const r = ye(e);
3591
3599
  if (r == 0) return t;
3592
3600
  let n;
3593
- r >= 1e3 ? n = Vi : r >= 1 ? n = Wi : n = Math.ceil(-Math.log10(r)) + Gi;
3601
+ r >= 1e3 ? n = Gi : r >= 1 ? n = Hi : n = Math.ceil(-Math.log10(r)) + Ji;
3594
3602
  const s = 10 ** n;
3595
3603
  return Math.round(t * s) / s;
3596
- }, Eo = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
3604
+ }, Bo = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
3597
3605
  __proto__: null,
3598
- abs: _t,
3599
- add: Kt,
3600
- closeTo: Nn,
3601
- div: En,
3606
+ abs: er,
3607
+ add: Qt,
3608
+ closeTo: In,
3609
+ div: An,
3602
3610
  equal: Ke,
3603
- max: Mn,
3604
- min: Qt,
3611
+ max: En,
3612
+ min: _t,
3605
3613
  mult: Y,
3606
- roundBySpan: Hi,
3607
- roundToNearestMagnitude: In,
3614
+ roundBySpan: Xi,
3615
+ roundToNearestMagnitude: Mn,
3608
3616
  sub: ae
3609
3617
  }, Symbol.toStringTag, { value: "Module" }));
3610
3618
  a.object({
@@ -3612,66 +3620,66 @@ a.object({
3612
3620
  maxRetries: a.number().optional(),
3613
3621
  scale: a.number().optional()
3614
3622
  });
3615
- const Ji = /^#?([0-9a-f]{6}|[0-9a-f]{8})$/i, Ar = a.string().regex(Ji), _ = a.number().min(0).max(255), Br = a.number().min(0).max(1), qe = a.tuple([_, _, _, Br]), Xi = a.tuple([_, _, _]), Ki = a.object({ rgba255: qe }), Qi = a.number().min(0).max(360), _i = a.number().min(0).max(100), ea = a.number().min(0).max(100), Ur = a.tuple([Qi, _i, ea, Br]), ke = a.union([Ar, Xi, qe, Ur, Ki]), ze = ke.transform((t) => w(t)), ta = (t) => ze.safeParse(t).success, ra = (t) => qe.safeParse(t).success, na = (t) => {
3623
+ const Ki = /^#?([0-9a-f]{6}|[0-9a-f]{8})$/i, Br = a.string().regex(Ki), _ = a.number().min(0).max(255), Ur = a.number().min(0).max(1), qe = a.tuple([_, _, _, Ur]), Qi = a.tuple([_, _, _]), _i = a.object({ rgba255: qe }), ea = a.number().min(0).max(360), ta = a.number().min(0).max(100), ra = a.number().min(0).max(100), Cr = a.tuple([ea, ta, ra, Ur]), ke = a.union([Br, Qi, qe, Cr, _i]), ze = ke.transform((t) => w(t)), na = (t) => ze.safeParse(t).success, sa = (t) => qe.safeParse(t).success, ia = (t) => {
3616
3624
  if (t == null) return;
3617
3625
  const e = ze.safeParse(t);
3618
- if (e.success) return jr(e.data);
3626
+ if (e.success) return Rr(e.data);
3619
3627
  if (typeof t == "string") return t;
3620
3628
  throw e.error;
3621
3629
  }, w = (t, e = 1) => {
3622
- if (t = ke.parse(t), typeof t == "string") return ga(t, e);
3630
+ if (t = ke.parse(t), typeof t == "string") return ya(t, e);
3623
3631
  if (Array.isArray(t)) {
3624
3632
  if (t.length < 3 || t.length > 4)
3625
3633
  throw new Error(`Invalid color: [${t.join(", ")}]`);
3626
3634
  return t.length === 3 ? [...t, e] : t;
3627
3635
  }
3628
3636
  return t.rgba255;
3629
- }, Cr = (t, e) => {
3637
+ }, jr = (t, e) => {
3630
3638
  if (t == null || e == null) return t == e;
3631
3639
  const r = w(t), n = w(e);
3632
3640
  return r.every((s, i) => s === n[i]);
3633
- }, sa = (t) => {
3641
+ }, aa = (t) => {
3634
3642
  if (t == null) return;
3635
3643
  const [e, r, n, s] = w(t);
3636
3644
  return `#${Oe(e)}${Oe(r)}${Oe(n)}${s === 1 ? "" : Oe(s * 255)}`;
3637
- }, jr = (t) => {
3645
+ }, Rr = (t) => {
3638
3646
  const [e, r, n, s] = w(t);
3639
3647
  return `rgba(${e}, ${r}, ${n}, ${s})`;
3640
- }, ia = (t) => `rgb(${Rr(t)})`, Rr = (t) => {
3648
+ }, oa = (t) => `rgb(${Lr(t)})`, Lr = (t) => {
3641
3649
  const [e, r, n] = w(t);
3642
3650
  return `${e}, ${r}, ${n}`;
3643
- }, aa = (t) => [...Bt(t), ce(t)], Bt = (t) => [
3651
+ }, ua = (t) => [...Ut(t), ce(t)], Ut = (t) => [
3644
3652
  oe(t) / 255,
3645
3653
  ue(t) / 255,
3646
3654
  le(t) / 255
3647
- ], oe = (t) => w(t)[0], ue = (t) => w(t)[1], le = (t) => w(t)[2], ce = (t) => w(t)[3], oa = (t) => Cr(Ut, t), ua = (t) => ma(w(t)), la = (t, e) => {
3655
+ ], oe = (t) => w(t)[0], ue = (t) => w(t)[1], le = (t) => w(t)[2], ce = (t) => w(t)[3], la = (t) => jr(Ct, t), ca = (t) => wa(w(t)), ha = (t, e) => {
3648
3656
  const [r, n, s] = w(t);
3649
3657
  if (e > 100)
3650
3658
  throw new Error(`Color opacity must be between 0 and 100, got ${e}`);
3651
3659
  return e > 1 && (e /= 100), [r, n, s, e];
3652
3660
  }, ge = (t) => {
3653
- const [e, r, n] = Bt(t).map(
3661
+ const [e, r, n] = Ut(t).map(
3654
3662
  (s) => s <= 0.03928 ? s / 12.92 : ((s + 0.055) / 1.055) ** 2.4
3655
3663
  );
3656
3664
  return Number((0.2126 * e + 0.7152 * r + 0.0722 * n).toFixed(3));
3657
- }, ca = (t) => {
3658
- const [e, r, n] = Bt(t);
3665
+ }, fa = (t) => {
3666
+ const [e, r, n] = Ut(t);
3659
3667
  return 1 - (Math.max(e, r, n) - Math.min(e, r, n));
3660
- }, at = (t, e) => {
3668
+ }, ot = (t, e) => {
3661
3669
  const r = w(t), n = w(e), s = ge(r), i = ge(n);
3662
3670
  return (Math.max(s, i) + 0.5) / (Math.min(s, i) + 0.5);
3663
- }, ha = (t, ...e) => {
3671
+ }, da = (t, ...e) => {
3664
3672
  if (e.length === 0)
3665
3673
  throw new Error("[Color.pickByContrast] - must provide at least one color");
3666
- const r = w(t), [n] = e.sort((s, i) => at(r, i) - at(r, s));
3674
+ const r = w(t), [n] = e.sort((s, i) => ot(r, i) - ot(r, s));
3667
3675
  return w(n);
3668
- }, fa = (t) => ge(t) < 0.5, da = (t) => ge(t) > 0.5, ga = (t, e = 1) => (t = Ar.parse(t), t = pa(t), [
3669
- $e(t, 0),
3670
- $e(t, 2),
3671
- $e(t, 4),
3672
- t.length === 8 ? $e(t, 6) / 255 : e
3673
- ]), Ut = [0, 0, 0, 0], Oe = (t) => Math.floor(t).toString(16).padStart(2, "0"), $e = (t, e) => parseInt(t.slice(e, e + 2), 16), pa = (t) => t.startsWith("#") ? t.slice(1) : t, ya = (t) => {
3674
- t = Ur.parse(t);
3676
+ }, ga = (t) => ge(t) < 0.5, pa = (t) => ge(t) > 0.5, ya = (t, e = 1) => (t = Br.parse(t), t = ma(t), [
3677
+ ve(t, 0),
3678
+ ve(t, 2),
3679
+ ve(t, 4),
3680
+ t.length === 8 ? ve(t, 6) / 255 : e
3681
+ ]), Ct = [0, 0, 0, 0], Oe = (t) => Math.floor(t).toString(16).padStart(2, "0"), ve = (t, e) => parseInt(t.slice(e, e + 2), 16), ma = (t) => t.startsWith("#") ? t.slice(1) : t, ba = (t) => {
3682
+ t = Cr.parse(t);
3675
3683
  let [e, r, n] = t;
3676
3684
  const s = t[3];
3677
3685
  e /= 360, r /= 100, n /= 100;
@@ -3683,7 +3691,7 @@ const Ji = /^#?([0-9a-f]{6}|[0-9a-f]{8})$/i, Ar = a.string().regex(Ji), _ = a.nu
3683
3691
  i = We(f, l, e + 1 / 3), o = We(f, l, e), c = We(f, l, e - 1 / 3);
3684
3692
  }
3685
3693
  return [Math.round(i * 255), Math.round(o * 255), Math.round(c * 255), s];
3686
- }, We = (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), ma = (t) => {
3694
+ }, We = (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), wa = (t) => {
3687
3695
  t = qe.parse(t);
3688
3696
  let [e, r, n] = t;
3689
3697
  const s = t[3];
@@ -3697,13 +3705,13 @@ const Ji = /^#?([0-9a-f]{6}|[0-9a-f]{8})$/i, Ar = a.string().regex(Ji), _ = a.nu
3697
3705
  l = f > 0.5 ? p / (2 - i - o) : p / (i + o), i === e ? c = (r - n) / p + (r < n ? 6 : 0) : i === r ? c = (n - e) / p + 2 : c = (e - r) / p + 4, c /= 6;
3698
3706
  }
3699
3707
  return c *= 360, l *= 100, f *= 100, [Math.round(c), Math.round(l), Math.round(f), s];
3700
- }, ba = w("#000000"), wa = w("#ffffff"), Lr = a.object({
3708
+ }, Oa = w("#000000"), va = w("#ffffff"), Dr = a.object({
3701
3709
  key: a.string(),
3702
3710
  color: ke,
3703
3711
  position: a.number(),
3704
3712
  switched: a.boolean().optional()
3705
- }), Oa = a.array(Lr), $a = (t, e) => {
3706
- if (t.length === 0) return Ut;
3713
+ }), Ta = a.array(Dr), xa = (t, e) => {
3714
+ if (t.length === 0) return Ct;
3707
3715
  if (t = t.slice().sort((r, n) => r.position - n.position), e <= t[0].position) return w(t[0].color);
3708
3716
  if (e >= t[t.length - 1].position)
3709
3717
  return w(t[t.length - 1].color);
@@ -3722,125 +3730,125 @@ const Ji = /^#?([0-9a-f]{6}|[0-9a-f]{8})$/i, Ar = a.string().regex(Ji), _ = a.nu
3722
3730
  return w([l, f, p, g]);
3723
3731
  }
3724
3732
  return w(t[t.length - 1].color);
3725
- }, Ta = a.object({
3733
+ }, $a = a.object({
3726
3734
  key: a.string(),
3727
3735
  name: a.string(),
3728
3736
  color: ze
3729
- }), va = a.object({
3737
+ }), Sa = a.object({
3730
3738
  key: a.string(),
3731
3739
  name: a.string(),
3732
- swatches: a.array(Ta)
3733
- }), xa = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
3740
+ swatches: a.array($a)
3741
+ }), Na = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
3734
3742
  __proto__: null,
3735
- BLACK: ba,
3736
- WHITE: wa,
3737
- ZERO: Ut,
3743
+ BLACK: Oa,
3744
+ WHITE: va,
3745
+ ZERO: Ct,
3738
3746
  aValue: ce,
3739
3747
  bValue: le,
3740
3748
  colorZ: ze,
3741
3749
  construct: w,
3742
- contrast: at,
3750
+ contrast: ot,
3743
3751
  crudeZ: ke,
3744
- cssString: na,
3745
- equals: Cr,
3746
- fromGradient: $a,
3747
- fromHSLA: ya,
3752
+ cssString: ia,
3753
+ equals: jr,
3754
+ fromGradient: xa,
3755
+ fromHSLA: ba,
3748
3756
  gValue: ue,
3749
- gradientZ: Oa,
3750
- grayness: ca,
3751
- hex: sa,
3752
- hsla: ua,
3753
- isColor: ra,
3754
- isCrude: ta,
3755
- isDark: fa,
3756
- isLight: da,
3757
- isZero: oa,
3757
+ gradientZ: Ta,
3758
+ grayness: fa,
3759
+ hex: aa,
3760
+ hsla: ca,
3761
+ isColor: sa,
3762
+ isCrude: na,
3763
+ isDark: ga,
3764
+ isLight: pa,
3765
+ isZero: la,
3758
3766
  luminance: ge,
3759
- paletteZ: va,
3760
- pickByContrast: ha,
3767
+ paletteZ: Sa,
3768
+ pickByContrast: da,
3761
3769
  rValue: oe,
3762
- rgbCSS: ia,
3763
- rgbString: Rr,
3764
- rgba1: aa,
3765
- rgbaCSS: jr,
3766
- setAlpha: la,
3767
- stopZ: Lr
3768
- }, Symbol.toStringTag, { value: "Module" })), Dr = a.int().min(0).max(255), Pr = 255, qr = 0, Sa = {
3769
- lower: qr,
3770
- upper: Pr + 1
3771
- }, kr = a.object({
3770
+ rgbCSS: oa,
3771
+ rgbString: Lr,
3772
+ rgba1: ua,
3773
+ rgbaCSS: Rr,
3774
+ setAlpha: ha,
3775
+ stopZ: Dr
3776
+ }, Symbol.toStringTag, { value: "Module" })), Pr = a.int().min(0).max(255), qr = 255, kr = 0, Ia = {
3777
+ lower: kr,
3778
+ upper: qr + 1
3779
+ }, zr = a.object({
3772
3780
  name: a.string(),
3773
3781
  key: a.string()
3774
3782
  }), pe = (t) => a.object({
3775
- subject: kr,
3783
+ subject: zr,
3776
3784
  resource: t,
3777
- authority: Dr
3778
- }), Na = (...t) => (e) => e.filter((r) => {
3785
+ authority: Pr
3786
+ }), Ma = (...t) => (e) => e.filter((r) => {
3779
3787
  let n = !1;
3780
3788
  return r.to != null && (n = t.includes(r.to.resource)), r.from != null && !n && (n = t.includes(r.from.resource)), n;
3781
- }), zr = (t) => a.object({
3789
+ }), Fr = (t) => a.object({
3782
3790
  from: pe(t),
3783
3791
  to: a.null()
3784
- }), Fr = (t) => a.object({
3792
+ }), Zr = (t) => a.object({
3785
3793
  from: a.null(),
3786
3794
  to: pe(t)
3787
- }), Ia = (t) => a.union([
3788
- zr(t),
3795
+ }), Ea = (t) => a.union([
3789
3796
  Fr(t),
3797
+ Zr(t),
3790
3798
  a.object({
3791
3799
  from: pe(t),
3792
3800
  to: pe(t)
3793
3801
  })
3794
- ]), Ao = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
3802
+ ]), Uo = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
3795
3803
  __proto__: null,
3796
- ABSOLUTE_AUTHORITY: Pr,
3797
- AUTHORITY_BOUNDS: Sa,
3798
- ZERO_AUTHORITY: qr,
3799
- acquireZ: Fr,
3800
- authorityZ: Dr,
3801
- filterTransfersByChannelKey: Na,
3802
- releaseZ: zr,
3804
+ ABSOLUTE_AUTHORITY: qr,
3805
+ AUTHORITY_BOUNDS: Ia,
3806
+ ZERO_AUTHORITY: kr,
3807
+ acquireZ: Zr,
3808
+ authorityZ: Pr,
3809
+ filterTransfersByChannelKey: Ma,
3810
+ releaseZ: Fr,
3803
3811
  stateZ: pe,
3804
- subjectZ: kr,
3805
- transferZ: Ia
3806
- }, Symbol.toStringTag, { value: "Module" })), Ma = (t) => Object.getOwnPropertySymbols(globalThis).includes(t), Ea = (t, e) => {
3812
+ subjectZ: zr,
3813
+ transferZ: Ea
3814
+ }, Symbol.toStringTag, { value: "Module" })), Aa = (t) => Object.getOwnPropertySymbols(globalThis).includes(t), Ba = (t, e) => {
3807
3815
  const r = Symbol.for(t);
3808
- if (!Ma(r)) {
3816
+ if (!Aa(r)) {
3809
3817
  const n = e();
3810
3818
  Object.defineProperty(globalThis, r, { value: n });
3811
3819
  }
3812
3820
  return () => globalThis[r];
3813
- }, Zr = "sy_x_error", Aa = (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), Yr = (t) => class ie extends Error {
3814
- static discriminator = Zr;
3821
+ }, Yr = "sy_x_error", Ua = (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), Vr = (t) => class ie extends Error {
3822
+ static discriminator = Yr;
3815
3823
  discriminator = ie.discriminator;
3816
3824
  static TYPE = t;
3817
3825
  type = ie.TYPE;
3818
- static matches = Aa(t);
3826
+ static matches = Ua(t);
3819
3827
  matches = ie.matches;
3820
3828
  constructor(r, n) {
3821
3829
  super(r, n), this.name = ie.TYPE;
3822
3830
  }
3823
3831
  static sub(r) {
3824
- return Yr(`${t}.${r}`);
3832
+ return Vr(`${t}.${r}`);
3825
3833
  }
3826
- }, Ba = (t) => {
3834
+ }, Ca = (t) => {
3827
3835
  if (t == null || typeof t != "object") return !1;
3828
3836
  const e = t;
3829
- if (e.discriminator !== Zr) return !1;
3837
+ if (e.discriminator !== Yr) return !1;
3830
3838
  if (!("type" in e))
3831
3839
  throw new Error(
3832
3840
  `X Error is missing its type property: ${JSON.stringify(e)}`
3833
3841
  );
3834
3842
  return !0;
3835
- }, re = "unknown", Pt = "nil";
3836
- class Ua {
3843
+ }, re = "unknown", qt = "nil";
3844
+ class ja {
3837
3845
  providers = [];
3838
3846
  register(e) {
3839
3847
  this.providers.push(e);
3840
3848
  }
3841
3849
  encode(e) {
3842
- if (e == null) return { type: Pt, data: "" };
3843
- if (Ba(e))
3850
+ if (e == null) return { type: qt, data: "" };
3851
+ if (Ca(e))
3844
3852
  for (const r of this.providers) {
3845
3853
  const n = r.encode(e);
3846
3854
  if (n != null) return n;
@@ -3854,65 +3862,65 @@ class Ua {
3854
3862
  }
3855
3863
  }
3856
3864
  decode(e) {
3857
- if (e == null || e.type === Pt) return null;
3858
- if (e.type === re) return new qt(e.data);
3865
+ if (e == null || e.type === qt) return null;
3866
+ if (e.type === re) return new kt(e.data);
3859
3867
  for (const r of this.providers) {
3860
3868
  const n = r.decode(e);
3861
3869
  if (n != null) return n;
3862
3870
  }
3863
- return new qt(e.data);
3871
+ return new kt(e.data);
3864
3872
  }
3865
3873
  }
3866
- Ea("synnax-error-registry", () => new Ua());
3867
- class qt extends Yr("unknown") {
3874
+ Ba("synnax-error-registry", () => new ja());
3875
+ class kt extends Vr("unknown") {
3868
3876
  }
3869
3877
  a.object({ type: a.string(), data: a.string() });
3870
- const Bo = () => new Promise((t) => setTimeout(t, 0)), Uo = (t) => t ? -1 : 1, Ca = v.object({
3871
- jsonrpc: v.literal("2.0"),
3872
- method: v.string(),
3878
+ const Co = () => new Promise((t) => setTimeout(t, 0)), jo = (t) => t ? -1 : 1, Ra = x.object({
3879
+ jsonrpc: x.literal("2.0"),
3880
+ method: x.string(),
3873
3881
  // params should be z.union([z.record(z.string(), z.json()),
3874
3882
  // z.array(z.json())]).optional() but the VSCode JSON RPC implementation uses a looser
3875
3883
  // definition of params then in the JSON-RPC spec.
3876
- params: v.any().optional(),
3877
- id: v.union([v.string(), v.number(), v.null()]).optional()
3878
- }), Vr = v.object({
3879
- jsonrpc: v.literal("2.0"),
3880
- id: v.union([v.string(), v.number(), v.null()])
3881
- }), ja = Vr.extend({
3882
- result: v.json()
3883
- }), Ra = Vr.extend({
3884
- error: v.object({
3885
- code: v.number().int(),
3884
+ params: x.any().optional(),
3885
+ id: x.union([x.string(), x.number(), x.null()]).optional()
3886
+ }), Wr = x.object({
3887
+ jsonrpc: x.literal("2.0"),
3888
+ id: x.union([x.string(), x.number(), x.null()])
3889
+ }), La = Wr.extend({
3890
+ result: x.json()
3891
+ }), Da = Wr.extend({
3892
+ error: x.object({
3893
+ code: x.number().int(),
3886
3894
  // This should be z.string(), but the VSCode JSON RPC implementation uses a looser
3887
3895
  // definition of error than the JSON-RPC spec.
3888
- message: v.string().optional(),
3889
- data: v.json().optional()
3896
+ message: x.string().optional(),
3897
+ data: x.json().optional()
3890
3898
  })
3891
- }), La = v.union([ja, Ra]);
3892
- v.union([Ca, La]);
3893
- const Da = (t, e, r) => {
3899
+ }), Pa = x.union([La, Da]);
3900
+ x.union([Ra, Pa]);
3901
+ const qa = (t, e, r) => {
3894
3902
  const n = t.get(e);
3895
3903
  return n === void 0 ? (t.set(e, r), r) : n;
3896
- }, Co = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
3904
+ }, Ro = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
3897
3905
  __proto__: null,
3898
- getOrSetDefault: Da
3899
- }, Symbol.toStringTag, { value: "Module" })), ot = a.string().regex(/^\d+\.\d+\.\d+$/), be = (t, e, r = {}) => {
3906
+ getOrSetDefault: qa
3907
+ }, Symbol.toStringTag, { value: "Module" })), ut = a.string().regex(/^\d+\.\d+\.\d+$/), be = (t, e, r = {}) => {
3900
3908
  r.checkMajor ??= !0, r.checkMinor ??= !0, r.checkPatch ??= !0;
3901
- const n = ot.parse(t), s = ot.parse(e), [i, o, c] = n.split(".").map(Number), [l, f, p] = s.split(".").map(Number);
3909
+ const n = ut.parse(t), s = ut.parse(e), [i, o, c] = n.split(".").map(Number), [l, f, p] = s.split(".").map(Number);
3902
3910
  if (r.checkMajor) {
3903
- if (i < l) return ve;
3904
- if (i > l) return xe;
3911
+ if (i < l) return xe;
3912
+ if (i > l) return $e;
3905
3913
  }
3906
3914
  if (r.checkMinor) {
3907
- if (o < f) return ve;
3908
- if (o > f) return xe;
3915
+ if (o < f) return xe;
3916
+ if (o > f) return $e;
3909
3917
  }
3910
3918
  if (r.checkPatch) {
3911
- if (c < p) return ve;
3912
- if (c > p) return xe;
3919
+ if (c < p) return xe;
3920
+ if (c > p) return $e;
3913
3921
  }
3914
3922
  return ee;
3915
- }, Pa = (t, e, r = {}) => Gt(be(t, e, r)), Wr = (t, e, r = {}) => Wt(be(t, e, r)), qa = (t, e, r = {}) => Vt(be(t, e, r)), ka = ({
3923
+ }, ka = (t, e, r = {}) => Ht(be(t, e, r)), Gr = (t, e, r = {}) => Gt(be(t, e, r)), za = (t, e, r = {}) => Wt(be(t, e, r)), Fa = ({
3916
3924
  name: t,
3917
3925
  migrate: e
3918
3926
  }) => (r) => {
@@ -3922,7 +3930,7 @@ const Da = (t, e, r) => {
3922
3930
  } catch (n) {
3923
3931
  throw console.log(`${t} failed to migrate from ${r.version}`), console.error(n), n;
3924
3932
  }
3925
- }, za = ({
3933
+ }, Za = ({
3926
3934
  name: t,
3927
3935
  migrations: e,
3928
3936
  targetSchema: r,
@@ -3948,7 +3956,7 @@ const Da = (t, e, r) => {
3948
3956
  let c = !1;
3949
3957
  const l = (f) => {
3950
3958
  try {
3951
- if (o === 0 || Wr(f.version, i))
3959
+ if (o === 0 || Gr(f.version, i))
3952
3960
  return console.log(c ? `${t} ${f.version} now up to date` : `${t} version ${f.version} is up to date with target version ${s.version}`), f;
3953
3961
  const p = f.version, g = e[p], S = g(f);
3954
3962
  return c = !0, l(S);
@@ -3974,16 +3982,16 @@ const Da = (t, e, r) => {
3974
3982
  return console.log(`${t} failed to parse final result. Exiting with default`), console.error(p), s;
3975
3983
  }
3976
3984
  };
3977
- }, jo = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
3985
+ }, Lo = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
3978
3986
  __proto__: null,
3979
3987
  compareSemVer: be,
3980
- createMigration: ka,
3981
- migrator: za,
3982
- semVerNewer: Wr,
3983
- semVerOlder: qa,
3984
- semVerZ: ot,
3985
- versionsEqual: Pa
3986
- }, Symbol.toStringTag, { value: "Module" })), Gr = ["standard", "scientific", "engineering"], Fa = a.enum(Gr), Za = (t, e, r) => {
3988
+ createMigration: Fa,
3989
+ migrator: Za,
3990
+ semVerNewer: Gr,
3991
+ semVerOlder: za,
3992
+ semVerZ: ut,
3993
+ versionsEqual: ka
3994
+ }, Symbol.toStringTag, { value: "Module" })), Hr = ["standard", "scientific", "engineering"], Ya = a.enum(Hr), Va = (t, e, r) => {
3987
3995
  if (Number.isNaN(t)) return "NaN";
3988
3996
  if (t === 1 / 0) return "∞";
3989
3997
  if (t === -1 / 0) return "-∞";
@@ -3992,28 +4000,28 @@ const Da = (t, e, r) => {
3992
4000
  return e === 0 ? "0ᴇ0" : `0.${"0".repeat(e)}ᴇ0`;
3993
4001
  let n;
3994
4002
  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}`;
3995
- }, Ro = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
4003
+ }, Do = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
3996
4004
  __proto__: null,
3997
- NOTATIONS: Gr,
3998
- notationZ: Fa,
3999
- stringifyNumber: Za
4000
- }, Symbol.toStringTag, { value: "Module" })), Lo = (t) => Array.isArray(t) ? [...t] : typeof t == "object" && t !== null ? { ...t } : t, Hr = a.enum([
4005
+ NOTATIONS: Hr,
4006
+ notationZ: Ya,
4007
+ stringifyNumber: Va
4008
+ }, Symbol.toStringTag, { value: "Module" })), Po = (t) => Array.isArray(t) ? [...t] : typeof t == "object" && t !== null ? { ...t } : t, Jr = a.enum([
4001
4009
  "success",
4002
4010
  "info",
4003
4011
  "warning",
4004
4012
  "error",
4005
4013
  "loading",
4006
4014
  "disabled"
4007
- ]), Ya = (t) => a.object({
4015
+ ]), Wa = (t) => a.object({
4008
4016
  key: a.string(),
4009
- variant: Hr,
4017
+ variant: Jr,
4010
4018
  message: a.string(),
4011
4019
  description: a.string().optional(),
4012
4020
  time: b.z,
4013
4021
  details: t ?? a.unknown().optional()
4014
- }), Va = (t, e) => {
4022
+ }), Ga = (t, e) => {
4015
4023
  if (!(t instanceof Error)) throw t;
4016
- return Jr({
4024
+ return Xr({
4017
4025
  variant: "error",
4018
4026
  message: e ?? t.message,
4019
4027
  description: e != null ? t.message : void 0,
@@ -4021,18 +4029,18 @@ const Da = (t, e, r) => {
4021
4029
  stack: t.stack ?? ""
4022
4030
  }
4023
4031
  });
4024
- }, Jr = (t) => ({
4025
- key: Et(),
4032
+ }, Xr = (t) => ({
4033
+ key: At(),
4026
4034
  time: b.now(),
4027
4035
  ...t
4028
- }), Do = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
4036
+ }), qo = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
4029
4037
  __proto__: null,
4030
- create: Jr,
4031
- fromException: Va,
4032
- statusZ: Ya,
4033
- variantZ: Hr
4034
- }, Symbol.toStringTag, { value: "Module" })), Wa = new Error("request for lock canceled");
4035
- var Ga = function(t, e, r, n) {
4038
+ create: Xr,
4039
+ fromException: Ga,
4040
+ statusZ: Wa,
4041
+ variantZ: Jr
4042
+ }, Symbol.toStringTag, { value: "Module" })), Ha = new Error("request for lock canceled");
4043
+ var Ja = function(t, e, r, n) {
4036
4044
  function s(i) {
4037
4045
  return i instanceof r ? i : new r(function(o) {
4038
4046
  o(i);
@@ -4059,20 +4067,20 @@ var Ga = function(t, e, r, n) {
4059
4067
  f((n = n.apply(t, e || [])).next());
4060
4068
  });
4061
4069
  };
4062
- class Ha {
4063
- constructor(e, r = Wa) {
4070
+ class Xa {
4071
+ constructor(e, r = Ha) {
4064
4072
  this._value = e, this._cancelError = r, this._queue = [], this._weightedWaiters = [];
4065
4073
  }
4066
4074
  acquire(e = 1, r = 0) {
4067
4075
  if (e <= 0)
4068
4076
  throw new Error(`invalid weight ${e}: must be positive`);
4069
4077
  return new Promise((n, s) => {
4070
- const i = { resolve: n, reject: s, weight: e, priority: r }, o = Xr(this._queue, (c) => r <= c.priority);
4078
+ const i = { resolve: n, reject: s, weight: e, priority: r }, o = Kr(this._queue, (c) => r <= c.priority);
4071
4079
  o === -1 && e <= this._value ? this._dispatchItem(i) : this._queue.splice(o + 1, 0, i);
4072
4080
  });
4073
4081
  }
4074
4082
  runExclusive(e) {
4075
- return Ga(this, arguments, void 0, function* (r, n = 1, s = 0) {
4083
+ return Ja(this, arguments, void 0, function* (r, n = 1, s = 0) {
4076
4084
  const [i, o] = yield this.acquire(n, s);
4077
4085
  try {
4078
4086
  return yield r(i);
@@ -4085,7 +4093,7 @@ class Ha {
4085
4093
  if (e <= 0)
4086
4094
  throw new Error(`invalid weight ${e}: must be positive`);
4087
4095
  return this._couldLockImmediately(e, r) ? Promise.resolve() : new Promise((n) => {
4088
- this._weightedWaiters[e - 1] || (this._weightedWaiters[e - 1] = []), Ja(this._weightedWaiters[e - 1], { resolve: n, priority: r });
4096
+ this._weightedWaiters[e - 1] || (this._weightedWaiters[e - 1] = []), Ka(this._weightedWaiters[e - 1], { resolve: n, priority: r });
4089
4097
  });
4090
4098
  }
4091
4099
  isLocked() {
@@ -4140,17 +4148,17 @@ class Ha {
4140
4148
  return (this._queue.length === 0 || this._queue[0].priority < r) && e <= this._value;
4141
4149
  }
4142
4150
  }
4143
- function Ja(t, e) {
4144
- const r = Xr(t, (n) => e.priority <= n.priority);
4151
+ function Ka(t, e) {
4152
+ const r = Kr(t, (n) => e.priority <= n.priority);
4145
4153
  t.splice(r + 1, 0, e);
4146
4154
  }
4147
- function Xr(t, e) {
4155
+ function Kr(t, e) {
4148
4156
  for (let r = t.length - 1; r >= 0; r--)
4149
4157
  if (e(t[r]))
4150
4158
  return r;
4151
4159
  return -1;
4152
4160
  }
4153
- var Xa = function(t, e, r, n) {
4161
+ var Qa = function(t, e, r, n) {
4154
4162
  function s(i) {
4155
4163
  return i instanceof r ? i : new r(function(o) {
4156
4164
  o(i);
@@ -4177,12 +4185,12 @@ var Xa = function(t, e, r, n) {
4177
4185
  f((n = n.apply(t, e || [])).next());
4178
4186
  });
4179
4187
  };
4180
- class Ka {
4188
+ class _a {
4181
4189
  constructor(e) {
4182
- this._semaphore = new Ha(1, e);
4190
+ this._semaphore = new Xa(1, e);
4183
4191
  }
4184
4192
  acquire() {
4185
- return Xa(this, arguments, void 0, function* (e = 0) {
4193
+ return Qa(this, arguments, void 0, function* (e = 0) {
4186
4194
  const [, r] = yield this._semaphore.acquire(1, e);
4187
4195
  return r;
4188
4196
  });
@@ -4203,34 +4211,34 @@ class Ka {
4203
4211
  return this._semaphore.cancel();
4204
4212
  }
4205
4213
  }
4206
- class Kr extends Ka {
4214
+ class Qr extends _a {
4207
4215
  constructor(e) {
4208
4216
  super(), Object.assign(this, e);
4209
4217
  }
4210
4218
  }
4211
- const Qa = (t) => new Kr(t), Po = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
4219
+ const eo = (t) => new Qr(t), ko = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
4212
4220
  __proto__: null,
4213
- mutex: Kr,
4214
- newMutex: Qa
4221
+ mutex: Qr,
4222
+ newMutex: eo
4215
4223
  }, Symbol.toStringTag, { value: "Module" }));
4216
- function Qr(t) {
4224
+ function _r(t) {
4217
4225
  var e, r, n = "";
4218
4226
  if (typeof t == "string" || typeof t == "number") n += t;
4219
4227
  else if (typeof t == "object") if (Array.isArray(t)) {
4220
4228
  var s = t.length;
4221
- for (e = 0; e < s; e++) t[e] && (r = Qr(t[e])) && (n && (n += " "), n += r);
4229
+ for (e = 0; e < s; e++) t[e] && (r = _r(t[e])) && (n && (n += " "), n += r);
4222
4230
  } else for (r in t) t[r] && (n && (n += " "), n += r);
4223
4231
  return n;
4224
4232
  }
4225
- function _a() {
4226
- for (var t, e, r = 0, n = "", s = arguments.length; r < s; r++) (t = arguments[r]) && (e = Qr(t)) && (n && (n += " "), n += e);
4233
+ function to() {
4234
+ for (var t, e, r = 0, n = "", s = arguments.length; r < s; r++) (t = arguments[r]) && (e = _r(t)) && (n && (n += " "), n += e);
4227
4235
  return n;
4228
4236
  }
4229
- const eo = _a, X = "-", kt = "__", Te = "--", _r = (t) => {
4230
- const e = (...r) => eo(...r);
4231
- return e.B = (...r) => t + X + r.join(X), e.E = (r) => t + kt + r, e.M = (...r) => t + Te + r.join("-"), e.BM = (r, ...n) => e.B(r) + Te + n.join("-"), e.BE = (r, ...n) => e.B(r) + kt + n.join(X), e.BEM = (r, n, ...s) => e.BE(r, n) + Te + s.join(X), e.extend = (r) => _r(e.B(r)), e.var = (...r) => Te + t + X + r.join(X), e;
4237
+ const ro = to, X = "-", zt = "__", Te = "--", en = (t) => {
4238
+ const e = (...r) => ro(...r);
4239
+ return e.B = (...r) => t + X + r.join(X), e.E = (r) => t + zt + r, e.M = (...r) => t + Te + r.join("-"), e.BM = (r, ...n) => e.B(r) + Te + n.join("-"), e.BE = (r, ...n) => e.B(r) + zt + n.join(X), e.BEM = (r, n, ...s) => e.BE(r, n) + Te + s.join(X), e.extend = (r) => en(e.B(r)), e.var = (...r) => Te + t + X + r.join(X), e;
4232
4240
  };
4233
- class to {
4241
+ class no {
4234
4242
  rows = [];
4235
4243
  columns = [];
4236
4244
  prefix;
@@ -4259,71 +4267,71 @@ class to {
4259
4267
  };
4260
4268
  }
4261
4269
  }
4262
- const ro = (t, e) => Object.entries(e).forEach(
4270
+ const so = (t, e) => Object.entries(e).forEach(
4263
4271
  ([r, n]) => n != null && t.style.setProperty(r, `${n}`)
4264
- ), no = (t, e) => Array.from(t.style).forEach((r) => {
4272
+ ), io = (t, e) => Array.from(t.style).forEach((r) => {
4265
4273
  r.startsWith(e) && t.style.removeProperty(r);
4266
- }), so = (t) => {
4267
- const e = _r(t);
4268
- return e.visible = (r) => e.M(r ? "visible" : "hidden"), e.expanded = (r) => e.M(r ? "expanded" : "collapsed"), e.loc = (r) => e.M("location", ls.construct(r)), e.disabled = (r) => r === !0 && e.M("disabled"), e.align = (r) => e.M(r), e.dir = (r) => r != null && e.M("direction", Hn.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 = ro, e.removeVars = no, e.newGridBuilder = (r) => new to(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) => {
4274
+ }), ao = (t) => {
4275
+ const e = en(t);
4276
+ return e.visible = (r) => e.M(r ? "visible" : "hidden"), e.expanded = (r) => e.M(r ? "expanded" : "collapsed"), e.loc = (r) => e.M("location", cs.construct(r)), e.disabled = (r) => r === !0 && e.M("disabled"), e.align = (r) => e.M(r), e.dir = (r) => r != null && e.M("direction", Jn.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 = so, e.removeVars = io, e.newGridBuilder = (r) => new no(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) => {
4269
4277
  if (!(r == null || r === !1))
4270
- return typeof r == "number" ? `var(--${t}-gray-l${r})` : xa.cssString(r);
4278
+ return typeof r == "number" ? `var(--${t}-gray-l${r})` : Na.cssString(r);
4271
4279
  }, e.levelSizeVar = (r) => `var(--${t}-${r}-size)`, e.level = (r) => e.M(`level-${r}`), e;
4272
- }, qo = so("pluto");
4280
+ }, zo = ao("pluto");
4273
4281
  export {
4274
- po as $,
4282
+ Oo as $,
4275
4283
  Z as A,
4276
- ss as B,
4277
- qo as C,
4278
- is as D,
4279
- Rt as E,
4280
- co as F,
4281
- xt as G,
4282
- wt as H,
4283
- xr as I,
4284
- go as J,
4285
- ls as K,
4286
- T as L,
4284
+ is as B,
4285
+ zo as C,
4286
+ as as D,
4287
+ Lt as E,
4288
+ fo as F,
4289
+ St as G,
4290
+ mo as H,
4291
+ Sr as I,
4292
+ Ot as J,
4293
+ yo as K,
4294
+ O as L,
4287
4295
  j as M,
4288
- Hs as N,
4289
- ho as O,
4290
- ts as P,
4296
+ Js as N,
4297
+ go as O,
4298
+ rs as P,
4291
4299
  F as Q,
4292
- ii as R,
4293
- Mo as S,
4300
+ oi as R,
4301
+ Ao as S,
4294
4302
  me as T,
4295
4303
  z as U,
4296
- vo as V,
4297
- fo as W,
4298
- Ws as X,
4299
- wo as Y,
4300
- Vs as Z,
4301
- Do as _,
4302
- mo as a,
4303
- Uo as a0,
4304
- Lo as b,
4305
- uo as c,
4306
- yo as d,
4304
+ So as V,
4305
+ po as W,
4306
+ Gs as X,
4307
+ vo as Y,
4308
+ Ws as Z,
4309
+ qo as _,
4310
+ wo as a,
4311
+ jo as a0,
4312
+ Po as b,
4313
+ co as c,
4314
+ bo as d,
4307
4315
  b as e,
4308
4316
  h as f,
4309
- Hn as g,
4310
- bo as h,
4311
- xa as i,
4312
- m as j,
4313
- Eo as k,
4314
- Po as l,
4315
- Ro as m,
4316
- _r as n,
4317
- Ao as o,
4318
- _a as p,
4319
- jo as q,
4320
- O as r,
4321
- Co as s,
4322
- Io as t,
4323
- Bo as u,
4317
+ Jn as g,
4318
+ m as h,
4319
+ Na as i,
4320
+ Bo as j,
4321
+ ko as k,
4322
+ Uo as l,
4323
+ Do as m,
4324
+ en as n,
4325
+ cs as o,
4326
+ to as p,
4327
+ Lo as q,
4328
+ T as r,
4329
+ Ro as s,
4330
+ Eo as t,
4331
+ Co as u,
4324
4332
  N as v,
4325
4333
  V as w,
4326
- ns as x,
4327
- yt as y,
4328
- ao as z
4334
+ ss as x,
4335
+ mt as y,
4336
+ uo as z
4329
4337
  };