@synnaxlabs/x 0.44.2 → 0.44.4

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 (131) hide show
  1. package/.turbo/turbo-build.log +35 -39
  2. package/dist/base-BLNViP3D.cjs +1 -0
  3. package/dist/{base-DFq0vvGn.js → base-BORMP3mH.js} +14 -11
  4. package/dist/bounds-BQqppNFf.js +186 -0
  5. package/dist/bounds-BXbqBINt.cjs +1 -0
  6. package/dist/bounds.cjs +1 -1
  7. package/dist/bounds.js +1 -1
  8. package/dist/{box-CO_2_DGG.js → box-DRH5SOaY.js} +67 -73
  9. package/dist/box-qgxWXNhm.cjs +1 -0
  10. package/dist/box.cjs +1 -1
  11. package/dist/box.js +1 -1
  12. package/dist/deep.cjs +1 -1
  13. package/dist/deep.js +1 -1
  14. package/dist/{dimensions-CRgergMS.js → dimensions-RaRkesPq.js} +1 -1
  15. package/dist/{dimensions-D2QGoNXO.cjs → dimensions-qY12pyfC.cjs} +1 -1
  16. package/dist/dimensions.cjs +1 -1
  17. package/dist/dimensions.js +1 -1
  18. package/dist/direction-DKdfJwj7.js +19 -0
  19. package/dist/direction-XCdrc4is.cjs +1 -0
  20. package/dist/direction.cjs +1 -1
  21. package/dist/direction.js +1 -1
  22. package/dist/{external-Birv9jaY.js → external-BM_NS5yM.js} +6 -6
  23. package/dist/external-E3ErJeeM.cjs +1 -0
  24. package/dist/index.cjs +3 -3
  25. package/dist/index.js +244 -240
  26. package/dist/{location-Ar5y2DX2.js → location-CGLioInQ.js} +16 -21
  27. package/dist/location-DJ_K4SlP.cjs +1 -0
  28. package/dist/location.cjs +1 -1
  29. package/dist/location.js +1 -1
  30. package/dist/{path-DVFrKaNI.js → path-Blh4wJuA.js} +24 -21
  31. package/dist/path-CPSfCjde.cjs +1 -0
  32. package/dist/record-BwjIgrpU.cjs +1 -0
  33. package/dist/record-tSFQKmdG.js +19 -0
  34. package/dist/record.cjs +1 -1
  35. package/dist/record.js +1 -1
  36. package/dist/{scale-C6qKDbRb.cjs → scale-76Azh2EE.cjs} +1 -1
  37. package/dist/{scale-EWNUk-bn.js → scale-BhIvACdB.js} +4 -4
  38. package/dist/scale.cjs +1 -1
  39. package/dist/scale.js +1 -1
  40. package/dist/{series-EA1uaEDj.js → series-kgnLXSDr.js} +622 -489
  41. package/dist/series-tAhThbnz.cjs +6 -0
  42. package/dist/{spatial-DGpZ2sO3.cjs → spatial-BsGadoUr.cjs} +1 -1
  43. package/dist/{spatial-BSWPzMkK.js → spatial-QY891r0E.js} +1 -1
  44. package/dist/spatial.cjs +1 -1
  45. package/dist/spatial.js +14 -16
  46. package/dist/src/breaker/breaker.d.ts +2 -1
  47. package/dist/src/breaker/breaker.d.ts.map +1 -1
  48. package/dist/src/deep/path.d.ts.map +1 -1
  49. package/dist/src/id/id.d.ts +3 -1
  50. package/dist/src/id/id.d.ts.map +1 -1
  51. package/dist/src/math/math.d.ts +2 -1
  52. package/dist/src/math/math.d.ts.map +1 -1
  53. package/dist/src/record/record.d.ts +18 -0
  54. package/dist/src/record/record.d.ts.map +1 -1
  55. package/dist/src/spatial/base.d.ts +12 -0
  56. package/dist/src/spatial/base.d.ts.map +1 -1
  57. package/dist/src/spatial/direction/direction.d.ts +5 -1
  58. package/dist/src/spatial/direction/direction.d.ts.map +1 -1
  59. package/dist/src/spatial/external.d.ts +0 -1
  60. package/dist/src/spatial/external.d.ts.map +1 -1
  61. package/dist/src/spatial/xy/xy.d.ts +3 -0
  62. package/dist/src/spatial/xy/xy.d.ts.map +1 -1
  63. package/dist/src/status/status.d.ts +1 -0
  64. package/dist/src/status/status.d.ts.map +1 -1
  65. package/dist/src/strings/strings.d.ts +1 -1
  66. package/dist/src/strings/strings.d.ts.map +1 -1
  67. package/dist/src/telem/series.d.ts +7 -0
  68. package/dist/src/telem/series.d.ts.map +1 -1
  69. package/dist/src/telem/telem.d.ts +86 -1
  70. package/dist/src/telem/telem.d.ts.map +1 -1
  71. package/dist/src/zod/util.d.ts.map +1 -1
  72. package/dist/telem.cjs +1 -1
  73. package/dist/telem.js +1 -1
  74. package/dist/xy-BKIJiLu_.cjs +1 -0
  75. package/dist/{xy-C_-hb3Q2.js → xy-CBuhMaIo.js} +41 -31
  76. package/dist/xy.cjs +1 -1
  77. package/dist/xy.js +1 -1
  78. package/dist/zod.cjs +1 -1
  79. package/dist/zod.js +1 -1
  80. package/package.json +3 -8
  81. package/src/breaker/breaker.ts +4 -0
  82. package/src/deep/path.spec.ts +14 -0
  83. package/src/deep/path.ts +9 -2
  84. package/src/id/id.ts +8 -4
  85. package/src/math/math.spec.ts +20 -0
  86. package/src/math/math.ts +32 -29
  87. package/src/record/record.spec.ts +31 -0
  88. package/src/record/record.ts +23 -0
  89. package/src/spatial/base.ts +4 -0
  90. package/src/spatial/bounds/bounds.ts +1 -1
  91. package/src/spatial/direction/direction.spec.ts +35 -1
  92. package/src/spatial/direction/direction.ts +12 -0
  93. package/src/spatial/external.ts +0 -1
  94. package/src/spatial/xy/xy.spec.ts +124 -7
  95. package/src/spatial/xy/xy.ts +15 -2
  96. package/src/status/status.ts +11 -0
  97. package/src/strings/strings.spec.ts +3 -0
  98. package/src/strings/strings.ts +2 -1
  99. package/src/telem/series.spec.ts +543 -2
  100. package/src/telem/series.ts +28 -9
  101. package/src/telem/telem.spec.ts +606 -0
  102. package/src/telem/telem.ts +143 -5
  103. package/src/zod/util.ts +5 -3
  104. package/tsconfig.tsbuildinfo +1 -1
  105. package/vite.config.ts +0 -1
  106. package/dist/base-BAM2mqCy.cjs +0 -1
  107. package/dist/bounds-D6e9xoHt.cjs +0 -1
  108. package/dist/bounds-Dj9nG39I.js +0 -174
  109. package/dist/box-Cxki783Y.cjs +0 -1
  110. package/dist/direction-386XDm2w.cjs +0 -1
  111. package/dist/direction-8etxfKaR.js +0 -17
  112. package/dist/external-DsmsSN1Y.cjs +0 -1
  113. package/dist/location-DZi8ftXp.cjs +0 -1
  114. package/dist/path-BeMr8xWN.cjs +0 -1
  115. package/dist/position-DSy2hONH.cjs +0 -1
  116. package/dist/position-PQ6op54I.js +0 -85
  117. package/dist/position.cjs +0 -1
  118. package/dist/position.js +0 -4
  119. package/dist/record-CAcQ5PNX.js +0 -14
  120. package/dist/record-YvCh7bzB.cjs +0 -1
  121. package/dist/series-CcA_WjbJ.cjs +0 -6
  122. package/dist/src/spatial/position/index.d.ts +0 -2
  123. package/dist/src/spatial/position/index.d.ts.map +0 -1
  124. package/dist/src/spatial/position/position.d.ts +0 -20
  125. package/dist/src/spatial/position/position.d.ts.map +0 -1
  126. package/dist/src/spatial/position/position.spec.d.ts +0 -2
  127. package/dist/src/spatial/position/position.spec.d.ts.map +0 -1
  128. package/dist/xy-CUE3QDNn.cjs +0 -1
  129. package/src/spatial/position/index.ts +0 -10
  130. package/src/spatial/position/position.spec.ts +0 -211
  131. package/src/spatial/position/position.ts +0 -157
package/dist/index.js CHANGED
@@ -1,63 +1,63 @@
1
- import { array as jr } from "./array.js";
1
+ import { array as $r } from "./array.js";
2
2
  import { J as ge } from "./index-B5l_quQn.js";
3
- import { c as Tr } from "./index-B5l_quQn.js";
3
+ import { c as Er } from "./index-B5l_quQn.js";
4
4
  import h, { z as i } from "zod";
5
- import { a as _, T as U, h as be } from "./series-EA1uaEDj.js";
6
- import { c as Er, D as Or, M as kr, R as Ar, S as Pr, d as Zr, b as Nr, g as Ir, f as Rr, j as Cr, m as Lr, i as qr, e as Wr, t as zr, u as Dr } from "./series-EA1uaEDj.js";
7
- import { a as Br } from "./index-D2xcvEO5.js";
8
- import { c as Hr } from "./change-DLl6DccR.js";
9
- import { c as Jr, s as Gr } from "./scale-EWNUk-bn.js";
10
- import { i as _e, a as ye, b as we, L as Z, G as N, E as ve } from "./index-CBMHFqs4.js";
11
- import { c as Yr, p as Kr } from "./index-CBMHFqs4.js";
12
- import { debounce as en, throttle as tn } from "./debounce.js";
13
- import { deep as nn } from "./deep.js";
14
- import { isObject as on } from "./identity.js";
15
- import { e as cn } from "./external-BYuXBYJh.js";
16
- import { link as un } from "./link.js";
17
- import { s as Se, g as xe, h as je, i as Me, j as Te, k as $e, l as Ee, n as Oe, m as ke, r as Ae, o as Pe } from "./bounds-Dj9nG39I.js";
18
- import { b as dn } from "./bounds-Dj9nG39I.js";
19
- import { observe as pn } from "./observe.js";
20
- import { r as gn } from "./record-CAcQ5PNX.js";
21
- import { e as _n } from "./external-BPgtxa8d.js";
22
- import { b as wn } from "./box-CO_2_DGG.js";
23
- import { d as Sn } from "./dimensions-CRgergMS.js";
24
- import { d as jn } from "./direction-8etxfKaR.js";
25
- import { l as Tn } from "./location-Ar5y2DX2.js";
26
- import { p as En } from "./position-PQ6op54I.js";
27
- import { s as kn } from "./spatial-BSWPzMkK.js";
28
- import { x as Pn } from "./xy-C_-hb3Q2.js";
29
- import { u as Nn } from "./index-D4NCYiQB.js";
5
+ import { a as _, T as U, h as be } from "./series-kgnLXSDr.js";
6
+ import { c as kr, D as Ar, M as Pr, R as Zr, S as Ir, d as Nr, b as Rr, g as Cr, f as Lr, j as qr, m as Wr, i as zr, e as Dr, t as Ur, u as Br } from "./series-kgnLXSDr.js";
7
+ import { a as Fr } from "./index-D2xcvEO5.js";
8
+ import { c as Jr } from "./change-DLl6DccR.js";
9
+ import { c as Qr, s as Yr } from "./scale-BhIvACdB.js";
10
+ import { i as _e, a as ye, b as we, L as Z, G as I, E as ve } from "./index-CBMHFqs4.js";
11
+ import { c as Xr, p as en } from "./index-CBMHFqs4.js";
12
+ import { debounce as rn, throttle as nn } from "./debounce.js";
13
+ import { deep as on } from "./deep.js";
14
+ import { isObject as cn } from "./identity.js";
15
+ import { e as un } from "./external-BYuXBYJh.js";
16
+ import { link as dn } from "./link.js";
17
+ import { i as Se, j as xe, a as je, k as Me, d as $e, l as Te, n as Ee, o as Oe, p as ke, m as Ae, r as Pe, s as Ze } from "./bounds-BQqppNFf.js";
18
+ import { b as mn } from "./bounds-BQqppNFf.js";
19
+ import { observe as gn } from "./observe.js";
20
+ import { r as _n } from "./record-tSFQKmdG.js";
21
+ import { e as wn } from "./external-BPgtxa8d.js";
22
+ import { b as Sn } from "./box-DRH5SOaY.js";
23
+ import { d as jn } from "./dimensions-RaRkesPq.js";
24
+ import { d as $n } from "./direction-DKdfJwj7.js";
25
+ import { l as En } from "./location-CGLioInQ.js";
26
+ import { s as kn } from "./spatial-QY891r0E.js";
27
+ import { x as Pn } from "./xy-CBuhMaIo.js";
28
+ import { u as In } from "./index-D4NCYiQB.js";
30
29
  import { URL as Rn, buildQueryString as Cn } from "./url.js";
31
30
  import { RoutedWorker as qn, TypedWorker as Wn, createMockWorkers as zn } from "./worker.js";
32
- import { e as Un } from "./external-Birv9jaY.js";
33
- const Ze = 2, Ne = 3, Ie = 2, Re = (e, t) => {
31
+ import { e as Un } from "./external-BM_NS5yM.js";
32
+ const Ie = 2, Ne = 3, Re = 2, Ce = (e, t) => {
34
33
  if (Number.isNaN(e) || !Number.isFinite(e)) return e;
35
34
  const r = Se(t);
36
35
  if (r == 0) return e;
37
36
  let n;
38
- r >= 1e3 ? n = Ze : r >= 1 ? n = Ne : n = Math.ceil(-Math.log10(r)) + Ie;
37
+ r >= 1e3 ? n = Ie : r >= 1 ? n = Ne : n = Math.ceil(-Math.log10(r)) + Re;
39
38
  const s = 10 ** n;
40
39
  return Math.round(e * s) / s;
41
- }, nr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
40
+ }, or = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
42
41
  __proto__: null,
43
42
  abs: xe,
44
43
  add: je,
45
44
  closeTo: Me,
46
- div: Te,
47
- equal: $e,
48
- max: Ee,
49
- min: Oe,
50
- mult: ke,
51
- roundBySpan: Re,
52
- roundToNearestMagnitude: Ae,
53
- sub: Pe
45
+ div: $e,
46
+ equal: Te,
47
+ isInteger: Ee,
48
+ max: Oe,
49
+ min: ke,
50
+ mult: Ae,
51
+ roundBySpan: Ce,
52
+ roundToNearestMagnitude: Pe,
53
+ sub: Ze
54
54
  }, Symbol.toStringTag, { value: "Module" })), B = async (e) => await new Promise(
55
55
  (t) => setTimeout(t, _.fromMilliseconds(e).milliseconds)
56
- ), sr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
56
+ ), ir = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
57
57
  __proto__: null,
58
58
  sleep: B
59
59
  }, Symbol.toStringTag, { value: "Module" }));
60
- class Ce {
60
+ class Le {
61
61
  config;
62
62
  retries;
63
63
  interval;
@@ -73,26 +73,29 @@ class Ce {
73
73
  const { maxRetries: t, scale: r, sleepFn: n } = this.config;
74
74
  return this.retries >= t ? !1 : (await n(this.interval), this.interval = this.interval.mult(r), this.retries++, !0);
75
75
  }
76
+ get retryMessage() {
77
+ return `breaker triggered ${this.retries + 1}/${this.config.maxRetries} times, retrying in ${this.interval.toString()}`;
78
+ }
76
79
  reset() {
77
80
  this.retries = 0, this.interval = this.config.baseInterval;
78
81
  }
79
82
  }
80
- const Le = i.object({
83
+ const qe = i.object({
81
84
  baseInterval: _.z.optional(),
82
85
  maxRetries: i.number().optional(),
83
86
  scale: i.number().optional()
84
- }), or = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
87
+ }), ar = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
85
88
  __proto__: null,
86
- Breaker: Ce,
87
- breakerConfigZ: Le
88
- }, Symbol.toStringTag, { value: "Module" })), qe = /^#?([0-9a-f]{6}|[0-9a-f]{8})$/i, F = i.string().regex(qe), g = i.number().min(0).max(255), H = i.number().min(0).max(1), O = i.tuple([g, g, g, H]), We = i.tuple([g, g, g]), ze = i.object({ rgba255: O }), De = i.number().min(0).max(360), Ue = i.number().min(0).max(100), Be = i.number().min(0).max(100), V = i.tuple([De, Ue, Be, H]), k = i.union([F, We, O, V, ze]), A = k.transform((e) => d(e)), Fe = (e) => A.safeParse(e).success, He = (e) => O.safeParse(e).success, Ve = (e) => {
89
+ Breaker: Le,
90
+ breakerConfigZ: qe
91
+ }, Symbol.toStringTag, { value: "Module" })), We = /^#?([0-9a-f]{6}|[0-9a-f]{8})$/i, V = i.string().regex(We), g = i.number().min(0).max(255), F = i.number().min(0).max(1), O = i.tuple([g, g, g, F]), ze = i.tuple([g, g, g]), De = i.object({ rgba255: O }), Ue = i.number().min(0).max(360), Be = i.number().min(0).max(100), Ve = i.number().min(0).max(100), H = i.tuple([Ue, Be, Ve, F]), k = i.union([V, ze, O, H, De]), A = k.transform((e) => d(e)), Fe = (e) => A.safeParse(e).success, He = (e) => O.safeParse(e).success, Je = (e) => {
89
92
  if (e == null) return;
90
93
  const t = A.safeParse(e);
91
94
  if (t.success) return G(t.data);
92
95
  if (typeof e == "string") return e;
93
96
  throw t.error;
94
97
  }, d = (e, t = 1) => {
95
- if (e = k.parse(e), typeof e == "string") return st(e, t);
98
+ if (e = k.parse(e), typeof e == "string") return ot(e, t);
96
99
  if (Array.isArray(e)) {
97
100
  if (e.length < 3 || e.length > 4)
98
101
  throw new Error(`Invalid color: [${e.join(", ")}]`);
@@ -103,21 +106,21 @@ const Le = i.object({
103
106
  if (e == null || t == null) return e == t;
104
107
  const r = d(e), n = d(t);
105
108
  return r.every((s, o) => s === n[o]);
106
- }, Je = (e) => {
109
+ }, Ge = (e) => {
107
110
  if (e == null) return;
108
111
  const [t, r, n, s] = d(e);
109
- return `#${$(t)}${$(r)}${$(n)}${s === 1 ? "" : $(s * 255)}`;
112
+ return `#${T(t)}${T(r)}${T(n)}${s === 1 ? "" : T(s * 255)}`;
110
113
  }, G = (e) => {
111
114
  const [t, r, n, s] = d(e);
112
115
  return `rgba(${t}, ${r}, ${n}, ${s})`;
113
- }, Ge = (e) => `rgb(${Q(e)})`, Q = (e) => {
116
+ }, Qe = (e) => `rgb(${Q(e)})`, Q = (e) => {
114
117
  const [t, r, n] = d(e);
115
118
  return `${t}, ${r}, ${n}`;
116
- }, Qe = (e) => [...W(e), S(e)], W = (e) => [
119
+ }, Ye = (e) => [...W(e), S(e)], W = (e) => [
117
120
  y(e) / 255,
118
121
  w(e) / 255,
119
122
  v(e) / 255
120
- ], y = (e) => d(e)[0], w = (e) => d(e)[1], v = (e) => d(e)[2], S = (e) => d(e)[3], Ye = (e) => J(z, e), Ke = (e) => at(d(e)), Xe = (e, t) => {
123
+ ], y = (e) => d(e)[0], w = (e) => d(e)[1], v = (e) => d(e)[2], S = (e) => d(e)[3], Ke = (e) => J(z, e), Xe = (e) => ct(d(e)), et = (e, t) => {
121
124
  const [r, n, s] = d(e);
122
125
  if (t > 100)
123
126
  throw new Error(`Color opacity must be between 0 and 100, got ${t}`);
@@ -127,24 +130,24 @@ const Le = i.object({
127
130
  (s) => s <= 0.03928 ? s / 12.92 : ((s + 0.055) / 1.055) ** 2.4
128
131
  );
129
132
  return Number((0.2126 * t + 0.7152 * r + 0.0722 * n).toFixed(3));
130
- }, et = (e) => {
133
+ }, tt = (e) => {
131
134
  const [t, r, n] = W(e);
132
135
  return 1 - (Math.max(t, r, n) - Math.min(t, r, n));
133
136
  }, R = (e, t) => {
134
137
  const r = d(e), n = d(t), s = x(r), o = x(n);
135
138
  return (Math.max(s, o) + 0.5) / (Math.min(s, o) + 0.5);
136
- }, tt = (e, ...t) => {
139
+ }, rt = (e, ...t) => {
137
140
  if (t.length === 0)
138
141
  throw new Error("[Color.pickByContrast] - must provide at least one color");
139
142
  const r = d(e), [n] = t.sort((s, o) => R(r, o) - R(r, s));
140
143
  return d(n);
141
- }, rt = (e) => x(e) < 0.5, nt = (e) => x(e) > 0.5, st = (e, t = 1) => (e = F.parse(e), e = ot(e), [
144
+ }, nt = (e) => x(e) < 0.5, st = (e) => x(e) > 0.5, ot = (e, t = 1) => (e = V.parse(e), e = it(e), [
142
145
  E(e, 0),
143
146
  E(e, 2),
144
147
  E(e, 4),
145
148
  e.length === 8 ? E(e, 6) / 255 : t
146
- ]), z = [0, 0, 0, 0], $ = (e) => Math.floor(e).toString(16).padStart(2, "0"), E = (e, t) => parseInt(e.slice(t, t + 2), 16), ot = (e) => e.startsWith("#") ? e.slice(1) : e, it = (e) => {
147
- e = V.parse(e);
149
+ ]), z = [0, 0, 0, 0], T = (e) => Math.floor(e).toString(16).padStart(2, "0"), E = (e, t) => parseInt(e.slice(t, t + 2), 16), it = (e) => e.startsWith("#") ? e.slice(1) : e, at = (e) => {
150
+ e = H.parse(e);
148
151
  let [t, r, n] = e;
149
152
  const s = e[3];
150
153
  t /= 360, r /= 100, n /= 100;
@@ -153,10 +156,10 @@ const Le = i.object({
153
156
  o = a = f = n;
154
157
  else {
155
158
  const l = n < 0.5 ? n * (1 + r) : n + r - n * r, c = 2 * n - l;
156
- o = I(c, l, t + 1 / 3), a = I(c, l, t), f = I(c, l, t - 1 / 3);
159
+ o = N(c, l, t + 1 / 3), a = N(c, l, t), f = N(c, l, t - 1 / 3);
157
160
  }
158
161
  return [Math.round(o * 255), Math.round(a * 255), Math.round(f * 255), s];
159
- }, I = (e, t, r) => (r < 0 && (r += 1), r > 1 && (r -= 1), r < 1 / 6 ? e + (t - e) * 6 * r : r < 1 / 2 ? t : r < 2 / 3 ? e + (t - e) * (2 / 3 - r) * 6 : e), at = (e) => {
162
+ }, N = (e, t, r) => (r < 0 && (r += 1), r > 1 && (r -= 1), r < 1 / 6 ? e + (t - e) * 6 * r : r < 1 / 2 ? t : r < 2 / 3 ? e + (t - e) * (2 / 3 - r) * 6 : e), ct = (e) => {
160
163
  e = O.parse(e);
161
164
  let [t, r, n] = e;
162
165
  const s = e[3];
@@ -170,12 +173,12 @@ const Le = i.object({
170
173
  l = c > 0.5 ? u / (2 - o - a) : u / (o + a), o === t ? f = (r - n) / u + (r < n ? 6 : 0) : o === r ? f = (n - t) / u + 2 : f = (t - r) / u + 4, f /= 6;
171
174
  }
172
175
  return f *= 360, l *= 100, c *= 100, [Math.round(f), Math.round(l), Math.round(c), s];
173
- }, ct = d("#000000"), lt = d("#ffffff"), Y = i.object({
176
+ }, lt = d("#000000"), ut = d("#ffffff"), Y = i.object({
174
177
  key: i.string(),
175
178
  color: k,
176
179
  position: i.number(),
177
180
  switched: i.boolean().optional()
178
- }), ut = i.array(Y), ft = (e, t) => {
181
+ }), ft = i.array(Y), dt = (e, t) => {
179
182
  if (e.length === 0) return z;
180
183
  if (e = e.slice().sort((r, n) => r.position - n.position), t <= e[0].position) return d(e[0].color);
181
184
  if (t >= e[e.length - 1].position)
@@ -191,22 +194,22 @@ const Le = i.object({
191
194
  w(a) + o * (w(f) - w(a))
192
195
  ), u = Math.round(
193
196
  v(a) + o * (v(f) - v(a))
194
- ), p = S(a) + o * (S(f) - S(a));
195
- return d([l, c, u, p]);
197
+ ), m = S(a) + o * (S(f) - S(a));
198
+ return d([l, c, u, m]);
196
199
  }
197
200
  return d(e[e.length - 1].color);
198
- }, dt = i.object({
201
+ }, ht = i.object({
199
202
  key: i.string(),
200
203
  name: i.string(),
201
204
  color: A
202
- }), ht = i.object({
205
+ }), mt = i.object({
203
206
  key: i.string(),
204
207
  name: i.string(),
205
- swatches: i.array(dt)
206
- }), ir = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
208
+ swatches: i.array(ht)
209
+ }), cr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
207
210
  __proto__: null,
208
- BLACK: ct,
209
- WHITE: lt,
211
+ BLACK: lt,
212
+ WHITE: ut,
210
213
  ZERO: z,
211
214
  aValue: S,
212
215
  bValue: v,
@@ -214,29 +217,29 @@ const Le = i.object({
214
217
  construct: d,
215
218
  contrast: R,
216
219
  crudeZ: k,
217
- cssString: Ve,
220
+ cssString: Je,
218
221
  equals: J,
219
- fromGradient: ft,
220
- fromHSLA: it,
222
+ fromGradient: dt,
223
+ fromHSLA: at,
221
224
  gValue: w,
222
- gradientZ: ut,
223
- grayness: et,
224
- hex: Je,
225
- hsla: Ke,
225
+ gradientZ: ft,
226
+ grayness: tt,
227
+ hex: Ge,
228
+ hsla: Xe,
226
229
  isColor: He,
227
230
  isCrude: Fe,
228
- isDark: rt,
229
- isLight: nt,
230
- isZero: Ye,
231
+ isDark: nt,
232
+ isLight: st,
233
+ isZero: Ke,
231
234
  luminance: x,
232
- paletteZ: ht,
233
- pickByContrast: tt,
235
+ paletteZ: mt,
236
+ pickByContrast: rt,
234
237
  rValue: y,
235
- rgbCSS: Ge,
238
+ rgbCSS: Qe,
236
239
  rgbString: Q,
237
- rgba1: Qe,
240
+ rgba1: Ye,
238
241
  rgbaCSS: G,
239
- setAlpha: Xe,
242
+ setAlpha: et,
240
243
  stopZ: Y
241
244
  }, Symbol.toStringTag, { value: "Module" })), K = i.int().min(0).max(255), X = 255, ee = 0, pt = {
242
245
  lower: ee,
@@ -248,7 +251,7 @@ const Le = i.object({
248
251
  subject: te,
249
252
  resource: e,
250
253
  authority: K
251
- }), mt = (...e) => (t) => t.filter((r) => {
254
+ }), gt = (...e) => (t) => t.filter((r) => {
252
255
  let n = !1;
253
256
  return r.to != null && (n = e.includes(r.to.resource)), r.from != null && !n && (n = e.includes(r.from.resource)), n;
254
257
  }), re = (e) => i.object({
@@ -257,38 +260,38 @@ const Le = i.object({
257
260
  }), ne = (e) => i.object({
258
261
  from: i.null(),
259
262
  to: j(e)
260
- }), gt = (e) => i.union([
263
+ }), bt = (e) => i.union([
261
264
  re(e),
262
265
  ne(e),
263
266
  i.object({
264
267
  from: j(e),
265
268
  to: j(e)
266
269
  })
267
- ]), ar = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
270
+ ]), lr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
268
271
  __proto__: null,
269
272
  ABSOLUTE_AUTHORITY: X,
270
273
  AUTHORITY_BOUNDS: pt,
271
274
  ZERO_AUTHORITY: ee,
272
275
  acquireZ: ne,
273
276
  authorityZ: K,
274
- filterTransfersByChannelKey: mt,
277
+ filterTransfersByChannelKey: gt,
275
278
  releaseZ: re,
276
279
  stateZ: j,
277
280
  subjectZ: te,
278
- transferZ: gt
279
- }, Symbol.toStringTag, { value: "Module" })), bt = (e) => Object.getOwnPropertySymbols(globalThis).includes(e), _t = (e, t) => {
281
+ transferZ: bt
282
+ }, Symbol.toStringTag, { value: "Module" })), _t = (e) => Object.getOwnPropertySymbols(globalThis).includes(e), yt = (e, t) => {
280
283
  const r = Symbol.for(e);
281
- if (!bt(r)) {
284
+ if (!_t(r)) {
282
285
  const n = t();
283
286
  Object.defineProperty(globalThis, r, { value: n });
284
287
  }
285
288
  return () => globalThis[r];
286
- }, se = "sy_x_error", yt = (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), M = (e) => class b extends Error {
289
+ }, se = "sy_x_error", wt = (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), M = (e) => class b extends Error {
287
290
  static discriminator = se;
288
291
  discriminator = b.discriminator;
289
292
  static TYPE = e;
290
293
  type = b.TYPE;
291
- static matches = yt(e);
294
+ static matches = wt(e);
292
295
  matches = b.matches;
293
296
  constructor(r, n) {
294
297
  super(r, n), this.name = b.TYPE;
@@ -305,8 +308,8 @@ const Le = i.object({
305
308
  `X Error is missing its type property: ${JSON.stringify(t)}`
306
309
  );
307
310
  return !0;
308
- }, m = "unknown", C = "nil";
309
- class wt {
311
+ }, p = "unknown", C = "nil";
312
+ class vt {
310
313
  providers = [];
311
314
  register(t) {
312
315
  this.providers.push(t);
@@ -318,17 +321,17 @@ class wt {
318
321
  const n = r.encode(t);
319
322
  if (n != null) return n;
320
323
  }
321
- if (t instanceof Error) return { type: m, data: t.message };
322
- if (typeof t == "string") return { type: m, data: t };
324
+ if (t instanceof Error) return { type: p, data: t.message };
325
+ if (typeof t == "string") return { type: p, data: t };
323
326
  try {
324
- return { type: m, data: JSON.stringify(t) };
327
+ return { type: p, data: JSON.stringify(t) };
325
328
  } catch {
326
- return { type: m, data: "unable to encode error information" };
329
+ return { type: p, data: "unable to encode error information" };
327
330
  }
328
331
  }
329
332
  decode(t) {
330
333
  if (t == null || t.type === C) return null;
331
- if (t.type === m) return new L(t.data);
334
+ if (t.type === p) return new L(t.data);
332
335
  for (const r of this.providers) {
333
336
  const n = r.decode(t);
334
337
  if (n != null) return n;
@@ -336,28 +339,28 @@ class wt {
336
339
  return new L(t.data);
337
340
  }
338
341
  }
339
- const D = _t("synnax-error-registry", () => new wt()), vt = ({ encode: e, decode: t }) => D().register({ encode: e, decode: t }), St = (e) => D().encode(e), xt = (e) => e == null ? null : D().decode(e);
342
+ const D = yt("synnax-error-registry", () => new vt()), St = ({ encode: e, decode: t }) => D().register({ encode: e, decode: t }), xt = (e) => D().encode(e), jt = (e) => e == null ? null : D().decode(e);
340
343
  class L extends M("unknown") {
341
344
  }
342
- const jt = i.object({ type: i.string(), data: i.string() });
343
- class Mt extends M("canceled") {
345
+ const Mt = i.object({ type: i.string(), data: i.string() });
346
+ class $t extends M("canceled") {
344
347
  }
345
348
  class Tt extends M("not_implemented") {
346
349
  }
347
- const cr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
350
+ const ur = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
348
351
  __proto__: null,
349
- Canceled: Mt,
352
+ Canceled: $t,
350
353
  NONE: C,
351
354
  NotImplemented: Tt,
352
- UNKNOWN: m,
355
+ UNKNOWN: p,
353
356
  Unknown: L,
354
357
  createTyped: M,
355
- decode: xt,
356
- encode: St,
358
+ decode: jt,
359
+ encode: xt,
357
360
  isTyped: oe,
358
- payloadZ: jt,
359
- register: vt
360
- }, Symbol.toStringTag, { value: "Module" })), lr = () => Promise.resolve(), ur = () => new Promise((e) => setTimeout(e, 0)), fr = (e) => e ? -1 : 1, ie = h.object({
361
+ payloadZ: Mt,
362
+ register: St
363
+ }, Symbol.toStringTag, { value: "Module" })), fr = () => Promise.resolve(), dr = () => new Promise((e) => setTimeout(e, 0)), hr = (e) => e ? -1 : 1, ie = h.object({
361
364
  jsonrpc: h.literal("2.0"),
362
365
  method: h.string(),
363
366
  // params should be z.union([z.record(z.string(), z.json()),
@@ -368,9 +371,9 @@ const cr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
368
371
  }), ae = h.object({
369
372
  jsonrpc: h.literal("2.0"),
370
373
  id: h.union([h.string(), h.number(), h.null()])
371
- }), $t = ae.extend({
372
- result: h.json()
373
374
  }), Et = ae.extend({
375
+ result: h.json()
376
+ }), Ot = ae.extend({
374
377
  error: h.object({
375
378
  code: h.number().int(),
376
379
  // This should be z.string(), but the VSCode JSON RPC implementation uses a looser
@@ -378,7 +381,7 @@ const cr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
378
381
  message: h.string().optional(),
379
382
  data: h.json().optional()
380
383
  })
381
- }), ce = h.union([$t, Et]), le = h.union([ie, ce]), Ot = (e) => {
384
+ }), ce = h.union([Et, Ot]), le = h.union([ie, ce]), kt = (e) => {
382
385
  const t = new TextDecoder();
383
386
  let r = new Uint8Array(0), n = null;
384
387
  return (s) => {
@@ -401,41 +404,41 @@ const cr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
401
404
  } else break;
402
405
  }
403
406
  };
404
- }, kt = (e) => {
407
+ }, At = (e) => {
405
408
  const t = JSON.stringify(e);
406
409
  return `Content-Length: ${new TextEncoder().encode(t).length}\r
407
410
  \r
408
411
  ` + t;
409
- }, dr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
412
+ }, mr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
410
413
  __proto__: null,
411
- encodeMessage: kt,
414
+ encodeMessage: At,
412
415
  messageZ: le,
413
416
  requestZ: ie,
414
417
  responseZ: ce,
415
- streamDecodeChunks: Ot
416
- }, Symbol.toStringTag, { value: "Module" })), At = (e, t, r) => {
418
+ streamDecodeChunks: kt
419
+ }, Symbol.toStringTag, { value: "Module" })), Pt = (e, t, r) => {
417
420
  const n = e.get(t);
418
421
  return n === void 0 ? (e.set(t, r), r) : n;
419
- }, hr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
422
+ }, pr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
420
423
  __proto__: null,
421
- getOrSetDefault: At
422
- }, Symbol.toStringTag, { value: "Module" })), q = i.string().regex(/^\d+\.\d+\.\d+$/), T = (e, t, r = {}) => {
424
+ getOrSetDefault: Pt
425
+ }, Symbol.toStringTag, { value: "Module" })), q = i.string().regex(/^\d+\.\d+\.\d+$/), $ = (e, t, r = {}) => {
423
426
  r.checkMajor ??= !0, r.checkMinor ??= !0, r.checkPatch ??= !0;
424
427
  const n = q.parse(e), s = q.parse(t), [o, a, f] = n.split(".").map(Number), [l, c, u] = s.split(".").map(Number);
425
428
  if (r.checkMajor) {
426
429
  if (o < l) return Z;
427
- if (o > l) return N;
430
+ if (o > l) return I;
428
431
  }
429
432
  if (r.checkMinor) {
430
433
  if (a < c) return Z;
431
- if (a > c) return N;
434
+ if (a > c) return I;
432
435
  }
433
436
  if (r.checkPatch) {
434
437
  if (f < u) return Z;
435
- if (f > u) return N;
438
+ if (f > u) return I;
436
439
  }
437
440
  return ve;
438
- }, Pt = (e, t, r = {}) => _e(T(e, t, r)), ue = (e, t, r = {}) => ye(T(e, t, r)), Zt = (e, t, r = {}) => we(T(e, t, r)), Nt = ({
441
+ }, Zt = (e, t, r = {}) => _e($(e, t, r)), ue = (e, t, r = {}) => ye($(e, t, r)), It = (e, t, r = {}) => we($(e, t, r)), Nt = ({
439
442
  name: e,
440
443
  migrate: t
441
444
  }) => (r) => {
@@ -445,14 +448,14 @@ const cr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
445
448
  } catch (n) {
446
449
  throw console.log(`${e} failed to migrate from ${r.version}`), console.error(n), n;
447
450
  }
448
- }, It = ({
451
+ }, Rt = ({
449
452
  name: e,
450
453
  migrations: t,
451
454
  targetSchema: r,
452
455
  defaultVersion: n,
453
456
  def: s
454
457
  }) => {
455
- const o = Object.keys(t).sort(T).pop();
458
+ const o = Object.keys(t).sort($).pop();
456
459
  if (o == null)
457
460
  return (c) => {
458
461
  if (c.version ??= n, c.version !== s.version)
@@ -473,7 +476,7 @@ const cr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
473
476
  try {
474
477
  if (a === 0 || ue(c.version, o))
475
478
  return console.log(f ? `${e} ${c.version} now up to date` : `${e} version ${c.version} is up to date with target version ${s.version}`), c;
476
- const u = c.version, p = t[u], P = p(c);
479
+ const u = c.version, m = t[u], P = m(c);
477
480
  return f = !0, l(P);
478
481
  } catch (u) {
479
482
  return console.log(
@@ -497,16 +500,16 @@ const cr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
497
500
  return console.log(`${e} failed to parse final result. Exiting with default`), console.error(u), s;
498
501
  }
499
502
  };
500
- }, pr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
503
+ }, gr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
501
504
  __proto__: null,
502
- compareSemVer: T,
505
+ compareSemVer: $,
503
506
  createMigration: Nt,
504
- migrator: It,
507
+ migrator: Rt,
505
508
  semVerNewer: ue,
506
- semVerOlder: Zt,
509
+ semVerOlder: It,
507
510
  semVerZ: q,
508
- versionsEqual: Pt
509
- }, Symbol.toStringTag, { value: "Module" })), fe = ["standard", "scientific", "engineering"], Rt = i.enum(fe), Ct = (e, t, r) => {
511
+ versionsEqual: Zt
512
+ }, Symbol.toStringTag, { value: "Module" })), fe = ["standard", "scientific", "engineering"], Ct = i.enum(fe), Lt = (e, t, r) => {
510
513
  if (Number.isNaN(e)) return "NaN";
511
514
  if (e === 1 / 0) return "∞";
512
515
  if (e === -1 / 0) return "-∞";
@@ -515,31 +518,31 @@ const cr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
515
518
  return t === 0 ? "0ᴇ0" : `0.${"0".repeat(t)}ᴇ0`;
516
519
  let n;
517
520
  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}`;
518
- }, mr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
521
+ }, br = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
519
522
  __proto__: null,
520
523
  NOTATIONS: fe,
521
- notationZ: Rt,
522
- stringifyNumber: Ct
523
- }, Symbol.toStringTag, { value: "Module" })), gr = (e) => {
524
+ notationZ: Ct,
525
+ stringifyNumber: Lt
526
+ }, Symbol.toStringTag, { value: "Module" })), _r = (e) => {
524
527
  if (e === void 0 || typeof e == "string" || typeof e == "number")
525
528
  return e;
526
529
  if (e.toString === void 0) throw new Error("invalid renderer");
527
530
  return e.toString();
528
- }, br = (e) => Array.isArray(e) ? [...e] : typeof e == "object" && e !== null ? { ...e } : e, de = i.enum([
531
+ }, yr = (e) => Array.isArray(e) ? [...e] : typeof e == "object" && e !== null ? { ...e } : e, de = i.enum([
529
532
  "success",
530
533
  "info",
531
534
  "warning",
532
535
  "error",
533
536
  "loading",
534
537
  "disabled"
535
- ]), Lt = (e) => i.object({
538
+ ]), qt = (e) => i.object({
536
539
  key: i.string(),
537
540
  variant: de,
538
541
  message: i.string(),
539
542
  description: i.string().optional(),
540
543
  time: U.z,
541
544
  details: e ?? i.unknown().optional()
542
- }), qt = (e, t) => {
545
+ }), Wt = (e, t) => {
543
546
  if (!(e instanceof Error)) throw e;
544
547
  return he({
545
548
  variant: "error",
@@ -553,22 +556,24 @@ const cr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
553
556
  key: be(),
554
557
  time: U.now(),
555
558
  ...e
556
- }), _r = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
559
+ }), zt = (e, t = []) => Array.isArray(t) ? t.includes(e) ? e : void 0 : t === e ? e : void 0, wr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
557
560
  __proto__: null,
558
561
  create: he,
559
- fromException: qt,
560
- statusZ: Lt,
562
+ filterVariant: zt,
563
+ fromException: Wt,
564
+ statusZ: qt,
561
565
  variantZ: de
562
- }, Symbol.toStringTag, { value: "Module" })), Wt = (e, t = "") => {
566
+ }, Symbol.toStringTag, { value: "Module" })), Dt = (e, t = "") => {
567
+ if (typeof e == "string") return e;
563
568
  const r = e.length;
564
569
  return r === 0 ? t : r === 1 ? e[0] : r === 2 ? `${e[0]} and ${e[1]}` : `${e.slice(0, -1).join(", ")}, and ${e[r - 1]}`;
565
- }, zt = (e) => {
570
+ }, Ut = (e) => {
566
571
  const t = e.split(" "), r = /* @__PURE__ */ new Set(), n = t.map((l) => l.charAt(0).toLowerCase()).join("");
567
572
  r.add(n.replace(/-/g, "_")), r.add(n.replace(/(.)(.)/g, "$1_$2").replace(/-/g, "_"));
568
573
  const s = /\d+/g;
569
574
  e.match(s) && t.forEach((l, c) => {
570
575
  if (s.test(l)) {
571
- const u = t.map((p, P) => P !== c ? p.charAt(0).toLowerCase() : p).join("");
576
+ const u = t.map((m, P) => P !== c ? m.charAt(0).toLowerCase() : m).join("");
572
577
  r.add(u.replace(/-/g, "_")), r.add(
573
578
  u.replace(/(.)(.)/g, "$1_$2").replace(/-/g, "_")
574
579
  );
@@ -580,13 +585,13 @@ const cr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
580
585
  return r.add(a.join("").replace(/-/g, "_")), r.add(a.join("_").replace(/-/g, "_")), Array.from(r).filter(
581
586
  (l) => l.length >= 2 && l.length <= 12 && !/^\d/.test(l)
582
587
  );
583
- }, Dt = (e, t) => e.startsWith(t) ? e.slice(t.length) : e, yr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
588
+ }, Bt = (e, t) => e.startsWith(t) ? e.slice(t.length) : e, vr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
584
589
  __proto__: null,
585
- createShortIdentifiers: zt,
586
- naturalLanguageJoin: Wt,
587
- trimPrefix: Dt
588
- }, Symbol.toStringTag, { value: "Module" })), Ut = new Error("request for lock canceled");
589
- var Bt = function(e, t, r, n) {
590
+ createShortIdentifiers: Ut,
591
+ naturalLanguageJoin: Dt,
592
+ trimPrefix: Bt
593
+ }, Symbol.toStringTag, { value: "Module" })), Vt = new Error("request for lock canceled");
594
+ var Ft = function(e, t, r, n) {
590
595
  function s(o) {
591
596
  return o instanceof r ? o : new r(function(a) {
592
597
  a(o);
@@ -596,15 +601,15 @@ var Bt = function(e, t, r, n) {
596
601
  function f(u) {
597
602
  try {
598
603
  c(n.next(u));
599
- } catch (p) {
600
- a(p);
604
+ } catch (m) {
605
+ a(m);
601
606
  }
602
607
  }
603
608
  function l(u) {
604
609
  try {
605
610
  c(n.throw(u));
606
- } catch (p) {
607
- a(p);
611
+ } catch (m) {
612
+ a(m);
608
613
  }
609
614
  }
610
615
  function c(u) {
@@ -613,20 +618,20 @@ var Bt = function(e, t, r, n) {
613
618
  c((n = n.apply(e, t || [])).next());
614
619
  });
615
620
  };
616
- class Ft {
617
- constructor(t, r = Ut) {
621
+ class Ht {
622
+ constructor(t, r = Vt) {
618
623
  this._value = t, this._cancelError = r, this._queue = [], this._weightedWaiters = [];
619
624
  }
620
625
  acquire(t = 1, r = 0) {
621
626
  if (t <= 0)
622
627
  throw new Error(`invalid weight ${t}: must be positive`);
623
628
  return new Promise((n, s) => {
624
- const o = { resolve: n, reject: s, weight: t, priority: r }, a = pe(this._queue, (f) => r <= f.priority);
629
+ const o = { resolve: n, reject: s, weight: t, priority: r }, a = me(this._queue, (f) => r <= f.priority);
625
630
  a === -1 && t <= this._value ? this._dispatchItem(o) : this._queue.splice(a + 1, 0, o);
626
631
  });
627
632
  }
628
633
  runExclusive(t) {
629
- return Bt(this, arguments, void 0, function* (r, n = 1, s = 0) {
634
+ return Ft(this, arguments, void 0, function* (r, n = 1, s = 0) {
630
635
  const [o, a] = yield this.acquire(n, s);
631
636
  try {
632
637
  return yield r(o);
@@ -639,7 +644,7 @@ class Ft {
639
644
  if (t <= 0)
640
645
  throw new Error(`invalid weight ${t}: must be positive`);
641
646
  return this._couldLockImmediately(t, r) ? Promise.resolve() : new Promise((n) => {
642
- this._weightedWaiters[t - 1] || (this._weightedWaiters[t - 1] = []), Ht(this._weightedWaiters[t - 1], { resolve: n, priority: r });
647
+ this._weightedWaiters[t - 1] || (this._weightedWaiters[t - 1] = []), Jt(this._weightedWaiters[t - 1], { resolve: n, priority: r });
643
648
  });
644
649
  }
645
650
  isLocked() {
@@ -694,17 +699,17 @@ class Ft {
694
699
  return (this._queue.length === 0 || this._queue[0].priority < r) && t <= this._value;
695
700
  }
696
701
  }
697
- function Ht(e, t) {
698
- const r = pe(e, (n) => t.priority <= n.priority);
702
+ function Jt(e, t) {
703
+ const r = me(e, (n) => t.priority <= n.priority);
699
704
  e.splice(r + 1, 0, t);
700
705
  }
701
- function pe(e, t) {
706
+ function me(e, t) {
702
707
  for (let r = e.length - 1; r >= 0; r--)
703
708
  if (t(e[r]))
704
709
  return r;
705
710
  return -1;
706
711
  }
707
- var Vt = function(e, t, r, n) {
712
+ var Gt = function(e, t, r, n) {
708
713
  function s(o) {
709
714
  return o instanceof r ? o : new r(function(a) {
710
715
  a(o);
@@ -714,15 +719,15 @@ var Vt = function(e, t, r, n) {
714
719
  function f(u) {
715
720
  try {
716
721
  c(n.next(u));
717
- } catch (p) {
718
- a(p);
722
+ } catch (m) {
723
+ a(m);
719
724
  }
720
725
  }
721
726
  function l(u) {
722
727
  try {
723
728
  c(n.throw(u));
724
- } catch (p) {
725
- a(p);
729
+ } catch (m) {
730
+ a(m);
726
731
  }
727
732
  }
728
733
  function c(u) {
@@ -731,12 +736,12 @@ var Vt = function(e, t, r, n) {
731
736
  c((n = n.apply(e, t || [])).next());
732
737
  });
733
738
  };
734
- class Jt {
739
+ class Qt {
735
740
  constructor(t) {
736
- this._semaphore = new Ft(1, t);
741
+ this._semaphore = new Ht(1, t);
737
742
  }
738
743
  acquire() {
739
- return Vt(this, arguments, void 0, function* (t = 0) {
744
+ return Gt(this, arguments, void 0, function* (t = 0) {
740
745
  const [, r] = yield this._semaphore.acquire(1, t);
741
746
  return r;
742
747
  });
@@ -757,91 +762,90 @@ class Jt {
757
762
  return this._semaphore.cancel();
758
763
  }
759
764
  }
760
- class me extends Jt {
765
+ class pe extends Qt {
761
766
  constructor(t) {
762
767
  super(), Object.assign(this, t);
763
768
  }
764
769
  }
765
- const Gt = (e) => new me(e), wr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
770
+ const Yt = (e) => new pe(e), Sr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
766
771
  __proto__: null,
767
- mutex: me,
768
- newMutex: Gt
769
- }, Symbol.toStringTag, { value: "Module" })), Qt = (e) => JSON.stringify(e, (t, r) => typeof r == "bigint" ? r.toString() : r), Yt = async (e, t = 200, r = 20) => {
772
+ mutex: pe,
773
+ newMutex: Yt
774
+ }, Symbol.toStringTag, { value: "Module" })), Kt = (e) => JSON.stringify(e, (t, r) => typeof r == "bigint" ? r.toString() : r), Xt = async (e, t = 200, r = 20) => {
770
775
  const n = Date.now();
771
776
  for (; Date.now() - n < t; )
772
777
  await e(), await new Promise((s) => setTimeout(s, r));
773
- }, vr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
778
+ }, xr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
774
779
  __proto__: null,
775
- expectAlways: Yt,
776
- toString: Qt
780
+ expectAlways: Xt,
781
+ toString: Kt
777
782
  }, Symbol.toStringTag, { value: "Module" }));
778
783
  export {
779
- Er as DataType,
780
- Or as Density,
781
- kr as MultiSeries,
782
- Ar as Rate,
784
+ kr as DataType,
785
+ Ar as Density,
786
+ Pr as MultiSeries,
787
+ Zr as Rate,
783
788
  qn as RoutedWorker,
784
- Pr as Series,
785
- Zr as Size,
786
- Nr as TimeRange,
789
+ Ir as Series,
790
+ Nr as Size,
791
+ Rr as TimeRange,
787
792
  _ as TimeSpan,
788
793
  U as TimeStamp,
789
794
  Wn as TypedWorker,
790
795
  Rn as URL,
791
- Ir as addSamples,
792
- jr as array,
793
- Tr as binary,
794
- dn as bounds,
795
- wn as box,
796
- or as breaker,
796
+ Cr as addSamples,
797
+ $r as array,
798
+ Er as binary,
799
+ mn as bounds,
800
+ Sn as box,
801
+ ar as breaker,
797
802
  Cn as buildQueryString,
798
- Br as caseconv,
799
- Hr as change,
800
- Jr as clamp,
801
- ir as color,
802
- Yr as compare,
803
- ar as control,
804
- Rr as convertDataType,
805
- gr as convertRenderV,
803
+ Fr as caseconv,
804
+ Jr as change,
805
+ Qr as clamp,
806
+ cr as color,
807
+ Xr as compare,
808
+ lr as control,
809
+ Lr as convertDataType,
810
+ _r as convertRenderV,
806
811
  zn as createMockWorkers,
807
- en as debounce,
808
- nn as deep,
809
- Sn as dimensions,
810
- jn as direction,
811
- cr as errors,
812
- lr as flushMicrotasks,
813
- ur as flushTaskQueue,
814
- Cr as id,
815
- Lr as instance,
816
- fr as invert,
817
- qr as isCrudeSeries,
818
- on as isObject,
819
- Wr as isTelemValue,
820
- dr as jsonRPC,
821
- cn as kv,
822
- un as link,
823
- Tn as location,
824
- hr as map,
825
- nr as math,
826
- pr as migrate,
827
- mr as notation,
828
- pn as observe,
829
- En as position,
830
- Kr as primitive,
831
- gn as record,
832
- _n as runtime,
833
- Gr as scale,
834
- br as shallowCopy,
835
- sr as sleep,
812
+ rn as debounce,
813
+ on as deep,
814
+ jn as dimensions,
815
+ $n as direction,
816
+ ur as errors,
817
+ fr as flushMicrotasks,
818
+ dr as flushTaskQueue,
819
+ qr as id,
820
+ Wr as instance,
821
+ hr as invert,
822
+ zr as isCrudeSeries,
823
+ cn as isObject,
824
+ Dr as isTelemValue,
825
+ mr as jsonRPC,
826
+ un as kv,
827
+ dn as link,
828
+ En as location,
829
+ pr as map,
830
+ or as math,
831
+ gr as migrate,
832
+ br as notation,
833
+ gn as observe,
834
+ en as primitive,
835
+ _n as record,
836
+ wn as runtime,
837
+ Yr as scale,
838
+ yr as shallowCopy,
839
+ ir as sleep,
836
840
  kn as spatial,
837
- _r as status,
838
- yr as strings,
839
- wr as sync,
840
- vr as testutil,
841
- tn as throttle,
842
- zr as typedArrayZ,
843
- Nn as unique,
844
- Dr as uuid,
841
+ wr as status,
842
+ vr as strings,
843
+ Sr as sync,
844
+ xr as testutil,
845
+ nn as throttle,
846
+ Ur as typedArrayZ,
847
+ In as unique,
848
+ Br as uuid,
845
849
  Pn as xy,
846
850
  Un as zod
847
851
  };