@synnaxlabs/x 0.55.0 → 0.56.1

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 (146) hide show
  1. package/.turbo/turbo-build.log +10 -13
  2. package/dist/src/array/nullable.d.ts +1 -1
  3. package/dist/src/array/nullable.d.ts.map +1 -1
  4. package/dist/src/caseconv/caseconv.d.ts.map +1 -1
  5. package/dist/src/compare/compare.d.ts +14 -0
  6. package/dist/src/compare/compare.d.ts.map +1 -1
  7. package/dist/src/debounce/debounce.d.ts +7 -2
  8. package/dist/src/debounce/debounce.d.ts.map +1 -1
  9. package/dist/src/deep/merge.d.ts.map +1 -1
  10. package/dist/src/deep/set.d.ts.map +1 -1
  11. package/dist/src/destructor/destructor.d.ts +1 -0
  12. package/dist/src/destructor/destructor.d.ts.map +1 -1
  13. package/dist/src/errors/errors.d.ts +18 -10
  14. package/dist/src/errors/errors.d.ts.map +1 -1
  15. package/dist/src/index.d.ts +4 -1
  16. package/dist/src/index.d.ts.map +1 -1
  17. package/dist/src/migrate/migrate.d.ts.map +1 -1
  18. package/dist/src/notation/external.d.ts +3 -0
  19. package/dist/src/notation/external.d.ts.map +1 -0
  20. package/dist/src/notation/index.d.ts +1 -1
  21. package/dist/src/notation/notation.d.ts +5 -9
  22. package/dist/src/notation/notation.d.ts.map +1 -1
  23. package/dist/src/notation/types.gen.d.ts +9 -0
  24. package/dist/src/notation/types.gen.d.ts.map +1 -0
  25. package/dist/src/primitive/primitive.d.ts +16 -0
  26. package/dist/src/primitive/primitive.d.ts.map +1 -1
  27. package/dist/src/record/record.d.ts +8 -1
  28. package/dist/src/record/record.d.ts.map +1 -1
  29. package/dist/src/require/index.d.ts +2 -0
  30. package/dist/src/require/index.d.ts.map +1 -0
  31. package/dist/src/require/require.d.ts +2 -0
  32. package/dist/src/require/require.d.ts.map +1 -0
  33. package/dist/src/spatial/base.d.ts +1 -103
  34. package/dist/src/spatial/base.d.ts.map +1 -1
  35. package/dist/src/spatial/bounds/bounds.d.ts +3 -3
  36. package/dist/src/spatial/bounds/bounds.d.ts.map +1 -1
  37. package/dist/src/spatial/box/box.d.ts +7 -13
  38. package/dist/src/spatial/box/box.d.ts.map +1 -1
  39. package/dist/src/spatial/direction/direction.d.ts +17 -16
  40. package/dist/src/spatial/direction/direction.d.ts.map +1 -1
  41. package/dist/src/spatial/external.d.ts +1 -2
  42. package/dist/src/spatial/external.d.ts.map +1 -1
  43. package/dist/src/spatial/location/location.d.ts +28 -28
  44. package/dist/src/spatial/location/location.d.ts.map +1 -1
  45. package/dist/src/spatial/scale/scale.d.ts +2 -2
  46. package/dist/src/spatial/scale/scale.d.ts.map +1 -1
  47. package/dist/src/spatial/sticky/sticky.d.ts +15 -15
  48. package/dist/src/spatial/sticky/sticky.d.ts.map +1 -1
  49. package/dist/src/spatial/types.gen.d.ts +179 -2
  50. package/dist/src/spatial/types.gen.d.ts.map +1 -1
  51. package/dist/src/spatial/xy/xy.d.ts +4 -4
  52. package/dist/src/spatial/xy/xy.d.ts.map +1 -1
  53. package/dist/src/status/status.d.ts +11 -0
  54. package/dist/src/status/status.d.ts.map +1 -1
  55. package/dist/src/telem/external.d.ts +1 -0
  56. package/dist/src/telem/external.d.ts.map +1 -1
  57. package/dist/src/telem/series.d.ts +5 -2
  58. package/dist/src/telem/series.d.ts.map +1 -1
  59. package/dist/src/telem/telem.d.ts +42 -34
  60. package/dist/src/telem/telem.d.ts.map +1 -1
  61. package/dist/src/telem/types.gen.d.ts +19 -0
  62. package/dist/src/telem/types.gen.d.ts.map +1 -0
  63. package/dist/src/text/external.d.ts +3 -0
  64. package/dist/src/text/external.d.ts.map +1 -0
  65. package/dist/src/text/index.d.ts +2 -0
  66. package/dist/src/text/index.d.ts.map +1 -0
  67. package/dist/src/text/types.d.ts +21 -0
  68. package/dist/src/text/types.d.ts.map +1 -0
  69. package/dist/src/text/types.gen.d.ts +13 -0
  70. package/dist/src/text/types.gen.d.ts.map +1 -0
  71. package/dist/src/throttle/index.d.ts +2 -0
  72. package/dist/src/throttle/index.d.ts.map +1 -0
  73. package/dist/src/throttle/throttle.d.ts +3 -0
  74. package/dist/src/throttle/throttle.d.ts.map +1 -0
  75. package/dist/src/throttle/throttle.spec.d.ts +2 -0
  76. package/dist/src/throttle/throttle.spec.d.ts.map +1 -0
  77. package/dist/src/zod/parse.d.ts.map +1 -1
  78. package/dist/x.cjs +10 -10
  79. package/dist/x.js +1497 -1365
  80. package/package.json +11 -11
  81. package/src/array/nullable.ts +1 -4
  82. package/src/caseconv/caseconv.spec.ts +71 -0
  83. package/src/caseconv/caseconv.ts +15 -2
  84. package/src/compare/compare.spec.ts +115 -0
  85. package/src/compare/compare.ts +29 -0
  86. package/src/debounce/debounce.spec.ts +258 -24
  87. package/src/debounce/debounce.ts +49 -30
  88. package/src/deep/copy.spec.ts +13 -0
  89. package/src/deep/difference.ts +1 -1
  90. package/src/deep/merge.ts +2 -1
  91. package/src/deep/set.ts +2 -1
  92. package/src/destructor/destructor.ts +2 -0
  93. package/src/errors/errors.spec.ts +122 -0
  94. package/src/errors/errors.ts +51 -17
  95. package/src/index.ts +4 -1
  96. package/src/migrate/migrate.ts +2 -1
  97. package/src/notation/external.ts +11 -0
  98. package/src/notation/index.ts +1 -1
  99. package/src/notation/notation.spec.ts +260 -2
  100. package/src/notation/notation.ts +25 -7
  101. package/src/notation/types.gen.ts +16 -0
  102. package/src/primitive/primitive.spec.ts +58 -5
  103. package/src/primitive/primitive.ts +22 -0
  104. package/src/record/record.spec.ts +26 -0
  105. package/src/record/record.ts +20 -5
  106. package/src/require/index.ts +10 -0
  107. package/src/require/require.ts +10 -0
  108. package/src/spatial/base.ts +1 -93
  109. package/src/spatial/bounds/bounds.ts +10 -10
  110. package/src/spatial/box/box.ts +5 -5
  111. package/src/spatial/direction/direction.ts +16 -17
  112. package/src/spatial/external.ts +1 -2
  113. package/src/spatial/location/location.ts +19 -17
  114. package/src/spatial/scale/scale.ts +2 -2
  115. package/src/spatial/sticky/sticky.spec.ts +2 -2
  116. package/src/spatial/sticky/sticky.ts +6 -13
  117. package/src/spatial/types.gen.ts +140 -0
  118. package/src/spatial/xy/xy.ts +7 -7
  119. package/src/status/status.spec.ts +82 -2
  120. package/src/status/status.ts +35 -9
  121. package/src/telem/external.ts +8 -0
  122. package/src/telem/series.spec.ts +183 -0
  123. package/src/telem/series.ts +54 -16
  124. package/src/telem/telem.spec.ts +128 -9
  125. package/src/telem/telem.ts +91 -79
  126. package/src/telem/types.gen.ts +28 -0
  127. package/src/text/external.ts +11 -0
  128. package/src/text/index.ts +10 -0
  129. package/src/text/types.gen.ts +16 -0
  130. package/src/text/types.ts +37 -0
  131. package/src/{worker → throttle}/index.ts +1 -1
  132. package/src/throttle/throttle.spec.ts +147 -0
  133. package/src/throttle/throttle.ts +44 -0
  134. package/src/zod/parse.ts +2 -3
  135. package/tsconfig.tsbuildinfo +1 -1
  136. package/dist/src/spatial/spatial.d.ts +0 -3
  137. package/dist/src/spatial/spatial.d.ts.map +0 -1
  138. package/dist/src/worker/index.d.ts +0 -2
  139. package/dist/src/worker/index.d.ts.map +0 -1
  140. package/dist/src/worker/worker.d.ts +0 -33
  141. package/dist/src/worker/worker.d.ts.map +0 -1
  142. package/dist/src/worker/worker.spec.d.ts +0 -2
  143. package/dist/src/worker/worker.spec.d.ts.map +0 -1
  144. package/src/spatial/spatial.ts +0 -44
  145. package/src/worker/worker.spec.ts +0 -41
  146. package/src/worker/worker.ts +0 -86
package/dist/x.js CHANGED
@@ -7,7 +7,7 @@ var n = Object.defineProperty, r = (e, t) => {
7
7
  enumerable: !0
8
8
  });
9
9
  return t || n(r, Symbol.toStringTag, { value: "Module" }), r;
10
- }, i = (t) => e.union([e.union([e.null(), e.undefined()]).transform(() => []), t.array()]), a = (e) => Array.isArray(e) ? e : e == null ? [] : [e], o = (e, t) => {
10
+ }, i = (t) => e.union([e.null().transform(() => []), t.array()]).default(() => []), a = (e) => Array.isArray(e) ? e : e == null ? [] : [e], o = (e, t) => {
11
11
  if (Array.isArray(t)) return t.reduce((e, t) => o(e, t), e ?? []);
12
12
  if (e == null) return [t];
13
13
  let n = e.findIndex((e) => e == t), r = [...e];
@@ -44,6 +44,7 @@ var n = Object.defineProperty, r = (e, t) => {
44
44
  if (e == null) return;
45
45
  let t = e._zod?.def;
46
46
  if (t?.type === "array" && t.element != null) return t.element;
47
+ if (t?.innerType != null) return ee(t.innerType);
47
48
  if (t?.type === "union" && Array.isArray(t.options)) for (let e of t.options) {
48
49
  let t = ee(e);
49
50
  if (t != null) return t;
@@ -59,9 +60,14 @@ var n = Object.defineProperty, r = (e, t) => {
59
60
  let n = t._zod?.def;
60
61
  if (n == null) return null;
61
62
  if (n.innerType != null) return h(n.innerType);
62
- if (n.type === "union" && Array.isArray(n.options)) for (let e of n.options) {
63
- let t = h(e);
64
- if (t != null) return t;
63
+ if (n.type === "union" && Array.isArray(n.options)) {
64
+ let e = null;
65
+ for (let t of n.options) {
66
+ let n = h(t);
67
+ if (n != null) if (e == null) e = { ...n };
68
+ else for (let t in n) t in e || (e[t] = n[t]);
69
+ }
70
+ return e;
65
71
  }
66
72
  return n.type === "pipe" ? h(n.in) ?? h(n.out) : null;
67
73
  }, te = (e) => {
@@ -193,21 +199,21 @@ var n = Object.defineProperty, r = (e, t) => {
193
199
  let a = t(e, i, r);
194
200
  return a == null ? null : typeof a == "string" ? a : a.join(n);
195
201
  }).filter((e) => e != null).join(n);
196
- }, be = (e, t) => {
202
+ }, _ = (e, t) => {
197
203
  if (!Array.isArray(e)) return e[t];
198
204
  let n = e[t];
199
205
  if (n != null || e.length == 0) return n;
200
206
  let r = e[0];
201
207
  if (typeof r == "object" && "key" in r) return e.find((e) => e.key === t);
202
- }, xe = (e, t) => {
208
+ }, be = (e, t) => {
203
209
  let n = e.split(".");
204
210
  return n.forEach((e, r) => {
205
- t = be(t, e), typeof t == "object" && t && "key" in t && (n[r] = t.key);
211
+ t = _(t, e), typeof t == "object" && t && "key" in t && (n[r] = t.key);
206
212
  }), n.join(".");
207
- }, Se = (e, t) => {
213
+ }, xe = (e, t) => {
208
214
  let n = e.split(".");
209
215
  return t < 0 ? n[n.length + t] : n[t];
210
- }, Ce = (e, t) => {
216
+ }, Se = (e, t) => {
211
217
  if (t.length === 0) return !0;
212
218
  let n = e.split("."), r = t.split(".");
213
219
  if (r.length > n.length) return !1;
@@ -216,17 +222,17 @@ var n = Object.defineProperty, r = (e, t) => {
216
222
  if (i !== "*" && t !== i) return !1;
217
223
  }
218
224
  return !0;
219
- }, we = (e) => {
225
+ }, v = (e) => {
220
226
  let t = parseInt(e, 10);
221
227
  return isNaN(t) || t < 0 || t.toString() !== e ? null : t;
222
- }, Te = (e, t) => {
228
+ }, Ce = (e, t) => {
223
229
  for (let n = 1; n <= t.length; n++) {
224
230
  let r = t.slice(0, n).join(".");
225
- if (be(e, r) != null) return [r, n];
231
+ if (_(e, r) != null) return [r, n];
226
232
  }
227
233
  return null;
228
- }, Ee = ((e, t, n = { optional: !1 }) => {
229
- let { optional: r, getter: i = be } = n;
234
+ }, we = ((e, t, n = { optional: !1 }) => {
235
+ let { optional: r, getter: i = _ } = n;
230
236
  if (t === "") return e;
231
237
  let a = t.split(".");
232
238
  if (a.length === 1) {
@@ -254,16 +260,119 @@ var n = Object.defineProperty, r = (e, t) => {
254
260
  throw Error(`Path ${t} does not exist. ${a[n]} is undefined`);
255
261
  };
256
262
  return o(e, 0);
257
- }), De = (e, t) => Ee(e, t, { optional: !0 }) !== null, Oe = (e, ...t) => {
263
+ }), Te = (e, t) => we(e, t, { optional: !0 }) !== null, Ee = (e) => Object.getOwnPropertySymbols(globalThis).includes(e), De = (e, t) => {
264
+ let n = Symbol.for(e);
265
+ if (!Ee(n)) {
266
+ let e = t();
267
+ Object.defineProperty(globalThis, n, { value: e });
268
+ }
269
+ return () => globalThis[n];
270
+ }, Oe = /* @__PURE__ */ r({
271
+ Canceled: () => Ue,
272
+ NONE: () => "nil",
273
+ NotImplemented: () => We,
274
+ UNKNOWN: () => Ne,
275
+ Unknown: () => Ve,
276
+ createTyped: () => y,
277
+ decode: () => Be,
278
+ encode: () => ze,
279
+ fromUnknown: () => Me,
280
+ isTyped: () => je,
281
+ payloadZ: () => He,
282
+ register: () => Re
283
+ }), ke = "sy_x_error", Ae = (e) => (t) => typeof t == "object" && t && "type" in t && typeof t.type == "string" ? t.type.startsWith(e) : t instanceof Error ? t.message.startsWith(e) : typeof t == "string" ? t.startsWith(e) : !1, y = (e) => class t extends Error {
284
+ static discriminator = ke;
285
+ discriminator = t.discriminator;
286
+ static TYPE = e;
287
+ type = t.TYPE;
288
+ static matches = Ae(e);
289
+ matches = t.matches;
290
+ constructor(e, n) {
291
+ super(e, n), this.name = t.TYPE;
292
+ }
293
+ static sub(t) {
294
+ return y(`${e}.${t}`);
295
+ }
296
+ }, je = (e) => {
297
+ if (typeof e != "object" || !e) return !1;
298
+ let t = e;
299
+ if (t.discriminator !== ke) return !1;
300
+ if (!("type" in t)) throw Error(`X Error is missing its type property: ${JSON.stringify(t)}`);
301
+ return !0;
302
+ }, Me = (e) => {
303
+ if (e instanceof Error) return e;
304
+ let t;
305
+ try {
306
+ t = JSON.stringify(e) ?? String(e);
307
+ } catch {
308
+ t = String(e);
309
+ }
310
+ return Error(t, { cause: e });
311
+ }, Ne = "unknown", Pe = (e, t) => ({
312
+ ...e,
313
+ name: t.name,
314
+ stack: t.stack
315
+ }), Fe = (e, t) => (t.name != null && (e.name = t.name), t.stack != null && (e.stack = t.stack), e), Ie = class {
316
+ providers = [];
317
+ register(e) {
318
+ this.providers.push(e);
319
+ }
320
+ encode(e) {
321
+ if (e == null) return {
322
+ type: "nil",
323
+ data: ""
324
+ };
325
+ if (je(e)) for (let t of this.providers) {
326
+ let n = t.encode(e);
327
+ if (n != null) return Pe(n, e);
328
+ }
329
+ if (e instanceof Error) return Pe({
330
+ type: Ne,
331
+ data: e.message
332
+ }, e);
333
+ if (typeof e == "string") return {
334
+ type: Ne,
335
+ data: e
336
+ };
337
+ try {
338
+ return {
339
+ type: Ne,
340
+ data: JSON.stringify(e)
341
+ };
342
+ } catch {
343
+ return {
344
+ type: Ne,
345
+ data: "unable to encode error information"
346
+ };
347
+ }
348
+ }
349
+ decode(e) {
350
+ if (e == null || e.type === "nil") return null;
351
+ if (e.type === "unknown") return Fe(new Ve(e.data), e);
352
+ for (let t of this.providers) {
353
+ let n = t.decode(e);
354
+ if (n != null) return Fe(n, e);
355
+ }
356
+ return Fe(new Ve(e.data), e);
357
+ }
358
+ }, Le = De("synnax-error-registry", () => new Ie()), Re = ({ encode: e, decode: t }) => Le().register({
359
+ encode: e,
360
+ decode: t
361
+ }), ze = (e) => Le().encode(e), Be = (e) => e == null ? null : Le().decode(e), Ve = class extends y("unknown") {}, He = t.object({
362
+ type: t.string(),
363
+ data: t.string(),
364
+ name: t.string().optional(),
365
+ stack: t.string().optional()
366
+ }), Ue = class extends y("canceled") {}, We = class extends y("not_implemented") {}, Ge = (e, ...t) => {
258
367
  if (t.length === 0) return e;
259
368
  let n = t.shift();
260
369
  if (g(e) && g(n)) for (let t in n) try {
261
- g(n[t]) ? (t in e || Object.assign(e, { [t]: {} }), Oe(e[t], n[t])) : Object.assign(e, { [t]: n[t] });
370
+ g(n[t]) ? (t in e || Object.assign(e, { [t]: {} }), Ge(e[t], n[t])) : Object.assign(e, { [t]: n[t] });
262
371
  } catch (e) {
263
- throw e instanceof TypeError ? TypeError(`.${t}: ${e.message}`, { cause: e }) : e;
372
+ throw e instanceof TypeError ? TypeError(`.${t}: ${e.message}`, { cause: e }) : Me(e);
264
373
  }
265
- return Oe(e, ...t);
266
- }, ke = (e, t, n) => {
374
+ return Ge(e, ...t);
375
+ }, Ke = (e, t, n) => {
267
376
  let r = (e, t, n) => {
268
377
  if (n.def?.type === "union") return n.def.options.reduce((e, n) => r(e, t, n), e);
269
378
  if (n.def?.type === "intersection") return r(r(e, t, n.def.left), t, n.def.right);
@@ -284,7 +393,7 @@ var n = Object.defineProperty, r = (e, t) => {
284
393
  return e;
285
394
  };
286
395
  return r({ ...e }, t, n);
287
- }, Ae = (e, t) => {
396
+ }, qe = (e, t) => {
288
397
  let n = t.split("."), r = e, i = 0;
289
398
  for (; i < n.length;) {
290
399
  if (i === n.length - 1) {
@@ -336,35 +445,35 @@ var n = Object.defineProperty, r = (e, t) => {
336
445
  }
337
446
  }
338
447
  if (!e) {
339
- let e = be(r, n[i]);
448
+ let e = _(r, n[i]);
340
449
  if (e == null) return;
341
450
  r = e, i++;
342
451
  }
343
452
  }
344
- }, je = (e, t, n) => {
453
+ }, Je = (e, t, n) => {
345
454
  let r = t.split("."), i = e, a = 0;
346
455
  for (; a < r.length - 1;) {
347
- let e = Te(i, r.slice(a, r.length - 1)), t;
456
+ let e = Ce(i, r.slice(a, r.length - 1)), t;
348
457
  e == null ? (t = r[a], a++) : [t, a] = [e[0], a + e[1]];
349
- let n = be(i, t);
458
+ let n = _(i, t);
350
459
  if (n == null) {
351
- let e = r[a], o = we(e);
352
- o == null && e.startsWith("-") && we(e.substring(1)) != null && (o = 0), n = o == null ? {} : [], i[t] = n;
460
+ let e = r[a], o = v(e);
461
+ o == null && e.startsWith("-") && v(e.substring(1)) != null && (o = 0), n = o == null ? {} : [], i[t] = n;
353
462
  }
354
463
  i = n;
355
464
  }
356
465
  try {
357
466
  let e = r[r.length - 1];
358
467
  if (Array.isArray(i)) {
359
- let t = we(e);
468
+ let t = v(e);
360
469
  if (t == null) {
361
470
  if (e.startsWith("-")) {
362
- let n = we(e.substring(1));
471
+ let n = v(e.substring(1));
363
472
  n != null && (t = i.length - n);
364
473
  }
365
474
  if (t == null) {
366
475
  if (i.length === 0) {
367
- let t = we(e);
476
+ let t = v(e);
368
477
  if (t != null) {
369
478
  i[t] = n;
370
479
  return;
@@ -384,129 +493,42 @@ var n = Object.defineProperty, r = (e, t) => {
384
493
  i[t] = n;
385
494
  return;
386
495
  }
387
- let t = Te(i, [e]);
496
+ let t = Ce(i, [e]);
388
497
  if (t != null) {
389
498
  i[t[0]] = n;
390
499
  return;
391
500
  }
392
501
  i[e] = n;
393
502
  } catch (r) {
394
- throw console.error("failed to set value", n, "at path", t, "on object", e), r;
503
+ throw console.error("failed to set value", n, "at path", t, "on object", e), Me(r);
395
504
  }
396
- }, Me = /* @__PURE__ */ r({
505
+ }, Ye = /* @__PURE__ */ r({
397
506
  SEPARATOR: () => ".",
398
507
  atKeys: () => me,
399
508
  copy: () => he,
400
- defaultGetter: () => be,
509
+ defaultGetter: () => _,
401
510
  difference: () => ge,
402
- element: () => Se,
511
+ element: () => xe,
403
512
  equal: () => _e,
404
- findBestKey: () => Te,
405
- get: () => Ee,
406
- getIndex: () => we,
407
- has: () => De,
408
- override: () => Oe,
409
- overrideValidItems: () => ke,
513
+ findBestKey: () => Ce,
514
+ get: () => we,
515
+ getIndex: () => v,
516
+ has: () => Te,
517
+ override: () => Ge,
518
+ overrideValidItems: () => Ke,
410
519
  partialEqual: () => ve,
411
- pathsMatch: () => Ce,
412
- remove: () => Ae,
413
- resolvePath: () => xe,
414
- set: () => je,
520
+ pathsMatch: () => Se,
521
+ remove: () => qe,
522
+ resolvePath: () => be,
523
+ set: () => Je,
415
524
  transformPath: () => ye
416
- }), Ne = (e) => Object.getOwnPropertySymbols(globalThis).includes(e), Pe = (e, t) => {
417
- let n = Symbol.for(e);
418
- if (!Ne(n)) {
419
- let e = t();
420
- Object.defineProperty(globalThis, n, { value: e });
421
- }
422
- return () => globalThis[n];
423
- }, Fe = /* @__PURE__ */ r({
424
- Canceled: () => Je,
425
- NONE: () => "nil",
426
- NotImplemented: () => Ye,
427
- UNKNOWN: () => Be,
428
- Unknown: () => Ke,
429
- createTyped: () => Re,
430
- decode: () => Ge,
431
- encode: () => We,
432
- isTyped: () => ze,
433
- payloadZ: () => qe,
434
- register: () => Ue
435
- }), Ie = "sy_x_error", Le = (e) => (t) => typeof t == "object" && t && "type" in t && typeof t.type == "string" ? t.type.startsWith(e) : t instanceof Error ? t.message.startsWith(e) : typeof t == "string" ? t.startsWith(e) : !1, Re = (e) => class t extends Error {
436
- static discriminator = Ie;
437
- discriminator = t.discriminator;
438
- static TYPE = e;
439
- type = t.TYPE;
440
- static matches = Le(e);
441
- matches = t.matches;
442
- constructor(e, n) {
443
- super(e, n), this.name = t.TYPE;
444
- }
445
- static sub(t) {
446
- return Re(`${e}.${t}`);
447
- }
448
- }, ze = (e) => {
449
- if (typeof e != "object" || !e) return !1;
450
- let t = e;
451
- if (t.discriminator !== Ie) return !1;
452
- if (!("type" in t)) throw Error(`X Error is missing its type property: ${JSON.stringify(t)}`);
453
- return !0;
454
- }, Be = "unknown", Ve = class {
455
- providers = [];
456
- register(e) {
457
- this.providers.push(e);
458
- }
459
- encode(e) {
460
- if (e == null) return {
461
- type: "nil",
462
- data: ""
463
- };
464
- if (ze(e)) for (let t of this.providers) {
465
- let n = t.encode(e);
466
- if (n != null) return n;
467
- }
468
- if (e instanceof Error) return {
469
- type: Be,
470
- data: e.message
471
- };
472
- if (typeof e == "string") return {
473
- type: Be,
474
- data: e
475
- };
476
- try {
477
- return {
478
- type: Be,
479
- data: JSON.stringify(e)
480
- };
481
- } catch {
482
- return {
483
- type: Be,
484
- data: "unable to encode error information"
485
- };
486
- }
487
- }
488
- decode(e) {
489
- if (e == null || e.type === "nil") return null;
490
- if (e.type === "unknown") return new Ke(e.data);
491
- for (let t of this.providers) {
492
- let n = t.decode(e);
493
- if (n != null) return n;
494
- }
495
- return new Ke(e.data);
496
- }
497
- }, He = Pe("synnax-error-registry", () => new Ve()), Ue = ({ encode: e, decode: t }) => He().register({
498
- encode: e,
499
- decode: t
500
- }), We = (e) => He().encode(e), Ge = (e) => e == null ? null : He().decode(e), Ke = class extends Re("unknown") {}, qe = t.object({
501
- type: t.string(),
502
- data: t.string()
503
- }), Je = class extends Re("canceled") {}, Ye = class extends Re("not_implemented") {}, Xe = (e) => {
525
+ }), Xe = (e) => {
504
526
  if (e.length === 0) return "<root>";
505
527
  let t = "";
506
528
  return e.forEach((e, n) => {
507
529
  typeof e == "number" ? t += `[${e}]` : n === 0 ? t += String(e) : t += `.${String(e)}`;
508
530
  }), t;
509
- }, Ze = 200, Qe = 10, $e = 8, _ = (e, t = {}) => {
531
+ }, Ze = 200, Qe = 10, $e = 8, et = (e, t = {}) => {
510
532
  let n = t.maxStringLength ?? Ze, r = t.maxArrayLength ?? Qe, i = t.maxDepth ?? $e, a = (e, t) => {
511
533
  if (e === null) return null;
512
534
  if (e === void 0) return "[undefined]";
@@ -538,18 +560,19 @@ var n = Object.defineProperty, r = (e, t) => {
538
560
  }
539
561
  };
540
562
  return a(e, 0);
541
- }, et = (e, t = {}) => JSON.stringify(_(e, t), null, 2), tt = /* @__PURE__ */ r({
563
+ }, tt = (e, t = {}) => JSON.stringify(et(e, t), null, 2), nt = /* @__PURE__ */ r({
542
564
  path: () => Xe,
543
- stringify: () => et,
544
- value: () => _
545
- }), nt = /* @__PURE__ */ r({
546
- ValueExtension: () => y,
547
- is: () => ot,
548
- isCrudeValueExtension: () => v,
549
- isNonZero: () => at,
550
- isStringer: () => rt,
551
- isZero: () => it
552
- }), v = (e) => typeof e == "object" && !!e && "value" in e, y = class {
565
+ stringify: () => tt,
566
+ value: () => et
567
+ }), rt = /* @__PURE__ */ r({
568
+ ValueExtension: () => x,
569
+ is: () => ct,
570
+ isCrudeValueExtension: () => b,
571
+ isHashable: () => at,
572
+ isNonZero: () => st,
573
+ isStringer: () => it,
574
+ isZero: () => ot
575
+ }), b = (e) => typeof e == "object" && !!e && "value" in e, x = class {
553
576
  value;
554
577
  constructor(e) {
555
578
  this.value = e;
@@ -563,8 +586,8 @@ var n = Object.defineProperty, r = (e, t) => {
563
586
  toString() {
564
587
  return this.value.toString();
565
588
  }
566
- }, rt = (e) => typeof e == "object" && !!e && "toString" in e, it = (e) => {
567
- if (rt(e)) return e?.toString().length === 0;
589
+ }, it = (e) => typeof e == "object" && !!e && "toString" in e, at = (e) => typeof e == "object" && !!e && "hash" in e && typeof e.hash == "function", ot = (e) => {
590
+ if (it(e)) return e?.toString().length === 0;
568
591
  switch (typeof e) {
569
592
  case "string": return e.length === 0;
570
593
  case "number": return e === 0;
@@ -574,11 +597,11 @@ var n = Object.defineProperty, r = (e, t) => {
574
597
  case "object": return e == null;
575
598
  default: return !1;
576
599
  }
577
- }, at = (e) => !it(e), ot = (e) => e == null || typeof e != "object" && typeof e != "function", st = "value", ct = "zod.parse", lt = "✗", ut = 60, dt = {
600
+ }, st = (e) => !ot(e), ct = (e) => e == null || typeof e != "object" && typeof e != "function", lt = "value", ut = "zod.parse", dt = "✗", ft = 60, pt = {
578
601
  maxStringLength: 60,
579
602
  maxArrayLength: 3,
580
603
  maxDepth: 3
581
- }, ft = (e) => e.slice(0, -1), pt = (e) => {
604
+ }, mt = (e) => e.slice(0, -1), ht = (e) => {
582
605
  switch (e.code) {
583
606
  case "invalid_type": return `expected ${e.expected}`;
584
607
  case "invalid_value": return `expected one of ${JSON.stringify(e.values)}`;
@@ -596,41 +619,41 @@ var n = Object.defineProperty, r = (e, t) => {
596
619
  case "custom": return e.message || "custom validation failed";
597
620
  default: return e.message;
598
621
  }
599
- }, mt = (e, t, n) => {
600
- let r = JSON.stringify(_(t, n));
601
- return `${pt(e)}, received ${r}`;
602
- }, ht = (e) => {
622
+ }, gt = (e, t, n) => {
623
+ let r = JSON.stringify(et(t, n));
624
+ return `${ht(e)}, received ${r}`;
625
+ }, _t = (e) => {
603
626
  let t = 0;
604
627
  for (let n of e) {
605
628
  if (n.path.length > t && (t = n.path.length), n.code === "invalid_union" && "errors" in n) for (let e of n.errors) {
606
- let n = ht(e);
629
+ let n = _t(e);
607
630
  n > t && (t = n);
608
631
  }
609
632
  if ((n.code === "invalid_key" || n.code === "invalid_element") && "issues" in n) {
610
- let e = ht(n.issues);
633
+ let e = _t(n.issues);
611
634
  e > t && (t = e);
612
635
  }
613
636
  }
614
637
  return t;
615
- }, gt = (e, t = []) => {
638
+ }, vt = (e, t = []) => {
616
639
  let n = [];
617
640
  for (let r of e) {
618
641
  let e = [...t, ...r.path];
619
642
  if (r.code === "invalid_union" && "errors" in r && r.errors.length > 0) {
620
- let t = r.errors[0], i = ht(t);
643
+ let t = r.errors[0], i = _t(t);
621
644
  for (let e = 1; e < r.errors.length; e++) {
622
- let n = ht(r.errors[e]);
645
+ let n = _t(r.errors[e]);
623
646
  n > i && (t = r.errors[e], i = n);
624
647
  }
625
- n.push(...gt(t, e));
648
+ n.push(...vt(t, e));
626
649
  continue;
627
650
  }
628
651
  if (r.code === "invalid_element" && "issues" in r && "key" in r && (typeof r.key == "string" || typeof r.key == "number")) {
629
- n.push(...gt(r.issues, [...e, r.key]));
652
+ n.push(...vt(r.issues, [...e, r.key]));
630
653
  continue;
631
654
  }
632
655
  if (r.code === "invalid_key" && "issues" in r) {
633
- n.push(...gt(r.issues, e));
656
+ n.push(...vt(r.issues, e));
634
657
  continue;
635
658
  }
636
659
  n.push({
@@ -639,7 +662,7 @@ var n = Object.defineProperty, r = (e, t) => {
639
662
  });
640
663
  }
641
664
  return n;
642
- }, _t = (e) => {
665
+ }, yt = (e) => {
643
666
  let t = [];
644
667
  for (let n of e) {
645
668
  if (n.code === "unrecognized_keys" && "keys" in n && Array.isArray(n.keys)) {
@@ -652,9 +675,9 @@ var n = Object.defineProperty, r = (e, t) => {
652
675
  t.push(n);
653
676
  }
654
677
  return t;
655
- }, vt = (e, t, n, r) => {
656
- let i = `${n} `, a = `${n + lt} `, o = {
657
- ...dt,
678
+ }, bt = (e, t, n, r) => {
679
+ let i = `${n} `, a = `${n + dt} `, o = {
680
+ ...pt,
658
681
  ...r
659
682
  };
660
683
  if (Array.isArray(e)) {
@@ -669,7 +692,7 @@ var n = Object.defineProperty, r = (e, t) => {
669
692
  maxArrayLength: e + 2
670
693
  });
671
694
  }
672
- let s = _(e, o);
695
+ let s = et(e, o);
673
696
  if (typeof s != "object" || !s) {
674
697
  let e = JSON.stringify(s), n = t.values().next().value;
675
698
  return [`${a}${e}${n ? ` × ${n.reason}` : ""}`];
@@ -704,7 +727,7 @@ var n = Object.defineProperty, r = (e, t) => {
704
727
  return u.forEach((e, t) => {
705
728
  if (e.mark == null) return;
706
729
  let n = +(t < u.length - 1), r = e.content.length + n;
707
- r > d && r <= ut && (d = r);
730
+ r > d && r <= ft && (d = r);
708
731
  }), u.forEach((e, t) => {
709
732
  let n = t < u.length - 1 ? "," : "", r = e.content + n;
710
733
  if (e.mark != null) {
@@ -712,48 +735,48 @@ var n = Object.defineProperty, r = (e, t) => {
712
735
  c.push(`${a}${r}${t}× ${e.mark.reason}`);
713
736
  } else c.push(`${i}${r}`);
714
737
  }), c.push(n + (l ? "]" : "}")), c;
715
- }, yt = "__root__", bt = (e, t, n) => {
738
+ }, xt = "__root__", St = (e, t, n) => {
716
739
  let r = /* @__PURE__ */ new Map();
717
740
  for (let t of e) {
718
- let e = t.path.length === 0 ? yt : `::${Xe(ft(t.path))}`, n = r.get(e);
741
+ let e = t.path.length === 0 ? xt : `::${Xe(mt(t.path))}`, n = r.get(e);
719
742
  n == null ? r.set(e, [t]) : n.push(t);
720
743
  }
721
744
  let i = [];
722
745
  for (let [e, a] of r) {
723
- if (e === yt) {
724
- i.push(a.map((e) => ` × ${mt(e, t, n)}`).join("\n"));
746
+ if (e === xt) {
747
+ i.push(a.map((e) => ` × ${gt(e, t, n)}`).join("\n"));
725
748
  continue;
726
749
  }
727
- let r = ft(a[0].path), { present: o, value: s } = me(t, r);
750
+ let r = mt(a[0].path), { present: o, value: s } = me(t, r);
728
751
  if (!o) {
729
- i.push(a.map((e) => ` at ${Xe(e.path)}\n × ${mt(e, t, n)}`).join("\n"));
752
+ i.push(a.map((e) => ` at ${Xe(e.path)}\n × ${gt(e, t, n)}`).join("\n"));
730
753
  continue;
731
754
  }
732
755
  let c = /* @__PURE__ */ new Map();
733
756
  for (let e of a) {
734
757
  let n = String(e.path[e.path.length - 1]), r = me(t, e.path);
735
758
  c.set(n, {
736
- reason: pt(e),
759
+ reason: ht(e),
737
760
  missing: !r.present
738
761
  });
739
762
  }
740
- let l = r.length === 0, u = vt(s, c, l ? " " : " ", n);
763
+ let l = r.length === 0, u = bt(s, c, l ? " " : " ", n);
741
764
  l ? i.push(u.join("\n")) : i.push([` at ${Xe(r)}`, ...u].join("\n"));
742
765
  }
743
766
  return i.join("\n\n");
744
- }, xt = (e, t) => {
767
+ }, Ct = (e, t) => {
745
768
  let n = Object.entries(e);
746
- return n.every(([, e]) => ot(e)) ? n.map(([e, t]) => `${e}=${typeof t == "string" ? t : String(t)}`).join(", ") : et(e, t);
747
- }, St = ({ issues: e, input: t, label: n, context: r, formatOptions: i }) => {
748
- let a = i ?? {}, o = _t(gt(e)), s = [`Failed to parse ${n} (${o.length === 1 ? "1 issue" : `${o.length} issues`})`];
749
- return s.push(bt(o, t, a)), r != null && Object.keys(r).length > 0 && s.push(` context: ${xt(r, a)}`), s.join("\n\n");
750
- }, Ct = class extends Re(ct) {
769
+ return n.every(([, e]) => ct(e)) ? n.map(([e, t]) => `${e}=${typeof t == "string" ? t : String(t)}`).join(", ") : tt(e, t);
770
+ }, wt = ({ issues: e, input: t, label: n, context: r, formatOptions: i }) => {
771
+ let a = i ?? {}, o = yt(vt(e)), s = [`Failed to parse ${n} (${o.length === 1 ? "1 issue" : `${o.length} issues`})`];
772
+ return s.push(St(o, t, a)), r != null && Object.keys(r).length > 0 && s.push(` context: ${Ct(r, a)}`), s.join("\n\n");
773
+ }, Tt = class extends y(ut) {
751
774
  issues;
752
775
  input;
753
776
  label;
754
777
  context;
755
778
  constructor({ issues: e, input: t, label: n, context: r, cause: i, formatOptions: a }) {
756
- super(St({
779
+ super(wt({
757
780
  issues: e,
758
781
  input: t,
759
782
  label: n,
@@ -763,7 +786,7 @@ var n = Object.defineProperty, r = (e, t) => {
763
786
  }
764
787
  toStatus() {
765
788
  let e = {
766
- input: _(this.input),
789
+ input: et(this.input),
767
790
  issues: this.issues
768
791
  };
769
792
  return this.context != null && (e.context = this.context), {
@@ -773,24 +796,24 @@ var n = Object.defineProperty, r = (e, t) => {
773
796
  };
774
797
  }
775
798
  };
776
- Ue({
799
+ Re({
777
800
  encode: (e) => {
778
- if (!Ct.matches(e)) return null;
801
+ if (!Tt.matches(e)) return null;
779
802
  let t = e, n = {
780
803
  label: t.label,
781
804
  context: t.context,
782
805
  issues: t.issues,
783
- input: _(t.input)
806
+ input: et(t.input)
784
807
  };
785
808
  return {
786
- type: ct,
809
+ type: ut,
787
810
  data: JSON.stringify(n)
788
811
  };
789
812
  },
790
813
  decode: (e) => {
791
- if (e.type !== ct) return null;
814
+ if (e.type !== ut) return null;
792
815
  let t = JSON.parse(e.data);
793
- return new Ct({
816
+ return new Tt({
794
817
  issues: t.issues,
795
818
  input: t.input,
796
819
  label: t.label,
@@ -798,90 +821,132 @@ Ue({
798
821
  });
799
822
  }
800
823
  });
801
- var wt = (e, t, n = {}) => {
824
+ var Et = (e, t, n = {}) => {
802
825
  let r = e.safeParse(t);
803
826
  if (r.success) return r.data;
804
- throw new Ct({
827
+ throw new Tt({
805
828
  issues: r.error.issues,
806
829
  input: t,
807
- label: n.label ?? st,
830
+ label: n.label ?? lt,
808
831
  context: n.context,
809
832
  cause: r.error
810
833
  });
811
- }, Tt = 2 ** 12 - 1, Et = 2 ** 16 - 1, Dt = 2 ** 20 - 1, Ot = 2 ** 32 - 1, kt = 2n ** 64n - 1n, At = 2 ** 64 - 1, jt = -128, Mt = -(2 ** 15), Nt = 2 ** 15 - 1, Pt = -(2 ** 31), Ft = 2 ** 31 - 1, It = -(2n ** 63n), Lt = 2n ** 63n - 1n, Rt = -(2 ** 63), zt = 2 ** 63 - 1, b = (e) => (t, n) => {
834
+ }, Dt = 2 ** 12 - 1, Ot = 2 ** 16 - 1, kt = 2 ** 20 - 1, At = 2 ** 32 - 1, jt = 2n ** 64n - 1n, Mt = 2 ** 64 - 1, Nt = -128, Pt = -(2 ** 15), Ft = 2 ** 15 - 1, It = -(2 ** 31), Lt = 2 ** 31 - 1, Rt = -(2n ** 63n), zt = 2n ** 63n - 1n, Bt = -(2 ** 63), Vt = 2 ** 63 - 1, Ht = (e) => (t, n) => {
812
835
  if (typeof t == "bigint") {
813
- if (Wt(n)) return e(t, BigInt(n));
836
+ if (qt(n)) return e(t, BigInt(n));
814
837
  let r = e(Number(t), Number(n));
815
838
  return typeof r == "number" ? BigInt(Math.round(r)) : r;
816
839
  }
817
840
  return e(Number(t), Number(n));
818
- }, x = b((e, t) => e - t), S = b((e, t) => e + t), Bt = (e, t, n = 1e-4) => Math.abs(e - t) < n, Vt = (e, t) => {
841
+ }, S = Ht((e, t) => e - t), C = Ht((e, t) => e + t), Ut = (e, t, n = 1e-4) => Math.abs(e - t) < n, Wt = (e, t) => {
819
842
  let n = typeof e == "bigint", r = typeof t == "bigint";
820
- return n && r ? e === t : n && Wt(t) ? e === BigInt(t) : r && Wt(e) ? t === BigInt(e) : e === t;
821
- }, Ht = (e) => {
843
+ return n && r ? e === t : n && qt(t) ? e === BigInt(t) : r && qt(e) ? t === BigInt(e) : e === t;
844
+ }, Gt = (e) => {
822
845
  let t = 10 ** Math.floor(Math.log10(e));
823
846
  return Math.round(e / t) * t;
824
- }, Ut = b((e, t) => e <= t ? e : t), Wt = (e) => typeof e == "bigint" ? !0 : Number.isInteger(e), Gt = b((e, t) => e >= t ? e : t), Kt = (e) => typeof e == "bigint" ? e < 0n ? -e : e : e < 0 ? -e : e, C = b((e, t) => e * t), qt = b((e, t) => e / t), Jt = t.tuple([t.number(), t.number()]), Yt = ["x", "y"], Xt = t.enum(Yt), Zt = [
847
+ }, Kt = Ht((e, t) => e <= t ? e : t), qt = (e) => typeof e == "bigint" ? !0 : Number.isInteger(e), Jt = Ht((e, t) => e >= t ? e : t), Yt = (e) => typeof e == "bigint" ? e < 0n ? -e : e : e < 0 ? -e : e, w = Ht((e, t) => e * t), Xt = Ht((e, t) => e / t), Zt = /* @__PURE__ */ r({
848
+ ALIGNMENTS: () => hn,
849
+ ANGULAR_DIRECTIONS: () => ln,
850
+ CENTER_LOCATIONS: () => dn,
851
+ DIMENSIONS: () => yn,
852
+ DIRECTIONS: () => sn,
853
+ LOCATIONS: () => pn,
854
+ ORDERS: () => _n,
855
+ OUTER_LOCATIONS: () => an,
856
+ SIGNED_DIMENSIONS: () => xn,
857
+ STICKY_UNITS: () => nn,
858
+ X_LOCATIONS: () => Qt,
859
+ Y_LOCATIONS: () => en,
860
+ alignmentZ: () => gn,
861
+ angularDirectionZ: () => un,
862
+ boundsZ: () => On,
863
+ centerLocationZ: () => fn,
864
+ clientXYZ: () => Dn,
865
+ cornerLocationZ: () => Cn,
866
+ dimensionZ: () => bn,
867
+ dimensionsZ: () => Tn,
868
+ directionZ: () => cn,
869
+ locationZ: () => mn,
870
+ orderZ: () => vn,
871
+ outerLocationZ: () => on,
872
+ signedDimensionZ: () => Sn,
873
+ signedDimensionsZ: () => En,
874
+ stickyUnitZ: () => rn,
875
+ stickyUnitsZ: () => wn,
876
+ stickyXYZ: () => An,
877
+ viewportZ: () => kn,
878
+ xLocationZ: () => $t,
879
+ xyZ: () => T,
880
+ yLocationZ: () => tn
881
+ }), Qt = ["left", "right"], $t = t.enum(Qt), en = ["top", "bottom"], tn = t.enum(en), nn = ["px", "decimal"], rn = t.enum(nn), an = [
825
882
  "top",
826
883
  "right",
827
884
  "bottom",
828
885
  "left"
829
- ], Qt = t.enum(Zt), $t = ["left", "right"], en = t.enum($t), tn = ["top", "bottom"], nn = t.enum(tn), rn = ["center"], an = t.enum(rn), on = [
886
+ ], on = t.enum(an), sn = ["x", "y"], cn = t.enum(sn), ln = ["clockwise", "counterclockwise"], un = t.enum(ln), dn = ["center"], fn = t.enum(dn), pn = [
830
887
  "top",
831
888
  "right",
832
889
  "bottom",
833
890
  "left",
834
891
  "center"
835
- ], sn = t.enum(on), cn = [
892
+ ], mn = t.enum(pn), hn = [
836
893
  "start",
837
894
  "center",
838
895
  "end"
839
- ], ln = t.enum(cn), un = ["first", "last"], dn = t.enum(un), fn = t.object({
840
- clientX: t.number(),
841
- clientY: t.number()
842
- }), pn = t.object({
896
+ ], gn = t.enum(hn), _n = ["first", "last"], vn = t.enum(_n), yn = ["width", "height"], bn = t.enum(yn), xn = ["signedWidth", "signedHeight"], Sn = t.enum(xn), T = t.object({
897
+ x: t.number(),
898
+ y: t.number()
899
+ }), Cn = t.object({
900
+ x: $t,
901
+ y: tn
902
+ }), wn = t.object({
903
+ x: rn,
904
+ y: rn
905
+ }), Tn = t.object({
843
906
  width: t.number(),
844
907
  height: t.number()
845
- }), mn = t.object({
908
+ }), En = t.object({
846
909
  signedWidth: t.number(),
847
910
  signedHeight: t.number()
848
- }), hn = t.object({
849
- lower: t.number(),
850
- upper: t.number()
851
- }), gn = t.enum([
852
- "x",
853
- "y",
854
- ...Zt,
855
- ...rn
856
- ]), _n = t.union([
857
- Xt,
858
- t.enum([...Zt, ...rn]),
859
- t.instanceof(String)
860
- ]), vn = /* @__PURE__ */ r({
861
- CLIP: () => Sn,
862
- DECIMAL: () => xn,
863
- INFINITE: () => bn,
864
- ZERO: () => yn,
865
- boundsZ: () => hn,
866
- buildInsertionPlan: () => Ln,
867
- clamp: () => Tn,
868
- construct: () => w,
869
- contains: () => T,
870
- distance: () => zn,
871
- equals: () => Cn,
872
- findInsertPosition: () => Fn,
873
- isFinite: () => An,
874
- isZero: () => On,
875
- linspace: () => Pn,
876
- makeValid: () => wn,
877
- max: () => Mn,
878
- mean: () => jn,
879
- min: () => Nn,
880
- overlapsWith: () => En,
881
- span: () => Dn,
882
- spanIsZero: () => kn,
883
- traverse: () => Rn
884
- }), w = (e, t, n) => {
911
+ }), Dn = t.object({
912
+ clientX: t.number(),
913
+ clientY: t.number()
914
+ }), On = (e) => t.object({
915
+ lower: e ?? t.number(),
916
+ upper: e ?? t.number()
917
+ }), kn = t.object({
918
+ zoom: t.number().default(1),
919
+ position: T
920
+ }), An = t.object({
921
+ x: t.number(),
922
+ y: t.number(),
923
+ root: Cn.optional(),
924
+ units: wn.optional()
925
+ }), jn = t.tuple([t.number(), t.number()]), Mn = /* @__PURE__ */ r({
926
+ CLIP: () => In,
927
+ DECIMAL: () => Fn,
928
+ INFINITE: () => Pn,
929
+ ZERO: () => Nn,
930
+ boundsZ: () => On,
931
+ buildInsertionPlan: () => Zn,
932
+ clamp: () => zn,
933
+ construct: () => E,
934
+ contains: () => D,
935
+ distance: () => $n,
936
+ equals: () => Ln,
937
+ findInsertPosition: () => Yn,
938
+ isFinite: () => Wn,
939
+ isZero: () => Hn,
940
+ linspace: () => Jn,
941
+ makeValid: () => Rn,
942
+ max: () => Kn,
943
+ mean: () => Gn,
944
+ min: () => qn,
945
+ overlapsWith: () => Bn,
946
+ span: () => Vn,
947
+ spanIsZero: () => Un,
948
+ traverse: () => Qn
949
+ }), E = (e, t, n) => {
885
950
  let r = {};
886
951
  if (typeof t == "object" && (n = t, t = void 0), n = {
887
952
  makeValid: !0,
@@ -891,91 +956,91 @@ var wt = (e, t, n = {}) => {
891
956
  if (e.length !== 2) throw Error("bounds: expected array of length 2");
892
957
  [r.lower, r.upper] = e;
893
958
  } else r.lower = e.lower, r.upper = e.upper;
894
- return n?.makeValid ? wn(r) : r;
895
- }, yn = Object.freeze({
959
+ return n?.makeValid ? Rn(r) : r;
960
+ }, Nn = Object.freeze({
896
961
  lower: 0,
897
962
  upper: 0
898
- }), bn = Object.freeze({
963
+ }), Pn = Object.freeze({
899
964
  lower: -Infinity,
900
965
  upper: Infinity
901
- }), xn = Object.freeze({
966
+ }), Fn = Object.freeze({
902
967
  lower: 0,
903
968
  upper: 1
904
- }), Sn = Object.freeze({
969
+ }), In = Object.freeze({
905
970
  lower: -1,
906
971
  upper: 1
907
- }), Cn = (e, t) => {
972
+ }), Ln = (e, t) => {
908
973
  if (e == null && t == null) return !0;
909
974
  if (e == null || t == null) return !1;
910
- let n = w(e), r = w(t);
975
+ let n = E(e), r = E(t);
911
976
  return n?.lower === r?.lower && n?.upper === r?.upper;
912
- }, wn = (e) => e.lower > e.upper ? {
977
+ }, Rn = (e) => e.lower > e.upper ? {
913
978
  lower: e.upper,
914
979
  upper: e.lower
915
- } : e, Tn = (e, t) => {
916
- let n = w(e);
980
+ } : e, zn = (e, t) => {
981
+ let n = E(e);
917
982
  return t < n.lower ? n.lower : t >= n.upper ? n.upper - (typeof n.upper == "number" ? 1 : 1n) : t;
918
- }, T = (e, t) => {
919
- let n = w(e);
983
+ }, D = (e, t) => {
984
+ let n = E(e);
920
985
  if (typeof t == "number" || typeof t == "bigint") return t >= n.lower && t < n.upper;
921
- let r = w(t);
986
+ let r = E(t);
922
987
  return r.lower >= n.lower && r.upper <= n.upper;
923
- }, En = (e, t) => {
924
- let n = w(e), r = w(t);
925
- return n.lower === r.lower ? !0 : r.upper === n.lower || r.lower === n.upper ? !1 : T(n, r.upper) || T(n, r.lower) || T(r, n.upper) || T(r, n.lower);
926
- }, Dn = (e) => {
927
- let t = w(e);
988
+ }, Bn = (e, t) => {
989
+ let n = E(e), r = E(t);
990
+ return n.lower === r.lower ? !0 : r.upper === n.lower || r.lower === n.upper ? !1 : D(n, r.upper) || D(n, r.lower) || D(r, n.upper) || D(r, n.lower);
991
+ }, Vn = (e) => {
992
+ let t = E(e);
928
993
  return t.upper - t.lower;
929
- }, On = (e) => {
930
- let t = w(e);
994
+ }, Hn = (e) => {
995
+ let t = E(e);
931
996
  return typeof t.lower == "bigint" ? t.lower === 0n && t.upper === 0n : t.lower === 0 && t.upper === 0;
932
- }, kn = (e) => {
933
- let t = Dn(e);
997
+ }, Un = (e) => {
998
+ let t = Vn(e);
934
999
  return typeof t == "number" ? t === 0 : t === 0n;
935
- }, An = (e) => {
936
- let t = w(e);
1000
+ }, Wn = (e) => {
1001
+ let t = E(e);
937
1002
  return typeof t.lower == "bigint" ? !0 : Number.isFinite(t.lower) && Number.isFinite(t.upper);
938
- }, jn = (e) => {
939
- let t = w(e);
1003
+ }, Gn = (e) => {
1004
+ let t = E(e);
940
1005
  return (t.upper + t.lower) / 2;
941
- }, Mn = (e) => ({
942
- lower: Math.min(...e.map((e) => w(e).lower)),
943
- upper: Math.max(...e.map((e) => w(e).upper))
944
- }), Nn = (e) => ({
945
- lower: Math.max(...e.map((e) => w(e).lower)),
946
- upper: Math.min(...e.map((e) => w(e).upper))
947
- }), Pn = (e) => {
948
- let t = w(e), n = typeof t.lower == "bigint";
949
- return Array.from({ length: Number(Dn(e)) }, (e, r) => n ? t.lower + BigInt(r) : t.lower + r);
950
- }, Fn = (e, t) => {
951
- let n = e.map((e) => w(e)), r = n.findIndex((e) => T(e, t) || t < e.lower);
1006
+ }, Kn = (e) => ({
1007
+ lower: Math.min(...e.map((e) => E(e).lower)),
1008
+ upper: Math.max(...e.map((e) => E(e).upper))
1009
+ }), qn = (e) => ({
1010
+ lower: Math.max(...e.map((e) => E(e).lower)),
1011
+ upper: Math.min(...e.map((e) => E(e).upper))
1012
+ }), Jn = (e) => {
1013
+ let t = E(e), n = typeof t.lower == "bigint";
1014
+ return Array.from({ length: Number(Vn(e)) }, (e, r) => n ? t.lower + BigInt(r) : t.lower + r);
1015
+ }, Yn = (e, t) => {
1016
+ let n = e.map((e) => E(e)), r = n.findIndex((e) => D(e, t) || t < e.lower);
952
1017
  if (r === -1) return {
953
1018
  index: e.length,
954
1019
  position: 0
955
1020
  };
956
1021
  let i = n[r];
957
- return T(i, t) ? {
1022
+ return D(i, t) ? {
958
1023
  index: r,
959
1024
  position: Number(t - i.lower)
960
1025
  } : {
961
1026
  index: r,
962
1027
  position: 0
963
1028
  };
964
- }, In = {
1029
+ }, Xn = {
965
1030
  removeBefore: 0,
966
1031
  removeAfter: 0,
967
1032
  insertInto: 0,
968
1033
  deleteInBetween: 0
969
- }, Ln = (e, t) => {
970
- let n = e.map((e) => w(e)), r = w(t);
971
- if (n.length === 0) return In;
972
- let i = Fn(n, r.lower), a = Fn(n, r.upper);
1034
+ }, Zn = (e, t) => {
1035
+ let n = e.map((e) => E(e)), r = E(t);
1036
+ if (n.length === 0) return Xn;
1037
+ let i = Yn(n, r.lower), a = Yn(n, r.upper);
973
1038
  if (i.index === e.length) return {
974
- ...In,
1039
+ ...Xn,
975
1040
  insertInto: e.length
976
1041
  };
977
1042
  if (a.index === 0) return {
978
- ...In,
1043
+ ...Xn,
979
1044
  removeAfter: a.position
980
1045
  };
981
1046
  if (i.index === a.index) return i.position !== 0 && a.position !== 0 ? null : {
@@ -984,24 +1049,24 @@ var wt = (e, t, n = {}) => {
984
1049
  insertInto: i.index,
985
1050
  deleteInBetween: 0
986
1051
  };
987
- let o = a.index - i.index, s = i.index, c = x(Number(Dn(n[i.index])), i.position);
1052
+ let o = a.index - i.index, s = i.index, c = S(Number(Vn(n[i.index])), i.position);
988
1053
  return i.position === 0 ? c = 0 : (--o, s += 1), {
989
1054
  removeBefore: c,
990
1055
  removeAfter: a.position,
991
1056
  insertInto: s,
992
1057
  deleteInBetween: o
993
1058
  };
994
- }, Rn = (e, t, n) => {
995
- let r = e.map((e) => w(e)), i = n > 0 ? 1 : n < 0 ? -1 : 0;
1059
+ }, Qn = (e, t, n) => {
1060
+ let r = e.map((e) => E(e)), i = n > 0 ? 1 : n < 0 ? -1 : 0;
996
1061
  if (i === 0) return t;
997
1062
  let a = n, o = t;
998
- for (; Vt(a, 0) === !1;) {
1063
+ for (; Wt(a, 0) === !1;) {
999
1064
  let e = r.findIndex((e) => i > 0 ? o >= e.lower && o < e.upper : o > e.lower && o <= e.upper);
1000
1065
  if (e !== -1) {
1001
1066
  let t = r[e], n;
1002
- if (n = i > 0 ? x(t.upper, o) : x(o, t.lower), n > 0) {
1003
- let e = Ut(Kt(a), n);
1004
- if (o = S(o, i > 0 ? e : -e), a = x(a, i > 0 ? e : -e), Vt(a, 0)) return o;
1067
+ if (n = i > 0 ? S(t.upper, o) : S(o, t.lower), n > 0) {
1068
+ let e = Kt(Yt(a), n);
1069
+ if (o = C(o, i > 0 ? e : -e), a = S(a, i > 0 ? e : -e), Wt(a, 0)) return o;
1005
1070
  continue;
1006
1071
  }
1007
1072
  }
@@ -1016,10 +1081,10 @@ var wt = (e, t, n = {}) => {
1016
1081
  }
1017
1082
  }
1018
1083
  return o;
1019
- }, zn = (e, t, n) => {
1020
- let r = e.map((e) => w(e));
1084
+ }, $n = (e, t, n) => {
1085
+ let r = e.map((e) => E(e));
1021
1086
  if (t === n) return typeof t == "bigint" ? 0n : 0;
1022
- let i = w(t < n ? [t, n] : [n, t]), a = typeof t == "bigint" ? 0n : 0;
1087
+ let i = E(t < n ? [t, n] : [n, t]), a = typeof t == "bigint" ? 0n : 0;
1023
1088
  for (let e of r) {
1024
1089
  let t = e.lower > i.lower ? e.lower : i.lower, n = e.upper < i.upper ? e.upper : i.upper;
1025
1090
  if (t < n) {
@@ -1028,96 +1093,96 @@ var wt = (e, t, n = {}) => {
1028
1093
  }
1029
1094
  }
1030
1095
  return a;
1031
- }, Bn = 2, Vn = 3, Hn = 2, Un = 5, Wn = 1e-10, Gn = (e, t) => {
1096
+ }, er = 2, tr = 3, nr = 2, rr = 5, ir = 1e-10, ar = (e, t) => {
1032
1097
  if (Number.isNaN(e) || !Number.isFinite(e)) return e;
1033
1098
  let n = Math.abs(e);
1034
1099
  if (n === 0) return 0;
1035
1100
  let r = !1, i = 0;
1036
1101
  if (t != null) {
1037
- i = Dn(t);
1102
+ i = Vn(t);
1038
1103
  let e = i / n;
1039
- r = i > 0 && e > Wn;
1104
+ r = i > 0 && e > ir;
1040
1105
  }
1041
1106
  if (r) {
1042
1107
  let t;
1043
- t = i >= 1e3 ? Bn : i >= 1 ? Vn : Math.ceil(-Math.log10(i)) + Hn;
1108
+ t = i >= 1e3 ? er : i >= 1 ? tr : Math.ceil(-Math.log10(i)) + nr;
1044
1109
  let n = 10 ** t;
1045
1110
  return Math.round(e * n) / n;
1046
1111
  }
1047
1112
  if (n >= 1e3) {
1048
- let t = 10 ** Bn;
1113
+ let t = 10 ** er;
1049
1114
  return Math.round(e * t) / t;
1050
1115
  }
1051
1116
  if (n >= 1) {
1052
- let t = 10 ** Vn;
1117
+ let t = 10 ** tr;
1053
1118
  return Math.round(e * t) / t;
1054
1119
  }
1055
- let a = 10 ** (Un - Math.floor(Math.log10(n)) - 1);
1120
+ let a = 10 ** (rr - Math.floor(Math.log10(n)) - 1);
1056
1121
  return Math.round(e * a) / a;
1057
- }, Kn = /* @__PURE__ */ r({
1058
- MAX_INT16: () => Nt,
1059
- MAX_INT32: () => Ft,
1060
- MAX_INT64: () => Lt,
1061
- MAX_INT64_NUMBER: () => zt,
1122
+ }, or = /* @__PURE__ */ r({
1123
+ MAX_INT16: () => Ft,
1124
+ MAX_INT32: () => Lt,
1125
+ MAX_INT64: () => zt,
1126
+ MAX_INT64_NUMBER: () => Vt,
1062
1127
  MAX_INT8: () => 127,
1063
- MAX_UINT12: () => Tt,
1064
- MAX_UINT16: () => Et,
1065
- MAX_UINT20: () => Dt,
1066
- MAX_UINT32: () => Ot,
1067
- MAX_UINT64: () => kt,
1068
- MAX_UINT64_NUMBER: () => At,
1128
+ MAX_UINT12: () => Dt,
1129
+ MAX_UINT16: () => Ot,
1130
+ MAX_UINT20: () => kt,
1131
+ MAX_UINT32: () => At,
1132
+ MAX_UINT64: () => jt,
1133
+ MAX_UINT64_NUMBER: () => Mt,
1069
1134
  MAX_UINT8: () => 255,
1070
- MIN_INT16: () => Mt,
1071
- MIN_INT32: () => Pt,
1072
- MIN_INT64: () => It,
1073
- MIN_INT64_NUMBER: () => Rt,
1074
- MIN_INT8: () => jt,
1075
- abs: () => Kt,
1076
- add: () => S,
1077
- closeTo: () => Bt,
1078
- div: () => qt,
1079
- equal: () => Vt,
1080
- isInteger: () => Wt,
1081
- max: () => Gt,
1082
- min: () => Ut,
1083
- mult: () => C,
1084
- roundToNearestMagnitude: () => Ht,
1085
- smartRound: () => Gn,
1086
- sub: () => x
1087
- }), qn = t.int().min(jt).max(127), Jn = t.int().min(Mt).max(Nt), Yn = t.int().min(Rt).max(zt), Xn = t.int().min(0).max(255), Zn = t.int().min(0).max(Tt), Qn = t.int().min(0).max(Et), $n = t.int().min(0).max(Dt), er = (t) => e.array(t).or(t.transform((e) => [e])), tr = (e) => e._zod.def.output, nr = (e) => ye(e, (e, t, n) => {
1135
+ MIN_INT16: () => Pt,
1136
+ MIN_INT32: () => It,
1137
+ MIN_INT64: () => Rt,
1138
+ MIN_INT64_NUMBER: () => Bt,
1139
+ MIN_INT8: () => Nt,
1140
+ abs: () => Yt,
1141
+ add: () => C,
1142
+ closeTo: () => Ut,
1143
+ div: () => Xt,
1144
+ equal: () => Wt,
1145
+ isInteger: () => qt,
1146
+ max: () => Jt,
1147
+ min: () => Kt,
1148
+ mult: () => w,
1149
+ roundToNearestMagnitude: () => Gt,
1150
+ smartRound: () => ar,
1151
+ sub: () => S
1152
+ }), sr = t.int().min(Nt).max(127), cr = t.int().min(Pt).max(Ft), lr = t.int().min(Bt).max(Vt), ur = t.int().min(0).max(255), dr = t.int().min(0).max(Dt), fr = t.int().min(0).max(Ot), pr = t.int().min(0).max(kt), mr = (t) => e.array(t).or(t.transform((e) => [e])), hr = (e) => e._zod.def.output, gr = (e) => ye(e, (e, t, n) => {
1088
1153
  let r = t === n.length - 1, i = !isNaN(parseInt(e, 10)), a = !isNaN(parseInt(n[t + 1], 10));
1089
1154
  return i && (e = "element"), r || a ? e : [e, "shape"];
1090
- }), rr = (e, t) => {
1155
+ }), _r = (e, t) => {
1091
1156
  if (e == null) return null;
1092
1157
  let n = e[t];
1093
1158
  return n == null && typeof e == "object" && "sourceType" in e ? e.sourceType()[t] : n;
1094
- }, ir = ((e, t, n) => t === "" ? e : Ee(rr(e, "shape"), nr(t), {
1159
+ }, vr = ((e, t, n) => t === "" ? e : we(_r(e, "shape"), gr(t), {
1095
1160
  ...n,
1096
- getter: rr
1097
- })), ar = /* @__PURE__ */ r({
1098
- ParseError: () => Ct,
1099
- functionOutput: () => tr,
1100
- getFieldSchema: () => ir,
1101
- getFieldSchemaPath: () => nr,
1102
- int16: () => Jn,
1103
- int64: () => Yn,
1104
- int8: () => qn,
1161
+ getter: _r
1162
+ })), yr = /* @__PURE__ */ r({
1163
+ ParseError: () => Tt,
1164
+ functionOutput: () => hr,
1165
+ getFieldSchema: () => vr,
1166
+ getFieldSchemaPath: () => gr,
1167
+ int16: () => cr,
1168
+ int64: () => lr,
1169
+ int8: () => sr,
1105
1170
  nullToUndefined: () => pe,
1106
- parse: () => wt,
1107
- toArray: () => er,
1108
- uint12: () => Zn,
1109
- uint16: () => Qn,
1110
- uint20: () => $n,
1111
- uint8: () => Xn
1112
- }), or = /* @__PURE__ */ r({
1113
- CSVCodec: () => cr,
1114
- CSV_CODEC: () => dr,
1115
- ENCODERS: () => pr,
1116
- JSONCodec: () => sr,
1117
- JSON_CODEC: () => ur,
1118
- TEXT_CODEC: () => fr,
1119
- TextCodec: () => lr
1120
- }), sr = class {
1171
+ parse: () => Et,
1172
+ toArray: () => mr,
1173
+ uint12: () => dr,
1174
+ uint16: () => fr,
1175
+ uint20: () => pr,
1176
+ uint8: () => ur
1177
+ }), br = /* @__PURE__ */ r({
1178
+ CSVCodec: () => Sr,
1179
+ CSV_CODEC: () => Tr,
1180
+ ENCODERS: () => Dr,
1181
+ JSONCodec: () => xr,
1182
+ JSON_CODEC: () => wr,
1183
+ TEXT_CODEC: () => Er,
1184
+ TextCodec: () => Cr
1185
+ }), xr = class {
1121
1186
  contentType = "application/json";
1122
1187
  decoder;
1123
1188
  encoder;
@@ -1132,13 +1197,13 @@ var wt = (e, t, n = {}) => {
1132
1197
  }
1133
1198
  decodeString(e, t) {
1134
1199
  let n = re(JSON.parse(e), { schema: t });
1135
- return t == null ? n : wt(t, n);
1200
+ return t == null ? n : Et(t, n);
1136
1201
  }
1137
1202
  encodeString(e, t) {
1138
- let n = ie((t == null ? e : wt(t, e)) ?? {}, { schema: t });
1203
+ let n = ie((t == null ? e : Et(t, e)) ?? {}, { schema: t });
1139
1204
  return JSON.stringify(n, (e, t) => ArrayBuffer.isView(t) ? Array.from(t) : typeof t == "bigint" ? t.toString() : t);
1140
1205
  }
1141
- }, cr = class {
1206
+ }, Sr = class {
1142
1207
  contentType = "text/csv";
1143
1208
  encode(e) {
1144
1209
  let t = this.encodeString(e);
@@ -1175,7 +1240,7 @@ var wt = (e, t, n = {}) => {
1175
1240
  let t = Number(e);
1176
1241
  return isNaN(t) ? e.startsWith("\"") && e.endsWith("\"") ? e.slice(1, -1) : e : t;
1177
1242
  }
1178
- }, lr = class {
1243
+ }, Cr = class {
1179
1244
  contentType = "text/plain";
1180
1245
  encode(e) {
1181
1246
  if (typeof e != "string") throw Error("TextCodec.encode payload must be a string");
@@ -1185,7 +1250,7 @@ var wt = (e, t, n = {}) => {
1185
1250
  let n = new TextDecoder().decode(e);
1186
1251
  return t == null ? n : t.parse(n);
1187
1252
  }
1188
- }, ur = new sr(), dr = new cr(), fr = new lr(), pr = [ur], mr = 365, hr = 30, gr = t.union([
1253
+ }, wr = new xr(), Tr = new Sr(), Er = new Cr(), Dr = [wr], Or = 365, kr = 30, Ar = t.union([
1189
1254
  t.tuple([t.int()]),
1190
1255
  t.tuple([t.int(), t.int().min(1).max(12)]),
1191
1256
  t.tuple([
@@ -1193,20 +1258,23 @@ var wt = (e, t, n = {}) => {
1193
1258
  t.int().min(1).max(12),
1194
1259
  t.int().min(1).max(31)
1195
1260
  ])
1196
- ]), _r = (e, t) => {
1197
- let n = new E(t);
1261
+ ]), jr = (e, t) => {
1262
+ let n = new O(t);
1198
1263
  if (![
1199
- D.DAY,
1200
- D.HOUR,
1201
- D.MINUTE,
1202
- D.SECOND,
1203
- D.MILLISECOND,
1204
- D.MICROSECOND,
1205
- D.NANOSECOND
1264
+ k.DAY,
1265
+ k.HOUR,
1266
+ k.MINUTE,
1267
+ k.SECOND,
1268
+ k.MILLISECOND,
1269
+ k.MICROSECOND,
1270
+ k.NANOSECOND
1206
1271
  ].some((e) => e.equals(n))) throw Error("Invalid argument for remainder. Must be an even TimeSpan or Timestamp");
1207
1272
  let r = e.valueOf() % n.valueOf();
1208
- return e instanceof E ? new E(r) : new D(r);
1209
- }, E = class e extends y {
1273
+ return e instanceof O ? new O(r) : new k(r);
1274
+ }, O = class e extends x {
1275
+ hash() {
1276
+ return this.value.toString();
1277
+ }
1210
1278
  constructor(t, n = "UTC") {
1211
1279
  if (t == null) super(e.now().valueOf());
1212
1280
  else if (t instanceof Date) super(BigInt(t.getTime()) * e.MILLISECOND.valueOf());
@@ -1214,7 +1282,7 @@ var wt = (e, t, n = {}) => {
1214
1282
  else if (Array.isArray(t)) super(e.parseDate(t));
1215
1283
  else {
1216
1284
  let r = 0n;
1217
- t instanceof Number && (t = t.valueOf()), n === "local" && (r = e.utcOffset.valueOf()), typeof t == "number" && (isFinite(t) ? t = t === zt ? Lt : Math.trunc(t) : (isNaN(t) && (t = 0), t = t === Infinity ? e.MAX : e.MIN)), v(t) && (t = t.value), super(BigInt(t.valueOf()) + r);
1285
+ t instanceof Number && (t = t.valueOf()), n === "local" && (r = e.utcOffset.valueOf()), typeof t == "number" && (isFinite(t) ? t = t === Vt ? zt : Math.trunc(t) : (isNaN(t) && (t = 0), t = t === Infinity ? e.MAX : e.MIN)), b(t) && (t = t.value), super(BigInt(t.valueOf()) + r);
1218
1286
  }
1219
1287
  }
1220
1288
  static parseDate([t = 1970, n = 1, r = 1]) {
@@ -1248,7 +1316,7 @@ var wt = (e, t, n = {}) => {
1248
1316
  }
1249
1317
  toISOString(t = "UTC") {
1250
1318
  if (t === "UTC") return this.date().toISOString();
1251
- let n = this.date(), r = new D(BigInt(n.getTimezoneOffset()) * e.MINUTE.valueOf());
1319
+ let n = this.date(), r = new k(BigInt(n.getTimezoneOffset()) * e.MINUTE.valueOf());
1252
1320
  return this.sub(r).date().toISOString();
1253
1321
  }
1254
1322
  timeString(e = !1, t = "UTC") {
@@ -1260,7 +1328,7 @@ var wt = (e, t, n = {}) => {
1260
1328
  return `${e.toLocaleString("default", { month: "short" })} ${e.toLocaleString("default", { day: "numeric" })}`;
1261
1329
  }
1262
1330
  static get utcOffset() {
1263
- return new D(BigInt((/* @__PURE__ */ new Date()).getTimezoneOffset()) * e.MINUTE.valueOf());
1331
+ return new k(BigInt((/* @__PURE__ */ new Date()).getTimezoneOffset()) * e.MINUTE.valueOf());
1264
1332
  }
1265
1333
  static since(t) {
1266
1334
  return new e().span(t);
@@ -1275,7 +1343,7 @@ var wt = (e, t, n = {}) => {
1275
1343
  return this.range(e).span;
1276
1344
  }
1277
1345
  range(e) {
1278
- return new A(this, e).makeValid();
1346
+ return new M(this, e).makeValid();
1279
1347
  }
1280
1348
  spanRange(e) {
1281
1349
  return this.range(this.add(e)).makeValid();
@@ -1296,22 +1364,22 @@ var wt = (e, t, n = {}) => {
1296
1364
  return this.valueOf() <= new e(t).valueOf();
1297
1365
  }
1298
1366
  add(t) {
1299
- return new e(S(this.valueOf(), new D(t).valueOf()));
1367
+ return new e(C(this.valueOf(), new k(t).valueOf()));
1300
1368
  }
1301
1369
  sub(t) {
1302
- return new e(x(this.valueOf(), new D(t).valueOf()));
1370
+ return new e(S(this.valueOf(), new k(t).valueOf()));
1303
1371
  }
1304
1372
  get hours() {
1305
- return Number(this.valueOf()) / Number(D.HOUR.valueOf());
1373
+ return Number(this.valueOf()) / Number(k.HOUR.valueOf());
1306
1374
  }
1307
1375
  get minutes() {
1308
- return Number(this.valueOf()) / Number(D.MINUTE.valueOf());
1376
+ return Number(this.valueOf()) / Number(k.MINUTE.valueOf());
1309
1377
  }
1310
1378
  get days() {
1311
- return Number(this.valueOf()) / Number(D.DAY.valueOf());
1379
+ return Number(this.valueOf()) / Number(k.DAY.valueOf());
1312
1380
  }
1313
1381
  get seconds() {
1314
- return Number(this.valueOf()) / Number(D.SECOND.valueOf());
1382
+ return Number(this.valueOf()) / Number(k.SECOND.valueOf());
1315
1383
  }
1316
1384
  get milliseconds() {
1317
1385
  return Number(this.valueOf()) / Number(e.MILLISECOND.valueOf());
@@ -1423,7 +1491,6 @@ var wt = (e, t, n = {}) => {
1423
1491
  toString(e = "ISO", t = "UTC") {
1424
1492
  switch (e) {
1425
1493
  case "ISODate": return this.toISOString(t).slice(0, 10);
1426
- case "ISOTime": return this.toISOString(t).slice(11, 23);
1427
1494
  case "time": return this.timeString(!1, t);
1428
1495
  case "preciseTime": return this.timeString(!0, t);
1429
1496
  case "date": return this.dateString();
@@ -1433,16 +1500,16 @@ var wt = (e, t, n = {}) => {
1433
1500
  }
1434
1501
  }
1435
1502
  remainder(e) {
1436
- return _r(this, e);
1503
+ return jr(this, e);
1437
1504
  }
1438
1505
  get isToday() {
1439
- return this.truncate(D.DAY).equals(e.now().truncate(D.DAY));
1506
+ return this.truncate(k.DAY).equals(e.now().truncate(k.DAY));
1440
1507
  }
1441
1508
  truncate(e) {
1442
1509
  return this.sub(this.remainder(e));
1443
1510
  }
1444
1511
  formatBySpan(e) {
1445
- return e.greaterThanOrEqual(D.days(30)) ? "shortDate" : e.greaterThanOrEqual(D.DAY) ? "dateTime" : e.greaterThanOrEqual(D.HOUR) ? "time" : e.greaterThanOrEqual(D.SECOND) ? "preciseTime" : "ISOTime";
1512
+ return e.greaterThanOrEqual(k.days(30)) ? "date" : e.greaterThanOrEqual(k.DAY) ? "dateTime" : e.greaterThanOrEqual(k.HOUR) ? "time" : "preciseTime";
1446
1513
  }
1447
1514
  static now() {
1448
1515
  return new e(/* @__PURE__ */ new Date());
@@ -1491,7 +1558,7 @@ var wt = (e, t, n = {}) => {
1491
1558
  return e.hours(t * 24, n);
1492
1559
  }
1493
1560
  static DAY = e.days(1);
1494
- static MAX = new e(Lt);
1561
+ static MAX = new e(zt);
1495
1562
  static MIN = new e(0);
1496
1563
  static ZERO = new e(0);
1497
1564
  static z = t.union([
@@ -1501,25 +1568,28 @@ var wt = (e, t, n = {}) => {
1501
1568
  t.number().transform((t) => new e(t)),
1502
1569
  t.bigint().transform((t) => new e(t)),
1503
1570
  t.date().transform((t) => new e(t)),
1504
- t.custom((e) => e instanceof D).transform((t) => new e(t)),
1505
- gr.transform((t) => new e(t))
1571
+ t.custom((e) => e instanceof k).transform((t) => new e(t)),
1572
+ Ar.transform((t) => new e(t))
1506
1573
  ]);
1507
1574
  static sort(e, t) {
1508
1575
  return Number(e.valueOf() - t.valueOf());
1509
1576
  }
1510
- }, D = class e extends y {
1577
+ }, k = class e extends x {
1511
1578
  constructor(e) {
1512
- typeof e == "number" && (e = Math.trunc(e.valueOf())), v(e) && (e = e.value), super(BigInt(e.valueOf()));
1579
+ typeof e == "number" && (e = Math.trunc(e.valueOf())), b(e) && (e = e.value), super(BigInt(e.valueOf()));
1513
1580
  }
1514
1581
  static fromSeconds(t) {
1515
- return t instanceof e ? t : t instanceof O ? t.period : t instanceof E ? new e(t) : (v(t) && (t = t.value), ["number", "bigint"].includes(typeof t) ? e.seconds(t) : new e(t));
1582
+ return t instanceof e ? t : t instanceof A ? t.period : t instanceof O ? new e(t) : (b(t) && (t = t.value), ["number", "bigint"].includes(typeof t) ? e.seconds(t) : new e(t));
1516
1583
  }
1517
1584
  static fromMilliseconds(t) {
1518
- return t instanceof e ? t : t instanceof O ? t.period : t instanceof E ? new e(t) : (v(t) && (t = t.value), ["number", "bigint"].includes(typeof t) ? e.milliseconds(t) : new e(t));
1585
+ return t instanceof e ? t : t instanceof A ? t.period : t instanceof O ? new e(t) : (b(t) && (t = t.value), ["number", "bigint"].includes(typeof t) ? e.milliseconds(t) : new e(t));
1519
1586
  }
1520
1587
  valueOf() {
1521
1588
  return this.value;
1522
1589
  }
1590
+ hash() {
1591
+ return this.value.toString();
1592
+ }
1523
1593
  lessThan(t) {
1524
1594
  return this.valueOf() < new e(t).valueOf();
1525
1595
  }
@@ -1533,7 +1603,7 @@ var wt = (e, t, n = {}) => {
1533
1603
  return this.valueOf() >= new e(t).valueOf();
1534
1604
  }
1535
1605
  remainder(e) {
1536
- return _r(this, e);
1606
+ return jr(this, e);
1537
1607
  }
1538
1608
  truncate(t) {
1539
1609
  return new e(BigInt(Math.trunc(Number(this.valueOf() / t.valueOf()))) * t.valueOf());
@@ -1547,23 +1617,23 @@ var wt = (e, t, n = {}) => {
1547
1617
  let t = new e(this.valueOf() < 0n ? -this.valueOf() : this.valueOf()), n = this.valueOf() < 0n;
1548
1618
  if (t.valueOf() === 0n) return "0s";
1549
1619
  if (t.lessThan(e.SECOND)) return "< 1s";
1550
- let r = t.days, i = t.hours, a = t.minutes, o = t.seconds, s = Math.floor(r / mr), c = Math.floor(r / hr), l = Math.floor(r / 7), u = Math.floor(r), d = Math.floor(i), f = Math.floor(a), p = Math.floor(o), m = n ? "-" : "";
1620
+ let r = t.days, i = t.hours, a = t.minutes, o = t.seconds, s = Math.floor(r / Or), c = Math.floor(r / kr), l = Math.floor(r / 7), u = Math.floor(r), d = Math.floor(i), f = Math.floor(a), p = Math.floor(o), m = n ? "-" : "";
1551
1621
  if (s >= 1) {
1552
1622
  let e = `${s}y`;
1553
1623
  if (s < 2) {
1554
- let t = Math.floor(r % mr / hr);
1624
+ let t = Math.floor(r % Or / kr);
1555
1625
  t > 0 && (e += ` ${t}mo`);
1556
1626
  }
1557
1627
  return m + e;
1558
1628
  }
1559
- if (l >= 1 && r < hr && r % 7 == 0) {
1629
+ if (l >= 1 && r < kr && r % 7 == 0) {
1560
1630
  let e = `${l}w`, t = Math.floor(r % 7), n = Math.floor(i - l * 7 * 24);
1561
1631
  return l < 2 && (t > 0 ? e += ` ${t}d` : n > 0 && n < 24 && (e += ` ${n}h`)), m + e;
1562
1632
  }
1563
1633
  if (c >= 1) {
1564
1634
  let e = `${c}mo`;
1565
1635
  if (c < 3) {
1566
- let t = Math.floor(r % hr);
1636
+ let t = Math.floor(r % kr);
1567
1637
  t > 0 && (e += ` ${t}d`);
1568
1638
  }
1569
1639
  return m + e;
@@ -1595,10 +1665,10 @@ var wt = (e, t, n = {}) => {
1595
1665
  return `${m}${p}s`;
1596
1666
  }
1597
1667
  mult(t) {
1598
- return new e(C(this.valueOf(), t));
1668
+ return new e(w(this.valueOf(), t));
1599
1669
  }
1600
1670
  div(t) {
1601
- return new e(qt(this.valueOf(), t));
1671
+ return new e(Xt(this.valueOf(), t));
1602
1672
  }
1603
1673
  get days() {
1604
1674
  return Number(this.valueOf()) / Number(e.DAY.valueOf());
@@ -1642,30 +1712,30 @@ var wt = (e, t, n = {}) => {
1642
1712
  }
1643
1713
  static NANOSECOND = e.nanoseconds(1);
1644
1714
  static microseconds(t = 1) {
1645
- return e.nanoseconds(C(t, 1e3));
1715
+ return e.nanoseconds(w(t, 1e3));
1646
1716
  }
1647
1717
  static MICROSECOND = e.microseconds(1);
1648
1718
  static milliseconds(t = 1) {
1649
- return e.microseconds(C(t, 1e3));
1719
+ return e.microseconds(w(t, 1e3));
1650
1720
  }
1651
1721
  static MILLISECOND = e.milliseconds(1);
1652
1722
  static seconds(t = 1) {
1653
- return e.milliseconds(C(t, 1e3));
1723
+ return e.milliseconds(w(t, 1e3));
1654
1724
  }
1655
1725
  static SECOND = e.seconds(1);
1656
1726
  static minutes(t = 1) {
1657
- return e.seconds(C(t, 60));
1727
+ return e.seconds(w(t, 60));
1658
1728
  }
1659
1729
  static MINUTE = e.minutes(1);
1660
1730
  static hours(t) {
1661
- return e.minutes(C(t, 60));
1731
+ return e.minutes(w(t, 60));
1662
1732
  }
1663
1733
  static HOUR = e.hours(1);
1664
1734
  static days(t) {
1665
- return e.hours(C(t, 24));
1735
+ return e.hours(w(t, 24));
1666
1736
  }
1667
1737
  static DAY = e.days(1);
1668
- static MAX = new e(Lt);
1738
+ static MAX = new e(zt);
1669
1739
  static MIN = new e(0);
1670
1740
  static ZERO = new e(0);
1671
1741
  static z = t.union([
@@ -1674,12 +1744,15 @@ var wt = (e, t, n = {}) => {
1674
1744
  t.number().transform((t) => new e(t)),
1675
1745
  t.bigint().transform((t) => new e(t)),
1676
1746
  t.instanceof(e),
1677
- t.instanceof(E).transform((t) => new e(t)),
1678
- t.custom((e) => e instanceof O).transform((t) => new e(t))
1747
+ t.instanceof(O).transform((t) => new e(t)),
1748
+ t.custom((e) => e instanceof A).transform((t) => new e(t))
1679
1749
  ]);
1680
- }, O = class e extends y {
1750
+ }, A = class e extends x {
1681
1751
  constructor(e) {
1682
- v(e) && (e = e.value), super(e.valueOf());
1752
+ b(e) && (e = e.value), super(e.valueOf());
1753
+ }
1754
+ hash() {
1755
+ return this.value.toString();
1683
1756
  }
1684
1757
  toString() {
1685
1758
  return `${this.valueOf()} Hz`;
@@ -1688,31 +1761,31 @@ var wt = (e, t, n = {}) => {
1688
1761
  return this.valueOf() === new e(t).valueOf();
1689
1762
  }
1690
1763
  get period() {
1691
- return D.seconds(1 / this.valueOf());
1764
+ return k.seconds(1 / this.valueOf());
1692
1765
  }
1693
1766
  sampleCount(e) {
1694
- return new D(e).seconds * this.valueOf();
1767
+ return new k(e).seconds * this.valueOf();
1695
1768
  }
1696
1769
  byteCount(e, t) {
1697
- return this.sampleCount(e) * new k(t).valueOf();
1770
+ return this.sampleCount(e) * new j(t).valueOf();
1698
1771
  }
1699
1772
  span(e) {
1700
- return D.seconds(e / this.valueOf());
1773
+ return k.seconds(e / this.valueOf());
1701
1774
  }
1702
1775
  byteSpan(e, t) {
1703
- return this.span(e.valueOf() / new k(t).valueOf());
1776
+ return this.span(e.valueOf() / new j(t).valueOf());
1704
1777
  }
1705
1778
  add(t) {
1706
- return new e(S(this.valueOf(), new e(t).valueOf()));
1779
+ return new e(C(this.valueOf(), new e(t).valueOf()));
1707
1780
  }
1708
1781
  sub(t) {
1709
- return new e(x(this.valueOf(), new e(t).valueOf()));
1782
+ return new e(S(this.valueOf(), new e(t).valueOf()));
1710
1783
  }
1711
1784
  mult(t) {
1712
- return new e(C(this.valueOf(), t));
1785
+ return new e(w(this.valueOf(), t));
1713
1786
  }
1714
1787
  div(t) {
1715
- return new e(qt(this.valueOf(), t));
1788
+ return new e(Xt(this.valueOf(), t));
1716
1789
  }
1717
1790
  static hz(t) {
1718
1791
  return new e(t);
@@ -1721,27 +1794,27 @@ var wt = (e, t, n = {}) => {
1721
1794
  return e.hz(t * 1e3);
1722
1795
  }
1723
1796
  static z = t.union([t.number().transform((t) => new e(t)), t.instanceof(e)]);
1724
- }, k = class e extends y {
1797
+ }, j = class e extends x {
1725
1798
  constructor(e) {
1726
- v(e) && (e = e.value), super(e.valueOf());
1799
+ b(e) && (e = e.value), super(e.valueOf());
1727
1800
  }
1728
1801
  length(e) {
1729
1802
  return e.valueOf() / this.valueOf();
1730
1803
  }
1731
1804
  size(e) {
1732
- return new M(e * this.valueOf());
1805
+ return new P(e * this.valueOf());
1733
1806
  }
1734
1807
  add(t) {
1735
- return new e(S(this.valueOf(), new e(t).valueOf()));
1808
+ return new e(C(this.valueOf(), new e(t).valueOf()));
1736
1809
  }
1737
1810
  sub(t) {
1738
- return new e(x(this.valueOf(), new e(t).valueOf()));
1811
+ return new e(S(this.valueOf(), new e(t).valueOf()));
1739
1812
  }
1740
1813
  mult(t) {
1741
- return new e(C(this.valueOf(), t));
1814
+ return new e(w(this.valueOf(), t));
1742
1815
  }
1743
1816
  div(t) {
1744
- return new e(qt(this.valueOf(), t));
1817
+ return new e(Xt(this.valueOf(), t));
1745
1818
  }
1746
1819
  static UNKNOWN = new e(0);
1747
1820
  static BIT128 = new e(16);
@@ -1750,14 +1823,17 @@ var wt = (e, t, n = {}) => {
1750
1823
  static BIT16 = new e(2);
1751
1824
  static BIT8 = new e(1);
1752
1825
  static z = t.union([t.number().transform((t) => new e(t)), t.instanceof(e)]);
1753
- }, A = class e {
1826
+ }, M = class e {
1827
+ hash() {
1828
+ return `${this.start.hash()}-${this.end.hash()}`;
1829
+ }
1754
1830
  start;
1755
1831
  end;
1756
1832
  constructor(e, t) {
1757
- typeof e == "object" && "start" in e ? (this.start = new E(e.start), this.end = new E(e.end)) : (this.start = new E(e), this.end = new E(t));
1833
+ typeof e == "object" && "start" in e ? (this.start = new O(e.start), this.end = new O(e.end)) : (this.start = new O(e), this.end = new O(t));
1758
1834
  }
1759
1835
  get span() {
1760
- return new D(this.end.valueOf() - this.start.valueOf());
1836
+ return new k(this.end.valueOf() - this.start.valueOf());
1761
1837
  }
1762
1838
  get isValid() {
1763
1839
  return this.start.valueOf() <= this.end.valueOf();
@@ -1783,7 +1859,7 @@ var wt = (e, t, n = {}) => {
1783
1859
  upper: Number(this.end.valueOf())
1784
1860
  };
1785
1861
  }
1786
- equals(e, t = D.ZERO) {
1862
+ equals(e, t = k.ZERO) {
1787
1863
  if (t.isZero) return this.start.equals(e.start) && this.end.equals(e.end);
1788
1864
  let n = this.start.sub(e.start).valueOf(), r = this.end.sub(e.end).valueOf();
1789
1865
  return n < 0 && (n = -n), r < 0 && (r = -r), n <= t.valueOf() && r <= t.valueOf();
@@ -1794,13 +1870,13 @@ var wt = (e, t, n = {}) => {
1794
1870
  toPrettyString() {
1795
1871
  return `${this.start.toString("preciseDate")} - ${this.span.toString()}`;
1796
1872
  }
1797
- overlapsWith(e, t = D.ZERO) {
1873
+ overlapsWith(e, t = k.ZERO) {
1798
1874
  e = e.makeValid();
1799
1875
  let n = this.makeValid();
1800
1876
  if (this.equals(e)) return !0;
1801
1877
  if (e.end.equals(n.start) || n.end.equals(e.start)) return !1;
1802
- let r = E.max(n.start, e.start), i = E.min(n.end, e.end);
1803
- return i.before(r) ? !1 : new D(i.sub(r)).greaterThanOrEqual(t);
1878
+ let r = O.max(n.start, e.start), i = O.min(n.end, e.end);
1879
+ return i.before(r) ? !1 : new k(i.sub(r)).greaterThanOrEqual(t);
1804
1880
  }
1805
1881
  contains(t) {
1806
1882
  return t instanceof e ? this.contains(t.start) && this.contains(t.end) : this.start.beforeEq(t) && this.end.after(t);
@@ -1810,24 +1886,27 @@ var wt = (e, t, n = {}) => {
1810
1886
  return t.start.after(this.start) && (n.start = t.start), t.start.after(this.end) && (n.end = t.start), t.end.before(this.end) && (n.end = t.end), t.end.before(this.start) && (n.start = t.end), n;
1811
1887
  }
1812
1888
  static max(...t) {
1813
- return new e(E.min(...t.map((e) => e.start)), E.max(...t.map((e) => e.end)));
1889
+ return new e(O.min(...t.map((e) => e.start)), O.max(...t.map((e) => e.end)));
1814
1890
  }
1815
- static MAX = new e(E.MIN, E.MAX);
1816
- static ZERO = new e(E.ZERO, E.ZERO);
1891
+ static MAX = new e(O.MIN, O.MAX);
1892
+ static ZERO = new e(O.ZERO, O.ZERO);
1817
1893
  static z = t.union([t.object({
1818
- start: E.z,
1819
- end: E.z
1894
+ start: O.z,
1895
+ end: O.z
1820
1896
  }).transform((t) => new e(t.start, t.end)), t.instanceof(e)]);
1821
- static boundedZ = e.z.refine(({ isValid: e }) => e, { message: "Time range start time must be before or equal to time range end time" }).refine(({ end: e }) => e.valueOf() <= Lt, { message: "Time range end time must be less than or equal to the maximum value of an int64" }).refine(({ start: e }) => e.valueOf() >= It, { message: "Time range start time must be greater than or equal to the minimum value of an int64" });
1897
+ static boundedZ = e.z.refine(({ isValid: e }) => e, { message: "Time range start time must be before or equal to time range end time" }).refine(({ end: e }) => e.valueOf() <= zt, { message: "Time range end time must be less than or equal to the maximum value of an int64" }).refine(({ start: e }) => e.valueOf() >= Rt, { message: "Time range start time must be greater than or equal to the minimum value of an int64" });
1822
1898
  static sort(e, t) {
1823
- return E.sort(e.start, t.start) || E.sort(e.end, t.end);
1899
+ return O.sort(e.start, t.start) || O.sort(e.end, t.end);
1824
1900
  }
1825
1901
  static merge(...t) {
1826
1902
  return e.max(...t.map((t) => new e(t).makeValid()));
1827
1903
  }
1828
- }, j = class e extends y {
1904
+ }, N = class e extends x {
1905
+ hash() {
1906
+ return this.value;
1907
+ }
1829
1908
  constructor(t) {
1830
- if (v(t) && (t = t.value), t instanceof e || typeof t == "string" || typeof t.valueOf() == "string") super(t.valueOf());
1909
+ if (b(t) && (t = t.value), t instanceof e || typeof t == "string" || typeof t.valueOf() == "string") super(t.valueOf());
1831
1910
  else {
1832
1911
  let n = e.ARRAY_CONSTRUCTOR_DATA_TYPES.get(t.constructor.name);
1833
1912
  if (n == null) throw Error(`unable to find data type for ${t.toString()}`);
@@ -1930,21 +2009,21 @@ var wt = (e, t, n = {}) => {
1930
2009
  [BigInt64Array.name, e.INT64]
1931
2010
  ]);
1932
2011
  static DENSITIES = new Map([
1933
- [e.UINT8.toString(), k.BIT8],
1934
- [e.UINT16.toString(), k.BIT16],
1935
- [e.UINT32.toString(), k.BIT32],
1936
- [e.UINT64.toString(), k.BIT64],
1937
- [e.FLOAT32.toString(), k.BIT32],
1938
- [e.FLOAT64.toString(), k.BIT64],
1939
- [e.INT8.toString(), k.BIT8],
1940
- [e.INT16.toString(), k.BIT16],
1941
- [e.INT32.toString(), k.BIT32],
1942
- [e.INT64.toString(), k.BIT64],
1943
- [e.TIMESTAMP.toString(), k.BIT64],
1944
- [e.STRING.toString(), k.UNKNOWN],
1945
- [e.JSON.toString(), k.UNKNOWN],
1946
- [e.UUID.toString(), k.BIT128],
1947
- [e.BYTES.toString(), k.UNKNOWN]
2012
+ [e.UINT8.toString(), j.BIT8],
2013
+ [e.UINT16.toString(), j.BIT16],
2014
+ [e.UINT32.toString(), j.BIT32],
2015
+ [e.UINT64.toString(), j.BIT64],
2016
+ [e.FLOAT32.toString(), j.BIT32],
2017
+ [e.FLOAT64.toString(), j.BIT64],
2018
+ [e.INT8.toString(), j.BIT8],
2019
+ [e.INT16.toString(), j.BIT16],
2020
+ [e.INT32.toString(), j.BIT32],
2021
+ [e.INT64.toString(), j.BIT64],
2022
+ [e.TIMESTAMP.toString(), j.BIT64],
2023
+ [e.STRING.toString(), j.UNKNOWN],
2024
+ [e.JSON.toString(), j.UNKNOWN],
2025
+ [e.UUID.toString(), j.BIT128],
2026
+ [e.BYTES.toString(), j.UNKNOWN]
1948
2027
  ]);
1949
2028
  static ALL = [
1950
2029
  e.UNKNOWN,
@@ -1987,27 +2066,27 @@ var wt = (e, t, n = {}) => {
1987
2066
  e.TIMESTAMP
1988
2067
  ];
1989
2068
  static z = t.union([t.string().transform((t) => new e(t)), t.instanceof(e)]);
1990
- }, M = class e extends y {
2069
+ }, P = class e extends x {
1991
2070
  constructor(e) {
1992
- v(e) && (e = e.value), super(e.valueOf());
2071
+ b(e) && (e = e.value), super(e.valueOf());
1993
2072
  }
1994
2073
  largerThan(e) {
1995
- return v(e) && (e = e.value), this.valueOf() > e.valueOf();
2074
+ return b(e) && (e = e.value), this.valueOf() > e.valueOf();
1996
2075
  }
1997
2076
  smallerThan(e) {
1998
- return v(e) && (e = e.value), this.valueOf() < e.valueOf();
2077
+ return b(e) && (e = e.value), this.valueOf() < e.valueOf();
1999
2078
  }
2000
2079
  add(t) {
2001
- return v(t) && (t = t.value), new e(S(this.valueOf(), t.valueOf()));
2080
+ return b(t) && (t = t.value), new e(C(this.valueOf(), t.valueOf()));
2002
2081
  }
2003
2082
  sub(t) {
2004
- return v(t) && (t = t.value), new e(x(this.valueOf(), t.valueOf()));
2083
+ return b(t) && (t = t.value), new e(S(this.valueOf(), t.valueOf()));
2005
2084
  }
2006
2085
  mult(t) {
2007
- return new e(C(this.valueOf(), t));
2086
+ return new e(w(this.valueOf(), t));
2008
2087
  }
2009
2088
  div(t) {
2010
- return new e(qt(this.valueOf(), t));
2089
+ return new e(Xt(this.valueOf(), t));
2011
2090
  }
2012
2091
  truncate(t) {
2013
2092
  return new e(Math.trunc(this.valueOf() / new e(t).valueOf()) * new e(t).valueOf());
@@ -2056,10 +2135,10 @@ var wt = (e, t, n = {}) => {
2056
2135
  get isZero() {
2057
2136
  return this.valueOf() === 0;
2058
2137
  }
2059
- }, vr = t.object({
2138
+ }, Mr = t.object({
2060
2139
  start: t.number(),
2061
2140
  end: t.number()
2062
- }), yr = t.union([
2141
+ }), Nr = t.union([
2063
2142
  t.instanceof(Uint8Array),
2064
2143
  t.instanceof(Uint16Array),
2065
2144
  t.instanceof(Uint32Array),
@@ -2070,34 +2149,34 @@ var wt = (e, t, n = {}) => {
2070
2149
  t.instanceof(Int16Array),
2071
2150
  t.instanceof(Int32Array),
2072
2151
  t.instanceof(BigInt64Array)
2073
- ]), br = (e) => {
2152
+ ]), Pr = (e) => {
2074
2153
  let t = typeof e;
2075
- return t === "string" || t === "number" || t === "boolean" || t === "bigint" || e instanceof E || e instanceof D || e instanceof Date;
2076
- }, xr = (e, t, n, r = 0) => e.usesBigInt && !t.usesBigInt ? Number(n) - Number(r) : !e.usesBigInt && t.usesBigInt ? BigInt(n.valueOf()) - BigInt(r.valueOf()) : x(n, r), Sr = A.z, Cr = E.z, wr = D.z, Tr = O.z, Er = M.z, Dr = j.z, Or = A.boundedZ, kr = class {
2154
+ return t === "string" || t === "number" || t === "boolean" || t === "bigint" || e instanceof O || e instanceof k || e instanceof Date;
2155
+ }, Fr = (e, t, n, r = 0) => e.usesBigInt && !t.usesBigInt ? Number(BigInt(n.valueOf()) - BigInt(r.valueOf())) : !e.usesBigInt && t.usesBigInt ? BigInt(n.valueOf()) - BigInt(r.valueOf()) : S(n, r), Ir = M.z, Lr = O.z, Rr = k.z, zr = A.z, Br = P.z, Vr = N.z, Hr = M.boundedZ, Ur = class {
2077
2156
  now;
2078
- localStartT = new E(0);
2079
- lastSkew = D.ZERO;
2080
- constructor(e = () => E.now()) {
2157
+ localStartT = new O(0);
2158
+ lastSkew = k.ZERO;
2159
+ constructor(e = () => O.now()) {
2081
2160
  this.now = e;
2082
2161
  }
2083
2162
  start() {
2084
2163
  this.localStartT = this.now();
2085
2164
  }
2086
2165
  end(e) {
2087
- let t = this.now().span(this.localStartT).valueOf() / 2n;
2088
- this.lastSkew = new D(this.localStartT.add(t).valueOf() - e.valueOf());
2166
+ let t = this.now().span(this.localStartT).valueOf() / 2n, n = this.localStartT.add(t);
2167
+ this.lastSkew = new k(n.valueOf() - e.valueOf());
2089
2168
  }
2090
2169
  get skew() {
2091
2170
  return this.lastSkew;
2092
2171
  }
2093
2172
  exceeds(e) {
2094
2173
  let t = this.skew.valueOf();
2095
- return (t < 0n ? -t : t) > new D(e).valueOf();
2174
+ return (t < 0n ? -t : t) > new k(e).valueOf();
2096
2175
  }
2097
- }, Ar = /* @__PURE__ */ r({
2098
- by: () => Mr,
2099
- unique: () => jr
2100
- }), jr = (e) => [...new Set(e)], Mr = (e, t, n = !0) => {
2176
+ }, Wr = /* @__PURE__ */ r({
2177
+ by: () => Kr,
2178
+ unique: () => Gr
2179
+ }), Gr = (e) => [...new Set(e)], Kr = (e, t, n = !0) => {
2101
2180
  let r = /* @__PURE__ */ new Map();
2102
2181
  return e.forEach((e) => {
2103
2182
  let i = t(e);
@@ -2107,8 +2186,8 @@ var wt = (e, t, n = {}) => {
2107
2186
  }
2108
2187
  r.set(i, e);
2109
2188
  }), Array.from(r.values());
2110
- }, Nr = (e, t = !1) => {
2111
- let n = rt(e) ? "stringer" : typeof e, r;
2189
+ }, qr = (e, t = !1) => {
2190
+ let n = it(e) ? "stringer" : typeof e, r;
2112
2191
  switch (n) {
2113
2192
  case "string":
2114
2193
  r = (e, t) => e.localeCompare(t);
@@ -2130,16 +2209,26 @@ var wt = (e, t, n = {}) => {
2130
2209
  break;
2131
2210
  default: return console.warn(`sortFunc: unknown type ${n}`), () => -1;
2132
2211
  }
2133
- return t ? zr(r) : r;
2134
- }, Pr = (e, t, n) => {
2135
- let r = Nr(t[e], n);
2212
+ return t ? ti(r) : r;
2213
+ }, Jr = (e, t, n) => {
2214
+ let r = qr(t[e], n);
2136
2215
  return (t, n) => r(t[e], n[e]);
2137
- }, Fr = (e, t) => e.length === t.length ? e.every((e, n) => e === t[n]) ? 0 : -1 : e.length - t.length, Ir = (e, t) => {
2216
+ }, Yr = (e, t) => e.length === t.length ? e.every((e, n) => e === t[n]) ? 0 : -1 : e.length - t.length, Xr = (e, t) => {
2138
2217
  if (e.length !== t.length) return e.length - t.length;
2139
2218
  if (e.length === 0) return 0;
2140
- let n = Nr(e[0]), r = [...e].sort(n), i = [...t].sort(n);
2219
+ let n = qr(e[0]), r = [...e].sort(n), i = [...t].sort(n);
2141
2220
  return r.every((e, t) => e === i[t]) ? 0 : -1;
2142
- }, Lr = (e, t) => Ir(jr(e), jr(t)), Rr = (e, t) => e === t ? 0 : e === "first" && t === "last" ? 1 : -1, zr = (e) => (t, n) => e(n, t), Br = (e) => e < 0, Vr = (e) => e > 0, Hr = (e) => e >= 0, Ur = (e) => e === 0, Wr = (e, t) => {
2221
+ }, Zr = (e, t) => Xr(Gr(e), Gr(t)), Qr = (e, t) => {
2222
+ if (e === t) return !0;
2223
+ if (e.size !== t.size) return !1;
2224
+ for (let [n, r] of e) if (!t.has(n) || t.get(n) !== r) return !1;
2225
+ return !0;
2226
+ }, $r = (e, t) => {
2227
+ if (e === t) return !0;
2228
+ if (e.length !== t.length) return !1;
2229
+ for (let n = 0; n < e.length; n++) if (e[n] !== t[n]) return !1;
2230
+ return !0;
2231
+ }, ei = (e, t) => e === t ? 0 : e === "first" && t === "last" ? 1 : -1, ti = (e) => (t, n) => e(n, t), ni = (e) => e < 0, ri = (e) => e > 0, ii = (e) => e >= 0, ai = (e) => e === 0, oi = (e, t) => {
2143
2232
  let n = /([a-zA-Z]+)|(\d+)/g, r = e.replace(/[\s_.-]+/g, "").match(n), i = t.replace(/[\s_.-]+/g, "").match(n);
2144
2233
  if (!r || !i) return 0;
2145
2234
  for (let e = 0; e < Math.min(r.length, i.length); e++) {
@@ -2153,96 +2242,103 @@ var wt = (e, t, n = {}) => {
2153
2242
  } else return isNaN(Number(t)) ? -1 : 1;
2154
2243
  }
2155
2244
  return r.length - i.length;
2156
- }, Gr = (e, t, n) => {
2157
- let r = 0, i = e.length, a = n ?? Nr(t);
2245
+ }, si = (e, t, n) => {
2246
+ let r = 0, i = e.length, a = n ?? qr(t);
2158
2247
  for (; r < i;) {
2159
2248
  let n = Math.floor((r + i) / 2), o = a(e[n], t);
2160
2249
  if (o === 0) return n;
2161
2250
  o < 0 ? r = n + 1 : i = n;
2162
2251
  }
2163
2252
  return r;
2164
- }, Kr = (e, t, n) => {
2165
- let r = Gr(e, t, n);
2253
+ }, ci = (e, t, n) => {
2254
+ let r = si(e, t, n);
2166
2255
  e.splice(r, 0, t);
2167
- }, qr = /* @__PURE__ */ r({
2256
+ }, li = /* @__PURE__ */ r({
2168
2257
  EQUAL: () => 0,
2169
2258
  GREATER_THAN: () => 1,
2170
2259
  LESS_THAN: () => -1,
2171
- insert: () => Kr,
2172
- isEqualTo: () => Ur,
2173
- isGreaterThan: () => Vr,
2174
- isGreaterThanEqual: () => Hr,
2175
- isLessThan: () => Br,
2176
- newF: () => Nr,
2177
- newFieldF: () => Pr,
2178
- order: () => Rr,
2179
- primitiveArrays: () => Fr,
2180
- reverseF: () => zr,
2181
- search: () => Gr,
2182
- stringsWithNumbers: () => Wr,
2183
- uniqueUnorderedPrimitiveArrays: () => Lr,
2184
- unorderedPrimitiveArrays: () => Ir
2185
- }), Jr = (e, t = 21) => (n = t) => {
2260
+ arraysEqual: () => $r,
2261
+ insert: () => ci,
2262
+ isEqualTo: () => ai,
2263
+ isGreaterThan: () => ri,
2264
+ isGreaterThanEqual: () => ii,
2265
+ isLessThan: () => ni,
2266
+ mapsEqual: () => Qr,
2267
+ newF: () => qr,
2268
+ newFieldF: () => Jr,
2269
+ order: () => ei,
2270
+ primitiveArrays: () => Yr,
2271
+ reverseF: () => ti,
2272
+ search: () => si,
2273
+ stringsWithNumbers: () => oi,
2274
+ uniqueUnorderedPrimitiveArrays: () => Zr,
2275
+ unorderedPrimitiveArrays: () => Xr
2276
+ }), ui = (e, t = 21) => (n = t) => {
2186
2277
  let r = "", i = n | 0;
2187
2278
  for (; i--;) r += e[Math.random() * e.length | 0];
2188
2279
  return r;
2189
- }, Yr = /* @__PURE__ */ r({
2280
+ }, di = /* @__PURE__ */ r({
2190
2281
  LENGTH: () => 11,
2191
- create: () => ei
2192
- }), Xr = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz", Zr = `0123456789${Xr}`, Qr = Jr(Xr, 1), $r = Jr(Zr, 10), ei = () => `${Qr()}${$r()}`, ti = /* @__PURE__ */ r({ createMatcher: () => ni }), ni = (e, t) => (n) => n instanceof t || typeof n == "object" && !!n && "discriminator" in n && n.discriminator === e, ri = /* @__PURE__ */ r({
2193
- DIRECTIONS: () => Yt,
2194
- construct: () => N,
2195
- crude: () => ii,
2196
- dimension: () => oi,
2197
- directionZ: () => Xt,
2198
- isDirection: () => ci,
2199
- isX: () => ui,
2200
- isY: () => di,
2201
- location: () => si,
2202
- signedDimension: () => li,
2203
- swap: () => ai
2204
- }), ii = gn, N = (e) => Yt.includes(e) ? e : tn.includes(e) ? "y" : "x", ai = (e) => N(e) === "x" ? "y" : "x", oi = (e) => N(e) === "x" ? "width" : "height", si = (e) => N(e) === "x" ? "left" : "top", ci = (e) => ii.safeParse(e).success, li = (e) => N(e) === "x" ? "signedWidth" : "signedHeight", ui = (e) => e === "center" ? !1 : N(e) === "x", di = (e) => N(e) === "y", fi = /* @__PURE__ */ r({
2205
- BOTTOM_CENTER: () => Ai,
2206
- BOTTOM_LEFT: () => Ei,
2207
- BOTTOM_RIGHT: () => Di,
2208
- CENTER: () => Oi,
2209
- CENTER_LEFT: () => Mi,
2210
- CENTER_LOCATIONS: () => rn,
2211
- CENTER_RIGHT: () => ji,
2212
- LOCATIONS: () => on,
2213
- OUTER_LOCATIONS: () => Zt,
2214
- TOP_CENTER: () => ki,
2215
- TOP_LEFT: () => F,
2216
- TOP_RIGHT: () => Ti,
2217
- XY_LOCATIONS: () => Ni,
2218
- X_LOCATIONS: () => $t,
2219
- Y_LOCATIONS: () => tn,
2220
- center: () => hi,
2221
- construct: () => P,
2222
- constructXY: () => Bi,
2223
- corner: () => wi,
2224
- crude: () => yi,
2225
- direction: () => Si,
2226
- isX: () => Li,
2227
- isY: () => Ri,
2228
- locationZ: () => sn,
2229
- outerZ: () => gi,
2230
- rotate: () => xi,
2231
- swap: () => bi,
2232
- x: () => pi,
2233
- xy: () => Ci,
2234
- xyCouple: () => Ii,
2235
- xyEquals: () => Pi,
2236
- xyMatches: () => Fi,
2237
- xyToString: () => zi,
2238
- y: () => mi
2239
- }), pi = en, mi = nn, hi = an, gi = Qt, _i = {
2282
+ create: () => gi
2283
+ }), fi = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz", pi = `0123456789${fi}`, mi = ui(fi, 1), hi = ui(pi, 10), gi = () => `${mi()}${hi()}`, _i = /* @__PURE__ */ r({ createMatcher: () => vi }), vi = (e, t) => (n) => n instanceof t || typeof n == "object" && !!n && "discriminator" in n && n.discriminator === e, yi = /* @__PURE__ */ r({
2284
+ DIRECTIONS: () => sn,
2285
+ construct: () => F,
2286
+ crudeZ: () => bi,
2287
+ dimension: () => Si,
2288
+ directionZ: () => cn,
2289
+ isDirection: () => wi,
2290
+ isX: () => Ei,
2291
+ isY: () => Di,
2292
+ location: () => Ci,
2293
+ signedDimension: () => Ti,
2294
+ swap: () => xi
2295
+ }), bi = e.enum([
2296
+ "x",
2297
+ "y",
2298
+ ...an,
2299
+ ...dn
2300
+ ]), F = (e) => sn.includes(e) ? e : en.includes(e) ? "y" : "x", xi = (e) => F(e) === "x" ? "y" : "x", Si = (e) => F(e) === "x" ? "width" : "height", Ci = (e) => F(e) === "x" ? "left" : "top", wi = (e) => bi.safeParse(e).success, Ti = (e) => F(e) === "x" ? "signedWidth" : "signedHeight", Ei = (e) => e === "center" ? !1 : F(e) === "x", Di = (e) => F(e) === "y", Oi = /* @__PURE__ */ r({
2301
+ BOTTOM_CENTER: () => qi,
2302
+ BOTTOM_LEFT: () => Ui,
2303
+ BOTTOM_RIGHT: () => Wi,
2304
+ CENTER: () => Gi,
2305
+ CENTER_LEFT: () => Yi,
2306
+ CENTER_LOCATIONS: () => dn,
2307
+ CENTER_RIGHT: () => Ji,
2308
+ LOCATIONS: () => pn,
2309
+ OUTER_LOCATIONS: () => an,
2310
+ TOP_CENTER: () => Ki,
2311
+ TOP_LEFT: () => Vi,
2312
+ TOP_RIGHT: () => Hi,
2313
+ XY_LOCATIONS: () => Xi,
2314
+ X_LOCATIONS: () => Qt,
2315
+ Y_LOCATIONS: () => en,
2316
+ centerZ: () => ji,
2317
+ construct: () => I,
2318
+ constructXY: () => ra,
2319
+ cornerZ: () => Ni,
2320
+ crudeZ: () => Ii,
2321
+ direction: () => zi,
2322
+ isX: () => ea,
2323
+ isY: () => ta,
2324
+ locationZ: () => mn,
2325
+ outerZ: () => Mi,
2326
+ rotate: () => Ri,
2327
+ swap: () => Li,
2328
+ xZ: () => ki,
2329
+ xy: () => Bi,
2330
+ xyCouple: () => $i,
2331
+ xyEquals: () => Zi,
2332
+ xyMatches: () => Qi,
2333
+ xyToString: () => na,
2334
+ yZ: () => Ai
2335
+ }), ki = $t, Ai = tn, ji = fn, Mi = on, Ni = Cn, Pi = {
2240
2336
  top: "bottom",
2241
2337
  right: "left",
2242
2338
  bottom: "top",
2243
2339
  left: "right",
2244
2340
  center: "center"
2245
- }, vi = {
2341
+ }, Fi = {
2246
2342
  top: {
2247
2343
  clockwise: "left",
2248
2344
  counterclockwise: "right"
@@ -2259,110 +2355,103 @@ var wt = (e, t, n = {}) => {
2259
2355
  clockwise: "bottom",
2260
2356
  counterclockwise: "top"
2261
2357
  }
2262
- }, yi = _n, P = (e) => e instanceof String || !Yt.includes(e) ? e : e === "x" ? "left" : "top", bi = (e) => _i[P(e)], xi = (e, t) => vi[e][t], Si = (e) => {
2263
- let t = P(e);
2358
+ }, Ii = t.union([
2359
+ cn,
2360
+ t.enum([...an, ...dn]),
2361
+ t.instanceof(String)
2362
+ ]), I = (e) => e instanceof String || !sn.includes(e) ? e : e === "x" ? "left" : "top", Li = (e) => Pi[I(e)], Ri = (e, t) => Fi[e][t], zi = (e) => {
2363
+ let t = I(e);
2264
2364
  return t === "top" || t === "bottom" ? "y" : "x";
2265
- }, Ci = t.object({
2266
- x: en.or(an),
2267
- y: nn.or(an)
2268
- }), wi = t.object({
2269
- x: en,
2270
- y: nn
2271
- }), F = Object.freeze({
2365
+ }, Bi = t.object({
2366
+ x: $t.or(fn),
2367
+ y: tn.or(fn)
2368
+ }), Vi = Object.freeze({
2272
2369
  x: "left",
2273
2370
  y: "top"
2274
- }), Ti = Object.freeze({
2371
+ }), Hi = Object.freeze({
2275
2372
  x: "right",
2276
2373
  y: "top"
2277
- }), Ei = Object.freeze({
2374
+ }), Ui = Object.freeze({
2278
2375
  x: "left",
2279
2376
  y: "bottom"
2280
- }), Di = Object.freeze({
2377
+ }), Wi = Object.freeze({
2281
2378
  x: "right",
2282
2379
  y: "bottom"
2283
- }), Oi = Object.freeze({
2380
+ }), Gi = Object.freeze({
2284
2381
  x: "center",
2285
2382
  y: "center"
2286
- }), ki = Object.freeze({
2383
+ }), Ki = Object.freeze({
2287
2384
  x: "center",
2288
2385
  y: "top"
2289
- }), Ai = Object.freeze({
2386
+ }), qi = Object.freeze({
2290
2387
  x: "center",
2291
2388
  y: "bottom"
2292
- }), ji = Object.freeze({
2389
+ }), Ji = Object.freeze({
2293
2390
  x: "right",
2294
2391
  y: "center"
2295
- }), Mi = Object.freeze({
2392
+ }), Yi = Object.freeze({
2296
2393
  x: "left",
2297
2394
  y: "center"
2298
- }), Ni = Object.freeze([
2299
- Mi,
2300
- ji,
2301
- ki,
2302
- Ai,
2303
- F,
2304
- Ti,
2305
- Ei,
2306
- Di,
2307
- Oi
2308
- ]), Pi = (e, t) => e.x === t.x && e.y === t.y, Fi = (e, t) => {
2395
+ }), Xi = Object.freeze([
2396
+ Yi,
2397
+ Ji,
2398
+ Ki,
2399
+ qi,
2400
+ Vi,
2401
+ Hi,
2402
+ Ui,
2403
+ Wi,
2404
+ Gi
2405
+ ]), Zi = (e, t) => e.x === t.x && e.y === t.y, Qi = (e, t) => {
2309
2406
  if (typeof t == "object") {
2310
2407
  let n = !0;
2311
2408
  return "x" in t && e.x !== t.x && (n = !1), "y" in t && e.y !== t.y && (n = !1), n;
2312
2409
  }
2313
2410
  return e.x === t || e.y === t;
2314
- }, Ii = (e) => [e.x, e.y], Li = (e) => Si(P(e)) === "x", Ri = (e) => Si(P(e)) === "y", zi = (e) => `${e.x}${ae(e.y)}`, Bi = (e, t) => {
2411
+ }, $i = (e) => [e.x, e.y], ea = (e) => zi(I(e)) === "x", ta = (e) => zi(I(e)) === "y", na = (e) => `${e.x}${ae(e.y)}`, ra = (e, t) => {
2315
2412
  let n, r;
2316
- if (typeof e == "object" && "x" in e ? (n = e.x, r = e.y) : (n = P(e), r = P(t ?? e)), Si(n) === Si(r) && n !== "center" && r !== "center") throw Error(`[XYLocation] - encountered two locations with the same direction: ${n.toString()} - ${r.toString()}`);
2317
- let i = { ...Oi };
2318
- return n === "center" ? Li(r) ? [i.x, i.y] = [r, n] : [i.x, i.y] = [n, r] : Li(n) ? [i.x, i.y] = [n, r] : [i.x, i.y] = [r, n], i;
2319
- }, Vi = [
2320
- "top",
2321
- "right",
2322
- "bottom",
2323
- "left"
2324
- ], Hi = t.enum(Vi), I = t.object({
2325
- x: t.number(),
2326
- y: t.number()
2327
- }), Ui = /* @__PURE__ */ r({
2328
- INFINITY: () => Ki,
2329
- NAN: () => qi,
2330
- ONE: () => Gi,
2413
+ if (typeof e == "object" && "x" in e ? (n = e.x, r = e.y) : (n = I(e), r = I(t ?? e)), zi(n) === zi(r) && n !== "center" && r !== "center") throw Error(`[XYLocation] - encountered two locations with the same direction: ${n.toString()} - ${r.toString()}`);
2414
+ let i = { ...Gi };
2415
+ return n === "center" ? ea(r) ? [i.x, i.y] = [r, n] : [i.x, i.y] = [n, r] : ea(n) ? [i.x, i.y] = [n, r] : [i.x, i.y] = [r, n], i;
2416
+ }, ia = /* @__PURE__ */ r({
2417
+ INFINITY: () => sa,
2418
+ NAN: () => ca,
2419
+ ONE: () => oa,
2331
2420
  ZERO: () => R,
2332
- average: () => da,
2333
- calculateMiters: () => fa,
2334
- clientXyZ: () => fn,
2421
+ average: () => Ea,
2422
+ calculateMiters: () => Da,
2423
+ clientXYZ: () => Dn,
2335
2424
  construct: () => L,
2336
- couple: () => aa,
2337
- crudeZ: () => Wi,
2338
- css: () => oa,
2339
- distance: () => ta,
2340
- equals: () => Ji,
2341
- isFinite: () => ia,
2342
- isNan: () => ra,
2343
- isZero: () => Yi,
2344
- normal: () => la,
2345
- normalize: () => ua,
2346
- reciprocal: () => ha,
2347
- rotate: () => ga,
2348
- round: () => ma,
2349
- scale: () => Xi,
2350
- set: () => ea,
2351
- sub: () => ca,
2352
- swap: () => pa,
2353
- translate: () => $i,
2354
- translateX: () => Zi,
2355
- translateY: () => Qi,
2356
- translation: () => na,
2357
- truncate: () => sa,
2358
- xyZ: () => I
2359
- }), Wi = t.union([
2425
+ couple: () => ba,
2426
+ crudeZ: () => aa,
2427
+ css: () => xa,
2428
+ distance: () => ga,
2429
+ equals: () => la,
2430
+ isFinite: () => ya,
2431
+ isNan: () => va,
2432
+ isZero: () => ua,
2433
+ normal: () => wa,
2434
+ normalize: () => Ta,
2435
+ reciprocal: () => Aa,
2436
+ rotate: () => ja,
2437
+ round: () => ka,
2438
+ scale: () => da,
2439
+ set: () => ha,
2440
+ sub: () => Ca,
2441
+ swap: () => Oa,
2442
+ translate: () => ma,
2443
+ translateX: () => fa,
2444
+ translateY: () => pa,
2445
+ translation: () => _a,
2446
+ truncate: () => Sa,
2447
+ xyZ: () => T
2448
+ }), aa = t.union([
2360
2449
  t.number(),
2361
- I,
2362
- Jt,
2363
- pn,
2364
- mn,
2365
- fn
2450
+ T,
2451
+ jn,
2452
+ Tn,
2453
+ En,
2454
+ Dn
2366
2455
  ]), L = (e, t) => {
2367
2456
  if (typeof e == "string") {
2368
2457
  if (t === void 0) throw Error("The y coordinate must be given.");
@@ -2396,40 +2485,40 @@ var wt = (e, t, n = {}) => {
2396
2485
  }, R = Object.freeze({
2397
2486
  x: 0,
2398
2487
  y: 0
2399
- }), Gi = Object.freeze({
2488
+ }), oa = Object.freeze({
2400
2489
  x: 1,
2401
2490
  y: 1
2402
- }), Ki = Object.freeze({
2491
+ }), sa = Object.freeze({
2403
2492
  x: Infinity,
2404
2493
  y: Infinity
2405
- }), qi = Object.freeze({
2494
+ }), ca = Object.freeze({
2406
2495
  x: NaN,
2407
2496
  y: NaN
2408
- }), Ji = (e, t, n = 0) => {
2497
+ }), la = (e, t, n = 0) => {
2409
2498
  let r = L(e), i = L(t);
2410
2499
  return n === 0 ? r.x === i.x && r.y === i.y : Math.abs(r.x - i.x) <= n && Math.abs(r.y - i.y) <= n;
2411
- }, Yi = (e) => Ji(e, R), Xi = (e, t, n) => {
2500
+ }, ua = (e) => la(e, R), da = (e, t, n) => {
2412
2501
  let r = L(e), i = L(t, n);
2413
2502
  return {
2414
2503
  x: r.x * i.x,
2415
2504
  y: r.y * i.y
2416
2505
  };
2417
- }, Zi = (e, t) => {
2506
+ }, fa = (e, t) => {
2418
2507
  let n = L(e);
2419
2508
  return {
2420
2509
  x: n.x + t,
2421
2510
  y: n.y
2422
2511
  };
2423
- }, Qi = (e, t) => {
2512
+ }, pa = (e, t) => {
2424
2513
  let n = L(e);
2425
2514
  return {
2426
2515
  x: n.x,
2427
2516
  y: n.y + t
2428
2517
  };
2429
- }, $i = (e, t, n, ...r) => {
2518
+ }, ma = (e, t, n, ...r) => {
2430
2519
  if (typeof t == "string") {
2431
2520
  if (typeof n != "number") throw Error("The value must be a number.");
2432
- return t === "x" ? Zi(e, n) : Qi(e, n);
2521
+ return t === "x" ? fa(e, n) : pa(e, n);
2433
2522
  }
2434
2523
  if (typeof t == "object" && "x" in t && typeof t.x == "string") {
2435
2524
  let r = L(n), i = L(e);
@@ -2450,52 +2539,52 @@ var wt = (e, t, n = {}) => {
2450
2539
  y: e.y + n.y
2451
2540
  };
2452
2541
  }, R);
2453
- }, ea = (e, t, n) => {
2542
+ }, ha = (e, t, n) => {
2454
2543
  let r = L(e);
2455
- return N(t) === "x" ? {
2544
+ return F(t) === "x" ? {
2456
2545
  x: n,
2457
2546
  y: r.y
2458
2547
  } : {
2459
2548
  x: r.x,
2460
2549
  y: n
2461
2550
  };
2462
- }, ta = (e, t) => {
2551
+ }, ga = (e, t) => {
2463
2552
  let n = L(e), r = L(t);
2464
2553
  return Math.sqrt((n.x - r.x) ** 2 + (n.y - r.y) ** 2);
2465
- }, na = (e, t) => {
2554
+ }, _a = (e, t) => {
2466
2555
  let n = L(e), r = L(t);
2467
2556
  return {
2468
2557
  x: r.x - n.x,
2469
2558
  y: r.y - n.y
2470
2559
  };
2471
- }, ra = (e) => {
2560
+ }, va = (e) => {
2472
2561
  let t = L(e);
2473
2562
  return Number.isNaN(t.x) || Number.isNaN(t.y);
2474
- }, ia = (e) => {
2563
+ }, ya = (e) => {
2475
2564
  let t = L(e);
2476
2565
  return Number.isFinite(t.x) && Number.isFinite(t.y);
2477
- }, aa = (e) => {
2566
+ }, ba = (e) => {
2478
2567
  let t = L(e);
2479
2568
  return [t.x, t.y];
2480
- }, oa = (e) => {
2569
+ }, xa = (e) => {
2481
2570
  let t = L(e);
2482
2571
  return {
2483
2572
  left: t.x,
2484
2573
  top: t.y
2485
2574
  };
2486
- }, sa = (e, t = 0) => {
2575
+ }, Sa = (e, t = 0) => {
2487
2576
  let n = L(e);
2488
2577
  return {
2489
2578
  x: Number(n.x.toFixed(t)),
2490
2579
  y: Number(n.y.toFixed(t))
2491
2580
  };
2492
- }, ca = (e, t) => {
2581
+ }, Ca = (e, t) => {
2493
2582
  let n = L(e), r = L(t);
2494
2583
  return {
2495
2584
  x: n.x - r.x,
2496
2585
  y: n.y - r.y
2497
2586
  };
2498
- }, la = (e) => {
2587
+ }, wa = (e) => {
2499
2588
  let t = L(e), n = Math.hypot(t.x, t.y);
2500
2589
  return n === 0 ? {
2501
2590
  x: 0,
@@ -2504,7 +2593,7 @@ var wt = (e, t, n = {}) => {
2504
2593
  x: -t.y / n,
2505
2594
  y: t.x / n
2506
2595
  };
2507
- }, ua = (e) => {
2596
+ }, Ta = (e) => {
2508
2597
  let t = L(e), n = Math.hypot(t.x, t.y);
2509
2598
  return n === 0 ? {
2510
2599
  x: 0,
@@ -2513,123 +2602,123 @@ var wt = (e, t, n = {}) => {
2513
2602
  x: t.x / n,
2514
2603
  y: t.y / n
2515
2604
  };
2516
- }, da = (...e) => Xi(e.reduce((e, t) => $i(e, t), R), 1 / e.length), fa = (e, t) => {
2605
+ }, Ea = (...e) => da(e.reduce((e, t) => ma(e, t), R), 1 / e.length), Da = (e, t) => {
2517
2606
  let n = [];
2518
2607
  for (let r = 0; r < e.length; r++) {
2519
2608
  let i = e[r], a, o, s, c;
2520
2609
  if (r === 0) {
2521
2610
  let n = e[r + 1];
2522
- o = la(ca(n, i)), s = o, c = t;
2611
+ o = wa(Ca(n, i)), s = o, c = t;
2523
2612
  } else if (r === e.length - 1) {
2524
2613
  let n = e[r - 1];
2525
- a = la(ca(i, n)), s = a, c = t;
2614
+ a = wa(Ca(i, n)), s = a, c = t;
2526
2615
  } else {
2527
- let n = e[r - 1], l = e[r + 1], u = ca(i, n), d = ca(l, i);
2528
- a = la(u), o = la(d);
2616
+ let n = e[r - 1], l = e[r + 1], u = Ca(i, n), d = Ca(l, i);
2617
+ a = wa(u), o = wa(d);
2529
2618
  let f = Math.acos((u.x * d.x + u.y * d.y) / (Math.hypot(u.x, u.y) * Math.hypot(d.x, d.y))), p = Math.sin(f / 2);
2530
- c = p === 0 ? t : t / p, s = ua(da(a, o));
2619
+ c = p === 0 ? t : t / p, s = Ta(Ea(a, o));
2531
2620
  }
2532
- n.push(Xi(s, c));
2621
+ n.push(da(s, c));
2533
2622
  }
2534
2623
  return n;
2535
- }, pa = (e) => {
2624
+ }, Oa = (e) => {
2536
2625
  let t = L(e);
2537
2626
  return {
2538
2627
  x: t.y,
2539
2628
  y: t.x
2540
2629
  };
2541
- }, ma = (e) => {
2630
+ }, ka = (e) => {
2542
2631
  let t = L(e);
2543
2632
  return {
2544
2633
  x: Math.round(t.x),
2545
2634
  y: Math.round(t.y)
2546
2635
  };
2547
- }, ha = (e) => {
2636
+ }, Aa = (e) => {
2548
2637
  let t = L(e);
2549
2638
  return {
2550
2639
  x: 1 / t.x,
2551
2640
  y: 1 / t.y
2552
2641
  };
2553
- }, ga = (e, t, n) => {
2642
+ }, ja = (e, t, n) => {
2554
2643
  let r = L(e), i = L(t), a = n === "clockwise" ? Math.PI / 2 : -Math.PI / 2, o = r.x - i.x, s = r.y - i.y, c = o * Math.cos(a) - s * Math.sin(a), l = o * Math.sin(a) + s * Math.cos(a);
2555
2644
  return {
2556
2645
  x: c + i.x,
2557
2646
  y: l + i.y
2558
2647
  };
2559
- }, _a = /* @__PURE__ */ r({
2560
- DECIMAL: () => Ca,
2561
- ZERO: () => Sa,
2562
- area: () => no,
2563
- areaIsZero: () => Ma,
2564
- aspect: () => $a,
2648
+ }, Ma = /* @__PURE__ */ r({
2649
+ DECIMAL: () => Ra,
2650
+ ZERO: () => La,
2651
+ area: () => vo,
2652
+ areaIsZero: () => qa,
2653
+ aspect: () => ho,
2565
2654
  bottom: () => G,
2566
- bottomCenter: () => za,
2567
- bottomLeft: () => Ra,
2568
- bottomRight: () => Ba,
2569
- box: () => xa,
2570
- center: () => Ua,
2571
- centerLeft: () => Va,
2572
- centerRight: () => Ha,
2655
+ bottomCenter: () => eo,
2656
+ bottomLeft: () => $a,
2657
+ bottomRight: () => to,
2658
+ box: () => Ia,
2659
+ center: () => io,
2660
+ centerLeft: () => no,
2661
+ centerRight: () => ro,
2573
2662
  construct: () => z,
2574
- constructWithAlternateRoot: () => io,
2575
- contains: () => Ea,
2576
- copy: () => wa,
2577
- css: () => Aa,
2578
- cssBox: () => ya,
2579
- dim: () => ja,
2580
- dims: () => Oa,
2581
- domRect: () => ba,
2582
- edgePoints: () => Xa,
2583
- equals: () => Da,
2663
+ constructWithAlternateRoot: () => bo,
2664
+ contains: () => Va,
2665
+ copy: () => za,
2666
+ css: () => Ga,
2667
+ cssBox: () => Pa,
2668
+ dim: () => Ka,
2669
+ dims: () => Ua,
2670
+ domRect: () => Fa,
2671
+ edgePoints: () => fo,
2672
+ equals: () => Ha,
2584
2673
  height: () => U,
2585
- intersection: () => to,
2586
- isBox: () => Qa,
2674
+ intersection: () => _o,
2675
+ isBox: () => mo,
2587
2676
  left: () => K,
2588
2677
  loc: () => V,
2589
- positionInCenter: () => Za,
2590
- reRoot: () => Ya,
2591
- resize: () => Ta,
2678
+ positionInCenter: () => po,
2679
+ reRoot: () => uo,
2680
+ resize: () => Ba,
2592
2681
  right: () => W,
2593
- root: () => Ka,
2594
- round: () => ao,
2595
- signedDims: () => ka,
2596
- signedHeight: () => Pa,
2597
- signedWidth: () => Na,
2682
+ root: () => so,
2683
+ round: () => xo,
2684
+ signedDims: () => Wa,
2685
+ signedHeight: () => Ya,
2686
+ signedWidth: () => Ja,
2598
2687
  top: () => q,
2599
- topCenter: () => Ia,
2600
- topLeft: () => Fa,
2601
- topRight: () => La,
2602
- translate: () => eo,
2603
- truncate: () => ro,
2688
+ topCenter: () => Za,
2689
+ topLeft: () => Xa,
2690
+ topRight: () => Qa,
2691
+ translate: () => go,
2692
+ truncate: () => yo,
2604
2693
  width: () => H,
2605
- x: () => Wa,
2606
- xBounds: () => qa,
2694
+ x: () => ao,
2695
+ xBounds: () => co,
2607
2696
  xyLoc: () => B,
2608
- y: () => Ga,
2609
- yBounds: () => Ja
2610
- }), va = t.union([t.number(), t.string()]), ya = t.object({
2611
- top: va,
2612
- left: va,
2613
- width: va,
2614
- height: va
2615
- }), ba = t.object({
2697
+ y: () => oo,
2698
+ yBounds: () => lo
2699
+ }), Na = t.union([t.number(), t.string()]), Pa = t.object({
2700
+ top: Na,
2701
+ left: Na,
2702
+ width: Na,
2703
+ height: Na
2704
+ }), Fa = t.object({
2616
2705
  left: t.number(),
2617
2706
  top: t.number(),
2618
2707
  right: t.number(),
2619
2708
  bottom: t.number()
2620
- }), xa = t.object({
2621
- one: I,
2622
- two: I,
2623
- root: wi
2624
- }), Sa = {
2709
+ }), Ia = t.object({
2710
+ one: T,
2711
+ two: T,
2712
+ root: Ni
2713
+ }), La = {
2625
2714
  one: R,
2626
2715
  two: R,
2627
- root: F
2628
- }, Ca = {
2716
+ root: Vi
2717
+ }, Ra = {
2629
2718
  one: R,
2630
- two: Gi,
2631
- root: Ei
2632
- }, wa = (e, t) => ({
2719
+ two: oa,
2720
+ root: Ui
2721
+ }, za = (e, t) => ({
2633
2722
  one: e.one,
2634
2723
  two: e.two,
2635
2724
  root: t ?? e.root
@@ -2637,7 +2726,7 @@ var wt = (e, t, n = {}) => {
2637
2726
  let a = {
2638
2727
  one: { ...R },
2639
2728
  two: { ...R },
2640
- root: i ?? F
2729
+ root: i ?? Vi
2641
2730
  };
2642
2731
  if (typeof e == "number") {
2643
2732
  if (typeof t != "number") throw Error("Box constructor called with invalid arguments");
@@ -2671,101 +2760,101 @@ var wt = (e, t, n = {}) => {
2671
2760
  x: a.one.x + t.signedWidth,
2672
2761
  y: a.one.y + t.signedHeight
2673
2762
  } : a.two = t, a));
2674
- }, Ta = (e, t, n) => {
2763
+ }, Ba = (e, t, n) => {
2675
2764
  let r = z(e);
2676
2765
  if (typeof t == "string") {
2677
2766
  if (n == null) throw Error("Invalid arguments for resize");
2678
- let e = N(t);
2767
+ let e = F(t);
2679
2768
  return z(r.one, void 0, e === "x" ? n : H(r), e === "y" ? n : U(r), r.root);
2680
2769
  }
2681
2770
  return z(r.one, t, void 0, void 0, r.root);
2682
- }, Ea = (e, t, n = !0) => {
2771
+ }, Va = (e, t, n = !0) => {
2683
2772
  let r = z(e), i = (e, t) => e < t;
2684
2773
  return n && (i = (e, t) => e <= t), "one" in t ? i(K(r), K(t)) && i(W(t), W(r)) && i(q(r), q(t)) && i(G(t), G(r)) : i(K(r), t.x) && i(t.x, W(r)) && i(q(r), t.y) && i(t.y, G(r));
2685
- }, Da = (e, t) => Ji(e.one, t.one) && Ji(e.two, t.two) && Pi(e.root, t.root), Oa = (e) => ({
2774
+ }, Ha = (e, t) => la(e.one, t.one) && la(e.two, t.two) && Zi(e.root, t.root), Ua = (e) => ({
2686
2775
  width: H(e),
2687
2776
  height: U(e)
2688
- }), ka = (e) => ({
2689
- signedWidth: Na(e),
2690
- signedHeight: Pa(e)
2691
- }), Aa = (e) => ({
2777
+ }), Wa = (e) => ({
2778
+ signedWidth: Ja(e),
2779
+ signedHeight: Ya(e)
2780
+ }), Ga = (e) => ({
2692
2781
  top: q(e),
2693
2782
  left: K(e),
2694
2783
  width: H(e),
2695
2784
  height: U(e)
2696
- }), ja = (e, t, n = !1) => {
2697
- let r = N(t) === "y" ? Pa(e) : Na(e);
2785
+ }), Ka = (e, t, n = !1) => {
2786
+ let r = F(t) === "y" ? Ya(e) : Ja(e);
2698
2787
  return n ? r : Math.abs(r);
2699
2788
  }, B = (e, t) => {
2700
2789
  let n = z(e);
2701
2790
  return {
2702
- x: t.x === "center" ? Ua(n).x : V(n, t.x),
2703
- y: t.y === "center" ? Ua(n).y : V(n, t.y)
2791
+ x: t.x === "center" ? io(n).x : V(n, t.x),
2792
+ y: t.y === "center" ? io(n).y : V(n, t.y)
2704
2793
  };
2705
2794
  }, V = (e, t) => {
2706
- let n = z(e), r = Ii(n.root).includes(t) ? Math.min : Math.max;
2707
- return $t.includes(t) ? r(n.one.x, n.two.x) : r(n.one.y, n.two.y);
2708
- }, Ma = (e) => no(e) === 0, H = (e) => ja(e, "x"), U = (e) => ja(e, "y"), Na = (e) => {
2795
+ let n = z(e), r = $i(n.root).includes(t) ? Math.min : Math.max;
2796
+ return Qt.includes(t) ? r(n.one.x, n.two.x) : r(n.one.y, n.two.y);
2797
+ }, qa = (e) => vo(e) === 0, H = (e) => Ka(e, "x"), U = (e) => Ka(e, "y"), Ja = (e) => {
2709
2798
  let t = z(e);
2710
2799
  return t.two.x - t.one.x;
2711
- }, Pa = (e) => {
2800
+ }, Ya = (e) => {
2712
2801
  let t = z(e);
2713
2802
  return t.two.y - t.one.y;
2714
- }, Fa = (e) => B(e, F), Ia = (e) => B(e, ki), La = (e) => B(e, Ti), Ra = (e) => B(e, Ei), za = (e) => B(e, Ai), Ba = (e) => B(e, Di), Va = (e) => B(e, Mi), Ha = (e) => B(e, ji), W = (e) => V(e, "right"), G = (e) => V(e, "bottom"), K = (e) => V(e, "left"), q = (e) => V(e, "top"), Ua = (e) => $i(Fa(e), {
2715
- x: Na(e) / 2,
2716
- y: Pa(e) / 2
2717
- }), Wa = (e) => {
2803
+ }, Xa = (e) => B(e, Vi), Za = (e) => B(e, Ki), Qa = (e) => B(e, Hi), $a = (e) => B(e, Ui), eo = (e) => B(e, qi), to = (e) => B(e, Wi), no = (e) => B(e, Yi), ro = (e) => B(e, Ji), W = (e) => V(e, "right"), G = (e) => V(e, "bottom"), K = (e) => V(e, "left"), q = (e) => V(e, "top"), io = (e) => ma(Xa(e), {
2804
+ x: Ja(e) / 2,
2805
+ y: Ya(e) / 2
2806
+ }), ao = (e) => {
2718
2807
  let t = z(e);
2719
2808
  return t.root.x === "left" ? K(t) : W(t);
2720
- }, Ga = (e) => {
2809
+ }, oo = (e) => {
2721
2810
  let t = z(e);
2722
2811
  return t.root.y === "top" ? q(t) : G(t);
2723
- }, Ka = (e) => ({
2724
- x: Wa(e),
2725
- y: Ga(e)
2726
- }), qa = (e) => {
2812
+ }, so = (e) => ({
2813
+ x: ao(e),
2814
+ y: oo(e)
2815
+ }), co = (e) => {
2727
2816
  let t = z(e);
2728
2817
  return {
2729
2818
  lower: t.one.x,
2730
2819
  upper: t.two.x
2731
2820
  };
2732
- }, Ja = (e) => {
2821
+ }, lo = (e) => {
2733
2822
  let t = z(e);
2734
2823
  return {
2735
2824
  lower: t.one.y,
2736
2825
  upper: t.two.y
2737
2826
  };
2738
- }, Ya = (e, t) => wa(e, t), Xa = (e, t) => {
2739
- let n = z(e), r = $t.includes(t) ? "x" : tn.includes(t) ? "y" : null;
2827
+ }, uo = (e, t) => za(e, t), fo = (e, t) => {
2828
+ let n = z(e), r = Qt.includes(t) ? "x" : en.includes(t) ? "y" : null;
2740
2829
  if (r === null) throw Error(`Invalid location: ${t}`);
2741
2830
  let i = t === "top" || t === "left" ? Math.min : Math.max, a = { ...n.one }, o = { ...n.two };
2742
2831
  return a[r] = i(n.one[r], n.two[r]), o[r] = i(n.one[r], n.two[r]), [a, o];
2743
- }, Za = (e, t) => {
2832
+ }, po = (e, t) => {
2744
2833
  let n = z(e), r = z(t);
2745
2834
  return z({
2746
- x: Wa(r) + (H(r) - H(n)) / 2,
2747
- y: Ga(r) + (U(r) - U(n)) / 2
2748
- }, Oa(n));
2749
- }, Qa = (e) => typeof e != "object" || !e ? !1 : "one" in e && "two" in e && "root" in e, $a = (e) => H(e) / U(e), eo = (e, t, n) => {
2835
+ x: ao(r) + (H(r) - H(n)) / 2,
2836
+ y: oo(r) + (U(r) - U(n)) / 2
2837
+ }, Ua(n));
2838
+ }, mo = (e) => typeof e != "object" || !e ? !1 : "one" in e && "two" in e && "root" in e, ho = (e) => H(e) / U(e), go = (e, t, n) => {
2750
2839
  if (typeof t == "string") {
2751
2840
  if (n == null) throw Error("Undefined amount passed into box.translate");
2752
- t = L(N(t), n);
2841
+ t = L(F(t), n);
2753
2842
  }
2754
2843
  let r = z(e);
2755
- return z($i(r.one, t), $i(r.two, t), void 0, void 0, r.root);
2756
- }, to = (e, t) => {
2844
+ return z(ma(r.one, t), ma(r.two, t), void 0, void 0, r.root);
2845
+ }, _o = (e, t) => {
2757
2846
  let n = Math.max(K(e), K(t)), r = Math.max(q(e), q(t)), i = Math.min(W(e), W(t)), a = Math.min(G(e), G(t));
2758
- return n > i || r > a ? Sa : z({
2847
+ return n > i || r > a ? La : z({
2759
2848
  x: n,
2760
2849
  y: r
2761
2850
  }, {
2762
2851
  x: i,
2763
2852
  y: a
2764
2853
  }, void 0, void 0, e.root);
2765
- }, no = (e) => H(e) * U(e), ro = (e, t) => {
2854
+ }, vo = (e) => H(e) * U(e), yo = (e, t) => {
2766
2855
  let n = z(e);
2767
- return z(sa(n.one, t), sa(n.two, t), void 0, void 0, n.root);
2768
- }, io = (e, t, n, r, i, a) => {
2856
+ return z(Sa(n.one, t), Sa(n.two, t), void 0, void 0, n.root);
2857
+ }, bo = (e, t, n, r, i, a) => {
2769
2858
  let o = {
2770
2859
  x: e,
2771
2860
  y: t
@@ -2774,32 +2863,32 @@ var wt = (e, t, n = {}) => {
2774
2863
  y: t + r
2775
2864
  };
2776
2865
  return i.x !== a.x && (i.x === "center" ? (o.x -= n / 2, s.x -= n / 2) : (o.x -= n, s.x -= n)), i.y !== a.y && (i.y === "center" ? (o.y -= r / 2, s.y -= r / 2) : (o.y -= r, s.y -= r)), z(o, s, void 0, void 0, a);
2777
- }, ao = (e) => {
2866
+ }, xo = (e) => {
2778
2867
  let t = z(e);
2779
- return z(ma(t.one), ma(t.two), void 0, void 0, t.root);
2780
- }, oo = /* @__PURE__ */ r({
2781
- DECIMAL: () => lo,
2782
- ZERO: () => co,
2868
+ return z(ka(t.one), ka(t.two), void 0, void 0, t.root);
2869
+ }, So = /* @__PURE__ */ r({
2870
+ DECIMAL: () => To,
2871
+ ZERO: () => wo,
2783
2872
  construct: () => J,
2784
- couple: () => mo,
2785
- crude: () => so,
2786
- dimensionsZ: () => pn,
2787
- equals: () => uo,
2788
- max: () => ho,
2789
- min: () => go,
2790
- scale: () => _o,
2791
- signedDimensionsZ: () => mn,
2792
- svgViewBox: () => po,
2793
- swap: () => fo
2794
- }), so = t.union([
2795
- pn,
2796
- mn,
2797
- I,
2798
- Jt
2799
- ]), co = {
2873
+ couple: () => ko,
2874
+ crude: () => Co,
2875
+ dimensionsZ: () => Tn,
2876
+ equals: () => Eo,
2877
+ max: () => Ao,
2878
+ min: () => jo,
2879
+ scale: () => Mo,
2880
+ signedDimensionsZ: () => En,
2881
+ svgViewBox: () => Oo,
2882
+ swap: () => Do
2883
+ }), Co = t.union([
2884
+ Tn,
2885
+ En,
2886
+ T,
2887
+ jn
2888
+ ]), wo = {
2800
2889
  width: 0,
2801
2890
  height: 0
2802
- }, lo = {
2891
+ }, To = {
2803
2892
  width: 1,
2804
2893
  height: 1
2805
2894
  }, J = (e, t) => typeof e == "number" ? {
@@ -2814,58 +2903,58 @@ var wt = (e, t, n = {}) => {
2814
2903
  } : "signedWidth" in e ? {
2815
2904
  width: e.signedWidth,
2816
2905
  height: e.signedHeight
2817
- } : { ...e }, uo = (e, t) => {
2906
+ } : { ...e }, Eo = (e, t) => {
2818
2907
  if (t == null) return !1;
2819
2908
  let n = J(e), r = J(t);
2820
2909
  return n.width === r.width && n.height === r.height;
2821
- }, fo = (e) => {
2910
+ }, Do = (e) => {
2822
2911
  let t = J(e);
2823
2912
  return {
2824
2913
  width: t.height,
2825
2914
  height: t.width
2826
2915
  };
2827
- }, po = (e) => {
2916
+ }, Oo = (e) => {
2828
2917
  let t = J(e);
2829
2918
  return `0 0 ${t.width} ${t.height}`;
2830
- }, mo = (e) => {
2919
+ }, ko = (e) => {
2831
2920
  let t = J(e);
2832
2921
  return [t.width, t.height];
2833
- }, ho = (e) => ({
2922
+ }, Ao = (e) => ({
2834
2923
  width: Math.max(...e.map((e) => J(e).width)),
2835
2924
  height: Math.max(...e.map((e) => J(e).height))
2836
- }), go = (e) => ({
2925
+ }), jo = (e) => ({
2837
2926
  width: Math.min(...e.map((e) => J(e).width)),
2838
2927
  height: Math.min(...e.map((e) => J(e).height))
2839
- }), _o = (e, t) => {
2928
+ }), Mo = (e, t) => {
2840
2929
  let n = J(e);
2841
2930
  return {
2842
2931
  width: n.width * t,
2843
2932
  height: n.height * t
2844
2933
  };
2845
- }, vo = (e, t, n) => t !== void 0 && e < t ? t : n !== void 0 && e > n ? n : e, yo = /* @__PURE__ */ r({
2846
- Scale: () => Oo,
2847
- XY: () => ko,
2848
- crudeXYTransform: () => bo,
2849
- transform: () => xo
2850
- }), bo = t.object({
2851
- offset: Wi,
2852
- scale: Wi
2853
- }), xo = t.object({
2934
+ }, No = (e, t, n) => t !== void 0 && e < t ? t : n !== void 0 && e > n ? n : e, Po = /* @__PURE__ */ r({
2935
+ Scale: () => Uo,
2936
+ XY: () => Wo,
2937
+ crudeXYTransform: () => Fo,
2938
+ transform: () => Io
2939
+ }), Fo = t.object({
2940
+ offset: aa,
2941
+ scale: aa
2942
+ }), Io = t.object({
2854
2943
  offset: t.number(),
2855
2944
  scale: t.number()
2856
- }), So = (e) => (t, n, r, i) => n === "dimension" ? [t, r] : [t, i ? r - e : r + e], Co = (e) => (t, n, r, i) => [t, i ? r / e : r * e], wo = (e) => (t, n, r) => {
2945
+ }), Lo = (e) => (t, n, r, i) => n === "dimension" ? [t, r] : [t, i ? r - e : r + e], Ro = (e) => (t, n, r, i) => [t, i ? r / e : r * e], zo = (e) => (t, n, r) => {
2857
2946
  if (t === null) return [e, r];
2858
2947
  let { lower: i, upper: a } = t, { lower: o, upper: s } = e, c = a - i, l = s - o;
2859
2948
  return n === "dimension" ? [e, l / c * r] : [e, (r - i) * (l / c) + o];
2860
- }, To = (e) => (t, n, r) => [e, r], Eo = () => (e, t, n) => {
2949
+ }, Bo = (e) => (t, n, r) => [e, r], Vo = () => (e, t, n) => {
2861
2950
  if (e === null) throw Error("cannot invert without bounds");
2862
2951
  if (t === "dimension") return [e, n];
2863
2952
  let { lower: r, upper: i } = e;
2864
2953
  return [e, i - (n - r)];
2865
- }, Do = (e) => (t, n, r) => {
2954
+ }, Ho = (e) => (t, n, r) => {
2866
2955
  let { lower: i, upper: a } = e;
2867
- return r = vo(r, i, a), [t, r];
2868
- }, Oo = class e {
2956
+ return r = No(r, i, a), [t, r];
2957
+ }, Uo = class e {
2869
2958
  ops = [];
2870
2959
  currBounds = null;
2871
2960
  currType = null;
@@ -2883,27 +2972,27 @@ var wt = (e, t, n = {}) => {
2883
2972
  return new e().scale(t, n);
2884
2973
  }
2885
2974
  translate(e) {
2886
- let t = this.new(), n = So(e);
2975
+ let t = this.new(), n = Lo(e);
2887
2976
  return n.type = "translate", t.ops.push(n), t;
2888
2977
  }
2889
2978
  magnify(e) {
2890
- let t = this.new(), n = Co(e);
2979
+ let t = this.new(), n = Ro(e);
2891
2980
  return n.type = "magnify", t.ops.push(n), t;
2892
2981
  }
2893
2982
  scale(e, t) {
2894
- let n = w(e, t), r = this.new(), i = wo(n);
2983
+ let n = E(e, t), r = this.new(), i = zo(n);
2895
2984
  return i.type = "scale", r.ops.push(i), r;
2896
2985
  }
2897
2986
  clamp(e, t) {
2898
- let n = w(e, t), r = this.new(), i = Do(n);
2987
+ let n = E(e, t), r = this.new(), i = Ho(n);
2899
2988
  return i.type = "clamp", r.ops.push(i), r;
2900
2989
  }
2901
2990
  reBound(e, t) {
2902
- let n = w(e, t), r = this.new(), i = To(n);
2991
+ let n = E(e, t), r = this.new(), i = Bo(n);
2903
2992
  return i.type = "re-bound", r.ops.push(i), r;
2904
2993
  }
2905
2994
  invert() {
2906
- let e = Eo();
2995
+ let e = Vo();
2907
2996
  e.type = "invert";
2908
2997
  let t = this.new();
2909
2998
  return t.ops.push(e), t;
@@ -2941,11 +3030,11 @@ var wt = (e, t, n = {}) => {
2941
3030
  };
2942
3031
  }
2943
3032
  static IDENTITY = new e();
2944
- }, ko = class e {
3033
+ }, Wo = class e {
2945
3034
  x;
2946
3035
  y;
2947
3036
  currRoot;
2948
- constructor(e = new Oo(), t = new Oo(), n = null) {
3037
+ constructor(e = new Uo(), t = new Uo(), n = null) {
2949
3038
  this.x = e, this.y = t, this.currRoot = n;
2950
3039
  }
2951
3040
  static translate(t, n) {
@@ -2987,19 +3076,19 @@ var wt = (e, t, n = {}) => {
2987
3076
  }
2988
3077
  scale(e) {
2989
3078
  let t = this.copy();
2990
- if (Qa(e)) {
3079
+ if (mo(e)) {
2991
3080
  let n = this.currRoot;
2992
- return t.currRoot = e.root, n != null && !Pi(n, e.root) && (n.x !== e.root.x && (t.x = t.x.invert()), n.y !== e.root.y && (t.y = t.y.invert())), t.x = t.x.scale(qa(e)), t.y = t.y.scale(Ja(e)), t;
3081
+ return t.currRoot = e.root, n != null && !Zi(n, e.root) && (n.x !== e.root.x && (t.x = t.x.invert()), n.y !== e.root.y && (t.y = t.y.invert())), t.x = t.x.scale(co(e)), t.y = t.y.scale(lo(e)), t;
2993
3082
  }
2994
3083
  return t.x = t.x.scale(e.width), t.y = t.y.scale(e.height), t;
2995
3084
  }
2996
3085
  reBound(e) {
2997
3086
  let t = this.copy();
2998
- return t.x = this.x.reBound(qa(e)), t.y = this.y.reBound(Ja(e)), t;
3087
+ return t.x = this.x.reBound(co(e)), t.y = this.y.reBound(lo(e)), t;
2999
3088
  }
3000
3089
  clamp(e) {
3001
3090
  let t = this.copy();
3002
- return t.x = this.x.clamp(qa(e)), t.y = this.y.clamp(Ja(e)), t;
3091
+ return t.x = this.x.clamp(co(e)), t.y = this.y.clamp(lo(e)), t;
3003
3092
  }
3004
3093
  copy() {
3005
3094
  let t = new e();
@@ -3037,57 +3126,29 @@ var wt = (e, t, n = {}) => {
3037
3126
  };
3038
3127
  }
3039
3128
  static IDENTITY = new e();
3040
- }, Ao = /* @__PURE__ */ r({
3041
- ALIGNMENTS: () => cn,
3042
- CENTER_LOCATIONS: () => rn,
3043
- DIRECTIONS: () => Yt,
3044
- LOCATIONS: () => on,
3045
- ORDERS: () => un,
3046
- OUTER_LOCATIONS: () => Zt,
3047
- X_LOCATIONS: () => $t,
3048
- Y_LOCATIONS: () => tn,
3049
- alignmentZ: () => ln,
3050
- boundsZ: () => hn,
3051
- centerLocationZ: () => an,
3052
- clientXyZ: () => fn,
3053
- dimensionsZ: () => pn,
3054
- directionZ: () => Xt,
3055
- locationZ: () => sn,
3056
- orderZ: () => dn,
3057
- outerLocationZ: () => Qt,
3058
- signedDimensionsZ: () => mn,
3059
- xLocationZ: () => en,
3060
- xyZ: () => I,
3061
- yLocationZ: () => nn
3062
- }), jo = /* @__PURE__ */ r({
3063
- calculate: () => Io,
3064
- completeXY: () => Mo,
3065
- toCSS: () => Po,
3066
- toDecimal: () => Fo,
3067
- xy: () => No
3068
- }), Mo = I.extend({
3069
- root: wi,
3070
- units: e.object({
3071
- x: e.enum(["px", "decimal"]),
3072
- y: e.enum(["px", "decimal"])
3073
- })
3074
- }), No = Mo.partial({
3129
+ }, Go = /* @__PURE__ */ r({
3130
+ calculate: () => Xo,
3131
+ completeXYZ: () => qo,
3132
+ toCSS: () => Jo,
3133
+ toDecimal: () => Yo,
3134
+ xyZ: () => Ko
3135
+ }), Ko = An, qo = An.required({
3075
3136
  root: !0,
3076
3137
  units: !0
3077
- }), Po = (e) => {
3138
+ }), Jo = (e) => {
3078
3139
  let t = {};
3079
3140
  return t[e.root?.x ?? "left"] = e?.units?.x === "px" ? `${e.x}px` : `${e.x * 100}%`, t[e.root?.y ?? "top"] = e?.units?.y === "px" ? `${e.y}px` : `${e.y * 100}%`, t;
3080
- }, Fo = ({ position: e, element: t, container: n }) => {
3141
+ }, Yo = ({ position: e, element: t, container: n }) => {
3081
3142
  let r = {
3082
3143
  x: e.x,
3083
3144
  y: e.y
3084
3145
  };
3085
3146
  return e.units?.x === "decimal" ? e.root?.x === "right" && (r.x = 1 - e.x) : e.root?.x === "right" ? r.x = 1 - (e.x + H(t)) / H(n) : r.x /= H(n), e.units?.y === "decimal" ? e.root?.y === "bottom" && (r.y = 1 - e.y) : e.root?.y === "bottom" ? r.y = 1 - (e.y + U(t)) / U(n) : r.y /= U(n), r;
3086
- }, Io = ({ position: e, element: t, container: n, lowerThreshold: r = .2, upperThreshold: i = .8 }) => {
3147
+ }, Xo = ({ position: e, element: t, container: n, lowerThreshold: r = .2, upperThreshold: i = .8 }) => {
3087
3148
  let a = {
3088
3149
  x: e.x,
3089
3150
  y: e.y,
3090
- root: { ...F },
3151
+ root: { ...Vi },
3091
3152
  units: {
3092
3153
  x: "px",
3093
3154
  y: "px"
@@ -3095,76 +3156,79 @@ var wt = (e, t, n = {}) => {
3095
3156
  };
3096
3157
  return e.x > i ? (a.x = (1 - e.x) * H(n) - H(t), a.root.x = "right") : e.x < r ? a.x = e.x * H(n) : a.units.x = "decimal", e.y > i ? (a.y = (1 - e.y) * U(n) - U(t), a.root.y = "bottom") : e.y < r ? a.y = e.y * U(n) : a.units.y = "decimal", a.x = Math.round(a.x * 100) / 100, {
3097
3158
  ...a,
3098
- ...sa(a, 3)
3159
+ ...Sa(a, 3)
3099
3160
  };
3100
- }, Lo = t.enum(["static", "dynamic"]), Ro = "00000000-0000-0000-0000-000000000000", zo = /^(?:[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;
3161
+ }, Zo = t.enum(["static", "dynamic"]), Qo = "00000000-0000-0000-0000-000000000000", $o = /^(?:[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;
3101
3162
  //#endregion
3102
- //#region ../../node_modules/.pnpm/uuid@13.0.0/node_modules/uuid/dist/validate.js
3103
- function Bo(e) {
3104
- return typeof e == "string" && zo.test(e);
3163
+ //#region ../../node_modules/.pnpm/uuid@14.0.0/node_modules/uuid/dist/validate.js
3164
+ function es(e) {
3165
+ return typeof e == "string" && $o.test(e);
3105
3166
  }
3106
3167
  //#endregion
3107
- //#region ../../node_modules/.pnpm/uuid@13.0.0/node_modules/uuid/dist/stringify.js
3168
+ //#region ../../node_modules/.pnpm/uuid@14.0.0/node_modules/uuid/dist/stringify.js
3108
3169
  var Y = [];
3109
3170
  for (let e = 0; e < 256; ++e) Y.push((e + 256).toString(16).slice(1));
3110
- function Vo(e, t = 0) {
3171
+ function ts(e, t = 0) {
3111
3172
  return (Y[e[t + 0]] + Y[e[t + 1]] + Y[e[t + 2]] + Y[e[t + 3]] + "-" + Y[e[t + 4]] + Y[e[t + 5]] + "-" + Y[e[t + 6]] + Y[e[t + 7]] + "-" + Y[e[t + 8]] + Y[e[t + 9]] + "-" + Y[e[t + 10]] + Y[e[t + 11]] + Y[e[t + 12]] + Y[e[t + 13]] + Y[e[t + 14]] + Y[e[t + 15]]).toLowerCase();
3112
3173
  }
3113
- function Ho(e, t = 0) {
3114
- let n = Vo(e, t);
3115
- if (!Bo(n)) throw TypeError("Stringified UUID is invalid");
3174
+ function ns(e, t = 0) {
3175
+ let n = ts(e, t);
3176
+ if (!es(n)) throw TypeError("Stringified UUID is invalid");
3116
3177
  return n;
3117
3178
  }
3118
3179
  //#endregion
3119
- //#region ../../node_modules/.pnpm/uuid@13.0.0/node_modules/uuid/dist/rng.js
3120
- var Uo, Wo = new Uint8Array(16);
3121
- function Go() {
3122
- if (!Uo) {
3123
- if (typeof crypto > "u" || !crypto.getRandomValues) throw Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
3124
- Uo = crypto.getRandomValues.bind(crypto);
3125
- }
3126
- return Uo(Wo);
3180
+ //#region ../../node_modules/.pnpm/uuid@14.0.0/node_modules/uuid/dist/rng.js
3181
+ var rs = new Uint8Array(16);
3182
+ function is() {
3183
+ return crypto.getRandomValues(rs);
3127
3184
  }
3128
- var Ko = { randomUUID: typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto) };
3129
3185
  //#endregion
3130
- //#region ../../node_modules/.pnpm/uuid@13.0.0/node_modules/uuid/dist/v4.js
3131
- function qo(e, t, n) {
3186
+ //#region ../../node_modules/.pnpm/uuid@14.0.0/node_modules/uuid/dist/v4.js
3187
+ function as(e, t, n) {
3188
+ return !t && !e && crypto.randomUUID ? crypto.randomUUID() : os(e, t, n);
3189
+ }
3190
+ function os(e, t, n) {
3132
3191
  e ||= {};
3133
- let r = e.random ?? e.rng?.() ?? Go();
3192
+ let r = e.random ?? e.rng?.() ?? is();
3134
3193
  if (r.length < 16) throw Error("Random bytes length must be >= 16");
3135
3194
  if (r[6] = r[6] & 15 | 64, r[8] = r[8] & 63 | 128, t) {
3136
3195
  if (n ||= 0, n < 0 || n + 16 > t.length) throw RangeError(`UUID byte range ${n}:${n + 15} is out of buffer bounds`);
3137
3196
  for (let e = 0; e < 16; ++e) t[n + e] = r[e];
3138
3197
  return t;
3139
3198
  }
3140
- return Vo(r);
3141
- }
3142
- function Jo(e, t, n) {
3143
- return Ko.randomUUID && !t && !e ? Ko.randomUUID() : qo(e, t, n);
3199
+ return ts(r);
3144
3200
  }
3145
3201
  //#endregion
3146
3202
  //#region src/uuid/uuid.ts
3147
- var Yo = /* @__PURE__ */ r({
3148
- ZERO: () => Qo,
3149
- create: () => Xo,
3150
- parse: () => Zo
3151
- }), Xo = () => Jo(), Zo = (e, t) => Ho(e, t), Qo = Ro, X = -1, $o = {
3152
- [Symbol.iterator]: () => $o,
3203
+ var ss = /* @__PURE__ */ r({
3204
+ ZERO: () => us,
3205
+ create: () => cs,
3206
+ parse: () => ls
3207
+ }), cs = () => as(), ls = (e, t) => ns(e, t), us = Qo, ds = (e) => {
3208
+ let t = Math.fround(e);
3209
+ if (!Number.isFinite(t)) return t.toString();
3210
+ for (let e = 1; e <= 9; e++) {
3211
+ let n = parseFloat(t.toPrecision(e));
3212
+ if (Math.fround(n) === t) return n.toString();
3213
+ }
3214
+ return t.toString();
3215
+ }, X = -1, fs = {
3216
+ [Symbol.iterator]: () => fs,
3153
3217
  next: () => ({
3154
3218
  done: !0,
3155
3219
  value: void 0
3156
3220
  })
3157
- }, es = t.string().transform((e) => new Uint8Array(atob(e).split("").map((e) => e.charCodeAt(0))).buffer), ts = t.union([t.null(), t.undefined()]).transform(() => new Uint8Array().buffer), Z = 4, ns = (e, t) => {
3221
+ }, ps = t.string().transform((e) => new Uint8Array(atob(e).split("").map((e) => e.charCodeAt(0))).buffer), ms = t.union([t.null(), t.undefined()]).transform(() => new Uint8Array().buffer), Z = 4, hs = (e, t) => {
3158
3222
  if (e === "number" && !t.isNumeric) throw Error(`cannot convert series of type ${t.toString()} to number`);
3159
3223
  if (e === "bigint" && !t.usesBigInt) throw Error(`cannot convert series of type ${t.toString()} to bigint`);
3160
- }, rs = "sy_x_telem_series", is = class e {
3224
+ }, gs = "sy_x_telem_series", _s = class e {
3161
3225
  key;
3162
- discriminator = rs;
3226
+ discriminator = gs;
3163
3227
  dataType;
3164
3228
  sampleOffset;
3165
3229
  gl;
3166
3230
  _data;
3167
- timeRange = A.ZERO;
3231
+ timeRange = M.ZERO;
3168
3232
  alignment = 0n;
3169
3233
  alignmentMultiple = 1n;
3170
3234
  cachedMin;
@@ -3174,28 +3238,28 @@ var Yo = /* @__PURE__ */ r({
3174
3238
  cachedLength;
3175
3239
  _cachedIndexes;
3176
3240
  static crudeZ = t.object({
3177
- timeRange: A.z.optional(),
3178
- dataType: j.z,
3241
+ timeRange: M.z.optional(),
3242
+ dataType: N.z,
3179
3243
  alignment: t.coerce.bigint().optional(),
3180
3244
  data: t.union([
3181
- es,
3182
- ts,
3245
+ ps,
3246
+ ms,
3183
3247
  t.instanceof(ArrayBuffer),
3184
3248
  t.instanceof(Uint8Array)
3185
- ]),
3186
- glBufferUsage: Lo.default("static").optional()
3249
+ ]).default(() => new Uint8Array().buffer),
3250
+ glBufferUsage: Zo.default("static").optional()
3187
3251
  });
3188
3252
  static z = e.crudeZ.transform((t) => new e(t));
3189
3253
  constructor(e) {
3190
- as(e) && (e = { data: e }), e.data ??= [];
3191
- let { dataType: t, timeRange: n, sampleOffset: r = 0, glBufferUsage: i = "static", alignment: a = 0n, alignmentMultiple: o = 1n, key: s = ei(), data: c } = e;
3192
- if (os(c)) {
3254
+ vs(e) && (e = { data: e }), e.data ??= [];
3255
+ let { dataType: t, timeRange: n, sampleOffset: r = 0, glBufferUsage: i = "static", alignment: a = 0n, alignmentMultiple: o = 1n, key: s = gi(), data: c } = e;
3256
+ if (ys(c)) {
3193
3257
  let e = c;
3194
3258
  this.key = e.key, this.dataType = e.dataType, this.sampleOffset = e.sampleOffset, this.gl = e.gl, this._data = e._data, this.timeRange = e.timeRange, this.alignment = e.alignment, this.alignmentMultiple = e.alignmentMultiple, this.cachedMin = e.cachedMin, this.cachedMax = e.cachedMax, this.writePos = e.writePos, this._refCount = e._refCount, this.cachedLength = e.cachedLength;
3195
3259
  return;
3196
3260
  }
3197
- let l = br(c), u = Array.isArray(c);
3198
- if (t != null) this.dataType = new j(t);
3261
+ let l = Pr(c), u = Array.isArray(c);
3262
+ if (t != null) this.dataType = new N(t);
3199
3263
  else if (c instanceof ArrayBuffer) throw Error("cannot infer data type from an ArrayBuffer instance when constructing a Series. Please provide a data type.");
3200
3264
  else if (u || l) {
3201
3265
  let e = c;
@@ -3203,31 +3267,31 @@ var Yo = /* @__PURE__ */ r({
3203
3267
  if (c.length === 0) throw Error("cannot infer data type from a zero length JS array when constructing a Series. Please provide a data type.");
3204
3268
  e = c[0];
3205
3269
  }
3206
- if (typeof e == "string") this.dataType = j.STRING;
3207
- else if (typeof e == "number") this.dataType = j.FLOAT64;
3208
- else if (typeof e == "bigint") this.dataType = j.INT64;
3209
- else if (typeof e == "boolean") this.dataType = j.UINT8;
3210
- else if (e instanceof E || e instanceof Date || e instanceof E) this.dataType = j.TIMESTAMP;
3211
- else if (typeof e == "object") this.dataType = j.JSON;
3270
+ if (typeof e == "string") this.dataType = N.STRING;
3271
+ else if (typeof e == "number") this.dataType = N.FLOAT64;
3272
+ else if (typeof e == "bigint") this.dataType = N.INT64;
3273
+ else if (typeof e == "boolean") this.dataType = N.UINT8;
3274
+ else if (e instanceof O || e instanceof Date || e instanceof O) this.dataType = N.TIMESTAMP;
3275
+ else if (typeof e == "object") this.dataType = N.JSON;
3212
3276
  else throw Error(`cannot infer data type of ${typeof e} when constructing a Series from a JS array`);
3213
- } else this.dataType = new j(c);
3277
+ } else this.dataType = new N(c);
3214
3278
  if (!u && !l) this._data = c;
3215
3279
  else if (u && c.length === 0) this._data = new this.dataType.Array([]).buffer;
3216
3280
  else {
3217
3281
  let e = l ? [c] : c, t = e[0];
3218
- if ((t instanceof E || t instanceof Date || t instanceof D) && (e = e.map((e) => new E(e).valueOf())), this.dataType.equals(j.STRING)) {
3282
+ if ((t instanceof O || t instanceof Date || t instanceof k) && (e = e.map((e) => new O(e).valueOf())), this.dataType.equals(N.STRING)) {
3219
3283
  this.cachedLength = e.length;
3220
3284
  let t = e.map((e) => new TextEncoder().encode(e)), n = t.reduce((e, t) => e + Z + t.byteLength, 0), r = new ArrayBuffer(n), i = new DataView(r), a = new Uint8Array(r), o = 0;
3221
3285
  for (let e of t) i.setUint32(o, e.byteLength, !0), o += Z, a.set(e, o), o += e.byteLength;
3222
3286
  this._data = r;
3223
- } else if (this.dataType.equals(j.JSON)) {
3287
+ } else if (this.dataType.equals(N.JSON)) {
3224
3288
  this.cachedLength = e.length;
3225
- let t = e.map((e) => new TextEncoder().encode(ur.encodeString(e))), n = t.reduce((e, t) => e + Z + t.byteLength, 0), r = new ArrayBuffer(n), i = new DataView(r), a = new Uint8Array(r), o = 0;
3289
+ let t = e.map((e) => new TextEncoder().encode(wr.encodeString(e))), n = t.reduce((e, t) => e + Z + t.byteLength, 0), r = new ArrayBuffer(n), i = new DataView(r), a = new Uint8Array(r), o = 0;
3226
3290
  for (let e of t) i.setUint32(o, e.byteLength, !0), o += Z, a.set(e, o), o += e.byteLength;
3227
3291
  this._data = r;
3228
3292
  } else this.dataType.usesBigInt && typeof t == "number" ? this._data = new this.dataType.Array(e.map((e) => BigInt(Math.round(e)))).buffer : !this.dataType.usesBigInt && typeof t == "bigint" ? this._data = new this.dataType.Array(e.map(Number)).buffer : this._data = new this.dataType.Array(e).buffer;
3229
3293
  }
3230
- this.key = s, this.alignment = a, this.alignmentMultiple = o, this.sampleOffset = r ?? 0, this.timeRange = n ?? A.ZERO, this.gl = {
3294
+ this.key = s, this.alignment = a, this.alignmentMultiple = o, this.sampleOffset = r ?? 0, this.timeRange = n ?? M.ZERO, this.gl = {
3231
3295
  control: null,
3232
3296
  buffer: null,
3233
3297
  prevBuffer: 0,
@@ -3237,7 +3301,7 @@ var Yo = /* @__PURE__ */ r({
3237
3301
  static alloc({ capacity: t, dataType: n, ...r }) {
3238
3302
  if (t === 0) throw Error("[Series] - cannot allocate an array of length 0");
3239
3303
  let i = new e({
3240
- data: new new j(n).Array(t).buffer,
3304
+ data: new new N(n).Array(t).buffer,
3241
3305
  dataType: n,
3242
3306
  ...r
3243
3307
  });
@@ -3297,17 +3361,17 @@ var Yo = /* @__PURE__ */ r({
3297
3361
  return Array.from(this).map((e) => e.toString());
3298
3362
  }
3299
3363
  parseJSON(e) {
3300
- if (!this.dataType.equals(j.JSON)) throw Error("cannot parse non-JSON series as JSON");
3301
- return this.toStrings().map((t) => e.parse(ur.decodeString(t)));
3364
+ if (!this.dataType.equals(N.JSON)) throw Error("cannot parse non-JSON series as JSON");
3365
+ return this.toStrings().map((t) => e.parse(wr.decodeString(t)));
3302
3366
  }
3303
3367
  get byteCapacity() {
3304
- return new M(this.underlyingData.byteLength);
3368
+ return new P(this.underlyingData.byteLength);
3305
3369
  }
3306
3370
  get capacity() {
3307
3371
  return this.dataType.isVariable ? this.byteCapacity.valueOf() : this.dataType.density.length(this.byteCapacity);
3308
3372
  }
3309
3373
  get byteLength() {
3310
- return this.writePos === X ? this.byteCapacity : this.dataType.isVariable ? new M(this.writePos) : this.dataType.density.size(this.writePos);
3374
+ return this.writePos === X ? this.byteCapacity : this.dataType.isVariable ? new P(this.writePos) : this.dataType.density.size(this.writePos);
3311
3375
  }
3312
3376
  get length() {
3313
3377
  return this.cachedLength == null ? this.dataType.isVariable ? this.calculateCachedLength() : this.writePos === X ? this.byteCapacity.valueOf() / this.dataType.density.valueOf() : this.writePos : this.cachedLength;
@@ -3324,7 +3388,7 @@ var Yo = /* @__PURE__ */ r({
3324
3388
  convert(t, n = 0) {
3325
3389
  if (this.dataType.equals(t)) return this;
3326
3390
  let r = new t.Array(this.length);
3327
- for (let e = 0; e < this.length; e++) r[e] = xr(this.dataType, t, this.data[e], n);
3391
+ for (let e = 0; e < this.length; e++) r[e] = Fr(this.dataType, t, this.data[e], n);
3328
3392
  return new e({
3329
3393
  data: r.buffer,
3330
3394
  dataType: t,
@@ -3335,27 +3399,45 @@ var Yo = /* @__PURE__ */ r({
3335
3399
  });
3336
3400
  }
3337
3401
  calcRawMax() {
3338
- return this.length === 0 ? -Infinity : (this.dataType.equals(j.TIMESTAMP) ? this.cachedMax = this.data[this.data.length - 1] : (this.dataType.usesBigInt, this.cachedMax = this.data.reduce((e, t) => e > t ? e : t)), this.cachedMax);
3402
+ if (this.length === 0) return -Infinity;
3403
+ if (this.dataType.equals(N.TIMESTAMP)) this.cachedMax = this.data[this.data.length - 1];
3404
+ else if (this.dataType.usesBigInt) {
3405
+ let e = this.data;
3406
+ this.cachedMax = e.reduce((e, t) => e > t ? e : t);
3407
+ } else {
3408
+ let e = this.data;
3409
+ this.cachedMax = e.reduce((e, t) => e > t ? e : t);
3410
+ }
3411
+ return this.cachedMax;
3339
3412
  }
3340
3413
  get max() {
3341
3414
  return this.calcMax();
3342
3415
  }
3343
3416
  calcMax() {
3344
3417
  if (this.dataType.isVariable) throw Error("cannot calculate maximum on a variable length data type");
3345
- return this.writePos === 0 ? -Infinity : (this.cachedMax ??= this.calcRawMax(), S(this.cachedMax, this.sampleOffset));
3418
+ return this.writePos === 0 ? -Infinity : (this.cachedMax ??= this.calcRawMax(), this.applyOffset(this.cachedMax));
3346
3419
  }
3347
3420
  calcRawMin() {
3348
- return this.length === 0 ? Infinity : (this.dataType.equals(j.TIMESTAMP) ? this.cachedMin = this.data[0] : (this.dataType.usesBigInt, this.cachedMin = this.data.reduce((e, t) => e < t ? e : t)), this.cachedMin);
3421
+ if (this.length === 0) return Infinity;
3422
+ if (this.dataType.equals(N.TIMESTAMP)) this.cachedMin = this.data[0];
3423
+ else if (this.dataType.usesBigInt) {
3424
+ let e = this.data;
3425
+ this.cachedMin = e.reduce((e, t) => e < t ? e : t);
3426
+ } else {
3427
+ let e = this.data;
3428
+ this.cachedMin = e.reduce((e, t) => e < t ? e : t);
3429
+ }
3430
+ return this.cachedMin;
3349
3431
  }
3350
3432
  get min() {
3351
3433
  return this.calcMin();
3352
3434
  }
3353
3435
  calcMin() {
3354
3436
  if (this.dataType.isVariable) throw Error("cannot calculate minimum on a variable length data type");
3355
- return this.writePos === 0 ? Infinity : (this.cachedMin ??= this.calcRawMin(), S(this.cachedMin, this.sampleOffset));
3437
+ return this.writePos === 0 ? Infinity : (this.cachedMin ??= this.calcRawMin(), this.applyOffset(this.cachedMin));
3356
3438
  }
3357
3439
  get bounds() {
3358
- return w(Number(this.min), Number(this.max), { makeValid: !1 });
3440
+ return E(Number(this.min), Number(this.max), { makeValid: !1 });
3359
3441
  }
3360
3442
  maybeRecomputeMinMax(e) {
3361
3443
  if (this.cachedMin != null) {
@@ -3376,25 +3458,37 @@ var Yo = /* @__PURE__ */ r({
3376
3458
  return this.at(n, t);
3377
3459
  }
3378
3460
  at(e, t = !1) {
3379
- if (this.dataType.isVariable) return this.atVariable(e, t ?? !1);
3380
- if (this.dataType.equals(j.UUID)) return this.atUUID(e, t);
3461
+ if (this.dataType.isVariable) {
3462
+ let n = this.atVariable(e, t);
3463
+ return n == null ? void 0 : this.dataType.equals(N.STRING) ? n : re(JSON.parse(n));
3464
+ }
3465
+ if (this.dataType.equals(N.UUID)) return this.atUUID(e, t);
3381
3466
  e < 0 && (e = this.length + e);
3382
3467
  let n = this.data[e];
3383
3468
  if (n == null) {
3384
3469
  if (t === !0) throw Error(`[series] - no value at index ${e}`);
3385
3470
  return;
3386
3471
  }
3387
- return S(n, this.sampleOffset);
3472
+ return this.applyOffset(n);
3473
+ }
3474
+ applyOffset(e) {
3475
+ return typeof this.sampleOffset == "bigint" && typeof e == "number" ? BigInt(Math.round(e)) + this.sampleOffset : C(e, this.sampleOffset);
3388
3476
  }
3389
3477
  atUUID(e, t) {
3390
3478
  e < 0 && (e = this.length + e);
3391
- let n = Zo(new Uint8Array(this.buffer, e * this.dataType.density.valueOf()));
3479
+ let n = ls(new Uint8Array(this.buffer, e * this.dataType.density.valueOf()));
3392
3480
  if (n == null) {
3393
3481
  if (t) throw Error(`[series] - no value at index ${e}`);
3394
3482
  return;
3395
3483
  }
3396
3484
  return n;
3397
3485
  }
3486
+ asString(e, t = !1) {
3487
+ if (this.dataType.isVariable) return this.atVariable(e, t);
3488
+ if (this.dataType.equals(N.UUID)) return this.atUUID(e, t);
3489
+ let n = this.at(e, t);
3490
+ if (n != null) return this.dataType.equals(N.FLOAT32) ? ds(n) : String(n);
3491
+ }
3398
3492
  atVariable(e, t) {
3399
3493
  let n = 0, r = 0, i = this.buffer, a = new DataView(i);
3400
3494
  if (this._cachedIndexes != null) {
@@ -3420,10 +3514,10 @@ var Yo = /* @__PURE__ */ r({
3420
3514
  }
3421
3515
  }
3422
3516
  let o = new Uint8Array(i, n, r);
3423
- return this.dataType.equals(j.STRING) ? new TextDecoder().decode(o) : re(JSON.parse(new TextDecoder().decode(o)));
3517
+ return new TextDecoder().decode(o);
3424
3518
  }
3425
3519
  binarySearch(e) {
3426
- let t = 0, n = this.length - 1, r = Nr(e);
3520
+ let t = 0, n = this.length - 1, r = qr(e);
3427
3521
  for (; t <= n;) {
3428
3522
  let i = Math.floor((t + n) / 2), a = r(this.at(i, !0), e);
3429
3523
  if (a === 0) return i;
@@ -3432,7 +3526,7 @@ var Yo = /* @__PURE__ */ r({
3432
3526
  return t;
3433
3527
  }
3434
3528
  updateGLBuffer(e) {
3435
- if (this.gl.control = e, !this.dataType.equals(j.FLOAT32) && !this.dataType.equals(j.UINT8)) throw Error("Only FLOAT32 and UINT8 arrays can be used in WebGL");
3529
+ if (this.gl.control = e, !this.dataType.equals(N.FLOAT32) && !this.dataType.equals(N.UINT8)) throw Error("Only FLOAT32 and UINT8 arrays can be used in WebGL");
3436
3530
  let { buffer: t, bufferUsage: n, prevBuffer: r } = this.gl;
3437
3531
  if (t ?? (this.gl.buffer = e.createBuffer()), this.writePos !== r) if (e.bindBuffer(e.ARRAY_BUFFER, this.gl.buffer), this.writePos !== X) {
3438
3532
  r === 0 && e.bufferData(e.ARRAY_BUFFER, this.byteCapacity.valueOf(), e.STATIC_DRAW);
@@ -3441,7 +3535,7 @@ var Yo = /* @__PURE__ */ r({
3441
3535
  } else e.bufferData(e.ARRAY_BUFFER, this.buffer, n === "static" ? e.STATIC_DRAW : e.DYNAMIC_DRAW), this.gl.prevBuffer = X;
3442
3536
  }
3443
3537
  as(e) {
3444
- return ns(e, this.dataType), this;
3538
+ return hs(e, this.dataType), this;
3445
3539
  }
3446
3540
  get digest() {
3447
3541
  return {
@@ -3449,8 +3543,8 @@ var Yo = /* @__PURE__ */ r({
3449
3543
  dataType: this.dataType.toString(),
3450
3544
  sampleOffset: this.sampleOffset,
3451
3545
  alignment: {
3452
- lower: hs(this.alignmentBounds.lower),
3453
- upper: hs(this.alignmentBounds.upper),
3546
+ lower: Os(this.alignmentBounds.lower),
3547
+ upper: Os(this.alignmentBounds.upper),
3454
3548
  multiple: this.alignmentMultiple
3455
3549
  },
3456
3550
  timeRange: this.timeRange.toString(),
@@ -3459,7 +3553,7 @@ var Yo = /* @__PURE__ */ r({
3459
3553
  };
3460
3554
  }
3461
3555
  get alignmentBounds() {
3462
- return w(this.alignment, this.alignment + BigInt(this.length) * this.alignmentMultiple);
3556
+ return E(this.alignment, this.alignment + BigInt(this.length) * this.alignmentMultiple);
3463
3557
  }
3464
3558
  maybeGarbageCollectGLBuffer(e) {
3465
3559
  this.gl.buffer != null && (e.deleteBuffer(this.gl.buffer), this.gl.buffer = null, this.gl.prevBuffer = 0, this.gl.control = null);
@@ -3470,10 +3564,10 @@ var Yo = /* @__PURE__ */ r({
3470
3564
  }
3471
3565
  [Symbol.iterator]() {
3472
3566
  if (this.dataType.isVariable) {
3473
- let e = new cs(this);
3474
- return this.dataType.equals(j.JSON) ? new ls(e) : e;
3567
+ let e = new xs(this);
3568
+ return this.dataType.equals(N.JSON) ? new Ss(e) : e;
3475
3569
  }
3476
- return this.dataType.equals(j.UUID) ? new us(this) : new ds(this);
3570
+ return this.dataType.equals(N.UUID) ? new Cs(this) : new ws(this);
3477
3571
  }
3478
3572
  slice(e, t) {
3479
3573
  return this.sliceSub(!1, e, t);
@@ -3482,11 +3576,11 @@ var Yo = /* @__PURE__ */ r({
3482
3576
  return this.sliceSub(!0, e, t);
3483
3577
  }
3484
3578
  subIterator(e, t) {
3485
- return new ss(this, e, t ?? this.length);
3579
+ return new bs(this, e, t ?? this.length);
3486
3580
  }
3487
3581
  subAlignmentIterator(e, t) {
3488
3582
  let n = Math.ceil(Number(e - this.alignment) / Number(this.alignmentMultiple)), r = Math.ceil(Number(t - this.alignment) / Number(this.alignmentMultiple));
3489
- return new ss(this, n, r);
3583
+ return new bs(this, n, r);
3490
3584
  }
3491
3585
  subBytes(t, n) {
3492
3586
  return t >= 0 && (n == null || n >= this.byteLength.valueOf()) ? this : new e({
@@ -3514,7 +3608,7 @@ var Yo = /* @__PURE__ */ r({
3514
3608
  return new e({
3515
3609
  data: this.buffer,
3516
3610
  dataType: this.dataType,
3517
- timeRange: A.ZERO,
3611
+ timeRange: M.ZERO,
3518
3612
  sampleOffset: this.sampleOffset,
3519
3613
  glBufferUsage: "static",
3520
3614
  alignment: t
@@ -3530,14 +3624,14 @@ var Yo = /* @__PURE__ */ r({
3530
3624
  }
3531
3625
  return e += "])", e;
3532
3626
  }
3533
- }, as = (e) => e == null ? !1 : Array.isArray(e) || e instanceof ArrayBuffer || ArrayBuffer.isView(e) && !(e instanceof DataView) || e instanceof is ? !0 : br(e), os = ni(rs, is), ss = class {
3627
+ }, vs = (e) => e == null ? !1 : Array.isArray(e) || e instanceof ArrayBuffer || ArrayBuffer.isView(e) && !(e instanceof DataView) || e instanceof _s ? !0 : Pr(e), ys = vi(gs, _s), bs = class {
3534
3628
  series;
3535
3629
  end;
3536
3630
  index;
3537
3631
  constructor(e, t, n) {
3538
3632
  this.series = e;
3539
- let r = w(0, e.length + 1);
3540
- this.end = Tn(r, n), this.index = Tn(r, t);
3633
+ let r = E(0, e.length + 1);
3634
+ this.end = zn(r, n), this.index = zn(r, t);
3541
3635
  }
3542
3636
  next() {
3543
3637
  return this.index >= this.end ? {
@@ -3548,7 +3642,7 @@ var Yo = /* @__PURE__ */ r({
3548
3642
  value: this.series.at(this.index++, !0)
3549
3643
  };
3550
3644
  }
3551
- }, cs = class {
3645
+ }, xs = class {
3552
3646
  series;
3553
3647
  byteOffset;
3554
3648
  decoder;
@@ -3571,7 +3665,7 @@ var Yo = /* @__PURE__ */ r({
3571
3665
  value: n
3572
3666
  };
3573
3667
  }
3574
- }, ls = class e {
3668
+ }, Ss = class e {
3575
3669
  wrapped;
3576
3670
  static schema = t.record(t.string(), t.unknown());
3577
3671
  constructor(e) {
@@ -3584,30 +3678,30 @@ var Yo = /* @__PURE__ */ r({
3584
3678
  value: void 0
3585
3679
  } : {
3586
3680
  done: !1,
3587
- value: ur.decodeString(t.value, e.schema)
3681
+ value: wr.decodeString(t.value, e.schema)
3588
3682
  };
3589
3683
  }
3590
- }, us = class {
3684
+ }, Cs = class {
3591
3685
  series;
3592
3686
  index;
3593
3687
  data;
3594
3688
  density;
3595
3689
  constructor(e) {
3596
- if (!e.dataType.equals(j.UUID)) throw Error("cannot create a UUID series iterator for a non-UUID series");
3597
- this.series = e, this.index = 0, this.data = new Uint8Array(e.buffer), this.density = j.UUID.density.valueOf();
3690
+ if (!e.dataType.equals(N.UUID)) throw Error("cannot create a UUID series iterator for a non-UUID series");
3691
+ this.series = e, this.index = 0, this.data = new Uint8Array(e.buffer), this.density = N.UUID.density.valueOf();
3598
3692
  }
3599
3693
  next() {
3600
3694
  if (this.index >= this.series.length) return {
3601
3695
  done: !0,
3602
3696
  value: void 0
3603
3697
  };
3604
- let e = Zo(this.data, this.index * this.density);
3698
+ let e = ls(this.data, this.index * this.density);
3605
3699
  return this.index++, {
3606
3700
  done: !1,
3607
3701
  value: e
3608
3702
  };
3609
3703
  }
3610
- }, ds = class {
3704
+ }, ws = class {
3611
3705
  series;
3612
3706
  index;
3613
3707
  constructor(e) {
@@ -3622,7 +3716,7 @@ var Yo = /* @__PURE__ */ r({
3622
3716
  value: this.series.at(this.index++, !0)
3623
3717
  };
3624
3718
  }
3625
- }, fs = class {
3719
+ }, Ts = class {
3626
3720
  series;
3627
3721
  constructor(e = []) {
3628
3722
  if (e.length !== 0) {
@@ -3632,23 +3726,23 @@ var Yo = /* @__PURE__ */ r({
3632
3726
  this.series = e;
3633
3727
  }
3634
3728
  as(e) {
3635
- return ns(e, this.dataType), this;
3729
+ return hs(e, this.dataType), this;
3636
3730
  }
3637
3731
  get dataType() {
3638
- return this.series.length === 0 ? j.UNKNOWN : this.series[0].dataType;
3732
+ return this.series.length === 0 ? N.UNKNOWN : this.series[0].dataType;
3639
3733
  }
3640
3734
  get timeRange() {
3641
- return this.series.length === 0 ? A.ZERO : new A(this.series[0].timeRange.start, this.series[this.series.length - 1].timeRange.end);
3735
+ return this.series.length === 0 ? M.ZERO : new M(this.series[0].timeRange.start, this.series[this.series.length - 1].timeRange.end);
3642
3736
  }
3643
3737
  get alignment() {
3644
3738
  return this.series.length === 0 ? 0n : this.series[0].alignment;
3645
3739
  }
3646
3740
  get alignmentBounds() {
3647
- return this.series.length === 0 ? w(0n, 0n) : w(this.series[0].alignmentBounds.lower, this.series[this.series.length - 1].alignmentBounds.upper);
3741
+ return this.series.length === 0 ? E(0n, 0n) : E(this.series[0].alignmentBounds.lower, this.series[this.series.length - 1].alignmentBounds.upper);
3648
3742
  }
3649
3743
  push(e) {
3650
3744
  let t = () => /* @__PURE__ */ Error(`cannot push a ${e.dataType.toString()} series to a ${this.dataType.toString()} multi-series`), n = e.dataType.equals(this.dataType);
3651
- if (os(e)) {
3745
+ if (ys(e)) {
3652
3746
  if (this.series.length !== 0 && !n) throw t();
3653
3747
  this.series.push(e);
3654
3748
  } else {
@@ -3660,7 +3754,7 @@ var Yo = /* @__PURE__ */ r({
3660
3754
  return this.series.reduce((e, t) => e + t.length, 0);
3661
3755
  }
3662
3756
  atAlignment(e, t) {
3663
- for (let n of this.series) if (T(n.alignmentBounds, e)) return n.atAlignment(e, t);
3757
+ for (let n of this.series) if (D(n.alignmentBounds, e)) return n.atAlignment(e, t);
3664
3758
  if (t) throw Error(`[series] - no value at alignment ${e}`);
3665
3759
  }
3666
3760
  at(e, t = !1) {
@@ -3672,16 +3766,16 @@ var Yo = /* @__PURE__ */ r({
3672
3766
  if (t) throw Error(`[series] - no value at index ${e}`);
3673
3767
  }
3674
3768
  subIterator(e, t) {
3675
- return new ms(this, e, t ?? this.length);
3769
+ return new Ds(this, e, t ?? this.length);
3676
3770
  }
3677
3771
  subAlignmentIterator(e, t) {
3678
- if (e >= this.alignmentBounds.upper || t <= this.alignmentBounds.lower) return $o;
3772
+ if (e >= this.alignmentBounds.upper || t <= this.alignmentBounds.lower) return fs;
3679
3773
  let n = 0;
3680
3774
  for (let t = 0; t < this.series.length; t++) {
3681
3775
  let r = this.series[t];
3682
3776
  if (e < r.alignment) break;
3683
3777
  if (e >= r.alignmentBounds.upper) n += r.length;
3684
- else if (T(r.alignmentBounds, e)) {
3778
+ else if (D(r.alignmentBounds, e)) {
3685
3779
  n += Math.ceil(Number(e - r.alignment) / Number(r.alignmentMultiple));
3686
3780
  break;
3687
3781
  }
@@ -3691,36 +3785,36 @@ var Yo = /* @__PURE__ */ r({
3691
3785
  let n = this.series[e];
3692
3786
  if (t < n.alignment) break;
3693
3787
  if (t >= n.alignmentBounds.upper) r += n.length;
3694
- else if (T(n.alignmentBounds, t)) {
3788
+ else if (D(n.alignmentBounds, t)) {
3695
3789
  r += Math.ceil(Number(t - n.alignment) / Number(n.alignmentMultiple));
3696
3790
  break;
3697
3791
  }
3698
3792
  }
3699
- return new ms(this, n, r);
3793
+ return new Ds(this, n, r);
3700
3794
  }
3701
3795
  subAlignmentSpanIterator(e, t) {
3702
- if (e >= this.alignmentBounds.upper) return $o;
3796
+ if (e >= this.alignmentBounds.upper) return fs;
3703
3797
  t = Math.min(t, Number(this.distance(e, this.alignmentBounds.upper)));
3704
3798
  let n = 0;
3705
3799
  for (let t = 0; t < this.series.length; t++) {
3706
3800
  let r = this.series[t];
3707
3801
  if (e < r.alignment) break;
3708
3802
  if (e >= r.alignmentBounds.upper) n += r.length;
3709
- else if (T(r.alignmentBounds, e)) {
3803
+ else if (D(r.alignmentBounds, e)) {
3710
3804
  n += Number(e - r.alignment);
3711
3805
  break;
3712
3806
  }
3713
3807
  }
3714
- return new ms(this, n, n + t);
3808
+ return new Ds(this, n, n + t);
3715
3809
  }
3716
3810
  updateGLBuffer(e) {
3717
3811
  this.series.forEach((t) => t.updateGLBuffer(e));
3718
3812
  }
3719
3813
  get bounds() {
3720
- return Mn(this.series.map((e) => e.bounds));
3814
+ return Kn(this.series.map((e) => e.bounds));
3721
3815
  }
3722
3816
  get byteLength() {
3723
- return new M(this.series.reduce((e, t) => e + t.byteLength.valueOf(), 0));
3817
+ return new P(this.series.reduce((e, t) => e + t.byteLength.valueOf(), 0));
3724
3818
  }
3725
3819
  get data() {
3726
3820
  let e = new this.dataType.Array(this.length), t = 0;
@@ -3728,7 +3822,7 @@ var Yo = /* @__PURE__ */ r({
3728
3822
  return new this.dataType.Array(e.buffer);
3729
3823
  }
3730
3824
  traverseAlignment(e, t) {
3731
- return Rn(this.series.map((e) => e.alignmentBounds), e, t);
3825
+ return Qn(this.series.map((e) => e.alignmentBounds), e, t);
3732
3826
  }
3733
3827
  acquire(e) {
3734
3828
  this.series.forEach((t) => t.acquire(e));
@@ -3737,10 +3831,10 @@ var Yo = /* @__PURE__ */ r({
3737
3831
  this.series.forEach((e) => e.release());
3738
3832
  }
3739
3833
  distance(e, t) {
3740
- return zn(this.series.map((e) => e.alignmentBounds), e, t);
3834
+ return $n(this.series.map((e) => e.alignmentBounds), e, t);
3741
3835
  }
3742
3836
  parseJSON(e) {
3743
- if (!this.dataType.equals(j.JSON)) throw Error("cannot parse non-JSON series as JSON");
3837
+ if (!this.dataType.equals(N.JSON)) throw Error("cannot parse non-JSON series as JSON");
3744
3838
  return this.series.flatMap((t) => t.parseJSON(e));
3745
3839
  }
3746
3840
  [Symbol.iterator]() {
@@ -3749,12 +3843,12 @@ var Yo = /* @__PURE__ */ r({
3749
3843
  done: !0,
3750
3844
  value: void 0
3751
3845
  };
3752
- } } : new ps(this.series);
3846
+ } } : new Es(this.series);
3753
3847
  }
3754
3848
  toStrings() {
3755
3849
  return this.series.flatMap((e) => e.toStrings());
3756
3850
  }
3757
- }, ps = class {
3851
+ }, Es = class {
3758
3852
  series;
3759
3853
  seriesIndex;
3760
3854
  internal;
@@ -3771,7 +3865,7 @@ var Yo = /* @__PURE__ */ r({
3771
3865
  [Symbol.iterator]() {
3772
3866
  return this;
3773
3867
  }
3774
- }, ms = class {
3868
+ }, Ds = class {
3775
3869
  series;
3776
3870
  index;
3777
3871
  end;
@@ -3790,46 +3884,58 @@ var Yo = /* @__PURE__ */ r({
3790
3884
  [Symbol.iterator]() {
3791
3885
  return this;
3792
3886
  }
3793
- }, hs = (e) => ({
3887
+ }, Os = (e) => ({
3794
3888
  domain: e >> 32n,
3795
3889
  sample: e & 4294967295n
3796
- }), gs = /* @__PURE__ */ r({
3797
- ClockSkewCalculator: () => kr,
3798
- DataType: () => j,
3799
- Density: () => k,
3800
- MultiSeries: () => fs,
3801
- Rate: () => O,
3802
- Series: () => is,
3803
- Size: () => M,
3804
- TimeRange: () => A,
3805
- TimeSpan: () => D,
3806
- TimeStamp: () => E,
3807
- convertDataType: () => xr,
3808
- dataTypeZ: () => Dr,
3809
- isCrudeSeries: () => as,
3810
- isTelemValue: () => br,
3811
- numericTimeRangeZ: () => vr,
3812
- rateZ: () => Tr,
3813
- sizeZ: () => Er,
3814
- timeRangeBoundedZ: () => Or,
3815
- timeRangeZ: () => Sr,
3816
- timeSpanZ: () => wr,
3817
- timeStampZ: () => Cr,
3818
- typedArrayZ: () => yr
3819
- }), _s = /* @__PURE__ */ r({ sleep: () => vs }), vs = async (e) => await new Promise((t) => setTimeout(t, D.fromMilliseconds(e).milliseconds)), ys = /* @__PURE__ */ r({
3820
- Breaker: () => bs,
3821
- breakerConfigZ: () => xs
3822
- }), bs = class {
3890
+ }), ks = [
3891
+ "ISO",
3892
+ "ISODate",
3893
+ "time",
3894
+ "preciseTime",
3895
+ "date",
3896
+ "preciseDate",
3897
+ "dateTime"
3898
+ ], As = t.enum(ks), js = ["local", "UTC"], Ms = t.enum(js), Ns = /* @__PURE__ */ r({
3899
+ ClockSkewCalculator: () => Ur,
3900
+ DataType: () => N,
3901
+ Density: () => j,
3902
+ MultiSeries: () => Ts,
3903
+ Rate: () => A,
3904
+ Series: () => _s,
3905
+ Size: () => P,
3906
+ TIMESTAMP_FORMATS: () => ks,
3907
+ TIME_ZONES: () => js,
3908
+ TimeRange: () => M,
3909
+ TimeSpan: () => k,
3910
+ TimeStamp: () => O,
3911
+ convertDataType: () => Fr,
3912
+ dataTypeZ: () => Vr,
3913
+ isCrudeSeries: () => vs,
3914
+ isTelemValue: () => Pr,
3915
+ numericTimeRangeZ: () => Mr,
3916
+ rateZ: () => zr,
3917
+ sizeZ: () => Br,
3918
+ timeRangeBoundedZ: () => Hr,
3919
+ timeRangeZ: () => Ir,
3920
+ timeSpanZ: () => Rr,
3921
+ timeStampZ: () => Lr,
3922
+ timeZoneZ: () => Ms,
3923
+ timestampFormatZ: () => As,
3924
+ typedArrayZ: () => Nr
3925
+ }), Ps = /* @__PURE__ */ r({ sleep: () => Fs }), Fs = async (e) => await new Promise((t) => setTimeout(t, k.fromMilliseconds(e).milliseconds)), Is = /* @__PURE__ */ r({
3926
+ Breaker: () => Ls,
3927
+ breakerConfigZ: () => Rs
3928
+ }), Ls = class {
3823
3929
  config;
3824
3930
  retries;
3825
3931
  interval;
3826
3932
  constructor(e) {
3827
3933
  this.config = {
3828
- baseInterval: new D(e?.baseInterval ?? D.seconds(1)),
3934
+ baseInterval: new k(e?.baseInterval ?? k.seconds(1)),
3829
3935
  maxRetries: e?.maxRetries ?? 5,
3830
3936
  scale: e?.scale ?? 1,
3831
- sleepFn: e?.sleepFn ?? vs
3832
- }, this.retries = 0, this.interval = new D(this.config.baseInterval);
3937
+ sleepFn: e?.sleepFn ?? Fs
3938
+ }, this.retries = 0, this.interval = new k(this.config.baseInterval);
3833
3939
  }
3834
3940
  async wait() {
3835
3941
  let { maxRetries: e, scale: t, sleepFn: n } = this.config;
@@ -3841,48 +3947,48 @@ var Yo = /* @__PURE__ */ r({
3841
3947
  reset() {
3842
3948
  this.retries = 0, this.interval = this.config.baseInterval;
3843
3949
  }
3844
- }, xs = t.object({
3845
- baseInterval: D.z.optional(),
3950
+ }, Rs = t.object({
3951
+ baseInterval: k.z.optional(),
3846
3952
  maxRetries: t.number().optional(),
3847
3953
  scale: t.number().optional()
3848
- }), Ss = /* @__PURE__ */ r({ Z: () => Cs }), Cs = (e) => t.object({
3954
+ }), zs = /* @__PURE__ */ r({ Z: () => Bs }), Bs = (e) => t.object({
3849
3955
  variant: t.enum(["set", "delete"]),
3850
3956
  key: t.string(),
3851
3957
  value: e
3852
- }), ws = t.string().regex(/^#?([0-9a-f]{6}|[0-9a-f]{8})$/i), Q = Xn, Ts = t.number().min(0).max(1), Es = t.tuple([
3958
+ }), Vs = t.string().regex(/^#?([0-9a-f]{6}|[0-9a-f]{8})$/i), Q = ur, Hs = t.number().min(0).max(1), Us = t.tuple([
3853
3959
  Q,
3854
3960
  Q,
3855
3961
  Q,
3856
- Ts
3857
- ]), Ds = t.tuple([
3962
+ Hs
3963
+ ]), Ws = t.tuple([
3858
3964
  Q,
3859
3965
  Q,
3860
3966
  Q
3861
- ]), Os = t.object({ rgba255: Es }), ks = t.object({
3967
+ ]), Gs = t.object({ rgba255: Us }), Ks = t.object({
3862
3968
  r: Q,
3863
3969
  g: Q,
3864
3970
  b: Q,
3865
- a: Ts
3866
- }), As = t.number().min(0).max(360), js = t.number().min(0).max(100), Ms = t.number().min(0).max(100), Ns = t.tuple([
3867
- As,
3868
- js,
3869
- Ms,
3870
- Ts
3871
- ]), Ps = t.union([
3872
- ws,
3873
- Ds,
3874
- Es,
3875
- Ns,
3876
- Os,
3877
- ks
3878
- ]), Fs = Ps.transform((e) => $(e)), Is = (e) => Fs.safeParse(e).success, Ls = (e) => Es.safeParse(e).success, Rs = ((e) => {
3971
+ a: Hs
3972
+ }), qs = t.number().min(0).max(360), Js = t.number().min(0).max(100), Ys = t.number().min(0).max(100), Xs = t.tuple([
3973
+ qs,
3974
+ Js,
3975
+ Ys,
3976
+ Hs
3977
+ ]), Zs = t.union([
3978
+ Vs,
3979
+ Ws,
3980
+ Us,
3981
+ Xs,
3982
+ Gs,
3983
+ Ks
3984
+ ]), Qs = Zs.transform((e) => $(e)), $s = (e) => Qs.safeParse(e).success, ec = (e) => Us.safeParse(e).success, tc = ((e) => {
3879
3985
  if (e == null) return;
3880
- let t = Fs.safeParse(e);
3881
- if (t.success) return Vs(t.data);
3986
+ let t = Qs.safeParse(e);
3987
+ if (t.success) return ic(t.data);
3882
3988
  if (typeof e == "string") return e;
3883
3989
  throw t.error;
3884
3990
  }), $ = (e, t = 1) => {
3885
- if (e = Ps.parse(e), typeof e == "string") return ac(e, t);
3991
+ if (e = Zs.parse(e), typeof e == "string") return Sc(e, t);
3886
3992
  if (Array.isArray(e)) {
3887
3993
  if (e.length < 3 || e.length > 4) throw Error(`Invalid color: [${e.join(", ")}]`);
3888
3994
  return e.length === 3 ? [...e, t] : e;
@@ -3893,25 +3999,25 @@ var Yo = /* @__PURE__ */ r({
3893
3999
  e.b,
3894
4000
  e.a
3895
4001
  ] : e.rgba255;
3896
- }, zs = (e, t) => {
4002
+ }, nc = (e, t) => {
3897
4003
  if (e == null || t == null) return e == t;
3898
4004
  let n = $(e), r = $(t);
3899
4005
  return n.every((e, t) => e === r[t]);
3900
- }, Bs = ((e) => {
4006
+ }, rc = ((e) => {
3901
4007
  if (e == null) return;
3902
4008
  let [t, n, r, i] = $(e), a = Math.round(i * 255);
3903
- return `#${sc(t)}${sc(n)}${sc(r)}${a === 255 ? "" : sc(a)}`;
3904
- }), Vs = (e) => {
4009
+ return `#${wc(t)}${wc(n)}${wc(r)}${a === 255 ? "" : wc(a)}`;
4010
+ }), ic = (e) => {
3905
4011
  let [t, n, r, i] = $(e);
3906
4012
  return `rgba(${t}, ${n}, ${r}, ${i})`;
3907
- }, Hs = (e) => `rgb(${Us(e)})`, Us = (e) => {
4013
+ }, ac = (e) => `rgb(${oc(e)})`, oc = (e) => {
3908
4014
  let [t, n, r] = $(e);
3909
4015
  return `${t}, ${n}, ${r}`;
3910
- }, Ws = (e) => [...Gs(e), Ys(e)], Gs = (e) => [
3911
- Ks(e) / 255,
3912
- qs(e) / 255,
3913
- Js(e) / 255
3914
- ], Ks = (e) => $(e)[0], qs = (e) => $(e)[1], Js = (e) => $(e)[2], Ys = (e) => $(e)[3], Xs = (e) => zs(oc, e), Zs = (e) => mc($(e)), Qs = (e, t) => {
4016
+ }, sc = (e) => [...cc(e), fc(e)], cc = (e) => [
4017
+ lc(e) / 255,
4018
+ uc(e) / 255,
4019
+ dc(e) / 255
4020
+ ], lc = (e) => $(e)[0], uc = (e) => $(e)[1], dc = (e) => $(e)[2], fc = (e) => $(e)[3], pc = (e) => nc(Cc, e), mc = (e) => jc($(e)), hc = (e, t) => {
3915
4021
  let [n, r, i] = $(e);
3916
4022
  if (t > 100) throw Error(`Color opacity must be between 0 and 100, got ${t}`);
3917
4023
  return t > 1 && (t /= 100), [
@@ -3920,30 +4026,30 @@ var Yo = /* @__PURE__ */ r({
3920
4026
  i,
3921
4027
  t
3922
4028
  ];
3923
- }, $s = (e) => {
3924
- let [t, n, r] = Gs(e).map((e) => e <= .03928 ? e / 12.92 : ((e + .055) / 1.055) ** 2.4);
4029
+ }, gc = (e) => {
4030
+ let [t, n, r] = cc(e).map((e) => e <= .03928 ? e / 12.92 : ((e + .055) / 1.055) ** 2.4);
3925
4031
  return Number((.2126 * t + .7152 * n + .0722 * r).toFixed(3));
3926
- }, ec = (e) => {
3927
- let [t, n, r] = Gs(e);
4032
+ }, _c = (e) => {
4033
+ let [t, n, r] = cc(e);
3928
4034
  return 1 - (Math.max(t, n, r) - Math.min(t, n, r));
3929
- }, tc = (e, t) => {
3930
- let n = $(e), r = $(t), i = $s(n), a = $s(r);
4035
+ }, vc = (e, t) => {
4036
+ let n = $(e), r = $(t), i = gc(n), a = gc(r);
3931
4037
  return (Math.max(i, a) + .5) / (Math.min(i, a) + .5);
3932
- }, nc = (e, ...t) => {
4038
+ }, yc = (e, ...t) => {
3933
4039
  if (t.length === 0) throw Error("[Color.pickByContrast] - must provide at least one color");
3934
- let n = $(e), [r] = t.sort((e, t) => tc(n, t) - tc(n, e));
4040
+ let n = $(e), [r] = t.sort((e, t) => vc(n, t) - vc(n, e));
3935
4041
  return $(r);
3936
- }, rc = (e) => $s(e) < .5, ic = (e) => $s(e) > .5, ac = (e, t = 1) => (e = ws.parse(e), e = lc(e), [
3937
- cc(e, 0),
3938
- cc(e, 2),
3939
- cc(e, 4),
3940
- e.length === 8 ? cc(e, 6) / 255 : t
3941
- ]), oc = [
4042
+ }, bc = (e) => gc(e) < .5, xc = (e) => gc(e) > .5, Sc = (e, t = 1) => (e = Vs.parse(e), e = Ec(e), [
4043
+ Tc(e, 0),
4044
+ Tc(e, 2),
4045
+ Tc(e, 4),
4046
+ e.length === 8 ? Tc(e, 6) / 255 : t
4047
+ ]), Cc = [
3942
4048
  0,
3943
4049
  0,
3944
4050
  0,
3945
4051
  0
3946
- ], sc = (e) => Math.floor(e).toString(16).padStart(2, "0"), cc = (e, t) => parseInt(e.slice(t, t + 2), 16), lc = (e) => e.startsWith("#") ? e.slice(1) : e, uc = {
4052
+ ], wc = (e) => Math.floor(e).toString(16).padStart(2, "0"), Tc = (e, t) => parseInt(e.slice(t, t + 2), 16), Ec = (e) => e.startsWith("#") ? e.slice(1) : e, Dc = {
3947
4053
  black: "#000000",
3948
4054
  white: "#ffffff",
3949
4055
  red: "#ff0000",
@@ -3975,16 +4081,16 @@ var Yo = /* @__PURE__ */ r({
3975
4081
  khaki: "#f0e68c",
3976
4082
  crimson: "#dc143c",
3977
4083
  transparent: "transparent"
3978
- }, dc = (e) => {
4084
+ }, Oc = (e) => {
3979
4085
  if (!e) return;
3980
4086
  let t = e.trim().toLowerCase();
3981
4087
  if (!(t === "transparent" || t === "none")) {
3982
4088
  if (t.startsWith("#")) {
3983
4089
  if (t.length === 4) {
3984
4090
  let e = t[1], n = t[2], r = t[3], i = `#${e}${e}${n}${n}${r}${r}`;
3985
- if (ws.safeParse(i).success) return ac(i);
4091
+ if (Vs.safeParse(i).success) return Sc(i);
3986
4092
  }
3987
- return (t.length === 7 || t.length === 9) && ws.safeParse(t).success ? ac(t) : void 0;
4093
+ return (t.length === 7 || t.length === 9) && Vs.safeParse(t).success ? Sc(t) : void 0;
3988
4094
  }
3989
4095
  if (t.startsWith("rgb")) {
3990
4096
  let e = t.match(/rgba?\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*([\d.]+))?\s*\)/);
@@ -3998,17 +4104,17 @@ var Yo = /* @__PURE__ */ r({
3998
4104
  ];
3999
4105
  }
4000
4106
  }
4001
- if (uc[t]) return ac(uc[t]);
4107
+ if (Dc[t]) return Sc(Dc[t]);
4002
4108
  }
4003
- }, fc = (e) => {
4004
- e = Ns.parse(e);
4109
+ }, kc = (e) => {
4110
+ e = Xs.parse(e);
4005
4111
  let [t, n, r] = e, i = e[3];
4006
4112
  t /= 360, n /= 100, r /= 100;
4007
4113
  let a, o, s;
4008
4114
  if (n === 0) a = o = s = r;
4009
4115
  else {
4010
4116
  let e = r < .5 ? r * (1 + n) : r + n - r * n, i = 2 * r - e;
4011
- a = pc(i, e, t + 1 / 3), o = pc(i, e, t), s = pc(i, e, t - 1 / 3);
4117
+ a = Ac(i, e, t + 1 / 3), o = Ac(i, e, t), s = Ac(i, e, t - 1 / 3);
4012
4118
  }
4013
4119
  return [
4014
4120
  Math.round(a * 255),
@@ -4016,8 +4122,8 @@ var Yo = /* @__PURE__ */ r({
4016
4122
  Math.round(s * 255),
4017
4123
  i
4018
4124
  ];
4019
- }, pc = (e, t, n) => (n < 0 && (n += 1), n > 1 && --n, n < 1 / 6 ? e + (t - e) * 6 * n : n < 1 / 2 ? t : n < 2 / 3 ? e + (t - e) * (2 / 3 - n) * 6 : e), mc = (e) => {
4020
- e = Es.parse(e);
4125
+ }, Ac = (e, t, n) => (n < 0 && (n += 1), n > 1 && --n, n < 1 / 6 ? e + (t - e) * 6 * n : n < 1 / 2 ? t : n < 2 / 3 ? e + (t - e) * (2 / 3 - n) * 6 : e), jc = (e) => {
4126
+ e = Us.parse(e);
4021
4127
  let [t, n, r] = e, i = e[3];
4022
4128
  t /= 255, n /= 255, r /= 255;
4023
4129
  let a = Math.max(t, n, r), o = Math.min(t, n, r), s, c, l = (a + o) / 2;
@@ -4032,13 +4138,13 @@ var Yo = /* @__PURE__ */ r({
4032
4138
  Math.round(l),
4033
4139
  i
4034
4140
  ];
4035
- }, hc = $("#000000"), gc = $("#ffffff"), _c = t.object({
4141
+ }, Mc = $("#000000"), Nc = $("#ffffff"), Pc = t.object({
4036
4142
  key: t.string(),
4037
- color: Ps,
4143
+ color: Zs,
4038
4144
  position: t.number(),
4039
4145
  switched: t.boolean().optional()
4040
- }), vc = t.array(_c), yc = (e, t) => {
4041
- if (e.length === 0) return oc;
4146
+ }), Fc = t.array(Pc), Ic = (e, t) => {
4147
+ if (e.length === 0) return Cc;
4042
4148
  if (e = e.slice().sort((e, t) => e.position - t.position), t <= e[0].position) return $(e[0].color);
4043
4149
  if (t >= e[e.length - 1].position) return $(e[e.length - 1].color);
4044
4150
  for (let n = 0; n < e.length - 1; n++) {
@@ -4048,99 +4154,99 @@ var Yo = /* @__PURE__ */ r({
4048
4154
  if (t === i.position) return $(i.color);
4049
4155
  let a = (t - r.position) / (i.position - r.position), o = $(r.color), s = $(i.color);
4050
4156
  return $([
4051
- Math.round(Ks(o) + a * (Ks(s) - Ks(o))),
4052
- Math.round(qs(o) + a * (qs(s) - qs(o))),
4053
- Math.round(Js(o) + a * (Js(s) - Js(o))),
4054
- Ys(o) + a * (Ys(s) - Ys(o))
4157
+ Math.round(lc(o) + a * (lc(s) - lc(o))),
4158
+ Math.round(uc(o) + a * (uc(s) - uc(o))),
4159
+ Math.round(dc(o) + a * (dc(s) - dc(o))),
4160
+ fc(o) + a * (fc(s) - fc(o))
4055
4161
  ]);
4056
4162
  }
4057
4163
  return $(e[e.length - 1].color);
4058
- }, bc = t.object({
4164
+ }, Lc = t.object({
4059
4165
  key: t.string(),
4060
4166
  name: t.string(),
4061
- color: Fs
4062
- }), xc = t.object({
4167
+ color: Qs
4168
+ }), Rc = t.object({
4063
4169
  key: t.string(),
4064
4170
  name: t.string(),
4065
- swatches: t.array(bc)
4066
- }), Sc = /* @__PURE__ */ r({
4067
- BLACK: () => hc,
4068
- WHITE: () => gc,
4069
- ZERO: () => oc,
4070
- aValue: () => Ys,
4071
- bValue: () => Js,
4072
- colorZ: () => Fs,
4171
+ swatches: t.array(Lc)
4172
+ }), zc = /* @__PURE__ */ r({
4173
+ BLACK: () => Mc,
4174
+ WHITE: () => Nc,
4175
+ ZERO: () => Cc,
4176
+ aValue: () => fc,
4177
+ bValue: () => dc,
4178
+ colorZ: () => Qs,
4073
4179
  construct: () => $,
4074
- contrast: () => tc,
4075
- crudeZ: () => Ps,
4076
- cssString: () => Rs,
4077
- equals: () => zs,
4078
- fromCSS: () => dc,
4079
- fromGradient: () => yc,
4080
- fromHSLA: () => fc,
4081
- gValue: () => qs,
4082
- gradientZ: () => vc,
4083
- grayness: () => ec,
4084
- hex: () => Bs,
4085
- hsla: () => Zs,
4086
- isColor: () => Ls,
4087
- isCrude: () => Is,
4088
- isDark: () => rc,
4089
- isLight: () => ic,
4090
- isZero: () => Xs,
4091
- luminance: () => $s,
4092
- paletteZ: () => xc,
4093
- pickByContrast: () => nc,
4094
- rValue: () => Ks,
4095
- rgbCSS: () => Hs,
4096
- rgbString: () => Us,
4097
- rgba1: () => Ws,
4098
- rgbaCSS: () => Vs,
4099
- setAlpha: () => Qs,
4100
- stopZ: () => _c
4101
- }), Cc = Xn, wc = /* @__PURE__ */ function(e) {
4180
+ contrast: () => vc,
4181
+ crudeZ: () => Zs,
4182
+ cssString: () => tc,
4183
+ equals: () => nc,
4184
+ fromCSS: () => Oc,
4185
+ fromGradient: () => Ic,
4186
+ fromHSLA: () => kc,
4187
+ gValue: () => uc,
4188
+ gradientZ: () => Fc,
4189
+ grayness: () => _c,
4190
+ hex: () => rc,
4191
+ hsla: () => mc,
4192
+ isColor: () => ec,
4193
+ isCrude: () => $s,
4194
+ isDark: () => bc,
4195
+ isLight: () => xc,
4196
+ isZero: () => pc,
4197
+ luminance: () => gc,
4198
+ paletteZ: () => Rc,
4199
+ pickByContrast: () => yc,
4200
+ rValue: () => lc,
4201
+ rgbCSS: () => ac,
4202
+ rgbString: () => oc,
4203
+ rgba1: () => sc,
4204
+ rgbaCSS: () => ic,
4205
+ setAlpha: () => hc,
4206
+ stopZ: () => Pc
4207
+ }), Bc = ur, Vc = /* @__PURE__ */ function(e) {
4102
4208
  return e[e.exclusive = 0] = "exclusive", e[e.shared = 1] = "shared", e;
4103
- }({}), Tc = t.enum(wc), Ec = t.object({
4209
+ }({}), Hc = t.enum(Vc), Uc = t.object({
4104
4210
  key: t.string(),
4105
4211
  name: t.string(),
4106
4212
  group: t.uint32().optional()
4107
- }), Dc = (e) => t.object({
4108
- subject: Ec,
4213
+ }), Wc = (e) => t.object({
4214
+ subject: Uc,
4109
4215
  resource: e,
4110
- authority: Cc
4111
- }), Oc = {
4216
+ authority: Bc
4217
+ }), Gc = {
4112
4218
  lower: 0,
4113
4219
  upper: 256
4114
- }, kc = (...e) => (t) => t.filter((t) => {
4220
+ }, Kc = (...e) => (t) => t.filter((t) => {
4115
4221
  let n = !1;
4116
4222
  return t.to != null && (n = e.includes(t.to.resource)), t.from != null && !n && (n = e.includes(t.from.resource)), n;
4117
- }), Ac = (e) => t.object({
4118
- from: Dc(e),
4223
+ }), qc = (e) => t.object({
4224
+ from: Wc(e),
4119
4225
  to: t.null().optional()
4120
- }), jc = (e) => t.object({
4226
+ }), Jc = (e) => t.object({
4121
4227
  from: t.null().optional(),
4122
- to: Dc(e)
4123
- }), Mc = (e) => t.union([
4124
- Ac(e),
4125
- jc(e),
4228
+ to: Wc(e)
4229
+ }), Yc = (e) => t.union([
4230
+ qc(e),
4231
+ Jc(e),
4126
4232
  t.object({
4127
- from: Dc(e),
4128
- to: Dc(e)
4233
+ from: Wc(e),
4234
+ to: Wc(e)
4129
4235
  })
4130
- ]), Nc = /* @__PURE__ */ r({
4236
+ ]), Xc = /* @__PURE__ */ r({
4131
4237
  ABSOLUTE_AUTHORITY: () => 255,
4132
- AUTHORITY_BOUNDS: () => Oc,
4133
- Concurrency: () => wc,
4238
+ AUTHORITY_BOUNDS: () => Gc,
4239
+ Concurrency: () => Vc,
4134
4240
  ZERO_AUTHORITY: () => 0,
4135
- acquireZ: () => jc,
4136
- authorityZ: () => Cc,
4137
- concurrencyZ: () => Tc,
4138
- filterTransfersByChannelKey: () => kc,
4139
- releaseZ: () => Ac,
4140
- stateZ: () => Dc,
4141
- subjectZ: () => Ec,
4142
- transferZ: () => Mc
4143
- }), Pc = /* @__PURE__ */ r({ formatValue: () => Fc }), Fc = (e) => {
4241
+ acquireZ: () => Jc,
4242
+ authorityZ: () => Bc,
4243
+ concurrencyZ: () => Hc,
4244
+ filterTransfersByChannelKey: () => Kc,
4245
+ releaseZ: () => qc,
4246
+ stateZ: () => Wc,
4247
+ subjectZ: () => Uc,
4248
+ transferZ: () => Yc
4249
+ }), Zc = /* @__PURE__ */ r({ formatValue: () => Qc }), Qc = (e) => {
4144
4250
  switch (typeof e) {
4145
4251
  case "bigint":
4146
4252
  case "number": return e.toString();
@@ -4148,42 +4254,50 @@ var Yo = /* @__PURE__ */ r({
4148
4254
  case "undefined": return "";
4149
4255
  case "string":
4150
4256
  case "symbol":
4151
- case "function": return Lc(e.toString());
4152
- case "object": return e == null ? "" : Lc(JSON.stringify(e));
4153
- }
4154
- }, Ic = /[",\n]/, Lc = (e) => Ic.test(e) ? `"${e.replace(/"/g, "\"\"")}"` : e, Rc = (e, t) => {
4155
- let n = null;
4156
- return t === 0 ? e : (...r) => {
4157
- n !== null && (clearTimeout(n), n = null), n = setTimeout(() => e(...r), t);
4158
- };
4159
- }, zc = (e, t) => {
4160
- let n = null;
4161
- return t === 0 ? e : (...r) => {
4162
- n === null && (n = setTimeout(() => {
4163
- e(...r), n = null;
4164
- }, t));
4165
- };
4166
- }, Bc = /* @__PURE__ */ r({}), Vc = /* @__PURE__ */ r({
4167
- ZERO_PRIMITIVES: () => Gc,
4168
- pointerZ: () => Hc,
4169
- primitiveTypeZ: () => Wc,
4170
- primitiveZ: () => Uc
4171
- }), Hc = t.string().regex(/^(?:$|(?:\/(?:[^~/]|~0|~1)*)+)$/, "must be a valid JSON pointer (RFC 6901)"), Uc = t.union([
4257
+ case "function": return el(e.toString());
4258
+ case "object": return e == null ? "" : el(JSON.stringify(e));
4259
+ }
4260
+ }, $c = /[",\n]/, el = (e) => $c.test(e) ? `"${e.replace(/"/g, "\"\"")}"` : e, tl = () => {}, nl = (e, t) => {
4261
+ let n = new k(t);
4262
+ if (n.valueOf() <= 0) {
4263
+ let t = ((...t) => e(...t));
4264
+ return t.cancel = tl, t.flush = tl, t;
4265
+ }
4266
+ let r, i = null, a = () => {
4267
+ if (i === null) return;
4268
+ let t = i;
4269
+ i = null, e(...t);
4270
+ }, o = ((...e) => {
4271
+ i = e, clearTimeout(r), r = setTimeout(() => {
4272
+ r = void 0, a();
4273
+ }, n.milliseconds);
4274
+ });
4275
+ return o.cancel = () => {
4276
+ clearTimeout(r), r = void 0, i = null;
4277
+ }, o.flush = () => {
4278
+ r !== void 0 && (clearTimeout(r), r = void 0, a());
4279
+ }, o;
4280
+ }, rl = /* @__PURE__ */ r({ NOOP: () => il }), il = () => {}, al = /* @__PURE__ */ r({
4281
+ ZERO_PRIMITIVES: () => ll,
4282
+ pointerZ: () => ol,
4283
+ primitiveTypeZ: () => cl,
4284
+ primitiveZ: () => sl
4285
+ }), ol = t.string().regex(/^(?:$|(?:\/(?:[^~/]|~0|~1)*)+)$/, "must be a valid JSON pointer (RFC 6901)"), sl = t.union([
4172
4286
  t.string(),
4173
4287
  t.number(),
4174
4288
  t.boolean(),
4175
4289
  t.null()
4176
- ]), Wc = t.enum([
4290
+ ]), cl = t.enum([
4177
4291
  "string",
4178
4292
  "number",
4179
4293
  "boolean",
4180
4294
  "null"
4181
- ]), Gc = {
4295
+ ]), ll = {
4182
4296
  string: "",
4183
4297
  number: 0,
4184
4298
  boolean: !1,
4185
4299
  null: null
4186
- }, Kc = class {
4300
+ }, ul = class {
4187
4301
  store = /* @__PURE__ */ new Map();
4188
4302
  async get(e) {
4189
4303
  return this.store.get(e) ?? null;
@@ -4200,7 +4314,7 @@ var Yo = /* @__PURE__ */ r({
4200
4314
  async clear() {
4201
4315
  this.store.clear();
4202
4316
  }
4203
- }, qc = class {
4317
+ }, dl = class {
4204
4318
  store = /* @__PURE__ */ new Map();
4205
4319
  get(e) {
4206
4320
  return this.store.get(e) ?? null;
@@ -4211,33 +4325,33 @@ var Yo = /* @__PURE__ */ r({
4211
4325
  delete(e) {
4212
4326
  this.store.delete(e);
4213
4327
  }
4214
- }, Jc = t.object({
4328
+ }, fl = t.object({
4215
4329
  key: t.string(),
4216
4330
  value: t.string()
4217
- }), Yc = /* @__PURE__ */ r({
4218
- MockAsync: () => Kc,
4219
- MockSync: () => qc,
4220
- stringPairZ: () => Jc
4221
- }), Xc = /* @__PURE__ */ r({
4222
- keyZ: () => Zc,
4223
- labelZ: () => Qc,
4224
- newZ: () => $c
4225
- }), Zc = t.uuid(), Qc = t.object({
4226
- key: Zc,
4331
+ }), pl = /* @__PURE__ */ r({
4332
+ MockAsync: () => ul,
4333
+ MockSync: () => dl,
4334
+ stringPairZ: () => fl
4335
+ }), ml = /* @__PURE__ */ r({
4336
+ keyZ: () => hl,
4337
+ labelZ: () => gl,
4338
+ newZ: () => _l
4339
+ }), hl = t.uuid(), gl = t.object({
4340
+ key: hl,
4227
4341
  name: t.string().min(1),
4228
- color: Fs
4229
- }), $c = Qc.partial({ key: !0 }), el = /* @__PURE__ */ r({ is: () => nl }), tl = /* @__PURE__ */ RegExp("^(https?:\\/\\/)?((([a-zA-Z0-9][a-zA-Z0-9-]*\\.)+[a-zA-Z]{2,})|localhost|(\\d{1,3}\\.){3}\\d{1,3})(\\:\\d+)?(\\/[-a-zA-Z0-9@:%._\\+~#=]*)*(\\?[;&a-zA-Z0-9%_.,~+=-]*)?(#[-a-zA-Z0-9_]*)?$"), nl = (e) => tl.test(e), rl = /* @__PURE__ */ r({ getOrSetDefault: () => il }), il = (e, t, n) => {
4342
+ color: Qs
4343
+ }), _l = gl.partial({ key: !0 }), vl = /* @__PURE__ */ r({ is: () => bl }), yl = /* @__PURE__ */ RegExp("^(https?:\\/\\/)?((([a-zA-Z0-9][a-zA-Z0-9-]*\\.)+[a-zA-Z]{2,})|localhost|(\\d{1,3}\\.){3}\\d{1,3})(\\:\\d+)?(\\/[-a-zA-Z0-9@:%._\\+~#=]*)*(\\?[;&a-zA-Z0-9%_.,~+=-]*)?(#[-a-zA-Z0-9_]*)?$"), bl = (e) => yl.test(e), xl = /* @__PURE__ */ r({ getOrSetDefault: () => Sl }), Sl = (e, t, n) => {
4230
4344
  let r = e.get(t);
4231
4345
  return r === void 0 ? (e.set(t, n), n) : r;
4232
- }, al = /* @__PURE__ */ r({
4233
- compareSemVer: () => cl,
4234
- createMigration: () => fl,
4235
- migrator: () => pl,
4236
- semVerNewer: () => ul,
4237
- semVerOlder: () => dl,
4238
- semVerZ: () => ol,
4239
- versionsEqual: () => ll
4240
- }), ol = t.string().regex(/^\d+\.\d+\.\d+(-[0-9A-Za-z-]+(\.[0-9A-Za-z-]+)*)?$/), sl = (e, t) => {
4346
+ }, Cl = /* @__PURE__ */ r({
4347
+ compareSemVer: () => El,
4348
+ createMigration: () => Al,
4349
+ migrator: () => jl,
4350
+ semVerNewer: () => Ol,
4351
+ semVerOlder: () => kl,
4352
+ semVerZ: () => wl,
4353
+ versionsEqual: () => Dl
4354
+ }), wl = t.string().regex(/^\d+\.\d+\.\d+(-[0-9A-Za-z-]+(\.[0-9A-Za-z-]+)*)?$/), Tl = (e, t) => {
4241
4355
  let n = e.split("."), r = t.split("."), i = Math.max(n.length, r.length);
4242
4356
  for (let e = 0; e < i; e++) {
4243
4357
  let t = n[e], i = r[e];
@@ -4256,9 +4370,9 @@ var Yo = /* @__PURE__ */ r({
4256
4370
  }
4257
4371
  }
4258
4372
  return 0;
4259
- }, cl = ((e, t, n = {}) => {
4373
+ }, El = ((e, t, n = {}) => {
4260
4374
  n.checkMajor ??= !0, n.checkMinor ??= !0, n.checkPatch ??= !0;
4261
- let r = ol.parse(e), i = ol.parse(t), [a, o] = r.split("-"), [s, c] = i.split("-"), [l, u, d] = a.split(".").map(Number), [f, p, m] = s.split(".").map(Number);
4375
+ let r = wl.parse(e), i = wl.parse(t), [a, o] = r.split("-"), [s, c] = i.split("-"), [l, u, d] = a.split(".").map(Number), [f, p, m] = s.split(".").map(Number);
4262
4376
  if (n.checkMajor) {
4263
4377
  if (l < f) return -1;
4264
4378
  if (l > f) return 1;
@@ -4271,16 +4385,16 @@ var Yo = /* @__PURE__ */ r({
4271
4385
  if (d < m) return -1;
4272
4386
  if (d > m) return 1;
4273
4387
  }
4274
- return o === void 0 && c === void 0 ? 0 : o === void 0 ? 1 : c === void 0 ? -1 : sl(o, c);
4275
- }), ll = (e, t, n = {}) => Ur(cl(e, t, n)), ul = (e, t, n = {}) => Vr(cl(e, t, n)), dl = (e, t, n = {}) => Br(cl(e, t, n)), fl = ({ name: e, migrate: t }) => (n) => {
4388
+ return o === void 0 && c === void 0 ? 0 : o === void 0 ? 1 : c === void 0 ? -1 : Tl(o, c);
4389
+ }), Dl = (e, t, n = {}) => ai(El(e, t, n)), Ol = (e, t, n = {}) => ri(El(e, t, n)), kl = (e, t, n = {}) => ni(El(e, t, n)), Al = ({ name: e, migrate: t }) => (n) => {
4276
4390
  try {
4277
4391
  let r = t(n);
4278
4392
  return console.log(`${e} migrated: ${n.version} -> ${r.version}`), r;
4279
4393
  } catch (t) {
4280
- throw console.log(`${e} failed to migrate from ${n.version}`), console.error(t), t;
4394
+ throw console.log(`${e} failed to migrate from ${n.version}`), console.error(t), Me(t);
4281
4395
  }
4282
- }, pl = ({ name: e, migrations: t, targetSchema: n, defaultVersion: r, def: i }) => {
4283
- let a = Object.keys(t).sort(cl).pop();
4396
+ }, jl = ({ name: e, migrations: t, targetSchema: n, defaultVersion: r, def: i }) => {
4397
+ let a = Object.keys(t).sort(El).pop();
4284
4398
  if (a == null) return (t) => {
4285
4399
  if (t.version ??= r, t.version !== i.version) return console.log(`${e} version ${t.version} is newer than latest version of ${i.version}.
4286
4400
  Returning default instead.
@@ -4293,7 +4407,7 @@ var Yo = /* @__PURE__ */ r({
4293
4407
  };
4294
4408
  let o = Object.keys(t).length, s = !1, c = (n) => {
4295
4409
  try {
4296
- if (o === 0 || ul(n.version, a)) return console.log(s ? `${e} ${n.version} now up to date` : `${e} version ${n.version} is up to date with target version ${i.version}`), n;
4410
+ if (o === 0 || Ol(n.version, a)) return console.log(s ? `${e} ${n.version} now up to date` : `${e} version ${n.version} is up to date with target version ${i.version}`), n;
4297
4411
  let r = t[n.version], l = r(n);
4298
4412
  return s = !0, c(l);
4299
4413
  } catch (t) {
@@ -4309,26 +4423,29 @@ var Yo = /* @__PURE__ */ r({
4309
4423
  return console.log(`${e} failed to parse final result. Exiting with default`), console.error(t), i;
4310
4424
  }
4311
4425
  };
4312
- }, ml = /* @__PURE__ */ r({
4313
- NOTATIONS: () => hl,
4314
- notationZ: () => gl,
4315
- stringifyNumber: () => _l
4316
- }), hl = [
4317
- "standard",
4318
- "scientific",
4319
- "engineering"
4320
- ], gl = t.enum(hl), _l = (e, t, n) => {
4321
- if (Number.isNaN(e)) return "NaN";
4426
+ }, Ml = (e, t, n) => {
4427
+ if (typeof e == "bigint" && n === "standard") return t === 0 ? e.toString() : `${e}.${"0".repeat(t)}`;
4428
+ if (typeof e == "bigint" && (e = Number(e)), Number.isNaN(e)) return "NaN";
4322
4429
  if (e === Infinity) return "∞";
4323
4430
  if (e === -Infinity) return "-∞";
4324
4431
  if (n === "standard") return e.toFixed(t);
4325
4432
  if (e === 0) return t === 0 ? "0ᴇ0" : `0.${"0".repeat(t)}ᴇ0`;
4326
4433
  let r;
4327
- return r = n === "scientific" ? Math.floor(Math.log10(Math.abs(e))) : Math.floor(Math.log10(Math.abs(e)) / 3) * 3, `${(e / 10 ** r).toFixed(t)}ᴇ${r}`;
4328
- }, vl = /* @__PURE__ */ r({
4329
- BaseObserver: () => bl,
4330
- Observer: () => yl
4331
- }), yl = class {
4434
+ r = n === "scientific" ? Math.floor(Math.log10(Math.abs(e))) : Math.floor(Math.log10(Math.abs(e)) / 3) * 3;
4435
+ let i = e / 10 ** r, a = n === "scientific" ? 10 : 1e3, o = 10 ** t;
4436
+ return Math.round(Math.abs(i) * o) / o >= a && (r += n === "scientific" ? 1 : 3, i = e / 10 ** r), `${i.toFixed(t)}ᴇ${r}`;
4437
+ }, Nl = [
4438
+ "standard",
4439
+ "scientific",
4440
+ "engineering"
4441
+ ], Pl = t.enum(Nl), Fl = /* @__PURE__ */ r({
4442
+ NOTATIONS: () => Nl,
4443
+ notationZ: () => Pl,
4444
+ stringifyNumber: () => Ml
4445
+ }), Il = /* @__PURE__ */ r({}), Ll = /* @__PURE__ */ r({
4446
+ BaseObserver: () => zl,
4447
+ Observer: () => Rl
4448
+ }), Rl = class {
4332
4449
  handlers;
4333
4450
  transform;
4334
4451
  closer;
@@ -4353,7 +4470,7 @@ var Yo = /* @__PURE__ */ r({
4353
4470
  async close() {
4354
4471
  return await this.closer?.();
4355
4472
  }
4356
- }, bl = class {
4473
+ }, zl = class {
4357
4474
  handlers;
4358
4475
  constructor(e) {
4359
4476
  this.handlers = e ?? /* @__PURE__ */ new Map();
@@ -4364,93 +4481,95 @@ var Yo = /* @__PURE__ */ r({
4364
4481
  notify(e) {
4365
4482
  this.handlers.forEach((t, n) => n(e));
4366
4483
  }
4367
- }, xl = /* @__PURE__ */ r({}), Sl = /* @__PURE__ */ r({
4368
- entries: () => Tl,
4369
- keyZ: () => Cl,
4370
- map: () => El,
4371
- nullishToEmpty: () => kl,
4372
- omit: () => Ol,
4373
- purgeUndefined: () => Dl,
4374
- unknownZ: () => wl
4375
- }), Cl = t.union([t.string(), t.number()]), wl = () => t.record(Cl, t.unknown()), Tl = (e) => Object.entries(e), El = (e, t) => Object.fromEntries(Tl(e).map(([e, n]) => [e, t(n, e)])), Dl = (e) => Object.fromEntries(Tl(e).filter(([e, t]) => t !== void 0)), Ol = (e, ...t) => {
4484
+ }, Bl = /* @__PURE__ */ r({}), Vl = /* @__PURE__ */ r({
4485
+ entries: () => Wl,
4486
+ keyZ: () => Hl,
4487
+ map: () => Gl,
4488
+ nullishToEmpty: () => Jl,
4489
+ omit: () => ql,
4490
+ purgeUndefined: () => Kl,
4491
+ unknownZ: () => Ul
4492
+ }), Hl = t.union([t.string(), t.number()]), Ul = () => t.record(Hl, t.unknown()), Wl = (e) => Object.entries(e), Gl = (e, t) => Object.fromEntries(Wl(e).map(([e, n]) => [e, t(n, e)])), Kl = (e) => Object.fromEntries(Wl(e).filter(([e, t]) => t !== void 0)), ql = (e, ...t) => {
4376
4493
  let n = { ...e };
4377
4494
  for (let e of t) delete n[e];
4378
4495
  return n;
4379
- }, kl = () => t.union([t.union([t.null(), t.undefined()]).transform(() => ({})), wl()]), Al = () => typeof process < "u" && process.versions != null && process.versions.node != null ? "node" : typeof window > "u" || window.document === void 0 ? "webworker" : "browser", jl = Al(), Ml = [
4496
+ }, Jl = ((e, n) => e === void 0 || n === void 0 ? t.union([t.null().transform(() => ({})), Ul()]).default(() => ({})) : t.union([t.null().transform(() => ({})), t.record(e, n)]).default(() => ({}))), Yl = /* @__PURE__ */ r({}), Xl = () => typeof process < "u" && process.versions != null && process.versions.node != null ? "node" : typeof window > "u" || window.document === void 0 ? "webworker" : "browser", Zl = Xl(), Ql = [
4380
4497
  "macOS",
4381
4498
  "Windows",
4382
4499
  "Linux"
4383
- ], Nl = [
4500
+ ], $l = [
4384
4501
  "macos",
4385
4502
  "windows",
4386
4503
  "linux"
4387
- ], Pl = {
4504
+ ], eu = {
4388
4505
  macos: "macOS",
4389
4506
  windows: "Windows",
4390
4507
  linux: "Linux"
4391
- }, Fl = t.enum(Ml).or(t.enum(Nl).transform((e) => Pl[e])), Il = () => {
4508
+ }, tu = t.enum(Ql).or(t.enum($l).transform((e) => eu[e])), nu = () => {
4392
4509
  if (typeof window > "u") return;
4393
4510
  let e = window.navigator.userAgent.toLowerCase();
4394
4511
  if (e.includes("mac")) return "macOS";
4395
4512
  if (e.includes("win")) return "Windows";
4396
4513
  if (e.includes("linux")) return "Linux";
4397
- }, Ll, Rl = ((e = {}) => {
4514
+ }, ru, iu = ((e = {}) => {
4398
4515
  let { force: t, default: n } = e;
4399
- return t ?? Ll ?? (Ll = Il(), Ll ?? n);
4400
- }), zl = /* @__PURE__ */ r({
4401
- OPERATING_SYSTEMS: () => Ml,
4402
- RUNTIME: () => jl,
4403
- detect: () => Al,
4404
- getOS: () => Rl,
4405
- osZ: () => Fl
4406
- }), Bl = /* @__PURE__ */ r({
4407
- flushMicrotasks: () => Vl,
4408
- flushTaskQueue: () => Hl
4409
- }), Vl = () => Promise.resolve(), Hl = () => new Promise((e) => setTimeout(e, 0)), Ul = /* @__PURE__ */ r({ copy: () => Wl }), Wl = (e) => Array.isArray(e) ? [...e] : typeof e == "object" && e ? { ...e } : e, Gl = t.object({
4516
+ return t ?? ru ?? (ru = nu(), ru ?? n);
4517
+ }), au = /* @__PURE__ */ r({
4518
+ OPERATING_SYSTEMS: () => Ql,
4519
+ RUNTIME: () => Zl,
4520
+ detect: () => Xl,
4521
+ getOS: () => iu,
4522
+ osZ: () => tu
4523
+ }), ou = /* @__PURE__ */ r({
4524
+ flushMicrotasks: () => su,
4525
+ flushTaskQueue: () => cu
4526
+ }), su = () => Promise.resolve(), cu = () => new Promise((e) => setTimeout(e, 0)), lu = /* @__PURE__ */ r({ copy: () => uu }), uu = (e) => Array.isArray(e) ? [...e] : typeof e == "object" && e ? { ...e } : e, du = t.object({
4410
4527
  message: t.string().optional(),
4411
4528
  description: t.string().optional(),
4412
- details: wl().optional()
4413
- }), Kl = (e) => "toStatus" in e && typeof e.toStatus == "function", ql = (e) => {
4414
- if (!Kl(e)) return;
4529
+ details: Ul().optional()
4530
+ }), fu = (e) => {
4531
+ if (typeof e != "object" || !e || !("toStatus" in e) || typeof e.toStatus != "function") return;
4415
4532
  let t;
4416
4533
  try {
4417
4534
  t = e.toStatus();
4418
4535
  } catch {
4419
4536
  return;
4420
4537
  }
4421
- let n = Gl.safeParse(t);
4538
+ let n = du.safeParse(t);
4422
4539
  return n.success ? n.data : void 0;
4423
- }, Jl = t.object({
4540
+ }, pu = t.object({
4424
4541
  stack: t.string(),
4425
4542
  error: t.instanceof(Error)
4426
- }).and(wl()), Yl = (e, t) => {
4427
- if (!(e instanceof Error)) throw e;
4428
- let n = {
4543
+ }).and(Ul()), mu = (e, t) => {
4544
+ let n = Me(e), r = {
4429
4545
  variant: "error",
4430
- message: t ?? e.message,
4431
- description: t == null ? void 0 : e.message,
4546
+ message: t ?? n.message,
4547
+ description: t == null ? void 0 : n.message,
4432
4548
  details: {
4433
- stack: e.stack ?? "",
4434
- error: e
4549
+ stack: n.stack ?? "",
4550
+ error: n
4435
4551
  }
4436
- }, r = ql(e);
4437
- return r != null && (t != null && r.message != null ? n.message = `${t}: ${r.message}` : r.message != null && (n.message = r.message), r.description != null && (n.description = r.description), r.details != null && n.details != null && (n.details = {
4438
- ...n.details,
4439
- ...r.details
4440
- })), Xl(n);
4441
- }, Xl = (e) => ({
4442
- key: ei(),
4443
- time: E.now(),
4552
+ }, i = fu(e);
4553
+ return i != null && (t != null && i.message != null ? r.message = `${t}: ${i.message}` : i.message != null && (r.message = i.message), i.description != null && (r.description = i.description), i.details != null && r.details != null && (r.details = {
4554
+ ...r.details,
4555
+ ...i.details
4556
+ })), gu(r);
4557
+ }, hu = (e) => {
4558
+ let t = e.details.error, n = Error(e.message, { cause: e });
4559
+ return n.name = t.name, n.stack = t.stack, n;
4560
+ }, gu = (e) => ({
4561
+ key: gi(),
4562
+ time: O.now(),
4444
4563
  name: "",
4445
4564
  ...e
4446
- }), Zl = (e, t = []) => {
4565
+ }), _u = (e, t = []) => {
4447
4566
  if (e != null) return Array.isArray(t) ? t.includes(e) ? e : void 0 : t === e ? e : void 0;
4448
- }, Ql = (e, t = []) => {
4567
+ }, vu = (e, t = []) => {
4449
4568
  if (e != null) return Array.isArray(t) ? t.includes(e) ? void 0 : e : t === e ? void 0 : e;
4450
- }, $l = {
4569
+ }, yu = {
4451
4570
  includeTimestamp: !1,
4452
4571
  includeName: !0
4453
- }, eu = (e) => {
4572
+ }, bu = (e) => {
4454
4573
  if (e.includes("\n")) return `Description:\n${e}`;
4455
4574
  try {
4456
4575
  let t = JSON.parse(e);
@@ -4458,71 +4577,72 @@ var Yo = /* @__PURE__ */ r({
4458
4577
  } catch {
4459
4578
  return `Description: ${e}`;
4460
4579
  }
4461
- }, tu = (e, t = {}) => {
4580
+ }, xu = (e, t = {}) => {
4462
4581
  let n = {
4463
- ...$l,
4582
+ ...yu,
4464
4583
  ...t
4465
4584
  }, r = [], i = e.variant.toUpperCase();
4466
- if (n.includeName && at(e.name) && (i += ` [${e.name}]`), i += `: ${e.message}`, n.includeTimestamp && (i += ` (${e.time.toString("dateTime", "local")})`), r.push(i), e.description != null && r.push(eu(e.description)), "details" in e && g(e.details)) {
4585
+ if (n.includeName && st(e.name) && (i += ` [${e.name}]`), i += `: ${e.message}`, n.includeTimestamp && (i += ` (${e.time.toString("dateTime", "local")})`), r.push(i), e.description != null && r.push(bu(e.description)), "details" in e && g(e.details)) {
4467
4586
  let t = e.details;
4468
4587
  "stack" in t && typeof t.stack == "string" && t.stack !== "" && r.push(`Stack Trace:\n${t.stack}`);
4469
4588
  let n = Object.fromEntries(Object.entries(t).filter(([e]) => e !== "stack" && e !== "error"));
4470
4589
  Object.keys(n).length > 0 && r.push(`Details:\n${JSON.stringify(n, null, 2)}`);
4471
4590
  }
4472
4591
  return r.join("\n\n");
4473
- }, nu = [
4592
+ }, Su = [
4474
4593
  "success",
4475
4594
  "info",
4476
4595
  "warning",
4477
4596
  "error",
4478
4597
  "loading",
4479
4598
  "disabled"
4480
- ], ru = t.enum(nu), iu = t.literal("success"), au = t.literal("info"), ou = t.literal("warning"), su = t.literal("error"), cu = t.literal("loading"), lu = t.literal("disabled"), uu = ({ details: e, v: n } = {}) => t.object({
4481
- key: t.string().default(() => ei()),
4599
+ ], Cu = t.enum(Su), wu = t.literal("success"), Tu = t.literal("info"), Eu = t.literal("warning"), Du = t.literal("error"), Ou = t.literal("loading"), ku = t.literal("disabled"), Au = ({ details: e, v: n } = {}) => t.object({
4600
+ key: t.string().default(() => gi()),
4482
4601
  name: t.string().default(""),
4483
- variant: n ?? ru,
4602
+ variant: n ?? Cu,
4484
4603
  message: t.string(),
4485
4604
  description: t.string().optional(),
4486
- time: Cr.default(() => E.now()),
4605
+ time: Lr.default(() => O.now()),
4487
4606
  details: e ?? t.unknown().optional(),
4488
- labels: pe(Qc.array())
4489
- }), du = ({ details: e, v: t } = {}) => uu({
4607
+ labels: pe(gl.array())
4608
+ }), ju = ({ details: e, v: t } = {}) => Au({
4490
4609
  details: e,
4491
4610
  v: t
4492
4611
  }).partial({
4493
4612
  key: !0,
4494
4613
  name: !0,
4495
4614
  time: !0
4496
- }), fu = /* @__PURE__ */ r({
4497
- VARIANTS: () => nu,
4498
- create: () => Xl,
4499
- disabledVariantZ: () => lu,
4500
- errorVariantZ: () => su,
4501
- exceptionDetailsSchema: () => Jl,
4502
- fromException: () => Yl,
4503
- infoVariantZ: () => au,
4504
- keepVariants: () => Zl,
4505
- loadingVariantZ: () => cu,
4506
- newZ: () => du,
4507
- removeVariants: () => Ql,
4508
- statusZ: () => uu,
4509
- successVariantZ: () => iu,
4510
- toString: () => tu,
4511
- variantZ: () => ru,
4512
- warningVariantZ: () => ou
4513
- }), pu = (e, t) => {
4615
+ }), Mu = /* @__PURE__ */ r({
4616
+ VARIANTS: () => Su,
4617
+ create: () => gu,
4618
+ disabledVariantZ: () => ku,
4619
+ errorVariantZ: () => Du,
4620
+ exceptionDetailsSchema: () => pu,
4621
+ fromException: () => mu,
4622
+ infoVariantZ: () => Tu,
4623
+ keepVariants: () => _u,
4624
+ loadingVariantZ: () => Ou,
4625
+ newZ: () => ju,
4626
+ removeVariants: () => vu,
4627
+ statusZ: () => Au,
4628
+ successVariantZ: () => wu,
4629
+ toError: () => hu,
4630
+ toString: () => xu,
4631
+ variantZ: () => Cu,
4632
+ warningVariantZ: () => Eu
4633
+ }), Nu = (e, t) => {
4514
4634
  if (!t.has(e)) return e;
4515
4635
  let n, r, i = e;
4516
4636
  for (; t.has(i);) {
4517
- let e = i.match(mu);
4637
+ let e = i.match(Pu);
4518
4638
  e ? (n = i.slice(0, e.index).trim(), r = parseInt(e[1], 10) + 1) : (n = i, r = 1), i = `${n} (${r})`;
4519
4639
  }
4520
4640
  return i;
4521
- }, mu = /\((\d+)\)$/, hu = (e, t = "") => {
4641
+ }, Pu = /\((\d+)\)$/, Fu = (e, t = "") => {
4522
4642
  if (typeof e == "string") return e;
4523
4643
  let n = e.length;
4524
4644
  return n === 0 ? t : n === 1 ? e[0] : n === 2 ? `${e[0]} and ${e[1]}` : `${e.slice(0, -1).join(", ")}, and ${e[n - 1]}`;
4525
- }, gu = (e) => {
4645
+ }, Iu = (e) => {
4526
4646
  let t = e.split(" "), n = /* @__PURE__ */ new Set(), r = t.map((e) => e.charAt(0).toLowerCase()).join("");
4527
4647
  n.add(r.replace(/-/g, "_")), n.add(r.replace(/(.)(.)/g, "$1_$2").replace(/-/g, "_"));
4528
4648
  let i = /\d+/g;
@@ -4534,13 +4654,13 @@ var Yo = /* @__PURE__ */ r({
4534
4654
  });
4535
4655
  let a = t.map((e) => (e.length > 3 ? e.substring(0, 3) : e).toLowerCase());
4536
4656
  return n.add(a.join("").replace(/-/g, "_")), n.add(a.join("_").replace(/-/g, "_")), Array.from(n).filter((e) => e.length >= 2 && e.length <= 12 && !/^\d/.test(e));
4537
- }, _u = (e, t) => e.startsWith(t) ? e.slice(t.length) : e, vu = (e) => e.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;").replace(/'/g, "&#39;"), yu = /* @__PURE__ */ r({
4538
- createShortIdentifiers: () => gu,
4539
- deduplicateFileName: () => pu,
4540
- escapeHTML: () => vu,
4541
- naturalLanguageJoin: () => hu,
4542
- trimPrefix: () => _u
4543
- }), bu = /* @__PURE__ */ Error("request for lock canceled"), xu = function(e, t, n, r) {
4657
+ }, Lu = (e, t) => e.startsWith(t) ? e.slice(t.length) : e, Ru = (e) => e.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;").replace(/'/g, "&#39;"), zu = /* @__PURE__ */ r({
4658
+ createShortIdentifiers: () => Iu,
4659
+ deduplicateFileName: () => Nu,
4660
+ escapeHTML: () => Ru,
4661
+ naturalLanguageJoin: () => Fu,
4662
+ trimPrefix: () => Lu
4663
+ }), Bu = /* @__PURE__ */ Error("request for lock canceled"), Vu = function(e, t, n, r) {
4544
4664
  function i(e) {
4545
4665
  return e instanceof n ? e : new n(function(t) {
4546
4666
  t(e);
@@ -4566,8 +4686,8 @@ var Yo = /* @__PURE__ */ r({
4566
4686
  }
4567
4687
  c((r = r.apply(e, t || [])).next());
4568
4688
  });
4569
- }, Su = class {
4570
- constructor(e, t = bu) {
4689
+ }, Hu = class {
4690
+ constructor(e, t = Bu) {
4571
4691
  this._value = e, this._cancelError = t, this._queue = [], this._weightedWaiters = [];
4572
4692
  }
4573
4693
  acquire(e = 1, t = 0) {
@@ -4578,12 +4698,12 @@ var Yo = /* @__PURE__ */ r({
4578
4698
  reject: r,
4579
4699
  weight: e,
4580
4700
  priority: t
4581
- }, a = wu(this._queue, (e) => t <= e.priority);
4701
+ }, a = Wu(this._queue, (e) => t <= e.priority);
4582
4702
  a === -1 && e <= this._value ? this._dispatchItem(i) : this._queue.splice(a + 1, 0, i);
4583
4703
  });
4584
4704
  }
4585
4705
  runExclusive(e) {
4586
- return xu(this, arguments, void 0, function* (e, t = 1, n = 0) {
4706
+ return Vu(this, arguments, void 0, function* (e, t = 1, n = 0) {
4587
4707
  let [r, i] = yield this.acquire(t, n);
4588
4708
  try {
4589
4709
  return yield e(r);
@@ -4595,7 +4715,7 @@ var Yo = /* @__PURE__ */ r({
4595
4715
  waitForUnlock(e = 1, t = 0) {
4596
4716
  if (e <= 0) throw Error(`invalid weight ${e}: must be positive`);
4597
4717
  return this._couldLockImmediately(e, t) ? Promise.resolve() : new Promise((n) => {
4598
- this._weightedWaiters[e - 1] || (this._weightedWaiters[e - 1] = []), Cu(this._weightedWaiters[e - 1], {
4718
+ this._weightedWaiters[e - 1] || (this._weightedWaiters[e - 1] = []), Uu(this._weightedWaiters[e - 1], {
4599
4719
  resolve: n,
4600
4720
  priority: t
4601
4721
  });
@@ -4649,15 +4769,15 @@ var Yo = /* @__PURE__ */ r({
4649
4769
  return (this._queue.length === 0 || this._queue[0].priority < t) && e <= this._value;
4650
4770
  }
4651
4771
  };
4652
- function Cu(e, t) {
4653
- let n = wu(e, (e) => t.priority <= e.priority);
4772
+ function Uu(e, t) {
4773
+ let n = Wu(e, (e) => t.priority <= e.priority);
4654
4774
  e.splice(n + 1, 0, t);
4655
4775
  }
4656
- function wu(e, t) {
4776
+ function Wu(e, t) {
4657
4777
  for (let n = e.length - 1; n >= 0; n--) if (t(e[n])) return n;
4658
4778
  return -1;
4659
4779
  }
4660
- var Tu = function(e, t, n, r) {
4780
+ var Gu = function(e, t, n, r) {
4661
4781
  function i(e) {
4662
4782
  return e instanceof n ? e : new n(function(t) {
4663
4783
  t(e);
@@ -4683,12 +4803,12 @@ var Tu = function(e, t, n, r) {
4683
4803
  }
4684
4804
  c((r = r.apply(e, t || [])).next());
4685
4805
  });
4686
- }, Eu = class {
4806
+ }, Ku = class {
4687
4807
  constructor(e) {
4688
- this._semaphore = new Su(1, e);
4808
+ this._semaphore = new Hu(1, e);
4689
4809
  }
4690
4810
  acquire() {
4691
- return Tu(this, arguments, void 0, function* (e = 0) {
4811
+ return Gu(this, arguments, void 0, function* (e = 0) {
4692
4812
  let [, t] = yield this._semaphore.acquire(1, e);
4693
4813
  return t;
4694
4814
  });
@@ -4708,26 +4828,74 @@ var Tu = function(e, t, n, r) {
4708
4828
  cancel() {
4709
4829
  return this._semaphore.cancel();
4710
4830
  }
4711
- }, Du = /* @__PURE__ */ r({
4712
- mutex: () => Ou,
4713
- newMutex: () => ku
4714
- }), Ou = class extends Eu {
4831
+ }, qu = /* @__PURE__ */ r({
4832
+ mutex: () => Ju,
4833
+ newMutex: () => Yu
4834
+ }), Ju = class extends Ku {
4715
4835
  constructor(e) {
4716
4836
  super(), Object.assign(this, e);
4717
4837
  }
4718
- }, ku = (e) => new Ou(e), Au = /* @__PURE__ */ r({
4719
- expectAlways: () => Mu,
4720
- toString: () => ju
4721
- }), ju = (e) => JSON.stringify(e, (e, t) => typeof t == "bigint" ? t.toString() : t), Mu = async (e, t = 200, n = 20) => {
4838
+ }, Yu = (e) => new Ju(e), Xu = /* @__PURE__ */ r({
4839
+ expectAlways: () => Qu,
4840
+ toString: () => Zu
4841
+ }), Zu = (e) => JSON.stringify(e, (e, t) => typeof t == "bigint" ? t.toString() : t), Qu = async (e, t = 200, n = 20) => {
4722
4842
  let r = Date.now();
4723
4843
  for (; Date.now() - r < t;) await e(), await new Promise((e) => setTimeout(e, n));
4724
- }, Nu = (...e) => e.map(Pu).join(""), Pu = (e) => (e.endsWith("/") || (e += "/"), e.startsWith("/") && (e = e.slice(1)), e), Fu = (e) => e.endsWith("/") ? e.slice(0, -1) : e, Iu = (e, t = "") => e === null ? "" : `?${Object.entries(e).filter(([, e]) => e == null ? !1 : Array.isArray(e) ? e.length > 0 : !0).map(([e, n]) => `${t}${e}=${n}`).join("&")}`, Lu = class e {
4844
+ }, $u = [
4845
+ "h1",
4846
+ "h2",
4847
+ "h3",
4848
+ "h4",
4849
+ "h5",
4850
+ "p",
4851
+ "small"
4852
+ ], ed = t.enum($u), td = (e) => {
4853
+ let t = $u.indexOf(e);
4854
+ return t === -1 || t === $u.length - 1 ? e : $u[t + 1];
4855
+ }, nd = t.union([t.number(), t.enum([
4856
+ "normal",
4857
+ "bold",
4858
+ "bolder",
4859
+ "lighter"
4860
+ ])]), rd = t.object({
4861
+ size: t.number(),
4862
+ weight: t.union([t.number(), t.string()]),
4863
+ lineHeight: t.number(),
4864
+ textTransform: t.string().optional()
4865
+ }), id = /* @__PURE__ */ r({
4866
+ LEVELS: () => $u,
4867
+ downLevel: () => td,
4868
+ levelZ: () => ed,
4869
+ specZ: () => rd,
4870
+ weightZ: () => nd
4871
+ }), ad = (e, t) => {
4872
+ let n = new k(t);
4873
+ if (n.valueOf() <= 0) return e;
4874
+ let r, i = O.MIN, a = null, o = () => {
4875
+ if (a === null) return;
4876
+ i = O.now();
4877
+ let t = a;
4878
+ a = null, e(...t);
4879
+ };
4880
+ return (...e) => {
4881
+ let t = O.since(i);
4882
+ a = e;
4883
+ let s = n.sub(t);
4884
+ if (s.valueOf() <= 0 || s.greaterThan(n)) {
4885
+ clearTimeout(r), r = void 0, o();
4886
+ return;
4887
+ }
4888
+ r ??= setTimeout(() => {
4889
+ r = void 0, o();
4890
+ }, s.milliseconds);
4891
+ };
4892
+ }, od = (...e) => e.map(sd).join(""), sd = (e) => (e.endsWith("/") || (e += "/"), e.startsWith("/") && (e = e.slice(1)), e), cd = (e) => e.endsWith("/") ? e.slice(0, -1) : e, ld = (e, t = "") => e === null ? "" : `?${Object.entries(e).filter(([, e]) => e == null ? !1 : Array.isArray(e) ? e.length > 0 : !0).map(([e, n]) => `${t}${e}=${n}`).join("&")}`, ud = class e {
4725
4893
  protocol;
4726
4894
  host;
4727
4895
  port;
4728
4896
  path;
4729
4897
  constructor({ host: e, port: t, protocol: n = "", pathPrefix: r = "" }) {
4730
- this.protocol = n, this.host = e, this.port = t, this.path = Pu(r);
4898
+ this.protocol = n, this.host = e, this.port = t, this.path = sd(r);
4731
4899
  }
4732
4900
  replace(t) {
4733
4901
  return new e({
@@ -4740,52 +4908,16 @@ var Tu = function(e, t, n, r) {
4740
4908
  child(t) {
4741
4909
  return new e({
4742
4910
  ...this,
4743
- pathPrefix: Nu(this.path, t)
4911
+ pathPrefix: od(this.path, t)
4744
4912
  });
4745
4913
  }
4746
4914
  toString() {
4747
- return Fu(`${this.protocol}://${this.host}:${this.port}/${this.path}`);
4915
+ return cd(`${this.protocol}://${this.host}:${this.port}/${this.path}`);
4748
4916
  }
4749
4917
  static UNKNOWN = new e({
4750
4918
  host: "unknown",
4751
4919
  port: 0
4752
4920
  });
4753
- }, Ru = class {
4754
- sender;
4755
- handlers;
4756
- constructor(e) {
4757
- this.sender = e, this.handlers = /* @__PURE__ */ new Map();
4758
- }
4759
- handle({ data: e }) {
4760
- let t = this.handlers.get(e.type)?.handler;
4761
- t == null ? console.warn(`No handler for ${e.type}`) : t(e.payload);
4762
- }
4763
- route(e) {
4764
- let t = new Bu(zu(e, this.sender));
4765
- return this.handlers.set(e, t), t;
4766
- }
4767
- }, zu = (e, t) => (n, r) => t({
4768
- type: e,
4769
- payload: n
4770
- }, r), Bu = class {
4771
- _send;
4772
- handler;
4773
- constructor(e) {
4774
- this._send = e, this.handler = null;
4775
- }
4776
- send(e, t = []) {
4777
- this._send(e, t);
4778
- }
4779
- handle(e) {
4780
- this.handler = e;
4781
- }
4782
- }, Vu = () => {
4783
- let e, t;
4784
- return e = new Ru((e) => {
4785
- t.handle({ data: e });
4786
- }), t = new Ru((t) => {
4787
- e.handle({ data: t });
4788
- }), [e, t];
4789
4921
  };
4790
4922
  //#endregion
4791
- export { kr as ClockSkewCalculator, j as DataType, k as Density, fs as MultiSeries, Vi as OUTER_LOCATIONS, O as Rate, Ru as RoutedWorker, is as Series, M as Size, A as TimeRange, D as TimeSpan, E as TimeStamp, Bu as TypedWorker, Lu as URL, u as array, or as binary, vn as bounds, _a as box, ys as breaker, Iu as buildQueryString, d as caseconv, Ss as change, vo as clamp, Sc as color, qr as compare, Nc as control, xr as convertDataType, Vu as createMockWorkers, Pc as csv, Dr as dataTypeZ, Rc as debounce, Me as deep, Bc as destructor, oo as dimensions, ri as direction, Fe as errors, tt as fmt, Yr as id, ti as instance, as as isCrudeSeries, br as isTelemValue, Vc as json, Yc as kv, Xc as label, el as link, fi as location, rl as map, Kn as math, al as migrate, de as narrow, ml as notation, vr as numericTimeRangeZ, vl as observe, xl as optional, Hi as outerLocationZ, nt as primitive, Tr as rateZ, Sl as record, zl as runtime, yo as scale, Bl as scheduler, Ul as shallow, Er as sizeZ, _s as sleep, Ao as spatial, fu as status, jo as sticky, yu as strings, Du as sync, gs as telem, Au as testutil, zc as throttle, Or as timeRangeBoundedZ, Sr as timeRangeZ, wr as timeSpanZ, Cr as timeStampZ, yr as typedArrayZ, Ar as unique, Yo as uuid, Ui as xy, I as xyZ, ar as zod };
4923
+ export { Ur as ClockSkewCalculator, N as DataType, j as Density, Ts as MultiSeries, A as Rate, _s as Series, P as Size, ks as TIMESTAMP_FORMATS, js as TIME_ZONES, M as TimeRange, k as TimeSpan, O as TimeStamp, ud as URL, u as array, br as binary, Mn as bounds, Ma as box, Is as breaker, ld as buildQueryString, d as caseconv, zs as change, No as clamp, zc as color, li as compare, Xc as control, Fr as convertDataType, Zc as csv, Vr as dataTypeZ, nl as debounce, Ye as deep, rl as destructor, So as dimensions, yi as direction, Oe as errors, nt as fmt, di as id, _i as instance, vs as isCrudeSeries, Pr as isTelemValue, al as json, pl as kv, ml as label, vl as link, Oi as location, xl as map, or as math, Cl as migrate, de as narrow, Fl as notation, Il as numeric, Mr as numericTimeRangeZ, Ll as observe, Bl as optional, rt as primitive, zr as rateZ, Vl as record, Yl as require, au as runtime, Po as scale, ou as scheduler, lu as shallow, Br as sizeZ, Ps as sleep, Zt as spatial, Mu as status, Go as sticky, zu as strings, qu as sync, Ns as telem, Xu as testutil, id as text, ad as throttle, Hr as timeRangeBoundedZ, Ir as timeRangeZ, Rr as timeSpanZ, Lr as timeStampZ, Ms as timeZoneZ, As as timestampFormatZ, Nr as typedArrayZ, Wr as unique, ss as uuid, ia as xy, yr as zod };