@settlemint/sdk-viem 2.4.1-prb0c72988 → 2.4.1-prb593b885

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.
@@ -15,7 +15,9 @@ var __export = (target, all) => {
15
15
  };
16
16
 
17
17
  //#endregion
18
- //#region ../../node_modules/zod/dist/esm/v4/core/core.js
18
+ //#region ../../node_modules/zod/v4/core/core.js
19
+ /** A special constant with type `never` */
20
+ const NEVER = Object.freeze({ status: "aborted" });
19
21
  function $constructor(name, initializer$2, params) {
20
22
  function init(inst, def) {
21
23
  var _a;
@@ -66,7 +68,7 @@ function config(newConfig) {
66
68
  }
67
69
 
68
70
  //#endregion
69
- //#region ../../node_modules/zod/dist/esm/v4/core/util.js
71
+ //#region ../../node_modules/zod/v4/core/util.js
70
72
  var util_exports = {};
71
73
  __export(util_exports, {
72
74
  BIGINT_FORMAT_RANGES: () => BIGINT_FORMAT_RANGES,
@@ -81,6 +83,7 @@ __export(util_exports, {
81
83
  assertNotEqual: () => assertNotEqual,
82
84
  assignProp: () => assignProp,
83
85
  cached: () => cached,
86
+ captureStackTrace: () => captureStackTrace,
84
87
  cleanEnum: () => cleanEnum,
85
88
  cleanRegex: () => cleanRegex,
86
89
  clone: () => clone,
@@ -219,10 +222,14 @@ function randomString(length = 10) {
219
222
  function esc(str) {
220
223
  return JSON.stringify(str);
221
224
  }
225
+ const captureStackTrace = Error.captureStackTrace ? Error.captureStackTrace : (..._args) => {};
222
226
  function isObject(data) {
223
227
  return typeof data === "object" && data !== null && !Array.isArray(data);
224
228
  }
225
229
  const allowsEval = cached(() => {
230
+ if (typeof navigator !== "undefined" && navigator?.userAgent?.includes("Cloudflare")) {
231
+ return false;
232
+ }
226
233
  try {
227
234
  const F = Function;
228
235
  new F("");
@@ -231,9 +238,6 @@ const allowsEval = cached(() => {
231
238
  return false;
232
239
  }
233
240
  });
234
- function _isObject(o) {
235
- return Object.prototype.toString.call(o) === "[object Object]";
236
- }
237
241
  function isPlainObject(o) {
238
242
  if (isObject(o) === false) return false;
239
243
  const ctor = o.constructor;
@@ -413,6 +417,9 @@ function omit(schema, mask) {
413
417
  });
414
418
  }
415
419
  function extend(schema, shape) {
420
+ if (!isPlainObject(shape)) {
421
+ throw new Error("Invalid input to extend: expected a plain object");
422
+ }
416
423
  const def = {
417
424
  ...schema._zod.def,
418
425
  get shape() {
@@ -500,7 +507,7 @@ function required(Class$1, schema, mask) {
500
507
  }
501
508
  function aborted(x, startIndex = 0) {
502
509
  for (let i = startIndex; i < x.issues.length; i++) {
503
- if (x.issues[i].continue !== true) return true;
510
+ if (x.issues[i]?.continue !== true) return true;
504
511
  }
505
512
  return false;
506
513
  }
@@ -564,7 +571,7 @@ var Class = class {
564
571
  };
565
572
 
566
573
  //#endregion
567
- //#region ../../node_modules/zod/dist/esm/v4/core/errors.js
574
+ //#region ../../node_modules/zod/v4/core/errors.js
568
575
  const initializer$1 = (inst, def) => {
569
576
  inst.name = "$ZodError";
570
577
  Object.defineProperty(inst, "_zod", {
@@ -581,13 +588,17 @@ const initializer$1 = (inst, def) => {
581
588
  },
582
589
  enumerable: true
583
590
  });
591
+ Object.defineProperty(inst, "toString", {
592
+ value: () => inst.message,
593
+ enumerable: false
594
+ });
584
595
  };
585
596
  const $ZodError = $constructor("$ZodError", initializer$1);
586
597
  const $ZodRealError = $constructor("$ZodError", initializer$1, { Parent: Error });
587
- function flattenError(error$37, mapper = (issue$1) => issue$1.message) {
598
+ function flattenError(error$39, mapper = (issue$1) => issue$1.message) {
588
599
  const fieldErrors = {};
589
600
  const formErrors = [];
590
- for (const sub of error$37.issues) {
601
+ for (const sub of error$39.issues) {
591
602
  if (sub.path.length > 0) {
592
603
  fieldErrors[sub.path[0]] = fieldErrors[sub.path[0]] || [];
593
604
  fieldErrors[sub.path[0]].push(mapper(sub));
@@ -600,13 +611,13 @@ function flattenError(error$37, mapper = (issue$1) => issue$1.message) {
600
611
  fieldErrors
601
612
  };
602
613
  }
603
- function formatError(error$37, _mapper) {
614
+ function formatError(error$39, _mapper) {
604
615
  const mapper = _mapper || function(issue$1) {
605
616
  return issue$1.message;
606
617
  };
607
618
  const fieldErrors = { _errors: [] };
608
- const processError = (error$38) => {
609
- for (const issue$1 of error$38.issues) {
619
+ const processError = (error$40) => {
620
+ for (const issue$1 of error$40.issues) {
610
621
  if (issue$1.code === "invalid_union" && issue$1.errors.length) {
611
622
  issue$1.errors.map((issues) => processError({ issues }));
612
623
  } else if (issue$1.code === "invalid_key") {
@@ -633,17 +644,17 @@ function formatError(error$37, _mapper) {
633
644
  }
634
645
  }
635
646
  };
636
- processError(error$37);
647
+ processError(error$39);
637
648
  return fieldErrors;
638
649
  }
639
- function treeifyError(error$37, _mapper) {
650
+ function treeifyError(error$39, _mapper) {
640
651
  const mapper = _mapper || function(issue$1) {
641
652
  return issue$1.message;
642
653
  };
643
654
  const result = { errors: [] };
644
- const processError = (error$38, path = []) => {
655
+ const processError = (error$40, path = []) => {
645
656
  var _a, _b;
646
- for (const issue$1 of error$38.issues) {
657
+ for (const issue$1 of error$40.issues) {
647
658
  if (issue$1.code === "invalid_union" && issue$1.errors.length) {
648
659
  issue$1.errors.map((issues) => processError({ issues }, issue$1.path));
649
660
  } else if (issue$1.code === "invalid_key") {
@@ -678,7 +689,7 @@ function treeifyError(error$37, _mapper) {
678
689
  }
679
690
  }
680
691
  };
681
- processError(error$37);
692
+ processError(error$39);
682
693
  return result;
683
694
  }
684
695
  /** Format a ZodError as a human-readable string in the following form.
@@ -726,9 +737,9 @@ function toDotPath(path) {
726
737
  }
727
738
  return segs.join("");
728
739
  }
729
- function prettifyError(error$37) {
740
+ function prettifyError(error$39) {
730
741
  const lines = [];
731
- const issues = [...error$37.issues].sort((a, b) => a.path.length - b.path.length);
742
+ const issues = [...error$39.issues].sort((a, b) => a.path.length - b.path.length);
732
743
  for (const issue$1 of issues) {
733
744
  lines.push(`✖ ${issue$1.message}`);
734
745
  if (issue$1.path?.length) lines.push(` → at ${toDotPath(issue$1.path)}`);
@@ -737,7 +748,7 @@ function prettifyError(error$37) {
737
748
  }
738
749
 
739
750
  //#endregion
740
- //#region ../../node_modules/zod/dist/esm/v4/core/parse.js
751
+ //#region ../../node_modules/zod/v4/core/parse.js
741
752
  const _parse = (_Err) => (schema, value, _ctx, _params) => {
742
753
  const ctx = _ctx ? Object.assign(_ctx, { async: false }) : { async: false };
743
754
  const result = schema._zod.run({
@@ -749,7 +760,7 @@ const _parse = (_Err) => (schema, value, _ctx, _params) => {
749
760
  }
750
761
  if (result.issues.length) {
751
762
  const e = new (_params?.Err ?? _Err)(result.issues.map((iss) => finalizeIssue(iss, ctx, config())));
752
- Error.captureStackTrace(e, _params?.callee);
763
+ captureStackTrace(e, _params?.callee);
753
764
  throw e;
754
765
  }
755
766
  return result.value;
@@ -764,7 +775,7 @@ const _parseAsync = (_Err) => async (schema, value, _ctx, params) => {
764
775
  if (result instanceof Promise) result = await result;
765
776
  if (result.issues.length) {
766
777
  const e = new (params?.Err ?? _Err)(result.issues.map((iss) => finalizeIssue(iss, ctx, config())));
767
- Error.captureStackTrace(e, params?.callee);
778
+ captureStackTrace(e, params?.callee);
768
779
  throw e;
769
780
  }
770
781
  return result.value;
@@ -809,10 +820,9 @@ const _safeParseAsync = (_Err) => async (schema, value, _ctx) => {
809
820
  const safeParseAsync$1 = /* @__PURE__ */ _safeParseAsync($ZodRealError);
810
821
 
811
822
  //#endregion
812
- //#region ../../node_modules/zod/dist/esm/v4/core/regexes.js
823
+ //#region ../../node_modules/zod/v4/core/regexes.js
813
824
  var regexes_exports = {};
814
825
  __export(regexes_exports, {
815
- _emoji: () => _emoji$1,
816
826
  base64: () => base64$1,
817
827
  base64url: () => base64url$1,
818
828
  bigint: () => bigint$2,
@@ -898,27 +908,23 @@ const base64url$1 = /^[A-Za-z0-9_-]*$/;
898
908
  const hostname = /^([a-zA-Z0-9-]+\.)*[a-zA-Z0-9-]+$/;
899
909
  const domain = /^([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$/;
900
910
  const e164$1 = /^\+(?:[0-9]){6,14}[0-9]$/;
901
- const dateSource = `((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))`;
911
+ const dateSource = `(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))`;
902
912
  const date$3 = /* @__PURE__ */ new RegExp(`^${dateSource}$`);
903
913
  function timeSource(args) {
904
- let regex = `([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d`;
905
- if (args.precision) {
906
- regex = `${regex}\\.\\d{${args.precision}}`;
907
- } else if (args.precision == null) {
908
- regex = `${regex}(\\.\\d+)?`;
909
- }
914
+ const hhmm = `(?:[01]\\d|2[0-3]):[0-5]\\d`;
915
+ const regex = typeof args.precision === "number" ? args.precision === -1 ? `${hhmm}` : args.precision === 0 ? `${hhmm}:[0-5]\\d` : `${hhmm}:[0-5]\\d\\.\\d{${args.precision}}` : `${hhmm}(?::[0-5]\\d(?:\\.\\d+)?)?`;
910
916
  return regex;
911
917
  }
912
918
  function time$1(args) {
913
919
  return new RegExp(`^${timeSource(args)}$`);
914
920
  }
915
921
  function datetime$1(args) {
916
- let regex = `${dateSource}T${timeSource(args)}`;
917
- const opts = [];
918
- opts.push(args.local ? `Z?` : `Z`);
919
- if (args.offset) opts.push(`([+-]\\d{2}:?\\d{2})`);
920
- regex = `${regex}(${opts.join("|")})`;
921
- return new RegExp(`^${regex}$`);
922
+ const time$2 = timeSource({ precision: args.precision });
923
+ const opts = ["Z"];
924
+ if (args.local) opts.push("");
925
+ if (args.offset) opts.push(`([+-]\\d{2}:\\d{2})`);
926
+ const timeRegex = `${time$2}(?:${opts.join("|")})`;
927
+ return new RegExp(`^${dateSource}T(?:${timeRegex})$`);
922
928
  }
923
929
  const string$2 = (params) => {
924
930
  const regex = params ? `[\\s\\S]{${params?.minimum ?? 0},${params?.maximum ?? ""}}` : `[\\s\\S]*`;
@@ -934,7 +940,7 @@ const lowercase = /^[^A-Z]*$/;
934
940
  const uppercase = /^[^a-z]*$/;
935
941
 
936
942
  //#endregion
937
- //#region ../../node_modules/zod/dist/esm/v4/core/checks.js
943
+ //#region ../../node_modules/zod/v4/core/checks.js
938
944
  const $ZodCheck = /* @__PURE__ */ $constructor("$ZodCheck", (inst, def) => {
939
945
  var _a;
940
946
  inst._zod ?? (inst._zod = {});
@@ -1125,11 +1131,12 @@ const $ZodCheckBigIntFormat = /* @__PURE__ */ $constructor("$ZodCheckBigIntForma
1125
1131
  };
1126
1132
  });
1127
1133
  const $ZodCheckMaxSize = /* @__PURE__ */ $constructor("$ZodCheckMaxSize", (inst, def) => {
1134
+ var _a;
1128
1135
  $ZodCheck.init(inst, def);
1129
- inst._zod.when = (payload) => {
1136
+ (_a = inst._zod.def).when ?? (_a.when = (payload) => {
1130
1137
  const val = payload.value;
1131
1138
  return !nullish$1(val) && val.size !== undefined;
1132
- };
1139
+ });
1133
1140
  inst._zod.onattach.push((inst$1) => {
1134
1141
  const curr = inst$1._zod.bag.maximum ?? Number.POSITIVE_INFINITY;
1135
1142
  if (def.maximum < curr) inst$1._zod.bag.maximum = def.maximum;
@@ -1149,11 +1156,12 @@ const $ZodCheckMaxSize = /* @__PURE__ */ $constructor("$ZodCheckMaxSize", (inst,
1149
1156
  };
1150
1157
  });
1151
1158
  const $ZodCheckMinSize = /* @__PURE__ */ $constructor("$ZodCheckMinSize", (inst, def) => {
1159
+ var _a;
1152
1160
  $ZodCheck.init(inst, def);
1153
- inst._zod.when = (payload) => {
1161
+ (_a = inst._zod.def).when ?? (_a.when = (payload) => {
1154
1162
  const val = payload.value;
1155
1163
  return !nullish$1(val) && val.size !== undefined;
1156
- };
1164
+ });
1157
1165
  inst._zod.onattach.push((inst$1) => {
1158
1166
  const curr = inst$1._zod.bag.minimum ?? Number.NEGATIVE_INFINITY;
1159
1167
  if (def.minimum > curr) inst$1._zod.bag.minimum = def.minimum;
@@ -1173,11 +1181,12 @@ const $ZodCheckMinSize = /* @__PURE__ */ $constructor("$ZodCheckMinSize", (inst,
1173
1181
  };
1174
1182
  });
1175
1183
  const $ZodCheckSizeEquals = /* @__PURE__ */ $constructor("$ZodCheckSizeEquals", (inst, def) => {
1184
+ var _a;
1176
1185
  $ZodCheck.init(inst, def);
1177
- inst._zod.when = (payload) => {
1186
+ (_a = inst._zod.def).when ?? (_a.when = (payload) => {
1178
1187
  const val = payload.value;
1179
1188
  return !nullish$1(val) && val.size !== undefined;
1180
- };
1189
+ });
1181
1190
  inst._zod.onattach.push((inst$1) => {
1182
1191
  const bag = inst$1._zod.bag;
1183
1192
  bag.minimum = def.size;
@@ -1198,6 +1207,8 @@ const $ZodCheckSizeEquals = /* @__PURE__ */ $constructor("$ZodCheckSizeEquals",
1198
1207
  code: "too_small",
1199
1208
  minimum: def.size
1200
1209
  },
1210
+ inclusive: true,
1211
+ exact: true,
1201
1212
  input: payload.value,
1202
1213
  inst,
1203
1214
  continue: !def.abort
@@ -1205,11 +1216,12 @@ const $ZodCheckSizeEquals = /* @__PURE__ */ $constructor("$ZodCheckSizeEquals",
1205
1216
  };
1206
1217
  });
1207
1218
  const $ZodCheckMaxLength = /* @__PURE__ */ $constructor("$ZodCheckMaxLength", (inst, def) => {
1219
+ var _a;
1208
1220
  $ZodCheck.init(inst, def);
1209
- inst._zod.when = (payload) => {
1221
+ (_a = inst._zod.def).when ?? (_a.when = (payload) => {
1210
1222
  const val = payload.value;
1211
1223
  return !nullish$1(val) && val.length !== undefined;
1212
- };
1224
+ });
1213
1225
  inst._zod.onattach.push((inst$1) => {
1214
1226
  const curr = inst$1._zod.bag.maximum ?? Number.POSITIVE_INFINITY;
1215
1227
  if (def.maximum < curr) inst$1._zod.bag.maximum = def.maximum;
@@ -1231,11 +1243,12 @@ const $ZodCheckMaxLength = /* @__PURE__ */ $constructor("$ZodCheckMaxLength", (i
1231
1243
  };
1232
1244
  });
1233
1245
  const $ZodCheckMinLength = /* @__PURE__ */ $constructor("$ZodCheckMinLength", (inst, def) => {
1246
+ var _a;
1234
1247
  $ZodCheck.init(inst, def);
1235
- inst._zod.when = (payload) => {
1248
+ (_a = inst._zod.def).when ?? (_a.when = (payload) => {
1236
1249
  const val = payload.value;
1237
1250
  return !nullish$1(val) && val.length !== undefined;
1238
- };
1251
+ });
1239
1252
  inst._zod.onattach.push((inst$1) => {
1240
1253
  const curr = inst$1._zod.bag.minimum ?? Number.NEGATIVE_INFINITY;
1241
1254
  if (def.minimum > curr) inst$1._zod.bag.minimum = def.minimum;
@@ -1257,11 +1270,12 @@ const $ZodCheckMinLength = /* @__PURE__ */ $constructor("$ZodCheckMinLength", (i
1257
1270
  };
1258
1271
  });
1259
1272
  const $ZodCheckLengthEquals = /* @__PURE__ */ $constructor("$ZodCheckLengthEquals", (inst, def) => {
1273
+ var _a;
1260
1274
  $ZodCheck.init(inst, def);
1261
- inst._zod.when = (payload) => {
1275
+ (_a = inst._zod.def).when ?? (_a.when = (payload) => {
1262
1276
  const val = payload.value;
1263
1277
  return !nullish$1(val) && val.length !== undefined;
1264
- };
1278
+ });
1265
1279
  inst._zod.onattach.push((inst$1) => {
1266
1280
  const bag = inst$1._zod.bag;
1267
1281
  bag.minimum = def.length;
@@ -1283,6 +1297,8 @@ const $ZodCheckLengthEquals = /* @__PURE__ */ $constructor("$ZodCheckLengthEqual
1283
1297
  code: "too_small",
1284
1298
  minimum: def.length
1285
1299
  },
1300
+ inclusive: true,
1301
+ exact: true,
1286
1302
  input: payload.value,
1287
1303
  inst,
1288
1304
  continue: !def.abort
@@ -1290,7 +1306,7 @@ const $ZodCheckLengthEquals = /* @__PURE__ */ $constructor("$ZodCheckLengthEqual
1290
1306
  };
1291
1307
  });
1292
1308
  const $ZodCheckStringFormat = /* @__PURE__ */ $constructor("$ZodCheckStringFormat", (inst, def) => {
1293
- var _a;
1309
+ var _a, _b;
1294
1310
  $ZodCheck.init(inst, def);
1295
1311
  inst._zod.onattach.push((inst$1) => {
1296
1312
  const bag = inst$1._zod.bag;
@@ -1300,8 +1316,7 @@ const $ZodCheckStringFormat = /* @__PURE__ */ $constructor("$ZodCheckStringForma
1300
1316
  bag.patterns.add(def.pattern);
1301
1317
  }
1302
1318
  });
1303
- (_a = inst._zod).check ?? (_a.check = (payload) => {
1304
- if (!def.pattern) throw new Error("Not implemented.");
1319
+ if (def.pattern) (_a = inst._zod).check ?? (_a.check = (payload) => {
1305
1320
  def.pattern.lastIndex = 0;
1306
1321
  if (def.pattern.test(payload.value)) return;
1307
1322
  payload.issues.push({
@@ -1314,6 +1329,7 @@ const $ZodCheckStringFormat = /* @__PURE__ */ $constructor("$ZodCheckStringForma
1314
1329
  continue: !def.abort
1315
1330
  });
1316
1331
  });
1332
+ else (_b = inst._zod).check ?? (_b.check = () => {});
1317
1333
  });
1318
1334
  const $ZodCheckRegex = /* @__PURE__ */ $constructor("$ZodCheckRegex", (inst, def) => {
1319
1335
  $ZodCheckStringFormat.init(inst, def);
@@ -1437,7 +1453,6 @@ const $ZodCheckMimeType = /* @__PURE__ */ $constructor("$ZodCheckMimeType", (ins
1437
1453
  code: "invalid_value",
1438
1454
  values: def.mime,
1439
1455
  input: payload.value.type,
1440
- path: ["type"],
1441
1456
  inst
1442
1457
  });
1443
1458
  };
@@ -1450,7 +1465,7 @@ const $ZodCheckOverwrite = /* @__PURE__ */ $constructor("$ZodCheckOverwrite", (i
1450
1465
  });
1451
1466
 
1452
1467
  //#endregion
1453
- //#region ../../node_modules/zod/dist/esm/v4/core/doc.js
1468
+ //#region ../../node_modules/zod/v4/core/doc.js
1454
1469
  var Doc = class {
1455
1470
  constructor(args = []) {
1456
1471
  this.content = [];
@@ -1486,19 +1501,18 @@ var Doc = class {
1486
1501
  };
1487
1502
 
1488
1503
  //#endregion
1489
- //#region ../../node_modules/zod/dist/esm/v4/core/versions.js
1504
+ //#region ../../node_modules/zod/v4/core/versions.js
1490
1505
  const version = {
1491
1506
  major: 4,
1492
1507
  minor: 0,
1493
- patch: 0
1508
+ patch: 2
1494
1509
  };
1495
1510
 
1496
1511
  //#endregion
1497
- //#region ../../node_modules/zod/dist/esm/v4/core/schemas.js
1512
+ //#region ../../node_modules/zod/v4/core/schemas.js
1498
1513
  const $ZodType = /* @__PURE__ */ $constructor("$ZodType", (inst, def) => {
1499
1514
  var _a;
1500
1515
  inst ?? (inst = {});
1501
- inst._zod.id = def.type + "_" + randomString(10);
1502
1516
  inst._zod.def = def;
1503
1517
  inst._zod.bag = inst._zod.bag || {};
1504
1518
  inst._zod.version = version;
@@ -1521,13 +1535,11 @@ const $ZodType = /* @__PURE__ */ $constructor("$ZodType", (inst, def) => {
1521
1535
  let isAborted = aborted(payload);
1522
1536
  let asyncResult;
1523
1537
  for (const ch of checks$1) {
1524
- if (ch._zod.when) {
1525
- const shouldRun = ch._zod.when(payload);
1538
+ if (ch._zod.def.when) {
1539
+ const shouldRun = ch._zod.def.when(payload);
1526
1540
  if (!shouldRun) continue;
1527
- } else {
1528
- if (isAborted) {
1529
- continue;
1530
- }
1541
+ } else if (isAborted) {
1542
+ continue;
1531
1543
  }
1532
1544
  const currLen = payload.issues.length;
1533
1545
  const _ = ch._zod.check(payload);
@@ -1627,7 +1639,9 @@ const $ZodURL = /* @__PURE__ */ $constructor("$ZodURL", (inst, def) => {
1627
1639
  $ZodStringFormat.init(inst, def);
1628
1640
  inst._zod.check = (payload) => {
1629
1641
  try {
1630
- const url$1 = new URL(payload.value);
1642
+ const orig = payload.value;
1643
+ const url$1 = new URL(orig);
1644
+ const href = url$1.href;
1631
1645
  if (def.hostname) {
1632
1646
  def.hostname.lastIndex = 0;
1633
1647
  if (!def.hostname.test(url$1.hostname)) {
@@ -1656,6 +1670,11 @@ const $ZodURL = /* @__PURE__ */ $constructor("$ZodURL", (inst, def) => {
1656
1670
  });
1657
1671
  }
1658
1672
  }
1673
+ if (!orig.endsWith("/") && href.endsWith("/")) {
1674
+ payload.value = href.slice(0, -1);
1675
+ } else {
1676
+ payload.value = href;
1677
+ }
1659
1678
  return;
1660
1679
  } catch (_) {
1661
1680
  payload.issues.push({
@@ -1826,6 +1845,7 @@ function isValidJWT(token, algorithm = null) {
1826
1845
  const tokensParts = token.split(".");
1827
1846
  if (tokensParts.length !== 3) return false;
1828
1847
  const [header] = tokensParts;
1848
+ if (!header) return false;
1829
1849
  const parsedHeader = JSON.parse(atob(header));
1830
1850
  if ("typ" in parsedHeader && parsedHeader?.typ !== "JWT") return false;
1831
1851
  if (!parsedHeader.alg) return false;
@@ -1848,6 +1868,19 @@ const $ZodJWT = /* @__PURE__ */ $constructor("$ZodJWT", (inst, def) => {
1848
1868
  });
1849
1869
  };
1850
1870
  });
1871
+ const $ZodCustomStringFormat = /* @__PURE__ */ $constructor("$ZodCustomStringFormat", (inst, def) => {
1872
+ $ZodStringFormat.init(inst, def);
1873
+ inst._zod.check = (payload) => {
1874
+ if (def.fn(payload.value)) return;
1875
+ payload.issues.push({
1876
+ code: "invalid_format",
1877
+ format: def.format,
1878
+ input: payload.value,
1879
+ inst,
1880
+ continue: !def.abort
1881
+ });
1882
+ };
1883
+ });
1851
1884
  const $ZodNumber = /* @__PURE__ */ $constructor("$ZodNumber", (inst, def) => {
1852
1885
  $ZodType.init(inst, def);
1853
1886
  inst._zod.pattern = inst._zod.bag.pattern ?? number$2;
@@ -1899,12 +1932,11 @@ const $ZodBigInt = /* @__PURE__ */ $constructor("$ZodBigInt", (inst, def) => {
1899
1932
  if (def.coerce) try {
1900
1933
  payload.value = BigInt(payload.value);
1901
1934
  } catch (_) {}
1902
- const { value: input } = payload;
1903
- if (typeof input === "bigint") return payload;
1935
+ if (typeof payload.value === "bigint") return payload;
1904
1936
  payload.issues.push({
1905
1937
  expected: "bigint",
1906
1938
  code: "invalid_type",
1907
- input,
1939
+ input: payload.value,
1908
1940
  inst
1909
1941
  });
1910
1942
  return payload;
@@ -1917,7 +1949,7 @@ const $ZodBigIntFormat = /* @__PURE__ */ $constructor("$ZodBigInt", (inst, def)
1917
1949
  const $ZodSymbol = /* @__PURE__ */ $constructor("$ZodSymbol", (inst, def) => {
1918
1950
  $ZodType.init(inst, def);
1919
1951
  inst._zod.parse = (payload, _ctx) => {
1920
- const { value: input } = payload;
1952
+ const input = payload.value;
1921
1953
  if (typeof input === "symbol") return payload;
1922
1954
  payload.issues.push({
1923
1955
  expected: "symbol",
@@ -1932,8 +1964,10 @@ const $ZodUndefined = /* @__PURE__ */ $constructor("$ZodUndefined", (inst, def)
1932
1964
  $ZodType.init(inst, def);
1933
1965
  inst._zod.pattern = _undefined$2;
1934
1966
  inst._zod.values = new Set([undefined]);
1967
+ inst._zod.optin = "optional";
1968
+ inst._zod.optout = "optional";
1935
1969
  inst._zod.parse = (payload, _ctx) => {
1936
- const { value: input } = payload;
1970
+ const input = payload.value;
1937
1971
  if (typeof input === "undefined") return payload;
1938
1972
  payload.issues.push({
1939
1973
  expected: "undefined",
@@ -1949,7 +1983,7 @@ const $ZodNull = /* @__PURE__ */ $constructor("$ZodNull", (inst, def) => {
1949
1983
  inst._zod.pattern = _null$2;
1950
1984
  inst._zod.values = new Set([null]);
1951
1985
  inst._zod.parse = (payload, _ctx) => {
1952
- const { value: input } = payload;
1986
+ const input = payload.value;
1953
1987
  if (input === null) return payload;
1954
1988
  payload.issues.push({
1955
1989
  expected: "null",
@@ -1983,7 +2017,7 @@ const $ZodNever = /* @__PURE__ */ $constructor("$ZodNever", (inst, def) => {
1983
2017
  const $ZodVoid = /* @__PURE__ */ $constructor("$ZodVoid", (inst, def) => {
1984
2018
  $ZodType.init(inst, def);
1985
2019
  inst._zod.parse = (payload, _ctx) => {
1986
- const { value: input } = payload;
2020
+ const input = payload.value;
1987
2021
  if (typeof input === "undefined") return payload;
1988
2022
  payload.issues.push({
1989
2023
  expected: "void",
@@ -2114,19 +2148,20 @@ const $ZodObject = /* @__PURE__ */ $constructor("$ZodObject", (inst, def) => {
2114
2148
  "payload",
2115
2149
  "ctx"
2116
2150
  ]);
2117
- const { keys, optionalKeys: optionalKeys$1 } = _normalized.value;
2151
+ const normalized = _normalized.value;
2118
2152
  const parseStr = (key) => {
2119
2153
  const k = esc(key);
2120
2154
  return `shape[${k}]._zod.run({ value: input[${k}], issues: [] }, ctx)`;
2121
2155
  };
2122
2156
  doc.write(`const input = payload.value;`);
2123
2157
  const ids = Object.create(null);
2124
- for (const key of keys) {
2125
- ids[key] = randomString(15);
2158
+ let counter = 0;
2159
+ for (const key of normalized.keys) {
2160
+ ids[key] = `key_${counter++}`;
2126
2161
  }
2127
2162
  doc.write(`const newResult = {}`);
2128
- for (const key of keys) {
2129
- if (optionalKeys$1.has(key)) {
2163
+ for (const key of normalized.keys) {
2164
+ if (normalized.optionalKeys.has(key)) {
2130
2165
  const id = ids[key];
2131
2166
  doc.write(`const ${id} = ${parseStr(key)};`);
2132
2167
  const k = esc(key);
@@ -2171,7 +2206,7 @@ const $ZodObject = /* @__PURE__ */ $constructor("$ZodObject", (inst, def) => {
2171
2206
  const jit = !globalConfig.jitless;
2172
2207
  const allowsEval$1 = allowsEval;
2173
2208
  const fastEnabled = jit && allowsEval$1.value;
2174
- const { catchall } = def;
2209
+ const catchall = def.catchall;
2175
2210
  let value;
2176
2211
  inst._zod.parse = (payload, ctx) => {
2177
2212
  value ?? (value = _normalized.value);
@@ -2201,12 +2236,10 @@ const $ZodObject = /* @__PURE__ */ $constructor("$ZodObject", (inst, def) => {
2201
2236
  const isOptional = el._zod.optin === "optional" && el._zod.optout === "optional";
2202
2237
  if (r instanceof Promise) {
2203
2238
  proms.push(r.then((r$1) => isOptional ? handleOptionalObjectResult(r$1, payload, key, input) : handleObjectResult(r$1, payload, key)));
2239
+ } else if (isOptional) {
2240
+ handleOptionalObjectResult(r, payload, key, input);
2204
2241
  } else {
2205
- if (isOptional) {
2206
- handleOptionalObjectResult(r, payload, key, input);
2207
- } else {
2208
- handleObjectResult(r, payload, key);
2209
- }
2242
+ handleObjectResult(r, payload, key);
2210
2243
  }
2211
2244
  }
2212
2245
  }
@@ -2264,6 +2297,8 @@ function handleUnionResults(results, final, inst, ctx) {
2264
2297
  }
2265
2298
  const $ZodUnion = /* @__PURE__ */ $constructor("$ZodUnion", (inst, def) => {
2266
2299
  $ZodType.init(inst, def);
2300
+ defineLazy(inst._zod, "optin", () => def.options.some((o) => o._zod.optin === "optional") ? "optional" : undefined);
2301
+ defineLazy(inst._zod, "optout", () => def.options.some((o) => o._zod.optout === "optional") ? "optional" : undefined);
2267
2302
  defineLazy(inst._zod, "values", () => {
2268
2303
  if (def.options.every((o) => o._zod.values)) {
2269
2304
  return new Set(def.options.flatMap((option) => Array.from(option._zod.values)));
@@ -2363,7 +2398,7 @@ const $ZodDiscriminatedUnion = /* @__PURE__ */ $constructor("$ZodDiscriminatedUn
2363
2398
  const $ZodIntersection = /* @__PURE__ */ $constructor("$ZodIntersection", (inst, def) => {
2364
2399
  $ZodType.init(inst, def);
2365
2400
  inst._zod.parse = (payload, ctx) => {
2366
- const { value: input } = payload;
2401
+ const input = payload.value;
2367
2402
  const left = def.left._zod.run({
2368
2403
  value: input,
2369
2404
  issues: []
@@ -2820,6 +2855,9 @@ const $ZodOptional = /* @__PURE__ */ $constructor("$ZodOptional", (inst, def) =>
2820
2855
  return pattern ? new RegExp(`^(${cleanRegex(pattern.source)})?$`) : undefined;
2821
2856
  });
2822
2857
  inst._zod.parse = (payload, ctx) => {
2858
+ if (def.innerType._zod.optin === "optional") {
2859
+ return def.innerType._zod.run(payload, ctx);
2860
+ }
2823
2861
  if (payload.value === undefined) {
2824
2862
  return payload;
2825
2863
  }
@@ -2919,7 +2957,7 @@ const $ZodSuccess = /* @__PURE__ */ $constructor("$ZodSuccess", (inst, def) => {
2919
2957
  });
2920
2958
  const $ZodCatch = /* @__PURE__ */ $constructor("$ZodCatch", (inst, def) => {
2921
2959
  $ZodType.init(inst, def);
2922
- defineLazy(inst._zod, "optin", () => def.innerType._zod.optin);
2960
+ inst._zod.optin = "optional";
2923
2961
  defineLazy(inst._zod, "optout", () => def.innerType._zod.optout);
2924
2962
  defineLazy(inst._zod, "values", () => def.innerType._zod.values);
2925
2963
  inst._zod.parse = (payload, ctx) => {
@@ -2990,6 +3028,7 @@ function handlePipeResult(left, def, ctx) {
2990
3028
  const $ZodReadonly = /* @__PURE__ */ $constructor("$ZodReadonly", (inst, def) => {
2991
3029
  $ZodType.init(inst, def);
2992
3030
  defineLazy(inst._zod, "propValues", () => def.innerType._zod.propValues);
3031
+ defineLazy(inst._zod, "values", () => def.innerType._zod.values);
2993
3032
  defineLazy(inst._zod, "optin", () => def.innerType._zod.optin);
2994
3033
  defineLazy(inst._zod, "optout", () => def.innerType._zod.optout);
2995
3034
  inst._zod.parse = (payload, ctx) => {
@@ -3040,7 +3079,7 @@ const $ZodTemplateLiteral = /* @__PURE__ */ $constructor("$ZodTemplateLiteral",
3040
3079
  input: payload.value,
3041
3080
  inst,
3042
3081
  code: "invalid_format",
3043
- format: "template_literal",
3082
+ format: def.format ?? "template_literal",
3044
3083
  pattern: inst._zod.pattern.source
3045
3084
  });
3046
3085
  return payload;
@@ -3100,8 +3139,8 @@ function handleRefineResult(result, payload, input, inst) {
3100
3139
  }
3101
3140
 
3102
3141
  //#endregion
3103
- //#region ../../node_modules/zod/dist/esm/v4/locales/ar.js
3104
- const error$36 = () => {
3142
+ //#region ../../node_modules/zod/v4/locales/ar.js
3143
+ const error$38 = () => {
3105
3144
  const Sizable = {
3106
3145
  string: {
3107
3146
  unit: "حرف",
@@ -3123,7 +3162,7 @@ const error$36 = () => {
3123
3162
  function getSizing(origin) {
3124
3163
  return Sizable[origin] ?? null;
3125
3164
  }
3126
- const parsedType$2 = (data) => {
3165
+ const parsedType$3 = (data) => {
3127
3166
  const t = typeof data;
3128
3167
  switch (t) {
3129
3168
  case "number": {
@@ -3175,7 +3214,7 @@ const error$36 = () => {
3175
3214
  };
3176
3215
  return (issue$1) => {
3177
3216
  switch (issue$1.code) {
3178
- case "invalid_type": return `مدخلات غير مقبولة: يفترض إدخال ${issue$1.expected}، ولكن تم إدخال ${parsedType$2(issue$1.input)}`;
3217
+ case "invalid_type": return `مدخلات غير مقبولة: يفترض إدخال ${issue$1.expected}، ولكن تم إدخال ${parsedType$3(issue$1.input)}`;
3179
3218
  case "invalid_value":
3180
3219
  if (issue$1.values.length === 1) return `مدخلات غير مقبولة: يفترض إدخال ${stringifyPrimitive(issue$1.values[0])}`;
3181
3220
  return `اختيار غير مقبول: يتوقع انتقاء أحد هذه الخيارات: ${joinValues(issue$1.values, "|")}`;
@@ -3211,12 +3250,12 @@ const error$36 = () => {
3211
3250
  };
3212
3251
  };
3213
3252
  function ar_default() {
3214
- return { localeError: error$36() };
3253
+ return { localeError: error$38() };
3215
3254
  }
3216
3255
 
3217
3256
  //#endregion
3218
- //#region ../../node_modules/zod/dist/esm/v4/locales/az.js
3219
- const error$35 = () => {
3257
+ //#region ../../node_modules/zod/v4/locales/az.js
3258
+ const error$37 = () => {
3220
3259
  const Sizable = {
3221
3260
  string: {
3222
3261
  unit: "simvol",
@@ -3238,7 +3277,7 @@ const error$35 = () => {
3238
3277
  function getSizing(origin) {
3239
3278
  return Sizable[origin] ?? null;
3240
3279
  }
3241
- const parsedType$2 = (data) => {
3280
+ const parsedType$3 = (data) => {
3242
3281
  const t = typeof data;
3243
3282
  switch (t) {
3244
3283
  case "number": {
@@ -3290,7 +3329,7 @@ const error$35 = () => {
3290
3329
  };
3291
3330
  return (issue$1) => {
3292
3331
  switch (issue$1.code) {
3293
- case "invalid_type": return `Yanlış dəyər: gözlənilən ${issue$1.expected}, daxil olan ${parsedType$2(issue$1.input)}`;
3332
+ case "invalid_type": return `Yanlış dəyər: gözlənilən ${issue$1.expected}, daxil olan ${parsedType$3(issue$1.input)}`;
3294
3333
  case "invalid_value":
3295
3334
  if (issue$1.values.length === 1) return `Yanlış dəyər: gözlənilən ${stringifyPrimitive(issue$1.values[0])}`;
3296
3335
  return `Yanlış seçim: aşağıdakılardan biri olmalıdır: ${joinValues(issue$1.values, "|")}`;
@@ -3324,11 +3363,11 @@ const error$35 = () => {
3324
3363
  };
3325
3364
  };
3326
3365
  function az_default() {
3327
- return { localeError: error$35() };
3366
+ return { localeError: error$37() };
3328
3367
  }
3329
3368
 
3330
3369
  //#endregion
3331
- //#region ../../node_modules/zod/dist/esm/v4/locales/be.js
3370
+ //#region ../../node_modules/zod/v4/locales/be.js
3332
3371
  function getBelarusianPlural(count, one, few, many) {
3333
3372
  const absCount = Math.abs(count);
3334
3373
  const lastDigit = absCount % 10;
@@ -3344,7 +3383,7 @@ function getBelarusianPlural(count, one, few, many) {
3344
3383
  }
3345
3384
  return many;
3346
3385
  }
3347
- const error$34 = () => {
3386
+ const error$36 = () => {
3348
3387
  const Sizable = {
3349
3388
  string: {
3350
3389
  unit: {
@@ -3382,7 +3421,7 @@ const error$34 = () => {
3382
3421
  function getSizing(origin) {
3383
3422
  return Sizable[origin] ?? null;
3384
3423
  }
3385
- const parsedType$2 = (data) => {
3424
+ const parsedType$3 = (data) => {
3386
3425
  const t = typeof data;
3387
3426
  switch (t) {
3388
3427
  case "number": {
@@ -3434,7 +3473,7 @@ const error$34 = () => {
3434
3473
  };
3435
3474
  return (issue$1) => {
3436
3475
  switch (issue$1.code) {
3437
- case "invalid_type": return `Няправільны ўвод: чакаўся ${issue$1.expected}, атрымана ${parsedType$2(issue$1.input)}`;
3476
+ case "invalid_type": return `Няправільны ўвод: чакаўся ${issue$1.expected}, атрымана ${parsedType$3(issue$1.input)}`;
3438
3477
  case "invalid_value":
3439
3478
  if (issue$1.values.length === 1) return `Няправільны ўвод: чакалася ${stringifyPrimitive(issue$1.values[0])}`;
3440
3479
  return `Няправільны варыянт: чакаўся адзін з ${joinValues(issue$1.values, "|")}`;
@@ -3476,12 +3515,12 @@ const error$34 = () => {
3476
3515
  };
3477
3516
  };
3478
3517
  function be_default() {
3479
- return { localeError: error$34() };
3518
+ return { localeError: error$36() };
3480
3519
  }
3481
3520
 
3482
3521
  //#endregion
3483
- //#region ../../node_modules/zod/dist/esm/v4/locales/ca.js
3484
- const error$33 = () => {
3522
+ //#region ../../node_modules/zod/v4/locales/ca.js
3523
+ const error$35 = () => {
3485
3524
  const Sizable = {
3486
3525
  string: {
3487
3526
  unit: "caràcters",
@@ -3503,7 +3542,7 @@ const error$33 = () => {
3503
3542
  function getSizing(origin) {
3504
3543
  return Sizable[origin] ?? null;
3505
3544
  }
3506
- const parsedType$2 = (data) => {
3545
+ const parsedType$3 = (data) => {
3507
3546
  const t = typeof data;
3508
3547
  switch (t) {
3509
3548
  case "number": {
@@ -3555,7 +3594,7 @@ const error$33 = () => {
3555
3594
  };
3556
3595
  return (issue$1) => {
3557
3596
  switch (issue$1.code) {
3558
- case "invalid_type": return `Tipus invàlid: s'esperava ${issue$1.expected}, s'ha rebut ${parsedType$2(issue$1.input)}`;
3597
+ case "invalid_type": return `Tipus invàlid: s'esperava ${issue$1.expected}, s'ha rebut ${parsedType$3(issue$1.input)}`;
3559
3598
  case "invalid_value":
3560
3599
  if (issue$1.values.length === 1) return `Valor invàlid: s'esperava ${stringifyPrimitive(issue$1.values[0])}`;
3561
3600
  return `Opció invàlida: s'esperava una de ${joinValues(issue$1.values, " o ")}`;
@@ -3593,12 +3632,12 @@ const error$33 = () => {
3593
3632
  };
3594
3633
  };
3595
3634
  function ca_default() {
3596
- return { localeError: error$33() };
3635
+ return { localeError: error$35() };
3597
3636
  }
3598
3637
 
3599
3638
  //#endregion
3600
- //#region ../../node_modules/zod/dist/esm/v4/locales/cs.js
3601
- const error$32 = () => {
3639
+ //#region ../../node_modules/zod/v4/locales/cs.js
3640
+ const error$34 = () => {
3602
3641
  const Sizable = {
3603
3642
  string: {
3604
3643
  unit: "znaků",
@@ -3620,7 +3659,7 @@ const error$32 = () => {
3620
3659
  function getSizing(origin) {
3621
3660
  return Sizable[origin] ?? null;
3622
3661
  }
3623
- const parsedType$2 = (data) => {
3662
+ const parsedType$3 = (data) => {
3624
3663
  const t = typeof data;
3625
3664
  switch (t) {
3626
3665
  case "number": {
@@ -3690,7 +3729,7 @@ const error$32 = () => {
3690
3729
  };
3691
3730
  return (issue$1) => {
3692
3731
  switch (issue$1.code) {
3693
- case "invalid_type": return `Neplatný vstup: očekáváno ${issue$1.expected}, obdrženo ${parsedType$2(issue$1.input)}`;
3732
+ case "invalid_type": return `Neplatný vstup: očekáváno ${issue$1.expected}, obdrženo ${parsedType$3(issue$1.input)}`;
3694
3733
  case "invalid_value":
3695
3734
  if (issue$1.values.length === 1) return `Neplatný vstup: očekáváno ${stringifyPrimitive(issue$1.values[0])}`;
3696
3735
  return `Neplatná možnost: očekávána jedna z hodnot ${joinValues(issue$1.values, "|")}`;
@@ -3728,12 +3767,12 @@ const error$32 = () => {
3728
3767
  };
3729
3768
  };
3730
3769
  function cs_default() {
3731
- return { localeError: error$32() };
3770
+ return { localeError: error$34() };
3732
3771
  }
3733
3772
 
3734
3773
  //#endregion
3735
- //#region ../../node_modules/zod/dist/esm/v4/locales/de.js
3736
- const error$31 = () => {
3774
+ //#region ../../node_modules/zod/v4/locales/de.js
3775
+ const error$33 = () => {
3737
3776
  const Sizable = {
3738
3777
  string: {
3739
3778
  unit: "Zeichen",
@@ -3755,7 +3794,7 @@ const error$31 = () => {
3755
3794
  function getSizing(origin) {
3756
3795
  return Sizable[origin] ?? null;
3757
3796
  }
3758
- const parsedType$2 = (data) => {
3797
+ const parsedType$3 = (data) => {
3759
3798
  const t = typeof data;
3760
3799
  switch (t) {
3761
3800
  case "number": {
@@ -3807,7 +3846,7 @@ const error$31 = () => {
3807
3846
  };
3808
3847
  return (issue$1) => {
3809
3848
  switch (issue$1.code) {
3810
- case "invalid_type": return `Ungültige Eingabe: erwartet ${issue$1.expected}, erhalten ${parsedType$2(issue$1.input)}`;
3849
+ case "invalid_type": return `Ungültige Eingabe: erwartet ${issue$1.expected}, erhalten ${parsedType$3(issue$1.input)}`;
3811
3850
  case "invalid_value":
3812
3851
  if (issue$1.values.length === 1) return `Ungültige Eingabe: erwartet ${stringifyPrimitive(issue$1.values[0])}`;
3813
3852
  return `Ungültige Option: erwartet eine von ${joinValues(issue$1.values, "|")}`;
@@ -3843,12 +3882,12 @@ const error$31 = () => {
3843
3882
  };
3844
3883
  };
3845
3884
  function de_default() {
3846
- return { localeError: error$31() };
3885
+ return { localeError: error$33() };
3847
3886
  }
3848
3887
 
3849
3888
  //#endregion
3850
- //#region ../../node_modules/zod/dist/esm/v4/locales/en.js
3851
- const parsedType$1 = (data) => {
3889
+ //#region ../../node_modules/zod/v4/locales/en.js
3890
+ const parsedType$2 = (data) => {
3852
3891
  const t = typeof data;
3853
3892
  switch (t) {
3854
3893
  case "number": {
@@ -3868,7 +3907,7 @@ const parsedType$1 = (data) => {
3868
3907
  }
3869
3908
  return t;
3870
3909
  };
3871
- const error$30 = () => {
3910
+ const error$32 = () => {
3872
3911
  const Sizable = {
3873
3912
  string: {
3874
3913
  unit: "characters",
@@ -3922,7 +3961,7 @@ const error$30 = () => {
3922
3961
  };
3923
3962
  return (issue$1) => {
3924
3963
  switch (issue$1.code) {
3925
- case "invalid_type": return `Invalid input: expected ${issue$1.expected}, received ${parsedType$1(issue$1.input)}`;
3964
+ case "invalid_type": return `Invalid input: expected ${issue$1.expected}, received ${parsedType$2(issue$1.input)}`;
3926
3965
  case "invalid_value":
3927
3966
  if (issue$1.values.length === 1) return `Invalid input: expected ${stringifyPrimitive(issue$1.values[0])}`;
3928
3967
  return `Invalid option: expected one of ${joinValues(issue$1.values, "|")}`;
@@ -3960,12 +3999,127 @@ const error$30 = () => {
3960
3999
  };
3961
4000
  };
3962
4001
  function en_default() {
3963
- return { localeError: error$30() };
4002
+ return { localeError: error$32() };
3964
4003
  }
3965
4004
 
3966
4005
  //#endregion
3967
- //#region ../../node_modules/zod/dist/esm/v4/locales/es.js
3968
- const error$29 = () => {
4006
+ //#region ../../node_modules/zod/v4/locales/eo.js
4007
+ const parsedType$1 = (data) => {
4008
+ const t = typeof data;
4009
+ switch (t) {
4010
+ case "number": {
4011
+ return Number.isNaN(data) ? "NaN" : "nombro";
4012
+ }
4013
+ case "object": {
4014
+ if (Array.isArray(data)) {
4015
+ return "tabelo";
4016
+ }
4017
+ if (data === null) {
4018
+ return "senvalora";
4019
+ }
4020
+ if (Object.getPrototypeOf(data) !== Object.prototype && data.constructor) {
4021
+ return data.constructor.name;
4022
+ }
4023
+ }
4024
+ }
4025
+ return t;
4026
+ };
4027
+ const error$31 = () => {
4028
+ const Sizable = {
4029
+ string: {
4030
+ unit: "karaktrojn",
4031
+ verb: "havi"
4032
+ },
4033
+ file: {
4034
+ unit: "bajtojn",
4035
+ verb: "havi"
4036
+ },
4037
+ array: {
4038
+ unit: "elementojn",
4039
+ verb: "havi"
4040
+ },
4041
+ set: {
4042
+ unit: "elementojn",
4043
+ verb: "havi"
4044
+ }
4045
+ };
4046
+ function getSizing(origin) {
4047
+ return Sizable[origin] ?? null;
4048
+ }
4049
+ const Nouns = {
4050
+ regex: "enigo",
4051
+ email: "retadreso",
4052
+ url: "URL",
4053
+ emoji: "emoĝio",
4054
+ uuid: "UUID",
4055
+ uuidv4: "UUIDv4",
4056
+ uuidv6: "UUIDv6",
4057
+ nanoid: "nanoid",
4058
+ guid: "GUID",
4059
+ cuid: "cuid",
4060
+ cuid2: "cuid2",
4061
+ ulid: "ULID",
4062
+ xid: "XID",
4063
+ ksuid: "KSUID",
4064
+ datetime: "ISO-datotempo",
4065
+ date: "ISO-dato",
4066
+ time: "ISO-tempo",
4067
+ duration: "ISO-daŭro",
4068
+ ipv4: "IPv4-adreso",
4069
+ ipv6: "IPv6-adreso",
4070
+ cidrv4: "IPv4-rango",
4071
+ cidrv6: "IPv6-rango",
4072
+ base64: "64-ume kodita karaktraro",
4073
+ base64url: "URL-64-ume kodita karaktraro",
4074
+ json_string: "JSON-karaktraro",
4075
+ e164: "E.164-nombro",
4076
+ jwt: "JWT",
4077
+ template_literal: "enigo"
4078
+ };
4079
+ return (issue$1) => {
4080
+ switch (issue$1.code) {
4081
+ case "invalid_type": return `Nevalida enigo: atendiĝis ${issue$1.expected}, riceviĝis ${parsedType$1(issue$1.input)}`;
4082
+ case "invalid_value":
4083
+ if (issue$1.values.length === 1) return `Nevalida enigo: atendiĝis ${stringifyPrimitive(issue$1.values[0])}`;
4084
+ return `Nevalida opcio: atendiĝis unu el ${joinValues(issue$1.values, "|")}`;
4085
+ case "too_big": {
4086
+ const adj = issue$1.inclusive ? "<=" : "<";
4087
+ const sizing = getSizing(issue$1.origin);
4088
+ if (sizing) return `Tro granda: atendiĝis ke ${issue$1.origin ?? "valoro"} havu ${adj}${issue$1.maximum.toString()} ${sizing.unit ?? "elementojn"}`;
4089
+ return `Tro granda: atendiĝis ke ${issue$1.origin ?? "valoro"} havu ${adj}${issue$1.maximum.toString()}`;
4090
+ }
4091
+ case "too_small": {
4092
+ const adj = issue$1.inclusive ? ">=" : ">";
4093
+ const sizing = getSizing(issue$1.origin);
4094
+ if (sizing) {
4095
+ return `Tro malgranda: atendiĝis ke ${issue$1.origin} havu ${adj}${issue$1.minimum.toString()} ${sizing.unit}`;
4096
+ }
4097
+ return `Tro malgranda: atendiĝis ke ${issue$1.origin} estu ${adj}${issue$1.minimum.toString()}`;
4098
+ }
4099
+ case "invalid_format": {
4100
+ const _issue = issue$1;
4101
+ if (_issue.format === "starts_with") return `Nevalida karaktraro: devas komenciĝi per "${_issue.prefix}"`;
4102
+ if (_issue.format === "ends_with") return `Nevalida karaktraro: devas finiĝi per "${_issue.suffix}"`;
4103
+ if (_issue.format === "includes") return `Nevalida karaktraro: devas inkluzivi "${_issue.includes}"`;
4104
+ if (_issue.format === "regex") return `Nevalida karaktraro: devas kongrui kun la modelo ${_issue.pattern}`;
4105
+ return `Nevalida ${Nouns[_issue.format] ?? issue$1.format}`;
4106
+ }
4107
+ case "not_multiple_of": return `Nevalida nombro: devas esti oblo de ${issue$1.divisor}`;
4108
+ case "unrecognized_keys": return `Nekonata${issue$1.keys.length > 1 ? "j" : ""} ŝlosilo${issue$1.keys.length > 1 ? "j" : ""}: ${joinValues(issue$1.keys, ", ")}`;
4109
+ case "invalid_key": return `Nevalida ŝlosilo en ${issue$1.origin}`;
4110
+ case "invalid_union": return "Nevalida enigo";
4111
+ case "invalid_element": return `Nevalida valoro en ${issue$1.origin}`;
4112
+ default: return `Nevalida enigo`;
4113
+ }
4114
+ };
4115
+ };
4116
+ function eo_default() {
4117
+ return { localeError: error$31() };
4118
+ }
4119
+
4120
+ //#endregion
4121
+ //#region ../../node_modules/zod/v4/locales/es.js
4122
+ const error$30 = () => {
3969
4123
  const Sizable = {
3970
4124
  string: {
3971
4125
  unit: "caracteres",
@@ -3987,7 +4141,7 @@ const error$29 = () => {
3987
4141
  function getSizing(origin) {
3988
4142
  return Sizable[origin] ?? null;
3989
4143
  }
3990
- const parsedType$2 = (data) => {
4144
+ const parsedType$3 = (data) => {
3991
4145
  const t = typeof data;
3992
4146
  switch (t) {
3993
4147
  case "number": {
@@ -4039,7 +4193,7 @@ const error$29 = () => {
4039
4193
  };
4040
4194
  return (issue$1) => {
4041
4195
  switch (issue$1.code) {
4042
- case "invalid_type": return `Entrada inválida: se esperaba ${issue$1.expected}, recibido ${parsedType$2(issue$1.input)}`;
4196
+ case "invalid_type": return `Entrada inválida: se esperaba ${issue$1.expected}, recibido ${parsedType$3(issue$1.input)}`;
4043
4197
  case "invalid_value":
4044
4198
  if (issue$1.values.length === 1) return `Entrada inválida: se esperaba ${stringifyPrimitive(issue$1.values[0])}`;
4045
4199
  return `Opción inválida: se esperaba una de ${joinValues(issue$1.values, "|")}`;
@@ -4075,12 +4229,12 @@ const error$29 = () => {
4075
4229
  };
4076
4230
  };
4077
4231
  function es_default() {
4078
- return { localeError: error$29() };
4232
+ return { localeError: error$30() };
4079
4233
  }
4080
4234
 
4081
4235
  //#endregion
4082
- //#region ../../node_modules/zod/dist/esm/v4/locales/fa.js
4083
- const error$28 = () => {
4236
+ //#region ../../node_modules/zod/v4/locales/fa.js
4237
+ const error$29 = () => {
4084
4238
  const Sizable = {
4085
4239
  string: {
4086
4240
  unit: "کاراکتر",
@@ -4102,7 +4256,7 @@ const error$28 = () => {
4102
4256
  function getSizing(origin) {
4103
4257
  return Sizable[origin] ?? null;
4104
4258
  }
4105
- const parsedType$2 = (data) => {
4259
+ const parsedType$3 = (data) => {
4106
4260
  const t = typeof data;
4107
4261
  switch (t) {
4108
4262
  case "number": {
@@ -4154,7 +4308,7 @@ const error$28 = () => {
4154
4308
  };
4155
4309
  return (issue$1) => {
4156
4310
  switch (issue$1.code) {
4157
- case "invalid_type": return `ورودی نامعتبر: می‌بایست ${issue$1.expected} می‌بود، ${parsedType$2(issue$1.input)} دریافت شد`;
4311
+ case "invalid_type": return `ورودی نامعتبر: می‌بایست ${issue$1.expected} می‌بود، ${parsedType$3(issue$1.input)} دریافت شد`;
4158
4312
  case "invalid_value":
4159
4313
  if (issue$1.values.length === 1) {
4160
4314
  return `ورودی نامعتبر: می‌بایست ${stringifyPrimitive(issue$1.values[0])} می‌بود`;
@@ -4202,12 +4356,12 @@ const error$28 = () => {
4202
4356
  };
4203
4357
  };
4204
4358
  function fa_default() {
4205
- return { localeError: error$28() };
4359
+ return { localeError: error$29() };
4206
4360
  }
4207
4361
 
4208
4362
  //#endregion
4209
- //#region ../../node_modules/zod/dist/esm/v4/locales/fi.js
4210
- const error$27 = () => {
4363
+ //#region ../../node_modules/zod/v4/locales/fi.js
4364
+ const error$28 = () => {
4211
4365
  const Sizable = {
4212
4366
  string: {
4213
4367
  unit: "merkkiä",
@@ -4245,7 +4399,7 @@ const error$27 = () => {
4245
4399
  function getSizing(origin) {
4246
4400
  return Sizable[origin] ?? null;
4247
4401
  }
4248
- const parsedType$2 = (data) => {
4402
+ const parsedType$3 = (data) => {
4249
4403
  const t = typeof data;
4250
4404
  switch (t) {
4251
4405
  case "number": {
@@ -4297,7 +4451,7 @@ const error$27 = () => {
4297
4451
  };
4298
4452
  return (issue$1) => {
4299
4453
  switch (issue$1.code) {
4300
- case "invalid_type": return `Virheellinen tyyppi: odotettiin ${issue$1.expected}, oli ${parsedType$2(issue$1.input)}`;
4454
+ case "invalid_type": return `Virheellinen tyyppi: odotettiin ${issue$1.expected}, oli ${parsedType$3(issue$1.input)}`;
4301
4455
  case "invalid_value":
4302
4456
  if (issue$1.values.length === 1) return `Virheellinen syöte: täytyy olla ${stringifyPrimitive(issue$1.values[0])}`;
4303
4457
  return `Virheellinen valinta: täytyy olla yksi seuraavista: ${joinValues(issue$1.values, "|")}`;
@@ -4337,12 +4491,12 @@ const error$27 = () => {
4337
4491
  };
4338
4492
  };
4339
4493
  function fi_default() {
4340
- return { localeError: error$27() };
4494
+ return { localeError: error$28() };
4341
4495
  }
4342
4496
 
4343
4497
  //#endregion
4344
- //#region ../../node_modules/zod/dist/esm/v4/locales/fr.js
4345
- const error$26 = () => {
4498
+ //#region ../../node_modules/zod/v4/locales/fr.js
4499
+ const error$27 = () => {
4346
4500
  const Sizable = {
4347
4501
  string: {
4348
4502
  unit: "caractères",
@@ -4364,7 +4518,7 @@ const error$26 = () => {
4364
4518
  function getSizing(origin) {
4365
4519
  return Sizable[origin] ?? null;
4366
4520
  }
4367
- const parsedType$2 = (data) => {
4521
+ const parsedType$3 = (data) => {
4368
4522
  const t = typeof data;
4369
4523
  switch (t) {
4370
4524
  case "number": {
@@ -4416,7 +4570,7 @@ const error$26 = () => {
4416
4570
  };
4417
4571
  return (issue$1) => {
4418
4572
  switch (issue$1.code) {
4419
- case "invalid_type": return `Entrée invalide : ${issue$1.expected} attendu, ${parsedType$2(issue$1.input)} reçu`;
4573
+ case "invalid_type": return `Entrée invalide : ${issue$1.expected} attendu, ${parsedType$3(issue$1.input)} reçu`;
4420
4574
  case "invalid_value":
4421
4575
  if (issue$1.values.length === 1) return `Entrée invalide : ${stringifyPrimitive(issue$1.values[0])} attendu`;
4422
4576
  return `Option invalide : une valeur parmi ${joinValues(issue$1.values, "|")} attendue`;
@@ -4452,12 +4606,12 @@ const error$26 = () => {
4452
4606
  };
4453
4607
  };
4454
4608
  function fr_default() {
4455
- return { localeError: error$26() };
4609
+ return { localeError: error$27() };
4456
4610
  }
4457
4611
 
4458
4612
  //#endregion
4459
- //#region ../../node_modules/zod/dist/esm/v4/locales/fr-CA.js
4460
- const error$25 = () => {
4613
+ //#region ../../node_modules/zod/v4/locales/fr-CA.js
4614
+ const error$26 = () => {
4461
4615
  const Sizable = {
4462
4616
  string: {
4463
4617
  unit: "caractères",
@@ -4479,7 +4633,7 @@ const error$25 = () => {
4479
4633
  function getSizing(origin) {
4480
4634
  return Sizable[origin] ?? null;
4481
4635
  }
4482
- const parsedType$2 = (data) => {
4636
+ const parsedType$3 = (data) => {
4483
4637
  const t = typeof data;
4484
4638
  switch (t) {
4485
4639
  case "number": {
@@ -4531,7 +4685,7 @@ const error$25 = () => {
4531
4685
  };
4532
4686
  return (issue$1) => {
4533
4687
  switch (issue$1.code) {
4534
- case "invalid_type": return `Entrée invalide : attendu ${issue$1.expected}, reçu ${parsedType$2(issue$1.input)}`;
4688
+ case "invalid_type": return `Entrée invalide : attendu ${issue$1.expected}, reçu ${parsedType$3(issue$1.input)}`;
4535
4689
  case "invalid_value":
4536
4690
  if (issue$1.values.length === 1) return `Entrée invalide : attendu ${stringifyPrimitive(issue$1.values[0])}`;
4537
4691
  return `Option invalide : attendu l'une des valeurs suivantes ${joinValues(issue$1.values, "|")}`;
@@ -4569,12 +4723,12 @@ const error$25 = () => {
4569
4723
  };
4570
4724
  };
4571
4725
  function fr_CA_default() {
4572
- return { localeError: error$25() };
4726
+ return { localeError: error$26() };
4573
4727
  }
4574
4728
 
4575
4729
  //#endregion
4576
- //#region ../../node_modules/zod/dist/esm/v4/locales/he.js
4577
- const error$24 = () => {
4730
+ //#region ../../node_modules/zod/v4/locales/he.js
4731
+ const error$25 = () => {
4578
4732
  const Sizable = {
4579
4733
  string: {
4580
4734
  unit: "אותיות",
@@ -4596,7 +4750,7 @@ const error$24 = () => {
4596
4750
  function getSizing(origin) {
4597
4751
  return Sizable[origin] ?? null;
4598
4752
  }
4599
- const parsedType$2 = (data) => {
4753
+ const parsedType$3 = (data) => {
4600
4754
  const t = typeof data;
4601
4755
  switch (t) {
4602
4756
  case "number": {
@@ -4648,7 +4802,7 @@ const error$24 = () => {
4648
4802
  };
4649
4803
  return (issue$1) => {
4650
4804
  switch (issue$1.code) {
4651
- case "invalid_type": return `קלט לא תקין: צריך ${issue$1.expected}, התקבל ${parsedType$2(issue$1.input)}`;
4805
+ case "invalid_type": return `קלט לא תקין: צריך ${issue$1.expected}, התקבל ${parsedType$3(issue$1.input)}`;
4652
4806
  case "invalid_value":
4653
4807
  if (issue$1.values.length === 1) return `קלט לא תקין: צריך ${stringifyPrimitive(issue$1.values[0])}`;
4654
4808
  return `קלט לא תקין: צריך אחת מהאפשרויות ${joinValues(issue$1.values, "|")}`;
@@ -4684,12 +4838,12 @@ const error$24 = () => {
4684
4838
  };
4685
4839
  };
4686
4840
  function he_default() {
4687
- return { localeError: error$24() };
4841
+ return { localeError: error$25() };
4688
4842
  }
4689
4843
 
4690
4844
  //#endregion
4691
- //#region ../../node_modules/zod/dist/esm/v4/locales/hu.js
4692
- const error$23 = () => {
4845
+ //#region ../../node_modules/zod/v4/locales/hu.js
4846
+ const error$24 = () => {
4693
4847
  const Sizable = {
4694
4848
  string: {
4695
4849
  unit: "karakter",
@@ -4711,7 +4865,7 @@ const error$23 = () => {
4711
4865
  function getSizing(origin) {
4712
4866
  return Sizable[origin] ?? null;
4713
4867
  }
4714
- const parsedType$2 = (data) => {
4868
+ const parsedType$3 = (data) => {
4715
4869
  const t = typeof data;
4716
4870
  switch (t) {
4717
4871
  case "number": {
@@ -4763,7 +4917,7 @@ const error$23 = () => {
4763
4917
  };
4764
4918
  return (issue$1) => {
4765
4919
  switch (issue$1.code) {
4766
- case "invalid_type": return `Érvénytelen bemenet: a várt érték ${issue$1.expected}, a kapott érték ${parsedType$2(issue$1.input)}`;
4920
+ case "invalid_type": return `Érvénytelen bemenet: a várt érték ${issue$1.expected}, a kapott érték ${parsedType$3(issue$1.input)}`;
4767
4921
  case "invalid_value":
4768
4922
  if (issue$1.values.length === 1) return `Érvénytelen bemenet: a várt érték ${stringifyPrimitive(issue$1.values[0])}`;
4769
4923
  return `Érvénytelen opció: valamelyik érték várt ${joinValues(issue$1.values, "|")}`;
@@ -4799,12 +4953,12 @@ const error$23 = () => {
4799
4953
  };
4800
4954
  };
4801
4955
  function hu_default() {
4802
- return { localeError: error$23() };
4956
+ return { localeError: error$24() };
4803
4957
  }
4804
4958
 
4805
4959
  //#endregion
4806
- //#region ../../node_modules/zod/dist/esm/v4/locales/id.js
4807
- const error$22 = () => {
4960
+ //#region ../../node_modules/zod/v4/locales/id.js
4961
+ const error$23 = () => {
4808
4962
  const Sizable = {
4809
4963
  string: {
4810
4964
  unit: "karakter",
@@ -4826,7 +4980,7 @@ const error$22 = () => {
4826
4980
  function getSizing(origin) {
4827
4981
  return Sizable[origin] ?? null;
4828
4982
  }
4829
- const parsedType$2 = (data) => {
4983
+ const parsedType$3 = (data) => {
4830
4984
  const t = typeof data;
4831
4985
  switch (t) {
4832
4986
  case "number": {
@@ -4878,7 +5032,7 @@ const error$22 = () => {
4878
5032
  };
4879
5033
  return (issue$1) => {
4880
5034
  switch (issue$1.code) {
4881
- case "invalid_type": return `Input tidak valid: diharapkan ${issue$1.expected}, diterima ${parsedType$2(issue$1.input)}`;
5035
+ case "invalid_type": return `Input tidak valid: diharapkan ${issue$1.expected}, diterima ${parsedType$3(issue$1.input)}`;
4882
5036
  case "invalid_value":
4883
5037
  if (issue$1.values.length === 1) return `Input tidak valid: diharapkan ${stringifyPrimitive(issue$1.values[0])}`;
4884
5038
  return `Pilihan tidak valid: diharapkan salah satu dari ${joinValues(issue$1.values, "|")}`;
@@ -4914,12 +5068,12 @@ const error$22 = () => {
4914
5068
  };
4915
5069
  };
4916
5070
  function id_default() {
4917
- return { localeError: error$22() };
5071
+ return { localeError: error$23() };
4918
5072
  }
4919
5073
 
4920
5074
  //#endregion
4921
- //#region ../../node_modules/zod/dist/esm/v4/locales/it.js
4922
- const error$21 = () => {
5075
+ //#region ../../node_modules/zod/v4/locales/it.js
5076
+ const error$22 = () => {
4923
5077
  const Sizable = {
4924
5078
  string: {
4925
5079
  unit: "caratteri",
@@ -4941,7 +5095,7 @@ const error$21 = () => {
4941
5095
  function getSizing(origin) {
4942
5096
  return Sizable[origin] ?? null;
4943
5097
  }
4944
- const parsedType$2 = (data) => {
5098
+ const parsedType$3 = (data) => {
4945
5099
  const t = typeof data;
4946
5100
  switch (t) {
4947
5101
  case "number": {
@@ -4993,7 +5147,7 @@ const error$21 = () => {
4993
5147
  };
4994
5148
  return (issue$1) => {
4995
5149
  switch (issue$1.code) {
4996
- case "invalid_type": return `Input non valido: atteso ${issue$1.expected}, ricevuto ${parsedType$2(issue$1.input)}`;
5150
+ case "invalid_type": return `Input non valido: atteso ${issue$1.expected}, ricevuto ${parsedType$3(issue$1.input)}`;
4997
5151
  case "invalid_value":
4998
5152
  if (issue$1.values.length === 1) return `Input non valido: atteso ${stringifyPrimitive(issue$1.values[0])}`;
4999
5153
  return `Opzione non valida: atteso uno tra ${joinValues(issue$1.values, "|")}`;
@@ -5029,12 +5183,12 @@ const error$21 = () => {
5029
5183
  };
5030
5184
  };
5031
5185
  function it_default() {
5032
- return { localeError: error$21() };
5186
+ return { localeError: error$22() };
5033
5187
  }
5034
5188
 
5035
5189
  //#endregion
5036
- //#region ../../node_modules/zod/dist/esm/v4/locales/ja.js
5037
- const error$20 = () => {
5190
+ //#region ../../node_modules/zod/v4/locales/ja.js
5191
+ const error$21 = () => {
5038
5192
  const Sizable = {
5039
5193
  string: {
5040
5194
  unit: "文字",
@@ -5056,7 +5210,7 @@ const error$20 = () => {
5056
5210
  function getSizing(origin) {
5057
5211
  return Sizable[origin] ?? null;
5058
5212
  }
5059
- const parsedType$2 = (data) => {
5213
+ const parsedType$3 = (data) => {
5060
5214
  const t = typeof data;
5061
5215
  switch (t) {
5062
5216
  case "number": {
@@ -5108,21 +5262,21 @@ const error$20 = () => {
5108
5262
  };
5109
5263
  return (issue$1) => {
5110
5264
  switch (issue$1.code) {
5111
- case "invalid_type": return `無効な入力: ${issue$1.expected}が期待されましたが、${parsedType$2(issue$1.input)}が入力されました`;
5265
+ case "invalid_type": return `無効な入力: ${issue$1.expected}が期待されましたが、${parsedType$3(issue$1.input)}が入力されました`;
5112
5266
  case "invalid_value":
5113
5267
  if (issue$1.values.length === 1) return `無効な入力: ${stringifyPrimitive(issue$1.values[0])}が期待されました`;
5114
5268
  return `無効な選択: ${joinValues(issue$1.values, "、")}のいずれかである必要があります`;
5115
5269
  case "too_big": {
5116
- const adj = issue$1.inclusive ? "<=" : "<";
5270
+ const adj = issue$1.inclusive ? "以下である" : "より小さい";
5117
5271
  const sizing = getSizing(issue$1.origin);
5118
- if (sizing) return `大きすぎる値: ${issue$1.origin ?? "値"}は${issue$1.maximum.toString()}${sizing.unit ?? "要素"}${adj}である必要があります`;
5119
- return `大きすぎる値: ${issue$1.origin ?? "値"}は${issue$1.maximum.toString()}${adj}である必要があります`;
5272
+ if (sizing) return `大きすぎる値: ${issue$1.origin ?? "値"}は${issue$1.maximum.toString()}${sizing.unit ?? "要素"}${adj}必要があります`;
5273
+ return `大きすぎる値: ${issue$1.origin ?? "値"}は${issue$1.maximum.toString()}${adj}必要があります`;
5120
5274
  }
5121
5275
  case "too_small": {
5122
- const adj = issue$1.inclusive ? ">=" : ">";
5276
+ const adj = issue$1.inclusive ? "以上である" : "より大きい";
5123
5277
  const sizing = getSizing(issue$1.origin);
5124
- if (sizing) return `小さすぎる値: ${issue$1.origin}は${issue$1.minimum.toString()}${sizing.unit}${adj}である必要があります`;
5125
- return `小さすぎる値: ${issue$1.origin}は${issue$1.minimum.toString()}${adj}である必要があります`;
5278
+ if (sizing) return `小さすぎる値: ${issue$1.origin}は${issue$1.minimum.toString()}${sizing.unit}${adj}必要があります`;
5279
+ return `小さすぎる値: ${issue$1.origin}は${issue$1.minimum.toString()}${adj}必要があります`;
5126
5280
  }
5127
5281
  case "invalid_format": {
5128
5282
  const _issue = issue$1;
@@ -5142,12 +5296,12 @@ const error$20 = () => {
5142
5296
  };
5143
5297
  };
5144
5298
  function ja_default() {
5145
- return { localeError: error$20() };
5299
+ return { localeError: error$21() };
5146
5300
  }
5147
5301
 
5148
5302
  //#endregion
5149
- //#region ../../node_modules/zod/dist/esm/v4/locales/kh.js
5150
- const error$19 = () => {
5303
+ //#region ../../node_modules/zod/v4/locales/kh.js
5304
+ const error$20 = () => {
5151
5305
  const Sizable = {
5152
5306
  string: {
5153
5307
  unit: "តួអក្សរ",
@@ -5169,7 +5323,7 @@ const error$19 = () => {
5169
5323
  function getSizing(origin) {
5170
5324
  return Sizable[origin] ?? null;
5171
5325
  }
5172
- const parsedType$2 = (data) => {
5326
+ const parsedType$3 = (data) => {
5173
5327
  const t = typeof data;
5174
5328
  switch (t) {
5175
5329
  case "number": {
@@ -5221,7 +5375,7 @@ const error$19 = () => {
5221
5375
  };
5222
5376
  return (issue$1) => {
5223
5377
  switch (issue$1.code) {
5224
- case "invalid_type": return `ទិន្នន័យបញ្ចូលមិនត្រឹមត្រូវ៖ ត្រូវការ ${issue$1.expected} ប៉ុន្តែទទួលបាន ${parsedType$2(issue$1.input)}`;
5378
+ case "invalid_type": return `ទិន្នន័យបញ្ចូលមិនត្រឹមត្រូវ៖ ត្រូវការ ${issue$1.expected} ប៉ុន្តែទទួលបាន ${parsedType$3(issue$1.input)}`;
5225
5379
  case "invalid_value":
5226
5380
  if (issue$1.values.length === 1) return `ទិន្នន័យបញ្ចូលមិនត្រឹមត្រូវ៖ ត្រូវការ ${stringifyPrimitive(issue$1.values[0])}`;
5227
5381
  return `ជម្រើសមិនត្រឹមត្រូវ៖ ត្រូវជាមួយក្នុងចំណោម ${joinValues(issue$1.values, "|")}`;
@@ -5259,12 +5413,12 @@ const error$19 = () => {
5259
5413
  };
5260
5414
  };
5261
5415
  function kh_default() {
5262
- return { localeError: error$19() };
5416
+ return { localeError: error$20() };
5263
5417
  }
5264
5418
 
5265
5419
  //#endregion
5266
- //#region ../../node_modules/zod/dist/esm/v4/locales/ko.js
5267
- const error$18 = () => {
5420
+ //#region ../../node_modules/zod/v4/locales/ko.js
5421
+ const error$19 = () => {
5268
5422
  const Sizable = {
5269
5423
  string: {
5270
5424
  unit: "문자",
@@ -5286,7 +5440,7 @@ const error$18 = () => {
5286
5440
  function getSizing(origin) {
5287
5441
  return Sizable[origin] ?? null;
5288
5442
  }
5289
- const parsedType$2 = (data) => {
5443
+ const parsedType$3 = (data) => {
5290
5444
  const t = typeof data;
5291
5445
  switch (t) {
5292
5446
  case "number": {
@@ -5338,7 +5492,7 @@ const error$18 = () => {
5338
5492
  };
5339
5493
  return (issue$1) => {
5340
5494
  switch (issue$1.code) {
5341
- case "invalid_type": return `잘못된 입력: 예상 타입은 ${issue$1.expected}, 받은 타입은 ${parsedType$2(issue$1.input)}입니다`;
5495
+ case "invalid_type": return `잘못된 입력: 예상 타입은 ${issue$1.expected}, 받은 타입은 ${parsedType$3(issue$1.input)}입니다`;
5342
5496
  case "invalid_value":
5343
5497
  if (issue$1.values.length === 1) return `잘못된 입력: 값은 ${stringifyPrimitive(issue$1.values[0])} 이어야 합니다`;
5344
5498
  return `잘못된 옵션: ${joinValues(issue$1.values, "또는 ")} 중 하나여야 합니다`;
@@ -5380,12 +5534,12 @@ const error$18 = () => {
5380
5534
  };
5381
5535
  };
5382
5536
  function ko_default() {
5383
- return { localeError: error$18() };
5537
+ return { localeError: error$19() };
5384
5538
  }
5385
5539
 
5386
5540
  //#endregion
5387
- //#region ../../node_modules/zod/dist/esm/v4/locales/mk.js
5388
- const error$17 = () => {
5541
+ //#region ../../node_modules/zod/v4/locales/mk.js
5542
+ const error$18 = () => {
5389
5543
  const Sizable = {
5390
5544
  string: {
5391
5545
  unit: "знаци",
@@ -5407,7 +5561,7 @@ const error$17 = () => {
5407
5561
  function getSizing(origin) {
5408
5562
  return Sizable[origin] ?? null;
5409
5563
  }
5410
- const parsedType$2 = (data) => {
5564
+ const parsedType$3 = (data) => {
5411
5565
  const t = typeof data;
5412
5566
  switch (t) {
5413
5567
  case "number": {
@@ -5459,7 +5613,7 @@ const error$17 = () => {
5459
5613
  };
5460
5614
  return (issue$1) => {
5461
5615
  switch (issue$1.code) {
5462
- case "invalid_type": return `Грешен внес: се очекува ${issue$1.expected}, примено ${parsedType$2(issue$1.input)}`;
5616
+ case "invalid_type": return `Грешен внес: се очекува ${issue$1.expected}, примено ${parsedType$3(issue$1.input)}`;
5463
5617
  case "invalid_value":
5464
5618
  if (issue$1.values.length === 1) return `Invalid input: expected ${stringifyPrimitive(issue$1.values[0])}`;
5465
5619
  return `Грешана опција: се очекува една ${joinValues(issue$1.values, "|")}`;
@@ -5497,12 +5651,12 @@ const error$17 = () => {
5497
5651
  };
5498
5652
  };
5499
5653
  function mk_default() {
5500
- return { localeError: error$17() };
5654
+ return { localeError: error$18() };
5501
5655
  }
5502
5656
 
5503
5657
  //#endregion
5504
- //#region ../../node_modules/zod/dist/esm/v4/locales/ms.js
5505
- const error$16 = () => {
5658
+ //#region ../../node_modules/zod/v4/locales/ms.js
5659
+ const error$17 = () => {
5506
5660
  const Sizable = {
5507
5661
  string: {
5508
5662
  unit: "aksara",
@@ -5524,7 +5678,7 @@ const error$16 = () => {
5524
5678
  function getSizing(origin) {
5525
5679
  return Sizable[origin] ?? null;
5526
5680
  }
5527
- const parsedType$2 = (data) => {
5681
+ const parsedType$3 = (data) => {
5528
5682
  const t = typeof data;
5529
5683
  switch (t) {
5530
5684
  case "number": {
@@ -5576,7 +5730,7 @@ const error$16 = () => {
5576
5730
  };
5577
5731
  return (issue$1) => {
5578
5732
  switch (issue$1.code) {
5579
- case "invalid_type": return `Input tidak sah: dijangka ${issue$1.expected}, diterima ${parsedType$2(issue$1.input)}`;
5733
+ case "invalid_type": return `Input tidak sah: dijangka ${issue$1.expected}, diterima ${parsedType$3(issue$1.input)}`;
5580
5734
  case "invalid_value":
5581
5735
  if (issue$1.values.length === 1) return `Input tidak sah: dijangka ${stringifyPrimitive(issue$1.values[0])}`;
5582
5736
  return `Pilihan tidak sah: dijangka salah satu daripada ${joinValues(issue$1.values, "|")}`;
@@ -5612,12 +5766,12 @@ const error$16 = () => {
5612
5766
  };
5613
5767
  };
5614
5768
  function ms_default() {
5615
- return { localeError: error$16() };
5769
+ return { localeError: error$17() };
5616
5770
  }
5617
5771
 
5618
5772
  //#endregion
5619
- //#region ../../node_modules/zod/dist/esm/v4/locales/nl.js
5620
- const error$15 = () => {
5773
+ //#region ../../node_modules/zod/v4/locales/nl.js
5774
+ const error$16 = () => {
5621
5775
  const Sizable = {
5622
5776
  string: { unit: "tekens" },
5623
5777
  file: { unit: "bytes" },
@@ -5627,7 +5781,7 @@ const error$15 = () => {
5627
5781
  function getSizing(origin) {
5628
5782
  return Sizable[origin] ?? null;
5629
5783
  }
5630
- const parsedType$2 = (data) => {
5784
+ const parsedType$3 = (data) => {
5631
5785
  const t = typeof data;
5632
5786
  switch (t) {
5633
5787
  case "number": {
@@ -5679,7 +5833,7 @@ const error$15 = () => {
5679
5833
  };
5680
5834
  return (issue$1) => {
5681
5835
  switch (issue$1.code) {
5682
- case "invalid_type": return `Ongeldige invoer: verwacht ${issue$1.expected}, ontving ${parsedType$2(issue$1.input)}`;
5836
+ case "invalid_type": return `Ongeldige invoer: verwacht ${issue$1.expected}, ontving ${parsedType$3(issue$1.input)}`;
5683
5837
  case "invalid_value":
5684
5838
  if (issue$1.values.length === 1) return `Ongeldige invoer: verwacht ${stringifyPrimitive(issue$1.values[0])}`;
5685
5839
  return `Ongeldige optie: verwacht één van ${joinValues(issue$1.values, "|")}`;
@@ -5717,12 +5871,12 @@ const error$15 = () => {
5717
5871
  };
5718
5872
  };
5719
5873
  function nl_default() {
5720
- return { localeError: error$15() };
5874
+ return { localeError: error$16() };
5721
5875
  }
5722
5876
 
5723
5877
  //#endregion
5724
- //#region ../../node_modules/zod/dist/esm/v4/locales/no.js
5725
- const error$14 = () => {
5878
+ //#region ../../node_modules/zod/v4/locales/no.js
5879
+ const error$15 = () => {
5726
5880
  const Sizable = {
5727
5881
  string: {
5728
5882
  unit: "tegn",
@@ -5744,7 +5898,7 @@ const error$14 = () => {
5744
5898
  function getSizing(origin) {
5745
5899
  return Sizable[origin] ?? null;
5746
5900
  }
5747
- const parsedType$2 = (data) => {
5901
+ const parsedType$3 = (data) => {
5748
5902
  const t = typeof data;
5749
5903
  switch (t) {
5750
5904
  case "number": {
@@ -5796,7 +5950,7 @@ const error$14 = () => {
5796
5950
  };
5797
5951
  return (issue$1) => {
5798
5952
  switch (issue$1.code) {
5799
- case "invalid_type": return `Ugyldig input: forventet ${issue$1.expected}, fikk ${parsedType$2(issue$1.input)}`;
5953
+ case "invalid_type": return `Ugyldig input: forventet ${issue$1.expected}, fikk ${parsedType$3(issue$1.input)}`;
5800
5954
  case "invalid_value":
5801
5955
  if (issue$1.values.length === 1) return `Ugyldig verdi: forventet ${stringifyPrimitive(issue$1.values[0])}`;
5802
5956
  return `Ugyldig valg: forventet en av ${joinValues(issue$1.values, "|")}`;
@@ -5832,12 +5986,12 @@ const error$14 = () => {
5832
5986
  };
5833
5987
  };
5834
5988
  function no_default() {
5835
- return { localeError: error$14() };
5989
+ return { localeError: error$15() };
5836
5990
  }
5837
5991
 
5838
5992
  //#endregion
5839
- //#region ../../node_modules/zod/dist/esm/v4/locales/ota.js
5840
- const error$13 = () => {
5993
+ //#region ../../node_modules/zod/v4/locales/ota.js
5994
+ const error$14 = () => {
5841
5995
  const Sizable = {
5842
5996
  string: {
5843
5997
  unit: "harf",
@@ -5859,7 +6013,7 @@ const error$13 = () => {
5859
6013
  function getSizing(origin) {
5860
6014
  return Sizable[origin] ?? null;
5861
6015
  }
5862
- const parsedType$2 = (data) => {
6016
+ const parsedType$3 = (data) => {
5863
6017
  const t = typeof data;
5864
6018
  switch (t) {
5865
6019
  case "number": {
@@ -5911,7 +6065,7 @@ const error$13 = () => {
5911
6065
  };
5912
6066
  return (issue$1) => {
5913
6067
  switch (issue$1.code) {
5914
- case "invalid_type": return `Fâsit giren: umulan ${issue$1.expected}, alınan ${parsedType$2(issue$1.input)}`;
6068
+ case "invalid_type": return `Fâsit giren: umulan ${issue$1.expected}, alınan ${parsedType$3(issue$1.input)}`;
5915
6069
  case "invalid_value":
5916
6070
  if (issue$1.values.length === 1) return `Fâsit giren: umulan ${stringifyPrimitive(issue$1.values[0])}`;
5917
6071
  return `Fâsit tercih: mûteberler ${joinValues(issue$1.values, "|")}`;
@@ -5947,11 +6101,138 @@ const error$13 = () => {
5947
6101
  };
5948
6102
  };
5949
6103
  function ota_default() {
6104
+ return { localeError: error$14() };
6105
+ }
6106
+
6107
+ //#endregion
6108
+ //#region ../../node_modules/zod/v4/locales/ps.js
6109
+ const error$13 = () => {
6110
+ const Sizable = {
6111
+ string: {
6112
+ unit: "توکي",
6113
+ verb: "ولري"
6114
+ },
6115
+ file: {
6116
+ unit: "بایټس",
6117
+ verb: "ولري"
6118
+ },
6119
+ array: {
6120
+ unit: "توکي",
6121
+ verb: "ولري"
6122
+ },
6123
+ set: {
6124
+ unit: "توکي",
6125
+ verb: "ولري"
6126
+ }
6127
+ };
6128
+ function getSizing(origin) {
6129
+ return Sizable[origin] ?? null;
6130
+ }
6131
+ const parsedType$3 = (data) => {
6132
+ const t = typeof data;
6133
+ switch (t) {
6134
+ case "number": {
6135
+ return Number.isNaN(data) ? "NaN" : "عدد";
6136
+ }
6137
+ case "object": {
6138
+ if (Array.isArray(data)) {
6139
+ return "ارې";
6140
+ }
6141
+ if (data === null) {
6142
+ return "null";
6143
+ }
6144
+ if (Object.getPrototypeOf(data) !== Object.prototype && data.constructor) {
6145
+ return data.constructor.name;
6146
+ }
6147
+ }
6148
+ }
6149
+ return t;
6150
+ };
6151
+ const Nouns = {
6152
+ regex: "ورودي",
6153
+ email: "بریښنالیک",
6154
+ url: "یو آر ال",
6155
+ emoji: "ایموجي",
6156
+ uuid: "UUID",
6157
+ uuidv4: "UUIDv4",
6158
+ uuidv6: "UUIDv6",
6159
+ nanoid: "nanoid",
6160
+ guid: "GUID",
6161
+ cuid: "cuid",
6162
+ cuid2: "cuid2",
6163
+ ulid: "ULID",
6164
+ xid: "XID",
6165
+ ksuid: "KSUID",
6166
+ datetime: "نیټه او وخت",
6167
+ date: "نېټه",
6168
+ time: "وخت",
6169
+ duration: "موده",
6170
+ ipv4: "د IPv4 پته",
6171
+ ipv6: "د IPv6 پته",
6172
+ cidrv4: "د IPv4 ساحه",
6173
+ cidrv6: "د IPv6 ساحه",
6174
+ base64: "base64-encoded متن",
6175
+ base64url: "base64url-encoded متن",
6176
+ json_string: "JSON متن",
6177
+ e164: "د E.164 شمېره",
6178
+ jwt: "JWT",
6179
+ template_literal: "ورودي"
6180
+ };
6181
+ return (issue$1) => {
6182
+ switch (issue$1.code) {
6183
+ case "invalid_type": return `ناسم ورودي: باید ${issue$1.expected} وای, مګر ${parsedType$3(issue$1.input)} ترلاسه شو`;
6184
+ case "invalid_value":
6185
+ if (issue$1.values.length === 1) {
6186
+ return `ناسم ورودي: باید ${stringifyPrimitive(issue$1.values[0])} وای`;
6187
+ }
6188
+ return `ناسم انتخاب: باید یو له ${joinValues(issue$1.values, "|")} څخه وای`;
6189
+ case "too_big": {
6190
+ const adj = issue$1.inclusive ? "<=" : "<";
6191
+ const sizing = getSizing(issue$1.origin);
6192
+ if (sizing) {
6193
+ return `ډیر لوی: ${issue$1.origin ?? "ارزښت"} باید ${adj}${issue$1.maximum.toString()} ${sizing.unit ?? "عنصرونه"} ولري`;
6194
+ }
6195
+ return `ډیر لوی: ${issue$1.origin ?? "ارزښت"} باید ${adj}${issue$1.maximum.toString()} وي`;
6196
+ }
6197
+ case "too_small": {
6198
+ const adj = issue$1.inclusive ? ">=" : ">";
6199
+ const sizing = getSizing(issue$1.origin);
6200
+ if (sizing) {
6201
+ return `ډیر کوچنی: ${issue$1.origin} باید ${adj}${issue$1.minimum.toString()} ${sizing.unit} ولري`;
6202
+ }
6203
+ return `ډیر کوچنی: ${issue$1.origin} باید ${adj}${issue$1.minimum.toString()} وي`;
6204
+ }
6205
+ case "invalid_format": {
6206
+ const _issue = issue$1;
6207
+ if (_issue.format === "starts_with") {
6208
+ return `ناسم متن: باید د "${_issue.prefix}" سره پیل شي`;
6209
+ }
6210
+ if (_issue.format === "ends_with") {
6211
+ return `ناسم متن: باید د "${_issue.suffix}" سره پای ته ورسيږي`;
6212
+ }
6213
+ if (_issue.format === "includes") {
6214
+ return `ناسم متن: باید "${_issue.includes}" ولري`;
6215
+ }
6216
+ if (_issue.format === "regex") {
6217
+ return `ناسم متن: باید د ${_issue.pattern} سره مطابقت ولري`;
6218
+ }
6219
+ return `${Nouns[_issue.format] ?? issue$1.format} ناسم دی`;
6220
+ }
6221
+ case "not_multiple_of": return `ناسم عدد: باید د ${issue$1.divisor} مضرب وي`;
6222
+ case "unrecognized_keys": return `ناسم ${issue$1.keys.length > 1 ? "کلیډونه" : "کلیډ"}: ${joinValues(issue$1.keys, ", ")}`;
6223
+ case "invalid_key": return `ناسم کلیډ په ${issue$1.origin} کې`;
6224
+ case "invalid_union": return `ناسمه ورودي`;
6225
+ case "invalid_element": return `ناسم عنصر په ${issue$1.origin} کې`;
6226
+ default: return `ناسمه ورودي`;
6227
+ }
6228
+ };
6229
+ };
6230
+ function ps_default() {
5950
6231
  return { localeError: error$13() };
5951
6232
  }
5952
6233
 
5953
6234
  //#endregion
5954
- //#region ../../node_modules/zod/dist/esm/v4/locales/pl.js
6235
+ //#region ../../node_modules/zod/v4/locales/pl.js
5955
6236
  const error$12 = () => {
5956
6237
  const Sizable = {
5957
6238
  string: {
@@ -5974,7 +6255,7 @@ const error$12 = () => {
5974
6255
  function getSizing(origin) {
5975
6256
  return Sizable[origin] ?? null;
5976
6257
  }
5977
- const parsedType$2 = (data) => {
6258
+ const parsedType$3 = (data) => {
5978
6259
  const t = typeof data;
5979
6260
  switch (t) {
5980
6261
  case "number": {
@@ -6026,7 +6307,7 @@ const error$12 = () => {
6026
6307
  };
6027
6308
  return (issue$1) => {
6028
6309
  switch (issue$1.code) {
6029
- case "invalid_type": return `Nieprawidłowe dane wejściowe: oczekiwano ${issue$1.expected}, otrzymano ${parsedType$2(issue$1.input)}`;
6310
+ case "invalid_type": return `Nieprawidłowe dane wejściowe: oczekiwano ${issue$1.expected}, otrzymano ${parsedType$3(issue$1.input)}`;
6030
6311
  case "invalid_value":
6031
6312
  if (issue$1.values.length === 1) return `Nieprawidłowe dane wejściowe: oczekiwano ${stringifyPrimitive(issue$1.values[0])}`;
6032
6313
  return `Nieprawidłowa opcja: oczekiwano jednej z wartości ${joinValues(issue$1.values, "|")}`;
@@ -6068,7 +6349,7 @@ function pl_default() {
6068
6349
  }
6069
6350
 
6070
6351
  //#endregion
6071
- //#region ../../node_modules/zod/dist/esm/v4/locales/pt.js
6352
+ //#region ../../node_modules/zod/v4/locales/pt.js
6072
6353
  const error$11 = () => {
6073
6354
  const Sizable = {
6074
6355
  string: {
@@ -6091,7 +6372,7 @@ const error$11 = () => {
6091
6372
  function getSizing(origin) {
6092
6373
  return Sizable[origin] ?? null;
6093
6374
  }
6094
- const parsedType$2 = (data) => {
6375
+ const parsedType$3 = (data) => {
6095
6376
  const t = typeof data;
6096
6377
  switch (t) {
6097
6378
  case "number": {
@@ -6143,7 +6424,7 @@ const error$11 = () => {
6143
6424
  };
6144
6425
  return (issue$1) => {
6145
6426
  switch (issue$1.code) {
6146
- case "invalid_type": return `Tipo inválido: esperado ${issue$1.expected}, recebido ${parsedType$2(issue$1.input)}`;
6427
+ case "invalid_type": return `Tipo inválido: esperado ${issue$1.expected}, recebido ${parsedType$3(issue$1.input)}`;
6147
6428
  case "invalid_value":
6148
6429
  if (issue$1.values.length === 1) return `Entrada inválida: esperado ${stringifyPrimitive(issue$1.values[0])}`;
6149
6430
  return `Opção inválida: esperada uma das ${joinValues(issue$1.values, "|")}`;
@@ -6183,7 +6464,7 @@ function pt_default() {
6183
6464
  }
6184
6465
 
6185
6466
  //#endregion
6186
- //#region ../../node_modules/zod/dist/esm/v4/locales/ru.js
6467
+ //#region ../../node_modules/zod/v4/locales/ru.js
6187
6468
  function getRussianPlural(count, one, few, many) {
6188
6469
  const absCount = Math.abs(count);
6189
6470
  const lastDigit = absCount % 10;
@@ -6237,7 +6518,7 @@ const error$10 = () => {
6237
6518
  function getSizing(origin) {
6238
6519
  return Sizable[origin] ?? null;
6239
6520
  }
6240
- const parsedType$2 = (data) => {
6521
+ const parsedType$3 = (data) => {
6241
6522
  const t = typeof data;
6242
6523
  switch (t) {
6243
6524
  case "number": {
@@ -6289,7 +6570,7 @@ const error$10 = () => {
6289
6570
  };
6290
6571
  return (issue$1) => {
6291
6572
  switch (issue$1.code) {
6292
- case "invalid_type": return `Неверный ввод: ожидалось ${issue$1.expected}, получено ${parsedType$2(issue$1.input)}`;
6573
+ case "invalid_type": return `Неверный ввод: ожидалось ${issue$1.expected}, получено ${parsedType$3(issue$1.input)}`;
6293
6574
  case "invalid_value":
6294
6575
  if (issue$1.values.length === 1) return `Неверный ввод: ожидалось ${stringifyPrimitive(issue$1.values[0])}`;
6295
6576
  return `Неверный вариант: ожидалось одно из ${joinValues(issue$1.values, "|")}`;
@@ -6335,7 +6616,7 @@ function ru_default() {
6335
6616
  }
6336
6617
 
6337
6618
  //#endregion
6338
- //#region ../../node_modules/zod/dist/esm/v4/locales/sl.js
6619
+ //#region ../../node_modules/zod/v4/locales/sl.js
6339
6620
  const error$9 = () => {
6340
6621
  const Sizable = {
6341
6622
  string: {
@@ -6358,7 +6639,7 @@ const error$9 = () => {
6358
6639
  function getSizing(origin) {
6359
6640
  return Sizable[origin] ?? null;
6360
6641
  }
6361
- const parsedType$2 = (data) => {
6642
+ const parsedType$3 = (data) => {
6362
6643
  const t = typeof data;
6363
6644
  switch (t) {
6364
6645
  case "number": {
@@ -6410,7 +6691,7 @@ const error$9 = () => {
6410
6691
  };
6411
6692
  return (issue$1) => {
6412
6693
  switch (issue$1.code) {
6413
- case "invalid_type": return `Neveljaven vnos: pričakovano ${issue$1.expected}, prejeto ${parsedType$2(issue$1.input)}`;
6694
+ case "invalid_type": return `Neveljaven vnos: pričakovano ${issue$1.expected}, prejeto ${parsedType$3(issue$1.input)}`;
6414
6695
  case "invalid_value":
6415
6696
  if (issue$1.values.length === 1) return `Neveljaven vnos: pričakovano ${stringifyPrimitive(issue$1.values[0])}`;
6416
6697
  return `Neveljavna možnost: pričakovano eno izmed ${joinValues(issue$1.values, "|")}`;
@@ -6452,7 +6733,7 @@ function sl_default() {
6452
6733
  }
6453
6734
 
6454
6735
  //#endregion
6455
- //#region ../../node_modules/zod/dist/esm/v4/locales/sv.js
6736
+ //#region ../../node_modules/zod/v4/locales/sv.js
6456
6737
  const error$8 = () => {
6457
6738
  const Sizable = {
6458
6739
  string: {
@@ -6475,7 +6756,7 @@ const error$8 = () => {
6475
6756
  function getSizing(origin) {
6476
6757
  return Sizable[origin] ?? null;
6477
6758
  }
6478
- const parsedType$2 = (data) => {
6759
+ const parsedType$3 = (data) => {
6479
6760
  const t = typeof data;
6480
6761
  switch (t) {
6481
6762
  case "number": {
@@ -6527,7 +6808,7 @@ const error$8 = () => {
6527
6808
  };
6528
6809
  return (issue$1) => {
6529
6810
  switch (issue$1.code) {
6530
- case "invalid_type": return `Ogiltig inmatning: förväntat ${issue$1.expected}, fick ${parsedType$2(issue$1.input)}`;
6811
+ case "invalid_type": return `Ogiltig inmatning: förväntat ${issue$1.expected}, fick ${parsedType$3(issue$1.input)}`;
6531
6812
  case "invalid_value":
6532
6813
  if (issue$1.values.length === 1) return `Ogiltig inmatning: förväntat ${stringifyPrimitive(issue$1.values[0])}`;
6533
6814
  return `Ogiltigt val: förväntade en av ${joinValues(issue$1.values, "|")}`;
@@ -6571,7 +6852,7 @@ function sv_default() {
6571
6852
  }
6572
6853
 
6573
6854
  //#endregion
6574
- //#region ../../node_modules/zod/dist/esm/v4/locales/ta.js
6855
+ //#region ../../node_modules/zod/v4/locales/ta.js
6575
6856
  const error$7 = () => {
6576
6857
  const Sizable = {
6577
6858
  string: {
@@ -6594,7 +6875,7 @@ const error$7 = () => {
6594
6875
  function getSizing(origin) {
6595
6876
  return Sizable[origin] ?? null;
6596
6877
  }
6597
- const parsedType$2 = (data) => {
6878
+ const parsedType$3 = (data) => {
6598
6879
  const t = typeof data;
6599
6880
  switch (t) {
6600
6881
  case "number": {
@@ -6646,7 +6927,7 @@ const error$7 = () => {
6646
6927
  };
6647
6928
  return (issue$1) => {
6648
6929
  switch (issue$1.code) {
6649
- case "invalid_type": return `தவறான உள்ளீடு: எதிர்பார்க்கப்பட்டது ${issue$1.expected}, பெறப்பட்டது ${parsedType$2(issue$1.input)}`;
6930
+ case "invalid_type": return `தவறான உள்ளீடு: எதிர்பார்க்கப்பட்டது ${issue$1.expected}, பெறப்பட்டது ${parsedType$3(issue$1.input)}`;
6650
6931
  case "invalid_value":
6651
6932
  if (issue$1.values.length === 1) return `தவறான உள்ளீடு: எதிர்பார்க்கப்பட்டது ${stringifyPrimitive(issue$1.values[0])}`;
6652
6933
  return `தவறான விருப்பம்: எதிர்பார்க்கப்பட்டது ${joinValues(issue$1.values, "|")} இல் ஒன்று`;
@@ -6688,7 +6969,7 @@ function ta_default() {
6688
6969
  }
6689
6970
 
6690
6971
  //#endregion
6691
- //#region ../../node_modules/zod/dist/esm/v4/locales/th.js
6972
+ //#region ../../node_modules/zod/v4/locales/th.js
6692
6973
  const error$6 = () => {
6693
6974
  const Sizable = {
6694
6975
  string: {
@@ -6711,7 +6992,7 @@ const error$6 = () => {
6711
6992
  function getSizing(origin) {
6712
6993
  return Sizable[origin] ?? null;
6713
6994
  }
6714
- const parsedType$2 = (data) => {
6995
+ const parsedType$3 = (data) => {
6715
6996
  const t = typeof data;
6716
6997
  switch (t) {
6717
6998
  case "number": {
@@ -6763,7 +7044,7 @@ const error$6 = () => {
6763
7044
  };
6764
7045
  return (issue$1) => {
6765
7046
  switch (issue$1.code) {
6766
- case "invalid_type": return `ประเภทข้อมูลไม่ถูกต้อง: ควรเป็น ${issue$1.expected} แต่ได้รับ ${parsedType$2(issue$1.input)}`;
7047
+ case "invalid_type": return `ประเภทข้อมูลไม่ถูกต้อง: ควรเป็น ${issue$1.expected} แต่ได้รับ ${parsedType$3(issue$1.input)}`;
6767
7048
  case "invalid_value":
6768
7049
  if (issue$1.values.length === 1) return `ค่าไม่ถูกต้อง: ควรเป็น ${stringifyPrimitive(issue$1.values[0])}`;
6769
7050
  return `ตัวเลือกไม่ถูกต้อง: ควรเป็นหนึ่งใน ${joinValues(issue$1.values, "|")}`;
@@ -6805,7 +7086,7 @@ function th_default() {
6805
7086
  }
6806
7087
 
6807
7088
  //#endregion
6808
- //#region ../../node_modules/zod/dist/esm/v4/locales/tr.js
7089
+ //#region ../../node_modules/zod/v4/locales/tr.js
6809
7090
  const parsedType = (data) => {
6810
7091
  const t = typeof data;
6811
7092
  switch (t) {
@@ -6918,7 +7199,7 @@ function tr_default() {
6918
7199
  }
6919
7200
 
6920
7201
  //#endregion
6921
- //#region ../../node_modules/zod/dist/esm/v4/locales/ua.js
7202
+ //#region ../../node_modules/zod/v4/locales/ua.js
6922
7203
  const error$4 = () => {
6923
7204
  const Sizable = {
6924
7205
  string: {
@@ -6941,7 +7222,7 @@ const error$4 = () => {
6941
7222
  function getSizing(origin) {
6942
7223
  return Sizable[origin] ?? null;
6943
7224
  }
6944
- const parsedType$2 = (data) => {
7225
+ const parsedType$3 = (data) => {
6945
7226
  const t = typeof data;
6946
7227
  switch (t) {
6947
7228
  case "number": {
@@ -6993,7 +7274,7 @@ const error$4 = () => {
6993
7274
  };
6994
7275
  return (issue$1) => {
6995
7276
  switch (issue$1.code) {
6996
- case "invalid_type": return `Неправильні вхідні дані: очікується ${issue$1.expected}, отримано ${parsedType$2(issue$1.input)}`;
7277
+ case "invalid_type": return `Неправильні вхідні дані: очікується ${issue$1.expected}, отримано ${parsedType$3(issue$1.input)}`;
6997
7278
  case "invalid_value":
6998
7279
  if (issue$1.values.length === 1) return `Неправильні вхідні дані: очікується ${stringifyPrimitive(issue$1.values[0])}`;
6999
7280
  return `Неправильна опція: очікується одне з ${joinValues(issue$1.values, "|")}`;
@@ -7033,7 +7314,7 @@ function ua_default() {
7033
7314
  }
7034
7315
 
7035
7316
  //#endregion
7036
- //#region ../../node_modules/zod/dist/esm/v4/locales/ur.js
7317
+ //#region ../../node_modules/zod/v4/locales/ur.js
7037
7318
  const error$3 = () => {
7038
7319
  const Sizable = {
7039
7320
  string: {
@@ -7056,7 +7337,7 @@ const error$3 = () => {
7056
7337
  function getSizing(origin) {
7057
7338
  return Sizable[origin] ?? null;
7058
7339
  }
7059
- const parsedType$2 = (data) => {
7340
+ const parsedType$3 = (data) => {
7060
7341
  const t = typeof data;
7061
7342
  switch (t) {
7062
7343
  case "number": {
@@ -7108,7 +7389,7 @@ const error$3 = () => {
7108
7389
  };
7109
7390
  return (issue$1) => {
7110
7391
  switch (issue$1.code) {
7111
- case "invalid_type": return `غلط ان پٹ: ${issue$1.expected} متوقع تھا، ${parsedType$2(issue$1.input)} موصول ہوا`;
7392
+ case "invalid_type": return `غلط ان پٹ: ${issue$1.expected} متوقع تھا، ${parsedType$3(issue$1.input)} موصول ہوا`;
7112
7393
  case "invalid_value":
7113
7394
  if (issue$1.values.length === 1) return `غلط ان پٹ: ${stringifyPrimitive(issue$1.values[0])} متوقع تھا`;
7114
7395
  return `غلط آپشن: ${joinValues(issue$1.values, "|")} میں سے ایک متوقع تھا`;
@@ -7150,7 +7431,7 @@ function ur_default() {
7150
7431
  }
7151
7432
 
7152
7433
  //#endregion
7153
- //#region ../../node_modules/zod/dist/esm/v4/locales/vi.js
7434
+ //#region ../../node_modules/zod/v4/locales/vi.js
7154
7435
  const error$2 = () => {
7155
7436
  const Sizable = {
7156
7437
  string: {
@@ -7173,7 +7454,7 @@ const error$2 = () => {
7173
7454
  function getSizing(origin) {
7174
7455
  return Sizable[origin] ?? null;
7175
7456
  }
7176
- const parsedType$2 = (data) => {
7457
+ const parsedType$3 = (data) => {
7177
7458
  const t = typeof data;
7178
7459
  switch (t) {
7179
7460
  case "number": {
@@ -7225,7 +7506,7 @@ const error$2 = () => {
7225
7506
  };
7226
7507
  return (issue$1) => {
7227
7508
  switch (issue$1.code) {
7228
- case "invalid_type": return `Đầu vào không hợp lệ: mong đợi ${issue$1.expected}, nhận được ${parsedType$2(issue$1.input)}`;
7509
+ case "invalid_type": return `Đầu vào không hợp lệ: mong đợi ${issue$1.expected}, nhận được ${parsedType$3(issue$1.input)}`;
7229
7510
  case "invalid_value":
7230
7511
  if (issue$1.values.length === 1) return `Đầu vào không hợp lệ: mong đợi ${stringifyPrimitive(issue$1.values[0])}`;
7231
7512
  return `Tùy chọn không hợp lệ: mong đợi một trong các giá trị ${joinValues(issue$1.values, "|")}`;
@@ -7265,7 +7546,7 @@ function vi_default() {
7265
7546
  }
7266
7547
 
7267
7548
  //#endregion
7268
- //#region ../../node_modules/zod/dist/esm/v4/locales/zh-CN.js
7549
+ //#region ../../node_modules/zod/v4/locales/zh-CN.js
7269
7550
  const error$1 = () => {
7270
7551
  const Sizable = {
7271
7552
  string: {
@@ -7288,7 +7569,7 @@ const error$1 = () => {
7288
7569
  function getSizing(origin) {
7289
7570
  return Sizable[origin] ?? null;
7290
7571
  }
7291
- const parsedType$2 = (data) => {
7572
+ const parsedType$3 = (data) => {
7292
7573
  const t = typeof data;
7293
7574
  switch (t) {
7294
7575
  case "number": {
@@ -7340,7 +7621,7 @@ const error$1 = () => {
7340
7621
  };
7341
7622
  return (issue$1) => {
7342
7623
  switch (issue$1.code) {
7343
- case "invalid_type": return `无效输入:期望 ${issue$1.expected},实际接收 ${parsedType$2(issue$1.input)}`;
7624
+ case "invalid_type": return `无效输入:期望 ${issue$1.expected},实际接收 ${parsedType$3(issue$1.input)}`;
7344
7625
  case "invalid_value":
7345
7626
  if (issue$1.values.length === 1) return `无效输入:期望 ${stringifyPrimitive(issue$1.values[0])}`;
7346
7627
  return `无效选项:期望以下之一 ${joinValues(issue$1.values, "|")}`;
@@ -7380,7 +7661,7 @@ function zh_CN_default() {
7380
7661
  }
7381
7662
 
7382
7663
  //#endregion
7383
- //#region ../../node_modules/zod/dist/esm/v4/locales/zh-TW.js
7664
+ //#region ../../node_modules/zod/v4/locales/zh-TW.js
7384
7665
  const error = () => {
7385
7666
  const Sizable = {
7386
7667
  string: {
@@ -7403,7 +7684,7 @@ const error = () => {
7403
7684
  function getSizing(origin) {
7404
7685
  return Sizable[origin] ?? null;
7405
7686
  }
7406
- const parsedType$2 = (data) => {
7687
+ const parsedType$3 = (data) => {
7407
7688
  const t = typeof data;
7408
7689
  switch (t) {
7409
7690
  case "number": {
@@ -7455,7 +7736,7 @@ const error = () => {
7455
7736
  };
7456
7737
  return (issue$1) => {
7457
7738
  switch (issue$1.code) {
7458
- case "invalid_type": return `無效的輸入值:預期為 ${issue$1.expected},但收到 ${parsedType$2(issue$1.input)}`;
7739
+ case "invalid_type": return `無效的輸入值:預期為 ${issue$1.expected},但收到 ${parsedType$3(issue$1.input)}`;
7459
7740
  case "invalid_value":
7460
7741
  if (issue$1.values.length === 1) return `無效的輸入值:預期為 ${stringifyPrimitive(issue$1.values[0])}`;
7461
7742
  return `無效的選項:預期為以下其中之一 ${joinValues(issue$1.values, "|")}`;
@@ -7497,7 +7778,7 @@ function zh_TW_default() {
7497
7778
  }
7498
7779
 
7499
7780
  //#endregion
7500
- //#region ../../node_modules/zod/dist/esm/v4/locales/index.js
7781
+ //#region ../../node_modules/zod/v4/locales/index.js
7501
7782
  var locales_exports = {};
7502
7783
  __export(locales_exports, {
7503
7784
  ar: () => ar_default,
@@ -7507,6 +7788,7 @@ __export(locales_exports, {
7507
7788
  cs: () => cs_default,
7508
7789
  de: () => de_default,
7509
7790
  en: () => en_default,
7791
+ eo: () => eo_default,
7510
7792
  es: () => es_default,
7511
7793
  fa: () => fa_default,
7512
7794
  fi: () => fi_default,
@@ -7525,6 +7807,7 @@ __export(locales_exports, {
7525
7807
  no: () => no_default,
7526
7808
  ota: () => ota_default,
7527
7809
  pl: () => pl_default,
7810
+ ps: () => ps_default,
7528
7811
  pt: () => pt_default,
7529
7812
  ru: () => ru_default,
7530
7813
  sl: () => sl_default,
@@ -7540,12 +7823,12 @@ __export(locales_exports, {
7540
7823
  });
7541
7824
 
7542
7825
  //#endregion
7543
- //#region ../../node_modules/zod/dist/esm/v4/core/registries.js
7826
+ //#region ../../node_modules/zod/v4/core/registries.js
7544
7827
  const $output = Symbol("ZodOutput");
7545
7828
  const $input = Symbol("ZodInput");
7546
7829
  var $ZodRegistry = class {
7547
7830
  constructor() {
7548
- this._map = new WeakMap();
7831
+ this._map = new Map();
7549
7832
  this._idmap = new Map();
7550
7833
  }
7551
7834
  add(schema, ..._meta) {
@@ -7559,7 +7842,16 @@ var $ZodRegistry = class {
7559
7842
  }
7560
7843
  return this;
7561
7844
  }
7845
+ clear() {
7846
+ this._map = new Map();
7847
+ this._idmap = new Map();
7848
+ return this;
7849
+ }
7562
7850
  remove(schema) {
7851
+ const meta = this._map.get(schema);
7852
+ if (meta && typeof meta === "object" && "id" in meta) {
7853
+ this._idmap.delete(meta.id);
7854
+ }
7563
7855
  this._map.delete(schema);
7564
7856
  return this;
7565
7857
  }
@@ -7585,7 +7877,7 @@ function registry() {
7585
7877
  const globalRegistry = /* @__PURE__ */ registry();
7586
7878
 
7587
7879
  //#endregion
7588
- //#region ../../node_modules/zod/dist/esm/v4/core/api.js
7880
+ //#region ../../node_modules/zod/v4/core/api.js
7589
7881
  function _string(Class$1, params) {
7590
7882
  return new Class$1({
7591
7883
  type: "string",
@@ -7800,6 +8092,13 @@ function _jwt(Class$1, params) {
7800
8092
  ...normalizeParams(params)
7801
8093
  });
7802
8094
  }
8095
+ const TimePrecision = {
8096
+ Any: null,
8097
+ Minute: -1,
8098
+ Second: 0,
8099
+ Millisecond: 3,
8100
+ Microsecond: 6
8101
+ };
7803
8102
  function _isoDateTime(Class$1, params) {
7804
8103
  return new Class$1({
7805
8104
  type: "string",
@@ -8366,8 +8665,8 @@ function _refine(Class$1, fn, _params) {
8366
8665
  return schema;
8367
8666
  }
8368
8667
  function _stringbool(Classes, _params) {
8369
- const { case: _case, error: error$37, truthy, falsy } = normalizeParams(_params);
8370
- let truthyArray = truthy ?? [
8668
+ const params = normalizeParams(_params);
8669
+ let truthyArray = params.truthy ?? [
8371
8670
  "true",
8372
8671
  "1",
8373
8672
  "yes",
@@ -8375,7 +8674,7 @@ function _stringbool(Classes, _params) {
8375
8674
  "y",
8376
8675
  "enabled"
8377
8676
  ];
8378
- let falsyArray = falsy ?? [
8677
+ let falsyArray = params.falsy ?? [
8379
8678
  "false",
8380
8679
  "0",
8381
8680
  "no",
@@ -8383,7 +8682,7 @@ function _stringbool(Classes, _params) {
8383
8682
  "n",
8384
8683
  "disabled"
8385
8684
  ];
8386
- if (_case !== "sensitive") {
8685
+ if (params.case !== "sensitive") {
8387
8686
  truthyArray = truthyArray.map((v) => typeof v === "string" ? v.toLowerCase() : v);
8388
8687
  falsyArray = falsyArray.map((v) => typeof v === "string" ? v.toLowerCase() : v);
8389
8688
  }
@@ -8397,7 +8696,7 @@ function _stringbool(Classes, _params) {
8397
8696
  type: "transform",
8398
8697
  transform: (input, payload) => {
8399
8698
  let data = input;
8400
- if (_case !== "sensitive") data = data.toLowerCase();
8699
+ if (params.case !== "sensitive") data = data.toLowerCase();
8401
8700
  if (truthySet.has(data)) {
8402
8701
  return true;
8403
8702
  } else if (falsySet.has(data)) {
@@ -8413,31 +8712,47 @@ function _stringbool(Classes, _params) {
8413
8712
  return {};
8414
8713
  }
8415
8714
  },
8416
- error: error$37
8715
+ error: params.error
8417
8716
  });
8418
8717
  const innerPipe = new _Pipe({
8419
8718
  type: "pipe",
8420
8719
  in: new _String({
8421
8720
  type: "string",
8422
- error: error$37
8721
+ error: params.error
8423
8722
  }),
8424
8723
  out: tx,
8425
- error: error$37
8724
+ error: params.error
8426
8725
  });
8427
8726
  const outerPipe = new _Pipe({
8428
8727
  type: "pipe",
8429
8728
  in: innerPipe,
8430
8729
  out: new _Boolean({
8431
8730
  type: "boolean",
8432
- error: error$37
8731
+ error: params.error
8433
8732
  }),
8434
- error: error$37
8733
+ error: params.error
8435
8734
  });
8436
8735
  return outerPipe;
8437
8736
  }
8737
+ function _stringFormat(Class$1, format, fnOrRegex, _params = {}) {
8738
+ const params = normalizeParams(_params);
8739
+ const def = {
8740
+ ...normalizeParams(_params),
8741
+ check: "string_format",
8742
+ type: "string",
8743
+ format,
8744
+ fn: typeof fnOrRegex === "function" ? fnOrRegex : (val) => fnOrRegex.test(val),
8745
+ ...params
8746
+ };
8747
+ if (fnOrRegex instanceof RegExp) {
8748
+ def.pattern = fnOrRegex;
8749
+ }
8750
+ const inst = new Class$1(def);
8751
+ return inst;
8752
+ }
8438
8753
 
8439
8754
  //#endregion
8440
- //#region ../../node_modules/zod/dist/esm/v4/core/function.js
8755
+ //#region ../../node_modules/zod/v4/core/function.js
8441
8756
  var $ZodFunction = class {
8442
8757
  constructor(def) {
8443
8758
  this._def = def;
@@ -8508,7 +8823,7 @@ function _function(params) {
8508
8823
  }
8509
8824
 
8510
8825
  //#endregion
8511
- //#region ../../node_modules/zod/dist/esm/v4/core/to-json-schema.js
8826
+ //#region ../../node_modules/zod/v4/core/to-json-schema.js
8512
8827
  var JSONSchemaGenerator = class {
8513
8828
  constructor(params) {
8514
8829
  this.counter = 0;
@@ -8544,431 +8859,435 @@ var JSONSchemaGenerator = class {
8544
8859
  const result = {
8545
8860
  schema: {},
8546
8861
  count: 1,
8547
- cycle: undefined
8548
- };
8549
- this.seen.set(schema, result);
8550
- if (schema._zod.toJSONSchema) {
8551
- result.schema = schema._zod.toJSONSchema();
8552
- }
8553
- const params = {
8554
- ..._params,
8555
- schemaPath: [..._params.schemaPath, schema],
8862
+ cycle: undefined,
8556
8863
  path: _params.path
8557
8864
  };
8558
- const parent = schema._zod.parent;
8559
- if (parent) {
8560
- result.ref = parent;
8561
- this.process(parent, params);
8562
- this.seen.get(parent).isParent = true;
8865
+ this.seen.set(schema, result);
8866
+ const overrideSchema = schema._zod.toJSONSchema?.();
8867
+ if (overrideSchema) {
8868
+ result.schema = overrideSchema;
8563
8869
  } else {
8564
- const _json = result.schema;
8565
- switch (def.type) {
8566
- case "string": {
8567
- const json$1 = _json;
8568
- json$1.type = "string";
8569
- const { minimum, maximum, format, patterns, contentEncoding } = schema._zod.bag;
8570
- if (typeof minimum === "number") json$1.minLength = minimum;
8571
- if (typeof maximum === "number") json$1.maxLength = maximum;
8572
- if (format) {
8573
- json$1.format = formatMap[format] ?? format;
8574
- if (json$1.format === "") delete json$1.format;
8870
+ const params = {
8871
+ ..._params,
8872
+ schemaPath: [..._params.schemaPath, schema],
8873
+ path: _params.path
8874
+ };
8875
+ const parent = schema._zod.parent;
8876
+ if (parent) {
8877
+ result.ref = parent;
8878
+ this.process(parent, params);
8879
+ this.seen.get(parent).isParent = true;
8880
+ } else {
8881
+ const _json = result.schema;
8882
+ switch (def.type) {
8883
+ case "string": {
8884
+ const json$1 = _json;
8885
+ json$1.type = "string";
8886
+ const { minimum, maximum, format, patterns, contentEncoding } = schema._zod.bag;
8887
+ if (typeof minimum === "number") json$1.minLength = minimum;
8888
+ if (typeof maximum === "number") json$1.maxLength = maximum;
8889
+ if (format) {
8890
+ json$1.format = formatMap[format] ?? format;
8891
+ if (json$1.format === "") delete json$1.format;
8892
+ }
8893
+ if (contentEncoding) json$1.contentEncoding = contentEncoding;
8894
+ if (patterns && patterns.size > 0) {
8895
+ const regexes = [...patterns];
8896
+ if (regexes.length === 1) json$1.pattern = regexes[0].source;
8897
+ else if (regexes.length > 1) {
8898
+ result.schema.allOf = [...regexes.map((regex) => ({
8899
+ ...this.target === "draft-7" ? { type: "string" } : {},
8900
+ pattern: regex.source
8901
+ }))];
8902
+ }
8903
+ }
8904
+ break;
8575
8905
  }
8576
- if (contentEncoding) json$1.contentEncoding = contentEncoding;
8577
- if (patterns && patterns.size > 0) {
8578
- const regexes = [...patterns];
8579
- if (regexes.length === 1) json$1.pattern = regexes[0].source;
8580
- else if (regexes.length > 1) {
8581
- result.schema.allOf = [...regexes.map((regex) => ({
8582
- ...this.target === "draft-7" ? { type: "string" } : {},
8583
- pattern: regex.source
8584
- }))];
8906
+ case "number": {
8907
+ const json$1 = _json;
8908
+ const { minimum, maximum, format, multipleOf, exclusiveMaximum, exclusiveMinimum } = schema._zod.bag;
8909
+ if (typeof format === "string" && format.includes("int")) json$1.type = "integer";
8910
+ else json$1.type = "number";
8911
+ if (typeof exclusiveMinimum === "number") json$1.exclusiveMinimum = exclusiveMinimum;
8912
+ if (typeof minimum === "number") {
8913
+ json$1.minimum = minimum;
8914
+ if (typeof exclusiveMinimum === "number") {
8915
+ if (exclusiveMinimum >= minimum) delete json$1.minimum;
8916
+ else delete json$1.exclusiveMinimum;
8917
+ }
8585
8918
  }
8919
+ if (typeof exclusiveMaximum === "number") json$1.exclusiveMaximum = exclusiveMaximum;
8920
+ if (typeof maximum === "number") {
8921
+ json$1.maximum = maximum;
8922
+ if (typeof exclusiveMaximum === "number") {
8923
+ if (exclusiveMaximum <= maximum) delete json$1.maximum;
8924
+ else delete json$1.exclusiveMaximum;
8925
+ }
8926
+ }
8927
+ if (typeof multipleOf === "number") json$1.multipleOf = multipleOf;
8928
+ break;
8586
8929
  }
8587
- break;
8588
- }
8589
- case "number": {
8590
- const json$1 = _json;
8591
- const { minimum, maximum, format, multipleOf, exclusiveMaximum, exclusiveMinimum } = schema._zod.bag;
8592
- if (typeof format === "string" && format.includes("int")) json$1.type = "integer";
8593
- else json$1.type = "number";
8594
- if (typeof exclusiveMinimum === "number") json$1.exclusiveMinimum = exclusiveMinimum;
8595
- if (typeof minimum === "number") {
8596
- json$1.minimum = minimum;
8597
- if (typeof exclusiveMinimum === "number") {
8598
- if (exclusiveMinimum >= minimum) delete json$1.minimum;
8599
- else delete json$1.exclusiveMinimum;
8930
+ case "boolean": {
8931
+ const json$1 = _json;
8932
+ json$1.type = "boolean";
8933
+ break;
8934
+ }
8935
+ case "bigint": {
8936
+ if (this.unrepresentable === "throw") {
8937
+ throw new Error("BigInt cannot be represented in JSON Schema");
8600
8938
  }
8939
+ break;
8601
8940
  }
8602
- if (typeof exclusiveMaximum === "number") json$1.exclusiveMaximum = exclusiveMaximum;
8603
- if (typeof maximum === "number") {
8604
- json$1.maximum = maximum;
8605
- if (typeof exclusiveMaximum === "number") {
8606
- if (exclusiveMaximum <= maximum) delete json$1.maximum;
8607
- else delete json$1.exclusiveMaximum;
8941
+ case "symbol": {
8942
+ if (this.unrepresentable === "throw") {
8943
+ throw new Error("Symbols cannot be represented in JSON Schema");
8608
8944
  }
8945
+ break;
8609
8946
  }
8610
- if (typeof multipleOf === "number") json$1.multipleOf = multipleOf;
8611
- break;
8612
- }
8613
- case "boolean": {
8614
- const json$1 = _json;
8615
- json$1.type = "boolean";
8616
- break;
8617
- }
8618
- case "bigint": {
8619
- if (this.unrepresentable === "throw") {
8620
- throw new Error("BigInt cannot be represented in JSON Schema");
8947
+ case "null": {
8948
+ _json.type = "null";
8949
+ break;
8621
8950
  }
8622
- break;
8623
- }
8624
- case "symbol": {
8625
- if (this.unrepresentable === "throw") {
8626
- throw new Error("Symbols cannot be represented in JSON Schema");
8951
+ case "any": {
8952
+ break;
8627
8953
  }
8628
- break;
8629
- }
8630
- case "undefined": {
8631
- const json$1 = _json;
8632
- json$1.type = "null";
8633
- break;
8634
- }
8635
- case "null": {
8636
- _json.type = "null";
8637
- break;
8638
- }
8639
- case "any": {
8640
- break;
8641
- }
8642
- case "unknown": {
8643
- break;
8644
- }
8645
- case "never": {
8646
- _json.not = {};
8647
- break;
8648
- }
8649
- case "void": {
8650
- if (this.unrepresentable === "throw") {
8651
- throw new Error("Void cannot be represented in JSON Schema");
8954
+ case "unknown": {
8955
+ break;
8652
8956
  }
8653
- break;
8654
- }
8655
- case "date": {
8656
- if (this.unrepresentable === "throw") {
8657
- throw new Error("Date cannot be represented in JSON Schema");
8957
+ case "undefined": {
8958
+ if (this.unrepresentable === "throw") {
8959
+ throw new Error("Undefined cannot be represented in JSON Schema");
8960
+ }
8961
+ break;
8658
8962
  }
8659
- break;
8660
- }
8661
- case "array": {
8662
- const json$1 = _json;
8663
- const { minimum, maximum } = schema._zod.bag;
8664
- if (typeof minimum === "number") json$1.minItems = minimum;
8665
- if (typeof maximum === "number") json$1.maxItems = maximum;
8666
- json$1.type = "array";
8667
- json$1.items = this.process(def.element, {
8668
- ...params,
8669
- path: [...params.path, "items"]
8670
- });
8671
- break;
8672
- }
8673
- case "object": {
8674
- const json$1 = _json;
8675
- json$1.type = "object";
8676
- json$1.properties = {};
8677
- const shape = def.shape;
8678
- for (const key in shape) {
8679
- json$1.properties[key] = this.process(shape[key], {
8680
- ...params,
8681
- path: [
8682
- ...params.path,
8683
- "properties",
8684
- key
8685
- ]
8686
- });
8963
+ case "void": {
8964
+ if (this.unrepresentable === "throw") {
8965
+ throw new Error("Void cannot be represented in JSON Schema");
8966
+ }
8967
+ break;
8687
8968
  }
8688
- const allKeys = new Set(Object.keys(shape));
8689
- const requiredKeys = new Set([...allKeys].filter((key) => {
8690
- const v = def.shape[key]._zod;
8691
- if (this.io === "input") {
8692
- return v.optin === undefined;
8693
- } else {
8694
- return v.optout === undefined;
8969
+ case "never": {
8970
+ _json.not = {};
8971
+ break;
8972
+ }
8973
+ case "date": {
8974
+ if (this.unrepresentable === "throw") {
8975
+ throw new Error("Date cannot be represented in JSON Schema");
8695
8976
  }
8696
- }));
8697
- if (requiredKeys.size > 0) {
8698
- json$1.required = Array.from(requiredKeys);
8977
+ break;
8699
8978
  }
8700
- if (def.catchall?._zod.def.type === "never") {
8701
- json$1.additionalProperties = false;
8702
- } else if (!def.catchall) {
8703
- if (this.io === "output") json$1.additionalProperties = false;
8704
- } else if (def.catchall) {
8705
- json$1.additionalProperties = this.process(def.catchall, {
8979
+ case "array": {
8980
+ const json$1 = _json;
8981
+ const { minimum, maximum } = schema._zod.bag;
8982
+ if (typeof minimum === "number") json$1.minItems = minimum;
8983
+ if (typeof maximum === "number") json$1.maxItems = maximum;
8984
+ json$1.type = "array";
8985
+ json$1.items = this.process(def.element, {
8706
8986
  ...params,
8707
- path: [...params.path, "additionalProperties"]
8987
+ path: [...params.path, "items"]
8708
8988
  });
8989
+ break;
8709
8990
  }
8710
- break;
8711
- }
8712
- case "union": {
8713
- const json$1 = _json;
8714
- json$1.anyOf = def.options.map((x, i) => this.process(x, {
8715
- ...params,
8716
- path: [
8717
- ...params.path,
8718
- "anyOf",
8719
- i
8720
- ]
8721
- }));
8722
- break;
8723
- }
8724
- case "intersection": {
8725
- const json$1 = _json;
8726
- const a = this.process(def.left, {
8727
- ...params,
8728
- path: [
8729
- ...params.path,
8730
- "allOf",
8731
- 0
8732
- ]
8733
- });
8734
- const b = this.process(def.right, {
8735
- ...params,
8736
- path: [
8737
- ...params.path,
8738
- "allOf",
8739
- 1
8740
- ]
8741
- });
8742
- const isSimpleIntersection = (val) => "allOf" in val && Object.keys(val).length === 1;
8743
- const allOf = [...isSimpleIntersection(a) ? a.allOf : [a], ...isSimpleIntersection(b) ? b.allOf : [b]];
8744
- json$1.allOf = allOf;
8745
- break;
8746
- }
8747
- case "tuple": {
8748
- const json$1 = _json;
8749
- json$1.type = "array";
8750
- const prefixItems = def.items.map((x, i) => this.process(x, {
8751
- ...params,
8752
- path: [
8753
- ...params.path,
8754
- "prefixItems",
8755
- i
8756
- ]
8757
- }));
8758
- if (this.target === "draft-2020-12") {
8759
- json$1.prefixItems = prefixItems;
8760
- } else {
8761
- json$1.items = prefixItems;
8991
+ case "object": {
8992
+ const json$1 = _json;
8993
+ json$1.type = "object";
8994
+ json$1.properties = {};
8995
+ const shape = def.shape;
8996
+ for (const key in shape) {
8997
+ json$1.properties[key] = this.process(shape[key], {
8998
+ ...params,
8999
+ path: [
9000
+ ...params.path,
9001
+ "properties",
9002
+ key
9003
+ ]
9004
+ });
9005
+ }
9006
+ const allKeys = new Set(Object.keys(shape));
9007
+ const requiredKeys = new Set([...allKeys].filter((key) => {
9008
+ const v = def.shape[key]._zod;
9009
+ if (this.io === "input") {
9010
+ return v.optin === undefined;
9011
+ } else {
9012
+ return v.optout === undefined;
9013
+ }
9014
+ }));
9015
+ if (requiredKeys.size > 0) {
9016
+ json$1.required = Array.from(requiredKeys);
9017
+ }
9018
+ if (def.catchall?._zod.def.type === "never") {
9019
+ json$1.additionalProperties = false;
9020
+ } else if (!def.catchall) {
9021
+ if (this.io === "output") json$1.additionalProperties = false;
9022
+ } else if (def.catchall) {
9023
+ json$1.additionalProperties = this.process(def.catchall, {
9024
+ ...params,
9025
+ path: [...params.path, "additionalProperties"]
9026
+ });
9027
+ }
9028
+ break;
8762
9029
  }
8763
- if (def.rest) {
8764
- const rest = this.process(def.rest, {
9030
+ case "union": {
9031
+ const json$1 = _json;
9032
+ json$1.anyOf = def.options.map((x, i) => this.process(x, {
8765
9033
  ...params,
8766
- path: [...params.path, "items"]
9034
+ path: [
9035
+ ...params.path,
9036
+ "anyOf",
9037
+ i
9038
+ ]
9039
+ }));
9040
+ break;
9041
+ }
9042
+ case "intersection": {
9043
+ const json$1 = _json;
9044
+ const a = this.process(def.left, {
9045
+ ...params,
9046
+ path: [
9047
+ ...params.path,
9048
+ "allOf",
9049
+ 0
9050
+ ]
9051
+ });
9052
+ const b = this.process(def.right, {
9053
+ ...params,
9054
+ path: [
9055
+ ...params.path,
9056
+ "allOf",
9057
+ 1
9058
+ ]
8767
9059
  });
9060
+ const isSimpleIntersection = (val) => "allOf" in val && Object.keys(val).length === 1;
9061
+ const allOf = [...isSimpleIntersection(a) ? a.allOf : [a], ...isSimpleIntersection(b) ? b.allOf : [b]];
9062
+ json$1.allOf = allOf;
9063
+ break;
9064
+ }
9065
+ case "tuple": {
9066
+ const json$1 = _json;
9067
+ json$1.type = "array";
9068
+ const prefixItems = def.items.map((x, i) => this.process(x, {
9069
+ ...params,
9070
+ path: [
9071
+ ...params.path,
9072
+ "prefixItems",
9073
+ i
9074
+ ]
9075
+ }));
8768
9076
  if (this.target === "draft-2020-12") {
8769
- json$1.items = rest;
9077
+ json$1.prefixItems = prefixItems;
8770
9078
  } else {
8771
- json$1.additionalItems = rest;
9079
+ json$1.items = prefixItems;
9080
+ }
9081
+ if (def.rest) {
9082
+ const rest = this.process(def.rest, {
9083
+ ...params,
9084
+ path: [...params.path, "items"]
9085
+ });
9086
+ if (this.target === "draft-2020-12") {
9087
+ json$1.items = rest;
9088
+ } else {
9089
+ json$1.additionalItems = rest;
9090
+ }
8772
9091
  }
9092
+ if (def.rest) {
9093
+ json$1.items = this.process(def.rest, {
9094
+ ...params,
9095
+ path: [...params.path, "items"]
9096
+ });
9097
+ }
9098
+ const { minimum, maximum } = schema._zod.bag;
9099
+ if (typeof minimum === "number") json$1.minItems = minimum;
9100
+ if (typeof maximum === "number") json$1.maxItems = maximum;
9101
+ break;
8773
9102
  }
8774
- if (def.rest) {
8775
- json$1.items = this.process(def.rest, {
9103
+ case "record": {
9104
+ const json$1 = _json;
9105
+ json$1.type = "object";
9106
+ json$1.propertyNames = this.process(def.keyType, {
8776
9107
  ...params,
8777
- path: [...params.path, "items"]
9108
+ path: [...params.path, "propertyNames"]
8778
9109
  });
9110
+ json$1.additionalProperties = this.process(def.valueType, {
9111
+ ...params,
9112
+ path: [...params.path, "additionalProperties"]
9113
+ });
9114
+ break;
8779
9115
  }
8780
- const { minimum, maximum } = schema._zod.bag;
8781
- if (typeof minimum === "number") json$1.minItems = minimum;
8782
- if (typeof maximum === "number") json$1.maxItems = maximum;
8783
- break;
8784
- }
8785
- case "record": {
8786
- const json$1 = _json;
8787
- json$1.type = "object";
8788
- json$1.propertyNames = this.process(def.keyType, {
8789
- ...params,
8790
- path: [...params.path, "propertyNames"]
8791
- });
8792
- json$1.additionalProperties = this.process(def.valueType, {
8793
- ...params,
8794
- path: [...params.path, "additionalProperties"]
8795
- });
8796
- break;
8797
- }
8798
- case "map": {
8799
- if (this.unrepresentable === "throw") {
8800
- throw new Error("Map cannot be represented in JSON Schema");
9116
+ case "map": {
9117
+ if (this.unrepresentable === "throw") {
9118
+ throw new Error("Map cannot be represented in JSON Schema");
9119
+ }
9120
+ break;
8801
9121
  }
8802
- break;
8803
- }
8804
- case "set": {
8805
- if (this.unrepresentable === "throw") {
8806
- throw new Error("Set cannot be represented in JSON Schema");
9122
+ case "set": {
9123
+ if (this.unrepresentable === "throw") {
9124
+ throw new Error("Set cannot be represented in JSON Schema");
9125
+ }
9126
+ break;
9127
+ }
9128
+ case "enum": {
9129
+ const json$1 = _json;
9130
+ const values = getEnumValues(def.entries);
9131
+ if (values.every((v) => typeof v === "number")) json$1.type = "number";
9132
+ if (values.every((v) => typeof v === "string")) json$1.type = "string";
9133
+ json$1.enum = values;
9134
+ break;
8807
9135
  }
8808
- break;
8809
- }
8810
- case "enum": {
8811
- const json$1 = _json;
8812
- const values = getEnumValues(def.entries);
8813
- if (values.every((v) => typeof v === "number")) json$1.type = "number";
8814
- if (values.every((v) => typeof v === "string")) json$1.type = "string";
8815
- json$1.enum = values;
8816
- break;
8817
- }
8818
- case "literal": {
8819
- const json$1 = _json;
8820
- const vals = [];
8821
- for (const val of def.values) {
8822
- if (val === undefined) {
8823
- if (this.unrepresentable === "throw") {
8824
- throw new Error("Literal `undefined` cannot be represented in JSON Schema");
8825
- } else {}
8826
- } else if (typeof val === "bigint") {
8827
- if (this.unrepresentable === "throw") {
8828
- throw new Error("BigInt literals cannot be represented in JSON Schema");
9136
+ case "literal": {
9137
+ const json$1 = _json;
9138
+ const vals = [];
9139
+ for (const val of def.values) {
9140
+ if (val === undefined) {
9141
+ if (this.unrepresentable === "throw") {
9142
+ throw new Error("Literal `undefined` cannot be represented in JSON Schema");
9143
+ } else {}
9144
+ } else if (typeof val === "bigint") {
9145
+ if (this.unrepresentable === "throw") {
9146
+ throw new Error("BigInt literals cannot be represented in JSON Schema");
9147
+ } else {
9148
+ vals.push(Number(val));
9149
+ }
8829
9150
  } else {
8830
- vals.push(Number(val));
9151
+ vals.push(val);
8831
9152
  }
9153
+ }
9154
+ if (vals.length === 0) {} else if (vals.length === 1) {
9155
+ const val = vals[0];
9156
+ json$1.type = val === null ? "null" : typeof val;
9157
+ json$1.const = val;
8832
9158
  } else {
8833
- vals.push(val);
9159
+ if (vals.every((v) => typeof v === "number")) json$1.type = "number";
9160
+ if (vals.every((v) => typeof v === "string")) json$1.type = "string";
9161
+ if (vals.every((v) => typeof v === "boolean")) json$1.type = "string";
9162
+ if (vals.every((v) => v === null)) json$1.type = "null";
9163
+ json$1.enum = vals;
8834
9164
  }
9165
+ break;
8835
9166
  }
8836
- if (vals.length === 0) {} else if (vals.length === 1) {
8837
- const val = vals[0];
8838
- json$1.type = val === null ? "null" : typeof val;
8839
- json$1.const = val;
8840
- } else {
8841
- if (vals.every((v) => typeof v === "number")) json$1.type = "number";
8842
- if (vals.every((v) => typeof v === "string")) json$1.type = "string";
8843
- if (vals.every((v) => typeof v === "boolean")) json$1.type = "string";
8844
- if (vals.every((v) => v === null)) json$1.type = "null";
8845
- json$1.enum = vals;
8846
- }
8847
- break;
8848
- }
8849
- case "file": {
8850
- const json$1 = _json;
8851
- const file$1 = {
8852
- type: "string",
8853
- format: "binary",
8854
- contentEncoding: "binary"
8855
- };
8856
- const { minimum, maximum, mime } = schema._zod.bag;
8857
- if (minimum !== undefined) file$1.minLength = minimum;
8858
- if (maximum !== undefined) file$1.maxLength = maximum;
8859
- if (mime) {
8860
- if (mime.length === 1) {
8861
- file$1.contentMediaType = mime[0];
8862
- Object.assign(json$1, file$1);
9167
+ case "file": {
9168
+ const json$1 = _json;
9169
+ const file$1 = {
9170
+ type: "string",
9171
+ format: "binary",
9172
+ contentEncoding: "binary"
9173
+ };
9174
+ const { minimum, maximum, mime } = schema._zod.bag;
9175
+ if (minimum !== undefined) file$1.minLength = minimum;
9176
+ if (maximum !== undefined) file$1.maxLength = maximum;
9177
+ if (mime) {
9178
+ if (mime.length === 1) {
9179
+ file$1.contentMediaType = mime[0];
9180
+ Object.assign(json$1, file$1);
9181
+ } else {
9182
+ json$1.anyOf = mime.map((m) => {
9183
+ const mFile = {
9184
+ ...file$1,
9185
+ contentMediaType: m
9186
+ };
9187
+ return mFile;
9188
+ });
9189
+ }
8863
9190
  } else {
8864
- json$1.anyOf = mime.map((m) => {
8865
- const mFile = {
8866
- ...file$1,
8867
- contentMediaType: m
8868
- };
8869
- return mFile;
8870
- });
9191
+ Object.assign(json$1, file$1);
8871
9192
  }
8872
- } else {
8873
- Object.assign(json$1, file$1);
9193
+ break;
8874
9194
  }
8875
- break;
8876
- }
8877
- case "transform": {
8878
- if (this.unrepresentable === "throw") {
8879
- throw new Error("Transforms cannot be represented in JSON Schema");
9195
+ case "transform": {
9196
+ if (this.unrepresentable === "throw") {
9197
+ throw new Error("Transforms cannot be represented in JSON Schema");
9198
+ }
9199
+ break;
8880
9200
  }
8881
- break;
8882
- }
8883
- case "nullable": {
8884
- const inner = this.process(def.innerType, params);
8885
- _json.anyOf = [inner, { type: "null" }];
8886
- break;
8887
- }
8888
- case "nonoptional": {
8889
- this.process(def.innerType, params);
8890
- result.ref = def.innerType;
8891
- break;
8892
- }
8893
- case "success": {
8894
- const json$1 = _json;
8895
- json$1.type = "boolean";
8896
- break;
8897
- }
8898
- case "default": {
8899
- this.process(def.innerType, params);
8900
- result.ref = def.innerType;
8901
- _json.default = def.defaultValue;
8902
- break;
8903
- }
8904
- case "prefault": {
8905
- this.process(def.innerType, params);
8906
- result.ref = def.innerType;
8907
- if (this.io === "input") _json._prefault = def.defaultValue;
8908
- break;
8909
- }
8910
- case "catch": {
8911
- this.process(def.innerType, params);
8912
- result.ref = def.innerType;
8913
- let catchValue;
8914
- try {
8915
- catchValue = def.catchValue(undefined);
8916
- } catch {
8917
- throw new Error("Dynamic catch values are not supported in JSON Schema");
9201
+ case "nullable": {
9202
+ const inner = this.process(def.innerType, params);
9203
+ _json.anyOf = [inner, { type: "null" }];
9204
+ break;
8918
9205
  }
8919
- _json.default = catchValue;
8920
- break;
8921
- }
8922
- case "nan": {
8923
- if (this.unrepresentable === "throw") {
8924
- throw new Error("NaN cannot be represented in JSON Schema");
9206
+ case "nonoptional": {
9207
+ this.process(def.innerType, params);
9208
+ result.ref = def.innerType;
9209
+ break;
8925
9210
  }
8926
- break;
8927
- }
8928
- case "template_literal": {
8929
- const json$1 = _json;
8930
- const pattern = schema._zod.pattern;
8931
- if (!pattern) throw new Error("Pattern not found in template literal");
8932
- json$1.type = "string";
8933
- json$1.pattern = pattern.source;
8934
- break;
8935
- }
8936
- case "pipe": {
8937
- const innerType = this.io === "input" ? def.in._zod.def.type === "transform" ? def.out : def.in : def.out;
8938
- this.process(innerType, params);
8939
- result.ref = innerType;
8940
- break;
8941
- }
8942
- case "readonly": {
8943
- this.process(def.innerType, params);
8944
- result.ref = def.innerType;
8945
- _json.readOnly = true;
8946
- break;
8947
- }
8948
- case "promise": {
8949
- this.process(def.innerType, params);
8950
- result.ref = def.innerType;
8951
- break;
8952
- }
8953
- case "optional": {
8954
- this.process(def.innerType, params);
8955
- result.ref = def.innerType;
8956
- break;
8957
- }
8958
- case "lazy": {
8959
- const innerType = schema._zod.innerType;
8960
- this.process(innerType, params);
8961
- result.ref = innerType;
8962
- break;
8963
- }
8964
- case "custom": {
8965
- if (this.unrepresentable === "throw") {
8966
- throw new Error("Custom types cannot be represented in JSON Schema");
9211
+ case "success": {
9212
+ const json$1 = _json;
9213
+ json$1.type = "boolean";
9214
+ break;
9215
+ }
9216
+ case "default": {
9217
+ this.process(def.innerType, params);
9218
+ result.ref = def.innerType;
9219
+ _json.default = JSON.parse(JSON.stringify(def.defaultValue));
9220
+ break;
9221
+ }
9222
+ case "prefault": {
9223
+ this.process(def.innerType, params);
9224
+ result.ref = def.innerType;
9225
+ if (this.io === "input") _json._prefault = JSON.parse(JSON.stringify(def.defaultValue));
9226
+ break;
9227
+ }
9228
+ case "catch": {
9229
+ this.process(def.innerType, params);
9230
+ result.ref = def.innerType;
9231
+ let catchValue;
9232
+ try {
9233
+ catchValue = def.catchValue(undefined);
9234
+ } catch {
9235
+ throw new Error("Dynamic catch values are not supported in JSON Schema");
9236
+ }
9237
+ _json.default = catchValue;
9238
+ break;
9239
+ }
9240
+ case "nan": {
9241
+ if (this.unrepresentable === "throw") {
9242
+ throw new Error("NaN cannot be represented in JSON Schema");
9243
+ }
9244
+ break;
9245
+ }
9246
+ case "template_literal": {
9247
+ const json$1 = _json;
9248
+ const pattern = schema._zod.pattern;
9249
+ if (!pattern) throw new Error("Pattern not found in template literal");
9250
+ json$1.type = "string";
9251
+ json$1.pattern = pattern.source;
9252
+ break;
9253
+ }
9254
+ case "pipe": {
9255
+ const innerType = this.io === "input" ? def.in._zod.def.type === "transform" ? def.out : def.in : def.out;
9256
+ this.process(innerType, params);
9257
+ result.ref = innerType;
9258
+ break;
9259
+ }
9260
+ case "readonly": {
9261
+ this.process(def.innerType, params);
9262
+ result.ref = def.innerType;
9263
+ _json.readOnly = true;
9264
+ break;
9265
+ }
9266
+ case "promise": {
9267
+ this.process(def.innerType, params);
9268
+ result.ref = def.innerType;
9269
+ break;
9270
+ }
9271
+ case "optional": {
9272
+ this.process(def.innerType, params);
9273
+ result.ref = def.innerType;
9274
+ break;
9275
+ }
9276
+ case "lazy": {
9277
+ const innerType = schema._zod.innerType;
9278
+ this.process(innerType, params);
9279
+ result.ref = innerType;
9280
+ break;
9281
+ }
9282
+ case "custom": {
9283
+ if (this.unrepresentable === "throw") {
9284
+ throw new Error("Custom types cannot be represented in JSON Schema");
9285
+ }
9286
+ break;
9287
+ }
9288
+ default: {
9289
+ def;
8967
9290
  }
8968
- break;
8969
- }
8970
- default: {
8971
- def;
8972
9291
  }
8973
9292
  }
8974
9293
  }
@@ -8995,12 +9314,15 @@ var JSONSchemaGenerator = class {
8995
9314
  const defsSegment = this.target === "draft-2020-12" ? "$defs" : "definitions";
8996
9315
  if (params.external) {
8997
9316
  const externalId = params.external.registry.get(entry[0])?.id;
8998
- if (externalId) return { ref: params.external.uri(externalId) };
9317
+ const uriGenerator = params.external.uri ?? ((id$1) => id$1);
9318
+ if (externalId) {
9319
+ return { ref: uriGenerator(externalId) };
9320
+ }
8999
9321
  const id = entry[1].defId ?? entry[1].schema.id ?? `schema${this.counter++}`;
9000
9322
  entry[1].defId = id;
9001
9323
  return {
9002
9324
  defId: id,
9003
- ref: `${params.external.uri("__shared")}#/${defsSegment}/${id}`
9325
+ ref: `${uriGenerator("__shared")}#/${defsSegment}/${id}`
9004
9326
  };
9005
9327
  }
9006
9328
  if (entry[1] === root) {
@@ -9028,6 +9350,14 @@ var JSONSchemaGenerator = class {
9028
9350
  }
9029
9351
  schema$1.$ref = ref;
9030
9352
  };
9353
+ if (params.cycles === "throw") {
9354
+ for (const entry of this.seen.entries()) {
9355
+ const seen = entry[1];
9356
+ if (seen.cycle) {
9357
+ throw new Error("Cycle detected: " + `#/${seen.cycle?.join("/")}/<root>` + "\n\nSet the `cycles` parameter to `\"ref\"` to resolve cyclical schemas with defs.");
9358
+ }
9359
+ }
9360
+ }
9031
9361
  for (const entry of this.seen.entries()) {
9032
9362
  const seen = entry[1];
9033
9363
  if (schema === entry[0]) {
@@ -9047,11 +9377,7 @@ var JSONSchemaGenerator = class {
9047
9377
  continue;
9048
9378
  }
9049
9379
  if (seen.cycle) {
9050
- if (params.cycles === "throw") {
9051
- throw new Error("Cycle detected: " + `#/${seen.cycle?.join("/")}/<root>` + "\n\nSet the `cycles` parameter to `\"ref\"` to resolve cyclical schemas with defs.");
9052
- } else if (params.cycles === "ref") {
9053
- extractToDef(entry);
9054
- }
9380
+ extractToDef(entry);
9055
9381
  continue;
9056
9382
  }
9057
9383
  if (seen.count > 1) {
@@ -9083,7 +9409,8 @@ var JSONSchemaGenerator = class {
9083
9409
  }
9084
9410
  if (!seen.isParent) this.override({
9085
9411
  zodSchema,
9086
- jsonSchema: schema$1
9412
+ jsonSchema: schema$1,
9413
+ path: seen.path ?? []
9087
9414
  });
9088
9415
  };
9089
9416
  for (const entry of [...this.seen.entries()].reverse()) {
@@ -9097,6 +9424,11 @@ var JSONSchemaGenerator = class {
9097
9424
  } else {
9098
9425
  console.warn(`Invalid target: ${this.target}`);
9099
9426
  }
9427
+ if (params.external?.uri) {
9428
+ const id = params.external.registry.get(schema)?.id;
9429
+ if (!id) throw new Error("Schema is missing an `id` property");
9430
+ result.$id = params.external.uri(id);
9431
+ }
9100
9432
  Object.assign(result, root.def);
9101
9433
  const defs = params.external?.defs ?? {};
9102
9434
  for (const entry of this.seen.entries()) {
@@ -9105,11 +9437,13 @@ var JSONSchemaGenerator = class {
9105
9437
  defs[seen.defId] = seen.def;
9106
9438
  }
9107
9439
  }
9108
- if (!params.external && Object.keys(defs).length > 0) {
9109
- if (this.target === "draft-2020-12") {
9110
- result.$defs = defs;
9111
- } else {
9112
- result.definitions = defs;
9440
+ if (params.external) {} else {
9441
+ if (Object.keys(defs).length > 0) {
9442
+ if (this.target === "draft-2020-12") {
9443
+ result.$defs = defs;
9444
+ } else {
9445
+ result.definitions = defs;
9446
+ }
9113
9447
  }
9114
9448
  }
9115
9449
  try {
@@ -9130,7 +9464,7 @@ function toJSONSchema(input, _params) {
9130
9464
  const schemas = {};
9131
9465
  const external = {
9132
9466
  registry: input,
9133
- uri: _params?.uri || ((id) => id),
9467
+ uri: _params?.uri,
9134
9468
  defs
9135
9469
  };
9136
9470
  for (const entry of input._idmap.entries()) {
@@ -9241,11 +9575,11 @@ function isTransforming(_schema, _ctx) {
9241
9575
  }
9242
9576
 
9243
9577
  //#endregion
9244
- //#region ../../node_modules/zod/dist/esm/v4/core/json-schema.js
9578
+ //#region ../../node_modules/zod/v4/core/json-schema.js
9245
9579
  var json_schema_exports = {};
9246
9580
 
9247
9581
  //#endregion
9248
- //#region ../../node_modules/zod/dist/esm/v4/core/index.js
9582
+ //#region ../../node_modules/zod/v4/core/index.js
9249
9583
  var core_exports = {};
9250
9584
  __export(core_exports, {
9251
9585
  $ZodAny: () => $ZodAny,
@@ -9284,6 +9618,7 @@ __export(core_exports, {
9284
9618
  $ZodCheckStringFormat: () => $ZodCheckStringFormat,
9285
9619
  $ZodCheckUpperCase: () => $ZodCheckUpperCase,
9286
9620
  $ZodCustom: () => $ZodCustom,
9621
+ $ZodCustomStringFormat: () => $ZodCustomStringFormat,
9287
9622
  $ZodDate: () => $ZodDate,
9288
9623
  $ZodDefault: () => $ZodDefault,
9289
9624
  $ZodDiscriminatedUnion: () => $ZodDiscriminatedUnion,
@@ -9348,6 +9683,8 @@ __export(core_exports, {
9348
9683
  Doc: () => Doc,
9349
9684
  JSONSchema: () => json_schema_exports,
9350
9685
  JSONSchemaGenerator: () => JSONSchemaGenerator,
9686
+ NEVER: () => NEVER,
9687
+ TimePrecision: () => TimePrecision,
9351
9688
  _any: () => _any,
9352
9689
  _array: () => _array,
9353
9690
  _base64: () => _base64,
@@ -9437,6 +9774,7 @@ __export(core_exports, {
9437
9774
  _size: () => _size,
9438
9775
  _startsWith: () => _startsWith,
9439
9776
  _string: () => _string,
9777
+ _stringFormat: () => _stringFormat,
9440
9778
  _stringbool: () => _stringbool,
9441
9779
  _success: () => _success,
9442
9780
  _symbol: () => _symbol,
@@ -9486,7 +9824,7 @@ __export(core_exports, {
9486
9824
  });
9487
9825
 
9488
9826
  //#endregion
9489
- //#region ../../node_modules/zod/dist/esm/v4/classic/iso.js
9827
+ //#region ../../node_modules/zod/v4/classic/iso.js
9490
9828
  var iso_exports = {};
9491
9829
  __export(iso_exports, {
9492
9830
  ZodISODate: () => ZodISODate,
@@ -9528,7 +9866,7 @@ function duration(params) {
9528
9866
  }
9529
9867
 
9530
9868
  //#endregion
9531
- //#region ../../node_modules/zod/dist/esm/v4/classic/errors.js
9869
+ //#region ../../node_modules/zod/v4/classic/errors.js
9532
9870
  const initializer = (inst, issues) => {
9533
9871
  $ZodError.init(inst, issues);
9534
9872
  inst.name = "ZodError";
@@ -9546,14 +9884,14 @@ const ZodError = $constructor("ZodError", initializer);
9546
9884
  const ZodRealError = $constructor("ZodError", initializer, { Parent: Error });
9547
9885
 
9548
9886
  //#endregion
9549
- //#region ../../node_modules/zod/dist/esm/v4/classic/parse.js
9887
+ //#region ../../node_modules/zod/v4/classic/parse.js
9550
9888
  const parse = /* @__PURE__ */ _parse(ZodRealError);
9551
9889
  const parseAsync = /* @__PURE__ */ _parseAsync(ZodRealError);
9552
9890
  const safeParse = /* @__PURE__ */ _safeParse(ZodRealError);
9553
9891
  const safeParseAsync = /* @__PURE__ */ _safeParseAsync(ZodRealError);
9554
9892
 
9555
9893
  //#endregion
9556
- //#region ../../node_modules/zod/dist/esm/v4/classic/schemas.js
9894
+ //#region ../../node_modules/zod/v4/classic/schemas.js
9557
9895
  const ZodType = /* @__PURE__ */ $constructor("ZodType", (inst, def) => {
9558
9896
  $ZodType.init(inst, def);
9559
9897
  inst.def = def;
@@ -9821,6 +10159,13 @@ const ZodJWT = /* @__PURE__ */ $constructor("ZodJWT", (inst, def) => {
9821
10159
  function jwt(params) {
9822
10160
  return _jwt(ZodJWT, params);
9823
10161
  }
10162
+ const ZodCustomStringFormat = /* @__PURE__ */ $constructor("ZodCustomStringFormat", (inst, def) => {
10163
+ $ZodCustomStringFormat.init(inst, def);
10164
+ ZodStringFormat.init(inst, def);
10165
+ });
10166
+ function stringFormat(format, fnOrRegex, _params = {}) {
10167
+ return _stringFormat(ZodCustomStringFormat, format, fnOrRegex, _params);
10168
+ }
9824
10169
  const ZodNumber = /* @__PURE__ */ $constructor("ZodNumber", (inst, def) => {
9825
10170
  $ZodNumber.init(inst, def);
9826
10171
  ZodType.init(inst, def);
@@ -9990,9 +10335,7 @@ function keyof(schema) {
9990
10335
  const ZodObject = /* @__PURE__ */ $constructor("ZodObject", (inst, def) => {
9991
10336
  $ZodObject.init(inst, def);
9992
10337
  ZodType.init(inst, def);
9993
- defineLazy(inst, "shape", () => {
9994
- return Object.fromEntries(Object.entries(inst._zod.def.shape));
9995
- });
10338
+ defineLazy(inst, "shape", () => def.shape);
9996
10339
  inst.keyof = () => _enum(Object.keys(inst._zod.def.shape));
9997
10340
  inst.catchall = (catchall) => inst.clone({
9998
10341
  ...inst._zod.def,
@@ -10437,11 +10780,8 @@ const ZodCustom = /* @__PURE__ */ $constructor("ZodCustom", (inst, def) => {
10437
10780
  $ZodCustom.init(inst, def);
10438
10781
  ZodType.init(inst, def);
10439
10782
  });
10440
- function check(fn, params) {
10441
- const ch = new $ZodCheck({
10442
- check: "custom",
10443
- ...normalizeParams(params)
10444
- });
10783
+ function check(fn) {
10784
+ const ch = new $ZodCheck({ check: "custom" });
10445
10785
  ch._zod.check = fn;
10446
10786
  return ch;
10447
10787
  }
@@ -10451,7 +10791,7 @@ function custom(fn, _params) {
10451
10791
  function refine(fn, _params = {}) {
10452
10792
  return _refine(ZodCustom, fn, _params);
10453
10793
  }
10454
- function superRefine(fn, params) {
10794
+ function superRefine(fn) {
10455
10795
  const ch = check((payload) => {
10456
10796
  payload.addIssue = (issue$1) => {
10457
10797
  if (typeof issue$1 === "string") {
@@ -10467,7 +10807,7 @@ function superRefine(fn, params) {
10467
10807
  }
10468
10808
  };
10469
10809
  return fn(payload.value, payload);
10470
- }, params);
10810
+ });
10471
10811
  return ch;
10472
10812
  }
10473
10813
  function _instanceof(cls, params = { error: `Input not instance of ${cls.name}` }) {
@@ -10505,7 +10845,7 @@ function preprocess(fn, schema) {
10505
10845
  }
10506
10846
 
10507
10847
  //#endregion
10508
- //#region ../../node_modules/zod/dist/esm/v4/classic/compat.js
10848
+ //#region ../../node_modules/zod/v4/classic/compat.js
10509
10849
  /** @deprecated Use the raw string literal codes instead, e.g. "invalid_type". */
10510
10850
  const ZodIssueCode = {
10511
10851
  invalid_type: "invalid_type",
@@ -10520,10 +10860,6 @@ const ZodIssueCode = {
10520
10860
  invalid_value: "invalid_value",
10521
10861
  custom: "custom"
10522
10862
  };
10523
- /** @deprecated Not necessary in Zod 4. */
10524
- const INVALID = Object.freeze({ status: "aborted" });
10525
- /** A special constant with type `never` */
10526
- const NEVER = INVALID;
10527
10863
  /** @deprecated Use `z.config(params)` instead. */
10528
10864
  function setErrorMap(map$1) {
10529
10865
  config({ customError: map$1 });
@@ -10534,7 +10870,7 @@ function getErrorMap() {
10534
10870
  }
10535
10871
 
10536
10872
  //#endregion
10537
- //#region ../../node_modules/zod/dist/esm/v4/classic/coerce.js
10873
+ //#region ../../node_modules/zod/v4/classic/coerce.js
10538
10874
  var coerce_exports = {};
10539
10875
  __export(coerce_exports, {
10540
10876
  bigint: () => bigint,
@@ -10560,13 +10896,14 @@ function date(params) {
10560
10896
  }
10561
10897
 
10562
10898
  //#endregion
10563
- //#region ../../node_modules/zod/dist/esm/v4/classic/external.js
10899
+ //#region ../../node_modules/zod/v4/classic/external.js
10564
10900
  var external_exports = {};
10565
10901
  __export(external_exports, {
10566
10902
  $brand: () => $brand,
10567
10903
  $input: () => $input,
10568
10904
  $output: () => $output,
10569
10905
  NEVER: () => NEVER,
10906
+ TimePrecision: () => TimePrecision,
10570
10907
  ZodAny: () => ZodAny,
10571
10908
  ZodArray: () => ZodArray,
10572
10909
  ZodBase64: () => ZodBase64,
@@ -10580,6 +10917,7 @@ __export(external_exports, {
10580
10917
  ZodCUID2: () => ZodCUID2,
10581
10918
  ZodCatch: () => ZodCatch,
10582
10919
  ZodCustom: () => ZodCustom,
10920
+ ZodCustomStringFormat: () => ZodCustomStringFormat,
10583
10921
  ZodDate: () => ZodDate,
10584
10922
  ZodDefault: () => ZodDefault,
10585
10923
  ZodDiscriminatedUnion: () => ZodDiscriminatedUnion,
@@ -10741,6 +11079,7 @@ __export(external_exports, {
10741
11079
  startsWith: () => _startsWith,
10742
11080
  strictObject: () => strictObject,
10743
11081
  string: () => string$1,
11082
+ stringFormat: () => stringFormat,
10744
11083
  stringbool: () => stringbool,
10745
11084
  success: () => success,
10746
11085
  superRefine: () => superRefine,
@@ -10771,11 +11110,11 @@ __export(external_exports, {
10771
11110
  config(en_default());
10772
11111
 
10773
11112
  //#endregion
10774
- //#region ../../node_modules/zod/dist/esm/v4/classic/index.js
11113
+ //#region ../../node_modules/zod/v4/classic/index.js
10775
11114
  var classic_default = external_exports;
10776
11115
 
10777
11116
  //#endregion
10778
- //#region ../../node_modules/zod/dist/esm/v4/index.js
11117
+ //#region ../../node_modules/zod/v4/index.js
10779
11118
  var v4_default = classic_default;
10780
11119
 
10781
11120
  //#endregion