@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.
package/dist/eas.cjs CHANGED
@@ -106,7 +106,9 @@ const EAS_FIELD_TYPES = {
106
106
  };
107
107
 
108
108
  //#endregion
109
- //#region ../../node_modules/zod/dist/esm/v4/core/core.js
109
+ //#region ../../node_modules/zod/v4/core/core.js
110
+ /** A special constant with type `never` */
111
+ const NEVER = Object.freeze({ status: "aborted" });
110
112
  function $constructor(name, initializer$2, params) {
111
113
  function init(inst, def) {
112
114
  var _a;
@@ -157,7 +159,7 @@ function config(newConfig) {
157
159
  }
158
160
 
159
161
  //#endregion
160
- //#region ../../node_modules/zod/dist/esm/v4/core/util.js
162
+ //#region ../../node_modules/zod/v4/core/util.js
161
163
  var util_exports = {};
162
164
  __export(util_exports, {
163
165
  BIGINT_FORMAT_RANGES: () => BIGINT_FORMAT_RANGES,
@@ -172,6 +174,7 @@ __export(util_exports, {
172
174
  assertNotEqual: () => assertNotEqual,
173
175
  assignProp: () => assignProp,
174
176
  cached: () => cached,
177
+ captureStackTrace: () => captureStackTrace,
175
178
  cleanEnum: () => cleanEnum,
176
179
  cleanRegex: () => cleanRegex,
177
180
  clone: () => clone,
@@ -310,10 +313,14 @@ function randomString(length = 10) {
310
313
  function esc(str) {
311
314
  return JSON.stringify(str);
312
315
  }
316
+ const captureStackTrace = Error.captureStackTrace ? Error.captureStackTrace : (..._args) => {};
313
317
  function isObject(data) {
314
318
  return typeof data === "object" && data !== null && !Array.isArray(data);
315
319
  }
316
320
  const allowsEval = cached(() => {
321
+ if (typeof navigator !== "undefined" && navigator?.userAgent?.includes("Cloudflare")) {
322
+ return false;
323
+ }
317
324
  try {
318
325
  const F = Function;
319
326
  new F("");
@@ -322,9 +329,6 @@ const allowsEval = cached(() => {
322
329
  return false;
323
330
  }
324
331
  });
325
- function _isObject(o) {
326
- return Object.prototype.toString.call(o) === "[object Object]";
327
- }
328
332
  function isPlainObject(o) {
329
333
  if (isObject(o) === false) return false;
330
334
  const ctor = o.constructor;
@@ -504,6 +508,9 @@ function omit(schema, mask) {
504
508
  });
505
509
  }
506
510
  function extend(schema, shape) {
511
+ if (!isPlainObject(shape)) {
512
+ throw new Error("Invalid input to extend: expected a plain object");
513
+ }
507
514
  const def = {
508
515
  ...schema._zod.def,
509
516
  get shape() {
@@ -591,7 +598,7 @@ function required(Class$1, schema, mask) {
591
598
  }
592
599
  function aborted(x, startIndex = 0) {
593
600
  for (let i = startIndex; i < x.issues.length; i++) {
594
- if (x.issues[i].continue !== true) return true;
601
+ if (x.issues[i]?.continue !== true) return true;
595
602
  }
596
603
  return false;
597
604
  }
@@ -655,7 +662,7 @@ var Class = class {
655
662
  };
656
663
 
657
664
  //#endregion
658
- //#region ../../node_modules/zod/dist/esm/v4/core/errors.js
665
+ //#region ../../node_modules/zod/v4/core/errors.js
659
666
  const initializer$1 = (inst, def) => {
660
667
  inst.name = "$ZodError";
661
668
  Object.defineProperty(inst, "_zod", {
@@ -672,13 +679,17 @@ const initializer$1 = (inst, def) => {
672
679
  },
673
680
  enumerable: true
674
681
  });
682
+ Object.defineProperty(inst, "toString", {
683
+ value: () => inst.message,
684
+ enumerable: false
685
+ });
675
686
  };
676
687
  const $ZodError = $constructor("$ZodError", initializer$1);
677
688
  const $ZodRealError = $constructor("$ZodError", initializer$1, { Parent: Error });
678
- function flattenError(error$37, mapper = (issue$1) => issue$1.message) {
689
+ function flattenError(error$39, mapper = (issue$1) => issue$1.message) {
679
690
  const fieldErrors = {};
680
691
  const formErrors = [];
681
- for (const sub of error$37.issues) {
692
+ for (const sub of error$39.issues) {
682
693
  if (sub.path.length > 0) {
683
694
  fieldErrors[sub.path[0]] = fieldErrors[sub.path[0]] || [];
684
695
  fieldErrors[sub.path[0]].push(mapper(sub));
@@ -691,13 +702,13 @@ function flattenError(error$37, mapper = (issue$1) => issue$1.message) {
691
702
  fieldErrors
692
703
  };
693
704
  }
694
- function formatError(error$37, _mapper) {
705
+ function formatError(error$39, _mapper) {
695
706
  const mapper = _mapper || function(issue$1) {
696
707
  return issue$1.message;
697
708
  };
698
709
  const fieldErrors = { _errors: [] };
699
- const processError = (error$38) => {
700
- for (const issue$1 of error$38.issues) {
710
+ const processError = (error$40) => {
711
+ for (const issue$1 of error$40.issues) {
701
712
  if (issue$1.code === "invalid_union" && issue$1.errors.length) {
702
713
  issue$1.errors.map((issues) => processError({ issues }));
703
714
  } else if (issue$1.code === "invalid_key") {
@@ -724,17 +735,17 @@ function formatError(error$37, _mapper) {
724
735
  }
725
736
  }
726
737
  };
727
- processError(error$37);
738
+ processError(error$39);
728
739
  return fieldErrors;
729
740
  }
730
- function treeifyError(error$37, _mapper) {
741
+ function treeifyError(error$39, _mapper) {
731
742
  const mapper = _mapper || function(issue$1) {
732
743
  return issue$1.message;
733
744
  };
734
745
  const result = { errors: [] };
735
- const processError = (error$38, path = []) => {
746
+ const processError = (error$40, path = []) => {
736
747
  var _a, _b;
737
- for (const issue$1 of error$38.issues) {
748
+ for (const issue$1 of error$40.issues) {
738
749
  if (issue$1.code === "invalid_union" && issue$1.errors.length) {
739
750
  issue$1.errors.map((issues) => processError({ issues }, issue$1.path));
740
751
  } else if (issue$1.code === "invalid_key") {
@@ -769,7 +780,7 @@ function treeifyError(error$37, _mapper) {
769
780
  }
770
781
  }
771
782
  };
772
- processError(error$37);
783
+ processError(error$39);
773
784
  return result;
774
785
  }
775
786
  /** Format a ZodError as a human-readable string in the following form.
@@ -817,9 +828,9 @@ function toDotPath(path) {
817
828
  }
818
829
  return segs.join("");
819
830
  }
820
- function prettifyError(error$37) {
831
+ function prettifyError(error$39) {
821
832
  const lines = [];
822
- const issues = [...error$37.issues].sort((a, b) => a.path.length - b.path.length);
833
+ const issues = [...error$39.issues].sort((a, b) => a.path.length - b.path.length);
823
834
  for (const issue$1 of issues) {
824
835
  lines.push(`✖ ${issue$1.message}`);
825
836
  if (issue$1.path?.length) lines.push(` → at ${toDotPath(issue$1.path)}`);
@@ -828,7 +839,7 @@ function prettifyError(error$37) {
828
839
  }
829
840
 
830
841
  //#endregion
831
- //#region ../../node_modules/zod/dist/esm/v4/core/parse.js
842
+ //#region ../../node_modules/zod/v4/core/parse.js
832
843
  const _parse = (_Err) => (schema, value, _ctx, _params) => {
833
844
  const ctx = _ctx ? Object.assign(_ctx, { async: false }) : { async: false };
834
845
  const result = schema._zod.run({
@@ -840,7 +851,7 @@ const _parse = (_Err) => (schema, value, _ctx, _params) => {
840
851
  }
841
852
  if (result.issues.length) {
842
853
  const e = new (_params?.Err ?? _Err)(result.issues.map((iss) => finalizeIssue(iss, ctx, config())));
843
- Error.captureStackTrace(e, _params?.callee);
854
+ captureStackTrace(e, _params?.callee);
844
855
  throw e;
845
856
  }
846
857
  return result.value;
@@ -855,7 +866,7 @@ const _parseAsync = (_Err) => async (schema, value, _ctx, params) => {
855
866
  if (result instanceof Promise) result = await result;
856
867
  if (result.issues.length) {
857
868
  const e = new (params?.Err ?? _Err)(result.issues.map((iss) => finalizeIssue(iss, ctx, config())));
858
- Error.captureStackTrace(e, params?.callee);
869
+ captureStackTrace(e, params?.callee);
859
870
  throw e;
860
871
  }
861
872
  return result.value;
@@ -900,10 +911,9 @@ const _safeParseAsync = (_Err) => async (schema, value, _ctx) => {
900
911
  const safeParseAsync$1 = /* @__PURE__ */ _safeParseAsync($ZodRealError);
901
912
 
902
913
  //#endregion
903
- //#region ../../node_modules/zod/dist/esm/v4/core/regexes.js
914
+ //#region ../../node_modules/zod/v4/core/regexes.js
904
915
  var regexes_exports = {};
905
916
  __export(regexes_exports, {
906
- _emoji: () => _emoji$1,
907
917
  base64: () => base64$1,
908
918
  base64url: () => base64url$1,
909
919
  bigint: () => bigint$2,
@@ -989,27 +999,23 @@ const base64url$1 = /^[A-Za-z0-9_-]*$/;
989
999
  const hostname = /^([a-zA-Z0-9-]+\.)*[a-zA-Z0-9-]+$/;
990
1000
  const domain = /^([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$/;
991
1001
  const e164$1 = /^\+(?:[0-9]){6,14}[0-9]$/;
992
- 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])))`;
1002
+ 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])))`;
993
1003
  const date$3 = /* @__PURE__ */ new RegExp(`^${dateSource}$`);
994
1004
  function timeSource(args) {
995
- let regex = `([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d`;
996
- if (args.precision) {
997
- regex = `${regex}\\.\\d{${args.precision}}`;
998
- } else if (args.precision == null) {
999
- regex = `${regex}(\\.\\d+)?`;
1000
- }
1005
+ const hhmm = `(?:[01]\\d|2[0-3]):[0-5]\\d`;
1006
+ 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+)?)?`;
1001
1007
  return regex;
1002
1008
  }
1003
1009
  function time$1(args) {
1004
1010
  return new RegExp(`^${timeSource(args)}$`);
1005
1011
  }
1006
1012
  function datetime$1(args) {
1007
- let regex = `${dateSource}T${timeSource(args)}`;
1008
- const opts = [];
1009
- opts.push(args.local ? `Z?` : `Z`);
1010
- if (args.offset) opts.push(`([+-]\\d{2}:?\\d{2})`);
1011
- regex = `${regex}(${opts.join("|")})`;
1012
- return new RegExp(`^${regex}$`);
1013
+ const time$2 = timeSource({ precision: args.precision });
1014
+ const opts = ["Z"];
1015
+ if (args.local) opts.push("");
1016
+ if (args.offset) opts.push(`([+-]\\d{2}:\\d{2})`);
1017
+ const timeRegex = `${time$2}(?:${opts.join("|")})`;
1018
+ return new RegExp(`^${dateSource}T(?:${timeRegex})$`);
1013
1019
  }
1014
1020
  const string$2 = (params) => {
1015
1021
  const regex = params ? `[\\s\\S]{${params?.minimum ?? 0},${params?.maximum ?? ""}}` : `[\\s\\S]*`;
@@ -1025,7 +1031,7 @@ const lowercase = /^[^A-Z]*$/;
1025
1031
  const uppercase = /^[^a-z]*$/;
1026
1032
 
1027
1033
  //#endregion
1028
- //#region ../../node_modules/zod/dist/esm/v4/core/checks.js
1034
+ //#region ../../node_modules/zod/v4/core/checks.js
1029
1035
  const $ZodCheck = /* @__PURE__ */ $constructor("$ZodCheck", (inst, def) => {
1030
1036
  var _a;
1031
1037
  inst._zod ?? (inst._zod = {});
@@ -1216,11 +1222,12 @@ const $ZodCheckBigIntFormat = /* @__PURE__ */ $constructor("$ZodCheckBigIntForma
1216
1222
  };
1217
1223
  });
1218
1224
  const $ZodCheckMaxSize = /* @__PURE__ */ $constructor("$ZodCheckMaxSize", (inst, def) => {
1225
+ var _a;
1219
1226
  $ZodCheck.init(inst, def);
1220
- inst._zod.when = (payload) => {
1227
+ (_a = inst._zod.def).when ?? (_a.when = (payload) => {
1221
1228
  const val = payload.value;
1222
1229
  return !nullish$1(val) && val.size !== undefined;
1223
- };
1230
+ });
1224
1231
  inst._zod.onattach.push((inst$1) => {
1225
1232
  const curr = inst$1._zod.bag.maximum ?? Number.POSITIVE_INFINITY;
1226
1233
  if (def.maximum < curr) inst$1._zod.bag.maximum = def.maximum;
@@ -1240,11 +1247,12 @@ const $ZodCheckMaxSize = /* @__PURE__ */ $constructor("$ZodCheckMaxSize", (inst,
1240
1247
  };
1241
1248
  });
1242
1249
  const $ZodCheckMinSize = /* @__PURE__ */ $constructor("$ZodCheckMinSize", (inst, def) => {
1250
+ var _a;
1243
1251
  $ZodCheck.init(inst, def);
1244
- inst._zod.when = (payload) => {
1252
+ (_a = inst._zod.def).when ?? (_a.when = (payload) => {
1245
1253
  const val = payload.value;
1246
1254
  return !nullish$1(val) && val.size !== undefined;
1247
- };
1255
+ });
1248
1256
  inst._zod.onattach.push((inst$1) => {
1249
1257
  const curr = inst$1._zod.bag.minimum ?? Number.NEGATIVE_INFINITY;
1250
1258
  if (def.minimum > curr) inst$1._zod.bag.minimum = def.minimum;
@@ -1264,11 +1272,12 @@ const $ZodCheckMinSize = /* @__PURE__ */ $constructor("$ZodCheckMinSize", (inst,
1264
1272
  };
1265
1273
  });
1266
1274
  const $ZodCheckSizeEquals = /* @__PURE__ */ $constructor("$ZodCheckSizeEquals", (inst, def) => {
1275
+ var _a;
1267
1276
  $ZodCheck.init(inst, def);
1268
- inst._zod.when = (payload) => {
1277
+ (_a = inst._zod.def).when ?? (_a.when = (payload) => {
1269
1278
  const val = payload.value;
1270
1279
  return !nullish$1(val) && val.size !== undefined;
1271
- };
1280
+ });
1272
1281
  inst._zod.onattach.push((inst$1) => {
1273
1282
  const bag = inst$1._zod.bag;
1274
1283
  bag.minimum = def.size;
@@ -1289,6 +1298,8 @@ const $ZodCheckSizeEquals = /* @__PURE__ */ $constructor("$ZodCheckSizeEquals",
1289
1298
  code: "too_small",
1290
1299
  minimum: def.size
1291
1300
  },
1301
+ inclusive: true,
1302
+ exact: true,
1292
1303
  input: payload.value,
1293
1304
  inst,
1294
1305
  continue: !def.abort
@@ -1296,11 +1307,12 @@ const $ZodCheckSizeEquals = /* @__PURE__ */ $constructor("$ZodCheckSizeEquals",
1296
1307
  };
1297
1308
  });
1298
1309
  const $ZodCheckMaxLength = /* @__PURE__ */ $constructor("$ZodCheckMaxLength", (inst, def) => {
1310
+ var _a;
1299
1311
  $ZodCheck.init(inst, def);
1300
- inst._zod.when = (payload) => {
1312
+ (_a = inst._zod.def).when ?? (_a.when = (payload) => {
1301
1313
  const val = payload.value;
1302
1314
  return !nullish$1(val) && val.length !== undefined;
1303
- };
1315
+ });
1304
1316
  inst._zod.onattach.push((inst$1) => {
1305
1317
  const curr = inst$1._zod.bag.maximum ?? Number.POSITIVE_INFINITY;
1306
1318
  if (def.maximum < curr) inst$1._zod.bag.maximum = def.maximum;
@@ -1322,11 +1334,12 @@ const $ZodCheckMaxLength = /* @__PURE__ */ $constructor("$ZodCheckMaxLength", (i
1322
1334
  };
1323
1335
  });
1324
1336
  const $ZodCheckMinLength = /* @__PURE__ */ $constructor("$ZodCheckMinLength", (inst, def) => {
1337
+ var _a;
1325
1338
  $ZodCheck.init(inst, def);
1326
- inst._zod.when = (payload) => {
1339
+ (_a = inst._zod.def).when ?? (_a.when = (payload) => {
1327
1340
  const val = payload.value;
1328
1341
  return !nullish$1(val) && val.length !== undefined;
1329
- };
1342
+ });
1330
1343
  inst._zod.onattach.push((inst$1) => {
1331
1344
  const curr = inst$1._zod.bag.minimum ?? Number.NEGATIVE_INFINITY;
1332
1345
  if (def.minimum > curr) inst$1._zod.bag.minimum = def.minimum;
@@ -1348,11 +1361,12 @@ const $ZodCheckMinLength = /* @__PURE__ */ $constructor("$ZodCheckMinLength", (i
1348
1361
  };
1349
1362
  });
1350
1363
  const $ZodCheckLengthEquals = /* @__PURE__ */ $constructor("$ZodCheckLengthEquals", (inst, def) => {
1364
+ var _a;
1351
1365
  $ZodCheck.init(inst, def);
1352
- inst._zod.when = (payload) => {
1366
+ (_a = inst._zod.def).when ?? (_a.when = (payload) => {
1353
1367
  const val = payload.value;
1354
1368
  return !nullish$1(val) && val.length !== undefined;
1355
- };
1369
+ });
1356
1370
  inst._zod.onattach.push((inst$1) => {
1357
1371
  const bag = inst$1._zod.bag;
1358
1372
  bag.minimum = def.length;
@@ -1374,6 +1388,8 @@ const $ZodCheckLengthEquals = /* @__PURE__ */ $constructor("$ZodCheckLengthEqual
1374
1388
  code: "too_small",
1375
1389
  minimum: def.length
1376
1390
  },
1391
+ inclusive: true,
1392
+ exact: true,
1377
1393
  input: payload.value,
1378
1394
  inst,
1379
1395
  continue: !def.abort
@@ -1381,7 +1397,7 @@ const $ZodCheckLengthEquals = /* @__PURE__ */ $constructor("$ZodCheckLengthEqual
1381
1397
  };
1382
1398
  });
1383
1399
  const $ZodCheckStringFormat = /* @__PURE__ */ $constructor("$ZodCheckStringFormat", (inst, def) => {
1384
- var _a;
1400
+ var _a, _b;
1385
1401
  $ZodCheck.init(inst, def);
1386
1402
  inst._zod.onattach.push((inst$1) => {
1387
1403
  const bag = inst$1._zod.bag;
@@ -1391,8 +1407,7 @@ const $ZodCheckStringFormat = /* @__PURE__ */ $constructor("$ZodCheckStringForma
1391
1407
  bag.patterns.add(def.pattern);
1392
1408
  }
1393
1409
  });
1394
- (_a = inst._zod).check ?? (_a.check = (payload) => {
1395
- if (!def.pattern) throw new Error("Not implemented.");
1410
+ if (def.pattern) (_a = inst._zod).check ?? (_a.check = (payload) => {
1396
1411
  def.pattern.lastIndex = 0;
1397
1412
  if (def.pattern.test(payload.value)) return;
1398
1413
  payload.issues.push({
@@ -1405,6 +1420,7 @@ const $ZodCheckStringFormat = /* @__PURE__ */ $constructor("$ZodCheckStringForma
1405
1420
  continue: !def.abort
1406
1421
  });
1407
1422
  });
1423
+ else (_b = inst._zod).check ?? (_b.check = () => {});
1408
1424
  });
1409
1425
  const $ZodCheckRegex = /* @__PURE__ */ $constructor("$ZodCheckRegex", (inst, def) => {
1410
1426
  $ZodCheckStringFormat.init(inst, def);
@@ -1528,7 +1544,6 @@ const $ZodCheckMimeType = /* @__PURE__ */ $constructor("$ZodCheckMimeType", (ins
1528
1544
  code: "invalid_value",
1529
1545
  values: def.mime,
1530
1546
  input: payload.value.type,
1531
- path: ["type"],
1532
1547
  inst
1533
1548
  });
1534
1549
  };
@@ -1541,7 +1556,7 @@ const $ZodCheckOverwrite = /* @__PURE__ */ $constructor("$ZodCheckOverwrite", (i
1541
1556
  });
1542
1557
 
1543
1558
  //#endregion
1544
- //#region ../../node_modules/zod/dist/esm/v4/core/doc.js
1559
+ //#region ../../node_modules/zod/v4/core/doc.js
1545
1560
  var Doc = class {
1546
1561
  constructor(args = []) {
1547
1562
  this.content = [];
@@ -1577,19 +1592,18 @@ var Doc = class {
1577
1592
  };
1578
1593
 
1579
1594
  //#endregion
1580
- //#region ../../node_modules/zod/dist/esm/v4/core/versions.js
1595
+ //#region ../../node_modules/zod/v4/core/versions.js
1581
1596
  const version = {
1582
1597
  major: 4,
1583
1598
  minor: 0,
1584
- patch: 0
1599
+ patch: 2
1585
1600
  };
1586
1601
 
1587
1602
  //#endregion
1588
- //#region ../../node_modules/zod/dist/esm/v4/core/schemas.js
1603
+ //#region ../../node_modules/zod/v4/core/schemas.js
1589
1604
  const $ZodType = /* @__PURE__ */ $constructor("$ZodType", (inst, def) => {
1590
1605
  var _a;
1591
1606
  inst ?? (inst = {});
1592
- inst._zod.id = def.type + "_" + randomString(10);
1593
1607
  inst._zod.def = def;
1594
1608
  inst._zod.bag = inst._zod.bag || {};
1595
1609
  inst._zod.version = version;
@@ -1612,13 +1626,11 @@ const $ZodType = /* @__PURE__ */ $constructor("$ZodType", (inst, def) => {
1612
1626
  let isAborted = aborted(payload);
1613
1627
  let asyncResult;
1614
1628
  for (const ch of checks$1) {
1615
- if (ch._zod.when) {
1616
- const shouldRun = ch._zod.when(payload);
1629
+ if (ch._zod.def.when) {
1630
+ const shouldRun = ch._zod.def.when(payload);
1617
1631
  if (!shouldRun) continue;
1618
- } else {
1619
- if (isAborted) {
1620
- continue;
1621
- }
1632
+ } else if (isAborted) {
1633
+ continue;
1622
1634
  }
1623
1635
  const currLen = payload.issues.length;
1624
1636
  const _ = ch._zod.check(payload);
@@ -1718,7 +1730,9 @@ const $ZodURL = /* @__PURE__ */ $constructor("$ZodURL", (inst, def) => {
1718
1730
  $ZodStringFormat.init(inst, def);
1719
1731
  inst._zod.check = (payload) => {
1720
1732
  try {
1721
- const url$1 = new URL(payload.value);
1733
+ const orig = payload.value;
1734
+ const url$1 = new URL(orig);
1735
+ const href = url$1.href;
1722
1736
  if (def.hostname) {
1723
1737
  def.hostname.lastIndex = 0;
1724
1738
  if (!def.hostname.test(url$1.hostname)) {
@@ -1747,6 +1761,11 @@ const $ZodURL = /* @__PURE__ */ $constructor("$ZodURL", (inst, def) => {
1747
1761
  });
1748
1762
  }
1749
1763
  }
1764
+ if (!orig.endsWith("/") && href.endsWith("/")) {
1765
+ payload.value = href.slice(0, -1);
1766
+ } else {
1767
+ payload.value = href;
1768
+ }
1750
1769
  return;
1751
1770
  } catch (_) {
1752
1771
  payload.issues.push({
@@ -1917,6 +1936,7 @@ function isValidJWT(token, algorithm = null) {
1917
1936
  const tokensParts = token.split(".");
1918
1937
  if (tokensParts.length !== 3) return false;
1919
1938
  const [header] = tokensParts;
1939
+ if (!header) return false;
1920
1940
  const parsedHeader = JSON.parse(atob(header));
1921
1941
  if ("typ" in parsedHeader && parsedHeader?.typ !== "JWT") return false;
1922
1942
  if (!parsedHeader.alg) return false;
@@ -1939,6 +1959,19 @@ const $ZodJWT = /* @__PURE__ */ $constructor("$ZodJWT", (inst, def) => {
1939
1959
  });
1940
1960
  };
1941
1961
  });
1962
+ const $ZodCustomStringFormat = /* @__PURE__ */ $constructor("$ZodCustomStringFormat", (inst, def) => {
1963
+ $ZodStringFormat.init(inst, def);
1964
+ inst._zod.check = (payload) => {
1965
+ if (def.fn(payload.value)) return;
1966
+ payload.issues.push({
1967
+ code: "invalid_format",
1968
+ format: def.format,
1969
+ input: payload.value,
1970
+ inst,
1971
+ continue: !def.abort
1972
+ });
1973
+ };
1974
+ });
1942
1975
  const $ZodNumber = /* @__PURE__ */ $constructor("$ZodNumber", (inst, def) => {
1943
1976
  $ZodType.init(inst, def);
1944
1977
  inst._zod.pattern = inst._zod.bag.pattern ?? number$2;
@@ -1990,12 +2023,11 @@ const $ZodBigInt = /* @__PURE__ */ $constructor("$ZodBigInt", (inst, def) => {
1990
2023
  if (def.coerce) try {
1991
2024
  payload.value = BigInt(payload.value);
1992
2025
  } catch (_) {}
1993
- const { value: input } = payload;
1994
- if (typeof input === "bigint") return payload;
2026
+ if (typeof payload.value === "bigint") return payload;
1995
2027
  payload.issues.push({
1996
2028
  expected: "bigint",
1997
2029
  code: "invalid_type",
1998
- input,
2030
+ input: payload.value,
1999
2031
  inst
2000
2032
  });
2001
2033
  return payload;
@@ -2008,7 +2040,7 @@ const $ZodBigIntFormat = /* @__PURE__ */ $constructor("$ZodBigInt", (inst, def)
2008
2040
  const $ZodSymbol = /* @__PURE__ */ $constructor("$ZodSymbol", (inst, def) => {
2009
2041
  $ZodType.init(inst, def);
2010
2042
  inst._zod.parse = (payload, _ctx) => {
2011
- const { value: input } = payload;
2043
+ const input = payload.value;
2012
2044
  if (typeof input === "symbol") return payload;
2013
2045
  payload.issues.push({
2014
2046
  expected: "symbol",
@@ -2023,8 +2055,10 @@ const $ZodUndefined = /* @__PURE__ */ $constructor("$ZodUndefined", (inst, def)
2023
2055
  $ZodType.init(inst, def);
2024
2056
  inst._zod.pattern = _undefined$2;
2025
2057
  inst._zod.values = new Set([undefined]);
2058
+ inst._zod.optin = "optional";
2059
+ inst._zod.optout = "optional";
2026
2060
  inst._zod.parse = (payload, _ctx) => {
2027
- const { value: input } = payload;
2061
+ const input = payload.value;
2028
2062
  if (typeof input === "undefined") return payload;
2029
2063
  payload.issues.push({
2030
2064
  expected: "undefined",
@@ -2040,7 +2074,7 @@ const $ZodNull = /* @__PURE__ */ $constructor("$ZodNull", (inst, def) => {
2040
2074
  inst._zod.pattern = _null$2;
2041
2075
  inst._zod.values = new Set([null]);
2042
2076
  inst._zod.parse = (payload, _ctx) => {
2043
- const { value: input } = payload;
2077
+ const input = payload.value;
2044
2078
  if (input === null) return payload;
2045
2079
  payload.issues.push({
2046
2080
  expected: "null",
@@ -2074,7 +2108,7 @@ const $ZodNever = /* @__PURE__ */ $constructor("$ZodNever", (inst, def) => {
2074
2108
  const $ZodVoid = /* @__PURE__ */ $constructor("$ZodVoid", (inst, def) => {
2075
2109
  $ZodType.init(inst, def);
2076
2110
  inst._zod.parse = (payload, _ctx) => {
2077
- const { value: input } = payload;
2111
+ const input = payload.value;
2078
2112
  if (typeof input === "undefined") return payload;
2079
2113
  payload.issues.push({
2080
2114
  expected: "void",
@@ -2205,19 +2239,20 @@ const $ZodObject = /* @__PURE__ */ $constructor("$ZodObject", (inst, def) => {
2205
2239
  "payload",
2206
2240
  "ctx"
2207
2241
  ]);
2208
- const { keys, optionalKeys: optionalKeys$1 } = _normalized.value;
2242
+ const normalized = _normalized.value;
2209
2243
  const parseStr = (key) => {
2210
2244
  const k = esc(key);
2211
2245
  return `shape[${k}]._zod.run({ value: input[${k}], issues: [] }, ctx)`;
2212
2246
  };
2213
2247
  doc.write(`const input = payload.value;`);
2214
2248
  const ids = Object.create(null);
2215
- for (const key of keys) {
2216
- ids[key] = randomString(15);
2249
+ let counter = 0;
2250
+ for (const key of normalized.keys) {
2251
+ ids[key] = `key_${counter++}`;
2217
2252
  }
2218
2253
  doc.write(`const newResult = {}`);
2219
- for (const key of keys) {
2220
- if (optionalKeys$1.has(key)) {
2254
+ for (const key of normalized.keys) {
2255
+ if (normalized.optionalKeys.has(key)) {
2221
2256
  const id = ids[key];
2222
2257
  doc.write(`const ${id} = ${parseStr(key)};`);
2223
2258
  const k = esc(key);
@@ -2262,7 +2297,7 @@ const $ZodObject = /* @__PURE__ */ $constructor("$ZodObject", (inst, def) => {
2262
2297
  const jit = !globalConfig.jitless;
2263
2298
  const allowsEval$1 = allowsEval;
2264
2299
  const fastEnabled = jit && allowsEval$1.value;
2265
- const { catchall } = def;
2300
+ const catchall = def.catchall;
2266
2301
  let value;
2267
2302
  inst._zod.parse = (payload, ctx) => {
2268
2303
  value ?? (value = _normalized.value);
@@ -2292,12 +2327,10 @@ const $ZodObject = /* @__PURE__ */ $constructor("$ZodObject", (inst, def) => {
2292
2327
  const isOptional = el._zod.optin === "optional" && el._zod.optout === "optional";
2293
2328
  if (r instanceof Promise) {
2294
2329
  proms.push(r.then((r$1) => isOptional ? handleOptionalObjectResult(r$1, payload, key, input) : handleObjectResult(r$1, payload, key)));
2330
+ } else if (isOptional) {
2331
+ handleOptionalObjectResult(r, payload, key, input);
2295
2332
  } else {
2296
- if (isOptional) {
2297
- handleOptionalObjectResult(r, payload, key, input);
2298
- } else {
2299
- handleObjectResult(r, payload, key);
2300
- }
2333
+ handleObjectResult(r, payload, key);
2301
2334
  }
2302
2335
  }
2303
2336
  }
@@ -2355,6 +2388,8 @@ function handleUnionResults(results, final, inst, ctx) {
2355
2388
  }
2356
2389
  const $ZodUnion = /* @__PURE__ */ $constructor("$ZodUnion", (inst, def) => {
2357
2390
  $ZodType.init(inst, def);
2391
+ defineLazy(inst._zod, "optin", () => def.options.some((o) => o._zod.optin === "optional") ? "optional" : undefined);
2392
+ defineLazy(inst._zod, "optout", () => def.options.some((o) => o._zod.optout === "optional") ? "optional" : undefined);
2358
2393
  defineLazy(inst._zod, "values", () => {
2359
2394
  if (def.options.every((o) => o._zod.values)) {
2360
2395
  return new Set(def.options.flatMap((option) => Array.from(option._zod.values)));
@@ -2454,7 +2489,7 @@ const $ZodDiscriminatedUnion = /* @__PURE__ */ $constructor("$ZodDiscriminatedUn
2454
2489
  const $ZodIntersection = /* @__PURE__ */ $constructor("$ZodIntersection", (inst, def) => {
2455
2490
  $ZodType.init(inst, def);
2456
2491
  inst._zod.parse = (payload, ctx) => {
2457
- const { value: input } = payload;
2492
+ const input = payload.value;
2458
2493
  const left = def.left._zod.run({
2459
2494
  value: input,
2460
2495
  issues: []
@@ -2911,6 +2946,9 @@ const $ZodOptional = /* @__PURE__ */ $constructor("$ZodOptional", (inst, def) =>
2911
2946
  return pattern ? new RegExp(`^(${cleanRegex(pattern.source)})?$`) : undefined;
2912
2947
  });
2913
2948
  inst._zod.parse = (payload, ctx) => {
2949
+ if (def.innerType._zod.optin === "optional") {
2950
+ return def.innerType._zod.run(payload, ctx);
2951
+ }
2914
2952
  if (payload.value === undefined) {
2915
2953
  return payload;
2916
2954
  }
@@ -3010,7 +3048,7 @@ const $ZodSuccess = /* @__PURE__ */ $constructor("$ZodSuccess", (inst, def) => {
3010
3048
  });
3011
3049
  const $ZodCatch = /* @__PURE__ */ $constructor("$ZodCatch", (inst, def) => {
3012
3050
  $ZodType.init(inst, def);
3013
- defineLazy(inst._zod, "optin", () => def.innerType._zod.optin);
3051
+ inst._zod.optin = "optional";
3014
3052
  defineLazy(inst._zod, "optout", () => def.innerType._zod.optout);
3015
3053
  defineLazy(inst._zod, "values", () => def.innerType._zod.values);
3016
3054
  inst._zod.parse = (payload, ctx) => {
@@ -3081,6 +3119,7 @@ function handlePipeResult(left, def, ctx) {
3081
3119
  const $ZodReadonly = /* @__PURE__ */ $constructor("$ZodReadonly", (inst, def) => {
3082
3120
  $ZodType.init(inst, def);
3083
3121
  defineLazy(inst._zod, "propValues", () => def.innerType._zod.propValues);
3122
+ defineLazy(inst._zod, "values", () => def.innerType._zod.values);
3084
3123
  defineLazy(inst._zod, "optin", () => def.innerType._zod.optin);
3085
3124
  defineLazy(inst._zod, "optout", () => def.innerType._zod.optout);
3086
3125
  inst._zod.parse = (payload, ctx) => {
@@ -3131,7 +3170,7 @@ const $ZodTemplateLiteral = /* @__PURE__ */ $constructor("$ZodTemplateLiteral",
3131
3170
  input: payload.value,
3132
3171
  inst,
3133
3172
  code: "invalid_format",
3134
- format: "template_literal",
3173
+ format: def.format ?? "template_literal",
3135
3174
  pattern: inst._zod.pattern.source
3136
3175
  });
3137
3176
  return payload;
@@ -3191,8 +3230,8 @@ function handleRefineResult(result, payload, input, inst) {
3191
3230
  }
3192
3231
 
3193
3232
  //#endregion
3194
- //#region ../../node_modules/zod/dist/esm/v4/locales/ar.js
3195
- const error$36 = () => {
3233
+ //#region ../../node_modules/zod/v4/locales/ar.js
3234
+ const error$38 = () => {
3196
3235
  const Sizable = {
3197
3236
  string: {
3198
3237
  unit: "حرف",
@@ -3214,7 +3253,7 @@ const error$36 = () => {
3214
3253
  function getSizing(origin) {
3215
3254
  return Sizable[origin] ?? null;
3216
3255
  }
3217
- const parsedType$2 = (data) => {
3256
+ const parsedType$3 = (data) => {
3218
3257
  const t = typeof data;
3219
3258
  switch (t) {
3220
3259
  case "number": {
@@ -3266,7 +3305,7 @@ const error$36 = () => {
3266
3305
  };
3267
3306
  return (issue$1) => {
3268
3307
  switch (issue$1.code) {
3269
- case "invalid_type": return `مدخلات غير مقبولة: يفترض إدخال ${issue$1.expected}، ولكن تم إدخال ${parsedType$2(issue$1.input)}`;
3308
+ case "invalid_type": return `مدخلات غير مقبولة: يفترض إدخال ${issue$1.expected}، ولكن تم إدخال ${parsedType$3(issue$1.input)}`;
3270
3309
  case "invalid_value":
3271
3310
  if (issue$1.values.length === 1) return `مدخلات غير مقبولة: يفترض إدخال ${stringifyPrimitive(issue$1.values[0])}`;
3272
3311
  return `اختيار غير مقبول: يتوقع انتقاء أحد هذه الخيارات: ${joinValues(issue$1.values, "|")}`;
@@ -3302,12 +3341,12 @@ const error$36 = () => {
3302
3341
  };
3303
3342
  };
3304
3343
  function ar_default() {
3305
- return { localeError: error$36() };
3344
+ return { localeError: error$38() };
3306
3345
  }
3307
3346
 
3308
3347
  //#endregion
3309
- //#region ../../node_modules/zod/dist/esm/v4/locales/az.js
3310
- const error$35 = () => {
3348
+ //#region ../../node_modules/zod/v4/locales/az.js
3349
+ const error$37 = () => {
3311
3350
  const Sizable = {
3312
3351
  string: {
3313
3352
  unit: "simvol",
@@ -3329,7 +3368,7 @@ const error$35 = () => {
3329
3368
  function getSizing(origin) {
3330
3369
  return Sizable[origin] ?? null;
3331
3370
  }
3332
- const parsedType$2 = (data) => {
3371
+ const parsedType$3 = (data) => {
3333
3372
  const t = typeof data;
3334
3373
  switch (t) {
3335
3374
  case "number": {
@@ -3381,7 +3420,7 @@ const error$35 = () => {
3381
3420
  };
3382
3421
  return (issue$1) => {
3383
3422
  switch (issue$1.code) {
3384
- case "invalid_type": return `Yanlış dəyər: gözlənilən ${issue$1.expected}, daxil olan ${parsedType$2(issue$1.input)}`;
3423
+ case "invalid_type": return `Yanlış dəyər: gözlənilən ${issue$1.expected}, daxil olan ${parsedType$3(issue$1.input)}`;
3385
3424
  case "invalid_value":
3386
3425
  if (issue$1.values.length === 1) return `Yanlış dəyər: gözlənilən ${stringifyPrimitive(issue$1.values[0])}`;
3387
3426
  return `Yanlış seçim: aşağıdakılardan biri olmalıdır: ${joinValues(issue$1.values, "|")}`;
@@ -3415,11 +3454,11 @@ const error$35 = () => {
3415
3454
  };
3416
3455
  };
3417
3456
  function az_default() {
3418
- return { localeError: error$35() };
3457
+ return { localeError: error$37() };
3419
3458
  }
3420
3459
 
3421
3460
  //#endregion
3422
- //#region ../../node_modules/zod/dist/esm/v4/locales/be.js
3461
+ //#region ../../node_modules/zod/v4/locales/be.js
3423
3462
  function getBelarusianPlural(count, one, few, many) {
3424
3463
  const absCount = Math.abs(count);
3425
3464
  const lastDigit = absCount % 10;
@@ -3435,7 +3474,7 @@ function getBelarusianPlural(count, one, few, many) {
3435
3474
  }
3436
3475
  return many;
3437
3476
  }
3438
- const error$34 = () => {
3477
+ const error$36 = () => {
3439
3478
  const Sizable = {
3440
3479
  string: {
3441
3480
  unit: {
@@ -3473,7 +3512,7 @@ const error$34 = () => {
3473
3512
  function getSizing(origin) {
3474
3513
  return Sizable[origin] ?? null;
3475
3514
  }
3476
- const parsedType$2 = (data) => {
3515
+ const parsedType$3 = (data) => {
3477
3516
  const t = typeof data;
3478
3517
  switch (t) {
3479
3518
  case "number": {
@@ -3525,7 +3564,7 @@ const error$34 = () => {
3525
3564
  };
3526
3565
  return (issue$1) => {
3527
3566
  switch (issue$1.code) {
3528
- case "invalid_type": return `Няправільны ўвод: чакаўся ${issue$1.expected}, атрымана ${parsedType$2(issue$1.input)}`;
3567
+ case "invalid_type": return `Няправільны ўвод: чакаўся ${issue$1.expected}, атрымана ${parsedType$3(issue$1.input)}`;
3529
3568
  case "invalid_value":
3530
3569
  if (issue$1.values.length === 1) return `Няправільны ўвод: чакалася ${stringifyPrimitive(issue$1.values[0])}`;
3531
3570
  return `Няправільны варыянт: чакаўся адзін з ${joinValues(issue$1.values, "|")}`;
@@ -3567,12 +3606,12 @@ const error$34 = () => {
3567
3606
  };
3568
3607
  };
3569
3608
  function be_default() {
3570
- return { localeError: error$34() };
3609
+ return { localeError: error$36() };
3571
3610
  }
3572
3611
 
3573
3612
  //#endregion
3574
- //#region ../../node_modules/zod/dist/esm/v4/locales/ca.js
3575
- const error$33 = () => {
3613
+ //#region ../../node_modules/zod/v4/locales/ca.js
3614
+ const error$35 = () => {
3576
3615
  const Sizable = {
3577
3616
  string: {
3578
3617
  unit: "caràcters",
@@ -3594,7 +3633,7 @@ const error$33 = () => {
3594
3633
  function getSizing(origin) {
3595
3634
  return Sizable[origin] ?? null;
3596
3635
  }
3597
- const parsedType$2 = (data) => {
3636
+ const parsedType$3 = (data) => {
3598
3637
  const t = typeof data;
3599
3638
  switch (t) {
3600
3639
  case "number": {
@@ -3646,7 +3685,7 @@ const error$33 = () => {
3646
3685
  };
3647
3686
  return (issue$1) => {
3648
3687
  switch (issue$1.code) {
3649
- case "invalid_type": return `Tipus invàlid: s'esperava ${issue$1.expected}, s'ha rebut ${parsedType$2(issue$1.input)}`;
3688
+ case "invalid_type": return `Tipus invàlid: s'esperava ${issue$1.expected}, s'ha rebut ${parsedType$3(issue$1.input)}`;
3650
3689
  case "invalid_value":
3651
3690
  if (issue$1.values.length === 1) return `Valor invàlid: s'esperava ${stringifyPrimitive(issue$1.values[0])}`;
3652
3691
  return `Opció invàlida: s'esperava una de ${joinValues(issue$1.values, " o ")}`;
@@ -3684,12 +3723,12 @@ const error$33 = () => {
3684
3723
  };
3685
3724
  };
3686
3725
  function ca_default() {
3687
- return { localeError: error$33() };
3726
+ return { localeError: error$35() };
3688
3727
  }
3689
3728
 
3690
3729
  //#endregion
3691
- //#region ../../node_modules/zod/dist/esm/v4/locales/cs.js
3692
- const error$32 = () => {
3730
+ //#region ../../node_modules/zod/v4/locales/cs.js
3731
+ const error$34 = () => {
3693
3732
  const Sizable = {
3694
3733
  string: {
3695
3734
  unit: "znaků",
@@ -3711,7 +3750,7 @@ const error$32 = () => {
3711
3750
  function getSizing(origin) {
3712
3751
  return Sizable[origin] ?? null;
3713
3752
  }
3714
- const parsedType$2 = (data) => {
3753
+ const parsedType$3 = (data) => {
3715
3754
  const t = typeof data;
3716
3755
  switch (t) {
3717
3756
  case "number": {
@@ -3781,7 +3820,7 @@ const error$32 = () => {
3781
3820
  };
3782
3821
  return (issue$1) => {
3783
3822
  switch (issue$1.code) {
3784
- case "invalid_type": return `Neplatný vstup: očekáváno ${issue$1.expected}, obdrženo ${parsedType$2(issue$1.input)}`;
3823
+ case "invalid_type": return `Neplatný vstup: očekáváno ${issue$1.expected}, obdrženo ${parsedType$3(issue$1.input)}`;
3785
3824
  case "invalid_value":
3786
3825
  if (issue$1.values.length === 1) return `Neplatný vstup: očekáváno ${stringifyPrimitive(issue$1.values[0])}`;
3787
3826
  return `Neplatná možnost: očekávána jedna z hodnot ${joinValues(issue$1.values, "|")}`;
@@ -3819,12 +3858,12 @@ const error$32 = () => {
3819
3858
  };
3820
3859
  };
3821
3860
  function cs_default() {
3822
- return { localeError: error$32() };
3861
+ return { localeError: error$34() };
3823
3862
  }
3824
3863
 
3825
3864
  //#endregion
3826
- //#region ../../node_modules/zod/dist/esm/v4/locales/de.js
3827
- const error$31 = () => {
3865
+ //#region ../../node_modules/zod/v4/locales/de.js
3866
+ const error$33 = () => {
3828
3867
  const Sizable = {
3829
3868
  string: {
3830
3869
  unit: "Zeichen",
@@ -3846,7 +3885,7 @@ const error$31 = () => {
3846
3885
  function getSizing(origin) {
3847
3886
  return Sizable[origin] ?? null;
3848
3887
  }
3849
- const parsedType$2 = (data) => {
3888
+ const parsedType$3 = (data) => {
3850
3889
  const t = typeof data;
3851
3890
  switch (t) {
3852
3891
  case "number": {
@@ -3898,7 +3937,7 @@ const error$31 = () => {
3898
3937
  };
3899
3938
  return (issue$1) => {
3900
3939
  switch (issue$1.code) {
3901
- case "invalid_type": return `Ungültige Eingabe: erwartet ${issue$1.expected}, erhalten ${parsedType$2(issue$1.input)}`;
3940
+ case "invalid_type": return `Ungültige Eingabe: erwartet ${issue$1.expected}, erhalten ${parsedType$3(issue$1.input)}`;
3902
3941
  case "invalid_value":
3903
3942
  if (issue$1.values.length === 1) return `Ungültige Eingabe: erwartet ${stringifyPrimitive(issue$1.values[0])}`;
3904
3943
  return `Ungültige Option: erwartet eine von ${joinValues(issue$1.values, "|")}`;
@@ -3934,12 +3973,12 @@ const error$31 = () => {
3934
3973
  };
3935
3974
  };
3936
3975
  function de_default() {
3937
- return { localeError: error$31() };
3976
+ return { localeError: error$33() };
3938
3977
  }
3939
3978
 
3940
3979
  //#endregion
3941
- //#region ../../node_modules/zod/dist/esm/v4/locales/en.js
3942
- const parsedType$1 = (data) => {
3980
+ //#region ../../node_modules/zod/v4/locales/en.js
3981
+ const parsedType$2 = (data) => {
3943
3982
  const t = typeof data;
3944
3983
  switch (t) {
3945
3984
  case "number": {
@@ -3959,7 +3998,7 @@ const parsedType$1 = (data) => {
3959
3998
  }
3960
3999
  return t;
3961
4000
  };
3962
- const error$30 = () => {
4001
+ const error$32 = () => {
3963
4002
  const Sizable = {
3964
4003
  string: {
3965
4004
  unit: "characters",
@@ -4013,7 +4052,7 @@ const error$30 = () => {
4013
4052
  };
4014
4053
  return (issue$1) => {
4015
4054
  switch (issue$1.code) {
4016
- case "invalid_type": return `Invalid input: expected ${issue$1.expected}, received ${parsedType$1(issue$1.input)}`;
4055
+ case "invalid_type": return `Invalid input: expected ${issue$1.expected}, received ${parsedType$2(issue$1.input)}`;
4017
4056
  case "invalid_value":
4018
4057
  if (issue$1.values.length === 1) return `Invalid input: expected ${stringifyPrimitive(issue$1.values[0])}`;
4019
4058
  return `Invalid option: expected one of ${joinValues(issue$1.values, "|")}`;
@@ -4051,12 +4090,127 @@ const error$30 = () => {
4051
4090
  };
4052
4091
  };
4053
4092
  function en_default() {
4054
- return { localeError: error$30() };
4093
+ return { localeError: error$32() };
4055
4094
  }
4056
4095
 
4057
4096
  //#endregion
4058
- //#region ../../node_modules/zod/dist/esm/v4/locales/es.js
4059
- const error$29 = () => {
4097
+ //#region ../../node_modules/zod/v4/locales/eo.js
4098
+ const parsedType$1 = (data) => {
4099
+ const t = typeof data;
4100
+ switch (t) {
4101
+ case "number": {
4102
+ return Number.isNaN(data) ? "NaN" : "nombro";
4103
+ }
4104
+ case "object": {
4105
+ if (Array.isArray(data)) {
4106
+ return "tabelo";
4107
+ }
4108
+ if (data === null) {
4109
+ return "senvalora";
4110
+ }
4111
+ if (Object.getPrototypeOf(data) !== Object.prototype && data.constructor) {
4112
+ return data.constructor.name;
4113
+ }
4114
+ }
4115
+ }
4116
+ return t;
4117
+ };
4118
+ const error$31 = () => {
4119
+ const Sizable = {
4120
+ string: {
4121
+ unit: "karaktrojn",
4122
+ verb: "havi"
4123
+ },
4124
+ file: {
4125
+ unit: "bajtojn",
4126
+ verb: "havi"
4127
+ },
4128
+ array: {
4129
+ unit: "elementojn",
4130
+ verb: "havi"
4131
+ },
4132
+ set: {
4133
+ unit: "elementojn",
4134
+ verb: "havi"
4135
+ }
4136
+ };
4137
+ function getSizing(origin) {
4138
+ return Sizable[origin] ?? null;
4139
+ }
4140
+ const Nouns = {
4141
+ regex: "enigo",
4142
+ email: "retadreso",
4143
+ url: "URL",
4144
+ emoji: "emoĝio",
4145
+ uuid: "UUID",
4146
+ uuidv4: "UUIDv4",
4147
+ uuidv6: "UUIDv6",
4148
+ nanoid: "nanoid",
4149
+ guid: "GUID",
4150
+ cuid: "cuid",
4151
+ cuid2: "cuid2",
4152
+ ulid: "ULID",
4153
+ xid: "XID",
4154
+ ksuid: "KSUID",
4155
+ datetime: "ISO-datotempo",
4156
+ date: "ISO-dato",
4157
+ time: "ISO-tempo",
4158
+ duration: "ISO-daŭro",
4159
+ ipv4: "IPv4-adreso",
4160
+ ipv6: "IPv6-adreso",
4161
+ cidrv4: "IPv4-rango",
4162
+ cidrv6: "IPv6-rango",
4163
+ base64: "64-ume kodita karaktraro",
4164
+ base64url: "URL-64-ume kodita karaktraro",
4165
+ json_string: "JSON-karaktraro",
4166
+ e164: "E.164-nombro",
4167
+ jwt: "JWT",
4168
+ template_literal: "enigo"
4169
+ };
4170
+ return (issue$1) => {
4171
+ switch (issue$1.code) {
4172
+ case "invalid_type": return `Nevalida enigo: atendiĝis ${issue$1.expected}, riceviĝis ${parsedType$1(issue$1.input)}`;
4173
+ case "invalid_value":
4174
+ if (issue$1.values.length === 1) return `Nevalida enigo: atendiĝis ${stringifyPrimitive(issue$1.values[0])}`;
4175
+ return `Nevalida opcio: atendiĝis unu el ${joinValues(issue$1.values, "|")}`;
4176
+ case "too_big": {
4177
+ const adj = issue$1.inclusive ? "<=" : "<";
4178
+ const sizing = getSizing(issue$1.origin);
4179
+ if (sizing) return `Tro granda: atendiĝis ke ${issue$1.origin ?? "valoro"} havu ${adj}${issue$1.maximum.toString()} ${sizing.unit ?? "elementojn"}`;
4180
+ return `Tro granda: atendiĝis ke ${issue$1.origin ?? "valoro"} havu ${adj}${issue$1.maximum.toString()}`;
4181
+ }
4182
+ case "too_small": {
4183
+ const adj = issue$1.inclusive ? ">=" : ">";
4184
+ const sizing = getSizing(issue$1.origin);
4185
+ if (sizing) {
4186
+ return `Tro malgranda: atendiĝis ke ${issue$1.origin} havu ${adj}${issue$1.minimum.toString()} ${sizing.unit}`;
4187
+ }
4188
+ return `Tro malgranda: atendiĝis ke ${issue$1.origin} estu ${adj}${issue$1.minimum.toString()}`;
4189
+ }
4190
+ case "invalid_format": {
4191
+ const _issue = issue$1;
4192
+ if (_issue.format === "starts_with") return `Nevalida karaktraro: devas komenciĝi per "${_issue.prefix}"`;
4193
+ if (_issue.format === "ends_with") return `Nevalida karaktraro: devas finiĝi per "${_issue.suffix}"`;
4194
+ if (_issue.format === "includes") return `Nevalida karaktraro: devas inkluzivi "${_issue.includes}"`;
4195
+ if (_issue.format === "regex") return `Nevalida karaktraro: devas kongrui kun la modelo ${_issue.pattern}`;
4196
+ return `Nevalida ${Nouns[_issue.format] ?? issue$1.format}`;
4197
+ }
4198
+ case "not_multiple_of": return `Nevalida nombro: devas esti oblo de ${issue$1.divisor}`;
4199
+ case "unrecognized_keys": return `Nekonata${issue$1.keys.length > 1 ? "j" : ""} ŝlosilo${issue$1.keys.length > 1 ? "j" : ""}: ${joinValues(issue$1.keys, ", ")}`;
4200
+ case "invalid_key": return `Nevalida ŝlosilo en ${issue$1.origin}`;
4201
+ case "invalid_union": return "Nevalida enigo";
4202
+ case "invalid_element": return `Nevalida valoro en ${issue$1.origin}`;
4203
+ default: return `Nevalida enigo`;
4204
+ }
4205
+ };
4206
+ };
4207
+ function eo_default() {
4208
+ return { localeError: error$31() };
4209
+ }
4210
+
4211
+ //#endregion
4212
+ //#region ../../node_modules/zod/v4/locales/es.js
4213
+ const error$30 = () => {
4060
4214
  const Sizable = {
4061
4215
  string: {
4062
4216
  unit: "caracteres",
@@ -4078,7 +4232,7 @@ const error$29 = () => {
4078
4232
  function getSizing(origin) {
4079
4233
  return Sizable[origin] ?? null;
4080
4234
  }
4081
- const parsedType$2 = (data) => {
4235
+ const parsedType$3 = (data) => {
4082
4236
  const t = typeof data;
4083
4237
  switch (t) {
4084
4238
  case "number": {
@@ -4130,7 +4284,7 @@ const error$29 = () => {
4130
4284
  };
4131
4285
  return (issue$1) => {
4132
4286
  switch (issue$1.code) {
4133
- case "invalid_type": return `Entrada inválida: se esperaba ${issue$1.expected}, recibido ${parsedType$2(issue$1.input)}`;
4287
+ case "invalid_type": return `Entrada inválida: se esperaba ${issue$1.expected}, recibido ${parsedType$3(issue$1.input)}`;
4134
4288
  case "invalid_value":
4135
4289
  if (issue$1.values.length === 1) return `Entrada inválida: se esperaba ${stringifyPrimitive(issue$1.values[0])}`;
4136
4290
  return `Opción inválida: se esperaba una de ${joinValues(issue$1.values, "|")}`;
@@ -4166,12 +4320,12 @@ const error$29 = () => {
4166
4320
  };
4167
4321
  };
4168
4322
  function es_default() {
4169
- return { localeError: error$29() };
4323
+ return { localeError: error$30() };
4170
4324
  }
4171
4325
 
4172
4326
  //#endregion
4173
- //#region ../../node_modules/zod/dist/esm/v4/locales/fa.js
4174
- const error$28 = () => {
4327
+ //#region ../../node_modules/zod/v4/locales/fa.js
4328
+ const error$29 = () => {
4175
4329
  const Sizable = {
4176
4330
  string: {
4177
4331
  unit: "کاراکتر",
@@ -4193,7 +4347,7 @@ const error$28 = () => {
4193
4347
  function getSizing(origin) {
4194
4348
  return Sizable[origin] ?? null;
4195
4349
  }
4196
- const parsedType$2 = (data) => {
4350
+ const parsedType$3 = (data) => {
4197
4351
  const t = typeof data;
4198
4352
  switch (t) {
4199
4353
  case "number": {
@@ -4245,7 +4399,7 @@ const error$28 = () => {
4245
4399
  };
4246
4400
  return (issue$1) => {
4247
4401
  switch (issue$1.code) {
4248
- case "invalid_type": return `ورودی نامعتبر: می‌بایست ${issue$1.expected} می‌بود، ${parsedType$2(issue$1.input)} دریافت شد`;
4402
+ case "invalid_type": return `ورودی نامعتبر: می‌بایست ${issue$1.expected} می‌بود، ${parsedType$3(issue$1.input)} دریافت شد`;
4249
4403
  case "invalid_value":
4250
4404
  if (issue$1.values.length === 1) {
4251
4405
  return `ورودی نامعتبر: می‌بایست ${stringifyPrimitive(issue$1.values[0])} می‌بود`;
@@ -4293,12 +4447,12 @@ const error$28 = () => {
4293
4447
  };
4294
4448
  };
4295
4449
  function fa_default() {
4296
- return { localeError: error$28() };
4450
+ return { localeError: error$29() };
4297
4451
  }
4298
4452
 
4299
4453
  //#endregion
4300
- //#region ../../node_modules/zod/dist/esm/v4/locales/fi.js
4301
- const error$27 = () => {
4454
+ //#region ../../node_modules/zod/v4/locales/fi.js
4455
+ const error$28 = () => {
4302
4456
  const Sizable = {
4303
4457
  string: {
4304
4458
  unit: "merkkiä",
@@ -4336,7 +4490,7 @@ const error$27 = () => {
4336
4490
  function getSizing(origin) {
4337
4491
  return Sizable[origin] ?? null;
4338
4492
  }
4339
- const parsedType$2 = (data) => {
4493
+ const parsedType$3 = (data) => {
4340
4494
  const t = typeof data;
4341
4495
  switch (t) {
4342
4496
  case "number": {
@@ -4388,7 +4542,7 @@ const error$27 = () => {
4388
4542
  };
4389
4543
  return (issue$1) => {
4390
4544
  switch (issue$1.code) {
4391
- case "invalid_type": return `Virheellinen tyyppi: odotettiin ${issue$1.expected}, oli ${parsedType$2(issue$1.input)}`;
4545
+ case "invalid_type": return `Virheellinen tyyppi: odotettiin ${issue$1.expected}, oli ${parsedType$3(issue$1.input)}`;
4392
4546
  case "invalid_value":
4393
4547
  if (issue$1.values.length === 1) return `Virheellinen syöte: täytyy olla ${stringifyPrimitive(issue$1.values[0])}`;
4394
4548
  return `Virheellinen valinta: täytyy olla yksi seuraavista: ${joinValues(issue$1.values, "|")}`;
@@ -4428,12 +4582,12 @@ const error$27 = () => {
4428
4582
  };
4429
4583
  };
4430
4584
  function fi_default() {
4431
- return { localeError: error$27() };
4585
+ return { localeError: error$28() };
4432
4586
  }
4433
4587
 
4434
4588
  //#endregion
4435
- //#region ../../node_modules/zod/dist/esm/v4/locales/fr.js
4436
- const error$26 = () => {
4589
+ //#region ../../node_modules/zod/v4/locales/fr.js
4590
+ const error$27 = () => {
4437
4591
  const Sizable = {
4438
4592
  string: {
4439
4593
  unit: "caractères",
@@ -4455,7 +4609,7 @@ const error$26 = () => {
4455
4609
  function getSizing(origin) {
4456
4610
  return Sizable[origin] ?? null;
4457
4611
  }
4458
- const parsedType$2 = (data) => {
4612
+ const parsedType$3 = (data) => {
4459
4613
  const t = typeof data;
4460
4614
  switch (t) {
4461
4615
  case "number": {
@@ -4507,7 +4661,7 @@ const error$26 = () => {
4507
4661
  };
4508
4662
  return (issue$1) => {
4509
4663
  switch (issue$1.code) {
4510
- case "invalid_type": return `Entrée invalide : ${issue$1.expected} attendu, ${parsedType$2(issue$1.input)} reçu`;
4664
+ case "invalid_type": return `Entrée invalide : ${issue$1.expected} attendu, ${parsedType$3(issue$1.input)} reçu`;
4511
4665
  case "invalid_value":
4512
4666
  if (issue$1.values.length === 1) return `Entrée invalide : ${stringifyPrimitive(issue$1.values[0])} attendu`;
4513
4667
  return `Option invalide : une valeur parmi ${joinValues(issue$1.values, "|")} attendue`;
@@ -4543,12 +4697,12 @@ const error$26 = () => {
4543
4697
  };
4544
4698
  };
4545
4699
  function fr_default() {
4546
- return { localeError: error$26() };
4700
+ return { localeError: error$27() };
4547
4701
  }
4548
4702
 
4549
4703
  //#endregion
4550
- //#region ../../node_modules/zod/dist/esm/v4/locales/fr-CA.js
4551
- const error$25 = () => {
4704
+ //#region ../../node_modules/zod/v4/locales/fr-CA.js
4705
+ const error$26 = () => {
4552
4706
  const Sizable = {
4553
4707
  string: {
4554
4708
  unit: "caractères",
@@ -4570,7 +4724,7 @@ const error$25 = () => {
4570
4724
  function getSizing(origin) {
4571
4725
  return Sizable[origin] ?? null;
4572
4726
  }
4573
- const parsedType$2 = (data) => {
4727
+ const parsedType$3 = (data) => {
4574
4728
  const t = typeof data;
4575
4729
  switch (t) {
4576
4730
  case "number": {
@@ -4622,7 +4776,7 @@ const error$25 = () => {
4622
4776
  };
4623
4777
  return (issue$1) => {
4624
4778
  switch (issue$1.code) {
4625
- case "invalid_type": return `Entrée invalide : attendu ${issue$1.expected}, reçu ${parsedType$2(issue$1.input)}`;
4779
+ case "invalid_type": return `Entrée invalide : attendu ${issue$1.expected}, reçu ${parsedType$3(issue$1.input)}`;
4626
4780
  case "invalid_value":
4627
4781
  if (issue$1.values.length === 1) return `Entrée invalide : attendu ${stringifyPrimitive(issue$1.values[0])}`;
4628
4782
  return `Option invalide : attendu l'une des valeurs suivantes ${joinValues(issue$1.values, "|")}`;
@@ -4660,12 +4814,12 @@ const error$25 = () => {
4660
4814
  };
4661
4815
  };
4662
4816
  function fr_CA_default() {
4663
- return { localeError: error$25() };
4817
+ return { localeError: error$26() };
4664
4818
  }
4665
4819
 
4666
4820
  //#endregion
4667
- //#region ../../node_modules/zod/dist/esm/v4/locales/he.js
4668
- const error$24 = () => {
4821
+ //#region ../../node_modules/zod/v4/locales/he.js
4822
+ const error$25 = () => {
4669
4823
  const Sizable = {
4670
4824
  string: {
4671
4825
  unit: "אותיות",
@@ -4687,7 +4841,7 @@ const error$24 = () => {
4687
4841
  function getSizing(origin) {
4688
4842
  return Sizable[origin] ?? null;
4689
4843
  }
4690
- const parsedType$2 = (data) => {
4844
+ const parsedType$3 = (data) => {
4691
4845
  const t = typeof data;
4692
4846
  switch (t) {
4693
4847
  case "number": {
@@ -4739,7 +4893,7 @@ const error$24 = () => {
4739
4893
  };
4740
4894
  return (issue$1) => {
4741
4895
  switch (issue$1.code) {
4742
- case "invalid_type": return `קלט לא תקין: צריך ${issue$1.expected}, התקבל ${parsedType$2(issue$1.input)}`;
4896
+ case "invalid_type": return `קלט לא תקין: צריך ${issue$1.expected}, התקבל ${parsedType$3(issue$1.input)}`;
4743
4897
  case "invalid_value":
4744
4898
  if (issue$1.values.length === 1) return `קלט לא תקין: צריך ${stringifyPrimitive(issue$1.values[0])}`;
4745
4899
  return `קלט לא תקין: צריך אחת מהאפשרויות ${joinValues(issue$1.values, "|")}`;
@@ -4775,12 +4929,12 @@ const error$24 = () => {
4775
4929
  };
4776
4930
  };
4777
4931
  function he_default() {
4778
- return { localeError: error$24() };
4932
+ return { localeError: error$25() };
4779
4933
  }
4780
4934
 
4781
4935
  //#endregion
4782
- //#region ../../node_modules/zod/dist/esm/v4/locales/hu.js
4783
- const error$23 = () => {
4936
+ //#region ../../node_modules/zod/v4/locales/hu.js
4937
+ const error$24 = () => {
4784
4938
  const Sizable = {
4785
4939
  string: {
4786
4940
  unit: "karakter",
@@ -4802,7 +4956,7 @@ const error$23 = () => {
4802
4956
  function getSizing(origin) {
4803
4957
  return Sizable[origin] ?? null;
4804
4958
  }
4805
- const parsedType$2 = (data) => {
4959
+ const parsedType$3 = (data) => {
4806
4960
  const t = typeof data;
4807
4961
  switch (t) {
4808
4962
  case "number": {
@@ -4854,7 +5008,7 @@ const error$23 = () => {
4854
5008
  };
4855
5009
  return (issue$1) => {
4856
5010
  switch (issue$1.code) {
4857
- case "invalid_type": return `Érvénytelen bemenet: a várt érték ${issue$1.expected}, a kapott érték ${parsedType$2(issue$1.input)}`;
5011
+ case "invalid_type": return `Érvénytelen bemenet: a várt érték ${issue$1.expected}, a kapott érték ${parsedType$3(issue$1.input)}`;
4858
5012
  case "invalid_value":
4859
5013
  if (issue$1.values.length === 1) return `Érvénytelen bemenet: a várt érték ${stringifyPrimitive(issue$1.values[0])}`;
4860
5014
  return `Érvénytelen opció: valamelyik érték várt ${joinValues(issue$1.values, "|")}`;
@@ -4890,12 +5044,12 @@ const error$23 = () => {
4890
5044
  };
4891
5045
  };
4892
5046
  function hu_default() {
4893
- return { localeError: error$23() };
5047
+ return { localeError: error$24() };
4894
5048
  }
4895
5049
 
4896
5050
  //#endregion
4897
- //#region ../../node_modules/zod/dist/esm/v4/locales/id.js
4898
- const error$22 = () => {
5051
+ //#region ../../node_modules/zod/v4/locales/id.js
5052
+ const error$23 = () => {
4899
5053
  const Sizable = {
4900
5054
  string: {
4901
5055
  unit: "karakter",
@@ -4917,7 +5071,7 @@ const error$22 = () => {
4917
5071
  function getSizing(origin) {
4918
5072
  return Sizable[origin] ?? null;
4919
5073
  }
4920
- const parsedType$2 = (data) => {
5074
+ const parsedType$3 = (data) => {
4921
5075
  const t = typeof data;
4922
5076
  switch (t) {
4923
5077
  case "number": {
@@ -4969,7 +5123,7 @@ const error$22 = () => {
4969
5123
  };
4970
5124
  return (issue$1) => {
4971
5125
  switch (issue$1.code) {
4972
- case "invalid_type": return `Input tidak valid: diharapkan ${issue$1.expected}, diterima ${parsedType$2(issue$1.input)}`;
5126
+ case "invalid_type": return `Input tidak valid: diharapkan ${issue$1.expected}, diterima ${parsedType$3(issue$1.input)}`;
4973
5127
  case "invalid_value":
4974
5128
  if (issue$1.values.length === 1) return `Input tidak valid: diharapkan ${stringifyPrimitive(issue$1.values[0])}`;
4975
5129
  return `Pilihan tidak valid: diharapkan salah satu dari ${joinValues(issue$1.values, "|")}`;
@@ -5005,12 +5159,12 @@ const error$22 = () => {
5005
5159
  };
5006
5160
  };
5007
5161
  function id_default() {
5008
- return { localeError: error$22() };
5162
+ return { localeError: error$23() };
5009
5163
  }
5010
5164
 
5011
5165
  //#endregion
5012
- //#region ../../node_modules/zod/dist/esm/v4/locales/it.js
5013
- const error$21 = () => {
5166
+ //#region ../../node_modules/zod/v4/locales/it.js
5167
+ const error$22 = () => {
5014
5168
  const Sizable = {
5015
5169
  string: {
5016
5170
  unit: "caratteri",
@@ -5032,7 +5186,7 @@ const error$21 = () => {
5032
5186
  function getSizing(origin) {
5033
5187
  return Sizable[origin] ?? null;
5034
5188
  }
5035
- const parsedType$2 = (data) => {
5189
+ const parsedType$3 = (data) => {
5036
5190
  const t = typeof data;
5037
5191
  switch (t) {
5038
5192
  case "number": {
@@ -5084,7 +5238,7 @@ const error$21 = () => {
5084
5238
  };
5085
5239
  return (issue$1) => {
5086
5240
  switch (issue$1.code) {
5087
- case "invalid_type": return `Input non valido: atteso ${issue$1.expected}, ricevuto ${parsedType$2(issue$1.input)}`;
5241
+ case "invalid_type": return `Input non valido: atteso ${issue$1.expected}, ricevuto ${parsedType$3(issue$1.input)}`;
5088
5242
  case "invalid_value":
5089
5243
  if (issue$1.values.length === 1) return `Input non valido: atteso ${stringifyPrimitive(issue$1.values[0])}`;
5090
5244
  return `Opzione non valida: atteso uno tra ${joinValues(issue$1.values, "|")}`;
@@ -5120,12 +5274,12 @@ const error$21 = () => {
5120
5274
  };
5121
5275
  };
5122
5276
  function it_default() {
5123
- return { localeError: error$21() };
5277
+ return { localeError: error$22() };
5124
5278
  }
5125
5279
 
5126
5280
  //#endregion
5127
- //#region ../../node_modules/zod/dist/esm/v4/locales/ja.js
5128
- const error$20 = () => {
5281
+ //#region ../../node_modules/zod/v4/locales/ja.js
5282
+ const error$21 = () => {
5129
5283
  const Sizable = {
5130
5284
  string: {
5131
5285
  unit: "文字",
@@ -5147,7 +5301,7 @@ const error$20 = () => {
5147
5301
  function getSizing(origin) {
5148
5302
  return Sizable[origin] ?? null;
5149
5303
  }
5150
- const parsedType$2 = (data) => {
5304
+ const parsedType$3 = (data) => {
5151
5305
  const t = typeof data;
5152
5306
  switch (t) {
5153
5307
  case "number": {
@@ -5199,21 +5353,21 @@ const error$20 = () => {
5199
5353
  };
5200
5354
  return (issue$1) => {
5201
5355
  switch (issue$1.code) {
5202
- case "invalid_type": return `無効な入力: ${issue$1.expected}が期待されましたが、${parsedType$2(issue$1.input)}が入力されました`;
5356
+ case "invalid_type": return `無効な入力: ${issue$1.expected}が期待されましたが、${parsedType$3(issue$1.input)}が入力されました`;
5203
5357
  case "invalid_value":
5204
5358
  if (issue$1.values.length === 1) return `無効な入力: ${stringifyPrimitive(issue$1.values[0])}が期待されました`;
5205
5359
  return `無効な選択: ${joinValues(issue$1.values, "、")}のいずれかである必要があります`;
5206
5360
  case "too_big": {
5207
- const adj = issue$1.inclusive ? "<=" : "<";
5361
+ const adj = issue$1.inclusive ? "以下である" : "より小さい";
5208
5362
  const sizing = getSizing(issue$1.origin);
5209
- if (sizing) return `大きすぎる値: ${issue$1.origin ?? "値"}は${issue$1.maximum.toString()}${sizing.unit ?? "要素"}${adj}である必要があります`;
5210
- return `大きすぎる値: ${issue$1.origin ?? "値"}は${issue$1.maximum.toString()}${adj}である必要があります`;
5363
+ if (sizing) return `大きすぎる値: ${issue$1.origin ?? "値"}は${issue$1.maximum.toString()}${sizing.unit ?? "要素"}${adj}必要があります`;
5364
+ return `大きすぎる値: ${issue$1.origin ?? "値"}は${issue$1.maximum.toString()}${adj}必要があります`;
5211
5365
  }
5212
5366
  case "too_small": {
5213
- const adj = issue$1.inclusive ? ">=" : ">";
5367
+ const adj = issue$1.inclusive ? "以上である" : "より大きい";
5214
5368
  const sizing = getSizing(issue$1.origin);
5215
- if (sizing) return `小さすぎる値: ${issue$1.origin}は${issue$1.minimum.toString()}${sizing.unit}${adj}である必要があります`;
5216
- return `小さすぎる値: ${issue$1.origin}は${issue$1.minimum.toString()}${adj}である必要があります`;
5369
+ if (sizing) return `小さすぎる値: ${issue$1.origin}は${issue$1.minimum.toString()}${sizing.unit}${adj}必要があります`;
5370
+ return `小さすぎる値: ${issue$1.origin}は${issue$1.minimum.toString()}${adj}必要があります`;
5217
5371
  }
5218
5372
  case "invalid_format": {
5219
5373
  const _issue = issue$1;
@@ -5233,12 +5387,12 @@ const error$20 = () => {
5233
5387
  };
5234
5388
  };
5235
5389
  function ja_default() {
5236
- return { localeError: error$20() };
5390
+ return { localeError: error$21() };
5237
5391
  }
5238
5392
 
5239
5393
  //#endregion
5240
- //#region ../../node_modules/zod/dist/esm/v4/locales/kh.js
5241
- const error$19 = () => {
5394
+ //#region ../../node_modules/zod/v4/locales/kh.js
5395
+ const error$20 = () => {
5242
5396
  const Sizable = {
5243
5397
  string: {
5244
5398
  unit: "តួអក្សរ",
@@ -5260,7 +5414,7 @@ const error$19 = () => {
5260
5414
  function getSizing(origin) {
5261
5415
  return Sizable[origin] ?? null;
5262
5416
  }
5263
- const parsedType$2 = (data) => {
5417
+ const parsedType$3 = (data) => {
5264
5418
  const t = typeof data;
5265
5419
  switch (t) {
5266
5420
  case "number": {
@@ -5312,7 +5466,7 @@ const error$19 = () => {
5312
5466
  };
5313
5467
  return (issue$1) => {
5314
5468
  switch (issue$1.code) {
5315
- case "invalid_type": return `ទិន្នន័យបញ្ចូលមិនត្រឹមត្រូវ៖ ត្រូវការ ${issue$1.expected} ប៉ុន្តែទទួលបាន ${parsedType$2(issue$1.input)}`;
5469
+ case "invalid_type": return `ទិន្នន័យបញ្ចូលមិនត្រឹមត្រូវ៖ ត្រូវការ ${issue$1.expected} ប៉ុន្តែទទួលបាន ${parsedType$3(issue$1.input)}`;
5316
5470
  case "invalid_value":
5317
5471
  if (issue$1.values.length === 1) return `ទិន្នន័យបញ្ចូលមិនត្រឹមត្រូវ៖ ត្រូវការ ${stringifyPrimitive(issue$1.values[0])}`;
5318
5472
  return `ជម្រើសមិនត្រឹមត្រូវ៖ ត្រូវជាមួយក្នុងចំណោម ${joinValues(issue$1.values, "|")}`;
@@ -5350,12 +5504,12 @@ const error$19 = () => {
5350
5504
  };
5351
5505
  };
5352
5506
  function kh_default() {
5353
- return { localeError: error$19() };
5507
+ return { localeError: error$20() };
5354
5508
  }
5355
5509
 
5356
5510
  //#endregion
5357
- //#region ../../node_modules/zod/dist/esm/v4/locales/ko.js
5358
- const error$18 = () => {
5511
+ //#region ../../node_modules/zod/v4/locales/ko.js
5512
+ const error$19 = () => {
5359
5513
  const Sizable = {
5360
5514
  string: {
5361
5515
  unit: "문자",
@@ -5377,7 +5531,7 @@ const error$18 = () => {
5377
5531
  function getSizing(origin) {
5378
5532
  return Sizable[origin] ?? null;
5379
5533
  }
5380
- const parsedType$2 = (data) => {
5534
+ const parsedType$3 = (data) => {
5381
5535
  const t = typeof data;
5382
5536
  switch (t) {
5383
5537
  case "number": {
@@ -5429,7 +5583,7 @@ const error$18 = () => {
5429
5583
  };
5430
5584
  return (issue$1) => {
5431
5585
  switch (issue$1.code) {
5432
- case "invalid_type": return `잘못된 입력: 예상 타입은 ${issue$1.expected}, 받은 타입은 ${parsedType$2(issue$1.input)}입니다`;
5586
+ case "invalid_type": return `잘못된 입력: 예상 타입은 ${issue$1.expected}, 받은 타입은 ${parsedType$3(issue$1.input)}입니다`;
5433
5587
  case "invalid_value":
5434
5588
  if (issue$1.values.length === 1) return `잘못된 입력: 값은 ${stringifyPrimitive(issue$1.values[0])} 이어야 합니다`;
5435
5589
  return `잘못된 옵션: ${joinValues(issue$1.values, "또는 ")} 중 하나여야 합니다`;
@@ -5471,12 +5625,12 @@ const error$18 = () => {
5471
5625
  };
5472
5626
  };
5473
5627
  function ko_default() {
5474
- return { localeError: error$18() };
5628
+ return { localeError: error$19() };
5475
5629
  }
5476
5630
 
5477
5631
  //#endregion
5478
- //#region ../../node_modules/zod/dist/esm/v4/locales/mk.js
5479
- const error$17 = () => {
5632
+ //#region ../../node_modules/zod/v4/locales/mk.js
5633
+ const error$18 = () => {
5480
5634
  const Sizable = {
5481
5635
  string: {
5482
5636
  unit: "знаци",
@@ -5498,7 +5652,7 @@ const error$17 = () => {
5498
5652
  function getSizing(origin) {
5499
5653
  return Sizable[origin] ?? null;
5500
5654
  }
5501
- const parsedType$2 = (data) => {
5655
+ const parsedType$3 = (data) => {
5502
5656
  const t = typeof data;
5503
5657
  switch (t) {
5504
5658
  case "number": {
@@ -5550,7 +5704,7 @@ const error$17 = () => {
5550
5704
  };
5551
5705
  return (issue$1) => {
5552
5706
  switch (issue$1.code) {
5553
- case "invalid_type": return `Грешен внес: се очекува ${issue$1.expected}, примено ${parsedType$2(issue$1.input)}`;
5707
+ case "invalid_type": return `Грешен внес: се очекува ${issue$1.expected}, примено ${parsedType$3(issue$1.input)}`;
5554
5708
  case "invalid_value":
5555
5709
  if (issue$1.values.length === 1) return `Invalid input: expected ${stringifyPrimitive(issue$1.values[0])}`;
5556
5710
  return `Грешана опција: се очекува една ${joinValues(issue$1.values, "|")}`;
@@ -5588,12 +5742,12 @@ const error$17 = () => {
5588
5742
  };
5589
5743
  };
5590
5744
  function mk_default() {
5591
- return { localeError: error$17() };
5745
+ return { localeError: error$18() };
5592
5746
  }
5593
5747
 
5594
5748
  //#endregion
5595
- //#region ../../node_modules/zod/dist/esm/v4/locales/ms.js
5596
- const error$16 = () => {
5749
+ //#region ../../node_modules/zod/v4/locales/ms.js
5750
+ const error$17 = () => {
5597
5751
  const Sizable = {
5598
5752
  string: {
5599
5753
  unit: "aksara",
@@ -5615,7 +5769,7 @@ const error$16 = () => {
5615
5769
  function getSizing(origin) {
5616
5770
  return Sizable[origin] ?? null;
5617
5771
  }
5618
- const parsedType$2 = (data) => {
5772
+ const parsedType$3 = (data) => {
5619
5773
  const t = typeof data;
5620
5774
  switch (t) {
5621
5775
  case "number": {
@@ -5667,7 +5821,7 @@ const error$16 = () => {
5667
5821
  };
5668
5822
  return (issue$1) => {
5669
5823
  switch (issue$1.code) {
5670
- case "invalid_type": return `Input tidak sah: dijangka ${issue$1.expected}, diterima ${parsedType$2(issue$1.input)}`;
5824
+ case "invalid_type": return `Input tidak sah: dijangka ${issue$1.expected}, diterima ${parsedType$3(issue$1.input)}`;
5671
5825
  case "invalid_value":
5672
5826
  if (issue$1.values.length === 1) return `Input tidak sah: dijangka ${stringifyPrimitive(issue$1.values[0])}`;
5673
5827
  return `Pilihan tidak sah: dijangka salah satu daripada ${joinValues(issue$1.values, "|")}`;
@@ -5703,12 +5857,12 @@ const error$16 = () => {
5703
5857
  };
5704
5858
  };
5705
5859
  function ms_default() {
5706
- return { localeError: error$16() };
5860
+ return { localeError: error$17() };
5707
5861
  }
5708
5862
 
5709
5863
  //#endregion
5710
- //#region ../../node_modules/zod/dist/esm/v4/locales/nl.js
5711
- const error$15 = () => {
5864
+ //#region ../../node_modules/zod/v4/locales/nl.js
5865
+ const error$16 = () => {
5712
5866
  const Sizable = {
5713
5867
  string: { unit: "tekens" },
5714
5868
  file: { unit: "bytes" },
@@ -5718,7 +5872,7 @@ const error$15 = () => {
5718
5872
  function getSizing(origin) {
5719
5873
  return Sizable[origin] ?? null;
5720
5874
  }
5721
- const parsedType$2 = (data) => {
5875
+ const parsedType$3 = (data) => {
5722
5876
  const t = typeof data;
5723
5877
  switch (t) {
5724
5878
  case "number": {
@@ -5770,7 +5924,7 @@ const error$15 = () => {
5770
5924
  };
5771
5925
  return (issue$1) => {
5772
5926
  switch (issue$1.code) {
5773
- case "invalid_type": return `Ongeldige invoer: verwacht ${issue$1.expected}, ontving ${parsedType$2(issue$1.input)}`;
5927
+ case "invalid_type": return `Ongeldige invoer: verwacht ${issue$1.expected}, ontving ${parsedType$3(issue$1.input)}`;
5774
5928
  case "invalid_value":
5775
5929
  if (issue$1.values.length === 1) return `Ongeldige invoer: verwacht ${stringifyPrimitive(issue$1.values[0])}`;
5776
5930
  return `Ongeldige optie: verwacht één van ${joinValues(issue$1.values, "|")}`;
@@ -5808,12 +5962,12 @@ const error$15 = () => {
5808
5962
  };
5809
5963
  };
5810
5964
  function nl_default() {
5811
- return { localeError: error$15() };
5965
+ return { localeError: error$16() };
5812
5966
  }
5813
5967
 
5814
5968
  //#endregion
5815
- //#region ../../node_modules/zod/dist/esm/v4/locales/no.js
5816
- const error$14 = () => {
5969
+ //#region ../../node_modules/zod/v4/locales/no.js
5970
+ const error$15 = () => {
5817
5971
  const Sizable = {
5818
5972
  string: {
5819
5973
  unit: "tegn",
@@ -5835,7 +5989,7 @@ const error$14 = () => {
5835
5989
  function getSizing(origin) {
5836
5990
  return Sizable[origin] ?? null;
5837
5991
  }
5838
- const parsedType$2 = (data) => {
5992
+ const parsedType$3 = (data) => {
5839
5993
  const t = typeof data;
5840
5994
  switch (t) {
5841
5995
  case "number": {
@@ -5887,7 +6041,7 @@ const error$14 = () => {
5887
6041
  };
5888
6042
  return (issue$1) => {
5889
6043
  switch (issue$1.code) {
5890
- case "invalid_type": return `Ugyldig input: forventet ${issue$1.expected}, fikk ${parsedType$2(issue$1.input)}`;
6044
+ case "invalid_type": return `Ugyldig input: forventet ${issue$1.expected}, fikk ${parsedType$3(issue$1.input)}`;
5891
6045
  case "invalid_value":
5892
6046
  if (issue$1.values.length === 1) return `Ugyldig verdi: forventet ${stringifyPrimitive(issue$1.values[0])}`;
5893
6047
  return `Ugyldig valg: forventet en av ${joinValues(issue$1.values, "|")}`;
@@ -5923,12 +6077,12 @@ const error$14 = () => {
5923
6077
  };
5924
6078
  };
5925
6079
  function no_default() {
5926
- return { localeError: error$14() };
6080
+ return { localeError: error$15() };
5927
6081
  }
5928
6082
 
5929
6083
  //#endregion
5930
- //#region ../../node_modules/zod/dist/esm/v4/locales/ota.js
5931
- const error$13 = () => {
6084
+ //#region ../../node_modules/zod/v4/locales/ota.js
6085
+ const error$14 = () => {
5932
6086
  const Sizable = {
5933
6087
  string: {
5934
6088
  unit: "harf",
@@ -5950,7 +6104,7 @@ const error$13 = () => {
5950
6104
  function getSizing(origin) {
5951
6105
  return Sizable[origin] ?? null;
5952
6106
  }
5953
- const parsedType$2 = (data) => {
6107
+ const parsedType$3 = (data) => {
5954
6108
  const t = typeof data;
5955
6109
  switch (t) {
5956
6110
  case "number": {
@@ -6002,7 +6156,7 @@ const error$13 = () => {
6002
6156
  };
6003
6157
  return (issue$1) => {
6004
6158
  switch (issue$1.code) {
6005
- case "invalid_type": return `Fâsit giren: umulan ${issue$1.expected}, alınan ${parsedType$2(issue$1.input)}`;
6159
+ case "invalid_type": return `Fâsit giren: umulan ${issue$1.expected}, alınan ${parsedType$3(issue$1.input)}`;
6006
6160
  case "invalid_value":
6007
6161
  if (issue$1.values.length === 1) return `Fâsit giren: umulan ${stringifyPrimitive(issue$1.values[0])}`;
6008
6162
  return `Fâsit tercih: mûteberler ${joinValues(issue$1.values, "|")}`;
@@ -6038,11 +6192,138 @@ const error$13 = () => {
6038
6192
  };
6039
6193
  };
6040
6194
  function ota_default() {
6195
+ return { localeError: error$14() };
6196
+ }
6197
+
6198
+ //#endregion
6199
+ //#region ../../node_modules/zod/v4/locales/ps.js
6200
+ const error$13 = () => {
6201
+ const Sizable = {
6202
+ string: {
6203
+ unit: "توکي",
6204
+ verb: "ولري"
6205
+ },
6206
+ file: {
6207
+ unit: "بایټس",
6208
+ verb: "ولري"
6209
+ },
6210
+ array: {
6211
+ unit: "توکي",
6212
+ verb: "ولري"
6213
+ },
6214
+ set: {
6215
+ unit: "توکي",
6216
+ verb: "ولري"
6217
+ }
6218
+ };
6219
+ function getSizing(origin) {
6220
+ return Sizable[origin] ?? null;
6221
+ }
6222
+ const parsedType$3 = (data) => {
6223
+ const t = typeof data;
6224
+ switch (t) {
6225
+ case "number": {
6226
+ return Number.isNaN(data) ? "NaN" : "عدد";
6227
+ }
6228
+ case "object": {
6229
+ if (Array.isArray(data)) {
6230
+ return "ارې";
6231
+ }
6232
+ if (data === null) {
6233
+ return "null";
6234
+ }
6235
+ if (Object.getPrototypeOf(data) !== Object.prototype && data.constructor) {
6236
+ return data.constructor.name;
6237
+ }
6238
+ }
6239
+ }
6240
+ return t;
6241
+ };
6242
+ const Nouns = {
6243
+ regex: "ورودي",
6244
+ email: "بریښنالیک",
6245
+ url: "یو آر ال",
6246
+ emoji: "ایموجي",
6247
+ uuid: "UUID",
6248
+ uuidv4: "UUIDv4",
6249
+ uuidv6: "UUIDv6",
6250
+ nanoid: "nanoid",
6251
+ guid: "GUID",
6252
+ cuid: "cuid",
6253
+ cuid2: "cuid2",
6254
+ ulid: "ULID",
6255
+ xid: "XID",
6256
+ ksuid: "KSUID",
6257
+ datetime: "نیټه او وخت",
6258
+ date: "نېټه",
6259
+ time: "وخت",
6260
+ duration: "موده",
6261
+ ipv4: "د IPv4 پته",
6262
+ ipv6: "د IPv6 پته",
6263
+ cidrv4: "د IPv4 ساحه",
6264
+ cidrv6: "د IPv6 ساحه",
6265
+ base64: "base64-encoded متن",
6266
+ base64url: "base64url-encoded متن",
6267
+ json_string: "JSON متن",
6268
+ e164: "د E.164 شمېره",
6269
+ jwt: "JWT",
6270
+ template_literal: "ورودي"
6271
+ };
6272
+ return (issue$1) => {
6273
+ switch (issue$1.code) {
6274
+ case "invalid_type": return `ناسم ورودي: باید ${issue$1.expected} وای, مګر ${parsedType$3(issue$1.input)} ترلاسه شو`;
6275
+ case "invalid_value":
6276
+ if (issue$1.values.length === 1) {
6277
+ return `ناسم ورودي: باید ${stringifyPrimitive(issue$1.values[0])} وای`;
6278
+ }
6279
+ return `ناسم انتخاب: باید یو له ${joinValues(issue$1.values, "|")} څخه وای`;
6280
+ case "too_big": {
6281
+ const adj = issue$1.inclusive ? "<=" : "<";
6282
+ const sizing = getSizing(issue$1.origin);
6283
+ if (sizing) {
6284
+ return `ډیر لوی: ${issue$1.origin ?? "ارزښت"} باید ${adj}${issue$1.maximum.toString()} ${sizing.unit ?? "عنصرونه"} ولري`;
6285
+ }
6286
+ return `ډیر لوی: ${issue$1.origin ?? "ارزښت"} باید ${adj}${issue$1.maximum.toString()} وي`;
6287
+ }
6288
+ case "too_small": {
6289
+ const adj = issue$1.inclusive ? ">=" : ">";
6290
+ const sizing = getSizing(issue$1.origin);
6291
+ if (sizing) {
6292
+ return `ډیر کوچنی: ${issue$1.origin} باید ${adj}${issue$1.minimum.toString()} ${sizing.unit} ولري`;
6293
+ }
6294
+ return `ډیر کوچنی: ${issue$1.origin} باید ${adj}${issue$1.minimum.toString()} وي`;
6295
+ }
6296
+ case "invalid_format": {
6297
+ const _issue = issue$1;
6298
+ if (_issue.format === "starts_with") {
6299
+ return `ناسم متن: باید د "${_issue.prefix}" سره پیل شي`;
6300
+ }
6301
+ if (_issue.format === "ends_with") {
6302
+ return `ناسم متن: باید د "${_issue.suffix}" سره پای ته ورسيږي`;
6303
+ }
6304
+ if (_issue.format === "includes") {
6305
+ return `ناسم متن: باید "${_issue.includes}" ولري`;
6306
+ }
6307
+ if (_issue.format === "regex") {
6308
+ return `ناسم متن: باید د ${_issue.pattern} سره مطابقت ولري`;
6309
+ }
6310
+ return `${Nouns[_issue.format] ?? issue$1.format} ناسم دی`;
6311
+ }
6312
+ case "not_multiple_of": return `ناسم عدد: باید د ${issue$1.divisor} مضرب وي`;
6313
+ case "unrecognized_keys": return `ناسم ${issue$1.keys.length > 1 ? "کلیډونه" : "کلیډ"}: ${joinValues(issue$1.keys, ", ")}`;
6314
+ case "invalid_key": return `ناسم کلیډ په ${issue$1.origin} کې`;
6315
+ case "invalid_union": return `ناسمه ورودي`;
6316
+ case "invalid_element": return `ناسم عنصر په ${issue$1.origin} کې`;
6317
+ default: return `ناسمه ورودي`;
6318
+ }
6319
+ };
6320
+ };
6321
+ function ps_default() {
6041
6322
  return { localeError: error$13() };
6042
6323
  }
6043
6324
 
6044
6325
  //#endregion
6045
- //#region ../../node_modules/zod/dist/esm/v4/locales/pl.js
6326
+ //#region ../../node_modules/zod/v4/locales/pl.js
6046
6327
  const error$12 = () => {
6047
6328
  const Sizable = {
6048
6329
  string: {
@@ -6065,7 +6346,7 @@ const error$12 = () => {
6065
6346
  function getSizing(origin) {
6066
6347
  return Sizable[origin] ?? null;
6067
6348
  }
6068
- const parsedType$2 = (data) => {
6349
+ const parsedType$3 = (data) => {
6069
6350
  const t = typeof data;
6070
6351
  switch (t) {
6071
6352
  case "number": {
@@ -6117,7 +6398,7 @@ const error$12 = () => {
6117
6398
  };
6118
6399
  return (issue$1) => {
6119
6400
  switch (issue$1.code) {
6120
- case "invalid_type": return `Nieprawidłowe dane wejściowe: oczekiwano ${issue$1.expected}, otrzymano ${parsedType$2(issue$1.input)}`;
6401
+ case "invalid_type": return `Nieprawidłowe dane wejściowe: oczekiwano ${issue$1.expected}, otrzymano ${parsedType$3(issue$1.input)}`;
6121
6402
  case "invalid_value":
6122
6403
  if (issue$1.values.length === 1) return `Nieprawidłowe dane wejściowe: oczekiwano ${stringifyPrimitive(issue$1.values[0])}`;
6123
6404
  return `Nieprawidłowa opcja: oczekiwano jednej z wartości ${joinValues(issue$1.values, "|")}`;
@@ -6159,7 +6440,7 @@ function pl_default() {
6159
6440
  }
6160
6441
 
6161
6442
  //#endregion
6162
- //#region ../../node_modules/zod/dist/esm/v4/locales/pt.js
6443
+ //#region ../../node_modules/zod/v4/locales/pt.js
6163
6444
  const error$11 = () => {
6164
6445
  const Sizable = {
6165
6446
  string: {
@@ -6182,7 +6463,7 @@ const error$11 = () => {
6182
6463
  function getSizing(origin) {
6183
6464
  return Sizable[origin] ?? null;
6184
6465
  }
6185
- const parsedType$2 = (data) => {
6466
+ const parsedType$3 = (data) => {
6186
6467
  const t = typeof data;
6187
6468
  switch (t) {
6188
6469
  case "number": {
@@ -6234,7 +6515,7 @@ const error$11 = () => {
6234
6515
  };
6235
6516
  return (issue$1) => {
6236
6517
  switch (issue$1.code) {
6237
- case "invalid_type": return `Tipo inválido: esperado ${issue$1.expected}, recebido ${parsedType$2(issue$1.input)}`;
6518
+ case "invalid_type": return `Tipo inválido: esperado ${issue$1.expected}, recebido ${parsedType$3(issue$1.input)}`;
6238
6519
  case "invalid_value":
6239
6520
  if (issue$1.values.length === 1) return `Entrada inválida: esperado ${stringifyPrimitive(issue$1.values[0])}`;
6240
6521
  return `Opção inválida: esperada uma das ${joinValues(issue$1.values, "|")}`;
@@ -6274,7 +6555,7 @@ function pt_default() {
6274
6555
  }
6275
6556
 
6276
6557
  //#endregion
6277
- //#region ../../node_modules/zod/dist/esm/v4/locales/ru.js
6558
+ //#region ../../node_modules/zod/v4/locales/ru.js
6278
6559
  function getRussianPlural(count, one, few, many) {
6279
6560
  const absCount = Math.abs(count);
6280
6561
  const lastDigit = absCount % 10;
@@ -6328,7 +6609,7 @@ const error$10 = () => {
6328
6609
  function getSizing(origin) {
6329
6610
  return Sizable[origin] ?? null;
6330
6611
  }
6331
- const parsedType$2 = (data) => {
6612
+ const parsedType$3 = (data) => {
6332
6613
  const t = typeof data;
6333
6614
  switch (t) {
6334
6615
  case "number": {
@@ -6380,7 +6661,7 @@ const error$10 = () => {
6380
6661
  };
6381
6662
  return (issue$1) => {
6382
6663
  switch (issue$1.code) {
6383
- case "invalid_type": return `Неверный ввод: ожидалось ${issue$1.expected}, получено ${parsedType$2(issue$1.input)}`;
6664
+ case "invalid_type": return `Неверный ввод: ожидалось ${issue$1.expected}, получено ${parsedType$3(issue$1.input)}`;
6384
6665
  case "invalid_value":
6385
6666
  if (issue$1.values.length === 1) return `Неверный ввод: ожидалось ${stringifyPrimitive(issue$1.values[0])}`;
6386
6667
  return `Неверный вариант: ожидалось одно из ${joinValues(issue$1.values, "|")}`;
@@ -6426,7 +6707,7 @@ function ru_default() {
6426
6707
  }
6427
6708
 
6428
6709
  //#endregion
6429
- //#region ../../node_modules/zod/dist/esm/v4/locales/sl.js
6710
+ //#region ../../node_modules/zod/v4/locales/sl.js
6430
6711
  const error$9 = () => {
6431
6712
  const Sizable = {
6432
6713
  string: {
@@ -6449,7 +6730,7 @@ const error$9 = () => {
6449
6730
  function getSizing(origin) {
6450
6731
  return Sizable[origin] ?? null;
6451
6732
  }
6452
- const parsedType$2 = (data) => {
6733
+ const parsedType$3 = (data) => {
6453
6734
  const t = typeof data;
6454
6735
  switch (t) {
6455
6736
  case "number": {
@@ -6501,7 +6782,7 @@ const error$9 = () => {
6501
6782
  };
6502
6783
  return (issue$1) => {
6503
6784
  switch (issue$1.code) {
6504
- case "invalid_type": return `Neveljaven vnos: pričakovano ${issue$1.expected}, prejeto ${parsedType$2(issue$1.input)}`;
6785
+ case "invalid_type": return `Neveljaven vnos: pričakovano ${issue$1.expected}, prejeto ${parsedType$3(issue$1.input)}`;
6505
6786
  case "invalid_value":
6506
6787
  if (issue$1.values.length === 1) return `Neveljaven vnos: pričakovano ${stringifyPrimitive(issue$1.values[0])}`;
6507
6788
  return `Neveljavna možnost: pričakovano eno izmed ${joinValues(issue$1.values, "|")}`;
@@ -6543,7 +6824,7 @@ function sl_default() {
6543
6824
  }
6544
6825
 
6545
6826
  //#endregion
6546
- //#region ../../node_modules/zod/dist/esm/v4/locales/sv.js
6827
+ //#region ../../node_modules/zod/v4/locales/sv.js
6547
6828
  const error$8 = () => {
6548
6829
  const Sizable = {
6549
6830
  string: {
@@ -6566,7 +6847,7 @@ const error$8 = () => {
6566
6847
  function getSizing(origin) {
6567
6848
  return Sizable[origin] ?? null;
6568
6849
  }
6569
- const parsedType$2 = (data) => {
6850
+ const parsedType$3 = (data) => {
6570
6851
  const t = typeof data;
6571
6852
  switch (t) {
6572
6853
  case "number": {
@@ -6618,7 +6899,7 @@ const error$8 = () => {
6618
6899
  };
6619
6900
  return (issue$1) => {
6620
6901
  switch (issue$1.code) {
6621
- case "invalid_type": return `Ogiltig inmatning: förväntat ${issue$1.expected}, fick ${parsedType$2(issue$1.input)}`;
6902
+ case "invalid_type": return `Ogiltig inmatning: förväntat ${issue$1.expected}, fick ${parsedType$3(issue$1.input)}`;
6622
6903
  case "invalid_value":
6623
6904
  if (issue$1.values.length === 1) return `Ogiltig inmatning: förväntat ${stringifyPrimitive(issue$1.values[0])}`;
6624
6905
  return `Ogiltigt val: förväntade en av ${joinValues(issue$1.values, "|")}`;
@@ -6662,7 +6943,7 @@ function sv_default() {
6662
6943
  }
6663
6944
 
6664
6945
  //#endregion
6665
- //#region ../../node_modules/zod/dist/esm/v4/locales/ta.js
6946
+ //#region ../../node_modules/zod/v4/locales/ta.js
6666
6947
  const error$7 = () => {
6667
6948
  const Sizable = {
6668
6949
  string: {
@@ -6685,7 +6966,7 @@ const error$7 = () => {
6685
6966
  function getSizing(origin) {
6686
6967
  return Sizable[origin] ?? null;
6687
6968
  }
6688
- const parsedType$2 = (data) => {
6969
+ const parsedType$3 = (data) => {
6689
6970
  const t = typeof data;
6690
6971
  switch (t) {
6691
6972
  case "number": {
@@ -6737,7 +7018,7 @@ const error$7 = () => {
6737
7018
  };
6738
7019
  return (issue$1) => {
6739
7020
  switch (issue$1.code) {
6740
- case "invalid_type": return `தவறான உள்ளீடு: எதிர்பார்க்கப்பட்டது ${issue$1.expected}, பெறப்பட்டது ${parsedType$2(issue$1.input)}`;
7021
+ case "invalid_type": return `தவறான உள்ளீடு: எதிர்பார்க்கப்பட்டது ${issue$1.expected}, பெறப்பட்டது ${parsedType$3(issue$1.input)}`;
6741
7022
  case "invalid_value":
6742
7023
  if (issue$1.values.length === 1) return `தவறான உள்ளீடு: எதிர்பார்க்கப்பட்டது ${stringifyPrimitive(issue$1.values[0])}`;
6743
7024
  return `தவறான விருப்பம்: எதிர்பார்க்கப்பட்டது ${joinValues(issue$1.values, "|")} இல் ஒன்று`;
@@ -6779,7 +7060,7 @@ function ta_default() {
6779
7060
  }
6780
7061
 
6781
7062
  //#endregion
6782
- //#region ../../node_modules/zod/dist/esm/v4/locales/th.js
7063
+ //#region ../../node_modules/zod/v4/locales/th.js
6783
7064
  const error$6 = () => {
6784
7065
  const Sizable = {
6785
7066
  string: {
@@ -6802,7 +7083,7 @@ const error$6 = () => {
6802
7083
  function getSizing(origin) {
6803
7084
  return Sizable[origin] ?? null;
6804
7085
  }
6805
- const parsedType$2 = (data) => {
7086
+ const parsedType$3 = (data) => {
6806
7087
  const t = typeof data;
6807
7088
  switch (t) {
6808
7089
  case "number": {
@@ -6854,7 +7135,7 @@ const error$6 = () => {
6854
7135
  };
6855
7136
  return (issue$1) => {
6856
7137
  switch (issue$1.code) {
6857
- case "invalid_type": return `ประเภทข้อมูลไม่ถูกต้อง: ควรเป็น ${issue$1.expected} แต่ได้รับ ${parsedType$2(issue$1.input)}`;
7138
+ case "invalid_type": return `ประเภทข้อมูลไม่ถูกต้อง: ควรเป็น ${issue$1.expected} แต่ได้รับ ${parsedType$3(issue$1.input)}`;
6858
7139
  case "invalid_value":
6859
7140
  if (issue$1.values.length === 1) return `ค่าไม่ถูกต้อง: ควรเป็น ${stringifyPrimitive(issue$1.values[0])}`;
6860
7141
  return `ตัวเลือกไม่ถูกต้อง: ควรเป็นหนึ่งใน ${joinValues(issue$1.values, "|")}`;
@@ -6896,7 +7177,7 @@ function th_default() {
6896
7177
  }
6897
7178
 
6898
7179
  //#endregion
6899
- //#region ../../node_modules/zod/dist/esm/v4/locales/tr.js
7180
+ //#region ../../node_modules/zod/v4/locales/tr.js
6900
7181
  const parsedType = (data) => {
6901
7182
  const t = typeof data;
6902
7183
  switch (t) {
@@ -7009,7 +7290,7 @@ function tr_default() {
7009
7290
  }
7010
7291
 
7011
7292
  //#endregion
7012
- //#region ../../node_modules/zod/dist/esm/v4/locales/ua.js
7293
+ //#region ../../node_modules/zod/v4/locales/ua.js
7013
7294
  const error$4 = () => {
7014
7295
  const Sizable = {
7015
7296
  string: {
@@ -7032,7 +7313,7 @@ const error$4 = () => {
7032
7313
  function getSizing(origin) {
7033
7314
  return Sizable[origin] ?? null;
7034
7315
  }
7035
- const parsedType$2 = (data) => {
7316
+ const parsedType$3 = (data) => {
7036
7317
  const t = typeof data;
7037
7318
  switch (t) {
7038
7319
  case "number": {
@@ -7084,7 +7365,7 @@ const error$4 = () => {
7084
7365
  };
7085
7366
  return (issue$1) => {
7086
7367
  switch (issue$1.code) {
7087
- case "invalid_type": return `Неправильні вхідні дані: очікується ${issue$1.expected}, отримано ${parsedType$2(issue$1.input)}`;
7368
+ case "invalid_type": return `Неправильні вхідні дані: очікується ${issue$1.expected}, отримано ${parsedType$3(issue$1.input)}`;
7088
7369
  case "invalid_value":
7089
7370
  if (issue$1.values.length === 1) return `Неправильні вхідні дані: очікується ${stringifyPrimitive(issue$1.values[0])}`;
7090
7371
  return `Неправильна опція: очікується одне з ${joinValues(issue$1.values, "|")}`;
@@ -7124,7 +7405,7 @@ function ua_default() {
7124
7405
  }
7125
7406
 
7126
7407
  //#endregion
7127
- //#region ../../node_modules/zod/dist/esm/v4/locales/ur.js
7408
+ //#region ../../node_modules/zod/v4/locales/ur.js
7128
7409
  const error$3 = () => {
7129
7410
  const Sizable = {
7130
7411
  string: {
@@ -7147,7 +7428,7 @@ const error$3 = () => {
7147
7428
  function getSizing(origin) {
7148
7429
  return Sizable[origin] ?? null;
7149
7430
  }
7150
- const parsedType$2 = (data) => {
7431
+ const parsedType$3 = (data) => {
7151
7432
  const t = typeof data;
7152
7433
  switch (t) {
7153
7434
  case "number": {
@@ -7199,7 +7480,7 @@ const error$3 = () => {
7199
7480
  };
7200
7481
  return (issue$1) => {
7201
7482
  switch (issue$1.code) {
7202
- case "invalid_type": return `غلط ان پٹ: ${issue$1.expected} متوقع تھا، ${parsedType$2(issue$1.input)} موصول ہوا`;
7483
+ case "invalid_type": return `غلط ان پٹ: ${issue$1.expected} متوقع تھا، ${parsedType$3(issue$1.input)} موصول ہوا`;
7203
7484
  case "invalid_value":
7204
7485
  if (issue$1.values.length === 1) return `غلط ان پٹ: ${stringifyPrimitive(issue$1.values[0])} متوقع تھا`;
7205
7486
  return `غلط آپشن: ${joinValues(issue$1.values, "|")} میں سے ایک متوقع تھا`;
@@ -7241,7 +7522,7 @@ function ur_default() {
7241
7522
  }
7242
7523
 
7243
7524
  //#endregion
7244
- //#region ../../node_modules/zod/dist/esm/v4/locales/vi.js
7525
+ //#region ../../node_modules/zod/v4/locales/vi.js
7245
7526
  const error$2 = () => {
7246
7527
  const Sizable = {
7247
7528
  string: {
@@ -7264,7 +7545,7 @@ const error$2 = () => {
7264
7545
  function getSizing(origin) {
7265
7546
  return Sizable[origin] ?? null;
7266
7547
  }
7267
- const parsedType$2 = (data) => {
7548
+ const parsedType$3 = (data) => {
7268
7549
  const t = typeof data;
7269
7550
  switch (t) {
7270
7551
  case "number": {
@@ -7316,7 +7597,7 @@ const error$2 = () => {
7316
7597
  };
7317
7598
  return (issue$1) => {
7318
7599
  switch (issue$1.code) {
7319
- 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)}`;
7600
+ 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)}`;
7320
7601
  case "invalid_value":
7321
7602
  if (issue$1.values.length === 1) return `Đầu vào không hợp lệ: mong đợi ${stringifyPrimitive(issue$1.values[0])}`;
7322
7603
  return `Tùy chọn không hợp lệ: mong đợi một trong các giá trị ${joinValues(issue$1.values, "|")}`;
@@ -7356,7 +7637,7 @@ function vi_default() {
7356
7637
  }
7357
7638
 
7358
7639
  //#endregion
7359
- //#region ../../node_modules/zod/dist/esm/v4/locales/zh-CN.js
7640
+ //#region ../../node_modules/zod/v4/locales/zh-CN.js
7360
7641
  const error$1 = () => {
7361
7642
  const Sizable = {
7362
7643
  string: {
@@ -7379,7 +7660,7 @@ const error$1 = () => {
7379
7660
  function getSizing(origin) {
7380
7661
  return Sizable[origin] ?? null;
7381
7662
  }
7382
- const parsedType$2 = (data) => {
7663
+ const parsedType$3 = (data) => {
7383
7664
  const t = typeof data;
7384
7665
  switch (t) {
7385
7666
  case "number": {
@@ -7431,7 +7712,7 @@ const error$1 = () => {
7431
7712
  };
7432
7713
  return (issue$1) => {
7433
7714
  switch (issue$1.code) {
7434
- case "invalid_type": return `无效输入:期望 ${issue$1.expected},实际接收 ${parsedType$2(issue$1.input)}`;
7715
+ case "invalid_type": return `无效输入:期望 ${issue$1.expected},实际接收 ${parsedType$3(issue$1.input)}`;
7435
7716
  case "invalid_value":
7436
7717
  if (issue$1.values.length === 1) return `无效输入:期望 ${stringifyPrimitive(issue$1.values[0])}`;
7437
7718
  return `无效选项:期望以下之一 ${joinValues(issue$1.values, "|")}`;
@@ -7471,7 +7752,7 @@ function zh_CN_default() {
7471
7752
  }
7472
7753
 
7473
7754
  //#endregion
7474
- //#region ../../node_modules/zod/dist/esm/v4/locales/zh-TW.js
7755
+ //#region ../../node_modules/zod/v4/locales/zh-TW.js
7475
7756
  const error = () => {
7476
7757
  const Sizable = {
7477
7758
  string: {
@@ -7494,7 +7775,7 @@ const error = () => {
7494
7775
  function getSizing(origin) {
7495
7776
  return Sizable[origin] ?? null;
7496
7777
  }
7497
- const parsedType$2 = (data) => {
7778
+ const parsedType$3 = (data) => {
7498
7779
  const t = typeof data;
7499
7780
  switch (t) {
7500
7781
  case "number": {
@@ -7546,7 +7827,7 @@ const error = () => {
7546
7827
  };
7547
7828
  return (issue$1) => {
7548
7829
  switch (issue$1.code) {
7549
- case "invalid_type": return `無效的輸入值:預期為 ${issue$1.expected},但收到 ${parsedType$2(issue$1.input)}`;
7830
+ case "invalid_type": return `無效的輸入值:預期為 ${issue$1.expected},但收到 ${parsedType$3(issue$1.input)}`;
7550
7831
  case "invalid_value":
7551
7832
  if (issue$1.values.length === 1) return `無效的輸入值:預期為 ${stringifyPrimitive(issue$1.values[0])}`;
7552
7833
  return `無效的選項:預期為以下其中之一 ${joinValues(issue$1.values, "|")}`;
@@ -7588,7 +7869,7 @@ function zh_TW_default() {
7588
7869
  }
7589
7870
 
7590
7871
  //#endregion
7591
- //#region ../../node_modules/zod/dist/esm/v4/locales/index.js
7872
+ //#region ../../node_modules/zod/v4/locales/index.js
7592
7873
  var locales_exports = {};
7593
7874
  __export(locales_exports, {
7594
7875
  ar: () => ar_default,
@@ -7598,6 +7879,7 @@ __export(locales_exports, {
7598
7879
  cs: () => cs_default,
7599
7880
  de: () => de_default,
7600
7881
  en: () => en_default,
7882
+ eo: () => eo_default,
7601
7883
  es: () => es_default,
7602
7884
  fa: () => fa_default,
7603
7885
  fi: () => fi_default,
@@ -7616,6 +7898,7 @@ __export(locales_exports, {
7616
7898
  no: () => no_default,
7617
7899
  ota: () => ota_default,
7618
7900
  pl: () => pl_default,
7901
+ ps: () => ps_default,
7619
7902
  pt: () => pt_default,
7620
7903
  ru: () => ru_default,
7621
7904
  sl: () => sl_default,
@@ -7631,12 +7914,12 @@ __export(locales_exports, {
7631
7914
  });
7632
7915
 
7633
7916
  //#endregion
7634
- //#region ../../node_modules/zod/dist/esm/v4/core/registries.js
7917
+ //#region ../../node_modules/zod/v4/core/registries.js
7635
7918
  const $output = Symbol("ZodOutput");
7636
7919
  const $input = Symbol("ZodInput");
7637
7920
  var $ZodRegistry = class {
7638
7921
  constructor() {
7639
- this._map = new WeakMap();
7922
+ this._map = new Map();
7640
7923
  this._idmap = new Map();
7641
7924
  }
7642
7925
  add(schema, ..._meta) {
@@ -7650,7 +7933,16 @@ var $ZodRegistry = class {
7650
7933
  }
7651
7934
  return this;
7652
7935
  }
7936
+ clear() {
7937
+ this._map = new Map();
7938
+ this._idmap = new Map();
7939
+ return this;
7940
+ }
7653
7941
  remove(schema) {
7942
+ const meta = this._map.get(schema);
7943
+ if (meta && typeof meta === "object" && "id" in meta) {
7944
+ this._idmap.delete(meta.id);
7945
+ }
7654
7946
  this._map.delete(schema);
7655
7947
  return this;
7656
7948
  }
@@ -7676,7 +7968,7 @@ function registry() {
7676
7968
  const globalRegistry = /* @__PURE__ */ registry();
7677
7969
 
7678
7970
  //#endregion
7679
- //#region ../../node_modules/zod/dist/esm/v4/core/api.js
7971
+ //#region ../../node_modules/zod/v4/core/api.js
7680
7972
  function _string(Class$1, params) {
7681
7973
  return new Class$1({
7682
7974
  type: "string",
@@ -7891,6 +8183,13 @@ function _jwt(Class$1, params) {
7891
8183
  ...normalizeParams(params)
7892
8184
  });
7893
8185
  }
8186
+ const TimePrecision = {
8187
+ Any: null,
8188
+ Minute: -1,
8189
+ Second: 0,
8190
+ Millisecond: 3,
8191
+ Microsecond: 6
8192
+ };
7894
8193
  function _isoDateTime(Class$1, params) {
7895
8194
  return new Class$1({
7896
8195
  type: "string",
@@ -8457,8 +8756,8 @@ function _refine(Class$1, fn, _params) {
8457
8756
  return schema;
8458
8757
  }
8459
8758
  function _stringbool(Classes, _params) {
8460
- const { case: _case, error: error$37, truthy, falsy } = normalizeParams(_params);
8461
- let truthyArray = truthy ?? [
8759
+ const params = normalizeParams(_params);
8760
+ let truthyArray = params.truthy ?? [
8462
8761
  "true",
8463
8762
  "1",
8464
8763
  "yes",
@@ -8466,7 +8765,7 @@ function _stringbool(Classes, _params) {
8466
8765
  "y",
8467
8766
  "enabled"
8468
8767
  ];
8469
- let falsyArray = falsy ?? [
8768
+ let falsyArray = params.falsy ?? [
8470
8769
  "false",
8471
8770
  "0",
8472
8771
  "no",
@@ -8474,7 +8773,7 @@ function _stringbool(Classes, _params) {
8474
8773
  "n",
8475
8774
  "disabled"
8476
8775
  ];
8477
- if (_case !== "sensitive") {
8776
+ if (params.case !== "sensitive") {
8478
8777
  truthyArray = truthyArray.map((v) => typeof v === "string" ? v.toLowerCase() : v);
8479
8778
  falsyArray = falsyArray.map((v) => typeof v === "string" ? v.toLowerCase() : v);
8480
8779
  }
@@ -8488,7 +8787,7 @@ function _stringbool(Classes, _params) {
8488
8787
  type: "transform",
8489
8788
  transform: (input, payload) => {
8490
8789
  let data = input;
8491
- if (_case !== "sensitive") data = data.toLowerCase();
8790
+ if (params.case !== "sensitive") data = data.toLowerCase();
8492
8791
  if (truthySet.has(data)) {
8493
8792
  return true;
8494
8793
  } else if (falsySet.has(data)) {
@@ -8504,31 +8803,47 @@ function _stringbool(Classes, _params) {
8504
8803
  return {};
8505
8804
  }
8506
8805
  },
8507
- error: error$37
8806
+ error: params.error
8508
8807
  });
8509
8808
  const innerPipe = new _Pipe({
8510
8809
  type: "pipe",
8511
8810
  in: new _String({
8512
8811
  type: "string",
8513
- error: error$37
8812
+ error: params.error
8514
8813
  }),
8515
8814
  out: tx,
8516
- error: error$37
8815
+ error: params.error
8517
8816
  });
8518
8817
  const outerPipe = new _Pipe({
8519
8818
  type: "pipe",
8520
8819
  in: innerPipe,
8521
8820
  out: new _Boolean({
8522
8821
  type: "boolean",
8523
- error: error$37
8822
+ error: params.error
8524
8823
  }),
8525
- error: error$37
8824
+ error: params.error
8526
8825
  });
8527
8826
  return outerPipe;
8528
8827
  }
8828
+ function _stringFormat(Class$1, format, fnOrRegex, _params = {}) {
8829
+ const params = normalizeParams(_params);
8830
+ const def = {
8831
+ ...normalizeParams(_params),
8832
+ check: "string_format",
8833
+ type: "string",
8834
+ format,
8835
+ fn: typeof fnOrRegex === "function" ? fnOrRegex : (val) => fnOrRegex.test(val),
8836
+ ...params
8837
+ };
8838
+ if (fnOrRegex instanceof RegExp) {
8839
+ def.pattern = fnOrRegex;
8840
+ }
8841
+ const inst = new Class$1(def);
8842
+ return inst;
8843
+ }
8529
8844
 
8530
8845
  //#endregion
8531
- //#region ../../node_modules/zod/dist/esm/v4/core/function.js
8846
+ //#region ../../node_modules/zod/v4/core/function.js
8532
8847
  var $ZodFunction = class {
8533
8848
  constructor(def) {
8534
8849
  this._def = def;
@@ -8599,7 +8914,7 @@ function _function(params) {
8599
8914
  }
8600
8915
 
8601
8916
  //#endregion
8602
- //#region ../../node_modules/zod/dist/esm/v4/core/to-json-schema.js
8917
+ //#region ../../node_modules/zod/v4/core/to-json-schema.js
8603
8918
  var JSONSchemaGenerator = class {
8604
8919
  constructor(params) {
8605
8920
  this.counter = 0;
@@ -8635,431 +8950,435 @@ var JSONSchemaGenerator = class {
8635
8950
  const result = {
8636
8951
  schema: {},
8637
8952
  count: 1,
8638
- cycle: undefined
8639
- };
8640
- this.seen.set(schema, result);
8641
- if (schema._zod.toJSONSchema) {
8642
- result.schema = schema._zod.toJSONSchema();
8643
- }
8644
- const params = {
8645
- ..._params,
8646
- schemaPath: [..._params.schemaPath, schema],
8953
+ cycle: undefined,
8647
8954
  path: _params.path
8648
8955
  };
8649
- const parent = schema._zod.parent;
8650
- if (parent) {
8651
- result.ref = parent;
8652
- this.process(parent, params);
8653
- this.seen.get(parent).isParent = true;
8956
+ this.seen.set(schema, result);
8957
+ const overrideSchema = schema._zod.toJSONSchema?.();
8958
+ if (overrideSchema) {
8959
+ result.schema = overrideSchema;
8654
8960
  } else {
8655
- const _json = result.schema;
8656
- switch (def.type) {
8657
- case "string": {
8658
- const json$1 = _json;
8659
- json$1.type = "string";
8660
- const { minimum, maximum, format, patterns, contentEncoding } = schema._zod.bag;
8661
- if (typeof minimum === "number") json$1.minLength = minimum;
8662
- if (typeof maximum === "number") json$1.maxLength = maximum;
8663
- if (format) {
8664
- json$1.format = formatMap[format] ?? format;
8665
- if (json$1.format === "") delete json$1.format;
8961
+ const params = {
8962
+ ..._params,
8963
+ schemaPath: [..._params.schemaPath, schema],
8964
+ path: _params.path
8965
+ };
8966
+ const parent = schema._zod.parent;
8967
+ if (parent) {
8968
+ result.ref = parent;
8969
+ this.process(parent, params);
8970
+ this.seen.get(parent).isParent = true;
8971
+ } else {
8972
+ const _json = result.schema;
8973
+ switch (def.type) {
8974
+ case "string": {
8975
+ const json$1 = _json;
8976
+ json$1.type = "string";
8977
+ const { minimum, maximum, format, patterns, contentEncoding } = schema._zod.bag;
8978
+ if (typeof minimum === "number") json$1.minLength = minimum;
8979
+ if (typeof maximum === "number") json$1.maxLength = maximum;
8980
+ if (format) {
8981
+ json$1.format = formatMap[format] ?? format;
8982
+ if (json$1.format === "") delete json$1.format;
8983
+ }
8984
+ if (contentEncoding) json$1.contentEncoding = contentEncoding;
8985
+ if (patterns && patterns.size > 0) {
8986
+ const regexes = [...patterns];
8987
+ if (regexes.length === 1) json$1.pattern = regexes[0].source;
8988
+ else if (regexes.length > 1) {
8989
+ result.schema.allOf = [...regexes.map((regex) => ({
8990
+ ...this.target === "draft-7" ? { type: "string" } : {},
8991
+ pattern: regex.source
8992
+ }))];
8993
+ }
8994
+ }
8995
+ break;
8666
8996
  }
8667
- if (contentEncoding) json$1.contentEncoding = contentEncoding;
8668
- if (patterns && patterns.size > 0) {
8669
- const regexes = [...patterns];
8670
- if (regexes.length === 1) json$1.pattern = regexes[0].source;
8671
- else if (regexes.length > 1) {
8672
- result.schema.allOf = [...regexes.map((regex) => ({
8673
- ...this.target === "draft-7" ? { type: "string" } : {},
8674
- pattern: regex.source
8675
- }))];
8997
+ case "number": {
8998
+ const json$1 = _json;
8999
+ const { minimum, maximum, format, multipleOf, exclusiveMaximum, exclusiveMinimum } = schema._zod.bag;
9000
+ if (typeof format === "string" && format.includes("int")) json$1.type = "integer";
9001
+ else json$1.type = "number";
9002
+ if (typeof exclusiveMinimum === "number") json$1.exclusiveMinimum = exclusiveMinimum;
9003
+ if (typeof minimum === "number") {
9004
+ json$1.minimum = minimum;
9005
+ if (typeof exclusiveMinimum === "number") {
9006
+ if (exclusiveMinimum >= minimum) delete json$1.minimum;
9007
+ else delete json$1.exclusiveMinimum;
9008
+ }
8676
9009
  }
9010
+ if (typeof exclusiveMaximum === "number") json$1.exclusiveMaximum = exclusiveMaximum;
9011
+ if (typeof maximum === "number") {
9012
+ json$1.maximum = maximum;
9013
+ if (typeof exclusiveMaximum === "number") {
9014
+ if (exclusiveMaximum <= maximum) delete json$1.maximum;
9015
+ else delete json$1.exclusiveMaximum;
9016
+ }
9017
+ }
9018
+ if (typeof multipleOf === "number") json$1.multipleOf = multipleOf;
9019
+ break;
8677
9020
  }
8678
- break;
8679
- }
8680
- case "number": {
8681
- const json$1 = _json;
8682
- const { minimum, maximum, format, multipleOf, exclusiveMaximum, exclusiveMinimum } = schema._zod.bag;
8683
- if (typeof format === "string" && format.includes("int")) json$1.type = "integer";
8684
- else json$1.type = "number";
8685
- if (typeof exclusiveMinimum === "number") json$1.exclusiveMinimum = exclusiveMinimum;
8686
- if (typeof minimum === "number") {
8687
- json$1.minimum = minimum;
8688
- if (typeof exclusiveMinimum === "number") {
8689
- if (exclusiveMinimum >= minimum) delete json$1.minimum;
8690
- else delete json$1.exclusiveMinimum;
9021
+ case "boolean": {
9022
+ const json$1 = _json;
9023
+ json$1.type = "boolean";
9024
+ break;
9025
+ }
9026
+ case "bigint": {
9027
+ if (this.unrepresentable === "throw") {
9028
+ throw new Error("BigInt cannot be represented in JSON Schema");
8691
9029
  }
9030
+ break;
8692
9031
  }
8693
- if (typeof exclusiveMaximum === "number") json$1.exclusiveMaximum = exclusiveMaximum;
8694
- if (typeof maximum === "number") {
8695
- json$1.maximum = maximum;
8696
- if (typeof exclusiveMaximum === "number") {
8697
- if (exclusiveMaximum <= maximum) delete json$1.maximum;
8698
- else delete json$1.exclusiveMaximum;
9032
+ case "symbol": {
9033
+ if (this.unrepresentable === "throw") {
9034
+ throw new Error("Symbols cannot be represented in JSON Schema");
8699
9035
  }
9036
+ break;
8700
9037
  }
8701
- if (typeof multipleOf === "number") json$1.multipleOf = multipleOf;
8702
- break;
8703
- }
8704
- case "boolean": {
8705
- const json$1 = _json;
8706
- json$1.type = "boolean";
8707
- break;
8708
- }
8709
- case "bigint": {
8710
- if (this.unrepresentable === "throw") {
8711
- throw new Error("BigInt cannot be represented in JSON Schema");
9038
+ case "null": {
9039
+ _json.type = "null";
9040
+ break;
8712
9041
  }
8713
- break;
8714
- }
8715
- case "symbol": {
8716
- if (this.unrepresentable === "throw") {
8717
- throw new Error("Symbols cannot be represented in JSON Schema");
9042
+ case "any": {
9043
+ break;
8718
9044
  }
8719
- break;
8720
- }
8721
- case "undefined": {
8722
- const json$1 = _json;
8723
- json$1.type = "null";
8724
- break;
8725
- }
8726
- case "null": {
8727
- _json.type = "null";
8728
- break;
8729
- }
8730
- case "any": {
8731
- break;
8732
- }
8733
- case "unknown": {
8734
- break;
8735
- }
8736
- case "never": {
8737
- _json.not = {};
8738
- break;
8739
- }
8740
- case "void": {
8741
- if (this.unrepresentable === "throw") {
8742
- throw new Error("Void cannot be represented in JSON Schema");
9045
+ case "unknown": {
9046
+ break;
8743
9047
  }
8744
- break;
8745
- }
8746
- case "date": {
8747
- if (this.unrepresentable === "throw") {
8748
- throw new Error("Date cannot be represented in JSON Schema");
9048
+ case "undefined": {
9049
+ if (this.unrepresentable === "throw") {
9050
+ throw new Error("Undefined cannot be represented in JSON Schema");
9051
+ }
9052
+ break;
8749
9053
  }
8750
- break;
8751
- }
8752
- case "array": {
8753
- const json$1 = _json;
8754
- const { minimum, maximum } = schema._zod.bag;
8755
- if (typeof minimum === "number") json$1.minItems = minimum;
8756
- if (typeof maximum === "number") json$1.maxItems = maximum;
8757
- json$1.type = "array";
8758
- json$1.items = this.process(def.element, {
8759
- ...params,
8760
- path: [...params.path, "items"]
8761
- });
8762
- break;
8763
- }
8764
- case "object": {
8765
- const json$1 = _json;
8766
- json$1.type = "object";
8767
- json$1.properties = {};
8768
- const shape = def.shape;
8769
- for (const key in shape) {
8770
- json$1.properties[key] = this.process(shape[key], {
8771
- ...params,
8772
- path: [
8773
- ...params.path,
8774
- "properties",
8775
- key
8776
- ]
8777
- });
9054
+ case "void": {
9055
+ if (this.unrepresentable === "throw") {
9056
+ throw new Error("Void cannot be represented in JSON Schema");
9057
+ }
9058
+ break;
8778
9059
  }
8779
- const allKeys = new Set(Object.keys(shape));
8780
- const requiredKeys = new Set([...allKeys].filter((key) => {
8781
- const v = def.shape[key]._zod;
8782
- if (this.io === "input") {
8783
- return v.optin === undefined;
8784
- } else {
8785
- return v.optout === undefined;
9060
+ case "never": {
9061
+ _json.not = {};
9062
+ break;
9063
+ }
9064
+ case "date": {
9065
+ if (this.unrepresentable === "throw") {
9066
+ throw new Error("Date cannot be represented in JSON Schema");
8786
9067
  }
8787
- }));
8788
- if (requiredKeys.size > 0) {
8789
- json$1.required = Array.from(requiredKeys);
9068
+ break;
8790
9069
  }
8791
- if (def.catchall?._zod.def.type === "never") {
8792
- json$1.additionalProperties = false;
8793
- } else if (!def.catchall) {
8794
- if (this.io === "output") json$1.additionalProperties = false;
8795
- } else if (def.catchall) {
8796
- json$1.additionalProperties = this.process(def.catchall, {
9070
+ case "array": {
9071
+ const json$1 = _json;
9072
+ const { minimum, maximum } = schema._zod.bag;
9073
+ if (typeof minimum === "number") json$1.minItems = minimum;
9074
+ if (typeof maximum === "number") json$1.maxItems = maximum;
9075
+ json$1.type = "array";
9076
+ json$1.items = this.process(def.element, {
8797
9077
  ...params,
8798
- path: [...params.path, "additionalProperties"]
9078
+ path: [...params.path, "items"]
8799
9079
  });
9080
+ break;
8800
9081
  }
8801
- break;
8802
- }
8803
- case "union": {
8804
- const json$1 = _json;
8805
- json$1.anyOf = def.options.map((x, i) => this.process(x, {
8806
- ...params,
8807
- path: [
8808
- ...params.path,
8809
- "anyOf",
8810
- i
8811
- ]
8812
- }));
8813
- break;
8814
- }
8815
- case "intersection": {
8816
- const json$1 = _json;
8817
- const a = this.process(def.left, {
8818
- ...params,
8819
- path: [
8820
- ...params.path,
8821
- "allOf",
8822
- 0
8823
- ]
8824
- });
8825
- const b = this.process(def.right, {
8826
- ...params,
8827
- path: [
8828
- ...params.path,
8829
- "allOf",
8830
- 1
8831
- ]
8832
- });
8833
- const isSimpleIntersection = (val) => "allOf" in val && Object.keys(val).length === 1;
8834
- const allOf = [...isSimpleIntersection(a) ? a.allOf : [a], ...isSimpleIntersection(b) ? b.allOf : [b]];
8835
- json$1.allOf = allOf;
8836
- break;
8837
- }
8838
- case "tuple": {
8839
- const json$1 = _json;
8840
- json$1.type = "array";
8841
- const prefixItems = def.items.map((x, i) => this.process(x, {
8842
- ...params,
8843
- path: [
8844
- ...params.path,
8845
- "prefixItems",
8846
- i
8847
- ]
8848
- }));
8849
- if (this.target === "draft-2020-12") {
8850
- json$1.prefixItems = prefixItems;
8851
- } else {
8852
- json$1.items = prefixItems;
9082
+ case "object": {
9083
+ const json$1 = _json;
9084
+ json$1.type = "object";
9085
+ json$1.properties = {};
9086
+ const shape = def.shape;
9087
+ for (const key in shape) {
9088
+ json$1.properties[key] = this.process(shape[key], {
9089
+ ...params,
9090
+ path: [
9091
+ ...params.path,
9092
+ "properties",
9093
+ key
9094
+ ]
9095
+ });
9096
+ }
9097
+ const allKeys = new Set(Object.keys(shape));
9098
+ const requiredKeys = new Set([...allKeys].filter((key) => {
9099
+ const v = def.shape[key]._zod;
9100
+ if (this.io === "input") {
9101
+ return v.optin === undefined;
9102
+ } else {
9103
+ return v.optout === undefined;
9104
+ }
9105
+ }));
9106
+ if (requiredKeys.size > 0) {
9107
+ json$1.required = Array.from(requiredKeys);
9108
+ }
9109
+ if (def.catchall?._zod.def.type === "never") {
9110
+ json$1.additionalProperties = false;
9111
+ } else if (!def.catchall) {
9112
+ if (this.io === "output") json$1.additionalProperties = false;
9113
+ } else if (def.catchall) {
9114
+ json$1.additionalProperties = this.process(def.catchall, {
9115
+ ...params,
9116
+ path: [...params.path, "additionalProperties"]
9117
+ });
9118
+ }
9119
+ break;
8853
9120
  }
8854
- if (def.rest) {
8855
- const rest = this.process(def.rest, {
9121
+ case "union": {
9122
+ const json$1 = _json;
9123
+ json$1.anyOf = def.options.map((x, i) => this.process(x, {
8856
9124
  ...params,
8857
- path: [...params.path, "items"]
9125
+ path: [
9126
+ ...params.path,
9127
+ "anyOf",
9128
+ i
9129
+ ]
9130
+ }));
9131
+ break;
9132
+ }
9133
+ case "intersection": {
9134
+ const json$1 = _json;
9135
+ const a = this.process(def.left, {
9136
+ ...params,
9137
+ path: [
9138
+ ...params.path,
9139
+ "allOf",
9140
+ 0
9141
+ ]
9142
+ });
9143
+ const b = this.process(def.right, {
9144
+ ...params,
9145
+ path: [
9146
+ ...params.path,
9147
+ "allOf",
9148
+ 1
9149
+ ]
8858
9150
  });
9151
+ const isSimpleIntersection = (val) => "allOf" in val && Object.keys(val).length === 1;
9152
+ const allOf = [...isSimpleIntersection(a) ? a.allOf : [a], ...isSimpleIntersection(b) ? b.allOf : [b]];
9153
+ json$1.allOf = allOf;
9154
+ break;
9155
+ }
9156
+ case "tuple": {
9157
+ const json$1 = _json;
9158
+ json$1.type = "array";
9159
+ const prefixItems = def.items.map((x, i) => this.process(x, {
9160
+ ...params,
9161
+ path: [
9162
+ ...params.path,
9163
+ "prefixItems",
9164
+ i
9165
+ ]
9166
+ }));
8859
9167
  if (this.target === "draft-2020-12") {
8860
- json$1.items = rest;
9168
+ json$1.prefixItems = prefixItems;
8861
9169
  } else {
8862
- json$1.additionalItems = rest;
9170
+ json$1.items = prefixItems;
9171
+ }
9172
+ if (def.rest) {
9173
+ const rest = this.process(def.rest, {
9174
+ ...params,
9175
+ path: [...params.path, "items"]
9176
+ });
9177
+ if (this.target === "draft-2020-12") {
9178
+ json$1.items = rest;
9179
+ } else {
9180
+ json$1.additionalItems = rest;
9181
+ }
8863
9182
  }
9183
+ if (def.rest) {
9184
+ json$1.items = this.process(def.rest, {
9185
+ ...params,
9186
+ path: [...params.path, "items"]
9187
+ });
9188
+ }
9189
+ const { minimum, maximum } = schema._zod.bag;
9190
+ if (typeof minimum === "number") json$1.minItems = minimum;
9191
+ if (typeof maximum === "number") json$1.maxItems = maximum;
9192
+ break;
8864
9193
  }
8865
- if (def.rest) {
8866
- json$1.items = this.process(def.rest, {
9194
+ case "record": {
9195
+ const json$1 = _json;
9196
+ json$1.type = "object";
9197
+ json$1.propertyNames = this.process(def.keyType, {
8867
9198
  ...params,
8868
- path: [...params.path, "items"]
9199
+ path: [...params.path, "propertyNames"]
8869
9200
  });
9201
+ json$1.additionalProperties = this.process(def.valueType, {
9202
+ ...params,
9203
+ path: [...params.path, "additionalProperties"]
9204
+ });
9205
+ break;
8870
9206
  }
8871
- const { minimum, maximum } = schema._zod.bag;
8872
- if (typeof minimum === "number") json$1.minItems = minimum;
8873
- if (typeof maximum === "number") json$1.maxItems = maximum;
8874
- break;
8875
- }
8876
- case "record": {
8877
- const json$1 = _json;
8878
- json$1.type = "object";
8879
- json$1.propertyNames = this.process(def.keyType, {
8880
- ...params,
8881
- path: [...params.path, "propertyNames"]
8882
- });
8883
- json$1.additionalProperties = this.process(def.valueType, {
8884
- ...params,
8885
- path: [...params.path, "additionalProperties"]
8886
- });
8887
- break;
8888
- }
8889
- case "map": {
8890
- if (this.unrepresentable === "throw") {
8891
- throw new Error("Map cannot be represented in JSON Schema");
9207
+ case "map": {
9208
+ if (this.unrepresentable === "throw") {
9209
+ throw new Error("Map cannot be represented in JSON Schema");
9210
+ }
9211
+ break;
8892
9212
  }
8893
- break;
8894
- }
8895
- case "set": {
8896
- if (this.unrepresentable === "throw") {
8897
- throw new Error("Set cannot be represented in JSON Schema");
9213
+ case "set": {
9214
+ if (this.unrepresentable === "throw") {
9215
+ throw new Error("Set cannot be represented in JSON Schema");
9216
+ }
9217
+ break;
9218
+ }
9219
+ case "enum": {
9220
+ const json$1 = _json;
9221
+ const values = getEnumValues(def.entries);
9222
+ if (values.every((v) => typeof v === "number")) json$1.type = "number";
9223
+ if (values.every((v) => typeof v === "string")) json$1.type = "string";
9224
+ json$1.enum = values;
9225
+ break;
8898
9226
  }
8899
- break;
8900
- }
8901
- case "enum": {
8902
- const json$1 = _json;
8903
- const values = getEnumValues(def.entries);
8904
- if (values.every((v) => typeof v === "number")) json$1.type = "number";
8905
- if (values.every((v) => typeof v === "string")) json$1.type = "string";
8906
- json$1.enum = values;
8907
- break;
8908
- }
8909
- case "literal": {
8910
- const json$1 = _json;
8911
- const vals = [];
8912
- for (const val of def.values) {
8913
- if (val === undefined) {
8914
- if (this.unrepresentable === "throw") {
8915
- throw new Error("Literal `undefined` cannot be represented in JSON Schema");
8916
- } else {}
8917
- } else if (typeof val === "bigint") {
8918
- if (this.unrepresentable === "throw") {
8919
- throw new Error("BigInt literals cannot be represented in JSON Schema");
9227
+ case "literal": {
9228
+ const json$1 = _json;
9229
+ const vals = [];
9230
+ for (const val of def.values) {
9231
+ if (val === undefined) {
9232
+ if (this.unrepresentable === "throw") {
9233
+ throw new Error("Literal `undefined` cannot be represented in JSON Schema");
9234
+ } else {}
9235
+ } else if (typeof val === "bigint") {
9236
+ if (this.unrepresentable === "throw") {
9237
+ throw new Error("BigInt literals cannot be represented in JSON Schema");
9238
+ } else {
9239
+ vals.push(Number(val));
9240
+ }
8920
9241
  } else {
8921
- vals.push(Number(val));
9242
+ vals.push(val);
8922
9243
  }
9244
+ }
9245
+ if (vals.length === 0) {} else if (vals.length === 1) {
9246
+ const val = vals[0];
9247
+ json$1.type = val === null ? "null" : typeof val;
9248
+ json$1.const = val;
8923
9249
  } else {
8924
- vals.push(val);
9250
+ if (vals.every((v) => typeof v === "number")) json$1.type = "number";
9251
+ if (vals.every((v) => typeof v === "string")) json$1.type = "string";
9252
+ if (vals.every((v) => typeof v === "boolean")) json$1.type = "string";
9253
+ if (vals.every((v) => v === null)) json$1.type = "null";
9254
+ json$1.enum = vals;
8925
9255
  }
9256
+ break;
8926
9257
  }
8927
- if (vals.length === 0) {} else if (vals.length === 1) {
8928
- const val = vals[0];
8929
- json$1.type = val === null ? "null" : typeof val;
8930
- json$1.const = val;
8931
- } else {
8932
- if (vals.every((v) => typeof v === "number")) json$1.type = "number";
8933
- if (vals.every((v) => typeof v === "string")) json$1.type = "string";
8934
- if (vals.every((v) => typeof v === "boolean")) json$1.type = "string";
8935
- if (vals.every((v) => v === null)) json$1.type = "null";
8936
- json$1.enum = vals;
8937
- }
8938
- break;
8939
- }
8940
- case "file": {
8941
- const json$1 = _json;
8942
- const file$1 = {
8943
- type: "string",
8944
- format: "binary",
8945
- contentEncoding: "binary"
8946
- };
8947
- const { minimum, maximum, mime } = schema._zod.bag;
8948
- if (minimum !== undefined) file$1.minLength = minimum;
8949
- if (maximum !== undefined) file$1.maxLength = maximum;
8950
- if (mime) {
8951
- if (mime.length === 1) {
8952
- file$1.contentMediaType = mime[0];
8953
- Object.assign(json$1, file$1);
9258
+ case "file": {
9259
+ const json$1 = _json;
9260
+ const file$1 = {
9261
+ type: "string",
9262
+ format: "binary",
9263
+ contentEncoding: "binary"
9264
+ };
9265
+ const { minimum, maximum, mime } = schema._zod.bag;
9266
+ if (minimum !== undefined) file$1.minLength = minimum;
9267
+ if (maximum !== undefined) file$1.maxLength = maximum;
9268
+ if (mime) {
9269
+ if (mime.length === 1) {
9270
+ file$1.contentMediaType = mime[0];
9271
+ Object.assign(json$1, file$1);
9272
+ } else {
9273
+ json$1.anyOf = mime.map((m) => {
9274
+ const mFile = {
9275
+ ...file$1,
9276
+ contentMediaType: m
9277
+ };
9278
+ return mFile;
9279
+ });
9280
+ }
8954
9281
  } else {
8955
- json$1.anyOf = mime.map((m) => {
8956
- const mFile = {
8957
- ...file$1,
8958
- contentMediaType: m
8959
- };
8960
- return mFile;
8961
- });
9282
+ Object.assign(json$1, file$1);
8962
9283
  }
8963
- } else {
8964
- Object.assign(json$1, file$1);
9284
+ break;
8965
9285
  }
8966
- break;
8967
- }
8968
- case "transform": {
8969
- if (this.unrepresentable === "throw") {
8970
- throw new Error("Transforms cannot be represented in JSON Schema");
9286
+ case "transform": {
9287
+ if (this.unrepresentable === "throw") {
9288
+ throw new Error("Transforms cannot be represented in JSON Schema");
9289
+ }
9290
+ break;
8971
9291
  }
8972
- break;
8973
- }
8974
- case "nullable": {
8975
- const inner = this.process(def.innerType, params);
8976
- _json.anyOf = [inner, { type: "null" }];
8977
- break;
8978
- }
8979
- case "nonoptional": {
8980
- this.process(def.innerType, params);
8981
- result.ref = def.innerType;
8982
- break;
8983
- }
8984
- case "success": {
8985
- const json$1 = _json;
8986
- json$1.type = "boolean";
8987
- break;
8988
- }
8989
- case "default": {
8990
- this.process(def.innerType, params);
8991
- result.ref = def.innerType;
8992
- _json.default = def.defaultValue;
8993
- break;
8994
- }
8995
- case "prefault": {
8996
- this.process(def.innerType, params);
8997
- result.ref = def.innerType;
8998
- if (this.io === "input") _json._prefault = def.defaultValue;
8999
- break;
9000
- }
9001
- case "catch": {
9002
- this.process(def.innerType, params);
9003
- result.ref = def.innerType;
9004
- let catchValue;
9005
- try {
9006
- catchValue = def.catchValue(undefined);
9007
- } catch {
9008
- throw new Error("Dynamic catch values are not supported in JSON Schema");
9292
+ case "nullable": {
9293
+ const inner = this.process(def.innerType, params);
9294
+ _json.anyOf = [inner, { type: "null" }];
9295
+ break;
9009
9296
  }
9010
- _json.default = catchValue;
9011
- break;
9012
- }
9013
- case "nan": {
9014
- if (this.unrepresentable === "throw") {
9015
- throw new Error("NaN cannot be represented in JSON Schema");
9297
+ case "nonoptional": {
9298
+ this.process(def.innerType, params);
9299
+ result.ref = def.innerType;
9300
+ break;
9016
9301
  }
9017
- break;
9018
- }
9019
- case "template_literal": {
9020
- const json$1 = _json;
9021
- const pattern = schema._zod.pattern;
9022
- if (!pattern) throw new Error("Pattern not found in template literal");
9023
- json$1.type = "string";
9024
- json$1.pattern = pattern.source;
9025
- break;
9026
- }
9027
- case "pipe": {
9028
- const innerType = this.io === "input" ? def.in._zod.def.type === "transform" ? def.out : def.in : def.out;
9029
- this.process(innerType, params);
9030
- result.ref = innerType;
9031
- break;
9032
- }
9033
- case "readonly": {
9034
- this.process(def.innerType, params);
9035
- result.ref = def.innerType;
9036
- _json.readOnly = true;
9037
- break;
9038
- }
9039
- case "promise": {
9040
- this.process(def.innerType, params);
9041
- result.ref = def.innerType;
9042
- break;
9043
- }
9044
- case "optional": {
9045
- this.process(def.innerType, params);
9046
- result.ref = def.innerType;
9047
- break;
9048
- }
9049
- case "lazy": {
9050
- const innerType = schema._zod.innerType;
9051
- this.process(innerType, params);
9052
- result.ref = innerType;
9053
- break;
9054
- }
9055
- case "custom": {
9056
- if (this.unrepresentable === "throw") {
9057
- throw new Error("Custom types cannot be represented in JSON Schema");
9302
+ case "success": {
9303
+ const json$1 = _json;
9304
+ json$1.type = "boolean";
9305
+ break;
9306
+ }
9307
+ case "default": {
9308
+ this.process(def.innerType, params);
9309
+ result.ref = def.innerType;
9310
+ _json.default = JSON.parse(JSON.stringify(def.defaultValue));
9311
+ break;
9312
+ }
9313
+ case "prefault": {
9314
+ this.process(def.innerType, params);
9315
+ result.ref = def.innerType;
9316
+ if (this.io === "input") _json._prefault = JSON.parse(JSON.stringify(def.defaultValue));
9317
+ break;
9318
+ }
9319
+ case "catch": {
9320
+ this.process(def.innerType, params);
9321
+ result.ref = def.innerType;
9322
+ let catchValue;
9323
+ try {
9324
+ catchValue = def.catchValue(undefined);
9325
+ } catch {
9326
+ throw new Error("Dynamic catch values are not supported in JSON Schema");
9327
+ }
9328
+ _json.default = catchValue;
9329
+ break;
9330
+ }
9331
+ case "nan": {
9332
+ if (this.unrepresentable === "throw") {
9333
+ throw new Error("NaN cannot be represented in JSON Schema");
9334
+ }
9335
+ break;
9336
+ }
9337
+ case "template_literal": {
9338
+ const json$1 = _json;
9339
+ const pattern = schema._zod.pattern;
9340
+ if (!pattern) throw new Error("Pattern not found in template literal");
9341
+ json$1.type = "string";
9342
+ json$1.pattern = pattern.source;
9343
+ break;
9344
+ }
9345
+ case "pipe": {
9346
+ const innerType = this.io === "input" ? def.in._zod.def.type === "transform" ? def.out : def.in : def.out;
9347
+ this.process(innerType, params);
9348
+ result.ref = innerType;
9349
+ break;
9350
+ }
9351
+ case "readonly": {
9352
+ this.process(def.innerType, params);
9353
+ result.ref = def.innerType;
9354
+ _json.readOnly = true;
9355
+ break;
9356
+ }
9357
+ case "promise": {
9358
+ this.process(def.innerType, params);
9359
+ result.ref = def.innerType;
9360
+ break;
9361
+ }
9362
+ case "optional": {
9363
+ this.process(def.innerType, params);
9364
+ result.ref = def.innerType;
9365
+ break;
9366
+ }
9367
+ case "lazy": {
9368
+ const innerType = schema._zod.innerType;
9369
+ this.process(innerType, params);
9370
+ result.ref = innerType;
9371
+ break;
9372
+ }
9373
+ case "custom": {
9374
+ if (this.unrepresentable === "throw") {
9375
+ throw new Error("Custom types cannot be represented in JSON Schema");
9376
+ }
9377
+ break;
9378
+ }
9379
+ default: {
9380
+ def;
9058
9381
  }
9059
- break;
9060
- }
9061
- default: {
9062
- def;
9063
9382
  }
9064
9383
  }
9065
9384
  }
@@ -9086,12 +9405,15 @@ var JSONSchemaGenerator = class {
9086
9405
  const defsSegment = this.target === "draft-2020-12" ? "$defs" : "definitions";
9087
9406
  if (params.external) {
9088
9407
  const externalId = params.external.registry.get(entry[0])?.id;
9089
- if (externalId) return { ref: params.external.uri(externalId) };
9408
+ const uriGenerator = params.external.uri ?? ((id$1) => id$1);
9409
+ if (externalId) {
9410
+ return { ref: uriGenerator(externalId) };
9411
+ }
9090
9412
  const id = entry[1].defId ?? entry[1].schema.id ?? `schema${this.counter++}`;
9091
9413
  entry[1].defId = id;
9092
9414
  return {
9093
9415
  defId: id,
9094
- ref: `${params.external.uri("__shared")}#/${defsSegment}/${id}`
9416
+ ref: `${uriGenerator("__shared")}#/${defsSegment}/${id}`
9095
9417
  };
9096
9418
  }
9097
9419
  if (entry[1] === root) {
@@ -9119,6 +9441,14 @@ var JSONSchemaGenerator = class {
9119
9441
  }
9120
9442
  schema$1.$ref = ref;
9121
9443
  };
9444
+ if (params.cycles === "throw") {
9445
+ for (const entry of this.seen.entries()) {
9446
+ const seen = entry[1];
9447
+ if (seen.cycle) {
9448
+ throw new Error("Cycle detected: " + `#/${seen.cycle?.join("/")}/<root>` + "\n\nSet the `cycles` parameter to `\"ref\"` to resolve cyclical schemas with defs.");
9449
+ }
9450
+ }
9451
+ }
9122
9452
  for (const entry of this.seen.entries()) {
9123
9453
  const seen = entry[1];
9124
9454
  if (schema === entry[0]) {
@@ -9138,11 +9468,7 @@ var JSONSchemaGenerator = class {
9138
9468
  continue;
9139
9469
  }
9140
9470
  if (seen.cycle) {
9141
- if (params.cycles === "throw") {
9142
- throw new Error("Cycle detected: " + `#/${seen.cycle?.join("/")}/<root>` + "\n\nSet the `cycles` parameter to `\"ref\"` to resolve cyclical schemas with defs.");
9143
- } else if (params.cycles === "ref") {
9144
- extractToDef(entry);
9145
- }
9471
+ extractToDef(entry);
9146
9472
  continue;
9147
9473
  }
9148
9474
  if (seen.count > 1) {
@@ -9174,7 +9500,8 @@ var JSONSchemaGenerator = class {
9174
9500
  }
9175
9501
  if (!seen.isParent) this.override({
9176
9502
  zodSchema,
9177
- jsonSchema: schema$1
9503
+ jsonSchema: schema$1,
9504
+ path: seen.path ?? []
9178
9505
  });
9179
9506
  };
9180
9507
  for (const entry of [...this.seen.entries()].reverse()) {
@@ -9188,6 +9515,11 @@ var JSONSchemaGenerator = class {
9188
9515
  } else {
9189
9516
  console.warn(`Invalid target: ${this.target}`);
9190
9517
  }
9518
+ if (params.external?.uri) {
9519
+ const id = params.external.registry.get(schema)?.id;
9520
+ if (!id) throw new Error("Schema is missing an `id` property");
9521
+ result.$id = params.external.uri(id);
9522
+ }
9191
9523
  Object.assign(result, root.def);
9192
9524
  const defs = params.external?.defs ?? {};
9193
9525
  for (const entry of this.seen.entries()) {
@@ -9196,11 +9528,13 @@ var JSONSchemaGenerator = class {
9196
9528
  defs[seen.defId] = seen.def;
9197
9529
  }
9198
9530
  }
9199
- if (!params.external && Object.keys(defs).length > 0) {
9200
- if (this.target === "draft-2020-12") {
9201
- result.$defs = defs;
9202
- } else {
9203
- result.definitions = defs;
9531
+ if (params.external) {} else {
9532
+ if (Object.keys(defs).length > 0) {
9533
+ if (this.target === "draft-2020-12") {
9534
+ result.$defs = defs;
9535
+ } else {
9536
+ result.definitions = defs;
9537
+ }
9204
9538
  }
9205
9539
  }
9206
9540
  try {
@@ -9221,7 +9555,7 @@ function toJSONSchema(input, _params) {
9221
9555
  const schemas = {};
9222
9556
  const external = {
9223
9557
  registry: input,
9224
- uri: _params?.uri || ((id) => id),
9558
+ uri: _params?.uri,
9225
9559
  defs
9226
9560
  };
9227
9561
  for (const entry of input._idmap.entries()) {
@@ -9332,11 +9666,11 @@ function isTransforming(_schema, _ctx) {
9332
9666
  }
9333
9667
 
9334
9668
  //#endregion
9335
- //#region ../../node_modules/zod/dist/esm/v4/core/json-schema.js
9669
+ //#region ../../node_modules/zod/v4/core/json-schema.js
9336
9670
  var json_schema_exports = {};
9337
9671
 
9338
9672
  //#endregion
9339
- //#region ../../node_modules/zod/dist/esm/v4/core/index.js
9673
+ //#region ../../node_modules/zod/v4/core/index.js
9340
9674
  var core_exports = {};
9341
9675
  __export(core_exports, {
9342
9676
  $ZodAny: () => $ZodAny,
@@ -9375,6 +9709,7 @@ __export(core_exports, {
9375
9709
  $ZodCheckStringFormat: () => $ZodCheckStringFormat,
9376
9710
  $ZodCheckUpperCase: () => $ZodCheckUpperCase,
9377
9711
  $ZodCustom: () => $ZodCustom,
9712
+ $ZodCustomStringFormat: () => $ZodCustomStringFormat,
9378
9713
  $ZodDate: () => $ZodDate,
9379
9714
  $ZodDefault: () => $ZodDefault,
9380
9715
  $ZodDiscriminatedUnion: () => $ZodDiscriminatedUnion,
@@ -9439,6 +9774,8 @@ __export(core_exports, {
9439
9774
  Doc: () => Doc,
9440
9775
  JSONSchema: () => json_schema_exports,
9441
9776
  JSONSchemaGenerator: () => JSONSchemaGenerator,
9777
+ NEVER: () => NEVER,
9778
+ TimePrecision: () => TimePrecision,
9442
9779
  _any: () => _any,
9443
9780
  _array: () => _array,
9444
9781
  _base64: () => _base64,
@@ -9528,6 +9865,7 @@ __export(core_exports, {
9528
9865
  _size: () => _size,
9529
9866
  _startsWith: () => _startsWith,
9530
9867
  _string: () => _string,
9868
+ _stringFormat: () => _stringFormat,
9531
9869
  _stringbool: () => _stringbool,
9532
9870
  _success: () => _success,
9533
9871
  _symbol: () => _symbol,
@@ -9577,7 +9915,7 @@ __export(core_exports, {
9577
9915
  });
9578
9916
 
9579
9917
  //#endregion
9580
- //#region ../../node_modules/zod/dist/esm/v4/classic/iso.js
9918
+ //#region ../../node_modules/zod/v4/classic/iso.js
9581
9919
  var iso_exports = {};
9582
9920
  __export(iso_exports, {
9583
9921
  ZodISODate: () => ZodISODate,
@@ -9619,7 +9957,7 @@ function duration(params) {
9619
9957
  }
9620
9958
 
9621
9959
  //#endregion
9622
- //#region ../../node_modules/zod/dist/esm/v4/classic/errors.js
9960
+ //#region ../../node_modules/zod/v4/classic/errors.js
9623
9961
  const initializer = (inst, issues) => {
9624
9962
  $ZodError.init(inst, issues);
9625
9963
  inst.name = "ZodError";
@@ -9637,14 +9975,14 @@ const ZodError = $constructor("ZodError", initializer);
9637
9975
  const ZodRealError = $constructor("ZodError", initializer, { Parent: Error });
9638
9976
 
9639
9977
  //#endregion
9640
- //#region ../../node_modules/zod/dist/esm/v4/classic/parse.js
9978
+ //#region ../../node_modules/zod/v4/classic/parse.js
9641
9979
  const parse = /* @__PURE__ */ _parse(ZodRealError);
9642
9980
  const parseAsync = /* @__PURE__ */ _parseAsync(ZodRealError);
9643
9981
  const safeParse = /* @__PURE__ */ _safeParse(ZodRealError);
9644
9982
  const safeParseAsync = /* @__PURE__ */ _safeParseAsync(ZodRealError);
9645
9983
 
9646
9984
  //#endregion
9647
- //#region ../../node_modules/zod/dist/esm/v4/classic/schemas.js
9985
+ //#region ../../node_modules/zod/v4/classic/schemas.js
9648
9986
  const ZodType = /* @__PURE__ */ $constructor("ZodType", (inst, def) => {
9649
9987
  $ZodType.init(inst, def);
9650
9988
  inst.def = def;
@@ -9912,6 +10250,13 @@ const ZodJWT = /* @__PURE__ */ $constructor("ZodJWT", (inst, def) => {
9912
10250
  function jwt(params) {
9913
10251
  return _jwt(ZodJWT, params);
9914
10252
  }
10253
+ const ZodCustomStringFormat = /* @__PURE__ */ $constructor("ZodCustomStringFormat", (inst, def) => {
10254
+ $ZodCustomStringFormat.init(inst, def);
10255
+ ZodStringFormat.init(inst, def);
10256
+ });
10257
+ function stringFormat(format, fnOrRegex, _params = {}) {
10258
+ return _stringFormat(ZodCustomStringFormat, format, fnOrRegex, _params);
10259
+ }
9915
10260
  const ZodNumber = /* @__PURE__ */ $constructor("ZodNumber", (inst, def) => {
9916
10261
  $ZodNumber.init(inst, def);
9917
10262
  ZodType.init(inst, def);
@@ -10081,9 +10426,7 @@ function keyof(schema) {
10081
10426
  const ZodObject = /* @__PURE__ */ $constructor("ZodObject", (inst, def) => {
10082
10427
  $ZodObject.init(inst, def);
10083
10428
  ZodType.init(inst, def);
10084
- defineLazy(inst, "shape", () => {
10085
- return Object.fromEntries(Object.entries(inst._zod.def.shape));
10086
- });
10429
+ defineLazy(inst, "shape", () => def.shape);
10087
10430
  inst.keyof = () => _enum(Object.keys(inst._zod.def.shape));
10088
10431
  inst.catchall = (catchall) => inst.clone({
10089
10432
  ...inst._zod.def,
@@ -10528,11 +10871,8 @@ const ZodCustom = /* @__PURE__ */ $constructor("ZodCustom", (inst, def) => {
10528
10871
  $ZodCustom.init(inst, def);
10529
10872
  ZodType.init(inst, def);
10530
10873
  });
10531
- function check(fn, params) {
10532
- const ch = new $ZodCheck({
10533
- check: "custom",
10534
- ...normalizeParams(params)
10535
- });
10874
+ function check(fn) {
10875
+ const ch = new $ZodCheck({ check: "custom" });
10536
10876
  ch._zod.check = fn;
10537
10877
  return ch;
10538
10878
  }
@@ -10542,7 +10882,7 @@ function custom(fn, _params) {
10542
10882
  function refine(fn, _params = {}) {
10543
10883
  return _refine(ZodCustom, fn, _params);
10544
10884
  }
10545
- function superRefine(fn, params) {
10885
+ function superRefine(fn) {
10546
10886
  const ch = check((payload) => {
10547
10887
  payload.addIssue = (issue$1) => {
10548
10888
  if (typeof issue$1 === "string") {
@@ -10558,7 +10898,7 @@ function superRefine(fn, params) {
10558
10898
  }
10559
10899
  };
10560
10900
  return fn(payload.value, payload);
10561
- }, params);
10901
+ });
10562
10902
  return ch;
10563
10903
  }
10564
10904
  function _instanceof(cls, params = { error: `Input not instance of ${cls.name}` }) {
@@ -10596,7 +10936,7 @@ function preprocess(fn, schema) {
10596
10936
  }
10597
10937
 
10598
10938
  //#endregion
10599
- //#region ../../node_modules/zod/dist/esm/v4/classic/compat.js
10939
+ //#region ../../node_modules/zod/v4/classic/compat.js
10600
10940
  /** @deprecated Use the raw string literal codes instead, e.g. "invalid_type". */
10601
10941
  const ZodIssueCode = {
10602
10942
  invalid_type: "invalid_type",
@@ -10611,10 +10951,6 @@ const ZodIssueCode = {
10611
10951
  invalid_value: "invalid_value",
10612
10952
  custom: "custom"
10613
10953
  };
10614
- /** @deprecated Not necessary in Zod 4. */
10615
- const INVALID = Object.freeze({ status: "aborted" });
10616
- /** A special constant with type `never` */
10617
- const NEVER = INVALID;
10618
10954
  /** @deprecated Use `z.config(params)` instead. */
10619
10955
  function setErrorMap(map$1) {
10620
10956
  config({ customError: map$1 });
@@ -10625,7 +10961,7 @@ function getErrorMap() {
10625
10961
  }
10626
10962
 
10627
10963
  //#endregion
10628
- //#region ../../node_modules/zod/dist/esm/v4/classic/coerce.js
10964
+ //#region ../../node_modules/zod/v4/classic/coerce.js
10629
10965
  var coerce_exports = {};
10630
10966
  __export(coerce_exports, {
10631
10967
  bigint: () => bigint,
@@ -10651,13 +10987,14 @@ function date(params) {
10651
10987
  }
10652
10988
 
10653
10989
  //#endregion
10654
- //#region ../../node_modules/zod/dist/esm/v4/classic/external.js
10990
+ //#region ../../node_modules/zod/v4/classic/external.js
10655
10991
  var external_exports = {};
10656
10992
  __export(external_exports, {
10657
10993
  $brand: () => $brand,
10658
10994
  $input: () => $input,
10659
10995
  $output: () => $output,
10660
10996
  NEVER: () => NEVER,
10997
+ TimePrecision: () => TimePrecision,
10661
10998
  ZodAny: () => ZodAny,
10662
10999
  ZodArray: () => ZodArray,
10663
11000
  ZodBase64: () => ZodBase64,
@@ -10671,6 +11008,7 @@ __export(external_exports, {
10671
11008
  ZodCUID2: () => ZodCUID2,
10672
11009
  ZodCatch: () => ZodCatch,
10673
11010
  ZodCustom: () => ZodCustom,
11011
+ ZodCustomStringFormat: () => ZodCustomStringFormat,
10674
11012
  ZodDate: () => ZodDate,
10675
11013
  ZodDefault: () => ZodDefault,
10676
11014
  ZodDiscriminatedUnion: () => ZodDiscriminatedUnion,
@@ -10832,6 +11170,7 @@ __export(external_exports, {
10832
11170
  startsWith: () => _startsWith,
10833
11171
  strictObject: () => strictObject,
10834
11172
  string: () => string$1,
11173
+ stringFormat: () => stringFormat,
10835
11174
  stringbool: () => stringbool,
10836
11175
  success: () => success,
10837
11176
  superRefine: () => superRefine,
@@ -10862,11 +11201,11 @@ __export(external_exports, {
10862
11201
  config(en_default());
10863
11202
 
10864
11203
  //#endregion
10865
- //#region ../../node_modules/zod/dist/esm/v4/classic/index.js
11204
+ //#region ../../node_modules/zod/v4/classic/index.js
10866
11205
  var classic_default = external_exports;
10867
11206
 
10868
11207
  //#endregion
10869
- //#region ../../node_modules/zod/dist/esm/v4/index.js
11208
+ //#region ../../node_modules/zod/v4/index.js
10870
11209
  var v4_default = classic_default;
10871
11210
 
10872
11211
  //#endregion
@@ -11001,8 +11340,8 @@ var EASClient = class {
11001
11340
  };
11002
11341
  return this.deployedAddresses;
11003
11342
  } catch (err) {
11004
- const error$37 = err;
11005
- throw new Error(`Failed to deploy EAS contracts: ${error$37.message}`);
11343
+ const error$39 = err;
11344
+ throw new Error(`Failed to deploy EAS contracts: ${error$39.message}`);
11006
11345
  }
11007
11346
  }
11008
11347
  /**
@@ -11063,8 +11402,8 @@ var EASClient = class {
11063
11402
  success: true
11064
11403
  };
11065
11404
  } catch (err) {
11066
- const error$37 = err;
11067
- throw new Error(`Failed to register schema: ${error$37.message}`);
11405
+ const error$39 = err;
11406
+ throw new Error(`Failed to register schema: ${error$39.message}`);
11068
11407
  }
11069
11408
  }
11070
11409
  /**
@@ -11130,8 +11469,8 @@ var EASClient = class {
11130
11469
  success: true
11131
11470
  };
11132
11471
  } catch (err) {
11133
- const error$37 = err;
11134
- throw new Error(`Failed to create attestation: ${error$37.message}`);
11472
+ const error$39 = err;
11473
+ throw new Error(`Failed to create attestation: ${error$39.message}`);
11135
11474
  }
11136
11475
  }
11137
11476
  /**
@@ -11213,8 +11552,8 @@ var EASClient = class {
11213
11552
  success: true
11214
11553
  };
11215
11554
  } catch (err) {
11216
- const error$37 = err;
11217
- throw new Error(`Failed to create multiple attestations: ${error$37.message}`);
11555
+ const error$39 = err;
11556
+ throw new Error(`Failed to create multiple attestations: ${error$39.message}`);
11218
11557
  }
11219
11558
  }
11220
11559
  /**
@@ -11269,8 +11608,8 @@ var EASClient = class {
11269
11608
  success: true
11270
11609
  };
11271
11610
  } catch (err) {
11272
- const error$37 = err;
11273
- throw new Error(`Failed to revoke attestation: ${error$37.message}`);
11611
+ const error$39 = err;
11612
+ throw new Error(`Failed to revoke attestation: ${error$39.message}`);
11274
11613
  }
11275
11614
  }
11276
11615
  /**