@oomol-lab/open-flow 0.1.0-beta.23 → 0.1.0-beta.26

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.
Files changed (38) hide show
  1. package/dist/browser/{createResourceDialog-PKbMMpEk.js → createResourceDialog-BwI2JmPE.js} +7 -7
  2. package/dist/browser/flow-authoring.js +249 -250
  3. package/dist/browser/flow-change.d.ts +16 -7
  4. package/dist/browser/flow-change.js +824 -804
  5. package/dist/browser/{flowChanges-BUlMz4iC.js → flowChanges-BqPtWEI9.js} +2706 -2906
  6. package/dist/browser/{flowWorkspace-DLArN17T.js → flowWorkspace-CpMGzmfz.js} +37249 -35916
  7. package/dist/browser/{inputValues-CcGVt51C.js → inputValues-CeeJw_G8.js} +1 -1
  8. package/dist/browser/licenses.md +24 -0
  9. package/dist/browser/{lite-Cy6aeiL6.js → lite-BuKZ8joP.js} +50 -43
  10. package/dist/browser/{input-group-C2frNYAx.js → switch-CyZ96-UF.js} +1519 -612
  11. package/dist/browser/theme.css +30 -4
  12. package/dist/browser/ui-input.d.ts +3 -1
  13. package/dist/browser/ui.css +1 -1
  14. package/dist/browser/ui.js +10 -8
  15. package/dist/browser/warmCodeTheme-DVv4-rDO.js +35 -0
  16. package/dist/browser/workbench.css +1 -1
  17. package/dist/browser/workbench.js +753 -714
  18. package/dist/browser/{workbenchSelect-CPRUXKbf.js → workbenchSelect-BUu7CjUA.js} +504 -490
  19. package/dist/common/control-api-conformance.js +18 -18
  20. package/dist/common/control-api.d.ts +43 -15
  21. package/dist/common/control-api.js +1803 -1755
  22. package/dist/common/control-requests.js +2 -7
  23. package/dist/common/engine-contract.d.ts +2 -2
  24. package/dist/common/flow-encoding.js +587 -589
  25. package/dist/common/flow-graph.d.ts +31 -1
  26. package/dist/common/flow-schema.d.ts +11 -1
  27. package/dist/common/flow-semantics.d.ts +2 -1
  28. package/dist/common/flow-semantics.js +1542 -1457
  29. package/dist/common/mcp.d.ts +1 -0
  30. package/dist/common/mcp.js +308 -260
  31. package/dist/common/provider-triggers.js +934 -931
  32. package/dist/common/run-lifecycle.d.ts +1 -1
  33. package/dist/common/run-lifecycle.js +5 -5
  34. package/dist/common/runtime-contract.d.ts +2 -0
  35. package/dist/common/runtime-contract.js +96 -32
  36. package/dist/common/scheduler.d.ts +39 -21
  37. package/dist/common/scheduler.js +2358 -2339
  38. package/package.json +1 -1
@@ -2787,34 +2787,34 @@ function Xi(e, t) {
2787
2787
  });
2788
2788
  }
2789
2789
  // @__NO_SIDE_EFFECTS__
2790
- function j(e) {
2790
+ function Zi(e) {
2791
2791
  return new cn({
2792
2792
  check: "overwrite",
2793
2793
  tx: e
2794
2794
  });
2795
2795
  }
2796
2796
  // @__NO_SIDE_EFFECTS__
2797
- function Zi(e) {
2798
- return /* @__PURE__ */ j((t) => t.normalize(e));
2799
- }
2800
- // @__NO_SIDE_EFFECTS__
2801
- function Qi() {
2802
- return /* @__PURE__ */ j((e) => e.trim());
2797
+ function Qi(e) {
2798
+ return /* @__PURE__ */ Zi((t) => t.normalize(e));
2803
2799
  }
2804
2800
  // @__NO_SIDE_EFFECTS__
2805
2801
  function $i() {
2806
- return /* @__PURE__ */ j((e) => e.toLowerCase());
2802
+ return /* @__PURE__ */ Zi((e) => e.trim());
2807
2803
  }
2808
2804
  // @__NO_SIDE_EFFECTS__
2809
2805
  function ea() {
2810
- return /* @__PURE__ */ j((e) => e.toUpperCase());
2806
+ return /* @__PURE__ */ Zi((e) => e.toLowerCase());
2811
2807
  }
2812
2808
  // @__NO_SIDE_EFFECTS__
2813
2809
  function ta() {
2814
- return /* @__PURE__ */ j((e) => m(e));
2810
+ return /* @__PURE__ */ Zi((e) => e.toUpperCase());
2811
+ }
2812
+ // @__NO_SIDE_EFFECTS__
2813
+ function na() {
2814
+ return /* @__PURE__ */ Zi((e) => m(e));
2815
2815
  }
2816
2816
  // @__NO_SIDE_EFFECTS__
2817
- function na(e, t, n) {
2817
+ function ra(e, t, n) {
2818
2818
  return new e({
2819
2819
  type: "array",
2820
2820
  element: t,
@@ -2822,7 +2822,7 @@ function na(e, t, n) {
2822
2822
  });
2823
2823
  }
2824
2824
  // @__NO_SIDE_EFFECTS__
2825
- function ra(e, t, n) {
2825
+ function ia(e, t, n) {
2826
2826
  return new e({
2827
2827
  type: "custom",
2828
2828
  check: "custom",
@@ -2831,8 +2831,8 @@ function ra(e, t, n) {
2831
2831
  });
2832
2832
  }
2833
2833
  // @__NO_SIDE_EFFECTS__
2834
- function ia(e, t) {
2835
- let n = /* @__PURE__ */ aa((t) => (t.addIssue = (e) => {
2834
+ function aa(e, t) {
2835
+ let n = /* @__PURE__ */ oa((t) => (t.addIssue = (e) => {
2836
2836
  if (typeof e == "string") t.issues.push(Ce(e, t.value, n._zod.def));
2837
2837
  else {
2838
2838
  let r = e;
@@ -2842,7 +2842,7 @@ function ia(e, t) {
2842
2842
  return n;
2843
2843
  }
2844
2844
  // @__NO_SIDE_EFFECTS__
2845
- function aa(e, t) {
2845
+ function oa(e, t) {
2846
2846
  let n = new O({
2847
2847
  check: "custom",
2848
2848
  ...v(t)
@@ -2851,11 +2851,11 @@ function aa(e, t) {
2851
2851
  }
2852
2852
  //#endregion
2853
2853
  //#region ../../node_modules/.bun/zod@4.5.4/node_modules/zod/v4/core/to-json-schema.js
2854
- function oa(e, ...t) {
2854
+ function sa(e, ...t) {
2855
2855
  for (let n of t) for (let t of Reflect.ownKeys(n)) Object.prototype.propertyIsEnumerable.call(n, t) && d(e, t, n[t]);
2856
2856
  return e;
2857
2857
  }
2858
- function sa(e) {
2858
+ function ca(e) {
2859
2859
  let t = e?.target ?? "draft-2020-12";
2860
2860
  return t === "draft-4" && (t = "draft-04"), t === "draft-7" && (t = "draft-07"), {
2861
2861
  processors: e.processors ?? {},
@@ -2875,7 +2875,7 @@ function sa(e) {
2875
2875
  external: e?.external ?? void 0
2876
2876
  };
2877
2877
  }
2878
- function M(e, t, n, r, i) {
2878
+ function j(e, t, n, r, i) {
2879
2879
  let a = typeof t.unrepresentable == "function" ? t.unrepresentable({
2880
2880
  zodSchema: e,
2881
2881
  path: r.path,
@@ -2885,7 +2885,7 @@ function M(e, t, n, r, i) {
2885
2885
  if (a === void 0 || a === "throw") throw Error(i);
2886
2886
  return Object.assign(n, a), !0;
2887
2887
  }
2888
- function N(e, t, n = {
2888
+ function M(e, t, n = {
2889
2889
  path: [],
2890
2890
  schemaPath: []
2891
2891
  }) {
@@ -2914,15 +2914,15 @@ function N(e, t, n = {
2914
2914
  a(e, t, n, r);
2915
2915
  }
2916
2916
  let a = e._zod.parent;
2917
- a && (o.ref ||= a, N(a, t, r), t.seen.get(a).isParent = !0);
2917
+ a && (o.ref ||= a, M(a, t, r), t.seen.get(a).isParent = !0);
2918
2918
  }
2919
2919
  let c = t.metadataRegistry.get(e);
2920
- return c && oa(o.schema, c), t.io === "input" && P(e) && (delete o.schema.examples, delete o.schema.default), t.io === "input" && "_prefault" in o.schema && ((r = o.schema).default ?? (r.default = o.schema._prefault)), delete o.schema._prefault, t.seen.get(e).schema;
2920
+ return c && sa(o.schema, c), t.io === "input" && N(e) && (delete o.schema.examples, delete o.schema.default), t.io === "input" && "_prefault" in o.schema && ((r = o.schema).default ?? (r.default = o.schema._prefault)), delete o.schema._prefault, t.seen.get(e).schema;
2921
2921
  }
2922
- function ca(e) {
2922
+ function la(e) {
2923
2923
  return e.replace(/~/g, "~0").replace(/\//g, "~1");
2924
2924
  }
2925
- function la(e, t) {
2925
+ function ua(e, t) {
2926
2926
  let n = e.seen.get(t);
2927
2927
  if (!n) throw Error("Unprocessed schema. This is a bug in Zod.");
2928
2928
  if (e.external && e.sharedDefsExtractedFor === e.external) return;
@@ -2943,7 +2943,7 @@ function la(e, t) {
2943
2943
  let a = t[1].defId ?? t[1].schema.id ?? `schema${e.counter++}`;
2944
2944
  return t[1].defId = a, {
2945
2945
  defId: a,
2946
- ref: `${i("__shared")}#/${r}/${ca(a)}`
2946
+ ref: `${i("__shared")}#/${r}/${la(a)}`
2947
2947
  };
2948
2948
  }
2949
2949
  let i = `#/${r}/`;
@@ -2951,7 +2951,7 @@ function la(e, t) {
2951
2951
  let a = t[1].schema.id ?? `__schema${e.counter++}`;
2952
2952
  return {
2953
2953
  defId: a,
2954
- ref: i + ca(a)
2954
+ ref: i + la(a)
2955
2955
  };
2956
2956
  }, a = (e) => {
2957
2957
  if (e[1].schema.$ref) return;
@@ -2995,13 +2995,13 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
2995
2995
  }
2996
2996
  e.external && (e.sharedDefsExtractedFor = e.external);
2997
2997
  }
2998
- function ua(e) {
2998
+ function da(e) {
2999
2999
  let t = e.anyOf;
3000
3000
  if (!Array.isArray(t) || t.length === 0 || e.type !== void 0) return;
3001
3001
  let n = [];
3002
3002
  for (let e of t) {
3003
3003
  if (!e || typeof e != "object") return;
3004
- ua(e);
3004
+ da(e);
3005
3005
  let t = Object.keys(e);
3006
3006
  if (t.length !== 1 || t[0] !== "type") return;
3007
3007
  let r = e.type;
@@ -3012,21 +3012,21 @@ function ua(e) {
3012
3012
  }
3013
3013
  delete e.anyOf, e.type = n.length === 1 ? n[0] : n;
3014
3014
  }
3015
- var da = /* @__PURE__ */ new Set([
3015
+ var fa = /* @__PURE__ */ new Set([
3016
3016
  "type",
3017
3017
  "properties",
3018
3018
  "required",
3019
3019
  "additionalProperties"
3020
- ]), fa = ["oneOf", "anyOf"];
3021
- function pa(e) {
3020
+ ]), pa = ["oneOf", "anyOf"];
3021
+ function ma(e) {
3022
3022
  let t = e.additionalProperties;
3023
3023
  return t === void 0 || t === !1 || typeof t != "object" || !t ? null : Object.keys(t).length ? t : null;
3024
3024
  }
3025
- function ma(e) {
3025
+ function ha(e) {
3026
3026
  let t = [];
3027
3027
  for (let n of e) {
3028
3028
  if (typeof n != "object" || n.type !== "object") return null;
3029
- for (let e in n) if (!da.has(e)) return null;
3029
+ for (let e in n) if (!fa.has(e)) return null;
3030
3030
  t.push(n);
3031
3031
  }
3032
3032
  let n = {}, r = /* @__PURE__ */ new Set();
@@ -3035,10 +3035,10 @@ function ma(e) {
3035
3035
  if (Object.prototype.hasOwnProperty.call(n, r)) continue;
3036
3036
  let e = [];
3037
3037
  for (let n of t) {
3038
- let t = n.properties?.[r] ?? pa(n);
3038
+ let t = n.properties?.[r] ?? ma(n);
3039
3039
  t != null && (e.some((e) => JSON.stringify(e) === JSON.stringify(t)) || e.push(t));
3040
3040
  }
3041
- d(n, r, e.length === 1 ? e[0] : ma(e) ?? { allOf: e });
3041
+ d(n, r, e.length === 1 ? e[0] : ha(e) ?? { allOf: e });
3042
3042
  }
3043
3043
  for (let t of e.required ?? []) r.add(t);
3044
3044
  }
@@ -3050,29 +3050,29 @@ function ma(e) {
3050
3050
  else {
3051
3051
  let e = [];
3052
3052
  for (let n of t) {
3053
- let t = pa(n);
3053
+ let t = ma(n);
3054
3054
  t && !e.some((e) => JSON.stringify(e) === JSON.stringify(t)) && e.push(t);
3055
3055
  }
3056
3056
  e.length === 1 ? i.additionalProperties = e[0] : e.length > 1 && (i.additionalProperties = { allOf: e });
3057
3057
  }
3058
3058
  return i;
3059
3059
  }
3060
- function ha(e) {
3060
+ function ga(e) {
3061
3061
  let t = e.allOf;
3062
3062
  if (!Array.isArray(t) || t.length < 2) return;
3063
- for (let t of da) if (t in e) return;
3064
- let n = t.filter((e) => fa.some((t) => Array.isArray(e[t]))), r = null;
3065
- if (!n.length) r = ma(t);
3063
+ for (let t of fa) if (t in e) return;
3064
+ let n = t.filter((e) => pa.some((t) => Array.isArray(e[t]))), r = null;
3065
+ if (!n.length) r = ha(t);
3066
3066
  else {
3067
- let e = n[0], i = fa.find((t) => Array.isArray(e[t]));
3067
+ let e = n[0], i = pa.find((t) => Array.isArray(e[t]));
3068
3068
  if (Object.keys(e).length !== 1) return;
3069
- let a = t.filter((t) => t !== e), o = e[i].map((e) => ma([...a, e]));
3069
+ let a = t.filter((t) => t !== e), o = e[i].map((e) => ha([...a, e]));
3070
3070
  if (o.some((e) => !e)) return;
3071
3071
  r = { [i]: o };
3072
3072
  }
3073
- r && (delete e.allOf, oa(e, r));
3073
+ r && (delete e.allOf, sa(e, r));
3074
3074
  }
3075
- function ga(e, t) {
3075
+ function _a(e, t) {
3076
3076
  let n = e.seen.get(t);
3077
3077
  if (!n) throw Error("Unprocessed schema. This is a bug in Zod.");
3078
3078
  let r = (t) => {
@@ -3082,7 +3082,7 @@ function ga(e, t) {
3082
3082
  if (n.ref = null, o) {
3083
3083
  r(o);
3084
3084
  let n = e.seen.get(o), s = n.schema;
3085
- if (s.$ref && (e.target === "draft-07" || e.target === "draft-04" || e.target === "openapi-3.0") ? (i.allOf = i.allOf ?? [], i.allOf.push(s)) : oa(i, s), oa(i, a), t._zod.parent === o) for (let e in i) e !== "$ref" && e !== "allOf" && (e in a || delete i[e]);
3085
+ if (s.$ref && (e.target === "draft-07" || e.target === "draft-04" || e.target === "openapi-3.0") ? (i.allOf = i.allOf ?? [], i.allOf.push(s)) : sa(i, s), sa(i, a), t._zod.parent === o) for (let e in i) e !== "$ref" && e !== "allOf" && (e in a || delete i[e]);
3086
3086
  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];
3087
3087
  }
3088
3088
  let s = t._zod.parent;
@@ -3099,7 +3099,7 @@ function ga(e, t) {
3099
3099
  };
3100
3100
  if (!e.external || e.sharedEmitDoneFor !== e.external) {
3101
3101
  for (let t of [...e.seen.entries()].reverse()) r(t[0]);
3102
- if (e.target !== "openapi-3.0") for (let t of e.seen.entries()) ua(t[1].def ?? t[1].schema);
3102
+ if (e.target !== "openapi-3.0") for (let t of e.seen.entries()) da(t[1].def ?? t[1].schema);
3103
3103
  for (let t of e.deferred) t();
3104
3104
  if (e.intersections.length) {
3105
3105
  let t = /* @__PURE__ */ new Map();
@@ -3109,7 +3109,7 @@ function ga(e, t) {
3109
3109
  let r = t.get(n);
3110
3110
  r ? r.push(e) : t.set(n, [e]);
3111
3111
  }
3112
- for (let n of e.intersections) for (let e of t.get(n) ?? []) ha(e);
3112
+ for (let n of e.intersections) for (let e of t.get(n) ?? []) ga(e);
3113
3113
  }
3114
3114
  }
3115
3115
  let i = {};
@@ -3118,7 +3118,7 @@ function ga(e, t) {
3118
3118
  if (!n) throw Error("Schema is missing an `id` property");
3119
3119
  i.$id = e.external.uri(n);
3120
3120
  }
3121
- oa(i, n.defId ? n.schema : n.def ?? n.schema);
3121
+ sa(i, n.defId ? n.schema : n.def ?? n.schema);
3122
3122
  let a = e.metadataRegistry.get(t)?.id;
3123
3123
  a !== void 0 && i.id === a && delete i.id;
3124
3124
  let o = e.external?.defs ?? {};
@@ -3133,8 +3133,8 @@ function ga(e, t) {
3133
3133
  value: {
3134
3134
  ...t["~standard"],
3135
3135
  jsonSchema: {
3136
- input: va(t, "input", e.processors),
3137
- output: va(t, "output", e.processors)
3136
+ input: ya(t, "input", e.processors),
3137
+ output: ya(t, "output", e.processors)
3138
3138
  }
3139
3139
  },
3140
3140
  enumerable: !1,
@@ -3144,93 +3144,93 @@ function ga(e, t) {
3144
3144
  throw Error("Error converting schema to JSON.");
3145
3145
  }
3146
3146
  }
3147
- function P(e, t) {
3147
+ function N(e, t) {
3148
3148
  let n = t ?? { seen: /* @__PURE__ */ new Set() };
3149
3149
  if (n.seen.has(e)) return !1;
3150
3150
  n.seen.add(e);
3151
3151
  let r = e._zod.def;
3152
3152
  if (r.type === "transform") return !0;
3153
- if (r.type === "array") return P(r.element, n);
3154
- if (r.type === "set") return P(r.valueType, n);
3155
- if (r.type === "lazy") return P(r.getter(), n);
3156
- if (r.type === "promise" || r.type === "optional" || r.type === "nonoptional" || r.type === "nullable" || r.type === "readonly" || r.type === "default" || r.type === "prefault" || r.type === "catch") return P(r.innerType, n);
3157
- if (r.type === "intersection") return P(r.left, n) || P(r.right, n);
3158
- if (r.type === "record" || r.type === "map") return P(r.keyType, n) || P(r.valueType, n);
3159
- if (r.type === "pipe") return e._zod.traits.has("$ZodCodec") ? !0 : P(r.in, n) || P(r.out, n);
3153
+ if (r.type === "array") return N(r.element, n);
3154
+ if (r.type === "set") return N(r.valueType, n);
3155
+ if (r.type === "lazy") return N(r.getter(), n);
3156
+ if (r.type === "promise" || r.type === "optional" || r.type === "nonoptional" || r.type === "nullable" || r.type === "readonly" || r.type === "default" || r.type === "prefault" || r.type === "catch") return N(r.innerType, n);
3157
+ if (r.type === "intersection") return N(r.left, n) || N(r.right, n);
3158
+ if (r.type === "record" || r.type === "map") return N(r.keyType, n) || N(r.valueType, n);
3159
+ if (r.type === "pipe") return e._zod.traits.has("$ZodCodec") ? !0 : N(r.in, n) || N(r.out, n);
3160
3160
  if (r.type === "object") {
3161
- for (let e in r.shape) if (P(r.shape[e], n)) return !0;
3161
+ for (let e in r.shape) if (N(r.shape[e], n)) return !0;
3162
3162
  return !1;
3163
3163
  }
3164
3164
  if (r.type === "union") {
3165
- for (let e of r.options) if (P(e, n)) return !0;
3165
+ for (let e of r.options) if (N(e, n)) return !0;
3166
3166
  return !1;
3167
3167
  }
3168
3168
  if (r.type === "tuple") {
3169
- for (let e of r.items) if (P(e, n)) return !0;
3170
- return !!(r.rest && P(r.rest, n));
3169
+ for (let e of r.items) if (N(e, n)) return !0;
3170
+ return !!(r.rest && N(r.rest, n));
3171
3171
  }
3172
3172
  return !1;
3173
3173
  }
3174
- var _a = (e, t = {}) => (n) => {
3175
- let r = sa({
3174
+ var va = (e, t = {}) => (n) => {
3175
+ let r = ca({
3176
3176
  ...n,
3177
3177
  processors: t
3178
3178
  });
3179
- return N(e, r), la(r, e), ga(r, e);
3180
- }, va = (e, t, n = {}) => (r) => {
3181
- let { libraryOptions: i, target: a } = r ?? {}, o = sa({
3179
+ return M(e, r), ua(r, e), _a(r, e);
3180
+ }, ya = (e, t, n = {}) => (r) => {
3181
+ let { libraryOptions: i, target: a } = r ?? {}, o = ca({
3182
3182
  ...i ?? {},
3183
3183
  target: a,
3184
3184
  io: t,
3185
3185
  processors: n
3186
3186
  });
3187
- return N(e, o), la(o, e), ga(o, e);
3188
- }, ya = {
3187
+ return M(e, o), ua(o, e), _a(o, e);
3188
+ }, ba = {
3189
3189
  guid: "uuid",
3190
3190
  url: "uri",
3191
3191
  datetime: "date-time",
3192
3192
  json_string: "json-string",
3193
3193
  regex: ""
3194
- }, ba = (e, t, n, r) => {
3194
+ }, xa = (e, t, n, r) => {
3195
3195
  let i = n;
3196
3196
  i.type = "string";
3197
3197
  let { minimum: a, maximum: o, format: s, patterns: c, contentEncoding: l, laxFormat: u } = e._zod.bag;
3198
- if (typeof a == "number" && (i.minLength = a), typeof o == "number" && (i.maxLength = o), s && (i.format = ya[s] ?? s, i.format === "" && delete i.format, (s === "time" || u) && delete i.format), l && (i.contentEncoding = l), c && c.size > 0) {
3198
+ if (typeof a == "number" && (i.minLength = a), typeof o == "number" && (i.maxLength = o), s && (i.format = ba[s] ?? s, i.format === "" && delete i.format, (s === "time" || u) && delete i.format), l && (i.contentEncoding = l), c && c.size > 0) {
3199
3199
  let e = [...c];
3200
3200
  e.length === 1 ? i.pattern = e[0].source : e.length > 1 && (i.allOf = [...e.map((e) => ({
3201
3201
  ...t.target === "draft-07" || t.target === "draft-04" || t.target === "openapi-3.0" ? { type: "string" } : {},
3202
3202
  pattern: e.source
3203
3203
  }))]);
3204
3204
  }
3205
- }, xa = (e, t, n, r) => {
3205
+ }, Sa = (e, t, n, r) => {
3206
3206
  let i = n, { minimum: a, maximum: o, format: s, multipleOf: c, exclusiveMaximum: l, exclusiveMinimum: u } = e._zod.bag;
3207
3207
  i.type = typeof s == "string" && s.includes("int") ? "integer" : "number";
3208
3208
  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";
3209
- d ? p ? (i.minimum = u, i.exclusiveMinimum = !0) : i.exclusiveMinimum = u : typeof a == "number" && (i.minimum = a), f ? p ? (i.maximum = l, i.exclusiveMaximum = !0) : i.exclusiveMaximum = l : typeof o == "number" && (i.maximum = o), typeof c == "number" && (Number.isFinite(c) && c !== 0 ? i.multipleOf = Math.abs(c) : M(e, t, i, r, `A multipleOf divisor of ${c} cannot be represented in JSON Schema`));
3210
- }, Sa = (e, t, n, r) => {
3211
- n.type = "boolean";
3209
+ d ? p ? (i.minimum = u, i.exclusiveMinimum = !0) : i.exclusiveMinimum = u : typeof a == "number" && (i.minimum = a), f ? p ? (i.maximum = l, i.exclusiveMaximum = !0) : i.exclusiveMaximum = l : typeof o == "number" && (i.maximum = o), typeof c == "number" && (Number.isFinite(c) && c !== 0 ? i.multipleOf = Math.abs(c) : j(e, t, i, r, `A multipleOf divisor of ${c} cannot be represented in JSON Schema`));
3212
3210
  }, Ca = (e, t, n, r) => {
3213
- M(e, t, n, r, "BigInt cannot be represented in JSON Schema");
3211
+ n.type = "boolean";
3214
3212
  }, wa = (e, t, n, r) => {
3215
- M(e, t, n, r, "Symbols cannot be represented in JSON Schema");
3213
+ j(e, t, n, r, "BigInt cannot be represented in JSON Schema");
3216
3214
  }, Ta = (e, t, n, r) => {
3217
- t.target === "openapi-3.0" ? (n.type = "string", n.nullable = !0, n.enum = [null]) : n.type = "null";
3215
+ j(e, t, n, r, "Symbols cannot be represented in JSON Schema");
3218
3216
  }, Ea = (e, t, n, r) => {
3219
- M(e, t, n, r, "Undefined cannot be represented in JSON Schema");
3217
+ t.target === "openapi-3.0" ? (n.type = "string", n.nullable = !0, n.enum = [null]) : n.type = "null";
3220
3218
  }, Da = (e, t, n, r) => {
3221
- M(e, t, n, r, "Void cannot be represented in JSON Schema");
3219
+ j(e, t, n, r, "Undefined cannot be represented in JSON Schema");
3222
3220
  }, Oa = (e, t, n, r) => {
3221
+ j(e, t, n, r, "Void cannot be represented in JSON Schema");
3222
+ }, ka = (e, t, n, r) => {
3223
3223
  n.not = {};
3224
- }, ka = (e, t, n, r) => {}, Aa = (e, t, n, r) => {}, ja = (e, t, n, r) => {
3225
- M(e, t, n, r, "Date cannot be represented in JSON Schema");
3226
- }, Ma = (e, t, r, i) => {
3224
+ }, Aa = (e, t, n, r) => {}, ja = (e, t, n, r) => {}, Ma = (e, t, n, r) => {
3225
+ j(e, t, n, r, "Date cannot be represented in JSON Schema");
3226
+ }, Na = (e, t, r, i) => {
3227
3227
  let a = e._zod.def, o = n(a.entries);
3228
3228
  if (o.length === 0) {
3229
3229
  r.not = {};
3230
3230
  return;
3231
3231
  }
3232
3232
  o.every((e) => typeof e == "number") && (r.type = "number"), o.every((e) => typeof e == "string") && (r.type = "string"), r.enum = o;
3233
- }, Na = (e, t, n, r) => {
3233
+ }, Pa = (e, t, n, r) => {
3234
3234
  let i = e._zod.def;
3235
3235
  if (i.values.length === 0) {
3236
3236
  n.not = {};
@@ -3238,9 +3238,9 @@ var _a = (e, t = {}) => (n) => {
3238
3238
  }
3239
3239
  let a = [];
3240
3240
  for (let o of i.values) if (o === void 0) {
3241
- if (M(e, t, n, r, "Literal `undefined` cannot be represented in JSON Schema")) return;
3241
+ if (j(e, t, n, r, "Literal `undefined` cannot be represented in JSON Schema")) return;
3242
3242
  } else if (typeof o == "bigint") {
3243
- if (M(e, t, n, r, "BigInt literals cannot be represented in JSON Schema")) return;
3243
+ if (j(e, t, n, r, "BigInt literals cannot be represented in JSON Schema")) return;
3244
3244
  a.push(Number(o));
3245
3245
  } else a.push(o);
3246
3246
  if (a.length !== 0) {
@@ -3249,47 +3249,47 @@ var _a = (e, t = {}) => (n) => {
3249
3249
  n.type = e === null ? "null" : typeof e, t.target === "draft-04" || t.target === "openapi-3.0" ? n.enum = [e] : n.const = e;
3250
3250
  } 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;
3251
3251
  }
3252
- }, Pa = (e, t, n, r) => {
3253
- M(e, t, n, r, "NaN cannot be represented in JSON Schema");
3254
3252
  }, Fa = (e, t, n, r) => {
3253
+ j(e, t, n, r, "NaN cannot be represented in JSON Schema");
3254
+ }, Ia = (e, t, n, r) => {
3255
3255
  let i = n, a = e._zod.pattern;
3256
3256
  if (!a) throw Error("Pattern not found in template literal");
3257
3257
  i.type = "string", i.pattern = a.source;
3258
- }, Ia = (e, t, n, r) => {
3258
+ }, La = (e, t, n, r) => {
3259
3259
  let i = n, a = {
3260
3260
  type: "string",
3261
3261
  format: "binary",
3262
3262
  contentEncoding: "binary"
3263
3263
  }, { minimum: o, maximum: s, mime: c } = e._zod.bag;
3264
3264
  o !== void 0 && (a.minLength = o), s !== void 0 && (a.maxLength = s), c ? c.length === 1 ? (a.contentMediaType = c[0], Object.assign(i, a)) : (Object.assign(i, a), i.anyOf = c.map((e) => ({ contentMediaType: e }))) : Object.assign(i, a);
3265
- }, La = (e, t, n, r) => {
3266
- n.type = "boolean";
3267
3265
  }, Ra = (e, t, n, r) => {
3268
- M(e, t, n, r, "Custom types cannot be represented in JSON Schema");
3266
+ n.type = "boolean";
3269
3267
  }, za = (e, t, n, r) => {
3270
- M(e, t, n, r, "Function types cannot be represented in JSON Schema");
3268
+ j(e, t, n, r, "Custom types cannot be represented in JSON Schema");
3271
3269
  }, Ba = (e, t, n, r) => {
3272
- M(e, t, n, r, "Transforms cannot be represented in JSON Schema");
3270
+ j(e, t, n, r, "Function types cannot be represented in JSON Schema");
3273
3271
  }, Va = (e, t, n, r) => {
3274
- M(e, t, n, r, "Map cannot be represented in JSON Schema");
3272
+ j(e, t, n, r, "Transforms cannot be represented in JSON Schema");
3275
3273
  }, Ha = (e, t, n, r) => {
3276
- M(e, t, n, r, "Set cannot be represented in JSON Schema");
3274
+ j(e, t, n, r, "Map cannot be represented in JSON Schema");
3277
3275
  }, Ua = (e, t, n, r) => {
3276
+ j(e, t, n, r, "Set cannot be represented in JSON Schema");
3277
+ }, Wa = (e, t, n, r) => {
3278
3278
  let i = n, a = e._zod.def, { minimum: o, maximum: s } = e._zod.bag;
3279
- typeof o == "number" && (i.minItems = o), typeof s == "number" && (i.maxItems = s), i.type = "array", i.items = N(a.element, t, {
3279
+ typeof o == "number" && (i.minItems = o), typeof s == "number" && (i.maxItems = s), i.type = "array", i.items = M(a.element, t, {
3280
3280
  ...r,
3281
3281
  path: [...r.path, "items"]
3282
3282
  });
3283
3283
  };
3284
- function Wa(e) {
3284
+ function Ga(e) {
3285
3285
  let t = e._zod.def;
3286
- return t.type === "pipe" && t.in._zod.traits.has("$ZodTransform") ? Wa(t.out) : t.type === "catch" ? Wa(t.innerType) : e._zod.optin;
3286
+ return t.type === "pipe" && t.in._zod.traits.has("$ZodTransform") ? Ga(t.out) : t.type === "catch" ? Ga(t.innerType) : e._zod.optin;
3287
3287
  }
3288
- var Ga = (e, t, n, r) => {
3288
+ var Ka = (e, t, n, r) => {
3289
3289
  let i = n, a = e._zod.def, o = a.shape;
3290
- if (Object.getOwnPropertySymbols(o).length && M(e, t, i, r, "Symbol keys cannot be represented in JSON Schema")) return;
3290
+ if (Object.getOwnPropertySymbols(o).length && j(e, t, i, r, "Symbol keys cannot be represented in JSON Schema")) return;
3291
3291
  i.type = "object", i.properties = {};
3292
- for (let e in o) d(i.properties, e, N(o[e], t, {
3292
+ for (let e in o) d(i.properties, e, M(o[e], t, {
3293
3293
  ...r,
3294
3294
  path: [
3295
3295
  ...r.path,
@@ -3299,14 +3299,14 @@ var Ga = (e, t, n, r) => {
3299
3299
  }));
3300
3300
  let s = new Set(Object.keys(o)), c = new Set([...s].filter((e) => {
3301
3301
  let n = a.shape[e];
3302
- return t.io === "input" ? Wa(n) === void 0 : n._zod.optout === void 0;
3302
+ return t.io === "input" ? Ga(n) === void 0 : n._zod.optout === void 0;
3303
3303
  }));
3304
- c.size > 0 && (i.required = Array.from(c)), a.catchall?._zod.def.type === "never" ? i.additionalProperties = !1 : a.catchall ? a.catchall && (i.additionalProperties = N(a.catchall, t, {
3304
+ c.size > 0 && (i.required = Array.from(c)), a.catchall?._zod.def.type === "never" ? i.additionalProperties = !1 : a.catchall ? a.catchall && (i.additionalProperties = M(a.catchall, t, {
3305
3305
  ...r,
3306
3306
  path: [...r.path, "additionalProperties"]
3307
3307
  })) : t.io === "output" && (i.additionalProperties = !1);
3308
- }, Ka = (e, t, n, r) => {
3309
- let i = e._zod.def, a = i.inclusive === !1, o = i.options.map((e, n) => N(e, t, {
3308
+ }, qa = (e, t, n, r) => {
3309
+ let i = e._zod.def, a = i.inclusive === !1, o = i.options.map((e, n) => M(e, t, {
3310
3310
  ...r,
3311
3311
  path: [
3312
3312
  ...r.path,
@@ -3315,15 +3315,15 @@ var Ga = (e, t, n, r) => {
3315
3315
  ]
3316
3316
  }));
3317
3317
  a ? n.oneOf = o : n.anyOf = o;
3318
- }, qa = (e, t, n, r) => {
3319
- let i = e._zod.def, a = N(i.left, t, {
3318
+ }, Ja = (e, t, n, r) => {
3319
+ let i = e._zod.def, a = M(i.left, t, {
3320
3320
  ...r,
3321
3321
  path: [
3322
3322
  ...r.path,
3323
3323
  "allOf",
3324
3324
  0
3325
3325
  ]
3326
- }), o = N(i.right, t, {
3326
+ }), o = M(i.right, t, {
3327
3327
  ...r,
3328
3328
  path: [
3329
3329
  ...r.path,
@@ -3332,17 +3332,17 @@ var Ga = (e, t, n, r) => {
3332
3332
  ]
3333
3333
  }), s = (e) => "allOf" in e && Object.keys(e).length === 1, c = [...s(a) ? a.allOf : [a], ...s(o) ? o.allOf : [o]];
3334
3334
  n.allOf = c, t.intersections.push(c);
3335
- }, Ja = (e, t, n, r) => {
3335
+ }, Ya = (e, t, n, r) => {
3336
3336
  let i = n, a = e._zod.def;
3337
3337
  i.type = "array";
3338
- let o = t.target === "draft-2020-12" ? "prefixItems" : "items", s = t.target === "draft-2020-12" || t.target === "openapi-3.0" ? "items" : "additionalItems", c = a.items.map((e, n) => N(e, t, {
3338
+ let o = t.target === "draft-2020-12" ? "prefixItems" : "items", s = t.target === "draft-2020-12" || t.target === "openapi-3.0" ? "items" : "additionalItems", c = a.items.map((e, n) => M(e, t, {
3339
3339
  ...r,
3340
3340
  path: [
3341
3341
  ...r.path,
3342
3342
  o,
3343
3343
  n
3344
3344
  ]
3345
- })), l = a.rest ? N(a.rest, t, {
3345
+ })), l = a.rest ? M(a.rest, t, {
3346
3346
  ...r,
3347
3347
  path: [
3348
3348
  ...r.path,
@@ -3352,7 +3352,7 @@ var Ga = (e, t, n, r) => {
3352
3352
  }) : null, u = a.items.length;
3353
3353
  for (; u > 0;) {
3354
3354
  let e = a.items[u - 1];
3355
- if (!(t.io === "input" ? Wa(e) !== void 0 : e._zod.optout === "optional")) break;
3355
+ if (!(t.io === "input" ? Ga(e) !== void 0 : e._zod.optout === "optional")) break;
3356
3356
  u--;
3357
3357
  }
3358
3358
  let d = a.items.length, f = !a.rest;
@@ -3360,19 +3360,19 @@ var Ga = (e, t, n, r) => {
3360
3360
  let { minimum: p, maximum: m } = e._zod.bag;
3361
3361
  typeof p == "number" && (i.minItems = p), typeof m == "number" && (i.maxItems = m);
3362
3362
  };
3363
- function Ya(e, t, n) {
3363
+ function Xa(e, t, n) {
3364
3364
  if (t.$ref) {
3365
3365
  if (n.has(t)) return t;
3366
3366
  n.add(t);
3367
3367
  let r = e.get(t)?.def;
3368
3368
  if (!r) return t;
3369
- let i = Ya(e, r, n);
3369
+ let i = Xa(e, r, n);
3370
3370
  return i === r ? t : i;
3371
3371
  }
3372
3372
  for (let r of ["anyOf", "oneOf"]) {
3373
3373
  let i = t[r];
3374
3374
  if (!Array.isArray(i)) continue;
3375
- let a = i.map((t) => Ya(e, t, n));
3375
+ let a = i.map((t) => Xa(e, t, n));
3376
3376
  a.some((e, t) => e !== i[t]) && (t = {
3377
3377
  ...t,
3378
3378
  [r]: a
@@ -3383,15 +3383,15 @@ function Ya(e, t, n) {
3383
3383
  let { minimum: o, maximum: s, exclusiveMinimum: c, exclusiveMaximum: l, multipleOf: u, format: d, id: f, ...p } = t;
3384
3384
  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;
3385
3385
  }
3386
- var Xa = /* @__PURE__ */ new WeakMap();
3387
- function Za(e) {
3386
+ var Za = /* @__PURE__ */ new WeakMap();
3387
+ function Qa(e) {
3388
3388
  let t = /* @__PURE__ */ new Map();
3389
3389
  for (let n of e.seen.values()) n.def && !t.has(n.schema) && t.set(n.schema, n);
3390
3390
  let n = /* @__PURE__ */ new Map();
3391
- for (let r of Xa.get(e) ?? []) {
3391
+ for (let r of Za.get(e) ?? []) {
3392
3392
  let i = e.seen.get(r), a = (i?.def ?? i?.schema)?.propertyNames;
3393
3393
  if (!a || a === !0 || n.has(a)) continue;
3394
- let o = Ya(t, a, /* @__PURE__ */ new Set());
3394
+ let o = Xa(t, a, /* @__PURE__ */ new Set());
3395
3395
  o !== a && n.set(a, o);
3396
3396
  }
3397
3397
  if (n.size) for (let t of e.seen.values()) for (let e of [t.schema, t.def]) {
@@ -3399,12 +3399,12 @@ function Za(e) {
3399
3399
  t && (e.propertyNames = t);
3400
3400
  }
3401
3401
  }
3402
- var Qa = (e, t, n, r) => {
3402
+ var $a = (e, t, n, r) => {
3403
3403
  let i = n, a = e._zod.def;
3404
3404
  i.type = "object";
3405
3405
  let o = a.keyType, s = o._zod.bag?.patterns;
3406
3406
  if (a.mode === "loose" && s && s.size > 0) {
3407
- let e = N(a.valueType, t, {
3407
+ let e = M(a.valueType, t, {
3408
3408
  ...r,
3409
3409
  path: [
3410
3410
  ...r.path,
@@ -3416,138 +3416,138 @@ var Qa = (e, t, n, r) => {
3416
3416
  for (let t of s) d(i.patternProperties, t.source, e);
3417
3417
  } else {
3418
3418
  if (t.target === "draft-07" || t.target === "draft-2020-12") {
3419
- i.propertyNames = N(a.keyType, t, {
3419
+ i.propertyNames = M(a.keyType, t, {
3420
3420
  ...r,
3421
3421
  path: [...r.path, "propertyNames"]
3422
3422
  });
3423
- let n = Xa.get(t);
3424
- n || (n = [], Xa.set(t, n), t.deferred.push(() => Za(t))), n.push(e);
3423
+ let n = Za.get(t);
3424
+ n || (n = [], Za.set(t, n), t.deferred.push(() => Qa(t))), n.push(e);
3425
3425
  }
3426
- i.additionalProperties = N(a.valueType, t, {
3426
+ i.additionalProperties = M(a.valueType, t, {
3427
3427
  ...r,
3428
3428
  path: [...r.path, "additionalProperties"]
3429
3429
  });
3430
3430
  }
3431
- let c = o._zod.values, l = t.io === "input" && Wa(a.valueType) !== void 0;
3431
+ let c = o._zod.values, l = t.io === "input" && Ga(a.valueType) !== void 0;
3432
3432
  if (c && !a.partial && !l) {
3433
3433
  let e = [...c].filter((e) => typeof e == "string" || typeof e == "number");
3434
3434
  e.length > 0 && (i.required = e.map(String));
3435
3435
  }
3436
- }, $a = (e, t, n, r) => {
3437
- let i = e._zod.def, a = N(i.innerType, t, r), o = t.seen.get(e);
3438
- t.target === "openapi-3.0" ? (o.ref = i.innerType, n.nullable = !0) : n.anyOf = [a, { type: "null" }];
3439
3436
  }, eo = (e, t, n, r) => {
3437
+ let i = e._zod.def, a = M(i.innerType, t, r), o = t.seen.get(e);
3438
+ t.target === "openapi-3.0" ? (o.ref = i.innerType, n.nullable = !0) : n.anyOf = [a, { type: "null" }];
3439
+ }, to = (e, t, n, r) => {
3440
3440
  let i = e._zod.def;
3441
- N(i.innerType, t, r);
3441
+ M(i.innerType, t, r);
3442
3442
  let a = t.seen.get(e);
3443
3443
  a.ref = i.innerType;
3444
- }, to = Symbol();
3445
- function no(e, t, n, r, i) {
3444
+ }, no = Symbol();
3445
+ function ro(e, t, n, r, i) {
3446
3446
  let a = !1, o = JSON.stringify(e, (e, t) => typeof t == "bigint" ? (a = !0, null) : t);
3447
- return a ? (M(t, n, r, i, "BigInt defaults cannot be represented in JSON Schema"), to) : JSON.parse(o);
3447
+ return a ? (j(t, n, r, i, "BigInt defaults cannot be represented in JSON Schema"), no) : JSON.parse(o);
3448
3448
  }
3449
- var ro = (e, t, n, r) => {
3449
+ var io = (e, t, n, r) => {
3450
3450
  let i = e._zod.def;
3451
- N(i.innerType, t, r);
3451
+ M(i.innerType, t, r);
3452
3452
  let a = t.seen.get(e);
3453
3453
  a.ref = i.innerType;
3454
- let o = no(i.defaultValue, e, t, n, r);
3455
- o !== to && (n.default = o);
3456
- }, io = (e, t, n, r) => {
3454
+ let o = ro(i.defaultValue, e, t, n, r);
3455
+ o !== no && (n.default = o);
3456
+ }, ao = (e, t, n, r) => {
3457
3457
  let i = e._zod.def;
3458
- N(i.innerType, t, r);
3458
+ M(i.innerType, t, r);
3459
3459
  let a = t.seen.get(e);
3460
3460
  if (a.ref = i.innerType, t.io !== "input") return;
3461
- let o = no(i.defaultValue, e, t, n, r);
3462
- o !== to && (n._prefault = o);
3463
- }, ao = (e, t, n, r) => {
3461
+ let o = ro(i.defaultValue, e, t, n, r);
3462
+ o !== no && (n._prefault = o);
3463
+ }, oo = (e, t, n, r) => {
3464
3464
  let i = e._zod.def;
3465
- N(i.innerType, t, r);
3465
+ M(i.innerType, t, r);
3466
3466
  let a = t.seen.get(e);
3467
3467
  a.ref = i.innerType;
3468
3468
  let o;
3469
3469
  try {
3470
3470
  o = i.catchValue(void 0);
3471
3471
  } catch {
3472
- M(e, t, n, r, "Dynamic catch values are not supported in JSON Schema");
3472
+ j(e, t, n, r, "Dynamic catch values are not supported in JSON Schema");
3473
3473
  return;
3474
3474
  }
3475
3475
  n.default = o;
3476
- }, oo = (e, t, n, r) => {
3476
+ }, so = (e, t, n, r) => {
3477
3477
  let i = e._zod.def, a = i.in._zod.traits.has("$ZodTransform"), o = t.io === "input" ? a ? i.out : i.in : i.out;
3478
- N(o, t, r);
3478
+ M(o, t, r);
3479
3479
  let s = t.seen.get(e);
3480
3480
  s.ref = o;
3481
- }, so = (e, t, n, r) => {
3481
+ }, co = (e, t, n, r) => {
3482
3482
  let i = e._zod.def;
3483
- N(i.innerType, t, r);
3483
+ M(i.innerType, t, r);
3484
3484
  let a = t.seen.get(e);
3485
3485
  a.ref = i.innerType, n.readOnly = !0;
3486
- }, co = (e, t, n, r) => {
3486
+ }, lo = (e, t, n, r) => {
3487
3487
  let i = e._zod.def;
3488
- N(i.innerType, t, r);
3488
+ M(i.innerType, t, r);
3489
3489
  let a = t.seen.get(e);
3490
3490
  a.ref = i.innerType;
3491
- }, lo = (e, t, n, r) => {
3491
+ }, uo = (e, t, n, r) => {
3492
3492
  let i = e._zod.def;
3493
- N(i.innerType, t, r);
3493
+ M(i.innerType, t, r);
3494
3494
  let a = t.seen.get(e);
3495
3495
  a.ref = i.innerType;
3496
- }, uo = (e, t, n, r) => {
3496
+ }, fo = (e, t, n, r) => {
3497
3497
  let i = e._zod.innerType;
3498
- N(i, t, r);
3498
+ M(i, t, r);
3499
3499
  let a = t.seen.get(e);
3500
3500
  a.ref = i;
3501
- }, fo = {
3502
- string: ba,
3503
- number: xa,
3504
- boolean: Sa,
3505
- bigint: Ca,
3506
- symbol: wa,
3507
- null: Ta,
3508
- undefined: Ea,
3509
- void: Da,
3510
- never: Oa,
3511
- any: ka,
3512
- unknown: Aa,
3513
- date: ja,
3514
- enum: Ma,
3515
- literal: Na,
3516
- nan: Pa,
3517
- template_literal: Fa,
3518
- file: Ia,
3519
- success: La,
3520
- custom: Ra,
3521
- function: za,
3522
- transform: Ba,
3523
- map: Va,
3524
- set: Ha,
3525
- array: Ua,
3526
- object: Ga,
3527
- union: Ka,
3528
- intersection: qa,
3529
- tuple: Ja,
3530
- record: Qa,
3531
- nullable: $a,
3532
- nonoptional: eo,
3533
- default: ro,
3534
- prefault: io,
3535
- catch: ao,
3536
- pipe: oo,
3537
- readonly: so,
3538
- promise: co,
3539
- optional: lo,
3540
- lazy: uo
3501
+ }, po = {
3502
+ string: xa,
3503
+ number: Sa,
3504
+ boolean: Ca,
3505
+ bigint: wa,
3506
+ symbol: Ta,
3507
+ null: Ea,
3508
+ undefined: Da,
3509
+ void: Oa,
3510
+ never: ka,
3511
+ any: Aa,
3512
+ unknown: ja,
3513
+ date: Ma,
3514
+ enum: Na,
3515
+ literal: Pa,
3516
+ nan: Fa,
3517
+ template_literal: Ia,
3518
+ file: La,
3519
+ success: Ra,
3520
+ custom: za,
3521
+ function: Ba,
3522
+ transform: Va,
3523
+ map: Ha,
3524
+ set: Ua,
3525
+ array: Wa,
3526
+ object: Ka,
3527
+ union: qa,
3528
+ intersection: Ja,
3529
+ tuple: Ya,
3530
+ record: $a,
3531
+ nullable: eo,
3532
+ nonoptional: to,
3533
+ default: io,
3534
+ prefault: ao,
3535
+ catch: oo,
3536
+ pipe: so,
3537
+ readonly: co,
3538
+ promise: lo,
3539
+ optional: uo,
3540
+ lazy: fo
3541
3541
  };
3542
- function po(e, t) {
3542
+ function mo(e, t) {
3543
3543
  if ("_idmap" in e) {
3544
- let n = e, r = sa({
3544
+ let n = e, r = ca({
3545
3545
  ...t,
3546
- processors: fo
3546
+ processors: po
3547
3547
  }), i = {};
3548
3548
  for (let e of n._idmap.entries()) {
3549
3549
  let [t, n] = e;
3550
- N(n, r);
3550
+ M(n, r);
3551
3551
  }
3552
3552
  let a = {};
3553
3553
  r.external = {
@@ -3557,20 +3557,20 @@ function po(e, t) {
3557
3557
  };
3558
3558
  for (let e of n._idmap.entries()) {
3559
3559
  let [t, n] = e;
3560
- la(r, n), d(a, t, ga(r, n));
3560
+ ua(r, n), d(a, t, _a(r, n));
3561
3561
  }
3562
3562
  return Object.keys(i).length > 0 && (a.__shared = { [r.target === "draft-2020-12" ? "$defs" : "definitions"]: i }), { schemas: a };
3563
3563
  }
3564
- let n = sa({
3564
+ let n = ca({
3565
3565
  ...t,
3566
- processors: fo
3566
+ processors: po
3567
3567
  });
3568
- return N(e, n), la(n, e), ga(n, e);
3568
+ return M(e, n), ua(n, e), _a(n, e);
3569
3569
  }
3570
3570
  //#endregion
3571
3571
  //#region ../../node_modules/.bun/zod@4.5.4/node_modules/zod/v4/classic/errors.js
3572
- var mo = /* @__PURE__ */ new WeakSet([Object.prototype, Error.prototype]);
3573
- function ho(e, t, n) {
3572
+ var ho = /* @__PURE__ */ new WeakSet([Object.prototype, Error.prototype]);
3573
+ function go(e, t, n) {
3574
3574
  Object.defineProperty(e, t, {
3575
3575
  configurable: !0,
3576
3576
  enumerable: !1,
@@ -3591,12 +3591,12 @@ function ho(e, t, n) {
3591
3591
  }
3592
3592
  });
3593
3593
  }
3594
- var F = /*@__PURE__*/ w("ZodError", (e, t) => {
3594
+ var P = /*@__PURE__*/ w("ZodError", (e, t) => {
3595
3595
  Ge.init(e, t), e.name = "ZodError";
3596
3596
  let n = Object.getPrototypeOf(e);
3597
- mo.has(n) || (mo.add(n), ho(n, "format", (e) => (t) => Ye(e, t)), ho(n, "flatten", (e) => (t) => Je(e, t)), ho(n, "addIssue", (e) => (t) => {
3597
+ ho.has(n) || (ho.add(n), go(n, "format", (e) => (t) => Ye(e, t)), go(n, "flatten", (e) => (t) => Je(e, t)), go(n, "addIssue", (e) => (t) => {
3598
3598
  e.issues.push(t), e.message = JSON.stringify(e.issues, i, 2);
3599
- }), ho(n, "addIssues", (e) => (t) => {
3599
+ }), go(n, "addIssues", (e) => (t) => {
3600
3600
  e.issues.push(...t), e.message = JSON.stringify(e.issues, i, 2);
3601
3601
  }), Object.defineProperty(n, "isEmpty", {
3602
3602
  configurable: !0,
@@ -3605,16 +3605,16 @@ var F = /*@__PURE__*/ w("ZodError", (e, t) => {
3605
3605
  return this.issues.length === 0;
3606
3606
  }
3607
3607
  }));
3608
- }, void 0, { Parent: Error }), go = /* @__PURE__ */ Ze(F), _o = /* @__PURE__ */ Qe(F), vo = /* @__PURE__ */ $e(F), yo = /* @__PURE__ */ tt(F), bo = /* @__PURE__ */ rt(F), xo = /* @__PURE__ */ it(F), So = /* @__PURE__ */ at(F), Co = /* @__PURE__ */ ot(F), wo = /* @__PURE__ */ st(F), To = /* @__PURE__ */ ct(F), Eo = /* @__PURE__ */ lt(F), Do = /* @__PURE__ */ ut(F);
3608
+ }, void 0, { Parent: Error }), _o = /* @__PURE__ */ Ze(P), vo = /* @__PURE__ */ Qe(P), yo = /* @__PURE__ */ $e(P), bo = /* @__PURE__ */ tt(P), xo = /* @__PURE__ */ rt(P), So = /* @__PURE__ */ it(P), Co = /* @__PURE__ */ at(P), wo = /* @__PURE__ */ ot(P), To = /* @__PURE__ */ st(P), Eo = /* @__PURE__ */ ct(P), Do = /* @__PURE__ */ lt(P), Oo = /* @__PURE__ */ ut(P);
3609
3609
  //#endregion
3610
3610
  //#region ../../node_modules/.bun/zod@4.5.4/node_modules/zod/v4/classic/schemas.js
3611
- function Oo() {
3611
+ function ko() {
3612
3612
  E.localeError || D($r());
3613
3613
  }
3614
- function ko() {
3614
+ function Ao() {
3615
3615
  E.memoizer || D({ memoizer: Xr() });
3616
3616
  }
3617
- var I = /*@__PURE__*/ w("ZodType", (e, t) => (Oo(), k.init(e, t), e.def = t, e.type = t.type, e), {
3617
+ var F = /*@__PURE__*/ w("ZodType", (e, t) => (ko(), k.init(e, t), e.def = t, e.type = t.type, e), {
3618
3618
  check(...e) {
3619
3619
  let t = this.def;
3620
3620
  return this.clone(f(t, { checks: [...t.checks ?? [], ...e.map((e) => typeof e == "function" ? { _zod: {
@@ -3636,55 +3636,55 @@ var I = /*@__PURE__*/ w("ZodType", (e, t) => (Oo(), k.init(e, t), e.def = t, e.t
3636
3636
  return e.add(this, t), this;
3637
3637
  },
3638
3638
  refine(e, t) {
3639
- return this.check(Gs(e, t));
3639
+ return this.check(qs(e, t));
3640
3640
  },
3641
3641
  superRefine(e, t) {
3642
- return this.check(Ks(e, t));
3642
+ return this.check(Js(e, t));
3643
3643
  },
3644
3644
  overwrite(e) {
3645
- return this.check(/* @__PURE__ */ j(e));
3645
+ return this.check(/* @__PURE__ */ Zi(e));
3646
3646
  },
3647
3647
  optional() {
3648
- return Ts(this);
3648
+ return Ds(this);
3649
3649
  },
3650
3650
  exactOptional() {
3651
- return Ds(this);
3651
+ return ks(this);
3652
3652
  },
3653
3653
  nullable() {
3654
- return ks(this);
3654
+ return js(this);
3655
3655
  },
3656
3656
  nullish() {
3657
- return Ts(ks(this));
3657
+ return Ds(js(this));
3658
3658
  },
3659
3659
  nonoptional(e) {
3660
- return Fs(this, e);
3660
+ return Ls(this, e);
3661
3661
  },
3662
3662
  array() {
3663
- return B(this);
3663
+ return z(this);
3664
3664
  },
3665
3665
  or(e) {
3666
- return H([this, e]);
3666
+ return V([this, e]);
3667
3667
  },
3668
3668
  and(e) {
3669
- return gs(this, e);
3669
+ return vs(this, e);
3670
3670
  },
3671
3671
  transform(e) {
3672
- return zs(this, Cs(e));
3672
+ return Vs(this, Ts(e));
3673
3673
  },
3674
3674
  default(e) {
3675
- return js(this, e);
3675
+ return Ns(this, e);
3676
3676
  },
3677
3677
  prefault(e) {
3678
- return Ns(this, e);
3678
+ return Fs(this, e);
3679
3679
  },
3680
3680
  catch(e) {
3681
- return Ls(this, e);
3681
+ return zs(this, e);
3682
3682
  },
3683
3683
  pipe(e) {
3684
- return zs(this, e);
3684
+ return Vs(this, e);
3685
3685
  },
3686
3686
  readonly() {
3687
- return Vs(this);
3687
+ return Us(this);
3688
3688
  },
3689
3689
  describe(e) {
3690
3690
  let t = this.clone();
@@ -3708,8 +3708,8 @@ var I = /*@__PURE__*/ w("ZodType", (e, t) => (Oo(), k.init(e, t), e.def = t, e.t
3708
3708
  return Te(this, "~standard", {
3709
3709
  ...fn(this),
3710
3710
  jsonSchema: {
3711
- input: va(this, "input"),
3712
- output: va(this, "output")
3711
+ input: ya(this, "input"),
3712
+ output: ya(this, "output")
3713
3713
  }
3714
3714
  });
3715
3715
  },
@@ -3717,16 +3717,16 @@ var I = /*@__PURE__*/ w("ZodType", (e, t) => (Oo(), k.init(e, t), e.def = t, e.t
3717
3717
  x(this, "~standard", e);
3718
3718
  },
3719
3719
  parse: function e(t, n) {
3720
- return go(this, t, n, { callee: e });
3720
+ return _o(this, t, n, { callee: e });
3721
3721
  },
3722
3722
  parseAsync: async function e(t, n) {
3723
- return await _o(this, t, n, { callee: e });
3723
+ return await vo(this, t, n, { callee: e });
3724
3724
  },
3725
3725
  safeParse(e, t) {
3726
- return vo(this, e, t);
3726
+ return yo(this, e, t);
3727
3727
  },
3728
3728
  async safeParseAsync(e, t) {
3729
- return yo(this, e, t);
3729
+ return bo(this, e, t);
3730
3730
  },
3731
3731
  get spa() {
3732
3732
  return this?.safeParseAsync;
@@ -3735,31 +3735,31 @@ var I = /*@__PURE__*/ w("ZodType", (e, t) => (Oo(), k.init(e, t), e.def = t, e.t
3735
3735
  x(this, "spa", e);
3736
3736
  },
3737
3737
  encode: function e(t, n) {
3738
- return bo(this, t, n, { callee: e });
3738
+ return xo(this, t, n, { callee: e });
3739
3739
  },
3740
3740
  decode: function e(t, n) {
3741
- return xo(this, t, n, { callee: e });
3741
+ return So(this, t, n, { callee: e });
3742
3742
  },
3743
3743
  encodeAsync: async function e(t, n) {
3744
- return await So(this, t, n, { callee: e });
3744
+ return await Co(this, t, n, { callee: e });
3745
3745
  },
3746
3746
  decodeAsync: async function e(t, n) {
3747
- return await Co(this, t, n, { callee: e });
3747
+ return await wo(this, t, n, { callee: e });
3748
3748
  },
3749
3749
  safeEncode(e, t) {
3750
- return wo(this, e, t);
3750
+ return To(this, e, t);
3751
3751
  },
3752
3752
  safeDecode(e, t) {
3753
- return To(this, e, t);
3753
+ return Eo(this, e, t);
3754
3754
  },
3755
3755
  async safeEncodeAsync(e, t) {
3756
- return Eo(this, e, t);
3756
+ return Do(this, e, t);
3757
3757
  },
3758
3758
  async safeDecodeAsync(e, t) {
3759
- return Do(this, e, t);
3759
+ return Oo(this, e, t);
3760
3760
  },
3761
3761
  toJSONSchema(e) {
3762
- return _a(this, {})(e);
3762
+ return va(this, {})(e);
3763
3763
  },
3764
3764
  get description() {
3765
3765
  return ri.get(this)?.description;
@@ -3767,8 +3767,8 @@ var I = /*@__PURE__*/ w("ZodType", (e, t) => (Oo(), k.init(e, t), e.def = t, e.t
3767
3767
  get _def() {
3768
3768
  return this._zod.def;
3769
3769
  }
3770
- }), Ao = /*@__PURE__*/ w("_ZodString", (e, t) => {
3771
- pn.init(e, t), I.init(e, t), e._zod.processJSONSchema = (t, n, r) => ba(e, t, n, r);
3770
+ }), jo = /*@__PURE__*/ w("_ZodString", (e, t) => {
3771
+ pn.init(e, t), F.init(e, t), e._zod.processJSONSchema = (t, n, r) => xa(e, t, n, r);
3772
3772
  let n = e._zod.bag;
3773
3773
  e.format = n.format ?? null, e.minLength = n.minimum ?? null, e.maxLength = n.maximum ?? null;
3774
3774
  }, {
@@ -3803,155 +3803,155 @@ var I = /*@__PURE__*/ w("ZodType", (e, t) => (Oo(), k.init(e, t), e.def = t, e.t
3803
3803
  return this.check(/* @__PURE__ */ qi(e));
3804
3804
  },
3805
3805
  trim() {
3806
- return this.check(/* @__PURE__ */ Qi());
3806
+ return this.check(/* @__PURE__ */ $i());
3807
3807
  },
3808
3808
  normalize(...e) {
3809
- return this.check(/* @__PURE__ */ Zi(...e));
3809
+ return this.check(/* @__PURE__ */ Qi(...e));
3810
3810
  },
3811
3811
  toLowerCase() {
3812
- return this.check(/* @__PURE__ */ $i());
3812
+ return this.check(/* @__PURE__ */ ea());
3813
3813
  },
3814
3814
  toUpperCase() {
3815
- return this.check(/* @__PURE__ */ ea());
3815
+ return this.check(/* @__PURE__ */ ta());
3816
3816
  },
3817
3817
  slugify() {
3818
- return this.check(/* @__PURE__ */ ta());
3818
+ return this.check(/* @__PURE__ */ na());
3819
3819
  }
3820
- }), jo = /*@__PURE__*/ w("ZodString", (e, t) => {
3821
- pn.init(e, t), Ao.init(e, t);
3820
+ }), Mo = /*@__PURE__*/ w("ZodString", (e, t) => {
3821
+ pn.init(e, t), jo.init(e, t);
3822
3822
  }, {
3823
3823
  email(e) {
3824
- return this.check(/* @__PURE__ */ ai(Lo, e));
3824
+ return this.check(/* @__PURE__ */ ai(Ro, e));
3825
3825
  },
3826
3826
  url(e) {
3827
- return this.check(/* @__PURE__ */ di(Bo, e));
3827
+ return this.check(/* @__PURE__ */ di(Vo, e));
3828
3828
  },
3829
3829
  jwt(e) {
3830
- return this.check(/* @__PURE__ */ Ei(ts, e));
3830
+ return this.check(/* @__PURE__ */ Ei(ns, e));
3831
3831
  },
3832
3832
  emoji(e) {
3833
- return this.check(/* @__PURE__ */ fi(Vo, e));
3833
+ return this.check(/* @__PURE__ */ fi(Ho, e));
3834
3834
  },
3835
3835
  guid(e) {
3836
- return this.check(/* @__PURE__ */ oi(Ro, e));
3836
+ return this.check(/* @__PURE__ */ oi(zo, e));
3837
3837
  },
3838
3838
  uuid(e) {
3839
- return this.check(/* @__PURE__ */ si(zo, e));
3839
+ return this.check(/* @__PURE__ */ si(Bo, e));
3840
3840
  },
3841
3841
  uuidv4(e) {
3842
- return this.check(/* @__PURE__ */ ci(zo, e));
3842
+ return this.check(/* @__PURE__ */ ci(Bo, e));
3843
3843
  },
3844
3844
  uuidv6(e) {
3845
- return this.check(/* @__PURE__ */ li(zo, e));
3845
+ return this.check(/* @__PURE__ */ li(Bo, e));
3846
3846
  },
3847
3847
  uuidv7(e) {
3848
- return this.check(/* @__PURE__ */ ui(zo, e));
3848
+ return this.check(/* @__PURE__ */ ui(Bo, e));
3849
3849
  },
3850
3850
  nanoid(e) {
3851
- return this.check(/* @__PURE__ */ pi(Ho, e));
3851
+ return this.check(/* @__PURE__ */ pi(Uo, e));
3852
3852
  },
3853
3853
  cuid(e) {
3854
- return this.check(/* @__PURE__ */ mi(Uo, e));
3854
+ return this.check(/* @__PURE__ */ mi(Wo, e));
3855
3855
  },
3856
3856
  cuid2(e) {
3857
- return this.check(/* @__PURE__ */ hi(Wo, e));
3857
+ return this.check(/* @__PURE__ */ hi(Go, e));
3858
3858
  },
3859
3859
  ulid(e) {
3860
- return this.check(/* @__PURE__ */ gi(Go, e));
3860
+ return this.check(/* @__PURE__ */ gi(Ko, e));
3861
3861
  },
3862
3862
  base64(e) {
3863
- return this.check(/* @__PURE__ */ Ci(Qo, e));
3863
+ return this.check(/* @__PURE__ */ Ci($o, e));
3864
3864
  },
3865
3865
  base64url(e) {
3866
- return this.check(/* @__PURE__ */ wi($o, e));
3866
+ return this.check(/* @__PURE__ */ wi(es, e));
3867
3867
  },
3868
3868
  xid(e) {
3869
- return this.check(/* @__PURE__ */ _i(Ko, e));
3869
+ return this.check(/* @__PURE__ */ _i(qo, e));
3870
3870
  },
3871
3871
  ksuid(e) {
3872
- return this.check(/* @__PURE__ */ vi(qo, e));
3872
+ return this.check(/* @__PURE__ */ vi(Jo, e));
3873
3873
  },
3874
3874
  ipv4(e) {
3875
- return this.check(/* @__PURE__ */ yi(Jo, e));
3875
+ return this.check(/* @__PURE__ */ yi(Yo, e));
3876
3876
  },
3877
3877
  ipv6(e) {
3878
- return this.check(/* @__PURE__ */ bi(Yo, e));
3878
+ return this.check(/* @__PURE__ */ bi(Xo, e));
3879
3879
  },
3880
3880
  cidrv4(e) {
3881
- return this.check(/* @__PURE__ */ xi(Xo, e));
3881
+ return this.check(/* @__PURE__ */ xi(Zo, e));
3882
3882
  },
3883
3883
  cidrv6(e) {
3884
- return this.check(/* @__PURE__ */ Si(Zo, e));
3884
+ return this.check(/* @__PURE__ */ Si(Qo, e));
3885
3885
  },
3886
3886
  e164(e) {
3887
- return this.check(/* @__PURE__ */ Ti(es, e));
3887
+ return this.check(/* @__PURE__ */ Ti(ts, e));
3888
3888
  },
3889
3889
  datetime(e) {
3890
- return this.check(/* @__PURE__ */ Di(No, e));
3890
+ return this.check(/* @__PURE__ */ Di(Po, e));
3891
3891
  },
3892
3892
  date(e) {
3893
- return this.check(/* @__PURE__ */ Oi(Po, e));
3893
+ return this.check(/* @__PURE__ */ Oi(Fo, e));
3894
3894
  },
3895
3895
  time(e) {
3896
- return this.check(/* @__PURE__ */ ki(Fo, e));
3896
+ return this.check(/* @__PURE__ */ ki(Io, e));
3897
3897
  },
3898
3898
  duration(e) {
3899
- return this.check(/* @__PURE__ */ Ai(Io, e));
3899
+ return this.check(/* @__PURE__ */ Ai(Lo, e));
3900
3900
  }
3901
3901
  });
3902
- function Mo(e) {
3903
- return /* @__PURE__ */ ii(jo, e);
3904
- }
3905
- var L = /*@__PURE__*/ w("ZodStringFormat", (e, t) => {
3906
- A.init(e, t), Ao.init(e, t);
3907
- }), No = /*@__PURE__*/ w("ZodISODateTime", (e, t) => {
3908
- An.init(e, t), L.init(e, t);
3909
- }), Po = /*@__PURE__*/ w("ZodISODate", (e, t) => {
3910
- jn.init(e, t), L.init(e, t);
3911
- }), Fo = /*@__PURE__*/ w("ZodISOTime", (e, t) => {
3912
- Mn.init(e, t), L.init(e, t);
3913
- }), Io = /*@__PURE__*/ w("ZodISODuration", (e, t) => {
3914
- Nn.init(e, t), L.init(e, t);
3915
- }), Lo = /*@__PURE__*/ w("ZodEmail", (e, t) => {
3916
- gn.init(e, t), L.init(e, t);
3917
- }), Ro = /*@__PURE__*/ w("ZodGUID", (e, t) => {
3918
- mn.init(e, t), L.init(e, t);
3919
- }), zo = /*@__PURE__*/ w("ZodUUID", (e, t) => {
3920
- hn.init(e, t), L.init(e, t);
3921
- }), Bo = /*@__PURE__*/ w("ZodURL", (e, t) => {
3922
- Sn.init(e, t), L.init(e, t);
3923
- }), Vo = /*@__PURE__*/ w("ZodEmoji", (e, t) => {
3924
- Cn.init(e, t), L.init(e, t);
3925
- }), Ho = /*@__PURE__*/ w("ZodNanoID", (e, t) => {
3926
- wn.init(e, t), L.init(e, t);
3927
- }), Uo = /*@__PURE__*/ w("ZodCUID", (e, t) => {
3928
- Tn.init(e, t), L.init(e, t);
3929
- }), Wo = /*@__PURE__*/ w("ZodCUID2", (e, t) => {
3930
- En.init(e, t), L.init(e, t);
3931
- }), Go = /*@__PURE__*/ w("ZodULID", (e, t) => {
3932
- Dn.init(e, t), L.init(e, t);
3933
- }), Ko = /*@__PURE__*/ w("ZodXID", (e, t) => {
3934
- On.init(e, t), L.init(e, t);
3935
- }), qo = /*@__PURE__*/ w("ZodKSUID", (e, t) => {
3936
- kn.init(e, t), L.init(e, t);
3937
- }), Jo = /*@__PURE__*/ w("ZodIPv4", (e, t) => {
3938
- Pn.init(e, t), L.init(e, t);
3939
- }), Yo = /*@__PURE__*/ w("ZodIPv6", (e, t) => {
3940
- Ln.init(e, t), L.init(e, t);
3941
- }), Xo = /*@__PURE__*/ w("ZodCIDRv4", (e, t) => {
3942
- Rn.init(e, t), L.init(e, t);
3943
- }), Zo = /*@__PURE__*/ w("ZodCIDRv6", (e, t) => {
3944
- Bn.init(e, t), L.init(e, t);
3945
- }), Qo = /*@__PURE__*/ w("ZodBase64", (e, t) => {
3946
- Hn.init(e, t), L.init(e, t);
3947
- }), $o = /*@__PURE__*/ w("ZodBase64URL", (e, t) => {
3948
- Wn.init(e, t), L.init(e, t);
3949
- }), es = /*@__PURE__*/ w("ZodE164", (e, t) => {
3950
- Gn.init(e, t), L.init(e, t);
3951
- }), ts = /*@__PURE__*/ w("ZodJWT", (e, t) => {
3952
- qn.init(e, t), L.init(e, t);
3953
- }), ns = /*@__PURE__*/ w("ZodNumber", (e, t) => {
3954
- Jn.init(e, t), I.init(e, t), e._zod.processJSONSchema = (t, n, r) => xa(e, t, n, r);
3902
+ function No(e) {
3903
+ return /* @__PURE__ */ ii(Mo, e);
3904
+ }
3905
+ var I = /*@__PURE__*/ w("ZodStringFormat", (e, t) => {
3906
+ A.init(e, t), jo.init(e, t);
3907
+ }), Po = /*@__PURE__*/ w("ZodISODateTime", (e, t) => {
3908
+ An.init(e, t), I.init(e, t);
3909
+ }), Fo = /*@__PURE__*/ w("ZodISODate", (e, t) => {
3910
+ jn.init(e, t), I.init(e, t);
3911
+ }), Io = /*@__PURE__*/ w("ZodISOTime", (e, t) => {
3912
+ Mn.init(e, t), I.init(e, t);
3913
+ }), Lo = /*@__PURE__*/ w("ZodISODuration", (e, t) => {
3914
+ Nn.init(e, t), I.init(e, t);
3915
+ }), Ro = /*@__PURE__*/ w("ZodEmail", (e, t) => {
3916
+ gn.init(e, t), I.init(e, t);
3917
+ }), zo = /*@__PURE__*/ w("ZodGUID", (e, t) => {
3918
+ mn.init(e, t), I.init(e, t);
3919
+ }), Bo = /*@__PURE__*/ w("ZodUUID", (e, t) => {
3920
+ hn.init(e, t), I.init(e, t);
3921
+ }), Vo = /*@__PURE__*/ w("ZodURL", (e, t) => {
3922
+ Sn.init(e, t), I.init(e, t);
3923
+ }), Ho = /*@__PURE__*/ w("ZodEmoji", (e, t) => {
3924
+ Cn.init(e, t), I.init(e, t);
3925
+ }), Uo = /*@__PURE__*/ w("ZodNanoID", (e, t) => {
3926
+ wn.init(e, t), I.init(e, t);
3927
+ }), Wo = /*@__PURE__*/ w("ZodCUID", (e, t) => {
3928
+ Tn.init(e, t), I.init(e, t);
3929
+ }), Go = /*@__PURE__*/ w("ZodCUID2", (e, t) => {
3930
+ En.init(e, t), I.init(e, t);
3931
+ }), Ko = /*@__PURE__*/ w("ZodULID", (e, t) => {
3932
+ Dn.init(e, t), I.init(e, t);
3933
+ }), qo = /*@__PURE__*/ w("ZodXID", (e, t) => {
3934
+ On.init(e, t), I.init(e, t);
3935
+ }), Jo = /*@__PURE__*/ w("ZodKSUID", (e, t) => {
3936
+ kn.init(e, t), I.init(e, t);
3937
+ }), Yo = /*@__PURE__*/ w("ZodIPv4", (e, t) => {
3938
+ Pn.init(e, t), I.init(e, t);
3939
+ }), Xo = /*@__PURE__*/ w("ZodIPv6", (e, t) => {
3940
+ Ln.init(e, t), I.init(e, t);
3941
+ }), Zo = /*@__PURE__*/ w("ZodCIDRv4", (e, t) => {
3942
+ Rn.init(e, t), I.init(e, t);
3943
+ }), Qo = /*@__PURE__*/ w("ZodCIDRv6", (e, t) => {
3944
+ Bn.init(e, t), I.init(e, t);
3945
+ }), $o = /*@__PURE__*/ w("ZodBase64", (e, t) => {
3946
+ Hn.init(e, t), I.init(e, t);
3947
+ }), es = /*@__PURE__*/ w("ZodBase64URL", (e, t) => {
3948
+ Wn.init(e, t), I.init(e, t);
3949
+ }), ts = /*@__PURE__*/ w("ZodE164", (e, t) => {
3950
+ Gn.init(e, t), I.init(e, t);
3951
+ }), ns = /*@__PURE__*/ w("ZodJWT", (e, t) => {
3952
+ qn.init(e, t), I.init(e, t);
3953
+ }), rs = /*@__PURE__*/ w("ZodNumber", (e, t) => {
3954
+ Jn.init(e, t), F.init(e, t), e._zod.processJSONSchema = (t, n, r) => Sa(e, t, n, r);
3955
3955
  let n = e._zod.bag;
3956
3956
  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;
3957
3957
  }, {
@@ -3974,10 +3974,10 @@ var L = /*@__PURE__*/ w("ZodStringFormat", (e, t) => {
3974
3974
  return this.check(/* @__PURE__ */ Ri(e, t));
3975
3975
  },
3976
3976
  int(e) {
3977
- return this.check(is(e));
3977
+ return this.check(as(e));
3978
3978
  },
3979
3979
  safe(e) {
3980
- return this.check(is(e));
3980
+ return this.check(as(e));
3981
3981
  },
3982
3982
  positive(e) {
3983
3983
  return this.check(/* @__PURE__ */ zi(0, e));
@@ -4001,41 +4001,41 @@ var L = /*@__PURE__*/ w("ZodStringFormat", (e, t) => {
4001
4001
  return this;
4002
4002
  }
4003
4003
  });
4004
- function R(e) {
4005
- return /* @__PURE__ */ ji(ns, e);
4004
+ function L(e) {
4005
+ return /* @__PURE__ */ ji(rs, e);
4006
4006
  }
4007
- var rs = /*@__PURE__*/ w("ZodNumberFormat", (e, t) => {
4008
- Yn.init(e, t), ns.init(e, t);
4007
+ var is = /*@__PURE__*/ w("ZodNumberFormat", (e, t) => {
4008
+ Yn.init(e, t), rs.init(e, t);
4009
4009
  });
4010
- function is(e) {
4011
- return /* @__PURE__ */ Mi(rs, e);
4010
+ function as(e) {
4011
+ return /* @__PURE__ */ Mi(is, e);
4012
4012
  }
4013
- var as = /*@__PURE__*/ w("ZodBoolean", (e, t) => {
4014
- Xn.init(e, t), I.init(e, t), e._zod.processJSONSchema = (t, n, r) => Sa(e, t, n, r);
4013
+ var os = /*@__PURE__*/ w("ZodBoolean", (e, t) => {
4014
+ Xn.init(e, t), F.init(e, t), e._zod.processJSONSchema = (t, n, r) => Ca(e, t, n, r);
4015
4015
  });
4016
- function z(e) {
4017
- return /* @__PURE__ */ Ni(as, e);
4016
+ function R(e) {
4017
+ return /* @__PURE__ */ Ni(os, e);
4018
4018
  }
4019
- var os = /*@__PURE__*/ w("ZodNull", (e, t) => {
4020
- Zn.init(e, t), I.init(e, t), e._zod.processJSONSchema = (t, n, r) => Ta(e, t, n, r);
4019
+ var ss = /*@__PURE__*/ w("ZodNull", (e, t) => {
4020
+ Zn.init(e, t), F.init(e, t), e._zod.processJSONSchema = (t, n, r) => Ea(e, t, n, r);
4021
4021
  });
4022
- function ss(e) {
4023
- return /* @__PURE__ */ Pi(os, e);
4022
+ function cs(e) {
4023
+ return /* @__PURE__ */ Pi(ss, e);
4024
4024
  }
4025
- var cs = /*@__PURE__*/ w("ZodUnknown", (e, t) => {
4026
- Qn.init(e, t), I.init(e, t), e._zod.processJSONSchema = (e, t, n) => void 0;
4025
+ var ls = /*@__PURE__*/ w("ZodUnknown", (e, t) => {
4026
+ Qn.init(e, t), F.init(e, t), e._zod.processJSONSchema = (e, t, n) => void 0;
4027
4027
  });
4028
- function ls() {
4029
- return /* @__PURE__ */ Fi(cs);
4028
+ function us() {
4029
+ return /* @__PURE__ */ Fi(ls);
4030
4030
  }
4031
- var us = /*@__PURE__*/ w("ZodNever", (e, t) => {
4032
- $n.init(e, t), I.init(e, t), e._zod.processJSONSchema = (t, n, r) => Oa(e, t, n, r);
4031
+ var ds = /*@__PURE__*/ w("ZodNever", (e, t) => {
4032
+ $n.init(e, t), F.init(e, t), e._zod.processJSONSchema = (t, n, r) => ka(e, t, n, r);
4033
4033
  });
4034
- function ds(e) {
4035
- return /* @__PURE__ */ Ii(us, e);
4034
+ function fs(e) {
4035
+ return /* @__PURE__ */ Ii(ds, e);
4036
4036
  }
4037
- var fs = /*@__PURE__*/ w("ZodArray", (e, t) => {
4038
- ko(), tr.init(e, t), I.init(e, t), e._zod.processJSONSchema = (t, n, r) => Ua(e, t, n, r), e.element = t.element;
4037
+ var ps = /*@__PURE__*/ w("ZodArray", (e, t) => {
4038
+ Ao(), tr.init(e, t), F.init(e, t), e._zod.processJSONSchema = (t, n, r) => Wa(e, t, n, r), e.element = t.element;
4039
4039
  }, {
4040
4040
  min(e, t) {
4041
4041
  return this.check(/* @__PURE__ */ Ui(e, t));
@@ -4053,14 +4053,14 @@ var fs = /*@__PURE__*/ w("ZodArray", (e, t) => {
4053
4053
  return this.element;
4054
4054
  }
4055
4055
  });
4056
- function B(e, t) {
4057
- return /* @__PURE__ */ na(fs, e, t);
4056
+ function z(e, t) {
4057
+ return /* @__PURE__ */ ra(ps, e, t);
4058
4058
  }
4059
- var ps = /*@__PURE__*/ w("ZodObject", (e, t) => {
4060
- ko(), cr.init(e, t), I.init(e, t), e._zod.processJSONSchema = (t, n, r) => Ga(e, t, n, r), Ae(e, "shape", (e) => e._zod.def.shape, !1);
4059
+ var ms = /*@__PURE__*/ w("ZodObject", (e, t) => {
4060
+ Ao(), cr.init(e, t), F.init(e, t), e._zod.processJSONSchema = (t, n, r) => Ka(e, t, n, r), Ae(e, "shape", (e) => e._zod.def.shape, !1);
4061
4061
  }, {
4062
4062
  keyof() {
4063
- return W(Object.keys(this._zod.def.shape));
4063
+ return U(Object.keys(this._zod.def.shape));
4064
4064
  },
4065
4065
  catchall(e) {
4066
4066
  return this.clone({
@@ -4071,19 +4071,19 @@ var ps = /*@__PURE__*/ w("ZodObject", (e, t) => {
4071
4071
  passthrough() {
4072
4072
  return this.clone({
4073
4073
  ...this._zod.def,
4074
- catchall: ls()
4074
+ catchall: us()
4075
4075
  });
4076
4076
  },
4077
4077
  loose() {
4078
4078
  return this.clone({
4079
4079
  ...this._zod.def,
4080
- catchall: ls()
4080
+ catchall: us()
4081
4081
  });
4082
4082
  },
4083
4083
  strict() {
4084
4084
  return this.clone({
4085
4085
  ...this._zod.def,
4086
- catchall: ds()
4086
+ catchall: fs()
4087
4087
  });
4088
4088
  },
4089
4089
  strip() {
@@ -4108,44 +4108,52 @@ var ps = /*@__PURE__*/ w("ZodObject", (e, t) => {
4108
4108
  return le(this, e);
4109
4109
  },
4110
4110
  partial(...e) {
4111
- return pe(ws, this, e[0]);
4111
+ return pe(Es, this, e[0]);
4112
4112
  },
4113
4113
  exactPartial(...e) {
4114
- return pe(Es, this, e[0], "exactPartial");
4114
+ return pe(Os, this, e[0], "exactPartial");
4115
4115
  },
4116
4116
  required(...e) {
4117
- return me(Ps, this, e[0]);
4117
+ return me(Is, this, e[0]);
4118
4118
  }
4119
4119
  });
4120
- function V(e, t) {
4121
- return new ps({
4120
+ function B(e, t) {
4121
+ return new ms({
4122
4122
  type: "object",
4123
4123
  shape: e ?? {},
4124
4124
  ...v(t)
4125
4125
  });
4126
4126
  }
4127
- var ms = /*@__PURE__*/ w("ZodUnion", (e, t) => {
4128
- ur.init(e, t), I.init(e, t), e._zod.processJSONSchema = (t, n, r) => Ka(e, t, n, r), e.options = t.options;
4129
- });
4130
- function H(e, t) {
4127
+ function hs(e, t) {
4131
4128
  return new ms({
4129
+ type: "object",
4130
+ shape: e,
4131
+ catchall: fs(),
4132
+ ...v(t)
4133
+ });
4134
+ }
4135
+ var gs = /*@__PURE__*/ w("ZodUnion", (e, t) => {
4136
+ ur.init(e, t), F.init(e, t), e._zod.processJSONSchema = (t, n, r) => qa(e, t, n, r), e.options = t.options;
4137
+ });
4138
+ function V(e, t) {
4139
+ return new gs({
4132
4140
  type: "union",
4133
4141
  options: e,
4134
4142
  ...v(t)
4135
4143
  });
4136
4144
  }
4137
- var hs = /*@__PURE__*/ w("ZodIntersection", (e, t) => {
4138
- dr.init(e, t), I.init(e, t), e._zod.processJSONSchema = (t, n, r) => qa(e, t, n, r);
4145
+ var _s = /*@__PURE__*/ w("ZodIntersection", (e, t) => {
4146
+ dr.init(e, t), F.init(e, t), e._zod.processJSONSchema = (t, n, r) => Ja(e, t, n, r);
4139
4147
  });
4140
- function gs(e, t) {
4141
- return new hs({
4148
+ function vs(e, t) {
4149
+ return new _s({
4142
4150
  type: "intersection",
4143
4151
  left: e,
4144
4152
  right: t
4145
4153
  });
4146
4154
  }
4147
- var _s = /*@__PURE__*/ w("ZodTuple", (e, t) => {
4148
- ko(), mr.init(e, t), I.init(e, t), e._zod.processJSONSchema = (t, n, r) => Ja(e, t, n, r);
4155
+ var ys = /*@__PURE__*/ w("ZodTuple", (e, t) => {
4156
+ Ao(), mr.init(e, t), F.init(e, t), e._zod.processJSONSchema = (t, n, r) => Ya(e, t, n, r);
4149
4157
  }, {
4150
4158
  rest(e) {
4151
4159
  return this.clone({
@@ -4158,46 +4166,46 @@ var _s = /*@__PURE__*/ w("ZodTuple", (e, t) => {
4158
4166
  if (e.checks?.length) throw Error(".partial() cannot be used on tuple schemas containing refinements");
4159
4167
  return this.clone({
4160
4168
  ...e,
4161
- items: e.items.map((e) => new ws({
4169
+ items: e.items.map((e) => new Es({
4162
4170
  type: "optional",
4163
4171
  innerType: e
4164
4172
  }))
4165
4173
  });
4166
4174
  }
4167
4175
  });
4168
- function vs(e, t, n) {
4176
+ function bs(e, t, n) {
4169
4177
  let r = t instanceof k;
4170
- return new _s({
4178
+ return new ys({
4171
4179
  type: "tuple",
4172
4180
  items: e,
4173
4181
  rest: r ? t : null,
4174
4182
  ...v(r ? n : t)
4175
4183
  });
4176
4184
  }
4177
- var ys = /*@__PURE__*/ w("ZodRecord", (e, t) => {
4178
- ko(), vr.init(e, t), I.init(e, t), e._zod.processJSONSchema = (t, n, r) => Qa(e, t, n, r), e.keyType = t.keyType, e.valueType = t.valueType;
4185
+ var xs = /*@__PURE__*/ w("ZodRecord", (e, t) => {
4186
+ Ao(), vr.init(e, t), F.init(e, t), e._zod.processJSONSchema = (t, n, r) => $a(e, t, n, r), e.keyType = t.keyType, e.valueType = t.valueType;
4179
4187
  });
4180
- function U(e, t, n) {
4181
- return !t || !t._zod ? new ys({
4188
+ function H(e, t, n) {
4189
+ return !t || !t._zod ? new xs({
4182
4190
  type: "record",
4183
- keyType: Mo(),
4191
+ keyType: No(),
4184
4192
  valueType: e,
4185
4193
  ...v(t)
4186
- }) : new ys({
4194
+ }) : new xs({
4187
4195
  type: "record",
4188
4196
  keyType: e,
4189
4197
  valueType: t,
4190
4198
  ...v(n)
4191
4199
  });
4192
4200
  }
4193
- var bs = /*@__PURE__*/ w("ZodEnum", (e, t) => {
4194
- yr.init(e, t), I.init(e, t), e._zod.processJSONSchema = (t, n, r) => Ma(e, t, n, r), e.enum = t.entries, e.options = Object.values(t.entries);
4201
+ var Ss = /*@__PURE__*/ w("ZodEnum", (e, t) => {
4202
+ yr.init(e, t), F.init(e, t), e._zod.processJSONSchema = (t, n, r) => Na(e, t, n, r), e.enum = t.entries, e.options = Object.values(t.entries);
4195
4203
  let n = new Set(Object.keys(t.entries));
4196
4204
  e.extract = (e, r) => {
4197
4205
  let i = {};
4198
4206
  for (let r of e) if (n.has(r)) i[r] = t.entries[r];
4199
4207
  else throw Error(`Key ${r} not found in enum`);
4200
- return new bs({
4208
+ return new Ss({
4201
4209
  ...t,
4202
4210
  checks: [],
4203
4211
  ...v(r),
@@ -4207,7 +4215,7 @@ var bs = /*@__PURE__*/ w("ZodEnum", (e, t) => {
4207
4215
  let i = { ...t.entries };
4208
4216
  for (let t of e) if (n.has(t)) delete i[t];
4209
4217
  else throw Error(`Key ${t} not found in enum`);
4210
- return new bs({
4218
+ return new Ss({
4211
4219
  ...t,
4212
4220
  checks: [],
4213
4221
  ...v(r),
@@ -4215,28 +4223,28 @@ var bs = /*@__PURE__*/ w("ZodEnum", (e, t) => {
4215
4223
  });
4216
4224
  };
4217
4225
  });
4218
- function W(e, t) {
4219
- return new bs({
4226
+ function U(e, t) {
4227
+ return new Ss({
4220
4228
  type: "enum",
4221
4229
  entries: Array.isArray(e) ? Object.fromEntries(e.map((e) => [e, e])) : e,
4222
4230
  ...v(t)
4223
4231
  });
4224
4232
  }
4225
- var xs = /*@__PURE__*/ w("ZodLiteral", (e, t) => {
4226
- br.init(e, t), I.init(e, t), e._zod.processJSONSchema = (t, n, r) => Na(e, t, n, r), e.values = new Set(t.values), Object.defineProperty(e, "value", { get() {
4233
+ var Cs = /*@__PURE__*/ w("ZodLiteral", (e, t) => {
4234
+ br.init(e, t), F.init(e, t), e._zod.processJSONSchema = (t, n, r) => Pa(e, t, n, r), e.values = new Set(t.values), Object.defineProperty(e, "value", { get() {
4227
4235
  if (t.values.length > 1) throw Error("This schema contains multiple valid literal values. Use `.values` instead.");
4228
4236
  return t.values[0];
4229
4237
  } });
4230
4238
  });
4231
- function G(e, t) {
4232
- return new xs({
4239
+ function W(e, t) {
4240
+ return new Cs({
4233
4241
  type: "literal",
4234
4242
  values: Array.isArray(e) ? e : [e],
4235
4243
  ...v(t)
4236
4244
  });
4237
4245
  }
4238
- var Ss = /*@__PURE__*/ w("ZodTransform", (e, t) => {
4239
- ko(), xr.init(e, t), I.init(e, t), e._zod.processJSONSchema = (t, n, r) => Ba(e, t, n, r), e._zod.parse = (n, r) => {
4246
+ var ws = /*@__PURE__*/ w("ZodTransform", (e, t) => {
4247
+ Ao(), xr.init(e, t), F.init(e, t), e._zod.processJSONSchema = (t, n, r) => Va(e, t, n, r), e._zod.parse = (n, r) => {
4240
4248
  if (r.direction === "backward") throw new Le(e.constructor.name);
4241
4249
  n.addIssue = (r) => {
4242
4250
  if (typeof r == "string") n.issues.push(Ce(r, n.value, t));
@@ -4249,44 +4257,44 @@ var Ss = /*@__PURE__*/ w("ZodTransform", (e, t) => {
4249
4257
  return i instanceof Promise ? i.then((e) => (n.value = e, n)) : (n.value = i, n);
4250
4258
  };
4251
4259
  });
4252
- function Cs(e) {
4253
- return new Ss({
4260
+ function Ts(e) {
4261
+ return new ws({
4254
4262
  type: "transform",
4255
4263
  transform: e
4256
4264
  });
4257
4265
  }
4258
- var ws = /*@__PURE__*/ w("ZodOptional", (e, t) => {
4259
- Cr.init(e, t), I.init(e, t), e._zod.processJSONSchema = (t, n, r) => lo(e, t, n, r), e.unwrap = () => e._zod.def.innerType;
4266
+ var Es = /*@__PURE__*/ w("ZodOptional", (e, t) => {
4267
+ Cr.init(e, t), F.init(e, t), e._zod.processJSONSchema = (t, n, r) => uo(e, t, n, r), e.unwrap = () => e._zod.def.innerType;
4260
4268
  });
4261
- function Ts(e) {
4262
- return new ws({
4269
+ function Ds(e) {
4270
+ return new Es({
4263
4271
  type: "optional",
4264
4272
  innerType: e
4265
4273
  });
4266
4274
  }
4267
- var Es = /*@__PURE__*/ w("ZodExactOptional", (e, t) => {
4268
- wr.init(e, t), I.init(e, t), e._zod.processJSONSchema = (t, n, r) => lo(e, t, n, r), e.unwrap = () => e._zod.def.innerType;
4275
+ var Os = /*@__PURE__*/ w("ZodExactOptional", (e, t) => {
4276
+ wr.init(e, t), F.init(e, t), e._zod.processJSONSchema = (t, n, r) => uo(e, t, n, r), e.unwrap = () => e._zod.def.innerType;
4269
4277
  });
4270
- function Ds(e) {
4271
- return new Es({
4278
+ function ks(e) {
4279
+ return new Os({
4272
4280
  type: "optional",
4273
4281
  innerType: e
4274
4282
  });
4275
4283
  }
4276
- var Os = /*@__PURE__*/ w("ZodNullable", (e, t) => {
4277
- Tr.init(e, t), I.init(e, t), e._zod.processJSONSchema = (t, n, r) => $a(e, t, n, r), e.unwrap = () => e._zod.def.innerType;
4284
+ var As = /*@__PURE__*/ w("ZodNullable", (e, t) => {
4285
+ Tr.init(e, t), F.init(e, t), e._zod.processJSONSchema = (t, n, r) => eo(e, t, n, r), e.unwrap = () => e._zod.def.innerType;
4278
4286
  });
4279
- function ks(e) {
4280
- return new Os({
4287
+ function js(e) {
4288
+ return new As({
4281
4289
  type: "nullable",
4282
4290
  innerType: e
4283
4291
  });
4284
4292
  }
4285
- var As = /*@__PURE__*/ w("ZodDefault", (e, t) => {
4286
- Er.init(e, t), I.init(e, t), e._zod.processJSONSchema = (t, n, r) => ro(e, t, n, r), e.unwrap = () => e._zod.def.innerType, e.removeDefault = e.unwrap;
4293
+ var Ms = /*@__PURE__*/ w("ZodDefault", (e, t) => {
4294
+ Er.init(e, t), F.init(e, t), e._zod.processJSONSchema = (t, n, r) => io(e, t, n, r), e.unwrap = () => e._zod.def.innerType, e.removeDefault = e.unwrap;
4287
4295
  });
4288
- function js(e, t) {
4289
- return new As({
4296
+ function Ns(e, t) {
4297
+ return new Ms({
4290
4298
  type: "default",
4291
4299
  innerType: e,
4292
4300
  get defaultValue() {
@@ -4294,11 +4302,11 @@ function js(e, t) {
4294
4302
  }
4295
4303
  });
4296
4304
  }
4297
- var Ms = /*@__PURE__*/ w("ZodPrefault", (e, t) => {
4298
- Or.init(e, t), I.init(e, t), e._zod.processJSONSchema = (t, n, r) => io(e, t, n, r), e.unwrap = () => e._zod.def.innerType;
4305
+ var Ps = /*@__PURE__*/ w("ZodPrefault", (e, t) => {
4306
+ Or.init(e, t), F.init(e, t), e._zod.processJSONSchema = (t, n, r) => ao(e, t, n, r), e.unwrap = () => e._zod.def.innerType;
4299
4307
  });
4300
- function Ns(e, t) {
4301
- return new Ms({
4308
+ function Fs(e, t) {
4309
+ return new Ps({
4302
4310
  type: "prefault",
4303
4311
  innerType: e,
4304
4312
  get defaultValue() {
@@ -4306,174 +4314,174 @@ function Ns(e, t) {
4306
4314
  }
4307
4315
  });
4308
4316
  }
4309
- var Ps = /*@__PURE__*/ w("ZodNonOptional", (e, t) => {
4310
- kr.init(e, t), I.init(e, t), e._zod.processJSONSchema = (t, n, r) => eo(e, t, n, r), e.unwrap = () => e._zod.def.innerType;
4317
+ var Is = /*@__PURE__*/ w("ZodNonOptional", (e, t) => {
4318
+ kr.init(e, t), F.init(e, t), e._zod.processJSONSchema = (t, n, r) => to(e, t, n, r), e.unwrap = () => e._zod.def.innerType;
4311
4319
  });
4312
- function Fs(e, t) {
4313
- return new Ps({
4320
+ function Ls(e, t) {
4321
+ return new Is({
4314
4322
  type: "nonoptional",
4315
4323
  innerType: e,
4316
4324
  ...v(t)
4317
4325
  });
4318
4326
  }
4319
- var Is = /*@__PURE__*/ w("ZodCatch", (e, t) => {
4320
- Mr.init(e, t), I.init(e, t), e._zod.processJSONSchema = (t, n, r) => ao(e, t, n, r), e.unwrap = () => e._zod.def.innerType, e.removeCatch = e.unwrap;
4327
+ var Rs = /*@__PURE__*/ w("ZodCatch", (e, t) => {
4328
+ Mr.init(e, t), F.init(e, t), e._zod.processJSONSchema = (t, n, r) => oo(e, t, n, r), e.unwrap = () => e._zod.def.innerType, e.removeCatch = e.unwrap;
4321
4329
  });
4322
- function Ls(e, t) {
4323
- return new Is({
4330
+ function zs(e, t) {
4331
+ return new Rs({
4324
4332
  type: "catch",
4325
4333
  innerType: e,
4326
4334
  catchValue: typeof t == "function" ? t : Me(t)
4327
4335
  });
4328
4336
  }
4329
- var Rs = /*@__PURE__*/ w("ZodPipe", (e, t) => {
4330
- Nr.init(e, t), I.init(e, t), e._zod.processJSONSchema = (t, n, r) => oo(e, t, n, r), e.in = t.in, e.out = t.out;
4337
+ var Bs = /*@__PURE__*/ w("ZodPipe", (e, t) => {
4338
+ Nr.init(e, t), F.init(e, t), e._zod.processJSONSchema = (t, n, r) => so(e, t, n, r), e.in = t.in, e.out = t.out;
4331
4339
  });
4332
- function zs(e, t) {
4333
- return new Rs({
4340
+ function Vs(e, t) {
4341
+ return new Bs({
4334
4342
  type: "pipe",
4335
4343
  in: e,
4336
4344
  out: t
4337
4345
  });
4338
4346
  }
4339
- var Bs = /*@__PURE__*/ w("ZodReadonly", (e, t) => {
4340
- Fr.init(e, t), I.init(e, t), e._zod.processJSONSchema = (t, n, r) => so(e, t, n, r), e.unwrap = () => e._zod.def.innerType;
4347
+ var Hs = /*@__PURE__*/ w("ZodReadonly", (e, t) => {
4348
+ Fr.init(e, t), F.init(e, t), e._zod.processJSONSchema = (t, n, r) => co(e, t, n, r), e.unwrap = () => e._zod.def.innerType;
4341
4349
  });
4342
- function Vs(e) {
4343
- return new Bs({
4350
+ function Us(e) {
4351
+ return new Hs({
4344
4352
  type: "readonly",
4345
4353
  innerType: e
4346
4354
  });
4347
4355
  }
4348
- var Hs = /*@__PURE__*/ w("ZodLazy", (e, t) => {
4349
- Lr.init(e, t), I.init(e, t), e._zod.processJSONSchema = (t, n, r) => uo(e, t, n, r), e.unwrap = () => e._zod.def.getter();
4356
+ var Ws = /*@__PURE__*/ w("ZodLazy", (e, t) => {
4357
+ Lr.init(e, t), F.init(e, t), e._zod.processJSONSchema = (t, n, r) => fo(e, t, n, r), e.unwrap = () => e._zod.def.getter();
4350
4358
  });
4351
- function Us(e) {
4352
- return new Hs({
4359
+ function Gs(e) {
4360
+ return new Ws({
4353
4361
  type: "lazy",
4354
4362
  getter: e
4355
4363
  });
4356
4364
  }
4357
- var Ws = /*@__PURE__*/ w("ZodCustom", (e, t) => {
4358
- Rr.init(e, t), I.init(e, t), e._zod.processJSONSchema = (t, n, r) => Ra(e, t, n, r);
4365
+ var Ks = /*@__PURE__*/ w("ZodCustom", (e, t) => {
4366
+ Rr.init(e, t), F.init(e, t), e._zod.processJSONSchema = (t, n, r) => za(e, t, n, r);
4359
4367
  });
4360
- function Gs(e, t = {}) {
4361
- return /* @__PURE__ */ ra(Ws, e, t);
4368
+ function qs(e, t = {}) {
4369
+ return /* @__PURE__ */ ia(Ks, e, t);
4362
4370
  }
4363
- function Ks(e, t) {
4364
- return /* @__PURE__ */ ia(e, t);
4371
+ function Js(e, t) {
4372
+ return /* @__PURE__ */ aa(e, t);
4365
4373
  }
4366
- function qs(e) {
4367
- let t = Us(() => H([
4368
- Mo(e),
4374
+ function Ys(e) {
4375
+ let t = Gs(() => V([
4376
+ No(e),
4377
+ L(),
4369
4378
  R(),
4370
- z(),
4371
- ss(),
4372
- B(t),
4373
- U(Mo(), t)
4379
+ cs(),
4380
+ z(t),
4381
+ H(No(), t)
4374
4382
  ]));
4375
4383
  return t;
4376
4384
  }
4377
- function Js(e, t = 0) {
4385
+ function Xs(e, t = 0) {
4378
4386
  if (t > 64) throw TypeError("Value exceeds the maximum JSON depth.");
4379
- if (typeof e == "object" && e) for (let n of Object.values(e)) Js(n, t + 1);
4387
+ if (typeof e == "object" && e) for (let n of Object.values(e)) Xs(n, t + 1);
4380
4388
  }
4381
4389
  //#endregion
4382
4390
  //#region src/flow/common/changeSchema.ts
4383
- var K = Mo(), q = qs(), Ys = B(K), Xs = V({
4384
- description: K.optional(),
4385
- jsonSchema: q,
4386
- nullable: z(),
4387
- handle: K
4388
- }), J = Xs.extend({ value: q.optional() }), Zs = V({
4389
- collapsed: z().optional(),
4390
- group: K
4391
- }), Qs = V({
4392
- kind: G("node"),
4393
- nodeId: K,
4394
- output: K
4395
- }), $s = V({
4396
- kind: G("flow"),
4397
- input: K
4398
- }), ec = H([
4399
- Qs,
4400
- $s,
4401
- V({
4402
- kind: G("binding"),
4403
- bindingId: K
4391
+ var G = No(), K = Ys(), Zs = z(G), Qs = B({
4392
+ description: G.optional(),
4393
+ jsonSchema: K,
4394
+ nullable: R(),
4395
+ handle: G
4396
+ }), q = Qs.extend({ value: K.optional() }), $s = B({
4397
+ collapsed: R().optional(),
4398
+ group: G
4399
+ }), ec = B({
4400
+ kind: W("node"),
4401
+ nodeId: G,
4402
+ output: G
4403
+ }), tc = B({
4404
+ kind: W("flow"),
4405
+ input: G
4406
+ }), nc = V([
4407
+ ec,
4408
+ tc,
4409
+ B({
4410
+ kind: W("binding"),
4411
+ bindingId: G
4404
4412
  })
4405
- ]), tc = H([V({
4406
- kind: G("value"),
4407
- value: q
4408
- }), V({
4409
- kind: G("sources"),
4410
- sources: B(ec)
4411
- })]), nc = U(K, tc), rc = {
4412
- inputs: B(H([J, Zs])),
4413
- outputs: B(H([Xs, Zs]))
4414
- }, ic = V({
4415
- kind: G("connector"),
4416
- action: K,
4417
- connectionId: K.optional(),
4418
- connections: B(V({
4419
- connectionId: K,
4420
- alias: K.optional()
4413
+ ]), rc = V([B({
4414
+ kind: W("value"),
4415
+ value: K
4416
+ }), B({
4417
+ kind: W("sources"),
4418
+ sources: z(nc)
4419
+ })]), ic = H(G, rc), ac = {
4420
+ inputs: z(V([q, $s])),
4421
+ outputs: z(V([Qs, $s]))
4422
+ }, oc = B({
4423
+ kind: W("connector"),
4424
+ action: G,
4425
+ connectionId: G.optional(),
4426
+ connections: z(B({
4427
+ connectionId: G,
4428
+ alias: G.optional()
4421
4429
  }))
4422
- }), ac = V({
4423
- ...rc,
4424
- name: K,
4425
- moduleId: K,
4426
- capabilities: B(ic).optional()
4427
- }), oc = H([V({
4428
- kind: G("value"),
4429
- value: q
4430
- }), V({
4431
- kind: G("input"),
4432
- input: K
4433
- })]), sc = H([oc, V({ kind: G("model") })]), cc = V({
4434
- ...rc,
4435
- name: K,
4436
- executor: H([
4437
- V({
4438
- kind: G("connector"),
4439
- action: K,
4440
- connectionId: K.optional()
4430
+ }), sc = B({
4431
+ ...ac,
4432
+ name: G,
4433
+ moduleId: G,
4434
+ capabilities: z(oc).optional()
4435
+ }), cc = V([B({
4436
+ kind: W("value"),
4437
+ value: K
4438
+ }), B({
4439
+ kind: W("input"),
4440
+ input: G
4441
+ })]), lc = V([cc, B({ kind: W("model") })]), uc = B({
4442
+ ...ac,
4443
+ name: G,
4444
+ executor: V([
4445
+ B({
4446
+ kind: W("connector"),
4447
+ action: G,
4448
+ connectionId: G.optional()
4441
4449
  }),
4442
- V({
4443
- kind: G("llm"),
4444
- mode: W(["chat", "json"])
4450
+ B({
4451
+ kind: W("llm"),
4452
+ mode: U(["chat", "json"])
4445
4453
  }),
4446
- V({
4447
- kind: G("agent"),
4448
- code: z().optional(),
4449
- model: K,
4450
- prompt: oc,
4451
- system: K,
4452
- maxRounds: R(),
4453
- tools: B(V({
4454
- id: K,
4455
- name: K,
4456
- description: K,
4457
- action: K,
4458
- connectionId: K.optional(),
4459
- approval: z(),
4460
- inputs: B(J.extend({ source: sc }))
4454
+ B({
4455
+ kind: W("agent"),
4456
+ code: R().optional(),
4457
+ model: G,
4458
+ prompt: cc,
4459
+ system: G,
4460
+ maxRounds: L(),
4461
+ tools: z(B({
4462
+ id: G,
4463
+ name: G,
4464
+ description: G,
4465
+ action: G,
4466
+ connectionId: G.optional(),
4467
+ approval: R(),
4468
+ inputs: z(q.extend({ source: lc }))
4461
4469
  })),
4462
- notification: V({
4463
- taskId: K,
4464
- messageHandle: K,
4465
- inputs: U(K, oc)
4470
+ notification: B({
4471
+ taskId: G,
4472
+ messageHandle: G,
4473
+ inputs: H(G, cc)
4466
4474
  }).optional()
4467
4475
  })
4468
4476
  ])
4469
- }), lc = {
4470
- input: J,
4471
- cases: B(V({
4472
- output: K,
4473
- relation: W(["all", "any"]),
4474
- expressions: B(V({
4475
- input: K,
4476
- operator: W([
4477
+ }), dc = {
4478
+ input: q,
4479
+ cases: z(B({
4480
+ output: G,
4481
+ relation: U(["all", "any"]),
4482
+ expressions: z(B({
4483
+ input: G,
4484
+ operator: U([
4477
4485
  "!=",
4478
4486
  "<",
4479
4487
  "<=",
@@ -4495,63 +4503,58 @@ var K = Mo(), q = qs(), Ys = B(K), Xs = V({
4495
4503
  "notHasValue",
4496
4504
  "startsWith"
4497
4505
  ]),
4498
- value: q.optional()
4506
+ value: K.optional()
4499
4507
  }))
4500
4508
  })),
4501
- defaultOutput: K.optional()
4502
- }, uc = {
4503
- actions: H([vs([G("continue")]), vs([G("approve"), G("reject")])]),
4504
- prompt: K,
4505
- notification: V({
4506
- inputs: nc,
4507
- messageHandle: K,
4508
- taskId: K
4509
- }).optional()
4510
- }, dc = {
4511
- inputsDef: B(J),
4512
- options: V({
4513
- allowedMethods: Ys.optional(),
4514
- allowedOrigins: Ys.optional(),
4515
- noResponseBody: z().optional(),
4516
- responseData: K.optional(),
4517
- responseHeaders: U(K, K).optional(),
4518
- responseStatusCode: R().optional()
4509
+ defaultOutput: G.optional()
4510
+ }, fc = {
4511
+ actions: V([bs([W("continue")]), bs([W("approve"), W("reject")])]),
4512
+ prompt: G
4513
+ }, pc = {
4514
+ inputsDef: z(q),
4515
+ options: B({
4516
+ allowedMethods: Zs.optional(),
4517
+ allowedOrigins: Zs.optional(),
4518
+ noResponseBody: R().optional(),
4519
+ responseData: G.optional(),
4520
+ responseHeaders: H(G, G).optional(),
4521
+ responseStatusCode: L().optional()
4519
4522
  }).optional()
4520
- }, fc = B(H([V({
4521
- type: G("cron"),
4522
- expression: K,
4523
- timezone: K
4524
- }), V({
4525
- type: G("every"),
4526
- unit: W([
4523
+ }, mc = z(V([B({
4524
+ type: W("cron"),
4525
+ expression: G,
4526
+ timezone: G
4527
+ }), B({
4528
+ type: W("every"),
4529
+ unit: U([
4527
4530
  "day",
4528
4531
  "hour",
4529
4532
  "minute",
4530
4533
  "month",
4531
4534
  "week"
4532
4535
  ]),
4533
- value: R()
4534
- })])), pc = {
4535
- configSchema: q,
4536
- definitionVersion: R(),
4537
- description: K,
4538
- displayName: K,
4539
- key: K,
4540
- name: K,
4541
- payloadSchema: q,
4542
- provider: K
4543
- }, mc = V({
4544
- body: V({
4545
- allowArray: z(),
4546
- allowEmpty: z(),
4547
- formats: B(W([
4536
+ value: L()
4537
+ })])), hc = {
4538
+ configSchema: K,
4539
+ definitionVersion: L(),
4540
+ description: G,
4541
+ displayName: G,
4542
+ key: G,
4543
+ name: G,
4544
+ payloadSchema: K,
4545
+ provider: G
4546
+ }, gc = B({
4547
+ body: B({
4548
+ allowArray: R(),
4549
+ allowEmpty: R(),
4550
+ formats: z(U([
4548
4551
  "form",
4549
4552
  "json",
4550
4553
  "multipart",
4551
4554
  "text"
4552
4555
  ]))
4553
4556
  }),
4554
- methods: B(W([
4557
+ methods: z(U([
4555
4558
  "DELETE",
4556
4559
  "GET",
4557
4560
  "HEAD",
@@ -4559,300 +4562,321 @@ var K = Mo(), q = qs(), Ys = B(K), Xs = V({
4559
4562
  "POST",
4560
4563
  "PUT"
4561
4564
  ])),
4562
- successStatus: R()
4563
- }), hc = {
4564
- name: K,
4565
- description: K.optional(),
4566
- icon: K.optional()
4567
- }, gc = {
4568
- inputs: nc,
4569
- name: K.optional(),
4570
- description: K.optional(),
4571
- icon: K.optional(),
4572
- timeoutMs: R().optional()
4573
- }, _c = H([
4574
- V({
4575
- ...gc,
4576
- kind: G("condition"),
4577
- ...lc
4565
+ successStatus: L()
4566
+ }), _c = {
4567
+ name: G,
4568
+ description: G.optional(),
4569
+ icon: G.optional()
4570
+ }, J = {
4571
+ inputs: ic,
4572
+ name: G.optional(),
4573
+ description: G.optional(),
4574
+ icon: G.optional(),
4575
+ timeoutMs: L().optional()
4576
+ }, vc = V([
4577
+ B({
4578
+ ...J,
4579
+ kind: W("condition"),
4580
+ ...dc
4578
4581
  }),
4579
- V({
4580
- ...gc,
4581
- inputs: ls().transform(() => ({})).default({}),
4582
- kind: G("value"),
4583
- values: B(J)
4582
+ B({
4583
+ ...J,
4584
+ inputs: us().transform(() => ({})).default({}),
4585
+ kind: W("value"),
4586
+ values: z(q)
4584
4587
  }),
4585
- V({
4586
- ...gc,
4587
- kind: G("subflow"),
4588
- subflowId: K
4588
+ B({
4589
+ ...J,
4590
+ kind: W("subflow"),
4591
+ subflowId: G
4589
4592
  }),
4590
- V({
4591
- ...gc,
4592
- kind: G("task"),
4593
- task: ac,
4594
- additionalInputs: B(J).optional()
4593
+ B({
4594
+ ...J,
4595
+ kind: W("task"),
4596
+ task: sc,
4597
+ additionalInputs: z(q).optional()
4595
4598
  }),
4596
- V({
4597
- ...gc,
4598
- kind: G("task"),
4599
- taskId: K,
4600
- additionalInputs: B(J).optional()
4599
+ B({
4600
+ ...J,
4601
+ kind: W("task"),
4602
+ taskId: G,
4603
+ additionalInputs: z(q).optional()
4601
4604
  }),
4602
- V({
4603
- ...gc,
4604
- kind: G("wait"),
4605
- input: J,
4606
- ...uc
4605
+ hs({
4606
+ ...J,
4607
+ kind: W("wait"),
4608
+ input: q,
4609
+ ...fc
4607
4610
  }).omit({ timeoutMs: !0 }),
4608
- V({
4609
- ...hc,
4610
- kind: G("manual")
4611
+ B({
4612
+ ..._c,
4613
+ kind: W("manual")
4611
4614
  }),
4612
- V({
4613
- ...hc,
4614
- kind: G("webhook"),
4615
- ...dc
4615
+ B({
4616
+ ..._c,
4617
+ kind: W("webhook"),
4618
+ ...pc
4616
4619
  }),
4617
- V({
4618
- ...hc,
4619
- kind: G("cron"),
4620
- cronTimes: fc
4620
+ B({
4621
+ ..._c,
4622
+ kind: W("cron"),
4623
+ cronTimes: mc
4621
4624
  }),
4622
- V({
4623
- ...hc,
4624
- kind: G("poll"),
4625
- bindingId: K,
4626
- config: U(K, q),
4627
- definition: V({
4628
- ...pc,
4629
- type: G("poll")
4625
+ B({
4626
+ ..._c,
4627
+ kind: W("poll"),
4628
+ bindingId: G,
4629
+ config: H(G, K),
4630
+ definition: B({
4631
+ ...hc,
4632
+ type: W("poll")
4630
4633
  }),
4631
- pollTimes: fc
4634
+ pollTimes: mc
4632
4635
  }),
4633
- V({
4634
- ...hc,
4635
- kind: G("integration"),
4636
- bindingId: K,
4637
- config: U(K, q),
4638
- definition: V({
4639
- ...pc,
4640
- type: G("integration"),
4641
- endpoint: mc
4636
+ B({
4637
+ ..._c,
4638
+ kind: W("integration"),
4639
+ bindingId: G,
4640
+ config: H(G, K),
4641
+ definition: B({
4642
+ ...hc,
4643
+ type: W("integration"),
4644
+ endpoint: gc
4642
4645
  })
4643
4646
  })
4644
- ]), vc = H([V({ kind: G("flow") }), V({
4645
- kind: G("subflow"),
4646
- id: K
4647
- })]), yc = V({
4648
- source: K,
4649
- target: K,
4650
- sourceHandle: K.optional()
4647
+ ]), yc = V([B({ kind: W("flow") }), B({
4648
+ kind: W("subflow"),
4649
+ id: G
4650
+ })]), bc = B({
4651
+ source: G,
4652
+ target: G,
4653
+ sourceHandle: G.optional()
4651
4654
  }), Y = {
4652
- nodeId: K,
4653
- target: vc
4654
- }, bc = V({
4655
- name: K,
4656
- inputs: B(J),
4657
- outputs: B(Xs.extend({ sources: B(H([Qs, $s])) }))
4658
- }), xc = V({
4659
- nodes: U(K, _c),
4660
- edges: B(yc).default([])
4661
- }), Sc = V({
4662
- kind: W(["connection", "variable"]),
4663
- target: K
4664
- }), Cc = V({
4665
- name: K,
4666
- imports: Ys,
4667
- source: K
4668
- }), wc = V({
4669
- bindings: U(K, Sc),
4670
- graph: xc,
4671
- subflows: U(K, bc.extend({ graph: xc })),
4672
- tasks: U(K, cc)
4655
+ nodeId: G,
4656
+ target: yc
4657
+ }, xc = B({
4658
+ name: G,
4659
+ inputs: z(q),
4660
+ outputs: z(Qs.extend({ sources: z(V([ec, tc])) }))
4661
+ }), Sc = B({
4662
+ nodes: H(G, vc),
4663
+ edges: z(bc).default([])
4664
+ }), Cc = B({
4665
+ kind: U(["connection", "variable"]),
4666
+ target: G
4667
+ }), wc = B({
4668
+ name: G,
4669
+ imports: Zs,
4670
+ source: G
4671
+ }), Tc = B({
4672
+ bindings: H(G, Cc),
4673
+ graph: Sc,
4674
+ subflows: H(G, xc.extend({ graph: Sc })),
4675
+ tasks: H(G, uc)
4673
4676
  });
4674
- V({
4675
- modelVersion: G(1),
4676
- document: wc,
4677
- modules: U(K, Cc)
4677
+ B({
4678
+ modelVersion: W(1),
4679
+ document: Tc,
4680
+ modules: H(G, wc)
4678
4681
  }).extend({
4679
- kind: G("open-flow-flow-revision"),
4680
- version: G(1)
4682
+ kind: W("open-flow-flow-revision"),
4683
+ version: W(1)
4681
4684
  });
4682
- var Tc = {
4685
+ var Ec = {
4683
4686
  "binding.create": {
4684
- bindingId: K,
4685
- binding: Sc
4687
+ bindingId: G,
4688
+ binding: Cc
4686
4689
  },
4687
- "binding.delete": { bindingId: K },
4690
+ "binding.delete": { bindingId: G },
4688
4691
  "binding.target.set": {
4689
- bindingId: K,
4690
- before: K,
4691
- value: K
4692
+ bindingId: G,
4693
+ before: G,
4694
+ value: G
4692
4695
  },
4693
4696
  "graph.edge.connect": {
4694
- target: vc,
4695
- edge: yc
4697
+ target: yc,
4698
+ edge: bc
4696
4699
  },
4697
4700
  "graph.edge.disconnect": {
4698
- target: vc,
4699
- edge: yc
4701
+ target: yc,
4702
+ edge: bc
4700
4703
  },
4701
4704
  "graph.node.create": {
4702
4705
  ...Y,
4703
- node: _c
4706
+ node: vc
4704
4707
  },
4705
4708
  "graph.node.delete": Y,
4706
- "graph.node.field.set": H([V({
4709
+ "graph.node.field.set": V([B({
4707
4710
  ...Y,
4708
- kind: G("graph.node.field.set"),
4709
- field: W([
4711
+ kind: W("graph.node.field.set"),
4712
+ field: U([
4710
4713
  "description",
4711
4714
  "icon",
4712
4715
  "name"
4713
4716
  ]),
4714
- before: K.optional(),
4715
- value: K.optional()
4716
- }), V({
4717
+ before: G.optional(),
4718
+ value: G.optional()
4719
+ }), B({
4717
4720
  ...Y,
4718
- kind: G("graph.node.field.set"),
4719
- field: G("timeoutMs"),
4720
- before: R().optional(),
4721
- value: R().optional()
4721
+ kind: W("graph.node.field.set"),
4722
+ field: W("timeoutMs"),
4723
+ before: L().optional(),
4724
+ value: L().optional()
4722
4725
  })]),
4723
4726
  "graph.node.input.set": {
4724
4727
  ...Y,
4725
- handle: K,
4726
- before: tc.optional(),
4727
- value: tc.optional()
4728
+ handle: G,
4729
+ before: rc.optional(),
4730
+ value: rc.optional()
4728
4731
  },
4729
4732
  "graph.node.additional-inputs.set": {
4730
4733
  ...Y,
4731
- before: B(J).optional(),
4732
- value: B(J).optional()
4734
+ before: z(q).optional(),
4735
+ value: z(q).optional()
4733
4736
  },
4734
4737
  "graph.node.condition.set": {
4735
4738
  ...Y,
4736
- before: V(lc),
4737
- value: V(lc)
4739
+ before: B(dc),
4740
+ value: B(dc)
4738
4741
  },
4739
4742
  "graph.node.values.set": {
4740
4743
  ...Y,
4741
- before: B(J),
4742
- value: B(J)
4744
+ before: z(q),
4745
+ value: z(q)
4743
4746
  },
4744
4747
  "graph.node.wait.set": {
4745
4748
  ...Y,
4746
- target: V({ kind: G("flow") }),
4747
- before: V(uc),
4748
- value: V(uc)
4749
+ target: B({ kind: W("flow") }),
4750
+ before: B(fc),
4751
+ value: B(fc)
4749
4752
  },
4750
4753
  "graph.node.webhook.set": {
4751
4754
  ...Y,
4752
- target: V({ kind: G("flow") }),
4753
- before: V(dc),
4754
- value: V(dc)
4755
+ target: B({ kind: W("flow") }),
4756
+ before: B(pc),
4757
+ value: B(pc)
4755
4758
  },
4756
4759
  "graph.node.task.ports.set": {
4757
4760
  ...Y,
4758
- before: V(rc),
4759
- value: V(rc)
4761
+ before: B(ac),
4762
+ value: B(ac)
4760
4763
  },
4761
4764
  "graph.node.task.name.set": {
4762
4765
  ...Y,
4763
- before: K,
4764
- value: K
4766
+ before: G,
4767
+ value: G
4765
4768
  },
4766
4769
  "graph.node.task.capabilities.set": {
4767
4770
  ...Y,
4768
- before: B(ic).optional(),
4769
- value: B(ic).optional()
4771
+ before: z(oc).optional(),
4772
+ value: z(oc).optional()
4770
4773
  },
4771
4774
  "graph.trigger.config.set": {
4772
- nodeId: K,
4773
- name: K,
4774
- before: q.optional(),
4775
- value: q.optional()
4775
+ nodeId: G,
4776
+ name: G,
4777
+ before: K.optional(),
4778
+ value: K.optional()
4776
4779
  },
4777
4780
  "graph.trigger.schedule.set": {
4778
- nodeId: K,
4779
- before: fc,
4780
- value: fc
4781
+ nodeId: G,
4782
+ before: mc,
4783
+ value: mc
4781
4784
  },
4782
4785
  "module.create": {
4783
- moduleId: K,
4784
- module: Cc
4786
+ moduleId: G,
4787
+ module: wc
4785
4788
  },
4786
- "module.delete": { moduleId: K },
4789
+ "module.delete": { moduleId: G },
4787
4790
  "module.rename": {
4788
- moduleId: K,
4789
- before: K,
4790
- name: K
4791
+ moduleId: G,
4792
+ before: G,
4793
+ name: G
4791
4794
  },
4792
4795
  "module.source.replace": {
4793
- moduleId: K,
4794
- beforeImports: Ys,
4795
- beforeSource: K,
4796
- imports: Ys,
4797
- source: K
4796
+ moduleId: G,
4797
+ beforeImports: Zs,
4798
+ beforeSource: G,
4799
+ imports: Zs,
4800
+ source: G
4798
4801
  },
4799
4802
  "subflow.create": {
4800
- subflowId: K,
4801
- subflow: bc.extend({ graph: xc })
4803
+ subflowId: G,
4804
+ subflow: xc.extend({ graph: Sc })
4802
4805
  },
4803
4806
  "subflow.definition.set": {
4804
- subflowId: K,
4805
- before: bc,
4806
- definition: bc
4807
+ subflowId: G,
4808
+ before: xc,
4809
+ definition: xc
4807
4810
  },
4808
- "subflow.delete": { subflowId: K },
4811
+ "subflow.delete": { subflowId: G },
4809
4812
  "task.create": {
4810
- taskId: K,
4811
- task: cc
4813
+ taskId: G,
4814
+ task: uc
4812
4815
  },
4813
- "task.delete": { taskId: K },
4816
+ "task.delete": { taskId: G },
4814
4817
  "task.connector.connection.set": {
4815
- taskId: K,
4816
- before: K.optional(),
4817
- value: K.optional()
4818
+ taskId: G,
4819
+ before: G.optional(),
4820
+ value: G.optional()
4818
4821
  },
4819
4822
  "task.agent.set": {
4820
- taskId: K,
4821
- before: cc,
4822
- value: cc
4823
+ taskId: G,
4824
+ before: uc,
4825
+ value: uc
4823
4826
  },
4824
4827
  "task.llm.mode.set": {
4825
- taskId: K,
4826
- before: W(["chat", "json"]),
4827
- value: W(["chat", "json"])
4828
+ taskId: G,
4829
+ before: U(["chat", "json"]),
4830
+ value: U(["chat", "json"])
4828
4831
  },
4829
4832
  "task.name.set": {
4830
- taskId: K,
4831
- before: K,
4832
- value: K
4833
+ taskId: G,
4834
+ before: G,
4835
+ value: G
4833
4836
  }
4834
- }, Ec = new Map(Object.entries(Tc).map(([e, t]) => [e, t instanceof I ? t : V({
4835
- kind: G(e),
4837
+ }, Dc = new Map(Object.entries(Ec).map(([e, t]) => [e, t instanceof F ? t : B({
4838
+ kind: W(e),
4836
4839
  ...t
4837
- })])), Dc = B(H([...Ec.values()])).min(1);
4838
- function Oc(e) {
4839
- return Js(e), B(ls()).min(1).parse(e).map((e, t) => {
4840
- let { kind: n } = V({ kind: K }).parse(e), r = Ec.get(n);
4840
+ })])), Oc = z(V([...Dc.values()])).min(1);
4841
+ function kc(e) {
4842
+ return Xs(e), z(us()).min(1).parse(e).map((e, t) => {
4843
+ let { kind: n } = B({ kind: G }).parse(e), r = Dc.get(n);
4841
4844
  if (r == null) throw TypeError(`operations[${t}]: Unknown operation ${JSON.stringify(n)}.`);
4842
4845
  let i = r.safeParse(e);
4843
4846
  if (!i.success) throw TypeError(`operations[${t}]: ${i.error.issues.map((e) => `${e.path.join(".")}: ${e.message}`).join("; ")}`);
4844
4847
  return i.data;
4845
4848
  });
4846
4849
  }
4847
- function kc(e) {
4848
- let t = e == null ? Dc : Ec.get(e);
4850
+ function Ac(e) {
4851
+ let t = e == null ? Oc : Dc.get(e);
4849
4852
  if (t == null) throw TypeError(`Unknown operation ${JSON.stringify(e)}.`);
4850
- return po(t, { io: "input" });
4853
+ return mo(t, { io: "input" });
4851
4854
  }
4852
4855
  //#endregion
4853
4856
  //#region src/flow/common/change.ts
4854
- var Ac = 80;
4855
- function jc(e) {
4857
+ var jc = /* @__PURE__ */ new Set([
4858
+ "const",
4859
+ "enum",
4860
+ "exclusiveMaximum",
4861
+ "exclusiveMinimum",
4862
+ "maximum",
4863
+ "maxItems",
4864
+ "maxLength",
4865
+ "maxProperties",
4866
+ "minimum",
4867
+ "minItems",
4868
+ "minLength",
4869
+ "minProperties",
4870
+ "multipleOf",
4871
+ "pattern",
4872
+ "required",
4873
+ "type"
4874
+ ]);
4875
+ function Mc(e) {
4876
+ return jc.has(e);
4877
+ }
4878
+ var Nc = 80;
4879
+ function Pc(e) {
4856
4880
  let t = e.trim();
4857
4881
  if (t.length == 0) return "empty";
4858
4882
  if (t.length > 80) return "tooLong";
@@ -4862,13 +4886,13 @@ function jc(e) {
4862
4886
  }
4863
4887
  if (!/^[\p{L}\p{N}](?:[\p{L}\p{N} _-]*[\p{L}\p{N}])?$/u.test(t)) return "specialCharacter";
4864
4888
  }
4865
- function Mc(e) {
4889
+ function Fc(e) {
4866
4890
  return e.length <= 256 && /^[A-Za-z_][A-Za-z0-9_]*$/.test(e) && e.slice(0, 3).toUpperCase() != "OO_";
4867
4891
  }
4868
- function Nc(e) {
4892
+ function Ic(e) {
4869
4893
  return Object.fromEntries(e.flatMap((e) => "handle" in e ? [[e.handle, e]] : []));
4870
4894
  }
4871
- function Pc(e) {
4895
+ function Lc(e) {
4872
4896
  if (!Array.isArray(e)) throw TypeError("Connector capabilities must be an array.");
4873
4897
  let t = /* @__PURE__ */ new Set();
4874
4898
  return e.map((e) => {
@@ -4907,24 +4931,24 @@ function Pc(e) {
4907
4931
  function X(e) {
4908
4932
  return e.trim().normalize("NFC");
4909
4933
  }
4910
- function Fc(e, t) {
4934
+ function Rc(e, t) {
4911
4935
  let n = X(e), r = new Set([...t].map(X));
4912
4936
  if (!r.has(n)) return n;
4913
4937
  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;
4914
4938
  for (; r.has(`${s} (${c})`);) c += 1;
4915
4939
  return `${s} (${c})`;
4916
4940
  }
4917
- function Ic(e, t, n) {
4941
+ function zc(e, t, n) {
4918
4942
  let r = X(n);
4919
4943
  return r.length == 0 ? "empty" : Object.entries(e.nodes).some(([e, n]) => e != t && n.name != null && X(n.name) == r) ? "duplicate" : void 0;
4920
4944
  }
4921
- var Lc = class extends Error {
4945
+ var Bc = class extends Error {
4922
4946
  constructor(e) {
4923
4947
  super(e), this.name = "FlowChangeError";
4924
4948
  }
4925
4949
  };
4926
4950
  function Z(e) {
4927
- throw new Lc(e);
4951
+ throw new Bc(e);
4928
4952
  }
4929
4953
  function Q(e, t) {
4930
4954
  if (t.kind == "flow") return e.graph;
@@ -4948,7 +4972,7 @@ function $(e, t, n) {
4948
4972
  }
4949
4973
  };
4950
4974
  }
4951
- function Rc(e, t) {
4975
+ function Vc(e, t) {
4952
4976
  if (!("inputs" in e)) return e;
4953
4977
  let n = { ...e.inputs };
4954
4978
  for (let [e, r] of Object.entries(n)) {
@@ -4964,7 +4988,7 @@ function Rc(e, t) {
4964
4988
  inputs: n
4965
4989
  };
4966
4990
  }
4967
- function zc(e, n) {
4991
+ function Hc(e, n) {
4968
4992
  let r = { ...e.document }, i = { ...e.modules };
4969
4993
  for (let e of n) switch (e.kind) {
4970
4994
  case "binding.create":
@@ -5045,8 +5069,8 @@ function zc(e, n) {
5045
5069
  }
5046
5070
  case "graph.node.create": {
5047
5071
  let t = Q(r, e.target);
5048
- t.nodes[e.nodeId] != null && Z("A Node with this ID already exists in the target graph."), e.target.kind == "subflow" && !("inputs" in e.node) && Z("Trigger Nodes cannot be created inside a Subflow."), e.node.kind == "manual" && Object.values(t.nodes).some((e) => e.kind == "manual") && Z("A graph can contain only one manual Trigger."), e.node.kind == "task" && e.node.task?.capabilities !== void 0 && Pc(e.node.task.capabilities), e.node.name ?? Z("A Node name cannot be empty.");
5049
- let n = X(e.node.name), i = Ic(t, e.nodeId, n);
5072
+ t.nodes[e.nodeId] != null && Z("A Node with this ID already exists in the target graph."), e.target.kind == "subflow" && !("inputs" in e.node) && Z("Trigger Nodes cannot be created inside a Subflow."), e.node.kind == "manual" && Object.values(t.nodes).some((e) => e.kind == "manual") && Z("A graph can contain only one manual Trigger."), e.node.kind == "task" && e.node.task?.capabilities !== void 0 && Lc(e.node.task.capabilities), e.node.name ?? Z("A Node name cannot be empty.");
5073
+ let n = X(e.node.name), i = zc(t, e.nodeId, n);
5050
5074
  i == "empty" && Z("A Node name cannot be empty."), i == "duplicate" && Z("A Node with this name already exists in the target graph.");
5051
5075
  let a = n == e.node.name ? e.node : {
5052
5076
  ...e.node,
@@ -5064,7 +5088,7 @@ function zc(e, n) {
5064
5088
  case "graph.node.delete": {
5065
5089
  let t = Q(r, e.target);
5066
5090
  t.nodes[e.nodeId] ?? Z("The Node does not exist in the target graph.");
5067
- let n = /* @__PURE__ */ new Set([e.nodeId]), i = Object.fromEntries(Object.entries(t.nodes).flatMap(([e, t]) => n.has(e) ? [] : [[e, Rc(t, n)]]));
5091
+ let n = /* @__PURE__ */ new Set([e.nodeId]), i = Object.fromEntries(Object.entries(t.nodes).flatMap(([e, t]) => n.has(e) ? [] : [[e, Vc(t, n)]]));
5068
5092
  if (Object.assign(r, $(r, e.target, {
5069
5093
  ...t,
5070
5094
  edges: t.edges.filter((e) => !n.has(e.source) && !n.has(e.target)),
@@ -5090,7 +5114,7 @@ function zc(e, n) {
5090
5114
  let a = { ...i };
5091
5115
  if (e.field == "name") {
5092
5116
  typeof e.value != "string" && Z("A Node name cannot be empty.");
5093
- let t = X(e.value), r = Ic(n, e.nodeId, t);
5117
+ let t = X(e.value), r = zc(n, e.nodeId, t);
5094
5118
  r == "empty" && Z("A Node name cannot be empty."), r == "duplicate" && Z("A Node with this name already exists in the target graph."), Object.assign(a, { name: t });
5095
5119
  } else e.value == null ? Reflect.deleteProperty(a, e.field) : Object.assign(a, { [e.field]: e.value });
5096
5120
  Object.assign(r, $(r, e.target, {
@@ -5122,7 +5146,7 @@ function zc(e, n) {
5122
5146
  let n = Q(r, e.target), i = n.nodes[e.nodeId];
5123
5147
  (i?.kind != "task" || i.task == null) && Z("The inline Task Node does not exist."), t(i.task.capabilities, e.before) || Z("The inline Task capabilities changed before this operation was applied.");
5124
5148
  let a = { ...i.task };
5125
- e.value === void 0 ? delete a.capabilities : a.capabilities = Pc(e.value), Object.assign(r, $(r, e.target, {
5149
+ e.value === void 0 ? delete a.capabilities : a.capabilities = Lc(e.value), Object.assign(r, $(r, e.target, {
5126
5150
  ...n,
5127
5151
  nodes: {
5128
5152
  ...n.nodes,
@@ -5194,13 +5218,9 @@ function zc(e, n) {
5194
5218
  let n = r.graph, i = n.nodes[e.nodeId];
5195
5219
  (i?.kind != "wait" || !t({
5196
5220
  actions: i.actions,
5197
- ...i.notification == null ? {} : { notification: i.notification },
5198
5221
  prompt: i.prompt
5199
5222
  }, e.before)) && Z("The Wait Node changed before this operation was applied.");
5200
- let { notification: a, ...o } = i, s = e.value.notification == null ? {
5201
- ...o,
5202
- ...e.value
5203
- } : {
5223
+ let a = {
5204
5224
  ...i,
5205
5225
  ...e.value
5206
5226
  };
@@ -5208,7 +5228,7 @@ function zc(e, n) {
5208
5228
  ...n,
5209
5229
  nodes: {
5210
5230
  ...n.nodes,
5211
- [e.nodeId]: s
5231
+ [e.nodeId]: a
5212
5232
  }
5213
5233
  };
5214
5234
  break;
@@ -5292,7 +5312,7 @@ function zc(e, n) {
5292
5312
  }
5293
5313
  case "subflow.create":
5294
5314
  r.subflows[e.subflowId] != null && Z("A Subflow with this ID already exists.");
5295
- for (let t of Object.values(e.subflow.graph.nodes)) t.kind == "task" && t.task?.capabilities !== void 0 && Pc(t.task.capabilities);
5315
+ for (let t of Object.values(e.subflow.graph.nodes)) t.kind == "task" && t.task?.capabilities !== void 0 && Lc(t.task.capabilities);
5296
5316
  r.subflows = {
5297
5317
  ...r.subflows,
5298
5318
  [e.subflowId]: e.subflow
@@ -5388,4 +5408,4 @@ function zc(e, n) {
5388
5408
  };
5389
5409
  }
5390
5410
  //#endregion
5391
- export { Lc as FlowChangeError, zc as applyFlowChanges, kc as changeOperationsSchema, Oc as decodeChangeOperations, Pc as decodeConnectorCapabilities, Fc as nextNodeName, Ic as nodeNameIssue, X as normalizeNodeName, Nc as portsByHandle, jc as resourceNameIssue, Ac as resourceNameMaxLength, Mc as validVariableName };
5411
+ export { Bc as FlowChangeError, Hc as applyFlowChanges, Ac as changeOperationsSchema, kc as decodeChangeOperations, Lc as decodeConnectorCapabilities, Mc as isSchemaKeyword, Rc as nextNodeName, zc as nodeNameIssue, X as normalizeNodeName, Ic as portsByHandle, Pc as resourceNameIssue, Nc as resourceNameMaxLength, Fc as validVariableName };