@synnaxlabs/x 0.14.2 → 0.15.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 +5 -5
- package/dist/telem/series.d.ts +34 -14
- package/dist/telem/telem.d.ts +1 -1
- package/dist/x.cjs +7 -7
- package/dist/x.cjs.map +1 -1
- package/dist/x.js +1091 -926
- package/dist/x.js.map +1 -1
- package/package.json +3 -3
- package/src/telem/series.spec.ts +148 -1
- package/src/telem/series.ts +256 -21
- package/src/telem/telem.ts +2 -2
package/dist/x.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
var Ai = Object.defineProperty;
|
|
2
2
|
var Ii = (t, e, r) => e in t ? Ai(t, e, { enumerable: !0, configurable: !0, writable: !0, value: r }) : t[e] = r;
|
|
3
|
-
var
|
|
3
|
+
var h = (t, e, r) => (Ii(t, typeof e != "symbol" ? e + "" : e, r), r);
|
|
4
4
|
let Ni = "_-0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ", Ei = (t = 21) => {
|
|
5
5
|
let e = "", r = t;
|
|
6
6
|
for (; r--; )
|
|
7
7
|
e += Ni[Math.random() * 64 | 0];
|
|
8
8
|
return e;
|
|
9
9
|
};
|
|
10
|
-
const ss = (t) => t != null && typeof t == "object" && "toString" in t,
|
|
10
|
+
const ss = (t) => t != null && typeof t == "object" && "toString" in t, Zu = (t) => {
|
|
11
11
|
if (ss(t))
|
|
12
12
|
return (t == null ? void 0 : t.toString().length) === 0;
|
|
13
13
|
switch (typeof t) {
|
|
@@ -50,25 +50,25 @@ const ss = (t) => t != null && typeof t == "object" && "toString" in t, Eu = (t)
|
|
|
50
50
|
}, Ci = (t, e, r) => {
|
|
51
51
|
const n = Nr(e[t], r);
|
|
52
52
|
return (s, i) => n(s[t], i[t]);
|
|
53
|
-
}, Mi = (t, e) => t.length !== e.length ? t.length - e.length : t.every((r, n) => r === e[n]) ? 0 : -1,
|
|
53
|
+
}, Mi = (t, e) => t.length !== e.length ? t.length - e.length : t.every((r, n) => r === e[n]) ? 0 : -1, Ri = (t, e) => {
|
|
54
54
|
if (t.length !== e.length)
|
|
55
55
|
return t.length - e.length;
|
|
56
56
|
if (t.length === 0)
|
|
57
57
|
return 0;
|
|
58
58
|
const r = Nr(t[0]), n = [...t].sort(r), s = [...e].sort(r);
|
|
59
59
|
return n.every((i, a) => i === s[a]) ? 0 : -1;
|
|
60
|
-
},
|
|
61
|
-
const
|
|
60
|
+
}, ji = (t, e) => t === e ? 0 : t === "first" && e === "last" ? 1 : -1, is = (t) => (e, r) => t(r, e);
|
|
61
|
+
const Lu = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
62
62
|
__proto__: null,
|
|
63
63
|
EQUAL: 0,
|
|
64
64
|
GREATER_THAN: 1,
|
|
65
65
|
LESS_THAN: -1,
|
|
66
66
|
newF: Nr,
|
|
67
67
|
newFieldF: Ci,
|
|
68
|
-
order:
|
|
68
|
+
order: ji,
|
|
69
69
|
primitiveArrays: Mi,
|
|
70
70
|
reverseF: is,
|
|
71
|
-
unorderedPrimitiveArrays:
|
|
71
|
+
unorderedPrimitiveArrays: Ri
|
|
72
72
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
73
73
|
var V;
|
|
74
74
|
(function(t) {
|
|
@@ -203,8 +203,8 @@ class be extends Error {
|
|
|
203
203
|
else {
|
|
204
204
|
let o = n, l = 0;
|
|
205
205
|
for (; l < a.path.length; ) {
|
|
206
|
-
const
|
|
207
|
-
l === a.path.length - 1 ? (o[
|
|
206
|
+
const p = a.path[l];
|
|
207
|
+
l === a.path.length - 1 ? (o[p] = o[p] || { _errors: [] }, o[p]._errors.push(r(a))) : o[p] = o[p] || { _errors: [] }, o = o[p], l++;
|
|
208
208
|
}
|
|
209
209
|
}
|
|
210
210
|
};
|
|
@@ -230,7 +230,7 @@ class be extends Error {
|
|
|
230
230
|
}
|
|
231
231
|
}
|
|
232
232
|
be.create = (t) => new be(t);
|
|
233
|
-
const
|
|
233
|
+
const Nt = (t, e) => {
|
|
234
234
|
let r;
|
|
235
235
|
switch (t.code) {
|
|
236
236
|
case x.invalid_type:
|
|
@@ -286,22 +286,22 @@ const It = (t, e) => {
|
|
|
286
286
|
}
|
|
287
287
|
return { message: r };
|
|
288
288
|
};
|
|
289
|
-
let as =
|
|
289
|
+
let as = Nt;
|
|
290
290
|
function Ui(t) {
|
|
291
291
|
as = t;
|
|
292
292
|
}
|
|
293
|
-
function
|
|
293
|
+
function gr() {
|
|
294
294
|
return as;
|
|
295
295
|
}
|
|
296
|
-
const
|
|
296
|
+
const mr = (t) => {
|
|
297
297
|
const { data: e, path: r, errorMaps: n, issueData: s } = t, i = [...r, ...s.path || []], a = {
|
|
298
298
|
...s,
|
|
299
299
|
path: i
|
|
300
300
|
};
|
|
301
301
|
let o = "";
|
|
302
|
-
const l = n.filter((
|
|
303
|
-
for (const
|
|
304
|
-
o =
|
|
302
|
+
const l = n.filter((p) => !!p).slice().reverse();
|
|
303
|
+
for (const p of l)
|
|
304
|
+
o = p(a, { data: e, defaultError: o }).message;
|
|
305
305
|
return {
|
|
306
306
|
...s,
|
|
307
307
|
path: i,
|
|
@@ -309,15 +309,15 @@ const gr = (t) => {
|
|
|
309
309
|
};
|
|
310
310
|
}, Zi = [];
|
|
311
311
|
function S(t, e) {
|
|
312
|
-
const r =
|
|
312
|
+
const r = mr({
|
|
313
313
|
issueData: e,
|
|
314
314
|
data: t.data,
|
|
315
315
|
path: t.path,
|
|
316
316
|
errorMaps: [
|
|
317
317
|
t.common.contextualErrorMap,
|
|
318
318
|
t.schemaErrorMap,
|
|
319
|
-
|
|
320
|
-
|
|
319
|
+
gr(),
|
|
320
|
+
Nt
|
|
321
321
|
// then global default map
|
|
322
322
|
].filter((n) => !!n)
|
|
323
323
|
});
|
|
@@ -364,7 +364,7 @@ class ue {
|
|
|
364
364
|
}
|
|
365
365
|
const M = Object.freeze({
|
|
366
366
|
status: "aborted"
|
|
367
|
-
}), os = (t) => ({ status: "dirty", value: t }), fe = (t) => ({ status: "valid", value: t }), Gr = (t) => t.status === "aborted", Jr = (t) => t.status === "dirty",
|
|
367
|
+
}), os = (t) => ({ status: "dirty", value: t }), fe = (t) => ({ status: "valid", value: t }), Gr = (t) => t.status === "aborted", Jr = (t) => t.status === "dirty", Et = (t) => t.status === "valid", xr = (t) => typeof Promise < "u" && t instanceof Promise;
|
|
368
368
|
var N;
|
|
369
369
|
(function(t) {
|
|
370
370
|
t.errToObj = (e) => typeof e == "string" ? { message: e } : e || {}, t.toString = (e) => typeof e == "string" ? e : e == null ? void 0 : e.message;
|
|
@@ -377,8 +377,8 @@ class Ie {
|
|
|
377
377
|
return this._cachedPath.length || (this._key instanceof Array ? this._cachedPath.push(...this._path, ...this._key) : this._cachedPath.push(...this._path, this._key)), this._cachedPath;
|
|
378
378
|
}
|
|
379
379
|
}
|
|
380
|
-
const
|
|
381
|
-
if (
|
|
380
|
+
const $n = (t, e) => {
|
|
381
|
+
if (Et(e))
|
|
382
382
|
return { success: !0, data: e.value };
|
|
383
383
|
if (!t.common.issues.length)
|
|
384
384
|
throw new Error("Validation failed but no issues detected.");
|
|
@@ -392,7 +392,7 @@ const Pn = (t, e) => {
|
|
|
392
392
|
}
|
|
393
393
|
};
|
|
394
394
|
};
|
|
395
|
-
function
|
|
395
|
+
function R(t) {
|
|
396
396
|
if (!t)
|
|
397
397
|
return {};
|
|
398
398
|
const { errorMap: e, invalid_type_error: r, required_error: n, description: s } = t;
|
|
@@ -400,7 +400,7 @@ function j(t) {
|
|
|
400
400
|
throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);
|
|
401
401
|
return e ? { errorMap: e, description: s } : { errorMap: (a, o) => a.code !== "invalid_type" ? { message: o.defaultError } : typeof o.data > "u" ? { message: n ?? o.defaultError } : { message: r ?? o.defaultError }, description: s };
|
|
402
402
|
}
|
|
403
|
-
class
|
|
403
|
+
class j {
|
|
404
404
|
constructor(e) {
|
|
405
405
|
this.spa = this.safeParseAsync, this._def = e, this.parse = this.parse.bind(this), this.safeParse = this.safeParse.bind(this), this.parseAsync = this.parseAsync.bind(this), this.safeParseAsync = this.safeParseAsync.bind(this), this.spa = this.spa.bind(this), this.refine = this.refine.bind(this), this.refinement = this.refinement.bind(this), this.superRefine = this.superRefine.bind(this), this.optional = this.optional.bind(this), this.nullable = this.nullable.bind(this), this.nullish = this.nullish.bind(this), this.array = this.array.bind(this), this.promise = this.promise.bind(this), this.or = this.or.bind(this), this.and = this.and.bind(this), this.transform = this.transform.bind(this), this.brand = this.brand.bind(this), this.default = this.default.bind(this), this.catch = this.catch.bind(this), this.describe = this.describe.bind(this), this.pipe = this.pipe.bind(this), this.readonly = this.readonly.bind(this), this.isNullable = this.isNullable.bind(this), this.isOptional = this.isOptional.bind(this);
|
|
406
406
|
}
|
|
@@ -435,7 +435,7 @@ class R {
|
|
|
435
435
|
}
|
|
436
436
|
_parseSync(e) {
|
|
437
437
|
const r = this._parse(e);
|
|
438
|
-
if (
|
|
438
|
+
if (xr(r))
|
|
439
439
|
throw new Error("Synchronous parse encountered promise.");
|
|
440
440
|
return r;
|
|
441
441
|
}
|
|
@@ -463,7 +463,7 @@ class R {
|
|
|
463
463
|
data: e,
|
|
464
464
|
parsedType: Ge(e)
|
|
465
465
|
}, i = this._parseSync({ data: e, path: s.path, parent: s });
|
|
466
|
-
return
|
|
466
|
+
return $n(s, i);
|
|
467
467
|
}
|
|
468
468
|
async parseAsync(e, r) {
|
|
469
469
|
const n = await this.safeParseAsync(e, r);
|
|
@@ -483,8 +483,8 @@ class R {
|
|
|
483
483
|
parent: null,
|
|
484
484
|
data: e,
|
|
485
485
|
parsedType: Ge(e)
|
|
486
|
-
}, s = this._parse({ data: e, path: n.path, parent: n }), i = await (
|
|
487
|
-
return
|
|
486
|
+
}, s = this._parse({ data: e, path: n.path, parent: n }), i = await (xr(s) ? s : Promise.resolve(s));
|
|
487
|
+
return $n(n, i);
|
|
488
488
|
}
|
|
489
489
|
refine(e, r) {
|
|
490
490
|
const n = (s) => typeof r == "string" || typeof r > "u" ? { message: r } : typeof r == "function" ? r(s) : r;
|
|
@@ -510,7 +510,7 @@ class R {
|
|
|
510
510
|
return this._refinement(e);
|
|
511
511
|
}
|
|
512
512
|
optional() {
|
|
513
|
-
return
|
|
513
|
+
return Pe.create(this, this._def);
|
|
514
514
|
}
|
|
515
515
|
nullable() {
|
|
516
516
|
return gt.create(this, this._def);
|
|
@@ -528,11 +528,11 @@ class R {
|
|
|
528
528
|
return jt.create([this, e], this._def);
|
|
529
529
|
}
|
|
530
530
|
and(e) {
|
|
531
|
-
return
|
|
531
|
+
return Bt.create(this, e, this._def);
|
|
532
532
|
}
|
|
533
533
|
transform(e) {
|
|
534
534
|
return new _e({
|
|
535
|
-
...
|
|
535
|
+
...R(this._def),
|
|
536
536
|
schema: this,
|
|
537
537
|
typeName: E.ZodEffects,
|
|
538
538
|
effect: { type: "transform", transform: e }
|
|
@@ -541,7 +541,7 @@ class R {
|
|
|
541
541
|
default(e) {
|
|
542
542
|
const r = typeof e == "function" ? e : () => e;
|
|
543
543
|
return new Pt({
|
|
544
|
-
...
|
|
544
|
+
...R(this._def),
|
|
545
545
|
innerType: this,
|
|
546
546
|
defaultValue: r,
|
|
547
547
|
typeName: E.ZodDefault
|
|
@@ -551,13 +551,13 @@ class R {
|
|
|
551
551
|
return new us({
|
|
552
552
|
typeName: E.ZodBranded,
|
|
553
553
|
type: this,
|
|
554
|
-
...
|
|
554
|
+
...R(this._def)
|
|
555
555
|
});
|
|
556
556
|
}
|
|
557
557
|
catch(e) {
|
|
558
558
|
const r = typeof e == "function" ? e : () => e;
|
|
559
|
-
return new
|
|
560
|
-
...
|
|
559
|
+
return new Or({
|
|
560
|
+
...R(this._def),
|
|
561
561
|
innerType: this,
|
|
562
562
|
catchValue: r,
|
|
563
563
|
typeName: E.ZodCatch
|
|
@@ -571,10 +571,10 @@ class R {
|
|
|
571
571
|
});
|
|
572
572
|
}
|
|
573
573
|
pipe(e) {
|
|
574
|
-
return
|
|
574
|
+
return Gt.create(this, e);
|
|
575
575
|
}
|
|
576
576
|
readonly() {
|
|
577
|
-
return
|
|
577
|
+
return Tr.create(this);
|
|
578
578
|
}
|
|
579
579
|
isOptional() {
|
|
580
580
|
return this.safeParse(void 0).success;
|
|
@@ -583,13 +583,13 @@ class R {
|
|
|
583
583
|
return this.safeParse(null).success;
|
|
584
584
|
}
|
|
585
585
|
}
|
|
586
|
-
const Li = /^c[^\s-]{8,}$/i,
|
|
586
|
+
const Li = /^c[^\s-]{8,}$/i, $i = /^[a-z][a-z0-9]*$/, Pi = /^[0-9A-HJKMNP-TV-Z]{26}$/, Di = /^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i, Vi = /^(?!\.)(?!.*\.\.)([A-Z0-9_+-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i, zi = "^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";
|
|
587
587
|
let Yr;
|
|
588
588
|
const qi = /^(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))$/, Yi = /^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/, Fi = (t) => t.precision ? t.offset ? new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{${t.precision}}(([+-]\\d{2}(:?\\d{2})?)|Z)$`) : new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{${t.precision}}Z$`) : t.precision === 0 ? t.offset ? new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(([+-]\\d{2}(:?\\d{2})?)|Z)$") : new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}Z$") : t.offset ? new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(([+-]\\d{2}(:?\\d{2})?)|Z)$") : new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?Z$");
|
|
589
589
|
function Ki(t, e) {
|
|
590
590
|
return !!((e === "v4" || !e) && qi.test(t) || (e === "v6" || !e) && Yi.test(t));
|
|
591
591
|
}
|
|
592
|
-
class we extends
|
|
592
|
+
class we extends j {
|
|
593
593
|
_parse(e) {
|
|
594
594
|
if (this._def.coerce && (e.data = String(e.data)), this._getType(e) !== T.string) {
|
|
595
595
|
const i = this._getOrReturnCtx(e);
|
|
@@ -666,13 +666,13 @@ class we extends R {
|
|
|
666
666
|
message: i.message
|
|
667
667
|
}), n.dirty());
|
|
668
668
|
else if (i.kind === "cuid2")
|
|
669
|
-
|
|
669
|
+
$i.test(e.data) || (s = this._getOrReturnCtx(e, s), S(s, {
|
|
670
670
|
validation: "cuid2",
|
|
671
671
|
code: x.invalid_string,
|
|
672
672
|
message: i.message
|
|
673
673
|
}), n.dirty());
|
|
674
674
|
else if (i.kind === "ulid")
|
|
675
|
-
|
|
675
|
+
Pi.test(e.data) || (s = this._getOrReturnCtx(e, s), S(s, {
|
|
676
676
|
validation: "ulid",
|
|
677
677
|
code: x.invalid_string,
|
|
678
678
|
message: i.message
|
|
@@ -887,14 +887,14 @@ we.create = (t) => {
|
|
|
887
887
|
checks: [],
|
|
888
888
|
typeName: E.ZodString,
|
|
889
889
|
coerce: (e = t == null ? void 0 : t.coerce) !== null && e !== void 0 ? e : !1,
|
|
890
|
-
...
|
|
890
|
+
...R(t)
|
|
891
891
|
});
|
|
892
892
|
};
|
|
893
893
|
function Wi(t, e) {
|
|
894
894
|
const r = (t.toString().split(".")[1] || "").length, n = (e.toString().split(".")[1] || "").length, s = r > n ? r : n, i = parseInt(t.toFixed(s).replace(".", "")), a = parseInt(e.toFixed(s).replace(".", ""));
|
|
895
895
|
return i % a / Math.pow(10, s);
|
|
896
896
|
}
|
|
897
|
-
class rt extends
|
|
897
|
+
class rt extends j {
|
|
898
898
|
constructor() {
|
|
899
899
|
super(...arguments), this.min = this.gte, this.max = this.lte, this.step = this.multipleOf;
|
|
900
900
|
}
|
|
@@ -1064,9 +1064,9 @@ rt.create = (t) => new rt({
|
|
|
1064
1064
|
checks: [],
|
|
1065
1065
|
typeName: E.ZodNumber,
|
|
1066
1066
|
coerce: (t == null ? void 0 : t.coerce) || !1,
|
|
1067
|
-
...
|
|
1067
|
+
...R(t)
|
|
1068
1068
|
});
|
|
1069
|
-
class nt extends
|
|
1069
|
+
class nt extends j {
|
|
1070
1070
|
constructor() {
|
|
1071
1071
|
super(...arguments), this.min = this.gte, this.max = this.lte;
|
|
1072
1072
|
}
|
|
@@ -1191,10 +1191,10 @@ nt.create = (t) => {
|
|
|
1191
1191
|
checks: [],
|
|
1192
1192
|
typeName: E.ZodBigInt,
|
|
1193
1193
|
coerce: (e = t == null ? void 0 : t.coerce) !== null && e !== void 0 ? e : !1,
|
|
1194
|
-
...
|
|
1194
|
+
...R(t)
|
|
1195
1195
|
});
|
|
1196
1196
|
};
|
|
1197
|
-
class
|
|
1197
|
+
class Ct extends j {
|
|
1198
1198
|
_parse(e) {
|
|
1199
1199
|
if (this._def.coerce && (e.data = !!e.data), this._getType(e) !== T.boolean) {
|
|
1200
1200
|
const n = this._getOrReturnCtx(e);
|
|
@@ -1207,12 +1207,12 @@ class Et extends R {
|
|
|
1207
1207
|
return fe(e.data);
|
|
1208
1208
|
}
|
|
1209
1209
|
}
|
|
1210
|
-
|
|
1210
|
+
Ct.create = (t) => new Ct({
|
|
1211
1211
|
typeName: E.ZodBoolean,
|
|
1212
1212
|
coerce: (t == null ? void 0 : t.coerce) || !1,
|
|
1213
|
-
...
|
|
1213
|
+
...R(t)
|
|
1214
1214
|
});
|
|
1215
|
-
class pt extends
|
|
1215
|
+
class pt extends j {
|
|
1216
1216
|
_parse(e) {
|
|
1217
1217
|
if (this._def.coerce && (e.data = new Date(e.data)), this._getType(e) !== T.date) {
|
|
1218
1218
|
const i = this._getOrReturnCtx(e);
|
|
@@ -1288,9 +1288,9 @@ pt.create = (t) => new pt({
|
|
|
1288
1288
|
checks: [],
|
|
1289
1289
|
coerce: (t == null ? void 0 : t.coerce) || !1,
|
|
1290
1290
|
typeName: E.ZodDate,
|
|
1291
|
-
...
|
|
1291
|
+
...R(t)
|
|
1292
1292
|
});
|
|
1293
|
-
class
|
|
1293
|
+
class vr extends j {
|
|
1294
1294
|
_parse(e) {
|
|
1295
1295
|
if (this._getType(e) !== T.symbol) {
|
|
1296
1296
|
const n = this._getOrReturnCtx(e);
|
|
@@ -1303,11 +1303,11 @@ class xr extends R {
|
|
|
1303
1303
|
return fe(e.data);
|
|
1304
1304
|
}
|
|
1305
1305
|
}
|
|
1306
|
-
|
|
1306
|
+
vr.create = (t) => new vr({
|
|
1307
1307
|
typeName: E.ZodSymbol,
|
|
1308
|
-
...
|
|
1308
|
+
...R(t)
|
|
1309
1309
|
});
|
|
1310
|
-
class
|
|
1310
|
+
class Mt extends j {
|
|
1311
1311
|
_parse(e) {
|
|
1312
1312
|
if (this._getType(e) !== T.undefined) {
|
|
1313
1313
|
const n = this._getOrReturnCtx(e);
|
|
@@ -1320,11 +1320,11 @@ class Ct extends R {
|
|
|
1320
1320
|
return fe(e.data);
|
|
1321
1321
|
}
|
|
1322
1322
|
}
|
|
1323
|
-
|
|
1323
|
+
Mt.create = (t) => new Mt({
|
|
1324
1324
|
typeName: E.ZodUndefined,
|
|
1325
|
-
...
|
|
1325
|
+
...R(t)
|
|
1326
1326
|
});
|
|
1327
|
-
class
|
|
1327
|
+
class Rt extends j {
|
|
1328
1328
|
_parse(e) {
|
|
1329
1329
|
if (this._getType(e) !== T.null) {
|
|
1330
1330
|
const n = this._getOrReturnCtx(e);
|
|
@@ -1337,11 +1337,11 @@ class Mt extends R {
|
|
|
1337
1337
|
return fe(e.data);
|
|
1338
1338
|
}
|
|
1339
1339
|
}
|
|
1340
|
-
|
|
1340
|
+
Rt.create = (t) => new Rt({
|
|
1341
1341
|
typeName: E.ZodNull,
|
|
1342
|
-
...
|
|
1342
|
+
...R(t)
|
|
1343
1343
|
});
|
|
1344
|
-
class Ot extends
|
|
1344
|
+
class Ot extends j {
|
|
1345
1345
|
constructor() {
|
|
1346
1346
|
super(...arguments), this._any = !0;
|
|
1347
1347
|
}
|
|
@@ -1351,9 +1351,9 @@ class Ot extends R {
|
|
|
1351
1351
|
}
|
|
1352
1352
|
Ot.create = (t) => new Ot({
|
|
1353
1353
|
typeName: E.ZodAny,
|
|
1354
|
-
...
|
|
1354
|
+
...R(t)
|
|
1355
1355
|
});
|
|
1356
|
-
class dt extends
|
|
1356
|
+
class dt extends j {
|
|
1357
1357
|
constructor() {
|
|
1358
1358
|
super(...arguments), this._unknown = !0;
|
|
1359
1359
|
}
|
|
@@ -1363,9 +1363,9 @@ class dt extends R {
|
|
|
1363
1363
|
}
|
|
1364
1364
|
dt.create = (t) => new dt({
|
|
1365
1365
|
typeName: E.ZodUnknown,
|
|
1366
|
-
...
|
|
1366
|
+
...R(t)
|
|
1367
1367
|
});
|
|
1368
|
-
class Ve extends
|
|
1368
|
+
class Ve extends j {
|
|
1369
1369
|
_parse(e) {
|
|
1370
1370
|
const r = this._getOrReturnCtx(e);
|
|
1371
1371
|
return S(r, {
|
|
@@ -1377,9 +1377,9 @@ class Ve extends R {
|
|
|
1377
1377
|
}
|
|
1378
1378
|
Ve.create = (t) => new Ve({
|
|
1379
1379
|
typeName: E.ZodNever,
|
|
1380
|
-
...
|
|
1380
|
+
...R(t)
|
|
1381
1381
|
});
|
|
1382
|
-
class
|
|
1382
|
+
class wr extends j {
|
|
1383
1383
|
_parse(e) {
|
|
1384
1384
|
if (this._getType(e) !== T.undefined) {
|
|
1385
1385
|
const n = this._getOrReturnCtx(e);
|
|
@@ -1392,11 +1392,11 @@ class vr extends R {
|
|
|
1392
1392
|
return fe(e.data);
|
|
1393
1393
|
}
|
|
1394
1394
|
}
|
|
1395
|
-
|
|
1395
|
+
wr.create = (t) => new wr({
|
|
1396
1396
|
typeName: E.ZodVoid,
|
|
1397
|
-
...
|
|
1397
|
+
...R(t)
|
|
1398
1398
|
});
|
|
1399
|
-
class Oe extends
|
|
1399
|
+
class Oe extends j {
|
|
1400
1400
|
_parse(e) {
|
|
1401
1401
|
const { ctx: r, status: n } = this._processInputParams(e), s = this._def;
|
|
1402
1402
|
if (r.parsedType !== T.array)
|
|
@@ -1467,14 +1467,14 @@ Oe.create = (t, e) => new Oe({
|
|
|
1467
1467
|
maxLength: null,
|
|
1468
1468
|
exactLength: null,
|
|
1469
1469
|
typeName: E.ZodArray,
|
|
1470
|
-
...
|
|
1470
|
+
...R(e)
|
|
1471
1471
|
});
|
|
1472
1472
|
function wt(t) {
|
|
1473
1473
|
if (t instanceof Q) {
|
|
1474
1474
|
const e = {};
|
|
1475
1475
|
for (const r in t.shape) {
|
|
1476
1476
|
const n = t.shape[r];
|
|
1477
|
-
e[r] =
|
|
1477
|
+
e[r] = Pe.create(wt(n));
|
|
1478
1478
|
}
|
|
1479
1479
|
return new Q({
|
|
1480
1480
|
...t._def,
|
|
@@ -1484,9 +1484,9 @@ function wt(t) {
|
|
|
1484
1484
|
return t instanceof Oe ? new Oe({
|
|
1485
1485
|
...t._def,
|
|
1486
1486
|
type: wt(t.element)
|
|
1487
|
-
}) : t instanceof
|
|
1487
|
+
}) : t instanceof Pe ? Pe.create(wt(t.unwrap())) : t instanceof gt ? gt.create(wt(t.unwrap())) : t instanceof Ne ? Ne.create(t.items.map((e) => wt(e))) : t;
|
|
1488
1488
|
}
|
|
1489
|
-
class Q extends
|
|
1489
|
+
class Q extends j {
|
|
1490
1490
|
constructor() {
|
|
1491
1491
|
super(...arguments), this._cached = null, this.nonstrict = this.passthrough, this.augment = this.extend;
|
|
1492
1492
|
}
|
|
@@ -1498,48 +1498,48 @@ class Q extends R {
|
|
|
1498
1498
|
}
|
|
1499
1499
|
_parse(e) {
|
|
1500
1500
|
if (this._getType(e) !== T.object) {
|
|
1501
|
-
const
|
|
1502
|
-
return S(
|
|
1501
|
+
const p = this._getOrReturnCtx(e);
|
|
1502
|
+
return S(p, {
|
|
1503
1503
|
code: x.invalid_type,
|
|
1504
1504
|
expected: T.object,
|
|
1505
|
-
received:
|
|
1505
|
+
received: p.parsedType
|
|
1506
1506
|
}), M;
|
|
1507
1507
|
}
|
|
1508
1508
|
const { status: n, ctx: s } = this._processInputParams(e), { shape: i, keys: a } = this._getCached(), o = [];
|
|
1509
1509
|
if (!(this._def.catchall instanceof Ve && this._def.unknownKeys === "strip"))
|
|
1510
|
-
for (const
|
|
1511
|
-
a.includes(
|
|
1510
|
+
for (const p in s.data)
|
|
1511
|
+
a.includes(p) || o.push(p);
|
|
1512
1512
|
const l = [];
|
|
1513
|
-
for (const
|
|
1514
|
-
const b = i[
|
|
1513
|
+
for (const p of a) {
|
|
1514
|
+
const b = i[p], k = s.data[p];
|
|
1515
1515
|
l.push({
|
|
1516
|
-
key: { status: "valid", value:
|
|
1517
|
-
value: b._parse(new Ie(s, k, s.path,
|
|
1518
|
-
alwaysSet:
|
|
1516
|
+
key: { status: "valid", value: p },
|
|
1517
|
+
value: b._parse(new Ie(s, k, s.path, p)),
|
|
1518
|
+
alwaysSet: p in s.data
|
|
1519
1519
|
});
|
|
1520
1520
|
}
|
|
1521
1521
|
if (this._def.catchall instanceof Ve) {
|
|
1522
|
-
const
|
|
1523
|
-
if (
|
|
1522
|
+
const p = this._def.unknownKeys;
|
|
1523
|
+
if (p === "passthrough")
|
|
1524
1524
|
for (const b of o)
|
|
1525
1525
|
l.push({
|
|
1526
1526
|
key: { status: "valid", value: b },
|
|
1527
1527
|
value: { status: "valid", value: s.data[b] }
|
|
1528
1528
|
});
|
|
1529
|
-
else if (
|
|
1529
|
+
else if (p === "strict")
|
|
1530
1530
|
o.length > 0 && (S(s, {
|
|
1531
1531
|
code: x.unrecognized_keys,
|
|
1532
1532
|
keys: o
|
|
1533
1533
|
}), n.dirty());
|
|
1534
|
-
else if (
|
|
1534
|
+
else if (p !== "strip")
|
|
1535
1535
|
throw new Error("Internal ZodObject error: invalid unknownKeys value.");
|
|
1536
1536
|
} else {
|
|
1537
|
-
const
|
|
1537
|
+
const p = this._def.catchall;
|
|
1538
1538
|
for (const b of o) {
|
|
1539
1539
|
const k = s.data[b];
|
|
1540
1540
|
l.push({
|
|
1541
1541
|
key: { status: "valid", value: b },
|
|
1542
|
-
value:
|
|
1542
|
+
value: p._parse(
|
|
1543
1543
|
new Ie(s, k, s.path, b)
|
|
1544
1544
|
//, ctx.child(key), value, getParsedType(value)
|
|
1545
1545
|
),
|
|
@@ -1548,17 +1548,17 @@ class Q extends R {
|
|
|
1548
1548
|
}
|
|
1549
1549
|
}
|
|
1550
1550
|
return s.common.async ? Promise.resolve().then(async () => {
|
|
1551
|
-
const
|
|
1551
|
+
const p = [];
|
|
1552
1552
|
for (const b of l) {
|
|
1553
1553
|
const k = await b.key;
|
|
1554
|
-
|
|
1554
|
+
p.push({
|
|
1555
1555
|
key: k,
|
|
1556
1556
|
value: await b.value,
|
|
1557
1557
|
alwaysSet: b.alwaysSet
|
|
1558
1558
|
});
|
|
1559
1559
|
}
|
|
1560
|
-
return
|
|
1561
|
-
}).then((
|
|
1560
|
+
return p;
|
|
1561
|
+
}).then((p) => ue.mergeObjectSync(n, p)) : ue.mergeObjectSync(n, l);
|
|
1562
1562
|
}
|
|
1563
1563
|
get shape() {
|
|
1564
1564
|
return this._def.shape();
|
|
@@ -1740,7 +1740,7 @@ class Q extends R {
|
|
|
1740
1740
|
r[n] = this.shape[n];
|
|
1741
1741
|
else {
|
|
1742
1742
|
let i = this.shape[n];
|
|
1743
|
-
for (; i instanceof
|
|
1743
|
+
for (; i instanceof Pe; )
|
|
1744
1744
|
i = i._def.innerType;
|
|
1745
1745
|
r[n] = i;
|
|
1746
1746
|
}
|
|
@@ -1758,23 +1758,23 @@ Q.create = (t, e) => new Q({
|
|
|
1758
1758
|
unknownKeys: "strip",
|
|
1759
1759
|
catchall: Ve.create(),
|
|
1760
1760
|
typeName: E.ZodObject,
|
|
1761
|
-
...
|
|
1761
|
+
...R(e)
|
|
1762
1762
|
});
|
|
1763
1763
|
Q.strictCreate = (t, e) => new Q({
|
|
1764
1764
|
shape: () => t,
|
|
1765
1765
|
unknownKeys: "strict",
|
|
1766
1766
|
catchall: Ve.create(),
|
|
1767
1767
|
typeName: E.ZodObject,
|
|
1768
|
-
...
|
|
1768
|
+
...R(e)
|
|
1769
1769
|
});
|
|
1770
1770
|
Q.lazycreate = (t, e) => new Q({
|
|
1771
1771
|
shape: t,
|
|
1772
1772
|
unknownKeys: "strip",
|
|
1773
1773
|
catchall: Ve.create(),
|
|
1774
1774
|
typeName: E.ZodObject,
|
|
1775
|
-
...
|
|
1775
|
+
...R(e)
|
|
1776
1776
|
});
|
|
1777
|
-
class jt extends
|
|
1777
|
+
class jt extends j {
|
|
1778
1778
|
_parse(e) {
|
|
1779
1779
|
const { ctx: r } = this._processInputParams(e), n = this._def.options;
|
|
1780
1780
|
function s(i) {
|
|
@@ -1813,7 +1813,7 @@ class jt extends R {
|
|
|
1813
1813
|
let i;
|
|
1814
1814
|
const a = [];
|
|
1815
1815
|
for (const l of n) {
|
|
1816
|
-
const
|
|
1816
|
+
const p = {
|
|
1817
1817
|
...r,
|
|
1818
1818
|
common: {
|
|
1819
1819
|
...r.common,
|
|
@@ -1823,11 +1823,11 @@ class jt extends R {
|
|
|
1823
1823
|
}, b = l._parseSync({
|
|
1824
1824
|
data: r.data,
|
|
1825
1825
|
path: r.path,
|
|
1826
|
-
parent:
|
|
1826
|
+
parent: p
|
|
1827
1827
|
});
|
|
1828
1828
|
if (b.status === "valid")
|
|
1829
1829
|
return b;
|
|
1830
|
-
b.status === "dirty" && !i && (i = { result: b, ctx:
|
|
1830
|
+
b.status === "dirty" && !i && (i = { result: b, ctx: p }), p.common.issues.length && a.push(p.common.issues);
|
|
1831
1831
|
}
|
|
1832
1832
|
if (i)
|
|
1833
1833
|
return r.common.issues.push(...i.ctx.common.issues), i.result;
|
|
@@ -1845,10 +1845,10 @@ class jt extends R {
|
|
|
1845
1845
|
jt.create = (t, e) => new jt({
|
|
1846
1846
|
options: t,
|
|
1847
1847
|
typeName: E.ZodUnion,
|
|
1848
|
-
...
|
|
1848
|
+
...R(e)
|
|
1849
1849
|
});
|
|
1850
|
-
const
|
|
1851
|
-
class Er extends
|
|
1850
|
+
const rr = (t) => t instanceof Zt ? rr(t.schema) : t instanceof _e ? rr(t.innerType()) : t instanceof Lt ? [t.value] : t instanceof st ? t.options : t instanceof $t ? Object.keys(t.enum) : t instanceof Pt ? rr(t._def.innerType) : t instanceof Mt ? [void 0] : t instanceof Rt ? [null] : null;
|
|
1851
|
+
class Er extends j {
|
|
1852
1852
|
_parse(e) {
|
|
1853
1853
|
const { ctx: r } = this._processInputParams(e);
|
|
1854
1854
|
if (r.parsedType !== T.object)
|
|
@@ -1892,7 +1892,7 @@ class Er extends R {
|
|
|
1892
1892
|
static create(e, r, n) {
|
|
1893
1893
|
const s = /* @__PURE__ */ new Map();
|
|
1894
1894
|
for (const i of r) {
|
|
1895
|
-
const a =
|
|
1895
|
+
const a = rr(i.shape[e]);
|
|
1896
1896
|
if (!a)
|
|
1897
1897
|
throw new Error(`A discriminator value for key \`${e}\` could not be extracted from all schema options`);
|
|
1898
1898
|
for (const o of a) {
|
|
@@ -1906,7 +1906,7 @@ class Er extends R {
|
|
|
1906
1906
|
discriminator: e,
|
|
1907
1907
|
options: r,
|
|
1908
1908
|
optionsMap: s,
|
|
1909
|
-
...
|
|
1909
|
+
...R(n)
|
|
1910
1910
|
});
|
|
1911
1911
|
}
|
|
1912
1912
|
}
|
|
@@ -1937,7 +1937,7 @@ function Hr(t, e) {
|
|
|
1937
1937
|
} else
|
|
1938
1938
|
return r === T.date && n === T.date && +t == +e ? { valid: !0, data: t } : { valid: !1 };
|
|
1939
1939
|
}
|
|
1940
|
-
class
|
|
1940
|
+
class Bt extends j {
|
|
1941
1941
|
_parse(e) {
|
|
1942
1942
|
const { status: r, ctx: n } = this._processInputParams(e), s = (i, a) => {
|
|
1943
1943
|
if (Gr(i) || Gr(a))
|
|
@@ -1969,13 +1969,13 @@ class Rt extends R {
|
|
|
1969
1969
|
}));
|
|
1970
1970
|
}
|
|
1971
1971
|
}
|
|
1972
|
-
|
|
1972
|
+
Bt.create = (t, e, r) => new Bt({
|
|
1973
1973
|
left: t,
|
|
1974
1974
|
right: e,
|
|
1975
1975
|
typeName: E.ZodIntersection,
|
|
1976
|
-
...
|
|
1976
|
+
...R(r)
|
|
1977
1977
|
});
|
|
1978
|
-
class Ne extends
|
|
1978
|
+
class Ne extends j {
|
|
1979
1979
|
_parse(e) {
|
|
1980
1980
|
const { status: r, ctx: n } = this._processInputParams(e);
|
|
1981
1981
|
if (n.parsedType !== T.array)
|
|
@@ -2022,10 +2022,10 @@ Ne.create = (t, e) => {
|
|
|
2022
2022
|
items: t,
|
|
2023
2023
|
typeName: E.ZodTuple,
|
|
2024
2024
|
rest: null,
|
|
2025
|
-
...
|
|
2025
|
+
...R(e)
|
|
2026
2026
|
});
|
|
2027
2027
|
};
|
|
2028
|
-
class
|
|
2028
|
+
class Ut extends j {
|
|
2029
2029
|
get keySchema() {
|
|
2030
2030
|
return this._def.keyType;
|
|
2031
2031
|
}
|
|
@@ -2052,20 +2052,20 @@ class Bt extends R {
|
|
|
2052
2052
|
return this._def.valueType;
|
|
2053
2053
|
}
|
|
2054
2054
|
static create(e, r, n) {
|
|
2055
|
-
return r instanceof
|
|
2055
|
+
return r instanceof j ? new Ut({
|
|
2056
2056
|
keyType: e,
|
|
2057
2057
|
valueType: r,
|
|
2058
2058
|
typeName: E.ZodRecord,
|
|
2059
|
-
...
|
|
2060
|
-
}) : new
|
|
2059
|
+
...R(n)
|
|
2060
|
+
}) : new Ut({
|
|
2061
2061
|
keyType: we.create(),
|
|
2062
2062
|
valueType: e,
|
|
2063
2063
|
typeName: E.ZodRecord,
|
|
2064
|
-
...
|
|
2064
|
+
...R(r)
|
|
2065
2065
|
});
|
|
2066
2066
|
}
|
|
2067
2067
|
}
|
|
2068
|
-
class
|
|
2068
|
+
class br extends j {
|
|
2069
2069
|
get keySchema() {
|
|
2070
2070
|
return this._def.keyType;
|
|
2071
2071
|
}
|
|
@@ -2080,40 +2080,40 @@ class wr extends R {
|
|
|
2080
2080
|
expected: T.map,
|
|
2081
2081
|
received: n.parsedType
|
|
2082
2082
|
}), M;
|
|
2083
|
-
const s = this._def.keyType, i = this._def.valueType, a = [...n.data.entries()].map(([o, l],
|
|
2084
|
-
key: s._parse(new Ie(n, o, n.path, [
|
|
2085
|
-
value: i._parse(new Ie(n, l, n.path, [
|
|
2083
|
+
const s = this._def.keyType, i = this._def.valueType, a = [...n.data.entries()].map(([o, l], p) => ({
|
|
2084
|
+
key: s._parse(new Ie(n, o, n.path, [p, "key"])),
|
|
2085
|
+
value: i._parse(new Ie(n, l, n.path, [p, "value"]))
|
|
2086
2086
|
}));
|
|
2087
2087
|
if (n.common.async) {
|
|
2088
2088
|
const o = /* @__PURE__ */ new Map();
|
|
2089
2089
|
return Promise.resolve().then(async () => {
|
|
2090
2090
|
for (const l of a) {
|
|
2091
|
-
const
|
|
2092
|
-
if (
|
|
2091
|
+
const p = await l.key, b = await l.value;
|
|
2092
|
+
if (p.status === "aborted" || b.status === "aborted")
|
|
2093
2093
|
return M;
|
|
2094
|
-
(
|
|
2094
|
+
(p.status === "dirty" || b.status === "dirty") && r.dirty(), o.set(p.value, b.value);
|
|
2095
2095
|
}
|
|
2096
2096
|
return { status: r.value, value: o };
|
|
2097
2097
|
});
|
|
2098
2098
|
} else {
|
|
2099
2099
|
const o = /* @__PURE__ */ new Map();
|
|
2100
2100
|
for (const l of a) {
|
|
2101
|
-
const
|
|
2102
|
-
if (
|
|
2101
|
+
const p = l.key, b = l.value;
|
|
2102
|
+
if (p.status === "aborted" || b.status === "aborted")
|
|
2103
2103
|
return M;
|
|
2104
|
-
(
|
|
2104
|
+
(p.status === "dirty" || b.status === "dirty") && r.dirty(), o.set(p.value, b.value);
|
|
2105
2105
|
}
|
|
2106
2106
|
return { status: r.value, value: o };
|
|
2107
2107
|
}
|
|
2108
2108
|
}
|
|
2109
2109
|
}
|
|
2110
|
-
|
|
2110
|
+
br.create = (t, e, r) => new br({
|
|
2111
2111
|
valueType: e,
|
|
2112
2112
|
keyType: t,
|
|
2113
2113
|
typeName: E.ZodMap,
|
|
2114
|
-
...
|
|
2114
|
+
...R(r)
|
|
2115
2115
|
});
|
|
2116
|
-
class yt extends
|
|
2116
|
+
class yt extends j {
|
|
2117
2117
|
_parse(e) {
|
|
2118
2118
|
const { status: r, ctx: n } = this._processInputParams(e);
|
|
2119
2119
|
if (n.parsedType !== T.set)
|
|
@@ -2140,15 +2140,15 @@ class yt extends R {
|
|
|
2140
2140
|
}), r.dirty());
|
|
2141
2141
|
const i = this._def.valueType;
|
|
2142
2142
|
function a(l) {
|
|
2143
|
-
const
|
|
2143
|
+
const p = /* @__PURE__ */ new Set();
|
|
2144
2144
|
for (const b of l) {
|
|
2145
2145
|
if (b.status === "aborted")
|
|
2146
2146
|
return M;
|
|
2147
|
-
b.status === "dirty" && r.dirty(),
|
|
2147
|
+
b.status === "dirty" && r.dirty(), p.add(b.value);
|
|
2148
2148
|
}
|
|
2149
|
-
return { status: r.value, value:
|
|
2149
|
+
return { status: r.value, value: p };
|
|
2150
2150
|
}
|
|
2151
|
-
const o = [...n.data.values()].map((l,
|
|
2151
|
+
const o = [...n.data.values()].map((l, p) => i._parse(new Ie(n, l, n.path, p)));
|
|
2152
2152
|
return n.common.async ? Promise.all(o).then((l) => a(l)) : a(o);
|
|
2153
2153
|
}
|
|
2154
2154
|
min(e, r) {
|
|
@@ -2175,9 +2175,9 @@ yt.create = (t, e) => new yt({
|
|
|
2175
2175
|
minSize: null,
|
|
2176
2176
|
maxSize: null,
|
|
2177
2177
|
typeName: E.ZodSet,
|
|
2178
|
-
...
|
|
2178
|
+
...R(e)
|
|
2179
2179
|
});
|
|
2180
|
-
class bt extends
|
|
2180
|
+
class bt extends j {
|
|
2181
2181
|
constructor() {
|
|
2182
2182
|
super(...arguments), this.validate = this.implement;
|
|
2183
2183
|
}
|
|
@@ -2190,15 +2190,15 @@ class bt extends R {
|
|
|
2190
2190
|
received: r.parsedType
|
|
2191
2191
|
}), M;
|
|
2192
2192
|
function n(o, l) {
|
|
2193
|
-
return
|
|
2193
|
+
return mr({
|
|
2194
2194
|
data: o,
|
|
2195
2195
|
path: r.path,
|
|
2196
2196
|
errorMaps: [
|
|
2197
2197
|
r.common.contextualErrorMap,
|
|
2198
2198
|
r.schemaErrorMap,
|
|
2199
|
-
|
|
2200
|
-
|
|
2201
|
-
].filter((
|
|
2199
|
+
gr(),
|
|
2200
|
+
Nt
|
|
2201
|
+
].filter((p) => !!p),
|
|
2202
2202
|
issueData: {
|
|
2203
2203
|
code: x.invalid_arguments,
|
|
2204
2204
|
argumentsError: l
|
|
@@ -2206,15 +2206,15 @@ class bt extends R {
|
|
|
2206
2206
|
});
|
|
2207
2207
|
}
|
|
2208
2208
|
function s(o, l) {
|
|
2209
|
-
return
|
|
2209
|
+
return mr({
|
|
2210
2210
|
data: o,
|
|
2211
2211
|
path: r.path,
|
|
2212
2212
|
errorMaps: [
|
|
2213
2213
|
r.common.contextualErrorMap,
|
|
2214
2214
|
r.schemaErrorMap,
|
|
2215
|
-
|
|
2216
|
-
|
|
2217
|
-
].filter((
|
|
2215
|
+
gr(),
|
|
2216
|
+
Nt
|
|
2217
|
+
].filter((p) => !!p),
|
|
2218
2218
|
issueData: {
|
|
2219
2219
|
code: x.invalid_return_type,
|
|
2220
2220
|
returnTypeError: l
|
|
@@ -2225,20 +2225,20 @@ class bt extends R {
|
|
|
2225
2225
|
if (this._def.returns instanceof _t) {
|
|
2226
2226
|
const o = this;
|
|
2227
2227
|
return fe(async function(...l) {
|
|
2228
|
-
const
|
|
2229
|
-
throw
|
|
2228
|
+
const p = new be([]), b = await o._def.args.parseAsync(l, i).catch((Y) => {
|
|
2229
|
+
throw p.addIssue(n(l, Y)), p;
|
|
2230
2230
|
}), k = await Reflect.apply(a, this, b);
|
|
2231
|
-
return await o._def.returns._def.type.parseAsync(k, i).catch((
|
|
2232
|
-
throw
|
|
2231
|
+
return await o._def.returns._def.type.parseAsync(k, i).catch((Y) => {
|
|
2232
|
+
throw p.addIssue(s(k, Y)), p;
|
|
2233
2233
|
});
|
|
2234
2234
|
});
|
|
2235
2235
|
} else {
|
|
2236
2236
|
const o = this;
|
|
2237
2237
|
return fe(function(...l) {
|
|
2238
|
-
const
|
|
2239
|
-
if (!
|
|
2240
|
-
throw new be([n(l,
|
|
2241
|
-
const b = Reflect.apply(a, this,
|
|
2238
|
+
const p = o._def.args.safeParse(l, i);
|
|
2239
|
+
if (!p.success)
|
|
2240
|
+
throw new be([n(l, p.error)]);
|
|
2241
|
+
const b = Reflect.apply(a, this, p.data), k = o._def.returns.safeParse(b, i);
|
|
2242
2242
|
if (!k.success)
|
|
2243
2243
|
throw new be([s(b, k.error)]);
|
|
2244
2244
|
return k.data;
|
|
@@ -2274,11 +2274,11 @@ class bt extends R {
|
|
|
2274
2274
|
args: e || Ne.create([]).rest(dt.create()),
|
|
2275
2275
|
returns: r || dt.create(),
|
|
2276
2276
|
typeName: E.ZodFunction,
|
|
2277
|
-
...
|
|
2277
|
+
...R(n)
|
|
2278
2278
|
});
|
|
2279
2279
|
}
|
|
2280
2280
|
}
|
|
2281
|
-
class
|
|
2281
|
+
class Zt extends j {
|
|
2282
2282
|
get schema() {
|
|
2283
2283
|
return this._def.getter();
|
|
2284
2284
|
}
|
|
@@ -2287,12 +2287,12 @@ class Ut extends R {
|
|
|
2287
2287
|
return this._def.getter()._parse({ data: r.data, path: r.path, parent: r });
|
|
2288
2288
|
}
|
|
2289
2289
|
}
|
|
2290
|
-
|
|
2290
|
+
Zt.create = (t, e) => new Zt({
|
|
2291
2291
|
getter: t,
|
|
2292
2292
|
typeName: E.ZodLazy,
|
|
2293
|
-
...
|
|
2293
|
+
...R(e)
|
|
2294
2294
|
});
|
|
2295
|
-
class
|
|
2295
|
+
class Lt extends j {
|
|
2296
2296
|
_parse(e) {
|
|
2297
2297
|
if (e.data !== this._def.value) {
|
|
2298
2298
|
const r = this._getOrReturnCtx(e);
|
|
@@ -2308,19 +2308,19 @@ class Zt extends R {
|
|
|
2308
2308
|
return this._def.value;
|
|
2309
2309
|
}
|
|
2310
2310
|
}
|
|
2311
|
-
|
|
2311
|
+
Lt.create = (t, e) => new Lt({
|
|
2312
2312
|
value: t,
|
|
2313
2313
|
typeName: E.ZodLiteral,
|
|
2314
|
-
...
|
|
2314
|
+
...R(e)
|
|
2315
2315
|
});
|
|
2316
2316
|
function cs(t, e) {
|
|
2317
2317
|
return new st({
|
|
2318
2318
|
values: t,
|
|
2319
2319
|
typeName: E.ZodEnum,
|
|
2320
|
-
...
|
|
2320
|
+
...R(e)
|
|
2321
2321
|
});
|
|
2322
2322
|
}
|
|
2323
|
-
class st extends
|
|
2323
|
+
class st extends j {
|
|
2324
2324
|
_parse(e) {
|
|
2325
2325
|
if (typeof e.data != "string") {
|
|
2326
2326
|
const r = this._getOrReturnCtx(e), n = this._def.values;
|
|
@@ -2369,7 +2369,7 @@ class st extends R {
|
|
|
2369
2369
|
}
|
|
2370
2370
|
}
|
|
2371
2371
|
st.create = cs;
|
|
2372
|
-
class
|
|
2372
|
+
class $t extends j {
|
|
2373
2373
|
_parse(e) {
|
|
2374
2374
|
const r = V.getValidEnumValues(this._def.values), n = this._getOrReturnCtx(e);
|
|
2375
2375
|
if (n.parsedType !== T.string && n.parsedType !== T.number) {
|
|
@@ -2394,12 +2394,12 @@ class Lt extends R {
|
|
|
2394
2394
|
return this._def.values;
|
|
2395
2395
|
}
|
|
2396
2396
|
}
|
|
2397
|
-
|
|
2397
|
+
$t.create = (t, e) => new $t({
|
|
2398
2398
|
values: t,
|
|
2399
2399
|
typeName: E.ZodNativeEnum,
|
|
2400
|
-
...
|
|
2400
|
+
...R(e)
|
|
2401
2401
|
});
|
|
2402
|
-
class _t extends
|
|
2402
|
+
class _t extends j {
|
|
2403
2403
|
unwrap() {
|
|
2404
2404
|
return this._def.type;
|
|
2405
2405
|
}
|
|
@@ -2421,9 +2421,9 @@ class _t extends R {
|
|
|
2421
2421
|
_t.create = (t, e) => new _t({
|
|
2422
2422
|
type: t,
|
|
2423
2423
|
typeName: E.ZodPromise,
|
|
2424
|
-
...
|
|
2424
|
+
...R(e)
|
|
2425
2425
|
});
|
|
2426
|
-
class _e extends
|
|
2426
|
+
class _e extends j {
|
|
2427
2427
|
innerType() {
|
|
2428
2428
|
return this._def.schema;
|
|
2429
2429
|
}
|
|
@@ -2480,14 +2480,14 @@ class _e extends R {
|
|
|
2480
2480
|
path: n.path,
|
|
2481
2481
|
parent: n
|
|
2482
2482
|
});
|
|
2483
|
-
if (!
|
|
2483
|
+
if (!Et(a))
|
|
2484
2484
|
return a;
|
|
2485
2485
|
const o = s.transform(a.value, i);
|
|
2486
2486
|
if (o instanceof Promise)
|
|
2487
2487
|
throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");
|
|
2488
2488
|
return { status: r.value, value: o };
|
|
2489
2489
|
} else
|
|
2490
|
-
return this._def.schema._parseAsync({ data: n.data, path: n.path, parent: n }).then((a) =>
|
|
2490
|
+
return this._def.schema._parseAsync({ data: n.data, path: n.path, parent: n }).then((a) => Et(a) ? Promise.resolve(s.transform(a.value, i)).then((o) => ({ status: r.value, value: o })) : a);
|
|
2491
2491
|
V.assertNever(s);
|
|
2492
2492
|
}
|
|
2493
2493
|
}
|
|
@@ -2495,15 +2495,15 @@ _e.create = (t, e, r) => new _e({
|
|
|
2495
2495
|
schema: t,
|
|
2496
2496
|
typeName: E.ZodEffects,
|
|
2497
2497
|
effect: e,
|
|
2498
|
-
...
|
|
2498
|
+
...R(r)
|
|
2499
2499
|
});
|
|
2500
2500
|
_e.createWithPreprocess = (t, e, r) => new _e({
|
|
2501
2501
|
schema: e,
|
|
2502
2502
|
effect: { type: "preprocess", transform: t },
|
|
2503
2503
|
typeName: E.ZodEffects,
|
|
2504
|
-
...
|
|
2504
|
+
...R(r)
|
|
2505
2505
|
});
|
|
2506
|
-
class
|
|
2506
|
+
class Pe extends j {
|
|
2507
2507
|
_parse(e) {
|
|
2508
2508
|
return this._getType(e) === T.undefined ? fe(void 0) : this._def.innerType._parse(e);
|
|
2509
2509
|
}
|
|
@@ -2511,12 +2511,12 @@ class $e extends R {
|
|
|
2511
2511
|
return this._def.innerType;
|
|
2512
2512
|
}
|
|
2513
2513
|
}
|
|
2514
|
-
|
|
2514
|
+
Pe.create = (t, e) => new Pe({
|
|
2515
2515
|
innerType: t,
|
|
2516
2516
|
typeName: E.ZodOptional,
|
|
2517
|
-
...
|
|
2517
|
+
...R(e)
|
|
2518
2518
|
});
|
|
2519
|
-
class gt extends
|
|
2519
|
+
class gt extends j {
|
|
2520
2520
|
_parse(e) {
|
|
2521
2521
|
return this._getType(e) === T.null ? fe(null) : this._def.innerType._parse(e);
|
|
2522
2522
|
}
|
|
@@ -2527,9 +2527,9 @@ class gt extends R {
|
|
|
2527
2527
|
gt.create = (t, e) => new gt({
|
|
2528
2528
|
innerType: t,
|
|
2529
2529
|
typeName: E.ZodNullable,
|
|
2530
|
-
...
|
|
2530
|
+
...R(e)
|
|
2531
2531
|
});
|
|
2532
|
-
class Pt extends
|
|
2532
|
+
class Pt extends j {
|
|
2533
2533
|
_parse(e) {
|
|
2534
2534
|
const { ctx: r } = this._processInputParams(e);
|
|
2535
2535
|
let n = r.data;
|
|
@@ -2547,9 +2547,9 @@ Pt.create = (t, e) => new Pt({
|
|
|
2547
2547
|
innerType: t,
|
|
2548
2548
|
typeName: E.ZodDefault,
|
|
2549
2549
|
defaultValue: typeof e.default == "function" ? e.default : () => e.default,
|
|
2550
|
-
...
|
|
2550
|
+
...R(e)
|
|
2551
2551
|
});
|
|
2552
|
-
class
|
|
2552
|
+
class Or extends j {
|
|
2553
2553
|
_parse(e) {
|
|
2554
2554
|
const { ctx: r } = this._processInputParams(e), n = {
|
|
2555
2555
|
...r,
|
|
@@ -2564,7 +2564,7 @@ class br extends R {
|
|
|
2564
2564
|
...n
|
|
2565
2565
|
}
|
|
2566
2566
|
});
|
|
2567
|
-
return
|
|
2567
|
+
return xr(s) ? s.then((i) => ({
|
|
2568
2568
|
status: "valid",
|
|
2569
2569
|
value: i.status === "valid" ? i.value : this._def.catchValue({
|
|
2570
2570
|
get error() {
|
|
@@ -2586,13 +2586,13 @@ class br extends R {
|
|
|
2586
2586
|
return this._def.innerType;
|
|
2587
2587
|
}
|
|
2588
2588
|
}
|
|
2589
|
-
|
|
2589
|
+
Or.create = (t, e) => new Or({
|
|
2590
2590
|
innerType: t,
|
|
2591
2591
|
typeName: E.ZodCatch,
|
|
2592
2592
|
catchValue: typeof e.catch == "function" ? e.catch : () => e.catch,
|
|
2593
|
-
...
|
|
2593
|
+
...R(e)
|
|
2594
2594
|
});
|
|
2595
|
-
class
|
|
2595
|
+
class _r extends j {
|
|
2596
2596
|
_parse(e) {
|
|
2597
2597
|
if (this._getType(e) !== T.nan) {
|
|
2598
2598
|
const n = this._getOrReturnCtx(e);
|
|
@@ -2605,12 +2605,12 @@ class Or extends R {
|
|
|
2605
2605
|
return { status: "valid", value: e.data };
|
|
2606
2606
|
}
|
|
2607
2607
|
}
|
|
2608
|
-
|
|
2608
|
+
_r.create = (t) => new _r({
|
|
2609
2609
|
typeName: E.ZodNaN,
|
|
2610
|
-
...
|
|
2610
|
+
...R(t)
|
|
2611
2611
|
});
|
|
2612
2612
|
const Gi = Symbol("zod_brand");
|
|
2613
|
-
class us extends
|
|
2613
|
+
class us extends j {
|
|
2614
2614
|
_parse(e) {
|
|
2615
2615
|
const { ctx: r } = this._processInputParams(e), n = r.data;
|
|
2616
2616
|
return this._def.type._parse({
|
|
@@ -2623,7 +2623,7 @@ class us extends R {
|
|
|
2623
2623
|
return this._def.type;
|
|
2624
2624
|
}
|
|
2625
2625
|
}
|
|
2626
|
-
class
|
|
2626
|
+
class Gt extends j {
|
|
2627
2627
|
_parse(e) {
|
|
2628
2628
|
const { status: r, ctx: n } = this._processInputParams(e);
|
|
2629
2629
|
if (n.common.async)
|
|
@@ -2656,29 +2656,29 @@ class Wt extends R {
|
|
|
2656
2656
|
}
|
|
2657
2657
|
}
|
|
2658
2658
|
static create(e, r) {
|
|
2659
|
-
return new
|
|
2659
|
+
return new Gt({
|
|
2660
2660
|
in: e,
|
|
2661
2661
|
out: r,
|
|
2662
2662
|
typeName: E.ZodPipeline
|
|
2663
2663
|
});
|
|
2664
2664
|
}
|
|
2665
2665
|
}
|
|
2666
|
-
class
|
|
2666
|
+
class Tr extends j {
|
|
2667
2667
|
_parse(e) {
|
|
2668
2668
|
const r = this._def.innerType._parse(e);
|
|
2669
|
-
return
|
|
2669
|
+
return Et(r) && (r.value = Object.freeze(r.value)), r;
|
|
2670
2670
|
}
|
|
2671
2671
|
}
|
|
2672
|
-
|
|
2672
|
+
Tr.create = (t, e) => new Tr({
|
|
2673
2673
|
innerType: t,
|
|
2674
2674
|
typeName: E.ZodReadonly,
|
|
2675
|
-
...
|
|
2675
|
+
...R(e)
|
|
2676
2676
|
});
|
|
2677
2677
|
const ls = (t, e = {}, r) => t ? Ot.create().superRefine((n, s) => {
|
|
2678
2678
|
var i, a;
|
|
2679
2679
|
if (!t(n)) {
|
|
2680
|
-
const o = typeof e == "function" ? e(n) : typeof e == "string" ? { message: e } : e, l = (a = (i = o.fatal) !== null && i !== void 0 ? i : r) !== null && a !== void 0 ? a : !0,
|
|
2681
|
-
s.addIssue({ code: "custom", ...
|
|
2680
|
+
const o = typeof e == "function" ? e(n) : typeof e == "string" ? { message: e } : e, l = (a = (i = o.fatal) !== null && i !== void 0 ? i : r) !== null && a !== void 0 ? a : !0, p = typeof o == "string" ? { message: o } : o;
|
|
2681
|
+
s.addIssue({ code: "custom", ...p, fatal: l });
|
|
2682
2682
|
}
|
|
2683
2683
|
}) : Ot.create(), Ji = {
|
|
2684
2684
|
object: Q.lazycreate
|
|
@@ -2689,10 +2689,10 @@ var E;
|
|
|
2689
2689
|
})(E || (E = {}));
|
|
2690
2690
|
const Hi = (t, e = {
|
|
2691
2691
|
message: `Input not instance of ${t.name}`
|
|
2692
|
-
}) => ls((r) => r instanceof t, e), fs = we.create, ds = rt.create, Xi =
|
|
2692
|
+
}) => ls((r) => r instanceof t, e), fs = we.create, ds = rt.create, Xi = _r.create, Qi = nt.create, hs = Ct.create, ea = pt.create, ta = vr.create, ra = Mt.create, na = Rt.create, sa = Ot.create, ia = dt.create, aa = Ve.create, oa = wr.create, ca = Oe.create, ua = Q.create, la = Q.strictCreate, fa = jt.create, da = Er.create, ha = Bt.create, pa = Ne.create, ya = Ut.create, ga = br.create, ma = yt.create, xa = bt.create, va = Zt.create, wa = Lt.create, ba = st.create, Oa = $t.create, _a = _t.create, Pn = _e.create, Ta = Pe.create, Sa = gt.create, ka = _e.createWithPreprocess, Aa = Gt.create, Ia = () => fs().optional(), Na = () => ds().optional(), Ea = () => hs().optional(), Ca = {
|
|
2693
2693
|
string: (t) => we.create({ ...t, coerce: !0 }),
|
|
2694
2694
|
number: (t) => rt.create({ ...t, coerce: !0 }),
|
|
2695
|
-
boolean: (t) =>
|
|
2695
|
+
boolean: (t) => Ct.create({
|
|
2696
2696
|
...t,
|
|
2697
2697
|
coerce: !0
|
|
2698
2698
|
}),
|
|
@@ -2701,10 +2701,10 @@ const Hi = (t, e = {
|
|
|
2701
2701
|
}, Ma = M;
|
|
2702
2702
|
var g = /* @__PURE__ */ Object.freeze({
|
|
2703
2703
|
__proto__: null,
|
|
2704
|
-
defaultErrorMap:
|
|
2704
|
+
defaultErrorMap: Nt,
|
|
2705
2705
|
setErrorMap: Ui,
|
|
2706
|
-
getErrorMap:
|
|
2707
|
-
makeIssue:
|
|
2706
|
+
getErrorMap: gr,
|
|
2707
|
+
makeIssue: mr,
|
|
2708
2708
|
EMPTY_PATH: Zi,
|
|
2709
2709
|
addIssueToContext: S,
|
|
2710
2710
|
ParseStatus: ue,
|
|
@@ -2713,8 +2713,8 @@ var g = /* @__PURE__ */ Object.freeze({
|
|
|
2713
2713
|
OK: fe,
|
|
2714
2714
|
isAborted: Gr,
|
|
2715
2715
|
isDirty: Jr,
|
|
2716
|
-
isValid:
|
|
2717
|
-
isAsync:
|
|
2716
|
+
isValid: Et,
|
|
2717
|
+
isAsync: xr,
|
|
2718
2718
|
get util() {
|
|
2719
2719
|
return V;
|
|
2720
2720
|
},
|
|
@@ -2723,48 +2723,48 @@ var g = /* @__PURE__ */ Object.freeze({
|
|
|
2723
2723
|
},
|
|
2724
2724
|
ZodParsedType: T,
|
|
2725
2725
|
getParsedType: Ge,
|
|
2726
|
-
ZodType:
|
|
2726
|
+
ZodType: j,
|
|
2727
2727
|
ZodString: we,
|
|
2728
2728
|
ZodNumber: rt,
|
|
2729
2729
|
ZodBigInt: nt,
|
|
2730
|
-
ZodBoolean:
|
|
2730
|
+
ZodBoolean: Ct,
|
|
2731
2731
|
ZodDate: pt,
|
|
2732
|
-
ZodSymbol:
|
|
2733
|
-
ZodUndefined:
|
|
2734
|
-
ZodNull:
|
|
2732
|
+
ZodSymbol: vr,
|
|
2733
|
+
ZodUndefined: Mt,
|
|
2734
|
+
ZodNull: Rt,
|
|
2735
2735
|
ZodAny: Ot,
|
|
2736
2736
|
ZodUnknown: dt,
|
|
2737
2737
|
ZodNever: Ve,
|
|
2738
|
-
ZodVoid:
|
|
2738
|
+
ZodVoid: wr,
|
|
2739
2739
|
ZodArray: Oe,
|
|
2740
2740
|
ZodObject: Q,
|
|
2741
2741
|
ZodUnion: jt,
|
|
2742
2742
|
ZodDiscriminatedUnion: Er,
|
|
2743
|
-
ZodIntersection:
|
|
2743
|
+
ZodIntersection: Bt,
|
|
2744
2744
|
ZodTuple: Ne,
|
|
2745
|
-
ZodRecord:
|
|
2746
|
-
ZodMap:
|
|
2745
|
+
ZodRecord: Ut,
|
|
2746
|
+
ZodMap: br,
|
|
2747
2747
|
ZodSet: yt,
|
|
2748
2748
|
ZodFunction: bt,
|
|
2749
|
-
ZodLazy:
|
|
2750
|
-
ZodLiteral:
|
|
2749
|
+
ZodLazy: Zt,
|
|
2750
|
+
ZodLiteral: Lt,
|
|
2751
2751
|
ZodEnum: st,
|
|
2752
|
-
ZodNativeEnum:
|
|
2752
|
+
ZodNativeEnum: $t,
|
|
2753
2753
|
ZodPromise: _t,
|
|
2754
2754
|
ZodEffects: _e,
|
|
2755
2755
|
ZodTransformer: _e,
|
|
2756
|
-
ZodOptional:
|
|
2756
|
+
ZodOptional: Pe,
|
|
2757
2757
|
ZodNullable: gt,
|
|
2758
2758
|
ZodDefault: Pt,
|
|
2759
|
-
ZodCatch:
|
|
2760
|
-
ZodNaN:
|
|
2759
|
+
ZodCatch: Or,
|
|
2760
|
+
ZodNaN: _r,
|
|
2761
2761
|
BRAND: Gi,
|
|
2762
2762
|
ZodBranded: us,
|
|
2763
|
-
ZodPipeline:
|
|
2764
|
-
ZodReadonly:
|
|
2763
|
+
ZodPipeline: Gt,
|
|
2764
|
+
ZodReadonly: Tr,
|
|
2765
2765
|
custom: ls,
|
|
2766
|
-
Schema:
|
|
2767
|
-
ZodSchema:
|
|
2766
|
+
Schema: j,
|
|
2767
|
+
ZodSchema: j,
|
|
2768
2768
|
late: Ji,
|
|
2769
2769
|
get ZodFirstPartyTypeKind() {
|
|
2770
2770
|
return E;
|
|
@@ -2776,7 +2776,7 @@ var g = /* @__PURE__ */ Object.freeze({
|
|
|
2776
2776
|
boolean: hs,
|
|
2777
2777
|
date: ea,
|
|
2778
2778
|
discriminatedUnion: da,
|
|
2779
|
-
effect:
|
|
2779
|
+
effect: Pn,
|
|
2780
2780
|
enum: ba,
|
|
2781
2781
|
function: xa,
|
|
2782
2782
|
instanceof: Hi,
|
|
@@ -2803,7 +2803,7 @@ var g = /* @__PURE__ */ Object.freeze({
|
|
|
2803
2803
|
strictObject: la,
|
|
2804
2804
|
string: fs,
|
|
2805
2805
|
symbol: ta,
|
|
2806
|
-
transformer:
|
|
2806
|
+
transformer: Pn,
|
|
2807
2807
|
tuple: pa,
|
|
2808
2808
|
undefined: ra,
|
|
2809
2809
|
union: fa,
|
|
@@ -2814,16 +2814,16 @@ var g = /* @__PURE__ */ Object.freeze({
|
|
|
2814
2814
|
quotelessJson: Bi,
|
|
2815
2815
|
ZodError: be
|
|
2816
2816
|
});
|
|
2817
|
-
const cn = g.tuple([g.number(), g.number()]), un = g.object({ width: g.number(), height: g.number() }),
|
|
2817
|
+
const cn = g.tuple([g.number(), g.number()]), un = g.object({ width: g.number(), height: g.number() }), Ra = g.object({
|
|
2818
2818
|
signedWidth: g.number(),
|
|
2819
2819
|
signedHeight: g.number()
|
|
2820
|
-
}),
|
|
2821
|
-
g.enum(
|
|
2820
|
+
}), ja = ["width", "height"];
|
|
2821
|
+
g.enum(ja);
|
|
2822
2822
|
const ps = ["start", "center", "end"], Ba = ["signedWidth", "signedHeight"];
|
|
2823
2823
|
g.enum(Ba);
|
|
2824
|
-
const
|
|
2824
|
+
const Dt = g.object({ x: g.number(), y: g.number() }), ys = g.object({ clientX: g.number(), clientY: g.number() }), ln = ["x", "y"], gs = g.enum(ln), ms = ["top", "right", "bottom", "left"], Ua = g.enum(ms), Cr = ["left", "right"], fn = g.enum(Cr), dn = ["top", "bottom"], hn = g.enum(dn), pn = ["center"], Dn = g.enum(pn), Za = [...ms, ...pn], Mr = g.enum(Za), La = g.enum(ps), xs = ["first", "last"], $a = g.enum(xs), vs = g.object({ lower: g.number(), upper: g.number() });
|
|
2825
2825
|
g.union([vs, cn]);
|
|
2826
|
-
const
|
|
2826
|
+
const Pa = g.union([gs, Mr]), Da = g.union([gs, Mr, g.instanceof(String)]), W = (t, e) => {
|
|
2827
2827
|
const r = { lower: 0, upper: 0 };
|
|
2828
2828
|
return typeof t == "number" ? e != null ? (r.lower = t, r.upper = e) : (r.lower = 0, r.upper = t) : Array.isArray(t) ? [r.lower, r.upper] = t : (r.lower = t.lower, r.upper = t.upper), ws(r);
|
|
2829
2829
|
}, Va = { lower: 0, upper: 0 }, za = { lower: -1 / 0, upper: 1 / 0 }, qa = { lower: 0, upper: 1 }, Ya = { lower: -1, upper: 1 }, Fa = (t, e) => {
|
|
@@ -2831,40 +2831,40 @@ const $a = g.union([gs, Mr]), Da = g.union([gs, Mr, g.instanceof(String)]), K =
|
|
|
2831
2831
|
return !0;
|
|
2832
2832
|
if (t == null || e == null)
|
|
2833
2833
|
return !1;
|
|
2834
|
-
const r =
|
|
2834
|
+
const r = W(t), n = W(e);
|
|
2835
2835
|
return (r == null ? void 0 : r.lower) === (n == null ? void 0 : n.lower) && (r == null ? void 0 : r.upper) === (n == null ? void 0 : n.upper);
|
|
2836
2836
|
}, ws = (t) => t.lower > t.upper ? { lower: t.upper, upper: t.lower } : t, Ka = (t, e) => {
|
|
2837
|
-
const r =
|
|
2837
|
+
const r = W(t);
|
|
2838
2838
|
return e < r.lower ? r.lower : e >= r.upper ? r.upper - 1 : e;
|
|
2839
2839
|
}, ft = (t, e) => {
|
|
2840
|
-
const r =
|
|
2840
|
+
const r = W(t);
|
|
2841
2841
|
if (typeof e == "number")
|
|
2842
2842
|
return e >= r.lower && e < r.upper;
|
|
2843
|
-
const n =
|
|
2843
|
+
const n = W(e);
|
|
2844
2844
|
return n.lower >= r.lower && n.upper <= r.upper;
|
|
2845
2845
|
}, Wa = (t, e) => {
|
|
2846
|
-
const r =
|
|
2846
|
+
const r = W(t), n = W(e);
|
|
2847
2847
|
return r.lower == n.lower ? !0 : n.upper == r.lower || n.lower == r.upper ? !1 : ft(r, n.upper) || ft(r, n.lower) || ft(n, r.upper) || ft(n, r.lower);
|
|
2848
|
-
},
|
|
2849
|
-
const e =
|
|
2848
|
+
}, Rr = (t) => {
|
|
2849
|
+
const e = W(t);
|
|
2850
2850
|
return e.upper - e.lower;
|
|
2851
2851
|
}, Ga = (t) => {
|
|
2852
|
-
const e =
|
|
2852
|
+
const e = W(t);
|
|
2853
2853
|
return e.lower === 0 && e.upper === 0;
|
|
2854
|
-
}, Ja = (t) =>
|
|
2855
|
-
const e =
|
|
2854
|
+
}, Ja = (t) => Rr(t) === 0, Ha = (t) => {
|
|
2855
|
+
const e = W(t);
|
|
2856
2856
|
return Number.isFinite(e.lower) && Number.isFinite(e.upper);
|
|
2857
2857
|
}, Xa = (t) => ({
|
|
2858
|
-
lower: Math.min(...t.map((e) =>
|
|
2859
|
-
upper: Math.max(...t.map((e) =>
|
|
2858
|
+
lower: Math.min(...t.map((e) => W(e).lower)),
|
|
2859
|
+
upper: Math.max(...t.map((e) => W(e).upper))
|
|
2860
2860
|
}), Qa = (t) => ({
|
|
2861
|
-
lower: Math.max(...t.map((e) =>
|
|
2862
|
-
upper: Math.min(...t.map((e) =>
|
|
2861
|
+
lower: Math.max(...t.map((e) => W(e).lower)),
|
|
2862
|
+
upper: Math.min(...t.map((e) => W(e).upper))
|
|
2863
2863
|
}), eo = (t) => {
|
|
2864
|
-
const e =
|
|
2865
|
-
return Array.from({ length:
|
|
2864
|
+
const e = W(t);
|
|
2865
|
+
return Array.from({ length: Rr(t) }, (r, n) => n + e.lower);
|
|
2866
2866
|
}, Xr = (t, e) => {
|
|
2867
|
-
const r = t.map(
|
|
2867
|
+
const r = t.map(W), n = r.findIndex((i, a) => ft(i, e) || e < r[a].lower);
|
|
2868
2868
|
if (n === -1)
|
|
2869
2869
|
return { index: t.length, position: 0 };
|
|
2870
2870
|
const s = r[n];
|
|
@@ -2875,7 +2875,7 @@ const $a = g.union([gs, Mr]), Da = g.union([gs, Mr, g.instanceof(String)]), K =
|
|
|
2875
2875
|
insertInto: 0,
|
|
2876
2876
|
deleteInBetween: 0
|
|
2877
2877
|
}, bs = (t, e) => {
|
|
2878
|
-
const r = t.map(
|
|
2878
|
+
const r = t.map(W), n = W(e);
|
|
2879
2879
|
if (r.length === 0)
|
|
2880
2880
|
return Fr;
|
|
2881
2881
|
const s = Xr(t, n.lower), i = Xr(t, n.upper);
|
|
@@ -2893,7 +2893,7 @@ const $a = g.union([gs, Mr]), Da = g.union([gs, Mr, g.instanceof(String)]), K =
|
|
|
2893
2893
|
insertInto: s.index,
|
|
2894
2894
|
deleteInBetween: 0
|
|
2895
2895
|
};
|
|
2896
|
-
let a = i.index - s.index, o = s.index, l =
|
|
2896
|
+
let a = i.index - s.index, o = s.index, l = Rr(r[s.index]) - s.position;
|
|
2897
2897
|
return s.position != 0 ? (a -= 1, o += 1) : l = 0, {
|
|
2898
2898
|
removeBefore: l,
|
|
2899
2899
|
removeAfter: i.position,
|
|
@@ -2904,9 +2904,9 @@ const $a = g.union([gs, Mr]), Da = g.union([gs, Mr, g.instanceof(String)]), K =
|
|
|
2904
2904
|
const r = bs(t, e);
|
|
2905
2905
|
if (r == null)
|
|
2906
2906
|
return t;
|
|
2907
|
-
const n =
|
|
2908
|
-
return n.lower += r.removeBefore, n.upper -= r.removeAfter, t.splice(r.insertInto, r.deleteInBetween, n), t.map(
|
|
2909
|
-
},
|
|
2907
|
+
const n = W(e);
|
|
2908
|
+
return n.lower += r.removeBefore, n.upper -= r.removeAfter, t.splice(r.insertInto, r.deleteInBetween, n), t.map(W);
|
|
2909
|
+
}, $u = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
2910
2910
|
__proto__: null,
|
|
2911
2911
|
CLIP: Ya,
|
|
2912
2912
|
DECIMAL: qa,
|
|
@@ -2915,7 +2915,7 @@ const $a = g.union([gs, Mr]), Da = g.union([gs, Mr, g.instanceof(String)]), K =
|
|
|
2915
2915
|
bounds: vs,
|
|
2916
2916
|
buildInsertionPlan: bs,
|
|
2917
2917
|
clamp: Ka,
|
|
2918
|
-
construct:
|
|
2918
|
+
construct: W,
|
|
2919
2919
|
constructArray: eo,
|
|
2920
2920
|
contains: ft,
|
|
2921
2921
|
equals: Fa,
|
|
@@ -2927,9 +2927,9 @@ const $a = g.union([gs, Mr]), Da = g.union([gs, Mr, g.instanceof(String)]), K =
|
|
|
2927
2927
|
max: Xa,
|
|
2928
2928
|
min: Qa,
|
|
2929
2929
|
overlapsWith: Wa,
|
|
2930
|
-
span:
|
|
2930
|
+
span: Rr,
|
|
2931
2931
|
spanIsZero: Ja
|
|
2932
|
-
}, Symbol.toStringTag, { value: "Module" })), Os =
|
|
2932
|
+
}, Symbol.toStringTag, { value: "Module" })), Os = Pa, qe = (t) => ln.includes(t) ? t : dn.includes(t) ? "y" : "x", ro = (t) => qe(t) === "x" ? "y" : "x", no = (t) => qe(t) === "x" ? "width" : "height", so = (t) => qe(t) === "x" ? "left" : "top", io = (t) => Os.safeParse(t).success, ao = (t) => qe(t) === "x" ? "signedWidth" : "signedHeight", Pu = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
2933
2933
|
__proto__: null,
|
|
2934
2934
|
construct: qe,
|
|
2935
2935
|
crude: Os,
|
|
@@ -2939,8 +2939,8 @@ const $a = g.union([gs, Mr]), Da = g.union([gs, Mr, g.instanceof(String)]), K =
|
|
|
2939
2939
|
signedDimension: ao,
|
|
2940
2940
|
swap: ro
|
|
2941
2941
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
2942
|
-
var ve = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}, Z = {},
|
|
2943
|
-
Object.defineProperty(
|
|
2942
|
+
var ve = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}, Z = {}, jr = {};
|
|
2943
|
+
Object.defineProperty(jr, "__esModule", { value: !0 });
|
|
2944
2944
|
function oo(t) {
|
|
2945
2945
|
return t === void 0 && (t = ""), t ? String(t).replace(/^[^A-Za-z0-9]*|[^A-Za-z0-9]*$/g, "").replace(/[^A-Za-z0-9]+/g, "$").replace(/([a-z])([A-Z])/g, function(e, r, n) {
|
|
2946
2946
|
return r + "$" + n;
|
|
@@ -2948,7 +2948,7 @@ function oo(t) {
|
|
|
2948
2948
|
return n.toUpperCase();
|
|
2949
2949
|
}) : "";
|
|
2950
2950
|
}
|
|
2951
|
-
|
|
2951
|
+
jr.default = oo;
|
|
2952
2952
|
var Br = {};
|
|
2953
2953
|
Object.defineProperty(Br, "__esModule", { value: !0 });
|
|
2954
2954
|
function co(t) {
|
|
@@ -3047,27 +3047,27 @@ var mo = ve && ve.__spreadArrays || function() {
|
|
|
3047
3047
|
return n;
|
|
3048
3048
|
};
|
|
3049
3049
|
Object.defineProperty(wn, "__esModule", { value: !0 });
|
|
3050
|
-
var
|
|
3051
|
-
function
|
|
3052
|
-
if (e === void 0 && (e =
|
|
3050
|
+
var Re = xt;
|
|
3051
|
+
function nr(t, e) {
|
|
3052
|
+
if (e === void 0 && (e = Re.DefaultOption), !Re.isValidObject(t))
|
|
3053
3053
|
return null;
|
|
3054
|
-
e =
|
|
3054
|
+
e = Re.validateOptions(e);
|
|
3055
3055
|
var r = {};
|
|
3056
3056
|
return Object.keys(t).forEach(function(n) {
|
|
3057
3057
|
var s = t[n], i = n.toLowerCase();
|
|
3058
|
-
e.recursive && (
|
|
3058
|
+
e.recursive && (Re.isValidObject(s) ? Re.belongToTypes(s, e.keepTypesOnRecursion) || (s = nr(s, e)) : e.recursiveInArray && Re.isArrayObject(s) && (s = mo(s).map(function(a) {
|
|
3059
3059
|
var o = a;
|
|
3060
|
-
if (
|
|
3061
|
-
|
|
3062
|
-
else if (
|
|
3063
|
-
var l =
|
|
3060
|
+
if (Re.isValidObject(a))
|
|
3061
|
+
Re.belongToTypes(o, e.keepTypesOnRecursion) || (o = nr(a, e));
|
|
3062
|
+
else if (Re.isArrayObject(a)) {
|
|
3063
|
+
var l = nr({ key: a }, e);
|
|
3064
3064
|
o = l.key;
|
|
3065
3065
|
}
|
|
3066
3066
|
return o;
|
|
3067
3067
|
}))), r[i] = s;
|
|
3068
3068
|
}), r;
|
|
3069
3069
|
}
|
|
3070
|
-
wn.default =
|
|
3070
|
+
wn.default = nr;
|
|
3071
3071
|
var bn = {}, xo = ve && ve.__spreadArrays || function() {
|
|
3072
3072
|
for (var t = 0, e = 0, r = arguments.length; e < r; e++)
|
|
3073
3073
|
t += arguments[e].length;
|
|
@@ -3077,27 +3077,27 @@ var bn = {}, xo = ve && ve.__spreadArrays || function() {
|
|
|
3077
3077
|
return n;
|
|
3078
3078
|
};
|
|
3079
3079
|
Object.defineProperty(bn, "__esModule", { value: !0 });
|
|
3080
|
-
var
|
|
3081
|
-
function
|
|
3082
|
-
if (e === void 0 && (e =
|
|
3080
|
+
var je = xt;
|
|
3081
|
+
function sr(t, e) {
|
|
3082
|
+
if (e === void 0 && (e = je.DefaultOption), !je.isValidObject(t))
|
|
3083
3083
|
return null;
|
|
3084
|
-
e =
|
|
3084
|
+
e = je.validateOptions(e);
|
|
3085
3085
|
var r = {};
|
|
3086
3086
|
return Object.keys(t).forEach(function(n) {
|
|
3087
3087
|
var s = t[n], i = n.toUpperCase();
|
|
3088
|
-
e.recursive && (
|
|
3088
|
+
e.recursive && (je.isValidObject(s) ? je.belongToTypes(s, e.keepTypesOnRecursion) || (s = sr(s, e)) : e.recursiveInArray && je.isArrayObject(s) && (s = xo(s).map(function(a) {
|
|
3089
3089
|
var o = a;
|
|
3090
|
-
if (
|
|
3091
|
-
|
|
3092
|
-
else if (
|
|
3093
|
-
var l =
|
|
3090
|
+
if (je.isValidObject(a))
|
|
3091
|
+
je.belongToTypes(o, e.keepTypesOnRecursion) || (o = sr(a, e));
|
|
3092
|
+
else if (je.isArrayObject(a)) {
|
|
3093
|
+
var l = sr({ key: a }, e);
|
|
3094
3094
|
o = l.key;
|
|
3095
3095
|
}
|
|
3096
3096
|
return o;
|
|
3097
3097
|
}))), r[i] = s;
|
|
3098
3098
|
}), r;
|
|
3099
3099
|
}
|
|
3100
|
-
bn.default =
|
|
3100
|
+
bn.default = sr;
|
|
3101
3101
|
var On = {}, vo = ve && ve.__spreadArrays || function() {
|
|
3102
3102
|
for (var t = 0, e = 0, r = arguments.length; e < r; e++)
|
|
3103
3103
|
t += arguments[e].length;
|
|
@@ -3107,27 +3107,27 @@ var On = {}, vo = ve && ve.__spreadArrays || function() {
|
|
|
3107
3107
|
return n;
|
|
3108
3108
|
};
|
|
3109
3109
|
Object.defineProperty(On, "__esModule", { value: !0 });
|
|
3110
|
-
var Be = xt, wo =
|
|
3111
|
-
function
|
|
3110
|
+
var Be = xt, wo = jr;
|
|
3111
|
+
function ir(t, e) {
|
|
3112
3112
|
if (e === void 0 && (e = Be.DefaultOption), !Be.isValidObject(t))
|
|
3113
3113
|
return null;
|
|
3114
3114
|
e = Be.validateOptions(e);
|
|
3115
3115
|
var r = {};
|
|
3116
3116
|
return Object.keys(t).forEach(function(n) {
|
|
3117
3117
|
var s = t[n], i = wo.default(n);
|
|
3118
|
-
e.recursive && (Be.isValidObject(s) ? Be.belongToTypes(s, e.keepTypesOnRecursion) || (s =
|
|
3118
|
+
e.recursive && (Be.isValidObject(s) ? Be.belongToTypes(s, e.keepTypesOnRecursion) || (s = ir(s, e)) : e.recursiveInArray && Be.isArrayObject(s) && (s = vo(s).map(function(a) {
|
|
3119
3119
|
var o = a;
|
|
3120
3120
|
if (Be.isValidObject(a))
|
|
3121
|
-
Be.belongToTypes(o, e.keepTypesOnRecursion) || (o =
|
|
3121
|
+
Be.belongToTypes(o, e.keepTypesOnRecursion) || (o = ir(a, e));
|
|
3122
3122
|
else if (Be.isArrayObject(a)) {
|
|
3123
|
-
var l =
|
|
3123
|
+
var l = ir({ key: a }, e);
|
|
3124
3124
|
o = l.key;
|
|
3125
3125
|
}
|
|
3126
3126
|
return o;
|
|
3127
3127
|
}))), r[i] = s;
|
|
3128
3128
|
}), r;
|
|
3129
3129
|
}
|
|
3130
|
-
On.default =
|
|
3130
|
+
On.default = ir;
|
|
3131
3131
|
var _n = {}, bo = ve && ve.__spreadArrays || function() {
|
|
3132
3132
|
for (var t = 0, e = 0, r = arguments.length; e < r; e++)
|
|
3133
3133
|
t += arguments[e].length;
|
|
@@ -3138,26 +3138,26 @@ var _n = {}, bo = ve && ve.__spreadArrays || function() {
|
|
|
3138
3138
|
};
|
|
3139
3139
|
Object.defineProperty(_n, "__esModule", { value: !0 });
|
|
3140
3140
|
var Ue = xt, Oo = Br;
|
|
3141
|
-
function
|
|
3141
|
+
function ar(t, e) {
|
|
3142
3142
|
if (e === void 0 && (e = Ue.DefaultOption), !Ue.isValidObject(t))
|
|
3143
3143
|
return null;
|
|
3144
3144
|
e = Ue.validateOptions(e);
|
|
3145
3145
|
var r = {};
|
|
3146
3146
|
return Object.keys(t).forEach(function(n) {
|
|
3147
3147
|
var s = t[n], i = Oo.default(n);
|
|
3148
|
-
e.recursive && (Ue.isValidObject(s) ? Ue.belongToTypes(s, e.keepTypesOnRecursion) || (s =
|
|
3148
|
+
e.recursive && (Ue.isValidObject(s) ? Ue.belongToTypes(s, e.keepTypesOnRecursion) || (s = ar(s, e)) : e.recursiveInArray && Ue.isArrayObject(s) && (s = bo(s).map(function(a) {
|
|
3149
3149
|
var o = a;
|
|
3150
3150
|
if (Ue.isValidObject(a))
|
|
3151
|
-
Ue.belongToTypes(o, e.keepTypesOnRecursion) || (o =
|
|
3151
|
+
Ue.belongToTypes(o, e.keepTypesOnRecursion) || (o = ar(a, e));
|
|
3152
3152
|
else if (Ue.isArrayObject(a)) {
|
|
3153
|
-
var l =
|
|
3153
|
+
var l = ar({ key: a }, e);
|
|
3154
3154
|
o = l.key;
|
|
3155
3155
|
}
|
|
3156
3156
|
return o;
|
|
3157
3157
|
}))), r[i] = s;
|
|
3158
3158
|
}), r;
|
|
3159
3159
|
}
|
|
3160
|
-
_n.default =
|
|
3160
|
+
_n.default = ar;
|
|
3161
3161
|
var Tn = {}, _o = ve && ve.__spreadArrays || function() {
|
|
3162
3162
|
for (var t = 0, e = 0, r = arguments.length; e < r; e++)
|
|
3163
3163
|
t += arguments[e].length;
|
|
@@ -3168,26 +3168,26 @@ var Tn = {}, _o = ve && ve.__spreadArrays || function() {
|
|
|
3168
3168
|
};
|
|
3169
3169
|
Object.defineProperty(Tn, "__esModule", { value: !0 });
|
|
3170
3170
|
var Ze = xt, To = Ur;
|
|
3171
|
-
function
|
|
3171
|
+
function or(t, e) {
|
|
3172
3172
|
if (e === void 0 && (e = Ze.DefaultOption), !Ze.isValidObject(t))
|
|
3173
3173
|
return null;
|
|
3174
3174
|
e = Ze.validateOptions(e);
|
|
3175
3175
|
var r = {};
|
|
3176
3176
|
return Object.keys(t).forEach(function(n) {
|
|
3177
3177
|
var s = t[n], i = To.default(n);
|
|
3178
|
-
e.recursive && (Ze.isValidObject(s) ? Ze.belongToTypes(s, e.keepTypesOnRecursion) || (s =
|
|
3178
|
+
e.recursive && (Ze.isValidObject(s) ? Ze.belongToTypes(s, e.keepTypesOnRecursion) || (s = or(s, e)) : e.recursiveInArray && Ze.isArrayObject(s) && (s = _o(s).map(function(a) {
|
|
3179
3179
|
var o = a;
|
|
3180
3180
|
if (Ze.isValidObject(a))
|
|
3181
|
-
Ze.belongToTypes(o, e.keepTypesOnRecursion) || (o =
|
|
3181
|
+
Ze.belongToTypes(o, e.keepTypesOnRecursion) || (o = or(a, e));
|
|
3182
3182
|
else if (Ze.isArrayObject(a)) {
|
|
3183
|
-
var l =
|
|
3183
|
+
var l = or({ key: a }, e);
|
|
3184
3184
|
o = l.key;
|
|
3185
3185
|
}
|
|
3186
3186
|
return o;
|
|
3187
3187
|
}))), r[i] = s;
|
|
3188
3188
|
}), r;
|
|
3189
3189
|
}
|
|
3190
|
-
Tn.default =
|
|
3190
|
+
Tn.default = or;
|
|
3191
3191
|
var Sn = {}, So = ve && ve.__spreadArrays || function() {
|
|
3192
3192
|
for (var t = 0, e = 0, r = arguments.length; e < r; e++)
|
|
3193
3193
|
t += arguments[e].length;
|
|
@@ -3198,29 +3198,29 @@ var Sn = {}, So = ve && ve.__spreadArrays || function() {
|
|
|
3198
3198
|
};
|
|
3199
3199
|
Object.defineProperty(Sn, "__esModule", { value: !0 });
|
|
3200
3200
|
var Le = xt, ko = Zr;
|
|
3201
|
-
function
|
|
3201
|
+
function cr(t, e) {
|
|
3202
3202
|
if (e === void 0 && (e = Le.DefaultOption), !Le.isValidObject(t))
|
|
3203
3203
|
return null;
|
|
3204
3204
|
e = Le.validateOptions(e);
|
|
3205
3205
|
var r = {};
|
|
3206
3206
|
return Object.keys(t).forEach(function(n) {
|
|
3207
3207
|
var s = t[n], i = ko.default(n);
|
|
3208
|
-
e.recursive && (Le.isValidObject(s) ? Le.belongToTypes(s, e.keepTypesOnRecursion) || (s =
|
|
3208
|
+
e.recursive && (Le.isValidObject(s) ? Le.belongToTypes(s, e.keepTypesOnRecursion) || (s = cr(s, e)) : e.recursiveInArray && Le.isArrayObject(s) && (s = So(s).map(function(a) {
|
|
3209
3209
|
var o = a;
|
|
3210
3210
|
if (Le.isValidObject(a))
|
|
3211
|
-
Le.belongToTypes(o, e.keepTypesOnRecursion) || (o =
|
|
3211
|
+
Le.belongToTypes(o, e.keepTypesOnRecursion) || (o = cr(a, e));
|
|
3212
3212
|
else if (Le.isArrayObject(a)) {
|
|
3213
|
-
var l =
|
|
3213
|
+
var l = cr({ key: a }, e);
|
|
3214
3214
|
o = l.key;
|
|
3215
3215
|
}
|
|
3216
3216
|
return o;
|
|
3217
3217
|
}))), r[i] = s;
|
|
3218
3218
|
}), r;
|
|
3219
3219
|
}
|
|
3220
|
-
Sn.default =
|
|
3220
|
+
Sn.default = cr;
|
|
3221
3221
|
Object.defineProperty(Z, "__esModule", { value: !0 });
|
|
3222
3222
|
Z.kebabKeys = Z.pascalKeys = Z.snakeKeys = Z.camelKeys = Z.upperKeys = Z.lowerKeys = Z.toLowerCase = Z.toUpperCase = Z.toKebabCase = Z.toHeaderCase = Z.toSentenceCase = Z.toTextCase = Z.toPathCase = Z.toDotCase = Z.toPascalCase = Z.toSnakeCase = Z.toCamelCase = void 0;
|
|
3223
|
-
var _s =
|
|
3223
|
+
var _s = jr;
|
|
3224
3224
|
Z.toCamelCase = _s.default;
|
|
3225
3225
|
var Ts = Br;
|
|
3226
3226
|
Z.toSnakeCase = Ts.default;
|
|
@@ -3240,10 +3240,10 @@ var Cs = Zr;
|
|
|
3240
3240
|
Z.toKebabCase = Cs.default;
|
|
3241
3241
|
var Ms = wn;
|
|
3242
3242
|
Z.lowerKeys = Ms.default;
|
|
3243
|
-
var
|
|
3244
|
-
Z.upperKeys =
|
|
3245
|
-
var
|
|
3246
|
-
Z.camelKeys =
|
|
3243
|
+
var Rs = bn;
|
|
3244
|
+
Z.upperKeys = Rs.default;
|
|
3245
|
+
var js = On;
|
|
3246
|
+
Z.camelKeys = js.default;
|
|
3247
3247
|
var Bs = _n;
|
|
3248
3248
|
Z.snakeKeys = Bs.default;
|
|
3249
3249
|
var Us = Tn;
|
|
@@ -3254,10 +3254,10 @@ var Ls = function(t) {
|
|
|
3254
3254
|
return String(t || "").toLowerCase();
|
|
3255
3255
|
};
|
|
3256
3256
|
Z.toLowerCase = Ls;
|
|
3257
|
-
var
|
|
3257
|
+
var $s = function(t) {
|
|
3258
3258
|
return String(t || "").toUpperCase();
|
|
3259
3259
|
};
|
|
3260
|
-
Z.toUpperCase =
|
|
3260
|
+
Z.toUpperCase = $s;
|
|
3261
3261
|
var Ao = {
|
|
3262
3262
|
toCamelCase: _s.default,
|
|
3263
3263
|
toSnakeCase: Ts.default,
|
|
@@ -3268,22 +3268,22 @@ var Ao = {
|
|
|
3268
3268
|
toSentenceCase: Ns.default,
|
|
3269
3269
|
toHeaderCase: Es.default,
|
|
3270
3270
|
toKebabCase: Cs.default,
|
|
3271
|
-
toUpperCase:
|
|
3271
|
+
toUpperCase: $s,
|
|
3272
3272
|
toLowerCase: Ls,
|
|
3273
3273
|
lowerKeys: Ms.default,
|
|
3274
|
-
upperKeys:
|
|
3275
|
-
camelKeys:
|
|
3274
|
+
upperKeys: Rs.default,
|
|
3275
|
+
camelKeys: js.default,
|
|
3276
3276
|
snakeKeys: Bs.default,
|
|
3277
3277
|
pascalKeys: Us.default,
|
|
3278
3278
|
kebabKeys: Zs.default
|
|
3279
3279
|
};
|
|
3280
3280
|
Z.default = Ao;
|
|
3281
|
-
var
|
|
3281
|
+
var Ps = Z;
|
|
3282
3282
|
const Ds = {
|
|
3283
3283
|
recursive: !0,
|
|
3284
3284
|
recursiveInArray: !0,
|
|
3285
3285
|
keepTypesOnRecursion: [Number, String, Uint8Array]
|
|
3286
|
-
}, Io = (t) =>
|
|
3286
|
+
}, Io = (t) => Ps.snakeKeys(t, Ds), No = (t) => Ps.camelKeys(t, Ds);
|
|
3287
3287
|
var mt;
|
|
3288
3288
|
((t) => {
|
|
3289
3289
|
t.toSnake = Io, t.toCamel = No, t.capitalize = (e) => e[0].toUpperCase() + e.slice(1);
|
|
@@ -3294,53 +3294,53 @@ const Eo = fn, Co = hn, Mo = {
|
|
|
3294
3294
|
bottom: "top",
|
|
3295
3295
|
left: "right",
|
|
3296
3296
|
center: "center"
|
|
3297
|
-
},
|
|
3297
|
+
}, Ro = {
|
|
3298
3298
|
top: "left",
|
|
3299
3299
|
right: "top",
|
|
3300
3300
|
bottom: "right",
|
|
3301
3301
|
left: "bottom",
|
|
3302
3302
|
center: "center"
|
|
3303
|
-
},
|
|
3303
|
+
}, jo = Da, it = (t) => t instanceof String ? t : ln.includes(t) ? t === "x" ? "left" : "top" : t, ur = (t) => Mo[it(t)], Bo = (t) => Ro[it(t)], Vt = (t) => {
|
|
3304
3304
|
const e = it(t);
|
|
3305
3305
|
return e === "top" || e === "bottom" ? "y" : "x";
|
|
3306
3306
|
}, Vs = g.object({
|
|
3307
3307
|
x: fn.or(Dn),
|
|
3308
3308
|
y: hn.or(Dn)
|
|
3309
|
-
}), zs = g.object({ x: fn, y: hn }),
|
|
3309
|
+
}), zs = g.object({ x: fn, y: hn }), St = Object.freeze({ x: "left", y: "top" }), kn = Object.freeze({ x: "right", y: "top" }), Lr = Object.freeze({ x: "left", y: "bottom" }), An = Object.freeze({ x: "right", y: "bottom" }), zt = Object.freeze({ x: "center", y: "center" }), qs = Object.freeze({ x: "center", y: "top" }), Ys = Object.freeze({ x: "center", y: "bottom" }), Fs = Object.freeze({ x: "right", y: "center" }), Ks = Object.freeze({ x: "left", y: "center" }), Ws = Object.freeze([
|
|
3310
3310
|
Ks,
|
|
3311
3311
|
Fs,
|
|
3312
3312
|
qs,
|
|
3313
3313
|
Ys,
|
|
3314
|
-
|
|
3314
|
+
St,
|
|
3315
3315
|
kn,
|
|
3316
3316
|
Lr,
|
|
3317
3317
|
An,
|
|
3318
|
-
|
|
3319
|
-
]),
|
|
3318
|
+
zt
|
|
3319
|
+
]), $r = (t, e) => t.x === e.x && t.y === e.y, lr = (t, e) => {
|
|
3320
3320
|
if (typeof e == "object") {
|
|
3321
3321
|
let r = !0;
|
|
3322
3322
|
return "x" in e && (t.x === e.x || (r = !1)), "y" in e && (t.y === e.y || (r = !1)), r;
|
|
3323
3323
|
}
|
|
3324
3324
|
return t.x === e || t.y === e;
|
|
3325
|
-
}, Gs = (t) => [t.x, t.y],
|
|
3325
|
+
}, Gs = (t) => [t.x, t.y], fr = (t) => Vt(it(t)) === "x", Uo = (t) => Vt(it(t)) === "y", Zo = (t) => `${t.x}${mt.capitalize(t.y)}`, Lo = (t, e) => {
|
|
3326
3326
|
let r, n;
|
|
3327
|
-
if (typeof t == "object" && "x" in t ? (r = t.x, n = t.y) : (r = it(t), n = it(e ?? t)),
|
|
3327
|
+
if (typeof t == "object" && "x" in t ? (r = t.x, n = t.y) : (r = it(t), n = it(e ?? t)), Vt(r) === Vt(n) && r !== "center" && n !== "center")
|
|
3328
3328
|
throw new Error(
|
|
3329
3329
|
`[XYLocation] - encountered two locations with the same direction: ${r.toString()} - ${n.toString()}`
|
|
3330
3330
|
);
|
|
3331
|
-
const s = { ...
|
|
3332
|
-
return r === "center" ?
|
|
3333
|
-
},
|
|
3331
|
+
const s = { ...zt };
|
|
3332
|
+
return r === "center" ? fr(n) ? [s.x, s.y] = [n, r] : [s.x, s.y] = [r, n] : n === "center" ? fr(r) ? [s.x, s.y] = [r, n] : [s.x, s.y] = [n, r] : fr(r) ? [s.x, s.y] = [r, n] : [s.x, s.y] = [n, r], s;
|
|
3333
|
+
}, Du = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
3334
3334
|
__proto__: null,
|
|
3335
3335
|
BOTTOM_CENTER: Ys,
|
|
3336
3336
|
BOTTOM_LEFT: Lr,
|
|
3337
3337
|
BOTTOM_RIGHT: An,
|
|
3338
|
-
CENTER:
|
|
3338
|
+
CENTER: zt,
|
|
3339
3339
|
CENTER_LOCATIONS: pn,
|
|
3340
3340
|
LEFT_CENTER: Ks,
|
|
3341
3341
|
RIGHT_CENTER: Fs,
|
|
3342
3342
|
TOP_CENTER: qs,
|
|
3343
|
-
TOP_LEFT:
|
|
3343
|
+
TOP_LEFT: St,
|
|
3344
3344
|
TOP_RIGHT: kn,
|
|
3345
3345
|
XY_LOCATIONS: Ws,
|
|
3346
3346
|
X_LOCATIONS: Cr,
|
|
@@ -3348,112 +3348,112 @@ const Eo = fn, Co = hn, Mo = {
|
|
|
3348
3348
|
construct: it,
|
|
3349
3349
|
constructXY: Lo,
|
|
3350
3350
|
corner: zs,
|
|
3351
|
-
crude:
|
|
3352
|
-
direction:
|
|
3353
|
-
isX:
|
|
3351
|
+
crude: jo,
|
|
3352
|
+
direction: Vt,
|
|
3353
|
+
isX: fr,
|
|
3354
3354
|
isY: Uo,
|
|
3355
3355
|
location: Mr,
|
|
3356
3356
|
outer: Ua,
|
|
3357
3357
|
rotate90: Bo,
|
|
3358
|
-
swap:
|
|
3358
|
+
swap: ur,
|
|
3359
3359
|
x: Eo,
|
|
3360
3360
|
xy: Vs,
|
|
3361
3361
|
xyCouple: Gs,
|
|
3362
|
-
xyEquals:
|
|
3363
|
-
xyMatches:
|
|
3362
|
+
xyEquals: $r,
|
|
3363
|
+
xyMatches: lr,
|
|
3364
3364
|
xyToString: Zo,
|
|
3365
3365
|
y: Co
|
|
3366
3366
|
}, Symbol.toStringTag, { value: "Module" })), Qr = g.union([
|
|
3367
3367
|
g.number(),
|
|
3368
|
-
|
|
3368
|
+
Dt,
|
|
3369
3369
|
cn,
|
|
3370
3370
|
un,
|
|
3371
|
-
|
|
3371
|
+
Ra,
|
|
3372
3372
|
ys
|
|
3373
|
-
]),
|
|
3373
|
+
]), G = (t, e) => {
|
|
3374
3374
|
if (typeof t == "string") {
|
|
3375
3375
|
if (e === void 0)
|
|
3376
3376
|
throw new Error("The y coordinate must be given.");
|
|
3377
3377
|
return t === "x" ? { x: e, y: 0 } : { x: 0, y: e };
|
|
3378
3378
|
}
|
|
3379
3379
|
return typeof t == "number" ? { x: t, y: e ?? t } : Array.isArray(t) ? { x: t[0], y: t[1] } : "signedWidth" in t ? { x: t.signedWidth, y: t.signedHeight } : "clientX" in t ? { x: t.clientX, y: t.clientY } : "width" in t ? { x: t.width, y: t.height } : { x: t.x, y: t.y };
|
|
3380
|
-
}, ze = { x: 0, y: 0 }, Js = { x: 1, y: 1 },
|
|
3381
|
-
const n =
|
|
3380
|
+
}, ze = { x: 0, y: 0 }, Js = { x: 1, y: 1 }, $o = { x: 1 / 0, y: 1 / 0 }, Po = { x: NaN, y: NaN }, Sr = (t, e, r = 0) => {
|
|
3381
|
+
const n = G(t), s = G(e);
|
|
3382
3382
|
return r === 0 ? n.x === s.x && n.y === s.y : Math.abs(n.x - s.x) <= r && Math.abs(n.y - s.y) <= r;
|
|
3383
|
-
}, Do = (t) =>
|
|
3384
|
-
const n =
|
|
3383
|
+
}, Do = (t) => Sr(t, ze), Vo = (t, e, r = e) => {
|
|
3384
|
+
const n = G(t);
|
|
3385
3385
|
return { x: n.x * e, y: n.y * r };
|
|
3386
3386
|
}, In = (t, e) => {
|
|
3387
|
-
const r =
|
|
3387
|
+
const r = G(t);
|
|
3388
3388
|
return { x: r.x + e, y: r.y };
|
|
3389
3389
|
}, Nn = (t, e) => {
|
|
3390
|
-
const r =
|
|
3390
|
+
const r = G(t);
|
|
3391
3391
|
return { x: r.x, y: r.y + e };
|
|
3392
|
-
},
|
|
3393
|
-
const a =
|
|
3392
|
+
}, kr = (t, e, r, ...n) => typeof e == "string" && typeof r == "number" ? e === "x" ? In(t, r) : Nn(t, r) : [t, e, r ?? ze, ...n].reduce((s, i) => {
|
|
3393
|
+
const a = G(i);
|
|
3394
3394
|
return { x: s.x + a.x, y: s.y + a.y };
|
|
3395
3395
|
}, ze), zo = (t, e, r) => {
|
|
3396
|
-
const n =
|
|
3396
|
+
const n = G(t);
|
|
3397
3397
|
return e === "x" ? { x: r, y: n.y } : { x: n.x, y: r };
|
|
3398
3398
|
}, qo = (t, e) => {
|
|
3399
|
-
const r =
|
|
3399
|
+
const r = G(t), n = G(e);
|
|
3400
3400
|
return Math.sqrt((r.x - n.x) ** 2 + (r.y - n.y) ** 2);
|
|
3401
3401
|
}, Yo = (t, e) => {
|
|
3402
|
-
const r =
|
|
3402
|
+
const r = G(t), n = G(e);
|
|
3403
3403
|
return Math.abs(r.x - n.x);
|
|
3404
3404
|
}, Fo = (t, e) => {
|
|
3405
|
-
const r =
|
|
3405
|
+
const r = G(t), n = G(e);
|
|
3406
3406
|
return Math.abs(r.y - n.y);
|
|
3407
3407
|
}, Ko = (t, e) => {
|
|
3408
|
-
const r =
|
|
3408
|
+
const r = G(t), n = G(e);
|
|
3409
3409
|
return { x: n.x - r.x, y: n.y - r.y };
|
|
3410
3410
|
}, Wo = (t) => {
|
|
3411
|
-
const e =
|
|
3411
|
+
const e = G(t);
|
|
3412
3412
|
return Number.isNaN(e.x) || Number.isNaN(e.y);
|
|
3413
3413
|
}, Go = (t) => {
|
|
3414
|
-
const e =
|
|
3414
|
+
const e = G(t);
|
|
3415
3415
|
return Number.isFinite(e.x) && Number.isFinite(e.y);
|
|
3416
3416
|
}, Jo = (t) => {
|
|
3417
|
-
const e =
|
|
3417
|
+
const e = G(t);
|
|
3418
3418
|
return [e.x, e.y];
|
|
3419
3419
|
}, Ho = (t) => {
|
|
3420
|
-
const e =
|
|
3420
|
+
const e = G(t);
|
|
3421
3421
|
return { left: e.x, top: e.y };
|
|
3422
3422
|
}, en = (t, e = 0) => {
|
|
3423
|
-
const r =
|
|
3423
|
+
const r = G(t);
|
|
3424
3424
|
return { x: Number(r.x.toFixed(e)), y: Number(r.y.toFixed(e)) };
|
|
3425
|
-
},
|
|
3425
|
+
}, Vu = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
3426
3426
|
__proto__: null,
|
|
3427
|
-
INFINITY:
|
|
3428
|
-
NAN:
|
|
3427
|
+
INFINITY: $o,
|
|
3428
|
+
NAN: Po,
|
|
3429
3429
|
ONE: Js,
|
|
3430
3430
|
ZERO: ze,
|
|
3431
3431
|
clientXY: ys,
|
|
3432
|
-
construct:
|
|
3432
|
+
construct: G,
|
|
3433
3433
|
couple: Jo,
|
|
3434
3434
|
crudeZ: Qr,
|
|
3435
3435
|
css: Ho,
|
|
3436
3436
|
distance: qo,
|
|
3437
|
-
equals:
|
|
3437
|
+
equals: Sr,
|
|
3438
3438
|
isFinite: Go,
|
|
3439
3439
|
isNan: Wo,
|
|
3440
3440
|
isZero: Do,
|
|
3441
3441
|
scale: Vo,
|
|
3442
3442
|
set: zo,
|
|
3443
|
-
translate:
|
|
3443
|
+
translate: kr,
|
|
3444
3444
|
translateX: In,
|
|
3445
3445
|
translateY: Nn,
|
|
3446
3446
|
translation: Ko,
|
|
3447
3447
|
truncate: en,
|
|
3448
3448
|
xDistance: Yo,
|
|
3449
|
-
xy:
|
|
3449
|
+
xy: Dt,
|
|
3450
3450
|
yDistance: Fo
|
|
3451
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
3451
|
+
}, Symbol.toStringTag, { value: "Module" })), Xt = g.union([g.number(), g.string()]);
|
|
3452
3452
|
g.object({
|
|
3453
|
-
top:
|
|
3454
|
-
left:
|
|
3455
|
-
width:
|
|
3456
|
-
height:
|
|
3453
|
+
top: Xt,
|
|
3454
|
+
left: Xt,
|
|
3455
|
+
width: Xt,
|
|
3456
|
+
height: Xt
|
|
3457
3457
|
});
|
|
3458
3458
|
g.object({
|
|
3459
3459
|
left: g.number(),
|
|
@@ -3462,10 +3462,10 @@ g.object({
|
|
|
3462
3462
|
bottom: g.number()
|
|
3463
3463
|
});
|
|
3464
3464
|
const Xo = g.object({
|
|
3465
|
-
one:
|
|
3466
|
-
two:
|
|
3465
|
+
one: Dt,
|
|
3466
|
+
two: Dt,
|
|
3467
3467
|
root: zs
|
|
3468
|
-
}), Qo = { one: ze, two: ze, root:
|
|
3468
|
+
}), Qo = { one: ze, two: ze, root: St }, ec = { one: ze, two: Js, root: Lr }, Hs = (t, e) => ({
|
|
3469
3469
|
one: t.one,
|
|
3470
3470
|
two: t.two,
|
|
3471
3471
|
root: e ?? t.root
|
|
@@ -3473,7 +3473,7 @@ const Xo = g.object({
|
|
|
3473
3473
|
const i = {
|
|
3474
3474
|
one: { ...ze },
|
|
3475
3475
|
two: { ...ze },
|
|
3476
|
-
root: s ??
|
|
3476
|
+
root: s ?? St
|
|
3477
3477
|
};
|
|
3478
3478
|
if (typeof t == "number") {
|
|
3479
3479
|
if (typeof e != "number")
|
|
@@ -3505,11 +3505,11 @@ const Xo = g.object({
|
|
|
3505
3505
|
}, Xs = (t, e) => {
|
|
3506
3506
|
const r = z(t);
|
|
3507
3507
|
return "one" in e ? Xe(e) >= Xe(r) && He(e) <= He(r) && Qe(e) >= Qe(r) && ht(e) <= ht(r) : e.x >= Xe(r) && e.x <= He(r) && e.y >= Qe(r) && e.y <= ht(r);
|
|
3508
|
-
}, rc = (t, e) =>
|
|
3508
|
+
}, rc = (t, e) => Sr(t.one, e.one) && Sr(t.two, e.two) && $r(t.root, e.root), En = (t) => ({
|
|
3509
3509
|
width: Te(t),
|
|
3510
3510
|
height: Ee(t)
|
|
3511
3511
|
}), nc = (t) => ({
|
|
3512
|
-
signedWidth:
|
|
3512
|
+
signedWidth: Pr(t),
|
|
3513
3513
|
signedHeight: Dr(t)
|
|
3514
3514
|
}), sc = (t) => ({
|
|
3515
3515
|
top: Qe(t),
|
|
@@ -3517,39 +3517,39 @@ const Xo = g.object({
|
|
|
3517
3517
|
width: Te(t),
|
|
3518
3518
|
height: Ee(t)
|
|
3519
3519
|
}), Cn = (t, e, r = !1) => {
|
|
3520
|
-
const n = qe(e) === "y" ? Dr(t) :
|
|
3520
|
+
const n = qe(e) === "y" ? Dr(t) : Pr(t);
|
|
3521
3521
|
return r ? n : Math.abs(n);
|
|
3522
|
-
},
|
|
3522
|
+
}, kt = (t, e) => {
|
|
3523
3523
|
const r = z(t);
|
|
3524
3524
|
return {
|
|
3525
|
-
x: e.x === "center" ?
|
|
3526
|
-
y: e.y === "center" ?
|
|
3525
|
+
x: e.x === "center" ? qt(r).x : at(r, e.x),
|
|
3526
|
+
y: e.y === "center" ? qt(r).y : at(r, e.y)
|
|
3527
3527
|
};
|
|
3528
3528
|
}, at = (t, e) => {
|
|
3529
3529
|
const r = z(t), n = Gs(r.root).includes(e) ? Math.min : Math.max;
|
|
3530
3530
|
return Cr.includes(e) ? n(r.one.x, r.two.x) : n(r.one.y, r.two.y);
|
|
3531
3531
|
}, ic = (t, e) => {
|
|
3532
3532
|
const r = at(t, e);
|
|
3533
|
-
return Cr.includes(e) ? { x: r, y:
|
|
3534
|
-
}, ac = (t) => t.one.x === t.two.x && t.one.y === t.two.y, Te = (t) => Cn(t, "x"), Ee = (t) => Cn(t, "y"),
|
|
3533
|
+
return Cr.includes(e) ? { x: r, y: qt(t).y } : { x: qt(t).x, y: r };
|
|
3534
|
+
}, ac = (t) => t.one.x === t.two.x && t.one.y === t.two.y, Te = (t) => Cn(t, "x"), Ee = (t) => Cn(t, "y"), Pr = (t) => {
|
|
3535
3535
|
const e = z(t);
|
|
3536
3536
|
return e.two.x - e.one.x;
|
|
3537
3537
|
}, Dr = (t) => {
|
|
3538
3538
|
const e = z(t);
|
|
3539
3539
|
return e.two.y - e.one.y;
|
|
3540
|
-
}, Qs = (t) =>
|
|
3541
|
-
x:
|
|
3540
|
+
}, Qs = (t) => kt(t, St), oc = (t) => kt(t, kn), cc = (t) => kt(t, Lr), uc = (t) => kt(t, An), He = (t) => at(t, "right"), ht = (t) => at(t, "bottom"), Xe = (t) => at(t, "left"), Qe = (t) => at(t, "top"), qt = (t) => kr(Qs(t), {
|
|
3541
|
+
x: Pr(t) / 2,
|
|
3542
3542
|
y: Dr(t) / 2
|
|
3543
|
-
}),
|
|
3543
|
+
}), Yt = (t) => {
|
|
3544
3544
|
const e = z(t);
|
|
3545
3545
|
return e.root.x === "left" ? Xe(e) : He(e);
|
|
3546
|
-
},
|
|
3546
|
+
}, Ft = (t) => {
|
|
3547
3547
|
const e = z(t);
|
|
3548
3548
|
return e.root.y === "top" ? Qe(e) : ht(e);
|
|
3549
|
-
}, lc = (t) => ({ x:
|
|
3549
|
+
}, lc = (t) => ({ x: Yt(t), y: Ft(t) }), dr = (t) => {
|
|
3550
3550
|
const e = z(t);
|
|
3551
3551
|
return { lower: e.one.x, upper: e.two.x };
|
|
3552
|
-
},
|
|
3552
|
+
}, hr = (t) => {
|
|
3553
3553
|
const e = z(t);
|
|
3554
3554
|
return { lower: e.one.y, upper: e.two.y };
|
|
3555
3555
|
}, fc = (t, e) => Hs(t, e), dc = (t, e) => {
|
|
@@ -3557,21 +3557,21 @@ const Xo = g.object({
|
|
|
3557
3557
|
if (Xs(n, r))
|
|
3558
3558
|
return [r, !1];
|
|
3559
3559
|
let s;
|
|
3560
|
-
return He(r) > Te(r) ? s =
|
|
3560
|
+
return He(r) > Te(r) ? s = G({ x: Yt(r) - Te(r), y: Ft(r) }) : s = G({ x: Yt(r), y: Ft(r) - Ee(r) }), [z(s, En(r)), !0];
|
|
3561
3561
|
}, hc = (t, e) => {
|
|
3562
|
-
const r = z(t), n = z(e), s =
|
|
3562
|
+
const r = z(t), n = z(e), s = Yt(n) + (Te(n) - Te(r)) / 2, i = Ft(n) + (Ee(n) - Ee(r)) / 2;
|
|
3563
3563
|
return z({ x: s, y: i }, En(r));
|
|
3564
3564
|
}, ei = (t) => typeof t != "object" || t == null ? !1 : "one" in t && "two" in t && "root" in t, pc = (t) => Te(t) / Ee(t), yc = (t, e, r) => {
|
|
3565
3565
|
if (typeof e == "string") {
|
|
3566
3566
|
if (r == null)
|
|
3567
3567
|
throw new Error("Undefined amount passed into box.translate");
|
|
3568
3568
|
const s = qe(e);
|
|
3569
|
-
e =
|
|
3569
|
+
e = G(s, r);
|
|
3570
3570
|
}
|
|
3571
3571
|
const n = z(t);
|
|
3572
3572
|
return z(
|
|
3573
|
-
|
|
3574
|
-
|
|
3573
|
+
kr(n.one, e),
|
|
3574
|
+
kr(n.two, e),
|
|
3575
3575
|
void 0,
|
|
3576
3576
|
void 0,
|
|
3577
3577
|
n.root
|
|
@@ -3591,7 +3591,7 @@ const Xo = g.object({
|
|
|
3591
3591
|
}, ni = (t, e, r, n, s, i) => {
|
|
3592
3592
|
const a = { x: t, y: e }, o = { x: t + r, y: e + n };
|
|
3593
3593
|
return s.x !== i.x && (s.x === "center" ? (a.x -= r / 2, o.x -= r / 2) : (a.x -= r, o.x -= r)), s.y !== i.y && (s.y === "center" ? (a.y -= n / 2, o.y -= n / 2) : (a.y -= n, o.y -= n)), z(a, o, void 0, void 0, i);
|
|
3594
|
-
},
|
|
3594
|
+
}, zu = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
3595
3595
|
__proto__: null,
|
|
3596
3596
|
DECIMAL: ec,
|
|
3597
3597
|
ZERO: Qo,
|
|
@@ -3601,7 +3601,7 @@ const Xo = g.object({
|
|
|
3601
3601
|
bottomLeft: cc,
|
|
3602
3602
|
bottomRight: uc,
|
|
3603
3603
|
box: Xo,
|
|
3604
|
-
center:
|
|
3604
|
+
center: qt,
|
|
3605
3605
|
construct: z,
|
|
3606
3606
|
constructWithAlternateRoot: ni,
|
|
3607
3607
|
contains: Xs,
|
|
@@ -3625,19 +3625,19 @@ const Xo = g.object({
|
|
|
3625
3625
|
root: lc,
|
|
3626
3626
|
signedDims: nc,
|
|
3627
3627
|
signedHeight: Dr,
|
|
3628
|
-
signedWidth:
|
|
3628
|
+
signedWidth: Pr,
|
|
3629
3629
|
top: Qe,
|
|
3630
3630
|
topLeft: Qs,
|
|
3631
3631
|
topRight: oc,
|
|
3632
3632
|
translate: yc,
|
|
3633
3633
|
truncate: gc,
|
|
3634
3634
|
width: Te,
|
|
3635
|
-
x:
|
|
3636
|
-
xBounds:
|
|
3637
|
-
xyLoc:
|
|
3638
|
-
y:
|
|
3639
|
-
yBounds:
|
|
3640
|
-
}, Symbol.toStringTag, { value: "Module" })), si = g.object({ signedWidth: g.number(), signedHeight: g.number() }), mc = g.union([un, si,
|
|
3635
|
+
x: Yt,
|
|
3636
|
+
xBounds: dr,
|
|
3637
|
+
xyLoc: kt,
|
|
3638
|
+
y: Ft,
|
|
3639
|
+
yBounds: hr
|
|
3640
|
+
}, Symbol.toStringTag, { value: "Module" })), si = g.object({ signedWidth: g.number(), signedHeight: g.number() }), mc = g.union([un, si, Dt, cn]), xc = { width: 0, height: 0 }, vc = { width: 1, height: 1 }, Se = (t, e) => typeof t == "number" ? { width: t, height: e ?? t } : Array.isArray(t) ? { width: t[0], height: t[1] } : "x" in t ? { width: t.x, height: t.y } : "signedWidth" in t ? { width: t.signedWidth, height: t.signedHeight } : { ...t }, wc = (t, e) => {
|
|
3641
3641
|
if (e == null)
|
|
3642
3642
|
return !1;
|
|
3643
3643
|
const r = Se(t), n = Se(e);
|
|
@@ -3660,7 +3660,7 @@ const Xo = g.object({
|
|
|
3660
3660
|
}), kc = (t, e) => {
|
|
3661
3661
|
const r = Se(t);
|
|
3662
3662
|
return { width: r.width * e, height: r.height * e };
|
|
3663
|
-
},
|
|
3663
|
+
}, qu = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
3664
3664
|
__proto__: null,
|
|
3665
3665
|
DECIMAL: vc,
|
|
3666
3666
|
ZERO: xc,
|
|
@@ -3678,27 +3678,27 @@ const Xo = g.object({
|
|
|
3678
3678
|
}, Symbol.toStringTag, { value: "Module" })), Ac = (t, e, r) => (e != null && (t = Math.max(t, e)), r != null && (t = Math.min(t, r)), t), Ic = g.object({ offset: Qr, scale: Qr }), Nc = (t) => (e, r, n, s) => r === "dimension" ? [e, n] : [e, s ? n - t : n + t], Ec = (t) => (e, r, n, s) => [e, s ? n / t : n * t], Cc = (t) => (e, r, n) => {
|
|
3679
3679
|
if (e === null)
|
|
3680
3680
|
return [t, n];
|
|
3681
|
-
const { lower: s, upper: i } = e, { lower: a, upper: o } = t, l = i - s,
|
|
3681
|
+
const { lower: s, upper: i } = e, { lower: a, upper: o } = t, l = i - s, p = o - a;
|
|
3682
3682
|
if (r === "dimension")
|
|
3683
|
-
return [t, n * (
|
|
3684
|
-
const b = (n - s) * (
|
|
3683
|
+
return [t, n * (p / l)];
|
|
3684
|
+
const b = (n - s) * (p / l) + a;
|
|
3685
3685
|
return [t, b];
|
|
3686
|
-
}, Mc = (t) => (e, r, n) => [t, n],
|
|
3686
|
+
}, Mc = (t) => (e, r, n) => [t, n], Rc = () => (t, e, r) => {
|
|
3687
3687
|
if (t === null)
|
|
3688
3688
|
throw new Error("cannot invert without bounds");
|
|
3689
3689
|
if (e === "dimension")
|
|
3690
3690
|
return [t, r];
|
|
3691
3691
|
const { lower: n, upper: s } = t;
|
|
3692
3692
|
return [t, s - (r - n)];
|
|
3693
|
-
},
|
|
3693
|
+
}, jc = (t) => (e, r, n) => {
|
|
3694
3694
|
const { lower: s, upper: i } = t;
|
|
3695
3695
|
return n = Ac(n, s, i), [e, n];
|
|
3696
3696
|
}, We = class We {
|
|
3697
3697
|
constructor() {
|
|
3698
|
-
|
|
3699
|
-
|
|
3700
|
-
|
|
3701
|
-
|
|
3698
|
+
h(this, "ops", []);
|
|
3699
|
+
h(this, "currBounds", null);
|
|
3700
|
+
h(this, "currType", null);
|
|
3701
|
+
h(this, "reversed", !1);
|
|
3702
3702
|
this.ops = [];
|
|
3703
3703
|
}
|
|
3704
3704
|
static translate(e) {
|
|
@@ -3719,19 +3719,19 @@ const Xo = g.object({
|
|
|
3719
3719
|
return n.type = "magnify", r.ops.push(n), r;
|
|
3720
3720
|
}
|
|
3721
3721
|
scale(e, r) {
|
|
3722
|
-
const n =
|
|
3722
|
+
const n = W(e, r), s = this.new(), i = Cc(n);
|
|
3723
3723
|
return i.type = "scale", s.ops.push(i), s;
|
|
3724
3724
|
}
|
|
3725
3725
|
clamp(e, r) {
|
|
3726
|
-
const n =
|
|
3726
|
+
const n = W(e, r), s = this.new(), i = jc(n);
|
|
3727
3727
|
return i.type = "clamp", s.ops.push(i), s;
|
|
3728
3728
|
}
|
|
3729
3729
|
reBound(e, r) {
|
|
3730
|
-
const n =
|
|
3730
|
+
const n = W(e, r), s = this.new(), i = Mc(n);
|
|
3731
3731
|
return i.type = "re-bound", s.ops.push(i), s;
|
|
3732
3732
|
}
|
|
3733
3733
|
invert() {
|
|
3734
|
-
const e =
|
|
3734
|
+
const e = Rc();
|
|
3735
3735
|
e.type = "invert";
|
|
3736
3736
|
const r = this.new();
|
|
3737
3737
|
return r.ops.push(e), r;
|
|
@@ -3767,8 +3767,8 @@ const Xo = g.object({
|
|
|
3767
3767
|
}), e.reversed = !e.reversed, e;
|
|
3768
3768
|
}
|
|
3769
3769
|
};
|
|
3770
|
-
|
|
3771
|
-
let
|
|
3770
|
+
h(We, "IDENTITY", new We());
|
|
3771
|
+
let Kt = We;
|
|
3772
3772
|
const Bc = (t) => ({
|
|
3773
3773
|
scale: {
|
|
3774
3774
|
x: t.x.dim(1),
|
|
@@ -3779,10 +3779,10 @@ const Bc = (t) => ({
|
|
|
3779
3779
|
y: t.y.pos(0)
|
|
3780
3780
|
}
|
|
3781
3781
|
}), ge = class ge {
|
|
3782
|
-
constructor(e = new
|
|
3783
|
-
|
|
3784
|
-
|
|
3785
|
-
|
|
3782
|
+
constructor(e = new Kt(), r = new Kt(), n = null) {
|
|
3783
|
+
h(this, "x");
|
|
3784
|
+
h(this, "y");
|
|
3785
|
+
h(this, "currRoot");
|
|
3786
3786
|
this.x = e, this.y = r, this.currRoot = n;
|
|
3787
3787
|
}
|
|
3788
3788
|
static translate(e, r) {
|
|
@@ -3807,7 +3807,7 @@ const Bc = (t) => ({
|
|
|
3807
3807
|
return new ge().reBound(e);
|
|
3808
3808
|
}
|
|
3809
3809
|
translate(e, r) {
|
|
3810
|
-
const n =
|
|
3810
|
+
const n = G(e, r), s = this.copy();
|
|
3811
3811
|
return s.x = this.x.translate(n.x), s.y = this.y.translate(n.y), s;
|
|
3812
3812
|
}
|
|
3813
3813
|
translateX(e) {
|
|
@@ -3826,17 +3826,17 @@ const Bc = (t) => ({
|
|
|
3826
3826
|
const r = this.copy();
|
|
3827
3827
|
if (ei(e)) {
|
|
3828
3828
|
const n = this.currRoot;
|
|
3829
|
-
return r.currRoot = e.root, n != null &&
|
|
3829
|
+
return r.currRoot = e.root, n != null && !$r(n, e.root) && (n.x !== e.root.x && (r.x = r.x.invert()), n.y !== e.root.y && (r.y = r.y.invert())), r.x = r.x.scale(dr(e)), r.y = r.y.scale(hr(e)), r;
|
|
3830
3830
|
}
|
|
3831
3831
|
return r.x = r.x.scale(e.width), r.y = r.y.scale(e.height), r;
|
|
3832
3832
|
}
|
|
3833
3833
|
reBound(e) {
|
|
3834
3834
|
const r = this.copy();
|
|
3835
|
-
return r.x = this.x.reBound(
|
|
3835
|
+
return r.x = this.x.reBound(dr(e)), r.y = this.y.reBound(hr(e)), r;
|
|
3836
3836
|
}
|
|
3837
3837
|
clamp(e) {
|
|
3838
3838
|
const r = this.copy();
|
|
3839
|
-
return r.x = this.x.clamp(
|
|
3839
|
+
return r.x = this.x.clamp(dr(e)), r.y = this.y.clamp(hr(e)), r;
|
|
3840
3840
|
}
|
|
3841
3841
|
copy() {
|
|
3842
3842
|
const e = new ge();
|
|
@@ -3859,17 +3859,17 @@ const Bc = (t) => ({
|
|
|
3859
3859
|
);
|
|
3860
3860
|
}
|
|
3861
3861
|
};
|
|
3862
|
-
|
|
3862
|
+
h(ge, "IDENTITY", new ge());
|
|
3863
3863
|
let tn = ge;
|
|
3864
|
-
const
|
|
3864
|
+
const Yu = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
3865
3865
|
__proto__: null,
|
|
3866
|
-
Scale:
|
|
3866
|
+
Scale: Kt,
|
|
3867
3867
|
XY: tn,
|
|
3868
3868
|
crudeXYTransform: Ic,
|
|
3869
3869
|
xyScaleToTransform: Bc
|
|
3870
3870
|
}, Symbol.toStringTag, { value: "Module" })), Uc = (t, e) => {
|
|
3871
3871
|
const { width: r, height: n } = t.getBoundingClientRect(), { innerWidth: s, innerHeight: i } = window;
|
|
3872
|
-
let a = !1, o =
|
|
3872
|
+
let a = !1, o = G(e);
|
|
3873
3873
|
return e.x + r > s && (o = In(o, -r), a = !0), e.y + n > i && (o = Nn(o, -n), a = !0), [o, a];
|
|
3874
3874
|
}, Vn = (t) => {
|
|
3875
3875
|
if (t == null)
|
|
@@ -3893,16 +3893,16 @@ const Lu = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
3893
3893
|
if (s != null) {
|
|
3894
3894
|
const D = s.map((pe) => Vn(pe));
|
|
3895
3895
|
l = l.slice().sort((pe, Ye) => {
|
|
3896
|
-
const Ce = D.findIndex((
|
|
3896
|
+
const Ce = D.findIndex((J) => lr(pe, J)), ot = D.findIndex((J) => lr(Ye, J));
|
|
3897
3897
|
return Ce > -1 && ot > -1 ? Ce - ot : Ce > -1 ? -1 : ot > -1 ? 1 : 0;
|
|
3898
3898
|
});
|
|
3899
3899
|
}
|
|
3900
|
-
const
|
|
3901
|
-
(D) =>
|
|
3900
|
+
const p = l.filter(
|
|
3901
|
+
(D) => !$r(D, zt) && (o.x == null || D.x === o.x) && (o.y == null || D.y === o.y) && !a.some((pe) => lr(D, pe))
|
|
3902
3902
|
).map((D) => i == null ? void 0 : i.map((pe) => [D, pe])).flat(), b = z(t), k = z(e), ee = z(r);
|
|
3903
|
-
let
|
|
3904
|
-
const de = { location:
|
|
3905
|
-
return
|
|
3903
|
+
let Y = -1 / 0;
|
|
3904
|
+
const de = { location: zt, adjustedDialog: ee };
|
|
3905
|
+
return p.forEach(([D, pe]) => {
|
|
3906
3906
|
const [Ye, Ce] = Lc({
|
|
3907
3907
|
option: D,
|
|
3908
3908
|
alignment: pe,
|
|
@@ -3910,7 +3910,7 @@ const Lu = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
3910
3910
|
target: k,
|
|
3911
3911
|
dialog: ee
|
|
3912
3912
|
});
|
|
3913
|
-
Ce >
|
|
3913
|
+
Ce > Y && (Y = Ce, de.location = D, de.adjustedDialog = Ye);
|
|
3914
3914
|
}), de;
|
|
3915
3915
|
}, Lc = ({
|
|
3916
3916
|
option: t,
|
|
@@ -3919,43 +3919,43 @@ const Lu = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
3919
3919
|
target: n,
|
|
3920
3920
|
dialog: s
|
|
3921
3921
|
}) => {
|
|
3922
|
-
const i = ii(t, e), a =
|
|
3922
|
+
const i = ii(t, e), a = kt(n, t), o = ni(
|
|
3923
3923
|
a.x,
|
|
3924
3924
|
a.y,
|
|
3925
3925
|
Te(s),
|
|
3926
3926
|
Ee(s),
|
|
3927
3927
|
i,
|
|
3928
|
-
|
|
3928
|
+
St
|
|
3929
3929
|
), l = ri(ti(o, r));
|
|
3930
3930
|
return [o, l];
|
|
3931
|
-
},
|
|
3931
|
+
}, $c = {
|
|
3932
3932
|
start: "left",
|
|
3933
3933
|
center: "center",
|
|
3934
3934
|
end: "right"
|
|
3935
|
-
},
|
|
3935
|
+
}, Pc = {
|
|
3936
3936
|
start: "bottom",
|
|
3937
3937
|
center: "center",
|
|
3938
3938
|
end: "top"
|
|
3939
3939
|
}, ii = (t, e) => {
|
|
3940
3940
|
const r = { x: "center", y: "center" };
|
|
3941
3941
|
if (t.y !== "center") {
|
|
3942
|
-
r.y =
|
|
3943
|
-
const n = t.x === "left" ?
|
|
3944
|
-
r.x = n(
|
|
3942
|
+
r.y = ur(t.y);
|
|
3943
|
+
const n = t.x === "left" ? ur : (s) => s;
|
|
3944
|
+
r.x = n($c[e]);
|
|
3945
3945
|
} else
|
|
3946
|
-
r.x =
|
|
3946
|
+
r.x = ur(t.x), r.y = Pc[e];
|
|
3947
3947
|
return r;
|
|
3948
|
-
},
|
|
3948
|
+
}, Fu = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
3949
3949
|
__proto__: null,
|
|
3950
3950
|
dialog: Zc,
|
|
3951
3951
|
getRoot: ii,
|
|
3952
3952
|
posititonSoVisible: Uc
|
|
3953
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
3953
|
+
}, Symbol.toStringTag, { value: "Module" })), Ku = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
3954
3954
|
__proto__: null,
|
|
3955
3955
|
ALIGNMENTS: ps,
|
|
3956
3956
|
ORDERS: xs,
|
|
3957
3957
|
alignment: La,
|
|
3958
|
-
order:
|
|
3958
|
+
order: $a
|
|
3959
3959
|
}, Symbol.toStringTag, { value: "Module" })), ai = (t, e) => {
|
|
3960
3960
|
const r = new ne(e);
|
|
3961
3961
|
if (![
|
|
@@ -3974,8 +3974,8 @@ const Lu = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
3974
3974
|
return t instanceof ne ? new ne(n) : new se(n);
|
|
3975
3975
|
}, O = class O {
|
|
3976
3976
|
constructor(e, r = "UTC") {
|
|
3977
|
-
|
|
3978
|
-
|
|
3977
|
+
h(this, "value");
|
|
3978
|
+
h(this, "encodeValue", !0);
|
|
3979
3979
|
if (e == null)
|
|
3980
3980
|
this.value = O.now().valueOf();
|
|
3981
3981
|
else if (e instanceof Date)
|
|
@@ -4090,7 +4090,7 @@ const Lu = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
4090
4090
|
* valid, regardless of the TimeStamp order.
|
|
4091
4091
|
*/
|
|
4092
4092
|
range(e) {
|
|
4093
|
-
return new
|
|
4093
|
+
return new Tt(this, e).makeValid();
|
|
4094
4094
|
}
|
|
4095
4095
|
/**
|
|
4096
4096
|
* Creates a TimeRange starting at the TimeStamp and spanning the given
|
|
@@ -4255,17 +4255,17 @@ const Lu = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
4255
4255
|
}
|
|
4256
4256
|
};
|
|
4257
4257
|
/* One nanosecond after the unix epoch */
|
|
4258
|
-
|
|
4259
|
-
|
|
4260
|
-
|
|
4261
|
-
|
|
4262
|
-
|
|
4263
|
-
|
|
4264
|
-
|
|
4265
|
-
|
|
4266
|
-
|
|
4267
|
-
|
|
4268
|
-
|
|
4258
|
+
h(O, "NANOSECOND", O.nanoseconds(1)), /** One microsecond after the unix epoch */
|
|
4259
|
+
h(O, "MICROSECOND", O.microseconds(1)), /** One millisecond after the unix epoch */
|
|
4260
|
+
h(O, "MILLISECOND", O.milliseconds(1)), /** One second after the unix epoch */
|
|
4261
|
+
h(O, "SECOND", O.seconds(1)), /** One minute after the unix epoch */
|
|
4262
|
+
h(O, "MINUTE", O.minutes(1)), /** One hour after the unix epoch */
|
|
4263
|
+
h(O, "HOUR", O.hours(1)), /** One day after the unix epoch */
|
|
4264
|
+
h(O, "DAY", O.days(1)), /** The maximum possible value for a timestamp */
|
|
4265
|
+
h(O, "MAX", new O((1n << 63n) - 1n)), /** The minimum possible value for a timestamp */
|
|
4266
|
+
h(O, "MIN", new O(0)), /** The unix epoch */
|
|
4267
|
+
h(O, "ZERO", new O(0)), /** A zod schema for validating timestamps */
|
|
4268
|
+
h(O, "z", g.union([
|
|
4269
4269
|
g.object({ value: g.bigint() }).transform((e) => new O(e.value)),
|
|
4270
4270
|
g.string().transform((e) => new O(BigInt(e))),
|
|
4271
4271
|
g.instanceof(Number).transform((e) => new O(e)),
|
|
@@ -4275,8 +4275,8 @@ y(O, "z", g.union([
|
|
|
4275
4275
|
let ne = O;
|
|
4276
4276
|
const I = class I {
|
|
4277
4277
|
constructor(e) {
|
|
4278
|
-
|
|
4279
|
-
|
|
4278
|
+
h(this, "value");
|
|
4279
|
+
h(this, "encodeValue", !0);
|
|
4280
4280
|
typeof e == "number" && (e = Math.trunc(e.valueOf())), this.value = BigInt(e.valueOf());
|
|
4281
4281
|
}
|
|
4282
4282
|
encode() {
|
|
@@ -4306,9 +4306,9 @@ const I = class I {
|
|
|
4306
4306
|
);
|
|
4307
4307
|
}
|
|
4308
4308
|
toString() {
|
|
4309
|
-
const e = this.truncate(I.DAY), r = this.truncate(I.HOUR), n = this.truncate(I.MINUTE), s = this.truncate(I.SECOND), i = this.truncate(I.MILLISECOND), a = this.truncate(I.MICROSECOND), o = this.truncate(I.NANOSECOND), l = e,
|
|
4309
|
+
const e = this.truncate(I.DAY), r = this.truncate(I.HOUR), n = this.truncate(I.MINUTE), s = this.truncate(I.SECOND), i = this.truncate(I.MILLISECOND), a = this.truncate(I.MICROSECOND), o = this.truncate(I.NANOSECOND), l = e, p = r.sub(e), b = n.sub(r), k = s.sub(n), ee = i.sub(s), Y = a.sub(i), de = o.sub(a);
|
|
4310
4310
|
let D = "";
|
|
4311
|
-
return l.isZero || (D += `${l.days}d `),
|
|
4311
|
+
return l.isZero || (D += `${l.days}d `), p.isZero || (D += `${p.hours}h `), b.isZero || (D += `${b.minutes}m `), k.isZero || (D += `${k.seconds}s `), ee.isZero || (D += `${ee.milliseconds}ms `), Y.isZero || (D += `${Y.microseconds}µs `), de.isZero || (D += `${de.nanoseconds}ns`), D.trim();
|
|
4312
4312
|
}
|
|
4313
4313
|
/** @returns the decimal number of days in the timespan */
|
|
4314
4314
|
get days() {
|
|
@@ -4433,17 +4433,17 @@ const I = class I {
|
|
|
4433
4433
|
}
|
|
4434
4434
|
};
|
|
4435
4435
|
/** A nanosecond. */
|
|
4436
|
-
|
|
4437
|
-
|
|
4438
|
-
|
|
4439
|
-
|
|
4440
|
-
|
|
4441
|
-
|
|
4442
|
-
|
|
4443
|
-
|
|
4444
|
-
|
|
4445
|
-
|
|
4446
|
-
|
|
4436
|
+
h(I, "NANOSECOND", I.nanoseconds(1)), /** A microsecond. */
|
|
4437
|
+
h(I, "MICROSECOND", I.microseconds(1)), /** A millisecond. */
|
|
4438
|
+
h(I, "MILLISECOND", I.milliseconds(1)), /** A second. */
|
|
4439
|
+
h(I, "SECOND", I.seconds(1)), /** A minute. */
|
|
4440
|
+
h(I, "MINUTE", I.minutes(1)), /** Represents an hour. */
|
|
4441
|
+
h(I, "HOUR", I.hours(1)), /** Represents a day. */
|
|
4442
|
+
h(I, "DAY", I.days(1)), /** The maximum possible value for a TimeSpan. */
|
|
4443
|
+
h(I, "MAX", new I((1n << 63n) - 1n)), /** The minimum possible value for a TimeSpan. */
|
|
4444
|
+
h(I, "MIN", new I(0)), /** The zero value for a TimeSpan. */
|
|
4445
|
+
h(I, "ZERO", new I(0)), /** A zod schema for validating and transforming timespans */
|
|
4446
|
+
h(I, "z", g.union([
|
|
4447
4447
|
g.object({ value: g.bigint() }).transform((e) => new I(e.value)),
|
|
4448
4448
|
g.string().transform((e) => new I(BigInt(e))),
|
|
4449
4449
|
g.instanceof(Number).transform((e) => new I(e)),
|
|
@@ -4451,7 +4451,7 @@ y(I, "z", g.union([
|
|
|
4451
4451
|
g.instanceof(I)
|
|
4452
4452
|
]));
|
|
4453
4453
|
let se = I;
|
|
4454
|
-
const
|
|
4454
|
+
const $e = class $e extends Number {
|
|
4455
4455
|
constructor(e) {
|
|
4456
4456
|
e instanceof Number ? super(e.valueOf()) : super(e);
|
|
4457
4457
|
}
|
|
@@ -4461,7 +4461,7 @@ const Pe = class Pe extends Number {
|
|
|
4461
4461
|
}
|
|
4462
4462
|
/** @returns The number of seconds in the Rate. */
|
|
4463
4463
|
equals(e) {
|
|
4464
|
-
return this.valueOf() === new
|
|
4464
|
+
return this.valueOf() === new $e(e).valueOf();
|
|
4465
4465
|
}
|
|
4466
4466
|
/**
|
|
4467
4467
|
* Calculates the period of the Rate as a TimeSpan.
|
|
@@ -4516,7 +4516,7 @@ const Pe = class Pe extends Number {
|
|
|
4516
4516
|
* @returns A Rate representing the given number of Hz.
|
|
4517
4517
|
*/
|
|
4518
4518
|
static hz(e) {
|
|
4519
|
-
return new
|
|
4519
|
+
return new $e(e);
|
|
4520
4520
|
}
|
|
4521
4521
|
/**
|
|
4522
4522
|
* Creates a Rate representing the given number of kHz.
|
|
@@ -4525,16 +4525,16 @@ const Pe = class Pe extends Number {
|
|
|
4525
4525
|
* @returns A Rate representing the given number of kHz.
|
|
4526
4526
|
*/
|
|
4527
4527
|
static khz(e) {
|
|
4528
|
-
return
|
|
4528
|
+
return $e.hz(e * 1e3);
|
|
4529
4529
|
}
|
|
4530
4530
|
};
|
|
4531
4531
|
/** A zod schema for validating and transforming rates */
|
|
4532
|
-
|
|
4533
|
-
g.number().transform((e) => new
|
|
4534
|
-
g.instanceof(Number).transform((e) => new
|
|
4535
|
-
g.instanceof(
|
|
4532
|
+
h($e, "z", g.union([
|
|
4533
|
+
g.number().transform((e) => new $e(e)),
|
|
4534
|
+
g.instanceof(Number).transform((e) => new $e(e)),
|
|
4535
|
+
g.instanceof($e)
|
|
4536
4536
|
]));
|
|
4537
|
-
let zn =
|
|
4537
|
+
let zn = $e;
|
|
4538
4538
|
const ie = class ie extends Number {
|
|
4539
4539
|
/**
|
|
4540
4540
|
* Creates a Density representing the given number of bytes per value.
|
|
@@ -4554,13 +4554,13 @@ const ie = class ie extends Number {
|
|
|
4554
4554
|
}
|
|
4555
4555
|
};
|
|
4556
4556
|
/** Unknown/Invalid Density. */
|
|
4557
|
-
|
|
4558
|
-
|
|
4559
|
-
|
|
4560
|
-
|
|
4561
|
-
|
|
4562
|
-
|
|
4563
|
-
|
|
4557
|
+
h(ie, "UNKNOWN", new ie(0)), /** 128 bits per value. */
|
|
4558
|
+
h(ie, "BIT128", new ie(16)), /** 64 bits per value. */
|
|
4559
|
+
h(ie, "BIT64", new ie(8)), /** 32 bits per value. */
|
|
4560
|
+
h(ie, "BIT32", new ie(4)), /** 16 bits per value. */
|
|
4561
|
+
h(ie, "BIT16", new ie(2)), /** 8 bits per value. */
|
|
4562
|
+
h(ie, "BIT8", new ie(1)), /** A zod schema for validating and transforming densities */
|
|
4563
|
+
h(ie, "z", g.union([
|
|
4564
4564
|
g.number().transform((e) => new ie(e)),
|
|
4565
4565
|
g.instanceof(Number).transform((e) => new ie(e)),
|
|
4566
4566
|
g.instanceof(ie)
|
|
@@ -4582,7 +4582,7 @@ const he = class he {
|
|
|
4582
4582
|
*
|
|
4583
4583
|
* In most cases, operations should treat start as inclusive.
|
|
4584
4584
|
*/
|
|
4585
|
-
|
|
4585
|
+
h(this, "start");
|
|
4586
4586
|
/**
|
|
4587
4587
|
* The starting TimeStamp of the TimeRange.
|
|
4588
4588
|
*
|
|
@@ -4591,7 +4591,7 @@ const he = class he {
|
|
|
4591
4591
|
*
|
|
4592
4592
|
* In most cases, operations should treat end as exclusive.
|
|
4593
4593
|
*/
|
|
4594
|
-
|
|
4594
|
+
h(this, "end");
|
|
4595
4595
|
this.start = new ne(e), this.end = new ne(r);
|
|
4596
4596
|
}
|
|
4597
4597
|
/** @returns The TimeSpan occupied by the TimeRange. */
|
|
@@ -4667,33 +4667,33 @@ const he = class he {
|
|
|
4667
4667
|
}
|
|
4668
4668
|
};
|
|
4669
4669
|
/** The maximum possible time range. */
|
|
4670
|
-
|
|
4671
|
-
|
|
4672
|
-
|
|
4673
|
-
|
|
4670
|
+
h(he, "MAX", new he(ne.MIN, ne.MAX)), /** The minimum possible time range. */
|
|
4671
|
+
h(he, "MIN", new he(ne.MAX, ne.MIN)), /** A zero time range. */
|
|
4672
|
+
h(he, "ZERO", new he(ne.ZERO, ne.ZERO)), /** A zod schema for validating and transforming time ranges */
|
|
4673
|
+
h(he, "z", g.union([
|
|
4674
4674
|
g.object({ start: ne.z, end: ne.z }).transform((e) => new he(e.start, e.end)),
|
|
4675
4675
|
g.instanceof(he)
|
|
4676
4676
|
]));
|
|
4677
|
-
let
|
|
4678
|
-
const
|
|
4677
|
+
let Tt = he;
|
|
4678
|
+
const y = class y extends String {
|
|
4679
4679
|
constructor(e) {
|
|
4680
|
-
if (e instanceof
|
|
4680
|
+
if (e instanceof y || typeof e == "string" || typeof e.valueOf() == "string") {
|
|
4681
4681
|
super(e.valueOf());
|
|
4682
4682
|
return;
|
|
4683
4683
|
} else {
|
|
4684
|
-
const r =
|
|
4684
|
+
const r = y.ARRAY_CONSTRUCTOR_DATA_TYPES.get(e.constructor.name);
|
|
4685
4685
|
if (r != null) {
|
|
4686
4686
|
super(r.valueOf());
|
|
4687
4687
|
return;
|
|
4688
4688
|
}
|
|
4689
4689
|
}
|
|
4690
|
-
throw super(
|
|
4690
|
+
throw super(y.UNKNOWN.valueOf()), new Error(`unable to find data type for ${e.toString()}`);
|
|
4691
4691
|
}
|
|
4692
4692
|
/**
|
|
4693
4693
|
* @returns the TypedArray constructor for the DataType.
|
|
4694
4694
|
*/
|
|
4695
4695
|
get Array() {
|
|
4696
|
-
const e =
|
|
4696
|
+
const e = y.ARRAY_CONSTRUCTORS.get(this.toString());
|
|
4697
4697
|
if (e == null)
|
|
4698
4698
|
throw new Error(`unable to find array constructor for ${this.valueOf()}`);
|
|
4699
4699
|
return e;
|
|
@@ -4706,10 +4706,10 @@ const p = class p extends String {
|
|
|
4706
4706
|
return this.valueOf();
|
|
4707
4707
|
}
|
|
4708
4708
|
get isVariable() {
|
|
4709
|
-
return this.equals(
|
|
4709
|
+
return this.equals(y.JSON) || this.equals(y.STRING);
|
|
4710
4710
|
}
|
|
4711
4711
|
get density() {
|
|
4712
|
-
const e =
|
|
4712
|
+
const e = y.DENSITIES.get(this.toString());
|
|
4713
4713
|
if (e == null)
|
|
4714
4714
|
throw new Error(`unable to find density for ${this.valueOf()}`);
|
|
4715
4715
|
return e;
|
|
@@ -4727,92 +4727,92 @@ const p = class p extends String {
|
|
|
4727
4727
|
return this.toString();
|
|
4728
4728
|
}
|
|
4729
4729
|
get usesBigInt() {
|
|
4730
|
-
return
|
|
4730
|
+
return y.BIG_INT_TYPES.some((e) => e.equals(this));
|
|
4731
4731
|
}
|
|
4732
4732
|
};
|
|
4733
4733
|
/** Represents an Unknown/Invalid DataType. */
|
|
4734
|
-
y
|
|
4735
|
-
y
|
|
4736
|
-
y
|
|
4737
|
-
y
|
|
4738
|
-
y
|
|
4739
|
-
y
|
|
4740
|
-
y
|
|
4741
|
-
y
|
|
4742
|
-
y
|
|
4743
|
-
y
|
|
4744
|
-
y
|
|
4745
|
-
y
|
|
4746
|
-
y
|
|
4747
|
-
y
|
|
4734
|
+
h(y, "UNKNOWN", new y("unknown")), /** Represents a 64-bit floating point value. */
|
|
4735
|
+
h(y, "FLOAT64", new y("float64")), /** Represents a 32-bit floating point value. */
|
|
4736
|
+
h(y, "FLOAT32", new y("float32")), /** Represents a 64-bit signed integer value. */
|
|
4737
|
+
h(y, "INT64", new y("int64")), /** Represents a 32-bit signed integer value. */
|
|
4738
|
+
h(y, "INT32", new y("int32")), /** Represents a 16-bit signed integer value. */
|
|
4739
|
+
h(y, "INT16", new y("int16")), /** Represents a 8-bit signed integer value. */
|
|
4740
|
+
h(y, "INT8", new y("int8")), /** Represents a 64-bit unsigned integer value. */
|
|
4741
|
+
h(y, "UINT64", new y("uint64")), /** Represents a 32-bit unsigned integer value. */
|
|
4742
|
+
h(y, "UINT32", new y("uint32")), /** Represents a 16-bit unsigned integer value. */
|
|
4743
|
+
h(y, "UINT16", new y("uint16")), /** Represents a 8-bit unsigned integer value. */
|
|
4744
|
+
h(y, "UINT8", new y("uint8")), /** Represents a boolean value. Alias for UINT8. */
|
|
4745
|
+
h(y, "BOOLEAN", y.UINT8), /** Represents a 64-bit unix epoch. */
|
|
4746
|
+
h(y, "TIMESTAMP", new y("timestamp")), /** Represents a UUID data type */
|
|
4747
|
+
h(y, "UUID", new y("uuid")), /** Represents a string data type. Strings have an unknown density, and are separate
|
|
4748
4748
|
* by a newline character. */
|
|
4749
|
-
y
|
|
4749
|
+
h(y, "STRING", new y("string")), /** Represents a JSON data type. JSON has an unknown density, and is separated by a
|
|
4750
4750
|
* newline character. */
|
|
4751
|
-
y
|
|
4752
|
-
[
|
|
4753
|
-
[
|
|
4754
|
-
[
|
|
4755
|
-
[
|
|
4756
|
-
[
|
|
4757
|
-
[
|
|
4758
|
-
[
|
|
4759
|
-
[
|
|
4760
|
-
[
|
|
4761
|
-
[
|
|
4762
|
-
[
|
|
4763
|
-
[
|
|
4764
|
-
[
|
|
4765
|
-
[
|
|
4766
|
-
])), y
|
|
4767
|
-
[Uint8Array.name,
|
|
4768
|
-
[Uint16Array.name,
|
|
4769
|
-
[Uint32Array.name,
|
|
4770
|
-
[BigUint64Array.name,
|
|
4771
|
-
[Float32Array.name,
|
|
4772
|
-
[Float64Array.name,
|
|
4773
|
-
[Int8Array.name,
|
|
4774
|
-
[Int16Array.name,
|
|
4775
|
-
[Int32Array.name,
|
|
4776
|
-
[BigInt64Array.name,
|
|
4777
|
-
])), y
|
|
4778
|
-
[
|
|
4779
|
-
[
|
|
4780
|
-
[
|
|
4781
|
-
[
|
|
4782
|
-
[
|
|
4783
|
-
[
|
|
4784
|
-
[
|
|
4785
|
-
[
|
|
4786
|
-
[
|
|
4787
|
-
[
|
|
4788
|
-
[
|
|
4789
|
-
[
|
|
4790
|
-
[
|
|
4791
|
-
[
|
|
4751
|
+
h(y, "JSON", new y("json")), h(y, "ARRAY_CONSTRUCTORS", /* @__PURE__ */ new Map([
|
|
4752
|
+
[y.UINT8.toString(), Uint8Array],
|
|
4753
|
+
[y.UINT16.toString(), Uint16Array],
|
|
4754
|
+
[y.UINT32.toString(), Uint32Array],
|
|
4755
|
+
[y.UINT64.toString(), BigUint64Array],
|
|
4756
|
+
[y.FLOAT32.toString(), Float32Array],
|
|
4757
|
+
[y.FLOAT64.toString(), Float64Array],
|
|
4758
|
+
[y.INT8.toString(), Int8Array],
|
|
4759
|
+
[y.INT16.toString(), Int16Array],
|
|
4760
|
+
[y.INT32.toString(), Int32Array],
|
|
4761
|
+
[y.INT64.toString(), BigInt64Array],
|
|
4762
|
+
[y.TIMESTAMP.toString(), BigInt64Array],
|
|
4763
|
+
[y.STRING.toString(), Uint8Array],
|
|
4764
|
+
[y.JSON.toString(), Uint8Array],
|
|
4765
|
+
[y.UUID.toString(), Uint8Array]
|
|
4766
|
+
])), h(y, "ARRAY_CONSTRUCTOR_DATA_TYPES", /* @__PURE__ */ new Map([
|
|
4767
|
+
[Uint8Array.name, y.UINT8],
|
|
4768
|
+
[Uint16Array.name, y.UINT16],
|
|
4769
|
+
[Uint32Array.name, y.UINT32],
|
|
4770
|
+
[BigUint64Array.name, y.UINT64],
|
|
4771
|
+
[Float32Array.name, y.FLOAT32],
|
|
4772
|
+
[Float64Array.name, y.FLOAT64],
|
|
4773
|
+
[Int8Array.name, y.INT8],
|
|
4774
|
+
[Int16Array.name, y.INT16],
|
|
4775
|
+
[Int32Array.name, y.INT32],
|
|
4776
|
+
[BigInt64Array.name, y.INT64]
|
|
4777
|
+
])), h(y, "DENSITIES", /* @__PURE__ */ new Map([
|
|
4778
|
+
[y.UINT8.toString(), ce.BIT8],
|
|
4779
|
+
[y.UINT16.toString(), ce.BIT16],
|
|
4780
|
+
[y.UINT32.toString(), ce.BIT32],
|
|
4781
|
+
[y.UINT64.toString(), ce.BIT64],
|
|
4782
|
+
[y.FLOAT32.toString(), ce.BIT32],
|
|
4783
|
+
[y.FLOAT64.toString(), ce.BIT64],
|
|
4784
|
+
[y.INT8.toString(), ce.BIT8],
|
|
4785
|
+
[y.INT16.toString(), ce.BIT16],
|
|
4786
|
+
[y.INT32.toString(), ce.BIT32],
|
|
4787
|
+
[y.INT64.toString(), ce.BIT64],
|
|
4788
|
+
[y.TIMESTAMP.toString(), ce.BIT64],
|
|
4789
|
+
[y.STRING.toString(), ce.UNKNOWN],
|
|
4790
|
+
[y.JSON.toString(), ce.UNKNOWN],
|
|
4791
|
+
[y.UUID.toString(), ce.BIT128]
|
|
4792
4792
|
])), /** All the data types. */
|
|
4793
|
-
y
|
|
4794
|
-
|
|
4795
|
-
|
|
4796
|
-
|
|
4797
|
-
|
|
4798
|
-
|
|
4799
|
-
|
|
4800
|
-
|
|
4801
|
-
|
|
4802
|
-
|
|
4803
|
-
|
|
4804
|
-
|
|
4805
|
-
|
|
4806
|
-
|
|
4807
|
-
|
|
4808
|
-
|
|
4809
|
-
]), y
|
|
4810
|
-
y
|
|
4811
|
-
g.string().transform((e) => new
|
|
4812
|
-
g.instanceof(
|
|
4793
|
+
h(y, "ALL", [
|
|
4794
|
+
y.UNKNOWN,
|
|
4795
|
+
y.FLOAT64,
|
|
4796
|
+
y.FLOAT32,
|
|
4797
|
+
y.INT64,
|
|
4798
|
+
y.INT32,
|
|
4799
|
+
y.INT16,
|
|
4800
|
+
y.INT8,
|
|
4801
|
+
y.UINT64,
|
|
4802
|
+
y.UINT32,
|
|
4803
|
+
y.UINT16,
|
|
4804
|
+
y.UINT8,
|
|
4805
|
+
y.TIMESTAMP,
|
|
4806
|
+
y.UUID,
|
|
4807
|
+
y.STRING,
|
|
4808
|
+
y.JSON
|
|
4809
|
+
]), h(y, "BIG_INT_TYPES", [y.INT64, y.UINT64, y.TIMESTAMP]), /** A zod schema for a DataType. */
|
|
4810
|
+
h(y, "z", g.union([
|
|
4811
|
+
g.string().transform((e) => new y(e)),
|
|
4812
|
+
g.instanceof(y)
|
|
4813
4813
|
]));
|
|
4814
|
-
let
|
|
4815
|
-
const
|
|
4814
|
+
let q = y;
|
|
4815
|
+
const $ = class $ extends Number {
|
|
4816
4816
|
constructor(e) {
|
|
4817
4817
|
super(e.valueOf());
|
|
4818
4818
|
}
|
|
@@ -4825,33 +4825,33 @@ const P = class P extends Number {
|
|
|
4825
4825
|
return this.valueOf() < e.valueOf();
|
|
4826
4826
|
}
|
|
4827
4827
|
add(e) {
|
|
4828
|
-
return
|
|
4828
|
+
return $.bytes(this.valueOf() + e.valueOf());
|
|
4829
4829
|
}
|
|
4830
4830
|
sub(e) {
|
|
4831
|
-
return
|
|
4831
|
+
return $.bytes(this.valueOf() - e.valueOf());
|
|
4832
4832
|
}
|
|
4833
4833
|
truncate(e) {
|
|
4834
|
-
return new
|
|
4834
|
+
return new $(Math.trunc(this.valueOf() / e.valueOf()) * e.valueOf());
|
|
4835
4835
|
}
|
|
4836
4836
|
remainder(e) {
|
|
4837
|
-
return
|
|
4837
|
+
return $.bytes(this.valueOf() % e.valueOf());
|
|
4838
4838
|
}
|
|
4839
4839
|
get gigabytes() {
|
|
4840
|
-
return this.valueOf() /
|
|
4840
|
+
return this.valueOf() / $.GIGABYTE.valueOf();
|
|
4841
4841
|
}
|
|
4842
4842
|
get megabytes() {
|
|
4843
|
-
return this.valueOf() /
|
|
4843
|
+
return this.valueOf() / $.MEGABYTE.valueOf();
|
|
4844
4844
|
}
|
|
4845
4845
|
get kilobytes() {
|
|
4846
|
-
return this.valueOf() /
|
|
4846
|
+
return this.valueOf() / $.KILOBYTE.valueOf();
|
|
4847
4847
|
}
|
|
4848
4848
|
get terabytes() {
|
|
4849
|
-
return this.valueOf() /
|
|
4849
|
+
return this.valueOf() / $.TERABYTE.valueOf();
|
|
4850
4850
|
}
|
|
4851
4851
|
toString() {
|
|
4852
|
-
const e = this.truncate(
|
|
4852
|
+
const e = this.truncate($.TERABYTE), r = this.truncate($.GIGABYTE), n = this.truncate($.MEGABYTE), s = this.truncate($.KILOBYTE), i = this.truncate($.BYTE), a = e, o = r.sub(e), l = n.sub(r), p = s.sub(n), b = i.sub(s);
|
|
4853
4853
|
let k = "";
|
|
4854
|
-
return a.isZero || (k += `${a.terabytes}TB `), o.isZero || (k += `${o.gigabytes}GB `), l.isZero || (k += `${l.megabytes}MB `),
|
|
4854
|
+
return a.isZero || (k += `${a.terabytes}TB `), o.isZero || (k += `${o.gigabytes}GB `), l.isZero || (k += `${l.megabytes}MB `), p.isZero || (k += `${p.kilobytes}KB `), (!b.isZero || k === "") && (k += `${b.valueOf()}B`), k.trim();
|
|
4855
4855
|
}
|
|
4856
4856
|
/**
|
|
4857
4857
|
* Creates a Size from the given number of bytes.
|
|
@@ -4860,7 +4860,7 @@ const P = class P extends Number {
|
|
|
4860
4860
|
* @returns A Size representing the given number of bytes.
|
|
4861
4861
|
*/
|
|
4862
4862
|
static bytes(e = 1) {
|
|
4863
|
-
return new
|
|
4863
|
+
return new $(e);
|
|
4864
4864
|
}
|
|
4865
4865
|
/**
|
|
4866
4866
|
* Creates a Size from the given number if kilobytes.
|
|
@@ -4869,7 +4869,7 @@ const P = class P extends Number {
|
|
|
4869
4869
|
* @returns A Size representing the given number of kilobytes.
|
|
4870
4870
|
*/
|
|
4871
4871
|
static kilobytes(e = 1) {
|
|
4872
|
-
return
|
|
4872
|
+
return $.bytes(e.valueOf() * 1e3);
|
|
4873
4873
|
}
|
|
4874
4874
|
/**
|
|
4875
4875
|
* Creates a Size from the given number of megabytes.
|
|
@@ -4878,7 +4878,7 @@ const P = class P extends Number {
|
|
|
4878
4878
|
* @returns A Size representing the given number of megabytes.
|
|
4879
4879
|
*/
|
|
4880
4880
|
static megabytes(e = 1) {
|
|
4881
|
-
return
|
|
4881
|
+
return $.kilobytes(e.valueOf() * 1e3);
|
|
4882
4882
|
}
|
|
4883
4883
|
/**
|
|
4884
4884
|
* Creates a Size from the given number of gigabytes.
|
|
@@ -4887,7 +4887,7 @@ const P = class P extends Number {
|
|
|
4887
4887
|
* @returns A Size representing the given number of gigabytes.
|
|
4888
4888
|
*/
|
|
4889
4889
|
static gigabytes(e = 1) {
|
|
4890
|
-
return
|
|
4890
|
+
return $.megabytes(e.valueOf() * 1e3);
|
|
4891
4891
|
}
|
|
4892
4892
|
/**
|
|
4893
4893
|
* Creates a Size from the given number of terabytes.
|
|
@@ -4896,25 +4896,25 @@ const P = class P extends Number {
|
|
|
4896
4896
|
* @returns A Size representing the given number of terabytes.
|
|
4897
4897
|
*/
|
|
4898
4898
|
static terabytes(e) {
|
|
4899
|
-
return
|
|
4899
|
+
return $.gigabytes(e.valueOf() * 1e3);
|
|
4900
4900
|
}
|
|
4901
4901
|
get isZero() {
|
|
4902
4902
|
return this.valueOf() === 0;
|
|
4903
4903
|
}
|
|
4904
4904
|
};
|
|
4905
4905
|
/** A single byte */
|
|
4906
|
-
|
|
4907
|
-
|
|
4908
|
-
|
|
4909
|
-
|
|
4910
|
-
|
|
4911
|
-
|
|
4912
|
-
|
|
4913
|
-
g.number().transform((e) => new
|
|
4914
|
-
g.instanceof(
|
|
4906
|
+
h($, "BYTE", new $(1)), /** A kilobyte */
|
|
4907
|
+
h($, "KILOBYTE", $.kilobytes(1)), /** A megabyte */
|
|
4908
|
+
h($, "MEGABYTE", $.megabytes(1)), /** A gigabyte */
|
|
4909
|
+
h($, "GIGABYTE", $.gigabytes(1)), /** A terabyte. */
|
|
4910
|
+
h($, "TERABYTE", $.terabytes(1)), /** The zero value for Size */
|
|
4911
|
+
h($, "ZERO", new $(0)), /** A zod schema for a Size. */
|
|
4912
|
+
h($, "z", g.union([
|
|
4913
|
+
g.number().transform((e) => new $(e)),
|
|
4914
|
+
g.instanceof($)
|
|
4915
4915
|
]));
|
|
4916
|
-
let Ar =
|
|
4917
|
-
const
|
|
4916
|
+
let Ar = $;
|
|
4917
|
+
const Wu = g.union([
|
|
4918
4918
|
g.instanceof(Uint8Array),
|
|
4919
4919
|
g.instanceof(Uint16Array),
|
|
4920
4920
|
g.instanceof(Uint32Array),
|
|
@@ -4928,35 +4928,35 @@ const Du = g.union([
|
|
|
4928
4928
|
]), oi = (t) => {
|
|
4929
4929
|
const e = typeof t;
|
|
4930
4930
|
return e === "string" || e === "number" || e === "boolean" || e === "bigint" || t instanceof ne || t instanceof se || t instanceof Date;
|
|
4931
|
-
}, Dc = (t, e, r, n = 0) => t.usesBigInt && !e.usesBigInt ? Number(r) - Number(n) : !t.usesBigInt && e.usesBigInt ? BigInt(r) - BigInt(n) :
|
|
4931
|
+
}, Dc = (t, e, r, n = 0) => t.usesBigInt && !e.usesBigInt ? Number(r) - Number(n) : !t.usesBigInt && e.usesBigInt ? BigInt(r) - BigInt(n) : It(r, -n), Vc = (t) => t == null ? !1 : Array.isArray(t) || t instanceof ArrayBuffer || ArrayBuffer.isView(t) && !(t instanceof DataView) || t instanceof ke ? !0 : oi(t), ut = -1;
|
|
4932
4932
|
class ke {
|
|
4933
4933
|
constructor(e) {
|
|
4934
|
-
|
|
4934
|
+
h(this, "key", "");
|
|
4935
4935
|
/** The data type of the array */
|
|
4936
|
-
|
|
4936
|
+
h(this, "dataType");
|
|
4937
4937
|
/**
|
|
4938
4938
|
* A sample offset that can be used to shift the values of all samples upwards or
|
|
4939
4939
|
* downwards. Typically used to convert arrays to lower precision while preserving
|
|
4940
4940
|
* the relative range of actual values.
|
|
4941
4941
|
*/
|
|
4942
|
-
|
|
4942
|
+
h(this, "sampleOffset");
|
|
4943
4943
|
/**
|
|
4944
4944
|
* Stores information about the buffer state of this array into a WebGL buffer.
|
|
4945
4945
|
*/
|
|
4946
|
-
|
|
4946
|
+
h(this, "gl");
|
|
4947
4947
|
/** The underlying data. */
|
|
4948
|
-
|
|
4949
|
-
|
|
4950
|
-
|
|
4948
|
+
h(this, "_data");
|
|
4949
|
+
h(this, "_timeRange");
|
|
4950
|
+
h(this, "alignment", 0);
|
|
4951
4951
|
/** A cached minimum value. */
|
|
4952
|
-
|
|
4952
|
+
h(this, "_cachedMin");
|
|
4953
4953
|
/** A cached maximum value. */
|
|
4954
|
-
|
|
4954
|
+
h(this, "_cachedMax");
|
|
4955
4955
|
/** The write position of the buffer. */
|
|
4956
|
-
|
|
4956
|
+
h(this, "writePos", ut);
|
|
4957
4957
|
/** Tracks the number of entities currently using this array. */
|
|
4958
|
-
|
|
4959
|
-
|
|
4958
|
+
h(this, "_refCount", 0);
|
|
4959
|
+
h(this, "_cachedLength");
|
|
4960
4960
|
Vc(e) && (e = { data: e });
|
|
4961
4961
|
const {
|
|
4962
4962
|
dataType: r,
|
|
@@ -4970,17 +4970,17 @@ class ke {
|
|
|
4970
4970
|
this.key = l.key, this.dataType = l.dataType, this.sampleOffset = l.sampleOffset, this.gl = l.gl, this._data = l._data, this._timeRange = l._timeRange, this.alignment = l.alignment, this._cachedMin = l._cachedMin, this._cachedMax = l._cachedMax, this.writePos = l.writePos, this._refCount = l._refCount, this._cachedLength = l._cachedLength;
|
|
4971
4971
|
return;
|
|
4972
4972
|
}
|
|
4973
|
-
const
|
|
4973
|
+
const p = oi(l), b = Array.isArray(l);
|
|
4974
4974
|
if (r != null)
|
|
4975
|
-
this.dataType = new
|
|
4975
|
+
this.dataType = new q(r);
|
|
4976
4976
|
else {
|
|
4977
4977
|
if (l instanceof ArrayBuffer)
|
|
4978
4978
|
throw new Error(
|
|
4979
4979
|
"cannot infer data type from an ArrayBuffer instance when constructing a Series. Please provide a data type."
|
|
4980
4980
|
);
|
|
4981
|
-
if (b ||
|
|
4981
|
+
if (b || p) {
|
|
4982
4982
|
let k = l;
|
|
4983
|
-
if (!
|
|
4983
|
+
if (!p) {
|
|
4984
4984
|
if (l.length === 0)
|
|
4985
4985
|
throw new Error(
|
|
4986
4986
|
"cannot infer data type from a zero length JS array when constructing a Series. Please provide a data type."
|
|
@@ -4988,33 +4988,33 @@ class ke {
|
|
|
4988
4988
|
k = l[0];
|
|
4989
4989
|
}
|
|
4990
4990
|
if (typeof k == "string")
|
|
4991
|
-
this.dataType =
|
|
4991
|
+
this.dataType = q.STRING;
|
|
4992
4992
|
else if (typeof k == "number")
|
|
4993
|
-
this.dataType =
|
|
4993
|
+
this.dataType = q.FLOAT64;
|
|
4994
4994
|
else if (typeof k == "bigint")
|
|
4995
|
-
this.dataType =
|
|
4995
|
+
this.dataType = q.INT64;
|
|
4996
4996
|
else if (typeof k == "boolean")
|
|
4997
|
-
this.dataType =
|
|
4997
|
+
this.dataType = q.BOOLEAN;
|
|
4998
4998
|
else if (k instanceof ne || k instanceof Date || k instanceof ne)
|
|
4999
|
-
this.dataType =
|
|
4999
|
+
this.dataType = q.TIMESTAMP;
|
|
5000
5000
|
else if (typeof k == "object")
|
|
5001
|
-
this.dataType =
|
|
5001
|
+
this.dataType = q.JSON;
|
|
5002
5002
|
else
|
|
5003
5003
|
throw new Error(
|
|
5004
5004
|
`cannot infer data type of ${typeof k} when constructing a Series from a JS array`
|
|
5005
5005
|
);
|
|
5006
5006
|
} else
|
|
5007
|
-
this.dataType = new
|
|
5007
|
+
this.dataType = new q(l);
|
|
5008
5008
|
}
|
|
5009
|
-
if (!b && !
|
|
5009
|
+
if (!b && !p)
|
|
5010
5010
|
this._data = l;
|
|
5011
5011
|
else {
|
|
5012
|
-
let k =
|
|
5012
|
+
let k = p ? [l] : l;
|
|
5013
5013
|
const ee = k[0];
|
|
5014
|
-
(ee instanceof ne || ee instanceof Date || ee instanceof se) && (k = k.map((
|
|
5014
|
+
(ee instanceof ne || ee instanceof Date || ee instanceof se) && (k = k.map((Y) => new ne(Y).valueOf())), this.dataType.equals(q.STRING) ? (this._cachedLength = k.length, this._data = new TextEncoder().encode(k.join(`
|
|
5015
5015
|
`) + `
|
|
5016
|
-
`)) : this.dataType.equals(
|
|
5017
|
-
k.map((
|
|
5016
|
+
`)) : this.dataType.equals(q.JSON) ? (this._cachedLength = k.length, this._data = new TextEncoder().encode(
|
|
5017
|
+
k.map((Y) => JSON.stringify(Y)).join(`
|
|
5018
5018
|
`) + `
|
|
5019
5019
|
`
|
|
5020
5020
|
)) : this._data = new this.dataType.Array(k).buffer;
|
|
@@ -5029,7 +5029,7 @@ class ke {
|
|
|
5029
5029
|
static alloc({ capacity: e, dataType: r, ...n }) {
|
|
5030
5030
|
if (e === 0)
|
|
5031
5031
|
throw new Error("[Series] - cannot allocate an array of length 0");
|
|
5032
|
-
const s = new new
|
|
5032
|
+
const s = new new q(r).Array(e), i = new ke({
|
|
5033
5033
|
data: s.buffer,
|
|
5034
5034
|
dataType: r,
|
|
5035
5035
|
...n
|
|
@@ -5040,7 +5040,7 @@ class ke {
|
|
|
5040
5040
|
const s = n.spanRange(r.span(e)), i = new BigInt64Array(e);
|
|
5041
5041
|
for (let a = 0; a < e; a++)
|
|
5042
5042
|
i[a] = BigInt(n.add(r.span(a)).valueOf());
|
|
5043
|
-
return new ke({ data: i, dataType:
|
|
5043
|
+
return new ke({ data: i, dataType: q.TIMESTAMP, timeRange: s });
|
|
5044
5044
|
}
|
|
5045
5045
|
get refCount() {
|
|
5046
5046
|
return this._refCount;
|
|
@@ -5049,7 +5049,7 @@ class ke {
|
|
|
5049
5049
|
const n = new TextEncoder().encode(e.join(`
|
|
5050
5050
|
`) + `
|
|
5051
5051
|
`);
|
|
5052
|
-
return new ke({ data: n, dataType:
|
|
5052
|
+
return new ke({ data: n, dataType: q.STRING, timeRange: r });
|
|
5053
5053
|
}
|
|
5054
5054
|
static fromJSON(e, r) {
|
|
5055
5055
|
const n = new TextEncoder().encode(
|
|
@@ -5057,7 +5057,7 @@ class ke {
|
|
|
5057
5057
|
`) + `
|
|
5058
5058
|
`
|
|
5059
5059
|
);
|
|
5060
|
-
return new ke({ data: n, dataType:
|
|
5060
|
+
return new ke({ data: n, dataType: q.JSON, timeRange: r });
|
|
5061
5061
|
}
|
|
5062
5062
|
acquire(e) {
|
|
5063
5063
|
this._refCount++, e != null && this.updateGLBuffer(e);
|
|
@@ -5096,15 +5096,15 @@ class ke {
|
|
|
5096
5096
|
return this.writePos === ut ? this.underlyingData : new this.dataType.Array(this._data, 0, this.writePos);
|
|
5097
5097
|
}
|
|
5098
5098
|
toStrings() {
|
|
5099
|
-
if (!this.dataType.equals(
|
|
5099
|
+
if (!this.dataType.equals(q.STRING))
|
|
5100
5100
|
throw new Error("cannot convert non-string series to strings");
|
|
5101
5101
|
return new TextDecoder().decode(this.buffer).split(`
|
|
5102
5102
|
`).slice(0, -1);
|
|
5103
5103
|
}
|
|
5104
5104
|
toUUIDs() {
|
|
5105
|
-
if (!this.dataType.equals(
|
|
5105
|
+
if (!this.dataType.equals(q.UUID))
|
|
5106
5106
|
throw new Error("cannot convert non-uuid series to uuids");
|
|
5107
|
-
const e =
|
|
5107
|
+
const e = q.UUID.density.valueOf(), r = Array(this.length);
|
|
5108
5108
|
for (let n = 0; n < this.length; n++) {
|
|
5109
5109
|
const s = this.buffer.slice(n * e, (n + 1) * e), i = Array.from(new Uint8Array(s), (a) => a.toString(16).padStart(2, "0")).join("").replace(/(.{8})(.{4})(.{4})(.{4})(.{12})/, "$1-$2-$3-$4-$5");
|
|
5110
5110
|
r[n] = i;
|
|
@@ -5112,7 +5112,7 @@ class ke {
|
|
|
5112
5112
|
return r;
|
|
5113
5113
|
}
|
|
5114
5114
|
parseJSON(e) {
|
|
5115
|
-
if (!this.dataType.equals(
|
|
5115
|
+
if (!this.dataType.equals(q.JSON))
|
|
5116
5116
|
throw new Error("cannot convert non-string series to strings");
|
|
5117
5117
|
return new TextDecoder().decode(this.buffer).split(`
|
|
5118
5118
|
`).slice(0, -1).map((r) => e.parse(JSON.parse(r)));
|
|
@@ -5140,6 +5140,8 @@ class ke {
|
|
|
5140
5140
|
return this._cachedLength != null ? this._cachedLength : this.dataType.isVariable ? this.calculateCachedLength() : this.writePos === ut ? this.data.length : this.writePos;
|
|
5141
5141
|
}
|
|
5142
5142
|
calculateCachedLength() {
|
|
5143
|
+
if (!this.dataType.isVariable)
|
|
5144
|
+
throw new Error("cannot calculate length of a non-variable length data type");
|
|
5143
5145
|
let e = 0;
|
|
5144
5146
|
return this.data.forEach((r) => {
|
|
5145
5147
|
r === 10 && e++;
|
|
@@ -5172,7 +5174,7 @@ class ke {
|
|
|
5172
5174
|
calcRawMax() {
|
|
5173
5175
|
if (this.length === 0)
|
|
5174
5176
|
return -1 / 0;
|
|
5175
|
-
if (this.dataType.equals(
|
|
5177
|
+
if (this.dataType.equals(q.TIMESTAMP))
|
|
5176
5178
|
this._cachedMax = this.data[this.data.length - 1];
|
|
5177
5179
|
else if (this.dataType.usesBigInt) {
|
|
5178
5180
|
const e = this.data;
|
|
@@ -5187,12 +5189,12 @@ class ke {
|
|
|
5187
5189
|
get max() {
|
|
5188
5190
|
if (this.dataType.isVariable)
|
|
5189
5191
|
throw new Error("cannot calculate maximum on a variable length data type");
|
|
5190
|
-
return this.writePos === 0 ? -1 / 0 : (this._cachedMax == null && (this._cachedMax = this.calcRawMax()),
|
|
5192
|
+
return this.writePos === 0 ? -1 / 0 : (this._cachedMax == null && (this._cachedMax = this.calcRawMax()), It(this._cachedMax, this.sampleOffset));
|
|
5191
5193
|
}
|
|
5192
5194
|
calcRawMin() {
|
|
5193
5195
|
if (this.length === 0)
|
|
5194
5196
|
return 1 / 0;
|
|
5195
|
-
if (this.dataType.equals(
|
|
5197
|
+
if (this.dataType.equals(q.TIMESTAMP))
|
|
5196
5198
|
this._cachedMin = this.data[0];
|
|
5197
5199
|
else if (this.dataType.usesBigInt) {
|
|
5198
5200
|
const e = this.data;
|
|
@@ -5207,11 +5209,11 @@ class ke {
|
|
|
5207
5209
|
get min() {
|
|
5208
5210
|
if (this.dataType.isVariable)
|
|
5209
5211
|
throw new Error("cannot calculate minimum on a variable length data type");
|
|
5210
|
-
return this.writePos === 0 ? 1 / 0 : (this._cachedMin == null && (this._cachedMin = this.calcRawMin()),
|
|
5212
|
+
return this.writePos === 0 ? 1 / 0 : (this._cachedMin == null && (this._cachedMin = this.calcRawMin()), It(this._cachedMin, this.sampleOffset));
|
|
5211
5213
|
}
|
|
5212
5214
|
/** @returns the bounds of this array. */
|
|
5213
5215
|
get bounds() {
|
|
5214
|
-
return
|
|
5216
|
+
return W(Number(this.min), Number(this.max));
|
|
5215
5217
|
}
|
|
5216
5218
|
maybeRecomputeMinMax(e) {
|
|
5217
5219
|
if (this._cachedMin != null) {
|
|
@@ -5227,9 +5229,11 @@ class ke {
|
|
|
5227
5229
|
this.max, this.min;
|
|
5228
5230
|
}
|
|
5229
5231
|
get range() {
|
|
5230
|
-
return
|
|
5232
|
+
return It(this.max, -this.min);
|
|
5231
5233
|
}
|
|
5232
5234
|
at(e, r) {
|
|
5235
|
+
if (this.dataType.isVariable)
|
|
5236
|
+
return this.atVariable(e, r ?? !1);
|
|
5233
5237
|
e < 0 && (e = this.length + e);
|
|
5234
5238
|
const n = this.data[e];
|
|
5235
5239
|
if (n == null) {
|
|
@@ -5237,7 +5241,26 @@ class ke {
|
|
|
5237
5241
|
throw new Error(`[series] - no value at index ${e}`);
|
|
5238
5242
|
return;
|
|
5239
5243
|
}
|
|
5240
|
-
return
|
|
5244
|
+
return It(n, this.sampleOffset);
|
|
5245
|
+
}
|
|
5246
|
+
atVariable(e, r) {
|
|
5247
|
+
e < 0 && (e = this.length + e);
|
|
5248
|
+
let n = 0, s = 0;
|
|
5249
|
+
for (let a = 0; a < this.data.length; a++)
|
|
5250
|
+
if (this.data[a] === 10) {
|
|
5251
|
+
if (e === 0) {
|
|
5252
|
+
s = a;
|
|
5253
|
+
break;
|
|
5254
|
+
}
|
|
5255
|
+
n = a + 1, e--;
|
|
5256
|
+
}
|
|
5257
|
+
if (s === 0 && (s = this.data.length), n >= s || e > 0) {
|
|
5258
|
+
if (r)
|
|
5259
|
+
throw new Error(`[series] - no value at index ${e}`);
|
|
5260
|
+
return;
|
|
5261
|
+
}
|
|
5262
|
+
const i = this.data.slice(n, s);
|
|
5263
|
+
return this.dataType.equals(q.STRING) ? new TextDecoder().decode(i) : JSON.parse(new TextDecoder().decode(i));
|
|
5241
5264
|
}
|
|
5242
5265
|
/**
|
|
5243
5266
|
* @returns the index of the first sample that is greater than or equal to the given value.
|
|
@@ -5256,7 +5279,7 @@ class ke {
|
|
|
5256
5279
|
return r;
|
|
5257
5280
|
}
|
|
5258
5281
|
updateGLBuffer(e) {
|
|
5259
|
-
if (this.gl.control = e, !this.dataType.equals(
|
|
5282
|
+
if (this.gl.control = e, !this.dataType.equals(q.FLOAT32))
|
|
5260
5283
|
throw new Error("Only FLOAT32 arrays can be used in WebGL");
|
|
5261
5284
|
const { buffer: r, bufferUsage: n, prevBuffer: s } = this.gl;
|
|
5262
5285
|
if (r == null && (this.gl.buffer = e.createBuffer()), this.writePos !== s)
|
|
@@ -5271,6 +5294,13 @@ class ke {
|
|
|
5271
5294
|
n === "static" ? e.STATIC_DRAW : e.DYNAMIC_DRAW
|
|
5272
5295
|
), this.gl.prevBuffer = ut;
|
|
5273
5296
|
}
|
|
5297
|
+
as(e) {
|
|
5298
|
+
if (!new q(e).equals(this.dataType))
|
|
5299
|
+
throw new Error(
|
|
5300
|
+
`cannot convert series of type ${this.dataType.toString()} to ${e.toString()}`
|
|
5301
|
+
);
|
|
5302
|
+
return this;
|
|
5303
|
+
}
|
|
5274
5304
|
get digest() {
|
|
5275
5305
|
var e;
|
|
5276
5306
|
return {
|
|
@@ -5292,7 +5322,7 @@ class ke {
|
|
|
5292
5322
|
};
|
|
5293
5323
|
}
|
|
5294
5324
|
get alignmentBounds() {
|
|
5295
|
-
return
|
|
5325
|
+
return W(this.alignment, this.alignment + this.length);
|
|
5296
5326
|
}
|
|
5297
5327
|
maybeGarbageCollectGLBuffer(e) {
|
|
5298
5328
|
this.gl.buffer != null && (e.deleteBuffer(this.gl.buffer), this.gl.buffer = null, this.gl.prevBuffer = 0, this.gl.control = null);
|
|
@@ -5302,6 +5332,13 @@ class ke {
|
|
|
5302
5332
|
throw new Error("gl buffer not initialized");
|
|
5303
5333
|
return this.gl.prevBuffer !== this.writePos && console.warn("buffer not updated"), this.gl.buffer;
|
|
5304
5334
|
}
|
|
5335
|
+
[Symbol.iterator]() {
|
|
5336
|
+
if (this.dataType.isVariable) {
|
|
5337
|
+
const e = new zc(this);
|
|
5338
|
+
return this.dataType.equals(q.JSON) ? new qc(e) : e;
|
|
5339
|
+
}
|
|
5340
|
+
return new Yc(this);
|
|
5341
|
+
}
|
|
5305
5342
|
slice(e, r) {
|
|
5306
5343
|
if (e <= 0 && (r == null || r >= this.length))
|
|
5307
5344
|
return this;
|
|
@@ -5319,28 +5356,155 @@ class ke {
|
|
|
5319
5356
|
return new ke({
|
|
5320
5357
|
data: this.buffer,
|
|
5321
5358
|
dataType: this.dataType,
|
|
5322
|
-
timeRange:
|
|
5359
|
+
timeRange: Tt.ZERO,
|
|
5323
5360
|
sampleOffset: this.sampleOffset,
|
|
5324
5361
|
glBufferUsage: "static",
|
|
5325
5362
|
alignment: e
|
|
5326
5363
|
});
|
|
5327
5364
|
}
|
|
5328
5365
|
}
|
|
5329
|
-
|
|
5366
|
+
class zc {
|
|
5367
|
+
constructor(e) {
|
|
5368
|
+
h(this, "series");
|
|
5369
|
+
h(this, "index");
|
|
5370
|
+
h(this, "decoder");
|
|
5371
|
+
if (!e.dataType.isVariable)
|
|
5372
|
+
throw new Error(
|
|
5373
|
+
"cannot create a variable series iterator for a non-variable series"
|
|
5374
|
+
);
|
|
5375
|
+
this.series = e, this.index = 0, this.decoder = new TextDecoder();
|
|
5376
|
+
}
|
|
5377
|
+
next() {
|
|
5378
|
+
const e = this.index, r = this.series.data;
|
|
5379
|
+
for (; this.index < r.length && r[this.index] !== 10; )
|
|
5380
|
+
this.index++;
|
|
5381
|
+
const n = this.index;
|
|
5382
|
+
return e === n ? { done: !0, value: void 0 } : (this.index++, { done: !1, value: this.decoder.decode(this.series.buffer.slice(e, n)) });
|
|
5383
|
+
}
|
|
5384
|
+
[Symbol.iterator]() {
|
|
5385
|
+
return this;
|
|
5386
|
+
}
|
|
5387
|
+
}
|
|
5388
|
+
var Ru;
|
|
5389
|
+
class qc {
|
|
5390
|
+
constructor(e) {
|
|
5391
|
+
h(this, "wrapped");
|
|
5392
|
+
h(this, Ru, "JSONSeriesIterator");
|
|
5393
|
+
this.wrapped = e;
|
|
5394
|
+
}
|
|
5395
|
+
next() {
|
|
5396
|
+
const e = this.wrapped.next();
|
|
5397
|
+
return e.done === !0 ? { done: !0, value: void 0 } : { done: !1, value: JSON.parse(e.value) };
|
|
5398
|
+
}
|
|
5399
|
+
[Symbol.iterator]() {
|
|
5400
|
+
return this;
|
|
5401
|
+
}
|
|
5402
|
+
}
|
|
5403
|
+
Ru = Symbol.toStringTag;
|
|
5404
|
+
var ju;
|
|
5405
|
+
class Yc {
|
|
5406
|
+
constructor(e) {
|
|
5407
|
+
h(this, "series");
|
|
5408
|
+
h(this, "index");
|
|
5409
|
+
h(this, ju, "SeriesIterator");
|
|
5410
|
+
this.series = e, this.index = 0;
|
|
5411
|
+
}
|
|
5412
|
+
next() {
|
|
5413
|
+
return this.index >= this.series.length ? { done: !0, value: void 0 } : {
|
|
5414
|
+
done: !1,
|
|
5415
|
+
value: this.series.at(this.index++, !0)
|
|
5416
|
+
};
|
|
5417
|
+
}
|
|
5418
|
+
[Symbol.iterator]() {
|
|
5419
|
+
return this;
|
|
5420
|
+
}
|
|
5421
|
+
}
|
|
5422
|
+
ju = Symbol.toStringTag;
|
|
5423
|
+
const It = (t, e) => typeof t == "bigint" && typeof e == "bigint" || typeof t == "number" && typeof e == "number" ? t + e : Number(t) + Number(e);
|
|
5424
|
+
class Gu {
|
|
5425
|
+
constructor(e) {
|
|
5426
|
+
h(this, "series");
|
|
5427
|
+
if (e.length !== 0) {
|
|
5428
|
+
const r = e[0].dataType;
|
|
5429
|
+
for (let n = 1; n < e.length; n++)
|
|
5430
|
+
if (!e[n].dataType.equals(r))
|
|
5431
|
+
throw new Error("[multi-series] - series must have the same data type");
|
|
5432
|
+
}
|
|
5433
|
+
this.series = e;
|
|
5434
|
+
}
|
|
5435
|
+
as(e) {
|
|
5436
|
+
if (!new q(e).equals(this.dataType))
|
|
5437
|
+
throw new Error(
|
|
5438
|
+
`cannot convert series of type ${this.dataType.toString()} to ${e.toString()}`
|
|
5439
|
+
);
|
|
5440
|
+
return this;
|
|
5441
|
+
}
|
|
5442
|
+
get dataType() {
|
|
5443
|
+
return this.series.length === 0 ? q.UNKNOWN : this.series[0].dataType;
|
|
5444
|
+
}
|
|
5445
|
+
get timeRange() {
|
|
5446
|
+
return this.series.length === 0 ? Tt.ZERO : new Tt(
|
|
5447
|
+
this.series[0].timeRange.start,
|
|
5448
|
+
this.series[this.series.length - 1].timeRange.end
|
|
5449
|
+
);
|
|
5450
|
+
}
|
|
5451
|
+
push(e) {
|
|
5452
|
+
this.series.push(e);
|
|
5453
|
+
}
|
|
5454
|
+
get length() {
|
|
5455
|
+
return this.series.reduce((e, r) => e + r.length, 0);
|
|
5456
|
+
}
|
|
5457
|
+
at(e, r = !1) {
|
|
5458
|
+
e < 0 && (e = this.length + e);
|
|
5459
|
+
for (const n of this.series) {
|
|
5460
|
+
if (e < n.length)
|
|
5461
|
+
return n.at(e, r);
|
|
5462
|
+
e -= n.length;
|
|
5463
|
+
}
|
|
5464
|
+
if (r)
|
|
5465
|
+
throw new Error(`[series] - no value at index ${e}`);
|
|
5466
|
+
}
|
|
5467
|
+
[Symbol.iterator]() {
|
|
5468
|
+
return this.series.length === 0 ? {
|
|
5469
|
+
next() {
|
|
5470
|
+
return { done: !0, value: void 0 };
|
|
5471
|
+
}
|
|
5472
|
+
} : new Fc(this.series);
|
|
5473
|
+
}
|
|
5474
|
+
}
|
|
5475
|
+
var Bu;
|
|
5476
|
+
class Fc {
|
|
5477
|
+
constructor(e) {
|
|
5478
|
+
h(this, "series");
|
|
5479
|
+
h(this, "seriesIndex");
|
|
5480
|
+
h(this, "internal");
|
|
5481
|
+
h(this, Bu, "MultiSeriesIterator");
|
|
5482
|
+
this.series = e, this.seriesIndex = 0, this.internal = e[0][Symbol.iterator]();
|
|
5483
|
+
}
|
|
5484
|
+
next() {
|
|
5485
|
+
const e = this.internal.next();
|
|
5486
|
+
return e.done === !1 ? e : this.seriesIndex === this.series.length - 1 ? { done: !0, value: void 0 } : (this.internal = this.series[++this.seriesIndex][Symbol.iterator](), this.next());
|
|
5487
|
+
}
|
|
5488
|
+
[Symbol.iterator]() {
|
|
5489
|
+
return this;
|
|
5490
|
+
}
|
|
5491
|
+
}
|
|
5492
|
+
Bu = Symbol.toStringTag;
|
|
5493
|
+
const Ju = g.record(
|
|
5330
5494
|
g.union([g.number(), g.string(), g.symbol()]),
|
|
5331
5495
|
g.unknown()
|
|
5332
|
-
),
|
|
5496
|
+
), Hu = (t) => Object.entries(t), Xu = (t) => {
|
|
5333
5497
|
if (t === void 0 || typeof t == "string" || typeof t == "number")
|
|
5334
5498
|
return t;
|
|
5335
5499
|
if (t.toString === void 0)
|
|
5336
5500
|
throw new Error("invalid renderer");
|
|
5337
5501
|
return t.toString();
|
|
5338
|
-
},
|
|
5502
|
+
}, pr = (t) => t != null && typeof t == "object" && !Array.isArray(t), ci = () => (
|
|
5339
5503
|
// eslint-disable-next-line @typescript-eslint/prefer-optional-chain
|
|
5340
5504
|
typeof process < "u" && process.versions != null && process.versions.node != null ? "node" : typeof window > "u" || window.document === void 0 ? "webworker" : "browser"
|
|
5341
|
-
),
|
|
5342
|
-
let
|
|
5343
|
-
const
|
|
5505
|
+
), Kc = ci(), ui = ["MacOS", "Windows", "Linux", "Docker"], Wc = g.enum(ui);
|
|
5506
|
+
let Qt;
|
|
5507
|
+
const Gc = () => {
|
|
5344
5508
|
if (typeof window > "u")
|
|
5345
5509
|
return;
|
|
5346
5510
|
const t = window.navigator.userAgent.toLowerCase();
|
|
@@ -5350,17 +5514,17 @@ const Yc = () => {
|
|
|
5350
5514
|
return "Windows";
|
|
5351
5515
|
if (t.includes("linux"))
|
|
5352
5516
|
return "Linux";
|
|
5353
|
-
},
|
|
5517
|
+
}, Jc = (t = {}) => {
|
|
5354
5518
|
const { force: e, default: r } = t;
|
|
5355
|
-
return e ??
|
|
5356
|
-
},
|
|
5519
|
+
return e ?? Qt ?? (Qt = Gc(), Qt ?? r);
|
|
5520
|
+
}, Qu = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
5357
5521
|
__proto__: null,
|
|
5358
5522
|
OPERATING_SYSTEMS: ui,
|
|
5359
|
-
RUNTIME:
|
|
5523
|
+
RUNTIME: Kc,
|
|
5360
5524
|
detect: ci,
|
|
5361
|
-
getOS:
|
|
5362
|
-
osZ:
|
|
5363
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
5525
|
+
getOS: Jc,
|
|
5526
|
+
osZ: Wc
|
|
5527
|
+
}, Symbol.toStringTag, { value: "Module" })), Hc = (t) => JSON.parse(JSON.stringify(t)), Xc = (t, ...e) => (e.forEach((r) => {
|
|
5364
5528
|
let n = t;
|
|
5365
5529
|
const s = r.split(".");
|
|
5366
5530
|
s.forEach((i, a) => {
|
|
@@ -5381,7 +5545,7 @@ const Yc = () => {
|
|
|
5381
5545
|
s = a;
|
|
5382
5546
|
}
|
|
5383
5547
|
return s;
|
|
5384
|
-
},
|
|
5548
|
+
}, Qc = (t, e, r) => {
|
|
5385
5549
|
const n = e.split(".");
|
|
5386
5550
|
let s = t;
|
|
5387
5551
|
for (let i = 0; i < n.length - 1; i++) {
|
|
@@ -5391,10 +5555,10 @@ const Yc = () => {
|
|
|
5391
5555
|
s = s[a];
|
|
5392
5556
|
}
|
|
5393
5557
|
s[n[n.length - 1]] = r;
|
|
5394
|
-
},
|
|
5558
|
+
}, eu = (t, e) => {
|
|
5395
5559
|
const r = t.split(".");
|
|
5396
5560
|
return e < 0 ? r[r.length + e] : r[e];
|
|
5397
|
-
},
|
|
5561
|
+
}, tu = (t) => t.join("."), ru = (t, e) => {
|
|
5398
5562
|
try {
|
|
5399
5563
|
return li(t, e), !0;
|
|
5400
5564
|
} catch {
|
|
@@ -5404,10 +5568,10 @@ const Yc = () => {
|
|
|
5404
5568
|
if (e.length === 0)
|
|
5405
5569
|
return t;
|
|
5406
5570
|
const r = e.shift();
|
|
5407
|
-
if (
|
|
5571
|
+
if (pr(t) && pr(r))
|
|
5408
5572
|
for (const n in r)
|
|
5409
5573
|
try {
|
|
5410
|
-
|
|
5574
|
+
pr(r[n]) ? (n in t || Object.assign(t, { [n]: {} }), rn(t[n], r[n])) : Object.assign(t, { [n]: r[n] });
|
|
5411
5575
|
} catch (s) {
|
|
5412
5576
|
throw s instanceof TypeError ? new TypeError(`.${n}: ${s.message}`) : s;
|
|
5413
5577
|
}
|
|
@@ -5456,7 +5620,7 @@ const Yc = () => {
|
|
|
5456
5620
|
return !1;
|
|
5457
5621
|
}
|
|
5458
5622
|
return !0;
|
|
5459
|
-
},
|
|
5623
|
+
}, nu = (t) => {
|
|
5460
5624
|
let e, r;
|
|
5461
5625
|
return (...s) => {
|
|
5462
5626
|
if (Ir(e, s))
|
|
@@ -5464,7 +5628,7 @@ const Yc = () => {
|
|
|
5464
5628
|
const i = t(...s);
|
|
5465
5629
|
return e = s, r = i, i;
|
|
5466
5630
|
};
|
|
5467
|
-
},
|
|
5631
|
+
}, su = (t, e, r = "") => {
|
|
5468
5632
|
const n = {}, s = (i, a, o) => {
|
|
5469
5633
|
if (typeof i != typeof a || i === null || a === null) {
|
|
5470
5634
|
n[o] = [i, a];
|
|
@@ -5479,44 +5643,44 @@ const Yc = () => {
|
|
|
5479
5643
|
for (let l = 0; l < i.length; l++)
|
|
5480
5644
|
s(i[l], a[l], `${o}[${l}]`);
|
|
5481
5645
|
} else
|
|
5482
|
-
(/* @__PURE__ */ new Set([...Object.keys(i), ...Object.keys(a)])).forEach((
|
|
5483
|
-
s(i[
|
|
5646
|
+
(/* @__PURE__ */ new Set([...Object.keys(i), ...Object.keys(a)])).forEach((p) => {
|
|
5647
|
+
s(i[p], a[p], o ? `${o}.${p}` : p);
|
|
5484
5648
|
});
|
|
5485
5649
|
else
|
|
5486
5650
|
i !== a && (n[o] = [i, a]);
|
|
5487
5651
|
};
|
|
5488
5652
|
return s(t, e, r), n;
|
|
5489
|
-
},
|
|
5653
|
+
}, el = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
5490
5654
|
__proto__: null,
|
|
5491
|
-
copy:
|
|
5492
|
-
deleteD:
|
|
5493
|
-
difference:
|
|
5494
|
-
element:
|
|
5655
|
+
copy: Hc,
|
|
5656
|
+
deleteD: Xc,
|
|
5657
|
+
difference: su,
|
|
5658
|
+
element: eu,
|
|
5495
5659
|
equal: Ir,
|
|
5496
5660
|
get: li,
|
|
5497
|
-
has:
|
|
5498
|
-
join:
|
|
5499
|
-
memo:
|
|
5661
|
+
has: ru,
|
|
5662
|
+
join: tu,
|
|
5663
|
+
memo: nu,
|
|
5500
5664
|
merge: rn,
|
|
5501
5665
|
partialEqual: fi,
|
|
5502
|
-
set:
|
|
5503
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
5666
|
+
set: Qc
|
|
5667
|
+
}, Symbol.toStringTag, { value: "Module" })), tl = (t, e) => {
|
|
5504
5668
|
let r = null;
|
|
5505
5669
|
return e === 0 ? t : (...s) => {
|
|
5506
5670
|
r !== null && (clearTimeout(r), r = null), r = setTimeout(() => t(...s), e);
|
|
5507
5671
|
};
|
|
5508
|
-
},
|
|
5672
|
+
}, rl = (t, e) => {
|
|
5509
5673
|
let r = null;
|
|
5510
5674
|
return e === 0 ? t : (...s) => {
|
|
5511
5675
|
r === null && (r = setTimeout(() => {
|
|
5512
5676
|
t(...s), r = null;
|
|
5513
5677
|
}, e));
|
|
5514
5678
|
};
|
|
5515
|
-
},
|
|
5679
|
+
}, nl = (t) => [...new Set(t)], sl = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
5516
5680
|
__proto__: null
|
|
5517
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
5681
|
+
}, Symbol.toStringTag, { value: "Module" })), iu = (...t) => t.map(di).join(""), di = (t) => (t.endsWith("/") || (t += "/"), t.startsWith("/") && (t = t.slice(1)), t), au = (t) => t.endsWith("/") ? t.slice(0, -1) : t, il = (t, e = "") => t === null ? "" : "?" + Object.entries(t).filter(([, r]) => r == null ? !1 : Array.isArray(r) ? r.length > 0 : !0).map(([r, n]) => `${e}${r}=${n}`).join("&");
|
|
5518
5682
|
var tt;
|
|
5519
|
-
let
|
|
5683
|
+
let al = (tt = class {
|
|
5520
5684
|
/**
|
|
5521
5685
|
* @param host - The hostname or IP address of the server.
|
|
5522
5686
|
* @param port - The port number of the server.
|
|
@@ -5524,10 +5688,10 @@ let Xu = (tt = class {
|
|
|
5524
5688
|
* @param pathPrefix - A path prefix to use for all requests. Defaults to "".
|
|
5525
5689
|
*/
|
|
5526
5690
|
constructor({ host: e, port: r, protocol: n = "", pathPrefix: s = "" }) {
|
|
5527
|
-
|
|
5528
|
-
|
|
5529
|
-
|
|
5530
|
-
|
|
5691
|
+
h(this, "protocol");
|
|
5692
|
+
h(this, "host");
|
|
5693
|
+
h(this, "port");
|
|
5694
|
+
h(this, "path");
|
|
5531
5695
|
this.protocol = n, this.host = e, this.port = r, this.path = di(s);
|
|
5532
5696
|
}
|
|
5533
5697
|
/**
|
|
@@ -5551,17 +5715,17 @@ let Xu = (tt = class {
|
|
|
5551
5715
|
child(e) {
|
|
5552
5716
|
return new tt({
|
|
5553
5717
|
...this,
|
|
5554
|
-
pathPrefix:
|
|
5718
|
+
pathPrefix: iu(this.path, e)
|
|
5555
5719
|
});
|
|
5556
5720
|
}
|
|
5557
5721
|
/** @returns a string representation of the url */
|
|
5558
5722
|
toString() {
|
|
5559
|
-
return
|
|
5723
|
+
return au(
|
|
5560
5724
|
`${this.protocol}://${this.host}:${this.port}/${this.path}`
|
|
5561
5725
|
);
|
|
5562
5726
|
}
|
|
5563
|
-
},
|
|
5564
|
-
const
|
|
5727
|
+
}, h(tt, "UNKNOWN", new tt({ host: "unknown", port: 0 })), tt);
|
|
5728
|
+
const ol = (t) => Array.isArray(t) ? t : [t], cl = (t) => Array.isArray(t) ? t : t === null ? [] : [t], ou = (t, e, r) => {
|
|
5565
5729
|
let n = 0, s = t.length - 1;
|
|
5566
5730
|
for (; n <= s; ) {
|
|
5567
5731
|
const i = Math.floor((n + s) / 2), a = r(t[i], e);
|
|
@@ -5570,13 +5734,13 @@ const Qu = (t) => Array.isArray(t) ? t : [t], el = (t) => Array.isArray(t) ? t :
|
|
|
5570
5734
|
a < 0 ? n = i + 1 : s = i - 1;
|
|
5571
5735
|
}
|
|
5572
5736
|
return -1;
|
|
5573
|
-
},
|
|
5574
|
-
binary:
|
|
5737
|
+
}, ul = {
|
|
5738
|
+
binary: ou
|
|
5575
5739
|
};
|
|
5576
5740
|
class qn {
|
|
5577
5741
|
constructor(e) {
|
|
5578
|
-
|
|
5579
|
-
|
|
5742
|
+
h(this, "sender");
|
|
5743
|
+
h(this, "handlers");
|
|
5580
5744
|
this.sender = e, this.handlers = /* @__PURE__ */ new Map();
|
|
5581
5745
|
}
|
|
5582
5746
|
handle({ data: e }) {
|
|
@@ -5585,15 +5749,15 @@ class qn {
|
|
|
5585
5749
|
r == null ? console.warn(`No handler for ${e.type}`) : r(e.payload);
|
|
5586
5750
|
}
|
|
5587
5751
|
route(e) {
|
|
5588
|
-
const r =
|
|
5752
|
+
const r = cu(e, this.sender), n = new uu(r);
|
|
5589
5753
|
return this.handlers.set(e, n), n;
|
|
5590
5754
|
}
|
|
5591
5755
|
}
|
|
5592
|
-
const
|
|
5593
|
-
class
|
|
5756
|
+
const cu = (t, e) => (r, n) => e({ type: t, payload: r }, n);
|
|
5757
|
+
class uu {
|
|
5594
5758
|
constructor(e) {
|
|
5595
|
-
|
|
5596
|
-
|
|
5759
|
+
h(this, "_send");
|
|
5760
|
+
h(this, "handler");
|
|
5597
5761
|
this._send = e, this.handler = null;
|
|
5598
5762
|
}
|
|
5599
5763
|
send(e, r = []) {
|
|
@@ -5603,7 +5767,7 @@ class iu {
|
|
|
5603
5767
|
this.handler = e;
|
|
5604
5768
|
}
|
|
5605
5769
|
}
|
|
5606
|
-
const
|
|
5770
|
+
const ll = () => {
|
|
5607
5771
|
let t, e;
|
|
5608
5772
|
const r = (s, i) => {
|
|
5609
5773
|
e.handle({ data: s });
|
|
@@ -5617,7 +5781,7 @@ try {
|
|
|
5617
5781
|
nn = new TextDecoder();
|
|
5618
5782
|
} catch {
|
|
5619
5783
|
}
|
|
5620
|
-
var w, xe, c = 0,
|
|
5784
|
+
var w, xe, c = 0, H = {}, P, Je, me = 0, Ae = 0, oe, De, ye = [], L, Yn = {
|
|
5621
5785
|
useRecords: !1,
|
|
5622
5786
|
mapsAsObjects: !0
|
|
5623
5787
|
};
|
|
@@ -5631,26 +5795,26 @@ try {
|
|
|
5631
5795
|
} catch {
|
|
5632
5796
|
yi = 1 / 0;
|
|
5633
5797
|
}
|
|
5634
|
-
class
|
|
5798
|
+
class Wt {
|
|
5635
5799
|
constructor(e) {
|
|
5636
5800
|
e && (e.useRecords === !1 && e.mapsAsObjects === void 0 && (e.mapsAsObjects = !0), e.sequential && e.trusted !== !1 && (e.trusted = !0, !e.structures && e.useRecords != !1 && (e.structures = [], e.maxSharedStructures || (e.maxSharedStructures = 0))), e.structures ? e.structures.sharedLength = e.structures.length : e.getStructures && ((e.structures = []).uninitialized = !0, e.structures.sharedLength = 0), e.int64AsNumber && (e.int64AsType = "number")), Object.assign(this, e);
|
|
5637
5801
|
}
|
|
5638
5802
|
unpack(e, r) {
|
|
5639
5803
|
if (w)
|
|
5640
|
-
return wi(() => (an(), this ? this.unpack(e, r) :
|
|
5804
|
+
return wi(() => (an(), this ? this.unpack(e, r) : Wt.prototype.unpack.call(Yn, e, r)));
|
|
5641
5805
|
!e.buffer && e.constructor === ArrayBuffer && (e = typeof Buffer < "u" ? Buffer.from(e) : new Uint8Array(e)), typeof r == "object" ? (xe = r.end || e.length, c = r.start || 0) : (c = 0, xe = r > -1 ? r : e.length), Ae = 0, Je = null, oe = null, w = e;
|
|
5642
5806
|
try {
|
|
5643
5807
|
L = e.dataView || (e.dataView = new DataView(e.buffer, e.byteOffset, e.byteLength));
|
|
5644
5808
|
} catch (n) {
|
|
5645
5809
|
throw w = null, e instanceof Uint8Array ? n : new Error("Source must be a Uint8Array or Buffer but was a " + (e && typeof e == "object" ? e.constructor.name : typeof e));
|
|
5646
5810
|
}
|
|
5647
|
-
if (this instanceof
|
|
5648
|
-
if (
|
|
5649
|
-
return
|
|
5650
|
-
(
|
|
5811
|
+
if (this instanceof Wt) {
|
|
5812
|
+
if (H = this, this.structures)
|
|
5813
|
+
return P = this.structures, er(r);
|
|
5814
|
+
(!P || P.length > 0) && (P = []);
|
|
5651
5815
|
} else
|
|
5652
|
-
|
|
5653
|
-
return
|
|
5816
|
+
H = Yn, (!P || P.length > 0) && (P = []);
|
|
5817
|
+
return er(r);
|
|
5654
5818
|
}
|
|
5655
5819
|
unpackMultiple(e, r) {
|
|
5656
5820
|
let n, s = 0;
|
|
@@ -5661,11 +5825,11 @@ class Kt {
|
|
|
5661
5825
|
if (r(a, s, c) === !1)
|
|
5662
5826
|
return;
|
|
5663
5827
|
for (; c < i; )
|
|
5664
|
-
if (s = c, r(
|
|
5828
|
+
if (s = c, r(er(), s, c) === !1)
|
|
5665
5829
|
return;
|
|
5666
5830
|
} else {
|
|
5667
5831
|
for (n = [a]; c < i; )
|
|
5668
|
-
s = c, n.push(
|
|
5832
|
+
s = c, n.push(er());
|
|
5669
5833
|
return n;
|
|
5670
5834
|
}
|
|
5671
5835
|
} catch (i) {
|
|
@@ -5692,15 +5856,15 @@ class Kt {
|
|
|
5692
5856
|
return this.unpack(e, r);
|
|
5693
5857
|
}
|
|
5694
5858
|
}
|
|
5695
|
-
function
|
|
5859
|
+
function er(t) {
|
|
5696
5860
|
try {
|
|
5697
|
-
if (!
|
|
5698
|
-
let r =
|
|
5699
|
-
r <
|
|
5861
|
+
if (!H.trusted && !et) {
|
|
5862
|
+
let r = P.sharedLength || 0;
|
|
5863
|
+
r < P.length && (P.length = r);
|
|
5700
5864
|
}
|
|
5701
5865
|
let e;
|
|
5702
|
-
if (
|
|
5703
|
-
|
|
5866
|
+
if (H.randomAccessStructure && w[c] < 64 && w[c] >= 32 && Fn ? (e = Fn(w, c, xe, H), w = null, !(t && t.lazy) && e && (e = e.toJSON()), c = xe) : e = re(), oe && (c = oe.postBundlePosition, oe = null), et && (P.restoreStructures = null), c == xe)
|
|
5867
|
+
P && P.restoreStructures && Kn(), P = null, w = null, De && (De = null);
|
|
5704
5868
|
else {
|
|
5705
5869
|
if (c > xe)
|
|
5706
5870
|
throw new Error("Unexpected end of MessagePack data");
|
|
@@ -5716,13 +5880,13 @@ function Qt(t) {
|
|
|
5716
5880
|
}
|
|
5717
5881
|
return e;
|
|
5718
5882
|
} catch (e) {
|
|
5719
|
-
throw
|
|
5883
|
+
throw P && P.restoreStructures && Kn(), an(), (e instanceof RangeError || e.message.startsWith("Unexpected end of buffer") || c > xe) && (e.incomplete = !0), e;
|
|
5720
5884
|
}
|
|
5721
5885
|
}
|
|
5722
5886
|
function Kn() {
|
|
5723
|
-
for (let t in
|
|
5724
|
-
|
|
5725
|
-
|
|
5887
|
+
for (let t in P.restoreStructures)
|
|
5888
|
+
P[t] = P.restoreStructures[t];
|
|
5889
|
+
P.restoreStructures = null;
|
|
5726
5890
|
}
|
|
5727
5891
|
function re() {
|
|
5728
5892
|
let t = w[c++];
|
|
@@ -5731,11 +5895,11 @@ function re() {
|
|
|
5731
5895
|
if (t < 64)
|
|
5732
5896
|
return t;
|
|
5733
5897
|
{
|
|
5734
|
-
let e =
|
|
5898
|
+
let e = P[t & 63] || H.getStructures && gi()[t & 63];
|
|
5735
5899
|
return e ? (e.read || (e.read = Mn(e, t & 63)), e.read()) : t;
|
|
5736
5900
|
}
|
|
5737
5901
|
} else if (t < 144)
|
|
5738
|
-
if (t -= 128,
|
|
5902
|
+
if (t -= 128, H.mapsAsObjects) {
|
|
5739
5903
|
let e = {};
|
|
5740
5904
|
for (let r = 0; r < t; r++) {
|
|
5741
5905
|
let n = xi();
|
|
@@ -5753,14 +5917,14 @@ function re() {
|
|
|
5753
5917
|
let e = new Array(t);
|
|
5754
5918
|
for (let r = 0; r < t; r++)
|
|
5755
5919
|
e[r] = re();
|
|
5756
|
-
return
|
|
5920
|
+
return H.freezeData ? Object.freeze(e) : e;
|
|
5757
5921
|
}
|
|
5758
5922
|
else if (t < 192) {
|
|
5759
5923
|
let e = t - 160;
|
|
5760
5924
|
if (Ae >= c)
|
|
5761
5925
|
return Je.slice(c - me, (c += e) - me);
|
|
5762
5926
|
if (Ae == 0 && xe < 140) {
|
|
5763
|
-
let r = e < 16 ?
|
|
5927
|
+
let r = e < 16 ? Rn(e) : mi(e);
|
|
5764
5928
|
if (r != null)
|
|
5765
5929
|
return r;
|
|
5766
5930
|
}
|
|
@@ -5791,8 +5955,8 @@ function re() {
|
|
|
5791
5955
|
case 201:
|
|
5792
5956
|
return e = L.getUint32(c), c += 4, lt(e);
|
|
5793
5957
|
case 202:
|
|
5794
|
-
if (e = L.getFloat32(c),
|
|
5795
|
-
let r =
|
|
5958
|
+
if (e = L.getFloat32(c), H.useFloat32 > 2) {
|
|
5959
|
+
let r = jn[(w[c] & 127) << 1 | w[c + 1] >> 7];
|
|
5796
5960
|
return c += 4, (r * e + (e > 0 ? 0.5 : -0.5) >> 0) / r;
|
|
5797
5961
|
}
|
|
5798
5962
|
return c += 4, e;
|
|
@@ -5805,7 +5969,7 @@ function re() {
|
|
|
5805
5969
|
case 206:
|
|
5806
5970
|
return e = L.getUint32(c), c += 4, e;
|
|
5807
5971
|
case 207:
|
|
5808
|
-
return
|
|
5972
|
+
return H.int64AsType === "number" ? (e = L.getUint32(c) * 4294967296, e += L.getUint32(c + 4)) : H.int64AsType === "string" ? e = L.getBigUint64(c).toString() : H.int64AsType === "auto" ? (e = L.getBigUint64(c), e <= BigInt(2) << BigInt(52) && (e = Number(e))) : e = L.getBigUint64(c), c += 8, e;
|
|
5809
5973
|
case 208:
|
|
5810
5974
|
return L.getInt8(c++);
|
|
5811
5975
|
case 209:
|
|
@@ -5813,7 +5977,7 @@ function re() {
|
|
|
5813
5977
|
case 210:
|
|
5814
5978
|
return e = L.getInt32(c), c += 4, e;
|
|
5815
5979
|
case 211:
|
|
5816
|
-
return
|
|
5980
|
+
return H.int64AsType === "number" ? (e = L.getInt32(c) * 4294967296, e += L.getUint32(c + 4)) : H.int64AsType === "string" ? e = L.getBigInt64(c).toString() : H.int64AsType === "auto" ? (e = L.getBigInt64(c), e >= BigInt(-2) << BigInt(52) && e <= BigInt(2) << BigInt(52) && (e = Number(e))) : e = L.getBigInt64(c), c += 8, e;
|
|
5817
5981
|
case 212:
|
|
5818
5982
|
if (e = w[c++], e == 114)
|
|
5819
5983
|
return Qn(w[c++] & 63);
|
|
@@ -5832,11 +5996,11 @@ function re() {
|
|
|
5832
5996
|
case 216:
|
|
5833
5997
|
return lt(16);
|
|
5834
5998
|
case 217:
|
|
5835
|
-
return e = w[c++], Ae >= c ? Je.slice(c - me, (c += e) - me) :
|
|
5999
|
+
return e = w[c++], Ae >= c ? Je.slice(c - me, (c += e) - me) : fu(e);
|
|
5836
6000
|
case 218:
|
|
5837
|
-
return e = L.getUint16(c), c += 2, Ae >= c ? Je.slice(c - me, (c += e) - me) :
|
|
6001
|
+
return e = L.getUint16(c), c += 2, Ae >= c ? Je.slice(c - me, (c += e) - me) : du(e);
|
|
5838
6002
|
case 219:
|
|
5839
|
-
return e = L.getUint32(c), c += 4, Ae >= c ? Je.slice(c - me, (c += e) - me) :
|
|
6003
|
+
return e = L.getUint32(c), c += 4, Ae >= c ? Je.slice(c - me, (c += e) - me) : hu(e);
|
|
5840
6004
|
case 220:
|
|
5841
6005
|
return e = L.getUint16(c), c += 2, Gn(e);
|
|
5842
6006
|
case 221:
|
|
@@ -5856,11 +6020,11 @@ function re() {
|
|
|
5856
6020
|
}
|
|
5857
6021
|
}
|
|
5858
6022
|
}
|
|
5859
|
-
const
|
|
6023
|
+
const lu = /^[a-zA-Z_$][a-zA-Z\d_$]*$/;
|
|
5860
6024
|
function Mn(t, e) {
|
|
5861
6025
|
function r() {
|
|
5862
6026
|
if (r.count++ > yi) {
|
|
5863
|
-
let s = t.read = new Function("r", "return function(){return " + (
|
|
6027
|
+
let s = t.read = new Function("r", "return function(){return " + (H.freezeData ? "Object.freeze" : "") + "({" + t.map((i) => i === "__proto__" ? "__proto_:r()" : lu.test(i) ? i + ":r()" : "[" + JSON.stringify(i) + "]:r()").join(",") + "})}")(re);
|
|
5864
6028
|
return t.highByte === 0 && (t.read = Wn(e, t.read)), s();
|
|
5865
6029
|
}
|
|
5866
6030
|
let n = {};
|
|
@@ -5868,7 +6032,7 @@ function Mn(t, e) {
|
|
|
5868
6032
|
let a = t[s];
|
|
5869
6033
|
a === "__proto__" && (a = "__proto_"), n[a] = re();
|
|
5870
6034
|
}
|
|
5871
|
-
return
|
|
6035
|
+
return H.freezeData ? Object.freeze(n) : n;
|
|
5872
6036
|
}
|
|
5873
6037
|
return r.count = 0, t.highByte === 0 ? Wn(e, r) : r;
|
|
5874
6038
|
}
|
|
@@ -5876,19 +6040,19 @@ const Wn = (t, e) => function() {
|
|
|
5876
6040
|
let r = w[c++];
|
|
5877
6041
|
if (r === 0)
|
|
5878
6042
|
return e();
|
|
5879
|
-
let n = t < 32 ? -(t + (r << 5)) : t + (r << 5), s =
|
|
6043
|
+
let n = t < 32 ? -(t + (r << 5)) : t + (r << 5), s = P[n] || gi()[n];
|
|
5880
6044
|
if (!s)
|
|
5881
6045
|
throw new Error("Record id is not defined for " + n);
|
|
5882
6046
|
return s.read || (s.read = Mn(s, t)), s.read();
|
|
5883
6047
|
};
|
|
5884
6048
|
function gi() {
|
|
5885
|
-
let t = wi(() => (w = null,
|
|
5886
|
-
return
|
|
6049
|
+
let t = wi(() => (w = null, H.getStructures()));
|
|
6050
|
+
return P = H._mergeStructures(t, P);
|
|
5887
6051
|
}
|
|
5888
|
-
var sn =
|
|
5889
|
-
function
|
|
6052
|
+
var sn = Jt, fu = Jt, du = Jt, hu = Jt;
|
|
6053
|
+
function Jt(t) {
|
|
5890
6054
|
let e;
|
|
5891
|
-
if (t < 16 && (e =
|
|
6055
|
+
if (t < 16 && (e = Rn(t)))
|
|
5892
6056
|
return e;
|
|
5893
6057
|
if (t > 64 && nn)
|
|
5894
6058
|
return nn.decode(w.subarray(c, c += t));
|
|
@@ -5917,10 +6081,10 @@ function Gn(t) {
|
|
|
5917
6081
|
let e = new Array(t);
|
|
5918
6082
|
for (let r = 0; r < t; r++)
|
|
5919
6083
|
e[r] = re();
|
|
5920
|
-
return
|
|
6084
|
+
return H.freezeData ? Object.freeze(e) : e;
|
|
5921
6085
|
}
|
|
5922
6086
|
function Jn(t) {
|
|
5923
|
-
if (
|
|
6087
|
+
if (H.mapsAsObjects) {
|
|
5924
6088
|
let e = {};
|
|
5925
6089
|
for (let r = 0; r < t; r++) {
|
|
5926
6090
|
let n = xi();
|
|
@@ -5947,7 +6111,7 @@ function mi(t) {
|
|
|
5947
6111
|
}
|
|
5948
6112
|
return ae.apply(String, r);
|
|
5949
6113
|
}
|
|
5950
|
-
function
|
|
6114
|
+
function Rn(t) {
|
|
5951
6115
|
if (t < 4)
|
|
5952
6116
|
if (t < 2) {
|
|
5953
6117
|
if (t === 0)
|
|
@@ -6016,58 +6180,58 @@ function jn(t) {
|
|
|
6016
6180
|
if (t === 8)
|
|
6017
6181
|
return ae(e, r, n, s, i, a, o, l);
|
|
6018
6182
|
{
|
|
6019
|
-
let
|
|
6020
|
-
if ((
|
|
6183
|
+
let p = w[c++];
|
|
6184
|
+
if ((p & 128) > 0) {
|
|
6021
6185
|
c -= 9;
|
|
6022
6186
|
return;
|
|
6023
6187
|
}
|
|
6024
|
-
return ae(e, r, n, s, i, a, o, l,
|
|
6188
|
+
return ae(e, r, n, s, i, a, o, l, p);
|
|
6025
6189
|
}
|
|
6026
6190
|
} else if (t < 12) {
|
|
6027
|
-
let
|
|
6028
|
-
if ((
|
|
6191
|
+
let p = w[c++], b = w[c++];
|
|
6192
|
+
if ((p & 128) > 0 || (b & 128) > 0) {
|
|
6029
6193
|
c -= 10;
|
|
6030
6194
|
return;
|
|
6031
6195
|
}
|
|
6032
6196
|
if (t < 11)
|
|
6033
|
-
return ae(e, r, n, s, i, a, o, l,
|
|
6197
|
+
return ae(e, r, n, s, i, a, o, l, p, b);
|
|
6034
6198
|
let k = w[c++];
|
|
6035
6199
|
if ((k & 128) > 0) {
|
|
6036
6200
|
c -= 11;
|
|
6037
6201
|
return;
|
|
6038
6202
|
}
|
|
6039
|
-
return ae(e, r, n, s, i, a, o, l,
|
|
6203
|
+
return ae(e, r, n, s, i, a, o, l, p, b, k);
|
|
6040
6204
|
} else {
|
|
6041
|
-
let
|
|
6042
|
-
if ((
|
|
6205
|
+
let p = w[c++], b = w[c++], k = w[c++], ee = w[c++];
|
|
6206
|
+
if ((p & 128) > 0 || (b & 128) > 0 || (k & 128) > 0 || (ee & 128) > 0) {
|
|
6043
6207
|
c -= 12;
|
|
6044
6208
|
return;
|
|
6045
6209
|
}
|
|
6046
6210
|
if (t < 14) {
|
|
6047
6211
|
if (t === 12)
|
|
6048
|
-
return ae(e, r, n, s, i, a, o, l,
|
|
6212
|
+
return ae(e, r, n, s, i, a, o, l, p, b, k, ee);
|
|
6049
6213
|
{
|
|
6050
|
-
let
|
|
6051
|
-
if ((
|
|
6214
|
+
let Y = w[c++];
|
|
6215
|
+
if ((Y & 128) > 0) {
|
|
6052
6216
|
c -= 13;
|
|
6053
6217
|
return;
|
|
6054
6218
|
}
|
|
6055
|
-
return ae(e, r, n, s, i, a, o, l,
|
|
6219
|
+
return ae(e, r, n, s, i, a, o, l, p, b, k, ee, Y);
|
|
6056
6220
|
}
|
|
6057
6221
|
} else {
|
|
6058
|
-
let
|
|
6059
|
-
if ((
|
|
6222
|
+
let Y = w[c++], de = w[c++];
|
|
6223
|
+
if ((Y & 128) > 0 || (de & 128) > 0) {
|
|
6060
6224
|
c -= 14;
|
|
6061
6225
|
return;
|
|
6062
6226
|
}
|
|
6063
6227
|
if (t < 15)
|
|
6064
|
-
return ae(e, r, n, s, i, a, o, l,
|
|
6228
|
+
return ae(e, r, n, s, i, a, o, l, p, b, k, ee, Y, de);
|
|
6065
6229
|
let D = w[c++];
|
|
6066
6230
|
if ((D & 128) > 0) {
|
|
6067
6231
|
c -= 15;
|
|
6068
6232
|
return;
|
|
6069
6233
|
}
|
|
6070
|
-
return ae(e, r, n, s, i, a, o, l,
|
|
6234
|
+
return ae(e, r, n, s, i, a, o, l, p, b, k, ee, Y, de, D);
|
|
6071
6235
|
}
|
|
6072
6236
|
}
|
|
6073
6237
|
}
|
|
@@ -6091,10 +6255,10 @@ function Hn() {
|
|
|
6091
6255
|
default:
|
|
6092
6256
|
throw new Error("Expected string");
|
|
6093
6257
|
}
|
|
6094
|
-
return
|
|
6258
|
+
return Jt(e);
|
|
6095
6259
|
}
|
|
6096
6260
|
function Kr(t) {
|
|
6097
|
-
return
|
|
6261
|
+
return H.copyBuffers ? (
|
|
6098
6262
|
// specifically use the copying slice (not the node one)
|
|
6099
6263
|
Uint8Array.prototype.slice.call(w, c, c += t)
|
|
6100
6264
|
) : w.subarray(c, c += t);
|
|
@@ -6146,22 +6310,22 @@ function xi() {
|
|
|
6146
6310
|
i = L.getUint32(n), r.push(i), n += 4;
|
|
6147
6311
|
for (s += 3; n < s; )
|
|
6148
6312
|
i = w[n++], r.push(i);
|
|
6149
|
-
let o = t < 16 ?
|
|
6313
|
+
let o = t < 16 ? Rn(t) : mi(t);
|
|
6150
6314
|
return o != null ? r.string = o : r.string = sn(t);
|
|
6151
6315
|
}
|
|
6152
6316
|
const Qn = (t, e) => {
|
|
6153
6317
|
let r = re().map((i) => i.toString()), n = t;
|
|
6154
6318
|
e !== void 0 && (t = t < 32 ? -((e << 5) + t) : (e << 5) + t, r.highByte = e);
|
|
6155
|
-
let s =
|
|
6156
|
-
return s && (s.isShared || et) && ((
|
|
6319
|
+
let s = P[t];
|
|
6320
|
+
return s && (s.isShared || et) && ((P.restoreStructures || (P.restoreStructures = []))[t] = s), P[t] = r, r.read = Mn(r, n), r.read();
|
|
6157
6321
|
};
|
|
6158
6322
|
ye[0] = () => {
|
|
6159
6323
|
};
|
|
6160
6324
|
ye[0].noBuffer = !0;
|
|
6161
|
-
let
|
|
6325
|
+
let pu = { Error, TypeError, ReferenceError };
|
|
6162
6326
|
ye[101] = () => {
|
|
6163
6327
|
let t = re();
|
|
6164
|
-
return (
|
|
6328
|
+
return (pu[t[0]] || Error)(t[1]);
|
|
6165
6329
|
};
|
|
6166
6330
|
ye[105] = (t) => {
|
|
6167
6331
|
let e = L.getUint32(c - 4);
|
|
@@ -6179,21 +6343,21 @@ ye[112] = (t) => {
|
|
|
6179
6343
|
};
|
|
6180
6344
|
ye[115] = () => new Set(re());
|
|
6181
6345
|
const vi = ["Int8", "Uint8", "Uint8Clamped", "Int16", "Uint16", "Int32", "Uint32", "Float32", "Float64", "BigInt64", "BigUint64"].map((t) => t + "Array");
|
|
6182
|
-
let
|
|
6346
|
+
let yu = typeof globalThis == "object" ? globalThis : window;
|
|
6183
6347
|
ye[116] = (t) => {
|
|
6184
6348
|
let e = t[0], r = vi[e];
|
|
6185
6349
|
if (!r)
|
|
6186
6350
|
throw new Error("Could not find typed array for code " + e);
|
|
6187
|
-
return new
|
|
6351
|
+
return new yu[r](Uint8Array.prototype.slice.call(t, 1).buffer);
|
|
6188
6352
|
};
|
|
6189
6353
|
ye[120] = () => {
|
|
6190
6354
|
let t = re();
|
|
6191
6355
|
return new RegExp(t[0], t[1]);
|
|
6192
6356
|
};
|
|
6193
|
-
const
|
|
6357
|
+
const gu = [];
|
|
6194
6358
|
ye[98] = (t) => {
|
|
6195
6359
|
let e = (t[0] << 24) + (t[1] << 16) + (t[2] << 8) + t[3], r = c;
|
|
6196
|
-
return c += e - t.length, oe =
|
|
6360
|
+
return c += e - t.length, oe = gu, oe = [Hn(), Hn()], oe.position0 = 0, oe.position1 = 0, oe.postBundlePosition = c, c = r, re();
|
|
6197
6361
|
};
|
|
6198
6362
|
ye[255] = (t) => t.length == 4 ? new Date((t[0] * 16777216 + (t[1] << 16) + (t[2] << 8) + t[3]) * 1e3) : t.length == 8 ? new Date(
|
|
6199
6363
|
((t[0] << 22) + (t[1] << 14) + (t[2] << 6) + (t[3] >> 2)) / 1e6 + ((t[3] & 3) * 4294967296 + t[4] * 16777216 + (t[5] << 16) + (t[6] << 8) + t[7]) * 1e3
|
|
@@ -6201,53 +6365,53 @@ ye[255] = (t) => t.length == 4 ? new Date((t[0] * 16777216 + (t[1] << 16) + (t[2
|
|
|
6201
6365
|
((t[0] << 24) + (t[1] << 16) + (t[2] << 8) + t[3]) / 1e6 + ((t[4] & 128 ? -281474976710656 : 0) + t[6] * 1099511627776 + t[7] * 4294967296 + t[8] * 16777216 + (t[9] << 16) + (t[10] << 8) + t[11]) * 1e3
|
|
6202
6366
|
) : /* @__PURE__ */ new Date("invalid");
|
|
6203
6367
|
function wi(t) {
|
|
6204
|
-
let e = xe, r = c, n = me, s = Ae, i = Je, a = De, o = oe, l = new Uint8Array(w.slice(0, xe)),
|
|
6205
|
-
return xe = e, c = r, me = n, Ae = s, Je = i, De = a, oe = o, w = l, et = ee,
|
|
6368
|
+
let e = xe, r = c, n = me, s = Ae, i = Je, a = De, o = oe, l = new Uint8Array(w.slice(0, xe)), p = P, b = P.slice(0, P.length), k = H, ee = et, Y = t();
|
|
6369
|
+
return xe = e, c = r, me = n, Ae = s, Je = i, De = a, oe = o, w = l, et = ee, P = p, P.splice(0, P.length, ...b), H = k, L = new DataView(w.buffer, w.byteOffset, w.byteLength), Y;
|
|
6206
6370
|
}
|
|
6207
6371
|
function an() {
|
|
6208
|
-
w = null, De = null,
|
|
6372
|
+
w = null, De = null, P = null;
|
|
6209
6373
|
}
|
|
6210
|
-
const
|
|
6374
|
+
const jn = new Array(147);
|
|
6211
6375
|
for (let t = 0; t < 256; t++)
|
|
6212
|
-
|
|
6213
|
-
var Vr = new
|
|
6214
|
-
const
|
|
6376
|
+
jn[t] = +("1e" + Math.floor(45.15 - t * 0.30103));
|
|
6377
|
+
var Vr = new Wt({ useRecords: !1 });
|
|
6378
|
+
const mu = Vr.unpack;
|
|
6215
6379
|
Vr.unpackMultiple;
|
|
6216
6380
|
Vr.unpack;
|
|
6217
|
-
let
|
|
6218
|
-
new Uint8Array(
|
|
6219
|
-
let
|
|
6381
|
+
let xu = new Float32Array(1);
|
|
6382
|
+
new Uint8Array(xu.buffer, 0, 4);
|
|
6383
|
+
let yr;
|
|
6220
6384
|
try {
|
|
6221
|
-
|
|
6385
|
+
yr = new TextEncoder();
|
|
6222
6386
|
} catch {
|
|
6223
6387
|
}
|
|
6224
6388
|
let on, bi;
|
|
6225
|
-
const zr = typeof Buffer < "u",
|
|
6389
|
+
const zr = typeof Buffer < "u", tr = zr ? function(t) {
|
|
6226
6390
|
return Buffer.allocUnsafeSlow(t);
|
|
6227
6391
|
} : Uint8Array, Oi = zr ? Buffer : Uint8Array, es = zr ? 4294967296 : 2144337920;
|
|
6228
|
-
let f,
|
|
6229
|
-
const
|
|
6230
|
-
class
|
|
6392
|
+
let f, At, K, u = 0, le, X = null, vu;
|
|
6393
|
+
const wu = 21760, bu = /[\u0080-\uFFFF]/, vt = Symbol("record-id");
|
|
6394
|
+
class Ou extends Wt {
|
|
6231
6395
|
constructor(e) {
|
|
6232
6396
|
super(e), this.offset = 0;
|
|
6233
6397
|
let r, n, s, i, a = Oi.prototype.utf8Write ? function(d, A) {
|
|
6234
6398
|
return f.utf8Write(d, A, 4294967295);
|
|
6235
|
-
} :
|
|
6236
|
-
return
|
|
6399
|
+
} : yr && yr.encodeInto ? function(d, A) {
|
|
6400
|
+
return yr.encodeInto(d, f.subarray(A)).written;
|
|
6237
6401
|
} : !1, o = this;
|
|
6238
6402
|
e || (e = {});
|
|
6239
|
-
let l = e && e.sequential,
|
|
6240
|
-
if (b == null && (b =
|
|
6403
|
+
let l = e && e.sequential, p = e.structures || e.saveStructures, b = e.maxSharedStructures;
|
|
6404
|
+
if (b == null && (b = p ? 32 : 0), b > 8160)
|
|
6241
6405
|
throw new Error("Maximum maxSharedStructure is 8160");
|
|
6242
6406
|
e.structuredClone && e.moreTypes == null && (this.moreTypes = !0);
|
|
6243
6407
|
let k = e.maxOwnStructures;
|
|
6244
|
-
k == null && (k =
|
|
6245
|
-
let ee = b > 32 || k + b > 64,
|
|
6408
|
+
k == null && (k = p ? 32 : 64), !this.structures && e.useRecords != !1 && (this.structures = []);
|
|
6409
|
+
let ee = b > 32 || k + b > 64, Y = b + 64, de = b + k + 64;
|
|
6246
6410
|
if (de > 8256)
|
|
6247
6411
|
throw new Error("Maximum maxSharedStructure + maxOwnStructure is 8192");
|
|
6248
6412
|
let D = [], pe = 0, Ye = 0;
|
|
6249
6413
|
this.pack = this.encode = function(d, A) {
|
|
6250
|
-
if (f || (f = new
|
|
6414
|
+
if (f || (f = new tr(8192), K = f.dataView || (f.dataView = new DataView(f.buffer, 0, 8192)), u = 0), le = f.length - 10, le - u < 2048 ? (f = new tr(f.length), K = f.dataView || (f.dataView = new DataView(f.buffer, 0, f.length)), le = f.length - 10, u = 0) : u = u + 7 & 2147483640, r = u, A & Nu && (u += A & 255), i = o.structuredClone ? /* @__PURE__ */ new Map() : null, o.bundleStrings && typeof d != "string" ? (X = [], X.size = 1 / 0) : X = null, s = o.structures, s) {
|
|
6251
6415
|
s.uninitialized && (s = o._mergeStructures(o.getStructures()));
|
|
6252
6416
|
let m = s.sharedLength || 0;
|
|
6253
6417
|
if (m > b)
|
|
@@ -6260,8 +6424,8 @@ class xu extends Kt {
|
|
|
6260
6424
|
continue;
|
|
6261
6425
|
let B, U = s.transitions;
|
|
6262
6426
|
for (let C = 0, te = _.length; C < te; C++) {
|
|
6263
|
-
let
|
|
6264
|
-
B = U[
|
|
6427
|
+
let F = _[C];
|
|
6428
|
+
B = U[F], B || (B = U[F] = /* @__PURE__ */ Object.create(null)), U = B;
|
|
6265
6429
|
}
|
|
6266
6430
|
U[vt] = v + 64;
|
|
6267
6431
|
}
|
|
@@ -6271,31 +6435,31 @@ class xu extends Kt {
|
|
|
6271
6435
|
}
|
|
6272
6436
|
n && (n = !1);
|
|
6273
6437
|
try {
|
|
6274
|
-
o.randomAccessStructure && d && d.constructor && d.constructor === Object ? ki(d) :
|
|
6438
|
+
o.randomAccessStructure && d && d.constructor && d.constructor === Object ? ki(d) : J(d);
|
|
6275
6439
|
let m = X;
|
|
6276
|
-
if (X && ns(r,
|
|
6440
|
+
if (X && ns(r, J, 0), i && i.idsToInsert) {
|
|
6277
6441
|
let v = i.idsToInsert.sort((C, te) => C.offset > te.offset ? 1 : -1), _ = v.length, B = -1;
|
|
6278
6442
|
for (; m && _ > 0; ) {
|
|
6279
6443
|
let C = v[--_].offset + r;
|
|
6280
|
-
C < m.stringsPosition + r && B === -1 && (B = 0), C > m.position + r ? B >= 0 && (B += 6) : (B >= 0 && (
|
|
6444
|
+
C < m.stringsPosition + r && B === -1 && (B = 0), C > m.position + r ? B >= 0 && (B += 6) : (B >= 0 && (K.setUint32(
|
|
6281
6445
|
m.position + r,
|
|
6282
|
-
|
|
6446
|
+
K.getUint32(m.position + r) + B
|
|
6283
6447
|
), B = -1), m = m.previous, _++);
|
|
6284
6448
|
}
|
|
6285
|
-
B >= 0 && m &&
|
|
6449
|
+
B >= 0 && m && K.setUint32(
|
|
6286
6450
|
m.position + r,
|
|
6287
|
-
|
|
6451
|
+
K.getUint32(m.position + r) + B
|
|
6288
6452
|
), u += v.length * 6, u > le && Fe(u), o.offset = u;
|
|
6289
|
-
let U =
|
|
6453
|
+
let U = Tu(f.subarray(r, u), v);
|
|
6290
6454
|
return i = null, U;
|
|
6291
6455
|
}
|
|
6292
|
-
return o.offset = u, A &
|
|
6456
|
+
return o.offset = u, A & Au ? (f.start = r, f.end = u, f) : f.subarray(r, u);
|
|
6293
6457
|
} finally {
|
|
6294
6458
|
if (s && (Ce(), n && o.saveStructures)) {
|
|
6295
|
-
let m = s.sharedLength || 0, v = f.subarray(r, u), _ =
|
|
6459
|
+
let m = s.sharedLength || 0, v = f.subarray(r, u), _ = Su(s, o);
|
|
6296
6460
|
return o.saveStructures(_, _.isCompatible) === !1 ? o.pack(d, A) : (o.lastNamedStructuresLength = m, v);
|
|
6297
6461
|
}
|
|
6298
|
-
A &
|
|
6462
|
+
A & Iu && (u = r);
|
|
6299
6463
|
}
|
|
6300
6464
|
};
|
|
6301
6465
|
const Ce = () => {
|
|
@@ -6310,54 +6474,54 @@ class xu extends Kt {
|
|
|
6310
6474
|
}
|
|
6311
6475
|
}, ot = (d) => {
|
|
6312
6476
|
var A = d.length;
|
|
6313
|
-
A < 16 ? f[u++] = 144 | A : A < 65536 ? (f[u++] = 220, f[u++] = A >> 8, f[u++] = A & 255) : (f[u++] = 221,
|
|
6477
|
+
A < 16 ? f[u++] = 144 | A : A < 65536 ? (f[u++] = 220, f[u++] = A >> 8, f[u++] = A & 255) : (f[u++] = 221, K.setUint32(u, A), u += 4);
|
|
6314
6478
|
for (let m = 0; m < A; m++)
|
|
6315
|
-
|
|
6316
|
-
},
|
|
6479
|
+
J(d[m]);
|
|
6480
|
+
}, J = (d) => {
|
|
6317
6481
|
u > le && (f = Fe(u));
|
|
6318
6482
|
var A = typeof d, m;
|
|
6319
6483
|
if (A === "string") {
|
|
6320
6484
|
let v = d.length;
|
|
6321
6485
|
if (X && v >= 4 && v < 4096) {
|
|
6322
|
-
if ((X.size += v) >
|
|
6486
|
+
if ((X.size += v) > wu) {
|
|
6323
6487
|
let C, te = (X[0] ? X[0].length * 3 + X[1].length : 0) + 10;
|
|
6324
6488
|
u + te > le && (f = Fe(u + te));
|
|
6325
|
-
let
|
|
6326
|
-
X.position ? (
|
|
6489
|
+
let F;
|
|
6490
|
+
X.position ? (F = X, f[u] = 200, u += 3, f[u++] = 98, C = u - r, u += 4, ns(r, J, 0), K.setUint16(C + r - 3, u - r - C)) : (f[u++] = 214, f[u++] = 98, C = u - r, u += 4), X = ["", ""], X.previous = F, X.size = 0, X.position = C;
|
|
6327
6491
|
}
|
|
6328
|
-
let U =
|
|
6329
|
-
X[U ? 0 : 1] += d, f[u++] = 193,
|
|
6492
|
+
let U = bu.test(d);
|
|
6493
|
+
X[U ? 0 : 1] += d, f[u++] = 193, J(U ? -v : v);
|
|
6330
6494
|
return;
|
|
6331
6495
|
}
|
|
6332
6496
|
let _;
|
|
6333
6497
|
v < 32 ? _ = 1 : v < 256 ? _ = 2 : v < 65536 ? _ = 3 : _ = 5;
|
|
6334
6498
|
let B = v * 3;
|
|
6335
6499
|
if (u + B > le && (f = Fe(u + B)), v < 64 || !a) {
|
|
6336
|
-
let U, C, te,
|
|
6500
|
+
let U, C, te, F = u + _;
|
|
6337
6501
|
for (U = 0; U < v; U++)
|
|
6338
|
-
C = d.charCodeAt(U), C < 128 ? f[
|
|
6339
|
-
m =
|
|
6502
|
+
C = d.charCodeAt(U), C < 128 ? f[F++] = C : C < 2048 ? (f[F++] = C >> 6 | 192, f[F++] = C & 63 | 128) : (C & 64512) === 55296 && ((te = d.charCodeAt(U + 1)) & 64512) === 56320 ? (C = 65536 + ((C & 1023) << 10) + (te & 1023), U++, f[F++] = C >> 18 | 240, f[F++] = C >> 12 & 63 | 128, f[F++] = C >> 6 & 63 | 128, f[F++] = C & 63 | 128) : (f[F++] = C >> 12 | 224, f[F++] = C >> 6 & 63 | 128, f[F++] = C & 63 | 128);
|
|
6503
|
+
m = F - u - _;
|
|
6340
6504
|
} else
|
|
6341
6505
|
m = a(d, u + _);
|
|
6342
|
-
m < 32 ? f[u++] = 160 | m : m < 256 ? (_ < 2 && f.copyWithin(u + 2, u + 1, u + 1 + m), f[u++] = 217, f[u++] = m) : m < 65536 ? (_ < 3 && f.copyWithin(u + 3, u + 2, u + 2 + m), f[u++] = 218, f[u++] = m >> 8, f[u++] = m & 255) : (_ < 5 && f.copyWithin(u + 5, u + 3, u + 3 + m), f[u++] = 219,
|
|
6506
|
+
m < 32 ? f[u++] = 160 | m : m < 256 ? (_ < 2 && f.copyWithin(u + 2, u + 1, u + 1 + m), f[u++] = 217, f[u++] = m) : m < 65536 ? (_ < 3 && f.copyWithin(u + 3, u + 2, u + 2 + m), f[u++] = 218, f[u++] = m >> 8, f[u++] = m & 255) : (_ < 5 && f.copyWithin(u + 5, u + 3, u + 3 + m), f[u++] = 219, K.setUint32(u, m), u += 4), u += m;
|
|
6343
6507
|
} else if (A === "number")
|
|
6344
6508
|
if (d >>> 0 === d)
|
|
6345
|
-
d < 32 || d < 128 && this.useRecords === !1 || d < 64 && !this.randomAccessStructure ? f[u++] = d : d < 256 ? (f[u++] = 204, f[u++] = d) : d < 65536 ? (f[u++] = 205, f[u++] = d >> 8, f[u++] = d & 255) : (f[u++] = 206,
|
|
6509
|
+
d < 32 || d < 128 && this.useRecords === !1 || d < 64 && !this.randomAccessStructure ? f[u++] = d : d < 256 ? (f[u++] = 204, f[u++] = d) : d < 65536 ? (f[u++] = 205, f[u++] = d >> 8, f[u++] = d & 255) : (f[u++] = 206, K.setUint32(u, d), u += 4);
|
|
6346
6510
|
else if (d >> 0 === d)
|
|
6347
|
-
d >= -32 ? f[u++] = 256 + d : d >= -128 ? (f[u++] = 208, f[u++] = d + 256) : d >= -32768 ? (f[u++] = 209,
|
|
6511
|
+
d >= -32 ? f[u++] = 256 + d : d >= -128 ? (f[u++] = 208, f[u++] = d + 256) : d >= -32768 ? (f[u++] = 209, K.setInt16(u, d), u += 2) : (f[u++] = 210, K.setInt32(u, d), u += 4);
|
|
6348
6512
|
else {
|
|
6349
6513
|
let v;
|
|
6350
6514
|
if ((v = this.useFloat32) > 0 && d < 4294967296 && d >= -2147483648) {
|
|
6351
|
-
f[u++] = 202,
|
|
6515
|
+
f[u++] = 202, K.setFloat32(u, d);
|
|
6352
6516
|
let _;
|
|
6353
6517
|
if (v < 4 || // this checks for rounding of numbers that were encoded in 32-bit float to nearest significant decimal digit that could be preserved
|
|
6354
|
-
(_ = d *
|
|
6518
|
+
(_ = d * jn[(f[u] & 127) << 1 | f[u + 1] >> 7]) >> 0 === _) {
|
|
6355
6519
|
u += 4;
|
|
6356
6520
|
return;
|
|
6357
6521
|
} else
|
|
6358
6522
|
u--;
|
|
6359
6523
|
}
|
|
6360
|
-
f[u++] = 203,
|
|
6524
|
+
f[u++] = 203, K.setFloat64(u, d), u += 8;
|
|
6361
6525
|
}
|
|
6362
6526
|
else if (A === "object" || A === "function")
|
|
6363
6527
|
if (!d)
|
|
@@ -6370,23 +6534,23 @@ class xu extends Kt {
|
|
|
6370
6534
|
let B = i.idsToInsert || (i.idsToInsert = []);
|
|
6371
6535
|
_.id = B.push(_);
|
|
6372
6536
|
}
|
|
6373
|
-
f[u++] = 214, f[u++] = 112,
|
|
6537
|
+
f[u++] = 214, f[u++] = 112, K.setUint32(u, _.id), u += 4;
|
|
6374
6538
|
return;
|
|
6375
6539
|
} else
|
|
6376
6540
|
i.set(d, { offset: u - r });
|
|
6377
6541
|
}
|
|
6378
6542
|
let v = d.constructor;
|
|
6379
6543
|
if (v === Object)
|
|
6380
|
-
|
|
6544
|
+
Ht(d, !0);
|
|
6381
6545
|
else if (v === Array)
|
|
6382
6546
|
ot(d);
|
|
6383
6547
|
else if (v === Map)
|
|
6384
6548
|
if (this.mapAsEmptyObject)
|
|
6385
6549
|
f[u++] = 128;
|
|
6386
6550
|
else {
|
|
6387
|
-
m = d.size, m < 16 ? f[u++] = 128 | m : m < 65536 ? (f[u++] = 222, f[u++] = m >> 8, f[u++] = m & 255) : (f[u++] = 223,
|
|
6551
|
+
m = d.size, m < 16 ? f[u++] = 128 | m : m < 65536 ? (f[u++] = 222, f[u++] = m >> 8, f[u++] = m & 255) : (f[u++] = 223, K.setUint32(u, m), u += 4);
|
|
6388
6552
|
for (let [_, B] of d)
|
|
6389
|
-
|
|
6553
|
+
J(_), J(B);
|
|
6390
6554
|
}
|
|
6391
6555
|
else {
|
|
6392
6556
|
for (let _ = 0, B = on.length; _ < B; _++) {
|
|
@@ -6396,22 +6560,22 @@ class xu extends Kt {
|
|
|
6396
6560
|
if (C.write) {
|
|
6397
6561
|
C.type && (f[u++] = 212, f[u++] = C.type, f[u++] = 0);
|
|
6398
6562
|
let Ke = C.write.call(this, d);
|
|
6399
|
-
Ke === d ? Array.isArray(d) ? ot(d) :
|
|
6563
|
+
Ke === d ? Array.isArray(d) ? ot(d) : Ht(d) : J(Ke);
|
|
6400
6564
|
return;
|
|
6401
6565
|
}
|
|
6402
|
-
let te = f,
|
|
6566
|
+
let te = f, F = K, Me = u;
|
|
6403
6567
|
f = null;
|
|
6404
6568
|
let ct;
|
|
6405
6569
|
try {
|
|
6406
6570
|
ct = C.pack.call(this, d, (Ke) => (f = te, te = null, u += Ke, u > le && Fe(u), {
|
|
6407
6571
|
target: f,
|
|
6408
|
-
targetView:
|
|
6572
|
+
targetView: K,
|
|
6409
6573
|
position: u - Ke
|
|
6410
|
-
}),
|
|
6574
|
+
}), J);
|
|
6411
6575
|
} finally {
|
|
6412
|
-
te && (f = te,
|
|
6576
|
+
te && (f = te, K = F, u = Me, le = f.length - 10);
|
|
6413
6577
|
}
|
|
6414
|
-
ct && (ct.length + u > le && Fe(ct.length + u), u =
|
|
6578
|
+
ct && (ct.length + u > le && Fe(ct.length + u), u = _u(ct, f, u, C.type));
|
|
6415
6579
|
return;
|
|
6416
6580
|
}
|
|
6417
6581
|
}
|
|
@@ -6421,11 +6585,11 @@ class xu extends Kt {
|
|
|
6421
6585
|
if (d.toJSON) {
|
|
6422
6586
|
const _ = d.toJSON();
|
|
6423
6587
|
if (_ !== d)
|
|
6424
|
-
return
|
|
6588
|
+
return J(_);
|
|
6425
6589
|
}
|
|
6426
6590
|
if (A === "function")
|
|
6427
|
-
return
|
|
6428
|
-
|
|
6591
|
+
return J(this.writeFunction && this.writeFunction(d));
|
|
6592
|
+
Ht(d, !d.hasOwnProperty);
|
|
6429
6593
|
}
|
|
6430
6594
|
}
|
|
6431
6595
|
}
|
|
@@ -6433,11 +6597,11 @@ class xu extends Kt {
|
|
|
6433
6597
|
f[u++] = d ? 195 : 194;
|
|
6434
6598
|
else if (A === "bigint") {
|
|
6435
6599
|
if (d < BigInt(1) << BigInt(63) && d >= -(BigInt(1) << BigInt(63)))
|
|
6436
|
-
f[u++] = 211,
|
|
6600
|
+
f[u++] = 211, K.setBigInt64(u, d);
|
|
6437
6601
|
else if (d < BigInt(1) << BigInt(64) && d > 0)
|
|
6438
|
-
f[u++] = 207,
|
|
6602
|
+
f[u++] = 207, K.setBigUint64(u, d);
|
|
6439
6603
|
else if (this.largeBigIntToFloat)
|
|
6440
|
-
f[u++] = 203,
|
|
6604
|
+
f[u++] = 203, K.setFloat64(u, Number(d));
|
|
6441
6605
|
else
|
|
6442
6606
|
throw new RangeError(d + " was too large to fit in MessagePack 64-bit integer format, set largeBigIntToFloat to convert to float-64");
|
|
6443
6607
|
u += 8;
|
|
@@ -6447,24 +6611,24 @@ class xu extends Kt {
|
|
|
6447
6611
|
throw new Error("Unknown type: " + A);
|
|
6448
6612
|
}, Bn = this.variableMapSize || this.coercibleKeyAsNumber ? (d) => {
|
|
6449
6613
|
let A = Object.keys(d), m = A.length;
|
|
6450
|
-
m < 16 ? f[u++] = 128 | m : m < 65536 ? (f[u++] = 222, f[u++] = m >> 8, f[u++] = m & 255) : (f[u++] = 223,
|
|
6614
|
+
m < 16 ? f[u++] = 128 | m : m < 65536 ? (f[u++] = 222, f[u++] = m >> 8, f[u++] = m & 255) : (f[u++] = 223, K.setUint32(u, m), u += 4);
|
|
6451
6615
|
let v;
|
|
6452
6616
|
if (this.coercibleKeyAsNumber)
|
|
6453
6617
|
for (let _ = 0; _ < m; _++) {
|
|
6454
6618
|
v = A[_];
|
|
6455
6619
|
let B = Number(v);
|
|
6456
|
-
|
|
6620
|
+
J(isNaN(B) ? v : B), J(d[v]);
|
|
6457
6621
|
}
|
|
6458
6622
|
else
|
|
6459
6623
|
for (let _ = 0; _ < m; _++)
|
|
6460
|
-
|
|
6624
|
+
J(v = A[_]), J(d[v]);
|
|
6461
6625
|
} : (d, A) => {
|
|
6462
6626
|
f[u++] = 222;
|
|
6463
6627
|
let m = u - r;
|
|
6464
6628
|
u += 2;
|
|
6465
6629
|
let v = 0;
|
|
6466
6630
|
for (let _ in d)
|
|
6467
|
-
(A || d.hasOwnProperty(_)) && (
|
|
6631
|
+
(A || d.hasOwnProperty(_)) && (J(_), J(d[_]), v++);
|
|
6468
6632
|
f[m++ + r] = v >> 8, f[m + r] = v & 255;
|
|
6469
6633
|
}, Un = this.useRecords === !1 ? Bn : e.progressiveRecords && !ee ? (
|
|
6470
6634
|
// this is about 2% faster for highly stable structures, since it only requires one for-in loop (but much more expensive when new structure needs to be written)
|
|
@@ -6477,14 +6641,14 @@ class xu extends Kt {
|
|
|
6477
6641
|
else {
|
|
6478
6642
|
let C = Object.keys(d), te = v;
|
|
6479
6643
|
v = s.transitions;
|
|
6480
|
-
let
|
|
6644
|
+
let F = 0;
|
|
6481
6645
|
for (let Me = 0, ct = C.length; Me < ct; Me++) {
|
|
6482
6646
|
let Ke = C[Me];
|
|
6483
|
-
m = v[Ke], m || (m = v[Ke] = /* @__PURE__ */ Object.create(null),
|
|
6647
|
+
m = v[Ke], m || (m = v[Ke] = /* @__PURE__ */ Object.create(null), F++), v = m;
|
|
6484
6648
|
}
|
|
6485
|
-
_ + r + 1 == u ? (u--, qr(v, C,
|
|
6649
|
+
_ + r + 1 == u ? (u--, qr(v, C, F)) : Ln(v, C, _, F), B = !0, v = te[U];
|
|
6486
6650
|
}
|
|
6487
|
-
|
|
6651
|
+
J(d[U]);
|
|
6488
6652
|
}
|
|
6489
6653
|
if (!B) {
|
|
6490
6654
|
let U = v[vt];
|
|
@@ -6498,8 +6662,8 @@ class xu extends Kt {
|
|
|
6498
6662
|
let B = v[vt];
|
|
6499
6663
|
B ? B >= 96 && ee ? (f[u++] = ((B -= 96) & 31) + 96, f[u++] = B >> 5) : f[u++] = B : qr(v, v.__keys__ || Object.keys(d), _);
|
|
6500
6664
|
for (let U in d)
|
|
6501
|
-
(A || d.hasOwnProperty(U)) &&
|
|
6502
|
-
}, Zn = typeof this.useRecords == "function" && this.useRecords,
|
|
6665
|
+
(A || d.hasOwnProperty(U)) && J(d[U]);
|
|
6666
|
+
}, Zn = typeof this.useRecords == "function" && this.useRecords, Ht = Zn ? (d, A) => {
|
|
6503
6667
|
Zn(d) ? Un(d, A) : Bn(d, A);
|
|
6504
6668
|
} : Un, Fe = (d) => {
|
|
6505
6669
|
let A;
|
|
@@ -6512,39 +6676,39 @@ class xu extends Kt {
|
|
|
6512
6676
|
);
|
|
6513
6677
|
} else
|
|
6514
6678
|
A = (Math.max(d - r << 2, f.length - 1) >> 12) + 1 << 12;
|
|
6515
|
-
let m = new
|
|
6516
|
-
return
|
|
6679
|
+
let m = new tr(A);
|
|
6680
|
+
return K = m.dataView || (m.dataView = new DataView(m.buffer, 0, A)), d = Math.min(d, f.length), f.copy ? f.copy(m, 0, r, d) : m.set(f.slice(r, d)), u -= r, r = 0, le = m.length - 10, f = m;
|
|
6517
6681
|
}, qr = (d, A, m) => {
|
|
6518
6682
|
let v = s.nextId;
|
|
6519
|
-
v || (v = 64), v <
|
|
6683
|
+
v || (v = 64), v < Y && this.shouldShareStructure && !this.shouldShareStructure(A) ? (v = s.nextOwnId, v < de || (v = Y), s.nextOwnId = v + 1) : (v >= de && (v = Y), s.nextId = v + 1);
|
|
6520
6684
|
let _ = A.highByte = v >= 96 && ee ? v - 96 >> 5 : -1;
|
|
6521
|
-
d[vt] = v, d.__keys__ = A, s[v - 64] = A, v <
|
|
6685
|
+
d[vt] = v, d.__keys__ = A, s[v - 64] = A, v < Y ? (A.isShared = !0, s.sharedLength = v - 63, n = !0, _ >= 0 ? (f[u++] = (v & 31) + 96, f[u++] = _) : f[u++] = v) : (_ >= 0 ? (f[u++] = 213, f[u++] = 114, f[u++] = (v & 31) + 96, f[u++] = _) : (f[u++] = 212, f[u++] = 114, f[u++] = v), m && (pe += Ye * m), D.length >= k && (D.shift()[vt] = 0), D.push(d), J(A));
|
|
6522
6686
|
}, Ln = (d, A, m, v) => {
|
|
6523
6687
|
let _ = f, B = u, U = le, C = r;
|
|
6524
|
-
f =
|
|
6688
|
+
f = At, u = 0, r = 0, f || (At = f = new tr(8192)), le = f.length - 10, qr(d, A, v), At = f;
|
|
6525
6689
|
let te = u;
|
|
6526
6690
|
if (f = _, u = B, le = U, r = C, te > 1) {
|
|
6527
|
-
let
|
|
6528
|
-
|
|
6691
|
+
let F = u + te - 1;
|
|
6692
|
+
F > le && Fe(F);
|
|
6529
6693
|
let Me = m + r;
|
|
6530
|
-
f.copyWithin(Me + te, Me + 1, u), f.set(
|
|
6694
|
+
f.copyWithin(Me + te, Me + 1, u), f.set(At.slice(0, te), Me), u = F;
|
|
6531
6695
|
} else
|
|
6532
|
-
f[m + r] =
|
|
6696
|
+
f[m + r] = At[0];
|
|
6533
6697
|
}, ki = (d, A) => {
|
|
6534
|
-
let m =
|
|
6698
|
+
let m = vu(d, f, r, u, s, Fe, (v, _, B) => {
|
|
6535
6699
|
if (B)
|
|
6536
6700
|
return n = !0;
|
|
6537
6701
|
u = _;
|
|
6538
6702
|
let U = f;
|
|
6539
|
-
return
|
|
6703
|
+
return J(v), Ce(), U !== f ? { position: u, targetView: K, target: f } : u;
|
|
6540
6704
|
}, this);
|
|
6541
6705
|
if (m === 0)
|
|
6542
|
-
return
|
|
6706
|
+
return Ht(d, !0);
|
|
6543
6707
|
u = m;
|
|
6544
6708
|
};
|
|
6545
6709
|
}
|
|
6546
6710
|
useBuffer(e) {
|
|
6547
|
-
f = e,
|
|
6711
|
+
f = e, K = new DataView(f.buffer, f.byteOffset, f.byteLength), u = 0;
|
|
6548
6712
|
}
|
|
6549
6713
|
clearSharedData() {
|
|
6550
6714
|
this.structures && (this.structures = []), this.typedStructs && (this.typedStructs = []);
|
|
@@ -6631,7 +6795,7 @@ function rs(t, e) {
|
|
|
6631
6795
|
}
|
|
6632
6796
|
n.set(t, s);
|
|
6633
6797
|
}
|
|
6634
|
-
function
|
|
6798
|
+
function _u(t, e, r, n) {
|
|
6635
6799
|
let s = t.length;
|
|
6636
6800
|
switch (s) {
|
|
6637
6801
|
case 1:
|
|
@@ -6654,7 +6818,7 @@ function vu(t, e, r, n) {
|
|
|
6654
6818
|
}
|
|
6655
6819
|
return e[r++] = n, e.set(t, r), r += s, r;
|
|
6656
6820
|
}
|
|
6657
|
-
function
|
|
6821
|
+
function Tu(t, e) {
|
|
6658
6822
|
let r, n = e.length * 6, s = t.length - n;
|
|
6659
6823
|
for (; r = e.pop(); ) {
|
|
6660
6824
|
let i = r.offset, a = r.id;
|
|
@@ -6666,41 +6830,41 @@ function wu(t, e) {
|
|
|
6666
6830
|
}
|
|
6667
6831
|
function ns(t, e, r) {
|
|
6668
6832
|
if (X.length > 0) {
|
|
6669
|
-
|
|
6833
|
+
K.setUint32(X.position + t, u + r - X.position - t), X.stringsPosition = u - t;
|
|
6670
6834
|
let n = X;
|
|
6671
6835
|
X = null, e(n[0]), e(n[1]);
|
|
6672
6836
|
}
|
|
6673
6837
|
}
|
|
6674
|
-
function
|
|
6838
|
+
function Su(t, e) {
|
|
6675
6839
|
return t.isCompatible = (r) => {
|
|
6676
6840
|
let n = !r || (e.lastNamedStructuresLength || 0) === r.length;
|
|
6677
6841
|
return n || e._mergeStructures(r), n;
|
|
6678
6842
|
}, t;
|
|
6679
6843
|
}
|
|
6680
|
-
let _i = new
|
|
6681
|
-
const
|
|
6844
|
+
let _i = new Ou({ useRecords: !1 });
|
|
6845
|
+
const ku = _i.pack;
|
|
6682
6846
|
_i.pack;
|
|
6683
|
-
const
|
|
6847
|
+
const Au = 512, Iu = 1024, Nu = 2048;
|
|
6684
6848
|
class Ti {
|
|
6685
6849
|
constructor() {
|
|
6686
|
-
|
|
6850
|
+
h(this, "contentType", "application/msgpack");
|
|
6687
6851
|
}
|
|
6688
6852
|
encode(e) {
|
|
6689
|
-
return
|
|
6853
|
+
return ku(mt.toSnake(e));
|
|
6690
6854
|
}
|
|
6691
6855
|
decode(e, r) {
|
|
6692
|
-
const n = mt.toCamel(
|
|
6856
|
+
const n = mt.toCamel(mu(new Uint8Array(e)));
|
|
6693
6857
|
return r != null ? r.parse(n) : n;
|
|
6694
6858
|
}
|
|
6695
6859
|
}
|
|
6696
6860
|
class Si {
|
|
6697
6861
|
constructor() {
|
|
6698
|
-
|
|
6699
|
-
|
|
6862
|
+
h(this, "contentType", "application/json");
|
|
6863
|
+
h(this, "decoder");
|
|
6700
6864
|
this.decoder = new TextDecoder();
|
|
6701
6865
|
}
|
|
6702
6866
|
encode(e) {
|
|
6703
|
-
const r = JSON.stringify(mt.toSnake(e), (n, s) => ArrayBuffer.isView(s) ? Array.from(s) :
|
|
6867
|
+
const r = JSON.stringify(mt.toSnake(e), (n, s) => ArrayBuffer.isView(s) ? Array.from(s) : pr(s) && "encode_value" in s ? typeof s.value == "bigint" ? s.value.toString() : s.value : typeof s == "bigint" ? s.toString() : s);
|
|
6704
6868
|
return new TextEncoder().encode(r);
|
|
6705
6869
|
}
|
|
6706
6870
|
decode(e, r) {
|
|
@@ -6710,18 +6874,18 @@ class Si {
|
|
|
6710
6874
|
static registerCustomType() {
|
|
6711
6875
|
}
|
|
6712
6876
|
}
|
|
6713
|
-
const
|
|
6877
|
+
const Eu = [
|
|
6714
6878
|
new Ti(),
|
|
6715
6879
|
new Si()
|
|
6716
|
-
],
|
|
6880
|
+
], fl = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
6717
6881
|
__proto__: null,
|
|
6718
|
-
ENCODERS:
|
|
6882
|
+
ENCODERS: Eu,
|
|
6719
6883
|
JSONEncoderDecoder: Si,
|
|
6720
6884
|
MsgpackEncoderDecoder: Ti
|
|
6721
6885
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
6722
|
-
class
|
|
6886
|
+
class Cu {
|
|
6723
6887
|
constructor(e) {
|
|
6724
|
-
|
|
6888
|
+
h(this, "handlers");
|
|
6725
6889
|
this.handlers = e ?? /* @__PURE__ */ new Map();
|
|
6726
6890
|
}
|
|
6727
6891
|
onChange(e) {
|
|
@@ -6731,67 +6895,68 @@ class Au {
|
|
|
6731
6895
|
this.handlers.forEach((r, n) => n(e));
|
|
6732
6896
|
}
|
|
6733
6897
|
}
|
|
6734
|
-
const
|
|
6898
|
+
const dl = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
6735
6899
|
__proto__: null,
|
|
6736
|
-
Observer:
|
|
6737
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
6900
|
+
Observer: Cu
|
|
6901
|
+
}, Symbol.toStringTag, { value: "Module" })), Mu = (t) => g.object({
|
|
6738
6902
|
variant: g.enum(["set", "delete"]),
|
|
6739
6903
|
key: g.string(),
|
|
6740
6904
|
value: t
|
|
6741
|
-
}),
|
|
6905
|
+
}), hl = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
6742
6906
|
__proto__: null,
|
|
6743
|
-
Z:
|
|
6744
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
6907
|
+
Z: Mu
|
|
6908
|
+
}, Symbol.toStringTag, { value: "Module" })), pl = (t) => Array.isArray(t) ? [...t] : typeof t == "object" && t !== null ? { ...t } : t, yl = (t) => t ? -1 : 1;
|
|
6745
6909
|
export {
|
|
6746
6910
|
mt as Case,
|
|
6747
|
-
|
|
6911
|
+
q as DataType,
|
|
6748
6912
|
ce as Density,
|
|
6913
|
+
Gu as MultiSeries,
|
|
6749
6914
|
zn as Rate,
|
|
6750
6915
|
qn as RoutedWorker,
|
|
6751
|
-
|
|
6916
|
+
ul as Search,
|
|
6752
6917
|
ke as Series,
|
|
6753
6918
|
Ar as Size,
|
|
6754
|
-
|
|
6919
|
+
Tt as TimeRange,
|
|
6755
6920
|
se as TimeSpan,
|
|
6756
6921
|
ne as TimeStamp,
|
|
6757
|
-
|
|
6758
|
-
|
|
6759
|
-
|
|
6760
|
-
|
|
6761
|
-
|
|
6762
|
-
|
|
6763
|
-
|
|
6764
|
-
|
|
6922
|
+
uu as TypedWorker,
|
|
6923
|
+
al as URL,
|
|
6924
|
+
It as addSamples,
|
|
6925
|
+
fl as binary,
|
|
6926
|
+
$u as bounds,
|
|
6927
|
+
zu as box,
|
|
6928
|
+
il as buildQueryString,
|
|
6929
|
+
hl as change,
|
|
6765
6930
|
Ac as clamp,
|
|
6766
|
-
|
|
6931
|
+
Lu as compare,
|
|
6767
6932
|
Dc as convertDataType,
|
|
6768
|
-
|
|
6769
|
-
|
|
6770
|
-
|
|
6771
|
-
|
|
6772
|
-
|
|
6773
|
-
|
|
6774
|
-
|
|
6775
|
-
|
|
6933
|
+
Xu as convertRenderV,
|
|
6934
|
+
ll as createMockWorkers,
|
|
6935
|
+
tl as debounce,
|
|
6936
|
+
el as deep,
|
|
6937
|
+
qu as dimensions,
|
|
6938
|
+
Pu as direction,
|
|
6939
|
+
Hu as getEntries,
|
|
6940
|
+
yl as invert,
|
|
6776
6941
|
Vc as isCrudeSeries,
|
|
6777
|
-
|
|
6942
|
+
pr as isObject,
|
|
6778
6943
|
ss as isStringer,
|
|
6779
6944
|
oi as isTelemValue,
|
|
6780
|
-
|
|
6781
|
-
|
|
6782
|
-
|
|
6783
|
-
|
|
6784
|
-
|
|
6785
|
-
|
|
6786
|
-
|
|
6787
|
-
|
|
6788
|
-
|
|
6789
|
-
|
|
6790
|
-
|
|
6791
|
-
|
|
6792
|
-
|
|
6793
|
-
|
|
6794
|
-
|
|
6795
|
-
|
|
6945
|
+
sl as kv,
|
|
6946
|
+
Du as location,
|
|
6947
|
+
cl as nullToArr,
|
|
6948
|
+
dl as observe,
|
|
6949
|
+
Fu as position,
|
|
6950
|
+
Zu as primitiveIsZero,
|
|
6951
|
+
Qu as runtime,
|
|
6952
|
+
Yu as scale,
|
|
6953
|
+
pl as shallowCopy,
|
|
6954
|
+
Ku as spatial,
|
|
6955
|
+
rl as throttle,
|
|
6956
|
+
ol as toArray,
|
|
6957
|
+
Wu as typedArrayZ,
|
|
6958
|
+
nl as unique,
|
|
6959
|
+
Ju as unknownRecordZ,
|
|
6960
|
+
Vu as xy
|
|
6796
6961
|
};
|
|
6797
6962
|
//# sourceMappingURL=x.js.map
|