@oomol-lab/open-flow 0.1.0-beta.20 → 0.1.0-beta.22
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/dist/browser/{createResourceDialog-DlrAMxmo.js → createResourceDialog-CjuJryCv.js} +13 -13
- package/dist/browser/{flowChanges-jX3KYcb0.js → flowChanges-Tg1duLry.js} +2269 -2208
- package/dist/browser/{flowWorkspace-BIYwslVl.js → flowWorkspace-CoK10XHY.js} +306 -306
- package/dist/browser/{inputValues-BWfRHJWC.js → inputValues-CDiBMKu8.js} +1 -1
- package/dist/browser/workbench.js +23 -23
- package/dist/browser/{workbenchSelect-CwP6rphY.js → workbenchSelect-DEmv7SLW.js} +1 -1
- package/dist/common/control-api-conformance.js +871 -810
- package/dist/common/control-api.js +249 -188
- package/dist/common/flow-encoding.d.ts +6 -0
- package/dist/common/flow-encoding.js +1323 -1171
- package/dist/common/flow-semantics.js +1872 -1811
- package/dist/common/mcp.js +176 -115
- package/dist/common/provider-triggers.js +1312 -1247
- package/package.json +1 -1
|
@@ -68,7 +68,7 @@ function m(e) {
|
|
|
68
68
|
return typeof e == "object" && !!e && !Array.isArray(e);
|
|
69
69
|
}
|
|
70
70
|
var ee = /* @__PURE__*/ r(() => {
|
|
71
|
-
if (
|
|
71
|
+
if (E.jitless || typeof navigator < "u" && navigator?.userAgent?.includes("Cloudflare")) return !1;
|
|
72
72
|
try {
|
|
73
73
|
return Function(""), !0;
|
|
74
74
|
} catch {
|
|
@@ -465,44 +465,44 @@ function T(e, t, n, r) {
|
|
|
465
465
|
}
|
|
466
466
|
return Object.defineProperty(d, "init", { value: c }), Object.defineProperty(d, Symbol.hasInstance, { value: (t) => r?.Parent && t instanceof r.Parent ? !0 : t?._zod?.traits?.has(e) }), Object.defineProperty(d, "name", { value: e }), d;
|
|
467
467
|
}
|
|
468
|
-
var
|
|
468
|
+
var Pe = class extends Error {
|
|
469
469
|
constructor() {
|
|
470
470
|
super("Encountered Promise during synchronous parse. Use .parseAsync() instead.");
|
|
471
471
|
}
|
|
472
|
-
},
|
|
472
|
+
}, Fe = class extends Error {
|
|
473
473
|
constructor(e) {
|
|
474
474
|
super(`Encountered unidirectional transform during encode: ${e}`), this.name = "ZodEncodeError";
|
|
475
475
|
}
|
|
476
476
|
};
|
|
477
477
|
(Ae = globalThis).__zod_globalConfig ?? (Ae.__zod_globalConfig = {});
|
|
478
|
-
var
|
|
479
|
-
function
|
|
480
|
-
return e && Object.assign(
|
|
478
|
+
var E = globalThis.__zod_globalConfig;
|
|
479
|
+
function D(e) {
|
|
480
|
+
return e && Object.assign(E, e), E;
|
|
481
481
|
}
|
|
482
482
|
//#endregion
|
|
483
483
|
//#region ../../node_modules/.bun/zod@4.5.4/node_modules/zod/v4/core/errors.js
|
|
484
|
-
function
|
|
484
|
+
function Ie() {
|
|
485
485
|
let e = this._zod;
|
|
486
486
|
return e.message ??= JSON.stringify(e.def, n, 2), e.message;
|
|
487
487
|
}
|
|
488
|
-
function
|
|
488
|
+
function Le(e) {
|
|
489
489
|
this._zod.message = e;
|
|
490
490
|
}
|
|
491
|
-
var
|
|
492
|
-
get:
|
|
493
|
-
set:
|
|
491
|
+
var Re = {
|
|
492
|
+
get: Ie,
|
|
493
|
+
set: Le,
|
|
494
494
|
enumerable: !0,
|
|
495
495
|
configurable: !0
|
|
496
|
-
},
|
|
496
|
+
}, ze = {
|
|
497
497
|
value: void 0,
|
|
498
498
|
enumerable: !1
|
|
499
|
-
},
|
|
499
|
+
}, Be = {
|
|
500
500
|
value: void 0,
|
|
501
501
|
enumerable: !1
|
|
502
|
-
},
|
|
503
|
-
e.name = "$ZodError",
|
|
502
|
+
}, Ve = /* @__PURE__ */ new WeakSet([Object.prototype, Error.prototype]), He = (e, t) => {
|
|
503
|
+
e.name = "$ZodError", ze.value = e._zod, Object.defineProperty(e, "_zod", ze), Be.value = t, Object.defineProperty(e, "issues", Be), ze.value = void 0, Be.value = void 0, Object.defineProperty(e, "message", Re);
|
|
504
504
|
let n = Object.getPrototypeOf(e);
|
|
505
|
-
|
|
505
|
+
Ve.has(n) || (Ve.add(n), Object.defineProperty(n, "toString", {
|
|
506
506
|
configurable: !0,
|
|
507
507
|
enumerable: !1,
|
|
508
508
|
get() {
|
|
@@ -521,8 +521,8 @@ var Le = {
|
|
|
521
521
|
});
|
|
522
522
|
}
|
|
523
523
|
}));
|
|
524
|
-
},
|
|
525
|
-
function
|
|
524
|
+
}, Ue = T("$ZodError", He), We = T("$ZodError", He, void 0, { Parent: Error });
|
|
525
|
+
function Ge(e, t, n) {
|
|
526
526
|
return Object.prototype.hasOwnProperty.call(e, t) || (t === "__proto__" ? Object.defineProperty(e, t, {
|
|
527
527
|
value: n(),
|
|
528
528
|
writable: !0,
|
|
@@ -530,15 +530,15 @@ function We(e, t, n) {
|
|
|
530
530
|
configurable: !0
|
|
531
531
|
}) : e[t] = n()), e[t];
|
|
532
532
|
}
|
|
533
|
-
function
|
|
533
|
+
function Ke(e, t = (e) => e.message) {
|
|
534
534
|
let n = {}, r = [];
|
|
535
|
-
for (let i of e.issues) i.path.length > 0 ?
|
|
535
|
+
for (let i of e.issues) i.path.length > 0 ? Ge(n, i.path[0], () => []).push(t(i)) : r.push(t(i));
|
|
536
536
|
return {
|
|
537
537
|
formErrors: r,
|
|
538
538
|
fieldErrors: n
|
|
539
539
|
};
|
|
540
540
|
}
|
|
541
|
-
function
|
|
541
|
+
function qe(e, t = (e) => e.message) {
|
|
542
542
|
let n = { _errors: [] }, r = (e, i = []) => {
|
|
543
543
|
for (let a of e.issues) if (a.code === "invalid_union" && a.errors.length) a.errors.map((e) => r({ issues: e }, [...i, ...a.path]));
|
|
544
544
|
else if (a.code === "invalid_key") r({ issues: a.issues }, [...i, ...a.path]);
|
|
@@ -570,13 +570,13 @@ function Ke(e, t = (e) => e.message) {
|
|
|
570
570
|
}
|
|
571
571
|
//#endregion
|
|
572
572
|
//#region ../../node_modules/.bun/zod@4.5.4/node_modules/zod/v4/core/parse.js
|
|
573
|
-
function
|
|
573
|
+
function Je(e, t) {
|
|
574
574
|
return {
|
|
575
575
|
callee: t?.callee ?? e,
|
|
576
576
|
Err: t?.Err
|
|
577
577
|
};
|
|
578
578
|
}
|
|
579
|
-
var
|
|
579
|
+
var Ye = (e) => {
|
|
580
580
|
let t = (n, r, i, a) => {
|
|
581
581
|
let o = i ? {
|
|
582
582
|
...i,
|
|
@@ -585,15 +585,15 @@ var Je = (e) => {
|
|
|
585
585
|
value: r,
|
|
586
586
|
issues: []
|
|
587
587
|
}, o);
|
|
588
|
-
if (s instanceof Promise) throw new
|
|
588
|
+
if (s instanceof Promise) throw new Pe();
|
|
589
589
|
if (s.issues.length) {
|
|
590
|
-
let n = new ((a?.Err) ?? e)(s.issues.map((e) => x(e, o,
|
|
590
|
+
let n = new ((a?.Err) ?? e)(s.issues.map((e) => x(e, o, D())));
|
|
591
591
|
throw p(n, a?.callee ?? t), n;
|
|
592
592
|
}
|
|
593
593
|
return s.value;
|
|
594
594
|
};
|
|
595
595
|
return t;
|
|
596
|
-
},
|
|
596
|
+
}, Xe = (e) => {
|
|
597
597
|
let t = async (n, r, i, a) => {
|
|
598
598
|
let o = i ? {
|
|
599
599
|
...i,
|
|
@@ -603,13 +603,13 @@ var Je = (e) => {
|
|
|
603
603
|
issues: []
|
|
604
604
|
}, o);
|
|
605
605
|
if (s instanceof Promise && (s = await s), s.issues.length) {
|
|
606
|
-
let n = new ((a?.Err) ?? e)(s.issues.map((e) => x(e, o,
|
|
606
|
+
let n = new ((a?.Err) ?? e)(s.issues.map((e) => x(e, o, D())));
|
|
607
607
|
throw p(n, a?.callee ?? t), n;
|
|
608
608
|
}
|
|
609
609
|
return s.value;
|
|
610
610
|
};
|
|
611
611
|
return t;
|
|
612
|
-
},
|
|
612
|
+
}, Ze = (e) => (t, n, r) => {
|
|
613
613
|
let i = r ? {
|
|
614
614
|
...r,
|
|
615
615
|
async: !1
|
|
@@ -617,15 +617,15 @@ var Je = (e) => {
|
|
|
617
617
|
value: n,
|
|
618
618
|
issues: []
|
|
619
619
|
}, i);
|
|
620
|
-
if (a instanceof Promise) throw new
|
|
620
|
+
if (a instanceof Promise) throw new Pe();
|
|
621
621
|
return a.issues.length ? {
|
|
622
622
|
success: !1,
|
|
623
|
-
error: new (e ??
|
|
623
|
+
error: new (e ?? Ue)(a.issues.map((e) => x(e, i, D())))
|
|
624
624
|
} : {
|
|
625
625
|
success: !0,
|
|
626
626
|
data: a.value
|
|
627
627
|
};
|
|
628
|
-
},
|
|
628
|
+
}, Qe = /* @__PURE__*/ Ze(We), $e = (e) => async (t, n, r) => {
|
|
629
629
|
let i = r ? {
|
|
630
630
|
...r,
|
|
631
631
|
async: !0
|
|
@@ -635,98 +635,98 @@ var Je = (e) => {
|
|
|
635
635
|
}, i);
|
|
636
636
|
return a instanceof Promise && (a = await a), a.issues.length ? {
|
|
637
637
|
success: !1,
|
|
638
|
-
error: new e(a.issues.map((e) => x(e, i,
|
|
638
|
+
error: new e(a.issues.map((e) => x(e, i, D())))
|
|
639
639
|
} : {
|
|
640
640
|
success: !0,
|
|
641
641
|
data: a.value
|
|
642
642
|
};
|
|
643
|
-
},
|
|
644
|
-
let t =
|
|
643
|
+
}, et = /* @__PURE__*/ $e(We), tt = (e) => {
|
|
644
|
+
let t = Ye(e), n = (e, r, i, a) => {
|
|
645
645
|
let o = i ? {
|
|
646
646
|
...i,
|
|
647
647
|
direction: "backward"
|
|
648
648
|
} : { direction: "backward" };
|
|
649
|
-
return t(e, r, o,
|
|
649
|
+
return t(e, r, o, Je(n, a));
|
|
650
650
|
};
|
|
651
651
|
return n;
|
|
652
|
-
}, tt = (e) => {
|
|
653
|
-
let t = Je(e), n = (e, r, i, a) => t(e, r, i, qe(n, a));
|
|
654
|
-
return n;
|
|
655
652
|
}, nt = (e) => {
|
|
656
|
-
let t = Ye(e), n =
|
|
653
|
+
let t = Ye(e), n = (e, r, i, a) => t(e, r, i, Je(n, a));
|
|
654
|
+
return n;
|
|
655
|
+
}, rt = (e) => {
|
|
656
|
+
let t = Xe(e), n = async (e, r, i, a) => {
|
|
657
657
|
let o = i ? {
|
|
658
658
|
...i,
|
|
659
659
|
direction: "backward"
|
|
660
660
|
} : { direction: "backward" };
|
|
661
|
-
return await t(e, r, o,
|
|
661
|
+
return await t(e, r, o, Je(n, a));
|
|
662
662
|
};
|
|
663
663
|
return n;
|
|
664
|
-
},
|
|
665
|
-
let t =
|
|
664
|
+
}, it = (e) => {
|
|
665
|
+
let t = Xe(e), n = async (e, r, i, a) => await t(e, r, i, Je(n, a));
|
|
666
666
|
return n;
|
|
667
|
-
},
|
|
667
|
+
}, at = (e) => (t, n, r) => {
|
|
668
668
|
let i = r ? {
|
|
669
669
|
...r,
|
|
670
670
|
direction: "backward"
|
|
671
671
|
} : { direction: "backward" };
|
|
672
|
-
return
|
|
673
|
-
},
|
|
672
|
+
return Ze(e)(t, n, i);
|
|
673
|
+
}, ot = (e) => (t, n, r) => Ze(e)(t, n, r), st = (e) => async (t, n, r) => {
|
|
674
674
|
let i = r ? {
|
|
675
675
|
...r,
|
|
676
676
|
direction: "backward"
|
|
677
677
|
} : { direction: "backward" };
|
|
678
|
-
return
|
|
679
|
-
},
|
|
680
|
-
function
|
|
678
|
+
return $e(e)(t, n, i);
|
|
679
|
+
}, ct = (e) => async (t, n, r) => $e(e)(t, n, r), lt = /^[cC][0-9a-z]{6,}$/, ut = /^[0-9a-z]+$/, dt = /^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$/, ft = /^[0-9a-vA-V]{20}$/, pt = /^[A-Za-z0-9]{27}$/, mt = /^[a-zA-Z0-9_-]{21}$/;
|
|
680
|
+
function ht(e) {
|
|
681
681
|
return RegExp(`^[a-zA-Z0-9_-]{${e}}$`);
|
|
682
682
|
}
|
|
683
|
-
var
|
|
684
|
-
function
|
|
685
|
-
return new RegExp(
|
|
683
|
+
var gt = /^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/, _t = /^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/, vt = (e) => e ? RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`) : /^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/, yt = /^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/, bt = "^[\\p{Extended_Pictographic}\\p{Emoji_Component}]+$";
|
|
684
|
+
function xt() {
|
|
685
|
+
return new RegExp(bt, "u");
|
|
686
686
|
}
|
|
687
|
-
var
|
|
688
|
-
function
|
|
687
|
+
var St = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/, Ct = /^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/, wt = /^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/, Tt = /^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/, Et = /^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/, Dt = /^[A-Za-z0-9_-]*$/, Ot = /^https?$/, kt = /^\+[1-9]\d{6,14}$/, At = "(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))";
|
|
688
|
+
function jt(e) {
|
|
689
689
|
return RegExp(`^${e}$`);
|
|
690
690
|
}
|
|
691
|
-
var
|
|
692
|
-
function
|
|
691
|
+
var Mt = /*@__PURE__*/ jt(At);
|
|
692
|
+
function Nt(e) {
|
|
693
693
|
let t = "(?:[01]\\d|2[0-3]):[0-5]\\d";
|
|
694
694
|
return typeof e.precision == "number" ? e.precision === -1 ? `${t}` : e.precision === 0 ? `${t}:[0-5]\\d` : `${t}:[0-5]\\d\\.\\d{${e.precision}}` : e.seconds ? `${t}:[0-5]\\d(?:\\.\\d+)?` : `${t}(?::[0-5]\\d(?:\\.\\d+)?)?`;
|
|
695
695
|
}
|
|
696
|
-
function Nt(e) {
|
|
697
|
-
return RegExp(`^${Mt(e)}$`);
|
|
698
|
-
}
|
|
699
696
|
function Pt(e) {
|
|
697
|
+
return RegExp(`^${Nt(e)}$`);
|
|
698
|
+
}
|
|
699
|
+
function Ft(e) {
|
|
700
700
|
let t = ["Z"];
|
|
701
701
|
e.offset && t.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");
|
|
702
|
-
let n = `${
|
|
702
|
+
let n = `${Nt({
|
|
703
703
|
precision: e.precision,
|
|
704
704
|
seconds: !0
|
|
705
|
-
})}(?:${t.join("|")})`, r = e.local ? `${n}|${
|
|
706
|
-
return RegExp(`^${
|
|
705
|
+
})}(?:${t.join("|")})`, r = e.local ? `${n}|${Nt({ precision: e.precision })}` : n;
|
|
706
|
+
return RegExp(`^${At}T(?:${r})$`);
|
|
707
707
|
}
|
|
708
|
-
var
|
|
708
|
+
var It = (e) => {
|
|
709
709
|
let t = e ? `[\\s\\S]{${e?.minimum ?? 0},${e?.maximum ?? ""}}` : "[\\s\\S]*";
|
|
710
710
|
return RegExp(`^${t}$`);
|
|
711
|
-
},
|
|
711
|
+
}, Lt = /^-?\d+$/, Rt = /^-?\d+(?:\.\d+)?$/, zt = /^(?:true|false)$/i, Bt = /^null$/i, Vt = /^[^A-Z]*$/, Ht = /^[^a-z]*$/, O = /*@__PURE__*/ T("$ZodCheck", (e, t) => {
|
|
712
712
|
var n;
|
|
713
713
|
e._zod ??= {}, e._zod.def = t, (n = e._zod).onattach ?? (n.onattach = []);
|
|
714
|
-
}),
|
|
714
|
+
}), Ut = (e) => {
|
|
715
715
|
let t = e.value;
|
|
716
716
|
return !i(t) && t.length !== void 0;
|
|
717
|
-
},
|
|
717
|
+
}, Wt = {
|
|
718
718
|
number: "number",
|
|
719
719
|
bigint: "bigint",
|
|
720
720
|
object: "date"
|
|
721
|
-
},
|
|
722
|
-
|
|
723
|
-
let n =
|
|
721
|
+
}, Gt = /*@__PURE__*/ T("$ZodCheckLessThan", (e, t) => {
|
|
722
|
+
O.init(e, t);
|
|
723
|
+
let n = Wt[typeof t.value];
|
|
724
724
|
e._zod.onattach.push((e) => {
|
|
725
725
|
let n = e._zod.bag, r = (t.inclusive ? n.maximum : n.exclusiveMaximum) ?? Infinity;
|
|
726
726
|
t.value < r && (t.inclusive ? n.maximum = t.value : n.exclusiveMaximum = t.value);
|
|
727
727
|
}), e._zod.check = (r) => {
|
|
728
728
|
(t.inclusive ? r.value <= t.value : r.value < t.value) || r.issues.push({
|
|
729
|
-
origin:
|
|
729
|
+
origin: Wt[typeof r.value] ?? n,
|
|
730
730
|
code: "too_big",
|
|
731
731
|
maximum: typeof t.value == "object" ? t.value.getTime() : t.value,
|
|
732
732
|
input: r.value,
|
|
@@ -735,15 +735,15 @@ var Ft = (e) => {
|
|
|
735
735
|
continue: !t.abort
|
|
736
736
|
});
|
|
737
737
|
};
|
|
738
|
-
}),
|
|
739
|
-
|
|
740
|
-
let n =
|
|
738
|
+
}), Kt = /*@__PURE__*/ T("$ZodCheckGreaterThan", (e, t) => {
|
|
739
|
+
O.init(e, t);
|
|
740
|
+
let n = Wt[typeof t.value];
|
|
741
741
|
e._zod.onattach.push((e) => {
|
|
742
742
|
let n = e._zod.bag, r = (t.inclusive ? n.minimum : n.exclusiveMinimum) ?? -Infinity;
|
|
743
743
|
t.value > r && (t.inclusive ? n.minimum = t.value : n.exclusiveMinimum = t.value);
|
|
744
744
|
}), e._zod.check = (r) => {
|
|
745
745
|
(t.inclusive ? r.value >= t.value : r.value > t.value) || r.issues.push({
|
|
746
|
-
origin:
|
|
746
|
+
origin: Wt[typeof r.value] ?? n,
|
|
747
747
|
code: "too_small",
|
|
748
748
|
minimum: typeof t.value == "object" ? t.value.getTime() : t.value,
|
|
749
749
|
input: r.value,
|
|
@@ -752,8 +752,8 @@ var Ft = (e) => {
|
|
|
752
752
|
continue: !t.abort
|
|
753
753
|
});
|
|
754
754
|
};
|
|
755
|
-
}),
|
|
756
|
-
|
|
755
|
+
}), qt = /*@__PURE__*/ T("$ZodCheckMultipleOf", (e, t) => {
|
|
756
|
+
O.init(e, t), e._zod.onattach.push((e) => {
|
|
757
757
|
var n;
|
|
758
758
|
(n = e._zod.bag).multipleOf ?? (n.multipleOf = t.value);
|
|
759
759
|
}), e._zod.check = (n) => {
|
|
@@ -767,12 +767,12 @@ var Ft = (e) => {
|
|
|
767
767
|
continue: !t.abort
|
|
768
768
|
});
|
|
769
769
|
};
|
|
770
|
-
}),
|
|
771
|
-
|
|
770
|
+
}), Jt = /*@__PURE__*/ T("$ZodCheckNumberFormat", (e, t) => {
|
|
771
|
+
O.init(e, t), t.format = t.format || "float64";
|
|
772
772
|
let n = t.format?.includes("int"), r = n ? "int" : "number", [i, a] = ae[t.format];
|
|
773
773
|
e._zod.onattach.push((e) => {
|
|
774
774
|
let r = e._zod.bag;
|
|
775
|
-
r.format = t.format, r.minimum = i, r.maximum = a, n && (r.pattern =
|
|
775
|
+
r.format = t.format, r.minimum = i, r.maximum = a, n && (r.pattern = Lt);
|
|
776
776
|
}), e._zod.check = (o) => {
|
|
777
777
|
let s = o.value;
|
|
778
778
|
if (n) {
|
|
@@ -828,9 +828,9 @@ var Ft = (e) => {
|
|
|
828
828
|
continue: !t.abort
|
|
829
829
|
});
|
|
830
830
|
};
|
|
831
|
-
}),
|
|
831
|
+
}), Yt = /*@__PURE__*/ T("$ZodCheckMaxLength", (e, t) => {
|
|
832
832
|
var n;
|
|
833
|
-
|
|
833
|
+
O.init(e, t), (n = e._zod.def).when ?? (n.when = Ut), e._zod.onattach.push((e) => {
|
|
834
834
|
let n = e._zod.bag.maximum ?? Infinity;
|
|
835
835
|
t.maximum < n && (e._zod.bag.maximum = t.maximum);
|
|
836
836
|
}), e._zod.check = (n) => {
|
|
@@ -847,9 +847,9 @@ var Ft = (e) => {
|
|
|
847
847
|
continue: !t.abort
|
|
848
848
|
});
|
|
849
849
|
};
|
|
850
|
-
}),
|
|
850
|
+
}), Xt = /*@__PURE__*/ T("$ZodCheckMinLength", (e, t) => {
|
|
851
851
|
var n;
|
|
852
|
-
|
|
852
|
+
O.init(e, t), (n = e._zod.def).when ?? (n.when = Ut), e._zod.onattach.push((e) => {
|
|
853
853
|
let n = e._zod.bag.minimum ?? -Infinity;
|
|
854
854
|
t.minimum > n && (e._zod.bag.minimum = t.minimum);
|
|
855
855
|
}), e._zod.check = (n) => {
|
|
@@ -866,9 +866,9 @@ var Ft = (e) => {
|
|
|
866
866
|
continue: !t.abort
|
|
867
867
|
});
|
|
868
868
|
};
|
|
869
|
-
}),
|
|
869
|
+
}), Zt = /*@__PURE__*/ T("$ZodCheckLengthEquals", (e, t) => {
|
|
870
870
|
var n;
|
|
871
|
-
|
|
871
|
+
O.init(e, t), (n = e._zod.def).when ?? (n.when = Ut), e._zod.onattach.push((e) => {
|
|
872
872
|
let n = e._zod.bag;
|
|
873
873
|
n.minimum = t.length, n.maximum = t.length, n.length = t.length;
|
|
874
874
|
}), e._zod.check = (n) => {
|
|
@@ -891,9 +891,9 @@ var Ft = (e) => {
|
|
|
891
891
|
continue: !t.abort
|
|
892
892
|
});
|
|
893
893
|
};
|
|
894
|
-
}),
|
|
894
|
+
}), Qt = /*@__PURE__*/ T("$ZodCheckStringFormat", (e, t) => {
|
|
895
895
|
var n, r;
|
|
896
|
-
|
|
896
|
+
O.init(e, t), e._zod.onattach.push((e) => {
|
|
897
897
|
let n = e._zod.bag;
|
|
898
898
|
n.format = t.format, t.pattern && (n.patterns ??= /* @__PURE__ */ new Set(), n.patterns.add(t.pattern));
|
|
899
899
|
}), t.pattern ? (n = e._zod).check ?? (n.check = (n) => {
|
|
@@ -907,8 +907,8 @@ var Ft = (e) => {
|
|
|
907
907
|
continue: !t.abort
|
|
908
908
|
});
|
|
909
909
|
}) : (r = e._zod).check ?? (r.check = () => {});
|
|
910
|
-
}),
|
|
911
|
-
|
|
910
|
+
}), $t = /*@__PURE__*/ T("$ZodCheckRegex", (e, t) => {
|
|
911
|
+
Qt.init(e, t), e._zod.check = (n) => {
|
|
912
912
|
t.pattern.lastIndex = 0, !t.pattern.test(n.value) && n.issues.push({
|
|
913
913
|
origin: "string",
|
|
914
914
|
code: "invalid_format",
|
|
@@ -919,12 +919,12 @@ var Ft = (e) => {
|
|
|
919
919
|
continue: !t.abort
|
|
920
920
|
});
|
|
921
921
|
};
|
|
922
|
-
}),
|
|
923
|
-
t.pattern ??=
|
|
924
|
-
}),
|
|
925
|
-
t.pattern ??=
|
|
926
|
-
}),
|
|
927
|
-
|
|
922
|
+
}), en = /*@__PURE__*/ T("$ZodCheckLowerCase", (e, t) => {
|
|
923
|
+
t.pattern ??= Vt, Qt.init(e, t);
|
|
924
|
+
}), tn = /*@__PURE__*/ T("$ZodCheckUpperCase", (e, t) => {
|
|
925
|
+
t.pattern ??= Ht, Qt.init(e, t);
|
|
926
|
+
}), nn = /*@__PURE__*/ T("$ZodCheckIncludes", (e, t) => {
|
|
927
|
+
O.init(e, t);
|
|
928
928
|
let n = g(t.includes), r = new RegExp(typeof t.position == "number" ? `^.{${t.position},}${n}` : n);
|
|
929
929
|
t.pattern = r, e._zod.onattach.push((e) => {
|
|
930
930
|
let t = e._zod.bag;
|
|
@@ -940,8 +940,8 @@ var Ft = (e) => {
|
|
|
940
940
|
continue: !t.abort
|
|
941
941
|
});
|
|
942
942
|
};
|
|
943
|
-
}),
|
|
944
|
-
|
|
943
|
+
}), rn = /*@__PURE__*/ T("$ZodCheckStartsWith", (e, t) => {
|
|
944
|
+
O.init(e, t);
|
|
945
945
|
let n = RegExp(`^${g(t.prefix)}.*`);
|
|
946
946
|
t.pattern ??= n, e._zod.onattach.push((e) => {
|
|
947
947
|
let t = e._zod.bag;
|
|
@@ -957,8 +957,8 @@ var Ft = (e) => {
|
|
|
957
957
|
continue: !t.abort
|
|
958
958
|
});
|
|
959
959
|
};
|
|
960
|
-
}),
|
|
961
|
-
|
|
960
|
+
}), an = /*@__PURE__*/ T("$ZodCheckEndsWith", (e, t) => {
|
|
961
|
+
O.init(e, t);
|
|
962
962
|
let n = RegExp(`.*${g(t.suffix)}$`);
|
|
963
963
|
t.pattern ??= n, e._zod.onattach.push((e) => {
|
|
964
964
|
let t = e._zod.bag;
|
|
@@ -974,11 +974,11 @@ var Ft = (e) => {
|
|
|
974
974
|
continue: !t.abort
|
|
975
975
|
});
|
|
976
976
|
};
|
|
977
|
-
}),
|
|
978
|
-
|
|
977
|
+
}), on = /*@__PURE__*/ T("$ZodCheckOverwrite", (e, t) => {
|
|
978
|
+
O.init(e, t), e._zod.check = (e) => {
|
|
979
979
|
e.value = t.tx(e.value);
|
|
980
980
|
};
|
|
981
|
-
}),
|
|
981
|
+
}), sn = class {
|
|
982
982
|
constructor(e = [], t = {}) {
|
|
983
983
|
this.content = [], this.indent = 0, this.args = e, this.closed = t;
|
|
984
984
|
}
|
|
@@ -997,13 +997,13 @@ var Ft = (e) => {
|
|
|
997
997
|
let e = Function, t = this?.content ?? [""];
|
|
998
998
|
return new e(...Object.keys(this.closed), `return function (${this.args.join(", ")}) {\n${t.join("\n")}\n};`)(...Object.values(this.closed));
|
|
999
999
|
}
|
|
1000
|
-
},
|
|
1000
|
+
}, cn = {
|
|
1001
1001
|
major: 4,
|
|
1002
1002
|
minor: 5,
|
|
1003
1003
|
patch: 4
|
|
1004
|
-
},
|
|
1004
|
+
}, k = /*@__PURE__*/ T("$ZodType", (e, t) => {
|
|
1005
1005
|
var n;
|
|
1006
|
-
e ??= {}, e._zod.def = t, e._zod.bag = e._zod.bag || {}, e._zod.version =
|
|
1006
|
+
e ??= {}, e._zod.def = t, e._zod.bag = e._zod.bag || {}, e._zod.version = cn;
|
|
1007
1007
|
let r = e._zod.def.checks, i = e._zod.traits.has("$ZodCheck") ? [e, ...r ?? []] : r?.length ? [...r] : [];
|
|
1008
1008
|
for (let t of i) for (let n of t._zod.onattach) n(e);
|
|
1009
1009
|
if (i.length === 0) (n = e._zod).deferred ?? (n.deferred = []), e._zod.deferred?.push(() => {
|
|
@@ -1018,7 +1018,7 @@ var Ft = (e) => {
|
|
|
1018
1018
|
if (pe(t) || !o._zod.def.when(t)) continue;
|
|
1019
1019
|
} else if (i) continue;
|
|
1020
1020
|
let n = t.issues.length, s = o._zod.check(t);
|
|
1021
|
-
if (s instanceof Promise && r?.async === !1) throw new
|
|
1021
|
+
if (s instanceof Promise && r?.async === !1) throw new Pe();
|
|
1022
1022
|
if (a || s instanceof Promise) a = (a ?? Promise.resolve()).then(async () => {
|
|
1023
1023
|
await s, t.issues.length !== n && (he(t.issues, n, e), i ||= y(t, n));
|
|
1024
1024
|
});
|
|
@@ -1032,7 +1032,7 @@ var Ft = (e) => {
|
|
|
1032
1032
|
if (y(n)) return n.aborted = !0, n;
|
|
1033
1033
|
let o = t(r, i, a);
|
|
1034
1034
|
if (o instanceof Promise) {
|
|
1035
|
-
if (a.async === !1) throw new
|
|
1035
|
+
if (a.async === !1) throw new Pe();
|
|
1036
1036
|
return o.then((t) => e._zod.parse(t, a));
|
|
1037
1037
|
}
|
|
1038
1038
|
return e._zod.parse(o, a);
|
|
@@ -1051,7 +1051,7 @@ var Ft = (e) => {
|
|
|
1051
1051
|
}
|
|
1052
1052
|
let o = e._zod.parse(r, a);
|
|
1053
1053
|
if (o instanceof Promise) {
|
|
1054
|
-
if (a.async === !1) throw new
|
|
1054
|
+
if (a.async === !1) throw new Pe();
|
|
1055
1055
|
return o.then((e) => t(e, i, a));
|
|
1056
1056
|
}
|
|
1057
1057
|
return t(o, i, a);
|
|
@@ -1059,27 +1059,27 @@ var Ft = (e) => {
|
|
|
1059
1059
|
}
|
|
1060
1060
|
}, {
|
|
1061
1061
|
get "~standard"() {
|
|
1062
|
-
return Se(this, "~standard",
|
|
1062
|
+
return Se(this, "~standard", un(this));
|
|
1063
1063
|
},
|
|
1064
1064
|
set "~standard"(e) {
|
|
1065
1065
|
S(this, "~standard", e);
|
|
1066
1066
|
}
|
|
1067
|
-
}),
|
|
1068
|
-
function
|
|
1067
|
+
}), ln = (e) => e.success ? { value: e.data } : { issues: e.error?.issues };
|
|
1068
|
+
function un(e) {
|
|
1069
1069
|
return {
|
|
1070
1070
|
validate: (t) => {
|
|
1071
1071
|
try {
|
|
1072
|
-
return
|
|
1072
|
+
return ln(Qe(e, t));
|
|
1073
1073
|
} catch {
|
|
1074
|
-
return
|
|
1074
|
+
return et(e, t).then(ln);
|
|
1075
1075
|
}
|
|
1076
1076
|
},
|
|
1077
1077
|
vendor: "zod",
|
|
1078
1078
|
version: 1
|
|
1079
1079
|
};
|
|
1080
1080
|
}
|
|
1081
|
-
var
|
|
1082
|
-
|
|
1081
|
+
var dn = /*@__PURE__*/ T("$ZodString", (e, t) => {
|
|
1082
|
+
k.init(e, t), e._zod.pattern = [...e?._zod.bag?.patterns ?? []].pop() ?? It(e._zod.bag), e._zod.parse = (n, r) => {
|
|
1083
1083
|
if (t.coerce) try {
|
|
1084
1084
|
n.value = String(n.value);
|
|
1085
1085
|
} catch {}
|
|
@@ -1090,11 +1090,11 @@ var un = /*@__PURE__*/ T("$ZodString", (e, t) => {
|
|
|
1090
1090
|
inst: e
|
|
1091
1091
|
}), n;
|
|
1092
1092
|
};
|
|
1093
|
-
}),
|
|
1094
|
-
|
|
1095
|
-
}),
|
|
1096
|
-
t.pattern ??=
|
|
1097
|
-
}),
|
|
1093
|
+
}), A = /*@__PURE__*/ T("$ZodStringFormat", (e, t) => {
|
|
1094
|
+
Qt.init(e, t), dn.init(e, t);
|
|
1095
|
+
}), fn = /*@__PURE__*/ T("$ZodGUID", (e, t) => {
|
|
1096
|
+
t.pattern ??= _t, A.init(e, t);
|
|
1097
|
+
}), pn = /*@__PURE__*/ T("$ZodUUID", (e, t) => {
|
|
1098
1098
|
if (t.version) {
|
|
1099
1099
|
let e = {
|
|
1100
1100
|
v1: 1,
|
|
@@ -1107,34 +1107,34 @@ var un = /*@__PURE__*/ T("$ZodString", (e, t) => {
|
|
|
1107
1107
|
v8: 8
|
|
1108
1108
|
}[t.version];
|
|
1109
1109
|
if (e === void 0) throw Error(`Invalid UUID version: "${t.version}"`);
|
|
1110
|
-
t.pattern ??=
|
|
1111
|
-
} else t.pattern ??=
|
|
1112
|
-
|
|
1113
|
-
}),
|
|
1114
|
-
t.pattern ??=
|
|
1110
|
+
t.pattern ??= vt(e);
|
|
1111
|
+
} else t.pattern ??= vt();
|
|
1112
|
+
A.init(e, t);
|
|
1113
|
+
}), mn = /*@__PURE__*/ T("$ZodEmail", (e, t) => {
|
|
1114
|
+
t.pattern ??= yt, A.init(e, t);
|
|
1115
1115
|
});
|
|
1116
|
-
function
|
|
1117
|
-
if (!t.normalize && t.protocol?.source ===
|
|
1116
|
+
function hn(e, t) {
|
|
1117
|
+
if (!t.normalize && t.protocol?.source === Ot.source && !/^https?:\/\//i.test(e)) return 1;
|
|
1118
1118
|
try {
|
|
1119
1119
|
return new URL(e);
|
|
1120
1120
|
} catch {
|
|
1121
1121
|
return 2;
|
|
1122
1122
|
}
|
|
1123
1123
|
}
|
|
1124
|
-
var
|
|
1125
|
-
function
|
|
1126
|
-
return e.replace(
|
|
1124
|
+
var gn = /[\t\n\r]/g;
|
|
1125
|
+
function _n(e) {
|
|
1126
|
+
return e.replace(gn, "");
|
|
1127
1127
|
}
|
|
1128
|
-
function
|
|
1128
|
+
function vn(e, t) {
|
|
1129
1129
|
return t.lastIndex = 0, t.test(e.hostname);
|
|
1130
1130
|
}
|
|
1131
|
-
function
|
|
1131
|
+
function yn(e, t) {
|
|
1132
1132
|
return t.lastIndex = 0, t.test(e.protocol.endsWith(":") ? e.protocol.slice(0, -1) : e.protocol);
|
|
1133
1133
|
}
|
|
1134
|
-
var
|
|
1135
|
-
|
|
1134
|
+
var bn = /*@__PURE__*/ T("$ZodURL", (e, t) => {
|
|
1135
|
+
A.init(e, t), e._zod.check = (n) => {
|
|
1136
1136
|
try {
|
|
1137
|
-
let r = n.value.trim(), i =
|
|
1137
|
+
let r = n.value.trim(), i = hn(r, t);
|
|
1138
1138
|
if (i === 1) {
|
|
1139
1139
|
n.issues.push({
|
|
1140
1140
|
code: "invalid_format",
|
|
@@ -1156,7 +1156,7 @@ var yn = /*@__PURE__*/ T("$ZodURL", (e, t) => {
|
|
|
1156
1156
|
});
|
|
1157
1157
|
return;
|
|
1158
1158
|
}
|
|
1159
|
-
t.hostname && !
|
|
1159
|
+
t.hostname && !vn(i, t.hostname) && n.issues.push({
|
|
1160
1160
|
code: "invalid_format",
|
|
1161
1161
|
format: "url",
|
|
1162
1162
|
note: "Invalid hostname",
|
|
@@ -1164,7 +1164,7 @@ var yn = /*@__PURE__*/ T("$ZodURL", (e, t) => {
|
|
|
1164
1164
|
input: n.value,
|
|
1165
1165
|
inst: e,
|
|
1166
1166
|
continue: !t.abort
|
|
1167
|
-
}), t.protocol && !
|
|
1167
|
+
}), t.protocol && !yn(i, t.protocol) && n.issues.push({
|
|
1168
1168
|
code: "invalid_format",
|
|
1169
1169
|
format: "url",
|
|
1170
1170
|
note: "Invalid protocol",
|
|
@@ -1172,7 +1172,7 @@ var yn = /*@__PURE__*/ T("$ZodURL", (e, t) => {
|
|
|
1172
1172
|
input: n.value,
|
|
1173
1173
|
inst: e,
|
|
1174
1174
|
continue: !t.abort
|
|
1175
|
-
}), n.value = t.normalize ? i.href :
|
|
1175
|
+
}), n.value = t.normalize ? i.href : _n(r);
|
|
1176
1176
|
return;
|
|
1177
1177
|
} catch {
|
|
1178
1178
|
n.issues.push({
|
|
@@ -1184,45 +1184,45 @@ var yn = /*@__PURE__*/ T("$ZodURL", (e, t) => {
|
|
|
1184
1184
|
});
|
|
1185
1185
|
}
|
|
1186
1186
|
};
|
|
1187
|
-
}),
|
|
1188
|
-
t.pattern ??=
|
|
1189
|
-
}),
|
|
1187
|
+
}), xn = /*@__PURE__*/ T("$ZodEmoji", (e, t) => {
|
|
1188
|
+
t.pattern ??= xt(), A.init(e, t);
|
|
1189
|
+
}), Sn = /*@__PURE__*/ T("$ZodNanoID", (e, t) => {
|
|
1190
1190
|
if (t.length !== void 0 && (!Number.isInteger(t.length) || t.length < 1)) throw Error(`Invalid nanoid length: ${t.length}`);
|
|
1191
|
-
t.pattern ??= t.length === void 0 ?
|
|
1192
|
-
}),
|
|
1193
|
-
t.pattern ??=
|
|
1194
|
-
}),
|
|
1195
|
-
t.pattern ??=
|
|
1196
|
-
}),
|
|
1197
|
-
t.pattern ??=
|
|
1198
|
-
}),
|
|
1199
|
-
t.pattern ??=
|
|
1200
|
-
}),
|
|
1201
|
-
t.pattern ??=
|
|
1202
|
-
}),
|
|
1203
|
-
t.pattern ??=
|
|
1191
|
+
t.pattern ??= t.length === void 0 ? mt : ht(t.length), A.init(e, t);
|
|
1192
|
+
}), Cn = /*@__PURE__*/ T("$ZodCUID", (e, t) => {
|
|
1193
|
+
t.pattern ??= lt, A.init(e, t);
|
|
1194
|
+
}), wn = /*@__PURE__*/ T("$ZodCUID2", (e, t) => {
|
|
1195
|
+
t.pattern ??= ut, A.init(e, t);
|
|
1196
|
+
}), Tn = /*@__PURE__*/ T("$ZodULID", (e, t) => {
|
|
1197
|
+
t.pattern ??= dt, A.init(e, t);
|
|
1198
|
+
}), En = /*@__PURE__*/ T("$ZodXID", (e, t) => {
|
|
1199
|
+
t.pattern ??= ft, A.init(e, t);
|
|
1200
|
+
}), Dn = /*@__PURE__*/ T("$ZodKSUID", (e, t) => {
|
|
1201
|
+
t.pattern ??= pt, A.init(e, t);
|
|
1202
|
+
}), On = /*@__PURE__*/ T("$ZodISODateTime", (e, t) => {
|
|
1203
|
+
t.pattern ??= Ft(t), A.init(e, t), (t.local || t.precision === -1) && (e._zod.bag.laxFormat = !0, e._zod.onattach.push((e) => {
|
|
1204
1204
|
e._zod.bag.laxFormat = !0;
|
|
1205
1205
|
}));
|
|
1206
|
-
}),
|
|
1207
|
-
t.pattern ??=
|
|
1208
|
-
}),
|
|
1209
|
-
t.pattern ??=
|
|
1210
|
-
}),
|
|
1211
|
-
t.pattern ??=
|
|
1212
|
-
}),
|
|
1213
|
-
t.pattern ??=
|
|
1214
|
-
}),
|
|
1215
|
-
function
|
|
1216
|
-
if (!
|
|
1206
|
+
}), kn = /*@__PURE__*/ T("$ZodISODate", (e, t) => {
|
|
1207
|
+
t.pattern ??= Mt, A.init(e, t);
|
|
1208
|
+
}), An = /*@__PURE__*/ T("$ZodISOTime", (e, t) => {
|
|
1209
|
+
t.pattern ??= Pt(t), A.init(e, t);
|
|
1210
|
+
}), jn = /*@__PURE__*/ T("$ZodISODuration", (e, t) => {
|
|
1211
|
+
t.pattern ??= gt, A.init(e, t);
|
|
1212
|
+
}), Mn = /*@__PURE__*/ T("$ZodIPv4", (e, t) => {
|
|
1213
|
+
t.pattern ??= St, A.init(e, t), e._zod.bag.format = "ipv4";
|
|
1214
|
+
}), Nn = /^[0-9a-fA-F:.]+$/;
|
|
1215
|
+
function Pn(e) {
|
|
1216
|
+
if (!Nn.test(e)) return !1;
|
|
1217
1217
|
try {
|
|
1218
1218
|
return new URL(`http://[${e}]`), !0;
|
|
1219
1219
|
} catch {
|
|
1220
1220
|
return !1;
|
|
1221
1221
|
}
|
|
1222
1222
|
}
|
|
1223
|
-
var
|
|
1224
|
-
t.pattern ??=
|
|
1225
|
-
|
|
1223
|
+
var Fn = /*@__PURE__*/ T("$ZodIPv6", (e, t) => {
|
|
1224
|
+
t.pattern ??= Ct, A.init(e, t), e._zod.bag.format = "ipv6", e._zod.check = (n) => {
|
|
1225
|
+
Pn(n.value) || n.issues.push({
|
|
1226
1226
|
code: "invalid_format",
|
|
1227
1227
|
format: "ipv6",
|
|
1228
1228
|
input: n.value,
|
|
@@ -1230,20 +1230,20 @@ var Pn = /*@__PURE__*/ T("$ZodIPv6", (e, t) => {
|
|
|
1230
1230
|
continue: !t.abort
|
|
1231
1231
|
});
|
|
1232
1232
|
};
|
|
1233
|
-
}),
|
|
1234
|
-
t.pattern ??=
|
|
1233
|
+
}), In = /*@__PURE__*/ T("$ZodCIDRv4", (e, t) => {
|
|
1234
|
+
t.pattern ??= wt, A.init(e, t);
|
|
1235
1235
|
});
|
|
1236
|
-
function
|
|
1236
|
+
function Ln(e) {
|
|
1237
1237
|
let t = e.split("/");
|
|
1238
1238
|
if (t.length !== 2) return !1;
|
|
1239
1239
|
let [n, r] = t;
|
|
1240
1240
|
if (!r) return !1;
|
|
1241
1241
|
let i = Number(r);
|
|
1242
|
-
return `${i}` !== r || i < 0 || i > 128 ? !1 :
|
|
1242
|
+
return `${i}` !== r || i < 0 || i > 128 ? !1 : Pn(n);
|
|
1243
1243
|
}
|
|
1244
|
-
var
|
|
1245
|
-
t.pattern ??=
|
|
1246
|
-
|
|
1244
|
+
var Rn = /*@__PURE__*/ T("$ZodCIDRv6", (e, t) => {
|
|
1245
|
+
t.pattern ??= Tt, A.init(e, t), e._zod.check = (n) => {
|
|
1246
|
+
Ln(n.value) || n.issues.push({
|
|
1247
1247
|
code: "invalid_format",
|
|
1248
1248
|
format: "cidrv6",
|
|
1249
1249
|
input: n.value,
|
|
@@ -1252,7 +1252,7 @@ var Ln = /*@__PURE__*/ T("$ZodCIDRv6", (e, t) => {
|
|
|
1252
1252
|
});
|
|
1253
1253
|
};
|
|
1254
1254
|
});
|
|
1255
|
-
function
|
|
1255
|
+
function zn(e) {
|
|
1256
1256
|
if (e === "") return !0;
|
|
1257
1257
|
if (/\s/.test(e) || e.length % 4 != 0) return !1;
|
|
1258
1258
|
try {
|
|
@@ -1261,9 +1261,9 @@ function Rn(e) {
|
|
|
1261
1261
|
return !1;
|
|
1262
1262
|
}
|
|
1263
1263
|
}
|
|
1264
|
-
var
|
|
1265
|
-
t.pattern ??=
|
|
1266
|
-
|
|
1264
|
+
var Bn = /*@__PURE__*/ T("$ZodBase64", (e, t) => {
|
|
1265
|
+
t.pattern ??= Et, A.init(e, t), e._zod.bag.contentEncoding = "base64", e._zod.check = (n) => {
|
|
1266
|
+
zn(n.value) || n.issues.push({
|
|
1267
1267
|
code: "invalid_format",
|
|
1268
1268
|
format: "base64",
|
|
1269
1269
|
input: n.value,
|
|
@@ -1272,14 +1272,14 @@ var zn = /*@__PURE__*/ T("$ZodBase64", (e, t) => {
|
|
|
1272
1272
|
});
|
|
1273
1273
|
};
|
|
1274
1274
|
});
|
|
1275
|
-
function
|
|
1276
|
-
if (!
|
|
1275
|
+
function Vn(e) {
|
|
1276
|
+
if (!Dt.test(e)) return !1;
|
|
1277
1277
|
let t = e.replace(/[-_]/g, (e) => e === "-" ? "+" : "/");
|
|
1278
|
-
return
|
|
1278
|
+
return zn(t.padEnd(Math.ceil(t.length / 4) * 4, "="));
|
|
1279
1279
|
}
|
|
1280
|
-
var
|
|
1281
|
-
t.pattern ??=
|
|
1282
|
-
|
|
1280
|
+
var Hn = /*@__PURE__*/ T("$ZodBase64URL", (e, t) => {
|
|
1281
|
+
t.pattern ??= Dt, A.init(e, t), e._zod.bag.contentEncoding = "base64url", e._zod.check = (n) => {
|
|
1282
|
+
Vn(n.value) || n.issues.push({
|
|
1283
1283
|
code: "invalid_format",
|
|
1284
1284
|
format: "base64url",
|
|
1285
1285
|
input: n.value,
|
|
@@ -1287,10 +1287,10 @@ var Vn = /*@__PURE__*/ T("$ZodBase64URL", (e, t) => {
|
|
|
1287
1287
|
continue: !t.abort
|
|
1288
1288
|
});
|
|
1289
1289
|
};
|
|
1290
|
-
}),
|
|
1291
|
-
t.pattern ??=
|
|
1290
|
+
}), Un = /*@__PURE__*/ T("$ZodE164", (e, t) => {
|
|
1291
|
+
t.pattern ??= kt, A.init(e, t);
|
|
1292
1292
|
});
|
|
1293
|
-
function
|
|
1293
|
+
function Wn(e, t = null) {
|
|
1294
1294
|
try {
|
|
1295
1295
|
let n = e.split(".");
|
|
1296
1296
|
if (n.length !== 3) return !1;
|
|
@@ -1302,9 +1302,9 @@ function Un(e, t = null) {
|
|
|
1302
1302
|
return !1;
|
|
1303
1303
|
}
|
|
1304
1304
|
}
|
|
1305
|
-
var
|
|
1306
|
-
|
|
1307
|
-
|
|
1305
|
+
var Gn = /*@__PURE__*/ T("$ZodJWT", (e, t) => {
|
|
1306
|
+
A.init(e, t), e._zod.check = (n) => {
|
|
1307
|
+
Wn(n.value, t.alg) || n.issues.push({
|
|
1308
1308
|
code: "invalid_format",
|
|
1309
1309
|
format: "jwt",
|
|
1310
1310
|
input: n.value,
|
|
@@ -1312,8 +1312,8 @@ var Wn = /*@__PURE__*/ T("$ZodJWT", (e, t) => {
|
|
|
1312
1312
|
continue: !t.abort
|
|
1313
1313
|
});
|
|
1314
1314
|
};
|
|
1315
|
-
}),
|
|
1316
|
-
|
|
1315
|
+
}), Kn = /*@__PURE__*/ T("$ZodNumber", (e, t) => {
|
|
1316
|
+
k.init(e, t), e._zod.pattern = e._zod.bag.pattern ?? Rt, e._zod.parse = (n, r) => {
|
|
1317
1317
|
if (t.coerce) try {
|
|
1318
1318
|
n.value = Number(n.value);
|
|
1319
1319
|
} catch {}
|
|
@@ -1328,10 +1328,10 @@ var Wn = /*@__PURE__*/ T("$ZodJWT", (e, t) => {
|
|
|
1328
1328
|
...a ? { received: a } : {}
|
|
1329
1329
|
}), n;
|
|
1330
1330
|
};
|
|
1331
|
-
}),
|
|
1332
|
-
|
|
1333
|
-
}),
|
|
1334
|
-
|
|
1331
|
+
}), qn = /*@__PURE__*/ T("$ZodNumberFormat", (e, t) => {
|
|
1332
|
+
Jt.init(e, t), Kn.init(e, t);
|
|
1333
|
+
}), Jn = /*@__PURE__*/ T("$ZodBoolean", (e, t) => {
|
|
1334
|
+
k.init(e, t), e._zod.pattern = zt, e._zod.parse = (n, r) => {
|
|
1335
1335
|
if (t.coerce) try {
|
|
1336
1336
|
n.value = !!n.value;
|
|
1337
1337
|
} catch {}
|
|
@@ -1343,8 +1343,8 @@ var Wn = /*@__PURE__*/ T("$ZodJWT", (e, t) => {
|
|
|
1343
1343
|
inst: e
|
|
1344
1344
|
}), n;
|
|
1345
1345
|
};
|
|
1346
|
-
}),
|
|
1347
|
-
|
|
1346
|
+
}), Yn = /*@__PURE__*/ T("$ZodNull", (e, t) => {
|
|
1347
|
+
k.init(e, t), e._zod.pattern = Bt, e._zod.values = /* @__PURE__ */ new Set([null]), e._zod.parse = (t, n) => {
|
|
1348
1348
|
let r = t.value;
|
|
1349
1349
|
return r === null || t.issues.push({
|
|
1350
1350
|
expected: "null",
|
|
@@ -1353,22 +1353,22 @@ var Wn = /*@__PURE__*/ T("$ZodJWT", (e, t) => {
|
|
|
1353
1353
|
inst: e
|
|
1354
1354
|
}), t;
|
|
1355
1355
|
};
|
|
1356
|
-
}),
|
|
1357
|
-
|
|
1358
|
-
}),
|
|
1359
|
-
|
|
1356
|
+
}), Xn = /*@__PURE__*/ T("$ZodUnknown", (e, t) => {
|
|
1357
|
+
k.init(e, t), e._zod.parse = (e) => e;
|
|
1358
|
+
}), Zn = /*@__PURE__*/ T("$ZodNever", (e, t) => {
|
|
1359
|
+
k.init(e, t), e._zod.parse = (t, n) => (t.issues.push({
|
|
1360
1360
|
expected: "never",
|
|
1361
1361
|
code: "invalid_type",
|
|
1362
1362
|
input: t.value,
|
|
1363
1363
|
inst: e
|
|
1364
1364
|
}), t);
|
|
1365
1365
|
});
|
|
1366
|
-
function
|
|
1366
|
+
function Qn(e, t, n) {
|
|
1367
1367
|
e.issues.length && t.issues.push(...b(n, e.issues)), t.value[n] = e.value;
|
|
1368
1368
|
}
|
|
1369
|
-
var
|
|
1370
|
-
|
|
1371
|
-
let n =
|
|
1369
|
+
var $n = /*@__PURE__*/ T("$ZodArray", (e, t) => {
|
|
1370
|
+
k.init(e, t);
|
|
1371
|
+
let n = E.memoizer;
|
|
1372
1372
|
n?.attach(e), e._zod.parse = (r, i) => {
|
|
1373
1373
|
let a = r.value;
|
|
1374
1374
|
if (!Array.isArray(a)) return r.issues.push({
|
|
@@ -1384,12 +1384,12 @@ var Qn = /*@__PURE__*/ T("$ZodArray", (e, t) => {
|
|
|
1384
1384
|
value: n,
|
|
1385
1385
|
issues: []
|
|
1386
1386
|
}, i);
|
|
1387
|
-
s instanceof Promise ? o.push(s.then((t) =>
|
|
1387
|
+
s instanceof Promise ? o.push(s.then((t) => Qn(t, r, e))) : Qn(s, r, e);
|
|
1388
1388
|
}
|
|
1389
1389
|
return o.length ? Promise.all(o).then(() => r) : r;
|
|
1390
1390
|
};
|
|
1391
1391
|
});
|
|
1392
|
-
function
|
|
1392
|
+
function er(e, t, n, r, i, a) {
|
|
1393
1393
|
let o = n in r, s = a === "optional";
|
|
1394
1394
|
if (!(!o && s && i === "optional")) {
|
|
1395
1395
|
if (e.issues.length) {
|
|
@@ -1408,9 +1408,9 @@ function $n(e, t, n, r, i, a) {
|
|
|
1408
1408
|
e.value === void 0 ? o && (t.value[n] = void 0) : t.value[n] = e.value;
|
|
1409
1409
|
}
|
|
1410
1410
|
}
|
|
1411
|
-
var
|
|
1412
|
-
function
|
|
1413
|
-
let t = Object.keys(e.shape), n = Object.getOwnPropertySymbols(e.shape), r = n.length ? n :
|
|
1411
|
+
var tr = [];
|
|
1412
|
+
function nr(e) {
|
|
1413
|
+
let t = Object.keys(e.shape), n = Object.getOwnPropertySymbols(e.shape), r = n.length ? n : tr, i = r.length ? [...t, ...r] : t;
|
|
1414
1414
|
for (let t of i) if (!e.shape?.[t]?._zod?.traits?.has("$ZodType")) throw Error(`Invalid element at key "${String(t)}": expected a Zod schema`);
|
|
1415
1415
|
let a = ie(e.shape);
|
|
1416
1416
|
return {
|
|
@@ -1422,7 +1422,7 @@ function tr(e) {
|
|
|
1422
1422
|
optionalKeys: new Set(a)
|
|
1423
1423
|
};
|
|
1424
1424
|
}
|
|
1425
|
-
function
|
|
1425
|
+
function rr(e, t, n, r, i, a) {
|
|
1426
1426
|
let o = [], s = i.keySet, c = i.catchall._zod, l = c.def.type, u = c.optin, d = c.optout;
|
|
1427
1427
|
for (let i in t) {
|
|
1428
1428
|
if (s.has(i)) continue;
|
|
@@ -1438,7 +1438,7 @@ function nr(e, t, n, r, i, a) {
|
|
|
1438
1438
|
value: t[i],
|
|
1439
1439
|
issues: []
|
|
1440
1440
|
}, r);
|
|
1441
|
-
a instanceof Promise ? e.push(a.then((e) =>
|
|
1441
|
+
a instanceof Promise ? e.push(a.then((e) => er(e, n, i, t, u, d))) : er(a, n, i, t, u, d);
|
|
1442
1442
|
}
|
|
1443
1443
|
return o.length && n.issues.push({
|
|
1444
1444
|
code: "unrecognized_keys",
|
|
@@ -1448,15 +1448,15 @@ function nr(e, t, n, r, i, a) {
|
|
|
1448
1448
|
continue: !0
|
|
1449
1449
|
}), e.length ? Promise.all(e).then(() => n) : n;
|
|
1450
1450
|
}
|
|
1451
|
-
var
|
|
1452
|
-
if (
|
|
1451
|
+
var ir = /* @__PURE__ */ new WeakMap(), ar = /*@__PURE__*/ T("$ZodObject", (e, t) => {
|
|
1452
|
+
if (k.init(e, t), !Object.getOwnPropertyDescriptor(t, "shape")?.get) {
|
|
1453
1453
|
let e = t.shape;
|
|
1454
|
-
|
|
1454
|
+
ir.set(t, e), Object.defineProperty(t, "shape", { get: () => {
|
|
1455
1455
|
let n = { ...e };
|
|
1456
|
-
return Object.defineProperty(t, "shape", { value: n }),
|
|
1456
|
+
return Object.defineProperty(t, "shape", { value: n }), ir.set(t, n), n;
|
|
1457
1457
|
} });
|
|
1458
1458
|
}
|
|
1459
|
-
let n = r(() =>
|
|
1459
|
+
let n = r(() => nr(t));
|
|
1460
1460
|
w(e, "propValues", (e) => {
|
|
1461
1461
|
let t = e.def.shape, n = {};
|
|
1462
1462
|
for (let e in t) {
|
|
@@ -1469,7 +1469,7 @@ var rr = /* @__PURE__ */ new WeakMap(), ir = /*@__PURE__*/ T("$ZodObject", (e, t
|
|
|
1469
1469
|
}
|
|
1470
1470
|
return n;
|
|
1471
1471
|
});
|
|
1472
|
-
let i = m, a = t.catchall, o, s =
|
|
1472
|
+
let i = m, a = t.catchall, o, s = E.memoizer;
|
|
1473
1473
|
s?.attach(e), e._zod.parse = (t, r) => {
|
|
1474
1474
|
o ??= n.value;
|
|
1475
1475
|
let c = t.value;
|
|
@@ -1487,14 +1487,14 @@ var rr = /* @__PURE__ */ new WeakMap(), ir = /*@__PURE__*/ T("$ZodObject", (e, t
|
|
|
1487
1487
|
value: c[e],
|
|
1488
1488
|
issues: []
|
|
1489
1489
|
}, r);
|
|
1490
|
-
o instanceof Promise ? l.push(o.then((n) =>
|
|
1490
|
+
o instanceof Promise ? l.push(o.then((n) => er(n, t, e, c, i, a))) : er(o, t, e, c, i, a);
|
|
1491
1491
|
}
|
|
1492
|
-
return a ?
|
|
1492
|
+
return a ? rr(l, c, t, r, n.value, e) : l.length ? Promise.all(l).then(() => t) : t;
|
|
1493
1493
|
};
|
|
1494
|
-
}),
|
|
1495
|
-
|
|
1496
|
-
let n = e._zod.parse, i = r(() =>
|
|
1497
|
-
let n = i.value, r = n.symbolKeys, o = new
|
|
1494
|
+
}), or = /*@__PURE__*/ T("$ZodObjectJIT", (e, t) => {
|
|
1495
|
+
ar.init(e, t);
|
|
1496
|
+
let n = e._zod.parse, i = r(() => nr(t)), a = E.memoizer, o = (t) => {
|
|
1497
|
+
let n = i.value, r = n.symbolKeys, o = new sn(["payload", "ctx"], {
|
|
1498
1498
|
shape: t,
|
|
1499
1499
|
inst: e,
|
|
1500
1500
|
memo: a,
|
|
@@ -1558,11 +1558,11 @@ var rr = /* @__PURE__ */ new WeakMap(), ir = /*@__PURE__*/ T("$ZodObject", (e, t
|
|
|
1558
1558
|
`);
|
|
1559
1559
|
}
|
|
1560
1560
|
return o.write("payload.value = newResult;"), o.write("return payload;"), o.compile();
|
|
1561
|
-
}, s, c = m, l = !
|
|
1561
|
+
}, s, c = m, l = !E.jitless, u = l && ee.value, f = t.catchall, p;
|
|
1562
1562
|
e._zod.parse = (r, a) => {
|
|
1563
1563
|
p ??= i.value;
|
|
1564
1564
|
let d = r.value;
|
|
1565
|
-
return c(d) ? l && u && a?.async === !1 && a.jitless !== !0 ? (s ||= o(t.shape), r = s(r, a), f ?
|
|
1565
|
+
return c(d) ? l && u && a?.async === !1 && a.jitless !== !0 ? (s ||= o(t.shape), r = s(r, a), f ? rr([], d, r, a, p, e) : r) : n(r, a) : (r.issues.push({
|
|
1566
1566
|
expected: "object",
|
|
1567
1567
|
code: "invalid_type",
|
|
1568
1568
|
input: d,
|
|
@@ -1570,18 +1570,18 @@ var rr = /* @__PURE__ */ new WeakMap(), ir = /*@__PURE__*/ T("$ZodObject", (e, t
|
|
|
1570
1570
|
}), r);
|
|
1571
1571
|
};
|
|
1572
1572
|
});
|
|
1573
|
-
function
|
|
1573
|
+
function sr(e, t, n, r) {
|
|
1574
1574
|
for (let n of e) if (n.issues.length === 0) return t.value = n.value, t;
|
|
1575
1575
|
let i = e.filter((e) => !y(e));
|
|
1576
1576
|
return i.length === 1 ? (t.value = i[0].value, i[0]) : (t.issues.push({
|
|
1577
1577
|
code: "invalid_union",
|
|
1578
1578
|
input: t.value,
|
|
1579
1579
|
inst: n,
|
|
1580
|
-
errors: e.map((e) => e.issues.map((e) => x(e, r,
|
|
1580
|
+
errors: e.map((e) => e.issues.map((e) => x(e, r, D())))
|
|
1581
1581
|
}), t);
|
|
1582
1582
|
}
|
|
1583
|
-
var
|
|
1584
|
-
|
|
1583
|
+
var cr = /*@__PURE__*/ T("$ZodUnion", (e, t) => {
|
|
1584
|
+
k.init(e, t), w(e, "optin", (e) => e.def.options.some((e) => e._zod.optin === "defaulted") ? "defaulted" : e.def.options.some((e) => e._zod.optin !== void 0) ? "optional" : void 0), w(e, "optout", (e) => e.def.options.some((e) => e._zod.optout === "optional") ? "optional" : void 0), w(e, "values", (e) => {
|
|
1585
1585
|
if (e.def.options.every((e) => e._zod.values)) return new Set(e.def.options.flatMap((e) => Array.from(e._zod.values)));
|
|
1586
1586
|
}), w(e, "pattern", (e) => {
|
|
1587
1587
|
if (e.def.options.every((e) => e._zod.pattern)) {
|
|
@@ -1604,10 +1604,10 @@ var sr = /*@__PURE__*/ T("$ZodUnion", (e, t) => {
|
|
|
1604
1604
|
o.push(t);
|
|
1605
1605
|
}
|
|
1606
1606
|
}
|
|
1607
|
-
return a ? Promise.all(o).then((t) =>
|
|
1607
|
+
return a ? Promise.all(o).then((t) => sr(t, r, e, i)) : sr(o, r, e, i);
|
|
1608
1608
|
};
|
|
1609
|
-
}),
|
|
1610
|
-
|
|
1609
|
+
}), lr = /*@__PURE__*/ T("$ZodIntersection", (e, t) => {
|
|
1610
|
+
k.init(e, t), e._zod.parse = (e, n) => {
|
|
1611
1611
|
let r = e.value, i = t.left._zod.run({
|
|
1612
1612
|
value: r,
|
|
1613
1613
|
issues: []
|
|
@@ -1615,10 +1615,10 @@ var sr = /*@__PURE__*/ T("$ZodUnion", (e, t) => {
|
|
|
1615
1615
|
value: r,
|
|
1616
1616
|
issues: []
|
|
1617
1617
|
}, n);
|
|
1618
|
-
return i instanceof Promise || a instanceof Promise ? Promise.all([i, a]).then(([t, n]) =>
|
|
1618
|
+
return i instanceof Promise || a instanceof Promise ? Promise.all([i, a]).then(([t, n]) => dr(e, t, n)) : dr(e, i, a);
|
|
1619
1619
|
};
|
|
1620
1620
|
});
|
|
1621
|
-
function
|
|
1621
|
+
function ur(e, t) {
|
|
1622
1622
|
if (e === t || e instanceof Date && t instanceof Date && +e == +t) return {
|
|
1623
1623
|
valid: !0,
|
|
1624
1624
|
data: e
|
|
@@ -1631,7 +1631,7 @@ function lr(e, t) {
|
|
|
1631
1631
|
Object.prototype.hasOwnProperty.call(i, "__proto__") && delete i.__proto__;
|
|
1632
1632
|
for (let n of r) {
|
|
1633
1633
|
if (n === "__proto__") continue;
|
|
1634
|
-
let r =
|
|
1634
|
+
let r = ur(e[n], t[n]);
|
|
1635
1635
|
if (!r.valid) return {
|
|
1636
1636
|
valid: !1,
|
|
1637
1637
|
mergeErrorPath: [n, ...r.mergeErrorPath]
|
|
@@ -1650,7 +1650,7 @@ function lr(e, t) {
|
|
|
1650
1650
|
};
|
|
1651
1651
|
let n = [];
|
|
1652
1652
|
for (let r = 0; r < e.length; r++) {
|
|
1653
|
-
let i = e[r], a = t[r], o =
|
|
1653
|
+
let i = e[r], a = t[r], o = ur(i, a);
|
|
1654
1654
|
if (!o.valid) return {
|
|
1655
1655
|
valid: !1,
|
|
1656
1656
|
mergeErrorPath: [r, ...o.mergeErrorPath]
|
|
@@ -1667,7 +1667,7 @@ function lr(e, t) {
|
|
|
1667
1667
|
mergeErrorPath: []
|
|
1668
1668
|
};
|
|
1669
1669
|
}
|
|
1670
|
-
function
|
|
1670
|
+
function dr(e, t, n) {
|
|
1671
1671
|
let r = /* @__PURE__ */ new Map(), i, a = /* @__PURE__ */ new Map(), o = (e, t) => {
|
|
1672
1672
|
let n;
|
|
1673
1673
|
if (e.code === "unrecognized_keys" && !e.path?.length) i ??= e, n = e.keys;
|
|
@@ -1689,16 +1689,16 @@ function ur(e, t, n) {
|
|
|
1689
1689
|
});
|
|
1690
1690
|
for (let n of s) !t.includes(n) && a.has(n) && e.issues.push(a.get(n));
|
|
1691
1691
|
}
|
|
1692
|
-
let c =
|
|
1692
|
+
let c = ur(t.value, n.value);
|
|
1693
1693
|
if (!c.valid) {
|
|
1694
1694
|
if (y(e)) return e;
|
|
1695
1695
|
throw Error(`Unmergable intersection. Error path: ${JSON.stringify(c.mergeErrorPath)}`);
|
|
1696
1696
|
}
|
|
1697
1697
|
return e.value = c.data, e;
|
|
1698
1698
|
}
|
|
1699
|
-
var
|
|
1700
|
-
|
|
1701
|
-
let n = t.items, r =
|
|
1699
|
+
var fr = /*@__PURE__*/ T("$ZodTuple", (e, t) => {
|
|
1700
|
+
k.init(e, t);
|
|
1701
|
+
let n = t.items, r = E.memoizer;
|
|
1702
1702
|
r?.attach(e), e._zod.parse = (i, a) => {
|
|
1703
1703
|
let o = i.value;
|
|
1704
1704
|
if (!Array.isArray(o)) return i.issues.push({
|
|
@@ -1708,7 +1708,7 @@ var dr = /*@__PURE__*/ T("$ZodTuple", (e, t) => {
|
|
|
1708
1708
|
code: "invalid_type"
|
|
1709
1709
|
}), i;
|
|
1710
1710
|
i.value = r ? r.alloc(e, i, [], a) : [];
|
|
1711
|
-
let s = [], c =
|
|
1711
|
+
let s = [], c = pr(n, "optin"), l = pr(n, "optout");
|
|
1712
1712
|
if (!t.rest) {
|
|
1713
1713
|
if (o.length < c) return i.issues.push({
|
|
1714
1714
|
code: "too_small",
|
|
@@ -1745,20 +1745,20 @@ var dr = /*@__PURE__*/ T("$ZodTuple", (e, t) => {
|
|
|
1745
1745
|
value: n,
|
|
1746
1746
|
issues: []
|
|
1747
1747
|
}, a);
|
|
1748
|
-
r instanceof Promise ? s.push(r.then((t) =>
|
|
1748
|
+
r instanceof Promise ? s.push(r.then((t) => mr(t, i, e))) : mr(r, i, e);
|
|
1749
1749
|
}
|
|
1750
1750
|
}
|
|
1751
|
-
return s.length ? Promise.all(s).then(() =>
|
|
1751
|
+
return s.length ? Promise.all(s).then(() => hr(u, i, n, o, l)) : hr(u, i, n, o, l);
|
|
1752
1752
|
};
|
|
1753
1753
|
});
|
|
1754
|
-
function
|
|
1754
|
+
function pr(e, t) {
|
|
1755
1755
|
for (let n = e.length - 1; n >= 0; n--) if (!(t === "optin" ? e[n]._zod.optin !== void 0 : e[n]._zod.optout === "optional")) return n + 1;
|
|
1756
1756
|
return 0;
|
|
1757
1757
|
}
|
|
1758
|
-
function
|
|
1758
|
+
function mr(e, t, n) {
|
|
1759
1759
|
e.issues.length && t.issues.push(...b(n, e.issues)), t.value[n] = e.value;
|
|
1760
1760
|
}
|
|
1761
|
-
function
|
|
1761
|
+
function hr(e, t, n, r, i) {
|
|
1762
1762
|
for (let a = 0; a < n.length; a++) {
|
|
1763
1763
|
let o = e[a], s = a < r.length;
|
|
1764
1764
|
if (!s && a >= i && n[a]._zod.optin === "optional") {
|
|
@@ -1777,9 +1777,9 @@ function mr(e, t, n, r, i) {
|
|
|
1777
1777
|
for (let e = t.value.length - 1; e >= r.length && n[e]._zod.optout === "optional" && t.value[e] === void 0; e--) t.value.length = e;
|
|
1778
1778
|
return t;
|
|
1779
1779
|
}
|
|
1780
|
-
var
|
|
1781
|
-
|
|
1782
|
-
let n =
|
|
1780
|
+
var gr = /*@__PURE__*/ T("$ZodRecord", (e, t) => {
|
|
1781
|
+
k.init(e, t);
|
|
1782
|
+
let n = E.memoizer;
|
|
1783
1783
|
n?.attach(e), e._zod.parse = (r, i) => {
|
|
1784
1784
|
let a = r.value;
|
|
1785
1785
|
if (!h(a)) return r.issues.push({
|
|
@@ -1803,7 +1803,7 @@ var hr = /*@__PURE__*/ T("$ZodRecord", (e, t) => {
|
|
|
1803
1803
|
r.issues.push({
|
|
1804
1804
|
code: "invalid_key",
|
|
1805
1805
|
origin: "record",
|
|
1806
|
-
issues: s.issues.map((e) => x(e, i,
|
|
1806
|
+
issues: s.issues.map((e) => x(e, i, D())),
|
|
1807
1807
|
input: n,
|
|
1808
1808
|
path: [n],
|
|
1809
1809
|
inst: e
|
|
@@ -1844,7 +1844,7 @@ var hr = /*@__PURE__*/ T("$ZodRecord", (e, t) => {
|
|
|
1844
1844
|
issues: []
|
|
1845
1845
|
}, i);
|
|
1846
1846
|
if (l instanceof Promise) throw Error("Async schemas not supported in object keys currently");
|
|
1847
|
-
if (typeof n == "string" &&
|
|
1847
|
+
if (typeof n == "string" && Rt.test(n) && l.issues.length) {
|
|
1848
1848
|
let e = t.keyType._zod.run({
|
|
1849
1849
|
value: Number(n),
|
|
1850
1850
|
issues: []
|
|
@@ -1856,7 +1856,7 @@ var hr = /*@__PURE__*/ T("$ZodRecord", (e, t) => {
|
|
|
1856
1856
|
t.mode === "loose" ? r.value[n] = a[n] : s ? (c ??= [], c.push(n)) : r.issues.push({
|
|
1857
1857
|
code: "invalid_key",
|
|
1858
1858
|
origin: "record",
|
|
1859
|
-
issues: l.issues.map((e) => x(e, i,
|
|
1859
|
+
issues: l.issues.map((e) => x(e, i, D())),
|
|
1860
1860
|
input: n,
|
|
1861
1861
|
path: [n],
|
|
1862
1862
|
inst: e
|
|
@@ -1883,8 +1883,8 @@ var hr = /*@__PURE__*/ T("$ZodRecord", (e, t) => {
|
|
|
1883
1883
|
}
|
|
1884
1884
|
return o.length ? Promise.all(o).then(() => r) : r;
|
|
1885
1885
|
};
|
|
1886
|
-
}),
|
|
1887
|
-
|
|
1886
|
+
}), _r = /*@__PURE__*/ T("$ZodEnum", (t, n) => {
|
|
1887
|
+
k.init(t, n);
|
|
1888
1888
|
let r = e(n.entries), i = new Set(r);
|
|
1889
1889
|
t._zod.values = i;
|
|
1890
1890
|
let a = r.filter((e) => ne.has(typeof e));
|
|
@@ -1897,8 +1897,8 @@ var hr = /*@__PURE__*/ T("$ZodRecord", (e, t) => {
|
|
|
1897
1897
|
inst: t
|
|
1898
1898
|
}), e;
|
|
1899
1899
|
};
|
|
1900
|
-
}),
|
|
1901
|
-
|
|
1900
|
+
}), vr = /*@__PURE__*/ T("$ZodLiteral", (e, t) => {
|
|
1901
|
+
k.init(e, t);
|
|
1902
1902
|
let n = new Set(t.values);
|
|
1903
1903
|
e._zod.values = n, e._zod.pattern = RegExp(t.values.length ? `^(${t.values.map((e) => typeof e == "string" ? g(e) : e ? g(e.toString()) : String(e)).join("|")})$` : "^[^\\s\\S]$"), e._zod.parse = (r, i) => {
|
|
1904
1904
|
let a = r.value;
|
|
@@ -1909,20 +1909,20 @@ var hr = /*@__PURE__*/ T("$ZodRecord", (e, t) => {
|
|
|
1909
1909
|
inst: e
|
|
1910
1910
|
}), r;
|
|
1911
1911
|
};
|
|
1912
|
-
}),
|
|
1913
|
-
|
|
1914
|
-
if (r.direction === "backward") throw new
|
|
1912
|
+
}), yr = /*@__PURE__*/ T("$ZodTransform", (e, t) => {
|
|
1913
|
+
k.init(e, t), e._zod.optin = "optional", E.memoizer?.guard(e), e._zod.parse = (n, r) => {
|
|
1914
|
+
if (r.direction === "backward") throw new Fe(e.constructor.name);
|
|
1915
1915
|
let i = t.transform(n.value, n);
|
|
1916
1916
|
if (r.async) return (i instanceof Promise ? i : Promise.resolve(i)).then((e) => (n.value = e, n));
|
|
1917
|
-
if (i instanceof Promise) throw new
|
|
1917
|
+
if (i instanceof Promise) throw new Pe();
|
|
1918
1918
|
return n.value = i, n;
|
|
1919
1919
|
};
|
|
1920
1920
|
});
|
|
1921
|
-
function
|
|
1921
|
+
function br(e, t) {
|
|
1922
1922
|
return e.value = t.issues.length ? void 0 : t.value, e;
|
|
1923
1923
|
}
|
|
1924
|
-
var
|
|
1925
|
-
|
|
1924
|
+
var xr = /*@__PURE__*/ T("$ZodOptional", (e, t) => {
|
|
1925
|
+
k.init(e, t), w(e, "optin", (e) => e.def.innerType._zod.optin === "defaulted" ? "defaulted" : "optional"), e._zod.optout = "optional", w(e, "values", (e) => {
|
|
1926
1926
|
let t = e.def.innerType._zod.values;
|
|
1927
1927
|
return t ? /* @__PURE__ */ new Set([...t, void 0]) : void 0;
|
|
1928
1928
|
}), w(e, "pattern", (e) => {
|
|
@@ -1935,40 +1935,40 @@ var br = /*@__PURE__*/ T("$ZodOptional", (e, t) => {
|
|
|
1935
1935
|
value: e.value,
|
|
1936
1936
|
issues: []
|
|
1937
1937
|
}, n);
|
|
1938
|
-
return r instanceof Promise ? r.then((t) =>
|
|
1938
|
+
return r instanceof Promise ? r.then((t) => br(e, t)) : br(e, r);
|
|
1939
1939
|
}
|
|
1940
1940
|
return t.innerType._zod.run(e, n);
|
|
1941
1941
|
};
|
|
1942
|
-
}),
|
|
1943
|
-
|
|
1944
|
-
}),
|
|
1945
|
-
|
|
1942
|
+
}), Sr = /*@__PURE__*/ T("$ZodExactOptional", (e, t) => {
|
|
1943
|
+
xr.init(e, t), w(e, "values", (e) => e.def.innerType._zod.values), w(e, "pattern", (e) => e.def.innerType._zod.pattern), e._zod.parse = (e, n) => t.innerType._zod.run(e, n);
|
|
1944
|
+
}), Cr = /*@__PURE__*/ T("$ZodNullable", (e, t) => {
|
|
1945
|
+
k.init(e, t), w(e, "optin", (e) => e.def.innerType._zod.optin), w(e, "optout", (e) => e.def.innerType._zod.optout), w(e, "pattern", (e) => {
|
|
1946
1946
|
let t = e.def.innerType._zod.pattern;
|
|
1947
1947
|
return t ? RegExp(`^(${a(t.source)}|null)$`) : void 0;
|
|
1948
1948
|
}), w(e, "values", (e) => e.def.innerType._zod.values ? /* @__PURE__ */ new Set([...e.def.innerType._zod.values, null]) : void 0), e._zod.parse = (e, n) => e.value === null ? e : t.innerType._zod.run(e, n);
|
|
1949
|
-
}),
|
|
1950
|
-
|
|
1949
|
+
}), wr = /*@__PURE__*/ T("$ZodDefault", (e, t) => {
|
|
1950
|
+
k.init(e, t), e._zod.optin = "defaulted", w(e, "values", (e) => e.def.innerType._zod.values), e._zod.parse = (e, n) => {
|
|
1951
1951
|
if (n.direction === "backward") return t.innerType._zod.run(e, n);
|
|
1952
1952
|
if (e.value === void 0) return e.value = t.defaultValue, e;
|
|
1953
1953
|
let r = t.innerType._zod.run(e, n);
|
|
1954
|
-
return r instanceof Promise ? r.then((e) =>
|
|
1954
|
+
return r instanceof Promise ? r.then((e) => Tr(e, t)) : Tr(r, t);
|
|
1955
1955
|
};
|
|
1956
1956
|
});
|
|
1957
|
-
function
|
|
1957
|
+
function Tr(e, t) {
|
|
1958
1958
|
return e.value === void 0 && (e.value = t.defaultValue), e;
|
|
1959
1959
|
}
|
|
1960
|
-
var
|
|
1961
|
-
|
|
1962
|
-
}),
|
|
1963
|
-
|
|
1960
|
+
var Er = /*@__PURE__*/ T("$ZodPrefault", (e, t) => {
|
|
1961
|
+
k.init(e, t), e._zod.optin = "defaulted", w(e, "values", (e) => e.def.innerType._zod.values), e._zod.parse = (e, n) => (n.direction === "backward" || e.value === void 0 && (e.value = t.defaultValue), t.innerType._zod.run(e, n));
|
|
1962
|
+
}), Dr = /*@__PURE__*/ T("$ZodNonOptional", (e, t) => {
|
|
1963
|
+
k.init(e, t), w(e, "values", (e) => {
|
|
1964
1964
|
let t = e.def.innerType._zod.values;
|
|
1965
1965
|
return t ? new Set([...t].filter((e) => e !== void 0)) : void 0;
|
|
1966
1966
|
}), e._zod.parse = (n, r) => {
|
|
1967
1967
|
let i = t.innerType._zod.run(n, r);
|
|
1968
|
-
return i instanceof Promise ? i.then((t) =>
|
|
1968
|
+
return i instanceof Promise ? i.then((t) => Or(t, e)) : Or(i, e);
|
|
1969
1969
|
};
|
|
1970
1970
|
});
|
|
1971
|
-
function
|
|
1971
|
+
function Or(e, t) {
|
|
1972
1972
|
return !e.issues.length && e.value === void 0 && e.issues.push({
|
|
1973
1973
|
code: "invalid_type",
|
|
1974
1974
|
expected: "nonoptional",
|
|
@@ -1976,62 +1976,62 @@ function Dr(e, t) {
|
|
|
1976
1976
|
inst: t
|
|
1977
1977
|
}), e;
|
|
1978
1978
|
}
|
|
1979
|
-
function
|
|
1979
|
+
function kr(e, t, n, r) {
|
|
1980
1980
|
return t.issues.length ? (e.value = n.catchValue({
|
|
1981
1981
|
...t,
|
|
1982
1982
|
value: e.value,
|
|
1983
|
-
error: { issues: t.issues.map((e) => x(e, r,
|
|
1983
|
+
error: { issues: t.issues.map((e) => x(e, r, D())) },
|
|
1984
1984
|
input: e.value
|
|
1985
1985
|
}), e) : (e.value = t.value, t.memo && (e.memo = !0), e);
|
|
1986
1986
|
}
|
|
1987
|
-
var
|
|
1988
|
-
|
|
1987
|
+
var Ar = /*@__PURE__*/ T("$ZodCatch", (e, t) => {
|
|
1988
|
+
k.init(e, t), w(e, "optin", (e) => e.def.innerType._zod.optin === "defaulted" ? "defaulted" : "optional"), w(e, "optout", (e) => e.def.innerType._zod.optout), w(e, "values", (e) => e.def.innerType._zod.values), e._zod.parse = (e, n) => {
|
|
1989
1989
|
if (n.direction === "backward") return t.innerType._zod.run(e, n);
|
|
1990
1990
|
let r = t.innerType._zod.run({
|
|
1991
1991
|
value: e.value,
|
|
1992
1992
|
issues: []
|
|
1993
1993
|
}, n);
|
|
1994
|
-
return r instanceof Promise ? r.then((r) =>
|
|
1994
|
+
return r instanceof Promise ? r.then((r) => kr(e, r, t, n)) : kr(e, r, t, n);
|
|
1995
1995
|
};
|
|
1996
|
-
}),
|
|
1997
|
-
|
|
1996
|
+
}), jr = /*@__PURE__*/ T("$ZodPipe", (e, t) => {
|
|
1997
|
+
k.init(e, t), w(e, "values", (e) => e.def.in._zod.values), w(e, "optin", (e) => e.def.in._zod.optin), w(e, "optout", (e) => e.def.out._zod.optout), w(e, "propValues", (e) => e.def.in._zod.propValues), e._zod.parse = (e, n) => {
|
|
1998
1998
|
if (n.direction === "backward") {
|
|
1999
1999
|
let r = t.out._zod.run(e, n);
|
|
2000
|
-
return r instanceof Promise ? r.then((e) =>
|
|
2000
|
+
return r instanceof Promise ? r.then((e) => Mr(e, t.in, n)) : Mr(r, t.in, n);
|
|
2001
2001
|
}
|
|
2002
2002
|
let r = t.in._zod.run(e, n);
|
|
2003
|
-
return r instanceof Promise ? r.then((e) =>
|
|
2003
|
+
return r instanceof Promise ? r.then((e) => Mr(e, t.out, n)) : Mr(r, t.out, n);
|
|
2004
2004
|
};
|
|
2005
2005
|
});
|
|
2006
|
-
function
|
|
2006
|
+
function Mr(e, t, n) {
|
|
2007
2007
|
return e.issues.some((e) => e.code !== "unrecognized_keys") ? (e.aborted = !0, e) : t._zod.run({
|
|
2008
2008
|
value: e.value,
|
|
2009
2009
|
issues: e.issues
|
|
2010
2010
|
}, n);
|
|
2011
2011
|
}
|
|
2012
|
-
var
|
|
2013
|
-
|
|
2012
|
+
var Nr = /*@__PURE__*/ T("$ZodReadonly", (e, t) => {
|
|
2013
|
+
k.init(e, t), w(e, "propValues", (e) => e.def.innerType._zod.propValues), w(e, "values", (e) => e.def.innerType._zod.values), w(e, "optin", (e) => e.def.innerType?._zod?.optin), w(e, "optout", (e) => e.def.innerType?._zod?.optout), e._zod.parse = (e, n) => {
|
|
2014
2014
|
if (n.direction === "backward") return t.innerType._zod.run(e, n);
|
|
2015
2015
|
let r = t.innerType._zod.run(e, n);
|
|
2016
|
-
return r instanceof Promise ? r.then(
|
|
2016
|
+
return r instanceof Promise ? r.then(Pr) : Pr(r);
|
|
2017
2017
|
};
|
|
2018
2018
|
});
|
|
2019
|
-
function
|
|
2019
|
+
function Pr(e) {
|
|
2020
2020
|
return e.memo || (e.value = Object.freeze(e.value)), e;
|
|
2021
2021
|
}
|
|
2022
|
-
var
|
|
2023
|
-
|
|
2022
|
+
var Fr = /*@__PURE__*/ T("$ZodLazy", (e, t) => {
|
|
2023
|
+
k.init(e, t), c(e._zod, "innerType", () => {
|
|
2024
2024
|
let e = t;
|
|
2025
2025
|
return e._cachedInner ||= t.getter(), e._cachedInner;
|
|
2026
2026
|
}), w(e, "pattern", (e) => e.innerType?._zod?.pattern), w(e, "propValues", (e) => e.innerType?._zod?.propValues), w(e, "optin", (e) => e.innerType?._zod?.optin ?? void 0), w(e, "optout", (e) => e.innerType?._zod?.optout ?? void 0), e._zod.parse = (t, n) => e._zod.innerType._zod.run(t, n);
|
|
2027
|
-
}),
|
|
2028
|
-
|
|
2027
|
+
}), Ir = /*@__PURE__*/ T("$ZodCustom", (e, t) => {
|
|
2028
|
+
O.init(e, t), k.init(e, t), e._zod.parse = (e, t) => e, e._zod.check = (n) => {
|
|
2029
2029
|
let r = n.value, i = t.fn(r);
|
|
2030
|
-
if (i instanceof Promise) return i.then((t) =>
|
|
2031
|
-
|
|
2030
|
+
if (i instanceof Promise) return i.then((t) => Lr(t, n, r, e));
|
|
2031
|
+
Lr(i, n, r, e);
|
|
2032
2032
|
};
|
|
2033
2033
|
});
|
|
2034
|
-
function
|
|
2034
|
+
function Lr(e, t, n, r) {
|
|
2035
2035
|
if (!e) {
|
|
2036
2036
|
let e = {
|
|
2037
2037
|
code: "custom",
|
|
@@ -2045,25 +2045,25 @@ function Ir(e, t, n, r) {
|
|
|
2045
2045
|
}
|
|
2046
2046
|
//#endregion
|
|
2047
2047
|
//#region ../../node_modules/.bun/zod@4.5.4/node_modules/zod/v4/core/memoizer.js
|
|
2048
|
-
var
|
|
2048
|
+
var Rr = class extends Error {
|
|
2049
2049
|
constructor() {
|
|
2050
2050
|
super("Cannot parse a reference cycle that closes through a transform"), this.name = "ZodCyclicError";
|
|
2051
2051
|
}
|
|
2052
|
-
},
|
|
2053
|
-
function
|
|
2052
|
+
}, zr = "~memo", Br = [];
|
|
2053
|
+
function Vr(e) {
|
|
2054
2054
|
return e.map((e) => e.path ? {
|
|
2055
2055
|
...e,
|
|
2056
2056
|
path: e.path.slice()
|
|
2057
2057
|
} : { ...e });
|
|
2058
2058
|
}
|
|
2059
|
-
var
|
|
2060
|
-
function
|
|
2061
|
-
let n =
|
|
2059
|
+
var Hr = /*@__PURE__*/ new WeakMap();
|
|
2060
|
+
function Ur(e, t) {
|
|
2061
|
+
let n = Hr.get(e);
|
|
2062
2062
|
if (n !== void 0) return n;
|
|
2063
2063
|
if (t.has(e)) return !0;
|
|
2064
2064
|
t.add(e);
|
|
2065
2065
|
let r = !1, i = (e) => {
|
|
2066
|
-
!r && e?._zod &&
|
|
2066
|
+
!r && e?._zod && Ur(e, t) && (r = !0);
|
|
2067
2067
|
}, a = e._zod.def;
|
|
2068
2068
|
switch (a.type) {
|
|
2069
2069
|
case "object":
|
|
@@ -2140,28 +2140,28 @@ function Hr(e, t) {
|
|
|
2140
2140
|
}
|
|
2141
2141
|
}
|
|
2142
2142
|
}
|
|
2143
|
-
return t.delete(e),
|
|
2143
|
+
return t.delete(e), Hr.set(e, r), r;
|
|
2144
2144
|
}
|
|
2145
|
-
function
|
|
2145
|
+
function Wr(e, t) {
|
|
2146
2146
|
let n = e.buckets.get(t);
|
|
2147
2147
|
return n || (n = /* @__PURE__ */ new Map(), e.buckets.set(t, n)), n;
|
|
2148
2148
|
}
|
|
2149
|
-
var
|
|
2149
|
+
var Gr, Kr = [], qr = {
|
|
2150
2150
|
alloc(e, t, n) {
|
|
2151
|
-
let r =
|
|
2151
|
+
let r = Gr;
|
|
2152
2152
|
if (!r) return n;
|
|
2153
|
-
|
|
2153
|
+
Gr = void 0;
|
|
2154
2154
|
let i = {
|
|
2155
2155
|
value: n,
|
|
2156
2156
|
issues: null
|
|
2157
2157
|
};
|
|
2158
|
-
return r.set(t.value, i),
|
|
2158
|
+
return r.set(t.value, i), Kr.push(i), n;
|
|
2159
2159
|
},
|
|
2160
2160
|
guard(e) {
|
|
2161
2161
|
var t;
|
|
2162
2162
|
(t = e._zod).deferred ?? (t.deferred = []), e._zod.deferred.push(() => {
|
|
2163
2163
|
let t = e._zod.parse, n = (e, n) => {
|
|
2164
|
-
if (n.direction !== "backward" &&
|
|
2164
|
+
if (n.direction !== "backward" && Yr(n, e.value)) throw new Rr();
|
|
2165
2165
|
return t(e, n);
|
|
2166
2166
|
};
|
|
2167
2167
|
e._zod.parse = n, e._zod.run === t && (e._zod.run = n);
|
|
@@ -2172,38 +2172,38 @@ var Wr, Gr = [], Kr = {
|
|
|
2172
2172
|
let n, r, i;
|
|
2173
2173
|
(t = e._zod).deferred ?? (t.deferred = []), e._zod.deferred.push(() => {
|
|
2174
2174
|
let t = e._zod.parse, a = (o, s) => {
|
|
2175
|
-
if (n === void 0 && (n =
|
|
2175
|
+
if (n === void 0 && (n = Ur(e, /* @__PURE__ */ new Set()), !n)) return e._zod.parse = t, e._zod.run === a && (e._zod.run = t), t(o, s);
|
|
2176
2176
|
let c = o.value;
|
|
2177
2177
|
if (typeof c != "object" || !c) return t(o, s);
|
|
2178
|
-
let l = s[
|
|
2178
|
+
let l = s[zr];
|
|
2179
2179
|
l || (l = {
|
|
2180
2180
|
buckets: /* @__PURE__ */ new Map(),
|
|
2181
2181
|
backEdges: void 0
|
|
2182
|
-
}, s[
|
|
2182
|
+
}, s[zr] = l);
|
|
2183
2183
|
let u;
|
|
2184
|
-
r === s ? u = i : (u =
|
|
2184
|
+
r === s ? u = i : (u = Wr(l, e), r = s, i = u);
|
|
2185
2185
|
let d = u.get(c);
|
|
2186
|
-
if (d) return o.value = d.value, d.issues ? d.issues.length && o.issues.push(...
|
|
2187
|
-
|
|
2188
|
-
let f =
|
|
2189
|
-
|
|
2190
|
-
let m =
|
|
2191
|
-
return p instanceof Promise ? p.then((e) => (m && (m.issues = e.issues.length ?
|
|
2186
|
+
if (d) return o.value = d.value, d.issues ? d.issues.length && o.issues.push(...Vr(d.issues)) : (o.memo = !0, l.backEdges ?? (l.backEdges = /* @__PURE__ */ new Set()), l.backEdges.add(d.value)), o;
|
|
2187
|
+
Gr = u;
|
|
2188
|
+
let f = Kr.length, p = t(o, s);
|
|
2189
|
+
Gr = void 0;
|
|
2190
|
+
let m = Kr.length > f ? Kr.pop() : void 0;
|
|
2191
|
+
return p instanceof Promise ? p.then((e) => (m && (m.issues = e.issues.length ? Vr(e.issues) : Br), e)) : (m && (m.issues = p.issues.length ? Vr(p.issues) : Br), p);
|
|
2192
2192
|
};
|
|
2193
2193
|
e._zod.parse = a, e._zod.run === t && (e._zod.run = a);
|
|
2194
2194
|
});
|
|
2195
2195
|
}
|
|
2196
2196
|
};
|
|
2197
|
-
function
|
|
2198
|
-
return
|
|
2197
|
+
function Jr() {
|
|
2198
|
+
return qr;
|
|
2199
2199
|
}
|
|
2200
|
-
function
|
|
2201
|
-
let n = e[
|
|
2200
|
+
function Yr(e, t) {
|
|
2201
|
+
let n = e[zr]?.backEdges;
|
|
2202
2202
|
return n !== void 0 && typeof t == "object" && !!t && n.has(t);
|
|
2203
2203
|
}
|
|
2204
2204
|
//#endregion
|
|
2205
2205
|
//#region ../../node_modules/.bun/zod@4.5.4/node_modules/zod/v4/locales/en.js
|
|
2206
|
-
var
|
|
2206
|
+
var Xr = () => {
|
|
2207
2207
|
let e = {
|
|
2208
2208
|
string: {
|
|
2209
2209
|
unit: "characters",
|
|
@@ -2289,12 +2289,12 @@ var Yr = () => {
|
|
|
2289
2289
|
}
|
|
2290
2290
|
};
|
|
2291
2291
|
};
|
|
2292
|
-
function
|
|
2293
|
-
return { localeError:
|
|
2292
|
+
function Zr() {
|
|
2293
|
+
return { localeError: Xr() };
|
|
2294
2294
|
}
|
|
2295
2295
|
//#endregion
|
|
2296
2296
|
//#region ../../node_modules/.bun/zod@4.5.4/node_modules/zod/v4/core/registries.js
|
|
2297
|
-
var
|
|
2297
|
+
var Qr, $r = class {
|
|
2298
2298
|
constructor() {
|
|
2299
2299
|
this._map = /* @__PURE__ */ new WeakMap(), this._idmap = /* @__PURE__ */ new Map();
|
|
2300
2300
|
}
|
|
@@ -2326,22 +2326,22 @@ var Zr, Qr = class {
|
|
|
2326
2326
|
return this._map.has(e);
|
|
2327
2327
|
}
|
|
2328
2328
|
};
|
|
2329
|
-
function
|
|
2330
|
-
return new
|
|
2329
|
+
function ei() {
|
|
2330
|
+
return new $r();
|
|
2331
2331
|
}
|
|
2332
|
-
(
|
|
2333
|
-
var
|
|
2332
|
+
(Qr = globalThis).__zod_globalRegistry ?? (Qr.__zod_globalRegistry = ei());
|
|
2333
|
+
var ti = globalThis.__zod_globalRegistry;
|
|
2334
2334
|
//#endregion
|
|
2335
2335
|
//#region ../../node_modules/.bun/zod@4.5.4/node_modules/zod/v4/core/api.js
|
|
2336
2336
|
// @__NO_SIDE_EFFECTS__
|
|
2337
|
-
function
|
|
2337
|
+
function ni(e, t) {
|
|
2338
2338
|
return new e({
|
|
2339
2339
|
type: "string",
|
|
2340
2340
|
...v(t)
|
|
2341
2341
|
});
|
|
2342
2342
|
}
|
|
2343
2343
|
// @__NO_SIDE_EFFECTS__
|
|
2344
|
-
function
|
|
2344
|
+
function ri(e, t) {
|
|
2345
2345
|
return new e({
|
|
2346
2346
|
type: "string",
|
|
2347
2347
|
format: "email",
|
|
@@ -2351,7 +2351,7 @@ function ni(e, t) {
|
|
|
2351
2351
|
});
|
|
2352
2352
|
}
|
|
2353
2353
|
// @__NO_SIDE_EFFECTS__
|
|
2354
|
-
function
|
|
2354
|
+
function ii(e, t) {
|
|
2355
2355
|
return new e({
|
|
2356
2356
|
type: "string",
|
|
2357
2357
|
format: "guid",
|
|
@@ -2361,7 +2361,7 @@ function ri(e, t) {
|
|
|
2361
2361
|
});
|
|
2362
2362
|
}
|
|
2363
2363
|
// @__NO_SIDE_EFFECTS__
|
|
2364
|
-
function
|
|
2364
|
+
function ai(e, t) {
|
|
2365
2365
|
return new e({
|
|
2366
2366
|
type: "string",
|
|
2367
2367
|
format: "uuid",
|
|
@@ -2371,7 +2371,7 @@ function ii(e, t) {
|
|
|
2371
2371
|
});
|
|
2372
2372
|
}
|
|
2373
2373
|
// @__NO_SIDE_EFFECTS__
|
|
2374
|
-
function
|
|
2374
|
+
function oi(e, t) {
|
|
2375
2375
|
return new e({
|
|
2376
2376
|
type: "string",
|
|
2377
2377
|
format: "uuid",
|
|
@@ -2382,7 +2382,7 @@ function ai(e, t) {
|
|
|
2382
2382
|
});
|
|
2383
2383
|
}
|
|
2384
2384
|
// @__NO_SIDE_EFFECTS__
|
|
2385
|
-
function
|
|
2385
|
+
function si(e, t) {
|
|
2386
2386
|
return new e({
|
|
2387
2387
|
type: "string",
|
|
2388
2388
|
format: "uuid",
|
|
@@ -2393,7 +2393,7 @@ function oi(e, t) {
|
|
|
2393
2393
|
});
|
|
2394
2394
|
}
|
|
2395
2395
|
// @__NO_SIDE_EFFECTS__
|
|
2396
|
-
function
|
|
2396
|
+
function ci(e, t) {
|
|
2397
2397
|
return new e({
|
|
2398
2398
|
type: "string",
|
|
2399
2399
|
format: "uuid",
|
|
@@ -2404,7 +2404,7 @@ function si(e, t) {
|
|
|
2404
2404
|
});
|
|
2405
2405
|
}
|
|
2406
2406
|
// @__NO_SIDE_EFFECTS__
|
|
2407
|
-
function
|
|
2407
|
+
function li(e, t) {
|
|
2408
2408
|
return new e({
|
|
2409
2409
|
type: "string",
|
|
2410
2410
|
format: "url",
|
|
@@ -2414,7 +2414,7 @@ function ci(e, t) {
|
|
|
2414
2414
|
});
|
|
2415
2415
|
}
|
|
2416
2416
|
// @__NO_SIDE_EFFECTS__
|
|
2417
|
-
function
|
|
2417
|
+
function ui(e, t) {
|
|
2418
2418
|
return new e({
|
|
2419
2419
|
type: "string",
|
|
2420
2420
|
format: "emoji",
|
|
@@ -2424,7 +2424,7 @@ function li(e, t) {
|
|
|
2424
2424
|
});
|
|
2425
2425
|
}
|
|
2426
2426
|
// @__NO_SIDE_EFFECTS__
|
|
2427
|
-
function
|
|
2427
|
+
function di(e, t) {
|
|
2428
2428
|
return new e({
|
|
2429
2429
|
type: "string",
|
|
2430
2430
|
format: "nanoid",
|
|
@@ -2434,7 +2434,7 @@ function ui(e, t) {
|
|
|
2434
2434
|
});
|
|
2435
2435
|
}
|
|
2436
2436
|
// @__NO_SIDE_EFFECTS__
|
|
2437
|
-
function
|
|
2437
|
+
function fi(e, t) {
|
|
2438
2438
|
return new e({
|
|
2439
2439
|
type: "string",
|
|
2440
2440
|
format: "cuid",
|
|
@@ -2444,7 +2444,7 @@ function di(e, t) {
|
|
|
2444
2444
|
});
|
|
2445
2445
|
}
|
|
2446
2446
|
// @__NO_SIDE_EFFECTS__
|
|
2447
|
-
function
|
|
2447
|
+
function pi(e, t) {
|
|
2448
2448
|
return new e({
|
|
2449
2449
|
type: "string",
|
|
2450
2450
|
format: "cuid2",
|
|
@@ -2454,7 +2454,7 @@ function fi(e, t) {
|
|
|
2454
2454
|
});
|
|
2455
2455
|
}
|
|
2456
2456
|
// @__NO_SIDE_EFFECTS__
|
|
2457
|
-
function
|
|
2457
|
+
function mi(e, t) {
|
|
2458
2458
|
return new e({
|
|
2459
2459
|
type: "string",
|
|
2460
2460
|
format: "ulid",
|
|
@@ -2464,7 +2464,7 @@ function pi(e, t) {
|
|
|
2464
2464
|
});
|
|
2465
2465
|
}
|
|
2466
2466
|
// @__NO_SIDE_EFFECTS__
|
|
2467
|
-
function
|
|
2467
|
+
function hi(e, t) {
|
|
2468
2468
|
return new e({
|
|
2469
2469
|
type: "string",
|
|
2470
2470
|
format: "xid",
|
|
@@ -2474,7 +2474,7 @@ function mi(e, t) {
|
|
|
2474
2474
|
});
|
|
2475
2475
|
}
|
|
2476
2476
|
// @__NO_SIDE_EFFECTS__
|
|
2477
|
-
function
|
|
2477
|
+
function gi(e, t) {
|
|
2478
2478
|
return new e({
|
|
2479
2479
|
type: "string",
|
|
2480
2480
|
format: "ksuid",
|
|
@@ -2484,7 +2484,7 @@ function hi(e, t) {
|
|
|
2484
2484
|
});
|
|
2485
2485
|
}
|
|
2486
2486
|
// @__NO_SIDE_EFFECTS__
|
|
2487
|
-
function
|
|
2487
|
+
function _i(e, t) {
|
|
2488
2488
|
return new e({
|
|
2489
2489
|
type: "string",
|
|
2490
2490
|
format: "ipv4",
|
|
@@ -2494,7 +2494,7 @@ function gi(e, t) {
|
|
|
2494
2494
|
});
|
|
2495
2495
|
}
|
|
2496
2496
|
// @__NO_SIDE_EFFECTS__
|
|
2497
|
-
function
|
|
2497
|
+
function vi(e, t) {
|
|
2498
2498
|
return new e({
|
|
2499
2499
|
type: "string",
|
|
2500
2500
|
format: "ipv6",
|
|
@@ -2504,7 +2504,7 @@ function _i(e, t) {
|
|
|
2504
2504
|
});
|
|
2505
2505
|
}
|
|
2506
2506
|
// @__NO_SIDE_EFFECTS__
|
|
2507
|
-
function
|
|
2507
|
+
function yi(e, t) {
|
|
2508
2508
|
return new e({
|
|
2509
2509
|
type: "string",
|
|
2510
2510
|
format: "cidrv4",
|
|
@@ -2514,7 +2514,7 @@ function vi(e, t) {
|
|
|
2514
2514
|
});
|
|
2515
2515
|
}
|
|
2516
2516
|
// @__NO_SIDE_EFFECTS__
|
|
2517
|
-
function
|
|
2517
|
+
function bi(e, t) {
|
|
2518
2518
|
return new e({
|
|
2519
2519
|
type: "string",
|
|
2520
2520
|
format: "cidrv6",
|
|
@@ -2524,7 +2524,7 @@ function yi(e, t) {
|
|
|
2524
2524
|
});
|
|
2525
2525
|
}
|
|
2526
2526
|
// @__NO_SIDE_EFFECTS__
|
|
2527
|
-
function
|
|
2527
|
+
function xi(e, t) {
|
|
2528
2528
|
return new e({
|
|
2529
2529
|
type: "string",
|
|
2530
2530
|
format: "base64",
|
|
@@ -2534,7 +2534,7 @@ function bi(e, t) {
|
|
|
2534
2534
|
});
|
|
2535
2535
|
}
|
|
2536
2536
|
// @__NO_SIDE_EFFECTS__
|
|
2537
|
-
function
|
|
2537
|
+
function Si(e, t) {
|
|
2538
2538
|
return new e({
|
|
2539
2539
|
type: "string",
|
|
2540
2540
|
format: "base64url",
|
|
@@ -2544,7 +2544,7 @@ function xi(e, t) {
|
|
|
2544
2544
|
});
|
|
2545
2545
|
}
|
|
2546
2546
|
// @__NO_SIDE_EFFECTS__
|
|
2547
|
-
function
|
|
2547
|
+
function Ci(e, t) {
|
|
2548
2548
|
return new e({
|
|
2549
2549
|
type: "string",
|
|
2550
2550
|
format: "e164",
|
|
@@ -2554,7 +2554,7 @@ function Si(e, t) {
|
|
|
2554
2554
|
});
|
|
2555
2555
|
}
|
|
2556
2556
|
// @__NO_SIDE_EFFECTS__
|
|
2557
|
-
function
|
|
2557
|
+
function wi(e, t) {
|
|
2558
2558
|
return new e({
|
|
2559
2559
|
type: "string",
|
|
2560
2560
|
format: "jwt",
|
|
@@ -2564,7 +2564,7 @@ function Ci(e, t) {
|
|
|
2564
2564
|
});
|
|
2565
2565
|
}
|
|
2566
2566
|
// @__NO_SIDE_EFFECTS__
|
|
2567
|
-
function
|
|
2567
|
+
function Ti(e, t) {
|
|
2568
2568
|
return new e({
|
|
2569
2569
|
type: "string",
|
|
2570
2570
|
format: "datetime",
|
|
@@ -2576,7 +2576,7 @@ function wi(e, t) {
|
|
|
2576
2576
|
});
|
|
2577
2577
|
}
|
|
2578
2578
|
// @__NO_SIDE_EFFECTS__
|
|
2579
|
-
function
|
|
2579
|
+
function Ei(e, t) {
|
|
2580
2580
|
return new e({
|
|
2581
2581
|
type: "string",
|
|
2582
2582
|
format: "date",
|
|
@@ -2585,7 +2585,7 @@ function Ti(e, t) {
|
|
|
2585
2585
|
});
|
|
2586
2586
|
}
|
|
2587
2587
|
// @__NO_SIDE_EFFECTS__
|
|
2588
|
-
function
|
|
2588
|
+
function Di(e, t) {
|
|
2589
2589
|
return new e({
|
|
2590
2590
|
type: "string",
|
|
2591
2591
|
format: "time",
|
|
@@ -2595,7 +2595,7 @@ function Ei(e, t) {
|
|
|
2595
2595
|
});
|
|
2596
2596
|
}
|
|
2597
2597
|
// @__NO_SIDE_EFFECTS__
|
|
2598
|
-
function
|
|
2598
|
+
function Oi(e, t) {
|
|
2599
2599
|
return new e({
|
|
2600
2600
|
type: "string",
|
|
2601
2601
|
format: "duration",
|
|
@@ -2604,7 +2604,7 @@ function Di(e, t) {
|
|
|
2604
2604
|
});
|
|
2605
2605
|
}
|
|
2606
2606
|
// @__NO_SIDE_EFFECTS__
|
|
2607
|
-
function
|
|
2607
|
+
function ki(e, t) {
|
|
2608
2608
|
return new e({
|
|
2609
2609
|
type: "number",
|
|
2610
2610
|
checks: [],
|
|
@@ -2612,7 +2612,7 @@ function Oi(e, t) {
|
|
|
2612
2612
|
});
|
|
2613
2613
|
}
|
|
2614
2614
|
// @__NO_SIDE_EFFECTS__
|
|
2615
|
-
function
|
|
2615
|
+
function Ai(e, t) {
|
|
2616
2616
|
return new e({
|
|
2617
2617
|
type: "number",
|
|
2618
2618
|
check: "number_format",
|
|
@@ -2622,33 +2622,33 @@ function ki(e, t) {
|
|
|
2622
2622
|
});
|
|
2623
2623
|
}
|
|
2624
2624
|
// @__NO_SIDE_EFFECTS__
|
|
2625
|
-
function
|
|
2625
|
+
function ji(e, t) {
|
|
2626
2626
|
return new e({
|
|
2627
2627
|
type: "boolean",
|
|
2628
2628
|
...v(t)
|
|
2629
2629
|
});
|
|
2630
2630
|
}
|
|
2631
2631
|
// @__NO_SIDE_EFFECTS__
|
|
2632
|
-
function
|
|
2632
|
+
function Mi(e, t) {
|
|
2633
2633
|
return new e({
|
|
2634
2634
|
type: "null",
|
|
2635
2635
|
...v(t)
|
|
2636
2636
|
});
|
|
2637
2637
|
}
|
|
2638
2638
|
// @__NO_SIDE_EFFECTS__
|
|
2639
|
-
function
|
|
2639
|
+
function Ni(e) {
|
|
2640
2640
|
return new e({ type: "unknown" });
|
|
2641
2641
|
}
|
|
2642
2642
|
// @__NO_SIDE_EFFECTS__
|
|
2643
|
-
function
|
|
2643
|
+
function Pi(e, t) {
|
|
2644
2644
|
return new e({
|
|
2645
2645
|
type: "never",
|
|
2646
2646
|
...v(t)
|
|
2647
2647
|
});
|
|
2648
2648
|
}
|
|
2649
2649
|
// @__NO_SIDE_EFFECTS__
|
|
2650
|
-
function
|
|
2651
|
-
return new
|
|
2650
|
+
function Fi(e, t) {
|
|
2651
|
+
return new Gt({
|
|
2652
2652
|
check: "less_than",
|
|
2653
2653
|
...v(t),
|
|
2654
2654
|
value: e,
|
|
@@ -2656,8 +2656,8 @@ function Pi(e, t) {
|
|
|
2656
2656
|
});
|
|
2657
2657
|
}
|
|
2658
2658
|
// @__NO_SIDE_EFFECTS__
|
|
2659
|
-
function
|
|
2660
|
-
return new
|
|
2659
|
+
function Ii(e, t) {
|
|
2660
|
+
return new Gt({
|
|
2661
2661
|
check: "less_than",
|
|
2662
2662
|
...v(t),
|
|
2663
2663
|
value: e,
|
|
@@ -2665,8 +2665,8 @@ function Fi(e, t) {
|
|
|
2665
2665
|
});
|
|
2666
2666
|
}
|
|
2667
2667
|
// @__NO_SIDE_EFFECTS__
|
|
2668
|
-
function
|
|
2669
|
-
return new
|
|
2668
|
+
function Li(e, t) {
|
|
2669
|
+
return new Kt({
|
|
2670
2670
|
check: "greater_than",
|
|
2671
2671
|
...v(t),
|
|
2672
2672
|
value: e,
|
|
@@ -2674,8 +2674,8 @@ function Ii(e, t) {
|
|
|
2674
2674
|
});
|
|
2675
2675
|
}
|
|
2676
2676
|
// @__NO_SIDE_EFFECTS__
|
|
2677
|
-
function
|
|
2678
|
-
return new
|
|
2677
|
+
function Ri(e, t) {
|
|
2678
|
+
return new Kt({
|
|
2679
2679
|
check: "greater_than",
|
|
2680
2680
|
...v(t),
|
|
2681
2681
|
value: e,
|
|
@@ -2683,40 +2683,40 @@ function Li(e, t) {
|
|
|
2683
2683
|
});
|
|
2684
2684
|
}
|
|
2685
2685
|
// @__NO_SIDE_EFFECTS__
|
|
2686
|
-
function
|
|
2687
|
-
return new
|
|
2686
|
+
function zi(e, t) {
|
|
2687
|
+
return new qt({
|
|
2688
2688
|
check: "multiple_of",
|
|
2689
2689
|
...v(t),
|
|
2690
2690
|
value: e
|
|
2691
2691
|
});
|
|
2692
2692
|
}
|
|
2693
2693
|
// @__NO_SIDE_EFFECTS__
|
|
2694
|
-
function
|
|
2695
|
-
return new
|
|
2694
|
+
function Bi(e, t) {
|
|
2695
|
+
return new Yt({
|
|
2696
2696
|
check: "max_length",
|
|
2697
2697
|
...v(t),
|
|
2698
2698
|
maximum: e
|
|
2699
2699
|
});
|
|
2700
2700
|
}
|
|
2701
2701
|
// @__NO_SIDE_EFFECTS__
|
|
2702
|
-
function
|
|
2703
|
-
return new
|
|
2702
|
+
function Vi(e, t) {
|
|
2703
|
+
return new Xt({
|
|
2704
2704
|
check: "min_length",
|
|
2705
2705
|
...v(t),
|
|
2706
2706
|
minimum: e
|
|
2707
2707
|
});
|
|
2708
2708
|
}
|
|
2709
2709
|
// @__NO_SIDE_EFFECTS__
|
|
2710
|
-
function
|
|
2711
|
-
return new
|
|
2710
|
+
function Hi(e, t) {
|
|
2711
|
+
return new Zt({
|
|
2712
2712
|
check: "length_equals",
|
|
2713
2713
|
...v(t),
|
|
2714
2714
|
length: e
|
|
2715
2715
|
});
|
|
2716
2716
|
}
|
|
2717
2717
|
// @__NO_SIDE_EFFECTS__
|
|
2718
|
-
function
|
|
2719
|
-
return new
|
|
2718
|
+
function Ui(e, t) {
|
|
2719
|
+
return new $t({
|
|
2720
2720
|
check: "string_format",
|
|
2721
2721
|
format: "regex",
|
|
2722
2722
|
...v(t),
|
|
@@ -2724,24 +2724,24 @@ function Hi(e, t) {
|
|
|
2724
2724
|
});
|
|
2725
2725
|
}
|
|
2726
2726
|
// @__NO_SIDE_EFFECTS__
|
|
2727
|
-
function
|
|
2728
|
-
return new
|
|
2727
|
+
function Wi(e) {
|
|
2728
|
+
return new en({
|
|
2729
2729
|
check: "string_format",
|
|
2730
2730
|
format: "lowercase",
|
|
2731
2731
|
...v(e)
|
|
2732
2732
|
});
|
|
2733
2733
|
}
|
|
2734
2734
|
// @__NO_SIDE_EFFECTS__
|
|
2735
|
-
function
|
|
2736
|
-
return new
|
|
2735
|
+
function Gi(e) {
|
|
2736
|
+
return new tn({
|
|
2737
2737
|
check: "string_format",
|
|
2738
2738
|
format: "uppercase",
|
|
2739
2739
|
...v(e)
|
|
2740
2740
|
});
|
|
2741
2741
|
}
|
|
2742
2742
|
// @__NO_SIDE_EFFECTS__
|
|
2743
|
-
function
|
|
2744
|
-
return new
|
|
2743
|
+
function Ki(e, t) {
|
|
2744
|
+
return new nn({
|
|
2745
2745
|
check: "string_format",
|
|
2746
2746
|
format: "includes",
|
|
2747
2747
|
...v(t),
|
|
@@ -2749,8 +2749,8 @@ function Gi(e, t) {
|
|
|
2749
2749
|
});
|
|
2750
2750
|
}
|
|
2751
2751
|
// @__NO_SIDE_EFFECTS__
|
|
2752
|
-
function
|
|
2753
|
-
return new
|
|
2752
|
+
function qi(e, t) {
|
|
2753
|
+
return new rn({
|
|
2754
2754
|
check: "string_format",
|
|
2755
2755
|
format: "starts_with",
|
|
2756
2756
|
...v(t),
|
|
@@ -2758,8 +2758,8 @@ function Ki(e, t) {
|
|
|
2758
2758
|
});
|
|
2759
2759
|
}
|
|
2760
2760
|
// @__NO_SIDE_EFFECTS__
|
|
2761
|
-
function
|
|
2762
|
-
return new
|
|
2761
|
+
function Ji(e, t) {
|
|
2762
|
+
return new an({
|
|
2763
2763
|
check: "string_format",
|
|
2764
2764
|
format: "ends_with",
|
|
2765
2765
|
...v(t),
|
|
@@ -2767,34 +2767,34 @@ function qi(e, t) {
|
|
|
2767
2767
|
});
|
|
2768
2768
|
}
|
|
2769
2769
|
// @__NO_SIDE_EFFECTS__
|
|
2770
|
-
function
|
|
2771
|
-
return new
|
|
2770
|
+
function j(e) {
|
|
2771
|
+
return new on({
|
|
2772
2772
|
check: "overwrite",
|
|
2773
2773
|
tx: e
|
|
2774
2774
|
});
|
|
2775
2775
|
}
|
|
2776
2776
|
// @__NO_SIDE_EFFECTS__
|
|
2777
|
-
function
|
|
2778
|
-
return /* @__PURE__ */
|
|
2779
|
-
}
|
|
2780
|
-
// @__NO_SIDE_EFFECTS__
|
|
2781
|
-
function Yi() {
|
|
2782
|
-
return /* @__PURE__ */ M((e) => e.trim());
|
|
2777
|
+
function Yi(e) {
|
|
2778
|
+
return /* @__PURE__ */ j((t) => t.normalize(e));
|
|
2783
2779
|
}
|
|
2784
2780
|
// @__NO_SIDE_EFFECTS__
|
|
2785
2781
|
function Xi() {
|
|
2786
|
-
return /* @__PURE__ */
|
|
2782
|
+
return /* @__PURE__ */ j((e) => e.trim());
|
|
2787
2783
|
}
|
|
2788
2784
|
// @__NO_SIDE_EFFECTS__
|
|
2789
2785
|
function Zi() {
|
|
2790
|
-
return /* @__PURE__ */
|
|
2786
|
+
return /* @__PURE__ */ j((e) => e.toLowerCase());
|
|
2791
2787
|
}
|
|
2792
2788
|
// @__NO_SIDE_EFFECTS__
|
|
2793
2789
|
function Qi() {
|
|
2794
|
-
return /* @__PURE__ */
|
|
2790
|
+
return /* @__PURE__ */ j((e) => e.toUpperCase());
|
|
2791
|
+
}
|
|
2792
|
+
// @__NO_SIDE_EFFECTS__
|
|
2793
|
+
function $i() {
|
|
2794
|
+
return /* @__PURE__ */ j((e) => f(e));
|
|
2795
2795
|
}
|
|
2796
2796
|
// @__NO_SIDE_EFFECTS__
|
|
2797
|
-
function
|
|
2797
|
+
function ea(e, t, n) {
|
|
2798
2798
|
return new e({
|
|
2799
2799
|
type: "array",
|
|
2800
2800
|
element: t,
|
|
@@ -2802,7 +2802,7 @@ function $i(e, t, n) {
|
|
|
2802
2802
|
});
|
|
2803
2803
|
}
|
|
2804
2804
|
// @__NO_SIDE_EFFECTS__
|
|
2805
|
-
function
|
|
2805
|
+
function ta(e, t, n) {
|
|
2806
2806
|
return new e({
|
|
2807
2807
|
type: "custom",
|
|
2808
2808
|
check: "custom",
|
|
@@ -2811,8 +2811,8 @@ function ea(e, t, n) {
|
|
|
2811
2811
|
});
|
|
2812
2812
|
}
|
|
2813
2813
|
// @__NO_SIDE_EFFECTS__
|
|
2814
|
-
function
|
|
2815
|
-
let n = /* @__PURE__ */
|
|
2814
|
+
function na(e, t) {
|
|
2815
|
+
let n = /* @__PURE__ */ ra((t) => (t.addIssue = (e) => {
|
|
2816
2816
|
if (typeof e == "string") t.issues.push(be(e, t.value, n._zod.def));
|
|
2817
2817
|
else {
|
|
2818
2818
|
let r = e;
|
|
@@ -2822,8 +2822,8 @@ function ta(e, t) {
|
|
|
2822
2822
|
return n;
|
|
2823
2823
|
}
|
|
2824
2824
|
// @__NO_SIDE_EFFECTS__
|
|
2825
|
-
function
|
|
2826
|
-
let n = new
|
|
2825
|
+
function ra(e, t) {
|
|
2826
|
+
let n = new O({
|
|
2827
2827
|
check: "custom",
|
|
2828
2828
|
...v(t)
|
|
2829
2829
|
});
|
|
@@ -2831,15 +2831,15 @@ function na(e, t) {
|
|
|
2831
2831
|
}
|
|
2832
2832
|
//#endregion
|
|
2833
2833
|
//#region ../../node_modules/.bun/zod@4.5.4/node_modules/zod/v4/core/to-json-schema.js
|
|
2834
|
-
function
|
|
2834
|
+
function ia(e, ...t) {
|
|
2835
2835
|
for (let n of t) for (let t of Reflect.ownKeys(n)) Object.prototype.propertyIsEnumerable.call(n, t) && l(e, t, n[t]);
|
|
2836
2836
|
return e;
|
|
2837
2837
|
}
|
|
2838
|
-
function
|
|
2838
|
+
function aa(e) {
|
|
2839
2839
|
let t = e?.target ?? "draft-2020-12";
|
|
2840
2840
|
return t === "draft-4" && (t = "draft-04"), t === "draft-7" && (t = "draft-07"), {
|
|
2841
2841
|
processors: e.processors ?? {},
|
|
2842
|
-
metadataRegistry: e?.metadata ??
|
|
2842
|
+
metadataRegistry: e?.metadata ?? ti,
|
|
2843
2843
|
target: t,
|
|
2844
2844
|
unrepresentable: e?.unrepresentable ?? "throw",
|
|
2845
2845
|
override: e?.override ?? (() => {}),
|
|
@@ -2855,7 +2855,7 @@ function ia(e) {
|
|
|
2855
2855
|
external: e?.external ?? void 0
|
|
2856
2856
|
};
|
|
2857
2857
|
}
|
|
2858
|
-
function
|
|
2858
|
+
function M(e, t, n, r, i) {
|
|
2859
2859
|
let a = typeof t.unrepresentable == "function" ? t.unrepresentable({
|
|
2860
2860
|
zodSchema: e,
|
|
2861
2861
|
path: r.path,
|
|
@@ -2865,7 +2865,7 @@ function N(e, t, n, r, i) {
|
|
|
2865
2865
|
if (a === void 0 || a === "throw") throw Error(i);
|
|
2866
2866
|
return Object.assign(n, a), !0;
|
|
2867
2867
|
}
|
|
2868
|
-
function
|
|
2868
|
+
function N(e, t, n = {
|
|
2869
2869
|
path: [],
|
|
2870
2870
|
schemaPath: []
|
|
2871
2871
|
}) {
|
|
@@ -2894,15 +2894,15 @@ function P(e, t, n = {
|
|
|
2894
2894
|
a(e, t, n, r);
|
|
2895
2895
|
}
|
|
2896
2896
|
let a = e._zod.parent;
|
|
2897
|
-
a && (o.ref ||= a,
|
|
2897
|
+
a && (o.ref ||= a, N(a, t, r), t.seen.get(a).isParent = !0);
|
|
2898
2898
|
}
|
|
2899
2899
|
let c = t.metadataRegistry.get(e);
|
|
2900
|
-
return c &&
|
|
2900
|
+
return c && ia(o.schema, c), t.io === "input" && P(e) && (delete o.schema.examples, delete o.schema.default), t.io === "input" && "_prefault" in o.schema && ((r = o.schema).default ?? (r.default = o.schema._prefault)), delete o.schema._prefault, t.seen.get(e).schema;
|
|
2901
2901
|
}
|
|
2902
|
-
function
|
|
2902
|
+
function oa(e) {
|
|
2903
2903
|
return e.replace(/~/g, "~0").replace(/\//g, "~1");
|
|
2904
2904
|
}
|
|
2905
|
-
function
|
|
2905
|
+
function sa(e, t) {
|
|
2906
2906
|
let n = e.seen.get(t);
|
|
2907
2907
|
if (!n) throw Error("Unprocessed schema. This is a bug in Zod.");
|
|
2908
2908
|
if (e.external && e.sharedDefsExtractedFor === e.external) return;
|
|
@@ -2923,7 +2923,7 @@ function oa(e, t) {
|
|
|
2923
2923
|
let a = t[1].defId ?? t[1].schema.id ?? `schema${e.counter++}`;
|
|
2924
2924
|
return t[1].defId = a, {
|
|
2925
2925
|
defId: a,
|
|
2926
|
-
ref: `${i("__shared")}#/${r}/${
|
|
2926
|
+
ref: `${i("__shared")}#/${r}/${oa(a)}`
|
|
2927
2927
|
};
|
|
2928
2928
|
}
|
|
2929
2929
|
let i = `#/${r}/`;
|
|
@@ -2931,7 +2931,7 @@ function oa(e, t) {
|
|
|
2931
2931
|
let a = t[1].schema.id ?? `__schema${e.counter++}`;
|
|
2932
2932
|
return {
|
|
2933
2933
|
defId: a,
|
|
2934
|
-
ref: i +
|
|
2934
|
+
ref: i + oa(a)
|
|
2935
2935
|
};
|
|
2936
2936
|
}, a = (e) => {
|
|
2937
2937
|
if (e[1].schema.$ref) return;
|
|
@@ -2975,13 +2975,13 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
2975
2975
|
}
|
|
2976
2976
|
e.external && (e.sharedDefsExtractedFor = e.external);
|
|
2977
2977
|
}
|
|
2978
|
-
function
|
|
2978
|
+
function ca(e) {
|
|
2979
2979
|
let t = e.anyOf;
|
|
2980
2980
|
if (!Array.isArray(t) || t.length === 0 || e.type !== void 0) return;
|
|
2981
2981
|
let n = [];
|
|
2982
2982
|
for (let e of t) {
|
|
2983
2983
|
if (!e || typeof e != "object") return;
|
|
2984
|
-
|
|
2984
|
+
ca(e);
|
|
2985
2985
|
let t = Object.keys(e);
|
|
2986
2986
|
if (t.length !== 1 || t[0] !== "type") return;
|
|
2987
2987
|
let r = e.type;
|
|
@@ -2992,21 +2992,21 @@ function sa(e) {
|
|
|
2992
2992
|
}
|
|
2993
2993
|
delete e.anyOf, e.type = n.length === 1 ? n[0] : n;
|
|
2994
2994
|
}
|
|
2995
|
-
var
|
|
2995
|
+
var la = /* @__PURE__ */ new Set([
|
|
2996
2996
|
"type",
|
|
2997
2997
|
"properties",
|
|
2998
2998
|
"required",
|
|
2999
2999
|
"additionalProperties"
|
|
3000
|
-
]),
|
|
3001
|
-
function
|
|
3000
|
+
]), ua = ["oneOf", "anyOf"];
|
|
3001
|
+
function da(e) {
|
|
3002
3002
|
let t = e.additionalProperties;
|
|
3003
3003
|
return t === void 0 || t === !1 || typeof t != "object" || !t ? null : Object.keys(t).length ? t : null;
|
|
3004
3004
|
}
|
|
3005
|
-
function
|
|
3005
|
+
function fa(e) {
|
|
3006
3006
|
let t = [];
|
|
3007
3007
|
for (let n of e) {
|
|
3008
3008
|
if (typeof n != "object" || n.type !== "object") return null;
|
|
3009
|
-
for (let e in n) if (!
|
|
3009
|
+
for (let e in n) if (!la.has(e)) return null;
|
|
3010
3010
|
t.push(n);
|
|
3011
3011
|
}
|
|
3012
3012
|
let n = {}, r = /* @__PURE__ */ new Set();
|
|
@@ -3015,10 +3015,10 @@ function da(e) {
|
|
|
3015
3015
|
if (Object.prototype.hasOwnProperty.call(n, r)) continue;
|
|
3016
3016
|
let e = [];
|
|
3017
3017
|
for (let n of t) {
|
|
3018
|
-
let t = n.properties?.[r] ??
|
|
3018
|
+
let t = n.properties?.[r] ?? da(n);
|
|
3019
3019
|
t != null && (e.some((e) => JSON.stringify(e) === JSON.stringify(t)) || e.push(t));
|
|
3020
3020
|
}
|
|
3021
|
-
l(n, r, e.length === 1 ? e[0] :
|
|
3021
|
+
l(n, r, e.length === 1 ? e[0] : fa(e) ?? { allOf: e });
|
|
3022
3022
|
}
|
|
3023
3023
|
for (let t of e.required ?? []) r.add(t);
|
|
3024
3024
|
}
|
|
@@ -3030,29 +3030,29 @@ function da(e) {
|
|
|
3030
3030
|
else {
|
|
3031
3031
|
let e = [];
|
|
3032
3032
|
for (let n of t) {
|
|
3033
|
-
let t =
|
|
3033
|
+
let t = da(n);
|
|
3034
3034
|
t && !e.some((e) => JSON.stringify(e) === JSON.stringify(t)) && e.push(t);
|
|
3035
3035
|
}
|
|
3036
3036
|
e.length === 1 ? i.additionalProperties = e[0] : e.length > 1 && (i.additionalProperties = { allOf: e });
|
|
3037
3037
|
}
|
|
3038
3038
|
return i;
|
|
3039
3039
|
}
|
|
3040
|
-
function
|
|
3040
|
+
function pa(e) {
|
|
3041
3041
|
let t = e.allOf;
|
|
3042
3042
|
if (!Array.isArray(t) || t.length < 2) return;
|
|
3043
|
-
for (let t of
|
|
3044
|
-
let n = t.filter((e) =>
|
|
3045
|
-
if (!n.length) r =
|
|
3043
|
+
for (let t of la) if (t in e) return;
|
|
3044
|
+
let n = t.filter((e) => ua.some((t) => Array.isArray(e[t]))), r = null;
|
|
3045
|
+
if (!n.length) r = fa(t);
|
|
3046
3046
|
else {
|
|
3047
|
-
let e = n[0], i =
|
|
3047
|
+
let e = n[0], i = ua.find((t) => Array.isArray(e[t]));
|
|
3048
3048
|
if (Object.keys(e).length !== 1) return;
|
|
3049
|
-
let a = t.filter((t) => t !== e), o = e[i].map((e) =>
|
|
3049
|
+
let a = t.filter((t) => t !== e), o = e[i].map((e) => fa([...a, e]));
|
|
3050
3050
|
if (o.some((e) => !e)) return;
|
|
3051
3051
|
r = { [i]: o };
|
|
3052
3052
|
}
|
|
3053
|
-
r && (delete e.allOf,
|
|
3053
|
+
r && (delete e.allOf, ia(e, r));
|
|
3054
3054
|
}
|
|
3055
|
-
function
|
|
3055
|
+
function ma(e, t) {
|
|
3056
3056
|
let n = e.seen.get(t);
|
|
3057
3057
|
if (!n) throw Error("Unprocessed schema. This is a bug in Zod.");
|
|
3058
3058
|
let r = (t) => {
|
|
@@ -3062,7 +3062,7 @@ function pa(e, t) {
|
|
|
3062
3062
|
if (n.ref = null, o) {
|
|
3063
3063
|
r(o);
|
|
3064
3064
|
let n = e.seen.get(o), s = n.schema;
|
|
3065
|
-
if (s.$ref && (e.target === "draft-07" || e.target === "draft-04" || e.target === "openapi-3.0") ? (i.allOf = i.allOf ?? [], i.allOf.push(s)) :
|
|
3065
|
+
if (s.$ref && (e.target === "draft-07" || e.target === "draft-04" || e.target === "openapi-3.0") ? (i.allOf = i.allOf ?? [], i.allOf.push(s)) : ia(i, s), ia(i, a), t._zod.parent === o) for (let e in i) e !== "$ref" && e !== "allOf" && (e in a || delete i[e]);
|
|
3066
3066
|
if (s.$ref && n.def) for (let e in i) e !== "$ref" && e !== "allOf" && e in n.def && JSON.stringify(i[e]) === JSON.stringify(n.def[e]) && delete i[e];
|
|
3067
3067
|
}
|
|
3068
3068
|
let s = t._zod.parent;
|
|
@@ -3079,7 +3079,7 @@ function pa(e, t) {
|
|
|
3079
3079
|
};
|
|
3080
3080
|
if (!e.external || e.sharedEmitDoneFor !== e.external) {
|
|
3081
3081
|
for (let t of [...e.seen.entries()].reverse()) r(t[0]);
|
|
3082
|
-
if (e.target !== "openapi-3.0") for (let t of e.seen.entries())
|
|
3082
|
+
if (e.target !== "openapi-3.0") for (let t of e.seen.entries()) ca(t[1].def ?? t[1].schema);
|
|
3083
3083
|
for (let t of e.deferred) t();
|
|
3084
3084
|
if (e.intersections.length) {
|
|
3085
3085
|
let t = /* @__PURE__ */ new Map();
|
|
@@ -3089,7 +3089,7 @@ function pa(e, t) {
|
|
|
3089
3089
|
let r = t.get(n);
|
|
3090
3090
|
r ? r.push(e) : t.set(n, [e]);
|
|
3091
3091
|
}
|
|
3092
|
-
for (let n of e.intersections) for (let e of t.get(n) ?? [])
|
|
3092
|
+
for (let n of e.intersections) for (let e of t.get(n) ?? []) pa(e);
|
|
3093
3093
|
}
|
|
3094
3094
|
}
|
|
3095
3095
|
let i = {};
|
|
@@ -3098,7 +3098,7 @@ function pa(e, t) {
|
|
|
3098
3098
|
if (!n) throw Error("Schema is missing an `id` property");
|
|
3099
3099
|
i.$id = e.external.uri(n);
|
|
3100
3100
|
}
|
|
3101
|
-
|
|
3101
|
+
ia(i, n.defId ? n.schema : n.def ?? n.schema);
|
|
3102
3102
|
let a = e.metadataRegistry.get(t)?.id;
|
|
3103
3103
|
a !== void 0 && i.id === a && delete i.id;
|
|
3104
3104
|
let o = e.external?.defs ?? {};
|
|
@@ -3113,8 +3113,8 @@ function pa(e, t) {
|
|
|
3113
3113
|
value: {
|
|
3114
3114
|
...t["~standard"],
|
|
3115
3115
|
jsonSchema: {
|
|
3116
|
-
input:
|
|
3117
|
-
output:
|
|
3116
|
+
input: ga(t, "input", e.processors),
|
|
3117
|
+
output: ga(t, "output", e.processors)
|
|
3118
3118
|
}
|
|
3119
3119
|
},
|
|
3120
3120
|
enumerable: !1,
|
|
@@ -3124,83 +3124,83 @@ function pa(e, t) {
|
|
|
3124
3124
|
throw Error("Error converting schema to JSON.");
|
|
3125
3125
|
}
|
|
3126
3126
|
}
|
|
3127
|
-
function
|
|
3127
|
+
function P(e, t) {
|
|
3128
3128
|
let n = t ?? { seen: /* @__PURE__ */ new Set() };
|
|
3129
3129
|
if (n.seen.has(e)) return !1;
|
|
3130
3130
|
n.seen.add(e);
|
|
3131
3131
|
let r = e._zod.def;
|
|
3132
3132
|
if (r.type === "transform") return !0;
|
|
3133
|
-
if (r.type === "array") return
|
|
3134
|
-
if (r.type === "set") return
|
|
3135
|
-
if (r.type === "lazy") return
|
|
3136
|
-
if (r.type === "promise" || r.type === "optional" || r.type === "nonoptional" || r.type === "nullable" || r.type === "readonly" || r.type === "default" || r.type === "prefault" || r.type === "catch") return
|
|
3137
|
-
if (r.type === "intersection") return
|
|
3138
|
-
if (r.type === "record" || r.type === "map") return
|
|
3139
|
-
if (r.type === "pipe") return e._zod.traits.has("$ZodCodec") ? !0 :
|
|
3133
|
+
if (r.type === "array") return P(r.element, n);
|
|
3134
|
+
if (r.type === "set") return P(r.valueType, n);
|
|
3135
|
+
if (r.type === "lazy") return P(r.getter(), n);
|
|
3136
|
+
if (r.type === "promise" || r.type === "optional" || r.type === "nonoptional" || r.type === "nullable" || r.type === "readonly" || r.type === "default" || r.type === "prefault" || r.type === "catch") return P(r.innerType, n);
|
|
3137
|
+
if (r.type === "intersection") return P(r.left, n) || P(r.right, n);
|
|
3138
|
+
if (r.type === "record" || r.type === "map") return P(r.keyType, n) || P(r.valueType, n);
|
|
3139
|
+
if (r.type === "pipe") return e._zod.traits.has("$ZodCodec") ? !0 : P(r.in, n) || P(r.out, n);
|
|
3140
3140
|
if (r.type === "object") {
|
|
3141
|
-
for (let e in r.shape) if (
|
|
3141
|
+
for (let e in r.shape) if (P(r.shape[e], n)) return !0;
|
|
3142
3142
|
return !1;
|
|
3143
3143
|
}
|
|
3144
3144
|
if (r.type === "union") {
|
|
3145
|
-
for (let e of r.options) if (
|
|
3145
|
+
for (let e of r.options) if (P(e, n)) return !0;
|
|
3146
3146
|
return !1;
|
|
3147
3147
|
}
|
|
3148
3148
|
if (r.type === "tuple") {
|
|
3149
|
-
for (let e of r.items) if (
|
|
3150
|
-
return !!(r.rest &&
|
|
3149
|
+
for (let e of r.items) if (P(e, n)) return !0;
|
|
3150
|
+
return !!(r.rest && P(r.rest, n));
|
|
3151
3151
|
}
|
|
3152
3152
|
return !1;
|
|
3153
3153
|
}
|
|
3154
|
-
var
|
|
3155
|
-
let r =
|
|
3154
|
+
var ha = (e, t = {}) => (n) => {
|
|
3155
|
+
let r = aa({
|
|
3156
3156
|
...n,
|
|
3157
3157
|
processors: t
|
|
3158
3158
|
});
|
|
3159
|
-
return
|
|
3160
|
-
},
|
|
3161
|
-
let { libraryOptions: i, target: a } = r ?? {}, o =
|
|
3159
|
+
return N(e, r), sa(r, e), ma(r, e);
|
|
3160
|
+
}, ga = (e, t, n = {}) => (r) => {
|
|
3161
|
+
let { libraryOptions: i, target: a } = r ?? {}, o = aa({
|
|
3162
3162
|
...i ?? {},
|
|
3163
3163
|
target: a,
|
|
3164
3164
|
io: t,
|
|
3165
3165
|
processors: n
|
|
3166
3166
|
});
|
|
3167
|
-
return
|
|
3168
|
-
},
|
|
3167
|
+
return N(e, o), sa(o, e), ma(o, e);
|
|
3168
|
+
}, _a = {
|
|
3169
3169
|
guid: "uuid",
|
|
3170
3170
|
url: "uri",
|
|
3171
3171
|
datetime: "date-time",
|
|
3172
3172
|
json_string: "json-string",
|
|
3173
3173
|
regex: ""
|
|
3174
|
-
},
|
|
3174
|
+
}, va = (e, t, n, r) => {
|
|
3175
3175
|
let i = n;
|
|
3176
3176
|
i.type = "string";
|
|
3177
3177
|
let { minimum: a, maximum: o, format: s, patterns: c, contentEncoding: l, laxFormat: u } = e._zod.bag;
|
|
3178
|
-
if (typeof a == "number" && (i.minLength = a), typeof o == "number" && (i.maxLength = o), s && (i.format =
|
|
3178
|
+
if (typeof a == "number" && (i.minLength = a), typeof o == "number" && (i.maxLength = o), s && (i.format = _a[s] ?? s, i.format === "" && delete i.format, (s === "time" || u) && delete i.format), l && (i.contentEncoding = l), c && c.size > 0) {
|
|
3179
3179
|
let e = [...c];
|
|
3180
3180
|
e.length === 1 ? i.pattern = e[0].source : e.length > 1 && (i.allOf = [...e.map((e) => ({
|
|
3181
3181
|
...t.target === "draft-07" || t.target === "draft-04" || t.target === "openapi-3.0" ? { type: "string" } : {},
|
|
3182
3182
|
pattern: e.source
|
|
3183
3183
|
}))]);
|
|
3184
3184
|
}
|
|
3185
|
-
},
|
|
3185
|
+
}, ya = (e, t, n, r) => {
|
|
3186
3186
|
let i = n, { minimum: a, maximum: o, format: s, multipleOf: c, exclusiveMaximum: l, exclusiveMinimum: u } = e._zod.bag;
|
|
3187
3187
|
i.type = typeof s == "string" && s.includes("int") ? "integer" : "number";
|
|
3188
3188
|
let d = typeof u == "number" && u >= (a ?? -Infinity), f = typeof l == "number" && l <= (o ?? Infinity), p = t.target === "draft-04" || t.target === "openapi-3.0";
|
|
3189
|
-
d ? p ? (i.minimum = u, i.exclusiveMinimum = !0) : i.exclusiveMinimum = u : typeof a == "number" && (i.minimum = a), f ? p ? (i.maximum = l, i.exclusiveMaximum = !0) : i.exclusiveMaximum = l : typeof o == "number" && (i.maximum = o), typeof c == "number" && (Number.isFinite(c) && c !== 0 ? i.multipleOf = Math.abs(c) :
|
|
3190
|
-
}, ya = (e, t, n, r) => {
|
|
3191
|
-
n.type = "boolean";
|
|
3189
|
+
d ? p ? (i.minimum = u, i.exclusiveMinimum = !0) : i.exclusiveMinimum = u : typeof a == "number" && (i.minimum = a), f ? p ? (i.maximum = l, i.exclusiveMaximum = !0) : i.exclusiveMaximum = l : typeof o == "number" && (i.maximum = o), typeof c == "number" && (Number.isFinite(c) && c !== 0 ? i.multipleOf = Math.abs(c) : M(e, t, i, r, `A multipleOf divisor of ${c} cannot be represented in JSON Schema`));
|
|
3192
3190
|
}, ba = (e, t, n, r) => {
|
|
3193
|
-
|
|
3191
|
+
n.type = "boolean";
|
|
3194
3192
|
}, xa = (e, t, n, r) => {
|
|
3193
|
+
t.target === "openapi-3.0" ? (n.type = "string", n.nullable = !0, n.enum = [null]) : n.type = "null";
|
|
3194
|
+
}, Sa = (e, t, n, r) => {
|
|
3195
3195
|
n.not = {};
|
|
3196
|
-
},
|
|
3196
|
+
}, Ca = (t, n, r, i) => {
|
|
3197
3197
|
let a = t._zod.def, o = e(a.entries);
|
|
3198
3198
|
if (o.length === 0) {
|
|
3199
3199
|
r.not = {};
|
|
3200
3200
|
return;
|
|
3201
3201
|
}
|
|
3202
3202
|
o.every((e) => typeof e == "number") && (r.type = "number"), o.every((e) => typeof e == "string") && (r.type = "string"), r.enum = o;
|
|
3203
|
-
},
|
|
3203
|
+
}, wa = (e, t, n, r) => {
|
|
3204
3204
|
let i = e._zod.def;
|
|
3205
3205
|
if (i.values.length === 0) {
|
|
3206
3206
|
n.not = {};
|
|
@@ -3208,9 +3208,9 @@ var ma = (e, t = {}) => (n) => {
|
|
|
3208
3208
|
}
|
|
3209
3209
|
let a = [];
|
|
3210
3210
|
for (let o of i.values) if (o === void 0) {
|
|
3211
|
-
if (
|
|
3211
|
+
if (M(e, t, n, r, "Literal `undefined` cannot be represented in JSON Schema")) return;
|
|
3212
3212
|
} else if (typeof o == "bigint") {
|
|
3213
|
-
if (
|
|
3213
|
+
if (M(e, t, n, r, "BigInt literals cannot be represented in JSON Schema")) return;
|
|
3214
3214
|
a.push(Number(o));
|
|
3215
3215
|
} else a.push(o);
|
|
3216
3216
|
if (a.length !== 0) {
|
|
@@ -3219,26 +3219,26 @@ var ma = (e, t = {}) => (n) => {
|
|
|
3219
3219
|
n.type = e === null ? "null" : typeof e, t.target === "draft-04" || t.target === "openapi-3.0" ? n.enum = [e] : n.const = e;
|
|
3220
3220
|
} else a.every((e) => typeof e == "number") && (n.type = "number"), a.every((e) => typeof e == "string") && (n.type = "string"), a.every((e) => typeof e == "boolean") && (n.type = "boolean"), a.every((e) => e === null) && (n.type = "null"), n.enum = a;
|
|
3221
3221
|
}
|
|
3222
|
-
}, wa = (e, t, n, r) => {
|
|
3223
|
-
N(e, t, n, r, "Custom types cannot be represented in JSON Schema");
|
|
3224
3222
|
}, Ta = (e, t, n, r) => {
|
|
3225
|
-
|
|
3223
|
+
M(e, t, n, r, "Custom types cannot be represented in JSON Schema");
|
|
3226
3224
|
}, Ea = (e, t, n, r) => {
|
|
3225
|
+
M(e, t, n, r, "Transforms cannot be represented in JSON Schema");
|
|
3226
|
+
}, Da = (e, t, n, r) => {
|
|
3227
3227
|
let i = n, a = e._zod.def, { minimum: o, maximum: s } = e._zod.bag;
|
|
3228
|
-
typeof o == "number" && (i.minItems = o), typeof s == "number" && (i.maxItems = s), i.type = "array", i.items =
|
|
3228
|
+
typeof o == "number" && (i.minItems = o), typeof s == "number" && (i.maxItems = s), i.type = "array", i.items = N(a.element, t, {
|
|
3229
3229
|
...r,
|
|
3230
3230
|
path: [...r.path, "items"]
|
|
3231
3231
|
});
|
|
3232
3232
|
};
|
|
3233
|
-
function
|
|
3233
|
+
function Oa(e) {
|
|
3234
3234
|
let t = e._zod.def;
|
|
3235
|
-
return t.type === "pipe" && t.in._zod.traits.has("$ZodTransform") ?
|
|
3235
|
+
return t.type === "pipe" && t.in._zod.traits.has("$ZodTransform") ? Oa(t.out) : t.type === "catch" ? Oa(t.innerType) : e._zod.optin;
|
|
3236
3236
|
}
|
|
3237
|
-
var
|
|
3237
|
+
var ka = (e, t, n, r) => {
|
|
3238
3238
|
let i = n, a = e._zod.def, o = a.shape;
|
|
3239
|
-
if (Object.getOwnPropertySymbols(o).length &&
|
|
3239
|
+
if (Object.getOwnPropertySymbols(o).length && M(e, t, i, r, "Symbol keys cannot be represented in JSON Schema")) return;
|
|
3240
3240
|
i.type = "object", i.properties = {};
|
|
3241
|
-
for (let e in o) l(i.properties, e,
|
|
3241
|
+
for (let e in o) l(i.properties, e, N(o[e], t, {
|
|
3242
3242
|
...r,
|
|
3243
3243
|
path: [
|
|
3244
3244
|
...r.path,
|
|
@@ -3248,14 +3248,14 @@ var Oa = (e, t, n, r) => {
|
|
|
3248
3248
|
}));
|
|
3249
3249
|
let s = new Set(Object.keys(o)), c = new Set([...s].filter((e) => {
|
|
3250
3250
|
let n = a.shape[e];
|
|
3251
|
-
return t.io === "input" ?
|
|
3251
|
+
return t.io === "input" ? Oa(n) === void 0 : n._zod.optout === void 0;
|
|
3252
3252
|
}));
|
|
3253
|
-
c.size > 0 && (i.required = Array.from(c)), a.catchall?._zod.def.type === "never" ? i.additionalProperties = !1 : a.catchall ? a.catchall && (i.additionalProperties =
|
|
3253
|
+
c.size > 0 && (i.required = Array.from(c)), a.catchall?._zod.def.type === "never" ? i.additionalProperties = !1 : a.catchall ? a.catchall && (i.additionalProperties = N(a.catchall, t, {
|
|
3254
3254
|
...r,
|
|
3255
3255
|
path: [...r.path, "additionalProperties"]
|
|
3256
3256
|
})) : t.io === "output" && (i.additionalProperties = !1);
|
|
3257
|
-
},
|
|
3258
|
-
let i = e._zod.def, a = i.inclusive === !1, o = i.options.map((e, n) =>
|
|
3257
|
+
}, Aa = (e, t, n, r) => {
|
|
3258
|
+
let i = e._zod.def, a = i.inclusive === !1, o = i.options.map((e, n) => N(e, t, {
|
|
3259
3259
|
...r,
|
|
3260
3260
|
path: [
|
|
3261
3261
|
...r.path,
|
|
@@ -3264,15 +3264,15 @@ var Oa = (e, t, n, r) => {
|
|
|
3264
3264
|
]
|
|
3265
3265
|
}));
|
|
3266
3266
|
a ? n.oneOf = o : n.anyOf = o;
|
|
3267
|
-
},
|
|
3268
|
-
let i = e._zod.def, a =
|
|
3267
|
+
}, ja = (e, t, n, r) => {
|
|
3268
|
+
let i = e._zod.def, a = N(i.left, t, {
|
|
3269
3269
|
...r,
|
|
3270
3270
|
path: [
|
|
3271
3271
|
...r.path,
|
|
3272
3272
|
"allOf",
|
|
3273
3273
|
0
|
|
3274
3274
|
]
|
|
3275
|
-
}), o =
|
|
3275
|
+
}), o = N(i.right, t, {
|
|
3276
3276
|
...r,
|
|
3277
3277
|
path: [
|
|
3278
3278
|
...r.path,
|
|
@@ -3281,17 +3281,17 @@ var Oa = (e, t, n, r) => {
|
|
|
3281
3281
|
]
|
|
3282
3282
|
}), s = (e) => "allOf" in e && Object.keys(e).length === 1, c = [...s(a) ? a.allOf : [a], ...s(o) ? o.allOf : [o]];
|
|
3283
3283
|
n.allOf = c, t.intersections.push(c);
|
|
3284
|
-
},
|
|
3284
|
+
}, Ma = (e, t, n, r) => {
|
|
3285
3285
|
let i = n, a = e._zod.def;
|
|
3286
3286
|
i.type = "array";
|
|
3287
|
-
let o = t.target === "draft-2020-12" ? "prefixItems" : "items", s = t.target === "draft-2020-12" || t.target === "openapi-3.0" ? "items" : "additionalItems", c = a.items.map((e, n) =>
|
|
3287
|
+
let o = t.target === "draft-2020-12" ? "prefixItems" : "items", s = t.target === "draft-2020-12" || t.target === "openapi-3.0" ? "items" : "additionalItems", c = a.items.map((e, n) => N(e, t, {
|
|
3288
3288
|
...r,
|
|
3289
3289
|
path: [
|
|
3290
3290
|
...r.path,
|
|
3291
3291
|
o,
|
|
3292
3292
|
n
|
|
3293
3293
|
]
|
|
3294
|
-
})), l = a.rest ?
|
|
3294
|
+
})), l = a.rest ? N(a.rest, t, {
|
|
3295
3295
|
...r,
|
|
3296
3296
|
path: [
|
|
3297
3297
|
...r.path,
|
|
@@ -3301,7 +3301,7 @@ var Oa = (e, t, n, r) => {
|
|
|
3301
3301
|
}) : null, u = a.items.length;
|
|
3302
3302
|
for (; u > 0;) {
|
|
3303
3303
|
let e = a.items[u - 1];
|
|
3304
|
-
if (!(t.io === "input" ?
|
|
3304
|
+
if (!(t.io === "input" ? Oa(e) !== void 0 : e._zod.optout === "optional")) break;
|
|
3305
3305
|
u--;
|
|
3306
3306
|
}
|
|
3307
3307
|
let d = a.items.length, f = !a.rest;
|
|
@@ -3309,19 +3309,19 @@ var Oa = (e, t, n, r) => {
|
|
|
3309
3309
|
let { minimum: p, maximum: m } = e._zod.bag;
|
|
3310
3310
|
typeof p == "number" && (i.minItems = p), typeof m == "number" && (i.maxItems = m);
|
|
3311
3311
|
};
|
|
3312
|
-
function
|
|
3312
|
+
function Na(e, t, n) {
|
|
3313
3313
|
if (t.$ref) {
|
|
3314
3314
|
if (n.has(t)) return t;
|
|
3315
3315
|
n.add(t);
|
|
3316
3316
|
let r = e.get(t)?.def;
|
|
3317
3317
|
if (!r) return t;
|
|
3318
|
-
let i =
|
|
3318
|
+
let i = Na(e, r, n);
|
|
3319
3319
|
return i === r ? t : i;
|
|
3320
3320
|
}
|
|
3321
3321
|
for (let r of ["anyOf", "oneOf"]) {
|
|
3322
3322
|
let i = t[r];
|
|
3323
3323
|
if (!Array.isArray(i)) continue;
|
|
3324
|
-
let a = i.map((t) =>
|
|
3324
|
+
let a = i.map((t) => Na(e, t, n));
|
|
3325
3325
|
a.some((e, t) => e !== i[t]) && (t = {
|
|
3326
3326
|
...t,
|
|
3327
3327
|
[r]: a
|
|
@@ -3330,17 +3330,17 @@ function Ma(e, t, n) {
|
|
|
3330
3330
|
let r = Array.isArray(t.type) ? t.type : [t.type], i = !r.includes("string") && r.some((e) => e === "number" || e === "integer"), a = t.enum ?? (t.const === void 0 ? void 0 : [t.const]);
|
|
3331
3331
|
if (!i && !a?.some((e) => typeof e == "number")) return t;
|
|
3332
3332
|
let { minimum: o, maximum: s, exclusiveMinimum: c, exclusiveMaximum: l, multipleOf: u, format: d, id: f, ...p } = t;
|
|
3333
|
-
return p.enum ? p.enum = p.enum.map((e) => typeof e == "number" ? String(e) : e) : typeof p.const == "number" && (p.const = String(p.const)), i ? (p.type = "string", a || (p.pattern = (r.includes("number") ?
|
|
3333
|
+
return p.enum ? p.enum = p.enum.map((e) => typeof e == "number" ? String(e) : e) : typeof p.const == "number" && (p.const = String(p.const)), i ? (p.type = "string", a || (p.pattern = (r.includes("number") ? Rt : Lt).source), p) : p;
|
|
3334
3334
|
}
|
|
3335
|
-
var
|
|
3336
|
-
function
|
|
3335
|
+
var Pa = /* @__PURE__ */ new WeakMap();
|
|
3336
|
+
function Fa(e) {
|
|
3337
3337
|
let t = /* @__PURE__ */ new Map();
|
|
3338
3338
|
for (let n of e.seen.values()) n.def && !t.has(n.schema) && t.set(n.schema, n);
|
|
3339
3339
|
let n = /* @__PURE__ */ new Map();
|
|
3340
|
-
for (let r of
|
|
3340
|
+
for (let r of Pa.get(e) ?? []) {
|
|
3341
3341
|
let i = e.seen.get(r), a = (i?.def ?? i?.schema)?.propertyNames;
|
|
3342
3342
|
if (!a || a === !0 || n.has(a)) continue;
|
|
3343
|
-
let o =
|
|
3343
|
+
let o = Na(t, a, /* @__PURE__ */ new Set());
|
|
3344
3344
|
o !== a && n.set(a, o);
|
|
3345
3345
|
}
|
|
3346
3346
|
if (n.size) for (let t of e.seen.values()) for (let e of [t.schema, t.def]) {
|
|
@@ -3348,12 +3348,12 @@ function Pa(e) {
|
|
|
3348
3348
|
t && (e.propertyNames = t);
|
|
3349
3349
|
}
|
|
3350
3350
|
}
|
|
3351
|
-
var
|
|
3351
|
+
var Ia = (e, t, n, r) => {
|
|
3352
3352
|
let i = n, a = e._zod.def;
|
|
3353
3353
|
i.type = "object";
|
|
3354
3354
|
let o = a.keyType, s = o._zod.bag?.patterns;
|
|
3355
3355
|
if (a.mode === "loose" && s && s.size > 0) {
|
|
3356
|
-
let e =
|
|
3356
|
+
let e = N(a.valueType, t, {
|
|
3357
3357
|
...r,
|
|
3358
3358
|
path: [
|
|
3359
3359
|
...r.path,
|
|
@@ -3365,85 +3365,85 @@ var Fa = (e, t, n, r) => {
|
|
|
3365
3365
|
for (let t of s) l(i.patternProperties, t.source, e);
|
|
3366
3366
|
} else {
|
|
3367
3367
|
if (t.target === "draft-07" || t.target === "draft-2020-12") {
|
|
3368
|
-
i.propertyNames =
|
|
3368
|
+
i.propertyNames = N(a.keyType, t, {
|
|
3369
3369
|
...r,
|
|
3370
3370
|
path: [...r.path, "propertyNames"]
|
|
3371
3371
|
});
|
|
3372
|
-
let n =
|
|
3373
|
-
n || (n = [],
|
|
3372
|
+
let n = Pa.get(t);
|
|
3373
|
+
n || (n = [], Pa.set(t, n), t.deferred.push(() => Fa(t))), n.push(e);
|
|
3374
3374
|
}
|
|
3375
|
-
i.additionalProperties =
|
|
3375
|
+
i.additionalProperties = N(a.valueType, t, {
|
|
3376
3376
|
...r,
|
|
3377
3377
|
path: [...r.path, "additionalProperties"]
|
|
3378
3378
|
});
|
|
3379
3379
|
}
|
|
3380
|
-
let c = o._zod.values, u = t.io === "input" &&
|
|
3380
|
+
let c = o._zod.values, u = t.io === "input" && Oa(a.valueType) !== void 0;
|
|
3381
3381
|
if (c && !a.partial && !u) {
|
|
3382
3382
|
let e = [...c].filter((e) => typeof e == "string" || typeof e == "number");
|
|
3383
3383
|
e.length > 0 && (i.required = e.map(String));
|
|
3384
3384
|
}
|
|
3385
|
-
}, Ia = (e, t, n, r) => {
|
|
3386
|
-
let i = e._zod.def, a = P(i.innerType, t, r), o = t.seen.get(e);
|
|
3387
|
-
t.target === "openapi-3.0" ? (o.ref = i.innerType, n.nullable = !0) : n.anyOf = [a, { type: "null" }];
|
|
3388
3385
|
}, La = (e, t, n, r) => {
|
|
3386
|
+
let i = e._zod.def, a = N(i.innerType, t, r), o = t.seen.get(e);
|
|
3387
|
+
t.target === "openapi-3.0" ? (o.ref = i.innerType, n.nullable = !0) : n.anyOf = [a, { type: "null" }];
|
|
3388
|
+
}, Ra = (e, t, n, r) => {
|
|
3389
3389
|
let i = e._zod.def;
|
|
3390
|
-
|
|
3390
|
+
N(i.innerType, t, r);
|
|
3391
3391
|
let a = t.seen.get(e);
|
|
3392
3392
|
a.ref = i.innerType;
|
|
3393
|
-
},
|
|
3394
|
-
function
|
|
3393
|
+
}, za = Symbol();
|
|
3394
|
+
function Ba(e, t, n, r, i) {
|
|
3395
3395
|
let a = !1, o = JSON.stringify(e, (e, t) => typeof t == "bigint" ? (a = !0, null) : t);
|
|
3396
|
-
return a ? (
|
|
3396
|
+
return a ? (M(t, n, r, i, "BigInt defaults cannot be represented in JSON Schema"), za) : JSON.parse(o);
|
|
3397
3397
|
}
|
|
3398
|
-
var
|
|
3398
|
+
var Va = (e, t, n, r) => {
|
|
3399
3399
|
let i = e._zod.def;
|
|
3400
|
-
|
|
3400
|
+
N(i.innerType, t, r);
|
|
3401
3401
|
let a = t.seen.get(e);
|
|
3402
3402
|
a.ref = i.innerType;
|
|
3403
|
-
let o =
|
|
3404
|
-
o !==
|
|
3405
|
-
},
|
|
3403
|
+
let o = Ba(i.defaultValue, e, t, n, r);
|
|
3404
|
+
o !== za && (n.default = o);
|
|
3405
|
+
}, Ha = (e, t, n, r) => {
|
|
3406
3406
|
let i = e._zod.def;
|
|
3407
|
-
|
|
3407
|
+
N(i.innerType, t, r);
|
|
3408
3408
|
let a = t.seen.get(e);
|
|
3409
3409
|
if (a.ref = i.innerType, t.io !== "input") return;
|
|
3410
|
-
let o =
|
|
3411
|
-
o !==
|
|
3412
|
-
},
|
|
3410
|
+
let o = Ba(i.defaultValue, e, t, n, r);
|
|
3411
|
+
o !== za && (n._prefault = o);
|
|
3412
|
+
}, Ua = (e, t, n, r) => {
|
|
3413
3413
|
let i = e._zod.def;
|
|
3414
|
-
|
|
3414
|
+
N(i.innerType, t, r);
|
|
3415
3415
|
let a = t.seen.get(e);
|
|
3416
3416
|
a.ref = i.innerType;
|
|
3417
3417
|
let o;
|
|
3418
3418
|
try {
|
|
3419
3419
|
o = i.catchValue(void 0);
|
|
3420
3420
|
} catch {
|
|
3421
|
-
|
|
3421
|
+
M(e, t, n, r, "Dynamic catch values are not supported in JSON Schema");
|
|
3422
3422
|
return;
|
|
3423
3423
|
}
|
|
3424
3424
|
n.default = o;
|
|
3425
|
-
},
|
|
3425
|
+
}, Wa = (e, t, n, r) => {
|
|
3426
3426
|
let i = e._zod.def, a = i.in._zod.traits.has("$ZodTransform"), o = t.io === "input" ? a ? i.out : i.in : i.out;
|
|
3427
|
-
|
|
3427
|
+
N(o, t, r);
|
|
3428
3428
|
let s = t.seen.get(e);
|
|
3429
3429
|
s.ref = o;
|
|
3430
|
-
},
|
|
3430
|
+
}, Ga = (e, t, n, r) => {
|
|
3431
3431
|
let i = e._zod.def;
|
|
3432
|
-
|
|
3432
|
+
N(i.innerType, t, r);
|
|
3433
3433
|
let a = t.seen.get(e);
|
|
3434
3434
|
a.ref = i.innerType, n.readOnly = !0;
|
|
3435
|
-
},
|
|
3435
|
+
}, Ka = (e, t, n, r) => {
|
|
3436
3436
|
let i = e._zod.def;
|
|
3437
|
-
|
|
3437
|
+
N(i.innerType, t, r);
|
|
3438
3438
|
let a = t.seen.get(e);
|
|
3439
3439
|
a.ref = i.innerType;
|
|
3440
|
-
},
|
|
3440
|
+
}, qa = (e, t, n, r) => {
|
|
3441
3441
|
let i = e._zod.innerType;
|
|
3442
|
-
|
|
3442
|
+
N(i, t, r);
|
|
3443
3443
|
let a = t.seen.get(e);
|
|
3444
3444
|
a.ref = i;
|
|
3445
|
-
},
|
|
3446
|
-
function
|
|
3445
|
+
}, Ja = /* @__PURE__ */ new WeakSet([Object.prototype, Error.prototype]);
|
|
3446
|
+
function Ya(e, t, n) {
|
|
3447
3447
|
Object.defineProperty(e, t, {
|
|
3448
3448
|
configurable: !0,
|
|
3449
3449
|
enumerable: !1,
|
|
@@ -3464,12 +3464,12 @@ function Ja(e, t, n) {
|
|
|
3464
3464
|
}
|
|
3465
3465
|
});
|
|
3466
3466
|
}
|
|
3467
|
-
var
|
|
3468
|
-
|
|
3467
|
+
var F = /*@__PURE__*/ T("ZodError", (e, t) => {
|
|
3468
|
+
Ue.init(e, t), e.name = "ZodError";
|
|
3469
3469
|
let r = Object.getPrototypeOf(e);
|
|
3470
|
-
|
|
3470
|
+
Ja.has(r) || (Ja.add(r), Ya(r, "format", (e) => (t) => qe(e, t)), Ya(r, "flatten", (e) => (t) => Ke(e, t)), Ya(r, "addIssue", (e) => (t) => {
|
|
3471
3471
|
e.issues.push(t), e.message = JSON.stringify(e.issues, n, 2);
|
|
3472
|
-
}),
|
|
3472
|
+
}), Ya(r, "addIssues", (e) => (t) => {
|
|
3473
3473
|
e.issues.push(...t), e.message = JSON.stringify(e.issues, n, 2);
|
|
3474
3474
|
}), Object.defineProperty(r, "isEmpty", {
|
|
3475
3475
|
configurable: !0,
|
|
@@ -3478,16 +3478,16 @@ var I = /*@__PURE__*/ T("ZodError", (e, t) => {
|
|
|
3478
3478
|
return this.issues.length === 0;
|
|
3479
3479
|
}
|
|
3480
3480
|
}));
|
|
3481
|
-
}, void 0, { Parent: Error }),
|
|
3481
|
+
}, void 0, { Parent: Error }), Xa = /* @__PURE__ */ Ye(F), Za = /* @__PURE__ */ Xe(F), Qa = /* @__PURE__ */ Ze(F), $a = /* @__PURE__ */ $e(F), eo = /* @__PURE__ */ tt(F), to = /* @__PURE__ */ nt(F), no = /* @__PURE__ */ rt(F), ro = /* @__PURE__ */ it(F), io = /* @__PURE__ */ at(F), ao = /* @__PURE__ */ ot(F), oo = /* @__PURE__ */ st(F), so = /* @__PURE__ */ ct(F);
|
|
3482
3482
|
//#endregion
|
|
3483
3483
|
//#region ../../node_modules/.bun/zod@4.5.4/node_modules/zod/v4/classic/schemas.js
|
|
3484
|
-
function so() {
|
|
3485
|
-
D.localeError || O(Xr());
|
|
3486
|
-
}
|
|
3487
3484
|
function co() {
|
|
3488
|
-
|
|
3485
|
+
E.localeError || D(Zr());
|
|
3486
|
+
}
|
|
3487
|
+
function lo() {
|
|
3488
|
+
E.memoizer || D({ memoizer: Jr() });
|
|
3489
3489
|
}
|
|
3490
|
-
var
|
|
3490
|
+
var I = /*@__PURE__*/ T("ZodType", (e, t) => (co(), k.init(e, t), e.def = t, e.type = t.type, e), {
|
|
3491
3491
|
check(...e) {
|
|
3492
3492
|
let t = this.def;
|
|
3493
3493
|
return this.clone(u(t, { checks: [...t.checks ?? [], ...e.map((e) => typeof e == "function" ? { _zod: {
|
|
@@ -3509,64 +3509,64 @@ var L = /*@__PURE__*/ T("ZodType", (e, t) => (so(), A.init(e, t), e.def = t, e.t
|
|
|
3509
3509
|
return e.add(this, t), this;
|
|
3510
3510
|
},
|
|
3511
3511
|
refine(e, t) {
|
|
3512
|
-
return this.check(
|
|
3512
|
+
return this.check(ws(e, t));
|
|
3513
3513
|
},
|
|
3514
3514
|
superRefine(e, t) {
|
|
3515
|
-
return this.check(
|
|
3515
|
+
return this.check(Ts(e, t));
|
|
3516
3516
|
},
|
|
3517
3517
|
overwrite(e) {
|
|
3518
|
-
return this.check(/* @__PURE__ */
|
|
3518
|
+
return this.check(/* @__PURE__ */ j(e));
|
|
3519
3519
|
},
|
|
3520
3520
|
optional() {
|
|
3521
|
-
return
|
|
3521
|
+
return is(this);
|
|
3522
3522
|
},
|
|
3523
3523
|
exactOptional() {
|
|
3524
|
-
return
|
|
3524
|
+
return os(this);
|
|
3525
3525
|
},
|
|
3526
3526
|
nullable() {
|
|
3527
|
-
return
|
|
3527
|
+
return cs(this);
|
|
3528
3528
|
},
|
|
3529
3529
|
nullish() {
|
|
3530
|
-
return
|
|
3530
|
+
return is(cs(this));
|
|
3531
3531
|
},
|
|
3532
3532
|
nonoptional(e) {
|
|
3533
|
-
return
|
|
3533
|
+
return ms(this, e);
|
|
3534
3534
|
},
|
|
3535
3535
|
array() {
|
|
3536
|
-
return
|
|
3536
|
+
return H(this);
|
|
3537
3537
|
},
|
|
3538
3538
|
or(e) {
|
|
3539
|
-
return
|
|
3539
|
+
return W([this, e]);
|
|
3540
3540
|
},
|
|
3541
3541
|
and(e) {
|
|
3542
|
-
return
|
|
3542
|
+
return Yo(this, e);
|
|
3543
3543
|
},
|
|
3544
3544
|
transform(e) {
|
|
3545
|
-
return
|
|
3545
|
+
return vs(this, ns(e));
|
|
3546
3546
|
},
|
|
3547
3547
|
default(e) {
|
|
3548
|
-
return
|
|
3548
|
+
return us(this, e);
|
|
3549
3549
|
},
|
|
3550
3550
|
prefault(e) {
|
|
3551
|
-
return
|
|
3551
|
+
return fs(this, e);
|
|
3552
3552
|
},
|
|
3553
3553
|
catch(e) {
|
|
3554
|
-
return
|
|
3554
|
+
return gs(this, e);
|
|
3555
3555
|
},
|
|
3556
3556
|
pipe(e) {
|
|
3557
|
-
return
|
|
3557
|
+
return vs(this, e);
|
|
3558
3558
|
},
|
|
3559
3559
|
readonly() {
|
|
3560
|
-
return
|
|
3560
|
+
return bs(this);
|
|
3561
3561
|
},
|
|
3562
3562
|
describe(e) {
|
|
3563
3563
|
let t = this.clone();
|
|
3564
|
-
return
|
|
3564
|
+
return ti.add(t, { description: e }), t;
|
|
3565
3565
|
},
|
|
3566
3566
|
meta(...e) {
|
|
3567
|
-
if (e.length === 0) return
|
|
3567
|
+
if (e.length === 0) return ti.get(this);
|
|
3568
3568
|
let t = this.clone();
|
|
3569
|
-
return
|
|
3569
|
+
return ti.add(t, e[0]), t;
|
|
3570
3570
|
},
|
|
3571
3571
|
isOptional() {
|
|
3572
3572
|
return this.safeParse(void 0).success;
|
|
@@ -3579,10 +3579,10 @@ var L = /*@__PURE__*/ T("ZodType", (e, t) => (so(), A.init(e, t), e.def = t, e.t
|
|
|
3579
3579
|
},
|
|
3580
3580
|
get "~standard"() {
|
|
3581
3581
|
return Se(this, "~standard", {
|
|
3582
|
-
...
|
|
3582
|
+
...un(this),
|
|
3583
3583
|
jsonSchema: {
|
|
3584
|
-
input:
|
|
3585
|
-
output:
|
|
3584
|
+
input: ga(this, "input"),
|
|
3585
|
+
output: ga(this, "output")
|
|
3586
3586
|
}
|
|
3587
3587
|
});
|
|
3588
3588
|
},
|
|
@@ -3590,16 +3590,16 @@ var L = /*@__PURE__*/ T("ZodType", (e, t) => (so(), A.init(e, t), e.def = t, e.t
|
|
|
3590
3590
|
S(this, "~standard", e);
|
|
3591
3591
|
},
|
|
3592
3592
|
parse: function e(t, n) {
|
|
3593
|
-
return
|
|
3593
|
+
return Xa(this, t, n, { callee: e });
|
|
3594
3594
|
},
|
|
3595
3595
|
parseAsync: async function e(t, n) {
|
|
3596
|
-
return await
|
|
3596
|
+
return await Za(this, t, n, { callee: e });
|
|
3597
3597
|
},
|
|
3598
3598
|
safeParse(e, t) {
|
|
3599
|
-
return
|
|
3599
|
+
return Qa(this, e, t);
|
|
3600
3600
|
},
|
|
3601
3601
|
async safeParseAsync(e, t) {
|
|
3602
|
-
return
|
|
3602
|
+
return $a(this, e, t);
|
|
3603
3603
|
},
|
|
3604
3604
|
get spa() {
|
|
3605
3605
|
return this?.safeParseAsync;
|
|
@@ -3608,243 +3608,243 @@ var L = /*@__PURE__*/ T("ZodType", (e, t) => (so(), A.init(e, t), e.def = t, e.t
|
|
|
3608
3608
|
S(this, "spa", e);
|
|
3609
3609
|
},
|
|
3610
3610
|
encode: function e(t, n) {
|
|
3611
|
-
return
|
|
3611
|
+
return eo(this, t, n, { callee: e });
|
|
3612
3612
|
},
|
|
3613
3613
|
decode: function e(t, n) {
|
|
3614
|
-
return
|
|
3614
|
+
return to(this, t, n, { callee: e });
|
|
3615
3615
|
},
|
|
3616
3616
|
encodeAsync: async function e(t, n) {
|
|
3617
|
-
return await
|
|
3617
|
+
return await no(this, t, n, { callee: e });
|
|
3618
3618
|
},
|
|
3619
3619
|
decodeAsync: async function e(t, n) {
|
|
3620
|
-
return await
|
|
3620
|
+
return await ro(this, t, n, { callee: e });
|
|
3621
3621
|
},
|
|
3622
3622
|
safeEncode(e, t) {
|
|
3623
|
-
return
|
|
3623
|
+
return io(this, e, t);
|
|
3624
3624
|
},
|
|
3625
3625
|
safeDecode(e, t) {
|
|
3626
|
-
return
|
|
3626
|
+
return ao(this, e, t);
|
|
3627
3627
|
},
|
|
3628
3628
|
async safeEncodeAsync(e, t) {
|
|
3629
|
-
return
|
|
3629
|
+
return oo(this, e, t);
|
|
3630
3630
|
},
|
|
3631
3631
|
async safeDecodeAsync(e, t) {
|
|
3632
|
-
return
|
|
3632
|
+
return so(this, e, t);
|
|
3633
3633
|
},
|
|
3634
3634
|
toJSONSchema(e) {
|
|
3635
|
-
return
|
|
3635
|
+
return ha(this, {})(e);
|
|
3636
3636
|
},
|
|
3637
3637
|
get description() {
|
|
3638
|
-
return
|
|
3638
|
+
return ti.get(this)?.description;
|
|
3639
3639
|
},
|
|
3640
3640
|
get _def() {
|
|
3641
3641
|
return this._zod.def;
|
|
3642
3642
|
}
|
|
3643
|
-
}),
|
|
3644
|
-
|
|
3643
|
+
}), uo = /*@__PURE__*/ T("_ZodString", (e, t) => {
|
|
3644
|
+
dn.init(e, t), I.init(e, t), e._zod.processJSONSchema = (t, n, r) => va(e, t, n, r);
|
|
3645
3645
|
let n = e._zod.bag;
|
|
3646
3646
|
e.format = n.format ?? null, e.minLength = n.minimum ?? null, e.maxLength = n.maximum ?? null;
|
|
3647
3647
|
}, {
|
|
3648
3648
|
regex(...e) {
|
|
3649
|
-
return this.check(/* @__PURE__ */
|
|
3649
|
+
return this.check(/* @__PURE__ */ Ui(...e));
|
|
3650
3650
|
},
|
|
3651
3651
|
includes(...e) {
|
|
3652
|
-
return this.check(/* @__PURE__ */
|
|
3652
|
+
return this.check(/* @__PURE__ */ Ki(...e));
|
|
3653
3653
|
},
|
|
3654
3654
|
startsWith(...e) {
|
|
3655
|
-
return this.check(/* @__PURE__ */
|
|
3655
|
+
return this.check(/* @__PURE__ */ qi(...e));
|
|
3656
3656
|
},
|
|
3657
3657
|
endsWith(...e) {
|
|
3658
|
-
return this.check(/* @__PURE__ */
|
|
3658
|
+
return this.check(/* @__PURE__ */ Ji(...e));
|
|
3659
3659
|
},
|
|
3660
3660
|
min(...e) {
|
|
3661
|
-
return this.check(/* @__PURE__ */
|
|
3661
|
+
return this.check(/* @__PURE__ */ Vi(...e));
|
|
3662
3662
|
},
|
|
3663
3663
|
max(...e) {
|
|
3664
|
-
return this.check(/* @__PURE__ */
|
|
3664
|
+
return this.check(/* @__PURE__ */ Bi(...e));
|
|
3665
3665
|
},
|
|
3666
3666
|
length(...e) {
|
|
3667
|
-
return this.check(/* @__PURE__ */
|
|
3667
|
+
return this.check(/* @__PURE__ */ Hi(...e));
|
|
3668
3668
|
},
|
|
3669
3669
|
nonempty(...e) {
|
|
3670
|
-
return this.check(/* @__PURE__ */
|
|
3670
|
+
return this.check(/* @__PURE__ */ Vi(1, ...e));
|
|
3671
3671
|
},
|
|
3672
3672
|
lowercase(e) {
|
|
3673
|
-
return this.check(/* @__PURE__ */
|
|
3673
|
+
return this.check(/* @__PURE__ */ Wi(e));
|
|
3674
3674
|
},
|
|
3675
3675
|
uppercase(e) {
|
|
3676
|
-
return this.check(/* @__PURE__ */
|
|
3676
|
+
return this.check(/* @__PURE__ */ Gi(e));
|
|
3677
3677
|
},
|
|
3678
3678
|
trim() {
|
|
3679
|
-
return this.check(/* @__PURE__ */
|
|
3679
|
+
return this.check(/* @__PURE__ */ Xi());
|
|
3680
3680
|
},
|
|
3681
3681
|
normalize(...e) {
|
|
3682
|
-
return this.check(/* @__PURE__ */
|
|
3682
|
+
return this.check(/* @__PURE__ */ Yi(...e));
|
|
3683
3683
|
},
|
|
3684
3684
|
toLowerCase() {
|
|
3685
|
-
return this.check(/* @__PURE__ */
|
|
3685
|
+
return this.check(/* @__PURE__ */ Zi());
|
|
3686
3686
|
},
|
|
3687
3687
|
toUpperCase() {
|
|
3688
|
-
return this.check(/* @__PURE__ */
|
|
3688
|
+
return this.check(/* @__PURE__ */ Qi());
|
|
3689
3689
|
},
|
|
3690
3690
|
slugify() {
|
|
3691
|
-
return this.check(/* @__PURE__ */
|
|
3691
|
+
return this.check(/* @__PURE__ */ $i());
|
|
3692
3692
|
}
|
|
3693
|
-
}),
|
|
3694
|
-
|
|
3693
|
+
}), fo = /*@__PURE__*/ T("ZodString", (e, t) => {
|
|
3694
|
+
dn.init(e, t), uo.init(e, t);
|
|
3695
3695
|
}, {
|
|
3696
3696
|
email(e) {
|
|
3697
|
-
return this.check(/* @__PURE__ */
|
|
3697
|
+
return this.check(/* @__PURE__ */ ri(_o, e));
|
|
3698
3698
|
},
|
|
3699
3699
|
url(e) {
|
|
3700
|
-
return this.check(/* @__PURE__ */
|
|
3700
|
+
return this.check(/* @__PURE__ */ li(bo, e));
|
|
3701
3701
|
},
|
|
3702
3702
|
jwt(e) {
|
|
3703
|
-
return this.check(/* @__PURE__ */
|
|
3703
|
+
return this.check(/* @__PURE__ */ wi(Fo, e));
|
|
3704
3704
|
},
|
|
3705
3705
|
emoji(e) {
|
|
3706
|
-
return this.check(/* @__PURE__ */
|
|
3706
|
+
return this.check(/* @__PURE__ */ ui(xo, e));
|
|
3707
3707
|
},
|
|
3708
3708
|
guid(e) {
|
|
3709
|
-
return this.check(/* @__PURE__ */
|
|
3709
|
+
return this.check(/* @__PURE__ */ ii(vo, e));
|
|
3710
3710
|
},
|
|
3711
3711
|
uuid(e) {
|
|
3712
|
-
return this.check(/* @__PURE__ */
|
|
3712
|
+
return this.check(/* @__PURE__ */ ai(yo, e));
|
|
3713
3713
|
},
|
|
3714
3714
|
uuidv4(e) {
|
|
3715
|
-
return this.check(/* @__PURE__ */
|
|
3715
|
+
return this.check(/* @__PURE__ */ oi(yo, e));
|
|
3716
3716
|
},
|
|
3717
3717
|
uuidv6(e) {
|
|
3718
|
-
return this.check(/* @__PURE__ */
|
|
3718
|
+
return this.check(/* @__PURE__ */ si(yo, e));
|
|
3719
3719
|
},
|
|
3720
3720
|
uuidv7(e) {
|
|
3721
|
-
return this.check(/* @__PURE__ */
|
|
3721
|
+
return this.check(/* @__PURE__ */ ci(yo, e));
|
|
3722
3722
|
},
|
|
3723
3723
|
nanoid(e) {
|
|
3724
|
-
return this.check(/* @__PURE__ */
|
|
3724
|
+
return this.check(/* @__PURE__ */ di(So, e));
|
|
3725
3725
|
},
|
|
3726
3726
|
cuid(e) {
|
|
3727
|
-
return this.check(/* @__PURE__ */
|
|
3727
|
+
return this.check(/* @__PURE__ */ fi(Co, e));
|
|
3728
3728
|
},
|
|
3729
3729
|
cuid2(e) {
|
|
3730
|
-
return this.check(/* @__PURE__ */
|
|
3730
|
+
return this.check(/* @__PURE__ */ pi(wo, e));
|
|
3731
3731
|
},
|
|
3732
3732
|
ulid(e) {
|
|
3733
|
-
return this.check(/* @__PURE__ */
|
|
3733
|
+
return this.check(/* @__PURE__ */ mi(To, e));
|
|
3734
3734
|
},
|
|
3735
3735
|
base64(e) {
|
|
3736
|
-
return this.check(/* @__PURE__ */
|
|
3736
|
+
return this.check(/* @__PURE__ */ xi(Mo, e));
|
|
3737
3737
|
},
|
|
3738
3738
|
base64url(e) {
|
|
3739
|
-
return this.check(/* @__PURE__ */
|
|
3739
|
+
return this.check(/* @__PURE__ */ Si(No, e));
|
|
3740
3740
|
},
|
|
3741
3741
|
xid(e) {
|
|
3742
|
-
return this.check(/* @__PURE__ */
|
|
3742
|
+
return this.check(/* @__PURE__ */ hi(Eo, e));
|
|
3743
3743
|
},
|
|
3744
3744
|
ksuid(e) {
|
|
3745
|
-
return this.check(/* @__PURE__ */
|
|
3745
|
+
return this.check(/* @__PURE__ */ gi(Do, e));
|
|
3746
3746
|
},
|
|
3747
3747
|
ipv4(e) {
|
|
3748
|
-
return this.check(/* @__PURE__ */
|
|
3748
|
+
return this.check(/* @__PURE__ */ _i(Oo, e));
|
|
3749
3749
|
},
|
|
3750
3750
|
ipv6(e) {
|
|
3751
|
-
return this.check(/* @__PURE__ */
|
|
3751
|
+
return this.check(/* @__PURE__ */ vi(ko, e));
|
|
3752
3752
|
},
|
|
3753
3753
|
cidrv4(e) {
|
|
3754
|
-
return this.check(/* @__PURE__ */
|
|
3754
|
+
return this.check(/* @__PURE__ */ yi(Ao, e));
|
|
3755
3755
|
},
|
|
3756
3756
|
cidrv6(e) {
|
|
3757
|
-
return this.check(/* @__PURE__ */
|
|
3757
|
+
return this.check(/* @__PURE__ */ bi(jo, e));
|
|
3758
3758
|
},
|
|
3759
3759
|
e164(e) {
|
|
3760
|
-
return this.check(/* @__PURE__ */
|
|
3760
|
+
return this.check(/* @__PURE__ */ Ci(Po, e));
|
|
3761
3761
|
},
|
|
3762
3762
|
datetime(e) {
|
|
3763
|
-
return this.check(/* @__PURE__ */
|
|
3763
|
+
return this.check(/* @__PURE__ */ Ti(po, e));
|
|
3764
3764
|
},
|
|
3765
3765
|
date(e) {
|
|
3766
|
-
return this.check(/* @__PURE__ */
|
|
3766
|
+
return this.check(/* @__PURE__ */ Ei(mo, e));
|
|
3767
3767
|
},
|
|
3768
3768
|
time(e) {
|
|
3769
|
-
return this.check(/* @__PURE__ */
|
|
3769
|
+
return this.check(/* @__PURE__ */ Di(ho, e));
|
|
3770
3770
|
},
|
|
3771
3771
|
duration(e) {
|
|
3772
|
-
return this.check(/* @__PURE__ */
|
|
3772
|
+
return this.check(/* @__PURE__ */ Oi(go, e));
|
|
3773
3773
|
}
|
|
3774
3774
|
});
|
|
3775
|
-
function
|
|
3776
|
-
return /* @__PURE__ */
|
|
3775
|
+
function L(e) {
|
|
3776
|
+
return /* @__PURE__ */ ni(fo, e);
|
|
3777
3777
|
}
|
|
3778
3778
|
var R = /*@__PURE__*/ T("ZodStringFormat", (e, t) => {
|
|
3779
|
-
|
|
3779
|
+
A.init(e, t), uo.init(e, t);
|
|
3780
3780
|
}), po = /*@__PURE__*/ T("ZodISODateTime", (e, t) => {
|
|
3781
|
-
Dn.init(e, t), R.init(e, t);
|
|
3782
|
-
}), mo = /*@__PURE__*/ T("ZodISODate", (e, t) => {
|
|
3783
3781
|
On.init(e, t), R.init(e, t);
|
|
3784
|
-
}),
|
|
3782
|
+
}), mo = /*@__PURE__*/ T("ZodISODate", (e, t) => {
|
|
3785
3783
|
kn.init(e, t), R.init(e, t);
|
|
3786
|
-
}),
|
|
3784
|
+
}), ho = /*@__PURE__*/ T("ZodISOTime", (e, t) => {
|
|
3787
3785
|
An.init(e, t), R.init(e, t);
|
|
3786
|
+
}), go = /*@__PURE__*/ T("ZodISODuration", (e, t) => {
|
|
3787
|
+
jn.init(e, t), R.init(e, t);
|
|
3788
3788
|
}), _o = /*@__PURE__*/ T("ZodEmail", (e, t) => {
|
|
3789
|
-
|
|
3789
|
+
mn.init(e, t), R.init(e, t);
|
|
3790
3790
|
}), vo = /*@__PURE__*/ T("ZodGUID", (e, t) => {
|
|
3791
|
-
dn.init(e, t), R.init(e, t);
|
|
3792
|
-
}), yo = /*@__PURE__*/ T("ZodUUID", (e, t) => {
|
|
3793
3791
|
fn.init(e, t), R.init(e, t);
|
|
3792
|
+
}), yo = /*@__PURE__*/ T("ZodUUID", (e, t) => {
|
|
3793
|
+
pn.init(e, t), R.init(e, t);
|
|
3794
3794
|
}), bo = /*@__PURE__*/ T("ZodURL", (e, t) => {
|
|
3795
|
-
yn.init(e, t), R.init(e, t);
|
|
3796
|
-
}), xo = /*@__PURE__*/ T("ZodEmoji", (e, t) => {
|
|
3797
3795
|
bn.init(e, t), R.init(e, t);
|
|
3798
|
-
}),
|
|
3796
|
+
}), xo = /*@__PURE__*/ T("ZodEmoji", (e, t) => {
|
|
3799
3797
|
xn.init(e, t), R.init(e, t);
|
|
3800
|
-
}),
|
|
3798
|
+
}), So = /*@__PURE__*/ T("ZodNanoID", (e, t) => {
|
|
3801
3799
|
Sn.init(e, t), R.init(e, t);
|
|
3802
|
-
}),
|
|
3800
|
+
}), Co = /*@__PURE__*/ T("ZodCUID", (e, t) => {
|
|
3803
3801
|
Cn.init(e, t), R.init(e, t);
|
|
3804
|
-
}),
|
|
3802
|
+
}), wo = /*@__PURE__*/ T("ZodCUID2", (e, t) => {
|
|
3805
3803
|
wn.init(e, t), R.init(e, t);
|
|
3806
|
-
}),
|
|
3804
|
+
}), To = /*@__PURE__*/ T("ZodULID", (e, t) => {
|
|
3807
3805
|
Tn.init(e, t), R.init(e, t);
|
|
3808
|
-
}),
|
|
3806
|
+
}), Eo = /*@__PURE__*/ T("ZodXID", (e, t) => {
|
|
3809
3807
|
En.init(e, t), R.init(e, t);
|
|
3808
|
+
}), Do = /*@__PURE__*/ T("ZodKSUID", (e, t) => {
|
|
3809
|
+
Dn.init(e, t), R.init(e, t);
|
|
3810
3810
|
}), Oo = /*@__PURE__*/ T("ZodIPv4", (e, t) => {
|
|
3811
|
-
|
|
3811
|
+
Mn.init(e, t), R.init(e, t);
|
|
3812
3812
|
}), ko = /*@__PURE__*/ T("ZodIPv6", (e, t) => {
|
|
3813
|
-
Pn.init(e, t), R.init(e, t);
|
|
3814
|
-
}), Ao = /*@__PURE__*/ T("ZodCIDRv4", (e, t) => {
|
|
3815
3813
|
Fn.init(e, t), R.init(e, t);
|
|
3814
|
+
}), Ao = /*@__PURE__*/ T("ZodCIDRv4", (e, t) => {
|
|
3815
|
+
In.init(e, t), R.init(e, t);
|
|
3816
3816
|
}), jo = /*@__PURE__*/ T("ZodCIDRv6", (e, t) => {
|
|
3817
|
-
|
|
3817
|
+
Rn.init(e, t), R.init(e, t);
|
|
3818
3818
|
}), Mo = /*@__PURE__*/ T("ZodBase64", (e, t) => {
|
|
3819
|
-
|
|
3819
|
+
Bn.init(e, t), R.init(e, t);
|
|
3820
3820
|
}), No = /*@__PURE__*/ T("ZodBase64URL", (e, t) => {
|
|
3821
|
-
Vn.init(e, t), R.init(e, t);
|
|
3822
|
-
}), Po = /*@__PURE__*/ T("ZodE164", (e, t) => {
|
|
3823
3821
|
Hn.init(e, t), R.init(e, t);
|
|
3822
|
+
}), Po = /*@__PURE__*/ T("ZodE164", (e, t) => {
|
|
3823
|
+
Un.init(e, t), R.init(e, t);
|
|
3824
3824
|
}), Fo = /*@__PURE__*/ T("ZodJWT", (e, t) => {
|
|
3825
|
-
|
|
3825
|
+
Gn.init(e, t), R.init(e, t);
|
|
3826
3826
|
}), Io = /*@__PURE__*/ T("ZodNumber", (e, t) => {
|
|
3827
|
-
|
|
3827
|
+
Kn.init(e, t), I.init(e, t), e._zod.processJSONSchema = (t, n, r) => ya(e, t, n, r);
|
|
3828
3828
|
let n = e._zod.bag;
|
|
3829
3829
|
e.minValue = Math.max(n.minimum ?? -Infinity, n.exclusiveMinimum ?? -Infinity) ?? null, e.maxValue = Math.min(n.maximum ?? Infinity, n.exclusiveMaximum ?? Infinity) ?? null, e.isInt = (n.format ?? "").includes("int") || Number.isSafeInteger(n.multipleOf ?? .5), e.isFinite = !0, e.format = n.format ?? null;
|
|
3830
3830
|
}, {
|
|
3831
3831
|
gt(e, t) {
|
|
3832
|
-
return this.check(/* @__PURE__ */
|
|
3832
|
+
return this.check(/* @__PURE__ */ Li(e, t));
|
|
3833
3833
|
},
|
|
3834
3834
|
gte(e, t) {
|
|
3835
|
-
return this.check(/* @__PURE__ */
|
|
3835
|
+
return this.check(/* @__PURE__ */ Ri(e, t));
|
|
3836
3836
|
},
|
|
3837
3837
|
min(e, t) {
|
|
3838
|
-
return this.check(/* @__PURE__ */
|
|
3838
|
+
return this.check(/* @__PURE__ */ Ri(e, t));
|
|
3839
3839
|
},
|
|
3840
3840
|
lt(e, t) {
|
|
3841
|
-
return this.check(/* @__PURE__ */
|
|
3841
|
+
return this.check(/* @__PURE__ */ Fi(e, t));
|
|
3842
3842
|
},
|
|
3843
3843
|
lte(e, t) {
|
|
3844
|
-
return this.check(/* @__PURE__ */
|
|
3844
|
+
return this.check(/* @__PURE__ */ Ii(e, t));
|
|
3845
3845
|
},
|
|
3846
3846
|
max(e, t) {
|
|
3847
|
-
return this.check(/* @__PURE__ */
|
|
3847
|
+
return this.check(/* @__PURE__ */ Ii(e, t));
|
|
3848
3848
|
},
|
|
3849
3849
|
int(e) {
|
|
3850
3850
|
return this.check(Ro(e));
|
|
@@ -3853,87 +3853,87 @@ var R = /*@__PURE__*/ T("ZodStringFormat", (e, t) => {
|
|
|
3853
3853
|
return this.check(Ro(e));
|
|
3854
3854
|
},
|
|
3855
3855
|
positive(e) {
|
|
3856
|
-
return this.check(/* @__PURE__ */
|
|
3856
|
+
return this.check(/* @__PURE__ */ Li(0, e));
|
|
3857
3857
|
},
|
|
3858
3858
|
nonnegative(e) {
|
|
3859
|
-
return this.check(/* @__PURE__ */
|
|
3859
|
+
return this.check(/* @__PURE__ */ Ri(0, e));
|
|
3860
3860
|
},
|
|
3861
3861
|
negative(e) {
|
|
3862
|
-
return this.check(/* @__PURE__ */
|
|
3862
|
+
return this.check(/* @__PURE__ */ Fi(0, e));
|
|
3863
3863
|
},
|
|
3864
3864
|
nonpositive(e) {
|
|
3865
|
-
return this.check(/* @__PURE__ */
|
|
3865
|
+
return this.check(/* @__PURE__ */ Ii(0, e));
|
|
3866
3866
|
},
|
|
3867
3867
|
multipleOf(e, t) {
|
|
3868
|
-
return this.check(/* @__PURE__ */
|
|
3868
|
+
return this.check(/* @__PURE__ */ zi(e, t));
|
|
3869
3869
|
},
|
|
3870
3870
|
step(e, t) {
|
|
3871
|
-
return this.check(/* @__PURE__ */
|
|
3871
|
+
return this.check(/* @__PURE__ */ zi(e, t));
|
|
3872
3872
|
},
|
|
3873
3873
|
finite() {
|
|
3874
3874
|
return this;
|
|
3875
3875
|
}
|
|
3876
3876
|
});
|
|
3877
3877
|
function z(e) {
|
|
3878
|
-
return /* @__PURE__ */
|
|
3878
|
+
return /* @__PURE__ */ ki(Io, e);
|
|
3879
3879
|
}
|
|
3880
3880
|
var Lo = /*@__PURE__*/ T("ZodNumberFormat", (e, t) => {
|
|
3881
|
-
|
|
3881
|
+
qn.init(e, t), Io.init(e, t);
|
|
3882
3882
|
});
|
|
3883
3883
|
function Ro(e) {
|
|
3884
|
-
return /* @__PURE__ */
|
|
3884
|
+
return /* @__PURE__ */ Ai(Lo, e);
|
|
3885
3885
|
}
|
|
3886
3886
|
var zo = /*@__PURE__*/ T("ZodBoolean", (e, t) => {
|
|
3887
|
-
|
|
3887
|
+
Jn.init(e, t), I.init(e, t), e._zod.processJSONSchema = (t, n, r) => ba(e, t, n, r);
|
|
3888
3888
|
});
|
|
3889
3889
|
function B(e) {
|
|
3890
|
-
return /* @__PURE__ */
|
|
3890
|
+
return /* @__PURE__ */ ji(zo, e);
|
|
3891
3891
|
}
|
|
3892
3892
|
var Bo = /*@__PURE__*/ T("ZodNull", (e, t) => {
|
|
3893
|
-
|
|
3893
|
+
Yn.init(e, t), I.init(e, t), e._zod.processJSONSchema = (t, n, r) => xa(e, t, n, r);
|
|
3894
3894
|
});
|
|
3895
3895
|
function Vo(e) {
|
|
3896
|
-
return /* @__PURE__ */
|
|
3896
|
+
return /* @__PURE__ */ Mi(Bo, e);
|
|
3897
3897
|
}
|
|
3898
3898
|
var Ho = /*@__PURE__*/ T("ZodUnknown", (e, t) => {
|
|
3899
|
-
|
|
3899
|
+
Xn.init(e, t), I.init(e, t), e._zod.processJSONSchema = (e, t, n) => void 0;
|
|
3900
3900
|
});
|
|
3901
|
-
function
|
|
3902
|
-
return /* @__PURE__ */
|
|
3901
|
+
function V() {
|
|
3902
|
+
return /* @__PURE__ */ Ni(Ho);
|
|
3903
3903
|
}
|
|
3904
|
-
var
|
|
3905
|
-
|
|
3904
|
+
var Uo = /*@__PURE__*/ T("ZodNever", (e, t) => {
|
|
3905
|
+
Zn.init(e, t), I.init(e, t), e._zod.processJSONSchema = (t, n, r) => Sa(e, t, n, r);
|
|
3906
3906
|
});
|
|
3907
|
-
function
|
|
3908
|
-
return /* @__PURE__ */
|
|
3907
|
+
function Wo(e) {
|
|
3908
|
+
return /* @__PURE__ */ Pi(Uo, e);
|
|
3909
3909
|
}
|
|
3910
|
-
var
|
|
3911
|
-
|
|
3910
|
+
var Go = /*@__PURE__*/ T("ZodArray", (e, t) => {
|
|
3911
|
+
lo(), $n.init(e, t), I.init(e, t), e._zod.processJSONSchema = (t, n, r) => Da(e, t, n, r), e.element = t.element;
|
|
3912
3912
|
}, {
|
|
3913
3913
|
min(e, t) {
|
|
3914
|
-
return this.check(/* @__PURE__ */
|
|
3914
|
+
return this.check(/* @__PURE__ */ Vi(e, t));
|
|
3915
3915
|
},
|
|
3916
3916
|
nonempty(e) {
|
|
3917
|
-
return this.check(/* @__PURE__ */
|
|
3917
|
+
return this.check(/* @__PURE__ */ Vi(1, e));
|
|
3918
3918
|
},
|
|
3919
3919
|
max(e, t) {
|
|
3920
|
-
return this.check(/* @__PURE__ */
|
|
3920
|
+
return this.check(/* @__PURE__ */ Bi(e, t));
|
|
3921
3921
|
},
|
|
3922
3922
|
length(e, t) {
|
|
3923
|
-
return this.check(/* @__PURE__ */
|
|
3923
|
+
return this.check(/* @__PURE__ */ Hi(e, t));
|
|
3924
3924
|
},
|
|
3925
3925
|
unwrap() {
|
|
3926
3926
|
return this.element;
|
|
3927
3927
|
}
|
|
3928
3928
|
});
|
|
3929
|
-
function
|
|
3930
|
-
return /* @__PURE__ */
|
|
3929
|
+
function H(e, t) {
|
|
3930
|
+
return /* @__PURE__ */ ea(Go, e, t);
|
|
3931
3931
|
}
|
|
3932
|
-
var
|
|
3933
|
-
|
|
3932
|
+
var Ko = /*@__PURE__*/ T("ZodObject", (e, t) => {
|
|
3933
|
+
lo(), or.init(e, t), I.init(e, t), e._zod.processJSONSchema = (t, n, r) => ka(e, t, n, r), De(e, "shape", (e) => e._zod.def.shape, !1);
|
|
3934
3934
|
}, {
|
|
3935
3935
|
keyof() {
|
|
3936
|
-
return
|
|
3936
|
+
return K(Object.keys(this._zod.def.shape));
|
|
3937
3937
|
},
|
|
3938
3938
|
catchall(e) {
|
|
3939
3939
|
return this.clone({
|
|
@@ -3944,19 +3944,19 @@ var qo = /*@__PURE__*/ T("ZodObject", (e, t) => {
|
|
|
3944
3944
|
passthrough() {
|
|
3945
3945
|
return this.clone({
|
|
3946
3946
|
...this._zod.def,
|
|
3947
|
-
catchall:
|
|
3947
|
+
catchall: V()
|
|
3948
3948
|
});
|
|
3949
3949
|
},
|
|
3950
3950
|
loose() {
|
|
3951
3951
|
return this.clone({
|
|
3952
3952
|
...this._zod.def,
|
|
3953
|
-
catchall:
|
|
3953
|
+
catchall: V()
|
|
3954
3954
|
});
|
|
3955
3955
|
},
|
|
3956
3956
|
strict() {
|
|
3957
3957
|
return this.clone({
|
|
3958
3958
|
...this._zod.def,
|
|
3959
|
-
catchall:
|
|
3959
|
+
catchall: Wo()
|
|
3960
3960
|
});
|
|
3961
3961
|
},
|
|
3962
3962
|
strip() {
|
|
@@ -3981,44 +3981,44 @@ var qo = /*@__PURE__*/ T("ZodObject", (e, t) => {
|
|
|
3981
3981
|
return se(this, e);
|
|
3982
3982
|
},
|
|
3983
3983
|
partial(...e) {
|
|
3984
|
-
return de(
|
|
3984
|
+
return de(rs, this, e[0]);
|
|
3985
3985
|
},
|
|
3986
3986
|
exactPartial(...e) {
|
|
3987
|
-
return de(
|
|
3987
|
+
return de(as, this, e[0], "exactPartial");
|
|
3988
3988
|
},
|
|
3989
3989
|
required(...e) {
|
|
3990
|
-
return fe(
|
|
3990
|
+
return fe(ps, this, e[0]);
|
|
3991
3991
|
}
|
|
3992
3992
|
});
|
|
3993
|
-
function
|
|
3994
|
-
return new
|
|
3993
|
+
function U(e, t) {
|
|
3994
|
+
return new Ko({
|
|
3995
3995
|
type: "object",
|
|
3996
3996
|
shape: e ?? {},
|
|
3997
3997
|
...v(t)
|
|
3998
3998
|
});
|
|
3999
3999
|
}
|
|
4000
|
-
var
|
|
4001
|
-
|
|
4000
|
+
var qo = /*@__PURE__*/ T("ZodUnion", (e, t) => {
|
|
4001
|
+
cr.init(e, t), I.init(e, t), e._zod.processJSONSchema = (t, n, r) => Aa(e, t, n, r), e.options = t.options;
|
|
4002
4002
|
});
|
|
4003
|
-
function
|
|
4004
|
-
return new
|
|
4003
|
+
function W(e, t) {
|
|
4004
|
+
return new qo({
|
|
4005
4005
|
type: "union",
|
|
4006
4006
|
options: e,
|
|
4007
4007
|
...v(t)
|
|
4008
4008
|
});
|
|
4009
4009
|
}
|
|
4010
|
-
var
|
|
4011
|
-
|
|
4010
|
+
var Jo = /*@__PURE__*/ T("ZodIntersection", (e, t) => {
|
|
4011
|
+
lr.init(e, t), I.init(e, t), e._zod.processJSONSchema = (t, n, r) => ja(e, t, n, r);
|
|
4012
4012
|
});
|
|
4013
|
-
function
|
|
4014
|
-
return new
|
|
4013
|
+
function Yo(e, t) {
|
|
4014
|
+
return new Jo({
|
|
4015
4015
|
type: "intersection",
|
|
4016
4016
|
left: e,
|
|
4017
4017
|
right: t
|
|
4018
4018
|
});
|
|
4019
4019
|
}
|
|
4020
|
-
var
|
|
4021
|
-
|
|
4020
|
+
var Xo = /*@__PURE__*/ T("ZodTuple", (e, t) => {
|
|
4021
|
+
lo(), fr.init(e, t), I.init(e, t), e._zod.processJSONSchema = (t, n, r) => Ma(e, t, n, r);
|
|
4022
4022
|
}, {
|
|
4023
4023
|
rest(e) {
|
|
4024
4024
|
return this.clone({
|
|
@@ -4031,46 +4031,46 @@ var Zo = /*@__PURE__*/ T("ZodTuple", (e, t) => {
|
|
|
4031
4031
|
if (e.checks?.length) throw Error(".partial() cannot be used on tuple schemas containing refinements");
|
|
4032
4032
|
return this.clone({
|
|
4033
4033
|
...e,
|
|
4034
|
-
items: e.items.map((e) => new
|
|
4034
|
+
items: e.items.map((e) => new rs({
|
|
4035
4035
|
type: "optional",
|
|
4036
4036
|
innerType: e
|
|
4037
4037
|
}))
|
|
4038
4038
|
});
|
|
4039
4039
|
}
|
|
4040
4040
|
});
|
|
4041
|
-
function
|
|
4042
|
-
let r = t instanceof
|
|
4043
|
-
return new
|
|
4041
|
+
function Zo(e, t, n) {
|
|
4042
|
+
let r = t instanceof k;
|
|
4043
|
+
return new Xo({
|
|
4044
4044
|
type: "tuple",
|
|
4045
4045
|
items: e,
|
|
4046
4046
|
rest: r ? t : null,
|
|
4047
4047
|
...v(r ? n : t)
|
|
4048
4048
|
});
|
|
4049
4049
|
}
|
|
4050
|
-
var
|
|
4051
|
-
|
|
4050
|
+
var Qo = /*@__PURE__*/ T("ZodRecord", (e, t) => {
|
|
4051
|
+
lo(), gr.init(e, t), I.init(e, t), e._zod.processJSONSchema = (t, n, r) => Ia(e, t, n, r), e.keyType = t.keyType, e.valueType = t.valueType;
|
|
4052
4052
|
});
|
|
4053
|
-
function
|
|
4054
|
-
return !t || !t._zod ? new
|
|
4053
|
+
function G(e, t, n) {
|
|
4054
|
+
return !t || !t._zod ? new Qo({
|
|
4055
4055
|
type: "record",
|
|
4056
|
-
keyType:
|
|
4056
|
+
keyType: L(),
|
|
4057
4057
|
valueType: e,
|
|
4058
4058
|
...v(t)
|
|
4059
|
-
}) : new
|
|
4059
|
+
}) : new Qo({
|
|
4060
4060
|
type: "record",
|
|
4061
4061
|
keyType: e,
|
|
4062
4062
|
valueType: t,
|
|
4063
4063
|
...v(n)
|
|
4064
4064
|
});
|
|
4065
4065
|
}
|
|
4066
|
-
var
|
|
4067
|
-
|
|
4066
|
+
var $o = /*@__PURE__*/ T("ZodEnum", (e, t) => {
|
|
4067
|
+
_r.init(e, t), I.init(e, t), e._zod.processJSONSchema = (t, n, r) => Ca(e, t, n, r), e.enum = t.entries, e.options = Object.values(t.entries);
|
|
4068
4068
|
let n = new Set(Object.keys(t.entries));
|
|
4069
4069
|
e.extract = (e, r) => {
|
|
4070
4070
|
let i = {};
|
|
4071
4071
|
for (let r of e) if (n.has(r)) i[r] = t.entries[r];
|
|
4072
4072
|
else throw Error(`Key ${r} not found in enum`);
|
|
4073
|
-
return new
|
|
4073
|
+
return new $o({
|
|
4074
4074
|
...t,
|
|
4075
4075
|
checks: [],
|
|
4076
4076
|
...v(r),
|
|
@@ -4080,7 +4080,7 @@ var es = /*@__PURE__*/ T("ZodEnum", (e, t) => {
|
|
|
4080
4080
|
let i = { ...t.entries };
|
|
4081
4081
|
for (let t of e) if (n.has(t)) delete i[t];
|
|
4082
4082
|
else throw Error(`Key ${t} not found in enum`);
|
|
4083
|
-
return new
|
|
4083
|
+
return new $o({
|
|
4084
4084
|
...t,
|
|
4085
4085
|
checks: [],
|
|
4086
4086
|
...v(r),
|
|
@@ -4088,29 +4088,29 @@ var es = /*@__PURE__*/ T("ZodEnum", (e, t) => {
|
|
|
4088
4088
|
});
|
|
4089
4089
|
};
|
|
4090
4090
|
});
|
|
4091
|
-
function
|
|
4092
|
-
return new
|
|
4091
|
+
function K(e, t) {
|
|
4092
|
+
return new $o({
|
|
4093
4093
|
type: "enum",
|
|
4094
4094
|
entries: Array.isArray(e) ? Object.fromEntries(e.map((e) => [e, e])) : e,
|
|
4095
4095
|
...v(t)
|
|
4096
4096
|
});
|
|
4097
4097
|
}
|
|
4098
|
-
var
|
|
4099
|
-
|
|
4098
|
+
var es = /*@__PURE__*/ T("ZodLiteral", (e, t) => {
|
|
4099
|
+
vr.init(e, t), I.init(e, t), e._zod.processJSONSchema = (t, n, r) => wa(e, t, n, r), e.values = new Set(t.values), Object.defineProperty(e, "value", { get() {
|
|
4100
4100
|
if (t.values.length > 1) throw Error("This schema contains multiple valid literal values. Use `.values` instead.");
|
|
4101
4101
|
return t.values[0];
|
|
4102
4102
|
} });
|
|
4103
4103
|
});
|
|
4104
|
-
function
|
|
4105
|
-
return new
|
|
4104
|
+
function q(e, t) {
|
|
4105
|
+
return new es({
|
|
4106
4106
|
type: "literal",
|
|
4107
4107
|
values: Array.isArray(e) ? e : [e],
|
|
4108
4108
|
...v(t)
|
|
4109
4109
|
});
|
|
4110
4110
|
}
|
|
4111
|
-
var
|
|
4112
|
-
|
|
4113
|
-
if (r.direction === "backward") throw new
|
|
4111
|
+
var ts = /*@__PURE__*/ T("ZodTransform", (e, t) => {
|
|
4112
|
+
lo(), yr.init(e, t), I.init(e, t), e._zod.processJSONSchema = (t, n, r) => Ea(e, t, n, r), e._zod.parse = (n, r) => {
|
|
4113
|
+
if (r.direction === "backward") throw new Fe(e.constructor.name);
|
|
4114
4114
|
n.addIssue = (r) => {
|
|
4115
4115
|
if (typeof r == "string") n.issues.push(be(r, n.value, t));
|
|
4116
4116
|
else {
|
|
@@ -4122,44 +4122,44 @@ var ns = /*@__PURE__*/ T("ZodTransform", (e, t) => {
|
|
|
4122
4122
|
return i instanceof Promise ? i.then((e) => (n.value = e, n)) : (n.value = i, n);
|
|
4123
4123
|
};
|
|
4124
4124
|
});
|
|
4125
|
-
function
|
|
4126
|
-
return new
|
|
4125
|
+
function ns(e) {
|
|
4126
|
+
return new ts({
|
|
4127
4127
|
type: "transform",
|
|
4128
4128
|
transform: e
|
|
4129
4129
|
});
|
|
4130
4130
|
}
|
|
4131
|
-
var
|
|
4132
|
-
|
|
4131
|
+
var rs = /*@__PURE__*/ T("ZodOptional", (e, t) => {
|
|
4132
|
+
xr.init(e, t), I.init(e, t), e._zod.processJSONSchema = (t, n, r) => Ka(e, t, n, r), e.unwrap = () => e._zod.def.innerType;
|
|
4133
4133
|
});
|
|
4134
|
-
function
|
|
4135
|
-
return new
|
|
4134
|
+
function is(e) {
|
|
4135
|
+
return new rs({
|
|
4136
4136
|
type: "optional",
|
|
4137
4137
|
innerType: e
|
|
4138
4138
|
});
|
|
4139
4139
|
}
|
|
4140
|
-
var
|
|
4141
|
-
|
|
4140
|
+
var as = /*@__PURE__*/ T("ZodExactOptional", (e, t) => {
|
|
4141
|
+
Sr.init(e, t), I.init(e, t), e._zod.processJSONSchema = (t, n, r) => Ka(e, t, n, r), e.unwrap = () => e._zod.def.innerType;
|
|
4142
4142
|
});
|
|
4143
|
-
function
|
|
4144
|
-
return new
|
|
4143
|
+
function os(e) {
|
|
4144
|
+
return new as({
|
|
4145
4145
|
type: "optional",
|
|
4146
4146
|
innerType: e
|
|
4147
4147
|
});
|
|
4148
4148
|
}
|
|
4149
|
-
var
|
|
4150
|
-
|
|
4149
|
+
var ss = /*@__PURE__*/ T("ZodNullable", (e, t) => {
|
|
4150
|
+
Cr.init(e, t), I.init(e, t), e._zod.processJSONSchema = (t, n, r) => La(e, t, n, r), e.unwrap = () => e._zod.def.innerType;
|
|
4151
4151
|
});
|
|
4152
|
-
function
|
|
4153
|
-
return new
|
|
4152
|
+
function cs(e) {
|
|
4153
|
+
return new ss({
|
|
4154
4154
|
type: "nullable",
|
|
4155
4155
|
innerType: e
|
|
4156
4156
|
});
|
|
4157
4157
|
}
|
|
4158
|
-
var
|
|
4159
|
-
|
|
4158
|
+
var ls = /*@__PURE__*/ T("ZodDefault", (e, t) => {
|
|
4159
|
+
wr.init(e, t), I.init(e, t), e._zod.processJSONSchema = (t, n, r) => Va(e, t, n, r), e.unwrap = () => e._zod.def.innerType, e.removeDefault = e.unwrap;
|
|
4160
4160
|
});
|
|
4161
|
-
function
|
|
4162
|
-
return new
|
|
4161
|
+
function us(e, t) {
|
|
4162
|
+
return new ls({
|
|
4163
4163
|
type: "default",
|
|
4164
4164
|
innerType: e,
|
|
4165
4165
|
get defaultValue() {
|
|
@@ -4167,11 +4167,11 @@ function ds(e, t) {
|
|
|
4167
4167
|
}
|
|
4168
4168
|
});
|
|
4169
4169
|
}
|
|
4170
|
-
var
|
|
4171
|
-
|
|
4170
|
+
var ds = /*@__PURE__*/ T("ZodPrefault", (e, t) => {
|
|
4171
|
+
Er.init(e, t), I.init(e, t), e._zod.processJSONSchema = (t, n, r) => Ha(e, t, n, r), e.unwrap = () => e._zod.def.innerType;
|
|
4172
4172
|
});
|
|
4173
|
-
function
|
|
4174
|
-
return new
|
|
4173
|
+
function fs(e, t) {
|
|
4174
|
+
return new ds({
|
|
4175
4175
|
type: "prefault",
|
|
4176
4176
|
innerType: e,
|
|
4177
4177
|
get defaultValue() {
|
|
@@ -4179,177 +4179,177 @@ function ps(e, t) {
|
|
|
4179
4179
|
}
|
|
4180
4180
|
});
|
|
4181
4181
|
}
|
|
4182
|
-
var
|
|
4183
|
-
|
|
4182
|
+
var ps = /*@__PURE__*/ T("ZodNonOptional", (e, t) => {
|
|
4183
|
+
Dr.init(e, t), I.init(e, t), e._zod.processJSONSchema = (t, n, r) => Ra(e, t, n, r), e.unwrap = () => e._zod.def.innerType;
|
|
4184
4184
|
});
|
|
4185
|
-
function
|
|
4186
|
-
return new
|
|
4185
|
+
function ms(e, t) {
|
|
4186
|
+
return new ps({
|
|
4187
4187
|
type: "nonoptional",
|
|
4188
4188
|
innerType: e,
|
|
4189
4189
|
...v(t)
|
|
4190
4190
|
});
|
|
4191
4191
|
}
|
|
4192
|
-
var
|
|
4193
|
-
|
|
4192
|
+
var hs = /*@__PURE__*/ T("ZodCatch", (e, t) => {
|
|
4193
|
+
Ar.init(e, t), I.init(e, t), e._zod.processJSONSchema = (t, n, r) => Ua(e, t, n, r), e.unwrap = () => e._zod.def.innerType, e.removeCatch = e.unwrap;
|
|
4194
4194
|
});
|
|
4195
|
-
function
|
|
4196
|
-
return new
|
|
4195
|
+
function gs(e, t) {
|
|
4196
|
+
return new hs({
|
|
4197
4197
|
type: "catch",
|
|
4198
4198
|
innerType: e,
|
|
4199
4199
|
catchValue: typeof t == "function" ? t : ke(t)
|
|
4200
4200
|
});
|
|
4201
4201
|
}
|
|
4202
|
-
var
|
|
4203
|
-
|
|
4202
|
+
var _s = /*@__PURE__*/ T("ZodPipe", (e, t) => {
|
|
4203
|
+
jr.init(e, t), I.init(e, t), e._zod.processJSONSchema = (t, n, r) => Wa(e, t, n, r), e.in = t.in, e.out = t.out;
|
|
4204
4204
|
});
|
|
4205
|
-
function
|
|
4206
|
-
return new
|
|
4205
|
+
function vs(e, t) {
|
|
4206
|
+
return new _s({
|
|
4207
4207
|
type: "pipe",
|
|
4208
4208
|
in: e,
|
|
4209
4209
|
out: t
|
|
4210
4210
|
});
|
|
4211
4211
|
}
|
|
4212
|
-
var
|
|
4213
|
-
|
|
4212
|
+
var ys = /*@__PURE__*/ T("ZodReadonly", (e, t) => {
|
|
4213
|
+
Nr.init(e, t), I.init(e, t), e._zod.processJSONSchema = (t, n, r) => Ga(e, t, n, r), e.unwrap = () => e._zod.def.innerType;
|
|
4214
4214
|
});
|
|
4215
|
-
function
|
|
4216
|
-
return new
|
|
4215
|
+
function bs(e) {
|
|
4216
|
+
return new ys({
|
|
4217
4217
|
type: "readonly",
|
|
4218
4218
|
innerType: e
|
|
4219
4219
|
});
|
|
4220
4220
|
}
|
|
4221
|
-
var
|
|
4222
|
-
|
|
4221
|
+
var xs = /*@__PURE__*/ T("ZodLazy", (e, t) => {
|
|
4222
|
+
Fr.init(e, t), I.init(e, t), e._zod.processJSONSchema = (t, n, r) => qa(e, t, n, r), e.unwrap = () => e._zod.def.getter();
|
|
4223
4223
|
});
|
|
4224
|
-
function
|
|
4225
|
-
return new
|
|
4224
|
+
function Ss(e) {
|
|
4225
|
+
return new xs({
|
|
4226
4226
|
type: "lazy",
|
|
4227
4227
|
getter: e
|
|
4228
4228
|
});
|
|
4229
4229
|
}
|
|
4230
|
-
var
|
|
4231
|
-
|
|
4230
|
+
var Cs = /*@__PURE__*/ T("ZodCustom", (e, t) => {
|
|
4231
|
+
Ir.init(e, t), I.init(e, t), e._zod.processJSONSchema = (t, n, r) => Ta(e, t, n, r);
|
|
4232
4232
|
});
|
|
4233
|
-
function
|
|
4234
|
-
return /* @__PURE__ */
|
|
4233
|
+
function ws(e, t = {}) {
|
|
4234
|
+
return /* @__PURE__ */ ta(Cs, e, t);
|
|
4235
4235
|
}
|
|
4236
|
-
function
|
|
4237
|
-
return /* @__PURE__ */
|
|
4236
|
+
function Ts(e, t) {
|
|
4237
|
+
return /* @__PURE__ */ na(e, t);
|
|
4238
4238
|
}
|
|
4239
|
-
function
|
|
4240
|
-
let t =
|
|
4241
|
-
|
|
4239
|
+
function Es(e) {
|
|
4240
|
+
let t = Ss(() => W([
|
|
4241
|
+
L(e),
|
|
4242
4242
|
z(),
|
|
4243
4243
|
B(),
|
|
4244
4244
|
Vo(),
|
|
4245
|
-
|
|
4246
|
-
|
|
4245
|
+
H(t),
|
|
4246
|
+
G(L(), t)
|
|
4247
4247
|
]));
|
|
4248
4248
|
return t;
|
|
4249
4249
|
}
|
|
4250
4250
|
//#endregion
|
|
4251
4251
|
//#region src/flow/common/json.ts
|
|
4252
|
-
var
|
|
4253
|
-
function
|
|
4252
|
+
var Ds = 64;
|
|
4253
|
+
function Os(e, t = 0) {
|
|
4254
4254
|
if (t > 64) throw TypeError("Value exceeds the maximum JSON depth.");
|
|
4255
|
-
if (typeof e == "object" && e) for (let n of Object.values(e))
|
|
4255
|
+
if (typeof e == "object" && e) for (let n of Object.values(e)) Os(n, t + 1);
|
|
4256
4256
|
}
|
|
4257
4257
|
//#endregion
|
|
4258
4258
|
//#region src/flow/common/changeSchema.ts
|
|
4259
|
-
var
|
|
4260
|
-
description:
|
|
4261
|
-
jsonSchema:
|
|
4259
|
+
var J = L(), Y = Es(), ks = H(J), As = U({
|
|
4260
|
+
description: J.optional(),
|
|
4261
|
+
jsonSchema: Y,
|
|
4262
4262
|
nullable: B(),
|
|
4263
|
-
handle:
|
|
4264
|
-
}),
|
|
4263
|
+
handle: J
|
|
4264
|
+
}), X = As.extend({ value: Y.optional() }), js = U({
|
|
4265
4265
|
collapsed: B().optional(),
|
|
4266
|
-
group:
|
|
4267
|
-
}),
|
|
4268
|
-
kind:
|
|
4269
|
-
nodeId:
|
|
4270
|
-
output:
|
|
4271
|
-
}),
|
|
4272
|
-
kind:
|
|
4273
|
-
input:
|
|
4274
|
-
}),
|
|
4266
|
+
group: J
|
|
4267
|
+
}), Ms = U({
|
|
4268
|
+
kind: q("node"),
|
|
4269
|
+
nodeId: J,
|
|
4270
|
+
output: J
|
|
4271
|
+
}), Ns = U({
|
|
4272
|
+
kind: q("flow"),
|
|
4273
|
+
input: J
|
|
4274
|
+
}), Ps = W([
|
|
4275
|
+
Ms,
|
|
4275
4276
|
Ns,
|
|
4276
|
-
|
|
4277
|
-
|
|
4278
|
-
|
|
4279
|
-
bindingId: q
|
|
4277
|
+
U({
|
|
4278
|
+
kind: q("binding"),
|
|
4279
|
+
bindingId: J
|
|
4280
4280
|
})
|
|
4281
|
-
]),
|
|
4282
|
-
kind:
|
|
4283
|
-
value:
|
|
4284
|
-
}),
|
|
4285
|
-
kind:
|
|
4286
|
-
sources:
|
|
4287
|
-
})]),
|
|
4288
|
-
inputs:
|
|
4289
|
-
outputs:
|
|
4290
|
-
},
|
|
4291
|
-
kind:
|
|
4292
|
-
action:
|
|
4293
|
-
connectionId:
|
|
4294
|
-
connections:
|
|
4295
|
-
connectionId:
|
|
4296
|
-
alias:
|
|
4281
|
+
]), Fs = W([U({
|
|
4282
|
+
kind: q("value"),
|
|
4283
|
+
value: Y
|
|
4284
|
+
}), U({
|
|
4285
|
+
kind: q("sources"),
|
|
4286
|
+
sources: H(Ps)
|
|
4287
|
+
})]), Is = G(J, Fs), Ls = {
|
|
4288
|
+
inputs: H(W([X, js])),
|
|
4289
|
+
outputs: H(W([As, js]))
|
|
4290
|
+
}, Rs = U({
|
|
4291
|
+
kind: q("connector"),
|
|
4292
|
+
action: J,
|
|
4293
|
+
connectionId: J.optional(),
|
|
4294
|
+
connections: H(U({
|
|
4295
|
+
connectionId: J,
|
|
4296
|
+
alias: J.optional()
|
|
4297
4297
|
}))
|
|
4298
|
-
}),
|
|
4299
|
-
...
|
|
4300
|
-
name:
|
|
4301
|
-
moduleId:
|
|
4302
|
-
capabilities:
|
|
4303
|
-
}),
|
|
4304
|
-
kind:
|
|
4305
|
-
value:
|
|
4306
|
-
}),
|
|
4307
|
-
kind:
|
|
4308
|
-
input:
|
|
4309
|
-
})]),
|
|
4310
|
-
...
|
|
4311
|
-
name:
|
|
4312
|
-
executor:
|
|
4313
|
-
|
|
4314
|
-
kind:
|
|
4315
|
-
action:
|
|
4316
|
-
connectionId:
|
|
4298
|
+
}), zs = U({
|
|
4299
|
+
...Ls,
|
|
4300
|
+
name: J,
|
|
4301
|
+
moduleId: J,
|
|
4302
|
+
capabilities: H(Rs).optional()
|
|
4303
|
+
}), Bs = W([U({
|
|
4304
|
+
kind: q("value"),
|
|
4305
|
+
value: Y
|
|
4306
|
+
}), U({
|
|
4307
|
+
kind: q("input"),
|
|
4308
|
+
input: J
|
|
4309
|
+
})]), Vs = W([Bs, U({ kind: q("model") })]), Hs = U({
|
|
4310
|
+
...Ls,
|
|
4311
|
+
name: J,
|
|
4312
|
+
executor: W([
|
|
4313
|
+
U({
|
|
4314
|
+
kind: q("connector"),
|
|
4315
|
+
action: J,
|
|
4316
|
+
connectionId: J.optional()
|
|
4317
4317
|
}),
|
|
4318
|
-
|
|
4319
|
-
kind:
|
|
4320
|
-
mode:
|
|
4318
|
+
U({
|
|
4319
|
+
kind: q("llm"),
|
|
4320
|
+
mode: K(["chat", "json"])
|
|
4321
4321
|
}),
|
|
4322
|
-
|
|
4323
|
-
kind:
|
|
4322
|
+
U({
|
|
4323
|
+
kind: q("agent"),
|
|
4324
4324
|
code: B().optional(),
|
|
4325
|
-
model:
|
|
4326
|
-
prompt:
|
|
4327
|
-
system:
|
|
4325
|
+
model: J,
|
|
4326
|
+
prompt: Bs,
|
|
4327
|
+
system: J,
|
|
4328
4328
|
maxRounds: z(),
|
|
4329
|
-
tools:
|
|
4330
|
-
id:
|
|
4331
|
-
name:
|
|
4332
|
-
description:
|
|
4333
|
-
action:
|
|
4334
|
-
connectionId:
|
|
4329
|
+
tools: H(U({
|
|
4330
|
+
id: J,
|
|
4331
|
+
name: J,
|
|
4332
|
+
description: J,
|
|
4333
|
+
action: J,
|
|
4334
|
+
connectionId: J.optional(),
|
|
4335
4335
|
approval: B(),
|
|
4336
|
-
inputs:
|
|
4336
|
+
inputs: H(X.extend({ source: Vs }))
|
|
4337
4337
|
})),
|
|
4338
|
-
notification:
|
|
4339
|
-
taskId:
|
|
4340
|
-
messageHandle:
|
|
4341
|
-
inputs:
|
|
4338
|
+
notification: U({
|
|
4339
|
+
taskId: J,
|
|
4340
|
+
messageHandle: J,
|
|
4341
|
+
inputs: G(J, Bs)
|
|
4342
4342
|
}).optional()
|
|
4343
4343
|
})
|
|
4344
4344
|
])
|
|
4345
|
-
}),
|
|
4346
|
-
input:
|
|
4347
|
-
cases:
|
|
4348
|
-
output:
|
|
4349
|
-
relation:
|
|
4350
|
-
expressions:
|
|
4351
|
-
input:
|
|
4352
|
-
operator:
|
|
4345
|
+
}), Us = {
|
|
4346
|
+
input: X,
|
|
4347
|
+
cases: H(U({
|
|
4348
|
+
output: J,
|
|
4349
|
+
relation: K(["all", "any"]),
|
|
4350
|
+
expressions: H(U({
|
|
4351
|
+
input: J,
|
|
4352
|
+
operator: K([
|
|
4353
4353
|
"!=",
|
|
4354
4354
|
"<",
|
|
4355
4355
|
"<=",
|
|
@@ -4371,35 +4371,35 @@ var q = fo(), J = Ds(), As = V(q), js = H({
|
|
|
4371
4371
|
"notHasValue",
|
|
4372
4372
|
"startsWith"
|
|
4373
4373
|
]),
|
|
4374
|
-
value:
|
|
4374
|
+
value: Y.optional()
|
|
4375
4375
|
}))
|
|
4376
4376
|
})),
|
|
4377
|
-
defaultOutput:
|
|
4378
|
-
},
|
|
4379
|
-
actions:
|
|
4380
|
-
prompt:
|
|
4381
|
-
notification:
|
|
4382
|
-
inputs:
|
|
4383
|
-
messageHandle:
|
|
4384
|
-
taskId:
|
|
4377
|
+
defaultOutput: J.optional()
|
|
4378
|
+
}, Ws = {
|
|
4379
|
+
actions: W([Zo([q("continue")]), Zo([q("approve"), q("reject")])]),
|
|
4380
|
+
prompt: J,
|
|
4381
|
+
notification: U({
|
|
4382
|
+
inputs: Is,
|
|
4383
|
+
messageHandle: J,
|
|
4384
|
+
taskId: J
|
|
4385
4385
|
}).optional()
|
|
4386
|
-
},
|
|
4387
|
-
inputsDef:
|
|
4388
|
-
options:
|
|
4389
|
-
allowedMethods:
|
|
4390
|
-
allowedOrigins:
|
|
4386
|
+
}, Gs = {
|
|
4387
|
+
inputsDef: H(X),
|
|
4388
|
+
options: U({
|
|
4389
|
+
allowedMethods: ks.optional(),
|
|
4390
|
+
allowedOrigins: ks.optional(),
|
|
4391
4391
|
noResponseBody: B().optional(),
|
|
4392
|
-
responseData:
|
|
4393
|
-
responseHeaders:
|
|
4392
|
+
responseData: J.optional(),
|
|
4393
|
+
responseHeaders: G(J, J).optional(),
|
|
4394
4394
|
responseStatusCode: z().optional()
|
|
4395
4395
|
}).optional()
|
|
4396
|
-
},
|
|
4397
|
-
type:
|
|
4398
|
-
expression:
|
|
4399
|
-
timezone:
|
|
4400
|
-
}),
|
|
4401
|
-
type:
|
|
4402
|
-
unit:
|
|
4396
|
+
}, Ks = H(W([U({
|
|
4397
|
+
type: q("cron"),
|
|
4398
|
+
expression: J,
|
|
4399
|
+
timezone: J
|
|
4400
|
+
}), U({
|
|
4401
|
+
type: q("every"),
|
|
4402
|
+
unit: K([
|
|
4403
4403
|
"day",
|
|
4404
4404
|
"hour",
|
|
4405
4405
|
"minute",
|
|
@@ -4407,27 +4407,27 @@ var q = fo(), J = Ds(), As = V(q), js = H({
|
|
|
4407
4407
|
"week"
|
|
4408
4408
|
]),
|
|
4409
4409
|
value: z()
|
|
4410
|
-
})])),
|
|
4411
|
-
configSchema:
|
|
4410
|
+
})])), qs = {
|
|
4411
|
+
configSchema: Y,
|
|
4412
4412
|
definitionVersion: z(),
|
|
4413
|
-
description:
|
|
4414
|
-
displayName:
|
|
4415
|
-
key:
|
|
4416
|
-
name:
|
|
4417
|
-
payloadSchema:
|
|
4418
|
-
provider:
|
|
4419
|
-
},
|
|
4420
|
-
body:
|
|
4413
|
+
description: J,
|
|
4414
|
+
displayName: J,
|
|
4415
|
+
key: J,
|
|
4416
|
+
name: J,
|
|
4417
|
+
payloadSchema: Y,
|
|
4418
|
+
provider: J
|
|
4419
|
+
}, Js = U({
|
|
4420
|
+
body: U({
|
|
4421
4421
|
allowArray: B(),
|
|
4422
4422
|
allowEmpty: B(),
|
|
4423
|
-
formats:
|
|
4423
|
+
formats: H(K([
|
|
4424
4424
|
"form",
|
|
4425
4425
|
"json",
|
|
4426
4426
|
"multipart",
|
|
4427
4427
|
"text"
|
|
4428
4428
|
]))
|
|
4429
4429
|
}),
|
|
4430
|
-
methods:
|
|
4430
|
+
methods: H(K([
|
|
4431
4431
|
"DELETE",
|
|
4432
4432
|
"GET",
|
|
4433
4433
|
"HEAD",
|
|
@@ -4436,316 +4436,328 @@ var q = fo(), J = Ds(), As = V(q), js = H({
|
|
|
4436
4436
|
"PUT"
|
|
4437
4437
|
])),
|
|
4438
4438
|
successStatus: z()
|
|
4439
|
-
}),
|
|
4440
|
-
name:
|
|
4441
|
-
description:
|
|
4442
|
-
icon:
|
|
4443
|
-
},
|
|
4444
|
-
inputs:
|
|
4445
|
-
name:
|
|
4446
|
-
description:
|
|
4447
|
-
icon:
|
|
4439
|
+
}), Ys = {
|
|
4440
|
+
name: J,
|
|
4441
|
+
description: J.optional(),
|
|
4442
|
+
icon: J.optional()
|
|
4443
|
+
}, Z = {
|
|
4444
|
+
inputs: Is,
|
|
4445
|
+
name: J.optional(),
|
|
4446
|
+
description: J.optional(),
|
|
4447
|
+
icon: J.optional(),
|
|
4448
4448
|
timeoutMs: z().optional()
|
|
4449
|
-
},
|
|
4450
|
-
|
|
4451
|
-
...
|
|
4452
|
-
kind:
|
|
4453
|
-
...
|
|
4449
|
+
}, Xs = W([
|
|
4450
|
+
U({
|
|
4451
|
+
...Z,
|
|
4452
|
+
kind: q("condition"),
|
|
4453
|
+
...Us
|
|
4454
4454
|
}),
|
|
4455
|
-
|
|
4456
|
-
...
|
|
4457
|
-
inputs:
|
|
4458
|
-
kind:
|
|
4459
|
-
values:
|
|
4455
|
+
U({
|
|
4456
|
+
...Z,
|
|
4457
|
+
inputs: V().transform(() => ({})).default({}),
|
|
4458
|
+
kind: q("value"),
|
|
4459
|
+
values: H(X)
|
|
4460
4460
|
}),
|
|
4461
|
-
|
|
4462
|
-
...
|
|
4463
|
-
kind:
|
|
4464
|
-
subflowId:
|
|
4461
|
+
U({
|
|
4462
|
+
...Z,
|
|
4463
|
+
kind: q("subflow"),
|
|
4464
|
+
subflowId: J
|
|
4465
4465
|
}),
|
|
4466
|
-
|
|
4467
|
-
...
|
|
4468
|
-
kind:
|
|
4469
|
-
task:
|
|
4470
|
-
additionalInputs:
|
|
4466
|
+
U({
|
|
4467
|
+
...Z,
|
|
4468
|
+
kind: q("task"),
|
|
4469
|
+
task: zs,
|
|
4470
|
+
additionalInputs: H(X).optional()
|
|
4471
4471
|
}),
|
|
4472
|
-
|
|
4473
|
-
...
|
|
4474
|
-
kind:
|
|
4475
|
-
taskId:
|
|
4476
|
-
additionalInputs:
|
|
4472
|
+
U({
|
|
4473
|
+
...Z,
|
|
4474
|
+
kind: q("task"),
|
|
4475
|
+
taskId: J,
|
|
4476
|
+
additionalInputs: H(X).optional()
|
|
4477
4477
|
}),
|
|
4478
|
-
|
|
4479
|
-
...
|
|
4480
|
-
kind:
|
|
4481
|
-
input:
|
|
4482
|
-
...
|
|
4478
|
+
U({
|
|
4479
|
+
...Z,
|
|
4480
|
+
kind: q("wait"),
|
|
4481
|
+
input: X,
|
|
4482
|
+
...Ws
|
|
4483
4483
|
}).omit({ timeoutMs: !0 }),
|
|
4484
|
-
|
|
4485
|
-
...
|
|
4486
|
-
kind:
|
|
4484
|
+
U({
|
|
4485
|
+
...Ys,
|
|
4486
|
+
kind: q("manual")
|
|
4487
4487
|
}),
|
|
4488
|
-
|
|
4489
|
-
...
|
|
4490
|
-
kind:
|
|
4491
|
-
...
|
|
4488
|
+
U({
|
|
4489
|
+
...Ys,
|
|
4490
|
+
kind: q("webhook"),
|
|
4491
|
+
...Gs
|
|
4492
4492
|
}),
|
|
4493
|
-
|
|
4494
|
-
...
|
|
4495
|
-
kind:
|
|
4496
|
-
cronTimes:
|
|
4493
|
+
U({
|
|
4494
|
+
...Ys,
|
|
4495
|
+
kind: q("cron"),
|
|
4496
|
+
cronTimes: Ks
|
|
4497
4497
|
}),
|
|
4498
|
-
|
|
4499
|
-
...
|
|
4500
|
-
kind:
|
|
4501
|
-
bindingId:
|
|
4502
|
-
config:
|
|
4503
|
-
definition:
|
|
4504
|
-
...
|
|
4505
|
-
type:
|
|
4498
|
+
U({
|
|
4499
|
+
...Ys,
|
|
4500
|
+
kind: q("poll"),
|
|
4501
|
+
bindingId: J,
|
|
4502
|
+
config: G(J, Y),
|
|
4503
|
+
definition: U({
|
|
4504
|
+
...qs,
|
|
4505
|
+
type: q("poll")
|
|
4506
4506
|
}),
|
|
4507
|
-
pollTimes:
|
|
4507
|
+
pollTimes: Ks
|
|
4508
4508
|
}),
|
|
4509
|
-
|
|
4510
|
-
...
|
|
4511
|
-
kind:
|
|
4512
|
-
bindingId:
|
|
4513
|
-
config:
|
|
4514
|
-
definition:
|
|
4515
|
-
...
|
|
4516
|
-
type:
|
|
4517
|
-
endpoint:
|
|
4509
|
+
U({
|
|
4510
|
+
...Ys,
|
|
4511
|
+
kind: q("integration"),
|
|
4512
|
+
bindingId: J,
|
|
4513
|
+
config: G(J, Y),
|
|
4514
|
+
definition: U({
|
|
4515
|
+
...qs,
|
|
4516
|
+
type: q("integration"),
|
|
4517
|
+
endpoint: Js
|
|
4518
4518
|
})
|
|
4519
4519
|
})
|
|
4520
|
-
]),
|
|
4521
|
-
kind:
|
|
4522
|
-
id:
|
|
4523
|
-
})]),
|
|
4524
|
-
source:
|
|
4525
|
-
target:
|
|
4526
|
-
sourceHandle:
|
|
4527
|
-
}),
|
|
4528
|
-
nodeId:
|
|
4529
|
-
target:
|
|
4530
|
-
},
|
|
4531
|
-
name:
|
|
4532
|
-
inputs:
|
|
4533
|
-
outputs:
|
|
4534
|
-
}),
|
|
4535
|
-
nodes:
|
|
4536
|
-
edges:
|
|
4537
|
-
}),
|
|
4538
|
-
kind:
|
|
4539
|
-
target:
|
|
4540
|
-
}),
|
|
4541
|
-
name:
|
|
4542
|
-
imports:
|
|
4543
|
-
source:
|
|
4544
|
-
}),
|
|
4545
|
-
bindings:
|
|
4546
|
-
graph:
|
|
4547
|
-
subflows:
|
|
4548
|
-
tasks:
|
|
4549
|
-
}),
|
|
4550
|
-
modelVersion:
|
|
4551
|
-
document:
|
|
4552
|
-
modules:
|
|
4553
|
-
}),
|
|
4554
|
-
kind:
|
|
4555
|
-
version:
|
|
4520
|
+
]), Zs = W([U({ kind: q("flow") }), U({
|
|
4521
|
+
kind: q("subflow"),
|
|
4522
|
+
id: J
|
|
4523
|
+
})]), Qs = U({
|
|
4524
|
+
source: J,
|
|
4525
|
+
target: J,
|
|
4526
|
+
sourceHandle: J.optional()
|
|
4527
|
+
}), Q = {
|
|
4528
|
+
nodeId: J,
|
|
4529
|
+
target: Zs
|
|
4530
|
+
}, $s = U({
|
|
4531
|
+
name: J,
|
|
4532
|
+
inputs: H(X),
|
|
4533
|
+
outputs: H(As.extend({ sources: H(W([Ms, Ns])) }))
|
|
4534
|
+
}), ec = U({
|
|
4535
|
+
nodes: G(J, Xs),
|
|
4536
|
+
edges: H(Qs).default([])
|
|
4537
|
+
}), tc = U({
|
|
4538
|
+
kind: K(["connection", "variable"]),
|
|
4539
|
+
target: J
|
|
4540
|
+
}), nc = U({
|
|
4541
|
+
name: J,
|
|
4542
|
+
imports: ks,
|
|
4543
|
+
source: J
|
|
4544
|
+
}), rc = U({
|
|
4545
|
+
bindings: G(J, tc),
|
|
4546
|
+
graph: ec,
|
|
4547
|
+
subflows: G(J, $s.extend({ graph: ec })),
|
|
4548
|
+
tasks: G(J, Hs)
|
|
4549
|
+
}), ic = U({
|
|
4550
|
+
modelVersion: q(1),
|
|
4551
|
+
document: rc,
|
|
4552
|
+
modules: G(J, nc)
|
|
4553
|
+
}), ac = ic.extend({
|
|
4554
|
+
kind: q("open-flow-flow-revision"),
|
|
4555
|
+
version: q(1)
|
|
4556
4556
|
});
|
|
4557
|
+
function oc(e) {
|
|
4558
|
+
return Os(e), rc.parse(e);
|
|
4559
|
+
}
|
|
4557
4560
|
function sc(e) {
|
|
4558
|
-
return
|
|
4561
|
+
return Os(e), ic.parse(e);
|
|
4559
4562
|
}
|
|
4560
4563
|
function cc(e) {
|
|
4561
|
-
|
|
4562
|
-
|
|
4563
|
-
function lc(e) {
|
|
4564
|
-
ks(e);
|
|
4565
|
-
let t = oc.parse(e);
|
|
4564
|
+
Os(e);
|
|
4565
|
+
let t = ac.parse(e);
|
|
4566
4566
|
return {
|
|
4567
4567
|
modelVersion: t.modelVersion,
|
|
4568
4568
|
document: t.document,
|
|
4569
4569
|
modules: t.modules
|
|
4570
4570
|
};
|
|
4571
4571
|
}
|
|
4572
|
-
var
|
|
4572
|
+
var lc = {
|
|
4573
4573
|
"binding.create": {
|
|
4574
|
-
bindingId:
|
|
4575
|
-
binding:
|
|
4574
|
+
bindingId: J,
|
|
4575
|
+
binding: tc
|
|
4576
4576
|
},
|
|
4577
|
-
"binding.delete": { bindingId:
|
|
4577
|
+
"binding.delete": { bindingId: J },
|
|
4578
4578
|
"binding.target.set": {
|
|
4579
|
-
bindingId:
|
|
4580
|
-
before:
|
|
4581
|
-
value:
|
|
4579
|
+
bindingId: J,
|
|
4580
|
+
before: J,
|
|
4581
|
+
value: J
|
|
4582
4582
|
},
|
|
4583
4583
|
"graph.edge.connect": {
|
|
4584
|
-
target:
|
|
4585
|
-
edge:
|
|
4584
|
+
target: Zs,
|
|
4585
|
+
edge: Qs
|
|
4586
4586
|
},
|
|
4587
4587
|
"graph.edge.disconnect": {
|
|
4588
|
-
target:
|
|
4589
|
-
edge:
|
|
4588
|
+
target: Zs,
|
|
4589
|
+
edge: Qs
|
|
4590
4590
|
},
|
|
4591
4591
|
"graph.node.create": {
|
|
4592
|
-
...
|
|
4593
|
-
node:
|
|
4594
|
-
},
|
|
4595
|
-
"graph.node.delete":
|
|
4596
|
-
"graph.node.field.set":
|
|
4597
|
-
...
|
|
4598
|
-
kind:
|
|
4599
|
-
field:
|
|
4592
|
+
...Q,
|
|
4593
|
+
node: Xs
|
|
4594
|
+
},
|
|
4595
|
+
"graph.node.delete": Q,
|
|
4596
|
+
"graph.node.field.set": W([U({
|
|
4597
|
+
...Q,
|
|
4598
|
+
kind: q("graph.node.field.set"),
|
|
4599
|
+
field: K([
|
|
4600
4600
|
"description",
|
|
4601
4601
|
"icon",
|
|
4602
4602
|
"name"
|
|
4603
4603
|
]),
|
|
4604
|
-
before:
|
|
4605
|
-
value:
|
|
4606
|
-
}),
|
|
4607
|
-
...
|
|
4608
|
-
kind:
|
|
4609
|
-
field:
|
|
4604
|
+
before: J.optional(),
|
|
4605
|
+
value: J.optional()
|
|
4606
|
+
}), U({
|
|
4607
|
+
...Q,
|
|
4608
|
+
kind: q("graph.node.field.set"),
|
|
4609
|
+
field: q("timeoutMs"),
|
|
4610
4610
|
before: z().optional(),
|
|
4611
4611
|
value: z().optional()
|
|
4612
4612
|
})]),
|
|
4613
4613
|
"graph.node.input.set": {
|
|
4614
|
-
...
|
|
4615
|
-
handle:
|
|
4616
|
-
before:
|
|
4617
|
-
value:
|
|
4614
|
+
...Q,
|
|
4615
|
+
handle: J,
|
|
4616
|
+
before: Fs.optional(),
|
|
4617
|
+
value: Fs.optional()
|
|
4618
4618
|
},
|
|
4619
4619
|
"graph.node.additional-inputs.set": {
|
|
4620
|
-
...
|
|
4621
|
-
before:
|
|
4622
|
-
value:
|
|
4620
|
+
...Q,
|
|
4621
|
+
before: H(X).optional(),
|
|
4622
|
+
value: H(X).optional()
|
|
4623
4623
|
},
|
|
4624
4624
|
"graph.node.condition.set": {
|
|
4625
|
-
...
|
|
4626
|
-
before:
|
|
4627
|
-
value:
|
|
4625
|
+
...Q,
|
|
4626
|
+
before: U(Us),
|
|
4627
|
+
value: U(Us)
|
|
4628
4628
|
},
|
|
4629
4629
|
"graph.node.values.set": {
|
|
4630
|
-
...
|
|
4631
|
-
before:
|
|
4632
|
-
value:
|
|
4630
|
+
...Q,
|
|
4631
|
+
before: H(X),
|
|
4632
|
+
value: H(X)
|
|
4633
4633
|
},
|
|
4634
4634
|
"graph.node.wait.set": {
|
|
4635
|
-
...
|
|
4636
|
-
target:
|
|
4637
|
-
before:
|
|
4638
|
-
value:
|
|
4635
|
+
...Q,
|
|
4636
|
+
target: U({ kind: q("flow") }),
|
|
4637
|
+
before: U(Ws),
|
|
4638
|
+
value: U(Ws)
|
|
4639
4639
|
},
|
|
4640
4640
|
"graph.node.webhook.set": {
|
|
4641
|
-
...
|
|
4642
|
-
target:
|
|
4643
|
-
before:
|
|
4644
|
-
value:
|
|
4641
|
+
...Q,
|
|
4642
|
+
target: U({ kind: q("flow") }),
|
|
4643
|
+
before: U(Gs),
|
|
4644
|
+
value: U(Gs)
|
|
4645
4645
|
},
|
|
4646
4646
|
"graph.node.task.ports.set": {
|
|
4647
|
-
...
|
|
4648
|
-
before:
|
|
4649
|
-
value:
|
|
4647
|
+
...Q,
|
|
4648
|
+
before: U(Ls),
|
|
4649
|
+
value: U(Ls)
|
|
4650
4650
|
},
|
|
4651
4651
|
"graph.node.task.name.set": {
|
|
4652
|
-
...
|
|
4653
|
-
before:
|
|
4654
|
-
value:
|
|
4652
|
+
...Q,
|
|
4653
|
+
before: J,
|
|
4654
|
+
value: J
|
|
4655
4655
|
},
|
|
4656
4656
|
"graph.node.task.capabilities.set": {
|
|
4657
|
-
...
|
|
4658
|
-
before:
|
|
4659
|
-
value:
|
|
4657
|
+
...Q,
|
|
4658
|
+
before: H(Rs).optional(),
|
|
4659
|
+
value: H(Rs).optional()
|
|
4660
4660
|
},
|
|
4661
4661
|
"graph.trigger.config.set": {
|
|
4662
|
-
nodeId:
|
|
4663
|
-
name:
|
|
4664
|
-
before:
|
|
4665
|
-
value:
|
|
4662
|
+
nodeId: J,
|
|
4663
|
+
name: J,
|
|
4664
|
+
before: Y.optional(),
|
|
4665
|
+
value: Y.optional()
|
|
4666
4666
|
},
|
|
4667
4667
|
"graph.trigger.schedule.set": {
|
|
4668
|
-
nodeId:
|
|
4669
|
-
before:
|
|
4670
|
-
value:
|
|
4668
|
+
nodeId: J,
|
|
4669
|
+
before: Ks,
|
|
4670
|
+
value: Ks
|
|
4671
4671
|
},
|
|
4672
4672
|
"module.create": {
|
|
4673
|
-
moduleId:
|
|
4674
|
-
module:
|
|
4673
|
+
moduleId: J,
|
|
4674
|
+
module: nc
|
|
4675
4675
|
},
|
|
4676
|
-
"module.delete": { moduleId:
|
|
4676
|
+
"module.delete": { moduleId: J },
|
|
4677
4677
|
"module.rename": {
|
|
4678
|
-
moduleId:
|
|
4679
|
-
before:
|
|
4680
|
-
name:
|
|
4678
|
+
moduleId: J,
|
|
4679
|
+
before: J,
|
|
4680
|
+
name: J
|
|
4681
4681
|
},
|
|
4682
4682
|
"module.source.replace": {
|
|
4683
|
-
moduleId:
|
|
4684
|
-
beforeImports:
|
|
4685
|
-
beforeSource:
|
|
4686
|
-
imports:
|
|
4687
|
-
source:
|
|
4683
|
+
moduleId: J,
|
|
4684
|
+
beforeImports: ks,
|
|
4685
|
+
beforeSource: J,
|
|
4686
|
+
imports: ks,
|
|
4687
|
+
source: J
|
|
4688
4688
|
},
|
|
4689
4689
|
"subflow.create": {
|
|
4690
|
-
subflowId:
|
|
4691
|
-
subflow:
|
|
4690
|
+
subflowId: J,
|
|
4691
|
+
subflow: $s.extend({ graph: ec })
|
|
4692
4692
|
},
|
|
4693
4693
|
"subflow.definition.set": {
|
|
4694
|
-
subflowId:
|
|
4695
|
-
before:
|
|
4696
|
-
definition:
|
|
4694
|
+
subflowId: J,
|
|
4695
|
+
before: $s,
|
|
4696
|
+
definition: $s
|
|
4697
4697
|
},
|
|
4698
|
-
"subflow.delete": { subflowId:
|
|
4698
|
+
"subflow.delete": { subflowId: J },
|
|
4699
4699
|
"task.create": {
|
|
4700
|
-
taskId:
|
|
4701
|
-
task:
|
|
4700
|
+
taskId: J,
|
|
4701
|
+
task: Hs
|
|
4702
4702
|
},
|
|
4703
|
-
"task.delete": { taskId:
|
|
4703
|
+
"task.delete": { taskId: J },
|
|
4704
4704
|
"task.connector.connection.set": {
|
|
4705
|
-
taskId:
|
|
4706
|
-
before:
|
|
4707
|
-
value:
|
|
4705
|
+
taskId: J,
|
|
4706
|
+
before: J.optional(),
|
|
4707
|
+
value: J.optional()
|
|
4708
4708
|
},
|
|
4709
4709
|
"task.agent.set": {
|
|
4710
|
-
taskId:
|
|
4711
|
-
before:
|
|
4712
|
-
value:
|
|
4710
|
+
taskId: J,
|
|
4711
|
+
before: Hs,
|
|
4712
|
+
value: Hs
|
|
4713
4713
|
},
|
|
4714
4714
|
"task.llm.mode.set": {
|
|
4715
|
-
taskId:
|
|
4716
|
-
before:
|
|
4717
|
-
value:
|
|
4715
|
+
taskId: J,
|
|
4716
|
+
before: K(["chat", "json"]),
|
|
4717
|
+
value: K(["chat", "json"])
|
|
4718
4718
|
},
|
|
4719
4719
|
"task.name.set": {
|
|
4720
|
-
taskId:
|
|
4721
|
-
before:
|
|
4722
|
-
value:
|
|
4720
|
+
taskId: J,
|
|
4721
|
+
before: J,
|
|
4722
|
+
value: J
|
|
4723
4723
|
}
|
|
4724
4724
|
};
|
|
4725
|
-
|
|
4726
|
-
kind:
|
|
4725
|
+
H(W([...new Map(Object.entries(lc).map(([e, t]) => [e, t instanceof I ? t : U({
|
|
4726
|
+
kind: q(e),
|
|
4727
4727
|
...t
|
|
4728
4728
|
})])).values()])).min(1);
|
|
4729
4729
|
//#endregion
|
|
4730
|
+
//#region src/flow/common/change.ts
|
|
4731
|
+
function uc(e) {
|
|
4732
|
+
return e.trim().normalize("NFC");
|
|
4733
|
+
}
|
|
4734
|
+
function dc(e, t) {
|
|
4735
|
+
let n = uc(e), r = new Set([...t].map(uc));
|
|
4736
|
+
if (!r.has(n)) return n;
|
|
4737
|
+
let i = /^(.*) \((\d+)\)$/.exec(n), a = i?.[2], o = a != null && Number(a) >= 2 ? Number(a) : void 0, s = o == null ? n : i?.[1] ?? n, c = o == null ? 2 : o + 1;
|
|
4738
|
+
for (; r.has(`${s} (${c})`);) c += 1;
|
|
4739
|
+
return `${s} (${c})`;
|
|
4740
|
+
}
|
|
4741
|
+
//#endregion
|
|
4730
4742
|
//#region src/flow/common/encoding.ts
|
|
4731
|
-
var
|
|
4732
|
-
function
|
|
4743
|
+
var fc = new TextEncoder();
|
|
4744
|
+
function pc(e) {
|
|
4733
4745
|
if (e == null || typeof e == "boolean" || typeof e == "string" || typeof e == "number") return JSON.stringify(e);
|
|
4734
|
-
if (Array.isArray(e)) return `[${e.map(
|
|
4746
|
+
if (Array.isArray(e)) return `[${e.map(pc).join(",")}]`;
|
|
4735
4747
|
let t = e;
|
|
4736
|
-
return `{${Object.keys(t).toSorted().map((e) => `${JSON.stringify(e)}:${
|
|
4748
|
+
return `{${Object.keys(t).toSorted().map((e) => `${JSON.stringify(e)}:${pc(t[e])}`).join(",")}}`;
|
|
4737
4749
|
}
|
|
4738
|
-
function
|
|
4739
|
-
return
|
|
4750
|
+
function mc(e) {
|
|
4751
|
+
return fc.encode(pc(e));
|
|
4740
4752
|
}
|
|
4741
|
-
async function
|
|
4753
|
+
async function hc(e) {
|
|
4742
4754
|
let t = new Uint8Array(e.byteLength);
|
|
4743
4755
|
return t.set(e), `sha256:${[...new Uint8Array(await crypto.subtle.digest("SHA-256", t))].map((e) => e.toString(16).padStart(2, "0")).join("")}`;
|
|
4744
4756
|
}
|
|
4745
|
-
function
|
|
4757
|
+
function gc(e) {
|
|
4746
4758
|
return Object.keys(e).toSorted().map((t) => [t, e[t]]);
|
|
4747
4759
|
}
|
|
4748
|
-
function
|
|
4760
|
+
function _c(e) {
|
|
4749
4761
|
return "handle" in e ? {
|
|
4750
4762
|
...e.description == null ? {} : { description: e.description },
|
|
4751
4763
|
handle: e.handle,
|
|
@@ -4758,9 +4770,9 @@ function hc(e) {
|
|
|
4758
4770
|
};
|
|
4759
4771
|
}
|
|
4760
4772
|
function $(e) {
|
|
4761
|
-
return e.map(
|
|
4773
|
+
return e.map(_c);
|
|
4762
4774
|
}
|
|
4763
|
-
function
|
|
4775
|
+
function vc(e) {
|
|
4764
4776
|
switch (e.kind) {
|
|
4765
4777
|
case "sources": return {
|
|
4766
4778
|
kind: e.kind,
|
|
@@ -4772,10 +4784,10 @@ function gc(e) {
|
|
|
4772
4784
|
};
|
|
4773
4785
|
}
|
|
4774
4786
|
}
|
|
4775
|
-
function
|
|
4776
|
-
return Object.fromEntries(
|
|
4787
|
+
function yc(e) {
|
|
4788
|
+
return Object.fromEntries(gc(e).map(([e, t]) => [e, vc(t)]));
|
|
4777
4789
|
}
|
|
4778
|
-
function
|
|
4790
|
+
function bc(e) {
|
|
4779
4791
|
return e.map((e) => ({
|
|
4780
4792
|
...e.description == null ? {} : { description: e.description },
|
|
4781
4793
|
handle: e.handle,
|
|
@@ -4784,12 +4796,12 @@ function vc(e) {
|
|
|
4784
4796
|
sources: e.sources.map((e) => ({ ...e }))
|
|
4785
4797
|
}));
|
|
4786
4798
|
}
|
|
4787
|
-
function
|
|
4788
|
-
if (!("inputs" in e)) return
|
|
4799
|
+
function xc(e) {
|
|
4800
|
+
if (!("inputs" in e)) return Oc(e);
|
|
4789
4801
|
let t = {
|
|
4790
4802
|
...e.description == null ? {} : { description: e.description },
|
|
4791
4803
|
...e.icon == null ? {} : { icon: e.icon },
|
|
4792
|
-
inputs:
|
|
4804
|
+
inputs: yc(e.inputs),
|
|
4793
4805
|
...e.name == null ? {} : { name: e.name },
|
|
4794
4806
|
...e.timeoutMs == null ? {} : { timeoutMs: e.timeoutMs }
|
|
4795
4807
|
};
|
|
@@ -4808,7 +4820,7 @@ function yc(e) {
|
|
|
4808
4820
|
...e.defaultOutput == null ? {} : { defaultOutput: e.defaultOutput },
|
|
4809
4821
|
input: {
|
|
4810
4822
|
handle: e.input.handle,
|
|
4811
|
-
...
|
|
4823
|
+
..._c(e.input)
|
|
4812
4824
|
},
|
|
4813
4825
|
kind: e.kind
|
|
4814
4826
|
};
|
|
@@ -4823,7 +4835,7 @@ function yc(e) {
|
|
|
4823
4835
|
taskId: e.taskId
|
|
4824
4836
|
}) : Object.assign({}, t, {
|
|
4825
4837
|
kind: e.kind,
|
|
4826
|
-
task:
|
|
4838
|
+
task: wc(e.task)
|
|
4827
4839
|
});
|
|
4828
4840
|
return e.additionalInputs != null && (n.additionalInputs = $(e.additionalInputs)), n;
|
|
4829
4841
|
}
|
|
@@ -4837,11 +4849,11 @@ function yc(e) {
|
|
|
4837
4849
|
actions: e.actions,
|
|
4838
4850
|
input: {
|
|
4839
4851
|
handle: e.input.handle,
|
|
4840
|
-
...
|
|
4852
|
+
..._c(e.input)
|
|
4841
4853
|
},
|
|
4842
4854
|
kind: e.kind,
|
|
4843
4855
|
...e.notification == null ? {} : { notification: {
|
|
4844
|
-
inputs:
|
|
4856
|
+
inputs: yc(e.notification.inputs),
|
|
4845
4857
|
messageHandle: e.notification.messageHandle,
|
|
4846
4858
|
taskId: e.notification.taskId
|
|
4847
4859
|
} },
|
|
@@ -4849,16 +4861,16 @@ function yc(e) {
|
|
|
4849
4861
|
};
|
|
4850
4862
|
}
|
|
4851
4863
|
}
|
|
4852
|
-
function
|
|
4864
|
+
function Sc(e) {
|
|
4853
4865
|
return {
|
|
4854
4866
|
edges: e.edges.map((e) => ({ ...e })).toSorted((e, t) => {
|
|
4855
|
-
let n =
|
|
4867
|
+
let n = pc(e), r = pc(t);
|
|
4856
4868
|
return n < r ? -1 : +(n > r);
|
|
4857
4869
|
}),
|
|
4858
|
-
nodes: Object.fromEntries(
|
|
4870
|
+
nodes: Object.fromEntries(gc(e.nodes).map(([e, t]) => [e, xc(t)]))
|
|
4859
4871
|
};
|
|
4860
4872
|
}
|
|
4861
|
-
function
|
|
4873
|
+
function Cc(e) {
|
|
4862
4874
|
return {
|
|
4863
4875
|
executor: e.executor,
|
|
4864
4876
|
inputs: $(e.inputs),
|
|
@@ -4866,7 +4878,7 @@ function xc(e) {
|
|
|
4866
4878
|
outputs: $(e.outputs)
|
|
4867
4879
|
};
|
|
4868
4880
|
}
|
|
4869
|
-
function
|
|
4881
|
+
function wc(e) {
|
|
4870
4882
|
return {
|
|
4871
4883
|
...e.capabilities == null ? {} : { capabilities: e.capabilities },
|
|
4872
4884
|
inputs: $(e.inputs),
|
|
@@ -4875,7 +4887,7 @@ function Sc(e) {
|
|
|
4875
4887
|
outputs: $(e.outputs)
|
|
4876
4888
|
};
|
|
4877
4889
|
}
|
|
4878
|
-
function
|
|
4890
|
+
function Tc(e) {
|
|
4879
4891
|
return {
|
|
4880
4892
|
configSchema: e.configSchema,
|
|
4881
4893
|
definitionVersion: e.definitionVersion,
|
|
@@ -4897,7 +4909,7 @@ function Cc(e) {
|
|
|
4897
4909
|
type: e.type
|
|
4898
4910
|
};
|
|
4899
4911
|
}
|
|
4900
|
-
function
|
|
4912
|
+
function Ec(e) {
|
|
4901
4913
|
return {
|
|
4902
4914
|
...e.allowedMethods == null ? {} : { allowedMethods: e.allowedMethods },
|
|
4903
4915
|
...e.allowedOrigins == null ? {} : { allowedOrigins: e.allowedOrigins },
|
|
@@ -4907,7 +4919,7 @@ function wc(e) {
|
|
|
4907
4919
|
...e.responseStatusCode == null ? {} : { responseStatusCode: e.responseStatusCode }
|
|
4908
4920
|
};
|
|
4909
4921
|
}
|
|
4910
|
-
function
|
|
4922
|
+
function Dc(e) {
|
|
4911
4923
|
switch (e.type) {
|
|
4912
4924
|
case "cron": return {
|
|
4913
4925
|
expression: e.expression,
|
|
@@ -4921,7 +4933,7 @@ function Tc(e) {
|
|
|
4921
4933
|
};
|
|
4922
4934
|
}
|
|
4923
4935
|
}
|
|
4924
|
-
function
|
|
4936
|
+
function Oc(e) {
|
|
4925
4937
|
let t = (t) => ({
|
|
4926
4938
|
...e.description == null ? {} : { description: e.description },
|
|
4927
4939
|
...e.icon == null ? {} : { icon: e.icon },
|
|
@@ -4934,67 +4946,207 @@ function Ec(e) {
|
|
|
4934
4946
|
...t(e.kind),
|
|
4935
4947
|
inputsDef: e.inputsDef.map((e) => ({
|
|
4936
4948
|
handle: e.handle,
|
|
4937
|
-
...
|
|
4949
|
+
..._c(e)
|
|
4938
4950
|
})),
|
|
4939
|
-
...e.options == null ? {} : { options:
|
|
4951
|
+
...e.options == null ? {} : { options: Ec(e.options) }
|
|
4940
4952
|
};
|
|
4941
4953
|
case "cron": return {
|
|
4942
4954
|
...t(e.kind),
|
|
4943
|
-
cronTimes: e.cronTimes.map(
|
|
4955
|
+
cronTimes: e.cronTimes.map(Dc)
|
|
4944
4956
|
};
|
|
4945
4957
|
case "poll": return {
|
|
4946
4958
|
...t(e.kind),
|
|
4947
4959
|
bindingId: e.bindingId,
|
|
4948
4960
|
config: e.config,
|
|
4949
|
-
definition:
|
|
4950
|
-
pollTimes: e.pollTimes.map(
|
|
4961
|
+
definition: Tc(e.definition),
|
|
4962
|
+
pollTimes: e.pollTimes.map(Dc)
|
|
4951
4963
|
};
|
|
4952
4964
|
case "integration": return {
|
|
4953
4965
|
...t(e.kind),
|
|
4954
4966
|
bindingId: e.bindingId,
|
|
4955
4967
|
config: e.config,
|
|
4956
|
-
definition:
|
|
4968
|
+
definition: Tc(e.definition)
|
|
4957
4969
|
};
|
|
4958
4970
|
}
|
|
4959
4971
|
}
|
|
4960
|
-
function
|
|
4972
|
+
function kc(e) {
|
|
4961
4973
|
let { name: t, description: n, icon: r, ...i } = e;
|
|
4962
|
-
return
|
|
4974
|
+
return pc(i);
|
|
4963
4975
|
}
|
|
4964
|
-
function
|
|
4976
|
+
function Ac(e) {
|
|
4965
4977
|
return {
|
|
4966
|
-
bindings: Object.fromEntries(
|
|
4967
|
-
graph:
|
|
4968
|
-
subflows: Object.fromEntries(
|
|
4969
|
-
graph:
|
|
4978
|
+
bindings: Object.fromEntries(gc(e.bindings)),
|
|
4979
|
+
graph: Sc(e.graph),
|
|
4980
|
+
subflows: Object.fromEntries(gc(e.subflows).map(([e, t]) => [e, {
|
|
4981
|
+
graph: Sc(t.graph),
|
|
4970
4982
|
inputs: $(t.inputs),
|
|
4971
4983
|
name: t.name,
|
|
4972
|
-
outputs:
|
|
4984
|
+
outputs: bc(t.outputs)
|
|
4973
4985
|
}])),
|
|
4974
|
-
tasks: Object.fromEntries(
|
|
4986
|
+
tasks: Object.fromEntries(gc(e.tasks).map(([e, t]) => [e, Cc(t)]))
|
|
4975
4987
|
};
|
|
4976
4988
|
}
|
|
4977
|
-
function
|
|
4989
|
+
function jc(e) {
|
|
4978
4990
|
return {
|
|
4979
4991
|
imports: e.imports.toSorted(),
|
|
4980
4992
|
name: e.name,
|
|
4981
4993
|
source: e.source
|
|
4982
4994
|
};
|
|
4983
4995
|
}
|
|
4984
|
-
function
|
|
4996
|
+
function Mc(e) {
|
|
4985
4997
|
return {
|
|
4986
|
-
document:
|
|
4998
|
+
document: Ac(e.document),
|
|
4987
4999
|
kind: "open-flow-flow-revision",
|
|
4988
5000
|
modelVersion: e.modelVersion,
|
|
4989
|
-
modules: Object.fromEntries(
|
|
5001
|
+
modules: Object.fromEntries(gc(e.modules).map(([e, t]) => [e, jc(t)])),
|
|
4990
5002
|
version: 1
|
|
4991
5003
|
};
|
|
4992
5004
|
}
|
|
4993
|
-
function
|
|
4994
|
-
return
|
|
5005
|
+
function Nc(e) {
|
|
5006
|
+
return mc(Mc(e));
|
|
4995
5007
|
}
|
|
4996
|
-
function
|
|
4997
|
-
return
|
|
5008
|
+
function Pc(e) {
|
|
5009
|
+
return cc(JSON.parse(new TextDecoder("utf-8", { fatal: !0 }).decode(e)));
|
|
5010
|
+
}
|
|
5011
|
+
var Fc = G(L(), V()), Ic = U({
|
|
5012
|
+
jsonSchema: V(),
|
|
5013
|
+
nullable: B(),
|
|
5014
|
+
value: V().optional(),
|
|
5015
|
+
description: L().optional()
|
|
5016
|
+
}).strict(), Lc = G(L(), Ic), Rc = W([U({
|
|
5017
|
+
kind: q("value"),
|
|
5018
|
+
value: V()
|
|
5019
|
+
}).strict(), U({
|
|
5020
|
+
kind: q("sources"),
|
|
5021
|
+
sources: H(U({
|
|
5022
|
+
kind: q("node"),
|
|
5023
|
+
nodeId: L(),
|
|
5024
|
+
output: L()
|
|
5025
|
+
}).strict())
|
|
5026
|
+
}).strict()]), zc = {
|
|
5027
|
+
name: L().optional(),
|
|
5028
|
+
description: L().optional(),
|
|
5029
|
+
icon: L().optional()
|
|
5030
|
+
}, Bc = W([
|
|
5031
|
+
U({
|
|
5032
|
+
...zc,
|
|
5033
|
+
kind: q("cron"),
|
|
5034
|
+
cronTimes: H(V())
|
|
5035
|
+
}).strict(),
|
|
5036
|
+
U({
|
|
5037
|
+
...zc,
|
|
5038
|
+
kind: q("manual")
|
|
5039
|
+
}).strict(),
|
|
5040
|
+
U({
|
|
5041
|
+
...zc,
|
|
5042
|
+
kind: q("task"),
|
|
5043
|
+
concurrency: q(1).optional(),
|
|
5044
|
+
inputs: G(L(), Rc),
|
|
5045
|
+
task: U({
|
|
5046
|
+
name: L(),
|
|
5047
|
+
moduleId: L(),
|
|
5048
|
+
inputs: Lc,
|
|
5049
|
+
outputs: G(L(), Ic.omit({ value: !0 }))
|
|
5050
|
+
}).strict()
|
|
5051
|
+
}).strict()
|
|
5052
|
+
]), Vc = U({
|
|
5053
|
+
name: L(),
|
|
5054
|
+
graph: U({ nodes: G(L(), Bc) }).strict()
|
|
5055
|
+
}).strict(), Hc = U({
|
|
5056
|
+
kind: q("open-flow-project-revision"),
|
|
5057
|
+
version: q(1),
|
|
5058
|
+
modelVersion: q(1),
|
|
5059
|
+
modules: G(L(), U({
|
|
5060
|
+
name: L(),
|
|
5061
|
+
source: L(),
|
|
5062
|
+
imports: H(L())
|
|
5063
|
+
}).strict()),
|
|
5064
|
+
document: U({
|
|
5065
|
+
bindings: Fc,
|
|
5066
|
+
flows: Fc,
|
|
5067
|
+
subflows: Fc,
|
|
5068
|
+
tasks: Fc
|
|
5069
|
+
}).strict()
|
|
5070
|
+
}).strict();
|
|
5071
|
+
function Uc(e) {
|
|
5072
|
+
return Object.entries(e).map(([e, t]) => Object.assign({ handle: e }, t));
|
|
5073
|
+
}
|
|
5074
|
+
function Wc(e) {
|
|
5075
|
+
return Object.keys(Hc.parse(e).document.flows).toSorted();
|
|
5076
|
+
}
|
|
5077
|
+
function Gc(e, t) {
|
|
5078
|
+
let n = Hc.parse(e);
|
|
5079
|
+
if ([
|
|
5080
|
+
n.document.bindings,
|
|
5081
|
+
n.document.subflows,
|
|
5082
|
+
n.document.tasks
|
|
5083
|
+
].some((e) => Object.keys(e).length != 0)) throw Error("Project bindings, managed tasks and subflows require an explicit semantic conversion.");
|
|
5084
|
+
let r = Vc.parse(n.document.flows[t]), i = [], a = /* @__PURE__ */ new Set(), o = Object.fromEntries(Object.entries(r.graph.nodes).map(([e, t]) => {
|
|
5085
|
+
let n = t.name ?? (t.kind == "task" ? t.task.name : e), r = dc(n, a);
|
|
5086
|
+
if (a.add(r), r != n && i.push(`Renamed node ${e} to ${r}.`), t.kind != "task") return [e, {
|
|
5087
|
+
...t,
|
|
5088
|
+
name: r
|
|
5089
|
+
}];
|
|
5090
|
+
let { concurrency: o, ...s } = t;
|
|
5091
|
+
return [e, {
|
|
5092
|
+
...s,
|
|
5093
|
+
name: r,
|
|
5094
|
+
task: {
|
|
5095
|
+
...t.task,
|
|
5096
|
+
inputs: Uc(t.task.inputs),
|
|
5097
|
+
outputs: Uc(t.task.outputs)
|
|
5098
|
+
}
|
|
5099
|
+
}];
|
|
5100
|
+
})), s = sc({
|
|
5101
|
+
modelVersion: 1,
|
|
5102
|
+
modules: n.modules,
|
|
5103
|
+
document: {
|
|
5104
|
+
bindings: {},
|
|
5105
|
+
subflows: {},
|
|
5106
|
+
tasks: {},
|
|
5107
|
+
graph: {
|
|
5108
|
+
nodes: o,
|
|
5109
|
+
edges: []
|
|
5110
|
+
}
|
|
5111
|
+
}
|
|
5112
|
+
}), c = [], l = /* @__PURE__ */ new Set(), u = Object.values(s.document.graph.nodes).filter((e) => e.kind != "task"), d;
|
|
5113
|
+
if (Object.keys(o).length > 0 && u.length == 0) {
|
|
5114
|
+
for (d = "migration-start"; Object.hasOwn(o, d);) d += "-start";
|
|
5115
|
+
i.push(`Added manual entry ${d}.`);
|
|
5116
|
+
} else if (u.length > 1) throw Error("Multiple legacy triggers require an explicit execution-order decision.");
|
|
5117
|
+
for (let [e, t] of Object.entries(s.document.graph.nodes)) {
|
|
5118
|
+
if (t.kind != "task") continue;
|
|
5119
|
+
let n = /* @__PURE__ */ new Set();
|
|
5120
|
+
for (let e of Object.values(t.inputs)) if (e.kind == "sources") for (let t of e.sources) {
|
|
5121
|
+
if (t.kind != "node") throw Error("Only node input sources can be converted automatically.");
|
|
5122
|
+
n.add(t.nodeId);
|
|
5123
|
+
}
|
|
5124
|
+
if (n.size == 0 && d != null && n.add(d), n.size != 1) throw Error(`Task ${e} does not have exactly one execution predecessor.`);
|
|
5125
|
+
let r = [...n][0];
|
|
5126
|
+
if (l.has(r)) throw Error("Parallel legacy branches require an explicit execution-order decision.");
|
|
5127
|
+
l.add(r), c.push({
|
|
5128
|
+
source: r,
|
|
5129
|
+
target: e
|
|
5130
|
+
});
|
|
5131
|
+
}
|
|
5132
|
+
let f = { ...s.document.graph.nodes };
|
|
5133
|
+
return d != null && (f[d] = {
|
|
5134
|
+
kind: "manual",
|
|
5135
|
+
name: dc("Start", a)
|
|
5136
|
+
}), {
|
|
5137
|
+
name: r.name,
|
|
5138
|
+
adjustments: i,
|
|
5139
|
+
revision: {
|
|
5140
|
+
...s,
|
|
5141
|
+
document: {
|
|
5142
|
+
...s.document,
|
|
5143
|
+
graph: {
|
|
5144
|
+
nodes: f,
|
|
5145
|
+
edges: c
|
|
5146
|
+
}
|
|
5147
|
+
}
|
|
5148
|
+
}
|
|
5149
|
+
};
|
|
4998
5150
|
}
|
|
4999
5151
|
//#endregion
|
|
5000
|
-
export {
|
|
5152
|
+
export { Ac as canonicalDocument, Sc as canonicalGraph, mc as canonicalJsonBytes, jc as canonicalModule, bc as canonicalOutputs, $ as canonicalPorts, Cc as canonicalTask, Gc as convertProjectFlow, oc as decodeFlowDocument, Pc as decodeRevision, sc as decodeRevisionContent, hc as digestBytes, Nc as encodeRevision, Wc as legacyProjectFlowIds, Ds as maxJsonDepth, kc as triggerRuntimeJson };
|