@synnaxlabs/x 0.46.2 → 0.47.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (70) hide show
  1. package/.turbo/turbo-build.log +17 -17
  2. package/dist/{bounds-DeUXrllt.js → bounds-4BWKPqaP.js} +1 -4
  3. package/dist/bounds.js +1 -1
  4. package/dist/{index-C452Pas0.js → compare-Bnx9CdjS.js} +37 -47
  5. package/dist/compare-GPoFaKRW.cjs +1 -0
  6. package/dist/compare.cjs +1 -1
  7. package/dist/compare.js +34 -2
  8. package/dist/eslint.config.d.ts +3 -0
  9. package/dist/eslint.config.d.ts.map +1 -0
  10. package/dist/{index-D4NCYiQB.js → index-Bv029kh3.js} +2 -2
  11. package/dist/{index-udOjA9d-.cjs → index-CqisIWWC.cjs} +1 -1
  12. package/dist/index.cjs +3 -3
  13. package/dist/index.js +206 -201
  14. package/dist/{scale-BBWhTUqJ.js → scale-DJCMZbfU.js} +1 -1
  15. package/dist/scale.js +1 -1
  16. package/dist/series-Bh0pHoUF.cjs +6 -0
  17. package/dist/{series-Clbw-fZI.js → series-Cf8rT2IX.js} +7 -7
  18. package/dist/spatial.js +2 -2
  19. package/dist/src/array/nullable.d.ts.map +1 -1
  20. package/dist/src/compare/binary.d.ts +25 -0
  21. package/dist/src/compare/binary.d.ts.map +1 -0
  22. package/dist/src/compare/binary.spec.d.ts +2 -0
  23. package/dist/src/compare/binary.spec.d.ts.map +1 -0
  24. package/dist/src/compare/external.d.ts +3 -0
  25. package/dist/src/compare/external.d.ts.map +1 -0
  26. package/dist/src/compare/index.d.ts +1 -1
  27. package/dist/src/compare/index.d.ts.map +1 -1
  28. package/dist/src/csv/csv.d.ts +11 -0
  29. package/dist/src/csv/csv.d.ts.map +1 -0
  30. package/dist/src/csv/csv.spec.d.ts +2 -0
  31. package/dist/src/csv/csv.spec.d.ts.map +1 -0
  32. package/dist/src/csv/index.d.ts +2 -0
  33. package/dist/src/csv/index.d.ts.map +1 -0
  34. package/dist/src/index.d.ts +1 -0
  35. package/dist/src/index.d.ts.map +1 -1
  36. package/dist/src/spatial/bounds/bounds.d.ts.map +1 -1
  37. package/dist/src/spatial/box/box.d.ts +5 -5
  38. package/dist/src/spatial/box/box.d.ts.map +1 -1
  39. package/dist/src/spatial/scale/scale.d.ts +6 -6
  40. package/dist/src/spatial/scale/scale.d.ts.map +1 -1
  41. package/dist/telem.cjs +1 -1
  42. package/dist/telem.js +1 -1
  43. package/dist/unique.cjs +1 -1
  44. package/dist/unique.js +1 -1
  45. package/package.json +4 -4
  46. package/src/array/nullable.ts +9 -0
  47. package/src/compare/binary.spec.ts +308 -0
  48. package/src/compare/binary.ts +50 -0
  49. package/src/compare/external.ts +11 -0
  50. package/src/compare/index.ts +1 -1
  51. package/src/csv/csv.spec.ts +28 -0
  52. package/src/csv/csv.ts +26 -0
  53. package/src/csv/index.ts +10 -0
  54. package/src/index.ts +1 -0
  55. package/src/jsonrpc/jsonrpc.spec.ts +9 -0
  56. package/src/math/round.spec.ts +2 -1
  57. package/src/spatial/bounds/bounds.spec.ts +1 -1
  58. package/src/spatial/bounds/bounds.ts +9 -12
  59. package/src/spatial/box/box.spec.ts +3 -3
  60. package/src/spatial/box/box.ts +5 -5
  61. package/src/spatial/dimensions/dimensions.spec.ts +1 -1
  62. package/src/spatial/direction/direction.spec.ts +1 -1
  63. package/src/spatial/location/location.spec.ts +1 -1
  64. package/src/spatial/scale/scale.spec.ts +1 -1
  65. package/src/spatial/scale/scale.ts +7 -7
  66. package/tsconfig.json +1 -1
  67. package/tsconfig.tsbuildinfo +1 -1
  68. package/dist/index-xaxa1hoa.cjs +0 -1
  69. package/dist/series-B2zqvP8A.cjs +0 -6
  70. /package/{eslint.config.js → eslint.config.ts} +0 -0
package/dist/index.js CHANGED
@@ -1,35 +1,36 @@
1
1
  import { n as xe } from "./external-Du5qzfYv.js";
2
- import { e as tn } from "./external-Du5qzfYv.js";
2
+ import { e as sn } from "./external-Du5qzfYv.js";
3
3
  import { J as Te } from "./index-yz34Wc2p.js";
4
- import { c as nn } from "./index-yz34Wc2p.js";
4
+ import { c as an } from "./index-yz34Wc2p.js";
5
5
  import h, { z as a } from "zod";
6
- import { h as $e, j as je, k as Ne, l as Ee, m as Ie, o as Oe, p as Ae, q as ke, r as Pe, s as Re, u as Ze, v as Ce, w as Le, x as Ue, y as qe, a as _, T as X, z as We } from "./series-Clbw-fZI.js";
7
- import { c as on, D as an, M as cn, R as ln, S as un, d as fn, b as dn, g as hn, f as mn, A as pn, B as gn, i as bn, e as _n, n as yn, t as wn, C as Mn } from "./series-Clbw-fZI.js";
8
- import { a as vn } from "./index-qmkoZBNO.js";
9
- import { c as Tn } from "./change-DLl6DccR.js";
10
- import { c as jn, s as Nn } from "./scale-BBWhTUqJ.js";
11
- import { a as ze, b as De, c as Be, L as R, G as Z, E as Fe } from "./index-C452Pas0.js";
12
- import { d as In, p as On } from "./index-C452Pas0.js";
13
- import { debounce as kn, throttle as Pn } from "./debounce.js";
14
- import { deep as Zn } from "./deep.js";
15
- import { isObject as Ln } from "./identity.js";
16
- import { e as qn } from "./external-BYuXBYJh.js";
17
- import { link as zn } from "./link.js";
18
- import { i as G, j as Ve, a as He, k as Xe, d as Ge, l as Je, n as Qe, o as Ye, p as Ke, m as et, r as tt, s as rt } from "./bounds-DeUXrllt.js";
19
- import { b as Bn } from "./bounds-DeUXrllt.js";
20
- import { observe as Vn } from "./observe.js";
21
- import { r as Xn } from "./record-tSFQKmdG.js";
22
- import { e as Jn } from "./external-B80i4ymZ.js";
23
- import { b as Yn } from "./box-BXWXSkKu.js";
24
- import { d as es } from "./dimensions-DC0uLPwn.js";
25
- import { d as rs } from "./direction-C_b4tfRN.js";
26
- import { l as ss } from "./location-BIzpxczO.js";
27
- import { s as is } from "./spatial-DnsaOypA.js";
28
- import { x as cs } from "./xy-DnrCAZaw.js";
29
- import { u as us } from "./index-D4NCYiQB.js";
30
- import { URL as ds, buildQueryString as hs } from "./url.js";
31
- import { RoutedWorker as ps, TypedWorker as gs, createMockWorkers as bs } from "./worker.js";
32
- import { e as ys } from "./external-2YWy569j.js";
6
+ import { h as $e, j as je, k as Ne, l as Ee, m as Ie, o as Oe, p as Ae, q as ke, r as Pe, s as Re, u as Ze, v as Ce, w as Le, x as Ue, y as qe, a as _, T as X, z as ze } from "./series-Cf8rT2IX.js";
7
+ import { c as ln, D as un, M as fn, R as dn, S as hn, d as mn, b as pn, g as gn, f as bn, A as _n, B as yn, i as wn, e as Mn, n as Sn, t as vn, C as xn } from "./series-Cf8rT2IX.js";
8
+ import { a as $n } from "./index-qmkoZBNO.js";
9
+ import { c as Nn } from "./change-DLl6DccR.js";
10
+ import { c as In, s as On } from "./scale-DJCMZbfU.js";
11
+ import { compare as kn } from "./compare.js";
12
+ import { debounce as Rn, throttle as Zn } from "./debounce.js";
13
+ import { deep as Ln } from "./deep.js";
14
+ import { isObject as qn } from "./identity.js";
15
+ import { e as Wn } from "./external-BYuXBYJh.js";
16
+ import { link as Bn } from "./link.js";
17
+ import { i as G, j as We, a as De, k as Be, d as Fe, l as Ve, n as He, o as Xe, p as Ge, m as Je, r as Qe, s as Ye } from "./bounds-4BWKPqaP.js";
18
+ import { b as Vn } from "./bounds-4BWKPqaP.js";
19
+ import { a as Ke, b as et, c as tt, L as R, G as Z, E as rt } from "./compare-Bnx9CdjS.js";
20
+ import { p as Xn } from "./compare-Bnx9CdjS.js";
21
+ import { observe as Jn } from "./observe.js";
22
+ import { r as Yn } from "./record-tSFQKmdG.js";
23
+ import { e as es } from "./external-B80i4ymZ.js";
24
+ import { b as rs } from "./box-BXWXSkKu.js";
25
+ import { d as ss } from "./dimensions-DC0uLPwn.js";
26
+ import { d as is } from "./direction-C_b4tfRN.js";
27
+ import { l as cs } from "./location-BIzpxczO.js";
28
+ import { s as us } from "./spatial-DnsaOypA.js";
29
+ import { x as ds } from "./xy-DnrCAZaw.js";
30
+ import { a as ms } from "./index-Bv029kh3.js";
31
+ import { URL as gs, buildQueryString as bs } from "./url.js";
32
+ import { RoutedWorker as ys, TypedWorker as ws, createMockWorkers as Ms } from "./worker.js";
33
+ import { e as vs } from "./external-2YWy569j.js";
33
34
  const L = 2, U = 3, J = 2, nt = (e, t) => {
34
35
  if (Number.isNaN(e) || !Number.isFinite(e)) return e;
35
36
  const r = G(t);
@@ -64,7 +65,7 @@ const L = 2, U = 3, J = 2, nt = (e, t) => {
64
65
  }
65
66
  const o = Math.floor(Math.log10(r)), f = 10 ** (st - o - 1);
66
67
  return Math.round(e * f) / f;
67
- }, kr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
68
+ }, Rr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
68
69
  __proto__: null,
69
70
  MAX_INT16: $e,
70
71
  MAX_INT32: je,
@@ -81,22 +82,22 @@ const L = 2, U = 3, J = 2, nt = (e, t) => {
81
82
  MIN_INT64: Le,
82
83
  MIN_INT64_NUMBER: Ue,
83
84
  MIN_INT8: qe,
84
- abs: Ve,
85
- add: He,
86
- closeTo: Xe,
87
- div: Ge,
88
- equal: Je,
89
- isInteger: Qe,
90
- max: Ye,
91
- min: Ke,
92
- mult: et,
85
+ abs: We,
86
+ add: De,
87
+ closeTo: Be,
88
+ div: Fe,
89
+ equal: Ve,
90
+ isInteger: He,
91
+ max: Xe,
92
+ min: Ge,
93
+ mult: Je,
93
94
  roundBySpan: nt,
94
- roundToNearestMagnitude: tt,
95
+ roundToNearestMagnitude: Qe,
95
96
  smartRound: it,
96
- sub: rt
97
+ sub: Ye
97
98
  }, Symbol.toStringTag, { value: "Module" })), Q = async (e) => await new Promise(
98
99
  (t) => setTimeout(t, _.fromMilliseconds(e).milliseconds)
99
- ), Pr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
100
+ ), Zr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
100
101
  __proto__: null,
101
102
  sleep: Q
102
103
  }, Symbol.toStringTag, { value: "Module" }));
@@ -127,7 +128,7 @@ const ct = a.object({
127
128
  baseInterval: _.z.optional(),
128
129
  maxRetries: a.number().optional(),
129
130
  scale: a.number().optional()
130
- }), Rr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
131
+ }), Cr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
131
132
  __proto__: null,
132
133
  Breaker: at,
133
134
  breakerConfigZ: ct
@@ -303,7 +304,7 @@ const ct = a.object({
303
304
  key: a.string(),
304
305
  name: a.string(),
305
306
  swatches: a.array(Zt)
306
- }), Zr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
307
+ }), Lr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
307
308
  __proto__: null,
308
309
  BLACK: At,
309
310
  WHITE: kt,
@@ -365,7 +366,7 @@ const ct = a.object({
365
366
  from: x(e),
366
367
  to: x(e)
367
368
  })
368
- ]), Cr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
369
+ ]), Ur = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
369
370
  __proto__: null,
370
371
  ABSOLUTE_AUTHORITY: oe,
371
372
  AUTHORITY_BOUNDS: Lt,
@@ -377,19 +378,22 @@ const ct = a.object({
377
378
  stateZ: x,
378
379
  subjectZ: ae,
379
380
  transferZ: qt
380
- }, Symbol.toStringTag, { value: "Module" })), Wt = (e) => Object.getOwnPropertySymbols(globalThis).includes(e), zt = (e, t) => {
381
+ }, Symbol.toStringTag, { value: "Module" })), zt = /[",\n]/, Wt = (e) => zt.test(e) ? `"${e.replace(/"/g, '""')}"` : e, qr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
382
+ __proto__: null,
383
+ maybeEscapeField: Wt
384
+ }, Symbol.toStringTag, { value: "Module" })), Dt = (e) => Object.getOwnPropertySymbols(globalThis).includes(e), Bt = (e, t) => {
381
385
  const r = Symbol.for(e);
382
- if (!Wt(r)) {
386
+ if (!Dt(r)) {
383
387
  const n = t();
384
388
  Object.defineProperty(globalThis, r, { value: n });
385
389
  }
386
390
  return () => globalThis[r];
387
- }, ue = "sy_x_error", Dt = (e) => (t) => t != null && typeof t == "object" && "type" in t && typeof t.type == "string" ? t.type.startsWith(e) : t instanceof Error ? t.message.startsWith(e) : typeof t != "string" ? !1 : t.startsWith(e), T = (e) => class b extends Error {
391
+ }, ue = "sy_x_error", Ft = (e) => (t) => t != null && typeof t == "object" && "type" in t && typeof t.type == "string" ? t.type.startsWith(e) : t instanceof Error ? t.message.startsWith(e) : typeof t != "string" ? !1 : t.startsWith(e), T = (e) => class b extends Error {
388
392
  static discriminator = ue;
389
393
  discriminator = b.discriminator;
390
394
  static TYPE = e;
391
395
  type = b.TYPE;
392
- static matches = Dt(e);
396
+ static matches = Ft(e);
393
397
  matches = b.matches;
394
398
  constructor(r, n) {
395
399
  super(r, n), this.name = b.TYPE;
@@ -406,14 +410,14 @@ const ct = a.object({
406
410
  `X Error is missing its type property: ${JSON.stringify(t)}`
407
411
  );
408
412
  return !0;
409
- }, p = "unknown", W = "nil";
410
- class Bt {
413
+ }, p = "unknown", z = "nil";
414
+ class Vt {
411
415
  providers = [];
412
416
  register(t) {
413
417
  this.providers.push(t);
414
418
  }
415
419
  encode(t) {
416
- if (t == null) return { type: W, data: "" };
420
+ if (t == null) return { type: z, data: "" };
417
421
  if (fe(t))
418
422
  for (const r of this.providers) {
419
423
  const n = r.encode(t);
@@ -428,37 +432,37 @@ class Bt {
428
432
  }
429
433
  }
430
434
  decode(t) {
431
- if (t == null || t.type === W) return null;
432
- if (t.type === p) return new z(t.data);
435
+ if (t == null || t.type === z) return null;
436
+ if (t.type === p) return new W(t.data);
433
437
  for (const r of this.providers) {
434
438
  const n = r.decode(t);
435
439
  if (n != null) return n;
436
440
  }
437
- return new z(t.data);
441
+ return new W(t.data);
438
442
  }
439
443
  }
440
- const V = zt("synnax-error-registry", () => new Bt()), Ft = ({ encode: e, decode: t }) => V().register({ encode: e, decode: t }), Vt = (e) => V().encode(e), Ht = (e) => e == null ? null : V().decode(e);
441
- class z extends T("unknown") {
444
+ const V = Bt("synnax-error-registry", () => new Vt()), Ht = ({ encode: e, decode: t }) => V().register({ encode: e, decode: t }), Xt = (e) => V().encode(e), Gt = (e) => e == null ? null : V().decode(e);
445
+ class W extends T("unknown") {
442
446
  }
443
- const Xt = a.object({ type: a.string(), data: a.string() });
444
- class Gt extends T("canceled") {
447
+ const Jt = a.object({ type: a.string(), data: a.string() });
448
+ class Qt extends T("canceled") {
445
449
  }
446
- class Jt extends T("not_implemented") {
450
+ class Yt extends T("not_implemented") {
447
451
  }
448
- const Lr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
452
+ const zr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
449
453
  __proto__: null,
450
- Canceled: Gt,
451
- NONE: W,
452
- NotImplemented: Jt,
454
+ Canceled: Qt,
455
+ NONE: z,
456
+ NotImplemented: Yt,
453
457
  UNKNOWN: p,
454
- Unknown: z,
458
+ Unknown: W,
455
459
  createTyped: T,
456
- decode: Ht,
457
- encode: Vt,
460
+ decode: Gt,
461
+ encode: Xt,
458
462
  isTyped: fe,
459
- payloadZ: Xt,
460
- register: Ft
461
- }, Symbol.toStringTag, { value: "Module" })), Ur = () => Promise.resolve(), qr = () => new Promise((e) => setTimeout(e, 0)), Wr = (e) => e ? -1 : 1, de = h.object({
463
+ payloadZ: Jt,
464
+ register: Ht
465
+ }, Symbol.toStringTag, { value: "Module" })), Wr = () => Promise.resolve(), Dr = () => new Promise((e) => setTimeout(e, 0)), Br = (e) => e ? -1 : 1, de = h.object({
462
466
  jsonrpc: h.literal("2.0"),
463
467
  method: h.string(),
464
468
  // params should be z.union([z.record(z.string(), z.json()),
@@ -469,9 +473,9 @@ const Lr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
469
473
  }), he = h.object({
470
474
  jsonrpc: h.literal("2.0"),
471
475
  id: h.union([h.string(), h.number(), h.null()])
472
- }), Qt = he.extend({
476
+ }), Kt = he.extend({
473
477
  result: h.json()
474
- }), Yt = he.extend({
478
+ }), er = he.extend({
475
479
  error: h.object({
476
480
  code: h.number().int(),
477
481
  // This should be z.string(), but the VSCode JSON RPC implementation uses a looser
@@ -479,7 +483,7 @@ const Lr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
479
483
  message: h.string().optional(),
480
484
  data: h.json().optional()
481
485
  })
482
- }), me = h.union([Qt, Yt]), pe = h.union([de, me]), Kt = (e) => {
486
+ }), me = h.union([Kt, er]), pe = h.union([de, me]), tr = (e) => {
483
487
  const t = new TextDecoder();
484
488
  let r = new Uint8Array(0), n = null;
485
489
  return (s) => {
@@ -502,32 +506,32 @@ const Lr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
502
506
  } else break;
503
507
  }
504
508
  };
505
- }, er = (e) => {
509
+ }, rr = (e) => {
506
510
  const t = JSON.stringify(e);
507
511
  return `Content-Length: ${new TextEncoder().encode(t).length}\r
508
512
  \r
509
513
  ` + t;
510
- }, zr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
514
+ }, Fr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
511
515
  __proto__: null,
512
- encodeMessage: er,
516
+ encodeMessage: rr,
513
517
  messageZ: pe,
514
518
  requestZ: de,
515
519
  responseZ: me,
516
- streamDecodeChunks: Kt
520
+ streamDecodeChunks: tr
517
521
  }, Symbol.toStringTag, { value: "Module" })), ge = h.uuid(), be = h.object({
518
522
  key: ge,
519
523
  name: h.string().min(1),
520
524
  color: h.string()
521
- }), Dr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
525
+ }), Vr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
522
526
  __proto__: null,
523
527
  keyZ: ge,
524
528
  labelZ: be
525
- }, Symbol.toStringTag, { value: "Module" })), tr = (e, t, r) => {
529
+ }, Symbol.toStringTag, { value: "Module" })), nr = (e, t, r) => {
526
530
  const n = e.get(t);
527
531
  return n === void 0 ? (e.set(t, r), r) : n;
528
- }, Br = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
532
+ }, Hr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
529
533
  __proto__: null,
530
- getOrSetDefault: tr
534
+ getOrSetDefault: nr
531
535
  }, Symbol.toStringTag, { value: "Module" })), D = a.string().regex(/^\d+\.\d+\.\d+$/), $ = ((e, t, r = {}) => {
532
536
  r.checkMajor ??= !0, r.checkMinor ??= !0, r.checkPatch ??= !0;
533
537
  const n = D.parse(e), s = D.parse(t), [o, c, f] = n.split(".").map(Number), [i, l, u] = s.split(".").map(Number);
@@ -543,8 +547,8 @@ const Lr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
543
547
  if (f < u) return R;
544
548
  if (f > u) return Z;
545
549
  }
546
- return Fe;
547
- }), rr = (e, t, r = {}) => ze($(e, t, r)), _e = (e, t, r = {}) => De($(e, t, r)), nr = (e, t, r = {}) => Be($(e, t, r)), sr = ({
550
+ return rt;
551
+ }), sr = (e, t, r = {}) => Ke($(e, t, r)), _e = (e, t, r = {}) => et($(e, t, r)), or = (e, t, r = {}) => tt($(e, t, r)), ir = ({
548
552
  name: e,
549
553
  migrate: t
550
554
  }) => (r) => {
@@ -554,7 +558,7 @@ const Lr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
554
558
  } catch (n) {
555
559
  throw console.log(`${e} failed to migrate from ${r.version}`), console.error(n), n;
556
560
  }
557
- }, or = ({
561
+ }, ar = ({
558
562
  name: e,
559
563
  migrations: t,
560
564
  targetSchema: r,
@@ -606,16 +610,16 @@ const Lr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
606
610
  return console.log(`${e} failed to parse final result. Exiting with default`), console.error(u), s;
607
611
  }
608
612
  };
609
- }, Fr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
613
+ }, Xr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
610
614
  __proto__: null,
611
615
  compareSemVer: $,
612
- createMigration: sr,
613
- migrator: or,
616
+ createMigration: ir,
617
+ migrator: ar,
614
618
  semVerNewer: _e,
615
- semVerOlder: nr,
619
+ semVerOlder: or,
616
620
  semVerZ: D,
617
- versionsEqual: rr
618
- }, Symbol.toStringTag, { value: "Module" })), ye = ["standard", "scientific", "engineering"], ir = a.enum(ye), ar = (e, t, r) => {
621
+ versionsEqual: sr
622
+ }, Symbol.toStringTag, { value: "Module" })), ye = ["standard", "scientific", "engineering"], cr = a.enum(ye), lr = (e, t, r) => {
619
623
  if (Number.isNaN(e)) return "NaN";
620
624
  if (e === 1 / 0) return "∞";
621
625
  if (e === -1 / 0) return "-∞";
@@ -624,24 +628,24 @@ const Lr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
624
628
  return t === 0 ? "0ᴇ0" : `0.${"0".repeat(t)}ᴇ0`;
625
629
  let n;
626
630
  return r === "scientific" ? n = Math.floor(Math.log10(Math.abs(e))) : n = Math.floor(Math.log10(Math.abs(e)) / 3) * 3, `${(e / 10 ** n).toFixed(t)}ᴇ${n}`;
627
- }, Vr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
631
+ }, Gr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
628
632
  __proto__: null,
629
633
  NOTATIONS: ye,
630
- notationZ: ir,
631
- stringifyNumber: ar
632
- }, Symbol.toStringTag, { value: "Module" })), Hr = (e) => {
634
+ notationZ: cr,
635
+ stringifyNumber: lr
636
+ }, Symbol.toStringTag, { value: "Module" })), Jr = (e) => {
633
637
  if (e === void 0 || typeof e == "string" || typeof e == "number")
634
638
  return e;
635
639
  if (e.toString === void 0) throw new Error("invalid renderer");
636
640
  return e.toString();
637
- }, Xr = (e) => Array.isArray(e) ? [...e] : typeof e == "object" && e !== null ? { ...e } : e, we = a.enum([
641
+ }, Qr = (e) => Array.isArray(e) ? [...e] : typeof e == "object" && e !== null ? { ...e } : e, we = a.enum([
638
642
  "success",
639
643
  "info",
640
644
  "warning",
641
645
  "error",
642
646
  "loading",
643
647
  "disabled"
644
- ]), cr = (e) => a.object({
648
+ ]), ur = (e) => a.object({
645
649
  key: a.string(),
646
650
  name: a.string().default(""),
647
651
  variant: we,
@@ -650,10 +654,10 @@ const Lr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
650
654
  time: X.z,
651
655
  labels: xe(be).optional(),
652
656
  details: e ?? a.unknown().optional()
653
- }), lr = a.object({
657
+ }), fr = a.object({
654
658
  stack: a.string(),
655
659
  error: a.instanceof(Error)
656
- }), ur = (e, t) => {
660
+ }), dr = (e, t) => {
657
661
  if (!(e instanceof Error)) throw e;
658
662
  return Me({
659
663
  variant: "error",
@@ -662,38 +666,38 @@ const Lr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
662
666
  details: { stack: e.stack ?? "", error: e }
663
667
  });
664
668
  }, Me = (e) => ({
665
- key: We(),
669
+ key: ze(),
666
670
  time: X.now(),
667
671
  name: "",
668
672
  ...e
669
- }), fr = (e, t = []) => {
673
+ }), hr = (e, t = []) => {
670
674
  if (e != null)
671
675
  return Array.isArray(t) ? t.includes(e) ? e : void 0 : t === e ? e : void 0;
672
- }, dr = (e, t = []) => {
676
+ }, mr = (e, t = []) => {
673
677
  if (e != null)
674
678
  return Array.isArray(t) ? t.includes(e) ? void 0 : e : t === e ? void 0 : e;
675
- }, Gr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
679
+ }, Yr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
676
680
  __proto__: null,
677
681
  create: Me,
678
- exceptionDetailsSchema: lr,
679
- fromException: ur,
680
- keepVariants: fr,
681
- removeVariants: dr,
682
- statusZ: cr,
682
+ exceptionDetailsSchema: fr,
683
+ fromException: dr,
684
+ keepVariants: hr,
685
+ removeVariants: mr,
686
+ statusZ: ur,
683
687
  variantZ: we
684
- }, Symbol.toStringTag, { value: "Module" })), hr = (e, t) => {
688
+ }, Symbol.toStringTag, { value: "Module" })), pr = (e, t) => {
685
689
  if (!t.has(e)) return e;
686
690
  let r = e, n = 1, s = e;
687
691
  for (; t.has(s); ) {
688
- const o = s.match(mr);
692
+ const o = s.match(gr);
689
693
  o ? (r = s.slice(0, o.index).trim(), n = parseInt(o[1]) + 1) : (r = s, n = 1), s = `${r} (${n})`;
690
694
  }
691
695
  return s;
692
- }, mr = /\((\d+)\)$/, pr = (e, t = "") => {
696
+ }, gr = /\((\d+)\)$/, br = (e, t = "") => {
693
697
  if (typeof e == "string") return e;
694
698
  const r = e.length;
695
699
  return r === 0 ? t : r === 1 ? e[0] : r === 2 ? `${e[0]} and ${e[1]}` : `${e.slice(0, -1).join(", ")}, and ${e[r - 1]}`;
696
- }, gr = (e) => {
700
+ }, _r = (e) => {
697
701
  const t = e.split(" "), r = /* @__PURE__ */ new Set(), n = t.map((i) => i.charAt(0).toLowerCase()).join("");
698
702
  r.add(n.replace(/-/g, "_")), r.add(n.replace(/(.)(.)/g, "$1_$2").replace(/-/g, "_"));
699
703
  const s = /\d+/g;
@@ -711,14 +715,14 @@ const Lr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
711
715
  return r.add(c.join("").replace(/-/g, "_")), r.add(c.join("_").replace(/-/g, "_")), Array.from(r).filter(
712
716
  (i) => i.length >= 2 && i.length <= 12 && !/^\d/.test(i)
713
717
  );
714
- }, br = (e, t) => e.startsWith(t) ? e.slice(t.length) : e, Jr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
718
+ }, yr = (e, t) => e.startsWith(t) ? e.slice(t.length) : e, Kr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
715
719
  __proto__: null,
716
- createShortIdentifiers: gr,
717
- deduplicateFileName: hr,
718
- naturalLanguageJoin: pr,
719
- trimPrefix: br
720
- }, Symbol.toStringTag, { value: "Module" })), _r = new Error("request for lock canceled");
721
- var yr = function(e, t, r, n) {
720
+ createShortIdentifiers: _r,
721
+ deduplicateFileName: pr,
722
+ naturalLanguageJoin: br,
723
+ trimPrefix: yr
724
+ }, Symbol.toStringTag, { value: "Module" })), wr = new Error("request for lock canceled");
725
+ var Mr = function(e, t, r, n) {
722
726
  function s(o) {
723
727
  return o instanceof r ? o : new r(function(c) {
724
728
  c(o);
@@ -745,8 +749,8 @@ var yr = function(e, t, r, n) {
745
749
  l((n = n.apply(e, t || [])).next());
746
750
  });
747
751
  };
748
- class wr {
749
- constructor(t, r = _r) {
752
+ class Sr {
753
+ constructor(t, r = wr) {
750
754
  this._value = t, this._cancelError = r, this._queue = [], this._weightedWaiters = [];
751
755
  }
752
756
  acquire(t = 1, r = 0) {
@@ -758,7 +762,7 @@ class wr {
758
762
  });
759
763
  }
760
764
  runExclusive(t) {
761
- return yr(this, arguments, void 0, function* (r, n = 1, s = 0) {
765
+ return Mr(this, arguments, void 0, function* (r, n = 1, s = 0) {
762
766
  const [o, c] = yield this.acquire(n, s);
763
767
  try {
764
768
  return yield r(o);
@@ -771,7 +775,7 @@ class wr {
771
775
  if (t <= 0)
772
776
  throw new Error(`invalid weight ${t}: must be positive`);
773
777
  return this._couldLockImmediately(t, r) ? Promise.resolve() : new Promise((n) => {
774
- this._weightedWaiters[t - 1] || (this._weightedWaiters[t - 1] = []), Mr(this._weightedWaiters[t - 1], { resolve: n, priority: r });
778
+ this._weightedWaiters[t - 1] || (this._weightedWaiters[t - 1] = []), vr(this._weightedWaiters[t - 1], { resolve: n, priority: r });
775
779
  });
776
780
  }
777
781
  isLocked() {
@@ -826,7 +830,7 @@ class wr {
826
830
  return (this._queue.length === 0 || this._queue[0].priority < r) && t <= this._value;
827
831
  }
828
832
  }
829
- function Mr(e, t) {
833
+ function vr(e, t) {
830
834
  const r = Se(e, (n) => t.priority <= n.priority);
831
835
  e.splice(r + 1, 0, t);
832
836
  }
@@ -836,7 +840,7 @@ function Se(e, t) {
836
840
  return r;
837
841
  return -1;
838
842
  }
839
- var Sr = function(e, t, r, n) {
843
+ var xr = function(e, t, r, n) {
840
844
  function s(o) {
841
845
  return o instanceof r ? o : new r(function(c) {
842
846
  c(o);
@@ -863,12 +867,12 @@ var Sr = function(e, t, r, n) {
863
867
  l((n = n.apply(e, t || [])).next());
864
868
  });
865
869
  };
866
- class vr {
870
+ class Tr {
867
871
  constructor(t) {
868
- this._semaphore = new wr(1, t);
872
+ this._semaphore = new Sr(1, t);
869
873
  }
870
874
  acquire() {
871
- return Sr(this, arguments, void 0, function* (t = 0) {
875
+ return xr(this, arguments, void 0, function* (t = 0) {
872
876
  const [, r] = yield this._semaphore.acquire(1, t);
873
877
  return r;
874
878
  });
@@ -889,92 +893,93 @@ class vr {
889
893
  return this._semaphore.cancel();
890
894
  }
891
895
  }
892
- class ve extends vr {
896
+ class ve extends Tr {
893
897
  constructor(t) {
894
898
  super(), Object.assign(this, t);
895
899
  }
896
900
  }
897
- const xr = (e) => new ve(e), Qr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
901
+ const $r = (e) => new ve(e), en = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
898
902
  __proto__: null,
899
903
  mutex: ve,
900
- newMutex: xr
901
- }, Symbol.toStringTag, { value: "Module" })), Tr = (e) => JSON.stringify(e, (t, r) => typeof r == "bigint" ? r.toString() : r), $r = async (e, t = 200, r = 20) => {
904
+ newMutex: $r
905
+ }, Symbol.toStringTag, { value: "Module" })), jr = (e) => JSON.stringify(e, (t, r) => typeof r == "bigint" ? r.toString() : r), Nr = async (e, t = 200, r = 20) => {
902
906
  const n = Date.now();
903
907
  for (; Date.now() - n < t; )
904
908
  await e(), await new Promise((s) => setTimeout(s, r));
905
- }, Yr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
909
+ }, tn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
906
910
  __proto__: null,
907
- expectAlways: $r,
908
- toString: Tr
911
+ expectAlways: Nr,
912
+ toString: jr
909
913
  }, Symbol.toStringTag, { value: "Module" }));
910
914
  export {
911
- on as DataType,
912
- an as Density,
913
- cn as MultiSeries,
914
- ln as Rate,
915
- ps as RoutedWorker,
916
- un as Series,
917
- fn as Size,
918
- dn as TimeRange,
915
+ ln as DataType,
916
+ un as Density,
917
+ fn as MultiSeries,
918
+ dn as Rate,
919
+ ys as RoutedWorker,
920
+ hn as Series,
921
+ mn as Size,
922
+ pn as TimeRange,
919
923
  _ as TimeSpan,
920
924
  X as TimeStamp,
921
- gs as TypedWorker,
922
- ds as URL,
923
- hn as addSamples,
924
- tn as array,
925
- nn as binary,
926
- Bn as bounds,
927
- Yn as box,
928
- Rr as breaker,
929
- hs as buildQueryString,
930
- vn as caseconv,
931
- Tn as change,
932
- jn as clamp,
933
- Zr as color,
934
- In as compare,
935
- Cr as control,
936
- mn as convertDataType,
937
- Hr as convertRenderV,
938
- bs as createMockWorkers,
939
- kn as debounce,
940
- Zn as deep,
941
- es as dimensions,
942
- rs as direction,
943
- Lr as errors,
944
- Ur as flushMicrotasks,
945
- qr as flushTaskQueue,
946
- pn as id,
947
- gn as instance,
948
- Wr as invert,
949
- bn as isCrudeSeries,
950
- Ln as isObject,
951
- _n as isTelemValue,
952
- zr as jsonRPC,
953
- qn as kv,
954
- Dr as label,
955
- zn as link,
956
- ss as location,
957
- Br as map,
958
- kr as math,
959
- Fr as migrate,
960
- Vr as notation,
961
- yn as numericTimeRangeZ,
962
- Vn as observe,
963
- On as primitive,
964
- Xn as record,
965
- Jn as runtime,
966
- Nn as scale,
967
- Xr as shallowCopy,
968
- Pr as sleep,
969
- is as spatial,
970
- Gr as status,
971
- Jr as strings,
972
- Qr as sync,
973
- Yr as testutil,
974
- Pn as throttle,
975
- wn as typedArrayZ,
976
- us as unique,
977
- Mn as uuid,
978
- cs as xy,
979
- ys as zod
925
+ ws as TypedWorker,
926
+ gs as URL,
927
+ gn as addSamples,
928
+ sn as array,
929
+ an as binary,
930
+ Vn as bounds,
931
+ rs as box,
932
+ Cr as breaker,
933
+ bs as buildQueryString,
934
+ $n as caseconv,
935
+ Nn as change,
936
+ In as clamp,
937
+ Lr as color,
938
+ kn as compare,
939
+ Ur as control,
940
+ bn as convertDataType,
941
+ Jr as convertRenderV,
942
+ Ms as createMockWorkers,
943
+ qr as csv,
944
+ Rn as debounce,
945
+ Ln as deep,
946
+ ss as dimensions,
947
+ is as direction,
948
+ zr as errors,
949
+ Wr as flushMicrotasks,
950
+ Dr as flushTaskQueue,
951
+ _n as id,
952
+ yn as instance,
953
+ Br as invert,
954
+ wn as isCrudeSeries,
955
+ qn as isObject,
956
+ Mn as isTelemValue,
957
+ Fr as jsonRPC,
958
+ Wn as kv,
959
+ Vr as label,
960
+ Bn as link,
961
+ cs as location,
962
+ Hr as map,
963
+ Rr as math,
964
+ Xr as migrate,
965
+ Gr as notation,
966
+ Sn as numericTimeRangeZ,
967
+ Jn as observe,
968
+ Xn as primitive,
969
+ Yn as record,
970
+ es as runtime,
971
+ On as scale,
972
+ Qr as shallowCopy,
973
+ Zr as sleep,
974
+ us as spatial,
975
+ Yr as status,
976
+ Kr as strings,
977
+ en as sync,
978
+ tn as testutil,
979
+ Zn as throttle,
980
+ vn as typedArrayZ,
981
+ ms as unique,
982
+ xn as uuid,
983
+ ds as xy,
984
+ vs as zod
980
985
  };