@settlemint/sdk-eas 2.4.1-prb370c72b → 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.
@@ -87,7 +87,9 @@ const EAS_FIELD_TYPES = {
87
87
  };
88
88
 
89
89
  //#endregion
90
- //#region ../../node_modules/zod/dist/esm/v4/core/core.js
90
+ //#region ../../node_modules/zod/v4/core/core.js
91
+ /** A special constant with type `never` */
92
+ const NEVER = Object.freeze({ status: "aborted" });
91
93
  function $constructor(name, initializer$2, params) {
92
94
  function init(inst, def) {
93
95
  var _a;
@@ -138,7 +140,7 @@ function config(newConfig) {
138
140
  }
139
141
 
140
142
  //#endregion
141
- //#region ../../node_modules/zod/dist/esm/v4/core/util.js
143
+ //#region ../../node_modules/zod/v4/core/util.js
142
144
  var util_exports = {};
143
145
  __export(util_exports, {
144
146
  BIGINT_FORMAT_RANGES: () => BIGINT_FORMAT_RANGES,
@@ -153,6 +155,7 @@ __export(util_exports, {
153
155
  assertNotEqual: () => assertNotEqual,
154
156
  assignProp: () => assignProp,
155
157
  cached: () => cached,
158
+ captureStackTrace: () => captureStackTrace,
156
159
  cleanEnum: () => cleanEnum,
157
160
  cleanRegex: () => cleanRegex,
158
161
  clone: () => clone,
@@ -291,10 +294,14 @@ function randomString(length = 10) {
291
294
  function esc(str) {
292
295
  return JSON.stringify(str);
293
296
  }
297
+ const captureStackTrace = Error.captureStackTrace ? Error.captureStackTrace : (..._args) => {};
294
298
  function isObject(data) {
295
299
  return typeof data === "object" && data !== null && !Array.isArray(data);
296
300
  }
297
301
  const allowsEval = cached(() => {
302
+ if (typeof navigator !== "undefined" && navigator?.userAgent?.includes("Cloudflare")) {
303
+ return false;
304
+ }
298
305
  try {
299
306
  const F = Function;
300
307
  new F("");
@@ -303,9 +310,6 @@ const allowsEval = cached(() => {
303
310
  return false;
304
311
  }
305
312
  });
306
- function _isObject(o) {
307
- return Object.prototype.toString.call(o) === "[object Object]";
308
- }
309
313
  function isPlainObject(o) {
310
314
  if (isObject(o) === false) return false;
311
315
  const ctor = o.constructor;
@@ -485,6 +489,9 @@ function omit(schema, mask) {
485
489
  });
486
490
  }
487
491
  function extend(schema, shape) {
492
+ if (!isPlainObject(shape)) {
493
+ throw new Error("Invalid input to extend: expected a plain object");
494
+ }
488
495
  const def = {
489
496
  ...schema._zod.def,
490
497
  get shape() {
@@ -572,7 +579,7 @@ function required(Class$1, schema, mask) {
572
579
  }
573
580
  function aborted(x, startIndex = 0) {
574
581
  for (let i = startIndex; i < x.issues.length; i++) {
575
- if (x.issues[i].continue !== true) return true;
582
+ if (x.issues[i]?.continue !== true) return true;
576
583
  }
577
584
  return false;
578
585
  }
@@ -636,7 +643,7 @@ var Class = class {
636
643
  };
637
644
 
638
645
  //#endregion
639
- //#region ../../node_modules/zod/dist/esm/v4/core/errors.js
646
+ //#region ../../node_modules/zod/v4/core/errors.js
640
647
  const initializer$1 = (inst, def) => {
641
648
  inst.name = "$ZodError";
642
649
  Object.defineProperty(inst, "_zod", {
@@ -653,13 +660,17 @@ const initializer$1 = (inst, def) => {
653
660
  },
654
661
  enumerable: true
655
662
  });
663
+ Object.defineProperty(inst, "toString", {
664
+ value: () => inst.message,
665
+ enumerable: false
666
+ });
656
667
  };
657
668
  const $ZodError = $constructor("$ZodError", initializer$1);
658
669
  const $ZodRealError = $constructor("$ZodError", initializer$1, { Parent: Error });
659
- function flattenError(error$37, mapper = (issue$1) => issue$1.message) {
670
+ function flattenError(error$39, mapper = (issue$1) => issue$1.message) {
660
671
  const fieldErrors = {};
661
672
  const formErrors = [];
662
- for (const sub of error$37.issues) {
673
+ for (const sub of error$39.issues) {
663
674
  if (sub.path.length > 0) {
664
675
  fieldErrors[sub.path[0]] = fieldErrors[sub.path[0]] || [];
665
676
  fieldErrors[sub.path[0]].push(mapper(sub));
@@ -672,13 +683,13 @@ function flattenError(error$37, mapper = (issue$1) => issue$1.message) {
672
683
  fieldErrors
673
684
  };
674
685
  }
675
- function formatError(error$37, _mapper) {
686
+ function formatError(error$39, _mapper) {
676
687
  const mapper = _mapper || function(issue$1) {
677
688
  return issue$1.message;
678
689
  };
679
690
  const fieldErrors = { _errors: [] };
680
- const processError = (error$38) => {
681
- for (const issue$1 of error$38.issues) {
691
+ const processError = (error$40) => {
692
+ for (const issue$1 of error$40.issues) {
682
693
  if (issue$1.code === "invalid_union" && issue$1.errors.length) {
683
694
  issue$1.errors.map((issues) => processError({ issues }));
684
695
  } else if (issue$1.code === "invalid_key") {
@@ -705,17 +716,17 @@ function formatError(error$37, _mapper) {
705
716
  }
706
717
  }
707
718
  };
708
- processError(error$37);
719
+ processError(error$39);
709
720
  return fieldErrors;
710
721
  }
711
- function treeifyError(error$37, _mapper) {
722
+ function treeifyError(error$39, _mapper) {
712
723
  const mapper = _mapper || function(issue$1) {
713
724
  return issue$1.message;
714
725
  };
715
726
  const result = { errors: [] };
716
- const processError = (error$38, path = []) => {
727
+ const processError = (error$40, path = []) => {
717
728
  var _a, _b;
718
- for (const issue$1 of error$38.issues) {
729
+ for (const issue$1 of error$40.issues) {
719
730
  if (issue$1.code === "invalid_union" && issue$1.errors.length) {
720
731
  issue$1.errors.map((issues) => processError({ issues }, issue$1.path));
721
732
  } else if (issue$1.code === "invalid_key") {
@@ -750,7 +761,7 @@ function treeifyError(error$37, _mapper) {
750
761
  }
751
762
  }
752
763
  };
753
- processError(error$37);
764
+ processError(error$39);
754
765
  return result;
755
766
  }
756
767
  /** Format a ZodError as a human-readable string in the following form.
@@ -798,9 +809,9 @@ function toDotPath(path) {
798
809
  }
799
810
  return segs.join("");
800
811
  }
801
- function prettifyError(error$37) {
812
+ function prettifyError(error$39) {
802
813
  const lines = [];
803
- const issues = [...error$37.issues].sort((a, b) => a.path.length - b.path.length);
814
+ const issues = [...error$39.issues].sort((a, b) => a.path.length - b.path.length);
804
815
  for (const issue$1 of issues) {
805
816
  lines.push(`✖ ${issue$1.message}`);
806
817
  if (issue$1.path?.length) lines.push(` → at ${toDotPath(issue$1.path)}`);
@@ -809,7 +820,7 @@ function prettifyError(error$37) {
809
820
  }
810
821
 
811
822
  //#endregion
812
- //#region ../../node_modules/zod/dist/esm/v4/core/parse.js
823
+ //#region ../../node_modules/zod/v4/core/parse.js
813
824
  const _parse = (_Err) => (schema, value, _ctx, _params) => {
814
825
  const ctx = _ctx ? Object.assign(_ctx, { async: false }) : { async: false };
815
826
  const result = schema._zod.run({
@@ -821,7 +832,7 @@ const _parse = (_Err) => (schema, value, _ctx, _params) => {
821
832
  }
822
833
  if (result.issues.length) {
823
834
  const e = new (_params?.Err ?? _Err)(result.issues.map((iss) => finalizeIssue(iss, ctx, config())));
824
- Error.captureStackTrace(e, _params?.callee);
835
+ captureStackTrace(e, _params?.callee);
825
836
  throw e;
826
837
  }
827
838
  return result.value;
@@ -836,7 +847,7 @@ const _parseAsync = (_Err) => async (schema, value, _ctx, params) => {
836
847
  if (result instanceof Promise) result = await result;
837
848
  if (result.issues.length) {
838
849
  const e = new (params?.Err ?? _Err)(result.issues.map((iss) => finalizeIssue(iss, ctx, config())));
839
- Error.captureStackTrace(e, params?.callee);
850
+ captureStackTrace(e, params?.callee);
840
851
  throw e;
841
852
  }
842
853
  return result.value;
@@ -881,10 +892,9 @@ const _safeParseAsync = (_Err) => async (schema, value, _ctx) => {
881
892
  const safeParseAsync$1 = /* @__PURE__ */ _safeParseAsync($ZodRealError);
882
893
 
883
894
  //#endregion
884
- //#region ../../node_modules/zod/dist/esm/v4/core/regexes.js
895
+ //#region ../../node_modules/zod/v4/core/regexes.js
885
896
  var regexes_exports = {};
886
897
  __export(regexes_exports, {
887
- _emoji: () => _emoji$1,
888
898
  base64: () => base64$1,
889
899
  base64url: () => base64url$1,
890
900
  bigint: () => bigint$2,
@@ -970,27 +980,23 @@ const base64url$1 = /^[A-Za-z0-9_-]*$/;
970
980
  const hostname = /^([a-zA-Z0-9-]+\.)*[a-zA-Z0-9-]+$/;
971
981
  const domain = /^([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$/;
972
982
  const e164$1 = /^\+(?:[0-9]){6,14}[0-9]$/;
973
- 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])))`;
983
+ 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])))`;
974
984
  const date$3 = /* @__PURE__ */ new RegExp(`^${dateSource}$`);
975
985
  function timeSource(args) {
976
- let regex = `([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d`;
977
- if (args.precision) {
978
- regex = `${regex}\\.\\d{${args.precision}}`;
979
- } else if (args.precision == null) {
980
- regex = `${regex}(\\.\\d+)?`;
981
- }
986
+ const hhmm = `(?:[01]\\d|2[0-3]):[0-5]\\d`;
987
+ 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+)?)?`;
982
988
  return regex;
983
989
  }
984
990
  function time$1(args) {
985
991
  return new RegExp(`^${timeSource(args)}$`);
986
992
  }
987
993
  function datetime$1(args) {
988
- let regex = `${dateSource}T${timeSource(args)}`;
989
- const opts = [];
990
- opts.push(args.local ? `Z?` : `Z`);
991
- if (args.offset) opts.push(`([+-]\\d{2}:?\\d{2})`);
992
- regex = `${regex}(${opts.join("|")})`;
993
- return new RegExp(`^${regex}$`);
994
+ const time$2 = timeSource({ precision: args.precision });
995
+ const opts = ["Z"];
996
+ if (args.local) opts.push("");
997
+ if (args.offset) opts.push(`([+-]\\d{2}:\\d{2})`);
998
+ const timeRegex = `${time$2}(?:${opts.join("|")})`;
999
+ return new RegExp(`^${dateSource}T(?:${timeRegex})$`);
994
1000
  }
995
1001
  const string$2 = (params) => {
996
1002
  const regex = params ? `[\\s\\S]{${params?.minimum ?? 0},${params?.maximum ?? ""}}` : `[\\s\\S]*`;
@@ -1006,7 +1012,7 @@ const lowercase = /^[^A-Z]*$/;
1006
1012
  const uppercase = /^[^a-z]*$/;
1007
1013
 
1008
1014
  //#endregion
1009
- //#region ../../node_modules/zod/dist/esm/v4/core/checks.js
1015
+ //#region ../../node_modules/zod/v4/core/checks.js
1010
1016
  const $ZodCheck = /* @__PURE__ */ $constructor("$ZodCheck", (inst, def) => {
1011
1017
  var _a;
1012
1018
  inst._zod ?? (inst._zod = {});
@@ -1197,11 +1203,12 @@ const $ZodCheckBigIntFormat = /* @__PURE__ */ $constructor("$ZodCheckBigIntForma
1197
1203
  };
1198
1204
  });
1199
1205
  const $ZodCheckMaxSize = /* @__PURE__ */ $constructor("$ZodCheckMaxSize", (inst, def) => {
1206
+ var _a;
1200
1207
  $ZodCheck.init(inst, def);
1201
- inst._zod.when = (payload) => {
1208
+ (_a = inst._zod.def).when ?? (_a.when = (payload) => {
1202
1209
  const val = payload.value;
1203
1210
  return !nullish$1(val) && val.size !== undefined;
1204
- };
1211
+ });
1205
1212
  inst._zod.onattach.push((inst$1) => {
1206
1213
  const curr = inst$1._zod.bag.maximum ?? Number.POSITIVE_INFINITY;
1207
1214
  if (def.maximum < curr) inst$1._zod.bag.maximum = def.maximum;
@@ -1221,11 +1228,12 @@ const $ZodCheckMaxSize = /* @__PURE__ */ $constructor("$ZodCheckMaxSize", (inst,
1221
1228
  };
1222
1229
  });
1223
1230
  const $ZodCheckMinSize = /* @__PURE__ */ $constructor("$ZodCheckMinSize", (inst, def) => {
1231
+ var _a;
1224
1232
  $ZodCheck.init(inst, def);
1225
- inst._zod.when = (payload) => {
1233
+ (_a = inst._zod.def).when ?? (_a.when = (payload) => {
1226
1234
  const val = payload.value;
1227
1235
  return !nullish$1(val) && val.size !== undefined;
1228
- };
1236
+ });
1229
1237
  inst._zod.onattach.push((inst$1) => {
1230
1238
  const curr = inst$1._zod.bag.minimum ?? Number.NEGATIVE_INFINITY;
1231
1239
  if (def.minimum > curr) inst$1._zod.bag.minimum = def.minimum;
@@ -1245,11 +1253,12 @@ const $ZodCheckMinSize = /* @__PURE__ */ $constructor("$ZodCheckMinSize", (inst,
1245
1253
  };
1246
1254
  });
1247
1255
  const $ZodCheckSizeEquals = /* @__PURE__ */ $constructor("$ZodCheckSizeEquals", (inst, def) => {
1256
+ var _a;
1248
1257
  $ZodCheck.init(inst, def);
1249
- inst._zod.when = (payload) => {
1258
+ (_a = inst._zod.def).when ?? (_a.when = (payload) => {
1250
1259
  const val = payload.value;
1251
1260
  return !nullish$1(val) && val.size !== undefined;
1252
- };
1261
+ });
1253
1262
  inst._zod.onattach.push((inst$1) => {
1254
1263
  const bag = inst$1._zod.bag;
1255
1264
  bag.minimum = def.size;
@@ -1270,6 +1279,8 @@ const $ZodCheckSizeEquals = /* @__PURE__ */ $constructor("$ZodCheckSizeEquals",
1270
1279
  code: "too_small",
1271
1280
  minimum: def.size
1272
1281
  },
1282
+ inclusive: true,
1283
+ exact: true,
1273
1284
  input: payload.value,
1274
1285
  inst,
1275
1286
  continue: !def.abort
@@ -1277,11 +1288,12 @@ const $ZodCheckSizeEquals = /* @__PURE__ */ $constructor("$ZodCheckSizeEquals",
1277
1288
  };
1278
1289
  });
1279
1290
  const $ZodCheckMaxLength = /* @__PURE__ */ $constructor("$ZodCheckMaxLength", (inst, def) => {
1291
+ var _a;
1280
1292
  $ZodCheck.init(inst, def);
1281
- inst._zod.when = (payload) => {
1293
+ (_a = inst._zod.def).when ?? (_a.when = (payload) => {
1282
1294
  const val = payload.value;
1283
1295
  return !nullish$1(val) && val.length !== undefined;
1284
- };
1296
+ });
1285
1297
  inst._zod.onattach.push((inst$1) => {
1286
1298
  const curr = inst$1._zod.bag.maximum ?? Number.POSITIVE_INFINITY;
1287
1299
  if (def.maximum < curr) inst$1._zod.bag.maximum = def.maximum;
@@ -1303,11 +1315,12 @@ const $ZodCheckMaxLength = /* @__PURE__ */ $constructor("$ZodCheckMaxLength", (i
1303
1315
  };
1304
1316
  });
1305
1317
  const $ZodCheckMinLength = /* @__PURE__ */ $constructor("$ZodCheckMinLength", (inst, def) => {
1318
+ var _a;
1306
1319
  $ZodCheck.init(inst, def);
1307
- inst._zod.when = (payload) => {
1320
+ (_a = inst._zod.def).when ?? (_a.when = (payload) => {
1308
1321
  const val = payload.value;
1309
1322
  return !nullish$1(val) && val.length !== undefined;
1310
- };
1323
+ });
1311
1324
  inst._zod.onattach.push((inst$1) => {
1312
1325
  const curr = inst$1._zod.bag.minimum ?? Number.NEGATIVE_INFINITY;
1313
1326
  if (def.minimum > curr) inst$1._zod.bag.minimum = def.minimum;
@@ -1329,11 +1342,12 @@ const $ZodCheckMinLength = /* @__PURE__ */ $constructor("$ZodCheckMinLength", (i
1329
1342
  };
1330
1343
  });
1331
1344
  const $ZodCheckLengthEquals = /* @__PURE__ */ $constructor("$ZodCheckLengthEquals", (inst, def) => {
1345
+ var _a;
1332
1346
  $ZodCheck.init(inst, def);
1333
- inst._zod.when = (payload) => {
1347
+ (_a = inst._zod.def).when ?? (_a.when = (payload) => {
1334
1348
  const val = payload.value;
1335
1349
  return !nullish$1(val) && val.length !== undefined;
1336
- };
1350
+ });
1337
1351
  inst._zod.onattach.push((inst$1) => {
1338
1352
  const bag = inst$1._zod.bag;
1339
1353
  bag.minimum = def.length;
@@ -1355,6 +1369,8 @@ const $ZodCheckLengthEquals = /* @__PURE__ */ $constructor("$ZodCheckLengthEqual
1355
1369
  code: "too_small",
1356
1370
  minimum: def.length
1357
1371
  },
1372
+ inclusive: true,
1373
+ exact: true,
1358
1374
  input: payload.value,
1359
1375
  inst,
1360
1376
  continue: !def.abort
@@ -1362,7 +1378,7 @@ const $ZodCheckLengthEquals = /* @__PURE__ */ $constructor("$ZodCheckLengthEqual
1362
1378
  };
1363
1379
  });
1364
1380
  const $ZodCheckStringFormat = /* @__PURE__ */ $constructor("$ZodCheckStringFormat", (inst, def) => {
1365
- var _a;
1381
+ var _a, _b;
1366
1382
  $ZodCheck.init(inst, def);
1367
1383
  inst._zod.onattach.push((inst$1) => {
1368
1384
  const bag = inst$1._zod.bag;
@@ -1372,8 +1388,7 @@ const $ZodCheckStringFormat = /* @__PURE__ */ $constructor("$ZodCheckStringForma
1372
1388
  bag.patterns.add(def.pattern);
1373
1389
  }
1374
1390
  });
1375
- (_a = inst._zod).check ?? (_a.check = (payload) => {
1376
- if (!def.pattern) throw new Error("Not implemented.");
1391
+ if (def.pattern) (_a = inst._zod).check ?? (_a.check = (payload) => {
1377
1392
  def.pattern.lastIndex = 0;
1378
1393
  if (def.pattern.test(payload.value)) return;
1379
1394
  payload.issues.push({
@@ -1386,6 +1401,7 @@ const $ZodCheckStringFormat = /* @__PURE__ */ $constructor("$ZodCheckStringForma
1386
1401
  continue: !def.abort
1387
1402
  });
1388
1403
  });
1404
+ else (_b = inst._zod).check ?? (_b.check = () => {});
1389
1405
  });
1390
1406
  const $ZodCheckRegex = /* @__PURE__ */ $constructor("$ZodCheckRegex", (inst, def) => {
1391
1407
  $ZodCheckStringFormat.init(inst, def);
@@ -1509,7 +1525,6 @@ const $ZodCheckMimeType = /* @__PURE__ */ $constructor("$ZodCheckMimeType", (ins
1509
1525
  code: "invalid_value",
1510
1526
  values: def.mime,
1511
1527
  input: payload.value.type,
1512
- path: ["type"],
1513
1528
  inst
1514
1529
  });
1515
1530
  };
@@ -1522,7 +1537,7 @@ const $ZodCheckOverwrite = /* @__PURE__ */ $constructor("$ZodCheckOverwrite", (i
1522
1537
  });
1523
1538
 
1524
1539
  //#endregion
1525
- //#region ../../node_modules/zod/dist/esm/v4/core/doc.js
1540
+ //#region ../../node_modules/zod/v4/core/doc.js
1526
1541
  var Doc = class {
1527
1542
  constructor(args = []) {
1528
1543
  this.content = [];
@@ -1558,19 +1573,18 @@ var Doc = class {
1558
1573
  };
1559
1574
 
1560
1575
  //#endregion
1561
- //#region ../../node_modules/zod/dist/esm/v4/core/versions.js
1576
+ //#region ../../node_modules/zod/v4/core/versions.js
1562
1577
  const version = {
1563
1578
  major: 4,
1564
1579
  minor: 0,
1565
- patch: 0
1580
+ patch: 2
1566
1581
  };
1567
1582
 
1568
1583
  //#endregion
1569
- //#region ../../node_modules/zod/dist/esm/v4/core/schemas.js
1584
+ //#region ../../node_modules/zod/v4/core/schemas.js
1570
1585
  const $ZodType = /* @__PURE__ */ $constructor("$ZodType", (inst, def) => {
1571
1586
  var _a;
1572
1587
  inst ?? (inst = {});
1573
- inst._zod.id = def.type + "_" + randomString(10);
1574
1588
  inst._zod.def = def;
1575
1589
  inst._zod.bag = inst._zod.bag || {};
1576
1590
  inst._zod.version = version;
@@ -1593,13 +1607,11 @@ const $ZodType = /* @__PURE__ */ $constructor("$ZodType", (inst, def) => {
1593
1607
  let isAborted = aborted(payload);
1594
1608
  let asyncResult;
1595
1609
  for (const ch of checks$1) {
1596
- if (ch._zod.when) {
1597
- const shouldRun = ch._zod.when(payload);
1610
+ if (ch._zod.def.when) {
1611
+ const shouldRun = ch._zod.def.when(payload);
1598
1612
  if (!shouldRun) continue;
1599
- } else {
1600
- if (isAborted) {
1601
- continue;
1602
- }
1613
+ } else if (isAborted) {
1614
+ continue;
1603
1615
  }
1604
1616
  const currLen = payload.issues.length;
1605
1617
  const _ = ch._zod.check(payload);
@@ -1699,7 +1711,9 @@ const $ZodURL = /* @__PURE__ */ $constructor("$ZodURL", (inst, def) => {
1699
1711
  $ZodStringFormat.init(inst, def);
1700
1712
  inst._zod.check = (payload) => {
1701
1713
  try {
1702
- const url$1 = new URL(payload.value);
1714
+ const orig = payload.value;
1715
+ const url$1 = new URL(orig);
1716
+ const href = url$1.href;
1703
1717
  if (def.hostname) {
1704
1718
  def.hostname.lastIndex = 0;
1705
1719
  if (!def.hostname.test(url$1.hostname)) {
@@ -1728,6 +1742,11 @@ const $ZodURL = /* @__PURE__ */ $constructor("$ZodURL", (inst, def) => {
1728
1742
  });
1729
1743
  }
1730
1744
  }
1745
+ if (!orig.endsWith("/") && href.endsWith("/")) {
1746
+ payload.value = href.slice(0, -1);
1747
+ } else {
1748
+ payload.value = href;
1749
+ }
1731
1750
  return;
1732
1751
  } catch (_) {
1733
1752
  payload.issues.push({
@@ -1898,6 +1917,7 @@ function isValidJWT(token, algorithm = null) {
1898
1917
  const tokensParts = token.split(".");
1899
1918
  if (tokensParts.length !== 3) return false;
1900
1919
  const [header] = tokensParts;
1920
+ if (!header) return false;
1901
1921
  const parsedHeader = JSON.parse(atob(header));
1902
1922
  if ("typ" in parsedHeader && parsedHeader?.typ !== "JWT") return false;
1903
1923
  if (!parsedHeader.alg) return false;
@@ -1920,6 +1940,19 @@ const $ZodJWT = /* @__PURE__ */ $constructor("$ZodJWT", (inst, def) => {
1920
1940
  });
1921
1941
  };
1922
1942
  });
1943
+ const $ZodCustomStringFormat = /* @__PURE__ */ $constructor("$ZodCustomStringFormat", (inst, def) => {
1944
+ $ZodStringFormat.init(inst, def);
1945
+ inst._zod.check = (payload) => {
1946
+ if (def.fn(payload.value)) return;
1947
+ payload.issues.push({
1948
+ code: "invalid_format",
1949
+ format: def.format,
1950
+ input: payload.value,
1951
+ inst,
1952
+ continue: !def.abort
1953
+ });
1954
+ };
1955
+ });
1923
1956
  const $ZodNumber = /* @__PURE__ */ $constructor("$ZodNumber", (inst, def) => {
1924
1957
  $ZodType.init(inst, def);
1925
1958
  inst._zod.pattern = inst._zod.bag.pattern ?? number$2;
@@ -1971,12 +2004,11 @@ const $ZodBigInt = /* @__PURE__ */ $constructor("$ZodBigInt", (inst, def) => {
1971
2004
  if (def.coerce) try {
1972
2005
  payload.value = BigInt(payload.value);
1973
2006
  } catch (_) {}
1974
- const { value: input } = payload;
1975
- if (typeof input === "bigint") return payload;
2007
+ if (typeof payload.value === "bigint") return payload;
1976
2008
  payload.issues.push({
1977
2009
  expected: "bigint",
1978
2010
  code: "invalid_type",
1979
- input,
2011
+ input: payload.value,
1980
2012
  inst
1981
2013
  });
1982
2014
  return payload;
@@ -1989,7 +2021,7 @@ const $ZodBigIntFormat = /* @__PURE__ */ $constructor("$ZodBigInt", (inst, def)
1989
2021
  const $ZodSymbol = /* @__PURE__ */ $constructor("$ZodSymbol", (inst, def) => {
1990
2022
  $ZodType.init(inst, def);
1991
2023
  inst._zod.parse = (payload, _ctx) => {
1992
- const { value: input } = payload;
2024
+ const input = payload.value;
1993
2025
  if (typeof input === "symbol") return payload;
1994
2026
  payload.issues.push({
1995
2027
  expected: "symbol",
@@ -2004,8 +2036,10 @@ const $ZodUndefined = /* @__PURE__ */ $constructor("$ZodUndefined", (inst, def)
2004
2036
  $ZodType.init(inst, def);
2005
2037
  inst._zod.pattern = _undefined$2;
2006
2038
  inst._zod.values = new Set([undefined]);
2039
+ inst._zod.optin = "optional";
2040
+ inst._zod.optout = "optional";
2007
2041
  inst._zod.parse = (payload, _ctx) => {
2008
- const { value: input } = payload;
2042
+ const input = payload.value;
2009
2043
  if (typeof input === "undefined") return payload;
2010
2044
  payload.issues.push({
2011
2045
  expected: "undefined",
@@ -2021,7 +2055,7 @@ const $ZodNull = /* @__PURE__ */ $constructor("$ZodNull", (inst, def) => {
2021
2055
  inst._zod.pattern = _null$2;
2022
2056
  inst._zod.values = new Set([null]);
2023
2057
  inst._zod.parse = (payload, _ctx) => {
2024
- const { value: input } = payload;
2058
+ const input = payload.value;
2025
2059
  if (input === null) return payload;
2026
2060
  payload.issues.push({
2027
2061
  expected: "null",
@@ -2055,7 +2089,7 @@ const $ZodNever = /* @__PURE__ */ $constructor("$ZodNever", (inst, def) => {
2055
2089
  const $ZodVoid = /* @__PURE__ */ $constructor("$ZodVoid", (inst, def) => {
2056
2090
  $ZodType.init(inst, def);
2057
2091
  inst._zod.parse = (payload, _ctx) => {
2058
- const { value: input } = payload;
2092
+ const input = payload.value;
2059
2093
  if (typeof input === "undefined") return payload;
2060
2094
  payload.issues.push({
2061
2095
  expected: "void",
@@ -2186,19 +2220,20 @@ const $ZodObject = /* @__PURE__ */ $constructor("$ZodObject", (inst, def) => {
2186
2220
  "payload",
2187
2221
  "ctx"
2188
2222
  ]);
2189
- const { keys, optionalKeys: optionalKeys$1 } = _normalized.value;
2223
+ const normalized = _normalized.value;
2190
2224
  const parseStr = (key) => {
2191
2225
  const k = esc(key);
2192
2226
  return `shape[${k}]._zod.run({ value: input[${k}], issues: [] }, ctx)`;
2193
2227
  };
2194
2228
  doc.write(`const input = payload.value;`);
2195
2229
  const ids = Object.create(null);
2196
- for (const key of keys) {
2197
- ids[key] = randomString(15);
2230
+ let counter = 0;
2231
+ for (const key of normalized.keys) {
2232
+ ids[key] = `key_${counter++}`;
2198
2233
  }
2199
2234
  doc.write(`const newResult = {}`);
2200
- for (const key of keys) {
2201
- if (optionalKeys$1.has(key)) {
2235
+ for (const key of normalized.keys) {
2236
+ if (normalized.optionalKeys.has(key)) {
2202
2237
  const id = ids[key];
2203
2238
  doc.write(`const ${id} = ${parseStr(key)};`);
2204
2239
  const k = esc(key);
@@ -2243,7 +2278,7 @@ const $ZodObject = /* @__PURE__ */ $constructor("$ZodObject", (inst, def) => {
2243
2278
  const jit = !globalConfig.jitless;
2244
2279
  const allowsEval$1 = allowsEval;
2245
2280
  const fastEnabled = jit && allowsEval$1.value;
2246
- const { catchall } = def;
2281
+ const catchall = def.catchall;
2247
2282
  let value;
2248
2283
  inst._zod.parse = (payload, ctx) => {
2249
2284
  value ?? (value = _normalized.value);
@@ -2273,12 +2308,10 @@ const $ZodObject = /* @__PURE__ */ $constructor("$ZodObject", (inst, def) => {
2273
2308
  const isOptional = el._zod.optin === "optional" && el._zod.optout === "optional";
2274
2309
  if (r instanceof Promise) {
2275
2310
  proms.push(r.then((r$1) => isOptional ? handleOptionalObjectResult(r$1, payload, key, input) : handleObjectResult(r$1, payload, key)));
2311
+ } else if (isOptional) {
2312
+ handleOptionalObjectResult(r, payload, key, input);
2276
2313
  } else {
2277
- if (isOptional) {
2278
- handleOptionalObjectResult(r, payload, key, input);
2279
- } else {
2280
- handleObjectResult(r, payload, key);
2281
- }
2314
+ handleObjectResult(r, payload, key);
2282
2315
  }
2283
2316
  }
2284
2317
  }
@@ -2336,6 +2369,8 @@ function handleUnionResults(results, final, inst, ctx) {
2336
2369
  }
2337
2370
  const $ZodUnion = /* @__PURE__ */ $constructor("$ZodUnion", (inst, def) => {
2338
2371
  $ZodType.init(inst, def);
2372
+ defineLazy(inst._zod, "optin", () => def.options.some((o) => o._zod.optin === "optional") ? "optional" : undefined);
2373
+ defineLazy(inst._zod, "optout", () => def.options.some((o) => o._zod.optout === "optional") ? "optional" : undefined);
2339
2374
  defineLazy(inst._zod, "values", () => {
2340
2375
  if (def.options.every((o) => o._zod.values)) {
2341
2376
  return new Set(def.options.flatMap((option) => Array.from(option._zod.values)));
@@ -2435,7 +2470,7 @@ const $ZodDiscriminatedUnion = /* @__PURE__ */ $constructor("$ZodDiscriminatedUn
2435
2470
  const $ZodIntersection = /* @__PURE__ */ $constructor("$ZodIntersection", (inst, def) => {
2436
2471
  $ZodType.init(inst, def);
2437
2472
  inst._zod.parse = (payload, ctx) => {
2438
- const { value: input } = payload;
2473
+ const input = payload.value;
2439
2474
  const left = def.left._zod.run({
2440
2475
  value: input,
2441
2476
  issues: []
@@ -2892,6 +2927,9 @@ const $ZodOptional = /* @__PURE__ */ $constructor("$ZodOptional", (inst, def) =>
2892
2927
  return pattern ? new RegExp(`^(${cleanRegex(pattern.source)})?$`) : undefined;
2893
2928
  });
2894
2929
  inst._zod.parse = (payload, ctx) => {
2930
+ if (def.innerType._zod.optin === "optional") {
2931
+ return def.innerType._zod.run(payload, ctx);
2932
+ }
2895
2933
  if (payload.value === undefined) {
2896
2934
  return payload;
2897
2935
  }
@@ -2991,7 +3029,7 @@ const $ZodSuccess = /* @__PURE__ */ $constructor("$ZodSuccess", (inst, def) => {
2991
3029
  });
2992
3030
  const $ZodCatch = /* @__PURE__ */ $constructor("$ZodCatch", (inst, def) => {
2993
3031
  $ZodType.init(inst, def);
2994
- defineLazy(inst._zod, "optin", () => def.innerType._zod.optin);
3032
+ inst._zod.optin = "optional";
2995
3033
  defineLazy(inst._zod, "optout", () => def.innerType._zod.optout);
2996
3034
  defineLazy(inst._zod, "values", () => def.innerType._zod.values);
2997
3035
  inst._zod.parse = (payload, ctx) => {
@@ -3062,6 +3100,7 @@ function handlePipeResult(left, def, ctx) {
3062
3100
  const $ZodReadonly = /* @__PURE__ */ $constructor("$ZodReadonly", (inst, def) => {
3063
3101
  $ZodType.init(inst, def);
3064
3102
  defineLazy(inst._zod, "propValues", () => def.innerType._zod.propValues);
3103
+ defineLazy(inst._zod, "values", () => def.innerType._zod.values);
3065
3104
  defineLazy(inst._zod, "optin", () => def.innerType._zod.optin);
3066
3105
  defineLazy(inst._zod, "optout", () => def.innerType._zod.optout);
3067
3106
  inst._zod.parse = (payload, ctx) => {
@@ -3112,7 +3151,7 @@ const $ZodTemplateLiteral = /* @__PURE__ */ $constructor("$ZodTemplateLiteral",
3112
3151
  input: payload.value,
3113
3152
  inst,
3114
3153
  code: "invalid_format",
3115
- format: "template_literal",
3154
+ format: def.format ?? "template_literal",
3116
3155
  pattern: inst._zod.pattern.source
3117
3156
  });
3118
3157
  return payload;
@@ -3172,8 +3211,8 @@ function handleRefineResult(result, payload, input, inst) {
3172
3211
  }
3173
3212
 
3174
3213
  //#endregion
3175
- //#region ../../node_modules/zod/dist/esm/v4/locales/ar.js
3176
- const error$36 = () => {
3214
+ //#region ../../node_modules/zod/v4/locales/ar.js
3215
+ const error$38 = () => {
3177
3216
  const Sizable = {
3178
3217
  string: {
3179
3218
  unit: "حرف",
@@ -3195,7 +3234,7 @@ const error$36 = () => {
3195
3234
  function getSizing(origin) {
3196
3235
  return Sizable[origin] ?? null;
3197
3236
  }
3198
- const parsedType$2 = (data) => {
3237
+ const parsedType$3 = (data) => {
3199
3238
  const t = typeof data;
3200
3239
  switch (t) {
3201
3240
  case "number": {
@@ -3247,7 +3286,7 @@ const error$36 = () => {
3247
3286
  };
3248
3287
  return (issue$1) => {
3249
3288
  switch (issue$1.code) {
3250
- case "invalid_type": return `مدخلات غير مقبولة: يفترض إدخال ${issue$1.expected}، ولكن تم إدخال ${parsedType$2(issue$1.input)}`;
3289
+ case "invalid_type": return `مدخلات غير مقبولة: يفترض إدخال ${issue$1.expected}، ولكن تم إدخال ${parsedType$3(issue$1.input)}`;
3251
3290
  case "invalid_value":
3252
3291
  if (issue$1.values.length === 1) return `مدخلات غير مقبولة: يفترض إدخال ${stringifyPrimitive(issue$1.values[0])}`;
3253
3292
  return `اختيار غير مقبول: يتوقع انتقاء أحد هذه الخيارات: ${joinValues(issue$1.values, "|")}`;
@@ -3283,12 +3322,12 @@ const error$36 = () => {
3283
3322
  };
3284
3323
  };
3285
3324
  function ar_default() {
3286
- return { localeError: error$36() };
3325
+ return { localeError: error$38() };
3287
3326
  }
3288
3327
 
3289
3328
  //#endregion
3290
- //#region ../../node_modules/zod/dist/esm/v4/locales/az.js
3291
- const error$35 = () => {
3329
+ //#region ../../node_modules/zod/v4/locales/az.js
3330
+ const error$37 = () => {
3292
3331
  const Sizable = {
3293
3332
  string: {
3294
3333
  unit: "simvol",
@@ -3310,7 +3349,7 @@ const error$35 = () => {
3310
3349
  function getSizing(origin) {
3311
3350
  return Sizable[origin] ?? null;
3312
3351
  }
3313
- const parsedType$2 = (data) => {
3352
+ const parsedType$3 = (data) => {
3314
3353
  const t = typeof data;
3315
3354
  switch (t) {
3316
3355
  case "number": {
@@ -3362,7 +3401,7 @@ const error$35 = () => {
3362
3401
  };
3363
3402
  return (issue$1) => {
3364
3403
  switch (issue$1.code) {
3365
- case "invalid_type": return `Yanlış dəyər: gözlənilən ${issue$1.expected}, daxil olan ${parsedType$2(issue$1.input)}`;
3404
+ case "invalid_type": return `Yanlış dəyər: gözlənilən ${issue$1.expected}, daxil olan ${parsedType$3(issue$1.input)}`;
3366
3405
  case "invalid_value":
3367
3406
  if (issue$1.values.length === 1) return `Yanlış dəyər: gözlənilən ${stringifyPrimitive(issue$1.values[0])}`;
3368
3407
  return `Yanlış seçim: aşağıdakılardan biri olmalıdır: ${joinValues(issue$1.values, "|")}`;
@@ -3396,11 +3435,11 @@ const error$35 = () => {
3396
3435
  };
3397
3436
  };
3398
3437
  function az_default() {
3399
- return { localeError: error$35() };
3438
+ return { localeError: error$37() };
3400
3439
  }
3401
3440
 
3402
3441
  //#endregion
3403
- //#region ../../node_modules/zod/dist/esm/v4/locales/be.js
3442
+ //#region ../../node_modules/zod/v4/locales/be.js
3404
3443
  function getBelarusianPlural(count, one, few, many) {
3405
3444
  const absCount = Math.abs(count);
3406
3445
  const lastDigit = absCount % 10;
@@ -3416,7 +3455,7 @@ function getBelarusianPlural(count, one, few, many) {
3416
3455
  }
3417
3456
  return many;
3418
3457
  }
3419
- const error$34 = () => {
3458
+ const error$36 = () => {
3420
3459
  const Sizable = {
3421
3460
  string: {
3422
3461
  unit: {
@@ -3454,7 +3493,7 @@ const error$34 = () => {
3454
3493
  function getSizing(origin) {
3455
3494
  return Sizable[origin] ?? null;
3456
3495
  }
3457
- const parsedType$2 = (data) => {
3496
+ const parsedType$3 = (data) => {
3458
3497
  const t = typeof data;
3459
3498
  switch (t) {
3460
3499
  case "number": {
@@ -3506,7 +3545,7 @@ const error$34 = () => {
3506
3545
  };
3507
3546
  return (issue$1) => {
3508
3547
  switch (issue$1.code) {
3509
- case "invalid_type": return `Няправільны ўвод: чакаўся ${issue$1.expected}, атрымана ${parsedType$2(issue$1.input)}`;
3548
+ case "invalid_type": return `Няправільны ўвод: чакаўся ${issue$1.expected}, атрымана ${parsedType$3(issue$1.input)}`;
3510
3549
  case "invalid_value":
3511
3550
  if (issue$1.values.length === 1) return `Няправільны ўвод: чакалася ${stringifyPrimitive(issue$1.values[0])}`;
3512
3551
  return `Няправільны варыянт: чакаўся адзін з ${joinValues(issue$1.values, "|")}`;
@@ -3548,12 +3587,12 @@ const error$34 = () => {
3548
3587
  };
3549
3588
  };
3550
3589
  function be_default() {
3551
- return { localeError: error$34() };
3590
+ return { localeError: error$36() };
3552
3591
  }
3553
3592
 
3554
3593
  //#endregion
3555
- //#region ../../node_modules/zod/dist/esm/v4/locales/ca.js
3556
- const error$33 = () => {
3594
+ //#region ../../node_modules/zod/v4/locales/ca.js
3595
+ const error$35 = () => {
3557
3596
  const Sizable = {
3558
3597
  string: {
3559
3598
  unit: "caràcters",
@@ -3575,7 +3614,7 @@ const error$33 = () => {
3575
3614
  function getSizing(origin) {
3576
3615
  return Sizable[origin] ?? null;
3577
3616
  }
3578
- const parsedType$2 = (data) => {
3617
+ const parsedType$3 = (data) => {
3579
3618
  const t = typeof data;
3580
3619
  switch (t) {
3581
3620
  case "number": {
@@ -3627,7 +3666,7 @@ const error$33 = () => {
3627
3666
  };
3628
3667
  return (issue$1) => {
3629
3668
  switch (issue$1.code) {
3630
- case "invalid_type": return `Tipus invàlid: s'esperava ${issue$1.expected}, s'ha rebut ${parsedType$2(issue$1.input)}`;
3669
+ case "invalid_type": return `Tipus invàlid: s'esperava ${issue$1.expected}, s'ha rebut ${parsedType$3(issue$1.input)}`;
3631
3670
  case "invalid_value":
3632
3671
  if (issue$1.values.length === 1) return `Valor invàlid: s'esperava ${stringifyPrimitive(issue$1.values[0])}`;
3633
3672
  return `Opció invàlida: s'esperava una de ${joinValues(issue$1.values, " o ")}`;
@@ -3665,12 +3704,12 @@ const error$33 = () => {
3665
3704
  };
3666
3705
  };
3667
3706
  function ca_default() {
3668
- return { localeError: error$33() };
3707
+ return { localeError: error$35() };
3669
3708
  }
3670
3709
 
3671
3710
  //#endregion
3672
- //#region ../../node_modules/zod/dist/esm/v4/locales/cs.js
3673
- const error$32 = () => {
3711
+ //#region ../../node_modules/zod/v4/locales/cs.js
3712
+ const error$34 = () => {
3674
3713
  const Sizable = {
3675
3714
  string: {
3676
3715
  unit: "znaků",
@@ -3692,7 +3731,7 @@ const error$32 = () => {
3692
3731
  function getSizing(origin) {
3693
3732
  return Sizable[origin] ?? null;
3694
3733
  }
3695
- const parsedType$2 = (data) => {
3734
+ const parsedType$3 = (data) => {
3696
3735
  const t = typeof data;
3697
3736
  switch (t) {
3698
3737
  case "number": {
@@ -3762,7 +3801,7 @@ const error$32 = () => {
3762
3801
  };
3763
3802
  return (issue$1) => {
3764
3803
  switch (issue$1.code) {
3765
- case "invalid_type": return `Neplatný vstup: očekáváno ${issue$1.expected}, obdrženo ${parsedType$2(issue$1.input)}`;
3804
+ case "invalid_type": return `Neplatný vstup: očekáváno ${issue$1.expected}, obdrženo ${parsedType$3(issue$1.input)}`;
3766
3805
  case "invalid_value":
3767
3806
  if (issue$1.values.length === 1) return `Neplatný vstup: očekáváno ${stringifyPrimitive(issue$1.values[0])}`;
3768
3807
  return `Neplatná možnost: očekávána jedna z hodnot ${joinValues(issue$1.values, "|")}`;
@@ -3800,12 +3839,12 @@ const error$32 = () => {
3800
3839
  };
3801
3840
  };
3802
3841
  function cs_default() {
3803
- return { localeError: error$32() };
3842
+ return { localeError: error$34() };
3804
3843
  }
3805
3844
 
3806
3845
  //#endregion
3807
- //#region ../../node_modules/zod/dist/esm/v4/locales/de.js
3808
- const error$31 = () => {
3846
+ //#region ../../node_modules/zod/v4/locales/de.js
3847
+ const error$33 = () => {
3809
3848
  const Sizable = {
3810
3849
  string: {
3811
3850
  unit: "Zeichen",
@@ -3827,7 +3866,7 @@ const error$31 = () => {
3827
3866
  function getSizing(origin) {
3828
3867
  return Sizable[origin] ?? null;
3829
3868
  }
3830
- const parsedType$2 = (data) => {
3869
+ const parsedType$3 = (data) => {
3831
3870
  const t = typeof data;
3832
3871
  switch (t) {
3833
3872
  case "number": {
@@ -3879,7 +3918,7 @@ const error$31 = () => {
3879
3918
  };
3880
3919
  return (issue$1) => {
3881
3920
  switch (issue$1.code) {
3882
- case "invalid_type": return `Ungültige Eingabe: erwartet ${issue$1.expected}, erhalten ${parsedType$2(issue$1.input)}`;
3921
+ case "invalid_type": return `Ungültige Eingabe: erwartet ${issue$1.expected}, erhalten ${parsedType$3(issue$1.input)}`;
3883
3922
  case "invalid_value":
3884
3923
  if (issue$1.values.length === 1) return `Ungültige Eingabe: erwartet ${stringifyPrimitive(issue$1.values[0])}`;
3885
3924
  return `Ungültige Option: erwartet eine von ${joinValues(issue$1.values, "|")}`;
@@ -3915,12 +3954,12 @@ const error$31 = () => {
3915
3954
  };
3916
3955
  };
3917
3956
  function de_default() {
3918
- return { localeError: error$31() };
3957
+ return { localeError: error$33() };
3919
3958
  }
3920
3959
 
3921
3960
  //#endregion
3922
- //#region ../../node_modules/zod/dist/esm/v4/locales/en.js
3923
- const parsedType$1 = (data) => {
3961
+ //#region ../../node_modules/zod/v4/locales/en.js
3962
+ const parsedType$2 = (data) => {
3924
3963
  const t = typeof data;
3925
3964
  switch (t) {
3926
3965
  case "number": {
@@ -3940,7 +3979,7 @@ const parsedType$1 = (data) => {
3940
3979
  }
3941
3980
  return t;
3942
3981
  };
3943
- const error$30 = () => {
3982
+ const error$32 = () => {
3944
3983
  const Sizable = {
3945
3984
  string: {
3946
3985
  unit: "characters",
@@ -3994,7 +4033,7 @@ const error$30 = () => {
3994
4033
  };
3995
4034
  return (issue$1) => {
3996
4035
  switch (issue$1.code) {
3997
- case "invalid_type": return `Invalid input: expected ${issue$1.expected}, received ${parsedType$1(issue$1.input)}`;
4036
+ case "invalid_type": return `Invalid input: expected ${issue$1.expected}, received ${parsedType$2(issue$1.input)}`;
3998
4037
  case "invalid_value":
3999
4038
  if (issue$1.values.length === 1) return `Invalid input: expected ${stringifyPrimitive(issue$1.values[0])}`;
4000
4039
  return `Invalid option: expected one of ${joinValues(issue$1.values, "|")}`;
@@ -4032,12 +4071,127 @@ const error$30 = () => {
4032
4071
  };
4033
4072
  };
4034
4073
  function en_default() {
4035
- return { localeError: error$30() };
4074
+ return { localeError: error$32() };
4036
4075
  }
4037
4076
 
4038
4077
  //#endregion
4039
- //#region ../../node_modules/zod/dist/esm/v4/locales/es.js
4040
- const error$29 = () => {
4078
+ //#region ../../node_modules/zod/v4/locales/eo.js
4079
+ const parsedType$1 = (data) => {
4080
+ const t = typeof data;
4081
+ switch (t) {
4082
+ case "number": {
4083
+ return Number.isNaN(data) ? "NaN" : "nombro";
4084
+ }
4085
+ case "object": {
4086
+ if (Array.isArray(data)) {
4087
+ return "tabelo";
4088
+ }
4089
+ if (data === null) {
4090
+ return "senvalora";
4091
+ }
4092
+ if (Object.getPrototypeOf(data) !== Object.prototype && data.constructor) {
4093
+ return data.constructor.name;
4094
+ }
4095
+ }
4096
+ }
4097
+ return t;
4098
+ };
4099
+ const error$31 = () => {
4100
+ const Sizable = {
4101
+ string: {
4102
+ unit: "karaktrojn",
4103
+ verb: "havi"
4104
+ },
4105
+ file: {
4106
+ unit: "bajtojn",
4107
+ verb: "havi"
4108
+ },
4109
+ array: {
4110
+ unit: "elementojn",
4111
+ verb: "havi"
4112
+ },
4113
+ set: {
4114
+ unit: "elementojn",
4115
+ verb: "havi"
4116
+ }
4117
+ };
4118
+ function getSizing(origin) {
4119
+ return Sizable[origin] ?? null;
4120
+ }
4121
+ const Nouns = {
4122
+ regex: "enigo",
4123
+ email: "retadreso",
4124
+ url: "URL",
4125
+ emoji: "emoĝio",
4126
+ uuid: "UUID",
4127
+ uuidv4: "UUIDv4",
4128
+ uuidv6: "UUIDv6",
4129
+ nanoid: "nanoid",
4130
+ guid: "GUID",
4131
+ cuid: "cuid",
4132
+ cuid2: "cuid2",
4133
+ ulid: "ULID",
4134
+ xid: "XID",
4135
+ ksuid: "KSUID",
4136
+ datetime: "ISO-datotempo",
4137
+ date: "ISO-dato",
4138
+ time: "ISO-tempo",
4139
+ duration: "ISO-daŭro",
4140
+ ipv4: "IPv4-adreso",
4141
+ ipv6: "IPv6-adreso",
4142
+ cidrv4: "IPv4-rango",
4143
+ cidrv6: "IPv6-rango",
4144
+ base64: "64-ume kodita karaktraro",
4145
+ base64url: "URL-64-ume kodita karaktraro",
4146
+ json_string: "JSON-karaktraro",
4147
+ e164: "E.164-nombro",
4148
+ jwt: "JWT",
4149
+ template_literal: "enigo"
4150
+ };
4151
+ return (issue$1) => {
4152
+ switch (issue$1.code) {
4153
+ case "invalid_type": return `Nevalida enigo: atendiĝis ${issue$1.expected}, riceviĝis ${parsedType$1(issue$1.input)}`;
4154
+ case "invalid_value":
4155
+ if (issue$1.values.length === 1) return `Nevalida enigo: atendiĝis ${stringifyPrimitive(issue$1.values[0])}`;
4156
+ return `Nevalida opcio: atendiĝis unu el ${joinValues(issue$1.values, "|")}`;
4157
+ case "too_big": {
4158
+ const adj = issue$1.inclusive ? "<=" : "<";
4159
+ const sizing = getSizing(issue$1.origin);
4160
+ if (sizing) return `Tro granda: atendiĝis ke ${issue$1.origin ?? "valoro"} havu ${adj}${issue$1.maximum.toString()} ${sizing.unit ?? "elementojn"}`;
4161
+ return `Tro granda: atendiĝis ke ${issue$1.origin ?? "valoro"} havu ${adj}${issue$1.maximum.toString()}`;
4162
+ }
4163
+ case "too_small": {
4164
+ const adj = issue$1.inclusive ? ">=" : ">";
4165
+ const sizing = getSizing(issue$1.origin);
4166
+ if (sizing) {
4167
+ return `Tro malgranda: atendiĝis ke ${issue$1.origin} havu ${adj}${issue$1.minimum.toString()} ${sizing.unit}`;
4168
+ }
4169
+ return `Tro malgranda: atendiĝis ke ${issue$1.origin} estu ${adj}${issue$1.minimum.toString()}`;
4170
+ }
4171
+ case "invalid_format": {
4172
+ const _issue = issue$1;
4173
+ if (_issue.format === "starts_with") return `Nevalida karaktraro: devas komenciĝi per "${_issue.prefix}"`;
4174
+ if (_issue.format === "ends_with") return `Nevalida karaktraro: devas finiĝi per "${_issue.suffix}"`;
4175
+ if (_issue.format === "includes") return `Nevalida karaktraro: devas inkluzivi "${_issue.includes}"`;
4176
+ if (_issue.format === "regex") return `Nevalida karaktraro: devas kongrui kun la modelo ${_issue.pattern}`;
4177
+ return `Nevalida ${Nouns[_issue.format] ?? issue$1.format}`;
4178
+ }
4179
+ case "not_multiple_of": return `Nevalida nombro: devas esti oblo de ${issue$1.divisor}`;
4180
+ case "unrecognized_keys": return `Nekonata${issue$1.keys.length > 1 ? "j" : ""} ŝlosilo${issue$1.keys.length > 1 ? "j" : ""}: ${joinValues(issue$1.keys, ", ")}`;
4181
+ case "invalid_key": return `Nevalida ŝlosilo en ${issue$1.origin}`;
4182
+ case "invalid_union": return "Nevalida enigo";
4183
+ case "invalid_element": return `Nevalida valoro en ${issue$1.origin}`;
4184
+ default: return `Nevalida enigo`;
4185
+ }
4186
+ };
4187
+ };
4188
+ function eo_default() {
4189
+ return { localeError: error$31() };
4190
+ }
4191
+
4192
+ //#endregion
4193
+ //#region ../../node_modules/zod/v4/locales/es.js
4194
+ const error$30 = () => {
4041
4195
  const Sizable = {
4042
4196
  string: {
4043
4197
  unit: "caracteres",
@@ -4059,7 +4213,7 @@ const error$29 = () => {
4059
4213
  function getSizing(origin) {
4060
4214
  return Sizable[origin] ?? null;
4061
4215
  }
4062
- const parsedType$2 = (data) => {
4216
+ const parsedType$3 = (data) => {
4063
4217
  const t = typeof data;
4064
4218
  switch (t) {
4065
4219
  case "number": {
@@ -4111,7 +4265,7 @@ const error$29 = () => {
4111
4265
  };
4112
4266
  return (issue$1) => {
4113
4267
  switch (issue$1.code) {
4114
- case "invalid_type": return `Entrada inválida: se esperaba ${issue$1.expected}, recibido ${parsedType$2(issue$1.input)}`;
4268
+ case "invalid_type": return `Entrada inválida: se esperaba ${issue$1.expected}, recibido ${parsedType$3(issue$1.input)}`;
4115
4269
  case "invalid_value":
4116
4270
  if (issue$1.values.length === 1) return `Entrada inválida: se esperaba ${stringifyPrimitive(issue$1.values[0])}`;
4117
4271
  return `Opción inválida: se esperaba una de ${joinValues(issue$1.values, "|")}`;
@@ -4147,12 +4301,12 @@ const error$29 = () => {
4147
4301
  };
4148
4302
  };
4149
4303
  function es_default() {
4150
- return { localeError: error$29() };
4304
+ return { localeError: error$30() };
4151
4305
  }
4152
4306
 
4153
4307
  //#endregion
4154
- //#region ../../node_modules/zod/dist/esm/v4/locales/fa.js
4155
- const error$28 = () => {
4308
+ //#region ../../node_modules/zod/v4/locales/fa.js
4309
+ const error$29 = () => {
4156
4310
  const Sizable = {
4157
4311
  string: {
4158
4312
  unit: "کاراکتر",
@@ -4174,7 +4328,7 @@ const error$28 = () => {
4174
4328
  function getSizing(origin) {
4175
4329
  return Sizable[origin] ?? null;
4176
4330
  }
4177
- const parsedType$2 = (data) => {
4331
+ const parsedType$3 = (data) => {
4178
4332
  const t = typeof data;
4179
4333
  switch (t) {
4180
4334
  case "number": {
@@ -4226,7 +4380,7 @@ const error$28 = () => {
4226
4380
  };
4227
4381
  return (issue$1) => {
4228
4382
  switch (issue$1.code) {
4229
- case "invalid_type": return `ورودی نامعتبر: می‌بایست ${issue$1.expected} می‌بود، ${parsedType$2(issue$1.input)} دریافت شد`;
4383
+ case "invalid_type": return `ورودی نامعتبر: می‌بایست ${issue$1.expected} می‌بود، ${parsedType$3(issue$1.input)} دریافت شد`;
4230
4384
  case "invalid_value":
4231
4385
  if (issue$1.values.length === 1) {
4232
4386
  return `ورودی نامعتبر: می‌بایست ${stringifyPrimitive(issue$1.values[0])} می‌بود`;
@@ -4274,12 +4428,12 @@ const error$28 = () => {
4274
4428
  };
4275
4429
  };
4276
4430
  function fa_default() {
4277
- return { localeError: error$28() };
4431
+ return { localeError: error$29() };
4278
4432
  }
4279
4433
 
4280
4434
  //#endregion
4281
- //#region ../../node_modules/zod/dist/esm/v4/locales/fi.js
4282
- const error$27 = () => {
4435
+ //#region ../../node_modules/zod/v4/locales/fi.js
4436
+ const error$28 = () => {
4283
4437
  const Sizable = {
4284
4438
  string: {
4285
4439
  unit: "merkkiä",
@@ -4317,7 +4471,7 @@ const error$27 = () => {
4317
4471
  function getSizing(origin) {
4318
4472
  return Sizable[origin] ?? null;
4319
4473
  }
4320
- const parsedType$2 = (data) => {
4474
+ const parsedType$3 = (data) => {
4321
4475
  const t = typeof data;
4322
4476
  switch (t) {
4323
4477
  case "number": {
@@ -4369,7 +4523,7 @@ const error$27 = () => {
4369
4523
  };
4370
4524
  return (issue$1) => {
4371
4525
  switch (issue$1.code) {
4372
- case "invalid_type": return `Virheellinen tyyppi: odotettiin ${issue$1.expected}, oli ${parsedType$2(issue$1.input)}`;
4526
+ case "invalid_type": return `Virheellinen tyyppi: odotettiin ${issue$1.expected}, oli ${parsedType$3(issue$1.input)}`;
4373
4527
  case "invalid_value":
4374
4528
  if (issue$1.values.length === 1) return `Virheellinen syöte: täytyy olla ${stringifyPrimitive(issue$1.values[0])}`;
4375
4529
  return `Virheellinen valinta: täytyy olla yksi seuraavista: ${joinValues(issue$1.values, "|")}`;
@@ -4409,12 +4563,12 @@ const error$27 = () => {
4409
4563
  };
4410
4564
  };
4411
4565
  function fi_default() {
4412
- return { localeError: error$27() };
4566
+ return { localeError: error$28() };
4413
4567
  }
4414
4568
 
4415
4569
  //#endregion
4416
- //#region ../../node_modules/zod/dist/esm/v4/locales/fr.js
4417
- const error$26 = () => {
4570
+ //#region ../../node_modules/zod/v4/locales/fr.js
4571
+ const error$27 = () => {
4418
4572
  const Sizable = {
4419
4573
  string: {
4420
4574
  unit: "caractères",
@@ -4436,7 +4590,7 @@ const error$26 = () => {
4436
4590
  function getSizing(origin) {
4437
4591
  return Sizable[origin] ?? null;
4438
4592
  }
4439
- const parsedType$2 = (data) => {
4593
+ const parsedType$3 = (data) => {
4440
4594
  const t = typeof data;
4441
4595
  switch (t) {
4442
4596
  case "number": {
@@ -4488,7 +4642,7 @@ const error$26 = () => {
4488
4642
  };
4489
4643
  return (issue$1) => {
4490
4644
  switch (issue$1.code) {
4491
- case "invalid_type": return `Entrée invalide : ${issue$1.expected} attendu, ${parsedType$2(issue$1.input)} reçu`;
4645
+ case "invalid_type": return `Entrée invalide : ${issue$1.expected} attendu, ${parsedType$3(issue$1.input)} reçu`;
4492
4646
  case "invalid_value":
4493
4647
  if (issue$1.values.length === 1) return `Entrée invalide : ${stringifyPrimitive(issue$1.values[0])} attendu`;
4494
4648
  return `Option invalide : une valeur parmi ${joinValues(issue$1.values, "|")} attendue`;
@@ -4524,12 +4678,12 @@ const error$26 = () => {
4524
4678
  };
4525
4679
  };
4526
4680
  function fr_default() {
4527
- return { localeError: error$26() };
4681
+ return { localeError: error$27() };
4528
4682
  }
4529
4683
 
4530
4684
  //#endregion
4531
- //#region ../../node_modules/zod/dist/esm/v4/locales/fr-CA.js
4532
- const error$25 = () => {
4685
+ //#region ../../node_modules/zod/v4/locales/fr-CA.js
4686
+ const error$26 = () => {
4533
4687
  const Sizable = {
4534
4688
  string: {
4535
4689
  unit: "caractères",
@@ -4551,7 +4705,7 @@ const error$25 = () => {
4551
4705
  function getSizing(origin) {
4552
4706
  return Sizable[origin] ?? null;
4553
4707
  }
4554
- const parsedType$2 = (data) => {
4708
+ const parsedType$3 = (data) => {
4555
4709
  const t = typeof data;
4556
4710
  switch (t) {
4557
4711
  case "number": {
@@ -4603,7 +4757,7 @@ const error$25 = () => {
4603
4757
  };
4604
4758
  return (issue$1) => {
4605
4759
  switch (issue$1.code) {
4606
- case "invalid_type": return `Entrée invalide : attendu ${issue$1.expected}, reçu ${parsedType$2(issue$1.input)}`;
4760
+ case "invalid_type": return `Entrée invalide : attendu ${issue$1.expected}, reçu ${parsedType$3(issue$1.input)}`;
4607
4761
  case "invalid_value":
4608
4762
  if (issue$1.values.length === 1) return `Entrée invalide : attendu ${stringifyPrimitive(issue$1.values[0])}`;
4609
4763
  return `Option invalide : attendu l'une des valeurs suivantes ${joinValues(issue$1.values, "|")}`;
@@ -4641,12 +4795,12 @@ const error$25 = () => {
4641
4795
  };
4642
4796
  };
4643
4797
  function fr_CA_default() {
4644
- return { localeError: error$25() };
4798
+ return { localeError: error$26() };
4645
4799
  }
4646
4800
 
4647
4801
  //#endregion
4648
- //#region ../../node_modules/zod/dist/esm/v4/locales/he.js
4649
- const error$24 = () => {
4802
+ //#region ../../node_modules/zod/v4/locales/he.js
4803
+ const error$25 = () => {
4650
4804
  const Sizable = {
4651
4805
  string: {
4652
4806
  unit: "אותיות",
@@ -4668,7 +4822,7 @@ const error$24 = () => {
4668
4822
  function getSizing(origin) {
4669
4823
  return Sizable[origin] ?? null;
4670
4824
  }
4671
- const parsedType$2 = (data) => {
4825
+ const parsedType$3 = (data) => {
4672
4826
  const t = typeof data;
4673
4827
  switch (t) {
4674
4828
  case "number": {
@@ -4720,7 +4874,7 @@ const error$24 = () => {
4720
4874
  };
4721
4875
  return (issue$1) => {
4722
4876
  switch (issue$1.code) {
4723
- case "invalid_type": return `קלט לא תקין: צריך ${issue$1.expected}, התקבל ${parsedType$2(issue$1.input)}`;
4877
+ case "invalid_type": return `קלט לא תקין: צריך ${issue$1.expected}, התקבל ${parsedType$3(issue$1.input)}`;
4724
4878
  case "invalid_value":
4725
4879
  if (issue$1.values.length === 1) return `קלט לא תקין: צריך ${stringifyPrimitive(issue$1.values[0])}`;
4726
4880
  return `קלט לא תקין: צריך אחת מהאפשרויות ${joinValues(issue$1.values, "|")}`;
@@ -4756,12 +4910,12 @@ const error$24 = () => {
4756
4910
  };
4757
4911
  };
4758
4912
  function he_default() {
4759
- return { localeError: error$24() };
4913
+ return { localeError: error$25() };
4760
4914
  }
4761
4915
 
4762
4916
  //#endregion
4763
- //#region ../../node_modules/zod/dist/esm/v4/locales/hu.js
4764
- const error$23 = () => {
4917
+ //#region ../../node_modules/zod/v4/locales/hu.js
4918
+ const error$24 = () => {
4765
4919
  const Sizable = {
4766
4920
  string: {
4767
4921
  unit: "karakter",
@@ -4783,7 +4937,7 @@ const error$23 = () => {
4783
4937
  function getSizing(origin) {
4784
4938
  return Sizable[origin] ?? null;
4785
4939
  }
4786
- const parsedType$2 = (data) => {
4940
+ const parsedType$3 = (data) => {
4787
4941
  const t = typeof data;
4788
4942
  switch (t) {
4789
4943
  case "number": {
@@ -4835,7 +4989,7 @@ const error$23 = () => {
4835
4989
  };
4836
4990
  return (issue$1) => {
4837
4991
  switch (issue$1.code) {
4838
- case "invalid_type": return `Érvénytelen bemenet: a várt érték ${issue$1.expected}, a kapott érték ${parsedType$2(issue$1.input)}`;
4992
+ case "invalid_type": return `Érvénytelen bemenet: a várt érték ${issue$1.expected}, a kapott érték ${parsedType$3(issue$1.input)}`;
4839
4993
  case "invalid_value":
4840
4994
  if (issue$1.values.length === 1) return `Érvénytelen bemenet: a várt érték ${stringifyPrimitive(issue$1.values[0])}`;
4841
4995
  return `Érvénytelen opció: valamelyik érték várt ${joinValues(issue$1.values, "|")}`;
@@ -4871,12 +5025,12 @@ const error$23 = () => {
4871
5025
  };
4872
5026
  };
4873
5027
  function hu_default() {
4874
- return { localeError: error$23() };
5028
+ return { localeError: error$24() };
4875
5029
  }
4876
5030
 
4877
5031
  //#endregion
4878
- //#region ../../node_modules/zod/dist/esm/v4/locales/id.js
4879
- const error$22 = () => {
5032
+ //#region ../../node_modules/zod/v4/locales/id.js
5033
+ const error$23 = () => {
4880
5034
  const Sizable = {
4881
5035
  string: {
4882
5036
  unit: "karakter",
@@ -4898,7 +5052,7 @@ const error$22 = () => {
4898
5052
  function getSizing(origin) {
4899
5053
  return Sizable[origin] ?? null;
4900
5054
  }
4901
- const parsedType$2 = (data) => {
5055
+ const parsedType$3 = (data) => {
4902
5056
  const t = typeof data;
4903
5057
  switch (t) {
4904
5058
  case "number": {
@@ -4950,7 +5104,7 @@ const error$22 = () => {
4950
5104
  };
4951
5105
  return (issue$1) => {
4952
5106
  switch (issue$1.code) {
4953
- case "invalid_type": return `Input tidak valid: diharapkan ${issue$1.expected}, diterima ${parsedType$2(issue$1.input)}`;
5107
+ case "invalid_type": return `Input tidak valid: diharapkan ${issue$1.expected}, diterima ${parsedType$3(issue$1.input)}`;
4954
5108
  case "invalid_value":
4955
5109
  if (issue$1.values.length === 1) return `Input tidak valid: diharapkan ${stringifyPrimitive(issue$1.values[0])}`;
4956
5110
  return `Pilihan tidak valid: diharapkan salah satu dari ${joinValues(issue$1.values, "|")}`;
@@ -4986,12 +5140,12 @@ const error$22 = () => {
4986
5140
  };
4987
5141
  };
4988
5142
  function id_default() {
4989
- return { localeError: error$22() };
5143
+ return { localeError: error$23() };
4990
5144
  }
4991
5145
 
4992
5146
  //#endregion
4993
- //#region ../../node_modules/zod/dist/esm/v4/locales/it.js
4994
- const error$21 = () => {
5147
+ //#region ../../node_modules/zod/v4/locales/it.js
5148
+ const error$22 = () => {
4995
5149
  const Sizable = {
4996
5150
  string: {
4997
5151
  unit: "caratteri",
@@ -5013,7 +5167,7 @@ const error$21 = () => {
5013
5167
  function getSizing(origin) {
5014
5168
  return Sizable[origin] ?? null;
5015
5169
  }
5016
- const parsedType$2 = (data) => {
5170
+ const parsedType$3 = (data) => {
5017
5171
  const t = typeof data;
5018
5172
  switch (t) {
5019
5173
  case "number": {
@@ -5065,7 +5219,7 @@ const error$21 = () => {
5065
5219
  };
5066
5220
  return (issue$1) => {
5067
5221
  switch (issue$1.code) {
5068
- case "invalid_type": return `Input non valido: atteso ${issue$1.expected}, ricevuto ${parsedType$2(issue$1.input)}`;
5222
+ case "invalid_type": return `Input non valido: atteso ${issue$1.expected}, ricevuto ${parsedType$3(issue$1.input)}`;
5069
5223
  case "invalid_value":
5070
5224
  if (issue$1.values.length === 1) return `Input non valido: atteso ${stringifyPrimitive(issue$1.values[0])}`;
5071
5225
  return `Opzione non valida: atteso uno tra ${joinValues(issue$1.values, "|")}`;
@@ -5101,12 +5255,12 @@ const error$21 = () => {
5101
5255
  };
5102
5256
  };
5103
5257
  function it_default() {
5104
- return { localeError: error$21() };
5258
+ return { localeError: error$22() };
5105
5259
  }
5106
5260
 
5107
5261
  //#endregion
5108
- //#region ../../node_modules/zod/dist/esm/v4/locales/ja.js
5109
- const error$20 = () => {
5262
+ //#region ../../node_modules/zod/v4/locales/ja.js
5263
+ const error$21 = () => {
5110
5264
  const Sizable = {
5111
5265
  string: {
5112
5266
  unit: "文字",
@@ -5128,7 +5282,7 @@ const error$20 = () => {
5128
5282
  function getSizing(origin) {
5129
5283
  return Sizable[origin] ?? null;
5130
5284
  }
5131
- const parsedType$2 = (data) => {
5285
+ const parsedType$3 = (data) => {
5132
5286
  const t = typeof data;
5133
5287
  switch (t) {
5134
5288
  case "number": {
@@ -5180,21 +5334,21 @@ const error$20 = () => {
5180
5334
  };
5181
5335
  return (issue$1) => {
5182
5336
  switch (issue$1.code) {
5183
- case "invalid_type": return `無効な入力: ${issue$1.expected}が期待されましたが、${parsedType$2(issue$1.input)}が入力されました`;
5337
+ case "invalid_type": return `無効な入力: ${issue$1.expected}が期待されましたが、${parsedType$3(issue$1.input)}が入力されました`;
5184
5338
  case "invalid_value":
5185
5339
  if (issue$1.values.length === 1) return `無効な入力: ${stringifyPrimitive(issue$1.values[0])}が期待されました`;
5186
5340
  return `無効な選択: ${joinValues(issue$1.values, "、")}のいずれかである必要があります`;
5187
5341
  case "too_big": {
5188
- const adj = issue$1.inclusive ? "<=" : "<";
5342
+ const adj = issue$1.inclusive ? "以下である" : "より小さい";
5189
5343
  const sizing = getSizing(issue$1.origin);
5190
- if (sizing) return `大きすぎる値: ${issue$1.origin ?? "値"}は${issue$1.maximum.toString()}${sizing.unit ?? "要素"}${adj}である必要があります`;
5191
- return `大きすぎる値: ${issue$1.origin ?? "値"}は${issue$1.maximum.toString()}${adj}である必要があります`;
5344
+ if (sizing) return `大きすぎる値: ${issue$1.origin ?? "値"}は${issue$1.maximum.toString()}${sizing.unit ?? "要素"}${adj}必要があります`;
5345
+ return `大きすぎる値: ${issue$1.origin ?? "値"}は${issue$1.maximum.toString()}${adj}必要があります`;
5192
5346
  }
5193
5347
  case "too_small": {
5194
- const adj = issue$1.inclusive ? ">=" : ">";
5348
+ const adj = issue$1.inclusive ? "以上である" : "より大きい";
5195
5349
  const sizing = getSizing(issue$1.origin);
5196
- if (sizing) return `小さすぎる値: ${issue$1.origin}は${issue$1.minimum.toString()}${sizing.unit}${adj}である必要があります`;
5197
- return `小さすぎる値: ${issue$1.origin}は${issue$1.minimum.toString()}${adj}である必要があります`;
5350
+ if (sizing) return `小さすぎる値: ${issue$1.origin}は${issue$1.minimum.toString()}${sizing.unit}${adj}必要があります`;
5351
+ return `小さすぎる値: ${issue$1.origin}は${issue$1.minimum.toString()}${adj}必要があります`;
5198
5352
  }
5199
5353
  case "invalid_format": {
5200
5354
  const _issue = issue$1;
@@ -5214,12 +5368,12 @@ const error$20 = () => {
5214
5368
  };
5215
5369
  };
5216
5370
  function ja_default() {
5217
- return { localeError: error$20() };
5371
+ return { localeError: error$21() };
5218
5372
  }
5219
5373
 
5220
5374
  //#endregion
5221
- //#region ../../node_modules/zod/dist/esm/v4/locales/kh.js
5222
- const error$19 = () => {
5375
+ //#region ../../node_modules/zod/v4/locales/kh.js
5376
+ const error$20 = () => {
5223
5377
  const Sizable = {
5224
5378
  string: {
5225
5379
  unit: "តួអក្សរ",
@@ -5241,7 +5395,7 @@ const error$19 = () => {
5241
5395
  function getSizing(origin) {
5242
5396
  return Sizable[origin] ?? null;
5243
5397
  }
5244
- const parsedType$2 = (data) => {
5398
+ const parsedType$3 = (data) => {
5245
5399
  const t = typeof data;
5246
5400
  switch (t) {
5247
5401
  case "number": {
@@ -5293,7 +5447,7 @@ const error$19 = () => {
5293
5447
  };
5294
5448
  return (issue$1) => {
5295
5449
  switch (issue$1.code) {
5296
- case "invalid_type": return `ទិន្នន័យបញ្ចូលមិនត្រឹមត្រូវ៖ ត្រូវការ ${issue$1.expected} ប៉ុន្តែទទួលបាន ${parsedType$2(issue$1.input)}`;
5450
+ case "invalid_type": return `ទិន្នន័យបញ្ចូលមិនត្រឹមត្រូវ៖ ត្រូវការ ${issue$1.expected} ប៉ុន្តែទទួលបាន ${parsedType$3(issue$1.input)}`;
5297
5451
  case "invalid_value":
5298
5452
  if (issue$1.values.length === 1) return `ទិន្នន័យបញ្ចូលមិនត្រឹមត្រូវ៖ ត្រូវការ ${stringifyPrimitive(issue$1.values[0])}`;
5299
5453
  return `ជម្រើសមិនត្រឹមត្រូវ៖ ត្រូវជាមួយក្នុងចំណោម ${joinValues(issue$1.values, "|")}`;
@@ -5331,12 +5485,12 @@ const error$19 = () => {
5331
5485
  };
5332
5486
  };
5333
5487
  function kh_default() {
5334
- return { localeError: error$19() };
5488
+ return { localeError: error$20() };
5335
5489
  }
5336
5490
 
5337
5491
  //#endregion
5338
- //#region ../../node_modules/zod/dist/esm/v4/locales/ko.js
5339
- const error$18 = () => {
5492
+ //#region ../../node_modules/zod/v4/locales/ko.js
5493
+ const error$19 = () => {
5340
5494
  const Sizable = {
5341
5495
  string: {
5342
5496
  unit: "문자",
@@ -5358,7 +5512,7 @@ const error$18 = () => {
5358
5512
  function getSizing(origin) {
5359
5513
  return Sizable[origin] ?? null;
5360
5514
  }
5361
- const parsedType$2 = (data) => {
5515
+ const parsedType$3 = (data) => {
5362
5516
  const t = typeof data;
5363
5517
  switch (t) {
5364
5518
  case "number": {
@@ -5410,7 +5564,7 @@ const error$18 = () => {
5410
5564
  };
5411
5565
  return (issue$1) => {
5412
5566
  switch (issue$1.code) {
5413
- case "invalid_type": return `잘못된 입력: 예상 타입은 ${issue$1.expected}, 받은 타입은 ${parsedType$2(issue$1.input)}입니다`;
5567
+ case "invalid_type": return `잘못된 입력: 예상 타입은 ${issue$1.expected}, 받은 타입은 ${parsedType$3(issue$1.input)}입니다`;
5414
5568
  case "invalid_value":
5415
5569
  if (issue$1.values.length === 1) return `잘못된 입력: 값은 ${stringifyPrimitive(issue$1.values[0])} 이어야 합니다`;
5416
5570
  return `잘못된 옵션: ${joinValues(issue$1.values, "또는 ")} 중 하나여야 합니다`;
@@ -5452,12 +5606,12 @@ const error$18 = () => {
5452
5606
  };
5453
5607
  };
5454
5608
  function ko_default() {
5455
- return { localeError: error$18() };
5609
+ return { localeError: error$19() };
5456
5610
  }
5457
5611
 
5458
5612
  //#endregion
5459
- //#region ../../node_modules/zod/dist/esm/v4/locales/mk.js
5460
- const error$17 = () => {
5613
+ //#region ../../node_modules/zod/v4/locales/mk.js
5614
+ const error$18 = () => {
5461
5615
  const Sizable = {
5462
5616
  string: {
5463
5617
  unit: "знаци",
@@ -5479,7 +5633,7 @@ const error$17 = () => {
5479
5633
  function getSizing(origin) {
5480
5634
  return Sizable[origin] ?? null;
5481
5635
  }
5482
- const parsedType$2 = (data) => {
5636
+ const parsedType$3 = (data) => {
5483
5637
  const t = typeof data;
5484
5638
  switch (t) {
5485
5639
  case "number": {
@@ -5531,7 +5685,7 @@ const error$17 = () => {
5531
5685
  };
5532
5686
  return (issue$1) => {
5533
5687
  switch (issue$1.code) {
5534
- case "invalid_type": return `Грешен внес: се очекува ${issue$1.expected}, примено ${parsedType$2(issue$1.input)}`;
5688
+ case "invalid_type": return `Грешен внес: се очекува ${issue$1.expected}, примено ${parsedType$3(issue$1.input)}`;
5535
5689
  case "invalid_value":
5536
5690
  if (issue$1.values.length === 1) return `Invalid input: expected ${stringifyPrimitive(issue$1.values[0])}`;
5537
5691
  return `Грешана опција: се очекува една ${joinValues(issue$1.values, "|")}`;
@@ -5569,12 +5723,12 @@ const error$17 = () => {
5569
5723
  };
5570
5724
  };
5571
5725
  function mk_default() {
5572
- return { localeError: error$17() };
5726
+ return { localeError: error$18() };
5573
5727
  }
5574
5728
 
5575
5729
  //#endregion
5576
- //#region ../../node_modules/zod/dist/esm/v4/locales/ms.js
5577
- const error$16 = () => {
5730
+ //#region ../../node_modules/zod/v4/locales/ms.js
5731
+ const error$17 = () => {
5578
5732
  const Sizable = {
5579
5733
  string: {
5580
5734
  unit: "aksara",
@@ -5596,7 +5750,7 @@ const error$16 = () => {
5596
5750
  function getSizing(origin) {
5597
5751
  return Sizable[origin] ?? null;
5598
5752
  }
5599
- const parsedType$2 = (data) => {
5753
+ const parsedType$3 = (data) => {
5600
5754
  const t = typeof data;
5601
5755
  switch (t) {
5602
5756
  case "number": {
@@ -5648,7 +5802,7 @@ const error$16 = () => {
5648
5802
  };
5649
5803
  return (issue$1) => {
5650
5804
  switch (issue$1.code) {
5651
- case "invalid_type": return `Input tidak sah: dijangka ${issue$1.expected}, diterima ${parsedType$2(issue$1.input)}`;
5805
+ case "invalid_type": return `Input tidak sah: dijangka ${issue$1.expected}, diterima ${parsedType$3(issue$1.input)}`;
5652
5806
  case "invalid_value":
5653
5807
  if (issue$1.values.length === 1) return `Input tidak sah: dijangka ${stringifyPrimitive(issue$1.values[0])}`;
5654
5808
  return `Pilihan tidak sah: dijangka salah satu daripada ${joinValues(issue$1.values, "|")}`;
@@ -5684,12 +5838,12 @@ const error$16 = () => {
5684
5838
  };
5685
5839
  };
5686
5840
  function ms_default() {
5687
- return { localeError: error$16() };
5841
+ return { localeError: error$17() };
5688
5842
  }
5689
5843
 
5690
5844
  //#endregion
5691
- //#region ../../node_modules/zod/dist/esm/v4/locales/nl.js
5692
- const error$15 = () => {
5845
+ //#region ../../node_modules/zod/v4/locales/nl.js
5846
+ const error$16 = () => {
5693
5847
  const Sizable = {
5694
5848
  string: { unit: "tekens" },
5695
5849
  file: { unit: "bytes" },
@@ -5699,7 +5853,7 @@ const error$15 = () => {
5699
5853
  function getSizing(origin) {
5700
5854
  return Sizable[origin] ?? null;
5701
5855
  }
5702
- const parsedType$2 = (data) => {
5856
+ const parsedType$3 = (data) => {
5703
5857
  const t = typeof data;
5704
5858
  switch (t) {
5705
5859
  case "number": {
@@ -5751,7 +5905,7 @@ const error$15 = () => {
5751
5905
  };
5752
5906
  return (issue$1) => {
5753
5907
  switch (issue$1.code) {
5754
- case "invalid_type": return `Ongeldige invoer: verwacht ${issue$1.expected}, ontving ${parsedType$2(issue$1.input)}`;
5908
+ case "invalid_type": return `Ongeldige invoer: verwacht ${issue$1.expected}, ontving ${parsedType$3(issue$1.input)}`;
5755
5909
  case "invalid_value":
5756
5910
  if (issue$1.values.length === 1) return `Ongeldige invoer: verwacht ${stringifyPrimitive(issue$1.values[0])}`;
5757
5911
  return `Ongeldige optie: verwacht één van ${joinValues(issue$1.values, "|")}`;
@@ -5789,12 +5943,12 @@ const error$15 = () => {
5789
5943
  };
5790
5944
  };
5791
5945
  function nl_default() {
5792
- return { localeError: error$15() };
5946
+ return { localeError: error$16() };
5793
5947
  }
5794
5948
 
5795
5949
  //#endregion
5796
- //#region ../../node_modules/zod/dist/esm/v4/locales/no.js
5797
- const error$14 = () => {
5950
+ //#region ../../node_modules/zod/v4/locales/no.js
5951
+ const error$15 = () => {
5798
5952
  const Sizable = {
5799
5953
  string: {
5800
5954
  unit: "tegn",
@@ -5816,7 +5970,7 @@ const error$14 = () => {
5816
5970
  function getSizing(origin) {
5817
5971
  return Sizable[origin] ?? null;
5818
5972
  }
5819
- const parsedType$2 = (data) => {
5973
+ const parsedType$3 = (data) => {
5820
5974
  const t = typeof data;
5821
5975
  switch (t) {
5822
5976
  case "number": {
@@ -5868,7 +6022,7 @@ const error$14 = () => {
5868
6022
  };
5869
6023
  return (issue$1) => {
5870
6024
  switch (issue$1.code) {
5871
- case "invalid_type": return `Ugyldig input: forventet ${issue$1.expected}, fikk ${parsedType$2(issue$1.input)}`;
6025
+ case "invalid_type": return `Ugyldig input: forventet ${issue$1.expected}, fikk ${parsedType$3(issue$1.input)}`;
5872
6026
  case "invalid_value":
5873
6027
  if (issue$1.values.length === 1) return `Ugyldig verdi: forventet ${stringifyPrimitive(issue$1.values[0])}`;
5874
6028
  return `Ugyldig valg: forventet en av ${joinValues(issue$1.values, "|")}`;
@@ -5904,12 +6058,12 @@ const error$14 = () => {
5904
6058
  };
5905
6059
  };
5906
6060
  function no_default() {
5907
- return { localeError: error$14() };
6061
+ return { localeError: error$15() };
5908
6062
  }
5909
6063
 
5910
6064
  //#endregion
5911
- //#region ../../node_modules/zod/dist/esm/v4/locales/ota.js
5912
- const error$13 = () => {
6065
+ //#region ../../node_modules/zod/v4/locales/ota.js
6066
+ const error$14 = () => {
5913
6067
  const Sizable = {
5914
6068
  string: {
5915
6069
  unit: "harf",
@@ -5931,7 +6085,7 @@ const error$13 = () => {
5931
6085
  function getSizing(origin) {
5932
6086
  return Sizable[origin] ?? null;
5933
6087
  }
5934
- const parsedType$2 = (data) => {
6088
+ const parsedType$3 = (data) => {
5935
6089
  const t = typeof data;
5936
6090
  switch (t) {
5937
6091
  case "number": {
@@ -5983,7 +6137,7 @@ const error$13 = () => {
5983
6137
  };
5984
6138
  return (issue$1) => {
5985
6139
  switch (issue$1.code) {
5986
- case "invalid_type": return `Fâsit giren: umulan ${issue$1.expected}, alınan ${parsedType$2(issue$1.input)}`;
6140
+ case "invalid_type": return `Fâsit giren: umulan ${issue$1.expected}, alınan ${parsedType$3(issue$1.input)}`;
5987
6141
  case "invalid_value":
5988
6142
  if (issue$1.values.length === 1) return `Fâsit giren: umulan ${stringifyPrimitive(issue$1.values[0])}`;
5989
6143
  return `Fâsit tercih: mûteberler ${joinValues(issue$1.values, "|")}`;
@@ -6019,11 +6173,138 @@ const error$13 = () => {
6019
6173
  };
6020
6174
  };
6021
6175
  function ota_default() {
6176
+ return { localeError: error$14() };
6177
+ }
6178
+
6179
+ //#endregion
6180
+ //#region ../../node_modules/zod/v4/locales/ps.js
6181
+ const error$13 = () => {
6182
+ const Sizable = {
6183
+ string: {
6184
+ unit: "توکي",
6185
+ verb: "ولري"
6186
+ },
6187
+ file: {
6188
+ unit: "بایټس",
6189
+ verb: "ولري"
6190
+ },
6191
+ array: {
6192
+ unit: "توکي",
6193
+ verb: "ولري"
6194
+ },
6195
+ set: {
6196
+ unit: "توکي",
6197
+ verb: "ولري"
6198
+ }
6199
+ };
6200
+ function getSizing(origin) {
6201
+ return Sizable[origin] ?? null;
6202
+ }
6203
+ const parsedType$3 = (data) => {
6204
+ const t = typeof data;
6205
+ switch (t) {
6206
+ case "number": {
6207
+ return Number.isNaN(data) ? "NaN" : "عدد";
6208
+ }
6209
+ case "object": {
6210
+ if (Array.isArray(data)) {
6211
+ return "ارې";
6212
+ }
6213
+ if (data === null) {
6214
+ return "null";
6215
+ }
6216
+ if (Object.getPrototypeOf(data) !== Object.prototype && data.constructor) {
6217
+ return data.constructor.name;
6218
+ }
6219
+ }
6220
+ }
6221
+ return t;
6222
+ };
6223
+ const Nouns = {
6224
+ regex: "ورودي",
6225
+ email: "بریښنالیک",
6226
+ url: "یو آر ال",
6227
+ emoji: "ایموجي",
6228
+ uuid: "UUID",
6229
+ uuidv4: "UUIDv4",
6230
+ uuidv6: "UUIDv6",
6231
+ nanoid: "nanoid",
6232
+ guid: "GUID",
6233
+ cuid: "cuid",
6234
+ cuid2: "cuid2",
6235
+ ulid: "ULID",
6236
+ xid: "XID",
6237
+ ksuid: "KSUID",
6238
+ datetime: "نیټه او وخت",
6239
+ date: "نېټه",
6240
+ time: "وخت",
6241
+ duration: "موده",
6242
+ ipv4: "د IPv4 پته",
6243
+ ipv6: "د IPv6 پته",
6244
+ cidrv4: "د IPv4 ساحه",
6245
+ cidrv6: "د IPv6 ساحه",
6246
+ base64: "base64-encoded متن",
6247
+ base64url: "base64url-encoded متن",
6248
+ json_string: "JSON متن",
6249
+ e164: "د E.164 شمېره",
6250
+ jwt: "JWT",
6251
+ template_literal: "ورودي"
6252
+ };
6253
+ return (issue$1) => {
6254
+ switch (issue$1.code) {
6255
+ case "invalid_type": return `ناسم ورودي: باید ${issue$1.expected} وای, مګر ${parsedType$3(issue$1.input)} ترلاسه شو`;
6256
+ case "invalid_value":
6257
+ if (issue$1.values.length === 1) {
6258
+ return `ناسم ورودي: باید ${stringifyPrimitive(issue$1.values[0])} وای`;
6259
+ }
6260
+ return `ناسم انتخاب: باید یو له ${joinValues(issue$1.values, "|")} څخه وای`;
6261
+ case "too_big": {
6262
+ const adj = issue$1.inclusive ? "<=" : "<";
6263
+ const sizing = getSizing(issue$1.origin);
6264
+ if (sizing) {
6265
+ return `ډیر لوی: ${issue$1.origin ?? "ارزښت"} باید ${adj}${issue$1.maximum.toString()} ${sizing.unit ?? "عنصرونه"} ولري`;
6266
+ }
6267
+ return `ډیر لوی: ${issue$1.origin ?? "ارزښت"} باید ${adj}${issue$1.maximum.toString()} وي`;
6268
+ }
6269
+ case "too_small": {
6270
+ const adj = issue$1.inclusive ? ">=" : ">";
6271
+ const sizing = getSizing(issue$1.origin);
6272
+ if (sizing) {
6273
+ return `ډیر کوچنی: ${issue$1.origin} باید ${adj}${issue$1.minimum.toString()} ${sizing.unit} ولري`;
6274
+ }
6275
+ return `ډیر کوچنی: ${issue$1.origin} باید ${adj}${issue$1.minimum.toString()} وي`;
6276
+ }
6277
+ case "invalid_format": {
6278
+ const _issue = issue$1;
6279
+ if (_issue.format === "starts_with") {
6280
+ return `ناسم متن: باید د "${_issue.prefix}" سره پیل شي`;
6281
+ }
6282
+ if (_issue.format === "ends_with") {
6283
+ return `ناسم متن: باید د "${_issue.suffix}" سره پای ته ورسيږي`;
6284
+ }
6285
+ if (_issue.format === "includes") {
6286
+ return `ناسم متن: باید "${_issue.includes}" ولري`;
6287
+ }
6288
+ if (_issue.format === "regex") {
6289
+ return `ناسم متن: باید د ${_issue.pattern} سره مطابقت ولري`;
6290
+ }
6291
+ return `${Nouns[_issue.format] ?? issue$1.format} ناسم دی`;
6292
+ }
6293
+ case "not_multiple_of": return `ناسم عدد: باید د ${issue$1.divisor} مضرب وي`;
6294
+ case "unrecognized_keys": return `ناسم ${issue$1.keys.length > 1 ? "کلیډونه" : "کلیډ"}: ${joinValues(issue$1.keys, ", ")}`;
6295
+ case "invalid_key": return `ناسم کلیډ په ${issue$1.origin} کې`;
6296
+ case "invalid_union": return `ناسمه ورودي`;
6297
+ case "invalid_element": return `ناسم عنصر په ${issue$1.origin} کې`;
6298
+ default: return `ناسمه ورودي`;
6299
+ }
6300
+ };
6301
+ };
6302
+ function ps_default() {
6022
6303
  return { localeError: error$13() };
6023
6304
  }
6024
6305
 
6025
6306
  //#endregion
6026
- //#region ../../node_modules/zod/dist/esm/v4/locales/pl.js
6307
+ //#region ../../node_modules/zod/v4/locales/pl.js
6027
6308
  const error$12 = () => {
6028
6309
  const Sizable = {
6029
6310
  string: {
@@ -6046,7 +6327,7 @@ const error$12 = () => {
6046
6327
  function getSizing(origin) {
6047
6328
  return Sizable[origin] ?? null;
6048
6329
  }
6049
- const parsedType$2 = (data) => {
6330
+ const parsedType$3 = (data) => {
6050
6331
  const t = typeof data;
6051
6332
  switch (t) {
6052
6333
  case "number": {
@@ -6098,7 +6379,7 @@ const error$12 = () => {
6098
6379
  };
6099
6380
  return (issue$1) => {
6100
6381
  switch (issue$1.code) {
6101
- case "invalid_type": return `Nieprawidłowe dane wejściowe: oczekiwano ${issue$1.expected}, otrzymano ${parsedType$2(issue$1.input)}`;
6382
+ case "invalid_type": return `Nieprawidłowe dane wejściowe: oczekiwano ${issue$1.expected}, otrzymano ${parsedType$3(issue$1.input)}`;
6102
6383
  case "invalid_value":
6103
6384
  if (issue$1.values.length === 1) return `Nieprawidłowe dane wejściowe: oczekiwano ${stringifyPrimitive(issue$1.values[0])}`;
6104
6385
  return `Nieprawidłowa opcja: oczekiwano jednej z wartości ${joinValues(issue$1.values, "|")}`;
@@ -6140,7 +6421,7 @@ function pl_default() {
6140
6421
  }
6141
6422
 
6142
6423
  //#endregion
6143
- //#region ../../node_modules/zod/dist/esm/v4/locales/pt.js
6424
+ //#region ../../node_modules/zod/v4/locales/pt.js
6144
6425
  const error$11 = () => {
6145
6426
  const Sizable = {
6146
6427
  string: {
@@ -6163,7 +6444,7 @@ const error$11 = () => {
6163
6444
  function getSizing(origin) {
6164
6445
  return Sizable[origin] ?? null;
6165
6446
  }
6166
- const parsedType$2 = (data) => {
6447
+ const parsedType$3 = (data) => {
6167
6448
  const t = typeof data;
6168
6449
  switch (t) {
6169
6450
  case "number": {
@@ -6215,7 +6496,7 @@ const error$11 = () => {
6215
6496
  };
6216
6497
  return (issue$1) => {
6217
6498
  switch (issue$1.code) {
6218
- case "invalid_type": return `Tipo inválido: esperado ${issue$1.expected}, recebido ${parsedType$2(issue$1.input)}`;
6499
+ case "invalid_type": return `Tipo inválido: esperado ${issue$1.expected}, recebido ${parsedType$3(issue$1.input)}`;
6219
6500
  case "invalid_value":
6220
6501
  if (issue$1.values.length === 1) return `Entrada inválida: esperado ${stringifyPrimitive(issue$1.values[0])}`;
6221
6502
  return `Opção inválida: esperada uma das ${joinValues(issue$1.values, "|")}`;
@@ -6255,7 +6536,7 @@ function pt_default() {
6255
6536
  }
6256
6537
 
6257
6538
  //#endregion
6258
- //#region ../../node_modules/zod/dist/esm/v4/locales/ru.js
6539
+ //#region ../../node_modules/zod/v4/locales/ru.js
6259
6540
  function getRussianPlural(count, one, few, many) {
6260
6541
  const absCount = Math.abs(count);
6261
6542
  const lastDigit = absCount % 10;
@@ -6309,7 +6590,7 @@ const error$10 = () => {
6309
6590
  function getSizing(origin) {
6310
6591
  return Sizable[origin] ?? null;
6311
6592
  }
6312
- const parsedType$2 = (data) => {
6593
+ const parsedType$3 = (data) => {
6313
6594
  const t = typeof data;
6314
6595
  switch (t) {
6315
6596
  case "number": {
@@ -6361,7 +6642,7 @@ const error$10 = () => {
6361
6642
  };
6362
6643
  return (issue$1) => {
6363
6644
  switch (issue$1.code) {
6364
- case "invalid_type": return `Неверный ввод: ожидалось ${issue$1.expected}, получено ${parsedType$2(issue$1.input)}`;
6645
+ case "invalid_type": return `Неверный ввод: ожидалось ${issue$1.expected}, получено ${parsedType$3(issue$1.input)}`;
6365
6646
  case "invalid_value":
6366
6647
  if (issue$1.values.length === 1) return `Неверный ввод: ожидалось ${stringifyPrimitive(issue$1.values[0])}`;
6367
6648
  return `Неверный вариант: ожидалось одно из ${joinValues(issue$1.values, "|")}`;
@@ -6407,7 +6688,7 @@ function ru_default() {
6407
6688
  }
6408
6689
 
6409
6690
  //#endregion
6410
- //#region ../../node_modules/zod/dist/esm/v4/locales/sl.js
6691
+ //#region ../../node_modules/zod/v4/locales/sl.js
6411
6692
  const error$9 = () => {
6412
6693
  const Sizable = {
6413
6694
  string: {
@@ -6430,7 +6711,7 @@ const error$9 = () => {
6430
6711
  function getSizing(origin) {
6431
6712
  return Sizable[origin] ?? null;
6432
6713
  }
6433
- const parsedType$2 = (data) => {
6714
+ const parsedType$3 = (data) => {
6434
6715
  const t = typeof data;
6435
6716
  switch (t) {
6436
6717
  case "number": {
@@ -6482,7 +6763,7 @@ const error$9 = () => {
6482
6763
  };
6483
6764
  return (issue$1) => {
6484
6765
  switch (issue$1.code) {
6485
- case "invalid_type": return `Neveljaven vnos: pričakovano ${issue$1.expected}, prejeto ${parsedType$2(issue$1.input)}`;
6766
+ case "invalid_type": return `Neveljaven vnos: pričakovano ${issue$1.expected}, prejeto ${parsedType$3(issue$1.input)}`;
6486
6767
  case "invalid_value":
6487
6768
  if (issue$1.values.length === 1) return `Neveljaven vnos: pričakovano ${stringifyPrimitive(issue$1.values[0])}`;
6488
6769
  return `Neveljavna možnost: pričakovano eno izmed ${joinValues(issue$1.values, "|")}`;
@@ -6524,7 +6805,7 @@ function sl_default() {
6524
6805
  }
6525
6806
 
6526
6807
  //#endregion
6527
- //#region ../../node_modules/zod/dist/esm/v4/locales/sv.js
6808
+ //#region ../../node_modules/zod/v4/locales/sv.js
6528
6809
  const error$8 = () => {
6529
6810
  const Sizable = {
6530
6811
  string: {
@@ -6547,7 +6828,7 @@ const error$8 = () => {
6547
6828
  function getSizing(origin) {
6548
6829
  return Sizable[origin] ?? null;
6549
6830
  }
6550
- const parsedType$2 = (data) => {
6831
+ const parsedType$3 = (data) => {
6551
6832
  const t = typeof data;
6552
6833
  switch (t) {
6553
6834
  case "number": {
@@ -6599,7 +6880,7 @@ const error$8 = () => {
6599
6880
  };
6600
6881
  return (issue$1) => {
6601
6882
  switch (issue$1.code) {
6602
- case "invalid_type": return `Ogiltig inmatning: förväntat ${issue$1.expected}, fick ${parsedType$2(issue$1.input)}`;
6883
+ case "invalid_type": return `Ogiltig inmatning: förväntat ${issue$1.expected}, fick ${parsedType$3(issue$1.input)}`;
6603
6884
  case "invalid_value":
6604
6885
  if (issue$1.values.length === 1) return `Ogiltig inmatning: förväntat ${stringifyPrimitive(issue$1.values[0])}`;
6605
6886
  return `Ogiltigt val: förväntade en av ${joinValues(issue$1.values, "|")}`;
@@ -6643,7 +6924,7 @@ function sv_default() {
6643
6924
  }
6644
6925
 
6645
6926
  //#endregion
6646
- //#region ../../node_modules/zod/dist/esm/v4/locales/ta.js
6927
+ //#region ../../node_modules/zod/v4/locales/ta.js
6647
6928
  const error$7 = () => {
6648
6929
  const Sizable = {
6649
6930
  string: {
@@ -6666,7 +6947,7 @@ const error$7 = () => {
6666
6947
  function getSizing(origin) {
6667
6948
  return Sizable[origin] ?? null;
6668
6949
  }
6669
- const parsedType$2 = (data) => {
6950
+ const parsedType$3 = (data) => {
6670
6951
  const t = typeof data;
6671
6952
  switch (t) {
6672
6953
  case "number": {
@@ -6718,7 +6999,7 @@ const error$7 = () => {
6718
6999
  };
6719
7000
  return (issue$1) => {
6720
7001
  switch (issue$1.code) {
6721
- case "invalid_type": return `தவறான உள்ளீடு: எதிர்பார்க்கப்பட்டது ${issue$1.expected}, பெறப்பட்டது ${parsedType$2(issue$1.input)}`;
7002
+ case "invalid_type": return `தவறான உள்ளீடு: எதிர்பார்க்கப்பட்டது ${issue$1.expected}, பெறப்பட்டது ${parsedType$3(issue$1.input)}`;
6722
7003
  case "invalid_value":
6723
7004
  if (issue$1.values.length === 1) return `தவறான உள்ளீடு: எதிர்பார்க்கப்பட்டது ${stringifyPrimitive(issue$1.values[0])}`;
6724
7005
  return `தவறான விருப்பம்: எதிர்பார்க்கப்பட்டது ${joinValues(issue$1.values, "|")} இல் ஒன்று`;
@@ -6760,7 +7041,7 @@ function ta_default() {
6760
7041
  }
6761
7042
 
6762
7043
  //#endregion
6763
- //#region ../../node_modules/zod/dist/esm/v4/locales/th.js
7044
+ //#region ../../node_modules/zod/v4/locales/th.js
6764
7045
  const error$6 = () => {
6765
7046
  const Sizable = {
6766
7047
  string: {
@@ -6783,7 +7064,7 @@ const error$6 = () => {
6783
7064
  function getSizing(origin) {
6784
7065
  return Sizable[origin] ?? null;
6785
7066
  }
6786
- const parsedType$2 = (data) => {
7067
+ const parsedType$3 = (data) => {
6787
7068
  const t = typeof data;
6788
7069
  switch (t) {
6789
7070
  case "number": {
@@ -6835,7 +7116,7 @@ const error$6 = () => {
6835
7116
  };
6836
7117
  return (issue$1) => {
6837
7118
  switch (issue$1.code) {
6838
- case "invalid_type": return `ประเภทข้อมูลไม่ถูกต้อง: ควรเป็น ${issue$1.expected} แต่ได้รับ ${parsedType$2(issue$1.input)}`;
7119
+ case "invalid_type": return `ประเภทข้อมูลไม่ถูกต้อง: ควรเป็น ${issue$1.expected} แต่ได้รับ ${parsedType$3(issue$1.input)}`;
6839
7120
  case "invalid_value":
6840
7121
  if (issue$1.values.length === 1) return `ค่าไม่ถูกต้อง: ควรเป็น ${stringifyPrimitive(issue$1.values[0])}`;
6841
7122
  return `ตัวเลือกไม่ถูกต้อง: ควรเป็นหนึ่งใน ${joinValues(issue$1.values, "|")}`;
@@ -6877,7 +7158,7 @@ function th_default() {
6877
7158
  }
6878
7159
 
6879
7160
  //#endregion
6880
- //#region ../../node_modules/zod/dist/esm/v4/locales/tr.js
7161
+ //#region ../../node_modules/zod/v4/locales/tr.js
6881
7162
  const parsedType = (data) => {
6882
7163
  const t = typeof data;
6883
7164
  switch (t) {
@@ -6990,7 +7271,7 @@ function tr_default() {
6990
7271
  }
6991
7272
 
6992
7273
  //#endregion
6993
- //#region ../../node_modules/zod/dist/esm/v4/locales/ua.js
7274
+ //#region ../../node_modules/zod/v4/locales/ua.js
6994
7275
  const error$4 = () => {
6995
7276
  const Sizable = {
6996
7277
  string: {
@@ -7013,7 +7294,7 @@ const error$4 = () => {
7013
7294
  function getSizing(origin) {
7014
7295
  return Sizable[origin] ?? null;
7015
7296
  }
7016
- const parsedType$2 = (data) => {
7297
+ const parsedType$3 = (data) => {
7017
7298
  const t = typeof data;
7018
7299
  switch (t) {
7019
7300
  case "number": {
@@ -7065,7 +7346,7 @@ const error$4 = () => {
7065
7346
  };
7066
7347
  return (issue$1) => {
7067
7348
  switch (issue$1.code) {
7068
- case "invalid_type": return `Неправильні вхідні дані: очікується ${issue$1.expected}, отримано ${parsedType$2(issue$1.input)}`;
7349
+ case "invalid_type": return `Неправильні вхідні дані: очікується ${issue$1.expected}, отримано ${parsedType$3(issue$1.input)}`;
7069
7350
  case "invalid_value":
7070
7351
  if (issue$1.values.length === 1) return `Неправильні вхідні дані: очікується ${stringifyPrimitive(issue$1.values[0])}`;
7071
7352
  return `Неправильна опція: очікується одне з ${joinValues(issue$1.values, "|")}`;
@@ -7105,7 +7386,7 @@ function ua_default() {
7105
7386
  }
7106
7387
 
7107
7388
  //#endregion
7108
- //#region ../../node_modules/zod/dist/esm/v4/locales/ur.js
7389
+ //#region ../../node_modules/zod/v4/locales/ur.js
7109
7390
  const error$3 = () => {
7110
7391
  const Sizable = {
7111
7392
  string: {
@@ -7128,7 +7409,7 @@ const error$3 = () => {
7128
7409
  function getSizing(origin) {
7129
7410
  return Sizable[origin] ?? null;
7130
7411
  }
7131
- const parsedType$2 = (data) => {
7412
+ const parsedType$3 = (data) => {
7132
7413
  const t = typeof data;
7133
7414
  switch (t) {
7134
7415
  case "number": {
@@ -7180,7 +7461,7 @@ const error$3 = () => {
7180
7461
  };
7181
7462
  return (issue$1) => {
7182
7463
  switch (issue$1.code) {
7183
- case "invalid_type": return `غلط ان پٹ: ${issue$1.expected} متوقع تھا، ${parsedType$2(issue$1.input)} موصول ہوا`;
7464
+ case "invalid_type": return `غلط ان پٹ: ${issue$1.expected} متوقع تھا، ${parsedType$3(issue$1.input)} موصول ہوا`;
7184
7465
  case "invalid_value":
7185
7466
  if (issue$1.values.length === 1) return `غلط ان پٹ: ${stringifyPrimitive(issue$1.values[0])} متوقع تھا`;
7186
7467
  return `غلط آپشن: ${joinValues(issue$1.values, "|")} میں سے ایک متوقع تھا`;
@@ -7222,7 +7503,7 @@ function ur_default() {
7222
7503
  }
7223
7504
 
7224
7505
  //#endregion
7225
- //#region ../../node_modules/zod/dist/esm/v4/locales/vi.js
7506
+ //#region ../../node_modules/zod/v4/locales/vi.js
7226
7507
  const error$2 = () => {
7227
7508
  const Sizable = {
7228
7509
  string: {
@@ -7245,7 +7526,7 @@ const error$2 = () => {
7245
7526
  function getSizing(origin) {
7246
7527
  return Sizable[origin] ?? null;
7247
7528
  }
7248
- const parsedType$2 = (data) => {
7529
+ const parsedType$3 = (data) => {
7249
7530
  const t = typeof data;
7250
7531
  switch (t) {
7251
7532
  case "number": {
@@ -7297,7 +7578,7 @@ const error$2 = () => {
7297
7578
  };
7298
7579
  return (issue$1) => {
7299
7580
  switch (issue$1.code) {
7300
- 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)}`;
7581
+ 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)}`;
7301
7582
  case "invalid_value":
7302
7583
  if (issue$1.values.length === 1) return `Đầu vào không hợp lệ: mong đợi ${stringifyPrimitive(issue$1.values[0])}`;
7303
7584
  return `Tùy chọn không hợp lệ: mong đợi một trong các giá trị ${joinValues(issue$1.values, "|")}`;
@@ -7337,7 +7618,7 @@ function vi_default() {
7337
7618
  }
7338
7619
 
7339
7620
  //#endregion
7340
- //#region ../../node_modules/zod/dist/esm/v4/locales/zh-CN.js
7621
+ //#region ../../node_modules/zod/v4/locales/zh-CN.js
7341
7622
  const error$1 = () => {
7342
7623
  const Sizable = {
7343
7624
  string: {
@@ -7360,7 +7641,7 @@ const error$1 = () => {
7360
7641
  function getSizing(origin) {
7361
7642
  return Sizable[origin] ?? null;
7362
7643
  }
7363
- const parsedType$2 = (data) => {
7644
+ const parsedType$3 = (data) => {
7364
7645
  const t = typeof data;
7365
7646
  switch (t) {
7366
7647
  case "number": {
@@ -7412,7 +7693,7 @@ const error$1 = () => {
7412
7693
  };
7413
7694
  return (issue$1) => {
7414
7695
  switch (issue$1.code) {
7415
- case "invalid_type": return `无效输入:期望 ${issue$1.expected},实际接收 ${parsedType$2(issue$1.input)}`;
7696
+ case "invalid_type": return `无效输入:期望 ${issue$1.expected},实际接收 ${parsedType$3(issue$1.input)}`;
7416
7697
  case "invalid_value":
7417
7698
  if (issue$1.values.length === 1) return `无效输入:期望 ${stringifyPrimitive(issue$1.values[0])}`;
7418
7699
  return `无效选项:期望以下之一 ${joinValues(issue$1.values, "|")}`;
@@ -7452,7 +7733,7 @@ function zh_CN_default() {
7452
7733
  }
7453
7734
 
7454
7735
  //#endregion
7455
- //#region ../../node_modules/zod/dist/esm/v4/locales/zh-TW.js
7736
+ //#region ../../node_modules/zod/v4/locales/zh-TW.js
7456
7737
  const error = () => {
7457
7738
  const Sizable = {
7458
7739
  string: {
@@ -7475,7 +7756,7 @@ const error = () => {
7475
7756
  function getSizing(origin) {
7476
7757
  return Sizable[origin] ?? null;
7477
7758
  }
7478
- const parsedType$2 = (data) => {
7759
+ const parsedType$3 = (data) => {
7479
7760
  const t = typeof data;
7480
7761
  switch (t) {
7481
7762
  case "number": {
@@ -7527,7 +7808,7 @@ const error = () => {
7527
7808
  };
7528
7809
  return (issue$1) => {
7529
7810
  switch (issue$1.code) {
7530
- case "invalid_type": return `無效的輸入值:預期為 ${issue$1.expected},但收到 ${parsedType$2(issue$1.input)}`;
7811
+ case "invalid_type": return `無效的輸入值:預期為 ${issue$1.expected},但收到 ${parsedType$3(issue$1.input)}`;
7531
7812
  case "invalid_value":
7532
7813
  if (issue$1.values.length === 1) return `無效的輸入值:預期為 ${stringifyPrimitive(issue$1.values[0])}`;
7533
7814
  return `無效的選項:預期為以下其中之一 ${joinValues(issue$1.values, "|")}`;
@@ -7569,7 +7850,7 @@ function zh_TW_default() {
7569
7850
  }
7570
7851
 
7571
7852
  //#endregion
7572
- //#region ../../node_modules/zod/dist/esm/v4/locales/index.js
7853
+ //#region ../../node_modules/zod/v4/locales/index.js
7573
7854
  var locales_exports = {};
7574
7855
  __export(locales_exports, {
7575
7856
  ar: () => ar_default,
@@ -7579,6 +7860,7 @@ __export(locales_exports, {
7579
7860
  cs: () => cs_default,
7580
7861
  de: () => de_default,
7581
7862
  en: () => en_default,
7863
+ eo: () => eo_default,
7582
7864
  es: () => es_default,
7583
7865
  fa: () => fa_default,
7584
7866
  fi: () => fi_default,
@@ -7597,6 +7879,7 @@ __export(locales_exports, {
7597
7879
  no: () => no_default,
7598
7880
  ota: () => ota_default,
7599
7881
  pl: () => pl_default,
7882
+ ps: () => ps_default,
7600
7883
  pt: () => pt_default,
7601
7884
  ru: () => ru_default,
7602
7885
  sl: () => sl_default,
@@ -7612,12 +7895,12 @@ __export(locales_exports, {
7612
7895
  });
7613
7896
 
7614
7897
  //#endregion
7615
- //#region ../../node_modules/zod/dist/esm/v4/core/registries.js
7898
+ //#region ../../node_modules/zod/v4/core/registries.js
7616
7899
  const $output = Symbol("ZodOutput");
7617
7900
  const $input = Symbol("ZodInput");
7618
7901
  var $ZodRegistry = class {
7619
7902
  constructor() {
7620
- this._map = new WeakMap();
7903
+ this._map = new Map();
7621
7904
  this._idmap = new Map();
7622
7905
  }
7623
7906
  add(schema, ..._meta) {
@@ -7631,7 +7914,16 @@ var $ZodRegistry = class {
7631
7914
  }
7632
7915
  return this;
7633
7916
  }
7917
+ clear() {
7918
+ this._map = new Map();
7919
+ this._idmap = new Map();
7920
+ return this;
7921
+ }
7634
7922
  remove(schema) {
7923
+ const meta = this._map.get(schema);
7924
+ if (meta && typeof meta === "object" && "id" in meta) {
7925
+ this._idmap.delete(meta.id);
7926
+ }
7635
7927
  this._map.delete(schema);
7636
7928
  return this;
7637
7929
  }
@@ -7657,7 +7949,7 @@ function registry() {
7657
7949
  const globalRegistry = /* @__PURE__ */ registry();
7658
7950
 
7659
7951
  //#endregion
7660
- //#region ../../node_modules/zod/dist/esm/v4/core/api.js
7952
+ //#region ../../node_modules/zod/v4/core/api.js
7661
7953
  function _string(Class$1, params) {
7662
7954
  return new Class$1({
7663
7955
  type: "string",
@@ -7872,6 +8164,13 @@ function _jwt(Class$1, params) {
7872
8164
  ...normalizeParams(params)
7873
8165
  });
7874
8166
  }
8167
+ const TimePrecision = {
8168
+ Any: null,
8169
+ Minute: -1,
8170
+ Second: 0,
8171
+ Millisecond: 3,
8172
+ Microsecond: 6
8173
+ };
7875
8174
  function _isoDateTime(Class$1, params) {
7876
8175
  return new Class$1({
7877
8176
  type: "string",
@@ -8438,8 +8737,8 @@ function _refine(Class$1, fn, _params) {
8438
8737
  return schema;
8439
8738
  }
8440
8739
  function _stringbool(Classes, _params) {
8441
- const { case: _case, error: error$37, truthy, falsy } = normalizeParams(_params);
8442
- let truthyArray = truthy ?? [
8740
+ const params = normalizeParams(_params);
8741
+ let truthyArray = params.truthy ?? [
8443
8742
  "true",
8444
8743
  "1",
8445
8744
  "yes",
@@ -8447,7 +8746,7 @@ function _stringbool(Classes, _params) {
8447
8746
  "y",
8448
8747
  "enabled"
8449
8748
  ];
8450
- let falsyArray = falsy ?? [
8749
+ let falsyArray = params.falsy ?? [
8451
8750
  "false",
8452
8751
  "0",
8453
8752
  "no",
@@ -8455,7 +8754,7 @@ function _stringbool(Classes, _params) {
8455
8754
  "n",
8456
8755
  "disabled"
8457
8756
  ];
8458
- if (_case !== "sensitive") {
8757
+ if (params.case !== "sensitive") {
8459
8758
  truthyArray = truthyArray.map((v) => typeof v === "string" ? v.toLowerCase() : v);
8460
8759
  falsyArray = falsyArray.map((v) => typeof v === "string" ? v.toLowerCase() : v);
8461
8760
  }
@@ -8469,7 +8768,7 @@ function _stringbool(Classes, _params) {
8469
8768
  type: "transform",
8470
8769
  transform: (input, payload) => {
8471
8770
  let data = input;
8472
- if (_case !== "sensitive") data = data.toLowerCase();
8771
+ if (params.case !== "sensitive") data = data.toLowerCase();
8473
8772
  if (truthySet.has(data)) {
8474
8773
  return true;
8475
8774
  } else if (falsySet.has(data)) {
@@ -8485,31 +8784,47 @@ function _stringbool(Classes, _params) {
8485
8784
  return {};
8486
8785
  }
8487
8786
  },
8488
- error: error$37
8787
+ error: params.error
8489
8788
  });
8490
8789
  const innerPipe = new _Pipe({
8491
8790
  type: "pipe",
8492
8791
  in: new _String({
8493
8792
  type: "string",
8494
- error: error$37
8793
+ error: params.error
8495
8794
  }),
8496
8795
  out: tx,
8497
- error: error$37
8796
+ error: params.error
8498
8797
  });
8499
8798
  const outerPipe = new _Pipe({
8500
8799
  type: "pipe",
8501
8800
  in: innerPipe,
8502
8801
  out: new _Boolean({
8503
8802
  type: "boolean",
8504
- error: error$37
8803
+ error: params.error
8505
8804
  }),
8506
- error: error$37
8805
+ error: params.error
8507
8806
  });
8508
8807
  return outerPipe;
8509
8808
  }
8809
+ function _stringFormat(Class$1, format, fnOrRegex, _params = {}) {
8810
+ const params = normalizeParams(_params);
8811
+ const def = {
8812
+ ...normalizeParams(_params),
8813
+ check: "string_format",
8814
+ type: "string",
8815
+ format,
8816
+ fn: typeof fnOrRegex === "function" ? fnOrRegex : (val) => fnOrRegex.test(val),
8817
+ ...params
8818
+ };
8819
+ if (fnOrRegex instanceof RegExp) {
8820
+ def.pattern = fnOrRegex;
8821
+ }
8822
+ const inst = new Class$1(def);
8823
+ return inst;
8824
+ }
8510
8825
 
8511
8826
  //#endregion
8512
- //#region ../../node_modules/zod/dist/esm/v4/core/function.js
8827
+ //#region ../../node_modules/zod/v4/core/function.js
8513
8828
  var $ZodFunction = class {
8514
8829
  constructor(def) {
8515
8830
  this._def = def;
@@ -8580,7 +8895,7 @@ function _function(params) {
8580
8895
  }
8581
8896
 
8582
8897
  //#endregion
8583
- //#region ../../node_modules/zod/dist/esm/v4/core/to-json-schema.js
8898
+ //#region ../../node_modules/zod/v4/core/to-json-schema.js
8584
8899
  var JSONSchemaGenerator = class {
8585
8900
  constructor(params) {
8586
8901
  this.counter = 0;
@@ -8616,431 +8931,435 @@ var JSONSchemaGenerator = class {
8616
8931
  const result = {
8617
8932
  schema: {},
8618
8933
  count: 1,
8619
- cycle: undefined
8620
- };
8621
- this.seen.set(schema, result);
8622
- if (schema._zod.toJSONSchema) {
8623
- result.schema = schema._zod.toJSONSchema();
8624
- }
8625
- const params = {
8626
- ..._params,
8627
- schemaPath: [..._params.schemaPath, schema],
8934
+ cycle: undefined,
8628
8935
  path: _params.path
8629
8936
  };
8630
- const parent = schema._zod.parent;
8631
- if (parent) {
8632
- result.ref = parent;
8633
- this.process(parent, params);
8634
- this.seen.get(parent).isParent = true;
8937
+ this.seen.set(schema, result);
8938
+ const overrideSchema = schema._zod.toJSONSchema?.();
8939
+ if (overrideSchema) {
8940
+ result.schema = overrideSchema;
8635
8941
  } else {
8636
- const _json = result.schema;
8637
- switch (def.type) {
8638
- case "string": {
8639
- const json$1 = _json;
8640
- json$1.type = "string";
8641
- const { minimum, maximum, format, patterns, contentEncoding } = schema._zod.bag;
8642
- if (typeof minimum === "number") json$1.minLength = minimum;
8643
- if (typeof maximum === "number") json$1.maxLength = maximum;
8644
- if (format) {
8645
- json$1.format = formatMap[format] ?? format;
8646
- if (json$1.format === "") delete json$1.format;
8942
+ const params = {
8943
+ ..._params,
8944
+ schemaPath: [..._params.schemaPath, schema],
8945
+ path: _params.path
8946
+ };
8947
+ const parent = schema._zod.parent;
8948
+ if (parent) {
8949
+ result.ref = parent;
8950
+ this.process(parent, params);
8951
+ this.seen.get(parent).isParent = true;
8952
+ } else {
8953
+ const _json = result.schema;
8954
+ switch (def.type) {
8955
+ case "string": {
8956
+ const json$1 = _json;
8957
+ json$1.type = "string";
8958
+ const { minimum, maximum, format, patterns, contentEncoding } = schema._zod.bag;
8959
+ if (typeof minimum === "number") json$1.minLength = minimum;
8960
+ if (typeof maximum === "number") json$1.maxLength = maximum;
8961
+ if (format) {
8962
+ json$1.format = formatMap[format] ?? format;
8963
+ if (json$1.format === "") delete json$1.format;
8964
+ }
8965
+ if (contentEncoding) json$1.contentEncoding = contentEncoding;
8966
+ if (patterns && patterns.size > 0) {
8967
+ const regexes = [...patterns];
8968
+ if (regexes.length === 1) json$1.pattern = regexes[0].source;
8969
+ else if (regexes.length > 1) {
8970
+ result.schema.allOf = [...regexes.map((regex) => ({
8971
+ ...this.target === "draft-7" ? { type: "string" } : {},
8972
+ pattern: regex.source
8973
+ }))];
8974
+ }
8975
+ }
8976
+ break;
8647
8977
  }
8648
- if (contentEncoding) json$1.contentEncoding = contentEncoding;
8649
- if (patterns && patterns.size > 0) {
8650
- const regexes = [...patterns];
8651
- if (regexes.length === 1) json$1.pattern = regexes[0].source;
8652
- else if (regexes.length > 1) {
8653
- result.schema.allOf = [...regexes.map((regex) => ({
8654
- ...this.target === "draft-7" ? { type: "string" } : {},
8655
- pattern: regex.source
8656
- }))];
8978
+ case "number": {
8979
+ const json$1 = _json;
8980
+ const { minimum, maximum, format, multipleOf, exclusiveMaximum, exclusiveMinimum } = schema._zod.bag;
8981
+ if (typeof format === "string" && format.includes("int")) json$1.type = "integer";
8982
+ else json$1.type = "number";
8983
+ if (typeof exclusiveMinimum === "number") json$1.exclusiveMinimum = exclusiveMinimum;
8984
+ if (typeof minimum === "number") {
8985
+ json$1.minimum = minimum;
8986
+ if (typeof exclusiveMinimum === "number") {
8987
+ if (exclusiveMinimum >= minimum) delete json$1.minimum;
8988
+ else delete json$1.exclusiveMinimum;
8989
+ }
8657
8990
  }
8991
+ if (typeof exclusiveMaximum === "number") json$1.exclusiveMaximum = exclusiveMaximum;
8992
+ if (typeof maximum === "number") {
8993
+ json$1.maximum = maximum;
8994
+ if (typeof exclusiveMaximum === "number") {
8995
+ if (exclusiveMaximum <= maximum) delete json$1.maximum;
8996
+ else delete json$1.exclusiveMaximum;
8997
+ }
8998
+ }
8999
+ if (typeof multipleOf === "number") json$1.multipleOf = multipleOf;
9000
+ break;
8658
9001
  }
8659
- break;
8660
- }
8661
- case "number": {
8662
- const json$1 = _json;
8663
- const { minimum, maximum, format, multipleOf, exclusiveMaximum, exclusiveMinimum } = schema._zod.bag;
8664
- if (typeof format === "string" && format.includes("int")) json$1.type = "integer";
8665
- else json$1.type = "number";
8666
- if (typeof exclusiveMinimum === "number") json$1.exclusiveMinimum = exclusiveMinimum;
8667
- if (typeof minimum === "number") {
8668
- json$1.minimum = minimum;
8669
- if (typeof exclusiveMinimum === "number") {
8670
- if (exclusiveMinimum >= minimum) delete json$1.minimum;
8671
- else delete json$1.exclusiveMinimum;
9002
+ case "boolean": {
9003
+ const json$1 = _json;
9004
+ json$1.type = "boolean";
9005
+ break;
9006
+ }
9007
+ case "bigint": {
9008
+ if (this.unrepresentable === "throw") {
9009
+ throw new Error("BigInt cannot be represented in JSON Schema");
8672
9010
  }
9011
+ break;
8673
9012
  }
8674
- if (typeof exclusiveMaximum === "number") json$1.exclusiveMaximum = exclusiveMaximum;
8675
- if (typeof maximum === "number") {
8676
- json$1.maximum = maximum;
8677
- if (typeof exclusiveMaximum === "number") {
8678
- if (exclusiveMaximum <= maximum) delete json$1.maximum;
8679
- else delete json$1.exclusiveMaximum;
9013
+ case "symbol": {
9014
+ if (this.unrepresentable === "throw") {
9015
+ throw new Error("Symbols cannot be represented in JSON Schema");
8680
9016
  }
9017
+ break;
8681
9018
  }
8682
- if (typeof multipleOf === "number") json$1.multipleOf = multipleOf;
8683
- break;
8684
- }
8685
- case "boolean": {
8686
- const json$1 = _json;
8687
- json$1.type = "boolean";
8688
- break;
8689
- }
8690
- case "bigint": {
8691
- if (this.unrepresentable === "throw") {
8692
- throw new Error("BigInt cannot be represented in JSON Schema");
9019
+ case "null": {
9020
+ _json.type = "null";
9021
+ break;
8693
9022
  }
8694
- break;
8695
- }
8696
- case "symbol": {
8697
- if (this.unrepresentable === "throw") {
8698
- throw new Error("Symbols cannot be represented in JSON Schema");
9023
+ case "any": {
9024
+ break;
8699
9025
  }
8700
- break;
8701
- }
8702
- case "undefined": {
8703
- const json$1 = _json;
8704
- json$1.type = "null";
8705
- break;
8706
- }
8707
- case "null": {
8708
- _json.type = "null";
8709
- break;
8710
- }
8711
- case "any": {
8712
- break;
8713
- }
8714
- case "unknown": {
8715
- break;
8716
- }
8717
- case "never": {
8718
- _json.not = {};
8719
- break;
8720
- }
8721
- case "void": {
8722
- if (this.unrepresentable === "throw") {
8723
- throw new Error("Void cannot be represented in JSON Schema");
9026
+ case "unknown": {
9027
+ break;
8724
9028
  }
8725
- break;
8726
- }
8727
- case "date": {
8728
- if (this.unrepresentable === "throw") {
8729
- throw new Error("Date cannot be represented in JSON Schema");
9029
+ case "undefined": {
9030
+ if (this.unrepresentable === "throw") {
9031
+ throw new Error("Undefined cannot be represented in JSON Schema");
9032
+ }
9033
+ break;
8730
9034
  }
8731
- break;
8732
- }
8733
- case "array": {
8734
- const json$1 = _json;
8735
- const { minimum, maximum } = schema._zod.bag;
8736
- if (typeof minimum === "number") json$1.minItems = minimum;
8737
- if (typeof maximum === "number") json$1.maxItems = maximum;
8738
- json$1.type = "array";
8739
- json$1.items = this.process(def.element, {
8740
- ...params,
8741
- path: [...params.path, "items"]
8742
- });
8743
- break;
8744
- }
8745
- case "object": {
8746
- const json$1 = _json;
8747
- json$1.type = "object";
8748
- json$1.properties = {};
8749
- const shape = def.shape;
8750
- for (const key in shape) {
8751
- json$1.properties[key] = this.process(shape[key], {
8752
- ...params,
8753
- path: [
8754
- ...params.path,
8755
- "properties",
8756
- key
8757
- ]
8758
- });
9035
+ case "void": {
9036
+ if (this.unrepresentable === "throw") {
9037
+ throw new Error("Void cannot be represented in JSON Schema");
9038
+ }
9039
+ break;
8759
9040
  }
8760
- const allKeys = new Set(Object.keys(shape));
8761
- const requiredKeys = new Set([...allKeys].filter((key) => {
8762
- const v = def.shape[key]._zod;
8763
- if (this.io === "input") {
8764
- return v.optin === undefined;
8765
- } else {
8766
- return v.optout === undefined;
9041
+ case "never": {
9042
+ _json.not = {};
9043
+ break;
9044
+ }
9045
+ case "date": {
9046
+ if (this.unrepresentable === "throw") {
9047
+ throw new Error("Date cannot be represented in JSON Schema");
8767
9048
  }
8768
- }));
8769
- if (requiredKeys.size > 0) {
8770
- json$1.required = Array.from(requiredKeys);
9049
+ break;
8771
9050
  }
8772
- if (def.catchall?._zod.def.type === "never") {
8773
- json$1.additionalProperties = false;
8774
- } else if (!def.catchall) {
8775
- if (this.io === "output") json$1.additionalProperties = false;
8776
- } else if (def.catchall) {
8777
- json$1.additionalProperties = this.process(def.catchall, {
9051
+ case "array": {
9052
+ const json$1 = _json;
9053
+ const { minimum, maximum } = schema._zod.bag;
9054
+ if (typeof minimum === "number") json$1.minItems = minimum;
9055
+ if (typeof maximum === "number") json$1.maxItems = maximum;
9056
+ json$1.type = "array";
9057
+ json$1.items = this.process(def.element, {
8778
9058
  ...params,
8779
- path: [...params.path, "additionalProperties"]
9059
+ path: [...params.path, "items"]
8780
9060
  });
9061
+ break;
8781
9062
  }
8782
- break;
8783
- }
8784
- case "union": {
8785
- const json$1 = _json;
8786
- json$1.anyOf = def.options.map((x, i) => this.process(x, {
8787
- ...params,
8788
- path: [
8789
- ...params.path,
8790
- "anyOf",
8791
- i
8792
- ]
8793
- }));
8794
- break;
8795
- }
8796
- case "intersection": {
8797
- const json$1 = _json;
8798
- const a = this.process(def.left, {
8799
- ...params,
8800
- path: [
8801
- ...params.path,
8802
- "allOf",
8803
- 0
8804
- ]
8805
- });
8806
- const b = this.process(def.right, {
8807
- ...params,
8808
- path: [
8809
- ...params.path,
8810
- "allOf",
8811
- 1
8812
- ]
8813
- });
8814
- const isSimpleIntersection = (val) => "allOf" in val && Object.keys(val).length === 1;
8815
- const allOf = [...isSimpleIntersection(a) ? a.allOf : [a], ...isSimpleIntersection(b) ? b.allOf : [b]];
8816
- json$1.allOf = allOf;
8817
- break;
8818
- }
8819
- case "tuple": {
8820
- const json$1 = _json;
8821
- json$1.type = "array";
8822
- const prefixItems = def.items.map((x, i) => this.process(x, {
8823
- ...params,
8824
- path: [
8825
- ...params.path,
8826
- "prefixItems",
8827
- i
8828
- ]
8829
- }));
8830
- if (this.target === "draft-2020-12") {
8831
- json$1.prefixItems = prefixItems;
8832
- } else {
8833
- json$1.items = prefixItems;
9063
+ case "object": {
9064
+ const json$1 = _json;
9065
+ json$1.type = "object";
9066
+ json$1.properties = {};
9067
+ const shape = def.shape;
9068
+ for (const key in shape) {
9069
+ json$1.properties[key] = this.process(shape[key], {
9070
+ ...params,
9071
+ path: [
9072
+ ...params.path,
9073
+ "properties",
9074
+ key
9075
+ ]
9076
+ });
9077
+ }
9078
+ const allKeys = new Set(Object.keys(shape));
9079
+ const requiredKeys = new Set([...allKeys].filter((key) => {
9080
+ const v = def.shape[key]._zod;
9081
+ if (this.io === "input") {
9082
+ return v.optin === undefined;
9083
+ } else {
9084
+ return v.optout === undefined;
9085
+ }
9086
+ }));
9087
+ if (requiredKeys.size > 0) {
9088
+ json$1.required = Array.from(requiredKeys);
9089
+ }
9090
+ if (def.catchall?._zod.def.type === "never") {
9091
+ json$1.additionalProperties = false;
9092
+ } else if (!def.catchall) {
9093
+ if (this.io === "output") json$1.additionalProperties = false;
9094
+ } else if (def.catchall) {
9095
+ json$1.additionalProperties = this.process(def.catchall, {
9096
+ ...params,
9097
+ path: [...params.path, "additionalProperties"]
9098
+ });
9099
+ }
9100
+ break;
8834
9101
  }
8835
- if (def.rest) {
8836
- const rest = this.process(def.rest, {
9102
+ case "union": {
9103
+ const json$1 = _json;
9104
+ json$1.anyOf = def.options.map((x, i) => this.process(x, {
8837
9105
  ...params,
8838
- path: [...params.path, "items"]
9106
+ path: [
9107
+ ...params.path,
9108
+ "anyOf",
9109
+ i
9110
+ ]
9111
+ }));
9112
+ break;
9113
+ }
9114
+ case "intersection": {
9115
+ const json$1 = _json;
9116
+ const a = this.process(def.left, {
9117
+ ...params,
9118
+ path: [
9119
+ ...params.path,
9120
+ "allOf",
9121
+ 0
9122
+ ]
9123
+ });
9124
+ const b = this.process(def.right, {
9125
+ ...params,
9126
+ path: [
9127
+ ...params.path,
9128
+ "allOf",
9129
+ 1
9130
+ ]
8839
9131
  });
9132
+ const isSimpleIntersection = (val) => "allOf" in val && Object.keys(val).length === 1;
9133
+ const allOf = [...isSimpleIntersection(a) ? a.allOf : [a], ...isSimpleIntersection(b) ? b.allOf : [b]];
9134
+ json$1.allOf = allOf;
9135
+ break;
9136
+ }
9137
+ case "tuple": {
9138
+ const json$1 = _json;
9139
+ json$1.type = "array";
9140
+ const prefixItems = def.items.map((x, i) => this.process(x, {
9141
+ ...params,
9142
+ path: [
9143
+ ...params.path,
9144
+ "prefixItems",
9145
+ i
9146
+ ]
9147
+ }));
8840
9148
  if (this.target === "draft-2020-12") {
8841
- json$1.items = rest;
9149
+ json$1.prefixItems = prefixItems;
8842
9150
  } else {
8843
- json$1.additionalItems = rest;
9151
+ json$1.items = prefixItems;
9152
+ }
9153
+ if (def.rest) {
9154
+ const rest = this.process(def.rest, {
9155
+ ...params,
9156
+ path: [...params.path, "items"]
9157
+ });
9158
+ if (this.target === "draft-2020-12") {
9159
+ json$1.items = rest;
9160
+ } else {
9161
+ json$1.additionalItems = rest;
9162
+ }
8844
9163
  }
9164
+ if (def.rest) {
9165
+ json$1.items = this.process(def.rest, {
9166
+ ...params,
9167
+ path: [...params.path, "items"]
9168
+ });
9169
+ }
9170
+ const { minimum, maximum } = schema._zod.bag;
9171
+ if (typeof minimum === "number") json$1.minItems = minimum;
9172
+ if (typeof maximum === "number") json$1.maxItems = maximum;
9173
+ break;
8845
9174
  }
8846
- if (def.rest) {
8847
- json$1.items = this.process(def.rest, {
9175
+ case "record": {
9176
+ const json$1 = _json;
9177
+ json$1.type = "object";
9178
+ json$1.propertyNames = this.process(def.keyType, {
8848
9179
  ...params,
8849
- path: [...params.path, "items"]
9180
+ path: [...params.path, "propertyNames"]
8850
9181
  });
9182
+ json$1.additionalProperties = this.process(def.valueType, {
9183
+ ...params,
9184
+ path: [...params.path, "additionalProperties"]
9185
+ });
9186
+ break;
8851
9187
  }
8852
- const { minimum, maximum } = schema._zod.bag;
8853
- if (typeof minimum === "number") json$1.minItems = minimum;
8854
- if (typeof maximum === "number") json$1.maxItems = maximum;
8855
- break;
8856
- }
8857
- case "record": {
8858
- const json$1 = _json;
8859
- json$1.type = "object";
8860
- json$1.propertyNames = this.process(def.keyType, {
8861
- ...params,
8862
- path: [...params.path, "propertyNames"]
8863
- });
8864
- json$1.additionalProperties = this.process(def.valueType, {
8865
- ...params,
8866
- path: [...params.path, "additionalProperties"]
8867
- });
8868
- break;
8869
- }
8870
- case "map": {
8871
- if (this.unrepresentable === "throw") {
8872
- throw new Error("Map cannot be represented in JSON Schema");
9188
+ case "map": {
9189
+ if (this.unrepresentable === "throw") {
9190
+ throw new Error("Map cannot be represented in JSON Schema");
9191
+ }
9192
+ break;
8873
9193
  }
8874
- break;
8875
- }
8876
- case "set": {
8877
- if (this.unrepresentable === "throw") {
8878
- throw new Error("Set cannot be represented in JSON Schema");
9194
+ case "set": {
9195
+ if (this.unrepresentable === "throw") {
9196
+ throw new Error("Set cannot be represented in JSON Schema");
9197
+ }
9198
+ break;
9199
+ }
9200
+ case "enum": {
9201
+ const json$1 = _json;
9202
+ const values = getEnumValues(def.entries);
9203
+ if (values.every((v) => typeof v === "number")) json$1.type = "number";
9204
+ if (values.every((v) => typeof v === "string")) json$1.type = "string";
9205
+ json$1.enum = values;
9206
+ break;
8879
9207
  }
8880
- break;
8881
- }
8882
- case "enum": {
8883
- const json$1 = _json;
8884
- const values = getEnumValues(def.entries);
8885
- if (values.every((v) => typeof v === "number")) json$1.type = "number";
8886
- if (values.every((v) => typeof v === "string")) json$1.type = "string";
8887
- json$1.enum = values;
8888
- break;
8889
- }
8890
- case "literal": {
8891
- const json$1 = _json;
8892
- const vals = [];
8893
- for (const val of def.values) {
8894
- if (val === undefined) {
8895
- if (this.unrepresentable === "throw") {
8896
- throw new Error("Literal `undefined` cannot be represented in JSON Schema");
8897
- } else {}
8898
- } else if (typeof val === "bigint") {
8899
- if (this.unrepresentable === "throw") {
8900
- throw new Error("BigInt literals cannot be represented in JSON Schema");
9208
+ case "literal": {
9209
+ const json$1 = _json;
9210
+ const vals = [];
9211
+ for (const val of def.values) {
9212
+ if (val === undefined) {
9213
+ if (this.unrepresentable === "throw") {
9214
+ throw new Error("Literal `undefined` cannot be represented in JSON Schema");
9215
+ } else {}
9216
+ } else if (typeof val === "bigint") {
9217
+ if (this.unrepresentable === "throw") {
9218
+ throw new Error("BigInt literals cannot be represented in JSON Schema");
9219
+ } else {
9220
+ vals.push(Number(val));
9221
+ }
8901
9222
  } else {
8902
- vals.push(Number(val));
9223
+ vals.push(val);
8903
9224
  }
9225
+ }
9226
+ if (vals.length === 0) {} else if (vals.length === 1) {
9227
+ const val = vals[0];
9228
+ json$1.type = val === null ? "null" : typeof val;
9229
+ json$1.const = val;
8904
9230
  } else {
8905
- vals.push(val);
9231
+ if (vals.every((v) => typeof v === "number")) json$1.type = "number";
9232
+ if (vals.every((v) => typeof v === "string")) json$1.type = "string";
9233
+ if (vals.every((v) => typeof v === "boolean")) json$1.type = "string";
9234
+ if (vals.every((v) => v === null)) json$1.type = "null";
9235
+ json$1.enum = vals;
8906
9236
  }
9237
+ break;
8907
9238
  }
8908
- if (vals.length === 0) {} else if (vals.length === 1) {
8909
- const val = vals[0];
8910
- json$1.type = val === null ? "null" : typeof val;
8911
- json$1.const = val;
8912
- } else {
8913
- if (vals.every((v) => typeof v === "number")) json$1.type = "number";
8914
- if (vals.every((v) => typeof v === "string")) json$1.type = "string";
8915
- if (vals.every((v) => typeof v === "boolean")) json$1.type = "string";
8916
- if (vals.every((v) => v === null)) json$1.type = "null";
8917
- json$1.enum = vals;
8918
- }
8919
- break;
8920
- }
8921
- case "file": {
8922
- const json$1 = _json;
8923
- const file$1 = {
8924
- type: "string",
8925
- format: "binary",
8926
- contentEncoding: "binary"
8927
- };
8928
- const { minimum, maximum, mime } = schema._zod.bag;
8929
- if (minimum !== undefined) file$1.minLength = minimum;
8930
- if (maximum !== undefined) file$1.maxLength = maximum;
8931
- if (mime) {
8932
- if (mime.length === 1) {
8933
- file$1.contentMediaType = mime[0];
8934
- Object.assign(json$1, file$1);
9239
+ case "file": {
9240
+ const json$1 = _json;
9241
+ const file$1 = {
9242
+ type: "string",
9243
+ format: "binary",
9244
+ contentEncoding: "binary"
9245
+ };
9246
+ const { minimum, maximum, mime } = schema._zod.bag;
9247
+ if (minimum !== undefined) file$1.minLength = minimum;
9248
+ if (maximum !== undefined) file$1.maxLength = maximum;
9249
+ if (mime) {
9250
+ if (mime.length === 1) {
9251
+ file$1.contentMediaType = mime[0];
9252
+ Object.assign(json$1, file$1);
9253
+ } else {
9254
+ json$1.anyOf = mime.map((m) => {
9255
+ const mFile = {
9256
+ ...file$1,
9257
+ contentMediaType: m
9258
+ };
9259
+ return mFile;
9260
+ });
9261
+ }
8935
9262
  } else {
8936
- json$1.anyOf = mime.map((m) => {
8937
- const mFile = {
8938
- ...file$1,
8939
- contentMediaType: m
8940
- };
8941
- return mFile;
8942
- });
9263
+ Object.assign(json$1, file$1);
8943
9264
  }
8944
- } else {
8945
- Object.assign(json$1, file$1);
9265
+ break;
8946
9266
  }
8947
- break;
8948
- }
8949
- case "transform": {
8950
- if (this.unrepresentable === "throw") {
8951
- throw new Error("Transforms cannot be represented in JSON Schema");
9267
+ case "transform": {
9268
+ if (this.unrepresentable === "throw") {
9269
+ throw new Error("Transforms cannot be represented in JSON Schema");
9270
+ }
9271
+ break;
8952
9272
  }
8953
- break;
8954
- }
8955
- case "nullable": {
8956
- const inner = this.process(def.innerType, params);
8957
- _json.anyOf = [inner, { type: "null" }];
8958
- break;
8959
- }
8960
- case "nonoptional": {
8961
- this.process(def.innerType, params);
8962
- result.ref = def.innerType;
8963
- break;
8964
- }
8965
- case "success": {
8966
- const json$1 = _json;
8967
- json$1.type = "boolean";
8968
- break;
8969
- }
8970
- case "default": {
8971
- this.process(def.innerType, params);
8972
- result.ref = def.innerType;
8973
- _json.default = def.defaultValue;
8974
- break;
8975
- }
8976
- case "prefault": {
8977
- this.process(def.innerType, params);
8978
- result.ref = def.innerType;
8979
- if (this.io === "input") _json._prefault = def.defaultValue;
8980
- break;
8981
- }
8982
- case "catch": {
8983
- this.process(def.innerType, params);
8984
- result.ref = def.innerType;
8985
- let catchValue;
8986
- try {
8987
- catchValue = def.catchValue(undefined);
8988
- } catch {
8989
- throw new Error("Dynamic catch values are not supported in JSON Schema");
9273
+ case "nullable": {
9274
+ const inner = this.process(def.innerType, params);
9275
+ _json.anyOf = [inner, { type: "null" }];
9276
+ break;
8990
9277
  }
8991
- _json.default = catchValue;
8992
- break;
8993
- }
8994
- case "nan": {
8995
- if (this.unrepresentable === "throw") {
8996
- throw new Error("NaN cannot be represented in JSON Schema");
9278
+ case "nonoptional": {
9279
+ this.process(def.innerType, params);
9280
+ result.ref = def.innerType;
9281
+ break;
8997
9282
  }
8998
- break;
8999
- }
9000
- case "template_literal": {
9001
- const json$1 = _json;
9002
- const pattern = schema._zod.pattern;
9003
- if (!pattern) throw new Error("Pattern not found in template literal");
9004
- json$1.type = "string";
9005
- json$1.pattern = pattern.source;
9006
- break;
9007
- }
9008
- case "pipe": {
9009
- const innerType = this.io === "input" ? def.in._zod.def.type === "transform" ? def.out : def.in : def.out;
9010
- this.process(innerType, params);
9011
- result.ref = innerType;
9012
- break;
9013
- }
9014
- case "readonly": {
9015
- this.process(def.innerType, params);
9016
- result.ref = def.innerType;
9017
- _json.readOnly = true;
9018
- break;
9019
- }
9020
- case "promise": {
9021
- this.process(def.innerType, params);
9022
- result.ref = def.innerType;
9023
- break;
9024
- }
9025
- case "optional": {
9026
- this.process(def.innerType, params);
9027
- result.ref = def.innerType;
9028
- break;
9029
- }
9030
- case "lazy": {
9031
- const innerType = schema._zod.innerType;
9032
- this.process(innerType, params);
9033
- result.ref = innerType;
9034
- break;
9035
- }
9036
- case "custom": {
9037
- if (this.unrepresentable === "throw") {
9038
- throw new Error("Custom types cannot be represented in JSON Schema");
9283
+ case "success": {
9284
+ const json$1 = _json;
9285
+ json$1.type = "boolean";
9286
+ break;
9287
+ }
9288
+ case "default": {
9289
+ this.process(def.innerType, params);
9290
+ result.ref = def.innerType;
9291
+ _json.default = JSON.parse(JSON.stringify(def.defaultValue));
9292
+ break;
9293
+ }
9294
+ case "prefault": {
9295
+ this.process(def.innerType, params);
9296
+ result.ref = def.innerType;
9297
+ if (this.io === "input") _json._prefault = JSON.parse(JSON.stringify(def.defaultValue));
9298
+ break;
9299
+ }
9300
+ case "catch": {
9301
+ this.process(def.innerType, params);
9302
+ result.ref = def.innerType;
9303
+ let catchValue;
9304
+ try {
9305
+ catchValue = def.catchValue(undefined);
9306
+ } catch {
9307
+ throw new Error("Dynamic catch values are not supported in JSON Schema");
9308
+ }
9309
+ _json.default = catchValue;
9310
+ break;
9311
+ }
9312
+ case "nan": {
9313
+ if (this.unrepresentable === "throw") {
9314
+ throw new Error("NaN cannot be represented in JSON Schema");
9315
+ }
9316
+ break;
9317
+ }
9318
+ case "template_literal": {
9319
+ const json$1 = _json;
9320
+ const pattern = schema._zod.pattern;
9321
+ if (!pattern) throw new Error("Pattern not found in template literal");
9322
+ json$1.type = "string";
9323
+ json$1.pattern = pattern.source;
9324
+ break;
9325
+ }
9326
+ case "pipe": {
9327
+ const innerType = this.io === "input" ? def.in._zod.def.type === "transform" ? def.out : def.in : def.out;
9328
+ this.process(innerType, params);
9329
+ result.ref = innerType;
9330
+ break;
9331
+ }
9332
+ case "readonly": {
9333
+ this.process(def.innerType, params);
9334
+ result.ref = def.innerType;
9335
+ _json.readOnly = true;
9336
+ break;
9337
+ }
9338
+ case "promise": {
9339
+ this.process(def.innerType, params);
9340
+ result.ref = def.innerType;
9341
+ break;
9342
+ }
9343
+ case "optional": {
9344
+ this.process(def.innerType, params);
9345
+ result.ref = def.innerType;
9346
+ break;
9347
+ }
9348
+ case "lazy": {
9349
+ const innerType = schema._zod.innerType;
9350
+ this.process(innerType, params);
9351
+ result.ref = innerType;
9352
+ break;
9353
+ }
9354
+ case "custom": {
9355
+ if (this.unrepresentable === "throw") {
9356
+ throw new Error("Custom types cannot be represented in JSON Schema");
9357
+ }
9358
+ break;
9359
+ }
9360
+ default: {
9361
+ def;
9039
9362
  }
9040
- break;
9041
- }
9042
- default: {
9043
- def;
9044
9363
  }
9045
9364
  }
9046
9365
  }
@@ -9067,12 +9386,15 @@ var JSONSchemaGenerator = class {
9067
9386
  const defsSegment = this.target === "draft-2020-12" ? "$defs" : "definitions";
9068
9387
  if (params.external) {
9069
9388
  const externalId = params.external.registry.get(entry[0])?.id;
9070
- if (externalId) return { ref: params.external.uri(externalId) };
9389
+ const uriGenerator = params.external.uri ?? ((id$1) => id$1);
9390
+ if (externalId) {
9391
+ return { ref: uriGenerator(externalId) };
9392
+ }
9071
9393
  const id = entry[1].defId ?? entry[1].schema.id ?? `schema${this.counter++}`;
9072
9394
  entry[1].defId = id;
9073
9395
  return {
9074
9396
  defId: id,
9075
- ref: `${params.external.uri("__shared")}#/${defsSegment}/${id}`
9397
+ ref: `${uriGenerator("__shared")}#/${defsSegment}/${id}`
9076
9398
  };
9077
9399
  }
9078
9400
  if (entry[1] === root) {
@@ -9100,6 +9422,14 @@ var JSONSchemaGenerator = class {
9100
9422
  }
9101
9423
  schema$1.$ref = ref;
9102
9424
  };
9425
+ if (params.cycles === "throw") {
9426
+ for (const entry of this.seen.entries()) {
9427
+ const seen = entry[1];
9428
+ if (seen.cycle) {
9429
+ throw new Error("Cycle detected: " + `#/${seen.cycle?.join("/")}/<root>` + "\n\nSet the `cycles` parameter to `\"ref\"` to resolve cyclical schemas with defs.");
9430
+ }
9431
+ }
9432
+ }
9103
9433
  for (const entry of this.seen.entries()) {
9104
9434
  const seen = entry[1];
9105
9435
  if (schema === entry[0]) {
@@ -9119,11 +9449,7 @@ var JSONSchemaGenerator = class {
9119
9449
  continue;
9120
9450
  }
9121
9451
  if (seen.cycle) {
9122
- if (params.cycles === "throw") {
9123
- throw new Error("Cycle detected: " + `#/${seen.cycle?.join("/")}/<root>` + "\n\nSet the `cycles` parameter to `\"ref\"` to resolve cyclical schemas with defs.");
9124
- } else if (params.cycles === "ref") {
9125
- extractToDef(entry);
9126
- }
9452
+ extractToDef(entry);
9127
9453
  continue;
9128
9454
  }
9129
9455
  if (seen.count > 1) {
@@ -9155,7 +9481,8 @@ var JSONSchemaGenerator = class {
9155
9481
  }
9156
9482
  if (!seen.isParent) this.override({
9157
9483
  zodSchema,
9158
- jsonSchema: schema$1
9484
+ jsonSchema: schema$1,
9485
+ path: seen.path ?? []
9159
9486
  });
9160
9487
  };
9161
9488
  for (const entry of [...this.seen.entries()].reverse()) {
@@ -9169,6 +9496,11 @@ var JSONSchemaGenerator = class {
9169
9496
  } else {
9170
9497
  console.warn(`Invalid target: ${this.target}`);
9171
9498
  }
9499
+ if (params.external?.uri) {
9500
+ const id = params.external.registry.get(schema)?.id;
9501
+ if (!id) throw new Error("Schema is missing an `id` property");
9502
+ result.$id = params.external.uri(id);
9503
+ }
9172
9504
  Object.assign(result, root.def);
9173
9505
  const defs = params.external?.defs ?? {};
9174
9506
  for (const entry of this.seen.entries()) {
@@ -9177,11 +9509,13 @@ var JSONSchemaGenerator = class {
9177
9509
  defs[seen.defId] = seen.def;
9178
9510
  }
9179
9511
  }
9180
- if (!params.external && Object.keys(defs).length > 0) {
9181
- if (this.target === "draft-2020-12") {
9182
- result.$defs = defs;
9183
- } else {
9184
- result.definitions = defs;
9512
+ if (params.external) {} else {
9513
+ if (Object.keys(defs).length > 0) {
9514
+ if (this.target === "draft-2020-12") {
9515
+ result.$defs = defs;
9516
+ } else {
9517
+ result.definitions = defs;
9518
+ }
9185
9519
  }
9186
9520
  }
9187
9521
  try {
@@ -9202,7 +9536,7 @@ function toJSONSchema(input, _params) {
9202
9536
  const schemas = {};
9203
9537
  const external = {
9204
9538
  registry: input,
9205
- uri: _params?.uri || ((id) => id),
9539
+ uri: _params?.uri,
9206
9540
  defs
9207
9541
  };
9208
9542
  for (const entry of input._idmap.entries()) {
@@ -9313,11 +9647,11 @@ function isTransforming(_schema, _ctx) {
9313
9647
  }
9314
9648
 
9315
9649
  //#endregion
9316
- //#region ../../node_modules/zod/dist/esm/v4/core/json-schema.js
9650
+ //#region ../../node_modules/zod/v4/core/json-schema.js
9317
9651
  var json_schema_exports = {};
9318
9652
 
9319
9653
  //#endregion
9320
- //#region ../../node_modules/zod/dist/esm/v4/core/index.js
9654
+ //#region ../../node_modules/zod/v4/core/index.js
9321
9655
  var core_exports = {};
9322
9656
  __export(core_exports, {
9323
9657
  $ZodAny: () => $ZodAny,
@@ -9356,6 +9690,7 @@ __export(core_exports, {
9356
9690
  $ZodCheckStringFormat: () => $ZodCheckStringFormat,
9357
9691
  $ZodCheckUpperCase: () => $ZodCheckUpperCase,
9358
9692
  $ZodCustom: () => $ZodCustom,
9693
+ $ZodCustomStringFormat: () => $ZodCustomStringFormat,
9359
9694
  $ZodDate: () => $ZodDate,
9360
9695
  $ZodDefault: () => $ZodDefault,
9361
9696
  $ZodDiscriminatedUnion: () => $ZodDiscriminatedUnion,
@@ -9420,6 +9755,8 @@ __export(core_exports, {
9420
9755
  Doc: () => Doc,
9421
9756
  JSONSchema: () => json_schema_exports,
9422
9757
  JSONSchemaGenerator: () => JSONSchemaGenerator,
9758
+ NEVER: () => NEVER,
9759
+ TimePrecision: () => TimePrecision,
9423
9760
  _any: () => _any,
9424
9761
  _array: () => _array,
9425
9762
  _base64: () => _base64,
@@ -9509,6 +9846,7 @@ __export(core_exports, {
9509
9846
  _size: () => _size,
9510
9847
  _startsWith: () => _startsWith,
9511
9848
  _string: () => _string,
9849
+ _stringFormat: () => _stringFormat,
9512
9850
  _stringbool: () => _stringbool,
9513
9851
  _success: () => _success,
9514
9852
  _symbol: () => _symbol,
@@ -9558,7 +9896,7 @@ __export(core_exports, {
9558
9896
  });
9559
9897
 
9560
9898
  //#endregion
9561
- //#region ../../node_modules/zod/dist/esm/v4/classic/iso.js
9899
+ //#region ../../node_modules/zod/v4/classic/iso.js
9562
9900
  var iso_exports = {};
9563
9901
  __export(iso_exports, {
9564
9902
  ZodISODate: () => ZodISODate,
@@ -9600,7 +9938,7 @@ function duration(params) {
9600
9938
  }
9601
9939
 
9602
9940
  //#endregion
9603
- //#region ../../node_modules/zod/dist/esm/v4/classic/errors.js
9941
+ //#region ../../node_modules/zod/v4/classic/errors.js
9604
9942
  const initializer = (inst, issues) => {
9605
9943
  $ZodError.init(inst, issues);
9606
9944
  inst.name = "ZodError";
@@ -9618,14 +9956,14 @@ const ZodError = $constructor("ZodError", initializer);
9618
9956
  const ZodRealError = $constructor("ZodError", initializer, { Parent: Error });
9619
9957
 
9620
9958
  //#endregion
9621
- //#region ../../node_modules/zod/dist/esm/v4/classic/parse.js
9959
+ //#region ../../node_modules/zod/v4/classic/parse.js
9622
9960
  const parse = /* @__PURE__ */ _parse(ZodRealError);
9623
9961
  const parseAsync = /* @__PURE__ */ _parseAsync(ZodRealError);
9624
9962
  const safeParse = /* @__PURE__ */ _safeParse(ZodRealError);
9625
9963
  const safeParseAsync = /* @__PURE__ */ _safeParseAsync(ZodRealError);
9626
9964
 
9627
9965
  //#endregion
9628
- //#region ../../node_modules/zod/dist/esm/v4/classic/schemas.js
9966
+ //#region ../../node_modules/zod/v4/classic/schemas.js
9629
9967
  const ZodType = /* @__PURE__ */ $constructor("ZodType", (inst, def) => {
9630
9968
  $ZodType.init(inst, def);
9631
9969
  inst.def = def;
@@ -9893,6 +10231,13 @@ const ZodJWT = /* @__PURE__ */ $constructor("ZodJWT", (inst, def) => {
9893
10231
  function jwt(params) {
9894
10232
  return _jwt(ZodJWT, params);
9895
10233
  }
10234
+ const ZodCustomStringFormat = /* @__PURE__ */ $constructor("ZodCustomStringFormat", (inst, def) => {
10235
+ $ZodCustomStringFormat.init(inst, def);
10236
+ ZodStringFormat.init(inst, def);
10237
+ });
10238
+ function stringFormat(format, fnOrRegex, _params = {}) {
10239
+ return _stringFormat(ZodCustomStringFormat, format, fnOrRegex, _params);
10240
+ }
9896
10241
  const ZodNumber = /* @__PURE__ */ $constructor("ZodNumber", (inst, def) => {
9897
10242
  $ZodNumber.init(inst, def);
9898
10243
  ZodType.init(inst, def);
@@ -10062,9 +10407,7 @@ function keyof(schema) {
10062
10407
  const ZodObject = /* @__PURE__ */ $constructor("ZodObject", (inst, def) => {
10063
10408
  $ZodObject.init(inst, def);
10064
10409
  ZodType.init(inst, def);
10065
- defineLazy(inst, "shape", () => {
10066
- return Object.fromEntries(Object.entries(inst._zod.def.shape));
10067
- });
10410
+ defineLazy(inst, "shape", () => def.shape);
10068
10411
  inst.keyof = () => _enum(Object.keys(inst._zod.def.shape));
10069
10412
  inst.catchall = (catchall) => inst.clone({
10070
10413
  ...inst._zod.def,
@@ -10509,11 +10852,8 @@ const ZodCustom = /* @__PURE__ */ $constructor("ZodCustom", (inst, def) => {
10509
10852
  $ZodCustom.init(inst, def);
10510
10853
  ZodType.init(inst, def);
10511
10854
  });
10512
- function check(fn, params) {
10513
- const ch = new $ZodCheck({
10514
- check: "custom",
10515
- ...normalizeParams(params)
10516
- });
10855
+ function check(fn) {
10856
+ const ch = new $ZodCheck({ check: "custom" });
10517
10857
  ch._zod.check = fn;
10518
10858
  return ch;
10519
10859
  }
@@ -10523,7 +10863,7 @@ function custom(fn, _params) {
10523
10863
  function refine(fn, _params = {}) {
10524
10864
  return _refine(ZodCustom, fn, _params);
10525
10865
  }
10526
- function superRefine(fn, params) {
10866
+ function superRefine(fn) {
10527
10867
  const ch = check((payload) => {
10528
10868
  payload.addIssue = (issue$1) => {
10529
10869
  if (typeof issue$1 === "string") {
@@ -10539,7 +10879,7 @@ function superRefine(fn, params) {
10539
10879
  }
10540
10880
  };
10541
10881
  return fn(payload.value, payload);
10542
- }, params);
10882
+ });
10543
10883
  return ch;
10544
10884
  }
10545
10885
  function _instanceof(cls, params = { error: `Input not instance of ${cls.name}` }) {
@@ -10577,7 +10917,7 @@ function preprocess(fn, schema) {
10577
10917
  }
10578
10918
 
10579
10919
  //#endregion
10580
- //#region ../../node_modules/zod/dist/esm/v4/classic/compat.js
10920
+ //#region ../../node_modules/zod/v4/classic/compat.js
10581
10921
  /** @deprecated Use the raw string literal codes instead, e.g. "invalid_type". */
10582
10922
  const ZodIssueCode = {
10583
10923
  invalid_type: "invalid_type",
@@ -10592,10 +10932,6 @@ const ZodIssueCode = {
10592
10932
  invalid_value: "invalid_value",
10593
10933
  custom: "custom"
10594
10934
  };
10595
- /** @deprecated Not necessary in Zod 4. */
10596
- const INVALID = Object.freeze({ status: "aborted" });
10597
- /** A special constant with type `never` */
10598
- const NEVER = INVALID;
10599
10935
  /** @deprecated Use `z.config(params)` instead. */
10600
10936
  function setErrorMap(map$1) {
10601
10937
  config({ customError: map$1 });
@@ -10606,7 +10942,7 @@ function getErrorMap() {
10606
10942
  }
10607
10943
 
10608
10944
  //#endregion
10609
- //#region ../../node_modules/zod/dist/esm/v4/classic/coerce.js
10945
+ //#region ../../node_modules/zod/v4/classic/coerce.js
10610
10946
  var coerce_exports = {};
10611
10947
  __export(coerce_exports, {
10612
10948
  bigint: () => bigint,
@@ -10632,13 +10968,14 @@ function date(params) {
10632
10968
  }
10633
10969
 
10634
10970
  //#endregion
10635
- //#region ../../node_modules/zod/dist/esm/v4/classic/external.js
10971
+ //#region ../../node_modules/zod/v4/classic/external.js
10636
10972
  var external_exports = {};
10637
10973
  __export(external_exports, {
10638
10974
  $brand: () => $brand,
10639
10975
  $input: () => $input,
10640
10976
  $output: () => $output,
10641
10977
  NEVER: () => NEVER,
10978
+ TimePrecision: () => TimePrecision,
10642
10979
  ZodAny: () => ZodAny,
10643
10980
  ZodArray: () => ZodArray,
10644
10981
  ZodBase64: () => ZodBase64,
@@ -10652,6 +10989,7 @@ __export(external_exports, {
10652
10989
  ZodCUID2: () => ZodCUID2,
10653
10990
  ZodCatch: () => ZodCatch,
10654
10991
  ZodCustom: () => ZodCustom,
10992
+ ZodCustomStringFormat: () => ZodCustomStringFormat,
10655
10993
  ZodDate: () => ZodDate,
10656
10994
  ZodDefault: () => ZodDefault,
10657
10995
  ZodDiscriminatedUnion: () => ZodDiscriminatedUnion,
@@ -10813,6 +11151,7 @@ __export(external_exports, {
10813
11151
  startsWith: () => _startsWith,
10814
11152
  strictObject: () => strictObject,
10815
11153
  string: () => string$1,
11154
+ stringFormat: () => stringFormat,
10816
11155
  stringbool: () => stringbool,
10817
11156
  success: () => success,
10818
11157
  superRefine: () => superRefine,
@@ -10843,11 +11182,11 @@ __export(external_exports, {
10843
11182
  config(en_default());
10844
11183
 
10845
11184
  //#endregion
10846
- //#region ../../node_modules/zod/dist/esm/v4/classic/index.js
11185
+ //#region ../../node_modules/zod/v4/classic/index.js
10847
11186
  var classic_default = external_exports;
10848
11187
 
10849
11188
  //#endregion
10850
- //#region ../../node_modules/zod/dist/esm/v4/index.js
11189
+ //#region ../../node_modules/zod/v4/index.js
10851
11190
  var v4_default = classic_default;
10852
11191
 
10853
11192
  //#endregion
@@ -10982,8 +11321,8 @@ var EASClient = class {
10982
11321
  };
10983
11322
  return this.deployedAddresses;
10984
11323
  } catch (err) {
10985
- const error$37 = err;
10986
- throw new Error(`Failed to deploy EAS contracts: ${error$37.message}`);
11324
+ const error$39 = err;
11325
+ throw new Error(`Failed to deploy EAS contracts: ${error$39.message}`);
10987
11326
  }
10988
11327
  }
10989
11328
  /**
@@ -11044,8 +11383,8 @@ var EASClient = class {
11044
11383
  success: true
11045
11384
  };
11046
11385
  } catch (err) {
11047
- const error$37 = err;
11048
- throw new Error(`Failed to register schema: ${error$37.message}`);
11386
+ const error$39 = err;
11387
+ throw new Error(`Failed to register schema: ${error$39.message}`);
11049
11388
  }
11050
11389
  }
11051
11390
  /**
@@ -11111,8 +11450,8 @@ var EASClient = class {
11111
11450
  success: true
11112
11451
  };
11113
11452
  } catch (err) {
11114
- const error$37 = err;
11115
- throw new Error(`Failed to create attestation: ${error$37.message}`);
11453
+ const error$39 = err;
11454
+ throw new Error(`Failed to create attestation: ${error$39.message}`);
11116
11455
  }
11117
11456
  }
11118
11457
  /**
@@ -11194,8 +11533,8 @@ var EASClient = class {
11194
11533
  success: true
11195
11534
  };
11196
11535
  } catch (err) {
11197
- const error$37 = err;
11198
- throw new Error(`Failed to create multiple attestations: ${error$37.message}`);
11536
+ const error$39 = err;
11537
+ throw new Error(`Failed to create multiple attestations: ${error$39.message}`);
11199
11538
  }
11200
11539
  }
11201
11540
  /**
@@ -11250,8 +11589,8 @@ var EASClient = class {
11250
11589
  success: true
11251
11590
  };
11252
11591
  } catch (err) {
11253
- const error$37 = err;
11254
- throw new Error(`Failed to revoke attestation: ${error$37.message}`);
11592
+ const error$39 = err;
11593
+ throw new Error(`Failed to revoke attestation: ${error$39.message}`);
11255
11594
  }
11256
11595
  }
11257
11596
  /**