@oomol-lab/open-flow 0.1.0-beta.29 → 0.1.0-beta.30
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-C_8I3Fua.js → createResourceDialog-_y2xHaUA.js} +1 -1
- package/dist/browser/flow-authoring.js +60 -60
- package/dist/browser/flow-change-schema.d.ts +1 -0
- package/dist/browser/flow-change.d.ts +3 -2
- package/dist/browser/flow-change.js +943 -943
- package/dist/browser/{flowChanges-BBtkyUGd.js → flowChanges-AdN0Iqma.js} +1 -1
- package/dist/browser/{flowWorkspace-DNmBb3ZW.js → flowWorkspace-BrtzLKWB.js} +4 -4
- package/dist/browser/{inputValues-BbSVOWQP.js → inputValues-DJfFraxG.js} +1 -1
- package/dist/browser/workbench.js +4 -4
- package/dist/browser/{workbenchSelect-CQOvpteT.js → workbenchSelect-BDPIQxYK.js} +104 -104
- package/dist/common/control-api-conformance.js +73 -73
- package/dist/common/control-api.js +148 -148
- package/dist/common/control-requests.js +94 -94
- package/dist/common/flow-encoding.d.ts +2 -0
- package/dist/common/flow-encoding.js +1103 -947
- package/dist/common/flow-semantics.js +817 -757
- package/dist/common/mcp.js +257 -257
- package/dist/common/provider-triggers.js +1283 -1283
- package/dist/common/scheduler.js +566 -558
- package/package.json +1 -1
|
@@ -244,38 +244,38 @@ function me(e, t = 0) {
|
|
|
244
244
|
for (let n = t; n < e.issues.length; n++) if (e.issues[n]?.continue === !1) return !0;
|
|
245
245
|
return !1;
|
|
246
246
|
}
|
|
247
|
-
function
|
|
247
|
+
function y(e, t) {
|
|
248
248
|
return t.map((t) => {
|
|
249
249
|
var n;
|
|
250
250
|
return (n = t).path ?? (n.path = []), t.path.unshift(e), t;
|
|
251
251
|
});
|
|
252
252
|
}
|
|
253
|
-
function
|
|
253
|
+
function he(e) {
|
|
254
254
|
return typeof e == "string" ? e : e?.message;
|
|
255
255
|
}
|
|
256
|
-
function
|
|
256
|
+
function ge(e, t, n) {
|
|
257
257
|
var r;
|
|
258
258
|
for (let i = t; i < e.length; i++) (r = e[i]).schema ?? (r.schema = n);
|
|
259
259
|
}
|
|
260
|
-
function
|
|
260
|
+
function b(e, t, n) {
|
|
261
261
|
var r;
|
|
262
262
|
let i = e.inst?._zod?.traits;
|
|
263
263
|
i?.has("$ZodType") && (i.has("$ZodCheck") ? (r = e).schema ?? (r.schema = e.inst) : e.schema = e.inst);
|
|
264
|
-
let a = e.schema === e.inst ? void 0 : e.schema?._zod.def?.error, o = e.message ? e.message :
|
|
264
|
+
let a = e.schema === e.inst ? void 0 : e.schema?._zod.def?.error, o = e.message ? e.message : he(e.inst?._zod.def?.error?.(e)) ?? he(a?.(e)) ?? he(t?.error?.(e)) ?? he(n.customError?.(e)) ?? he(n.localeError?.(e)) ?? "Invalid input", { inst: s, schema: c, continue: l, input: u, ...d } = e;
|
|
265
265
|
return d.path ??= [], d.message = o, t?.reportInput && (d.input = u), d;
|
|
266
266
|
}
|
|
267
|
-
var
|
|
268
|
-
function
|
|
267
|
+
var _e = /[\uD800-\uDBFF]/;
|
|
268
|
+
function ve(e) {
|
|
269
269
|
let t = e.length;
|
|
270
|
-
if (!
|
|
270
|
+
if (!_e.test(e)) return t;
|
|
271
271
|
let n = t;
|
|
272
272
|
for (let r = 0; r < t - 1; r++) (e.charCodeAt(r) & 64512) == 55296 && (e.charCodeAt(r + 1) & 64512) == 56320 && (n--, r++);
|
|
273
273
|
return n;
|
|
274
274
|
}
|
|
275
|
-
function
|
|
275
|
+
function ye(e) {
|
|
276
276
|
return Array.isArray(e) ? "array" : typeof e == "string" ? "string" : "unknown";
|
|
277
277
|
}
|
|
278
|
-
function
|
|
278
|
+
function be(e) {
|
|
279
279
|
let t = typeof e;
|
|
280
280
|
switch (t) {
|
|
281
281
|
case "number": return Number.isNaN(e) ? "nan" : "number";
|
|
@@ -288,7 +288,7 @@ function xe(e) {
|
|
|
288
288
|
}
|
|
289
289
|
return t;
|
|
290
290
|
}
|
|
291
|
-
function
|
|
291
|
+
function xe(...e) {
|
|
292
292
|
let [t, n, r] = e;
|
|
293
293
|
return typeof t == "string" ? {
|
|
294
294
|
message: t,
|
|
@@ -297,16 +297,16 @@ function Se(...e) {
|
|
|
297
297
|
inst: r
|
|
298
298
|
} : { ...t };
|
|
299
299
|
}
|
|
300
|
-
function
|
|
300
|
+
function Se(e, t) {
|
|
301
301
|
for (let n in t) {
|
|
302
302
|
let r = Object.getOwnPropertyDescriptor(t, n);
|
|
303
303
|
r.get ? Object.defineProperty(e, n, {
|
|
304
304
|
...r,
|
|
305
305
|
enumerable: !1
|
|
306
|
-
}) :
|
|
306
|
+
}) : we(e, n, r.value);
|
|
307
307
|
}
|
|
308
308
|
}
|
|
309
|
-
function
|
|
309
|
+
function x(e, t, n, r = !0) {
|
|
310
310
|
return Object.defineProperty(e, t, {
|
|
311
311
|
configurable: !0,
|
|
312
312
|
writable: !0,
|
|
@@ -314,51 +314,51 @@ function b(e, t, n, r = !0) {
|
|
|
314
314
|
value: n
|
|
315
315
|
}), n;
|
|
316
316
|
}
|
|
317
|
-
function
|
|
318
|
-
return
|
|
317
|
+
function Ce(e, t, n) {
|
|
318
|
+
return x(e, t, n, !1);
|
|
319
319
|
}
|
|
320
|
-
function
|
|
320
|
+
function we(e, t, n) {
|
|
321
321
|
Object.defineProperty(e, t, {
|
|
322
322
|
configurable: !0,
|
|
323
323
|
get() {
|
|
324
|
-
return this == null ? n :
|
|
324
|
+
return this == null ? n : x(this, t, n.bind(this));
|
|
325
325
|
},
|
|
326
326
|
set(e) {
|
|
327
|
-
|
|
327
|
+
x(this, t, e);
|
|
328
328
|
}
|
|
329
329
|
});
|
|
330
330
|
}
|
|
331
|
-
function
|
|
331
|
+
function Te(e, t) {
|
|
332
332
|
let n = Object.getPrototypeOf(e);
|
|
333
333
|
return t in n ? void 0 : n;
|
|
334
334
|
}
|
|
335
|
-
var
|
|
335
|
+
var Ee, De = !1, Oe = {
|
|
336
336
|
configurable: !0,
|
|
337
337
|
get() {
|
|
338
|
-
|
|
338
|
+
De = !0;
|
|
339
339
|
}
|
|
340
340
|
};
|
|
341
341
|
function S(e, t, n) {
|
|
342
342
|
let r = Object.getPrototypeOf(e._zod);
|
|
343
|
-
if (t in r &&
|
|
344
|
-
|
|
343
|
+
if (t in r && Ee !== e._zod) {
|
|
344
|
+
Ee = void 0;
|
|
345
345
|
return;
|
|
346
346
|
}
|
|
347
|
-
|
|
347
|
+
Ee = e._zod, Object.defineProperty(r, t, {
|
|
348
348
|
configurable: !0,
|
|
349
349
|
get() {
|
|
350
350
|
Object.defineProperty(this, t, Oe);
|
|
351
|
-
let e =
|
|
352
|
-
|
|
351
|
+
let e = De;
|
|
352
|
+
De = !1;
|
|
353
353
|
try {
|
|
354
354
|
let r = n(this);
|
|
355
|
-
return
|
|
355
|
+
return De ? delete this[t] : Object.defineProperty(this, t, {
|
|
356
356
|
configurable: !0,
|
|
357
357
|
writable: !0,
|
|
358
358
|
value: r
|
|
359
|
-
}),
|
|
359
|
+
}), De ||= e, r;
|
|
360
360
|
} catch (n) {
|
|
361
|
-
throw delete this[t],
|
|
361
|
+
throw delete this[t], De ||= e, n;
|
|
362
362
|
}
|
|
363
363
|
},
|
|
364
364
|
set(e) {
|
|
@@ -371,7 +371,7 @@ function S(e, t, n) {
|
|
|
371
371
|
});
|
|
372
372
|
}
|
|
373
373
|
function ke(e, t, n, r) {
|
|
374
|
-
let i =
|
|
374
|
+
let i = Te(e, t);
|
|
375
375
|
i && Object.defineProperty(i, t, {
|
|
376
376
|
configurable: !0,
|
|
377
377
|
get() {
|
|
@@ -444,7 +444,7 @@ function C(e, t, n, r) {
|
|
|
444
444
|
let e = Object.getPrototypeOf(n), t = n._zod.constr.prototype, r = e;
|
|
445
445
|
for (; r && r !== t;) r = Object.getPrototypeOf(r);
|
|
446
446
|
let i = r ?? e;
|
|
447
|
-
s.has(i) || (s.add(i),
|
|
447
|
+
s.has(i) || (s.add(i), Se(i, o));
|
|
448
448
|
}
|
|
449
449
|
let i = d.prototype;
|
|
450
450
|
for (let e in i) Object.prototype.hasOwnProperty.call(i, e) && (e in n || (n[e] = i[e].bind(n)));
|
|
@@ -587,7 +587,7 @@ var Ze = (e) => {
|
|
|
587
587
|
}, o);
|
|
588
588
|
if (s instanceof Promise) throw new Ie();
|
|
589
589
|
if (s.issues.length) {
|
|
590
|
-
let n = new ((a?.Err) ?? e)(s.issues.map((e) =>
|
|
590
|
+
let n = new ((a?.Err) ?? e)(s.issues.map((e) => b(e, o, T())));
|
|
591
591
|
throw p(n, a?.callee ?? t), n;
|
|
592
592
|
}
|
|
593
593
|
return s.value;
|
|
@@ -603,7 +603,7 @@ var Ze = (e) => {
|
|
|
603
603
|
issues: []
|
|
604
604
|
}, o);
|
|
605
605
|
if (s instanceof Promise && (s = await s), s.issues.length) {
|
|
606
|
-
let n = new ((a?.Err) ?? e)(s.issues.map((e) =>
|
|
606
|
+
let n = new ((a?.Err) ?? e)(s.issues.map((e) => b(e, o, T())));
|
|
607
607
|
throw p(n, a?.callee ?? t), n;
|
|
608
608
|
}
|
|
609
609
|
return s.value;
|
|
@@ -620,7 +620,7 @@ var Ze = (e) => {
|
|
|
620
620
|
if (a instanceof Promise) throw new Ie();
|
|
621
621
|
return a.issues.length ? {
|
|
622
622
|
success: !1,
|
|
623
|
-
error: new (e ?? Ge)(a.issues.map((e) =>
|
|
623
|
+
error: new (e ?? Ge)(a.issues.map((e) => b(e, i, T())))
|
|
624
624
|
} : {
|
|
625
625
|
success: !0,
|
|
626
626
|
data: a.value
|
|
@@ -635,7 +635,7 @@ var Ze = (e) => {
|
|
|
635
635
|
}, i);
|
|
636
636
|
return a instanceof Promise && (a = await a), a.issues.length ? {
|
|
637
637
|
success: !1,
|
|
638
|
-
error: new e(a.issues.map((e) =>
|
|
638
|
+
error: new e(a.issues.map((e) => b(e, i, T())))
|
|
639
639
|
} : {
|
|
640
640
|
success: !0,
|
|
641
641
|
data: a.value
|
|
@@ -835,8 +835,8 @@ var Rt = (e) => {
|
|
|
835
835
|
t.maximum < n && (e._zod.bag.maximum = t.maximum);
|
|
836
836
|
}), e._zod.check = (n) => {
|
|
837
837
|
let r = n.value, i = r.length;
|
|
838
|
-
if ((typeof r == "string" && i > t.maximum ?
|
|
839
|
-
let a =
|
|
838
|
+
if ((typeof r == "string" && i > t.maximum ? ve(r) : i) <= t.maximum) return;
|
|
839
|
+
let a = ye(r);
|
|
840
840
|
n.issues.push({
|
|
841
841
|
origin: a,
|
|
842
842
|
code: "too_big",
|
|
@@ -854,8 +854,8 @@ var Rt = (e) => {
|
|
|
854
854
|
t.minimum > n && (e._zod.bag.minimum = t.minimum);
|
|
855
855
|
}), e._zod.check = (n) => {
|
|
856
856
|
let r = n.value, i = r.length;
|
|
857
|
-
if ((typeof r == "string" && i >= t.minimum && i < t.minimum * 2 ?
|
|
858
|
-
let a =
|
|
857
|
+
if ((typeof r == "string" && i >= t.minimum && i < t.minimum * 2 ? ve(r) : i) >= t.minimum) return;
|
|
858
|
+
let a = ye(r);
|
|
859
859
|
n.issues.push({
|
|
860
860
|
origin: a,
|
|
861
861
|
code: "too_small",
|
|
@@ -872,9 +872,9 @@ var Rt = (e) => {
|
|
|
872
872
|
let n = e._zod.bag;
|
|
873
873
|
n.minimum = t.length, n.maximum = t.length, n.length = t.length;
|
|
874
874
|
}), e._zod.check = (n) => {
|
|
875
|
-
let r = n.value, i = r.length, a = typeof r == "string" && i >= t.length && i <= t.length * 2 ?
|
|
875
|
+
let r = n.value, i = r.length, a = typeof r == "string" && i >= t.length && i <= t.length * 2 ? ve(r) : i;
|
|
876
876
|
if (a === t.length) return;
|
|
877
|
-
let o =
|
|
877
|
+
let o = ye(r), s = a > t.length;
|
|
878
878
|
n.issues.push({
|
|
879
879
|
origin: o,
|
|
880
880
|
...s ? {
|
|
@@ -1020,11 +1020,11 @@ var Rt = (e) => {
|
|
|
1020
1020
|
let n = t.issues.length, s = o._zod.check(t);
|
|
1021
1021
|
if (s instanceof Promise && r?.async === !1) throw new Ie();
|
|
1022
1022
|
if (a || s instanceof Promise) a = (a ?? Promise.resolve()).then(async () => {
|
|
1023
|
-
await s, t.issues.length !== n && (
|
|
1023
|
+
await s, t.issues.length !== n && (ge(t.issues, n, e), i ||= v(t, n));
|
|
1024
1024
|
});
|
|
1025
1025
|
else {
|
|
1026
1026
|
if (t.issues.length === n) continue;
|
|
1027
|
-
|
|
1027
|
+
ge(t.issues, n, e), i ||= v(t, n);
|
|
1028
1028
|
}
|
|
1029
1029
|
}
|
|
1030
1030
|
return a ? a.then(() => t) : t;
|
|
@@ -1059,10 +1059,10 @@ var Rt = (e) => {
|
|
|
1059
1059
|
}
|
|
1060
1060
|
}, {
|
|
1061
1061
|
get "~standard"() {
|
|
1062
|
-
return
|
|
1062
|
+
return Ce(this, "~standard", fn(this));
|
|
1063
1063
|
},
|
|
1064
1064
|
set "~standard"(e) {
|
|
1065
|
-
|
|
1065
|
+
x(this, "~standard", e);
|
|
1066
1066
|
}
|
|
1067
1067
|
}), dn = (e) => e.success ? { value: e.data } : { issues: e.error?.issues };
|
|
1068
1068
|
function fn(e) {
|
|
@@ -1364,7 +1364,7 @@ var qn = /*@__PURE__*/ C("$ZodJWT", (e, t) => {
|
|
|
1364
1364
|
}), t);
|
|
1365
1365
|
});
|
|
1366
1366
|
function er(e, t, n) {
|
|
1367
|
-
e.issues.length && t.issues.push(...
|
|
1367
|
+
e.issues.length && t.issues.push(...y(n, e.issues)), t.value[n] = e.value;
|
|
1368
1368
|
}
|
|
1369
1369
|
var tr = /*@__PURE__*/ C("$ZodArray", (e, t) => {
|
|
1370
1370
|
D.init(e, t);
|
|
@@ -1394,7 +1394,7 @@ function nr(e, t, n, r, i, a) {
|
|
|
1394
1394
|
if (!(!o && s && i === "optional")) {
|
|
1395
1395
|
if (e.issues.length) {
|
|
1396
1396
|
if (i !== void 0 && s && !o) return;
|
|
1397
|
-
t.issues.push(...
|
|
1397
|
+
t.issues.push(...y(n, e.issues));
|
|
1398
1398
|
}
|
|
1399
1399
|
if (!o && i === void 0) {
|
|
1400
1400
|
e.issues.length || t.issues.push({
|
|
@@ -1577,7 +1577,7 @@ function lr(e, t, n, r) {
|
|
|
1577
1577
|
code: "invalid_union",
|
|
1578
1578
|
input: t.value,
|
|
1579
1579
|
inst: n,
|
|
1580
|
-
errors: e.map((e) => e.issues.map((e) =>
|
|
1580
|
+
errors: e.map((e) => e.issues.map((e) => b(e, r, T())))
|
|
1581
1581
|
}), t);
|
|
1582
1582
|
}
|
|
1583
1583
|
var ur = /*@__PURE__*/ C("$ZodUnion", (e, t) => {
|
|
@@ -1722,7 +1722,7 @@ var mr = /*@__PURE__*/ C("$ZodRecord", (e, t) => {
|
|
|
1722
1722
|
r.issues.push({
|
|
1723
1723
|
code: "invalid_key",
|
|
1724
1724
|
origin: "record",
|
|
1725
|
-
issues: s.issues.map((e) =>
|
|
1725
|
+
issues: s.issues.map((e) => b(e, i, T())),
|
|
1726
1726
|
input: n,
|
|
1727
1727
|
path: [n],
|
|
1728
1728
|
inst: e
|
|
@@ -1736,8 +1736,8 @@ var mr = /*@__PURE__*/ C("$ZodRecord", (e, t) => {
|
|
|
1736
1736
|
issues: []
|
|
1737
1737
|
}, i);
|
|
1738
1738
|
u instanceof Promise ? o.push(u.then((e) => {
|
|
1739
|
-
e.issues.length && r.issues.push(...
|
|
1740
|
-
})) : (u.issues.length && r.issues.push(...
|
|
1739
|
+
e.issues.length && r.issues.push(...y(n, e.issues)), r.value[l] = e.value;
|
|
1740
|
+
})) : (u.issues.length && r.issues.push(...y(n, u.issues)), r.value[l] = u.value);
|
|
1741
1741
|
}
|
|
1742
1742
|
let l;
|
|
1743
1743
|
for (let e in a) if (!c.has(e)) {
|
|
@@ -1775,7 +1775,7 @@ var mr = /*@__PURE__*/ C("$ZodRecord", (e, t) => {
|
|
|
1775
1775
|
t.mode === "loose" ? r.value[n] = a[n] : s ? (c ??= [], c.push(n)) : r.issues.push({
|
|
1776
1776
|
code: "invalid_key",
|
|
1777
1777
|
origin: "record",
|
|
1778
|
-
issues: l.issues.map((e) =>
|
|
1778
|
+
issues: l.issues.map((e) => b(e, i, T())),
|
|
1779
1779
|
input: n,
|
|
1780
1780
|
path: [n],
|
|
1781
1781
|
inst: e
|
|
@@ -1789,8 +1789,8 @@ var mr = /*@__PURE__*/ C("$ZodRecord", (e, t) => {
|
|
|
1789
1789
|
issues: []
|
|
1790
1790
|
}, i);
|
|
1791
1791
|
d instanceof Promise ? o.push(d.then((e) => {
|
|
1792
|
-
e.issues.length && r.issues.push(...
|
|
1793
|
-
})) : (d.issues.length && r.issues.push(...
|
|
1792
|
+
e.issues.length && r.issues.push(...y(n, e.issues)), r.value[u] = e.value;
|
|
1793
|
+
})) : (d.issues.length && r.issues.push(...y(n, d.issues)), r.value[u] = d.value);
|
|
1794
1794
|
}
|
|
1795
1795
|
c && c.length > 0 && r.issues.push({
|
|
1796
1796
|
code: "unrecognized_keys",
|
|
@@ -1899,7 +1899,7 @@ function Dr(e, t, n, r) {
|
|
|
1899
1899
|
return t.issues.length ? (e.value = n.catchValue({
|
|
1900
1900
|
...t,
|
|
1901
1901
|
value: e.value,
|
|
1902
|
-
error: { issues: t.issues.map((e) =>
|
|
1902
|
+
error: { issues: t.issues.map((e) => b(e, r, T())) },
|
|
1903
1903
|
input: e.value
|
|
1904
1904
|
}), e) : (e.value = t.value, t.memo && (e.memo = !0), e);
|
|
1905
1905
|
}
|
|
@@ -1959,7 +1959,7 @@ function Fr(e, t, n, r) {
|
|
|
1959
1959
|
path: [...r._zod.def.path ?? []],
|
|
1960
1960
|
continue: !r._zod.def.abort
|
|
1961
1961
|
};
|
|
1962
|
-
r._zod.def.params && (e.params = r._zod.def.params), t.issues.push(
|
|
1962
|
+
r._zod.def.params && (e.params = r._zod.def.params), t.issues.push(xe(e));
|
|
1963
1963
|
}
|
|
1964
1964
|
}
|
|
1965
1965
|
//#endregion
|
|
@@ -2185,7 +2185,7 @@ var Jr = () => {
|
|
|
2185
2185
|
}
|
|
2186
2186
|
return (e) => {
|
|
2187
2187
|
switch (e.code) {
|
|
2188
|
-
case "invalid_type": return `Invalid input: expected ${a(e.expected)}, received ${a(
|
|
2188
|
+
case "invalid_type": return `Invalid input: expected ${a(e.expected)}, received ${a(be(e.input), e.input)}`;
|
|
2189
2189
|
case "invalid_value": return e.values.length === 1 ? `Invalid input: expected ${ie(e.values[0])}` : `Invalid option: expected one of ${t(e.values, "|")}`;
|
|
2190
2190
|
case "too_big": {
|
|
2191
2191
|
let t = e.exact ? "exactly " : e.inclusive ? "<=" : "<", r = n(e.origin);
|
|
@@ -2686,34 +2686,34 @@ function Ki(e, t) {
|
|
|
2686
2686
|
});
|
|
2687
2687
|
}
|
|
2688
2688
|
// @__NO_SIDE_EFFECTS__
|
|
2689
|
-
function
|
|
2689
|
+
function qi(e) {
|
|
2690
2690
|
return new cn({
|
|
2691
2691
|
check: "overwrite",
|
|
2692
2692
|
tx: e
|
|
2693
2693
|
});
|
|
2694
2694
|
}
|
|
2695
2695
|
// @__NO_SIDE_EFFECTS__
|
|
2696
|
-
function
|
|
2697
|
-
return /* @__PURE__ */
|
|
2698
|
-
}
|
|
2699
|
-
// @__NO_SIDE_EFFECTS__
|
|
2700
|
-
function Ji() {
|
|
2701
|
-
return /* @__PURE__ */ k((e) => e.trim());
|
|
2696
|
+
function Ji(e) {
|
|
2697
|
+
return /* @__PURE__ */ qi((t) => t.normalize(e));
|
|
2702
2698
|
}
|
|
2703
2699
|
// @__NO_SIDE_EFFECTS__
|
|
2704
2700
|
function Yi() {
|
|
2705
|
-
return /* @__PURE__ */
|
|
2701
|
+
return /* @__PURE__ */ qi((e) => e.trim());
|
|
2706
2702
|
}
|
|
2707
2703
|
// @__NO_SIDE_EFFECTS__
|
|
2708
2704
|
function Xi() {
|
|
2709
|
-
return /* @__PURE__ */
|
|
2705
|
+
return /* @__PURE__ */ qi((e) => e.toLowerCase());
|
|
2710
2706
|
}
|
|
2711
2707
|
// @__NO_SIDE_EFFECTS__
|
|
2712
2708
|
function Zi() {
|
|
2713
|
-
return /* @__PURE__ */
|
|
2709
|
+
return /* @__PURE__ */ qi((e) => e.toUpperCase());
|
|
2714
2710
|
}
|
|
2715
2711
|
// @__NO_SIDE_EFFECTS__
|
|
2716
|
-
function Qi(
|
|
2712
|
+
function Qi() {
|
|
2713
|
+
return /* @__PURE__ */ qi((e) => f(e));
|
|
2714
|
+
}
|
|
2715
|
+
// @__NO_SIDE_EFFECTS__
|
|
2716
|
+
function $i(e, t, n) {
|
|
2717
2717
|
return new e({
|
|
2718
2718
|
type: "array",
|
|
2719
2719
|
element: t,
|
|
@@ -2721,7 +2721,7 @@ function Qi(e, t, n) {
|
|
|
2721
2721
|
});
|
|
2722
2722
|
}
|
|
2723
2723
|
// @__NO_SIDE_EFFECTS__
|
|
2724
|
-
function
|
|
2724
|
+
function ea(e, t, n) {
|
|
2725
2725
|
return new e({
|
|
2726
2726
|
type: "custom",
|
|
2727
2727
|
check: "custom",
|
|
@@ -2730,18 +2730,18 @@ function $i(e, t, n) {
|
|
|
2730
2730
|
});
|
|
2731
2731
|
}
|
|
2732
2732
|
// @__NO_SIDE_EFFECTS__
|
|
2733
|
-
function
|
|
2734
|
-
let n = /* @__PURE__ */
|
|
2735
|
-
if (typeof e == "string") t.issues.push(
|
|
2733
|
+
function ta(e, t) {
|
|
2734
|
+
let n = /* @__PURE__ */ na((t) => (t.addIssue = (e) => {
|
|
2735
|
+
if (typeof e == "string") t.issues.push(xe(e, t.value, n._zod.def));
|
|
2736
2736
|
else {
|
|
2737
2737
|
let r = e;
|
|
2738
|
-
r.fatal && (r.continue = !1), r.code ??= "custom", "input" in r || (r.input = t.value), r.inst ??= n, r.continue ??= !n._zod.def.abort, t.issues.push(
|
|
2738
|
+
r.fatal && (r.continue = !1), r.code ??= "custom", "input" in r || (r.input = t.value), r.inst ??= n, r.continue ??= !n._zod.def.abort, t.issues.push(xe(r));
|
|
2739
2739
|
}
|
|
2740
2740
|
}, e(t.value, t)), t);
|
|
2741
2741
|
return n;
|
|
2742
2742
|
}
|
|
2743
2743
|
// @__NO_SIDE_EFFECTS__
|
|
2744
|
-
function
|
|
2744
|
+
function na(e, t) {
|
|
2745
2745
|
let n = new E({
|
|
2746
2746
|
check: "custom",
|
|
2747
2747
|
..._(t)
|
|
@@ -2750,11 +2750,11 @@ function ta(e, t) {
|
|
|
2750
2750
|
}
|
|
2751
2751
|
//#endregion
|
|
2752
2752
|
//#region ../../node_modules/.bun/zod@4.5.4/node_modules/zod/v4/core/to-json-schema.js
|
|
2753
|
-
function
|
|
2753
|
+
function ra(e, ...t) {
|
|
2754
2754
|
for (let n of t) for (let t of Reflect.ownKeys(n)) Object.prototype.propertyIsEnumerable.call(n, t) && l(e, t, n[t]);
|
|
2755
2755
|
return e;
|
|
2756
2756
|
}
|
|
2757
|
-
function
|
|
2757
|
+
function ia(e) {
|
|
2758
2758
|
let t = e?.target ?? "draft-2020-12";
|
|
2759
2759
|
return t === "draft-4" && (t = "draft-04"), t === "draft-7" && (t = "draft-07"), {
|
|
2760
2760
|
processors: e.processors ?? {},
|
|
@@ -2774,7 +2774,7 @@ function ra(e) {
|
|
|
2774
2774
|
external: e?.external ?? void 0
|
|
2775
2775
|
};
|
|
2776
2776
|
}
|
|
2777
|
-
function
|
|
2777
|
+
function k(e, t, n, r, i) {
|
|
2778
2778
|
let a = typeof t.unrepresentable == "function" ? t.unrepresentable({
|
|
2779
2779
|
zodSchema: e,
|
|
2780
2780
|
path: r.path,
|
|
@@ -2784,7 +2784,7 @@ function A(e, t, n, r, i) {
|
|
|
2784
2784
|
if (a === void 0 || a === "throw") throw Error(i);
|
|
2785
2785
|
return Object.assign(n, a), !0;
|
|
2786
2786
|
}
|
|
2787
|
-
function
|
|
2787
|
+
function A(e, t, n = {
|
|
2788
2788
|
path: [],
|
|
2789
2789
|
schemaPath: []
|
|
2790
2790
|
}) {
|
|
@@ -2813,15 +2813,15 @@ function j(e, t, n = {
|
|
|
2813
2813
|
a(e, t, n, r);
|
|
2814
2814
|
}
|
|
2815
2815
|
let a = e._zod.parent;
|
|
2816
|
-
a && (o.ref ||= a,
|
|
2816
|
+
a && (o.ref ||= a, A(a, t, r), t.seen.get(a).isParent = !0);
|
|
2817
2817
|
}
|
|
2818
2818
|
let c = t.metadataRegistry.get(e);
|
|
2819
|
-
return c &&
|
|
2819
|
+
return c && ra(o.schema, c), t.io === "input" && j(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;
|
|
2820
2820
|
}
|
|
2821
|
-
function
|
|
2821
|
+
function aa(e) {
|
|
2822
2822
|
return e.replace(/~/g, "~0").replace(/\//g, "~1");
|
|
2823
2823
|
}
|
|
2824
|
-
function
|
|
2824
|
+
function oa(e, t) {
|
|
2825
2825
|
let n = e.seen.get(t);
|
|
2826
2826
|
if (!n) throw Error("Unprocessed schema. This is a bug in Zod.");
|
|
2827
2827
|
if (e.external && e.sharedDefsExtractedFor === e.external) return;
|
|
@@ -2842,7 +2842,7 @@ function aa(e, t) {
|
|
|
2842
2842
|
let a = t[1].defId ?? t[1].schema.id ?? `schema${e.counter++}`;
|
|
2843
2843
|
return t[1].defId = a, {
|
|
2844
2844
|
defId: a,
|
|
2845
|
-
ref: `${i("__shared")}#/${r}/${
|
|
2845
|
+
ref: `${i("__shared")}#/${r}/${aa(a)}`
|
|
2846
2846
|
};
|
|
2847
2847
|
}
|
|
2848
2848
|
let i = `#/${r}/`;
|
|
@@ -2850,7 +2850,7 @@ function aa(e, t) {
|
|
|
2850
2850
|
let a = t[1].schema.id ?? `__schema${e.counter++}`;
|
|
2851
2851
|
return {
|
|
2852
2852
|
defId: a,
|
|
2853
|
-
ref: i +
|
|
2853
|
+
ref: i + aa(a)
|
|
2854
2854
|
};
|
|
2855
2855
|
}, a = (e) => {
|
|
2856
2856
|
if (e[1].schema.$ref) return;
|
|
@@ -2894,13 +2894,13 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
2894
2894
|
}
|
|
2895
2895
|
e.external && (e.sharedDefsExtractedFor = e.external);
|
|
2896
2896
|
}
|
|
2897
|
-
function
|
|
2897
|
+
function sa(e) {
|
|
2898
2898
|
let t = e.anyOf;
|
|
2899
2899
|
if (!Array.isArray(t) || t.length === 0 || e.type !== void 0) return;
|
|
2900
2900
|
let n = [];
|
|
2901
2901
|
for (let e of t) {
|
|
2902
2902
|
if (!e || typeof e != "object") return;
|
|
2903
|
-
|
|
2903
|
+
sa(e);
|
|
2904
2904
|
let t = Object.keys(e);
|
|
2905
2905
|
if (t.length !== 1 || t[0] !== "type") return;
|
|
2906
2906
|
let r = e.type;
|
|
@@ -2911,21 +2911,21 @@ function oa(e) {
|
|
|
2911
2911
|
}
|
|
2912
2912
|
delete e.anyOf, e.type = n.length === 1 ? n[0] : n;
|
|
2913
2913
|
}
|
|
2914
|
-
var
|
|
2914
|
+
var ca = /* @__PURE__ */ new Set([
|
|
2915
2915
|
"type",
|
|
2916
2916
|
"properties",
|
|
2917
2917
|
"required",
|
|
2918
2918
|
"additionalProperties"
|
|
2919
|
-
]),
|
|
2920
|
-
function
|
|
2919
|
+
]), la = ["oneOf", "anyOf"];
|
|
2920
|
+
function ua(e) {
|
|
2921
2921
|
let t = e.additionalProperties;
|
|
2922
2922
|
return t === void 0 || t === !1 || typeof t != "object" || !t ? null : Object.keys(t).length ? t : null;
|
|
2923
2923
|
}
|
|
2924
|
-
function
|
|
2924
|
+
function da(e) {
|
|
2925
2925
|
let t = [];
|
|
2926
2926
|
for (let n of e) {
|
|
2927
2927
|
if (typeof n != "object" || n.type !== "object") return null;
|
|
2928
|
-
for (let e in n) if (!
|
|
2928
|
+
for (let e in n) if (!ca.has(e)) return null;
|
|
2929
2929
|
t.push(n);
|
|
2930
2930
|
}
|
|
2931
2931
|
let n = {}, r = /* @__PURE__ */ new Set();
|
|
@@ -2934,10 +2934,10 @@ function ua(e) {
|
|
|
2934
2934
|
if (Object.prototype.hasOwnProperty.call(n, r)) continue;
|
|
2935
2935
|
let e = [];
|
|
2936
2936
|
for (let n of t) {
|
|
2937
|
-
let t = n.properties?.[r] ??
|
|
2937
|
+
let t = n.properties?.[r] ?? ua(n);
|
|
2938
2938
|
t != null && (e.some((e) => JSON.stringify(e) === JSON.stringify(t)) || e.push(t));
|
|
2939
2939
|
}
|
|
2940
|
-
l(n, r, e.length === 1 ? e[0] :
|
|
2940
|
+
l(n, r, e.length === 1 ? e[0] : da(e) ?? { allOf: e });
|
|
2941
2941
|
}
|
|
2942
2942
|
for (let t of e.required ?? []) r.add(t);
|
|
2943
2943
|
}
|
|
@@ -2949,29 +2949,29 @@ function ua(e) {
|
|
|
2949
2949
|
else {
|
|
2950
2950
|
let e = [];
|
|
2951
2951
|
for (let n of t) {
|
|
2952
|
-
let t =
|
|
2952
|
+
let t = ua(n);
|
|
2953
2953
|
t && !e.some((e) => JSON.stringify(e) === JSON.stringify(t)) && e.push(t);
|
|
2954
2954
|
}
|
|
2955
2955
|
e.length === 1 ? i.additionalProperties = e[0] : e.length > 1 && (i.additionalProperties = { allOf: e });
|
|
2956
2956
|
}
|
|
2957
2957
|
return i;
|
|
2958
2958
|
}
|
|
2959
|
-
function
|
|
2959
|
+
function fa(e) {
|
|
2960
2960
|
let t = e.allOf;
|
|
2961
2961
|
if (!Array.isArray(t) || t.length < 2) return;
|
|
2962
|
-
for (let t of
|
|
2963
|
-
let n = t.filter((e) =>
|
|
2964
|
-
if (!n.length) r =
|
|
2962
|
+
for (let t of ca) if (t in e) return;
|
|
2963
|
+
let n = t.filter((e) => la.some((t) => Array.isArray(e[t]))), r = null;
|
|
2964
|
+
if (!n.length) r = da(t);
|
|
2965
2965
|
else {
|
|
2966
|
-
let e = n[0], i =
|
|
2966
|
+
let e = n[0], i = la.find((t) => Array.isArray(e[t]));
|
|
2967
2967
|
if (Object.keys(e).length !== 1) return;
|
|
2968
|
-
let a = t.filter((t) => t !== e), o = e[i].map((e) =>
|
|
2968
|
+
let a = t.filter((t) => t !== e), o = e[i].map((e) => da([...a, e]));
|
|
2969
2969
|
if (o.some((e) => !e)) return;
|
|
2970
2970
|
r = { [i]: o };
|
|
2971
2971
|
}
|
|
2972
|
-
r && (delete e.allOf,
|
|
2972
|
+
r && (delete e.allOf, ra(e, r));
|
|
2973
2973
|
}
|
|
2974
|
-
function
|
|
2974
|
+
function pa(e, t) {
|
|
2975
2975
|
let n = e.seen.get(t);
|
|
2976
2976
|
if (!n) throw Error("Unprocessed schema. This is a bug in Zod.");
|
|
2977
2977
|
let r = (t) => {
|
|
@@ -2981,7 +2981,7 @@ function fa(e, t) {
|
|
|
2981
2981
|
if (n.ref = null, o) {
|
|
2982
2982
|
r(o);
|
|
2983
2983
|
let n = e.seen.get(o), s = n.schema;
|
|
2984
|
-
if (s.$ref && (e.target === "draft-07" || e.target === "draft-04" || e.target === "openapi-3.0") ? (i.allOf = i.allOf ?? [], i.allOf.push(s)) :
|
|
2984
|
+
if (s.$ref && (e.target === "draft-07" || e.target === "draft-04" || e.target === "openapi-3.0") ? (i.allOf = i.allOf ?? [], i.allOf.push(s)) : ra(i, s), ra(i, a), t._zod.parent === o) for (let e in i) e !== "$ref" && e !== "allOf" && (e in a || delete i[e]);
|
|
2985
2985
|
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];
|
|
2986
2986
|
}
|
|
2987
2987
|
let s = t._zod.parent;
|
|
@@ -2998,7 +2998,7 @@ function fa(e, t) {
|
|
|
2998
2998
|
};
|
|
2999
2999
|
if (!e.external || e.sharedEmitDoneFor !== e.external) {
|
|
3000
3000
|
for (let t of [...e.seen.entries()].reverse()) r(t[0]);
|
|
3001
|
-
if (e.target !== "openapi-3.0") for (let t of e.seen.entries())
|
|
3001
|
+
if (e.target !== "openapi-3.0") for (let t of e.seen.entries()) sa(t[1].def ?? t[1].schema);
|
|
3002
3002
|
for (let t of e.deferred) t();
|
|
3003
3003
|
if (e.intersections.length) {
|
|
3004
3004
|
let t = /* @__PURE__ */ new Map();
|
|
@@ -3008,7 +3008,7 @@ function fa(e, t) {
|
|
|
3008
3008
|
let r = t.get(n);
|
|
3009
3009
|
r ? r.push(e) : t.set(n, [e]);
|
|
3010
3010
|
}
|
|
3011
|
-
for (let n of e.intersections) for (let e of t.get(n) ?? [])
|
|
3011
|
+
for (let n of e.intersections) for (let e of t.get(n) ?? []) fa(e);
|
|
3012
3012
|
}
|
|
3013
3013
|
}
|
|
3014
3014
|
let i = {};
|
|
@@ -3017,7 +3017,7 @@ function fa(e, t) {
|
|
|
3017
3017
|
if (!n) throw Error("Schema is missing an `id` property");
|
|
3018
3018
|
i.$id = e.external.uri(n);
|
|
3019
3019
|
}
|
|
3020
|
-
|
|
3020
|
+
ra(i, n.defId ? n.schema : n.def ?? n.schema);
|
|
3021
3021
|
let a = e.metadataRegistry.get(t)?.id;
|
|
3022
3022
|
a !== void 0 && i.id === a && delete i.id;
|
|
3023
3023
|
let o = e.external?.defs ?? {};
|
|
@@ -3032,8 +3032,8 @@ function fa(e, t) {
|
|
|
3032
3032
|
value: {
|
|
3033
3033
|
...t["~standard"],
|
|
3034
3034
|
jsonSchema: {
|
|
3035
|
-
input:
|
|
3036
|
-
output:
|
|
3035
|
+
input: ha(t, "input", e.processors),
|
|
3036
|
+
output: ha(t, "output", e.processors)
|
|
3037
3037
|
}
|
|
3038
3038
|
},
|
|
3039
3039
|
enumerable: !1,
|
|
@@ -3043,83 +3043,83 @@ function fa(e, t) {
|
|
|
3043
3043
|
throw Error("Error converting schema to JSON.");
|
|
3044
3044
|
}
|
|
3045
3045
|
}
|
|
3046
|
-
function
|
|
3046
|
+
function j(e, t) {
|
|
3047
3047
|
let n = t ?? { seen: /* @__PURE__ */ new Set() };
|
|
3048
3048
|
if (n.seen.has(e)) return !1;
|
|
3049
3049
|
n.seen.add(e);
|
|
3050
3050
|
let r = e._zod.def;
|
|
3051
3051
|
if (r.type === "transform") return !0;
|
|
3052
|
-
if (r.type === "array") return
|
|
3053
|
-
if (r.type === "set") return
|
|
3054
|
-
if (r.type === "lazy") return
|
|
3055
|
-
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
|
|
3056
|
-
if (r.type === "intersection") return
|
|
3057
|
-
if (r.type === "record" || r.type === "map") return
|
|
3058
|
-
if (r.type === "pipe") return e._zod.traits.has("$ZodCodec") ? !0 :
|
|
3052
|
+
if (r.type === "array") return j(r.element, n);
|
|
3053
|
+
if (r.type === "set") return j(r.valueType, n);
|
|
3054
|
+
if (r.type === "lazy") return j(r.getter(), n);
|
|
3055
|
+
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 j(r.innerType, n);
|
|
3056
|
+
if (r.type === "intersection") return j(r.left, n) || j(r.right, n);
|
|
3057
|
+
if (r.type === "record" || r.type === "map") return j(r.keyType, n) || j(r.valueType, n);
|
|
3058
|
+
if (r.type === "pipe") return e._zod.traits.has("$ZodCodec") ? !0 : j(r.in, n) || j(r.out, n);
|
|
3059
3059
|
if (r.type === "object") {
|
|
3060
|
-
for (let e in r.shape) if (
|
|
3060
|
+
for (let e in r.shape) if (j(r.shape[e], n)) return !0;
|
|
3061
3061
|
return !1;
|
|
3062
3062
|
}
|
|
3063
3063
|
if (r.type === "union") {
|
|
3064
|
-
for (let e of r.options) if (
|
|
3064
|
+
for (let e of r.options) if (j(e, n)) return !0;
|
|
3065
3065
|
return !1;
|
|
3066
3066
|
}
|
|
3067
3067
|
if (r.type === "tuple") {
|
|
3068
|
-
for (let e of r.items) if (
|
|
3069
|
-
return !!(r.rest &&
|
|
3068
|
+
for (let e of r.items) if (j(e, n)) return !0;
|
|
3069
|
+
return !!(r.rest && j(r.rest, n));
|
|
3070
3070
|
}
|
|
3071
3071
|
return !1;
|
|
3072
3072
|
}
|
|
3073
|
-
var
|
|
3074
|
-
let r =
|
|
3073
|
+
var ma = (e, t = {}) => (n) => {
|
|
3074
|
+
let r = ia({
|
|
3075
3075
|
...n,
|
|
3076
3076
|
processors: t
|
|
3077
3077
|
});
|
|
3078
|
-
return
|
|
3079
|
-
},
|
|
3080
|
-
let { libraryOptions: i, target: a } = r ?? {}, o =
|
|
3078
|
+
return A(e, r), oa(r, e), pa(r, e);
|
|
3079
|
+
}, ha = (e, t, n = {}) => (r) => {
|
|
3080
|
+
let { libraryOptions: i, target: a } = r ?? {}, o = ia({
|
|
3081
3081
|
...i ?? {},
|
|
3082
3082
|
target: a,
|
|
3083
3083
|
io: t,
|
|
3084
3084
|
processors: n
|
|
3085
3085
|
});
|
|
3086
|
-
return
|
|
3087
|
-
},
|
|
3086
|
+
return A(e, o), oa(o, e), pa(o, e);
|
|
3087
|
+
}, ga = {
|
|
3088
3088
|
guid: "uuid",
|
|
3089
3089
|
url: "uri",
|
|
3090
3090
|
datetime: "date-time",
|
|
3091
3091
|
json_string: "json-string",
|
|
3092
3092
|
regex: ""
|
|
3093
|
-
},
|
|
3093
|
+
}, _a = (e, t, n, r) => {
|
|
3094
3094
|
let i = n;
|
|
3095
3095
|
i.type = "string";
|
|
3096
3096
|
let { minimum: a, maximum: o, format: s, patterns: c, contentEncoding: l, laxFormat: u } = e._zod.bag;
|
|
3097
|
-
if (typeof a == "number" && (i.minLength = a), typeof o == "number" && (i.maxLength = o), s && (i.format =
|
|
3097
|
+
if (typeof a == "number" && (i.minLength = a), typeof o == "number" && (i.maxLength = o), s && (i.format = ga[s] ?? s, i.format === "" && delete i.format, (s === "time" || u) && delete i.format), l && (i.contentEncoding = l), c && c.size > 0) {
|
|
3098
3098
|
let e = [...c];
|
|
3099
3099
|
e.length === 1 ? i.pattern = e[0].source : e.length > 1 && (i.allOf = [...e.map((e) => ({
|
|
3100
3100
|
...t.target === "draft-07" || t.target === "draft-04" || t.target === "openapi-3.0" ? { type: "string" } : {},
|
|
3101
3101
|
pattern: e.source
|
|
3102
3102
|
}))]);
|
|
3103
3103
|
}
|
|
3104
|
-
},
|
|
3104
|
+
}, va = (e, t, n, r) => {
|
|
3105
3105
|
let i = n, { minimum: a, maximum: o, format: s, multipleOf: c, exclusiveMaximum: l, exclusiveMinimum: u } = e._zod.bag;
|
|
3106
3106
|
i.type = typeof s == "string" && s.includes("int") ? "integer" : "number";
|
|
3107
3107
|
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";
|
|
3108
|
-
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) :
|
|
3109
|
-
}, va = (e, t, n, r) => {
|
|
3110
|
-
n.type = "boolean";
|
|
3108
|
+
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) : k(e, t, i, r, `A multipleOf divisor of ${c} cannot be represented in JSON Schema`));
|
|
3111
3109
|
}, ya = (e, t, n, r) => {
|
|
3112
|
-
|
|
3110
|
+
n.type = "boolean";
|
|
3113
3111
|
}, ba = (e, t, n, r) => {
|
|
3112
|
+
t.target === "openapi-3.0" ? (n.type = "string", n.nullable = !0, n.enum = [null]) : n.type = "null";
|
|
3113
|
+
}, xa = (e, t, n, r) => {
|
|
3114
3114
|
n.not = {};
|
|
3115
|
-
},
|
|
3115
|
+
}, Sa = (t, n, r, i) => {
|
|
3116
3116
|
let a = t._zod.def, o = e(a.entries);
|
|
3117
3117
|
if (o.length === 0) {
|
|
3118
3118
|
r.not = {};
|
|
3119
3119
|
return;
|
|
3120
3120
|
}
|
|
3121
3121
|
o.every((e) => typeof e == "number") && (r.type = "number"), o.every((e) => typeof e == "string") && (r.type = "string"), r.enum = o;
|
|
3122
|
-
},
|
|
3122
|
+
}, Ca = (e, t, n, r) => {
|
|
3123
3123
|
let i = e._zod.def;
|
|
3124
3124
|
if (i.values.length === 0) {
|
|
3125
3125
|
n.not = {};
|
|
@@ -3127,9 +3127,9 @@ var pa = (e, t = {}) => (n) => {
|
|
|
3127
3127
|
}
|
|
3128
3128
|
let a = [];
|
|
3129
3129
|
for (let o of i.values) if (o === void 0) {
|
|
3130
|
-
if (
|
|
3130
|
+
if (k(e, t, n, r, "Literal `undefined` cannot be represented in JSON Schema")) return;
|
|
3131
3131
|
} else if (typeof o == "bigint") {
|
|
3132
|
-
if (
|
|
3132
|
+
if (k(e, t, n, r, "BigInt literals cannot be represented in JSON Schema")) return;
|
|
3133
3133
|
a.push(Number(o));
|
|
3134
3134
|
} else a.push(o);
|
|
3135
3135
|
if (a.length !== 0) {
|
|
@@ -3138,26 +3138,26 @@ var pa = (e, t = {}) => (n) => {
|
|
|
3138
3138
|
n.type = e === null ? "null" : typeof e, t.target === "draft-04" || t.target === "openapi-3.0" ? n.enum = [e] : n.const = e;
|
|
3139
3139
|
} 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;
|
|
3140
3140
|
}
|
|
3141
|
-
}, Ca = (e, t, n, r) => {
|
|
3142
|
-
A(e, t, n, r, "Custom types cannot be represented in JSON Schema");
|
|
3143
3141
|
}, wa = (e, t, n, r) => {
|
|
3144
|
-
|
|
3142
|
+
k(e, t, n, r, "Custom types cannot be represented in JSON Schema");
|
|
3145
3143
|
}, Ta = (e, t, n, r) => {
|
|
3144
|
+
k(e, t, n, r, "Transforms cannot be represented in JSON Schema");
|
|
3145
|
+
}, Ea = (e, t, n, r) => {
|
|
3146
3146
|
let i = n, a = e._zod.def, { minimum: o, maximum: s } = e._zod.bag;
|
|
3147
|
-
typeof o == "number" && (i.minItems = o), typeof s == "number" && (i.maxItems = s), i.type = "array", i.items =
|
|
3147
|
+
typeof o == "number" && (i.minItems = o), typeof s == "number" && (i.maxItems = s), i.type = "array", i.items = A(a.element, t, {
|
|
3148
3148
|
...r,
|
|
3149
3149
|
path: [...r.path, "items"]
|
|
3150
3150
|
});
|
|
3151
3151
|
};
|
|
3152
|
-
function
|
|
3152
|
+
function Da(e) {
|
|
3153
3153
|
let t = e._zod.def;
|
|
3154
|
-
return t.type === "pipe" && t.in._zod.traits.has("$ZodTransform") ?
|
|
3154
|
+
return t.type === "pipe" && t.in._zod.traits.has("$ZodTransform") ? Da(t.out) : t.type === "catch" ? Da(t.innerType) : e._zod.optin;
|
|
3155
3155
|
}
|
|
3156
|
-
var
|
|
3156
|
+
var Oa = (e, t, n, r) => {
|
|
3157
3157
|
let i = n, a = e._zod.def, o = a.shape;
|
|
3158
|
-
if (Object.getOwnPropertySymbols(o).length &&
|
|
3158
|
+
if (Object.getOwnPropertySymbols(o).length && k(e, t, i, r, "Symbol keys cannot be represented in JSON Schema")) return;
|
|
3159
3159
|
i.type = "object", i.properties = {};
|
|
3160
|
-
for (let e in o) l(i.properties, e,
|
|
3160
|
+
for (let e in o) l(i.properties, e, A(o[e], t, {
|
|
3161
3161
|
...r,
|
|
3162
3162
|
path: [
|
|
3163
3163
|
...r.path,
|
|
@@ -3167,14 +3167,14 @@ var Da = (e, t, n, r) => {
|
|
|
3167
3167
|
}));
|
|
3168
3168
|
let s = new Set(Object.keys(o)), c = new Set([...s].filter((e) => {
|
|
3169
3169
|
let n = a.shape[e];
|
|
3170
|
-
return t.io === "input" ?
|
|
3170
|
+
return t.io === "input" ? Da(n) === void 0 : n._zod.optout === void 0;
|
|
3171
3171
|
}));
|
|
3172
|
-
c.size > 0 && (i.required = Array.from(c)), a.catchall?._zod.def.type === "never" ? i.additionalProperties = !1 : a.catchall ? a.catchall && (i.additionalProperties =
|
|
3172
|
+
c.size > 0 && (i.required = Array.from(c)), a.catchall?._zod.def.type === "never" ? i.additionalProperties = !1 : a.catchall ? a.catchall && (i.additionalProperties = A(a.catchall, t, {
|
|
3173
3173
|
...r,
|
|
3174
3174
|
path: [...r.path, "additionalProperties"]
|
|
3175
3175
|
})) : t.io === "output" && (i.additionalProperties = !1);
|
|
3176
|
-
},
|
|
3177
|
-
let i = e._zod.def, a = i.inclusive === !1, o = i.options.map((e, n) =>
|
|
3176
|
+
}, ka = (e, t, n, r) => {
|
|
3177
|
+
let i = e._zod.def, a = i.inclusive === !1, o = i.options.map((e, n) => A(e, t, {
|
|
3178
3178
|
...r,
|
|
3179
3179
|
path: [
|
|
3180
3180
|
...r.path,
|
|
@@ -3183,15 +3183,15 @@ var Da = (e, t, n, r) => {
|
|
|
3183
3183
|
]
|
|
3184
3184
|
}));
|
|
3185
3185
|
a ? n.oneOf = o : n.anyOf = o;
|
|
3186
|
-
},
|
|
3187
|
-
let i = e._zod.def, a =
|
|
3186
|
+
}, Aa = (e, t, n, r) => {
|
|
3187
|
+
let i = e._zod.def, a = A(i.left, t, {
|
|
3188
3188
|
...r,
|
|
3189
3189
|
path: [
|
|
3190
3190
|
...r.path,
|
|
3191
3191
|
"allOf",
|
|
3192
3192
|
0
|
|
3193
3193
|
]
|
|
3194
|
-
}), o =
|
|
3194
|
+
}), o = A(i.right, t, {
|
|
3195
3195
|
...r,
|
|
3196
3196
|
path: [
|
|
3197
3197
|
...r.path,
|
|
@@ -3201,19 +3201,19 @@ var Da = (e, t, n, r) => {
|
|
|
3201
3201
|
}), s = (e) => "allOf" in e && Object.keys(e).length === 1, c = [...s(a) ? a.allOf : [a], ...s(o) ? o.allOf : [o]];
|
|
3202
3202
|
n.allOf = c, t.intersections.push(c);
|
|
3203
3203
|
};
|
|
3204
|
-
function
|
|
3204
|
+
function ja(e, t, n) {
|
|
3205
3205
|
if (t.$ref) {
|
|
3206
3206
|
if (n.has(t)) return t;
|
|
3207
3207
|
n.add(t);
|
|
3208
3208
|
let r = e.get(t)?.def;
|
|
3209
3209
|
if (!r) return t;
|
|
3210
|
-
let i =
|
|
3210
|
+
let i = ja(e, r, n);
|
|
3211
3211
|
return i === r ? t : i;
|
|
3212
3212
|
}
|
|
3213
3213
|
for (let r of ["anyOf", "oneOf"]) {
|
|
3214
3214
|
let i = t[r];
|
|
3215
3215
|
if (!Array.isArray(i)) continue;
|
|
3216
|
-
let a = i.map((t) =>
|
|
3216
|
+
let a = i.map((t) => ja(e, t, n));
|
|
3217
3217
|
a.some((e, t) => e !== i[t]) && (t = {
|
|
3218
3218
|
...t,
|
|
3219
3219
|
[r]: a
|
|
@@ -3224,15 +3224,15 @@ function Aa(e, t, n) {
|
|
|
3224
3224
|
let { minimum: o, maximum: s, exclusiveMinimum: c, exclusiveMaximum: l, multipleOf: u, format: d, id: f, ...p } = t;
|
|
3225
3225
|
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") ? Bt : zt).source), p) : p;
|
|
3226
3226
|
}
|
|
3227
|
-
var
|
|
3228
|
-
function
|
|
3227
|
+
var Ma = /* @__PURE__ */ new WeakMap();
|
|
3228
|
+
function Na(e) {
|
|
3229
3229
|
let t = /* @__PURE__ */ new Map();
|
|
3230
3230
|
for (let n of e.seen.values()) n.def && !t.has(n.schema) && t.set(n.schema, n);
|
|
3231
3231
|
let n = /* @__PURE__ */ new Map();
|
|
3232
|
-
for (let r of
|
|
3232
|
+
for (let r of Ma.get(e) ?? []) {
|
|
3233
3233
|
let i = e.seen.get(r), a = (i?.def ?? i?.schema)?.propertyNames;
|
|
3234
3234
|
if (!a || a === !0 || n.has(a)) continue;
|
|
3235
|
-
let o =
|
|
3235
|
+
let o = ja(t, a, /* @__PURE__ */ new Set());
|
|
3236
3236
|
o !== a && n.set(a, o);
|
|
3237
3237
|
}
|
|
3238
3238
|
if (n.size) for (let t of e.seen.values()) for (let e of [t.schema, t.def]) {
|
|
@@ -3240,12 +3240,12 @@ function Ma(e) {
|
|
|
3240
3240
|
t && (e.propertyNames = t);
|
|
3241
3241
|
}
|
|
3242
3242
|
}
|
|
3243
|
-
var
|
|
3243
|
+
var Pa = (e, t, n, r) => {
|
|
3244
3244
|
let i = n, a = e._zod.def;
|
|
3245
3245
|
i.type = "object";
|
|
3246
3246
|
let o = a.keyType, s = o._zod.bag?.patterns;
|
|
3247
3247
|
if (a.mode === "loose" && s && s.size > 0) {
|
|
3248
|
-
let e =
|
|
3248
|
+
let e = A(a.valueType, t, {
|
|
3249
3249
|
...r,
|
|
3250
3250
|
path: [
|
|
3251
3251
|
...r.path,
|
|
@@ -3257,85 +3257,85 @@ var Na = (e, t, n, r) => {
|
|
|
3257
3257
|
for (let t of s) l(i.patternProperties, t.source, e);
|
|
3258
3258
|
} else {
|
|
3259
3259
|
if (t.target === "draft-07" || t.target === "draft-2020-12") {
|
|
3260
|
-
i.propertyNames =
|
|
3260
|
+
i.propertyNames = A(a.keyType, t, {
|
|
3261
3261
|
...r,
|
|
3262
3262
|
path: [...r.path, "propertyNames"]
|
|
3263
3263
|
});
|
|
3264
|
-
let n =
|
|
3265
|
-
n || (n = [],
|
|
3264
|
+
let n = Ma.get(t);
|
|
3265
|
+
n || (n = [], Ma.set(t, n), t.deferred.push(() => Na(t))), n.push(e);
|
|
3266
3266
|
}
|
|
3267
|
-
i.additionalProperties =
|
|
3267
|
+
i.additionalProperties = A(a.valueType, t, {
|
|
3268
3268
|
...r,
|
|
3269
3269
|
path: [...r.path, "additionalProperties"]
|
|
3270
3270
|
});
|
|
3271
3271
|
}
|
|
3272
|
-
let c = o._zod.values, u = t.io === "input" &&
|
|
3272
|
+
let c = o._zod.values, u = t.io === "input" && Da(a.valueType) !== void 0;
|
|
3273
3273
|
if (c && !a.partial && !u) {
|
|
3274
3274
|
let e = [...c].filter((e) => typeof e == "string" || typeof e == "number");
|
|
3275
3275
|
e.length > 0 && (i.required = e.map(String));
|
|
3276
3276
|
}
|
|
3277
|
-
}, Pa = (e, t, n, r) => {
|
|
3278
|
-
let i = e._zod.def, a = j(i.innerType, t, r), o = t.seen.get(e);
|
|
3279
|
-
t.target === "openapi-3.0" ? (o.ref = i.innerType, n.nullable = !0) : n.anyOf = [a, { type: "null" }];
|
|
3280
3277
|
}, Fa = (e, t, n, r) => {
|
|
3278
|
+
let i = e._zod.def, a = A(i.innerType, t, r), o = t.seen.get(e);
|
|
3279
|
+
t.target === "openapi-3.0" ? (o.ref = i.innerType, n.nullable = !0) : n.anyOf = [a, { type: "null" }];
|
|
3280
|
+
}, Ia = (e, t, n, r) => {
|
|
3281
3281
|
let i = e._zod.def;
|
|
3282
|
-
|
|
3282
|
+
A(i.innerType, t, r);
|
|
3283
3283
|
let a = t.seen.get(e);
|
|
3284
3284
|
a.ref = i.innerType;
|
|
3285
|
-
},
|
|
3286
|
-
function
|
|
3285
|
+
}, La = Symbol();
|
|
3286
|
+
function Ra(e, t, n, r, i) {
|
|
3287
3287
|
let a = !1, o = JSON.stringify(e, (e, t) => typeof t == "bigint" ? (a = !0, null) : t);
|
|
3288
|
-
return a ? (
|
|
3288
|
+
return a ? (k(t, n, r, i, "BigInt defaults cannot be represented in JSON Schema"), La) : JSON.parse(o);
|
|
3289
3289
|
}
|
|
3290
|
-
var
|
|
3290
|
+
var za = (e, t, n, r) => {
|
|
3291
3291
|
let i = e._zod.def;
|
|
3292
|
-
|
|
3292
|
+
A(i.innerType, t, r);
|
|
3293
3293
|
let a = t.seen.get(e);
|
|
3294
3294
|
a.ref = i.innerType;
|
|
3295
|
-
let o =
|
|
3296
|
-
o !==
|
|
3297
|
-
},
|
|
3295
|
+
let o = Ra(i.defaultValue, e, t, n, r);
|
|
3296
|
+
o !== La && (n.default = o);
|
|
3297
|
+
}, Ba = (e, t, n, r) => {
|
|
3298
3298
|
let i = e._zod.def;
|
|
3299
|
-
|
|
3299
|
+
A(i.innerType, t, r);
|
|
3300
3300
|
let a = t.seen.get(e);
|
|
3301
3301
|
if (a.ref = i.innerType, t.io !== "input") return;
|
|
3302
|
-
let o =
|
|
3303
|
-
o !==
|
|
3304
|
-
},
|
|
3302
|
+
let o = Ra(i.defaultValue, e, t, n, r);
|
|
3303
|
+
o !== La && (n._prefault = o);
|
|
3304
|
+
}, Va = (e, t, n, r) => {
|
|
3305
3305
|
let i = e._zod.def;
|
|
3306
|
-
|
|
3306
|
+
A(i.innerType, t, r);
|
|
3307
3307
|
let a = t.seen.get(e);
|
|
3308
3308
|
a.ref = i.innerType;
|
|
3309
3309
|
let o;
|
|
3310
3310
|
try {
|
|
3311
3311
|
o = i.catchValue(void 0);
|
|
3312
3312
|
} catch {
|
|
3313
|
-
|
|
3313
|
+
k(e, t, n, r, "Dynamic catch values are not supported in JSON Schema");
|
|
3314
3314
|
return;
|
|
3315
3315
|
}
|
|
3316
3316
|
n.default = o;
|
|
3317
|
-
},
|
|
3317
|
+
}, Ha = (e, t, n, r) => {
|
|
3318
3318
|
let i = e._zod.def, a = i.in._zod.traits.has("$ZodTransform"), o = t.io === "input" ? a ? i.out : i.in : i.out;
|
|
3319
|
-
|
|
3319
|
+
A(o, t, r);
|
|
3320
3320
|
let s = t.seen.get(e);
|
|
3321
3321
|
s.ref = o;
|
|
3322
|
-
},
|
|
3322
|
+
}, Ua = (e, t, n, r) => {
|
|
3323
3323
|
let i = e._zod.def;
|
|
3324
|
-
|
|
3324
|
+
A(i.innerType, t, r);
|
|
3325
3325
|
let a = t.seen.get(e);
|
|
3326
3326
|
a.ref = i.innerType, n.readOnly = !0;
|
|
3327
|
-
},
|
|
3327
|
+
}, Wa = (e, t, n, r) => {
|
|
3328
3328
|
let i = e._zod.def;
|
|
3329
|
-
|
|
3329
|
+
A(i.innerType, t, r);
|
|
3330
3330
|
let a = t.seen.get(e);
|
|
3331
3331
|
a.ref = i.innerType;
|
|
3332
|
-
},
|
|
3332
|
+
}, Ga = (e, t, n, r) => {
|
|
3333
3333
|
let i = e._zod.innerType;
|
|
3334
|
-
|
|
3334
|
+
A(i, t, r);
|
|
3335
3335
|
let a = t.seen.get(e);
|
|
3336
3336
|
a.ref = i;
|
|
3337
|
-
},
|
|
3338
|
-
function
|
|
3337
|
+
}, Ka = /* @__PURE__ */ new WeakSet([Object.prototype, Error.prototype]);
|
|
3338
|
+
function qa(e, t, n) {
|
|
3339
3339
|
Object.defineProperty(e, t, {
|
|
3340
3340
|
configurable: !0,
|
|
3341
3341
|
enumerable: !1,
|
|
@@ -3356,12 +3356,12 @@ function Ka(e, t, n) {
|
|
|
3356
3356
|
}
|
|
3357
3357
|
});
|
|
3358
3358
|
}
|
|
3359
|
-
var
|
|
3359
|
+
var M = /*@__PURE__*/ C("ZodError", (e, t) => {
|
|
3360
3360
|
Ge.init(e, t), e.name = "ZodError";
|
|
3361
3361
|
let r = Object.getPrototypeOf(e);
|
|
3362
|
-
|
|
3362
|
+
Ka.has(r) || (Ka.add(r), qa(r, "format", (e) => (t) => Ye(e, t)), qa(r, "flatten", (e) => (t) => Je(e, t)), qa(r, "addIssue", (e) => (t) => {
|
|
3363
3363
|
e.issues.push(t), e.message = JSON.stringify(e.issues, n, 2);
|
|
3364
|
-
}),
|
|
3364
|
+
}), qa(r, "addIssues", (e) => (t) => {
|
|
3365
3365
|
e.issues.push(...t), e.message = JSON.stringify(e.issues, n, 2);
|
|
3366
3366
|
}), Object.defineProperty(r, "isEmpty", {
|
|
3367
3367
|
configurable: !0,
|
|
@@ -3370,16 +3370,16 @@ var N = /*@__PURE__*/ C("ZodError", (e, t) => {
|
|
|
3370
3370
|
return this.issues.length === 0;
|
|
3371
3371
|
}
|
|
3372
3372
|
}));
|
|
3373
|
-
}, void 0, { Parent: Error }),
|
|
3373
|
+
}, void 0, { Parent: Error }), Ja = /* @__PURE__ */ Ze(M), Ya = /* @__PURE__ */ Qe(M), Xa = /* @__PURE__ */ $e(M), Za = /* @__PURE__ */ tt(M), Qa = /* @__PURE__ */ rt(M), $a = /* @__PURE__ */ it(M), eo = /* @__PURE__ */ at(M), to = /* @__PURE__ */ ot(M), no = /* @__PURE__ */ st(M), ro = /* @__PURE__ */ ct(M), io = /* @__PURE__ */ lt(M), ao = /* @__PURE__ */ ut(M);
|
|
3374
3374
|
//#endregion
|
|
3375
3375
|
//#region ../../node_modules/.bun/zod@4.5.4/node_modules/zod/v4/classic/schemas.js
|
|
3376
|
-
function
|
|
3376
|
+
function oo() {
|
|
3377
3377
|
w.localeError || T(Yr());
|
|
3378
3378
|
}
|
|
3379
|
-
function
|
|
3379
|
+
function so() {
|
|
3380
3380
|
w.memoizer || T({ memoizer: Kr() });
|
|
3381
3381
|
}
|
|
3382
|
-
var
|
|
3382
|
+
var N = /*@__PURE__*/ C("ZodType", (e, t) => (oo(), D.init(e, t), e.def = t, e.type = t.type, e), {
|
|
3383
3383
|
check(...e) {
|
|
3384
3384
|
let t = this.def;
|
|
3385
3385
|
return this.clone(u(t, { checks: [...t.checks ?? [], ...e.map((e) => typeof e == "function" ? { _zod: {
|
|
@@ -3401,55 +3401,55 @@ var P = /*@__PURE__*/ C("ZodType", (e, t) => (ao(), D.init(e, t), e.def = t, e.t
|
|
|
3401
3401
|
return e.add(this, t), this;
|
|
3402
3402
|
},
|
|
3403
3403
|
refine(e, t) {
|
|
3404
|
-
return this.check(
|
|
3404
|
+
return this.check(xs(e, t));
|
|
3405
3405
|
},
|
|
3406
3406
|
superRefine(e, t) {
|
|
3407
|
-
return this.check(
|
|
3407
|
+
return this.check(Ss(e, t));
|
|
3408
3408
|
},
|
|
3409
3409
|
overwrite(e) {
|
|
3410
|
-
return this.check(/* @__PURE__ */
|
|
3410
|
+
return this.check(/* @__PURE__ */ qi(e));
|
|
3411
3411
|
},
|
|
3412
3412
|
optional() {
|
|
3413
|
-
return
|
|
3413
|
+
return ts(this);
|
|
3414
3414
|
},
|
|
3415
3415
|
exactOptional() {
|
|
3416
|
-
return
|
|
3416
|
+
return rs(this);
|
|
3417
3417
|
},
|
|
3418
3418
|
nullable() {
|
|
3419
|
-
return
|
|
3419
|
+
return as(this);
|
|
3420
3420
|
},
|
|
3421
3421
|
nullish() {
|
|
3422
|
-
return
|
|
3422
|
+
return ts(as(this));
|
|
3423
3423
|
},
|
|
3424
3424
|
nonoptional(e) {
|
|
3425
|
-
return
|
|
3425
|
+
return ds(this, e);
|
|
3426
3426
|
},
|
|
3427
3427
|
array() {
|
|
3428
|
-
return
|
|
3428
|
+
return z(this);
|
|
3429
3429
|
},
|
|
3430
3430
|
or(e) {
|
|
3431
|
-
return
|
|
3431
|
+
return V([this, e]);
|
|
3432
3432
|
},
|
|
3433
3433
|
and(e) {
|
|
3434
|
-
return
|
|
3434
|
+
return Jo(this, e);
|
|
3435
3435
|
},
|
|
3436
3436
|
transform(e) {
|
|
3437
|
-
return
|
|
3437
|
+
return hs(this, $o(e));
|
|
3438
3438
|
},
|
|
3439
3439
|
default(e) {
|
|
3440
|
-
return
|
|
3440
|
+
return ss(this, e);
|
|
3441
3441
|
},
|
|
3442
3442
|
prefault(e) {
|
|
3443
|
-
return
|
|
3443
|
+
return ls(this, e);
|
|
3444
3444
|
},
|
|
3445
3445
|
catch(e) {
|
|
3446
|
-
return
|
|
3446
|
+
return ps(this, e);
|
|
3447
3447
|
},
|
|
3448
3448
|
pipe(e) {
|
|
3449
|
-
return
|
|
3449
|
+
return hs(this, e);
|
|
3450
3450
|
},
|
|
3451
3451
|
readonly() {
|
|
3452
|
-
return
|
|
3452
|
+
return _s(this);
|
|
3453
3453
|
},
|
|
3454
3454
|
describe(e) {
|
|
3455
3455
|
let t = this.clone();
|
|
@@ -3470,61 +3470,61 @@ var P = /*@__PURE__*/ C("ZodType", (e, t) => (ao(), D.init(e, t), e.def = t, e.t
|
|
|
3470
3470
|
return t.length === 0 ? e(this) : e(this, ...t);
|
|
3471
3471
|
},
|
|
3472
3472
|
get "~standard"() {
|
|
3473
|
-
return
|
|
3473
|
+
return Ce(this, "~standard", {
|
|
3474
3474
|
...fn(this),
|
|
3475
3475
|
jsonSchema: {
|
|
3476
|
-
input:
|
|
3477
|
-
output:
|
|
3476
|
+
input: ha(this, "input"),
|
|
3477
|
+
output: ha(this, "output")
|
|
3478
3478
|
}
|
|
3479
3479
|
});
|
|
3480
3480
|
},
|
|
3481
3481
|
set "~standard"(e) {
|
|
3482
|
-
|
|
3482
|
+
x(this, "~standard", e);
|
|
3483
3483
|
},
|
|
3484
3484
|
parse: function e(t, n) {
|
|
3485
|
-
return
|
|
3485
|
+
return Ja(this, t, n, { callee: e });
|
|
3486
3486
|
},
|
|
3487
3487
|
parseAsync: async function e(t, n) {
|
|
3488
|
-
return await
|
|
3488
|
+
return await Ya(this, t, n, { callee: e });
|
|
3489
3489
|
},
|
|
3490
3490
|
safeParse(e, t) {
|
|
3491
|
-
return
|
|
3491
|
+
return Xa(this, e, t);
|
|
3492
3492
|
},
|
|
3493
3493
|
async safeParseAsync(e, t) {
|
|
3494
|
-
return
|
|
3494
|
+
return Za(this, e, t);
|
|
3495
3495
|
},
|
|
3496
3496
|
get spa() {
|
|
3497
3497
|
return this?.safeParseAsync;
|
|
3498
3498
|
},
|
|
3499
3499
|
set spa(e) {
|
|
3500
|
-
|
|
3500
|
+
x(this, "spa", e);
|
|
3501
3501
|
},
|
|
3502
3502
|
encode: function e(t, n) {
|
|
3503
|
-
return
|
|
3503
|
+
return Qa(this, t, n, { callee: e });
|
|
3504
3504
|
},
|
|
3505
3505
|
decode: function e(t, n) {
|
|
3506
|
-
return
|
|
3506
|
+
return $a(this, t, n, { callee: e });
|
|
3507
3507
|
},
|
|
3508
3508
|
encodeAsync: async function e(t, n) {
|
|
3509
|
-
return await
|
|
3509
|
+
return await eo(this, t, n, { callee: e });
|
|
3510
3510
|
},
|
|
3511
3511
|
decodeAsync: async function e(t, n) {
|
|
3512
|
-
return await
|
|
3512
|
+
return await to(this, t, n, { callee: e });
|
|
3513
3513
|
},
|
|
3514
3514
|
safeEncode(e, t) {
|
|
3515
|
-
return
|
|
3515
|
+
return no(this, e, t);
|
|
3516
3516
|
},
|
|
3517
3517
|
safeDecode(e, t) {
|
|
3518
|
-
return
|
|
3518
|
+
return ro(this, e, t);
|
|
3519
3519
|
},
|
|
3520
3520
|
async safeEncodeAsync(e, t) {
|
|
3521
|
-
return
|
|
3521
|
+
return io(this, e, t);
|
|
3522
3522
|
},
|
|
3523
3523
|
async safeDecodeAsync(e, t) {
|
|
3524
|
-
return
|
|
3524
|
+
return ao(this, e, t);
|
|
3525
3525
|
},
|
|
3526
3526
|
toJSONSchema(e) {
|
|
3527
|
-
return
|
|
3527
|
+
return ma(this, {})(e);
|
|
3528
3528
|
},
|
|
3529
3529
|
get description() {
|
|
3530
3530
|
return $r.get(this)?.description;
|
|
@@ -3532,8 +3532,8 @@ var P = /*@__PURE__*/ C("ZodType", (e, t) => (ao(), D.init(e, t), e.def = t, e.t
|
|
|
3532
3532
|
get _def() {
|
|
3533
3533
|
return this._zod.def;
|
|
3534
3534
|
}
|
|
3535
|
-
}),
|
|
3536
|
-
pn.init(e, t),
|
|
3535
|
+
}), co = /*@__PURE__*/ C("_ZodString", (e, t) => {
|
|
3536
|
+
pn.init(e, t), N.init(e, t), e._zod.processJSONSchema = (t, n, r) => _a(e, t, n, r);
|
|
3537
3537
|
let n = e._zod.bag;
|
|
3538
3538
|
e.format = n.format ?? null, e.minLength = n.minimum ?? null, e.maxLength = n.maximum ?? null;
|
|
3539
3539
|
}, {
|
|
@@ -3568,155 +3568,155 @@ var P = /*@__PURE__*/ C("ZodType", (e, t) => (ao(), D.init(e, t), e.def = t, e.t
|
|
|
3568
3568
|
return this.check(/* @__PURE__ */ Ui(e));
|
|
3569
3569
|
},
|
|
3570
3570
|
trim() {
|
|
3571
|
-
return this.check(/* @__PURE__ */
|
|
3571
|
+
return this.check(/* @__PURE__ */ Yi());
|
|
3572
3572
|
},
|
|
3573
3573
|
normalize(...e) {
|
|
3574
|
-
return this.check(/* @__PURE__ */
|
|
3574
|
+
return this.check(/* @__PURE__ */ Ji(...e));
|
|
3575
3575
|
},
|
|
3576
3576
|
toLowerCase() {
|
|
3577
|
-
return this.check(/* @__PURE__ */
|
|
3577
|
+
return this.check(/* @__PURE__ */ Xi());
|
|
3578
3578
|
},
|
|
3579
3579
|
toUpperCase() {
|
|
3580
|
-
return this.check(/* @__PURE__ */
|
|
3580
|
+
return this.check(/* @__PURE__ */ Zi());
|
|
3581
3581
|
},
|
|
3582
3582
|
slugify() {
|
|
3583
|
-
return this.check(/* @__PURE__ */
|
|
3583
|
+
return this.check(/* @__PURE__ */ Qi());
|
|
3584
3584
|
}
|
|
3585
|
-
}),
|
|
3586
|
-
pn.init(e, t),
|
|
3585
|
+
}), lo = /*@__PURE__*/ C("ZodString", (e, t) => {
|
|
3586
|
+
pn.init(e, t), co.init(e, t);
|
|
3587
3587
|
}, {
|
|
3588
3588
|
email(e) {
|
|
3589
|
-
return this.check(/* @__PURE__ */ ti(
|
|
3589
|
+
return this.check(/* @__PURE__ */ ti(ho, e));
|
|
3590
3590
|
},
|
|
3591
3591
|
url(e) {
|
|
3592
|
-
return this.check(/* @__PURE__ */ si(
|
|
3592
|
+
return this.check(/* @__PURE__ */ si(vo, e));
|
|
3593
3593
|
},
|
|
3594
3594
|
jwt(e) {
|
|
3595
|
-
return this.check(/* @__PURE__ */ Si(
|
|
3595
|
+
return this.check(/* @__PURE__ */ Si(No, e));
|
|
3596
3596
|
},
|
|
3597
3597
|
emoji(e) {
|
|
3598
|
-
return this.check(/* @__PURE__ */ ci(
|
|
3598
|
+
return this.check(/* @__PURE__ */ ci(yo, e));
|
|
3599
3599
|
},
|
|
3600
3600
|
guid(e) {
|
|
3601
|
-
return this.check(/* @__PURE__ */ ni(
|
|
3601
|
+
return this.check(/* @__PURE__ */ ni(go, e));
|
|
3602
3602
|
},
|
|
3603
3603
|
uuid(e) {
|
|
3604
|
-
return this.check(/* @__PURE__ */ ri(
|
|
3604
|
+
return this.check(/* @__PURE__ */ ri(_o, e));
|
|
3605
3605
|
},
|
|
3606
3606
|
uuidv4(e) {
|
|
3607
|
-
return this.check(/* @__PURE__ */ ii(
|
|
3607
|
+
return this.check(/* @__PURE__ */ ii(_o, e));
|
|
3608
3608
|
},
|
|
3609
3609
|
uuidv6(e) {
|
|
3610
|
-
return this.check(/* @__PURE__ */ ai(
|
|
3610
|
+
return this.check(/* @__PURE__ */ ai(_o, e));
|
|
3611
3611
|
},
|
|
3612
3612
|
uuidv7(e) {
|
|
3613
|
-
return this.check(/* @__PURE__ */ oi(
|
|
3613
|
+
return this.check(/* @__PURE__ */ oi(_o, e));
|
|
3614
3614
|
},
|
|
3615
3615
|
nanoid(e) {
|
|
3616
|
-
return this.check(/* @__PURE__ */ li(
|
|
3616
|
+
return this.check(/* @__PURE__ */ li(bo, e));
|
|
3617
3617
|
},
|
|
3618
3618
|
cuid(e) {
|
|
3619
|
-
return this.check(/* @__PURE__ */ ui(
|
|
3619
|
+
return this.check(/* @__PURE__ */ ui(xo, e));
|
|
3620
3620
|
},
|
|
3621
3621
|
cuid2(e) {
|
|
3622
|
-
return this.check(/* @__PURE__ */ di(
|
|
3622
|
+
return this.check(/* @__PURE__ */ di(So, e));
|
|
3623
3623
|
},
|
|
3624
3624
|
ulid(e) {
|
|
3625
|
-
return this.check(/* @__PURE__ */ fi(
|
|
3625
|
+
return this.check(/* @__PURE__ */ fi(Co, e));
|
|
3626
3626
|
},
|
|
3627
3627
|
base64(e) {
|
|
3628
|
-
return this.check(/* @__PURE__ */ yi(
|
|
3628
|
+
return this.check(/* @__PURE__ */ yi(Ao, e));
|
|
3629
3629
|
},
|
|
3630
3630
|
base64url(e) {
|
|
3631
|
-
return this.check(/* @__PURE__ */ bi(
|
|
3631
|
+
return this.check(/* @__PURE__ */ bi(jo, e));
|
|
3632
3632
|
},
|
|
3633
3633
|
xid(e) {
|
|
3634
|
-
return this.check(/* @__PURE__ */ pi(
|
|
3634
|
+
return this.check(/* @__PURE__ */ pi(wo, e));
|
|
3635
3635
|
},
|
|
3636
3636
|
ksuid(e) {
|
|
3637
|
-
return this.check(/* @__PURE__ */ mi(
|
|
3637
|
+
return this.check(/* @__PURE__ */ mi(To, e));
|
|
3638
3638
|
},
|
|
3639
3639
|
ipv4(e) {
|
|
3640
|
-
return this.check(/* @__PURE__ */ hi(
|
|
3640
|
+
return this.check(/* @__PURE__ */ hi(Eo, e));
|
|
3641
3641
|
},
|
|
3642
3642
|
ipv6(e) {
|
|
3643
|
-
return this.check(/* @__PURE__ */ gi(
|
|
3643
|
+
return this.check(/* @__PURE__ */ gi(Do, e));
|
|
3644
3644
|
},
|
|
3645
3645
|
cidrv4(e) {
|
|
3646
|
-
return this.check(/* @__PURE__ */ _i(
|
|
3646
|
+
return this.check(/* @__PURE__ */ _i(Oo, e));
|
|
3647
3647
|
},
|
|
3648
3648
|
cidrv6(e) {
|
|
3649
|
-
return this.check(/* @__PURE__ */ vi(
|
|
3649
|
+
return this.check(/* @__PURE__ */ vi(ko, e));
|
|
3650
3650
|
},
|
|
3651
3651
|
e164(e) {
|
|
3652
|
-
return this.check(/* @__PURE__ */ xi(
|
|
3652
|
+
return this.check(/* @__PURE__ */ xi(Mo, e));
|
|
3653
3653
|
},
|
|
3654
3654
|
datetime(e) {
|
|
3655
|
-
return this.check(/* @__PURE__ */ Ci(
|
|
3655
|
+
return this.check(/* @__PURE__ */ Ci(uo, e));
|
|
3656
3656
|
},
|
|
3657
3657
|
date(e) {
|
|
3658
|
-
return this.check(/* @__PURE__ */ wi(
|
|
3658
|
+
return this.check(/* @__PURE__ */ wi(fo, e));
|
|
3659
3659
|
},
|
|
3660
3660
|
time(e) {
|
|
3661
|
-
return this.check(/* @__PURE__ */ Ti(
|
|
3661
|
+
return this.check(/* @__PURE__ */ Ti(po, e));
|
|
3662
3662
|
},
|
|
3663
3663
|
duration(e) {
|
|
3664
|
-
return this.check(/* @__PURE__ */ Ei(
|
|
3664
|
+
return this.check(/* @__PURE__ */ Ei(mo, e));
|
|
3665
3665
|
}
|
|
3666
3666
|
});
|
|
3667
|
-
function
|
|
3668
|
-
return /* @__PURE__ */ ei(
|
|
3669
|
-
}
|
|
3670
|
-
var
|
|
3671
|
-
O.init(e, t),
|
|
3672
|
-
}),
|
|
3673
|
-
An.init(e, t),
|
|
3674
|
-
}),
|
|
3675
|
-
jn.init(e, t),
|
|
3676
|
-
}),
|
|
3677
|
-
Mn.init(e, t),
|
|
3678
|
-
}),
|
|
3679
|
-
Nn.init(e, t),
|
|
3680
|
-
}),
|
|
3681
|
-
gn.init(e, t),
|
|
3682
|
-
}),
|
|
3683
|
-
mn.init(e, t),
|
|
3684
|
-
}),
|
|
3685
|
-
hn.init(e, t),
|
|
3686
|
-
}),
|
|
3687
|
-
Sn.init(e, t),
|
|
3688
|
-
}),
|
|
3689
|
-
Cn.init(e, t),
|
|
3690
|
-
}),
|
|
3691
|
-
wn.init(e, t),
|
|
3692
|
-
}),
|
|
3693
|
-
Tn.init(e, t),
|
|
3694
|
-
}),
|
|
3695
|
-
En.init(e, t),
|
|
3696
|
-
}),
|
|
3697
|
-
Dn.init(e, t),
|
|
3698
|
-
}),
|
|
3699
|
-
On.init(e, t),
|
|
3700
|
-
}),
|
|
3701
|
-
kn.init(e, t),
|
|
3702
|
-
}),
|
|
3703
|
-
Pn.init(e, t),
|
|
3704
|
-
}),
|
|
3705
|
-
Ln.init(e, t),
|
|
3706
|
-
}),
|
|
3707
|
-
Rn.init(e, t),
|
|
3708
|
-
}),
|
|
3709
|
-
Bn.init(e, t),
|
|
3710
|
-
}),
|
|
3711
|
-
Hn.init(e, t),
|
|
3712
|
-
}),
|
|
3713
|
-
Wn.init(e, t),
|
|
3714
|
-
}),
|
|
3715
|
-
Gn.init(e, t),
|
|
3716
|
-
}),
|
|
3717
|
-
qn.init(e, t),
|
|
3718
|
-
}),
|
|
3719
|
-
Jn.init(e, t),
|
|
3667
|
+
function P(e) {
|
|
3668
|
+
return /* @__PURE__ */ ei(lo, e);
|
|
3669
|
+
}
|
|
3670
|
+
var F = /*@__PURE__*/ C("ZodStringFormat", (e, t) => {
|
|
3671
|
+
O.init(e, t), co.init(e, t);
|
|
3672
|
+
}), uo = /*@__PURE__*/ C("ZodISODateTime", (e, t) => {
|
|
3673
|
+
An.init(e, t), F.init(e, t);
|
|
3674
|
+
}), fo = /*@__PURE__*/ C("ZodISODate", (e, t) => {
|
|
3675
|
+
jn.init(e, t), F.init(e, t);
|
|
3676
|
+
}), po = /*@__PURE__*/ C("ZodISOTime", (e, t) => {
|
|
3677
|
+
Mn.init(e, t), F.init(e, t);
|
|
3678
|
+
}), mo = /*@__PURE__*/ C("ZodISODuration", (e, t) => {
|
|
3679
|
+
Nn.init(e, t), F.init(e, t);
|
|
3680
|
+
}), ho = /*@__PURE__*/ C("ZodEmail", (e, t) => {
|
|
3681
|
+
gn.init(e, t), F.init(e, t);
|
|
3682
|
+
}), go = /*@__PURE__*/ C("ZodGUID", (e, t) => {
|
|
3683
|
+
mn.init(e, t), F.init(e, t);
|
|
3684
|
+
}), _o = /*@__PURE__*/ C("ZodUUID", (e, t) => {
|
|
3685
|
+
hn.init(e, t), F.init(e, t);
|
|
3686
|
+
}), vo = /*@__PURE__*/ C("ZodURL", (e, t) => {
|
|
3687
|
+
Sn.init(e, t), F.init(e, t);
|
|
3688
|
+
}), yo = /*@__PURE__*/ C("ZodEmoji", (e, t) => {
|
|
3689
|
+
Cn.init(e, t), F.init(e, t);
|
|
3690
|
+
}), bo = /*@__PURE__*/ C("ZodNanoID", (e, t) => {
|
|
3691
|
+
wn.init(e, t), F.init(e, t);
|
|
3692
|
+
}), xo = /*@__PURE__*/ C("ZodCUID", (e, t) => {
|
|
3693
|
+
Tn.init(e, t), F.init(e, t);
|
|
3694
|
+
}), So = /*@__PURE__*/ C("ZodCUID2", (e, t) => {
|
|
3695
|
+
En.init(e, t), F.init(e, t);
|
|
3696
|
+
}), Co = /*@__PURE__*/ C("ZodULID", (e, t) => {
|
|
3697
|
+
Dn.init(e, t), F.init(e, t);
|
|
3698
|
+
}), wo = /*@__PURE__*/ C("ZodXID", (e, t) => {
|
|
3699
|
+
On.init(e, t), F.init(e, t);
|
|
3700
|
+
}), To = /*@__PURE__*/ C("ZodKSUID", (e, t) => {
|
|
3701
|
+
kn.init(e, t), F.init(e, t);
|
|
3702
|
+
}), Eo = /*@__PURE__*/ C("ZodIPv4", (e, t) => {
|
|
3703
|
+
Pn.init(e, t), F.init(e, t);
|
|
3704
|
+
}), Do = /*@__PURE__*/ C("ZodIPv6", (e, t) => {
|
|
3705
|
+
Ln.init(e, t), F.init(e, t);
|
|
3706
|
+
}), Oo = /*@__PURE__*/ C("ZodCIDRv4", (e, t) => {
|
|
3707
|
+
Rn.init(e, t), F.init(e, t);
|
|
3708
|
+
}), ko = /*@__PURE__*/ C("ZodCIDRv6", (e, t) => {
|
|
3709
|
+
Bn.init(e, t), F.init(e, t);
|
|
3710
|
+
}), Ao = /*@__PURE__*/ C("ZodBase64", (e, t) => {
|
|
3711
|
+
Hn.init(e, t), F.init(e, t);
|
|
3712
|
+
}), jo = /*@__PURE__*/ C("ZodBase64URL", (e, t) => {
|
|
3713
|
+
Wn.init(e, t), F.init(e, t);
|
|
3714
|
+
}), Mo = /*@__PURE__*/ C("ZodE164", (e, t) => {
|
|
3715
|
+
Gn.init(e, t), F.init(e, t);
|
|
3716
|
+
}), No = /*@__PURE__*/ C("ZodJWT", (e, t) => {
|
|
3717
|
+
qn.init(e, t), F.init(e, t);
|
|
3718
|
+
}), Po = /*@__PURE__*/ C("ZodNumber", (e, t) => {
|
|
3719
|
+
Jn.init(e, t), N.init(e, t), e._zod.processJSONSchema = (t, n, r) => va(e, t, n, r);
|
|
3720
3720
|
let n = e._zod.bag;
|
|
3721
3721
|
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;
|
|
3722
3722
|
}, {
|
|
@@ -3739,10 +3739,10 @@ var I = /*@__PURE__*/ C("ZodStringFormat", (e, t) => {
|
|
|
3739
3739
|
return this.check(/* @__PURE__ */ Pi(e, t));
|
|
3740
3740
|
},
|
|
3741
3741
|
int(e) {
|
|
3742
|
-
return this.check(
|
|
3742
|
+
return this.check(Io(e));
|
|
3743
3743
|
},
|
|
3744
3744
|
safe(e) {
|
|
3745
|
-
return this.check(
|
|
3745
|
+
return this.check(Io(e));
|
|
3746
3746
|
},
|
|
3747
3747
|
positive(e) {
|
|
3748
3748
|
return this.check(/* @__PURE__ */ Fi(0, e));
|
|
@@ -3766,41 +3766,41 @@ var I = /*@__PURE__*/ C("ZodStringFormat", (e, t) => {
|
|
|
3766
3766
|
return this;
|
|
3767
3767
|
}
|
|
3768
3768
|
});
|
|
3769
|
-
function
|
|
3770
|
-
return /* @__PURE__ */ Di(
|
|
3769
|
+
function I(e) {
|
|
3770
|
+
return /* @__PURE__ */ Di(Po, e);
|
|
3771
3771
|
}
|
|
3772
|
-
var
|
|
3773
|
-
Yn.init(e, t),
|
|
3772
|
+
var Fo = /*@__PURE__*/ C("ZodNumberFormat", (e, t) => {
|
|
3773
|
+
Yn.init(e, t), Po.init(e, t);
|
|
3774
3774
|
});
|
|
3775
|
-
function
|
|
3776
|
-
return /* @__PURE__ */ Oi(
|
|
3775
|
+
function Io(e) {
|
|
3776
|
+
return /* @__PURE__ */ Oi(Fo, e);
|
|
3777
3777
|
}
|
|
3778
|
-
var
|
|
3779
|
-
Xn.init(e, t),
|
|
3778
|
+
var Lo = /*@__PURE__*/ C("ZodBoolean", (e, t) => {
|
|
3779
|
+
Xn.init(e, t), N.init(e, t), e._zod.processJSONSchema = (t, n, r) => ya(e, t, n, r);
|
|
3780
3780
|
});
|
|
3781
|
-
function
|
|
3782
|
-
return /* @__PURE__ */ ki(
|
|
3781
|
+
function L(e) {
|
|
3782
|
+
return /* @__PURE__ */ ki(Lo, e);
|
|
3783
3783
|
}
|
|
3784
|
-
var
|
|
3785
|
-
Zn.init(e, t),
|
|
3784
|
+
var Ro = /*@__PURE__*/ C("ZodNull", (e, t) => {
|
|
3785
|
+
Zn.init(e, t), N.init(e, t), e._zod.processJSONSchema = (t, n, r) => ba(e, t, n, r);
|
|
3786
3786
|
});
|
|
3787
|
-
function
|
|
3788
|
-
return /* @__PURE__ */ Ai(
|
|
3787
|
+
function zo(e) {
|
|
3788
|
+
return /* @__PURE__ */ Ai(Ro, e);
|
|
3789
3789
|
}
|
|
3790
|
-
var
|
|
3791
|
-
Qn.init(e, t),
|
|
3790
|
+
var Bo = /*@__PURE__*/ C("ZodUnknown", (e, t) => {
|
|
3791
|
+
Qn.init(e, t), N.init(e, t), e._zod.processJSONSchema = (e, t, n) => void 0;
|
|
3792
3792
|
});
|
|
3793
|
-
function
|
|
3794
|
-
return /* @__PURE__ */ ji(
|
|
3793
|
+
function R() {
|
|
3794
|
+
return /* @__PURE__ */ ji(Bo);
|
|
3795
3795
|
}
|
|
3796
|
-
var
|
|
3797
|
-
$n.init(e, t),
|
|
3796
|
+
var Vo = /*@__PURE__*/ C("ZodNever", (e, t) => {
|
|
3797
|
+
$n.init(e, t), N.init(e, t), e._zod.processJSONSchema = (t, n, r) => xa(e, t, n, r);
|
|
3798
3798
|
});
|
|
3799
|
-
function
|
|
3800
|
-
return /* @__PURE__ */ Mi(
|
|
3799
|
+
function Ho(e) {
|
|
3800
|
+
return /* @__PURE__ */ Mi(Vo, e);
|
|
3801
3801
|
}
|
|
3802
|
-
var
|
|
3803
|
-
|
|
3802
|
+
var Uo = /*@__PURE__*/ C("ZodArray", (e, t) => {
|
|
3803
|
+
so(), tr.init(e, t), N.init(e, t), e._zod.processJSONSchema = (t, n, r) => Ea(e, t, n, r), e.element = t.element;
|
|
3804
3804
|
}, {
|
|
3805
3805
|
min(e, t) {
|
|
3806
3806
|
return this.check(/* @__PURE__ */ zi(e, t));
|
|
@@ -3818,14 +3818,14 @@ var Ho = /*@__PURE__*/ C("ZodArray", (e, t) => {
|
|
|
3818
3818
|
return this.element;
|
|
3819
3819
|
}
|
|
3820
3820
|
});
|
|
3821
|
-
function
|
|
3822
|
-
return /* @__PURE__ */
|
|
3821
|
+
function z(e, t) {
|
|
3822
|
+
return /* @__PURE__ */ $i(Uo, e, t);
|
|
3823
3823
|
}
|
|
3824
|
-
var
|
|
3825
|
-
|
|
3824
|
+
var Wo = /*@__PURE__*/ C("ZodObject", (e, t) => {
|
|
3825
|
+
so(), cr.init(e, t), N.init(e, t), e._zod.processJSONSchema = (t, n, r) => Oa(e, t, n, r), ke(e, "shape", (e) => e._zod.def.shape, !1);
|
|
3826
3826
|
}, {
|
|
3827
3827
|
keyof() {
|
|
3828
|
-
return
|
|
3828
|
+
return U(Object.keys(this._zod.def.shape));
|
|
3829
3829
|
},
|
|
3830
3830
|
catchall(e) {
|
|
3831
3831
|
return this.clone({
|
|
@@ -3836,19 +3836,19 @@ var Uo = /*@__PURE__*/ C("ZodObject", (e, t) => {
|
|
|
3836
3836
|
passthrough() {
|
|
3837
3837
|
return this.clone({
|
|
3838
3838
|
...this._zod.def,
|
|
3839
|
-
catchall:
|
|
3839
|
+
catchall: R()
|
|
3840
3840
|
});
|
|
3841
3841
|
},
|
|
3842
3842
|
loose() {
|
|
3843
3843
|
return this.clone({
|
|
3844
3844
|
...this._zod.def,
|
|
3845
|
-
catchall:
|
|
3845
|
+
catchall: R()
|
|
3846
3846
|
});
|
|
3847
3847
|
},
|
|
3848
3848
|
strict() {
|
|
3849
3849
|
return this.clone({
|
|
3850
3850
|
...this._zod.def,
|
|
3851
|
-
catchall:
|
|
3851
|
+
catchall: Ho()
|
|
3852
3852
|
});
|
|
3853
3853
|
},
|
|
3854
3854
|
strip() {
|
|
@@ -3873,74 +3873,74 @@ var Uo = /*@__PURE__*/ C("ZodObject", (e, t) => {
|
|
|
3873
3873
|
return ce(this, e);
|
|
3874
3874
|
},
|
|
3875
3875
|
partial(...e) {
|
|
3876
|
-
return fe(
|
|
3876
|
+
return fe(es, this, e[0]);
|
|
3877
3877
|
},
|
|
3878
3878
|
exactPartial(...e) {
|
|
3879
|
-
return fe(
|
|
3879
|
+
return fe(ns, this, e[0], "exactPartial");
|
|
3880
3880
|
},
|
|
3881
3881
|
required(...e) {
|
|
3882
|
-
return pe(
|
|
3882
|
+
return pe(us, this, e[0]);
|
|
3883
3883
|
}
|
|
3884
3884
|
});
|
|
3885
|
-
function
|
|
3886
|
-
return new
|
|
3885
|
+
function B(e, t) {
|
|
3886
|
+
return new Wo({
|
|
3887
3887
|
type: "object",
|
|
3888
3888
|
shape: e ?? {},
|
|
3889
3889
|
..._(t)
|
|
3890
3890
|
});
|
|
3891
3891
|
}
|
|
3892
|
-
function
|
|
3893
|
-
return new
|
|
3892
|
+
function Go(e, t) {
|
|
3893
|
+
return new Wo({
|
|
3894
3894
|
type: "object",
|
|
3895
3895
|
shape: e,
|
|
3896
|
-
catchall:
|
|
3896
|
+
catchall: Ho(),
|
|
3897
3897
|
..._(t)
|
|
3898
3898
|
});
|
|
3899
3899
|
}
|
|
3900
|
-
var
|
|
3901
|
-
ur.init(e, t),
|
|
3900
|
+
var Ko = /*@__PURE__*/ C("ZodUnion", (e, t) => {
|
|
3901
|
+
ur.init(e, t), N.init(e, t), e._zod.processJSONSchema = (t, n, r) => ka(e, t, n, r), e.options = t.options;
|
|
3902
3902
|
});
|
|
3903
|
-
function
|
|
3904
|
-
return new
|
|
3903
|
+
function V(e, t) {
|
|
3904
|
+
return new Ko({
|
|
3905
3905
|
type: "union",
|
|
3906
3906
|
options: e,
|
|
3907
3907
|
..._(t)
|
|
3908
3908
|
});
|
|
3909
3909
|
}
|
|
3910
|
-
var
|
|
3911
|
-
dr.init(e, t),
|
|
3910
|
+
var qo = /*@__PURE__*/ C("ZodIntersection", (e, t) => {
|
|
3911
|
+
dr.init(e, t), N.init(e, t), e._zod.processJSONSchema = (t, n, r) => Aa(e, t, n, r);
|
|
3912
3912
|
});
|
|
3913
|
-
function
|
|
3914
|
-
return new
|
|
3913
|
+
function Jo(e, t) {
|
|
3914
|
+
return new qo({
|
|
3915
3915
|
type: "intersection",
|
|
3916
3916
|
left: e,
|
|
3917
3917
|
right: t
|
|
3918
3918
|
});
|
|
3919
3919
|
}
|
|
3920
|
-
var
|
|
3921
|
-
|
|
3920
|
+
var Yo = /*@__PURE__*/ C("ZodRecord", (e, t) => {
|
|
3921
|
+
so(), mr.init(e, t), N.init(e, t), e._zod.processJSONSchema = (t, n, r) => Pa(e, t, n, r), e.keyType = t.keyType, e.valueType = t.valueType;
|
|
3922
3922
|
});
|
|
3923
|
-
function
|
|
3924
|
-
return !t || !t._zod ? new
|
|
3923
|
+
function H(e, t, n) {
|
|
3924
|
+
return !t || !t._zod ? new Yo({
|
|
3925
3925
|
type: "record",
|
|
3926
|
-
keyType:
|
|
3926
|
+
keyType: P(),
|
|
3927
3927
|
valueType: e,
|
|
3928
3928
|
..._(t)
|
|
3929
|
-
}) : new
|
|
3929
|
+
}) : new Yo({
|
|
3930
3930
|
type: "record",
|
|
3931
3931
|
keyType: e,
|
|
3932
3932
|
valueType: t,
|
|
3933
3933
|
..._(n)
|
|
3934
3934
|
});
|
|
3935
3935
|
}
|
|
3936
|
-
var
|
|
3937
|
-
hr.init(e, t),
|
|
3936
|
+
var Xo = /*@__PURE__*/ C("ZodEnum", (e, t) => {
|
|
3937
|
+
hr.init(e, t), N.init(e, t), e._zod.processJSONSchema = (t, n, r) => Sa(e, t, n, r), e.enum = t.entries, e.options = Object.values(t.entries);
|
|
3938
3938
|
let n = new Set(Object.keys(t.entries));
|
|
3939
3939
|
e.extract = (e, r) => {
|
|
3940
3940
|
let i = {};
|
|
3941
3941
|
for (let r of e) if (n.has(r)) i[r] = t.entries[r];
|
|
3942
3942
|
else throw Error(`Key ${r} not found in enum`);
|
|
3943
|
-
return new
|
|
3943
|
+
return new Xo({
|
|
3944
3944
|
...t,
|
|
3945
3945
|
checks: [],
|
|
3946
3946
|
..._(r),
|
|
@@ -3950,7 +3950,7 @@ var Yo = /*@__PURE__*/ C("ZodEnum", (e, t) => {
|
|
|
3950
3950
|
let i = { ...t.entries };
|
|
3951
3951
|
for (let t of e) if (n.has(t)) delete i[t];
|
|
3952
3952
|
else throw Error(`Key ${t} not found in enum`);
|
|
3953
|
-
return new
|
|
3953
|
+
return new Xo({
|
|
3954
3954
|
...t,
|
|
3955
3955
|
checks: [],
|
|
3956
3956
|
..._(r),
|
|
@@ -3958,78 +3958,78 @@ var Yo = /*@__PURE__*/ C("ZodEnum", (e, t) => {
|
|
|
3958
3958
|
});
|
|
3959
3959
|
};
|
|
3960
3960
|
});
|
|
3961
|
-
function
|
|
3962
|
-
return new
|
|
3961
|
+
function U(e, t) {
|
|
3962
|
+
return new Xo({
|
|
3963
3963
|
type: "enum",
|
|
3964
3964
|
entries: Array.isArray(e) ? Object.fromEntries(e.map((e) => [e, e])) : e,
|
|
3965
3965
|
..._(t)
|
|
3966
3966
|
});
|
|
3967
3967
|
}
|
|
3968
|
-
var
|
|
3969
|
-
gr.init(e, t),
|
|
3968
|
+
var Zo = /*@__PURE__*/ C("ZodLiteral", (e, t) => {
|
|
3969
|
+
gr.init(e, t), N.init(e, t), e._zod.processJSONSchema = (t, n, r) => Ca(e, t, n, r), e.values = new Set(t.values), Object.defineProperty(e, "value", { get() {
|
|
3970
3970
|
if (t.values.length > 1) throw Error("This schema contains multiple valid literal values. Use `.values` instead.");
|
|
3971
3971
|
return t.values[0];
|
|
3972
3972
|
} });
|
|
3973
3973
|
});
|
|
3974
|
-
function
|
|
3975
|
-
return new
|
|
3974
|
+
function W(e, t) {
|
|
3975
|
+
return new Zo({
|
|
3976
3976
|
type: "literal",
|
|
3977
3977
|
values: Array.isArray(e) ? e : [e],
|
|
3978
3978
|
..._(t)
|
|
3979
3979
|
});
|
|
3980
3980
|
}
|
|
3981
|
-
var
|
|
3982
|
-
|
|
3981
|
+
var Qo = /*@__PURE__*/ C("ZodTransform", (e, t) => {
|
|
3982
|
+
so(), _r.init(e, t), N.init(e, t), e._zod.processJSONSchema = (t, n, r) => Ta(e, t, n, r), e._zod.parse = (n, r) => {
|
|
3983
3983
|
if (r.direction === "backward") throw new Le(e.constructor.name);
|
|
3984
3984
|
n.addIssue = (r) => {
|
|
3985
|
-
if (typeof r == "string") n.issues.push(
|
|
3985
|
+
if (typeof r == "string") n.issues.push(xe(r, n.value, t));
|
|
3986
3986
|
else {
|
|
3987
3987
|
let t = r;
|
|
3988
|
-
t.fatal && (t.continue = !1), t.code ??= "custom", "input" in t || (t.input = n.value), t.inst ??= e, n.issues.push(
|
|
3988
|
+
t.fatal && (t.continue = !1), t.code ??= "custom", "input" in t || (t.input = n.value), t.inst ??= e, n.issues.push(xe(t));
|
|
3989
3989
|
}
|
|
3990
3990
|
};
|
|
3991
3991
|
let i = t.transform(n.value, n);
|
|
3992
3992
|
return i instanceof Promise ? i.then((e) => (n.value = e, n)) : (n.value = i, n);
|
|
3993
3993
|
};
|
|
3994
3994
|
});
|
|
3995
|
-
function
|
|
3996
|
-
return new
|
|
3995
|
+
function $o(e) {
|
|
3996
|
+
return new Qo({
|
|
3997
3997
|
type: "transform",
|
|
3998
3998
|
transform: e
|
|
3999
3999
|
});
|
|
4000
4000
|
}
|
|
4001
|
-
var
|
|
4002
|
-
yr.init(e, t),
|
|
4001
|
+
var es = /*@__PURE__*/ C("ZodOptional", (e, t) => {
|
|
4002
|
+
yr.init(e, t), N.init(e, t), e._zod.processJSONSchema = (t, n, r) => Wa(e, t, n, r), e.unwrap = () => e._zod.def.innerType;
|
|
4003
4003
|
});
|
|
4004
|
-
function
|
|
4005
|
-
return new
|
|
4004
|
+
function ts(e) {
|
|
4005
|
+
return new es({
|
|
4006
4006
|
type: "optional",
|
|
4007
4007
|
innerType: e
|
|
4008
4008
|
});
|
|
4009
4009
|
}
|
|
4010
|
-
var
|
|
4011
|
-
br.init(e, t),
|
|
4010
|
+
var ns = /*@__PURE__*/ C("ZodExactOptional", (e, t) => {
|
|
4011
|
+
br.init(e, t), N.init(e, t), e._zod.processJSONSchema = (t, n, r) => Wa(e, t, n, r), e.unwrap = () => e._zod.def.innerType;
|
|
4012
4012
|
});
|
|
4013
|
-
function
|
|
4014
|
-
return new
|
|
4013
|
+
function rs(e) {
|
|
4014
|
+
return new ns({
|
|
4015
4015
|
type: "optional",
|
|
4016
4016
|
innerType: e
|
|
4017
4017
|
});
|
|
4018
4018
|
}
|
|
4019
|
-
var
|
|
4020
|
-
xr.init(e, t),
|
|
4019
|
+
var is = /*@__PURE__*/ C("ZodNullable", (e, t) => {
|
|
4020
|
+
xr.init(e, t), N.init(e, t), e._zod.processJSONSchema = (t, n, r) => Fa(e, t, n, r), e.unwrap = () => e._zod.def.innerType;
|
|
4021
4021
|
});
|
|
4022
|
-
function
|
|
4023
|
-
return new
|
|
4022
|
+
function as(e) {
|
|
4023
|
+
return new is({
|
|
4024
4024
|
type: "nullable",
|
|
4025
4025
|
innerType: e
|
|
4026
4026
|
});
|
|
4027
4027
|
}
|
|
4028
|
-
var
|
|
4029
|
-
Sr.init(e, t),
|
|
4028
|
+
var os = /*@__PURE__*/ C("ZodDefault", (e, t) => {
|
|
4029
|
+
Sr.init(e, t), N.init(e, t), e._zod.processJSONSchema = (t, n, r) => za(e, t, n, r), e.unwrap = () => e._zod.def.innerType, e.removeDefault = e.unwrap;
|
|
4030
4030
|
});
|
|
4031
|
-
function
|
|
4032
|
-
return new
|
|
4031
|
+
function ss(e, t) {
|
|
4032
|
+
return new os({
|
|
4033
4033
|
type: "default",
|
|
4034
4034
|
innerType: e,
|
|
4035
4035
|
get defaultValue() {
|
|
@@ -4037,11 +4037,11 @@ function os(e, t) {
|
|
|
4037
4037
|
}
|
|
4038
4038
|
});
|
|
4039
4039
|
}
|
|
4040
|
-
var
|
|
4041
|
-
wr.init(e, t),
|
|
4040
|
+
var cs = /*@__PURE__*/ C("ZodPrefault", (e, t) => {
|
|
4041
|
+
wr.init(e, t), N.init(e, t), e._zod.processJSONSchema = (t, n, r) => Ba(e, t, n, r), e.unwrap = () => e._zod.def.innerType;
|
|
4042
4042
|
});
|
|
4043
|
-
function
|
|
4044
|
-
return new
|
|
4043
|
+
function ls(e, t) {
|
|
4044
|
+
return new cs({
|
|
4045
4045
|
type: "prefault",
|
|
4046
4046
|
innerType: e,
|
|
4047
4047
|
get defaultValue() {
|
|
@@ -4049,191 +4049,191 @@ function cs(e, t) {
|
|
|
4049
4049
|
}
|
|
4050
4050
|
});
|
|
4051
4051
|
}
|
|
4052
|
-
var
|
|
4053
|
-
Tr.init(e, t),
|
|
4052
|
+
var us = /*@__PURE__*/ C("ZodNonOptional", (e, t) => {
|
|
4053
|
+
Tr.init(e, t), N.init(e, t), e._zod.processJSONSchema = (t, n, r) => Ia(e, t, n, r), e.unwrap = () => e._zod.def.innerType;
|
|
4054
4054
|
});
|
|
4055
|
-
function
|
|
4056
|
-
return new
|
|
4055
|
+
function ds(e, t) {
|
|
4056
|
+
return new us({
|
|
4057
4057
|
type: "nonoptional",
|
|
4058
4058
|
innerType: e,
|
|
4059
4059
|
..._(t)
|
|
4060
4060
|
});
|
|
4061
4061
|
}
|
|
4062
|
-
var
|
|
4063
|
-
Or.init(e, t),
|
|
4062
|
+
var fs = /*@__PURE__*/ C("ZodCatch", (e, t) => {
|
|
4063
|
+
Or.init(e, t), N.init(e, t), e._zod.processJSONSchema = (t, n, r) => Va(e, t, n, r), e.unwrap = () => e._zod.def.innerType, e.removeCatch = e.unwrap;
|
|
4064
4064
|
});
|
|
4065
|
-
function
|
|
4066
|
-
return new
|
|
4065
|
+
function ps(e, t) {
|
|
4066
|
+
return new fs({
|
|
4067
4067
|
type: "catch",
|
|
4068
4068
|
innerType: e,
|
|
4069
4069
|
catchValue: typeof t == "function" ? t : je(t)
|
|
4070
4070
|
});
|
|
4071
4071
|
}
|
|
4072
|
-
var
|
|
4073
|
-
kr.init(e, t),
|
|
4072
|
+
var ms = /*@__PURE__*/ C("ZodPipe", (e, t) => {
|
|
4073
|
+
kr.init(e, t), N.init(e, t), e._zod.processJSONSchema = (t, n, r) => Ha(e, t, n, r), e.in = t.in, e.out = t.out;
|
|
4074
4074
|
});
|
|
4075
|
-
function
|
|
4076
|
-
return new
|
|
4075
|
+
function hs(e, t) {
|
|
4076
|
+
return new ms({
|
|
4077
4077
|
type: "pipe",
|
|
4078
4078
|
in: e,
|
|
4079
4079
|
out: t
|
|
4080
4080
|
});
|
|
4081
4081
|
}
|
|
4082
|
-
var
|
|
4083
|
-
jr.init(e, t),
|
|
4082
|
+
var gs = /*@__PURE__*/ C("ZodReadonly", (e, t) => {
|
|
4083
|
+
jr.init(e, t), N.init(e, t), e._zod.processJSONSchema = (t, n, r) => Ua(e, t, n, r), e.unwrap = () => e._zod.def.innerType;
|
|
4084
4084
|
});
|
|
4085
|
-
function
|
|
4086
|
-
return new
|
|
4085
|
+
function _s(e) {
|
|
4086
|
+
return new gs({
|
|
4087
4087
|
type: "readonly",
|
|
4088
4088
|
innerType: e
|
|
4089
4089
|
});
|
|
4090
4090
|
}
|
|
4091
|
-
var
|
|
4092
|
-
Nr.init(e, t),
|
|
4091
|
+
var vs = /*@__PURE__*/ C("ZodLazy", (e, t) => {
|
|
4092
|
+
Nr.init(e, t), N.init(e, t), e._zod.processJSONSchema = (t, n, r) => Ga(e, t, n, r), e.unwrap = () => e._zod.def.getter();
|
|
4093
4093
|
});
|
|
4094
|
-
function
|
|
4095
|
-
return new
|
|
4094
|
+
function ys(e) {
|
|
4095
|
+
return new vs({
|
|
4096
4096
|
type: "lazy",
|
|
4097
4097
|
getter: e
|
|
4098
4098
|
});
|
|
4099
4099
|
}
|
|
4100
|
-
var
|
|
4101
|
-
Pr.init(e, t),
|
|
4100
|
+
var bs = /*@__PURE__*/ C("ZodCustom", (e, t) => {
|
|
4101
|
+
Pr.init(e, t), N.init(e, t), e._zod.processJSONSchema = (t, n, r) => wa(e, t, n, r);
|
|
4102
4102
|
});
|
|
4103
|
-
function
|
|
4104
|
-
return /* @__PURE__ */
|
|
4103
|
+
function xs(e, t = {}) {
|
|
4104
|
+
return /* @__PURE__ */ ea(bs, e, t);
|
|
4105
4105
|
}
|
|
4106
|
-
function
|
|
4107
|
-
return /* @__PURE__ */
|
|
4106
|
+
function Ss(e, t) {
|
|
4107
|
+
return /* @__PURE__ */ ta(e, t);
|
|
4108
4108
|
}
|
|
4109
|
-
function
|
|
4110
|
-
let t =
|
|
4111
|
-
|
|
4109
|
+
function Cs(e) {
|
|
4110
|
+
let t = ys(() => V([
|
|
4111
|
+
P(e),
|
|
4112
|
+
I(),
|
|
4112
4113
|
L(),
|
|
4113
|
-
|
|
4114
|
-
|
|
4115
|
-
|
|
4116
|
-
U(F(), t)
|
|
4114
|
+
zo(),
|
|
4115
|
+
z(t),
|
|
4116
|
+
H(P(), t)
|
|
4117
4117
|
]));
|
|
4118
4118
|
return t;
|
|
4119
4119
|
}
|
|
4120
4120
|
//#endregion
|
|
4121
4121
|
//#region src/flow/common/json.ts
|
|
4122
|
-
var
|
|
4123
|
-
function
|
|
4122
|
+
var ws = 64;
|
|
4123
|
+
function Ts(e, t = 0) {
|
|
4124
4124
|
if (t > 64) throw TypeError("Value exceeds the maximum JSON depth.");
|
|
4125
|
-
if (typeof e == "object" && e) for (let n of Object.values(e))
|
|
4125
|
+
if (typeof e == "object" && e) for (let n of Object.values(e)) Ts(n, t + 1);
|
|
4126
4126
|
}
|
|
4127
4127
|
//#endregion
|
|
4128
4128
|
//#region src/flow/common/triggerScheduleSchema.ts
|
|
4129
|
-
var
|
|
4130
|
-
type:
|
|
4131
|
-
expression:
|
|
4132
|
-
timezone:
|
|
4133
|
-
}),
|
|
4134
|
-
type:
|
|
4135
|
-
unit:
|
|
4129
|
+
var Es = z(V([B({
|
|
4130
|
+
type: W("cron"),
|
|
4131
|
+
expression: P(),
|
|
4132
|
+
timezone: P()
|
|
4133
|
+
}), B({
|
|
4134
|
+
type: W("every"),
|
|
4135
|
+
unit: U([
|
|
4136
4136
|
"day",
|
|
4137
4137
|
"hour",
|
|
4138
4138
|
"minute",
|
|
4139
4139
|
"month",
|
|
4140
4140
|
"week"
|
|
4141
4141
|
]),
|
|
4142
|
-
value:
|
|
4143
|
-
})])),
|
|
4144
|
-
description:
|
|
4145
|
-
jsonSchema:
|
|
4146
|
-
nullable:
|
|
4147
|
-
handle:
|
|
4148
|
-
}),
|
|
4149
|
-
collapsed:
|
|
4150
|
-
group:
|
|
4151
|
-
}),
|
|
4152
|
-
kind:
|
|
4153
|
-
nodeId:
|
|
4154
|
-
output:
|
|
4155
|
-
}),
|
|
4156
|
-
kind:
|
|
4157
|
-
input:
|
|
4158
|
-
}),
|
|
4159
|
-
ks,
|
|
4142
|
+
value: I()
|
|
4143
|
+
})])), G = P(), K = Cs(), Ds = z(G), Os = B({
|
|
4144
|
+
description: G.optional(),
|
|
4145
|
+
jsonSchema: K,
|
|
4146
|
+
nullable: L(),
|
|
4147
|
+
handle: G
|
|
4148
|
+
}), q = Os.extend({ value: K.optional() }), ks = B({
|
|
4149
|
+
collapsed: L().optional(),
|
|
4150
|
+
group: G
|
|
4151
|
+
}), As = B({
|
|
4152
|
+
kind: W("node"),
|
|
4153
|
+
nodeId: G,
|
|
4154
|
+
output: G
|
|
4155
|
+
}), js = B({
|
|
4156
|
+
kind: W("flow"),
|
|
4157
|
+
input: G
|
|
4158
|
+
}), Ms = V([
|
|
4160
4159
|
As,
|
|
4161
|
-
|
|
4162
|
-
|
|
4163
|
-
|
|
4160
|
+
js,
|
|
4161
|
+
B({
|
|
4162
|
+
kind: W("binding"),
|
|
4163
|
+
bindingId: G
|
|
4164
4164
|
})
|
|
4165
|
-
]),
|
|
4166
|
-
kind:
|
|
4167
|
-
value:
|
|
4168
|
-
}),
|
|
4169
|
-
kind:
|
|
4170
|
-
sources:
|
|
4171
|
-
})]),
|
|
4172
|
-
inputs:
|
|
4173
|
-
outputs:
|
|
4174
|
-
},
|
|
4175
|
-
kind:
|
|
4176
|
-
action:
|
|
4177
|
-
connectionId:
|
|
4178
|
-
connections: B(
|
|
4179
|
-
connectionId:
|
|
4180
|
-
alias:
|
|
4165
|
+
]), Ns = V([B({
|
|
4166
|
+
kind: W("value"),
|
|
4167
|
+
value: K
|
|
4168
|
+
}), B({
|
|
4169
|
+
kind: W("sources"),
|
|
4170
|
+
sources: z(Ms)
|
|
4171
|
+
})]), Ps = H(G, Ns), Fs = {
|
|
4172
|
+
inputs: z(V([q, ks])),
|
|
4173
|
+
outputs: z(V([Os, ks]))
|
|
4174
|
+
}, Is = B({
|
|
4175
|
+
kind: W("connector"),
|
|
4176
|
+
action: G,
|
|
4177
|
+
connectionId: G.optional(),
|
|
4178
|
+
connections: z(B({
|
|
4179
|
+
connectionId: G,
|
|
4180
|
+
alias: G.optional()
|
|
4181
4181
|
}))
|
|
4182
|
-
}),
|
|
4183
|
-
...
|
|
4184
|
-
name:
|
|
4185
|
-
moduleId:
|
|
4186
|
-
capabilities:
|
|
4187
|
-
}),
|
|
4188
|
-
kind:
|
|
4189
|
-
value:
|
|
4190
|
-
}),
|
|
4191
|
-
kind:
|
|
4192
|
-
input:
|
|
4193
|
-
})]),
|
|
4194
|
-
...
|
|
4195
|
-
name:
|
|
4196
|
-
executor:
|
|
4197
|
-
|
|
4198
|
-
kind:
|
|
4199
|
-
action:
|
|
4200
|
-
connectionId:
|
|
4182
|
+
}), Ls = B({
|
|
4183
|
+
...Fs,
|
|
4184
|
+
name: G,
|
|
4185
|
+
moduleId: G,
|
|
4186
|
+
capabilities: z(Is).optional()
|
|
4187
|
+
}), Rs = V([B({
|
|
4188
|
+
kind: W("value"),
|
|
4189
|
+
value: K
|
|
4190
|
+
}), B({
|
|
4191
|
+
kind: W("input"),
|
|
4192
|
+
input: G
|
|
4193
|
+
})]), zs = V([Rs, B({ kind: W("model") })]), Bs = B({
|
|
4194
|
+
...Fs,
|
|
4195
|
+
name: G,
|
|
4196
|
+
executor: V([
|
|
4197
|
+
B({
|
|
4198
|
+
kind: W("connector"),
|
|
4199
|
+
action: G,
|
|
4200
|
+
connectionId: G.optional()
|
|
4201
4201
|
}),
|
|
4202
|
-
|
|
4203
|
-
kind:
|
|
4204
|
-
mode:
|
|
4202
|
+
B({
|
|
4203
|
+
kind: W("llm"),
|
|
4204
|
+
mode: U(["chat", "json"])
|
|
4205
4205
|
}),
|
|
4206
|
-
|
|
4207
|
-
kind:
|
|
4208
|
-
code:
|
|
4209
|
-
model:
|
|
4210
|
-
prompt:
|
|
4211
|
-
system:
|
|
4212
|
-
maxRounds:
|
|
4213
|
-
tools: B(
|
|
4214
|
-
id:
|
|
4215
|
-
name:
|
|
4216
|
-
description:
|
|
4217
|
-
action:
|
|
4218
|
-
connectionId:
|
|
4219
|
-
approval:
|
|
4220
|
-
inputs:
|
|
4206
|
+
B({
|
|
4207
|
+
kind: W("agent"),
|
|
4208
|
+
code: L().optional(),
|
|
4209
|
+
model: G,
|
|
4210
|
+
prompt: Rs,
|
|
4211
|
+
system: G,
|
|
4212
|
+
maxRounds: I(),
|
|
4213
|
+
tools: z(B({
|
|
4214
|
+
id: G,
|
|
4215
|
+
name: G,
|
|
4216
|
+
description: G,
|
|
4217
|
+
action: G,
|
|
4218
|
+
connectionId: G.optional(),
|
|
4219
|
+
approval: L(),
|
|
4220
|
+
inputs: z(q.extend({ source: zs }))
|
|
4221
4221
|
})),
|
|
4222
|
-
notification:
|
|
4223
|
-
taskId:
|
|
4224
|
-
messageHandle:
|
|
4225
|
-
inputs:
|
|
4222
|
+
notification: B({
|
|
4223
|
+
taskId: G,
|
|
4224
|
+
messageHandle: G,
|
|
4225
|
+
inputs: H(G, Rs)
|
|
4226
4226
|
}).optional()
|
|
4227
4227
|
})
|
|
4228
4228
|
])
|
|
4229
|
-
}),
|
|
4230
|
-
input:
|
|
4231
|
-
cases: B(
|
|
4232
|
-
output:
|
|
4233
|
-
relation:
|
|
4234
|
-
expressions: B(
|
|
4235
|
-
input:
|
|
4236
|
-
operator:
|
|
4229
|
+
}), Vs = {
|
|
4230
|
+
input: q,
|
|
4231
|
+
cases: z(B({
|
|
4232
|
+
output: G,
|
|
4233
|
+
relation: U(["all", "any"]),
|
|
4234
|
+
expressions: z(B({
|
|
4235
|
+
input: G,
|
|
4236
|
+
operator: U([
|
|
4237
4237
|
"!=",
|
|
4238
4238
|
"<",
|
|
4239
4239
|
"<=",
|
|
@@ -4255,41 +4255,41 @@ var Ts = B(H([V({
|
|
|
4255
4255
|
"notHasValue",
|
|
4256
4256
|
"startsWith"
|
|
4257
4257
|
]),
|
|
4258
|
-
value:
|
|
4258
|
+
value: K.optional()
|
|
4259
4259
|
}))
|
|
4260
4260
|
})),
|
|
4261
|
-
defaultOutput:
|
|
4262
|
-
},
|
|
4263
|
-
bodyFields:
|
|
4264
|
-
options:
|
|
4265
|
-
allowedMethods:
|
|
4266
|
-
allowedOrigins:
|
|
4267
|
-
noResponseBody:
|
|
4268
|
-
responseData:
|
|
4269
|
-
responseHeaders:
|
|
4270
|
-
responseStatusCode:
|
|
4261
|
+
defaultOutput: G.optional()
|
|
4262
|
+
}, Hs = { prompt: G }, Us = {
|
|
4263
|
+
bodyFields: z(q),
|
|
4264
|
+
options: B({
|
|
4265
|
+
allowedMethods: Ds.optional(),
|
|
4266
|
+
allowedOrigins: Ds.optional(),
|
|
4267
|
+
noResponseBody: L().optional(),
|
|
4268
|
+
responseData: G.optional(),
|
|
4269
|
+
responseHeaders: H(G, G).optional(),
|
|
4270
|
+
responseStatusCode: I().optional()
|
|
4271
4271
|
}).optional()
|
|
4272
|
-
},
|
|
4273
|
-
configSchema:
|
|
4274
|
-
definitionVersion:
|
|
4275
|
-
description:
|
|
4276
|
-
displayName:
|
|
4277
|
-
key:
|
|
4278
|
-
name:
|
|
4279
|
-
outputs:
|
|
4280
|
-
provider:
|
|
4281
|
-
},
|
|
4282
|
-
body:
|
|
4283
|
-
allowArray:
|
|
4284
|
-
allowEmpty:
|
|
4285
|
-
formats:
|
|
4272
|
+
}, Ws = {
|
|
4273
|
+
configSchema: K,
|
|
4274
|
+
definitionVersion: W(2),
|
|
4275
|
+
description: G,
|
|
4276
|
+
displayName: G,
|
|
4277
|
+
key: G,
|
|
4278
|
+
name: G,
|
|
4279
|
+
outputs: z(Os).refine((e) => new Set(e.map((e) => e.handle)).size === e.length, "Duplicate Trigger output handle."),
|
|
4280
|
+
provider: G
|
|
4281
|
+
}, Gs = B({
|
|
4282
|
+
body: B({
|
|
4283
|
+
allowArray: L(),
|
|
4284
|
+
allowEmpty: L(),
|
|
4285
|
+
formats: z(U([
|
|
4286
4286
|
"form",
|
|
4287
4287
|
"json",
|
|
4288
4288
|
"multipart",
|
|
4289
4289
|
"text"
|
|
4290
4290
|
]))
|
|
4291
4291
|
}),
|
|
4292
|
-
methods:
|
|
4292
|
+
methods: z(U([
|
|
4293
4293
|
"DELETE",
|
|
4294
4294
|
"GET",
|
|
4295
4295
|
"HEAD",
|
|
@@ -4297,150 +4297,228 @@ var Ts = B(H([V({
|
|
|
4297
4297
|
"POST",
|
|
4298
4298
|
"PUT"
|
|
4299
4299
|
])),
|
|
4300
|
-
successStatus:
|
|
4301
|
-
}),
|
|
4302
|
-
name:
|
|
4303
|
-
description:
|
|
4304
|
-
icon:
|
|
4305
|
-
},
|
|
4306
|
-
maxExecutions:
|
|
4307
|
-
inputs:
|
|
4308
|
-
name:
|
|
4309
|
-
description:
|
|
4310
|
-
icon:
|
|
4311
|
-
timeoutMs:
|
|
4312
|
-
},
|
|
4313
|
-
|
|
4314
|
-
...
|
|
4315
|
-
kind:
|
|
4316
|
-
...
|
|
4300
|
+
successStatus: I()
|
|
4301
|
+
}), Ks = {
|
|
4302
|
+
name: G,
|
|
4303
|
+
description: G.optional(),
|
|
4304
|
+
icon: G.optional()
|
|
4305
|
+
}, J = {
|
|
4306
|
+
maxExecutions: I().int().positive().max(2 ** 53 - 1).optional(),
|
|
4307
|
+
inputs: Ps,
|
|
4308
|
+
name: G.optional(),
|
|
4309
|
+
description: G.optional(),
|
|
4310
|
+
icon: G.optional(),
|
|
4311
|
+
timeoutMs: I().optional()
|
|
4312
|
+
}, qs = V([
|
|
4313
|
+
B({
|
|
4314
|
+
...J,
|
|
4315
|
+
kind: W("condition"),
|
|
4316
|
+
...Vs
|
|
4317
4317
|
}),
|
|
4318
|
-
|
|
4319
|
-
...
|
|
4320
|
-
inputs:
|
|
4321
|
-
kind:
|
|
4322
|
-
values:
|
|
4318
|
+
B({
|
|
4319
|
+
...J,
|
|
4320
|
+
inputs: R().transform(() => ({})).default({}),
|
|
4321
|
+
kind: W("value"),
|
|
4322
|
+
values: z(q)
|
|
4323
4323
|
}),
|
|
4324
|
-
|
|
4325
|
-
...
|
|
4326
|
-
kind:
|
|
4327
|
-
subflowId:
|
|
4324
|
+
B({
|
|
4325
|
+
...J,
|
|
4326
|
+
kind: W("subflow"),
|
|
4327
|
+
subflowId: G
|
|
4328
4328
|
}),
|
|
4329
|
-
|
|
4330
|
-
...
|
|
4331
|
-
kind:
|
|
4332
|
-
task:
|
|
4333
|
-
additionalInputs:
|
|
4329
|
+
B({
|
|
4330
|
+
...J,
|
|
4331
|
+
kind: W("task"),
|
|
4332
|
+
task: Ls,
|
|
4333
|
+
additionalInputs: z(q).optional()
|
|
4334
4334
|
}),
|
|
4335
|
-
|
|
4336
|
-
...
|
|
4337
|
-
kind:
|
|
4338
|
-
taskId:
|
|
4339
|
-
additionalInputs:
|
|
4335
|
+
B({
|
|
4336
|
+
...J,
|
|
4337
|
+
kind: W("task"),
|
|
4338
|
+
taskId: G,
|
|
4339
|
+
additionalInputs: z(q).optional()
|
|
4340
4340
|
}),
|
|
4341
|
-
|
|
4342
|
-
...
|
|
4343
|
-
kind:
|
|
4344
|
-
input:
|
|
4345
|
-
...
|
|
4341
|
+
Go({
|
|
4342
|
+
...J,
|
|
4343
|
+
kind: W("approval"),
|
|
4344
|
+
input: q,
|
|
4345
|
+
...Hs
|
|
4346
4346
|
}).omit({ timeoutMs: !0 }),
|
|
4347
|
-
|
|
4348
|
-
...
|
|
4349
|
-
kind:
|
|
4350
|
-
input:
|
|
4351
|
-
...
|
|
4347
|
+
Go({
|
|
4348
|
+
...J,
|
|
4349
|
+
kind: W("wait"),
|
|
4350
|
+
input: q,
|
|
4351
|
+
...Hs
|
|
4352
4352
|
}).omit({ timeoutMs: !0 }),
|
|
4353
|
-
|
|
4354
|
-
...
|
|
4355
|
-
kind:
|
|
4353
|
+
B({
|
|
4354
|
+
...Ks,
|
|
4355
|
+
kind: W("manual")
|
|
4356
4356
|
}),
|
|
4357
|
-
|
|
4358
|
-
...
|
|
4359
|
-
kind:
|
|
4360
|
-
...
|
|
4357
|
+
B({
|
|
4358
|
+
...Ks,
|
|
4359
|
+
kind: W("webhook"),
|
|
4360
|
+
...Us
|
|
4361
4361
|
}),
|
|
4362
|
-
|
|
4363
|
-
...
|
|
4364
|
-
kind:
|
|
4365
|
-
cronTimes:
|
|
4362
|
+
B({
|
|
4363
|
+
...Ks,
|
|
4364
|
+
kind: W("cron"),
|
|
4365
|
+
cronTimes: Es
|
|
4366
4366
|
}),
|
|
4367
|
-
|
|
4368
|
-
...
|
|
4369
|
-
kind:
|
|
4370
|
-
bindingId:
|
|
4371
|
-
config:
|
|
4372
|
-
definition:
|
|
4373
|
-
...
|
|
4374
|
-
type:
|
|
4367
|
+
B({
|
|
4368
|
+
...Ks,
|
|
4369
|
+
kind: W("poll"),
|
|
4370
|
+
bindingId: G,
|
|
4371
|
+
config: H(G, K),
|
|
4372
|
+
definition: B({
|
|
4373
|
+
...Ws,
|
|
4374
|
+
type: W("poll")
|
|
4375
4375
|
}),
|
|
4376
|
-
pollTimes:
|
|
4376
|
+
pollTimes: Es
|
|
4377
4377
|
}),
|
|
4378
|
-
|
|
4379
|
-
...
|
|
4380
|
-
kind:
|
|
4381
|
-
bindingId:
|
|
4382
|
-
config:
|
|
4383
|
-
definition:
|
|
4384
|
-
...
|
|
4385
|
-
type:
|
|
4386
|
-
endpoint:
|
|
4378
|
+
B({
|
|
4379
|
+
...Ks,
|
|
4380
|
+
kind: W("integration"),
|
|
4381
|
+
bindingId: G,
|
|
4382
|
+
config: H(G, K),
|
|
4383
|
+
definition: B({
|
|
4384
|
+
...Ws,
|
|
4385
|
+
type: W("integration"),
|
|
4386
|
+
endpoint: Gs
|
|
4387
4387
|
})
|
|
4388
4388
|
})
|
|
4389
|
-
]),
|
|
4390
|
-
kind:
|
|
4391
|
-
id:
|
|
4392
|
-
})]),
|
|
4393
|
-
source:
|
|
4394
|
-
target:
|
|
4395
|
-
sourceHandle:
|
|
4396
|
-
}),
|
|
4397
|
-
nodeId:
|
|
4398
|
-
target:
|
|
4399
|
-
},
|
|
4400
|
-
name:
|
|
4401
|
-
inputs:
|
|
4402
|
-
outputs:
|
|
4403
|
-
}),
|
|
4404
|
-
nodes:
|
|
4405
|
-
edges:
|
|
4406
|
-
}),
|
|
4407
|
-
kind:
|
|
4408
|
-
target:
|
|
4409
|
-
}),
|
|
4410
|
-
name:
|
|
4411
|
-
imports:
|
|
4412
|
-
source:
|
|
4413
|
-
}),
|
|
4414
|
-
bindings:
|
|
4415
|
-
graph:
|
|
4416
|
-
subflows:
|
|
4417
|
-
tasks:
|
|
4418
|
-
}),
|
|
4419
|
-
modelVersion:
|
|
4420
|
-
document:
|
|
4421
|
-
modules:
|
|
4422
|
-
}), tc =
|
|
4423
|
-
kind:
|
|
4424
|
-
version:
|
|
4389
|
+
]), Js = V([B({ kind: W("flow") }), B({
|
|
4390
|
+
kind: W("subflow"),
|
|
4391
|
+
id: G
|
|
4392
|
+
})]), Ys = B({
|
|
4393
|
+
source: G,
|
|
4394
|
+
target: G,
|
|
4395
|
+
sourceHandle: G.optional()
|
|
4396
|
+
}), Y = {
|
|
4397
|
+
nodeId: G,
|
|
4398
|
+
target: Js
|
|
4399
|
+
}, Xs = B({
|
|
4400
|
+
name: G,
|
|
4401
|
+
inputs: z(q),
|
|
4402
|
+
outputs: z(Os.extend({ sources: z(V([As, js])) }))
|
|
4403
|
+
}), Zs = B({
|
|
4404
|
+
nodes: H(G, qs),
|
|
4405
|
+
edges: z(Ys).default([])
|
|
4406
|
+
}), Qs = B({
|
|
4407
|
+
kind: U(["connection", "variable"]),
|
|
4408
|
+
target: G
|
|
4409
|
+
}), $s = B({
|
|
4410
|
+
name: G,
|
|
4411
|
+
imports: Ds,
|
|
4412
|
+
source: G
|
|
4413
|
+
}), ec = B({
|
|
4414
|
+
bindings: H(G, Qs),
|
|
4415
|
+
graph: Zs,
|
|
4416
|
+
subflows: H(G, Xs.extend({ graph: Zs })),
|
|
4417
|
+
tasks: H(G, Bs)
|
|
4418
|
+
}), tc = B({
|
|
4419
|
+
modelVersion: V([W(2), W(3)]),
|
|
4420
|
+
document: ec,
|
|
4421
|
+
modules: H(G, $s)
|
|
4422
|
+
}), nc = tc.extend({ modelVersion: W(3) }), rc = tc.extend({
|
|
4423
|
+
kind: W("open-flow-flow-revision"),
|
|
4424
|
+
version: W(1)
|
|
4425
4425
|
});
|
|
4426
|
-
function
|
|
4426
|
+
function X(e) {
|
|
4427
4427
|
return typeof e == "object" && e && !Array.isArray(e) ? e : {};
|
|
4428
4428
|
}
|
|
4429
|
-
function
|
|
4430
|
-
return
|
|
4429
|
+
function ic(e, t) {
|
|
4430
|
+
return Array.isArray(e) ? e.map((e) => {
|
|
4431
|
+
let n = X(e);
|
|
4432
|
+
return n.kind == "node" && typeof n.nodeId == "string" && t.has(n.nodeId) && n.output == "notification" ? {
|
|
4433
|
+
...n,
|
|
4434
|
+
output: "pending"
|
|
4435
|
+
} : e;
|
|
4436
|
+
}) : e;
|
|
4437
|
+
}
|
|
4438
|
+
function ac(e, t) {
|
|
4439
|
+
return Object.fromEntries(Object.entries(X(e)).map(([e, n]) => {
|
|
4440
|
+
let r = X(n);
|
|
4441
|
+
return [e, r.kind == "sources" ? {
|
|
4442
|
+
...r,
|
|
4443
|
+
sources: ic(r.sources, t)
|
|
4444
|
+
} : n];
|
|
4445
|
+
}));
|
|
4446
|
+
}
|
|
4447
|
+
function oc(e) {
|
|
4448
|
+
let t = X(e), n = /* @__PURE__ */ new Set(), r = Object.fromEntries(Object.entries(X(t.nodes)).map(([e, t]) => {
|
|
4449
|
+
let r = X(t);
|
|
4450
|
+
if (r.kind == "approval") throw TypeError("Legacy Flow models do not support Approval nodes.");
|
|
4451
|
+
if (r.kind != "wait") return [e, t];
|
|
4452
|
+
let i = r.actions, a;
|
|
4453
|
+
if (Array.isArray(i) && i.length == 1 && i[0] == "continue") a = "wait";
|
|
4454
|
+
else if (Array.isArray(i) && i.length == 2 && i[0] == "approve" && i[1] == "reject") a = "approval";
|
|
4455
|
+
else throw TypeError("Legacy Wait actions are invalid.");
|
|
4456
|
+
n.add(e);
|
|
4457
|
+
let { actions: o, ...s } = r;
|
|
4458
|
+
return [e, {
|
|
4459
|
+
...s,
|
|
4460
|
+
kind: a
|
|
4461
|
+
}];
|
|
4462
|
+
}));
|
|
4463
|
+
for (let [e, t] of Object.entries(r)) {
|
|
4464
|
+
let i = X(t);
|
|
4465
|
+
i.inputs != null && (r[e] = {
|
|
4466
|
+
...i,
|
|
4467
|
+
inputs: ac(i.inputs, n)
|
|
4468
|
+
});
|
|
4469
|
+
}
|
|
4470
|
+
let i = Array.isArray(t.edges) ? t.edges.map((e) => {
|
|
4471
|
+
let t = X(e);
|
|
4472
|
+
return typeof t.source == "string" && n.has(t.source) && t.sourceHandle == "notification" ? {
|
|
4473
|
+
...t,
|
|
4474
|
+
sourceHandle: "pending"
|
|
4475
|
+
} : e;
|
|
4476
|
+
}) : t.edges;
|
|
4477
|
+
return {
|
|
4478
|
+
graph: {
|
|
4479
|
+
...t,
|
|
4480
|
+
nodes: r,
|
|
4481
|
+
edges: i
|
|
4482
|
+
},
|
|
4483
|
+
resolutionIds: n
|
|
4484
|
+
};
|
|
4485
|
+
}
|
|
4486
|
+
function sc(e) {
|
|
4487
|
+
let t = X(e), n = oc(t.graph), r = Object.fromEntries(Object.entries(X(t.subflows)).map(([e, t]) => {
|
|
4488
|
+
let n = X(t), r = oc(n.graph), i = Array.isArray(n.outputs) ? n.outputs.map((e) => {
|
|
4489
|
+
let t = X(e);
|
|
4490
|
+
return {
|
|
4491
|
+
...t,
|
|
4492
|
+
sources: ic(t.sources, r.resolutionIds)
|
|
4493
|
+
};
|
|
4494
|
+
}) : n.outputs;
|
|
4495
|
+
return [e, {
|
|
4496
|
+
...n,
|
|
4497
|
+
graph: r.graph,
|
|
4498
|
+
outputs: i
|
|
4499
|
+
}];
|
|
4500
|
+
}));
|
|
4501
|
+
return {
|
|
4502
|
+
...t,
|
|
4503
|
+
graph: n.graph,
|
|
4504
|
+
subflows: r
|
|
4505
|
+
};
|
|
4506
|
+
}
|
|
4507
|
+
function cc(e, t, n) {
|
|
4508
|
+
return Object.fromEntries(Object.entries(X(e)).flatMap(([e, r]) => {
|
|
4431
4509
|
let i = t.safeParse(n?.(r) ?? r);
|
|
4432
4510
|
return i.success ? [[e, i.data]] : [];
|
|
4433
4511
|
}));
|
|
4434
4512
|
}
|
|
4435
|
-
function
|
|
4436
|
-
let t =
|
|
4513
|
+
function lc(e) {
|
|
4514
|
+
let t = X(e);
|
|
4437
4515
|
if (t.kind == "webhook" && t.bodyFields == null && t.inputsDef != null) return {
|
|
4438
4516
|
...t,
|
|
4439
4517
|
bodyFields: t.inputsDef,
|
|
4440
4518
|
inputsDef: void 0
|
|
4441
4519
|
};
|
|
4442
4520
|
if ((t.kind == "poll" || t.kind == "integration") && t.definition != null) {
|
|
4443
|
-
let e =
|
|
4521
|
+
let e = X(t.definition);
|
|
4444
4522
|
if (e.outputs == null && e.payloadSchema != null) return {
|
|
4445
4523
|
...t,
|
|
4446
4524
|
definition: {
|
|
@@ -4457,228 +4535,231 @@ function rc(e) {
|
|
|
4457
4535
|
}
|
|
4458
4536
|
return t;
|
|
4459
4537
|
}
|
|
4460
|
-
function
|
|
4461
|
-
let t =
|
|
4538
|
+
function uc(e) {
|
|
4539
|
+
let t = X(e), n = cc(t.nodes, qs, lc), r = new Set(Object.entries(n).flatMap(([e, t]) => t.kind == "webhook" ? [e] : []));
|
|
4462
4540
|
for (let e of Object.values(n)) if ("inputs" in e) {
|
|
4463
4541
|
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");
|
|
4464
4542
|
}
|
|
4465
4543
|
return {
|
|
4466
4544
|
nodes: n,
|
|
4467
|
-
edges: Array.isArray(t.edges) ? t.edges.flatMap((e) =>
|
|
4545
|
+
edges: Array.isArray(t.edges) ? t.edges.flatMap((e) => Ys.safeParse(e).data ?? []) : []
|
|
4468
4546
|
};
|
|
4469
4547
|
}
|
|
4470
|
-
function
|
|
4471
|
-
|
|
4472
|
-
let t =
|
|
4548
|
+
function dc(e) {
|
|
4549
|
+
Ts(e);
|
|
4550
|
+
let t = X(e);
|
|
4473
4551
|
if (t.kind != "open-flow-flow-revision" || t.version != 1) throw TypeError("The value is not an Open Flow Revision envelope.");
|
|
4474
|
-
if (typeof t.modelVersion == "number" && t.modelVersion >
|
|
4475
|
-
let n =
|
|
4476
|
-
let n =
|
|
4552
|
+
if (typeof t.modelVersion == "number" && t.modelVersion > 3) throw TypeError("The Flow model is newer than this package.");
|
|
4553
|
+
let n = X(t.modelVersion == 1 || t.modelVersion == 2 ? sc(t.document) : t.document), r = uc(n.graph), i = Object.fromEntries(Object.entries(X(n.subflows)).flatMap(([e, t]) => {
|
|
4554
|
+
let n = X(t), r = Xs.extend({ graph: Zs }).safeParse({
|
|
4477
4555
|
...n,
|
|
4478
|
-
graph:
|
|
4556
|
+
graph: uc(n.graph)
|
|
4479
4557
|
});
|
|
4480
4558
|
return r.success ? [[e, r.data]] : [];
|
|
4481
4559
|
}));
|
|
4482
|
-
return
|
|
4483
|
-
modelVersion:
|
|
4560
|
+
return pc({
|
|
4561
|
+
modelVersion: 3,
|
|
4484
4562
|
document: {
|
|
4485
|
-
bindings:
|
|
4563
|
+
bindings: cc(n.bindings, Qs),
|
|
4486
4564
|
graph: r,
|
|
4487
4565
|
subflows: i,
|
|
4488
|
-
tasks:
|
|
4566
|
+
tasks: cc(n.tasks, Bs)
|
|
4489
4567
|
},
|
|
4490
|
-
modules:
|
|
4568
|
+
modules: cc(t.modules, $s)
|
|
4491
4569
|
});
|
|
4492
4570
|
}
|
|
4493
|
-
function
|
|
4494
|
-
return
|
|
4571
|
+
function fc(e) {
|
|
4572
|
+
return Ts(e), ec.parse(e);
|
|
4495
4573
|
}
|
|
4496
|
-
function
|
|
4497
|
-
return
|
|
4574
|
+
function pc(e) {
|
|
4575
|
+
return Ts(e), nc.parse(e);
|
|
4498
4576
|
}
|
|
4499
|
-
function
|
|
4500
|
-
|
|
4501
|
-
let t =
|
|
4577
|
+
function mc(e) {
|
|
4578
|
+
Ts(e);
|
|
4579
|
+
let t = X(e), n = t.modelVersion == 2 ? {
|
|
4580
|
+
...t,
|
|
4581
|
+
document: sc(t.document)
|
|
4582
|
+
} : e, r = rc.parse(n);
|
|
4502
4583
|
return {
|
|
4503
|
-
modelVersion:
|
|
4504
|
-
document:
|
|
4505
|
-
modules:
|
|
4584
|
+
modelVersion: r.modelVersion,
|
|
4585
|
+
document: r.document,
|
|
4586
|
+
modules: r.modules
|
|
4506
4587
|
};
|
|
4507
4588
|
}
|
|
4508
|
-
var
|
|
4589
|
+
var hc = {
|
|
4509
4590
|
"binding.create": {
|
|
4510
|
-
bindingId:
|
|
4511
|
-
binding:
|
|
4591
|
+
bindingId: G,
|
|
4592
|
+
binding: Qs
|
|
4512
4593
|
},
|
|
4513
|
-
"binding.delete": { bindingId:
|
|
4594
|
+
"binding.delete": { bindingId: G },
|
|
4514
4595
|
"binding.target.set": {
|
|
4515
|
-
bindingId:
|
|
4516
|
-
before:
|
|
4517
|
-
value:
|
|
4596
|
+
bindingId: G,
|
|
4597
|
+
before: G,
|
|
4598
|
+
value: G
|
|
4518
4599
|
},
|
|
4519
4600
|
"graph.edge.connect": {
|
|
4520
|
-
target:
|
|
4521
|
-
edge:
|
|
4601
|
+
target: Js,
|
|
4602
|
+
edge: Ys
|
|
4522
4603
|
},
|
|
4523
4604
|
"graph.edge.disconnect": {
|
|
4524
|
-
target:
|
|
4525
|
-
edge:
|
|
4605
|
+
target: Js,
|
|
4606
|
+
edge: Ys
|
|
4526
4607
|
},
|
|
4527
4608
|
"graph.node.create": {
|
|
4528
|
-
...
|
|
4529
|
-
node:
|
|
4530
|
-
},
|
|
4531
|
-
"graph.node.delete":
|
|
4532
|
-
"graph.node.field.set":
|
|
4533
|
-
|
|
4534
|
-
...
|
|
4535
|
-
kind:
|
|
4536
|
-
field:
|
|
4609
|
+
...Y,
|
|
4610
|
+
node: qs
|
|
4611
|
+
},
|
|
4612
|
+
"graph.node.delete": Y,
|
|
4613
|
+
"graph.node.field.set": V([
|
|
4614
|
+
B({
|
|
4615
|
+
...Y,
|
|
4616
|
+
kind: W("graph.node.field.set"),
|
|
4617
|
+
field: U([
|
|
4537
4618
|
"description",
|
|
4538
4619
|
"icon",
|
|
4539
4620
|
"name"
|
|
4540
4621
|
]),
|
|
4541
|
-
before:
|
|
4542
|
-
value:
|
|
4622
|
+
before: G.optional(),
|
|
4623
|
+
value: G.optional()
|
|
4543
4624
|
}),
|
|
4544
|
-
|
|
4545
|
-
...
|
|
4546
|
-
kind:
|
|
4547
|
-
field:
|
|
4548
|
-
before:
|
|
4549
|
-
value:
|
|
4625
|
+
B({
|
|
4626
|
+
...Y,
|
|
4627
|
+
kind: W("graph.node.field.set"),
|
|
4628
|
+
field: W("maxExecutions"),
|
|
4629
|
+
before: I().int().positive().max(2 ** 53 - 1).optional(),
|
|
4630
|
+
value: I().int().positive().max(2 ** 53 - 1).optional()
|
|
4550
4631
|
}),
|
|
4551
|
-
|
|
4552
|
-
...
|
|
4553
|
-
kind:
|
|
4554
|
-
field:
|
|
4555
|
-
before:
|
|
4556
|
-
value:
|
|
4632
|
+
B({
|
|
4633
|
+
...Y,
|
|
4634
|
+
kind: W("graph.node.field.set"),
|
|
4635
|
+
field: W("timeoutMs"),
|
|
4636
|
+
before: I().optional(),
|
|
4637
|
+
value: I().optional()
|
|
4557
4638
|
})
|
|
4558
4639
|
]),
|
|
4559
4640
|
"graph.node.input.set": {
|
|
4560
|
-
...
|
|
4561
|
-
handle:
|
|
4562
|
-
before:
|
|
4563
|
-
value:
|
|
4641
|
+
...Y,
|
|
4642
|
+
handle: G,
|
|
4643
|
+
before: Ns.optional(),
|
|
4644
|
+
value: Ns.optional()
|
|
4564
4645
|
},
|
|
4565
4646
|
"graph.node.additional-inputs.set": {
|
|
4566
|
-
...
|
|
4567
|
-
before:
|
|
4568
|
-
value:
|
|
4647
|
+
...Y,
|
|
4648
|
+
before: z(q).optional(),
|
|
4649
|
+
value: z(q).optional()
|
|
4569
4650
|
},
|
|
4570
4651
|
"graph.node.condition.set": {
|
|
4571
|
-
...
|
|
4572
|
-
before:
|
|
4573
|
-
value:
|
|
4652
|
+
...Y,
|
|
4653
|
+
before: B(Vs),
|
|
4654
|
+
value: B(Vs)
|
|
4574
4655
|
},
|
|
4575
4656
|
"graph.node.values.set": {
|
|
4576
|
-
...
|
|
4577
|
-
before:
|
|
4578
|
-
value:
|
|
4657
|
+
...Y,
|
|
4658
|
+
before: z(q),
|
|
4659
|
+
value: z(q)
|
|
4579
4660
|
},
|
|
4580
4661
|
"graph.node.resolution.set": {
|
|
4581
|
-
...
|
|
4582
|
-
target:
|
|
4583
|
-
before:
|
|
4584
|
-
value:
|
|
4662
|
+
...Y,
|
|
4663
|
+
target: B({ kind: W("flow") }),
|
|
4664
|
+
before: B(Hs),
|
|
4665
|
+
value: B(Hs)
|
|
4585
4666
|
},
|
|
4586
4667
|
"graph.node.webhook.set": {
|
|
4587
|
-
...
|
|
4588
|
-
target:
|
|
4589
|
-
before:
|
|
4590
|
-
value:
|
|
4668
|
+
...Y,
|
|
4669
|
+
target: B({ kind: W("flow") }),
|
|
4670
|
+
before: B(Us),
|
|
4671
|
+
value: B(Us)
|
|
4591
4672
|
},
|
|
4592
4673
|
"graph.node.task.ports.set": {
|
|
4593
|
-
...
|
|
4594
|
-
before:
|
|
4595
|
-
value:
|
|
4674
|
+
...Y,
|
|
4675
|
+
before: B(Fs),
|
|
4676
|
+
value: B(Fs)
|
|
4596
4677
|
},
|
|
4597
4678
|
"graph.node.task.name.set": {
|
|
4598
|
-
...
|
|
4599
|
-
before:
|
|
4600
|
-
value:
|
|
4679
|
+
...Y,
|
|
4680
|
+
before: G,
|
|
4681
|
+
value: G
|
|
4601
4682
|
},
|
|
4602
4683
|
"graph.node.task.capabilities.set": {
|
|
4603
|
-
...
|
|
4604
|
-
before:
|
|
4605
|
-
value:
|
|
4684
|
+
...Y,
|
|
4685
|
+
before: z(Is).optional(),
|
|
4686
|
+
value: z(Is).optional()
|
|
4606
4687
|
},
|
|
4607
4688
|
"graph.trigger.config.set": {
|
|
4608
|
-
nodeId:
|
|
4609
|
-
name:
|
|
4610
|
-
before:
|
|
4611
|
-
value:
|
|
4689
|
+
nodeId: G,
|
|
4690
|
+
name: G,
|
|
4691
|
+
before: K.optional(),
|
|
4692
|
+
value: K.optional()
|
|
4612
4693
|
},
|
|
4613
4694
|
"graph.trigger.schedule.set": {
|
|
4614
|
-
nodeId:
|
|
4615
|
-
before:
|
|
4616
|
-
value:
|
|
4695
|
+
nodeId: G,
|
|
4696
|
+
before: Es,
|
|
4697
|
+
value: Es
|
|
4617
4698
|
},
|
|
4618
4699
|
"module.create": {
|
|
4619
|
-
moduleId:
|
|
4620
|
-
module:
|
|
4700
|
+
moduleId: G,
|
|
4701
|
+
module: $s
|
|
4621
4702
|
},
|
|
4622
|
-
"module.delete": { moduleId:
|
|
4703
|
+
"module.delete": { moduleId: G },
|
|
4623
4704
|
"module.rename": {
|
|
4624
|
-
moduleId:
|
|
4625
|
-
before:
|
|
4626
|
-
name:
|
|
4705
|
+
moduleId: G,
|
|
4706
|
+
before: G,
|
|
4707
|
+
name: G
|
|
4627
4708
|
},
|
|
4628
4709
|
"module.source.replace": {
|
|
4629
|
-
moduleId:
|
|
4630
|
-
beforeImports:
|
|
4631
|
-
beforeSource:
|
|
4632
|
-
imports:
|
|
4633
|
-
source:
|
|
4710
|
+
moduleId: G,
|
|
4711
|
+
beforeImports: Ds,
|
|
4712
|
+
beforeSource: G,
|
|
4713
|
+
imports: Ds,
|
|
4714
|
+
source: G
|
|
4634
4715
|
},
|
|
4635
4716
|
"subflow.create": {
|
|
4636
|
-
subflowId:
|
|
4637
|
-
subflow:
|
|
4717
|
+
subflowId: G,
|
|
4718
|
+
subflow: Xs.extend({ graph: Zs })
|
|
4638
4719
|
},
|
|
4639
4720
|
"subflow.definition.set": {
|
|
4640
|
-
subflowId:
|
|
4641
|
-
before:
|
|
4642
|
-
definition:
|
|
4721
|
+
subflowId: G,
|
|
4722
|
+
before: Xs,
|
|
4723
|
+
definition: Xs
|
|
4643
4724
|
},
|
|
4644
|
-
"subflow.delete": { subflowId:
|
|
4725
|
+
"subflow.delete": { subflowId: G },
|
|
4645
4726
|
"task.create": {
|
|
4646
|
-
taskId:
|
|
4647
|
-
task:
|
|
4727
|
+
taskId: G,
|
|
4728
|
+
task: Bs
|
|
4648
4729
|
},
|
|
4649
|
-
"task.delete": { taskId:
|
|
4730
|
+
"task.delete": { taskId: G },
|
|
4650
4731
|
"task.connector.connection.set": {
|
|
4651
|
-
taskId:
|
|
4652
|
-
before:
|
|
4653
|
-
value:
|
|
4732
|
+
taskId: G,
|
|
4733
|
+
before: G.optional(),
|
|
4734
|
+
value: G.optional()
|
|
4654
4735
|
},
|
|
4655
4736
|
"task.agent.set": {
|
|
4656
|
-
taskId:
|
|
4657
|
-
before:
|
|
4658
|
-
value:
|
|
4737
|
+
taskId: G,
|
|
4738
|
+
before: Bs,
|
|
4739
|
+
value: Bs
|
|
4659
4740
|
},
|
|
4660
4741
|
"task.llm.mode.set": {
|
|
4661
|
-
taskId:
|
|
4662
|
-
before:
|
|
4663
|
-
value:
|
|
4742
|
+
taskId: G,
|
|
4743
|
+
before: U(["chat", "json"]),
|
|
4744
|
+
value: U(["chat", "json"])
|
|
4664
4745
|
},
|
|
4665
4746
|
"task.name.set": {
|
|
4666
|
-
taskId:
|
|
4667
|
-
before:
|
|
4668
|
-
value:
|
|
4747
|
+
taskId: G,
|
|
4748
|
+
before: G,
|
|
4749
|
+
value: G
|
|
4669
4750
|
}
|
|
4670
4751
|
};
|
|
4671
|
-
|
|
4672
|
-
kind:
|
|
4752
|
+
z(V([...new Map(Object.entries(hc).map(([e, t]) => [e, t instanceof N ? t : B({
|
|
4753
|
+
kind: W(e),
|
|
4673
4754
|
...t
|
|
4674
4755
|
})])).values()])).min(1);
|
|
4675
4756
|
//#endregion
|
|
4676
4757
|
//#region src/flow/common/change.ts
|
|
4677
|
-
function
|
|
4758
|
+
function gc(e) {
|
|
4678
4759
|
return e.trim().normalize("NFC");
|
|
4679
4760
|
}
|
|
4680
|
-
function
|
|
4681
|
-
let n =
|
|
4761
|
+
function _c(e, t) {
|
|
4762
|
+
let n = gc(e), r = new Set([...t].map(gc));
|
|
4682
4763
|
if (!r.has(n)) return n;
|
|
4683
4764
|
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;
|
|
4684
4765
|
for (; r.has(`${s} (${c})`);) c += 1;
|
|
@@ -4686,24 +4767,24 @@ function dc(e, t) {
|
|
|
4686
4767
|
}
|
|
4687
4768
|
//#endregion
|
|
4688
4769
|
//#region src/flow/common/encoding.ts
|
|
4689
|
-
var
|
|
4690
|
-
function
|
|
4770
|
+
var vc = new TextEncoder();
|
|
4771
|
+
function Z(e) {
|
|
4691
4772
|
if (e == null || typeof e == "boolean" || typeof e == "string" || typeof e == "number") return JSON.stringify(e);
|
|
4692
|
-
if (Array.isArray(e)) return `[${e.map(
|
|
4773
|
+
if (Array.isArray(e)) return `[${e.map(Z).join(",")}]`;
|
|
4693
4774
|
let t = e;
|
|
4694
|
-
return `{${Object.keys(t).toSorted().map((e) => `${JSON.stringify(e)}:${
|
|
4775
|
+
return `{${Object.keys(t).toSorted().map((e) => `${JSON.stringify(e)}:${Z(t[e])}`).join(",")}}`;
|
|
4695
4776
|
}
|
|
4696
|
-
function
|
|
4697
|
-
return
|
|
4777
|
+
function yc(e) {
|
|
4778
|
+
return vc.encode(Z(e));
|
|
4698
4779
|
}
|
|
4699
|
-
async function
|
|
4780
|
+
async function bc(e) {
|
|
4700
4781
|
let t = new Uint8Array(e.byteLength);
|
|
4701
4782
|
return t.set(e), `sha256:${[...new Uint8Array(await crypto.subtle.digest("SHA-256", t))].map((e) => e.toString(16).padStart(2, "0")).join("")}`;
|
|
4702
4783
|
}
|
|
4703
4784
|
function Q(e) {
|
|
4704
4785
|
return Object.keys(e).toSorted().map((t) => [t, e[t]]);
|
|
4705
4786
|
}
|
|
4706
|
-
function
|
|
4787
|
+
function xc(e) {
|
|
4707
4788
|
return "handle" in e ? {
|
|
4708
4789
|
...e.description == null ? {} : { description: e.description },
|
|
4709
4790
|
handle: e.handle,
|
|
@@ -4716,9 +4797,9 @@ function gc(e) {
|
|
|
4716
4797
|
};
|
|
4717
4798
|
}
|
|
4718
4799
|
function $(e) {
|
|
4719
|
-
return e.map(
|
|
4800
|
+
return e.map(xc);
|
|
4720
4801
|
}
|
|
4721
|
-
function
|
|
4802
|
+
function Sc(e) {
|
|
4722
4803
|
switch (e.kind) {
|
|
4723
4804
|
case "sources": return {
|
|
4724
4805
|
kind: e.kind,
|
|
@@ -4730,10 +4811,10 @@ function _c(e) {
|
|
|
4730
4811
|
};
|
|
4731
4812
|
}
|
|
4732
4813
|
}
|
|
4733
|
-
function
|
|
4734
|
-
return Object.fromEntries(Q(e).map(([e, t]) => [e,
|
|
4814
|
+
function Cc(e) {
|
|
4815
|
+
return Object.fromEntries(Q(e).map(([e, t]) => [e, Sc(t)]));
|
|
4735
4816
|
}
|
|
4736
|
-
function
|
|
4817
|
+
function wc(e) {
|
|
4737
4818
|
return e.map((e) => ({
|
|
4738
4819
|
...e.description == null ? {} : { description: e.description },
|
|
4739
4820
|
handle: e.handle,
|
|
@@ -4742,12 +4823,12 @@ function yc(e) {
|
|
|
4742
4823
|
sources: e.sources.map((e) => ({ ...e }))
|
|
4743
4824
|
}));
|
|
4744
4825
|
}
|
|
4745
|
-
function
|
|
4746
|
-
if (!("inputs" in e)) return
|
|
4826
|
+
function Tc(e) {
|
|
4827
|
+
if (!("inputs" in e)) return zc(e);
|
|
4747
4828
|
let t = {
|
|
4748
4829
|
...e.description == null ? {} : { description: e.description },
|
|
4749
4830
|
...e.icon == null ? {} : { icon: e.icon },
|
|
4750
|
-
inputs:
|
|
4831
|
+
inputs: Cc(e.inputs),
|
|
4751
4832
|
...e.name == null ? {} : { name: e.name },
|
|
4752
4833
|
...e.maxExecutions == null ? {} : { maxExecutions: e.maxExecutions },
|
|
4753
4834
|
...e.timeoutMs == null ? {} : { timeoutMs: e.timeoutMs }
|
|
@@ -4767,7 +4848,7 @@ function bc(e) {
|
|
|
4767
4848
|
...e.defaultOutput == null ? {} : { defaultOutput: e.defaultOutput },
|
|
4768
4849
|
input: {
|
|
4769
4850
|
handle: e.input.handle,
|
|
4770
|
-
...
|
|
4851
|
+
...xc(e.input)
|
|
4771
4852
|
},
|
|
4772
4853
|
kind: e.kind
|
|
4773
4854
|
};
|
|
@@ -4782,7 +4863,7 @@ function bc(e) {
|
|
|
4782
4863
|
taskId: e.taskId
|
|
4783
4864
|
}) : Object.assign({}, t, {
|
|
4784
4865
|
kind: e.kind,
|
|
4785
|
-
task:
|
|
4866
|
+
task: Fc(e.task)
|
|
4786
4867
|
});
|
|
4787
4868
|
return e.additionalInputs != null && (n.additionalInputs = $(e.additionalInputs)), n;
|
|
4788
4869
|
}
|
|
@@ -4796,23 +4877,83 @@ function bc(e) {
|
|
|
4796
4877
|
...t,
|
|
4797
4878
|
input: {
|
|
4798
4879
|
handle: e.input.handle,
|
|
4799
|
-
...
|
|
4880
|
+
...xc(e.input)
|
|
4800
4881
|
},
|
|
4801
4882
|
kind: e.kind,
|
|
4802
4883
|
prompt: e.prompt
|
|
4803
4884
|
};
|
|
4804
4885
|
}
|
|
4805
4886
|
}
|
|
4806
|
-
function
|
|
4887
|
+
function Ec(e) {
|
|
4807
4888
|
return {
|
|
4808
4889
|
edges: e.edges.map((e) => ({ ...e })).toSorted((e, t) => {
|
|
4809
|
-
let n =
|
|
4890
|
+
let n = Z(e), r = Z(t);
|
|
4810
4891
|
return n < r ? -1 : +(n > r);
|
|
4811
4892
|
}),
|
|
4812
|
-
nodes: Object.fromEntries(Q(e.nodes).map(([e, t]) => [e,
|
|
4893
|
+
nodes: Object.fromEntries(Q(e.nodes).map(([e, t]) => [e, Tc(t)]))
|
|
4813
4894
|
};
|
|
4814
4895
|
}
|
|
4815
|
-
function
|
|
4896
|
+
function Dc(e) {
|
|
4897
|
+
return new Set(Object.entries(e.nodes).flatMap(([e, t]) => t.kind == "approval" || t.kind == "wait" ? [e] : []));
|
|
4898
|
+
}
|
|
4899
|
+
function Oc(e, t) {
|
|
4900
|
+
let n = typeof e == "object" && e && !Array.isArray(e) ? e : void 0;
|
|
4901
|
+
return n?.kind == "node" && typeof n.nodeId == "string" && t.has(n.nodeId) && n.output == "pending" ? {
|
|
4902
|
+
...n,
|
|
4903
|
+
output: "notification"
|
|
4904
|
+
} : e;
|
|
4905
|
+
}
|
|
4906
|
+
function kc(e, t) {
|
|
4907
|
+
let n = Cc(e);
|
|
4908
|
+
return Object.fromEntries(Q(n).map(([e, n]) => {
|
|
4909
|
+
let r = typeof n == "object" && n && !Array.isArray(n) ? n : void 0;
|
|
4910
|
+
return r?.kind != "sources" || !Array.isArray(r.sources) ? [e, n] : [e, {
|
|
4911
|
+
...r,
|
|
4912
|
+
sources: r.sources.map((e) => Oc(e, t))
|
|
4913
|
+
}];
|
|
4914
|
+
}));
|
|
4915
|
+
}
|
|
4916
|
+
function Ac(e) {
|
|
4917
|
+
let t = Dc(e);
|
|
4918
|
+
return {
|
|
4919
|
+
edges: e.edges.map((e) => t.has(e.source) && e.sourceHandle == "pending" ? {
|
|
4920
|
+
...e,
|
|
4921
|
+
sourceHandle: "notification"
|
|
4922
|
+
} : { ...e }).toSorted((e, t) => {
|
|
4923
|
+
let n = Z(e), r = Z(t);
|
|
4924
|
+
return n < r ? -1 : +(n > r);
|
|
4925
|
+
}),
|
|
4926
|
+
nodes: Object.fromEntries(Q(e.nodes).map(([e, n]) => {
|
|
4927
|
+
let r = Tc(n);
|
|
4928
|
+
return n.kind != "approval" && n.kind != "wait" ? [e, "inputs" in n ? {
|
|
4929
|
+
...r,
|
|
4930
|
+
inputs: kc(n.inputs, t)
|
|
4931
|
+
} : r] : [e, {
|
|
4932
|
+
...r,
|
|
4933
|
+
actions: n.kind == "wait" ? ["continue"] : ["approve", "reject"],
|
|
4934
|
+
inputs: kc(n.inputs, t),
|
|
4935
|
+
kind: "wait"
|
|
4936
|
+
}];
|
|
4937
|
+
}))
|
|
4938
|
+
};
|
|
4939
|
+
}
|
|
4940
|
+
function jc(e, t) {
|
|
4941
|
+
let n = Dc(t);
|
|
4942
|
+
return e.map((e) => ({
|
|
4943
|
+
...e.description == null ? {} : { description: e.description },
|
|
4944
|
+
handle: e.handle,
|
|
4945
|
+
jsonSchema: e.jsonSchema,
|
|
4946
|
+
nullable: e.nullable,
|
|
4947
|
+
sources: e.sources.map((e) => Oc(e, n))
|
|
4948
|
+
}));
|
|
4949
|
+
}
|
|
4950
|
+
function Mc(e, t) {
|
|
4951
|
+
return e.modelVersion == 2 ? Ac(t) : Ec(t);
|
|
4952
|
+
}
|
|
4953
|
+
function Nc(e, t, n) {
|
|
4954
|
+
return e.modelVersion == 2 ? jc(t, n) : wc(t);
|
|
4955
|
+
}
|
|
4956
|
+
function Pc(e) {
|
|
4816
4957
|
return {
|
|
4817
4958
|
executor: e.executor,
|
|
4818
4959
|
inputs: $(e.inputs),
|
|
@@ -4820,7 +4961,7 @@ function Sc(e) {
|
|
|
4820
4961
|
outputs: $(e.outputs)
|
|
4821
4962
|
};
|
|
4822
4963
|
}
|
|
4823
|
-
function
|
|
4964
|
+
function Fc(e) {
|
|
4824
4965
|
return {
|
|
4825
4966
|
...e.capabilities == null ? {} : { capabilities: e.capabilities },
|
|
4826
4967
|
inputs: $(e.inputs),
|
|
@@ -4829,7 +4970,7 @@ function Cc(e) {
|
|
|
4829
4970
|
outputs: $(e.outputs)
|
|
4830
4971
|
};
|
|
4831
4972
|
}
|
|
4832
|
-
function
|
|
4973
|
+
function Ic(e) {
|
|
4833
4974
|
return {
|
|
4834
4975
|
configSchema: e.configSchema,
|
|
4835
4976
|
definitionVersion: e.definitionVersion,
|
|
@@ -4851,7 +4992,7 @@ function wc(e) {
|
|
|
4851
4992
|
type: e.type
|
|
4852
4993
|
};
|
|
4853
4994
|
}
|
|
4854
|
-
function
|
|
4995
|
+
function Lc(e) {
|
|
4855
4996
|
return {
|
|
4856
4997
|
...e.allowedMethods == null ? {} : { allowedMethods: e.allowedMethods },
|
|
4857
4998
|
...e.allowedOrigins == null ? {} : { allowedOrigins: e.allowedOrigins },
|
|
@@ -4861,7 +5002,7 @@ function Tc(e) {
|
|
|
4861
5002
|
...e.responseStatusCode == null ? {} : { responseStatusCode: e.responseStatusCode }
|
|
4862
5003
|
};
|
|
4863
5004
|
}
|
|
4864
|
-
function
|
|
5005
|
+
function Rc(e) {
|
|
4865
5006
|
switch (e.type) {
|
|
4866
5007
|
case "cron": return {
|
|
4867
5008
|
expression: e.expression,
|
|
@@ -4875,7 +5016,7 @@ function Ec(e) {
|
|
|
4875
5016
|
};
|
|
4876
5017
|
}
|
|
4877
5018
|
}
|
|
4878
|
-
function
|
|
5019
|
+
function zc(e) {
|
|
4879
5020
|
let t = (t) => ({
|
|
4880
5021
|
...e.description == null ? {} : { description: e.description },
|
|
4881
5022
|
...e.icon == null ? {} : { icon: e.icon },
|
|
@@ -4888,163 +5029,178 @@ function Dc(e) {
|
|
|
4888
5029
|
...t(e.kind),
|
|
4889
5030
|
bodyFields: e.bodyFields.map((e) => ({
|
|
4890
5031
|
handle: e.handle,
|
|
4891
|
-
...
|
|
5032
|
+
...xc(e)
|
|
4892
5033
|
})),
|
|
4893
|
-
...e.options == null ? {} : { options:
|
|
5034
|
+
...e.options == null ? {} : { options: Lc(e.options) }
|
|
4894
5035
|
};
|
|
4895
5036
|
case "cron": return {
|
|
4896
5037
|
...t(e.kind),
|
|
4897
|
-
cronTimes: e.cronTimes.map(
|
|
5038
|
+
cronTimes: e.cronTimes.map(Rc)
|
|
4898
5039
|
};
|
|
4899
5040
|
case "poll": return {
|
|
4900
5041
|
...t(e.kind),
|
|
4901
5042
|
bindingId: e.bindingId,
|
|
4902
5043
|
config: e.config,
|
|
4903
|
-
definition:
|
|
4904
|
-
pollTimes: e.pollTimes.map(
|
|
5044
|
+
definition: Ic(e.definition),
|
|
5045
|
+
pollTimes: e.pollTimes.map(Rc)
|
|
4905
5046
|
};
|
|
4906
5047
|
case "integration": return {
|
|
4907
5048
|
...t(e.kind),
|
|
4908
5049
|
bindingId: e.bindingId,
|
|
4909
5050
|
config: e.config,
|
|
4910
|
-
definition:
|
|
5051
|
+
definition: Ic(e.definition)
|
|
4911
5052
|
};
|
|
4912
5053
|
}
|
|
4913
5054
|
}
|
|
4914
|
-
function
|
|
5055
|
+
function Bc(e) {
|
|
4915
5056
|
let { name: t, description: n, icon: r, ...i } = e;
|
|
4916
|
-
return
|
|
5057
|
+
return Z(i);
|
|
4917
5058
|
}
|
|
4918
|
-
function
|
|
5059
|
+
function Vc(e) {
|
|
4919
5060
|
return {
|
|
4920
5061
|
bindings: Object.fromEntries(Q(e.bindings)),
|
|
4921
|
-
graph:
|
|
5062
|
+
graph: Ec(e.graph),
|
|
4922
5063
|
subflows: Object.fromEntries(Q(e.subflows).map(([e, t]) => [e, {
|
|
4923
|
-
graph:
|
|
5064
|
+
graph: Ec(t.graph),
|
|
4924
5065
|
inputs: $(t.inputs),
|
|
4925
5066
|
name: t.name,
|
|
4926
|
-
outputs:
|
|
5067
|
+
outputs: wc(t.outputs)
|
|
4927
5068
|
}])),
|
|
4928
|
-
tasks: Object.fromEntries(Q(e.tasks).map(([e, t]) => [e,
|
|
5069
|
+
tasks: Object.fromEntries(Q(e.tasks).map(([e, t]) => [e, Pc(t)]))
|
|
4929
5070
|
};
|
|
4930
5071
|
}
|
|
4931
|
-
function
|
|
5072
|
+
function Hc(e) {
|
|
5073
|
+
if (e.modelVersion != 2) return Vc(e.document);
|
|
5074
|
+
let { document: t } = e;
|
|
5075
|
+
return {
|
|
5076
|
+
bindings: Object.fromEntries(Q(t.bindings)),
|
|
5077
|
+
graph: Ac(t.graph),
|
|
5078
|
+
subflows: Object.fromEntries(Q(t.subflows).map(([e, t]) => [e, {
|
|
5079
|
+
graph: Ac(t.graph),
|
|
5080
|
+
inputs: $(t.inputs),
|
|
5081
|
+
name: t.name,
|
|
5082
|
+
outputs: jc(t.outputs, t.graph)
|
|
5083
|
+
}])),
|
|
5084
|
+
tasks: Object.fromEntries(Q(t.tasks).map(([e, t]) => [e, Pc(t)]))
|
|
5085
|
+
};
|
|
5086
|
+
}
|
|
5087
|
+
function Uc(e) {
|
|
4932
5088
|
return {
|
|
4933
5089
|
imports: e.imports.toSorted(),
|
|
4934
5090
|
name: e.name,
|
|
4935
5091
|
source: e.source
|
|
4936
5092
|
};
|
|
4937
5093
|
}
|
|
4938
|
-
function
|
|
5094
|
+
function Wc(e) {
|
|
4939
5095
|
return {
|
|
4940
|
-
document:
|
|
5096
|
+
document: Hc(e),
|
|
4941
5097
|
kind: "open-flow-flow-revision",
|
|
4942
5098
|
modelVersion: e.modelVersion,
|
|
4943
|
-
modules: Object.fromEntries(Q(e.modules).map(([e, t]) => [e,
|
|
5099
|
+
modules: Object.fromEntries(Q(e.modules).map(([e, t]) => [e, Uc(t)])),
|
|
4944
5100
|
version: 1
|
|
4945
5101
|
};
|
|
4946
5102
|
}
|
|
4947
|
-
function
|
|
4948
|
-
return
|
|
5103
|
+
function Gc(e) {
|
|
5104
|
+
return yc(Wc(e));
|
|
4949
5105
|
}
|
|
4950
|
-
function
|
|
4951
|
-
return
|
|
5106
|
+
function Kc(e) {
|
|
5107
|
+
return mc(JSON.parse(new TextDecoder("utf-8", { fatal: !0 }).decode(e)));
|
|
4952
5108
|
}
|
|
4953
|
-
function
|
|
5109
|
+
function qc(e) {
|
|
4954
5110
|
return JSON.parse(new TextDecoder("utf-8", { fatal: !0 }).decode(e));
|
|
4955
5111
|
}
|
|
4956
|
-
function
|
|
5112
|
+
function Jc(e) {
|
|
4957
5113
|
let t;
|
|
4958
5114
|
try {
|
|
4959
|
-
t =
|
|
5115
|
+
t = qc(e), mc(t);
|
|
4960
5116
|
return;
|
|
4961
5117
|
} catch {}
|
|
4962
5118
|
try {
|
|
4963
|
-
|
|
5119
|
+
dc(t);
|
|
4964
5120
|
} catch {
|
|
4965
5121
|
return;
|
|
4966
5122
|
}
|
|
4967
5123
|
let n = t;
|
|
4968
|
-
return typeof n.modelVersion == "number" && n.modelVersion <
|
|
4969
|
-
}
|
|
4970
|
-
function
|
|
4971
|
-
return
|
|
4972
|
-
}
|
|
4973
|
-
var
|
|
4974
|
-
jsonSchema:
|
|
4975
|
-
nullable:
|
|
4976
|
-
value:
|
|
4977
|
-
description:
|
|
4978
|
-
}).strict(),
|
|
4979
|
-
kind:
|
|
4980
|
-
value:
|
|
4981
|
-
}).strict(),
|
|
4982
|
-
kind:
|
|
4983
|
-
sources: B(
|
|
4984
|
-
kind:
|
|
4985
|
-
nodeId:
|
|
4986
|
-
output:
|
|
5124
|
+
return typeof n.modelVersion == "number" && n.modelVersion < 3 ? "upgrade" : "repair";
|
|
5125
|
+
}
|
|
5126
|
+
function Yc(e) {
|
|
5127
|
+
return dc(qc(e));
|
|
5128
|
+
}
|
|
5129
|
+
var Xc = H(P(), R()), Zc = B({
|
|
5130
|
+
jsonSchema: R(),
|
|
5131
|
+
nullable: L(),
|
|
5132
|
+
value: R().optional(),
|
|
5133
|
+
description: P().optional()
|
|
5134
|
+
}).strict(), Qc = H(P(), Zc), $c = V([B({
|
|
5135
|
+
kind: W("value"),
|
|
5136
|
+
value: R()
|
|
5137
|
+
}).strict(), B({
|
|
5138
|
+
kind: W("sources"),
|
|
5139
|
+
sources: z(B({
|
|
5140
|
+
kind: W("node"),
|
|
5141
|
+
nodeId: P(),
|
|
5142
|
+
output: P()
|
|
4987
5143
|
}).strict())
|
|
4988
|
-
}).strict()]),
|
|
4989
|
-
name:
|
|
4990
|
-
description:
|
|
4991
|
-
icon:
|
|
4992
|
-
},
|
|
4993
|
-
|
|
4994
|
-
...
|
|
4995
|
-
kind:
|
|
4996
|
-
cronTimes:
|
|
5144
|
+
}).strict()]), el = {
|
|
5145
|
+
name: P().optional(),
|
|
5146
|
+
description: P().optional(),
|
|
5147
|
+
icon: P().optional()
|
|
5148
|
+
}, tl = V([
|
|
5149
|
+
B({
|
|
5150
|
+
...el,
|
|
5151
|
+
kind: W("cron"),
|
|
5152
|
+
cronTimes: z(R())
|
|
4997
5153
|
}).strict(),
|
|
4998
|
-
|
|
4999
|
-
...
|
|
5000
|
-
kind:
|
|
5154
|
+
B({
|
|
5155
|
+
...el,
|
|
5156
|
+
kind: W("manual")
|
|
5001
5157
|
}).strict(),
|
|
5002
|
-
|
|
5003
|
-
...
|
|
5004
|
-
kind:
|
|
5005
|
-
concurrency:
|
|
5006
|
-
inputs:
|
|
5007
|
-
task:
|
|
5008
|
-
name:
|
|
5009
|
-
moduleId:
|
|
5010
|
-
inputs:
|
|
5011
|
-
outputs:
|
|
5158
|
+
B({
|
|
5159
|
+
...el,
|
|
5160
|
+
kind: W("task"),
|
|
5161
|
+
concurrency: W(1).optional(),
|
|
5162
|
+
inputs: H(P(), $c),
|
|
5163
|
+
task: B({
|
|
5164
|
+
name: P(),
|
|
5165
|
+
moduleId: P(),
|
|
5166
|
+
inputs: Qc,
|
|
5167
|
+
outputs: H(P(), Zc.omit({ value: !0 }))
|
|
5012
5168
|
}).strict()
|
|
5013
5169
|
}).strict()
|
|
5014
|
-
]),
|
|
5015
|
-
name:
|
|
5016
|
-
graph:
|
|
5017
|
-
}).strict(),
|
|
5018
|
-
kind:
|
|
5019
|
-
version:
|
|
5020
|
-
modelVersion:
|
|
5021
|
-
modules:
|
|
5022
|
-
name:
|
|
5023
|
-
source:
|
|
5024
|
-
imports:
|
|
5170
|
+
]), nl = B({
|
|
5171
|
+
name: P(),
|
|
5172
|
+
graph: B({ nodes: H(P(), tl) }).strict()
|
|
5173
|
+
}).strict(), rl = B({
|
|
5174
|
+
kind: W("open-flow-project-revision"),
|
|
5175
|
+
version: W(1),
|
|
5176
|
+
modelVersion: V([W(1), W(2)]),
|
|
5177
|
+
modules: H(P(), B({
|
|
5178
|
+
name: P(),
|
|
5179
|
+
source: P(),
|
|
5180
|
+
imports: z(P())
|
|
5025
5181
|
}).strict()),
|
|
5026
|
-
document:
|
|
5027
|
-
bindings:
|
|
5028
|
-
flows:
|
|
5029
|
-
subflows:
|
|
5030
|
-
tasks:
|
|
5182
|
+
document: B({
|
|
5183
|
+
bindings: Xc,
|
|
5184
|
+
flows: Xc,
|
|
5185
|
+
subflows: Xc,
|
|
5186
|
+
tasks: Xc
|
|
5031
5187
|
}).strict()
|
|
5032
5188
|
}).strict();
|
|
5033
|
-
function
|
|
5189
|
+
function il(e) {
|
|
5034
5190
|
return Object.entries(e).map(([e, t]) => Object.assign({ handle: e }, t));
|
|
5035
5191
|
}
|
|
5036
|
-
function
|
|
5037
|
-
return Object.keys(
|
|
5192
|
+
function al(e) {
|
|
5193
|
+
return Object.keys(rl.parse(e).document.flows).toSorted();
|
|
5038
5194
|
}
|
|
5039
|
-
function
|
|
5040
|
-
let n =
|
|
5195
|
+
function ol(e, t) {
|
|
5196
|
+
let n = rl.parse(e);
|
|
5041
5197
|
if ([
|
|
5042
5198
|
n.document.bindings,
|
|
5043
5199
|
n.document.subflows,
|
|
5044
5200
|
n.document.tasks
|
|
5045
5201
|
].some((e) => Object.keys(e).length != 0)) throw Error("Project bindings, managed tasks and subflows require an explicit semantic conversion.");
|
|
5046
|
-
let r =
|
|
5047
|
-
let n = t.name ?? (t.kind == "task" ? t.task.name : e), r =
|
|
5202
|
+
let r = nl.parse(n.document.flows[t]), i = [], a = /* @__PURE__ */ new Set(), o = Object.fromEntries(Object.entries(r.graph.nodes).map(([e, t]) => {
|
|
5203
|
+
let n = t.name ?? (t.kind == "task" ? t.task.name : e), r = _c(n, a);
|
|
5048
5204
|
if (a.add(r), r != n && i.push(`Renamed node ${e} to ${r}.`), t.kind != "task") return [e, {
|
|
5049
5205
|
...t,
|
|
5050
5206
|
name: r
|
|
@@ -5055,12 +5211,12 @@ function qc(e, t) {
|
|
|
5055
5211
|
name: r,
|
|
5056
5212
|
task: {
|
|
5057
5213
|
...t.task,
|
|
5058
|
-
inputs:
|
|
5059
|
-
outputs:
|
|
5214
|
+
inputs: il(t.task.inputs),
|
|
5215
|
+
outputs: il(t.task.outputs)
|
|
5060
5216
|
}
|
|
5061
5217
|
}];
|
|
5062
|
-
})), s =
|
|
5063
|
-
modelVersion:
|
|
5218
|
+
})), s = pc({
|
|
5219
|
+
modelVersion: 3,
|
|
5064
5220
|
modules: n.modules,
|
|
5065
5221
|
document: {
|
|
5066
5222
|
bindings: {},
|
|
@@ -5094,7 +5250,7 @@ function qc(e, t) {
|
|
|
5094
5250
|
let f = { ...s.document.graph.nodes };
|
|
5095
5251
|
return d != null && (f[d] = {
|
|
5096
5252
|
kind: "manual",
|
|
5097
|
-
name:
|
|
5253
|
+
name: _c("Start", a)
|
|
5098
5254
|
}), {
|
|
5099
5255
|
name: r.name,
|
|
5100
5256
|
adjustments: i,
|
|
@@ -5111,4 +5267,4 @@ function qc(e, t) {
|
|
|
5111
5267
|
};
|
|
5112
5268
|
}
|
|
5113
5269
|
//#endregion
|
|
5114
|
-
export {
|
|
5270
|
+
export { Vc as canonicalDocument, Ec as canonicalGraph, yc as canonicalJsonBytes, Uc as canonicalModule, wc as canonicalOutputs, $ as canonicalPorts, Mc as canonicalRevisionGraph, Nc as canonicalRevisionOutputs, Pc as canonicalTask, ol as convertProjectFlow, fc as decodeFlowDocument, Kc as decodeRevision, pc as decodeRevisionContent, bc as digestBytes, Gc as encodeRevision, al as legacyProjectFlowIds, ws as maxJsonDepth, Yc as repairRevision, Jc as revisionRepairKind, Bc as triggerRuntimeJson };
|