@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.
- package/.turbo/turbo-build.log +17 -17
- package/dist/{bounds-DeUXrllt.js → bounds-4BWKPqaP.js} +1 -4
- package/dist/bounds.js +1 -1
- package/dist/{index-C452Pas0.js → compare-Bnx9CdjS.js} +37 -47
- package/dist/compare-GPoFaKRW.cjs +1 -0
- package/dist/compare.cjs +1 -1
- package/dist/compare.js +34 -2
- package/dist/eslint.config.d.ts +3 -0
- package/dist/eslint.config.d.ts.map +1 -0
- package/dist/{index-D4NCYiQB.js → index-Bv029kh3.js} +2 -2
- package/dist/{index-udOjA9d-.cjs → index-CqisIWWC.cjs} +1 -1
- package/dist/index.cjs +3 -3
- package/dist/index.js +206 -201
- package/dist/{scale-BBWhTUqJ.js → scale-DJCMZbfU.js} +1 -1
- package/dist/scale.js +1 -1
- package/dist/series-Bh0pHoUF.cjs +6 -0
- package/dist/{series-Clbw-fZI.js → series-Cf8rT2IX.js} +7 -7
- package/dist/spatial.js +2 -2
- package/dist/src/array/nullable.d.ts.map +1 -1
- package/dist/src/compare/binary.d.ts +25 -0
- package/dist/src/compare/binary.d.ts.map +1 -0
- package/dist/src/compare/binary.spec.d.ts +2 -0
- package/dist/src/compare/binary.spec.d.ts.map +1 -0
- package/dist/src/compare/external.d.ts +3 -0
- package/dist/src/compare/external.d.ts.map +1 -0
- package/dist/src/compare/index.d.ts +1 -1
- package/dist/src/compare/index.d.ts.map +1 -1
- package/dist/src/csv/csv.d.ts +11 -0
- package/dist/src/csv/csv.d.ts.map +1 -0
- package/dist/src/csv/csv.spec.d.ts +2 -0
- package/dist/src/csv/csv.spec.d.ts.map +1 -0
- package/dist/src/csv/index.d.ts +2 -0
- package/dist/src/csv/index.d.ts.map +1 -0
- package/dist/src/index.d.ts +1 -0
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/spatial/bounds/bounds.d.ts.map +1 -1
- package/dist/src/spatial/box/box.d.ts +5 -5
- package/dist/src/spatial/box/box.d.ts.map +1 -1
- package/dist/src/spatial/scale/scale.d.ts +6 -6
- package/dist/src/spatial/scale/scale.d.ts.map +1 -1
- package/dist/telem.cjs +1 -1
- package/dist/telem.js +1 -1
- package/dist/unique.cjs +1 -1
- package/dist/unique.js +1 -1
- package/package.json +4 -4
- package/src/array/nullable.ts +9 -0
- package/src/compare/binary.spec.ts +308 -0
- package/src/compare/binary.ts +50 -0
- package/src/compare/external.ts +11 -0
- package/src/compare/index.ts +1 -1
- package/src/csv/csv.spec.ts +28 -0
- package/src/csv/csv.ts +26 -0
- package/src/csv/index.ts +10 -0
- package/src/index.ts +1 -0
- package/src/jsonrpc/jsonrpc.spec.ts +9 -0
- package/src/math/round.spec.ts +2 -1
- package/src/spatial/bounds/bounds.spec.ts +1 -1
- package/src/spatial/bounds/bounds.ts +9 -12
- package/src/spatial/box/box.spec.ts +3 -3
- package/src/spatial/box/box.ts +5 -5
- package/src/spatial/dimensions/dimensions.spec.ts +1 -1
- package/src/spatial/direction/direction.spec.ts +1 -1
- package/src/spatial/location/location.spec.ts +1 -1
- package/src/spatial/scale/scale.spec.ts +1 -1
- package/src/spatial/scale/scale.ts +7 -7
- package/tsconfig.json +1 -1
- package/tsconfig.tsbuildinfo +1 -1
- package/dist/index-xaxa1hoa.cjs +0 -1
- package/dist/series-B2zqvP8A.cjs +0 -6
- /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
|
|
2
|
+
import { e as sn } from "./external-Du5qzfYv.js";
|
|
3
3
|
import { J as Te } from "./index-yz34Wc2p.js";
|
|
4
|
-
import { c as
|
|
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
|
|
7
|
-
import { c as
|
|
8
|
-
import { a as
|
|
9
|
-
import { c as
|
|
10
|
-
import { c as
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import { b as
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
24
|
-
import {
|
|
25
|
-
import { d as
|
|
26
|
-
import {
|
|
27
|
-
import {
|
|
28
|
-
import {
|
|
29
|
-
import {
|
|
30
|
-
import {
|
|
31
|
-
import {
|
|
32
|
-
import {
|
|
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
|
-
},
|
|
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:
|
|
85
|
-
add:
|
|
86
|
-
closeTo:
|
|
87
|
-
div:
|
|
88
|
-
equal:
|
|
89
|
-
isInteger:
|
|
90
|
-
max:
|
|
91
|
-
min:
|
|
92
|
-
mult:
|
|
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:
|
|
95
|
+
roundToNearestMagnitude: Qe,
|
|
95
96
|
smartRound: it,
|
|
96
|
-
sub:
|
|
97
|
+
sub: Ye
|
|
97
98
|
}, Symbol.toStringTag, { value: "Module" })), Q = async (e) => await new Promise(
|
|
98
99
|
(t) => setTimeout(t, _.fromMilliseconds(e).milliseconds)
|
|
99
|
-
),
|
|
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
|
-
}),
|
|
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
|
-
}),
|
|
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
|
-
]),
|
|
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) =>
|
|
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 (!
|
|
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",
|
|
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 =
|
|
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",
|
|
410
|
-
class
|
|
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:
|
|
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 ===
|
|
432
|
-
if (t.type === p) return new
|
|
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
|
|
441
|
+
return new W(t.data);
|
|
438
442
|
}
|
|
439
443
|
}
|
|
440
|
-
const V =
|
|
441
|
-
class
|
|
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
|
|
444
|
-
class
|
|
447
|
+
const Jt = a.object({ type: a.string(), data: a.string() });
|
|
448
|
+
class Qt extends T("canceled") {
|
|
445
449
|
}
|
|
446
|
-
class
|
|
450
|
+
class Yt extends T("not_implemented") {
|
|
447
451
|
}
|
|
448
|
-
const
|
|
452
|
+
const zr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
449
453
|
__proto__: null,
|
|
450
|
-
Canceled:
|
|
451
|
-
NONE:
|
|
452
|
-
NotImplemented:
|
|
454
|
+
Canceled: Qt,
|
|
455
|
+
NONE: z,
|
|
456
|
+
NotImplemented: Yt,
|
|
453
457
|
UNKNOWN: p,
|
|
454
|
-
Unknown:
|
|
458
|
+
Unknown: W,
|
|
455
459
|
createTyped: T,
|
|
456
|
-
decode:
|
|
457
|
-
encode:
|
|
460
|
+
decode: Gt,
|
|
461
|
+
encode: Xt,
|
|
458
462
|
isTyped: fe,
|
|
459
|
-
payloadZ:
|
|
460
|
-
register:
|
|
461
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
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
|
-
}),
|
|
476
|
+
}), Kt = he.extend({
|
|
473
477
|
result: h.json()
|
|
474
|
-
}),
|
|
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([
|
|
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
|
-
},
|
|
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
|
-
},
|
|
514
|
+
}, Fr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
511
515
|
__proto__: null,
|
|
512
|
-
encodeMessage:
|
|
516
|
+
encodeMessage: rr,
|
|
513
517
|
messageZ: pe,
|
|
514
518
|
requestZ: de,
|
|
515
519
|
responseZ: me,
|
|
516
|
-
streamDecodeChunks:
|
|
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
|
-
}),
|
|
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" })),
|
|
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
|
-
},
|
|
532
|
+
}, Hr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
529
533
|
__proto__: null,
|
|
530
|
-
getOrSetDefault:
|
|
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
|
|
547
|
-
}),
|
|
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
|
-
},
|
|
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
|
-
},
|
|
613
|
+
}, Xr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
610
614
|
__proto__: null,
|
|
611
615
|
compareSemVer: $,
|
|
612
|
-
createMigration:
|
|
613
|
-
migrator:
|
|
616
|
+
createMigration: ir,
|
|
617
|
+
migrator: ar,
|
|
614
618
|
semVerNewer: _e,
|
|
615
|
-
semVerOlder:
|
|
619
|
+
semVerOlder: or,
|
|
616
620
|
semVerZ: D,
|
|
617
|
-
versionsEqual:
|
|
618
|
-
}, Symbol.toStringTag, { value: "Module" })), ye = ["standard", "scientific", "engineering"],
|
|
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
|
-
},
|
|
631
|
+
}, Gr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
628
632
|
__proto__: null,
|
|
629
633
|
NOTATIONS: ye,
|
|
630
|
-
notationZ:
|
|
631
|
-
stringifyNumber:
|
|
632
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
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
|
-
},
|
|
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
|
-
]),
|
|
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
|
-
}),
|
|
657
|
+
}), fr = a.object({
|
|
654
658
|
stack: a.string(),
|
|
655
659
|
error: a.instanceof(Error)
|
|
656
|
-
}),
|
|
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:
|
|
669
|
+
key: ze(),
|
|
666
670
|
time: X.now(),
|
|
667
671
|
name: "",
|
|
668
672
|
...e
|
|
669
|
-
}),
|
|
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
|
-
},
|
|
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
|
-
},
|
|
679
|
+
}, Yr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
676
680
|
__proto__: null,
|
|
677
681
|
create: Me,
|
|
678
|
-
exceptionDetailsSchema:
|
|
679
|
-
fromException:
|
|
680
|
-
keepVariants:
|
|
681
|
-
removeVariants:
|
|
682
|
-
statusZ:
|
|
682
|
+
exceptionDetailsSchema: fr,
|
|
683
|
+
fromException: dr,
|
|
684
|
+
keepVariants: hr,
|
|
685
|
+
removeVariants: mr,
|
|
686
|
+
statusZ: ur,
|
|
683
687
|
variantZ: we
|
|
684
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
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(
|
|
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
|
-
},
|
|
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
|
-
},
|
|
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
|
-
},
|
|
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:
|
|
717
|
-
deduplicateFileName:
|
|
718
|
-
naturalLanguageJoin:
|
|
719
|
-
trimPrefix:
|
|
720
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
721
|
-
var
|
|
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
|
|
749
|
-
constructor(t, 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
|
|
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] = []),
|
|
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
|
|
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
|
|
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
|
|
870
|
+
class Tr {
|
|
867
871
|
constructor(t) {
|
|
868
|
-
this._semaphore = new
|
|
872
|
+
this._semaphore = new Sr(1, t);
|
|
869
873
|
}
|
|
870
874
|
acquire() {
|
|
871
|
-
return
|
|
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
|
|
896
|
+
class ve extends Tr {
|
|
893
897
|
constructor(t) {
|
|
894
898
|
super(), Object.assign(this, t);
|
|
895
899
|
}
|
|
896
900
|
}
|
|
897
|
-
const
|
|
901
|
+
const $r = (e) => new ve(e), en = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
898
902
|
__proto__: null,
|
|
899
903
|
mutex: ve,
|
|
900
|
-
newMutex:
|
|
901
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
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
|
-
},
|
|
909
|
+
}, tn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
906
910
|
__proto__: null,
|
|
907
|
-
expectAlways:
|
|
908
|
-
toString:
|
|
911
|
+
expectAlways: Nr,
|
|
912
|
+
toString: jr
|
|
909
913
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
910
914
|
export {
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
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
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
Xn as
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
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
|
};
|