@oomol-lab/open-flow 0.1.0-beta.26 → 0.1.0-beta.28
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-BwI2JmPE.js → createResourceDialog-C2ZLGPla.js} +1 -1
- package/dist/browser/flow-authoring-node.d.ts +3 -2
- package/dist/browser/flow-authoring.js +933 -915
- package/dist/browser/flow-change-schema.d.ts +4 -0
- package/dist/browser/flow-change.d.ts +8 -7
- package/dist/browser/flow-change.js +1067 -1050
- package/dist/browser/flow-notifications.d.ts +6 -2
- package/dist/browser/{flowChanges-BqPtWEI9.js → flowChanges-Z49mslMz.js} +1098 -1027
- package/dist/browser/{flowWorkspace-CpMGzmfz.js → flowWorkspace-DCaVDqtY.js} +40105 -43746
- package/dist/browser/host-conformance.js +7 -1
- package/dist/browser/{inputValues-CeeJw_G8.js → inputValues-CLnpqFAf.js} +1 -1
- package/dist/browser/{markdownContent-SIlWuHve.js → markdownContent-Bon8uhjM.js} +23 -23
- package/dist/browser/{switch-CyZ96-UF.js → switch-DuB8aovT.js} +5035 -513
- package/dist/browser/ui.css +1 -1
- package/dist/browser/workbench.css +1 -1
- package/dist/browser/workbench.js +890 -727
- package/dist/browser/{workbenchSelect-BUu7CjUA.js → workbenchSelect-DX9IFmX-.js} +1187 -1156
- package/dist/common/authoringExamples.d.ts +27 -0
- package/dist/common/control-api-conformance.js +838 -820
- package/dist/common/control-api-errors.d.ts +8 -0
- package/dist/common/control-api.d.ts +7 -3
- package/dist/common/control-api.js +1425 -1381
- package/dist/common/control-requests.d.ts +13 -6
- package/dist/common/control-requests.js +2034 -1510
- package/dist/common/cron-trigger.d.ts +2 -1
- package/dist/common/cron-trigger.js +27 -24
- package/dist/common/draftOperations.d.ts +14 -0
- package/dist/common/engine-contract.d.ts +2 -2
- package/dist/common/flow-encoding.d.ts +3 -0
- package/dist/common/flow-encoding.js +1067 -968
- package/dist/common/flow-notifications.d.ts +6 -2
- package/dist/common/flow-schema.d.ts +1 -2
- package/dist/common/flow-semantics.d.ts +2 -1
- package/dist/common/flow-semantics.js +7935 -7812
- package/dist/common/flowInspection.d.ts +16 -0
- package/dist/common/integration-trigger.d.ts +2 -2
- package/dist/common/integration-trigger.js +8 -8
- package/dist/common/mcp.d.ts +2 -1
- package/dist/common/mcp.js +140 -118
- package/dist/common/poll-trigger.d.ts +3 -0
- package/dist/common/poll-trigger.js +26 -22
- package/dist/common/provider-triggers.js +2704 -2599
- package/dist/common/runtime-contract.js +3 -3
- package/dist/common/scheduler.d.ts +4 -3
- package/dist/common/scheduler.js +1855 -1725
- package/dist/common/trigger-contract.d.ts +5 -0
- package/dist/common/webhook-trigger.d.ts +3 -3
- package/dist/common/webhook-trigger.js +64 -18
- package/package.json +1 -1
|
@@ -4,7 +4,7 @@ function e(e) {
|
|
|
4
4
|
return Object.entries(e).filter(([e, n]) => t.indexOf(+e) === -1).map(([e, t]) => t);
|
|
5
5
|
}
|
|
6
6
|
function t(e, t = "|") {
|
|
7
|
-
return e.map((e) =>
|
|
7
|
+
return e.map((e) => re(e)).join(t);
|
|
8
8
|
}
|
|
9
9
|
function n(e, t) {
|
|
10
10
|
return typeof t == "bigint" ? t.toString() : t;
|
|
@@ -90,14 +90,14 @@ var ne = /* @__PURE__*/ new Set([
|
|
|
90
90
|
"number",
|
|
91
91
|
"symbol"
|
|
92
92
|
]);
|
|
93
|
-
function
|
|
93
|
+
function g(e) {
|
|
94
94
|
return e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
95
95
|
}
|
|
96
|
-
function
|
|
96
|
+
function _(e, t, n) {
|
|
97
97
|
let r = new e._zod.constr(t ?? e._zod.def);
|
|
98
98
|
return (!t || n?.parent) && (r._zod.parent = e), r;
|
|
99
99
|
}
|
|
100
|
-
function
|
|
100
|
+
function v(e) {
|
|
101
101
|
let t = e;
|
|
102
102
|
if (!t) return {};
|
|
103
103
|
if (typeof t == "string") return { error: () => t };
|
|
@@ -110,23 +110,23 @@ function _(e) {
|
|
|
110
110
|
error: () => t.error
|
|
111
111
|
} : t;
|
|
112
112
|
}
|
|
113
|
-
function
|
|
113
|
+
function re(e) {
|
|
114
114
|
return typeof e == "bigint" ? e.toString() + "n" : typeof e == "string" ? `"${e}"` : `${e}`;
|
|
115
115
|
}
|
|
116
|
-
function
|
|
116
|
+
function ie(e) {
|
|
117
117
|
return Object.keys(e).filter((t) => e[t]._zod.optin !== void 0 && e[t]._zod.optout === "optional");
|
|
118
118
|
}
|
|
119
|
-
var
|
|
119
|
+
var ae = {
|
|
120
120
|
safeint: [-(2 ** 53 - 1), 2 ** 53 - 1],
|
|
121
121
|
int32: [-2147483648, 2147483647],
|
|
122
122
|
uint32: [0, 4294967295],
|
|
123
123
|
float32: [-34028234663852886e22, 34028234663852886e22],
|
|
124
124
|
float64: [-Number.MAX_VALUE, Number.MAX_VALUE]
|
|
125
125
|
};
|
|
126
|
-
function
|
|
126
|
+
function oe(e, t) {
|
|
127
127
|
let n = e._zod.def, r = n.checks;
|
|
128
128
|
if (r && r.length > 0) throw Error(".pick() cannot be used on object schemas containing refinements");
|
|
129
|
-
return
|
|
129
|
+
return _(e, u(e._zod.def, {
|
|
130
130
|
get shape() {
|
|
131
131
|
let e = {};
|
|
132
132
|
for (let r of Reflect.ownKeys(t)) {
|
|
@@ -138,10 +138,10 @@ function se(e, t) {
|
|
|
138
138
|
checks: []
|
|
139
139
|
}));
|
|
140
140
|
}
|
|
141
|
-
function
|
|
141
|
+
function se(e, t) {
|
|
142
142
|
let n = e._zod.def, r = n.checks;
|
|
143
143
|
if (r && r.length > 0) throw Error(".omit() cannot be used on object schemas containing refinements");
|
|
144
|
-
return
|
|
144
|
+
return _(e, u(e._zod.def, {
|
|
145
145
|
get shape() {
|
|
146
146
|
let r = { ...e._zod.def.shape };
|
|
147
147
|
for (let e of Reflect.ownKeys(t)) {
|
|
@@ -153,14 +153,14 @@ function ce(e, t) {
|
|
|
153
153
|
checks: []
|
|
154
154
|
}));
|
|
155
155
|
}
|
|
156
|
-
function
|
|
156
|
+
function ce(e, t) {
|
|
157
157
|
if (!h(t)) throw Error("Invalid input to extend: expected a plain object");
|
|
158
158
|
let n = e._zod.def.checks;
|
|
159
159
|
if (n && n.length > 0) {
|
|
160
160
|
let n = e._zod.def.shape;
|
|
161
161
|
for (let e of Reflect.ownKeys(t)) if (Object.getOwnPropertyDescriptor(n, e) !== void 0) throw Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.");
|
|
162
162
|
}
|
|
163
|
-
return
|
|
163
|
+
return _(e, u(e._zod.def, { get shape() {
|
|
164
164
|
let n = {
|
|
165
165
|
...e._zod.def.shape,
|
|
166
166
|
...t
|
|
@@ -168,9 +168,9 @@ function le(e, t) {
|
|
|
168
168
|
return l(this, "shape", n), n;
|
|
169
169
|
} }));
|
|
170
170
|
}
|
|
171
|
-
function
|
|
171
|
+
function le(e, t) {
|
|
172
172
|
if (!h(t)) throw Error("Invalid input to safeExtend: expected a plain object");
|
|
173
|
-
return
|
|
173
|
+
return _(e, u(e._zod.def, { get shape() {
|
|
174
174
|
let n = {
|
|
175
175
|
...e._zod.def.shape,
|
|
176
176
|
...t
|
|
@@ -178,10 +178,10 @@ function ue(e, t) {
|
|
|
178
178
|
return l(this, "shape", n), n;
|
|
179
179
|
} }));
|
|
180
180
|
}
|
|
181
|
-
function
|
|
181
|
+
function ue(e, t) {
|
|
182
182
|
if (!t?._zod?.def) throw Error("Invalid input to merge: expected an object schema. To merge a plain shape, use `.extend()`.");
|
|
183
183
|
if (e._zod.def.checks?.length) throw Error(".merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.");
|
|
184
|
-
return
|
|
184
|
+
return _(e, u(e._zod.def, {
|
|
185
185
|
get shape() {
|
|
186
186
|
let n = {
|
|
187
187
|
...e._zod.def.shape,
|
|
@@ -195,10 +195,10 @@ function de(e, t) {
|
|
|
195
195
|
checks: t._zod.def.checks ?? []
|
|
196
196
|
}));
|
|
197
197
|
}
|
|
198
|
-
function
|
|
198
|
+
function de(e, t, n, r = "partial") {
|
|
199
199
|
let i = t._zod.def.checks;
|
|
200
200
|
if (i && i.length > 0) throw Error(`.${r}() cannot be used on object schemas containing refinements`);
|
|
201
|
-
return
|
|
201
|
+
return _(t, u(t._zod.def, {
|
|
202
202
|
get shape() {
|
|
203
203
|
let r = t._zod.def.shape, i = { ...r };
|
|
204
204
|
if (n) for (let t of Reflect.ownKeys(n)) {
|
|
@@ -217,8 +217,8 @@ function fe(e, t, n, r = "partial") {
|
|
|
217
217
|
checks: []
|
|
218
218
|
}));
|
|
219
219
|
}
|
|
220
|
-
function
|
|
221
|
-
return
|
|
220
|
+
function fe(e, t, n) {
|
|
221
|
+
return _(t, u(t._zod.def, { get shape() {
|
|
222
222
|
let r = t._zod.def.shape, i = { ...r };
|
|
223
223
|
if (n) for (let t of Reflect.ownKeys(n)) {
|
|
224
224
|
if (!Object.prototype.hasOwnProperty.call(i, t)) throw Error(`Unrecognized key: "${String(t)}"`);
|
|
@@ -234,7 +234,7 @@ function pe(e, t, n) {
|
|
|
234
234
|
return l(this, "shape", i), i;
|
|
235
235
|
} }));
|
|
236
236
|
}
|
|
237
|
-
function
|
|
237
|
+
function pe(e, t = 0) {
|
|
238
238
|
if (e.aborted === !0) return !0;
|
|
239
239
|
for (let n = t; n < e.issues.length; n++) if (e.issues[n]?.continue !== !0) return !0;
|
|
240
240
|
return !1;
|
|
@@ -769,7 +769,7 @@ var It = (e) => {
|
|
|
769
769
|
};
|
|
770
770
|
}), Jt = /*@__PURE__*/ w("$ZodCheckNumberFormat", (e, t) => {
|
|
771
771
|
O.init(e, t), t.format = t.format || "float64";
|
|
772
|
-
let n = t.format?.includes("int"), r = n ? "int" : "number", [i, a] =
|
|
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
775
|
r.format = t.format, r.minimum = i, r.maximum = a, n && (r.pattern = Lt);
|
|
@@ -925,7 +925,7 @@ var It = (e) => {
|
|
|
925
925
|
t.pattern ??= Ht, Qt.init(e, t);
|
|
926
926
|
}), nn = /*@__PURE__*/ w("$ZodCheckIncludes", (e, t) => {
|
|
927
927
|
O.init(e, t);
|
|
928
|
-
let n =
|
|
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;
|
|
931
931
|
t.patterns ??= /* @__PURE__ */ new Set(), t.patterns.add(r);
|
|
@@ -942,7 +942,7 @@ var It = (e) => {
|
|
|
942
942
|
};
|
|
943
943
|
}), rn = /*@__PURE__*/ w("$ZodCheckStartsWith", (e, t) => {
|
|
944
944
|
O.init(e, t);
|
|
945
|
-
let n = RegExp(`^${
|
|
945
|
+
let n = RegExp(`^${g(t.prefix)}.*`);
|
|
946
946
|
t.pattern ??= n, e._zod.onattach.push((e) => {
|
|
947
947
|
let t = e._zod.bag;
|
|
948
948
|
t.patterns ??= /* @__PURE__ */ new Set(), t.patterns.add(n);
|
|
@@ -959,7 +959,7 @@ var It = (e) => {
|
|
|
959
959
|
};
|
|
960
960
|
}), an = /*@__PURE__*/ w("$ZodCheckEndsWith", (e, t) => {
|
|
961
961
|
O.init(e, t);
|
|
962
|
-
let n = RegExp(`.*${
|
|
962
|
+
let n = RegExp(`.*${g(t.suffix)}$`);
|
|
963
963
|
t.pattern ??= n, e._zod.onattach.push((e) => {
|
|
964
964
|
let t = e._zod.bag;
|
|
965
965
|
t.patterns ??= /* @__PURE__ */ new Set(), t.patterns.add(n);
|
|
@@ -1012,7 +1012,7 @@ var It = (e) => {
|
|
|
1012
1012
|
else {
|
|
1013
1013
|
let t = (t, n, r) => {
|
|
1014
1014
|
if (t.memo) return t;
|
|
1015
|
-
let i =
|
|
1015
|
+
let i = pe(t), a;
|
|
1016
1016
|
for (let o of n) {
|
|
1017
1017
|
if (o._zod.def.when) {
|
|
1018
1018
|
if (me(t) || !o._zod.def.when(t)) continue;
|
|
@@ -1020,16 +1020,16 @@ var It = (e) => {
|
|
|
1020
1020
|
let n = t.issues.length, s = o._zod.check(t);
|
|
1021
1021
|
if (s instanceof Promise && r?.async === !1) throw new T();
|
|
1022
1022
|
if (a || s instanceof Promise) a = (a ?? Promise.resolve()).then(async () => {
|
|
1023
|
-
await s, t.issues.length !== n && (ge(t.issues, n, e), i ||=
|
|
1023
|
+
await s, t.issues.length !== n && (ge(t.issues, n, e), i ||= pe(t, n));
|
|
1024
1024
|
});
|
|
1025
1025
|
else {
|
|
1026
1026
|
if (t.issues.length === n) continue;
|
|
1027
|
-
ge(t.issues, n, e), i ||=
|
|
1027
|
+
ge(t.issues, n, e), i ||= pe(t, n);
|
|
1028
1028
|
}
|
|
1029
1029
|
}
|
|
1030
1030
|
return a ? a.then(() => t) : t;
|
|
1031
1031
|
}, n = (n, r, a) => {
|
|
1032
|
-
if (
|
|
1032
|
+
if (pe(n)) return n.aborted = !0, n;
|
|
1033
1033
|
let o = t(r, i, a);
|
|
1034
1034
|
if (o instanceof Promise) {
|
|
1035
1035
|
if (a.async === !1) throw new T();
|
|
@@ -1412,7 +1412,7 @@ var tr = [];
|
|
|
1412
1412
|
function nr(e) {
|
|
1413
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
|
-
let a =
|
|
1415
|
+
let a = ie(e.shape);
|
|
1416
1416
|
return {
|
|
1417
1417
|
...e,
|
|
1418
1418
|
allKeys: i,
|
|
@@ -1572,7 +1572,7 @@ var ir = /* @__PURE__ */ new WeakMap(), ar = /*@__PURE__*/ w("$ZodObject", (e, t
|
|
|
1572
1572
|
});
|
|
1573
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
|
-
let i = e.filter((e) => !
|
|
1575
|
+
let i = e.filter((e) => !pe(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,
|
|
@@ -1691,7 +1691,7 @@ function dr(e, t, n) {
|
|
|
1691
1691
|
}
|
|
1692
1692
|
let c = ur(t.value, n.value);
|
|
1693
1693
|
if (!c.valid) {
|
|
1694
|
-
if (
|
|
1694
|
+
if (pe(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;
|
|
@@ -1888,7 +1888,7 @@ var gr = /*@__PURE__*/ w("$ZodRecord", (e, t) => {
|
|
|
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));
|
|
1891
|
-
t._zod.pattern = RegExp(a.length ? `^(${a.map((e) =>
|
|
1891
|
+
t._zod.pattern = RegExp(a.length ? `^(${a.map((e) => g(e.toString())).join("|")})$` : "^[^\\s\\S]$"), t._zod.parse = (e, n) => {
|
|
1892
1892
|
let a = e.value;
|
|
1893
1893
|
return i.has(a) || e.issues.push({
|
|
1894
1894
|
code: "invalid_value",
|
|
@@ -1900,7 +1900,7 @@ var gr = /*@__PURE__*/ w("$ZodRecord", (e, t) => {
|
|
|
1900
1900
|
}), vr = /*@__PURE__*/ w("$ZodLiteral", (e, t) => {
|
|
1901
1901
|
k.init(e, t);
|
|
1902
1902
|
let n = new Set(t.values);
|
|
1903
|
-
e._zod.values = n, e._zod.pattern = RegExp(t.values.length ? `^(${t.values.map((e) => typeof e == "string" ?
|
|
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;
|
|
1905
1905
|
return n.has(a) || r.issues.push({
|
|
1906
1906
|
code: "invalid_value",
|
|
@@ -2267,7 +2267,7 @@ var Xr = () => {
|
|
|
2267
2267
|
return (e) => {
|
|
2268
2268
|
switch (e.code) {
|
|
2269
2269
|
case "invalid_type": return `Invalid input: expected ${a(e.expected)}, received ${a(be(e.input), e.input)}`;
|
|
2270
|
-
case "invalid_value": return e.values.length === 1 ? `Invalid input: expected ${
|
|
2270
|
+
case "invalid_value": return e.values.length === 1 ? `Invalid input: expected ${re(e.values[0])}` : `Invalid option: expected one of ${t(e.values, "|")}`;
|
|
2271
2271
|
case "too_big": {
|
|
2272
2272
|
let t = e.exact ? "exactly " : e.inclusive ? "<=" : "<", r = n(e.origin);
|
|
2273
2273
|
return r ? `Too big: expected ${e.origin ?? "value"} to have ${t}${e.maximum.toString()} ${r.unit ?? "elements"}` : `Too big: expected ${e.origin ?? "value"} to be ${t}${e.maximum.toString()}`;
|
|
@@ -2337,7 +2337,7 @@ var ti = globalThis.__zod_globalRegistry;
|
|
|
2337
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__
|
|
@@ -2347,7 +2347,7 @@ function ri(e, t) {
|
|
|
2347
2347
|
format: "email",
|
|
2348
2348
|
check: "string_format",
|
|
2349
2349
|
abort: !1,
|
|
2350
|
-
...
|
|
2350
|
+
...v(t)
|
|
2351
2351
|
});
|
|
2352
2352
|
}
|
|
2353
2353
|
// @__NO_SIDE_EFFECTS__
|
|
@@ -2357,7 +2357,7 @@ function ii(e, t) {
|
|
|
2357
2357
|
format: "guid",
|
|
2358
2358
|
check: "string_format",
|
|
2359
2359
|
abort: !1,
|
|
2360
|
-
...
|
|
2360
|
+
...v(t)
|
|
2361
2361
|
});
|
|
2362
2362
|
}
|
|
2363
2363
|
// @__NO_SIDE_EFFECTS__
|
|
@@ -2367,7 +2367,7 @@ function ai(e, t) {
|
|
|
2367
2367
|
format: "uuid",
|
|
2368
2368
|
check: "string_format",
|
|
2369
2369
|
abort: !1,
|
|
2370
|
-
...
|
|
2370
|
+
...v(t)
|
|
2371
2371
|
});
|
|
2372
2372
|
}
|
|
2373
2373
|
// @__NO_SIDE_EFFECTS__
|
|
@@ -2378,7 +2378,7 @@ function oi(e, t) {
|
|
|
2378
2378
|
check: "string_format",
|
|
2379
2379
|
abort: !1,
|
|
2380
2380
|
version: "v4",
|
|
2381
|
-
...
|
|
2381
|
+
...v(t)
|
|
2382
2382
|
});
|
|
2383
2383
|
}
|
|
2384
2384
|
// @__NO_SIDE_EFFECTS__
|
|
@@ -2389,7 +2389,7 @@ function si(e, t) {
|
|
|
2389
2389
|
check: "string_format",
|
|
2390
2390
|
abort: !1,
|
|
2391
2391
|
version: "v6",
|
|
2392
|
-
...
|
|
2392
|
+
...v(t)
|
|
2393
2393
|
});
|
|
2394
2394
|
}
|
|
2395
2395
|
// @__NO_SIDE_EFFECTS__
|
|
@@ -2400,7 +2400,7 @@ function ci(e, t) {
|
|
|
2400
2400
|
check: "string_format",
|
|
2401
2401
|
abort: !1,
|
|
2402
2402
|
version: "v7",
|
|
2403
|
-
...
|
|
2403
|
+
...v(t)
|
|
2404
2404
|
});
|
|
2405
2405
|
}
|
|
2406
2406
|
// @__NO_SIDE_EFFECTS__
|
|
@@ -2410,7 +2410,7 @@ function li(e, t) {
|
|
|
2410
2410
|
format: "url",
|
|
2411
2411
|
check: "string_format",
|
|
2412
2412
|
abort: !1,
|
|
2413
|
-
...
|
|
2413
|
+
...v(t)
|
|
2414
2414
|
});
|
|
2415
2415
|
}
|
|
2416
2416
|
// @__NO_SIDE_EFFECTS__
|
|
@@ -2420,7 +2420,7 @@ function ui(e, t) {
|
|
|
2420
2420
|
format: "emoji",
|
|
2421
2421
|
check: "string_format",
|
|
2422
2422
|
abort: !1,
|
|
2423
|
-
...
|
|
2423
|
+
...v(t)
|
|
2424
2424
|
});
|
|
2425
2425
|
}
|
|
2426
2426
|
// @__NO_SIDE_EFFECTS__
|
|
@@ -2430,7 +2430,7 @@ function di(e, t) {
|
|
|
2430
2430
|
format: "nanoid",
|
|
2431
2431
|
check: "string_format",
|
|
2432
2432
|
abort: !1,
|
|
2433
|
-
...
|
|
2433
|
+
...v(t)
|
|
2434
2434
|
});
|
|
2435
2435
|
}
|
|
2436
2436
|
// @__NO_SIDE_EFFECTS__
|
|
@@ -2440,7 +2440,7 @@ function fi(e, t) {
|
|
|
2440
2440
|
format: "cuid",
|
|
2441
2441
|
check: "string_format",
|
|
2442
2442
|
abort: !1,
|
|
2443
|
-
...
|
|
2443
|
+
...v(t)
|
|
2444
2444
|
});
|
|
2445
2445
|
}
|
|
2446
2446
|
// @__NO_SIDE_EFFECTS__
|
|
@@ -2450,7 +2450,7 @@ function pi(e, t) {
|
|
|
2450
2450
|
format: "cuid2",
|
|
2451
2451
|
check: "string_format",
|
|
2452
2452
|
abort: !1,
|
|
2453
|
-
...
|
|
2453
|
+
...v(t)
|
|
2454
2454
|
});
|
|
2455
2455
|
}
|
|
2456
2456
|
// @__NO_SIDE_EFFECTS__
|
|
@@ -2460,7 +2460,7 @@ function mi(e, t) {
|
|
|
2460
2460
|
format: "ulid",
|
|
2461
2461
|
check: "string_format",
|
|
2462
2462
|
abort: !1,
|
|
2463
|
-
...
|
|
2463
|
+
...v(t)
|
|
2464
2464
|
});
|
|
2465
2465
|
}
|
|
2466
2466
|
// @__NO_SIDE_EFFECTS__
|
|
@@ -2470,7 +2470,7 @@ function hi(e, t) {
|
|
|
2470
2470
|
format: "xid",
|
|
2471
2471
|
check: "string_format",
|
|
2472
2472
|
abort: !1,
|
|
2473
|
-
...
|
|
2473
|
+
...v(t)
|
|
2474
2474
|
});
|
|
2475
2475
|
}
|
|
2476
2476
|
// @__NO_SIDE_EFFECTS__
|
|
@@ -2480,7 +2480,7 @@ function gi(e, t) {
|
|
|
2480
2480
|
format: "ksuid",
|
|
2481
2481
|
check: "string_format",
|
|
2482
2482
|
abort: !1,
|
|
2483
|
-
...
|
|
2483
|
+
...v(t)
|
|
2484
2484
|
});
|
|
2485
2485
|
}
|
|
2486
2486
|
// @__NO_SIDE_EFFECTS__
|
|
@@ -2490,7 +2490,7 @@ function _i(e, t) {
|
|
|
2490
2490
|
format: "ipv4",
|
|
2491
2491
|
check: "string_format",
|
|
2492
2492
|
abort: !1,
|
|
2493
|
-
...
|
|
2493
|
+
...v(t)
|
|
2494
2494
|
});
|
|
2495
2495
|
}
|
|
2496
2496
|
// @__NO_SIDE_EFFECTS__
|
|
@@ -2500,7 +2500,7 @@ function vi(e, t) {
|
|
|
2500
2500
|
format: "ipv6",
|
|
2501
2501
|
check: "string_format",
|
|
2502
2502
|
abort: !1,
|
|
2503
|
-
...
|
|
2503
|
+
...v(t)
|
|
2504
2504
|
});
|
|
2505
2505
|
}
|
|
2506
2506
|
// @__NO_SIDE_EFFECTS__
|
|
@@ -2510,7 +2510,7 @@ function yi(e, t) {
|
|
|
2510
2510
|
format: "cidrv4",
|
|
2511
2511
|
check: "string_format",
|
|
2512
2512
|
abort: !1,
|
|
2513
|
-
...
|
|
2513
|
+
...v(t)
|
|
2514
2514
|
});
|
|
2515
2515
|
}
|
|
2516
2516
|
// @__NO_SIDE_EFFECTS__
|
|
@@ -2520,7 +2520,7 @@ function bi(e, t) {
|
|
|
2520
2520
|
format: "cidrv6",
|
|
2521
2521
|
check: "string_format",
|
|
2522
2522
|
abort: !1,
|
|
2523
|
-
...
|
|
2523
|
+
...v(t)
|
|
2524
2524
|
});
|
|
2525
2525
|
}
|
|
2526
2526
|
// @__NO_SIDE_EFFECTS__
|
|
@@ -2530,7 +2530,7 @@ function xi(e, t) {
|
|
|
2530
2530
|
format: "base64",
|
|
2531
2531
|
check: "string_format",
|
|
2532
2532
|
abort: !1,
|
|
2533
|
-
...
|
|
2533
|
+
...v(t)
|
|
2534
2534
|
});
|
|
2535
2535
|
}
|
|
2536
2536
|
// @__NO_SIDE_EFFECTS__
|
|
@@ -2540,7 +2540,7 @@ function Si(e, t) {
|
|
|
2540
2540
|
format: "base64url",
|
|
2541
2541
|
check: "string_format",
|
|
2542
2542
|
abort: !1,
|
|
2543
|
-
...
|
|
2543
|
+
...v(t)
|
|
2544
2544
|
});
|
|
2545
2545
|
}
|
|
2546
2546
|
// @__NO_SIDE_EFFECTS__
|
|
@@ -2550,7 +2550,7 @@ function Ci(e, t) {
|
|
|
2550
2550
|
format: "e164",
|
|
2551
2551
|
check: "string_format",
|
|
2552
2552
|
abort: !1,
|
|
2553
|
-
...
|
|
2553
|
+
...v(t)
|
|
2554
2554
|
});
|
|
2555
2555
|
}
|
|
2556
2556
|
// @__NO_SIDE_EFFECTS__
|
|
@@ -2560,7 +2560,7 @@ function wi(e, t) {
|
|
|
2560
2560
|
format: "jwt",
|
|
2561
2561
|
check: "string_format",
|
|
2562
2562
|
abort: !1,
|
|
2563
|
-
...
|
|
2563
|
+
...v(t)
|
|
2564
2564
|
});
|
|
2565
2565
|
}
|
|
2566
2566
|
// @__NO_SIDE_EFFECTS__
|
|
@@ -2572,7 +2572,7 @@ function Ti(e, t) {
|
|
|
2572
2572
|
offset: !1,
|
|
2573
2573
|
local: !1,
|
|
2574
2574
|
precision: null,
|
|
2575
|
-
...
|
|
2575
|
+
...v(t)
|
|
2576
2576
|
});
|
|
2577
2577
|
}
|
|
2578
2578
|
// @__NO_SIDE_EFFECTS__
|
|
@@ -2581,7 +2581,7 @@ function Ei(e, t) {
|
|
|
2581
2581
|
type: "string",
|
|
2582
2582
|
format: "date",
|
|
2583
2583
|
check: "string_format",
|
|
2584
|
-
...
|
|
2584
|
+
...v(t)
|
|
2585
2585
|
});
|
|
2586
2586
|
}
|
|
2587
2587
|
// @__NO_SIDE_EFFECTS__
|
|
@@ -2591,7 +2591,7 @@ function Di(e, t) {
|
|
|
2591
2591
|
format: "time",
|
|
2592
2592
|
check: "string_format",
|
|
2593
2593
|
precision: null,
|
|
2594
|
-
...
|
|
2594
|
+
...v(t)
|
|
2595
2595
|
});
|
|
2596
2596
|
}
|
|
2597
2597
|
// @__NO_SIDE_EFFECTS__
|
|
@@ -2600,7 +2600,7 @@ function Oi(e, t) {
|
|
|
2600
2600
|
type: "string",
|
|
2601
2601
|
format: "duration",
|
|
2602
2602
|
check: "string_format",
|
|
2603
|
-
...
|
|
2603
|
+
...v(t)
|
|
2604
2604
|
});
|
|
2605
2605
|
}
|
|
2606
2606
|
// @__NO_SIDE_EFFECTS__
|
|
@@ -2608,7 +2608,7 @@ function ki(e, t) {
|
|
|
2608
2608
|
return new e({
|
|
2609
2609
|
type: "number",
|
|
2610
2610
|
checks: [],
|
|
2611
|
-
...
|
|
2611
|
+
...v(t)
|
|
2612
2612
|
});
|
|
2613
2613
|
}
|
|
2614
2614
|
// @__NO_SIDE_EFFECTS__
|
|
@@ -2618,21 +2618,21 @@ function Ai(e, t) {
|
|
|
2618
2618
|
check: "number_format",
|
|
2619
2619
|
abort: !1,
|
|
2620
2620
|
format: "safeint",
|
|
2621
|
-
...
|
|
2621
|
+
...v(t)
|
|
2622
2622
|
});
|
|
2623
2623
|
}
|
|
2624
2624
|
// @__NO_SIDE_EFFECTS__
|
|
2625
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
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__
|
|
@@ -2643,14 +2643,14 @@ function Ni(e) {
|
|
|
2643
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
2650
|
function Fi(e, t) {
|
|
2651
2651
|
return new Gt({
|
|
2652
2652
|
check: "less_than",
|
|
2653
|
-
...
|
|
2653
|
+
...v(t),
|
|
2654
2654
|
value: e,
|
|
2655
2655
|
inclusive: !1
|
|
2656
2656
|
});
|
|
@@ -2659,7 +2659,7 @@ function Fi(e, t) {
|
|
|
2659
2659
|
function Ii(e, t) {
|
|
2660
2660
|
return new Gt({
|
|
2661
2661
|
check: "less_than",
|
|
2662
|
-
...
|
|
2662
|
+
...v(t),
|
|
2663
2663
|
value: e,
|
|
2664
2664
|
inclusive: !0
|
|
2665
2665
|
});
|
|
@@ -2668,7 +2668,7 @@ function Ii(e, t) {
|
|
|
2668
2668
|
function Li(e, t) {
|
|
2669
2669
|
return new Kt({
|
|
2670
2670
|
check: "greater_than",
|
|
2671
|
-
...
|
|
2671
|
+
...v(t),
|
|
2672
2672
|
value: e,
|
|
2673
2673
|
inclusive: !1
|
|
2674
2674
|
});
|
|
@@ -2677,7 +2677,7 @@ function Li(e, t) {
|
|
|
2677
2677
|
function Ri(e, t) {
|
|
2678
2678
|
return new Kt({
|
|
2679
2679
|
check: "greater_than",
|
|
2680
|
-
...
|
|
2680
|
+
...v(t),
|
|
2681
2681
|
value: e,
|
|
2682
2682
|
inclusive: !0
|
|
2683
2683
|
});
|
|
@@ -2686,7 +2686,7 @@ function Ri(e, t) {
|
|
|
2686
2686
|
function zi(e, t) {
|
|
2687
2687
|
return new qt({
|
|
2688
2688
|
check: "multiple_of",
|
|
2689
|
-
...
|
|
2689
|
+
...v(t),
|
|
2690
2690
|
value: e
|
|
2691
2691
|
});
|
|
2692
2692
|
}
|
|
@@ -2694,7 +2694,7 @@ function zi(e, t) {
|
|
|
2694
2694
|
function Bi(e, t) {
|
|
2695
2695
|
return new Yt({
|
|
2696
2696
|
check: "max_length",
|
|
2697
|
-
...
|
|
2697
|
+
...v(t),
|
|
2698
2698
|
maximum: e
|
|
2699
2699
|
});
|
|
2700
2700
|
}
|
|
@@ -2702,7 +2702,7 @@ function Bi(e, t) {
|
|
|
2702
2702
|
function Vi(e, t) {
|
|
2703
2703
|
return new Xt({
|
|
2704
2704
|
check: "min_length",
|
|
2705
|
-
...
|
|
2705
|
+
...v(t),
|
|
2706
2706
|
minimum: e
|
|
2707
2707
|
});
|
|
2708
2708
|
}
|
|
@@ -2710,7 +2710,7 @@ function Vi(e, t) {
|
|
|
2710
2710
|
function Hi(e, t) {
|
|
2711
2711
|
return new Zt({
|
|
2712
2712
|
check: "length_equals",
|
|
2713
|
-
...
|
|
2713
|
+
...v(t),
|
|
2714
2714
|
length: e
|
|
2715
2715
|
});
|
|
2716
2716
|
}
|
|
@@ -2719,7 +2719,7 @@ function Ui(e, t) {
|
|
|
2719
2719
|
return new $t({
|
|
2720
2720
|
check: "string_format",
|
|
2721
2721
|
format: "regex",
|
|
2722
|
-
...
|
|
2722
|
+
...v(t),
|
|
2723
2723
|
pattern: e
|
|
2724
2724
|
});
|
|
2725
2725
|
}
|
|
@@ -2728,7 +2728,7 @@ function Wi(e) {
|
|
|
2728
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__
|
|
@@ -2736,7 +2736,7 @@ function Gi(e) {
|
|
|
2736
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__
|
|
@@ -2744,7 +2744,7 @@ function Ki(e, t) {
|
|
|
2744
2744
|
return new nn({
|
|
2745
2745
|
check: "string_format",
|
|
2746
2746
|
format: "includes",
|
|
2747
|
-
...
|
|
2747
|
+
...v(t),
|
|
2748
2748
|
includes: e
|
|
2749
2749
|
});
|
|
2750
2750
|
}
|
|
@@ -2753,7 +2753,7 @@ function qi(e, t) {
|
|
|
2753
2753
|
return new rn({
|
|
2754
2754
|
check: "string_format",
|
|
2755
2755
|
format: "starts_with",
|
|
2756
|
-
...
|
|
2756
|
+
...v(t),
|
|
2757
2757
|
prefix: e
|
|
2758
2758
|
});
|
|
2759
2759
|
}
|
|
@@ -2762,57 +2762,57 @@ function Ji(e, t) {
|
|
|
2762
2762
|
return new an({
|
|
2763
2763
|
check: "string_format",
|
|
2764
2764
|
format: "ends_with",
|
|
2765
|
-
...
|
|
2765
|
+
...v(t),
|
|
2766
2766
|
suffix: e
|
|
2767
2767
|
});
|
|
2768
2768
|
}
|
|
2769
2769
|
// @__NO_SIDE_EFFECTS__
|
|
2770
|
-
function
|
|
2770
|
+
function Yi(e) {
|
|
2771
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 Xi() {
|
|
2782
|
-
return /* @__PURE__ */ j((e) => e.trim());
|
|
2777
|
+
function Xi(e) {
|
|
2778
|
+
return /* @__PURE__ */ Yi((t) => t.normalize(e));
|
|
2783
2779
|
}
|
|
2784
2780
|
// @__NO_SIDE_EFFECTS__
|
|
2785
2781
|
function Zi() {
|
|
2786
|
-
return /* @__PURE__ */
|
|
2782
|
+
return /* @__PURE__ */ Yi((e) => e.trim());
|
|
2787
2783
|
}
|
|
2788
2784
|
// @__NO_SIDE_EFFECTS__
|
|
2789
2785
|
function Qi() {
|
|
2790
|
-
return /* @__PURE__ */
|
|
2786
|
+
return /* @__PURE__ */ Yi((e) => e.toLowerCase());
|
|
2791
2787
|
}
|
|
2792
2788
|
// @__NO_SIDE_EFFECTS__
|
|
2793
2789
|
function $i() {
|
|
2794
|
-
return /* @__PURE__ */
|
|
2790
|
+
return /* @__PURE__ */ Yi((e) => e.toUpperCase());
|
|
2795
2791
|
}
|
|
2796
2792
|
// @__NO_SIDE_EFFECTS__
|
|
2797
|
-
function ea(
|
|
2793
|
+
function ea() {
|
|
2794
|
+
return /* @__PURE__ */ Yi((e) => f(e));
|
|
2795
|
+
}
|
|
2796
|
+
// @__NO_SIDE_EFFECTS__
|
|
2797
|
+
function ta(e, t, n) {
|
|
2798
2798
|
return new e({
|
|
2799
2799
|
type: "array",
|
|
2800
2800
|
element: t,
|
|
2801
|
-
...
|
|
2801
|
+
...v(n)
|
|
2802
2802
|
});
|
|
2803
2803
|
}
|
|
2804
2804
|
// @__NO_SIDE_EFFECTS__
|
|
2805
|
-
function
|
|
2805
|
+
function na(e, t, n) {
|
|
2806
2806
|
return new e({
|
|
2807
2807
|
type: "custom",
|
|
2808
2808
|
check: "custom",
|
|
2809
2809
|
fn: t,
|
|
2810
|
-
...
|
|
2810
|
+
...v(n)
|
|
2811
2811
|
});
|
|
2812
2812
|
}
|
|
2813
2813
|
// @__NO_SIDE_EFFECTS__
|
|
2814
|
-
function
|
|
2815
|
-
let n = /* @__PURE__ */
|
|
2814
|
+
function ra(e, t) {
|
|
2815
|
+
let n = /* @__PURE__ */ ia((t) => (t.addIssue = (e) => {
|
|
2816
2816
|
if (typeof e == "string") t.issues.push(xe(e, t.value, n._zod.def));
|
|
2817
2817
|
else {
|
|
2818
2818
|
let r = e;
|
|
@@ -2822,20 +2822,20 @@ function na(e, t) {
|
|
|
2822
2822
|
return n;
|
|
2823
2823
|
}
|
|
2824
2824
|
// @__NO_SIDE_EFFECTS__
|
|
2825
|
-
function
|
|
2825
|
+
function ia(e, t) {
|
|
2826
2826
|
let n = new O({
|
|
2827
2827
|
check: "custom",
|
|
2828
|
-
...
|
|
2828
|
+
...v(t)
|
|
2829
2829
|
});
|
|
2830
2830
|
return n._zod.check = e, n;
|
|
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 aa(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 oa(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 ?? {},
|
|
@@ -2855,7 +2855,7 @@ function aa(e) {
|
|
|
2855
2855
|
external: e?.external ?? void 0
|
|
2856
2856
|
};
|
|
2857
2857
|
}
|
|
2858
|
-
function
|
|
2858
|
+
function j(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 M(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 M(e, t, n = {
|
|
2869
2869
|
path: [],
|
|
2870
2870
|
schemaPath: []
|
|
2871
2871
|
}) {
|
|
@@ -2894,15 +2894,15 @@ function N(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, M(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 && aa(o.schema, c), t.io === "input" && N(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 sa(e) {
|
|
2903
2903
|
return e.replace(/~/g, "~0").replace(/\//g, "~1");
|
|
2904
2904
|
}
|
|
2905
|
-
function
|
|
2905
|
+
function ca(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 sa(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}/${sa(a)}`
|
|
2927
2927
|
};
|
|
2928
2928
|
}
|
|
2929
2929
|
let i = `#/${r}/`;
|
|
@@ -2931,7 +2931,7 @@ function sa(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 + sa(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 la(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
|
+
la(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 ca(e) {
|
|
|
2992
2992
|
}
|
|
2993
2993
|
delete e.anyOf, e.type = n.length === 1 ? n[0] : n;
|
|
2994
2994
|
}
|
|
2995
|
-
var
|
|
2995
|
+
var ua = /* @__PURE__ */ new Set([
|
|
2996
2996
|
"type",
|
|
2997
2997
|
"properties",
|
|
2998
2998
|
"required",
|
|
2999
2999
|
"additionalProperties"
|
|
3000
|
-
]),
|
|
3001
|
-
function
|
|
3000
|
+
]), da = ["oneOf", "anyOf"];
|
|
3001
|
+
function fa(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 pa(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 (!ua.has(e)) return null;
|
|
3010
3010
|
t.push(n);
|
|
3011
3011
|
}
|
|
3012
3012
|
let n = {}, r = /* @__PURE__ */ new Set();
|
|
@@ -3015,10 +3015,10 @@ function fa(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] ?? fa(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] : pa(e) ?? { allOf: e });
|
|
3022
3022
|
}
|
|
3023
3023
|
for (let t of e.required ?? []) r.add(t);
|
|
3024
3024
|
}
|
|
@@ -3030,29 +3030,29 @@ function fa(e) {
|
|
|
3030
3030
|
else {
|
|
3031
3031
|
let e = [];
|
|
3032
3032
|
for (let n of t) {
|
|
3033
|
-
let t =
|
|
3033
|
+
let t = fa(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 ma(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 ua) if (t in e) return;
|
|
3044
|
+
let n = t.filter((e) => da.some((t) => Array.isArray(e[t]))), r = null;
|
|
3045
|
+
if (!n.length) r = pa(t);
|
|
3046
3046
|
else {
|
|
3047
|
-
let e = n[0], i =
|
|
3047
|
+
let e = n[0], i = da.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) => pa([...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, aa(e, r));
|
|
3054
3054
|
}
|
|
3055
|
-
function
|
|
3055
|
+
function ha(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 ma(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)) : aa(i, s), aa(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 ma(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()) la(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 ma(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) ?? []) ma(e);
|
|
3093
3093
|
}
|
|
3094
3094
|
}
|
|
3095
3095
|
let i = {};
|
|
@@ -3098,7 +3098,7 @@ function ma(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
|
+
aa(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 ma(e, t) {
|
|
|
3113
3113
|
value: {
|
|
3114
3114
|
...t["~standard"],
|
|
3115
3115
|
jsonSchema: {
|
|
3116
|
-
input:
|
|
3117
|
-
output:
|
|
3116
|
+
input: _a(t, "input", e.processors),
|
|
3117
|
+
output: _a(t, "output", e.processors)
|
|
3118
3118
|
}
|
|
3119
3119
|
},
|
|
3120
3120
|
enumerable: !1,
|
|
@@ -3124,83 +3124,83 @@ function ma(e, t) {
|
|
|
3124
3124
|
throw Error("Error converting schema to JSON.");
|
|
3125
3125
|
}
|
|
3126
3126
|
}
|
|
3127
|
-
function
|
|
3127
|
+
function N(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 N(r.element, n);
|
|
3134
|
+
if (r.type === "set") return N(r.valueType, n);
|
|
3135
|
+
if (r.type === "lazy") return N(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 N(r.innerType, n);
|
|
3137
|
+
if (r.type === "intersection") return N(r.left, n) || N(r.right, n);
|
|
3138
|
+
if (r.type === "record" || r.type === "map") return N(r.keyType, n) || N(r.valueType, n);
|
|
3139
|
+
if (r.type === "pipe") return e._zod.traits.has("$ZodCodec") ? !0 : N(r.in, n) || N(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 (N(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 (N(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 (N(e, n)) return !0;
|
|
3150
|
+
return !!(r.rest && N(r.rest, n));
|
|
3151
3151
|
}
|
|
3152
3152
|
return !1;
|
|
3153
3153
|
}
|
|
3154
|
-
var
|
|
3155
|
-
let r =
|
|
3154
|
+
var ga = (e, t = {}) => (n) => {
|
|
3155
|
+
let r = oa({
|
|
3156
3156
|
...n,
|
|
3157
3157
|
processors: t
|
|
3158
3158
|
});
|
|
3159
|
-
return
|
|
3160
|
-
},
|
|
3161
|
-
let { libraryOptions: i, target: a } = r ?? {}, o =
|
|
3159
|
+
return M(e, r), ca(r, e), ha(r, e);
|
|
3160
|
+
}, _a = (e, t, n = {}) => (r) => {
|
|
3161
|
+
let { libraryOptions: i, target: a } = r ?? {}, o = oa({
|
|
3162
3162
|
...i ?? {},
|
|
3163
3163
|
target: a,
|
|
3164
3164
|
io: t,
|
|
3165
3165
|
processors: n
|
|
3166
3166
|
});
|
|
3167
|
-
return
|
|
3168
|
-
},
|
|
3167
|
+
return M(e, o), ca(o, e), ha(o, e);
|
|
3168
|
+
}, va = {
|
|
3169
3169
|
guid: "uuid",
|
|
3170
3170
|
url: "uri",
|
|
3171
3171
|
datetime: "date-time",
|
|
3172
3172
|
json_string: "json-string",
|
|
3173
3173
|
regex: ""
|
|
3174
|
-
},
|
|
3174
|
+
}, ya = (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 = va[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
|
+
}, ba = (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
|
-
}, ba = (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) : j(e, t, i, r, `A multipleOf divisor of ${c} cannot be represented in JSON Schema`));
|
|
3192
3190
|
}, xa = (e, t, n, r) => {
|
|
3193
|
-
|
|
3191
|
+
n.type = "boolean";
|
|
3194
3192
|
}, Sa = (e, t, n, r) => {
|
|
3193
|
+
t.target === "openapi-3.0" ? (n.type = "string", n.nullable = !0, n.enum = [null]) : n.type = "null";
|
|
3194
|
+
}, Ca = (e, t, n, r) => {
|
|
3195
3195
|
n.not = {};
|
|
3196
|
-
},
|
|
3196
|
+
}, wa = (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
|
+
}, Ta = (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 ha = (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 (j(e, t, n, r, "Literal `undefined` cannot be represented in JSON Schema")) return;
|
|
3212
3212
|
} else if (typeof o == "bigint") {
|
|
3213
|
-
if (
|
|
3213
|
+
if (j(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 ha = (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
|
-
}, Ta = (e, t, n, r) => {
|
|
3223
|
-
M(e, t, n, r, "Custom types cannot be represented in JSON Schema");
|
|
3224
3222
|
}, Ea = (e, t, n, r) => {
|
|
3225
|
-
|
|
3223
|
+
j(e, t, n, r, "Custom types cannot be represented in JSON Schema");
|
|
3226
3224
|
}, Da = (e, t, n, r) => {
|
|
3225
|
+
j(e, t, n, r, "Transforms cannot be represented in JSON Schema");
|
|
3226
|
+
}, Oa = (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 = M(a.element, t, {
|
|
3229
3229
|
...r,
|
|
3230
3230
|
path: [...r.path, "items"]
|
|
3231
3231
|
});
|
|
3232
3232
|
};
|
|
3233
|
-
function
|
|
3233
|
+
function ka(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") ? ka(t.out) : t.type === "catch" ? ka(t.innerType) : e._zod.optin;
|
|
3236
3236
|
}
|
|
3237
|
-
var
|
|
3237
|
+
var Aa = (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 && j(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, M(o[e], t, {
|
|
3242
3242
|
...r,
|
|
3243
3243
|
path: [
|
|
3244
3244
|
...r.path,
|
|
@@ -3248,14 +3248,14 @@ var ka = (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" ? ka(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 = M(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
|
+
}, ja = (e, t, n, r) => {
|
|
3258
|
+
let i = e._zod.def, a = i.inclusive === !1, o = i.options.map((e, n) => M(e, t, {
|
|
3259
3259
|
...r,
|
|
3260
3260
|
path: [
|
|
3261
3261
|
...r.path,
|
|
@@ -3264,15 +3264,15 @@ var ka = (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
|
+
}, Ma = (e, t, n, r) => {
|
|
3268
|
+
let i = e._zod.def, a = M(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 = M(i.right, t, {
|
|
3276
3276
|
...r,
|
|
3277
3277
|
path: [
|
|
3278
3278
|
...r.path,
|
|
@@ -3281,17 +3281,17 @@ var ka = (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
|
+
}, Na = (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) => M(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 ? M(a.rest, t, {
|
|
3295
3295
|
...r,
|
|
3296
3296
|
path: [
|
|
3297
3297
|
...r.path,
|
|
@@ -3301,7 +3301,7 @@ var ka = (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" ? ka(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 ka = (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 Pa(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 = Pa(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) => Pa(e, t, n));
|
|
3325
3325
|
a.some((e, t) => e !== i[t]) && (t = {
|
|
3326
3326
|
...t,
|
|
3327
3327
|
[r]: a
|
|
@@ -3332,15 +3332,15 @@ function Na(e, t, n) {
|
|
|
3332
3332
|
let { minimum: o, maximum: s, exclusiveMinimum: c, exclusiveMaximum: l, multipleOf: u, format: d, id: f, ...p } = t;
|
|
3333
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 Fa = /* @__PURE__ */ new WeakMap();
|
|
3336
|
+
function Ia(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 Fa.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 = Pa(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 Fa(e) {
|
|
|
3348
3348
|
t && (e.propertyNames = t);
|
|
3349
3349
|
}
|
|
3350
3350
|
}
|
|
3351
|
-
var
|
|
3351
|
+
var La = (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 = M(a.valueType, t, {
|
|
3357
3357
|
...r,
|
|
3358
3358
|
path: [
|
|
3359
3359
|
...r.path,
|
|
@@ -3365,85 +3365,85 @@ var Ia = (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 = M(a.keyType, t, {
|
|
3369
3369
|
...r,
|
|
3370
3370
|
path: [...r.path, "propertyNames"]
|
|
3371
3371
|
});
|
|
3372
|
-
let n =
|
|
3373
|
-
n || (n = [],
|
|
3372
|
+
let n = Fa.get(t);
|
|
3373
|
+
n || (n = [], Fa.set(t, n), t.deferred.push(() => Ia(t))), n.push(e);
|
|
3374
3374
|
}
|
|
3375
|
-
i.additionalProperties =
|
|
3375
|
+
i.additionalProperties = M(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" && ka(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
|
-
}, 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
3385
|
}, Ra = (e, t, n, r) => {
|
|
3386
|
+
let i = e._zod.def, a = M(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
|
+
}, za = (e, t, n, r) => {
|
|
3389
3389
|
let i = e._zod.def;
|
|
3390
|
-
|
|
3390
|
+
M(i.innerType, t, r);
|
|
3391
3391
|
let a = t.seen.get(e);
|
|
3392
3392
|
a.ref = i.innerType;
|
|
3393
|
-
},
|
|
3394
|
-
function
|
|
3393
|
+
}, Ba = Symbol();
|
|
3394
|
+
function Va(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 ? (j(t, n, r, i, "BigInt defaults cannot be represented in JSON Schema"), Ba) : JSON.parse(o);
|
|
3397
3397
|
}
|
|
3398
|
-
var
|
|
3398
|
+
var Ha = (e, t, n, r) => {
|
|
3399
3399
|
let i = e._zod.def;
|
|
3400
|
-
|
|
3400
|
+
M(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 = Va(i.defaultValue, e, t, n, r);
|
|
3404
|
+
o !== Ba && (n.default = o);
|
|
3405
|
+
}, Ua = (e, t, n, r) => {
|
|
3406
3406
|
let i = e._zod.def;
|
|
3407
|
-
|
|
3407
|
+
M(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 = Va(i.defaultValue, e, t, n, r);
|
|
3411
|
+
o !== Ba && (n._prefault = o);
|
|
3412
|
+
}, Wa = (e, t, n, r) => {
|
|
3413
3413
|
let i = e._zod.def;
|
|
3414
|
-
|
|
3414
|
+
M(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
|
+
j(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
|
+
}, Ga = (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
|
+
M(o, t, r);
|
|
3428
3428
|
let s = t.seen.get(e);
|
|
3429
3429
|
s.ref = o;
|
|
3430
|
-
},
|
|
3430
|
+
}, Ka = (e, t, n, r) => {
|
|
3431
3431
|
let i = e._zod.def;
|
|
3432
|
-
|
|
3432
|
+
M(i.innerType, t, r);
|
|
3433
3433
|
let a = t.seen.get(e);
|
|
3434
3434
|
a.ref = i.innerType, n.readOnly = !0;
|
|
3435
|
-
},
|
|
3435
|
+
}, qa = (e, t, n, r) => {
|
|
3436
3436
|
let i = e._zod.def;
|
|
3437
|
-
|
|
3437
|
+
M(i.innerType, t, r);
|
|
3438
3438
|
let a = t.seen.get(e);
|
|
3439
3439
|
a.ref = i.innerType;
|
|
3440
|
-
},
|
|
3440
|
+
}, Ja = (e, t, n, r) => {
|
|
3441
3441
|
let i = e._zod.innerType;
|
|
3442
|
-
|
|
3442
|
+
M(i, t, r);
|
|
3443
3443
|
let a = t.seen.get(e);
|
|
3444
3444
|
a.ref = i;
|
|
3445
|
-
},
|
|
3446
|
-
function
|
|
3445
|
+
}, Ya = /* @__PURE__ */ new WeakSet([Object.prototype, Error.prototype]);
|
|
3446
|
+
function Xa(e, t, n) {
|
|
3447
3447
|
Object.defineProperty(e, t, {
|
|
3448
3448
|
configurable: !0,
|
|
3449
3449
|
enumerable: !1,
|
|
@@ -3464,12 +3464,12 @@ function Ya(e, t, n) {
|
|
|
3464
3464
|
}
|
|
3465
3465
|
});
|
|
3466
3466
|
}
|
|
3467
|
-
var
|
|
3467
|
+
var P = /*@__PURE__*/ w("ZodError", (e, t) => {
|
|
3468
3468
|
Ue.init(e, t), e.name = "ZodError";
|
|
3469
3469
|
let r = Object.getPrototypeOf(e);
|
|
3470
|
-
|
|
3470
|
+
Ya.has(r) || (Ya.add(r), Xa(r, "format", (e) => (t) => qe(e, t)), Xa(r, "flatten", (e) => (t) => Ke(e, t)), Xa(r, "addIssue", (e) => (t) => {
|
|
3471
3471
|
e.issues.push(t), e.message = JSON.stringify(e.issues, n, 2);
|
|
3472
|
-
}),
|
|
3472
|
+
}), Xa(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 F = /*@__PURE__*/ w("ZodError", (e, t) => {
|
|
|
3478
3478
|
return this.issues.length === 0;
|
|
3479
3479
|
}
|
|
3480
3480
|
}));
|
|
3481
|
-
}, void 0, { Parent: Error }),
|
|
3481
|
+
}, void 0, { Parent: Error }), Za = /* @__PURE__ */ Ye(P), Qa = /* @__PURE__ */ Xe(P), $a = /* @__PURE__ */ Ze(P), eo = /* @__PURE__ */ $e(P), to = /* @__PURE__ */ tt(P), no = /* @__PURE__ */ nt(P), ro = /* @__PURE__ */ rt(P), io = /* @__PURE__ */ it(P), ao = /* @__PURE__ */ at(P), oo = /* @__PURE__ */ ot(P), so = /* @__PURE__ */ st(P), co = /* @__PURE__ */ ct(P);
|
|
3482
3482
|
//#endregion
|
|
3483
3483
|
//#region ../../node_modules/.bun/zod@4.5.4/node_modules/zod/v4/classic/schemas.js
|
|
3484
|
-
function
|
|
3484
|
+
function lo() {
|
|
3485
3485
|
E.localeError || D(Zr());
|
|
3486
3486
|
}
|
|
3487
|
-
function
|
|
3487
|
+
function uo() {
|
|
3488
3488
|
E.memoizer || D({ memoizer: Jr() });
|
|
3489
3489
|
}
|
|
3490
|
-
var
|
|
3490
|
+
var F = /*@__PURE__*/ w("ZodType", (e, t) => (lo(), 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: {
|
|
@@ -3500,7 +3500,7 @@ var I = /*@__PURE__*/ w("ZodType", (e, t) => (co(), k.init(e, t), e.def = t, e.t
|
|
|
3500
3500
|
return this.check(...e);
|
|
3501
3501
|
},
|
|
3502
3502
|
clone(e, t) {
|
|
3503
|
-
return
|
|
3503
|
+
return _(this, e, t);
|
|
3504
3504
|
},
|
|
3505
3505
|
brand() {
|
|
3506
3506
|
return this;
|
|
@@ -3509,55 +3509,55 @@ var I = /*@__PURE__*/ w("ZodType", (e, t) => (co(), k.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(Es(e, t));
|
|
3513
3513
|
},
|
|
3514
3514
|
superRefine(e, t) {
|
|
3515
|
-
return this.check(
|
|
3515
|
+
return this.check(Ds(e, t));
|
|
3516
3516
|
},
|
|
3517
3517
|
overwrite(e) {
|
|
3518
|
-
return this.check(/* @__PURE__ */
|
|
3518
|
+
return this.check(/* @__PURE__ */ Yi(e));
|
|
3519
3519
|
},
|
|
3520
3520
|
optional() {
|
|
3521
|
-
return
|
|
3521
|
+
return os(this);
|
|
3522
3522
|
},
|
|
3523
3523
|
exactOptional() {
|
|
3524
|
-
return
|
|
3524
|
+
return cs(this);
|
|
3525
3525
|
},
|
|
3526
3526
|
nullable() {
|
|
3527
|
-
return
|
|
3527
|
+
return us(this);
|
|
3528
3528
|
},
|
|
3529
3529
|
nullish() {
|
|
3530
|
-
return
|
|
3530
|
+
return os(us(this));
|
|
3531
3531
|
},
|
|
3532
3532
|
nonoptional(e) {
|
|
3533
|
-
return
|
|
3533
|
+
return gs(this, e);
|
|
3534
3534
|
},
|
|
3535
3535
|
array() {
|
|
3536
|
-
return
|
|
3536
|
+
return V(this);
|
|
3537
3537
|
},
|
|
3538
3538
|
or(e) {
|
|
3539
|
-
return
|
|
3539
|
+
return U([this, e]);
|
|
3540
3540
|
},
|
|
3541
3541
|
and(e) {
|
|
3542
|
-
return
|
|
3542
|
+
return Zo(this, e);
|
|
3543
3543
|
},
|
|
3544
3544
|
transform(e) {
|
|
3545
|
-
return
|
|
3545
|
+
return bs(this, is(e));
|
|
3546
3546
|
},
|
|
3547
3547
|
default(e) {
|
|
3548
|
-
return
|
|
3548
|
+
return fs(this, e);
|
|
3549
3549
|
},
|
|
3550
3550
|
prefault(e) {
|
|
3551
|
-
return
|
|
3551
|
+
return ms(this, e);
|
|
3552
3552
|
},
|
|
3553
3553
|
catch(e) {
|
|
3554
|
-
return
|
|
3554
|
+
return vs(this, e);
|
|
3555
3555
|
},
|
|
3556
3556
|
pipe(e) {
|
|
3557
|
-
return
|
|
3557
|
+
return bs(this, e);
|
|
3558
3558
|
},
|
|
3559
3559
|
readonly() {
|
|
3560
|
-
return
|
|
3560
|
+
return Ss(this);
|
|
3561
3561
|
},
|
|
3562
3562
|
describe(e) {
|
|
3563
3563
|
let t = this.clone();
|
|
@@ -3581,8 +3581,8 @@ var I = /*@__PURE__*/ w("ZodType", (e, t) => (co(), k.init(e, t), e.def = t, e.t
|
|
|
3581
3581
|
return Ce(this, "~standard", {
|
|
3582
3582
|
...un(this),
|
|
3583
3583
|
jsonSchema: {
|
|
3584
|
-
input:
|
|
3585
|
-
output:
|
|
3584
|
+
input: _a(this, "input"),
|
|
3585
|
+
output: _a(this, "output")
|
|
3586
3586
|
}
|
|
3587
3587
|
});
|
|
3588
3588
|
},
|
|
@@ -3590,16 +3590,16 @@ var I = /*@__PURE__*/ w("ZodType", (e, t) => (co(), k.init(e, t), e.def = t, e.t
|
|
|
3590
3590
|
x(this, "~standard", e);
|
|
3591
3591
|
},
|
|
3592
3592
|
parse: function e(t, n) {
|
|
3593
|
-
return
|
|
3593
|
+
return Za(this, t, n, { callee: e });
|
|
3594
3594
|
},
|
|
3595
3595
|
parseAsync: async function e(t, n) {
|
|
3596
|
-
return await
|
|
3596
|
+
return await Qa(this, t, n, { callee: e });
|
|
3597
3597
|
},
|
|
3598
3598
|
safeParse(e, t) {
|
|
3599
|
-
return
|
|
3599
|
+
return $a(this, e, t);
|
|
3600
3600
|
},
|
|
3601
3601
|
async safeParseAsync(e, t) {
|
|
3602
|
-
return
|
|
3602
|
+
return eo(this, e, t);
|
|
3603
3603
|
},
|
|
3604
3604
|
get spa() {
|
|
3605
3605
|
return this?.safeParseAsync;
|
|
@@ -3608,31 +3608,31 @@ var I = /*@__PURE__*/ w("ZodType", (e, t) => (co(), k.init(e, t), e.def = t, e.t
|
|
|
3608
3608
|
x(this, "spa", e);
|
|
3609
3609
|
},
|
|
3610
3610
|
encode: function e(t, n) {
|
|
3611
|
-
return
|
|
3611
|
+
return to(this, t, n, { callee: e });
|
|
3612
3612
|
},
|
|
3613
3613
|
decode: function e(t, n) {
|
|
3614
|
-
return
|
|
3614
|
+
return no(this, t, n, { callee: e });
|
|
3615
3615
|
},
|
|
3616
3616
|
encodeAsync: async function e(t, n) {
|
|
3617
|
-
return await
|
|
3617
|
+
return await ro(this, t, n, { callee: e });
|
|
3618
3618
|
},
|
|
3619
3619
|
decodeAsync: async function e(t, n) {
|
|
3620
|
-
return await
|
|
3620
|
+
return await io(this, t, n, { callee: e });
|
|
3621
3621
|
},
|
|
3622
3622
|
safeEncode(e, t) {
|
|
3623
|
-
return
|
|
3623
|
+
return ao(this, e, t);
|
|
3624
3624
|
},
|
|
3625
3625
|
safeDecode(e, t) {
|
|
3626
|
-
return
|
|
3626
|
+
return oo(this, e, t);
|
|
3627
3627
|
},
|
|
3628
3628
|
async safeEncodeAsync(e, t) {
|
|
3629
|
-
return
|
|
3629
|
+
return so(this, e, t);
|
|
3630
3630
|
},
|
|
3631
3631
|
async safeDecodeAsync(e, t) {
|
|
3632
|
-
return
|
|
3632
|
+
return co(this, e, t);
|
|
3633
3633
|
},
|
|
3634
3634
|
toJSONSchema(e) {
|
|
3635
|
-
return
|
|
3635
|
+
return ga(this, {})(e);
|
|
3636
3636
|
},
|
|
3637
3637
|
get description() {
|
|
3638
3638
|
return ti.get(this)?.description;
|
|
@@ -3640,8 +3640,8 @@ var I = /*@__PURE__*/ w("ZodType", (e, t) => (co(), k.init(e, t), e.def = t, e.t
|
|
|
3640
3640
|
get _def() {
|
|
3641
3641
|
return this._zod.def;
|
|
3642
3642
|
}
|
|
3643
|
-
}),
|
|
3644
|
-
dn.init(e, t),
|
|
3643
|
+
}), fo = /*@__PURE__*/ w("_ZodString", (e, t) => {
|
|
3644
|
+
dn.init(e, t), F.init(e, t), e._zod.processJSONSchema = (t, n, r) => ya(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
|
}, {
|
|
@@ -3676,155 +3676,155 @@ var I = /*@__PURE__*/ w("ZodType", (e, t) => (co(), k.init(e, t), e.def = t, e.t
|
|
|
3676
3676
|
return this.check(/* @__PURE__ */ Gi(e));
|
|
3677
3677
|
},
|
|
3678
3678
|
trim() {
|
|
3679
|
-
return this.check(/* @__PURE__ */
|
|
3679
|
+
return this.check(/* @__PURE__ */ Zi());
|
|
3680
3680
|
},
|
|
3681
3681
|
normalize(...e) {
|
|
3682
|
-
return this.check(/* @__PURE__ */
|
|
3682
|
+
return this.check(/* @__PURE__ */ Xi(...e));
|
|
3683
3683
|
},
|
|
3684
3684
|
toLowerCase() {
|
|
3685
|
-
return this.check(/* @__PURE__ */
|
|
3685
|
+
return this.check(/* @__PURE__ */ Qi());
|
|
3686
3686
|
},
|
|
3687
3687
|
toUpperCase() {
|
|
3688
|
-
return this.check(/* @__PURE__ */
|
|
3688
|
+
return this.check(/* @__PURE__ */ $i());
|
|
3689
3689
|
},
|
|
3690
3690
|
slugify() {
|
|
3691
|
-
return this.check(/* @__PURE__ */
|
|
3691
|
+
return this.check(/* @__PURE__ */ ea());
|
|
3692
3692
|
}
|
|
3693
|
-
}),
|
|
3694
|
-
dn.init(e, t),
|
|
3693
|
+
}), po = /*@__PURE__*/ w("ZodString", (e, t) => {
|
|
3694
|
+
dn.init(e, t), fo.init(e, t);
|
|
3695
3695
|
}, {
|
|
3696
3696
|
email(e) {
|
|
3697
|
-
return this.check(/* @__PURE__ */ ri(
|
|
3697
|
+
return this.check(/* @__PURE__ */ ri(vo, e));
|
|
3698
3698
|
},
|
|
3699
3699
|
url(e) {
|
|
3700
|
-
return this.check(/* @__PURE__ */ li(
|
|
3700
|
+
return this.check(/* @__PURE__ */ li(xo, e));
|
|
3701
3701
|
},
|
|
3702
3702
|
jwt(e) {
|
|
3703
|
-
return this.check(/* @__PURE__ */ wi(
|
|
3703
|
+
return this.check(/* @__PURE__ */ wi(Io, e));
|
|
3704
3704
|
},
|
|
3705
3705
|
emoji(e) {
|
|
3706
|
-
return this.check(/* @__PURE__ */ ui(
|
|
3706
|
+
return this.check(/* @__PURE__ */ ui(So, e));
|
|
3707
3707
|
},
|
|
3708
3708
|
guid(e) {
|
|
3709
|
-
return this.check(/* @__PURE__ */ ii(
|
|
3709
|
+
return this.check(/* @__PURE__ */ ii(yo, e));
|
|
3710
3710
|
},
|
|
3711
3711
|
uuid(e) {
|
|
3712
|
-
return this.check(/* @__PURE__ */ ai(
|
|
3712
|
+
return this.check(/* @__PURE__ */ ai(bo, e));
|
|
3713
3713
|
},
|
|
3714
3714
|
uuidv4(e) {
|
|
3715
|
-
return this.check(/* @__PURE__ */ oi(
|
|
3715
|
+
return this.check(/* @__PURE__ */ oi(bo, e));
|
|
3716
3716
|
},
|
|
3717
3717
|
uuidv6(e) {
|
|
3718
|
-
return this.check(/* @__PURE__ */ si(
|
|
3718
|
+
return this.check(/* @__PURE__ */ si(bo, e));
|
|
3719
3719
|
},
|
|
3720
3720
|
uuidv7(e) {
|
|
3721
|
-
return this.check(/* @__PURE__ */ ci(
|
|
3721
|
+
return this.check(/* @__PURE__ */ ci(bo, e));
|
|
3722
3722
|
},
|
|
3723
3723
|
nanoid(e) {
|
|
3724
|
-
return this.check(/* @__PURE__ */ di(
|
|
3724
|
+
return this.check(/* @__PURE__ */ di(Co, e));
|
|
3725
3725
|
},
|
|
3726
3726
|
cuid(e) {
|
|
3727
|
-
return this.check(/* @__PURE__ */ fi(
|
|
3727
|
+
return this.check(/* @__PURE__ */ fi(wo, e));
|
|
3728
3728
|
},
|
|
3729
3729
|
cuid2(e) {
|
|
3730
|
-
return this.check(/* @__PURE__ */ pi(
|
|
3730
|
+
return this.check(/* @__PURE__ */ pi(To, e));
|
|
3731
3731
|
},
|
|
3732
3732
|
ulid(e) {
|
|
3733
|
-
return this.check(/* @__PURE__ */ mi(
|
|
3733
|
+
return this.check(/* @__PURE__ */ mi(Eo, e));
|
|
3734
3734
|
},
|
|
3735
3735
|
base64(e) {
|
|
3736
|
-
return this.check(/* @__PURE__ */ xi(
|
|
3736
|
+
return this.check(/* @__PURE__ */ xi(No, e));
|
|
3737
3737
|
},
|
|
3738
3738
|
base64url(e) {
|
|
3739
|
-
return this.check(/* @__PURE__ */ Si(
|
|
3739
|
+
return this.check(/* @__PURE__ */ Si(Po, e));
|
|
3740
3740
|
},
|
|
3741
3741
|
xid(e) {
|
|
3742
|
-
return this.check(/* @__PURE__ */ hi(
|
|
3742
|
+
return this.check(/* @__PURE__ */ hi(Do, e));
|
|
3743
3743
|
},
|
|
3744
3744
|
ksuid(e) {
|
|
3745
|
-
return this.check(/* @__PURE__ */ gi(
|
|
3745
|
+
return this.check(/* @__PURE__ */ gi(Oo, e));
|
|
3746
3746
|
},
|
|
3747
3747
|
ipv4(e) {
|
|
3748
|
-
return this.check(/* @__PURE__ */ _i(
|
|
3748
|
+
return this.check(/* @__PURE__ */ _i(ko, e));
|
|
3749
3749
|
},
|
|
3750
3750
|
ipv6(e) {
|
|
3751
|
-
return this.check(/* @__PURE__ */ vi(
|
|
3751
|
+
return this.check(/* @__PURE__ */ vi(Ao, e));
|
|
3752
3752
|
},
|
|
3753
3753
|
cidrv4(e) {
|
|
3754
|
-
return this.check(/* @__PURE__ */ yi(
|
|
3754
|
+
return this.check(/* @__PURE__ */ yi(jo, e));
|
|
3755
3755
|
},
|
|
3756
3756
|
cidrv6(e) {
|
|
3757
|
-
return this.check(/* @__PURE__ */ bi(
|
|
3757
|
+
return this.check(/* @__PURE__ */ bi(Mo, e));
|
|
3758
3758
|
},
|
|
3759
3759
|
e164(e) {
|
|
3760
|
-
return this.check(/* @__PURE__ */ Ci(
|
|
3760
|
+
return this.check(/* @__PURE__ */ Ci(Fo, e));
|
|
3761
3761
|
},
|
|
3762
3762
|
datetime(e) {
|
|
3763
|
-
return this.check(/* @__PURE__ */ Ti(
|
|
3763
|
+
return this.check(/* @__PURE__ */ Ti(mo, e));
|
|
3764
3764
|
},
|
|
3765
3765
|
date(e) {
|
|
3766
|
-
return this.check(/* @__PURE__ */ Ei(
|
|
3766
|
+
return this.check(/* @__PURE__ */ Ei(ho, e));
|
|
3767
3767
|
},
|
|
3768
3768
|
time(e) {
|
|
3769
|
-
return this.check(/* @__PURE__ */ Di(
|
|
3769
|
+
return this.check(/* @__PURE__ */ Di(go, e));
|
|
3770
3770
|
},
|
|
3771
3771
|
duration(e) {
|
|
3772
|
-
return this.check(/* @__PURE__ */ Oi(
|
|
3772
|
+
return this.check(/* @__PURE__ */ Oi(_o, e));
|
|
3773
3773
|
}
|
|
3774
3774
|
});
|
|
3775
|
-
function
|
|
3776
|
-
return /* @__PURE__ */ ni(
|
|
3777
|
-
}
|
|
3778
|
-
var
|
|
3779
|
-
A.init(e, t),
|
|
3780
|
-
}),
|
|
3781
|
-
On.init(e, t),
|
|
3782
|
-
}),
|
|
3783
|
-
kn.init(e, t),
|
|
3784
|
-
}),
|
|
3785
|
-
An.init(e, t),
|
|
3786
|
-
}),
|
|
3787
|
-
jn.init(e, t),
|
|
3788
|
-
}),
|
|
3789
|
-
mn.init(e, t),
|
|
3790
|
-
}),
|
|
3791
|
-
fn.init(e, t),
|
|
3792
|
-
}),
|
|
3793
|
-
pn.init(e, t),
|
|
3794
|
-
}),
|
|
3795
|
-
bn.init(e, t),
|
|
3796
|
-
}),
|
|
3797
|
-
xn.init(e, t),
|
|
3798
|
-
}),
|
|
3799
|
-
Sn.init(e, t),
|
|
3800
|
-
}),
|
|
3801
|
-
Cn.init(e, t),
|
|
3802
|
-
}),
|
|
3803
|
-
wn.init(e, t),
|
|
3804
|
-
}),
|
|
3805
|
-
Tn.init(e, t),
|
|
3806
|
-
}),
|
|
3807
|
-
En.init(e, t),
|
|
3808
|
-
}),
|
|
3809
|
-
Dn.init(e, t),
|
|
3810
|
-
}),
|
|
3811
|
-
Mn.init(e, t),
|
|
3812
|
-
}),
|
|
3813
|
-
Fn.init(e, t),
|
|
3814
|
-
}),
|
|
3815
|
-
In.init(e, t),
|
|
3816
|
-
}),
|
|
3817
|
-
Rn.init(e, t),
|
|
3818
|
-
}),
|
|
3819
|
-
Bn.init(e, t),
|
|
3820
|
-
}),
|
|
3821
|
-
Hn.init(e, t),
|
|
3822
|
-
}),
|
|
3823
|
-
Un.init(e, t),
|
|
3824
|
-
}),
|
|
3825
|
-
Gn.init(e, t),
|
|
3826
|
-
}),
|
|
3827
|
-
Kn.init(e, t),
|
|
3775
|
+
function I(e) {
|
|
3776
|
+
return /* @__PURE__ */ ni(po, e);
|
|
3777
|
+
}
|
|
3778
|
+
var L = /*@__PURE__*/ w("ZodStringFormat", (e, t) => {
|
|
3779
|
+
A.init(e, t), fo.init(e, t);
|
|
3780
|
+
}), mo = /*@__PURE__*/ w("ZodISODateTime", (e, t) => {
|
|
3781
|
+
On.init(e, t), L.init(e, t);
|
|
3782
|
+
}), ho = /*@__PURE__*/ w("ZodISODate", (e, t) => {
|
|
3783
|
+
kn.init(e, t), L.init(e, t);
|
|
3784
|
+
}), go = /*@__PURE__*/ w("ZodISOTime", (e, t) => {
|
|
3785
|
+
An.init(e, t), L.init(e, t);
|
|
3786
|
+
}), _o = /*@__PURE__*/ w("ZodISODuration", (e, t) => {
|
|
3787
|
+
jn.init(e, t), L.init(e, t);
|
|
3788
|
+
}), vo = /*@__PURE__*/ w("ZodEmail", (e, t) => {
|
|
3789
|
+
mn.init(e, t), L.init(e, t);
|
|
3790
|
+
}), yo = /*@__PURE__*/ w("ZodGUID", (e, t) => {
|
|
3791
|
+
fn.init(e, t), L.init(e, t);
|
|
3792
|
+
}), bo = /*@__PURE__*/ w("ZodUUID", (e, t) => {
|
|
3793
|
+
pn.init(e, t), L.init(e, t);
|
|
3794
|
+
}), xo = /*@__PURE__*/ w("ZodURL", (e, t) => {
|
|
3795
|
+
bn.init(e, t), L.init(e, t);
|
|
3796
|
+
}), So = /*@__PURE__*/ w("ZodEmoji", (e, t) => {
|
|
3797
|
+
xn.init(e, t), L.init(e, t);
|
|
3798
|
+
}), Co = /*@__PURE__*/ w("ZodNanoID", (e, t) => {
|
|
3799
|
+
Sn.init(e, t), L.init(e, t);
|
|
3800
|
+
}), wo = /*@__PURE__*/ w("ZodCUID", (e, t) => {
|
|
3801
|
+
Cn.init(e, t), L.init(e, t);
|
|
3802
|
+
}), To = /*@__PURE__*/ w("ZodCUID2", (e, t) => {
|
|
3803
|
+
wn.init(e, t), L.init(e, t);
|
|
3804
|
+
}), Eo = /*@__PURE__*/ w("ZodULID", (e, t) => {
|
|
3805
|
+
Tn.init(e, t), L.init(e, t);
|
|
3806
|
+
}), Do = /*@__PURE__*/ w("ZodXID", (e, t) => {
|
|
3807
|
+
En.init(e, t), L.init(e, t);
|
|
3808
|
+
}), Oo = /*@__PURE__*/ w("ZodKSUID", (e, t) => {
|
|
3809
|
+
Dn.init(e, t), L.init(e, t);
|
|
3810
|
+
}), ko = /*@__PURE__*/ w("ZodIPv4", (e, t) => {
|
|
3811
|
+
Mn.init(e, t), L.init(e, t);
|
|
3812
|
+
}), Ao = /*@__PURE__*/ w("ZodIPv6", (e, t) => {
|
|
3813
|
+
Fn.init(e, t), L.init(e, t);
|
|
3814
|
+
}), jo = /*@__PURE__*/ w("ZodCIDRv4", (e, t) => {
|
|
3815
|
+
In.init(e, t), L.init(e, t);
|
|
3816
|
+
}), Mo = /*@__PURE__*/ w("ZodCIDRv6", (e, t) => {
|
|
3817
|
+
Rn.init(e, t), L.init(e, t);
|
|
3818
|
+
}), No = /*@__PURE__*/ w("ZodBase64", (e, t) => {
|
|
3819
|
+
Bn.init(e, t), L.init(e, t);
|
|
3820
|
+
}), Po = /*@__PURE__*/ w("ZodBase64URL", (e, t) => {
|
|
3821
|
+
Hn.init(e, t), L.init(e, t);
|
|
3822
|
+
}), Fo = /*@__PURE__*/ w("ZodE164", (e, t) => {
|
|
3823
|
+
Un.init(e, t), L.init(e, t);
|
|
3824
|
+
}), Io = /*@__PURE__*/ w("ZodJWT", (e, t) => {
|
|
3825
|
+
Gn.init(e, t), L.init(e, t);
|
|
3826
|
+
}), Lo = /*@__PURE__*/ w("ZodNumber", (e, t) => {
|
|
3827
|
+
Kn.init(e, t), F.init(e, t), e._zod.processJSONSchema = (t, n, r) => ba(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
|
}, {
|
|
@@ -3847,10 +3847,10 @@ var R = /*@__PURE__*/ w("ZodStringFormat", (e, t) => {
|
|
|
3847
3847
|
return this.check(/* @__PURE__ */ Ii(e, t));
|
|
3848
3848
|
},
|
|
3849
3849
|
int(e) {
|
|
3850
|
-
return this.check(
|
|
3850
|
+
return this.check(zo(e));
|
|
3851
3851
|
},
|
|
3852
3852
|
safe(e) {
|
|
3853
|
-
return this.check(
|
|
3853
|
+
return this.check(zo(e));
|
|
3854
3854
|
},
|
|
3855
3855
|
positive(e) {
|
|
3856
3856
|
return this.check(/* @__PURE__ */ Li(0, e));
|
|
@@ -3874,41 +3874,41 @@ var R = /*@__PURE__*/ w("ZodStringFormat", (e, t) => {
|
|
|
3874
3874
|
return this;
|
|
3875
3875
|
}
|
|
3876
3876
|
});
|
|
3877
|
-
function
|
|
3878
|
-
return /* @__PURE__ */ ki(
|
|
3877
|
+
function R(e) {
|
|
3878
|
+
return /* @__PURE__ */ ki(Lo, e);
|
|
3879
3879
|
}
|
|
3880
|
-
var
|
|
3881
|
-
qn.init(e, t),
|
|
3880
|
+
var Ro = /*@__PURE__*/ w("ZodNumberFormat", (e, t) => {
|
|
3881
|
+
qn.init(e, t), Lo.init(e, t);
|
|
3882
3882
|
});
|
|
3883
|
-
function
|
|
3884
|
-
return /* @__PURE__ */ Ai(
|
|
3883
|
+
function zo(e) {
|
|
3884
|
+
return /* @__PURE__ */ Ai(Ro, e);
|
|
3885
3885
|
}
|
|
3886
|
-
var
|
|
3887
|
-
Jn.init(e, t),
|
|
3886
|
+
var Bo = /*@__PURE__*/ w("ZodBoolean", (e, t) => {
|
|
3887
|
+
Jn.init(e, t), F.init(e, t), e._zod.processJSONSchema = (t, n, r) => xa(e, t, n, r);
|
|
3888
3888
|
});
|
|
3889
|
-
function
|
|
3890
|
-
return /* @__PURE__ */ ji(
|
|
3889
|
+
function z(e) {
|
|
3890
|
+
return /* @__PURE__ */ ji(Bo, e);
|
|
3891
3891
|
}
|
|
3892
|
-
var
|
|
3893
|
-
Yn.init(e, t),
|
|
3892
|
+
var Vo = /*@__PURE__*/ w("ZodNull", (e, t) => {
|
|
3893
|
+
Yn.init(e, t), F.init(e, t), e._zod.processJSONSchema = (t, n, r) => Sa(e, t, n, r);
|
|
3894
3894
|
});
|
|
3895
|
-
function
|
|
3896
|
-
return /* @__PURE__ */ Mi(
|
|
3895
|
+
function Ho(e) {
|
|
3896
|
+
return /* @__PURE__ */ Mi(Vo, e);
|
|
3897
3897
|
}
|
|
3898
|
-
var
|
|
3899
|
-
Xn.init(e, t),
|
|
3898
|
+
var Uo = /*@__PURE__*/ w("ZodUnknown", (e, t) => {
|
|
3899
|
+
Xn.init(e, t), F.init(e, t), e._zod.processJSONSchema = (e, t, n) => void 0;
|
|
3900
3900
|
});
|
|
3901
|
-
function
|
|
3902
|
-
return /* @__PURE__ */ Ni(
|
|
3901
|
+
function B() {
|
|
3902
|
+
return /* @__PURE__ */ Ni(Uo);
|
|
3903
3903
|
}
|
|
3904
|
-
var
|
|
3905
|
-
Zn.init(e, t),
|
|
3904
|
+
var Wo = /*@__PURE__*/ w("ZodNever", (e, t) => {
|
|
3905
|
+
Zn.init(e, t), F.init(e, t), e._zod.processJSONSchema = (t, n, r) => Ca(e, t, n, r);
|
|
3906
3906
|
});
|
|
3907
|
-
function
|
|
3908
|
-
return /* @__PURE__ */ Pi(
|
|
3907
|
+
function Go(e) {
|
|
3908
|
+
return /* @__PURE__ */ Pi(Wo, e);
|
|
3909
3909
|
}
|
|
3910
|
-
var
|
|
3911
|
-
|
|
3910
|
+
var Ko = /*@__PURE__*/ w("ZodArray", (e, t) => {
|
|
3911
|
+
uo(), $n.init(e, t), F.init(e, t), e._zod.processJSONSchema = (t, n, r) => Oa(e, t, n, r), e.element = t.element;
|
|
3912
3912
|
}, {
|
|
3913
3913
|
min(e, t) {
|
|
3914
3914
|
return this.check(/* @__PURE__ */ Vi(e, t));
|
|
@@ -3926,14 +3926,14 @@ var Go = /*@__PURE__*/ w("ZodArray", (e, t) => {
|
|
|
3926
3926
|
return this.element;
|
|
3927
3927
|
}
|
|
3928
3928
|
});
|
|
3929
|
-
function
|
|
3930
|
-
return /* @__PURE__ */
|
|
3929
|
+
function V(e, t) {
|
|
3930
|
+
return /* @__PURE__ */ ta(Ko, e, t);
|
|
3931
3931
|
}
|
|
3932
|
-
var
|
|
3933
|
-
|
|
3932
|
+
var qo = /*@__PURE__*/ w("ZodObject", (e, t) => {
|
|
3933
|
+
uo(), or.init(e, t), F.init(e, t), e._zod.processJSONSchema = (t, n, r) => Aa(e, t, n, r), Oe(e, "shape", (e) => e._zod.def.shape, !1);
|
|
3934
3934
|
}, {
|
|
3935
3935
|
keyof() {
|
|
3936
|
-
return
|
|
3936
|
+
return G(Object.keys(this._zod.def.shape));
|
|
3937
3937
|
},
|
|
3938
3938
|
catchall(e) {
|
|
3939
3939
|
return this.clone({
|
|
@@ -3944,19 +3944,19 @@ var Ko = /*@__PURE__*/ w("ZodObject", (e, t) => {
|
|
|
3944
3944
|
passthrough() {
|
|
3945
3945
|
return this.clone({
|
|
3946
3946
|
...this._zod.def,
|
|
3947
|
-
catchall:
|
|
3947
|
+
catchall: B()
|
|
3948
3948
|
});
|
|
3949
3949
|
},
|
|
3950
3950
|
loose() {
|
|
3951
3951
|
return this.clone({
|
|
3952
3952
|
...this._zod.def,
|
|
3953
|
-
catchall:
|
|
3953
|
+
catchall: B()
|
|
3954
3954
|
});
|
|
3955
3955
|
},
|
|
3956
3956
|
strict() {
|
|
3957
3957
|
return this.clone({
|
|
3958
3958
|
...this._zod.def,
|
|
3959
|
-
catchall:
|
|
3959
|
+
catchall: Go()
|
|
3960
3960
|
});
|
|
3961
3961
|
},
|
|
3962
3962
|
strip() {
|
|
@@ -3966,67 +3966,67 @@ var Ko = /*@__PURE__*/ w("ZodObject", (e, t) => {
|
|
|
3966
3966
|
});
|
|
3967
3967
|
},
|
|
3968
3968
|
extend(e) {
|
|
3969
|
-
return
|
|
3969
|
+
return ce(this, e);
|
|
3970
3970
|
},
|
|
3971
3971
|
safeExtend(e) {
|
|
3972
|
-
return
|
|
3972
|
+
return le(this, e);
|
|
3973
3973
|
},
|
|
3974
3974
|
merge(e) {
|
|
3975
|
-
return
|
|
3975
|
+
return ue(this, e);
|
|
3976
3976
|
},
|
|
3977
3977
|
pick(e) {
|
|
3978
|
-
return
|
|
3978
|
+
return oe(this, e);
|
|
3979
3979
|
},
|
|
3980
3980
|
omit(e) {
|
|
3981
|
-
return
|
|
3981
|
+
return se(this, e);
|
|
3982
3982
|
},
|
|
3983
3983
|
partial(...e) {
|
|
3984
|
-
return
|
|
3984
|
+
return de(as, this, e[0]);
|
|
3985
3985
|
},
|
|
3986
3986
|
exactPartial(...e) {
|
|
3987
|
-
return
|
|
3987
|
+
return de(ss, this, e[0], "exactPartial");
|
|
3988
3988
|
},
|
|
3989
3989
|
required(...e) {
|
|
3990
|
-
return
|
|
3990
|
+
return fe(hs, this, e[0]);
|
|
3991
3991
|
}
|
|
3992
3992
|
});
|
|
3993
|
-
function
|
|
3994
|
-
return new
|
|
3993
|
+
function H(e, t) {
|
|
3994
|
+
return new qo({
|
|
3995
3995
|
type: "object",
|
|
3996
3996
|
shape: e ?? {},
|
|
3997
|
-
...
|
|
3997
|
+
...v(t)
|
|
3998
3998
|
});
|
|
3999
3999
|
}
|
|
4000
|
-
function
|
|
4001
|
-
return new
|
|
4000
|
+
function Jo(e, t) {
|
|
4001
|
+
return new qo({
|
|
4002
4002
|
type: "object",
|
|
4003
4003
|
shape: e,
|
|
4004
|
-
catchall:
|
|
4005
|
-
...
|
|
4004
|
+
catchall: Go(),
|
|
4005
|
+
...v(t)
|
|
4006
4006
|
});
|
|
4007
4007
|
}
|
|
4008
|
-
var
|
|
4009
|
-
cr.init(e, t),
|
|
4008
|
+
var Yo = /*@__PURE__*/ w("ZodUnion", (e, t) => {
|
|
4009
|
+
cr.init(e, t), F.init(e, t), e._zod.processJSONSchema = (t, n, r) => ja(e, t, n, r), e.options = t.options;
|
|
4010
4010
|
});
|
|
4011
|
-
function
|
|
4012
|
-
return new
|
|
4011
|
+
function U(e, t) {
|
|
4012
|
+
return new Yo({
|
|
4013
4013
|
type: "union",
|
|
4014
4014
|
options: e,
|
|
4015
|
-
...
|
|
4015
|
+
...v(t)
|
|
4016
4016
|
});
|
|
4017
4017
|
}
|
|
4018
|
-
var
|
|
4019
|
-
lr.init(e, t),
|
|
4018
|
+
var Xo = /*@__PURE__*/ w("ZodIntersection", (e, t) => {
|
|
4019
|
+
lr.init(e, t), F.init(e, t), e._zod.processJSONSchema = (t, n, r) => Ma(e, t, n, r);
|
|
4020
4020
|
});
|
|
4021
|
-
function
|
|
4022
|
-
return new
|
|
4021
|
+
function Zo(e, t) {
|
|
4022
|
+
return new Xo({
|
|
4023
4023
|
type: "intersection",
|
|
4024
4024
|
left: e,
|
|
4025
4025
|
right: t
|
|
4026
4026
|
});
|
|
4027
4027
|
}
|
|
4028
|
-
var
|
|
4029
|
-
|
|
4028
|
+
var Qo = /*@__PURE__*/ w("ZodTuple", (e, t) => {
|
|
4029
|
+
uo(), fr.init(e, t), F.init(e, t), e._zod.processJSONSchema = (t, n, r) => Na(e, t, n, r);
|
|
4030
4030
|
}, {
|
|
4031
4031
|
rest(e) {
|
|
4032
4032
|
return this.clone({
|
|
@@ -4039,85 +4039,85 @@ var Zo = /*@__PURE__*/ w("ZodTuple", (e, t) => {
|
|
|
4039
4039
|
if (e.checks?.length) throw Error(".partial() cannot be used on tuple schemas containing refinements");
|
|
4040
4040
|
return this.clone({
|
|
4041
4041
|
...e,
|
|
4042
|
-
items: e.items.map((e) => new
|
|
4042
|
+
items: e.items.map((e) => new as({
|
|
4043
4043
|
type: "optional",
|
|
4044
4044
|
innerType: e
|
|
4045
4045
|
}))
|
|
4046
4046
|
});
|
|
4047
4047
|
}
|
|
4048
4048
|
});
|
|
4049
|
-
function
|
|
4049
|
+
function $o(e, t, n) {
|
|
4050
4050
|
let r = t instanceof k;
|
|
4051
|
-
return new
|
|
4051
|
+
return new Qo({
|
|
4052
4052
|
type: "tuple",
|
|
4053
4053
|
items: e,
|
|
4054
4054
|
rest: r ? t : null,
|
|
4055
|
-
...
|
|
4055
|
+
...v(r ? n : t)
|
|
4056
4056
|
});
|
|
4057
4057
|
}
|
|
4058
|
-
var
|
|
4059
|
-
|
|
4058
|
+
var es = /*@__PURE__*/ w("ZodRecord", (e, t) => {
|
|
4059
|
+
uo(), gr.init(e, t), F.init(e, t), e._zod.processJSONSchema = (t, n, r) => La(e, t, n, r), e.keyType = t.keyType, e.valueType = t.valueType;
|
|
4060
4060
|
});
|
|
4061
|
-
function
|
|
4062
|
-
return !t || !t._zod ? new
|
|
4061
|
+
function W(e, t, n) {
|
|
4062
|
+
return !t || !t._zod ? new es({
|
|
4063
4063
|
type: "record",
|
|
4064
|
-
keyType:
|
|
4064
|
+
keyType: I(),
|
|
4065
4065
|
valueType: e,
|
|
4066
|
-
...
|
|
4067
|
-
}) : new
|
|
4066
|
+
...v(t)
|
|
4067
|
+
}) : new es({
|
|
4068
4068
|
type: "record",
|
|
4069
4069
|
keyType: e,
|
|
4070
4070
|
valueType: t,
|
|
4071
|
-
...
|
|
4071
|
+
...v(n)
|
|
4072
4072
|
});
|
|
4073
4073
|
}
|
|
4074
|
-
var
|
|
4075
|
-
_r.init(e, t),
|
|
4074
|
+
var ts = /*@__PURE__*/ w("ZodEnum", (e, t) => {
|
|
4075
|
+
_r.init(e, t), F.init(e, t), e._zod.processJSONSchema = (t, n, r) => wa(e, t, n, r), e.enum = t.entries, e.options = Object.values(t.entries);
|
|
4076
4076
|
let n = new Set(Object.keys(t.entries));
|
|
4077
4077
|
e.extract = (e, r) => {
|
|
4078
4078
|
let i = {};
|
|
4079
4079
|
for (let r of e) if (n.has(r)) i[r] = t.entries[r];
|
|
4080
4080
|
else throw Error(`Key ${r} not found in enum`);
|
|
4081
|
-
return new
|
|
4081
|
+
return new ts({
|
|
4082
4082
|
...t,
|
|
4083
4083
|
checks: [],
|
|
4084
|
-
...
|
|
4084
|
+
...v(r),
|
|
4085
4085
|
entries: i
|
|
4086
4086
|
});
|
|
4087
4087
|
}, e.exclude = (e, r) => {
|
|
4088
4088
|
let i = { ...t.entries };
|
|
4089
4089
|
for (let t of e) if (n.has(t)) delete i[t];
|
|
4090
4090
|
else throw Error(`Key ${t} not found in enum`);
|
|
4091
|
-
return new
|
|
4091
|
+
return new ts({
|
|
4092
4092
|
...t,
|
|
4093
4093
|
checks: [],
|
|
4094
|
-
...
|
|
4094
|
+
...v(r),
|
|
4095
4095
|
entries: i
|
|
4096
4096
|
});
|
|
4097
4097
|
};
|
|
4098
4098
|
});
|
|
4099
|
-
function
|
|
4100
|
-
return new
|
|
4099
|
+
function G(e, t) {
|
|
4100
|
+
return new ts({
|
|
4101
4101
|
type: "enum",
|
|
4102
4102
|
entries: Array.isArray(e) ? Object.fromEntries(e.map((e) => [e, e])) : e,
|
|
4103
|
-
...
|
|
4103
|
+
...v(t)
|
|
4104
4104
|
});
|
|
4105
4105
|
}
|
|
4106
|
-
var
|
|
4107
|
-
vr.init(e, t),
|
|
4106
|
+
var ns = /*@__PURE__*/ w("ZodLiteral", (e, t) => {
|
|
4107
|
+
vr.init(e, t), F.init(e, t), e._zod.processJSONSchema = (t, n, r) => Ta(e, t, n, r), e.values = new Set(t.values), Object.defineProperty(e, "value", { get() {
|
|
4108
4108
|
if (t.values.length > 1) throw Error("This schema contains multiple valid literal values. Use `.values` instead.");
|
|
4109
4109
|
return t.values[0];
|
|
4110
4110
|
} });
|
|
4111
4111
|
});
|
|
4112
|
-
function
|
|
4113
|
-
return new
|
|
4112
|
+
function K(e, t) {
|
|
4113
|
+
return new ns({
|
|
4114
4114
|
type: "literal",
|
|
4115
4115
|
values: Array.isArray(e) ? e : [e],
|
|
4116
|
-
...
|
|
4116
|
+
...v(t)
|
|
4117
4117
|
});
|
|
4118
4118
|
}
|
|
4119
|
-
var
|
|
4120
|
-
|
|
4119
|
+
var rs = /*@__PURE__*/ w("ZodTransform", (e, t) => {
|
|
4120
|
+
uo(), yr.init(e, t), F.init(e, t), e._zod.processJSONSchema = (t, n, r) => Da(e, t, n, r), e._zod.parse = (n, r) => {
|
|
4121
4121
|
if (r.direction === "backward") throw new Fe(e.constructor.name);
|
|
4122
4122
|
n.addIssue = (r) => {
|
|
4123
4123
|
if (typeof r == "string") n.issues.push(xe(r, n.value, t));
|
|
@@ -4130,44 +4130,44 @@ var ns = /*@__PURE__*/ w("ZodTransform", (e, t) => {
|
|
|
4130
4130
|
return i instanceof Promise ? i.then((e) => (n.value = e, n)) : (n.value = i, n);
|
|
4131
4131
|
};
|
|
4132
4132
|
});
|
|
4133
|
-
function
|
|
4134
|
-
return new
|
|
4133
|
+
function is(e) {
|
|
4134
|
+
return new rs({
|
|
4135
4135
|
type: "transform",
|
|
4136
4136
|
transform: e
|
|
4137
4137
|
});
|
|
4138
4138
|
}
|
|
4139
|
-
var
|
|
4140
|
-
xr.init(e, t),
|
|
4139
|
+
var as = /*@__PURE__*/ w("ZodOptional", (e, t) => {
|
|
4140
|
+
xr.init(e, t), F.init(e, t), e._zod.processJSONSchema = (t, n, r) => qa(e, t, n, r), e.unwrap = () => e._zod.def.innerType;
|
|
4141
4141
|
});
|
|
4142
|
-
function
|
|
4143
|
-
return new
|
|
4142
|
+
function os(e) {
|
|
4143
|
+
return new as({
|
|
4144
4144
|
type: "optional",
|
|
4145
4145
|
innerType: e
|
|
4146
4146
|
});
|
|
4147
4147
|
}
|
|
4148
|
-
var
|
|
4149
|
-
Sr.init(e, t),
|
|
4148
|
+
var ss = /*@__PURE__*/ w("ZodExactOptional", (e, t) => {
|
|
4149
|
+
Sr.init(e, t), F.init(e, t), e._zod.processJSONSchema = (t, n, r) => qa(e, t, n, r), e.unwrap = () => e._zod.def.innerType;
|
|
4150
4150
|
});
|
|
4151
|
-
function
|
|
4152
|
-
return new
|
|
4151
|
+
function cs(e) {
|
|
4152
|
+
return new ss({
|
|
4153
4153
|
type: "optional",
|
|
4154
4154
|
innerType: e
|
|
4155
4155
|
});
|
|
4156
4156
|
}
|
|
4157
|
-
var
|
|
4158
|
-
Cr.init(e, t),
|
|
4157
|
+
var ls = /*@__PURE__*/ w("ZodNullable", (e, t) => {
|
|
4158
|
+
Cr.init(e, t), F.init(e, t), e._zod.processJSONSchema = (t, n, r) => Ra(e, t, n, r), e.unwrap = () => e._zod.def.innerType;
|
|
4159
4159
|
});
|
|
4160
|
-
function
|
|
4161
|
-
return new
|
|
4160
|
+
function us(e) {
|
|
4161
|
+
return new ls({
|
|
4162
4162
|
type: "nullable",
|
|
4163
4163
|
innerType: e
|
|
4164
4164
|
});
|
|
4165
4165
|
}
|
|
4166
|
-
var
|
|
4167
|
-
wr.init(e, t),
|
|
4166
|
+
var ds = /*@__PURE__*/ w("ZodDefault", (e, t) => {
|
|
4167
|
+
wr.init(e, t), F.init(e, t), e._zod.processJSONSchema = (t, n, r) => Ha(e, t, n, r), e.unwrap = () => e._zod.def.innerType, e.removeDefault = e.unwrap;
|
|
4168
4168
|
});
|
|
4169
|
-
function
|
|
4170
|
-
return new
|
|
4169
|
+
function fs(e, t) {
|
|
4170
|
+
return new ds({
|
|
4171
4171
|
type: "default",
|
|
4172
4172
|
innerType: e,
|
|
4173
4173
|
get defaultValue() {
|
|
@@ -4175,11 +4175,11 @@ function ds(e, t) {
|
|
|
4175
4175
|
}
|
|
4176
4176
|
});
|
|
4177
4177
|
}
|
|
4178
|
-
var
|
|
4179
|
-
Er.init(e, t),
|
|
4178
|
+
var ps = /*@__PURE__*/ w("ZodPrefault", (e, t) => {
|
|
4179
|
+
Er.init(e, t), F.init(e, t), e._zod.processJSONSchema = (t, n, r) => Ua(e, t, n, r), e.unwrap = () => e._zod.def.innerType;
|
|
4180
4180
|
});
|
|
4181
|
-
function
|
|
4182
|
-
return new
|
|
4181
|
+
function ms(e, t) {
|
|
4182
|
+
return new ps({
|
|
4183
4183
|
type: "prefault",
|
|
4184
4184
|
innerType: e,
|
|
4185
4185
|
get defaultValue() {
|
|
@@ -4187,177 +4187,191 @@ function ps(e, t) {
|
|
|
4187
4187
|
}
|
|
4188
4188
|
});
|
|
4189
4189
|
}
|
|
4190
|
-
var
|
|
4191
|
-
Dr.init(e, t),
|
|
4190
|
+
var hs = /*@__PURE__*/ w("ZodNonOptional", (e, t) => {
|
|
4191
|
+
Dr.init(e, t), F.init(e, t), e._zod.processJSONSchema = (t, n, r) => za(e, t, n, r), e.unwrap = () => e._zod.def.innerType;
|
|
4192
4192
|
});
|
|
4193
|
-
function
|
|
4194
|
-
return new
|
|
4193
|
+
function gs(e, t) {
|
|
4194
|
+
return new hs({
|
|
4195
4195
|
type: "nonoptional",
|
|
4196
4196
|
innerType: e,
|
|
4197
|
-
...
|
|
4197
|
+
...v(t)
|
|
4198
4198
|
});
|
|
4199
4199
|
}
|
|
4200
|
-
var
|
|
4201
|
-
Ar.init(e, t),
|
|
4200
|
+
var _s = /*@__PURE__*/ w("ZodCatch", (e, t) => {
|
|
4201
|
+
Ar.init(e, t), F.init(e, t), e._zod.processJSONSchema = (t, n, r) => Wa(e, t, n, r), e.unwrap = () => e._zod.def.innerType, e.removeCatch = e.unwrap;
|
|
4202
4202
|
});
|
|
4203
|
-
function
|
|
4204
|
-
return new
|
|
4203
|
+
function vs(e, t) {
|
|
4204
|
+
return new _s({
|
|
4205
4205
|
type: "catch",
|
|
4206
4206
|
innerType: e,
|
|
4207
4207
|
catchValue: typeof t == "function" ? t : Ae(t)
|
|
4208
4208
|
});
|
|
4209
4209
|
}
|
|
4210
|
-
var
|
|
4211
|
-
jr.init(e, t),
|
|
4210
|
+
var ys = /*@__PURE__*/ w("ZodPipe", (e, t) => {
|
|
4211
|
+
jr.init(e, t), F.init(e, t), e._zod.processJSONSchema = (t, n, r) => Ga(e, t, n, r), e.in = t.in, e.out = t.out;
|
|
4212
4212
|
});
|
|
4213
|
-
function
|
|
4214
|
-
return new
|
|
4213
|
+
function bs(e, t) {
|
|
4214
|
+
return new ys({
|
|
4215
4215
|
type: "pipe",
|
|
4216
4216
|
in: e,
|
|
4217
4217
|
out: t
|
|
4218
4218
|
});
|
|
4219
4219
|
}
|
|
4220
|
-
var
|
|
4221
|
-
Nr.init(e, t),
|
|
4220
|
+
var xs = /*@__PURE__*/ w("ZodReadonly", (e, t) => {
|
|
4221
|
+
Nr.init(e, t), F.init(e, t), e._zod.processJSONSchema = (t, n, r) => Ka(e, t, n, r), e.unwrap = () => e._zod.def.innerType;
|
|
4222
4222
|
});
|
|
4223
|
-
function
|
|
4224
|
-
return new
|
|
4223
|
+
function Ss(e) {
|
|
4224
|
+
return new xs({
|
|
4225
4225
|
type: "readonly",
|
|
4226
4226
|
innerType: e
|
|
4227
4227
|
});
|
|
4228
4228
|
}
|
|
4229
|
-
var
|
|
4230
|
-
Fr.init(e, t),
|
|
4229
|
+
var Cs = /*@__PURE__*/ w("ZodLazy", (e, t) => {
|
|
4230
|
+
Fr.init(e, t), F.init(e, t), e._zod.processJSONSchema = (t, n, r) => Ja(e, t, n, r), e.unwrap = () => e._zod.def.getter();
|
|
4231
4231
|
});
|
|
4232
|
-
function
|
|
4233
|
-
return new
|
|
4232
|
+
function ws(e) {
|
|
4233
|
+
return new Cs({
|
|
4234
4234
|
type: "lazy",
|
|
4235
4235
|
getter: e
|
|
4236
4236
|
});
|
|
4237
4237
|
}
|
|
4238
|
-
var
|
|
4239
|
-
Ir.init(e, t),
|
|
4238
|
+
var Ts = /*@__PURE__*/ w("ZodCustom", (e, t) => {
|
|
4239
|
+
Ir.init(e, t), F.init(e, t), e._zod.processJSONSchema = (t, n, r) => Ea(e, t, n, r);
|
|
4240
4240
|
});
|
|
4241
|
-
function
|
|
4242
|
-
return /* @__PURE__ */
|
|
4241
|
+
function Es(e, t = {}) {
|
|
4242
|
+
return /* @__PURE__ */ na(Ts, e, t);
|
|
4243
4243
|
}
|
|
4244
|
-
function
|
|
4245
|
-
return /* @__PURE__ */
|
|
4244
|
+
function Ds(e, t) {
|
|
4245
|
+
return /* @__PURE__ */ ra(e, t);
|
|
4246
4246
|
}
|
|
4247
|
-
function
|
|
4248
|
-
let t =
|
|
4249
|
-
|
|
4247
|
+
function Os(e) {
|
|
4248
|
+
let t = ws(() => U([
|
|
4249
|
+
I(e),
|
|
4250
|
+
R(),
|
|
4250
4251
|
z(),
|
|
4251
|
-
|
|
4252
|
-
|
|
4253
|
-
|
|
4254
|
-
G(L(), t)
|
|
4252
|
+
Ho(),
|
|
4253
|
+
V(t),
|
|
4254
|
+
W(I(), t)
|
|
4255
4255
|
]));
|
|
4256
4256
|
return t;
|
|
4257
4257
|
}
|
|
4258
4258
|
//#endregion
|
|
4259
4259
|
//#region src/flow/common/json.ts
|
|
4260
|
-
var
|
|
4261
|
-
function
|
|
4260
|
+
var ks = 64;
|
|
4261
|
+
function As(e, t = 0) {
|
|
4262
4262
|
if (t > 64) throw TypeError("Value exceeds the maximum JSON depth.");
|
|
4263
|
-
if (typeof e == "object" && e) for (let n of Object.values(e))
|
|
4263
|
+
if (typeof e == "object" && e) for (let n of Object.values(e)) As(n, t + 1);
|
|
4264
4264
|
}
|
|
4265
4265
|
//#endregion
|
|
4266
|
-
//#region src/flow/common/
|
|
4267
|
-
var
|
|
4268
|
-
|
|
4269
|
-
|
|
4270
|
-
|
|
4271
|
-
|
|
4272
|
-
|
|
4273
|
-
|
|
4274
|
-
|
|
4275
|
-
|
|
4276
|
-
|
|
4277
|
-
|
|
4278
|
-
|
|
4279
|
-
|
|
4280
|
-
|
|
4281
|
-
|
|
4282
|
-
|
|
4283
|
-
|
|
4284
|
-
|
|
4285
|
-
|
|
4286
|
-
|
|
4287
|
-
|
|
4266
|
+
//#region src/flow/common/triggerScheduleSchema.ts
|
|
4267
|
+
var js = V(U([H({
|
|
4268
|
+
type: K("cron"),
|
|
4269
|
+
expression: I(),
|
|
4270
|
+
timezone: I()
|
|
4271
|
+
}), H({
|
|
4272
|
+
type: K("every"),
|
|
4273
|
+
unit: G([
|
|
4274
|
+
"day",
|
|
4275
|
+
"hour",
|
|
4276
|
+
"minute",
|
|
4277
|
+
"month",
|
|
4278
|
+
"week"
|
|
4279
|
+
]),
|
|
4280
|
+
value: R()
|
|
4281
|
+
})])), q = I(), J = Os(), Ms = V(q), Ns = H({
|
|
4282
|
+
description: q.optional(),
|
|
4283
|
+
jsonSchema: J,
|
|
4284
|
+
nullable: z(),
|
|
4285
|
+
handle: q
|
|
4286
|
+
}), Y = Ns.extend({ value: J.optional() }), Ps = H({
|
|
4287
|
+
collapsed: z().optional(),
|
|
4288
|
+
group: q
|
|
4289
|
+
}), Fs = H({
|
|
4290
|
+
kind: K("node"),
|
|
4291
|
+
nodeId: q,
|
|
4292
|
+
output: q
|
|
4293
|
+
}), Is = H({
|
|
4294
|
+
kind: K("flow"),
|
|
4295
|
+
input: q
|
|
4296
|
+
}), Ls = U([
|
|
4297
|
+
Fs,
|
|
4298
|
+
Is,
|
|
4299
|
+
H({
|
|
4300
|
+
kind: K("binding"),
|
|
4301
|
+
bindingId: q
|
|
4288
4302
|
})
|
|
4289
|
-
]),
|
|
4290
|
-
kind:
|
|
4291
|
-
value:
|
|
4292
|
-
}),
|
|
4293
|
-
kind:
|
|
4294
|
-
sources:
|
|
4295
|
-
})]),
|
|
4296
|
-
inputs:
|
|
4297
|
-
outputs:
|
|
4298
|
-
},
|
|
4299
|
-
kind:
|
|
4300
|
-
action:
|
|
4301
|
-
connectionId:
|
|
4302
|
-
connections: H(
|
|
4303
|
-
connectionId:
|
|
4304
|
-
alias:
|
|
4303
|
+
]), Rs = U([H({
|
|
4304
|
+
kind: K("value"),
|
|
4305
|
+
value: J
|
|
4306
|
+
}), H({
|
|
4307
|
+
kind: K("sources"),
|
|
4308
|
+
sources: V(Ls)
|
|
4309
|
+
})]), zs = W(q, Rs), Bs = {
|
|
4310
|
+
inputs: V(U([Y, Ps])),
|
|
4311
|
+
outputs: V(U([Ns, Ps]))
|
|
4312
|
+
}, Vs = H({
|
|
4313
|
+
kind: K("connector"),
|
|
4314
|
+
action: q,
|
|
4315
|
+
connectionId: q.optional(),
|
|
4316
|
+
connections: V(H({
|
|
4317
|
+
connectionId: q,
|
|
4318
|
+
alias: q.optional()
|
|
4305
4319
|
}))
|
|
4306
|
-
}),
|
|
4307
|
-
...
|
|
4308
|
-
name:
|
|
4309
|
-
moduleId:
|
|
4310
|
-
capabilities:
|
|
4311
|
-
}),
|
|
4312
|
-
kind:
|
|
4313
|
-
value:
|
|
4314
|
-
}),
|
|
4315
|
-
kind:
|
|
4316
|
-
input:
|
|
4317
|
-
})]),
|
|
4318
|
-
...
|
|
4319
|
-
name:
|
|
4320
|
-
executor:
|
|
4321
|
-
|
|
4322
|
-
kind:
|
|
4323
|
-
action:
|
|
4324
|
-
connectionId:
|
|
4320
|
+
}), Hs = H({
|
|
4321
|
+
...Bs,
|
|
4322
|
+
name: q,
|
|
4323
|
+
moduleId: q,
|
|
4324
|
+
capabilities: V(Vs).optional()
|
|
4325
|
+
}), Us = U([H({
|
|
4326
|
+
kind: K("value"),
|
|
4327
|
+
value: J
|
|
4328
|
+
}), H({
|
|
4329
|
+
kind: K("input"),
|
|
4330
|
+
input: q
|
|
4331
|
+
})]), Ws = U([Us, H({ kind: K("model") })]), Gs = H({
|
|
4332
|
+
...Bs,
|
|
4333
|
+
name: q,
|
|
4334
|
+
executor: U([
|
|
4335
|
+
H({
|
|
4336
|
+
kind: K("connector"),
|
|
4337
|
+
action: q,
|
|
4338
|
+
connectionId: q.optional()
|
|
4325
4339
|
}),
|
|
4326
|
-
|
|
4327
|
-
kind:
|
|
4328
|
-
mode:
|
|
4340
|
+
H({
|
|
4341
|
+
kind: K("llm"),
|
|
4342
|
+
mode: G(["chat", "json"])
|
|
4329
4343
|
}),
|
|
4330
|
-
|
|
4331
|
-
kind:
|
|
4332
|
-
code:
|
|
4333
|
-
model:
|
|
4334
|
-
prompt:
|
|
4335
|
-
system:
|
|
4336
|
-
maxRounds:
|
|
4337
|
-
tools: H(
|
|
4338
|
-
id:
|
|
4339
|
-
name:
|
|
4340
|
-
description:
|
|
4341
|
-
action:
|
|
4342
|
-
connectionId:
|
|
4343
|
-
approval:
|
|
4344
|
-
inputs:
|
|
4344
|
+
H({
|
|
4345
|
+
kind: K("agent"),
|
|
4346
|
+
code: z().optional(),
|
|
4347
|
+
model: q,
|
|
4348
|
+
prompt: Us,
|
|
4349
|
+
system: q,
|
|
4350
|
+
maxRounds: R(),
|
|
4351
|
+
tools: V(H({
|
|
4352
|
+
id: q,
|
|
4353
|
+
name: q,
|
|
4354
|
+
description: q,
|
|
4355
|
+
action: q,
|
|
4356
|
+
connectionId: q.optional(),
|
|
4357
|
+
approval: z(),
|
|
4358
|
+
inputs: V(Y.extend({ source: Ws }))
|
|
4345
4359
|
})),
|
|
4346
|
-
notification:
|
|
4347
|
-
taskId:
|
|
4348
|
-
messageHandle:
|
|
4349
|
-
inputs:
|
|
4360
|
+
notification: H({
|
|
4361
|
+
taskId: q,
|
|
4362
|
+
messageHandle: q,
|
|
4363
|
+
inputs: W(q, Us)
|
|
4350
4364
|
}).optional()
|
|
4351
4365
|
})
|
|
4352
4366
|
])
|
|
4353
|
-
}),
|
|
4354
|
-
input:
|
|
4355
|
-
cases: H(
|
|
4356
|
-
output:
|
|
4357
|
-
relation:
|
|
4358
|
-
expressions: H(
|
|
4359
|
-
input:
|
|
4360
|
-
operator:
|
|
4367
|
+
}), Ks = {
|
|
4368
|
+
input: Y,
|
|
4369
|
+
cases: V(H({
|
|
4370
|
+
output: q,
|
|
4371
|
+
relation: G(["all", "any"]),
|
|
4372
|
+
expressions: V(H({
|
|
4373
|
+
input: q,
|
|
4374
|
+
operator: G([
|
|
4361
4375
|
"!=",
|
|
4362
4376
|
"<",
|
|
4363
4377
|
"<=",
|
|
@@ -4379,58 +4393,44 @@ var J = L(), Y = Ds(), As = H(J), js = U({
|
|
|
4379
4393
|
"notHasValue",
|
|
4380
4394
|
"startsWith"
|
|
4381
4395
|
]),
|
|
4382
|
-
value:
|
|
4396
|
+
value: J.optional()
|
|
4383
4397
|
}))
|
|
4384
4398
|
})),
|
|
4385
|
-
defaultOutput:
|
|
4386
|
-
},
|
|
4387
|
-
actions:
|
|
4388
|
-
prompt:
|
|
4389
|
-
},
|
|
4390
|
-
|
|
4391
|
-
options:
|
|
4392
|
-
allowedMethods:
|
|
4393
|
-
allowedOrigins:
|
|
4394
|
-
noResponseBody:
|
|
4395
|
-
responseData:
|
|
4396
|
-
responseHeaders:
|
|
4397
|
-
responseStatusCode:
|
|
4399
|
+
defaultOutput: q.optional()
|
|
4400
|
+
}, qs = {
|
|
4401
|
+
actions: U([$o([K("continue")]), $o([K("approve"), K("reject")])]),
|
|
4402
|
+
prompt: q
|
|
4403
|
+
}, Js = {
|
|
4404
|
+
bodyFields: V(Y),
|
|
4405
|
+
options: H({
|
|
4406
|
+
allowedMethods: Ms.optional(),
|
|
4407
|
+
allowedOrigins: Ms.optional(),
|
|
4408
|
+
noResponseBody: z().optional(),
|
|
4409
|
+
responseData: q.optional(),
|
|
4410
|
+
responseHeaders: W(q, q).optional(),
|
|
4411
|
+
responseStatusCode: R().optional()
|
|
4398
4412
|
}).optional()
|
|
4399
|
-
},
|
|
4400
|
-
|
|
4401
|
-
|
|
4402
|
-
|
|
4403
|
-
|
|
4404
|
-
|
|
4405
|
-
|
|
4406
|
-
|
|
4407
|
-
|
|
4408
|
-
|
|
4409
|
-
|
|
4410
|
-
|
|
4411
|
-
|
|
4412
|
-
|
|
4413
|
-
})])), Js = {
|
|
4414
|
-
configSchema: Y,
|
|
4415
|
-
definitionVersion: z(),
|
|
4416
|
-
description: J,
|
|
4417
|
-
displayName: J,
|
|
4418
|
-
key: J,
|
|
4419
|
-
name: J,
|
|
4420
|
-
payloadSchema: Y,
|
|
4421
|
-
provider: J
|
|
4422
|
-
}, Ys = U({
|
|
4423
|
-
body: U({
|
|
4424
|
-
allowArray: B(),
|
|
4425
|
-
allowEmpty: B(),
|
|
4426
|
-
formats: H(K([
|
|
4413
|
+
}, Ys = {
|
|
4414
|
+
configSchema: J,
|
|
4415
|
+
definitionVersion: K(2),
|
|
4416
|
+
description: q,
|
|
4417
|
+
displayName: q,
|
|
4418
|
+
key: q,
|
|
4419
|
+
name: q,
|
|
4420
|
+
outputs: V(Ns).refine((e) => new Set(e.map((e) => e.handle)).size === e.length, "Duplicate Trigger output handle."),
|
|
4421
|
+
provider: q
|
|
4422
|
+
}, Xs = H({
|
|
4423
|
+
body: H({
|
|
4424
|
+
allowArray: z(),
|
|
4425
|
+
allowEmpty: z(),
|
|
4426
|
+
formats: V(G([
|
|
4427
4427
|
"form",
|
|
4428
4428
|
"json",
|
|
4429
4429
|
"multipart",
|
|
4430
4430
|
"text"
|
|
4431
4431
|
]))
|
|
4432
4432
|
}),
|
|
4433
|
-
methods:
|
|
4433
|
+
methods: V(G([
|
|
4434
4434
|
"DELETE",
|
|
4435
4435
|
"GET",
|
|
4436
4436
|
"HEAD",
|
|
@@ -4438,304 +4438,382 @@ var J = L(), Y = Ds(), As = H(J), js = U({
|
|
|
4438
4438
|
"POST",
|
|
4439
4439
|
"PUT"
|
|
4440
4440
|
])),
|
|
4441
|
-
successStatus:
|
|
4442
|
-
}),
|
|
4443
|
-
name:
|
|
4444
|
-
description:
|
|
4445
|
-
icon:
|
|
4446
|
-
},
|
|
4447
|
-
|
|
4448
|
-
|
|
4449
|
-
|
|
4450
|
-
|
|
4451
|
-
|
|
4452
|
-
|
|
4453
|
-
|
|
4454
|
-
|
|
4455
|
-
|
|
4456
|
-
|
|
4441
|
+
successStatus: R()
|
|
4442
|
+
}), Zs = {
|
|
4443
|
+
name: q,
|
|
4444
|
+
description: q.optional(),
|
|
4445
|
+
icon: q.optional()
|
|
4446
|
+
}, X = {
|
|
4447
|
+
maxExecutions: R().int().positive().max(2 ** 53 - 1).optional(),
|
|
4448
|
+
inputs: zs,
|
|
4449
|
+
name: q.optional(),
|
|
4450
|
+
description: q.optional(),
|
|
4451
|
+
icon: q.optional(),
|
|
4452
|
+
timeoutMs: R().optional()
|
|
4453
|
+
}, Qs = U([
|
|
4454
|
+
H({
|
|
4455
|
+
...X,
|
|
4456
|
+
kind: K("condition"),
|
|
4457
|
+
...Ks
|
|
4457
4458
|
}),
|
|
4458
|
-
|
|
4459
|
-
...
|
|
4460
|
-
inputs:
|
|
4461
|
-
kind:
|
|
4462
|
-
values:
|
|
4459
|
+
H({
|
|
4460
|
+
...X,
|
|
4461
|
+
inputs: B().transform(() => ({})).default({}),
|
|
4462
|
+
kind: K("value"),
|
|
4463
|
+
values: V(Y)
|
|
4463
4464
|
}),
|
|
4464
|
-
|
|
4465
|
-
...
|
|
4466
|
-
kind:
|
|
4467
|
-
subflowId:
|
|
4465
|
+
H({
|
|
4466
|
+
...X,
|
|
4467
|
+
kind: K("subflow"),
|
|
4468
|
+
subflowId: q
|
|
4468
4469
|
}),
|
|
4469
|
-
|
|
4470
|
-
...
|
|
4471
|
-
kind:
|
|
4472
|
-
task:
|
|
4473
|
-
additionalInputs:
|
|
4470
|
+
H({
|
|
4471
|
+
...X,
|
|
4472
|
+
kind: K("task"),
|
|
4473
|
+
task: Hs,
|
|
4474
|
+
additionalInputs: V(Y).optional()
|
|
4474
4475
|
}),
|
|
4475
|
-
|
|
4476
|
-
...
|
|
4477
|
-
kind:
|
|
4478
|
-
taskId:
|
|
4479
|
-
additionalInputs:
|
|
4476
|
+
H({
|
|
4477
|
+
...X,
|
|
4478
|
+
kind: K("task"),
|
|
4479
|
+
taskId: q,
|
|
4480
|
+
additionalInputs: V(Y).optional()
|
|
4480
4481
|
}),
|
|
4481
|
-
|
|
4482
|
-
...
|
|
4483
|
-
kind:
|
|
4484
|
-
input:
|
|
4485
|
-
...
|
|
4482
|
+
Jo({
|
|
4483
|
+
...X,
|
|
4484
|
+
kind: K("wait"),
|
|
4485
|
+
input: Y,
|
|
4486
|
+
...qs
|
|
4486
4487
|
}).omit({ timeoutMs: !0 }),
|
|
4487
|
-
|
|
4488
|
-
...
|
|
4489
|
-
kind:
|
|
4488
|
+
H({
|
|
4489
|
+
...Zs,
|
|
4490
|
+
kind: K("manual")
|
|
4490
4491
|
}),
|
|
4491
|
-
|
|
4492
|
-
...
|
|
4493
|
-
kind:
|
|
4494
|
-
...
|
|
4492
|
+
H({
|
|
4493
|
+
...Zs,
|
|
4494
|
+
kind: K("webhook"),
|
|
4495
|
+
...Js
|
|
4495
4496
|
}),
|
|
4496
|
-
|
|
4497
|
-
...
|
|
4498
|
-
kind:
|
|
4499
|
-
cronTimes:
|
|
4497
|
+
H({
|
|
4498
|
+
...Zs,
|
|
4499
|
+
kind: K("cron"),
|
|
4500
|
+
cronTimes: js
|
|
4500
4501
|
}),
|
|
4501
|
-
|
|
4502
|
-
...
|
|
4503
|
-
kind:
|
|
4504
|
-
bindingId:
|
|
4505
|
-
config:
|
|
4506
|
-
definition:
|
|
4507
|
-
...
|
|
4508
|
-
type:
|
|
4502
|
+
H({
|
|
4503
|
+
...Zs,
|
|
4504
|
+
kind: K("poll"),
|
|
4505
|
+
bindingId: q,
|
|
4506
|
+
config: W(q, J),
|
|
4507
|
+
definition: H({
|
|
4508
|
+
...Ys,
|
|
4509
|
+
type: K("poll")
|
|
4509
4510
|
}),
|
|
4510
|
-
pollTimes:
|
|
4511
|
+
pollTimes: js
|
|
4511
4512
|
}),
|
|
4512
|
-
|
|
4513
|
-
...
|
|
4514
|
-
kind:
|
|
4515
|
-
bindingId:
|
|
4516
|
-
config:
|
|
4517
|
-
definition:
|
|
4518
|
-
...
|
|
4519
|
-
type:
|
|
4520
|
-
endpoint:
|
|
4513
|
+
H({
|
|
4514
|
+
...Zs,
|
|
4515
|
+
kind: K("integration"),
|
|
4516
|
+
bindingId: q,
|
|
4517
|
+
config: W(q, J),
|
|
4518
|
+
definition: H({
|
|
4519
|
+
...Ys,
|
|
4520
|
+
type: K("integration"),
|
|
4521
|
+
endpoint: Xs
|
|
4521
4522
|
})
|
|
4522
4523
|
})
|
|
4523
|
-
]),
|
|
4524
|
-
kind:
|
|
4525
|
-
id:
|
|
4526
|
-
})]),
|
|
4527
|
-
source:
|
|
4528
|
-
target:
|
|
4529
|
-
sourceHandle:
|
|
4530
|
-
}),
|
|
4531
|
-
nodeId:
|
|
4532
|
-
target:
|
|
4533
|
-
},
|
|
4534
|
-
name:
|
|
4535
|
-
inputs:
|
|
4536
|
-
outputs:
|
|
4537
|
-
}),
|
|
4538
|
-
nodes:
|
|
4539
|
-
edges:
|
|
4540
|
-
}),
|
|
4541
|
-
kind:
|
|
4542
|
-
target:
|
|
4543
|
-
}),
|
|
4544
|
-
name:
|
|
4545
|
-
imports:
|
|
4546
|
-
source:
|
|
4547
|
-
}),
|
|
4548
|
-
bindings:
|
|
4549
|
-
graph:
|
|
4550
|
-
subflows:
|
|
4551
|
-
tasks:
|
|
4552
|
-
}),
|
|
4553
|
-
modelVersion:
|
|
4554
|
-
document:
|
|
4555
|
-
modules:
|
|
4556
|
-
}),
|
|
4557
|
-
kind:
|
|
4558
|
-
version:
|
|
4524
|
+
]), $s = U([H({ kind: K("flow") }), H({
|
|
4525
|
+
kind: K("subflow"),
|
|
4526
|
+
id: q
|
|
4527
|
+
})]), ec = H({
|
|
4528
|
+
source: q,
|
|
4529
|
+
target: q,
|
|
4530
|
+
sourceHandle: q.optional()
|
|
4531
|
+
}), Z = {
|
|
4532
|
+
nodeId: q,
|
|
4533
|
+
target: $s
|
|
4534
|
+
}, tc = H({
|
|
4535
|
+
name: q,
|
|
4536
|
+
inputs: V(Y),
|
|
4537
|
+
outputs: V(Ns.extend({ sources: V(U([Fs, Is])) }))
|
|
4538
|
+
}), nc = H({
|
|
4539
|
+
nodes: W(q, Qs),
|
|
4540
|
+
edges: V(ec).default([])
|
|
4541
|
+
}), rc = H({
|
|
4542
|
+
kind: G(["connection", "variable"]),
|
|
4543
|
+
target: q
|
|
4544
|
+
}), ic = H({
|
|
4545
|
+
name: q,
|
|
4546
|
+
imports: Ms,
|
|
4547
|
+
source: q
|
|
4548
|
+
}), ac = H({
|
|
4549
|
+
bindings: W(q, rc),
|
|
4550
|
+
graph: nc,
|
|
4551
|
+
subflows: W(q, tc.extend({ graph: nc })),
|
|
4552
|
+
tasks: W(q, Gs)
|
|
4553
|
+
}), oc = H({
|
|
4554
|
+
modelVersion: K(2),
|
|
4555
|
+
document: ac,
|
|
4556
|
+
modules: W(q, ic)
|
|
4557
|
+
}), sc = oc.extend({
|
|
4558
|
+
kind: K("open-flow-flow-revision"),
|
|
4559
|
+
version: K(1)
|
|
4559
4560
|
});
|
|
4560
|
-
function
|
|
4561
|
-
return
|
|
4561
|
+
function Q(e) {
|
|
4562
|
+
return typeof e == "object" && e && !Array.isArray(e) ? e : {};
|
|
4562
4563
|
}
|
|
4563
|
-
function cc(e) {
|
|
4564
|
-
return
|
|
4564
|
+
function cc(e, t, n) {
|
|
4565
|
+
return Object.fromEntries(Object.entries(Q(e)).flatMap(([e, r]) => {
|
|
4566
|
+
let i = t.safeParse(n?.(r) ?? r);
|
|
4567
|
+
return i.success ? [[e, i.data]] : [];
|
|
4568
|
+
}));
|
|
4565
4569
|
}
|
|
4566
4570
|
function lc(e) {
|
|
4567
|
-
|
|
4568
|
-
|
|
4571
|
+
let t = Q(e);
|
|
4572
|
+
if (t.kind == "webhook" && t.bodyFields == null && t.inputsDef != null) return {
|
|
4573
|
+
...t,
|
|
4574
|
+
bodyFields: t.inputsDef,
|
|
4575
|
+
inputsDef: void 0
|
|
4576
|
+
};
|
|
4577
|
+
if ((t.kind == "poll" || t.kind == "integration") && t.definition != null) {
|
|
4578
|
+
let e = Q(t.definition);
|
|
4579
|
+
if (e.outputs == null && e.payloadSchema != null) return {
|
|
4580
|
+
...t,
|
|
4581
|
+
definition: {
|
|
4582
|
+
...e,
|
|
4583
|
+
definitionVersion: 2,
|
|
4584
|
+
outputs: [{
|
|
4585
|
+
handle: "payload",
|
|
4586
|
+
jsonSchema: e.payloadSchema,
|
|
4587
|
+
nullable: !1
|
|
4588
|
+
}],
|
|
4589
|
+
payloadSchema: void 0
|
|
4590
|
+
}
|
|
4591
|
+
};
|
|
4592
|
+
}
|
|
4593
|
+
return t;
|
|
4594
|
+
}
|
|
4595
|
+
function uc(e) {
|
|
4596
|
+
let t = Q(e), n = cc(t.nodes, Qs, lc), r = new Set(Object.entries(n).flatMap(([e, t]) => t.kind == "webhook" ? [e] : []));
|
|
4597
|
+
for (let e of Object.values(n)) if ("inputs" in e) {
|
|
4598
|
+
for (let t of Object.values(e.inputs)) if (t.kind == "sources") for (let e of t.sources) e.kind == "node" && e.output == "payload" && r.has(e.nodeId) && (e.output = "body");
|
|
4599
|
+
}
|
|
4600
|
+
return {
|
|
4601
|
+
nodes: n,
|
|
4602
|
+
edges: Array.isArray(t.edges) ? t.edges.flatMap((e) => ec.safeParse(e).data ?? []) : []
|
|
4603
|
+
};
|
|
4604
|
+
}
|
|
4605
|
+
function dc(e) {
|
|
4606
|
+
As(e);
|
|
4607
|
+
let t = Q(e);
|
|
4608
|
+
if (t.kind != "open-flow-flow-revision" || t.version != 1) throw TypeError("The value is not an Open Flow Revision envelope.");
|
|
4609
|
+
if (typeof t.modelVersion == "number" && t.modelVersion > 2) throw TypeError("The Flow model is newer than this package.");
|
|
4610
|
+
let n = Q(t.document), r = uc(n.graph), i = Object.fromEntries(Object.entries(Q(n.subflows)).flatMap(([e, t]) => {
|
|
4611
|
+
let n = Q(t), r = tc.extend({ graph: nc }).safeParse({
|
|
4612
|
+
...n,
|
|
4613
|
+
graph: uc(n.graph)
|
|
4614
|
+
});
|
|
4615
|
+
return r.success ? [[e, r.data]] : [];
|
|
4616
|
+
}));
|
|
4617
|
+
return pc({
|
|
4618
|
+
modelVersion: 2,
|
|
4619
|
+
document: {
|
|
4620
|
+
bindings: cc(n.bindings, rc),
|
|
4621
|
+
graph: r,
|
|
4622
|
+
subflows: i,
|
|
4623
|
+
tasks: cc(n.tasks, Gs)
|
|
4624
|
+
},
|
|
4625
|
+
modules: cc(t.modules, ic)
|
|
4626
|
+
});
|
|
4627
|
+
}
|
|
4628
|
+
function fc(e) {
|
|
4629
|
+
return As(e), ac.parse(e);
|
|
4630
|
+
}
|
|
4631
|
+
function pc(e) {
|
|
4632
|
+
return As(e), oc.parse(e);
|
|
4633
|
+
}
|
|
4634
|
+
function mc(e) {
|
|
4635
|
+
As(e);
|
|
4636
|
+
let t = sc.parse(e);
|
|
4569
4637
|
return {
|
|
4570
4638
|
modelVersion: t.modelVersion,
|
|
4571
4639
|
document: t.document,
|
|
4572
4640
|
modules: t.modules
|
|
4573
4641
|
};
|
|
4574
4642
|
}
|
|
4575
|
-
var
|
|
4643
|
+
var hc = {
|
|
4576
4644
|
"binding.create": {
|
|
4577
|
-
bindingId:
|
|
4578
|
-
binding:
|
|
4645
|
+
bindingId: q,
|
|
4646
|
+
binding: rc
|
|
4579
4647
|
},
|
|
4580
|
-
"binding.delete": { bindingId:
|
|
4648
|
+
"binding.delete": { bindingId: q },
|
|
4581
4649
|
"binding.target.set": {
|
|
4582
|
-
bindingId:
|
|
4583
|
-
before:
|
|
4584
|
-
value:
|
|
4650
|
+
bindingId: q,
|
|
4651
|
+
before: q,
|
|
4652
|
+
value: q
|
|
4585
4653
|
},
|
|
4586
4654
|
"graph.edge.connect": {
|
|
4587
|
-
target:
|
|
4588
|
-
edge:
|
|
4655
|
+
target: $s,
|
|
4656
|
+
edge: ec
|
|
4589
4657
|
},
|
|
4590
4658
|
"graph.edge.disconnect": {
|
|
4591
|
-
target:
|
|
4592
|
-
edge:
|
|
4659
|
+
target: $s,
|
|
4660
|
+
edge: ec
|
|
4593
4661
|
},
|
|
4594
4662
|
"graph.node.create": {
|
|
4595
|
-
...
|
|
4596
|
-
node:
|
|
4597
|
-
},
|
|
4598
|
-
"graph.node.delete":
|
|
4599
|
-
"graph.node.field.set":
|
|
4600
|
-
|
|
4601
|
-
|
|
4602
|
-
|
|
4603
|
-
|
|
4604
|
-
|
|
4605
|
-
|
|
4606
|
-
|
|
4607
|
-
|
|
4608
|
-
|
|
4609
|
-
|
|
4610
|
-
|
|
4611
|
-
|
|
4612
|
-
|
|
4613
|
-
|
|
4614
|
-
|
|
4615
|
-
|
|
4663
|
+
...Z,
|
|
4664
|
+
node: Qs
|
|
4665
|
+
},
|
|
4666
|
+
"graph.node.delete": Z,
|
|
4667
|
+
"graph.node.field.set": U([
|
|
4668
|
+
H({
|
|
4669
|
+
...Z,
|
|
4670
|
+
kind: K("graph.node.field.set"),
|
|
4671
|
+
field: G([
|
|
4672
|
+
"description",
|
|
4673
|
+
"icon",
|
|
4674
|
+
"name"
|
|
4675
|
+
]),
|
|
4676
|
+
before: q.optional(),
|
|
4677
|
+
value: q.optional()
|
|
4678
|
+
}),
|
|
4679
|
+
H({
|
|
4680
|
+
...Z,
|
|
4681
|
+
kind: K("graph.node.field.set"),
|
|
4682
|
+
field: K("maxExecutions"),
|
|
4683
|
+
before: R().int().positive().max(2 ** 53 - 1).optional(),
|
|
4684
|
+
value: R().int().positive().max(2 ** 53 - 1).optional()
|
|
4685
|
+
}),
|
|
4686
|
+
H({
|
|
4687
|
+
...Z,
|
|
4688
|
+
kind: K("graph.node.field.set"),
|
|
4689
|
+
field: K("timeoutMs"),
|
|
4690
|
+
before: R().optional(),
|
|
4691
|
+
value: R().optional()
|
|
4692
|
+
})
|
|
4693
|
+
]),
|
|
4616
4694
|
"graph.node.input.set": {
|
|
4617
|
-
...
|
|
4618
|
-
handle:
|
|
4619
|
-
before:
|
|
4620
|
-
value:
|
|
4695
|
+
...Z,
|
|
4696
|
+
handle: q,
|
|
4697
|
+
before: Rs.optional(),
|
|
4698
|
+
value: Rs.optional()
|
|
4621
4699
|
},
|
|
4622
4700
|
"graph.node.additional-inputs.set": {
|
|
4623
|
-
...
|
|
4624
|
-
before:
|
|
4625
|
-
value:
|
|
4701
|
+
...Z,
|
|
4702
|
+
before: V(Y).optional(),
|
|
4703
|
+
value: V(Y).optional()
|
|
4626
4704
|
},
|
|
4627
4705
|
"graph.node.condition.set": {
|
|
4628
|
-
...
|
|
4629
|
-
before:
|
|
4630
|
-
value:
|
|
4706
|
+
...Z,
|
|
4707
|
+
before: H(Ks),
|
|
4708
|
+
value: H(Ks)
|
|
4631
4709
|
},
|
|
4632
4710
|
"graph.node.values.set": {
|
|
4633
|
-
...
|
|
4634
|
-
before:
|
|
4635
|
-
value:
|
|
4711
|
+
...Z,
|
|
4712
|
+
before: V(Y),
|
|
4713
|
+
value: V(Y)
|
|
4636
4714
|
},
|
|
4637
4715
|
"graph.node.wait.set": {
|
|
4638
|
-
...
|
|
4639
|
-
target:
|
|
4640
|
-
before:
|
|
4641
|
-
value:
|
|
4716
|
+
...Z,
|
|
4717
|
+
target: H({ kind: K("flow") }),
|
|
4718
|
+
before: H(qs),
|
|
4719
|
+
value: H(qs)
|
|
4642
4720
|
},
|
|
4643
4721
|
"graph.node.webhook.set": {
|
|
4644
|
-
...
|
|
4645
|
-
target:
|
|
4646
|
-
before:
|
|
4647
|
-
value:
|
|
4722
|
+
...Z,
|
|
4723
|
+
target: H({ kind: K("flow") }),
|
|
4724
|
+
before: H(Js),
|
|
4725
|
+
value: H(Js)
|
|
4648
4726
|
},
|
|
4649
4727
|
"graph.node.task.ports.set": {
|
|
4650
|
-
...
|
|
4651
|
-
before:
|
|
4652
|
-
value:
|
|
4728
|
+
...Z,
|
|
4729
|
+
before: H(Bs),
|
|
4730
|
+
value: H(Bs)
|
|
4653
4731
|
},
|
|
4654
4732
|
"graph.node.task.name.set": {
|
|
4655
|
-
...
|
|
4656
|
-
before:
|
|
4657
|
-
value:
|
|
4733
|
+
...Z,
|
|
4734
|
+
before: q,
|
|
4735
|
+
value: q
|
|
4658
4736
|
},
|
|
4659
4737
|
"graph.node.task.capabilities.set": {
|
|
4660
|
-
...
|
|
4661
|
-
before:
|
|
4662
|
-
value:
|
|
4738
|
+
...Z,
|
|
4739
|
+
before: V(Vs).optional(),
|
|
4740
|
+
value: V(Vs).optional()
|
|
4663
4741
|
},
|
|
4664
4742
|
"graph.trigger.config.set": {
|
|
4665
|
-
nodeId:
|
|
4666
|
-
name:
|
|
4667
|
-
before:
|
|
4668
|
-
value:
|
|
4743
|
+
nodeId: q,
|
|
4744
|
+
name: q,
|
|
4745
|
+
before: J.optional(),
|
|
4746
|
+
value: J.optional()
|
|
4669
4747
|
},
|
|
4670
4748
|
"graph.trigger.schedule.set": {
|
|
4671
|
-
nodeId:
|
|
4672
|
-
before:
|
|
4673
|
-
value:
|
|
4749
|
+
nodeId: q,
|
|
4750
|
+
before: js,
|
|
4751
|
+
value: js
|
|
4674
4752
|
},
|
|
4675
4753
|
"module.create": {
|
|
4676
|
-
moduleId:
|
|
4677
|
-
module:
|
|
4754
|
+
moduleId: q,
|
|
4755
|
+
module: ic
|
|
4678
4756
|
},
|
|
4679
|
-
"module.delete": { moduleId:
|
|
4757
|
+
"module.delete": { moduleId: q },
|
|
4680
4758
|
"module.rename": {
|
|
4681
|
-
moduleId:
|
|
4682
|
-
before:
|
|
4683
|
-
name:
|
|
4759
|
+
moduleId: q,
|
|
4760
|
+
before: q,
|
|
4761
|
+
name: q
|
|
4684
4762
|
},
|
|
4685
4763
|
"module.source.replace": {
|
|
4686
|
-
moduleId:
|
|
4687
|
-
beforeImports:
|
|
4688
|
-
beforeSource:
|
|
4689
|
-
imports:
|
|
4690
|
-
source:
|
|
4764
|
+
moduleId: q,
|
|
4765
|
+
beforeImports: Ms,
|
|
4766
|
+
beforeSource: q,
|
|
4767
|
+
imports: Ms,
|
|
4768
|
+
source: q
|
|
4691
4769
|
},
|
|
4692
4770
|
"subflow.create": {
|
|
4693
|
-
subflowId:
|
|
4694
|
-
subflow:
|
|
4771
|
+
subflowId: q,
|
|
4772
|
+
subflow: tc.extend({ graph: nc })
|
|
4695
4773
|
},
|
|
4696
4774
|
"subflow.definition.set": {
|
|
4697
|
-
subflowId:
|
|
4698
|
-
before:
|
|
4699
|
-
definition:
|
|
4775
|
+
subflowId: q,
|
|
4776
|
+
before: tc,
|
|
4777
|
+
definition: tc
|
|
4700
4778
|
},
|
|
4701
|
-
"subflow.delete": { subflowId:
|
|
4779
|
+
"subflow.delete": { subflowId: q },
|
|
4702
4780
|
"task.create": {
|
|
4703
|
-
taskId:
|
|
4704
|
-
task:
|
|
4781
|
+
taskId: q,
|
|
4782
|
+
task: Gs
|
|
4705
4783
|
},
|
|
4706
|
-
"task.delete": { taskId:
|
|
4784
|
+
"task.delete": { taskId: q },
|
|
4707
4785
|
"task.connector.connection.set": {
|
|
4708
|
-
taskId:
|
|
4709
|
-
before:
|
|
4710
|
-
value:
|
|
4786
|
+
taskId: q,
|
|
4787
|
+
before: q.optional(),
|
|
4788
|
+
value: q.optional()
|
|
4711
4789
|
},
|
|
4712
4790
|
"task.agent.set": {
|
|
4713
|
-
taskId:
|
|
4714
|
-
before:
|
|
4715
|
-
value:
|
|
4791
|
+
taskId: q,
|
|
4792
|
+
before: Gs,
|
|
4793
|
+
value: Gs
|
|
4716
4794
|
},
|
|
4717
4795
|
"task.llm.mode.set": {
|
|
4718
|
-
taskId:
|
|
4719
|
-
before:
|
|
4720
|
-
value:
|
|
4796
|
+
taskId: q,
|
|
4797
|
+
before: G(["chat", "json"]),
|
|
4798
|
+
value: G(["chat", "json"])
|
|
4721
4799
|
},
|
|
4722
4800
|
"task.name.set": {
|
|
4723
|
-
taskId:
|
|
4724
|
-
before:
|
|
4725
|
-
value:
|
|
4801
|
+
taskId: q,
|
|
4802
|
+
before: q,
|
|
4803
|
+
value: q
|
|
4726
4804
|
}
|
|
4727
4805
|
};
|
|
4728
|
-
|
|
4729
|
-
kind:
|
|
4806
|
+
V(U([...new Map(Object.entries(hc).map(([e, t]) => [e, t instanceof F ? t : H({
|
|
4807
|
+
kind: K(e),
|
|
4730
4808
|
...t
|
|
4731
4809
|
})])).values()])).min(1);
|
|
4732
4810
|
//#endregion
|
|
4733
4811
|
//#region src/flow/common/change.ts
|
|
4734
|
-
function
|
|
4812
|
+
function gc(e) {
|
|
4735
4813
|
return e.trim().normalize("NFC");
|
|
4736
4814
|
}
|
|
4737
|
-
function
|
|
4738
|
-
let n =
|
|
4815
|
+
function _c(e, t) {
|
|
4816
|
+
let n = gc(e), r = new Set([...t].map(gc));
|
|
4739
4817
|
if (!r.has(n)) return n;
|
|
4740
4818
|
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;
|
|
4741
4819
|
for (; r.has(`${s} (${c})`);) c += 1;
|
|
@@ -4743,24 +4821,24 @@ function fc(e, t) {
|
|
|
4743
4821
|
}
|
|
4744
4822
|
//#endregion
|
|
4745
4823
|
//#region src/flow/common/encoding.ts
|
|
4746
|
-
var
|
|
4747
|
-
function
|
|
4824
|
+
var vc = new TextEncoder();
|
|
4825
|
+
function yc(e) {
|
|
4748
4826
|
if (e == null || typeof e == "boolean" || typeof e == "string" || typeof e == "number") return JSON.stringify(e);
|
|
4749
|
-
if (Array.isArray(e)) return `[${e.map(
|
|
4827
|
+
if (Array.isArray(e)) return `[${e.map(yc).join(",")}]`;
|
|
4750
4828
|
let t = e;
|
|
4751
|
-
return `{${Object.keys(t).toSorted().map((e) => `${JSON.stringify(e)}:${
|
|
4829
|
+
return `{${Object.keys(t).toSorted().map((e) => `${JSON.stringify(e)}:${yc(t[e])}`).join(",")}}`;
|
|
4752
4830
|
}
|
|
4753
|
-
function
|
|
4754
|
-
return
|
|
4831
|
+
function bc(e) {
|
|
4832
|
+
return vc.encode(yc(e));
|
|
4755
4833
|
}
|
|
4756
|
-
async function
|
|
4834
|
+
async function xc(e) {
|
|
4757
4835
|
let t = new Uint8Array(e.byteLength);
|
|
4758
4836
|
return t.set(e), `sha256:${[...new Uint8Array(await crypto.subtle.digest("SHA-256", t))].map((e) => e.toString(16).padStart(2, "0")).join("")}`;
|
|
4759
4837
|
}
|
|
4760
|
-
function
|
|
4838
|
+
function Sc(e) {
|
|
4761
4839
|
return Object.keys(e).toSorted().map((t) => [t, e[t]]);
|
|
4762
4840
|
}
|
|
4763
|
-
function
|
|
4841
|
+
function Cc(e) {
|
|
4764
4842
|
return "handle" in e ? {
|
|
4765
4843
|
...e.description == null ? {} : { description: e.description },
|
|
4766
4844
|
handle: e.handle,
|
|
@@ -4773,9 +4851,9 @@ function vc(e) {
|
|
|
4773
4851
|
};
|
|
4774
4852
|
}
|
|
4775
4853
|
function $(e) {
|
|
4776
|
-
return e.map(
|
|
4854
|
+
return e.map(Cc);
|
|
4777
4855
|
}
|
|
4778
|
-
function
|
|
4856
|
+
function wc(e) {
|
|
4779
4857
|
switch (e.kind) {
|
|
4780
4858
|
case "sources": return {
|
|
4781
4859
|
kind: e.kind,
|
|
@@ -4787,10 +4865,10 @@ function yc(e) {
|
|
|
4787
4865
|
};
|
|
4788
4866
|
}
|
|
4789
4867
|
}
|
|
4790
|
-
function
|
|
4791
|
-
return Object.fromEntries(
|
|
4868
|
+
function Tc(e) {
|
|
4869
|
+
return Object.fromEntries(Sc(e).map(([e, t]) => [e, wc(t)]));
|
|
4792
4870
|
}
|
|
4793
|
-
function
|
|
4871
|
+
function Ec(e) {
|
|
4794
4872
|
return e.map((e) => ({
|
|
4795
4873
|
...e.description == null ? {} : { description: e.description },
|
|
4796
4874
|
handle: e.handle,
|
|
@@ -4799,13 +4877,14 @@ function xc(e) {
|
|
|
4799
4877
|
sources: e.sources.map((e) => ({ ...e }))
|
|
4800
4878
|
}));
|
|
4801
4879
|
}
|
|
4802
|
-
function
|
|
4803
|
-
if (!("inputs" in e)) return
|
|
4880
|
+
function Dc(e) {
|
|
4881
|
+
if (!("inputs" in e)) return Pc(e);
|
|
4804
4882
|
let t = {
|
|
4805
4883
|
...e.description == null ? {} : { description: e.description },
|
|
4806
4884
|
...e.icon == null ? {} : { icon: e.icon },
|
|
4807
|
-
inputs:
|
|
4885
|
+
inputs: Tc(e.inputs),
|
|
4808
4886
|
...e.name == null ? {} : { name: e.name },
|
|
4887
|
+
...e.maxExecutions == null ? {} : { maxExecutions: e.maxExecutions },
|
|
4809
4888
|
...e.timeoutMs == null ? {} : { timeoutMs: e.timeoutMs }
|
|
4810
4889
|
};
|
|
4811
4890
|
switch (e.kind) {
|
|
@@ -4823,7 +4902,7 @@ function Sc(e) {
|
|
|
4823
4902
|
...e.defaultOutput == null ? {} : { defaultOutput: e.defaultOutput },
|
|
4824
4903
|
input: {
|
|
4825
4904
|
handle: e.input.handle,
|
|
4826
|
-
...
|
|
4905
|
+
...Cc(e.input)
|
|
4827
4906
|
},
|
|
4828
4907
|
kind: e.kind
|
|
4829
4908
|
};
|
|
@@ -4838,7 +4917,7 @@ function Sc(e) {
|
|
|
4838
4917
|
taskId: e.taskId
|
|
4839
4918
|
}) : Object.assign({}, t, {
|
|
4840
4919
|
kind: e.kind,
|
|
4841
|
-
task:
|
|
4920
|
+
task: Ac(e.task)
|
|
4842
4921
|
});
|
|
4843
4922
|
return e.additionalInputs != null && (n.additionalInputs = $(e.additionalInputs)), n;
|
|
4844
4923
|
}
|
|
@@ -4852,23 +4931,23 @@ function Sc(e) {
|
|
|
4852
4931
|
actions: e.actions,
|
|
4853
4932
|
input: {
|
|
4854
4933
|
handle: e.input.handle,
|
|
4855
|
-
...
|
|
4934
|
+
...Cc(e.input)
|
|
4856
4935
|
},
|
|
4857
4936
|
kind: e.kind,
|
|
4858
4937
|
prompt: e.prompt
|
|
4859
4938
|
};
|
|
4860
4939
|
}
|
|
4861
4940
|
}
|
|
4862
|
-
function
|
|
4941
|
+
function Oc(e) {
|
|
4863
4942
|
return {
|
|
4864
4943
|
edges: e.edges.map((e) => ({ ...e })).toSorted((e, t) => {
|
|
4865
|
-
let n =
|
|
4944
|
+
let n = yc(e), r = yc(t);
|
|
4866
4945
|
return n < r ? -1 : +(n > r);
|
|
4867
4946
|
}),
|
|
4868
|
-
nodes: Object.fromEntries(
|
|
4947
|
+
nodes: Object.fromEntries(Sc(e.nodes).map(([e, t]) => [e, Dc(t)]))
|
|
4869
4948
|
};
|
|
4870
4949
|
}
|
|
4871
|
-
function
|
|
4950
|
+
function kc(e) {
|
|
4872
4951
|
return {
|
|
4873
4952
|
executor: e.executor,
|
|
4874
4953
|
inputs: $(e.inputs),
|
|
@@ -4876,7 +4955,7 @@ function wc(e) {
|
|
|
4876
4955
|
outputs: $(e.outputs)
|
|
4877
4956
|
};
|
|
4878
4957
|
}
|
|
4879
|
-
function
|
|
4958
|
+
function Ac(e) {
|
|
4880
4959
|
return {
|
|
4881
4960
|
...e.capabilities == null ? {} : { capabilities: e.capabilities },
|
|
4882
4961
|
inputs: $(e.inputs),
|
|
@@ -4885,7 +4964,7 @@ function Tc(e) {
|
|
|
4885
4964
|
outputs: $(e.outputs)
|
|
4886
4965
|
};
|
|
4887
4966
|
}
|
|
4888
|
-
function
|
|
4967
|
+
function jc(e) {
|
|
4889
4968
|
return {
|
|
4890
4969
|
configSchema: e.configSchema,
|
|
4891
4970
|
definitionVersion: e.definitionVersion,
|
|
@@ -4902,12 +4981,12 @@ function Ec(e) {
|
|
|
4902
4981
|
} } : {},
|
|
4903
4982
|
key: e.key,
|
|
4904
4983
|
name: e.name,
|
|
4905
|
-
|
|
4984
|
+
outputs: $(e.outputs),
|
|
4906
4985
|
provider: e.provider,
|
|
4907
4986
|
type: e.type
|
|
4908
4987
|
};
|
|
4909
4988
|
}
|
|
4910
|
-
function
|
|
4989
|
+
function Mc(e) {
|
|
4911
4990
|
return {
|
|
4912
4991
|
...e.allowedMethods == null ? {} : { allowedMethods: e.allowedMethods },
|
|
4913
4992
|
...e.allowedOrigins == null ? {} : { allowedOrigins: e.allowedOrigins },
|
|
@@ -4917,7 +4996,7 @@ function Dc(e) {
|
|
|
4917
4996
|
...e.responseStatusCode == null ? {} : { responseStatusCode: e.responseStatusCode }
|
|
4918
4997
|
};
|
|
4919
4998
|
}
|
|
4920
|
-
function
|
|
4999
|
+
function Nc(e) {
|
|
4921
5000
|
switch (e.type) {
|
|
4922
5001
|
case "cron": return {
|
|
4923
5002
|
expression: e.expression,
|
|
@@ -4931,7 +5010,7 @@ function Oc(e) {
|
|
|
4931
5010
|
};
|
|
4932
5011
|
}
|
|
4933
5012
|
}
|
|
4934
|
-
function
|
|
5013
|
+
function Pc(e) {
|
|
4935
5014
|
let t = (t) => ({
|
|
4936
5015
|
...e.description == null ? {} : { description: e.description },
|
|
4937
5016
|
...e.icon == null ? {} : { icon: e.icon },
|
|
@@ -4942,145 +5021,165 @@ function kc(e) {
|
|
|
4942
5021
|
case "manual": return t(e.kind);
|
|
4943
5022
|
case "webhook": return {
|
|
4944
5023
|
...t(e.kind),
|
|
4945
|
-
|
|
5024
|
+
bodyFields: e.bodyFields.map((e) => ({
|
|
4946
5025
|
handle: e.handle,
|
|
4947
|
-
...
|
|
5026
|
+
...Cc(e)
|
|
4948
5027
|
})),
|
|
4949
|
-
...e.options == null ? {} : { options:
|
|
5028
|
+
...e.options == null ? {} : { options: Mc(e.options) }
|
|
4950
5029
|
};
|
|
4951
5030
|
case "cron": return {
|
|
4952
5031
|
...t(e.kind),
|
|
4953
|
-
cronTimes: e.cronTimes.map(
|
|
5032
|
+
cronTimes: e.cronTimes.map(Nc)
|
|
4954
5033
|
};
|
|
4955
5034
|
case "poll": return {
|
|
4956
5035
|
...t(e.kind),
|
|
4957
5036
|
bindingId: e.bindingId,
|
|
4958
5037
|
config: e.config,
|
|
4959
|
-
definition:
|
|
4960
|
-
pollTimes: e.pollTimes.map(
|
|
5038
|
+
definition: jc(e.definition),
|
|
5039
|
+
pollTimes: e.pollTimes.map(Nc)
|
|
4961
5040
|
};
|
|
4962
5041
|
case "integration": return {
|
|
4963
5042
|
...t(e.kind),
|
|
4964
5043
|
bindingId: e.bindingId,
|
|
4965
5044
|
config: e.config,
|
|
4966
|
-
definition:
|
|
5045
|
+
definition: jc(e.definition)
|
|
4967
5046
|
};
|
|
4968
5047
|
}
|
|
4969
5048
|
}
|
|
4970
|
-
function
|
|
5049
|
+
function Fc(e) {
|
|
4971
5050
|
let { name: t, description: n, icon: r, ...i } = e;
|
|
4972
|
-
return
|
|
5051
|
+
return yc(i);
|
|
4973
5052
|
}
|
|
4974
|
-
function
|
|
5053
|
+
function Ic(e) {
|
|
4975
5054
|
return {
|
|
4976
|
-
bindings: Object.fromEntries(
|
|
4977
|
-
graph:
|
|
4978
|
-
subflows: Object.fromEntries(
|
|
4979
|
-
graph:
|
|
5055
|
+
bindings: Object.fromEntries(Sc(e.bindings)),
|
|
5056
|
+
graph: Oc(e.graph),
|
|
5057
|
+
subflows: Object.fromEntries(Sc(e.subflows).map(([e, t]) => [e, {
|
|
5058
|
+
graph: Oc(t.graph),
|
|
4980
5059
|
inputs: $(t.inputs),
|
|
4981
5060
|
name: t.name,
|
|
4982
|
-
outputs:
|
|
5061
|
+
outputs: Ec(t.outputs)
|
|
4983
5062
|
}])),
|
|
4984
|
-
tasks: Object.fromEntries(
|
|
5063
|
+
tasks: Object.fromEntries(Sc(e.tasks).map(([e, t]) => [e, kc(t)]))
|
|
4985
5064
|
};
|
|
4986
5065
|
}
|
|
4987
|
-
function
|
|
5066
|
+
function Lc(e) {
|
|
4988
5067
|
return {
|
|
4989
5068
|
imports: e.imports.toSorted(),
|
|
4990
5069
|
name: e.name,
|
|
4991
5070
|
source: e.source
|
|
4992
5071
|
};
|
|
4993
5072
|
}
|
|
4994
|
-
function
|
|
5073
|
+
function Rc(e) {
|
|
4995
5074
|
return {
|
|
4996
|
-
document:
|
|
5075
|
+
document: Ic(e.document),
|
|
4997
5076
|
kind: "open-flow-flow-revision",
|
|
4998
5077
|
modelVersion: e.modelVersion,
|
|
4999
|
-
modules: Object.fromEntries(
|
|
5078
|
+
modules: Object.fromEntries(Sc(e.modules).map(([e, t]) => [e, Lc(t)])),
|
|
5000
5079
|
version: 1
|
|
5001
5080
|
};
|
|
5002
5081
|
}
|
|
5003
|
-
function
|
|
5004
|
-
return
|
|
5082
|
+
function zc(e) {
|
|
5083
|
+
return bc(Rc(e));
|
|
5005
5084
|
}
|
|
5006
|
-
function
|
|
5007
|
-
return
|
|
5008
|
-
}
|
|
5009
|
-
|
|
5010
|
-
|
|
5011
|
-
|
|
5012
|
-
|
|
5013
|
-
|
|
5014
|
-
|
|
5015
|
-
|
|
5016
|
-
|
|
5017
|
-
}
|
|
5018
|
-
|
|
5019
|
-
|
|
5020
|
-
|
|
5021
|
-
|
|
5022
|
-
|
|
5085
|
+
function Bc(e) {
|
|
5086
|
+
return mc(JSON.parse(new TextDecoder("utf-8", { fatal: !0 }).decode(e)));
|
|
5087
|
+
}
|
|
5088
|
+
function Vc(e) {
|
|
5089
|
+
return JSON.parse(new TextDecoder("utf-8", { fatal: !0 }).decode(e));
|
|
5090
|
+
}
|
|
5091
|
+
function Hc(e) {
|
|
5092
|
+
let t;
|
|
5093
|
+
try {
|
|
5094
|
+
t = Vc(e), mc(t);
|
|
5095
|
+
return;
|
|
5096
|
+
} catch {}
|
|
5097
|
+
try {
|
|
5098
|
+
dc(t);
|
|
5099
|
+
} catch {
|
|
5100
|
+
return;
|
|
5101
|
+
}
|
|
5102
|
+
let n = t;
|
|
5103
|
+
return typeof n.modelVersion == "number" && n.modelVersion < 2 ? "upgrade" : "repair";
|
|
5104
|
+
}
|
|
5105
|
+
function Uc(e) {
|
|
5106
|
+
return dc(Vc(e));
|
|
5107
|
+
}
|
|
5108
|
+
var Wc = W(I(), B()), Gc = H({
|
|
5109
|
+
jsonSchema: B(),
|
|
5110
|
+
nullable: z(),
|
|
5111
|
+
value: B().optional(),
|
|
5112
|
+
description: I().optional()
|
|
5113
|
+
}).strict(), Kc = W(I(), Gc), qc = U([H({
|
|
5114
|
+
kind: K("value"),
|
|
5115
|
+
value: B()
|
|
5116
|
+
}).strict(), H({
|
|
5117
|
+
kind: K("sources"),
|
|
5118
|
+
sources: V(H({
|
|
5119
|
+
kind: K("node"),
|
|
5120
|
+
nodeId: I(),
|
|
5121
|
+
output: I()
|
|
5023
5122
|
}).strict())
|
|
5024
|
-
}).strict()]),
|
|
5025
|
-
name:
|
|
5026
|
-
description:
|
|
5027
|
-
icon:
|
|
5028
|
-
},
|
|
5029
|
-
|
|
5030
|
-
...
|
|
5031
|
-
kind:
|
|
5032
|
-
cronTimes:
|
|
5123
|
+
}).strict()]), Jc = {
|
|
5124
|
+
name: I().optional(),
|
|
5125
|
+
description: I().optional(),
|
|
5126
|
+
icon: I().optional()
|
|
5127
|
+
}, Yc = U([
|
|
5128
|
+
H({
|
|
5129
|
+
...Jc,
|
|
5130
|
+
kind: K("cron"),
|
|
5131
|
+
cronTimes: V(B())
|
|
5033
5132
|
}).strict(),
|
|
5034
|
-
|
|
5035
|
-
...
|
|
5036
|
-
kind:
|
|
5133
|
+
H({
|
|
5134
|
+
...Jc,
|
|
5135
|
+
kind: K("manual")
|
|
5037
5136
|
}).strict(),
|
|
5038
|
-
|
|
5039
|
-
...
|
|
5040
|
-
kind:
|
|
5041
|
-
concurrency:
|
|
5042
|
-
inputs:
|
|
5043
|
-
task:
|
|
5044
|
-
name:
|
|
5045
|
-
moduleId:
|
|
5046
|
-
inputs:
|
|
5047
|
-
outputs:
|
|
5137
|
+
H({
|
|
5138
|
+
...Jc,
|
|
5139
|
+
kind: K("task"),
|
|
5140
|
+
concurrency: K(1).optional(),
|
|
5141
|
+
inputs: W(I(), qc),
|
|
5142
|
+
task: H({
|
|
5143
|
+
name: I(),
|
|
5144
|
+
moduleId: I(),
|
|
5145
|
+
inputs: Kc,
|
|
5146
|
+
outputs: W(I(), Gc.omit({ value: !0 }))
|
|
5048
5147
|
}).strict()
|
|
5049
5148
|
}).strict()
|
|
5050
|
-
]),
|
|
5051
|
-
name:
|
|
5052
|
-
graph:
|
|
5053
|
-
}).strict(),
|
|
5054
|
-
kind:
|
|
5055
|
-
version:
|
|
5056
|
-
modelVersion:
|
|
5057
|
-
modules:
|
|
5058
|
-
name:
|
|
5059
|
-
source:
|
|
5060
|
-
imports:
|
|
5149
|
+
]), Xc = H({
|
|
5150
|
+
name: I(),
|
|
5151
|
+
graph: H({ nodes: W(I(), Yc) }).strict()
|
|
5152
|
+
}).strict(), Zc = H({
|
|
5153
|
+
kind: K("open-flow-project-revision"),
|
|
5154
|
+
version: K(1),
|
|
5155
|
+
modelVersion: U([K(1), K(2)]),
|
|
5156
|
+
modules: W(I(), H({
|
|
5157
|
+
name: I(),
|
|
5158
|
+
source: I(),
|
|
5159
|
+
imports: V(I())
|
|
5061
5160
|
}).strict()),
|
|
5062
|
-
document:
|
|
5063
|
-
bindings:
|
|
5064
|
-
flows:
|
|
5065
|
-
subflows:
|
|
5066
|
-
tasks:
|
|
5161
|
+
document: H({
|
|
5162
|
+
bindings: Wc,
|
|
5163
|
+
flows: Wc,
|
|
5164
|
+
subflows: Wc,
|
|
5165
|
+
tasks: Wc
|
|
5067
5166
|
}).strict()
|
|
5068
5167
|
}).strict();
|
|
5069
|
-
function
|
|
5168
|
+
function Qc(e) {
|
|
5070
5169
|
return Object.entries(e).map(([e, t]) => Object.assign({ handle: e }, t));
|
|
5071
5170
|
}
|
|
5072
|
-
function
|
|
5073
|
-
return Object.keys(
|
|
5171
|
+
function $c(e) {
|
|
5172
|
+
return Object.keys(Zc.parse(e).document.flows).toSorted();
|
|
5074
5173
|
}
|
|
5075
|
-
function
|
|
5076
|
-
let n =
|
|
5174
|
+
function el(e, t) {
|
|
5175
|
+
let n = Zc.parse(e);
|
|
5077
5176
|
if ([
|
|
5078
5177
|
n.document.bindings,
|
|
5079
5178
|
n.document.subflows,
|
|
5080
5179
|
n.document.tasks
|
|
5081
5180
|
].some((e) => Object.keys(e).length != 0)) throw Error("Project bindings, managed tasks and subflows require an explicit semantic conversion.");
|
|
5082
|
-
let r =
|
|
5083
|
-
let n = t.name ?? (t.kind == "task" ? t.task.name : e), r =
|
|
5181
|
+
let r = Xc.parse(n.document.flows[t]), i = [], a = /* @__PURE__ */ new Set(), o = Object.fromEntries(Object.entries(r.graph.nodes).map(([e, t]) => {
|
|
5182
|
+
let n = t.name ?? (t.kind == "task" ? t.task.name : e), r = _c(n, a);
|
|
5084
5183
|
if (a.add(r), r != n && i.push(`Renamed node ${e} to ${r}.`), t.kind != "task") return [e, {
|
|
5085
5184
|
...t,
|
|
5086
5185
|
name: r
|
|
@@ -5091,12 +5190,12 @@ function Kc(e, t) {
|
|
|
5091
5190
|
name: r,
|
|
5092
5191
|
task: {
|
|
5093
5192
|
...t.task,
|
|
5094
|
-
inputs:
|
|
5095
|
-
outputs:
|
|
5193
|
+
inputs: Qc(t.task.inputs),
|
|
5194
|
+
outputs: Qc(t.task.outputs)
|
|
5096
5195
|
}
|
|
5097
5196
|
}];
|
|
5098
|
-
})), s =
|
|
5099
|
-
modelVersion:
|
|
5197
|
+
})), s = pc({
|
|
5198
|
+
modelVersion: 2,
|
|
5100
5199
|
modules: n.modules,
|
|
5101
5200
|
document: {
|
|
5102
5201
|
bindings: {},
|
|
@@ -5130,7 +5229,7 @@ function Kc(e, t) {
|
|
|
5130
5229
|
let f = { ...s.document.graph.nodes };
|
|
5131
5230
|
return d != null && (f[d] = {
|
|
5132
5231
|
kind: "manual",
|
|
5133
|
-
name:
|
|
5232
|
+
name: _c("Start", a)
|
|
5134
5233
|
}), {
|
|
5135
5234
|
name: r.name,
|
|
5136
5235
|
adjustments: i,
|
|
@@ -5147,4 +5246,4 @@ function Kc(e, t) {
|
|
|
5147
5246
|
};
|
|
5148
5247
|
}
|
|
5149
5248
|
//#endregion
|
|
5150
|
-
export {
|
|
5249
|
+
export { Ic as canonicalDocument, Oc as canonicalGraph, bc as canonicalJsonBytes, Lc as canonicalModule, Ec as canonicalOutputs, $ as canonicalPorts, kc as canonicalTask, el as convertProjectFlow, fc as decodeFlowDocument, Bc as decodeRevision, pc as decodeRevisionContent, xc as digestBytes, zc as encodeRevision, $c as legacyProjectFlowIds, ks as maxJsonDepth, Uc as repairRevision, Hc as revisionRepairKind, Fc as triggerRuntimeJson };
|