@settlemint/sdk-utils 2.4.1-prb593b885 → 2.4.1-prb82519c9

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.
@@ -10,9 +10,7 @@ var __export = (target, all) => {
10
10
  };
11
11
 
12
12
  //#endregion
13
- //#region ../../node_modules/zod/v4/core/core.js
14
- /** A special constant with type `never` */
15
- const NEVER = Object.freeze({ status: "aborted" });
13
+ //#region ../../node_modules/zod/dist/esm/v4/core/core.js
16
14
  function $constructor(name, initializer$2, params) {
17
15
  function init(inst, def) {
18
16
  var _a;
@@ -63,7 +61,7 @@ function config(newConfig) {
63
61
  }
64
62
 
65
63
  //#endregion
66
- //#region ../../node_modules/zod/v4/core/util.js
64
+ //#region ../../node_modules/zod/dist/esm/v4/core/util.js
67
65
  var util_exports = {};
68
66
  __export(util_exports, {
69
67
  BIGINT_FORMAT_RANGES: () => BIGINT_FORMAT_RANGES,
@@ -78,7 +76,6 @@ __export(util_exports, {
78
76
  assertNotEqual: () => assertNotEqual,
79
77
  assignProp: () => assignProp,
80
78
  cached: () => cached,
81
- captureStackTrace: () => captureStackTrace,
82
79
  cleanEnum: () => cleanEnum,
83
80
  cleanRegex: () => cleanRegex,
84
81
  clone: () => clone,
@@ -217,14 +214,10 @@ function randomString(length = 10) {
217
214
  function esc(str) {
218
215
  return JSON.stringify(str);
219
216
  }
220
- const captureStackTrace = Error.captureStackTrace ? Error.captureStackTrace : (..._args) => {};
221
217
  function isObject(data) {
222
218
  return typeof data === "object" && data !== null && !Array.isArray(data);
223
219
  }
224
220
  const allowsEval = cached(() => {
225
- if (typeof navigator !== "undefined" && navigator?.userAgent?.includes("Cloudflare")) {
226
- return false;
227
- }
228
221
  try {
229
222
  const F = Function;
230
223
  new F("");
@@ -233,6 +226,9 @@ const allowsEval = cached(() => {
233
226
  return false;
234
227
  }
235
228
  });
229
+ function _isObject(o) {
230
+ return Object.prototype.toString.call(o) === "[object Object]";
231
+ }
236
232
  function isPlainObject(o) {
237
233
  if (isObject(o) === false) return false;
238
234
  const ctor = o.constructor;
@@ -412,9 +408,6 @@ function omit(schema, mask) {
412
408
  });
413
409
  }
414
410
  function extend(schema, shape) {
415
- if (!isPlainObject(shape)) {
416
- throw new Error("Invalid input to extend: expected a plain object");
417
- }
418
411
  const def = {
419
412
  ...schema._zod.def,
420
413
  get shape() {
@@ -502,7 +495,7 @@ function required(Class$1, schema, mask) {
502
495
  }
503
496
  function aborted(x, startIndex = 0) {
504
497
  for (let i = startIndex; i < x.issues.length; i++) {
505
- if (x.issues[i]?.continue !== true) return true;
498
+ if (x.issues[i].continue !== true) return true;
506
499
  }
507
500
  return false;
508
501
  }
@@ -566,7 +559,7 @@ var Class = class {
566
559
  };
567
560
 
568
561
  //#endregion
569
- //#region ../../node_modules/zod/v4/core/errors.js
562
+ //#region ../../node_modules/zod/dist/esm/v4/core/errors.js
570
563
  const initializer$1 = (inst, def) => {
571
564
  inst.name = "$ZodError";
572
565
  Object.defineProperty(inst, "_zod", {
@@ -583,17 +576,13 @@ const initializer$1 = (inst, def) => {
583
576
  },
584
577
  enumerable: true
585
578
  });
586
- Object.defineProperty(inst, "toString", {
587
- value: () => inst.message,
588
- enumerable: false
589
- });
590
579
  };
591
580
  const $ZodError = $constructor("$ZodError", initializer$1);
592
581
  const $ZodRealError = $constructor("$ZodError", initializer$1, { Parent: Error });
593
- function flattenError(error$39, mapper = (issue$1) => issue$1.message) {
582
+ function flattenError(error$37, mapper = (issue$1) => issue$1.message) {
594
583
  const fieldErrors = {};
595
584
  const formErrors = [];
596
- for (const sub of error$39.issues) {
585
+ for (const sub of error$37.issues) {
597
586
  if (sub.path.length > 0) {
598
587
  fieldErrors[sub.path[0]] = fieldErrors[sub.path[0]] || [];
599
588
  fieldErrors[sub.path[0]].push(mapper(sub));
@@ -606,13 +595,13 @@ function flattenError(error$39, mapper = (issue$1) => issue$1.message) {
606
595
  fieldErrors
607
596
  };
608
597
  }
609
- function formatError(error$39, _mapper) {
598
+ function formatError(error$37, _mapper) {
610
599
  const mapper = _mapper || function(issue$1) {
611
600
  return issue$1.message;
612
601
  };
613
602
  const fieldErrors = { _errors: [] };
614
- const processError = (error$40) => {
615
- for (const issue$1 of error$40.issues) {
603
+ const processError = (error$38) => {
604
+ for (const issue$1 of error$38.issues) {
616
605
  if (issue$1.code === "invalid_union" && issue$1.errors.length) {
617
606
  issue$1.errors.map((issues) => processError({ issues }));
618
607
  } else if (issue$1.code === "invalid_key") {
@@ -639,17 +628,17 @@ function formatError(error$39, _mapper) {
639
628
  }
640
629
  }
641
630
  };
642
- processError(error$39);
631
+ processError(error$37);
643
632
  return fieldErrors;
644
633
  }
645
- function treeifyError(error$39, _mapper) {
634
+ function treeifyError(error$37, _mapper) {
646
635
  const mapper = _mapper || function(issue$1) {
647
636
  return issue$1.message;
648
637
  };
649
638
  const result = { errors: [] };
650
- const processError = (error$40, path = []) => {
639
+ const processError = (error$38, path = []) => {
651
640
  var _a, _b;
652
- for (const issue$1 of error$40.issues) {
641
+ for (const issue$1 of error$38.issues) {
653
642
  if (issue$1.code === "invalid_union" && issue$1.errors.length) {
654
643
  issue$1.errors.map((issues) => processError({ issues }, issue$1.path));
655
644
  } else if (issue$1.code === "invalid_key") {
@@ -684,7 +673,7 @@ function treeifyError(error$39, _mapper) {
684
673
  }
685
674
  }
686
675
  };
687
- processError(error$39);
676
+ processError(error$37);
688
677
  return result;
689
678
  }
690
679
  /** Format a ZodError as a human-readable string in the following form.
@@ -732,9 +721,9 @@ function toDotPath(path) {
732
721
  }
733
722
  return segs.join("");
734
723
  }
735
- function prettifyError(error$39) {
724
+ function prettifyError(error$37) {
736
725
  const lines = [];
737
- const issues = [...error$39.issues].sort((a, b) => a.path.length - b.path.length);
726
+ const issues = [...error$37.issues].sort((a, b) => a.path.length - b.path.length);
738
727
  for (const issue$1 of issues) {
739
728
  lines.push(`✖ ${issue$1.message}`);
740
729
  if (issue$1.path?.length) lines.push(` → at ${toDotPath(issue$1.path)}`);
@@ -743,7 +732,7 @@ function prettifyError(error$39) {
743
732
  }
744
733
 
745
734
  //#endregion
746
- //#region ../../node_modules/zod/v4/core/parse.js
735
+ //#region ../../node_modules/zod/dist/esm/v4/core/parse.js
747
736
  const _parse = (_Err) => (schema, value, _ctx, _params) => {
748
737
  const ctx = _ctx ? Object.assign(_ctx, { async: false }) : { async: false };
749
738
  const result = schema._zod.run({
@@ -755,7 +744,7 @@ const _parse = (_Err) => (schema, value, _ctx, _params) => {
755
744
  }
756
745
  if (result.issues.length) {
757
746
  const e = new (_params?.Err ?? _Err)(result.issues.map((iss) => finalizeIssue(iss, ctx, config())));
758
- captureStackTrace(e, _params?.callee);
747
+ Error.captureStackTrace(e, _params?.callee);
759
748
  throw e;
760
749
  }
761
750
  return result.value;
@@ -770,7 +759,7 @@ const _parseAsync = (_Err) => async (schema, value, _ctx, params) => {
770
759
  if (result instanceof Promise) result = await result;
771
760
  if (result.issues.length) {
772
761
  const e = new (params?.Err ?? _Err)(result.issues.map((iss) => finalizeIssue(iss, ctx, config())));
773
- captureStackTrace(e, params?.callee);
762
+ Error.captureStackTrace(e, params?.callee);
774
763
  throw e;
775
764
  }
776
765
  return result.value;
@@ -815,9 +804,10 @@ const _safeParseAsync = (_Err) => async (schema, value, _ctx) => {
815
804
  const safeParseAsync$1 = /* @__PURE__ */ _safeParseAsync($ZodRealError);
816
805
 
817
806
  //#endregion
818
- //#region ../../node_modules/zod/v4/core/regexes.js
807
+ //#region ../../node_modules/zod/dist/esm/v4/core/regexes.js
819
808
  var regexes_exports = {};
820
809
  __export(regexes_exports, {
810
+ _emoji: () => _emoji$1,
821
811
  base64: () => base64$1,
822
812
  base64url: () => base64url$1,
823
813
  bigint: () => bigint$2,
@@ -903,23 +893,27 @@ const base64url$1 = /^[A-Za-z0-9_-]*$/;
903
893
  const hostname = /^([a-zA-Z0-9-]+\.)*[a-zA-Z0-9-]+$/;
904
894
  const domain = /^([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$/;
905
895
  const e164$1 = /^\+(?:[0-9]){6,14}[0-9]$/;
906
- 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])))`;
896
+ 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])))`;
907
897
  const date$3 = /* @__PURE__ */ new RegExp(`^${dateSource}$`);
908
898
  function timeSource(args) {
909
- const hhmm = `(?:[01]\\d|2[0-3]):[0-5]\\d`;
910
- 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+)?)?`;
899
+ let regex = `([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d`;
900
+ if (args.precision) {
901
+ regex = `${regex}\\.\\d{${args.precision}}`;
902
+ } else if (args.precision == null) {
903
+ regex = `${regex}(\\.\\d+)?`;
904
+ }
911
905
  return regex;
912
906
  }
913
907
  function time$1(args) {
914
908
  return new RegExp(`^${timeSource(args)}$`);
915
909
  }
916
910
  function datetime$1(args) {
917
- const time$2 = timeSource({ precision: args.precision });
918
- const opts = ["Z"];
919
- if (args.local) opts.push("");
920
- if (args.offset) opts.push(`([+-]\\d{2}:\\d{2})`);
921
- const timeRegex = `${time$2}(?:${opts.join("|")})`;
922
- return new RegExp(`^${dateSource}T(?:${timeRegex})$`);
911
+ let regex = `${dateSource}T${timeSource(args)}`;
912
+ const opts = [];
913
+ opts.push(args.local ? `Z?` : `Z`);
914
+ if (args.offset) opts.push(`([+-]\\d{2}:?\\d{2})`);
915
+ regex = `${regex}(${opts.join("|")})`;
916
+ return new RegExp(`^${regex}$`);
923
917
  }
924
918
  const string$2 = (params) => {
925
919
  const regex = params ? `[\\s\\S]{${params?.minimum ?? 0},${params?.maximum ?? ""}}` : `[\\s\\S]*`;
@@ -935,7 +929,7 @@ const lowercase = /^[^A-Z]*$/;
935
929
  const uppercase = /^[^a-z]*$/;
936
930
 
937
931
  //#endregion
938
- //#region ../../node_modules/zod/v4/core/checks.js
932
+ //#region ../../node_modules/zod/dist/esm/v4/core/checks.js
939
933
  const $ZodCheck = /* @__PURE__ */ $constructor("$ZodCheck", (inst, def) => {
940
934
  var _a;
941
935
  inst._zod ?? (inst._zod = {});
@@ -1126,12 +1120,11 @@ const $ZodCheckBigIntFormat = /* @__PURE__ */ $constructor("$ZodCheckBigIntForma
1126
1120
  };
1127
1121
  });
1128
1122
  const $ZodCheckMaxSize = /* @__PURE__ */ $constructor("$ZodCheckMaxSize", (inst, def) => {
1129
- var _a;
1130
1123
  $ZodCheck.init(inst, def);
1131
- (_a = inst._zod.def).when ?? (_a.when = (payload) => {
1124
+ inst._zod.when = (payload) => {
1132
1125
  const val = payload.value;
1133
1126
  return !nullish$1(val) && val.size !== undefined;
1134
- });
1127
+ };
1135
1128
  inst._zod.onattach.push((inst$1) => {
1136
1129
  const curr = inst$1._zod.bag.maximum ?? Number.POSITIVE_INFINITY;
1137
1130
  if (def.maximum < curr) inst$1._zod.bag.maximum = def.maximum;
@@ -1151,12 +1144,11 @@ const $ZodCheckMaxSize = /* @__PURE__ */ $constructor("$ZodCheckMaxSize", (inst,
1151
1144
  };
1152
1145
  });
1153
1146
  const $ZodCheckMinSize = /* @__PURE__ */ $constructor("$ZodCheckMinSize", (inst, def) => {
1154
- var _a;
1155
1147
  $ZodCheck.init(inst, def);
1156
- (_a = inst._zod.def).when ?? (_a.when = (payload) => {
1148
+ inst._zod.when = (payload) => {
1157
1149
  const val = payload.value;
1158
1150
  return !nullish$1(val) && val.size !== undefined;
1159
- });
1151
+ };
1160
1152
  inst._zod.onattach.push((inst$1) => {
1161
1153
  const curr = inst$1._zod.bag.minimum ?? Number.NEGATIVE_INFINITY;
1162
1154
  if (def.minimum > curr) inst$1._zod.bag.minimum = def.minimum;
@@ -1176,12 +1168,11 @@ const $ZodCheckMinSize = /* @__PURE__ */ $constructor("$ZodCheckMinSize", (inst,
1176
1168
  };
1177
1169
  });
1178
1170
  const $ZodCheckSizeEquals = /* @__PURE__ */ $constructor("$ZodCheckSizeEquals", (inst, def) => {
1179
- var _a;
1180
1171
  $ZodCheck.init(inst, def);
1181
- (_a = inst._zod.def).when ?? (_a.when = (payload) => {
1172
+ inst._zod.when = (payload) => {
1182
1173
  const val = payload.value;
1183
1174
  return !nullish$1(val) && val.size !== undefined;
1184
- });
1175
+ };
1185
1176
  inst._zod.onattach.push((inst$1) => {
1186
1177
  const bag = inst$1._zod.bag;
1187
1178
  bag.minimum = def.size;
@@ -1202,8 +1193,6 @@ const $ZodCheckSizeEquals = /* @__PURE__ */ $constructor("$ZodCheckSizeEquals",
1202
1193
  code: "too_small",
1203
1194
  minimum: def.size
1204
1195
  },
1205
- inclusive: true,
1206
- exact: true,
1207
1196
  input: payload.value,
1208
1197
  inst,
1209
1198
  continue: !def.abort
@@ -1211,12 +1200,11 @@ const $ZodCheckSizeEquals = /* @__PURE__ */ $constructor("$ZodCheckSizeEquals",
1211
1200
  };
1212
1201
  });
1213
1202
  const $ZodCheckMaxLength = /* @__PURE__ */ $constructor("$ZodCheckMaxLength", (inst, def) => {
1214
- var _a;
1215
1203
  $ZodCheck.init(inst, def);
1216
- (_a = inst._zod.def).when ?? (_a.when = (payload) => {
1204
+ inst._zod.when = (payload) => {
1217
1205
  const val = payload.value;
1218
1206
  return !nullish$1(val) && val.length !== undefined;
1219
- });
1207
+ };
1220
1208
  inst._zod.onattach.push((inst$1) => {
1221
1209
  const curr = inst$1._zod.bag.maximum ?? Number.POSITIVE_INFINITY;
1222
1210
  if (def.maximum < curr) inst$1._zod.bag.maximum = def.maximum;
@@ -1238,12 +1226,11 @@ const $ZodCheckMaxLength = /* @__PURE__ */ $constructor("$ZodCheckMaxLength", (i
1238
1226
  };
1239
1227
  });
1240
1228
  const $ZodCheckMinLength = /* @__PURE__ */ $constructor("$ZodCheckMinLength", (inst, def) => {
1241
- var _a;
1242
1229
  $ZodCheck.init(inst, def);
1243
- (_a = inst._zod.def).when ?? (_a.when = (payload) => {
1230
+ inst._zod.when = (payload) => {
1244
1231
  const val = payload.value;
1245
1232
  return !nullish$1(val) && val.length !== undefined;
1246
- });
1233
+ };
1247
1234
  inst._zod.onattach.push((inst$1) => {
1248
1235
  const curr = inst$1._zod.bag.minimum ?? Number.NEGATIVE_INFINITY;
1249
1236
  if (def.minimum > curr) inst$1._zod.bag.minimum = def.minimum;
@@ -1265,12 +1252,11 @@ const $ZodCheckMinLength = /* @__PURE__ */ $constructor("$ZodCheckMinLength", (i
1265
1252
  };
1266
1253
  });
1267
1254
  const $ZodCheckLengthEquals = /* @__PURE__ */ $constructor("$ZodCheckLengthEquals", (inst, def) => {
1268
- var _a;
1269
1255
  $ZodCheck.init(inst, def);
1270
- (_a = inst._zod.def).when ?? (_a.when = (payload) => {
1256
+ inst._zod.when = (payload) => {
1271
1257
  const val = payload.value;
1272
1258
  return !nullish$1(val) && val.length !== undefined;
1273
- });
1259
+ };
1274
1260
  inst._zod.onattach.push((inst$1) => {
1275
1261
  const bag = inst$1._zod.bag;
1276
1262
  bag.minimum = def.length;
@@ -1292,8 +1278,6 @@ const $ZodCheckLengthEquals = /* @__PURE__ */ $constructor("$ZodCheckLengthEqual
1292
1278
  code: "too_small",
1293
1279
  minimum: def.length
1294
1280
  },
1295
- inclusive: true,
1296
- exact: true,
1297
1281
  input: payload.value,
1298
1282
  inst,
1299
1283
  continue: !def.abort
@@ -1301,7 +1285,7 @@ const $ZodCheckLengthEquals = /* @__PURE__ */ $constructor("$ZodCheckLengthEqual
1301
1285
  };
1302
1286
  });
1303
1287
  const $ZodCheckStringFormat = /* @__PURE__ */ $constructor("$ZodCheckStringFormat", (inst, def) => {
1304
- var _a, _b;
1288
+ var _a;
1305
1289
  $ZodCheck.init(inst, def);
1306
1290
  inst._zod.onattach.push((inst$1) => {
1307
1291
  const bag = inst$1._zod.bag;
@@ -1311,7 +1295,8 @@ const $ZodCheckStringFormat = /* @__PURE__ */ $constructor("$ZodCheckStringForma
1311
1295
  bag.patterns.add(def.pattern);
1312
1296
  }
1313
1297
  });
1314
- if (def.pattern) (_a = inst._zod).check ?? (_a.check = (payload) => {
1298
+ (_a = inst._zod).check ?? (_a.check = (payload) => {
1299
+ if (!def.pattern) throw new Error("Not implemented.");
1315
1300
  def.pattern.lastIndex = 0;
1316
1301
  if (def.pattern.test(payload.value)) return;
1317
1302
  payload.issues.push({
@@ -1324,7 +1309,6 @@ const $ZodCheckStringFormat = /* @__PURE__ */ $constructor("$ZodCheckStringForma
1324
1309
  continue: !def.abort
1325
1310
  });
1326
1311
  });
1327
- else (_b = inst._zod).check ?? (_b.check = () => {});
1328
1312
  });
1329
1313
  const $ZodCheckRegex = /* @__PURE__ */ $constructor("$ZodCheckRegex", (inst, def) => {
1330
1314
  $ZodCheckStringFormat.init(inst, def);
@@ -1448,6 +1432,7 @@ const $ZodCheckMimeType = /* @__PURE__ */ $constructor("$ZodCheckMimeType", (ins
1448
1432
  code: "invalid_value",
1449
1433
  values: def.mime,
1450
1434
  input: payload.value.type,
1435
+ path: ["type"],
1451
1436
  inst
1452
1437
  });
1453
1438
  };
@@ -1460,7 +1445,7 @@ const $ZodCheckOverwrite = /* @__PURE__ */ $constructor("$ZodCheckOverwrite", (i
1460
1445
  });
1461
1446
 
1462
1447
  //#endregion
1463
- //#region ../../node_modules/zod/v4/core/doc.js
1448
+ //#region ../../node_modules/zod/dist/esm/v4/core/doc.js
1464
1449
  var Doc = class {
1465
1450
  constructor(args = []) {
1466
1451
  this.content = [];
@@ -1496,18 +1481,19 @@ var Doc = class {
1496
1481
  };
1497
1482
 
1498
1483
  //#endregion
1499
- //#region ../../node_modules/zod/v4/core/versions.js
1484
+ //#region ../../node_modules/zod/dist/esm/v4/core/versions.js
1500
1485
  const version = {
1501
1486
  major: 4,
1502
1487
  minor: 0,
1503
- patch: 2
1488
+ patch: 0
1504
1489
  };
1505
1490
 
1506
1491
  //#endregion
1507
- //#region ../../node_modules/zod/v4/core/schemas.js
1492
+ //#region ../../node_modules/zod/dist/esm/v4/core/schemas.js
1508
1493
  const $ZodType = /* @__PURE__ */ $constructor("$ZodType", (inst, def) => {
1509
1494
  var _a;
1510
1495
  inst ?? (inst = {});
1496
+ inst._zod.id = def.type + "_" + randomString(10);
1511
1497
  inst._zod.def = def;
1512
1498
  inst._zod.bag = inst._zod.bag || {};
1513
1499
  inst._zod.version = version;
@@ -1530,11 +1516,13 @@ const $ZodType = /* @__PURE__ */ $constructor("$ZodType", (inst, def) => {
1530
1516
  let isAborted = aborted(payload);
1531
1517
  let asyncResult;
1532
1518
  for (const ch of checks$1) {
1533
- if (ch._zod.def.when) {
1534
- const shouldRun = ch._zod.def.when(payload);
1519
+ if (ch._zod.when) {
1520
+ const shouldRun = ch._zod.when(payload);
1535
1521
  if (!shouldRun) continue;
1536
- } else if (isAborted) {
1537
- continue;
1522
+ } else {
1523
+ if (isAborted) {
1524
+ continue;
1525
+ }
1538
1526
  }
1539
1527
  const currLen = payload.issues.length;
1540
1528
  const _ = ch._zod.check(payload);
@@ -1634,9 +1622,7 @@ const $ZodURL = /* @__PURE__ */ $constructor("$ZodURL", (inst, def) => {
1634
1622
  $ZodStringFormat.init(inst, def);
1635
1623
  inst._zod.check = (payload) => {
1636
1624
  try {
1637
- const orig = payload.value;
1638
- const url$1 = new URL(orig);
1639
- const href = url$1.href;
1625
+ const url$1 = new URL(payload.value);
1640
1626
  if (def.hostname) {
1641
1627
  def.hostname.lastIndex = 0;
1642
1628
  if (!def.hostname.test(url$1.hostname)) {
@@ -1665,11 +1651,6 @@ const $ZodURL = /* @__PURE__ */ $constructor("$ZodURL", (inst, def) => {
1665
1651
  });
1666
1652
  }
1667
1653
  }
1668
- if (!orig.endsWith("/") && href.endsWith("/")) {
1669
- payload.value = href.slice(0, -1);
1670
- } else {
1671
- payload.value = href;
1672
- }
1673
1654
  return;
1674
1655
  } catch (_) {
1675
1656
  payload.issues.push({
@@ -1840,7 +1821,6 @@ function isValidJWT(token, algorithm = null) {
1840
1821
  const tokensParts = token.split(".");
1841
1822
  if (tokensParts.length !== 3) return false;
1842
1823
  const [header] = tokensParts;
1843
- if (!header) return false;
1844
1824
  const parsedHeader = JSON.parse(atob(header));
1845
1825
  if ("typ" in parsedHeader && parsedHeader?.typ !== "JWT") return false;
1846
1826
  if (!parsedHeader.alg) return false;
@@ -1863,19 +1843,6 @@ const $ZodJWT = /* @__PURE__ */ $constructor("$ZodJWT", (inst, def) => {
1863
1843
  });
1864
1844
  };
1865
1845
  });
1866
- const $ZodCustomStringFormat = /* @__PURE__ */ $constructor("$ZodCustomStringFormat", (inst, def) => {
1867
- $ZodStringFormat.init(inst, def);
1868
- inst._zod.check = (payload) => {
1869
- if (def.fn(payload.value)) return;
1870
- payload.issues.push({
1871
- code: "invalid_format",
1872
- format: def.format,
1873
- input: payload.value,
1874
- inst,
1875
- continue: !def.abort
1876
- });
1877
- };
1878
- });
1879
1846
  const $ZodNumber = /* @__PURE__ */ $constructor("$ZodNumber", (inst, def) => {
1880
1847
  $ZodType.init(inst, def);
1881
1848
  inst._zod.pattern = inst._zod.bag.pattern ?? number$2;
@@ -1927,11 +1894,12 @@ const $ZodBigInt = /* @__PURE__ */ $constructor("$ZodBigInt", (inst, def) => {
1927
1894
  if (def.coerce) try {
1928
1895
  payload.value = BigInt(payload.value);
1929
1896
  } catch (_) {}
1930
- if (typeof payload.value === "bigint") return payload;
1897
+ const { value: input } = payload;
1898
+ if (typeof input === "bigint") return payload;
1931
1899
  payload.issues.push({
1932
1900
  expected: "bigint",
1933
1901
  code: "invalid_type",
1934
- input: payload.value,
1902
+ input,
1935
1903
  inst
1936
1904
  });
1937
1905
  return payload;
@@ -1944,7 +1912,7 @@ const $ZodBigIntFormat = /* @__PURE__ */ $constructor("$ZodBigInt", (inst, def)
1944
1912
  const $ZodSymbol = /* @__PURE__ */ $constructor("$ZodSymbol", (inst, def) => {
1945
1913
  $ZodType.init(inst, def);
1946
1914
  inst._zod.parse = (payload, _ctx) => {
1947
- const input = payload.value;
1915
+ const { value: input } = payload;
1948
1916
  if (typeof input === "symbol") return payload;
1949
1917
  payload.issues.push({
1950
1918
  expected: "symbol",
@@ -1959,10 +1927,8 @@ const $ZodUndefined = /* @__PURE__ */ $constructor("$ZodUndefined", (inst, def)
1959
1927
  $ZodType.init(inst, def);
1960
1928
  inst._zod.pattern = _undefined$2;
1961
1929
  inst._zod.values = new Set([undefined]);
1962
- inst._zod.optin = "optional";
1963
- inst._zod.optout = "optional";
1964
1930
  inst._zod.parse = (payload, _ctx) => {
1965
- const input = payload.value;
1931
+ const { value: input } = payload;
1966
1932
  if (typeof input === "undefined") return payload;
1967
1933
  payload.issues.push({
1968
1934
  expected: "undefined",
@@ -1978,7 +1944,7 @@ const $ZodNull = /* @__PURE__ */ $constructor("$ZodNull", (inst, def) => {
1978
1944
  inst._zod.pattern = _null$2;
1979
1945
  inst._zod.values = new Set([null]);
1980
1946
  inst._zod.parse = (payload, _ctx) => {
1981
- const input = payload.value;
1947
+ const { value: input } = payload;
1982
1948
  if (input === null) return payload;
1983
1949
  payload.issues.push({
1984
1950
  expected: "null",
@@ -2012,7 +1978,7 @@ const $ZodNever = /* @__PURE__ */ $constructor("$ZodNever", (inst, def) => {
2012
1978
  const $ZodVoid = /* @__PURE__ */ $constructor("$ZodVoid", (inst, def) => {
2013
1979
  $ZodType.init(inst, def);
2014
1980
  inst._zod.parse = (payload, _ctx) => {
2015
- const input = payload.value;
1981
+ const { value: input } = payload;
2016
1982
  if (typeof input === "undefined") return payload;
2017
1983
  payload.issues.push({
2018
1984
  expected: "void",
@@ -2143,20 +2109,19 @@ const $ZodObject = /* @__PURE__ */ $constructor("$ZodObject", (inst, def) => {
2143
2109
  "payload",
2144
2110
  "ctx"
2145
2111
  ]);
2146
- const normalized = _normalized.value;
2112
+ const { keys, optionalKeys: optionalKeys$1 } = _normalized.value;
2147
2113
  const parseStr = (key) => {
2148
2114
  const k = esc(key);
2149
2115
  return `shape[${k}]._zod.run({ value: input[${k}], issues: [] }, ctx)`;
2150
2116
  };
2151
2117
  doc.write(`const input = payload.value;`);
2152
2118
  const ids = Object.create(null);
2153
- let counter = 0;
2154
- for (const key of normalized.keys) {
2155
- ids[key] = `key_${counter++}`;
2119
+ for (const key of keys) {
2120
+ ids[key] = randomString(15);
2156
2121
  }
2157
2122
  doc.write(`const newResult = {}`);
2158
- for (const key of normalized.keys) {
2159
- if (normalized.optionalKeys.has(key)) {
2123
+ for (const key of keys) {
2124
+ if (optionalKeys$1.has(key)) {
2160
2125
  const id = ids[key];
2161
2126
  doc.write(`const ${id} = ${parseStr(key)};`);
2162
2127
  const k = esc(key);
@@ -2201,7 +2166,7 @@ const $ZodObject = /* @__PURE__ */ $constructor("$ZodObject", (inst, def) => {
2201
2166
  const jit = !globalConfig.jitless;
2202
2167
  const allowsEval$1 = allowsEval;
2203
2168
  const fastEnabled = jit && allowsEval$1.value;
2204
- const catchall = def.catchall;
2169
+ const { catchall } = def;
2205
2170
  let value;
2206
2171
  inst._zod.parse = (payload, ctx) => {
2207
2172
  value ?? (value = _normalized.value);
@@ -2231,10 +2196,12 @@ const $ZodObject = /* @__PURE__ */ $constructor("$ZodObject", (inst, def) => {
2231
2196
  const isOptional = el._zod.optin === "optional" && el._zod.optout === "optional";
2232
2197
  if (r instanceof Promise) {
2233
2198
  proms.push(r.then((r$1) => isOptional ? handleOptionalObjectResult(r$1, payload, key, input) : handleObjectResult(r$1, payload, key)));
2234
- } else if (isOptional) {
2235
- handleOptionalObjectResult(r, payload, key, input);
2236
2199
  } else {
2237
- handleObjectResult(r, payload, key);
2200
+ if (isOptional) {
2201
+ handleOptionalObjectResult(r, payload, key, input);
2202
+ } else {
2203
+ handleObjectResult(r, payload, key);
2204
+ }
2238
2205
  }
2239
2206
  }
2240
2207
  }
@@ -2292,8 +2259,6 @@ function handleUnionResults(results, final, inst, ctx) {
2292
2259
  }
2293
2260
  const $ZodUnion = /* @__PURE__ */ $constructor("$ZodUnion", (inst, def) => {
2294
2261
  $ZodType.init(inst, def);
2295
- defineLazy(inst._zod, "optin", () => def.options.some((o) => o._zod.optin === "optional") ? "optional" : undefined);
2296
- defineLazy(inst._zod, "optout", () => def.options.some((o) => o._zod.optout === "optional") ? "optional" : undefined);
2297
2262
  defineLazy(inst._zod, "values", () => {
2298
2263
  if (def.options.every((o) => o._zod.values)) {
2299
2264
  return new Set(def.options.flatMap((option) => Array.from(option._zod.values)));
@@ -2393,7 +2358,7 @@ const $ZodDiscriminatedUnion = /* @__PURE__ */ $constructor("$ZodDiscriminatedUn
2393
2358
  const $ZodIntersection = /* @__PURE__ */ $constructor("$ZodIntersection", (inst, def) => {
2394
2359
  $ZodType.init(inst, def);
2395
2360
  inst._zod.parse = (payload, ctx) => {
2396
- const input = payload.value;
2361
+ const { value: input } = payload;
2397
2362
  const left = def.left._zod.run({
2398
2363
  value: input,
2399
2364
  issues: []
@@ -2850,9 +2815,6 @@ const $ZodOptional = /* @__PURE__ */ $constructor("$ZodOptional", (inst, def) =>
2850
2815
  return pattern ? new RegExp(`^(${cleanRegex(pattern.source)})?$`) : undefined;
2851
2816
  });
2852
2817
  inst._zod.parse = (payload, ctx) => {
2853
- if (def.innerType._zod.optin === "optional") {
2854
- return def.innerType._zod.run(payload, ctx);
2855
- }
2856
2818
  if (payload.value === undefined) {
2857
2819
  return payload;
2858
2820
  }
@@ -2952,7 +2914,7 @@ const $ZodSuccess = /* @__PURE__ */ $constructor("$ZodSuccess", (inst, def) => {
2952
2914
  });
2953
2915
  const $ZodCatch = /* @__PURE__ */ $constructor("$ZodCatch", (inst, def) => {
2954
2916
  $ZodType.init(inst, def);
2955
- inst._zod.optin = "optional";
2917
+ defineLazy(inst._zod, "optin", () => def.innerType._zod.optin);
2956
2918
  defineLazy(inst._zod, "optout", () => def.innerType._zod.optout);
2957
2919
  defineLazy(inst._zod, "values", () => def.innerType._zod.values);
2958
2920
  inst._zod.parse = (payload, ctx) => {
@@ -3023,7 +2985,6 @@ function handlePipeResult(left, def, ctx) {
3023
2985
  const $ZodReadonly = /* @__PURE__ */ $constructor("$ZodReadonly", (inst, def) => {
3024
2986
  $ZodType.init(inst, def);
3025
2987
  defineLazy(inst._zod, "propValues", () => def.innerType._zod.propValues);
3026
- defineLazy(inst._zod, "values", () => def.innerType._zod.values);
3027
2988
  defineLazy(inst._zod, "optin", () => def.innerType._zod.optin);
3028
2989
  defineLazy(inst._zod, "optout", () => def.innerType._zod.optout);
3029
2990
  inst._zod.parse = (payload, ctx) => {
@@ -3074,7 +3035,7 @@ const $ZodTemplateLiteral = /* @__PURE__ */ $constructor("$ZodTemplateLiteral",
3074
3035
  input: payload.value,
3075
3036
  inst,
3076
3037
  code: "invalid_format",
3077
- format: def.format ?? "template_literal",
3038
+ format: "template_literal",
3078
3039
  pattern: inst._zod.pattern.source
3079
3040
  });
3080
3041
  return payload;
@@ -3134,8 +3095,8 @@ function handleRefineResult(result, payload, input, inst) {
3134
3095
  }
3135
3096
 
3136
3097
  //#endregion
3137
- //#region ../../node_modules/zod/v4/locales/ar.js
3138
- const error$38 = () => {
3098
+ //#region ../../node_modules/zod/dist/esm/v4/locales/ar.js
3099
+ const error$36 = () => {
3139
3100
  const Sizable = {
3140
3101
  string: {
3141
3102
  unit: "حرف",
@@ -3157,7 +3118,7 @@ const error$38 = () => {
3157
3118
  function getSizing(origin) {
3158
3119
  return Sizable[origin] ?? null;
3159
3120
  }
3160
- const parsedType$3 = (data) => {
3121
+ const parsedType$2 = (data) => {
3161
3122
  const t = typeof data;
3162
3123
  switch (t) {
3163
3124
  case "number": {
@@ -3209,7 +3170,7 @@ const error$38 = () => {
3209
3170
  };
3210
3171
  return (issue$1) => {
3211
3172
  switch (issue$1.code) {
3212
- case "invalid_type": return `مدخلات غير مقبولة: يفترض إدخال ${issue$1.expected}، ولكن تم إدخال ${parsedType$3(issue$1.input)}`;
3173
+ case "invalid_type": return `مدخلات غير مقبولة: يفترض إدخال ${issue$1.expected}، ولكن تم إدخال ${parsedType$2(issue$1.input)}`;
3213
3174
  case "invalid_value":
3214
3175
  if (issue$1.values.length === 1) return `مدخلات غير مقبولة: يفترض إدخال ${stringifyPrimitive(issue$1.values[0])}`;
3215
3176
  return `اختيار غير مقبول: يتوقع انتقاء أحد هذه الخيارات: ${joinValues(issue$1.values, "|")}`;
@@ -3245,12 +3206,12 @@ const error$38 = () => {
3245
3206
  };
3246
3207
  };
3247
3208
  function ar_default() {
3248
- return { localeError: error$38() };
3209
+ return { localeError: error$36() };
3249
3210
  }
3250
3211
 
3251
3212
  //#endregion
3252
- //#region ../../node_modules/zod/v4/locales/az.js
3253
- const error$37 = () => {
3213
+ //#region ../../node_modules/zod/dist/esm/v4/locales/az.js
3214
+ const error$35 = () => {
3254
3215
  const Sizable = {
3255
3216
  string: {
3256
3217
  unit: "simvol",
@@ -3272,7 +3233,7 @@ const error$37 = () => {
3272
3233
  function getSizing(origin) {
3273
3234
  return Sizable[origin] ?? null;
3274
3235
  }
3275
- const parsedType$3 = (data) => {
3236
+ const parsedType$2 = (data) => {
3276
3237
  const t = typeof data;
3277
3238
  switch (t) {
3278
3239
  case "number": {
@@ -3324,7 +3285,7 @@ const error$37 = () => {
3324
3285
  };
3325
3286
  return (issue$1) => {
3326
3287
  switch (issue$1.code) {
3327
- case "invalid_type": return `Yanlış dəyər: gözlənilən ${issue$1.expected}, daxil olan ${parsedType$3(issue$1.input)}`;
3288
+ case "invalid_type": return `Yanlış dəyər: gözlənilən ${issue$1.expected}, daxil olan ${parsedType$2(issue$1.input)}`;
3328
3289
  case "invalid_value":
3329
3290
  if (issue$1.values.length === 1) return `Yanlış dəyər: gözlənilən ${stringifyPrimitive(issue$1.values[0])}`;
3330
3291
  return `Yanlış seçim: aşağıdakılardan biri olmalıdır: ${joinValues(issue$1.values, "|")}`;
@@ -3358,11 +3319,11 @@ const error$37 = () => {
3358
3319
  };
3359
3320
  };
3360
3321
  function az_default() {
3361
- return { localeError: error$37() };
3322
+ return { localeError: error$35() };
3362
3323
  }
3363
3324
 
3364
3325
  //#endregion
3365
- //#region ../../node_modules/zod/v4/locales/be.js
3326
+ //#region ../../node_modules/zod/dist/esm/v4/locales/be.js
3366
3327
  function getBelarusianPlural(count, one, few, many) {
3367
3328
  const absCount = Math.abs(count);
3368
3329
  const lastDigit = absCount % 10;
@@ -3378,7 +3339,7 @@ function getBelarusianPlural(count, one, few, many) {
3378
3339
  }
3379
3340
  return many;
3380
3341
  }
3381
- const error$36 = () => {
3342
+ const error$34 = () => {
3382
3343
  const Sizable = {
3383
3344
  string: {
3384
3345
  unit: {
@@ -3416,7 +3377,7 @@ const error$36 = () => {
3416
3377
  function getSizing(origin) {
3417
3378
  return Sizable[origin] ?? null;
3418
3379
  }
3419
- const parsedType$3 = (data) => {
3380
+ const parsedType$2 = (data) => {
3420
3381
  const t = typeof data;
3421
3382
  switch (t) {
3422
3383
  case "number": {
@@ -3468,7 +3429,7 @@ const error$36 = () => {
3468
3429
  };
3469
3430
  return (issue$1) => {
3470
3431
  switch (issue$1.code) {
3471
- case "invalid_type": return `Няправільны ўвод: чакаўся ${issue$1.expected}, атрымана ${parsedType$3(issue$1.input)}`;
3432
+ case "invalid_type": return `Няправільны ўвод: чакаўся ${issue$1.expected}, атрымана ${parsedType$2(issue$1.input)}`;
3472
3433
  case "invalid_value":
3473
3434
  if (issue$1.values.length === 1) return `Няправільны ўвод: чакалася ${stringifyPrimitive(issue$1.values[0])}`;
3474
3435
  return `Няправільны варыянт: чакаўся адзін з ${joinValues(issue$1.values, "|")}`;
@@ -3510,12 +3471,12 @@ const error$36 = () => {
3510
3471
  };
3511
3472
  };
3512
3473
  function be_default() {
3513
- return { localeError: error$36() };
3474
+ return { localeError: error$34() };
3514
3475
  }
3515
3476
 
3516
3477
  //#endregion
3517
- //#region ../../node_modules/zod/v4/locales/ca.js
3518
- const error$35 = () => {
3478
+ //#region ../../node_modules/zod/dist/esm/v4/locales/ca.js
3479
+ const error$33 = () => {
3519
3480
  const Sizable = {
3520
3481
  string: {
3521
3482
  unit: "caràcters",
@@ -3537,7 +3498,7 @@ const error$35 = () => {
3537
3498
  function getSizing(origin) {
3538
3499
  return Sizable[origin] ?? null;
3539
3500
  }
3540
- const parsedType$3 = (data) => {
3501
+ const parsedType$2 = (data) => {
3541
3502
  const t = typeof data;
3542
3503
  switch (t) {
3543
3504
  case "number": {
@@ -3589,7 +3550,7 @@ const error$35 = () => {
3589
3550
  };
3590
3551
  return (issue$1) => {
3591
3552
  switch (issue$1.code) {
3592
- case "invalid_type": return `Tipus invàlid: s'esperava ${issue$1.expected}, s'ha rebut ${parsedType$3(issue$1.input)}`;
3553
+ case "invalid_type": return `Tipus invàlid: s'esperava ${issue$1.expected}, s'ha rebut ${parsedType$2(issue$1.input)}`;
3593
3554
  case "invalid_value":
3594
3555
  if (issue$1.values.length === 1) return `Valor invàlid: s'esperava ${stringifyPrimitive(issue$1.values[0])}`;
3595
3556
  return `Opció invàlida: s'esperava una de ${joinValues(issue$1.values, " o ")}`;
@@ -3627,12 +3588,12 @@ const error$35 = () => {
3627
3588
  };
3628
3589
  };
3629
3590
  function ca_default() {
3630
- return { localeError: error$35() };
3591
+ return { localeError: error$33() };
3631
3592
  }
3632
3593
 
3633
3594
  //#endregion
3634
- //#region ../../node_modules/zod/v4/locales/cs.js
3635
- const error$34 = () => {
3595
+ //#region ../../node_modules/zod/dist/esm/v4/locales/cs.js
3596
+ const error$32 = () => {
3636
3597
  const Sizable = {
3637
3598
  string: {
3638
3599
  unit: "znaků",
@@ -3654,7 +3615,7 @@ const error$34 = () => {
3654
3615
  function getSizing(origin) {
3655
3616
  return Sizable[origin] ?? null;
3656
3617
  }
3657
- const parsedType$3 = (data) => {
3618
+ const parsedType$2 = (data) => {
3658
3619
  const t = typeof data;
3659
3620
  switch (t) {
3660
3621
  case "number": {
@@ -3724,7 +3685,7 @@ const error$34 = () => {
3724
3685
  };
3725
3686
  return (issue$1) => {
3726
3687
  switch (issue$1.code) {
3727
- case "invalid_type": return `Neplatný vstup: očekáváno ${issue$1.expected}, obdrženo ${parsedType$3(issue$1.input)}`;
3688
+ case "invalid_type": return `Neplatný vstup: očekáváno ${issue$1.expected}, obdrženo ${parsedType$2(issue$1.input)}`;
3728
3689
  case "invalid_value":
3729
3690
  if (issue$1.values.length === 1) return `Neplatný vstup: očekáváno ${stringifyPrimitive(issue$1.values[0])}`;
3730
3691
  return `Neplatná možnost: očekávána jedna z hodnot ${joinValues(issue$1.values, "|")}`;
@@ -3762,12 +3723,12 @@ const error$34 = () => {
3762
3723
  };
3763
3724
  };
3764
3725
  function cs_default() {
3765
- return { localeError: error$34() };
3726
+ return { localeError: error$32() };
3766
3727
  }
3767
3728
 
3768
3729
  //#endregion
3769
- //#region ../../node_modules/zod/v4/locales/de.js
3770
- const error$33 = () => {
3730
+ //#region ../../node_modules/zod/dist/esm/v4/locales/de.js
3731
+ const error$31 = () => {
3771
3732
  const Sizable = {
3772
3733
  string: {
3773
3734
  unit: "Zeichen",
@@ -3789,7 +3750,7 @@ const error$33 = () => {
3789
3750
  function getSizing(origin) {
3790
3751
  return Sizable[origin] ?? null;
3791
3752
  }
3792
- const parsedType$3 = (data) => {
3753
+ const parsedType$2 = (data) => {
3793
3754
  const t = typeof data;
3794
3755
  switch (t) {
3795
3756
  case "number": {
@@ -3841,7 +3802,7 @@ const error$33 = () => {
3841
3802
  };
3842
3803
  return (issue$1) => {
3843
3804
  switch (issue$1.code) {
3844
- case "invalid_type": return `Ungültige Eingabe: erwartet ${issue$1.expected}, erhalten ${parsedType$3(issue$1.input)}`;
3805
+ case "invalid_type": return `Ungültige Eingabe: erwartet ${issue$1.expected}, erhalten ${parsedType$2(issue$1.input)}`;
3845
3806
  case "invalid_value":
3846
3807
  if (issue$1.values.length === 1) return `Ungültige Eingabe: erwartet ${stringifyPrimitive(issue$1.values[0])}`;
3847
3808
  return `Ungültige Option: erwartet eine von ${joinValues(issue$1.values, "|")}`;
@@ -3877,12 +3838,12 @@ const error$33 = () => {
3877
3838
  };
3878
3839
  };
3879
3840
  function de_default() {
3880
- return { localeError: error$33() };
3841
+ return { localeError: error$31() };
3881
3842
  }
3882
3843
 
3883
3844
  //#endregion
3884
- //#region ../../node_modules/zod/v4/locales/en.js
3885
- const parsedType$2 = (data) => {
3845
+ //#region ../../node_modules/zod/dist/esm/v4/locales/en.js
3846
+ const parsedType$1 = (data) => {
3886
3847
  const t = typeof data;
3887
3848
  switch (t) {
3888
3849
  case "number": {
@@ -3902,7 +3863,7 @@ const parsedType$2 = (data) => {
3902
3863
  }
3903
3864
  return t;
3904
3865
  };
3905
- const error$32 = () => {
3866
+ const error$30 = () => {
3906
3867
  const Sizable = {
3907
3868
  string: {
3908
3869
  unit: "characters",
@@ -3956,7 +3917,7 @@ const error$32 = () => {
3956
3917
  };
3957
3918
  return (issue$1) => {
3958
3919
  switch (issue$1.code) {
3959
- case "invalid_type": return `Invalid input: expected ${issue$1.expected}, received ${parsedType$2(issue$1.input)}`;
3920
+ case "invalid_type": return `Invalid input: expected ${issue$1.expected}, received ${parsedType$1(issue$1.input)}`;
3960
3921
  case "invalid_value":
3961
3922
  if (issue$1.values.length === 1) return `Invalid input: expected ${stringifyPrimitive(issue$1.values[0])}`;
3962
3923
  return `Invalid option: expected one of ${joinValues(issue$1.values, "|")}`;
@@ -3994,127 +3955,12 @@ const error$32 = () => {
3994
3955
  };
3995
3956
  };
3996
3957
  function en_default() {
3997
- return { localeError: error$32() };
3998
- }
3999
-
4000
- //#endregion
4001
- //#region ../../node_modules/zod/v4/locales/eo.js
4002
- const parsedType$1 = (data) => {
4003
- const t = typeof data;
4004
- switch (t) {
4005
- case "number": {
4006
- return Number.isNaN(data) ? "NaN" : "nombro";
4007
- }
4008
- case "object": {
4009
- if (Array.isArray(data)) {
4010
- return "tabelo";
4011
- }
4012
- if (data === null) {
4013
- return "senvalora";
4014
- }
4015
- if (Object.getPrototypeOf(data) !== Object.prototype && data.constructor) {
4016
- return data.constructor.name;
4017
- }
4018
- }
4019
- }
4020
- return t;
4021
- };
4022
- const error$31 = () => {
4023
- const Sizable = {
4024
- string: {
4025
- unit: "karaktrojn",
4026
- verb: "havi"
4027
- },
4028
- file: {
4029
- unit: "bajtojn",
4030
- verb: "havi"
4031
- },
4032
- array: {
4033
- unit: "elementojn",
4034
- verb: "havi"
4035
- },
4036
- set: {
4037
- unit: "elementojn",
4038
- verb: "havi"
4039
- }
4040
- };
4041
- function getSizing(origin) {
4042
- return Sizable[origin] ?? null;
4043
- }
4044
- const Nouns = {
4045
- regex: "enigo",
4046
- email: "retadreso",
4047
- url: "URL",
4048
- emoji: "emoĝio",
4049
- uuid: "UUID",
4050
- uuidv4: "UUIDv4",
4051
- uuidv6: "UUIDv6",
4052
- nanoid: "nanoid",
4053
- guid: "GUID",
4054
- cuid: "cuid",
4055
- cuid2: "cuid2",
4056
- ulid: "ULID",
4057
- xid: "XID",
4058
- ksuid: "KSUID",
4059
- datetime: "ISO-datotempo",
4060
- date: "ISO-dato",
4061
- time: "ISO-tempo",
4062
- duration: "ISO-daŭro",
4063
- ipv4: "IPv4-adreso",
4064
- ipv6: "IPv6-adreso",
4065
- cidrv4: "IPv4-rango",
4066
- cidrv6: "IPv6-rango",
4067
- base64: "64-ume kodita karaktraro",
4068
- base64url: "URL-64-ume kodita karaktraro",
4069
- json_string: "JSON-karaktraro",
4070
- e164: "E.164-nombro",
4071
- jwt: "JWT",
4072
- template_literal: "enigo"
4073
- };
4074
- return (issue$1) => {
4075
- switch (issue$1.code) {
4076
- case "invalid_type": return `Nevalida enigo: atendiĝis ${issue$1.expected}, riceviĝis ${parsedType$1(issue$1.input)}`;
4077
- case "invalid_value":
4078
- if (issue$1.values.length === 1) return `Nevalida enigo: atendiĝis ${stringifyPrimitive(issue$1.values[0])}`;
4079
- return `Nevalida opcio: atendiĝis unu el ${joinValues(issue$1.values, "|")}`;
4080
- case "too_big": {
4081
- const adj = issue$1.inclusive ? "<=" : "<";
4082
- const sizing = getSizing(issue$1.origin);
4083
- if (sizing) return `Tro granda: atendiĝis ke ${issue$1.origin ?? "valoro"} havu ${adj}${issue$1.maximum.toString()} ${sizing.unit ?? "elementojn"}`;
4084
- return `Tro granda: atendiĝis ke ${issue$1.origin ?? "valoro"} havu ${adj}${issue$1.maximum.toString()}`;
4085
- }
4086
- case "too_small": {
4087
- const adj = issue$1.inclusive ? ">=" : ">";
4088
- const sizing = getSizing(issue$1.origin);
4089
- if (sizing) {
4090
- return `Tro malgranda: atendiĝis ke ${issue$1.origin} havu ${adj}${issue$1.minimum.toString()} ${sizing.unit}`;
4091
- }
4092
- return `Tro malgranda: atendiĝis ke ${issue$1.origin} estu ${adj}${issue$1.minimum.toString()}`;
4093
- }
4094
- case "invalid_format": {
4095
- const _issue = issue$1;
4096
- if (_issue.format === "starts_with") return `Nevalida karaktraro: devas komenciĝi per "${_issue.prefix}"`;
4097
- if (_issue.format === "ends_with") return `Nevalida karaktraro: devas finiĝi per "${_issue.suffix}"`;
4098
- if (_issue.format === "includes") return `Nevalida karaktraro: devas inkluzivi "${_issue.includes}"`;
4099
- if (_issue.format === "regex") return `Nevalida karaktraro: devas kongrui kun la modelo ${_issue.pattern}`;
4100
- return `Nevalida ${Nouns[_issue.format] ?? issue$1.format}`;
4101
- }
4102
- case "not_multiple_of": return `Nevalida nombro: devas esti oblo de ${issue$1.divisor}`;
4103
- case "unrecognized_keys": return `Nekonata${issue$1.keys.length > 1 ? "j" : ""} ŝlosilo${issue$1.keys.length > 1 ? "j" : ""}: ${joinValues(issue$1.keys, ", ")}`;
4104
- case "invalid_key": return `Nevalida ŝlosilo en ${issue$1.origin}`;
4105
- case "invalid_union": return "Nevalida enigo";
4106
- case "invalid_element": return `Nevalida valoro en ${issue$1.origin}`;
4107
- default: return `Nevalida enigo`;
4108
- }
4109
- };
4110
- };
4111
- function eo_default() {
4112
- return { localeError: error$31() };
3958
+ return { localeError: error$30() };
4113
3959
  }
4114
3960
 
4115
3961
  //#endregion
4116
- //#region ../../node_modules/zod/v4/locales/es.js
4117
- const error$30 = () => {
3962
+ //#region ../../node_modules/zod/dist/esm/v4/locales/es.js
3963
+ const error$29 = () => {
4118
3964
  const Sizable = {
4119
3965
  string: {
4120
3966
  unit: "caracteres",
@@ -4136,7 +3982,7 @@ const error$30 = () => {
4136
3982
  function getSizing(origin) {
4137
3983
  return Sizable[origin] ?? null;
4138
3984
  }
4139
- const parsedType$3 = (data) => {
3985
+ const parsedType$2 = (data) => {
4140
3986
  const t = typeof data;
4141
3987
  switch (t) {
4142
3988
  case "number": {
@@ -4188,7 +4034,7 @@ const error$30 = () => {
4188
4034
  };
4189
4035
  return (issue$1) => {
4190
4036
  switch (issue$1.code) {
4191
- case "invalid_type": return `Entrada inválida: se esperaba ${issue$1.expected}, recibido ${parsedType$3(issue$1.input)}`;
4037
+ case "invalid_type": return `Entrada inválida: se esperaba ${issue$1.expected}, recibido ${parsedType$2(issue$1.input)}`;
4192
4038
  case "invalid_value":
4193
4039
  if (issue$1.values.length === 1) return `Entrada inválida: se esperaba ${stringifyPrimitive(issue$1.values[0])}`;
4194
4040
  return `Opción inválida: se esperaba una de ${joinValues(issue$1.values, "|")}`;
@@ -4224,12 +4070,12 @@ const error$30 = () => {
4224
4070
  };
4225
4071
  };
4226
4072
  function es_default() {
4227
- return { localeError: error$30() };
4073
+ return { localeError: error$29() };
4228
4074
  }
4229
4075
 
4230
4076
  //#endregion
4231
- //#region ../../node_modules/zod/v4/locales/fa.js
4232
- const error$29 = () => {
4077
+ //#region ../../node_modules/zod/dist/esm/v4/locales/fa.js
4078
+ const error$28 = () => {
4233
4079
  const Sizable = {
4234
4080
  string: {
4235
4081
  unit: "کاراکتر",
@@ -4251,7 +4097,7 @@ const error$29 = () => {
4251
4097
  function getSizing(origin) {
4252
4098
  return Sizable[origin] ?? null;
4253
4099
  }
4254
- const parsedType$3 = (data) => {
4100
+ const parsedType$2 = (data) => {
4255
4101
  const t = typeof data;
4256
4102
  switch (t) {
4257
4103
  case "number": {
@@ -4303,7 +4149,7 @@ const error$29 = () => {
4303
4149
  };
4304
4150
  return (issue$1) => {
4305
4151
  switch (issue$1.code) {
4306
- case "invalid_type": return `ورودی نامعتبر: می‌بایست ${issue$1.expected} می‌بود، ${parsedType$3(issue$1.input)} دریافت شد`;
4152
+ case "invalid_type": return `ورودی نامعتبر: می‌بایست ${issue$1.expected} می‌بود، ${parsedType$2(issue$1.input)} دریافت شد`;
4307
4153
  case "invalid_value":
4308
4154
  if (issue$1.values.length === 1) {
4309
4155
  return `ورودی نامعتبر: می‌بایست ${stringifyPrimitive(issue$1.values[0])} می‌بود`;
@@ -4351,12 +4197,12 @@ const error$29 = () => {
4351
4197
  };
4352
4198
  };
4353
4199
  function fa_default() {
4354
- return { localeError: error$29() };
4200
+ return { localeError: error$28() };
4355
4201
  }
4356
4202
 
4357
4203
  //#endregion
4358
- //#region ../../node_modules/zod/v4/locales/fi.js
4359
- const error$28 = () => {
4204
+ //#region ../../node_modules/zod/dist/esm/v4/locales/fi.js
4205
+ const error$27 = () => {
4360
4206
  const Sizable = {
4361
4207
  string: {
4362
4208
  unit: "merkkiä",
@@ -4394,7 +4240,7 @@ const error$28 = () => {
4394
4240
  function getSizing(origin) {
4395
4241
  return Sizable[origin] ?? null;
4396
4242
  }
4397
- const parsedType$3 = (data) => {
4243
+ const parsedType$2 = (data) => {
4398
4244
  const t = typeof data;
4399
4245
  switch (t) {
4400
4246
  case "number": {
@@ -4446,7 +4292,7 @@ const error$28 = () => {
4446
4292
  };
4447
4293
  return (issue$1) => {
4448
4294
  switch (issue$1.code) {
4449
- case "invalid_type": return `Virheellinen tyyppi: odotettiin ${issue$1.expected}, oli ${parsedType$3(issue$1.input)}`;
4295
+ case "invalid_type": return `Virheellinen tyyppi: odotettiin ${issue$1.expected}, oli ${parsedType$2(issue$1.input)}`;
4450
4296
  case "invalid_value":
4451
4297
  if (issue$1.values.length === 1) return `Virheellinen syöte: täytyy olla ${stringifyPrimitive(issue$1.values[0])}`;
4452
4298
  return `Virheellinen valinta: täytyy olla yksi seuraavista: ${joinValues(issue$1.values, "|")}`;
@@ -4486,12 +4332,12 @@ const error$28 = () => {
4486
4332
  };
4487
4333
  };
4488
4334
  function fi_default() {
4489
- return { localeError: error$28() };
4335
+ return { localeError: error$27() };
4490
4336
  }
4491
4337
 
4492
4338
  //#endregion
4493
- //#region ../../node_modules/zod/v4/locales/fr.js
4494
- const error$27 = () => {
4339
+ //#region ../../node_modules/zod/dist/esm/v4/locales/fr.js
4340
+ const error$26 = () => {
4495
4341
  const Sizable = {
4496
4342
  string: {
4497
4343
  unit: "caractères",
@@ -4513,7 +4359,7 @@ const error$27 = () => {
4513
4359
  function getSizing(origin) {
4514
4360
  return Sizable[origin] ?? null;
4515
4361
  }
4516
- const parsedType$3 = (data) => {
4362
+ const parsedType$2 = (data) => {
4517
4363
  const t = typeof data;
4518
4364
  switch (t) {
4519
4365
  case "number": {
@@ -4565,7 +4411,7 @@ const error$27 = () => {
4565
4411
  };
4566
4412
  return (issue$1) => {
4567
4413
  switch (issue$1.code) {
4568
- case "invalid_type": return `Entrée invalide : ${issue$1.expected} attendu, ${parsedType$3(issue$1.input)} reçu`;
4414
+ case "invalid_type": return `Entrée invalide : ${issue$1.expected} attendu, ${parsedType$2(issue$1.input)} reçu`;
4569
4415
  case "invalid_value":
4570
4416
  if (issue$1.values.length === 1) return `Entrée invalide : ${stringifyPrimitive(issue$1.values[0])} attendu`;
4571
4417
  return `Option invalide : une valeur parmi ${joinValues(issue$1.values, "|")} attendue`;
@@ -4601,12 +4447,12 @@ const error$27 = () => {
4601
4447
  };
4602
4448
  };
4603
4449
  function fr_default() {
4604
- return { localeError: error$27() };
4450
+ return { localeError: error$26() };
4605
4451
  }
4606
4452
 
4607
4453
  //#endregion
4608
- //#region ../../node_modules/zod/v4/locales/fr-CA.js
4609
- const error$26 = () => {
4454
+ //#region ../../node_modules/zod/dist/esm/v4/locales/fr-CA.js
4455
+ const error$25 = () => {
4610
4456
  const Sizable = {
4611
4457
  string: {
4612
4458
  unit: "caractères",
@@ -4628,7 +4474,7 @@ const error$26 = () => {
4628
4474
  function getSizing(origin) {
4629
4475
  return Sizable[origin] ?? null;
4630
4476
  }
4631
- const parsedType$3 = (data) => {
4477
+ const parsedType$2 = (data) => {
4632
4478
  const t = typeof data;
4633
4479
  switch (t) {
4634
4480
  case "number": {
@@ -4680,7 +4526,7 @@ const error$26 = () => {
4680
4526
  };
4681
4527
  return (issue$1) => {
4682
4528
  switch (issue$1.code) {
4683
- case "invalid_type": return `Entrée invalide : attendu ${issue$1.expected}, reçu ${parsedType$3(issue$1.input)}`;
4529
+ case "invalid_type": return `Entrée invalide : attendu ${issue$1.expected}, reçu ${parsedType$2(issue$1.input)}`;
4684
4530
  case "invalid_value":
4685
4531
  if (issue$1.values.length === 1) return `Entrée invalide : attendu ${stringifyPrimitive(issue$1.values[0])}`;
4686
4532
  return `Option invalide : attendu l'une des valeurs suivantes ${joinValues(issue$1.values, "|")}`;
@@ -4718,12 +4564,12 @@ const error$26 = () => {
4718
4564
  };
4719
4565
  };
4720
4566
  function fr_CA_default() {
4721
- return { localeError: error$26() };
4567
+ return { localeError: error$25() };
4722
4568
  }
4723
4569
 
4724
4570
  //#endregion
4725
- //#region ../../node_modules/zod/v4/locales/he.js
4726
- const error$25 = () => {
4571
+ //#region ../../node_modules/zod/dist/esm/v4/locales/he.js
4572
+ const error$24 = () => {
4727
4573
  const Sizable = {
4728
4574
  string: {
4729
4575
  unit: "אותיות",
@@ -4745,7 +4591,7 @@ const error$25 = () => {
4745
4591
  function getSizing(origin) {
4746
4592
  return Sizable[origin] ?? null;
4747
4593
  }
4748
- const parsedType$3 = (data) => {
4594
+ const parsedType$2 = (data) => {
4749
4595
  const t = typeof data;
4750
4596
  switch (t) {
4751
4597
  case "number": {
@@ -4797,7 +4643,7 @@ const error$25 = () => {
4797
4643
  };
4798
4644
  return (issue$1) => {
4799
4645
  switch (issue$1.code) {
4800
- case "invalid_type": return `קלט לא תקין: צריך ${issue$1.expected}, התקבל ${parsedType$3(issue$1.input)}`;
4646
+ case "invalid_type": return `קלט לא תקין: צריך ${issue$1.expected}, התקבל ${parsedType$2(issue$1.input)}`;
4801
4647
  case "invalid_value":
4802
4648
  if (issue$1.values.length === 1) return `קלט לא תקין: צריך ${stringifyPrimitive(issue$1.values[0])}`;
4803
4649
  return `קלט לא תקין: צריך אחת מהאפשרויות ${joinValues(issue$1.values, "|")}`;
@@ -4833,12 +4679,12 @@ const error$25 = () => {
4833
4679
  };
4834
4680
  };
4835
4681
  function he_default() {
4836
- return { localeError: error$25() };
4682
+ return { localeError: error$24() };
4837
4683
  }
4838
4684
 
4839
4685
  //#endregion
4840
- //#region ../../node_modules/zod/v4/locales/hu.js
4841
- const error$24 = () => {
4686
+ //#region ../../node_modules/zod/dist/esm/v4/locales/hu.js
4687
+ const error$23 = () => {
4842
4688
  const Sizable = {
4843
4689
  string: {
4844
4690
  unit: "karakter",
@@ -4860,7 +4706,7 @@ const error$24 = () => {
4860
4706
  function getSizing(origin) {
4861
4707
  return Sizable[origin] ?? null;
4862
4708
  }
4863
- const parsedType$3 = (data) => {
4709
+ const parsedType$2 = (data) => {
4864
4710
  const t = typeof data;
4865
4711
  switch (t) {
4866
4712
  case "number": {
@@ -4912,7 +4758,7 @@ const error$24 = () => {
4912
4758
  };
4913
4759
  return (issue$1) => {
4914
4760
  switch (issue$1.code) {
4915
- case "invalid_type": return `Érvénytelen bemenet: a várt érték ${issue$1.expected}, a kapott érték ${parsedType$3(issue$1.input)}`;
4761
+ case "invalid_type": return `Érvénytelen bemenet: a várt érték ${issue$1.expected}, a kapott érték ${parsedType$2(issue$1.input)}`;
4916
4762
  case "invalid_value":
4917
4763
  if (issue$1.values.length === 1) return `Érvénytelen bemenet: a várt érték ${stringifyPrimitive(issue$1.values[0])}`;
4918
4764
  return `Érvénytelen opció: valamelyik érték várt ${joinValues(issue$1.values, "|")}`;
@@ -4948,12 +4794,12 @@ const error$24 = () => {
4948
4794
  };
4949
4795
  };
4950
4796
  function hu_default() {
4951
- return { localeError: error$24() };
4797
+ return { localeError: error$23() };
4952
4798
  }
4953
4799
 
4954
4800
  //#endregion
4955
- //#region ../../node_modules/zod/v4/locales/id.js
4956
- const error$23 = () => {
4801
+ //#region ../../node_modules/zod/dist/esm/v4/locales/id.js
4802
+ const error$22 = () => {
4957
4803
  const Sizable = {
4958
4804
  string: {
4959
4805
  unit: "karakter",
@@ -4975,7 +4821,7 @@ const error$23 = () => {
4975
4821
  function getSizing(origin) {
4976
4822
  return Sizable[origin] ?? null;
4977
4823
  }
4978
- const parsedType$3 = (data) => {
4824
+ const parsedType$2 = (data) => {
4979
4825
  const t = typeof data;
4980
4826
  switch (t) {
4981
4827
  case "number": {
@@ -5027,7 +4873,7 @@ const error$23 = () => {
5027
4873
  };
5028
4874
  return (issue$1) => {
5029
4875
  switch (issue$1.code) {
5030
- case "invalid_type": return `Input tidak valid: diharapkan ${issue$1.expected}, diterima ${parsedType$3(issue$1.input)}`;
4876
+ case "invalid_type": return `Input tidak valid: diharapkan ${issue$1.expected}, diterima ${parsedType$2(issue$1.input)}`;
5031
4877
  case "invalid_value":
5032
4878
  if (issue$1.values.length === 1) return `Input tidak valid: diharapkan ${stringifyPrimitive(issue$1.values[0])}`;
5033
4879
  return `Pilihan tidak valid: diharapkan salah satu dari ${joinValues(issue$1.values, "|")}`;
@@ -5063,12 +4909,12 @@ const error$23 = () => {
5063
4909
  };
5064
4910
  };
5065
4911
  function id_default() {
5066
- return { localeError: error$23() };
4912
+ return { localeError: error$22() };
5067
4913
  }
5068
4914
 
5069
4915
  //#endregion
5070
- //#region ../../node_modules/zod/v4/locales/it.js
5071
- const error$22 = () => {
4916
+ //#region ../../node_modules/zod/dist/esm/v4/locales/it.js
4917
+ const error$21 = () => {
5072
4918
  const Sizable = {
5073
4919
  string: {
5074
4920
  unit: "caratteri",
@@ -5090,7 +4936,7 @@ const error$22 = () => {
5090
4936
  function getSizing(origin) {
5091
4937
  return Sizable[origin] ?? null;
5092
4938
  }
5093
- const parsedType$3 = (data) => {
4939
+ const parsedType$2 = (data) => {
5094
4940
  const t = typeof data;
5095
4941
  switch (t) {
5096
4942
  case "number": {
@@ -5142,7 +4988,7 @@ const error$22 = () => {
5142
4988
  };
5143
4989
  return (issue$1) => {
5144
4990
  switch (issue$1.code) {
5145
- case "invalid_type": return `Input non valido: atteso ${issue$1.expected}, ricevuto ${parsedType$3(issue$1.input)}`;
4991
+ case "invalid_type": return `Input non valido: atteso ${issue$1.expected}, ricevuto ${parsedType$2(issue$1.input)}`;
5146
4992
  case "invalid_value":
5147
4993
  if (issue$1.values.length === 1) return `Input non valido: atteso ${stringifyPrimitive(issue$1.values[0])}`;
5148
4994
  return `Opzione non valida: atteso uno tra ${joinValues(issue$1.values, "|")}`;
@@ -5178,12 +5024,12 @@ const error$22 = () => {
5178
5024
  };
5179
5025
  };
5180
5026
  function it_default() {
5181
- return { localeError: error$22() };
5027
+ return { localeError: error$21() };
5182
5028
  }
5183
5029
 
5184
5030
  //#endregion
5185
- //#region ../../node_modules/zod/v4/locales/ja.js
5186
- const error$21 = () => {
5031
+ //#region ../../node_modules/zod/dist/esm/v4/locales/ja.js
5032
+ const error$20 = () => {
5187
5033
  const Sizable = {
5188
5034
  string: {
5189
5035
  unit: "文字",
@@ -5205,7 +5051,7 @@ const error$21 = () => {
5205
5051
  function getSizing(origin) {
5206
5052
  return Sizable[origin] ?? null;
5207
5053
  }
5208
- const parsedType$3 = (data) => {
5054
+ const parsedType$2 = (data) => {
5209
5055
  const t = typeof data;
5210
5056
  switch (t) {
5211
5057
  case "number": {
@@ -5257,21 +5103,21 @@ const error$21 = () => {
5257
5103
  };
5258
5104
  return (issue$1) => {
5259
5105
  switch (issue$1.code) {
5260
- case "invalid_type": return `無効な入力: ${issue$1.expected}が期待されましたが、${parsedType$3(issue$1.input)}が入力されました`;
5106
+ case "invalid_type": return `無効な入力: ${issue$1.expected}が期待されましたが、${parsedType$2(issue$1.input)}が入力されました`;
5261
5107
  case "invalid_value":
5262
5108
  if (issue$1.values.length === 1) return `無効な入力: ${stringifyPrimitive(issue$1.values[0])}が期待されました`;
5263
5109
  return `無効な選択: ${joinValues(issue$1.values, "、")}のいずれかである必要があります`;
5264
5110
  case "too_big": {
5265
- const adj = issue$1.inclusive ? "以下である" : "より小さい";
5111
+ const adj = issue$1.inclusive ? "<=" : "<";
5266
5112
  const sizing = getSizing(issue$1.origin);
5267
- if (sizing) return `大きすぎる値: ${issue$1.origin ?? "値"}は${issue$1.maximum.toString()}${sizing.unit ?? "要素"}${adj}必要があります`;
5268
- return `大きすぎる値: ${issue$1.origin ?? "値"}は${issue$1.maximum.toString()}${adj}必要があります`;
5113
+ if (sizing) return `大きすぎる値: ${issue$1.origin ?? "値"}は${issue$1.maximum.toString()}${sizing.unit ?? "要素"}${adj}である必要があります`;
5114
+ return `大きすぎる値: ${issue$1.origin ?? "値"}は${issue$1.maximum.toString()}${adj}である必要があります`;
5269
5115
  }
5270
5116
  case "too_small": {
5271
- const adj = issue$1.inclusive ? "以上である" : "より大きい";
5117
+ const adj = issue$1.inclusive ? ">=" : ">";
5272
5118
  const sizing = getSizing(issue$1.origin);
5273
- if (sizing) return `小さすぎる値: ${issue$1.origin}は${issue$1.minimum.toString()}${sizing.unit}${adj}必要があります`;
5274
- return `小さすぎる値: ${issue$1.origin}は${issue$1.minimum.toString()}${adj}必要があります`;
5119
+ if (sizing) return `小さすぎる値: ${issue$1.origin}は${issue$1.minimum.toString()}${sizing.unit}${adj}である必要があります`;
5120
+ return `小さすぎる値: ${issue$1.origin}は${issue$1.minimum.toString()}${adj}である必要があります`;
5275
5121
  }
5276
5122
  case "invalid_format": {
5277
5123
  const _issue = issue$1;
@@ -5291,12 +5137,12 @@ const error$21 = () => {
5291
5137
  };
5292
5138
  };
5293
5139
  function ja_default() {
5294
- return { localeError: error$21() };
5140
+ return { localeError: error$20() };
5295
5141
  }
5296
5142
 
5297
5143
  //#endregion
5298
- //#region ../../node_modules/zod/v4/locales/kh.js
5299
- const error$20 = () => {
5144
+ //#region ../../node_modules/zod/dist/esm/v4/locales/kh.js
5145
+ const error$19 = () => {
5300
5146
  const Sizable = {
5301
5147
  string: {
5302
5148
  unit: "តួអក្សរ",
@@ -5318,7 +5164,7 @@ const error$20 = () => {
5318
5164
  function getSizing(origin) {
5319
5165
  return Sizable[origin] ?? null;
5320
5166
  }
5321
- const parsedType$3 = (data) => {
5167
+ const parsedType$2 = (data) => {
5322
5168
  const t = typeof data;
5323
5169
  switch (t) {
5324
5170
  case "number": {
@@ -5370,7 +5216,7 @@ const error$20 = () => {
5370
5216
  };
5371
5217
  return (issue$1) => {
5372
5218
  switch (issue$1.code) {
5373
- case "invalid_type": return `ទិន្នន័យបញ្ចូលមិនត្រឹមត្រូវ៖ ត្រូវការ ${issue$1.expected} ប៉ុន្តែទទួលបាន ${parsedType$3(issue$1.input)}`;
5219
+ case "invalid_type": return `ទិន្នន័យបញ្ចូលមិនត្រឹមត្រូវ៖ ត្រូវការ ${issue$1.expected} ប៉ុន្តែទទួលបាន ${parsedType$2(issue$1.input)}`;
5374
5220
  case "invalid_value":
5375
5221
  if (issue$1.values.length === 1) return `ទិន្នន័យបញ្ចូលមិនត្រឹមត្រូវ៖ ត្រូវការ ${stringifyPrimitive(issue$1.values[0])}`;
5376
5222
  return `ជម្រើសមិនត្រឹមត្រូវ៖ ត្រូវជាមួយក្នុងចំណោម ${joinValues(issue$1.values, "|")}`;
@@ -5408,12 +5254,12 @@ const error$20 = () => {
5408
5254
  };
5409
5255
  };
5410
5256
  function kh_default() {
5411
- return { localeError: error$20() };
5257
+ return { localeError: error$19() };
5412
5258
  }
5413
5259
 
5414
5260
  //#endregion
5415
- //#region ../../node_modules/zod/v4/locales/ko.js
5416
- const error$19 = () => {
5261
+ //#region ../../node_modules/zod/dist/esm/v4/locales/ko.js
5262
+ const error$18 = () => {
5417
5263
  const Sizable = {
5418
5264
  string: {
5419
5265
  unit: "문자",
@@ -5435,7 +5281,7 @@ const error$19 = () => {
5435
5281
  function getSizing(origin) {
5436
5282
  return Sizable[origin] ?? null;
5437
5283
  }
5438
- const parsedType$3 = (data) => {
5284
+ const parsedType$2 = (data) => {
5439
5285
  const t = typeof data;
5440
5286
  switch (t) {
5441
5287
  case "number": {
@@ -5487,7 +5333,7 @@ const error$19 = () => {
5487
5333
  };
5488
5334
  return (issue$1) => {
5489
5335
  switch (issue$1.code) {
5490
- case "invalid_type": return `잘못된 입력: 예상 타입은 ${issue$1.expected}, 받은 타입은 ${parsedType$3(issue$1.input)}입니다`;
5336
+ case "invalid_type": return `잘못된 입력: 예상 타입은 ${issue$1.expected}, 받은 타입은 ${parsedType$2(issue$1.input)}입니다`;
5491
5337
  case "invalid_value":
5492
5338
  if (issue$1.values.length === 1) return `잘못된 입력: 값은 ${stringifyPrimitive(issue$1.values[0])} 이어야 합니다`;
5493
5339
  return `잘못된 옵션: ${joinValues(issue$1.values, "또는 ")} 중 하나여야 합니다`;
@@ -5529,12 +5375,12 @@ const error$19 = () => {
5529
5375
  };
5530
5376
  };
5531
5377
  function ko_default() {
5532
- return { localeError: error$19() };
5378
+ return { localeError: error$18() };
5533
5379
  }
5534
5380
 
5535
5381
  //#endregion
5536
- //#region ../../node_modules/zod/v4/locales/mk.js
5537
- const error$18 = () => {
5382
+ //#region ../../node_modules/zod/dist/esm/v4/locales/mk.js
5383
+ const error$17 = () => {
5538
5384
  const Sizable = {
5539
5385
  string: {
5540
5386
  unit: "знаци",
@@ -5556,7 +5402,7 @@ const error$18 = () => {
5556
5402
  function getSizing(origin) {
5557
5403
  return Sizable[origin] ?? null;
5558
5404
  }
5559
- const parsedType$3 = (data) => {
5405
+ const parsedType$2 = (data) => {
5560
5406
  const t = typeof data;
5561
5407
  switch (t) {
5562
5408
  case "number": {
@@ -5608,7 +5454,7 @@ const error$18 = () => {
5608
5454
  };
5609
5455
  return (issue$1) => {
5610
5456
  switch (issue$1.code) {
5611
- case "invalid_type": return `Грешен внес: се очекува ${issue$1.expected}, примено ${parsedType$3(issue$1.input)}`;
5457
+ case "invalid_type": return `Грешен внес: се очекува ${issue$1.expected}, примено ${parsedType$2(issue$1.input)}`;
5612
5458
  case "invalid_value":
5613
5459
  if (issue$1.values.length === 1) return `Invalid input: expected ${stringifyPrimitive(issue$1.values[0])}`;
5614
5460
  return `Грешана опција: се очекува една ${joinValues(issue$1.values, "|")}`;
@@ -5646,12 +5492,12 @@ const error$18 = () => {
5646
5492
  };
5647
5493
  };
5648
5494
  function mk_default() {
5649
- return { localeError: error$18() };
5495
+ return { localeError: error$17() };
5650
5496
  }
5651
5497
 
5652
5498
  //#endregion
5653
- //#region ../../node_modules/zod/v4/locales/ms.js
5654
- const error$17 = () => {
5499
+ //#region ../../node_modules/zod/dist/esm/v4/locales/ms.js
5500
+ const error$16 = () => {
5655
5501
  const Sizable = {
5656
5502
  string: {
5657
5503
  unit: "aksara",
@@ -5673,7 +5519,7 @@ const error$17 = () => {
5673
5519
  function getSizing(origin) {
5674
5520
  return Sizable[origin] ?? null;
5675
5521
  }
5676
- const parsedType$3 = (data) => {
5522
+ const parsedType$2 = (data) => {
5677
5523
  const t = typeof data;
5678
5524
  switch (t) {
5679
5525
  case "number": {
@@ -5725,7 +5571,7 @@ const error$17 = () => {
5725
5571
  };
5726
5572
  return (issue$1) => {
5727
5573
  switch (issue$1.code) {
5728
- case "invalid_type": return `Input tidak sah: dijangka ${issue$1.expected}, diterima ${parsedType$3(issue$1.input)}`;
5574
+ case "invalid_type": return `Input tidak sah: dijangka ${issue$1.expected}, diterima ${parsedType$2(issue$1.input)}`;
5729
5575
  case "invalid_value":
5730
5576
  if (issue$1.values.length === 1) return `Input tidak sah: dijangka ${stringifyPrimitive(issue$1.values[0])}`;
5731
5577
  return `Pilihan tidak sah: dijangka salah satu daripada ${joinValues(issue$1.values, "|")}`;
@@ -5761,12 +5607,12 @@ const error$17 = () => {
5761
5607
  };
5762
5608
  };
5763
5609
  function ms_default() {
5764
- return { localeError: error$17() };
5610
+ return { localeError: error$16() };
5765
5611
  }
5766
5612
 
5767
5613
  //#endregion
5768
- //#region ../../node_modules/zod/v4/locales/nl.js
5769
- const error$16 = () => {
5614
+ //#region ../../node_modules/zod/dist/esm/v4/locales/nl.js
5615
+ const error$15 = () => {
5770
5616
  const Sizable = {
5771
5617
  string: { unit: "tekens" },
5772
5618
  file: { unit: "bytes" },
@@ -5776,7 +5622,7 @@ const error$16 = () => {
5776
5622
  function getSizing(origin) {
5777
5623
  return Sizable[origin] ?? null;
5778
5624
  }
5779
- const parsedType$3 = (data) => {
5625
+ const parsedType$2 = (data) => {
5780
5626
  const t = typeof data;
5781
5627
  switch (t) {
5782
5628
  case "number": {
@@ -5828,7 +5674,7 @@ const error$16 = () => {
5828
5674
  };
5829
5675
  return (issue$1) => {
5830
5676
  switch (issue$1.code) {
5831
- case "invalid_type": return `Ongeldige invoer: verwacht ${issue$1.expected}, ontving ${parsedType$3(issue$1.input)}`;
5677
+ case "invalid_type": return `Ongeldige invoer: verwacht ${issue$1.expected}, ontving ${parsedType$2(issue$1.input)}`;
5832
5678
  case "invalid_value":
5833
5679
  if (issue$1.values.length === 1) return `Ongeldige invoer: verwacht ${stringifyPrimitive(issue$1.values[0])}`;
5834
5680
  return `Ongeldige optie: verwacht één van ${joinValues(issue$1.values, "|")}`;
@@ -5866,12 +5712,12 @@ const error$16 = () => {
5866
5712
  };
5867
5713
  };
5868
5714
  function nl_default() {
5869
- return { localeError: error$16() };
5715
+ return { localeError: error$15() };
5870
5716
  }
5871
5717
 
5872
5718
  //#endregion
5873
- //#region ../../node_modules/zod/v4/locales/no.js
5874
- const error$15 = () => {
5719
+ //#region ../../node_modules/zod/dist/esm/v4/locales/no.js
5720
+ const error$14 = () => {
5875
5721
  const Sizable = {
5876
5722
  string: {
5877
5723
  unit: "tegn",
@@ -5893,7 +5739,7 @@ const error$15 = () => {
5893
5739
  function getSizing(origin) {
5894
5740
  return Sizable[origin] ?? null;
5895
5741
  }
5896
- const parsedType$3 = (data) => {
5742
+ const parsedType$2 = (data) => {
5897
5743
  const t = typeof data;
5898
5744
  switch (t) {
5899
5745
  case "number": {
@@ -5945,7 +5791,7 @@ const error$15 = () => {
5945
5791
  };
5946
5792
  return (issue$1) => {
5947
5793
  switch (issue$1.code) {
5948
- case "invalid_type": return `Ugyldig input: forventet ${issue$1.expected}, fikk ${parsedType$3(issue$1.input)}`;
5794
+ case "invalid_type": return `Ugyldig input: forventet ${issue$1.expected}, fikk ${parsedType$2(issue$1.input)}`;
5949
5795
  case "invalid_value":
5950
5796
  if (issue$1.values.length === 1) return `Ugyldig verdi: forventet ${stringifyPrimitive(issue$1.values[0])}`;
5951
5797
  return `Ugyldig valg: forventet en av ${joinValues(issue$1.values, "|")}`;
@@ -5981,12 +5827,12 @@ const error$15 = () => {
5981
5827
  };
5982
5828
  };
5983
5829
  function no_default() {
5984
- return { localeError: error$15() };
5830
+ return { localeError: error$14() };
5985
5831
  }
5986
5832
 
5987
5833
  //#endregion
5988
- //#region ../../node_modules/zod/v4/locales/ota.js
5989
- const error$14 = () => {
5834
+ //#region ../../node_modules/zod/dist/esm/v4/locales/ota.js
5835
+ const error$13 = () => {
5990
5836
  const Sizable = {
5991
5837
  string: {
5992
5838
  unit: "harf",
@@ -6008,7 +5854,7 @@ const error$14 = () => {
6008
5854
  function getSizing(origin) {
6009
5855
  return Sizable[origin] ?? null;
6010
5856
  }
6011
- const parsedType$3 = (data) => {
5857
+ const parsedType$2 = (data) => {
6012
5858
  const t = typeof data;
6013
5859
  switch (t) {
6014
5860
  case "number": {
@@ -6060,7 +5906,7 @@ const error$14 = () => {
6060
5906
  };
6061
5907
  return (issue$1) => {
6062
5908
  switch (issue$1.code) {
6063
- case "invalid_type": return `Fâsit giren: umulan ${issue$1.expected}, alınan ${parsedType$3(issue$1.input)}`;
5909
+ case "invalid_type": return `Fâsit giren: umulan ${issue$1.expected}, alınan ${parsedType$2(issue$1.input)}`;
6064
5910
  case "invalid_value":
6065
5911
  if (issue$1.values.length === 1) return `Fâsit giren: umulan ${stringifyPrimitive(issue$1.values[0])}`;
6066
5912
  return `Fâsit tercih: mûteberler ${joinValues(issue$1.values, "|")}`;
@@ -6096,138 +5942,11 @@ const error$14 = () => {
6096
5942
  };
6097
5943
  };
6098
5944
  function ota_default() {
6099
- return { localeError: error$14() };
6100
- }
6101
-
6102
- //#endregion
6103
- //#region ../../node_modules/zod/v4/locales/ps.js
6104
- const error$13 = () => {
6105
- const Sizable = {
6106
- string: {
6107
- unit: "توکي",
6108
- verb: "ولري"
6109
- },
6110
- file: {
6111
- unit: "بایټس",
6112
- verb: "ولري"
6113
- },
6114
- array: {
6115
- unit: "توکي",
6116
- verb: "ولري"
6117
- },
6118
- set: {
6119
- unit: "توکي",
6120
- verb: "ولري"
6121
- }
6122
- };
6123
- function getSizing(origin) {
6124
- return Sizable[origin] ?? null;
6125
- }
6126
- const parsedType$3 = (data) => {
6127
- const t = typeof data;
6128
- switch (t) {
6129
- case "number": {
6130
- return Number.isNaN(data) ? "NaN" : "عدد";
6131
- }
6132
- case "object": {
6133
- if (Array.isArray(data)) {
6134
- return "ارې";
6135
- }
6136
- if (data === null) {
6137
- return "null";
6138
- }
6139
- if (Object.getPrototypeOf(data) !== Object.prototype && data.constructor) {
6140
- return data.constructor.name;
6141
- }
6142
- }
6143
- }
6144
- return t;
6145
- };
6146
- const Nouns = {
6147
- regex: "ورودي",
6148
- email: "بریښنالیک",
6149
- url: "یو آر ال",
6150
- emoji: "ایموجي",
6151
- uuid: "UUID",
6152
- uuidv4: "UUIDv4",
6153
- uuidv6: "UUIDv6",
6154
- nanoid: "nanoid",
6155
- guid: "GUID",
6156
- cuid: "cuid",
6157
- cuid2: "cuid2",
6158
- ulid: "ULID",
6159
- xid: "XID",
6160
- ksuid: "KSUID",
6161
- datetime: "نیټه او وخت",
6162
- date: "نېټه",
6163
- time: "وخت",
6164
- duration: "موده",
6165
- ipv4: "د IPv4 پته",
6166
- ipv6: "د IPv6 پته",
6167
- cidrv4: "د IPv4 ساحه",
6168
- cidrv6: "د IPv6 ساحه",
6169
- base64: "base64-encoded متن",
6170
- base64url: "base64url-encoded متن",
6171
- json_string: "JSON متن",
6172
- e164: "د E.164 شمېره",
6173
- jwt: "JWT",
6174
- template_literal: "ورودي"
6175
- };
6176
- return (issue$1) => {
6177
- switch (issue$1.code) {
6178
- case "invalid_type": return `ناسم ورودي: باید ${issue$1.expected} وای, مګر ${parsedType$3(issue$1.input)} ترلاسه شو`;
6179
- case "invalid_value":
6180
- if (issue$1.values.length === 1) {
6181
- return `ناسم ورودي: باید ${stringifyPrimitive(issue$1.values[0])} وای`;
6182
- }
6183
- return `ناسم انتخاب: باید یو له ${joinValues(issue$1.values, "|")} څخه وای`;
6184
- case "too_big": {
6185
- const adj = issue$1.inclusive ? "<=" : "<";
6186
- const sizing = getSizing(issue$1.origin);
6187
- if (sizing) {
6188
- return `ډیر لوی: ${issue$1.origin ?? "ارزښت"} باید ${adj}${issue$1.maximum.toString()} ${sizing.unit ?? "عنصرونه"} ولري`;
6189
- }
6190
- return `ډیر لوی: ${issue$1.origin ?? "ارزښت"} باید ${adj}${issue$1.maximum.toString()} وي`;
6191
- }
6192
- case "too_small": {
6193
- const adj = issue$1.inclusive ? ">=" : ">";
6194
- const sizing = getSizing(issue$1.origin);
6195
- if (sizing) {
6196
- return `ډیر کوچنی: ${issue$1.origin} باید ${adj}${issue$1.minimum.toString()} ${sizing.unit} ولري`;
6197
- }
6198
- return `ډیر کوچنی: ${issue$1.origin} باید ${adj}${issue$1.minimum.toString()} وي`;
6199
- }
6200
- case "invalid_format": {
6201
- const _issue = issue$1;
6202
- if (_issue.format === "starts_with") {
6203
- return `ناسم متن: باید د "${_issue.prefix}" سره پیل شي`;
6204
- }
6205
- if (_issue.format === "ends_with") {
6206
- return `ناسم متن: باید د "${_issue.suffix}" سره پای ته ورسيږي`;
6207
- }
6208
- if (_issue.format === "includes") {
6209
- return `ناسم متن: باید "${_issue.includes}" ولري`;
6210
- }
6211
- if (_issue.format === "regex") {
6212
- return `ناسم متن: باید د ${_issue.pattern} سره مطابقت ولري`;
6213
- }
6214
- return `${Nouns[_issue.format] ?? issue$1.format} ناسم دی`;
6215
- }
6216
- case "not_multiple_of": return `ناسم عدد: باید د ${issue$1.divisor} مضرب وي`;
6217
- case "unrecognized_keys": return `ناسم ${issue$1.keys.length > 1 ? "کلیډونه" : "کلیډ"}: ${joinValues(issue$1.keys, ", ")}`;
6218
- case "invalid_key": return `ناسم کلیډ په ${issue$1.origin} کې`;
6219
- case "invalid_union": return `ناسمه ورودي`;
6220
- case "invalid_element": return `ناسم عنصر په ${issue$1.origin} کې`;
6221
- default: return `ناسمه ورودي`;
6222
- }
6223
- };
6224
- };
6225
- function ps_default() {
6226
5945
  return { localeError: error$13() };
6227
5946
  }
6228
5947
 
6229
5948
  //#endregion
6230
- //#region ../../node_modules/zod/v4/locales/pl.js
5949
+ //#region ../../node_modules/zod/dist/esm/v4/locales/pl.js
6231
5950
  const error$12 = () => {
6232
5951
  const Sizable = {
6233
5952
  string: {
@@ -6250,7 +5969,7 @@ const error$12 = () => {
6250
5969
  function getSizing(origin) {
6251
5970
  return Sizable[origin] ?? null;
6252
5971
  }
6253
- const parsedType$3 = (data) => {
5972
+ const parsedType$2 = (data) => {
6254
5973
  const t = typeof data;
6255
5974
  switch (t) {
6256
5975
  case "number": {
@@ -6302,7 +6021,7 @@ const error$12 = () => {
6302
6021
  };
6303
6022
  return (issue$1) => {
6304
6023
  switch (issue$1.code) {
6305
- case "invalid_type": return `Nieprawidłowe dane wejściowe: oczekiwano ${issue$1.expected}, otrzymano ${parsedType$3(issue$1.input)}`;
6024
+ case "invalid_type": return `Nieprawidłowe dane wejściowe: oczekiwano ${issue$1.expected}, otrzymano ${parsedType$2(issue$1.input)}`;
6306
6025
  case "invalid_value":
6307
6026
  if (issue$1.values.length === 1) return `Nieprawidłowe dane wejściowe: oczekiwano ${stringifyPrimitive(issue$1.values[0])}`;
6308
6027
  return `Nieprawidłowa opcja: oczekiwano jednej z wartości ${joinValues(issue$1.values, "|")}`;
@@ -6344,7 +6063,7 @@ function pl_default() {
6344
6063
  }
6345
6064
 
6346
6065
  //#endregion
6347
- //#region ../../node_modules/zod/v4/locales/pt.js
6066
+ //#region ../../node_modules/zod/dist/esm/v4/locales/pt.js
6348
6067
  const error$11 = () => {
6349
6068
  const Sizable = {
6350
6069
  string: {
@@ -6367,7 +6086,7 @@ const error$11 = () => {
6367
6086
  function getSizing(origin) {
6368
6087
  return Sizable[origin] ?? null;
6369
6088
  }
6370
- const parsedType$3 = (data) => {
6089
+ const parsedType$2 = (data) => {
6371
6090
  const t = typeof data;
6372
6091
  switch (t) {
6373
6092
  case "number": {
@@ -6419,7 +6138,7 @@ const error$11 = () => {
6419
6138
  };
6420
6139
  return (issue$1) => {
6421
6140
  switch (issue$1.code) {
6422
- case "invalid_type": return `Tipo inválido: esperado ${issue$1.expected}, recebido ${parsedType$3(issue$1.input)}`;
6141
+ case "invalid_type": return `Tipo inválido: esperado ${issue$1.expected}, recebido ${parsedType$2(issue$1.input)}`;
6423
6142
  case "invalid_value":
6424
6143
  if (issue$1.values.length === 1) return `Entrada inválida: esperado ${stringifyPrimitive(issue$1.values[0])}`;
6425
6144
  return `Opção inválida: esperada uma das ${joinValues(issue$1.values, "|")}`;
@@ -6459,7 +6178,7 @@ function pt_default() {
6459
6178
  }
6460
6179
 
6461
6180
  //#endregion
6462
- //#region ../../node_modules/zod/v4/locales/ru.js
6181
+ //#region ../../node_modules/zod/dist/esm/v4/locales/ru.js
6463
6182
  function getRussianPlural(count, one, few, many) {
6464
6183
  const absCount = Math.abs(count);
6465
6184
  const lastDigit = absCount % 10;
@@ -6513,7 +6232,7 @@ const error$10 = () => {
6513
6232
  function getSizing(origin) {
6514
6233
  return Sizable[origin] ?? null;
6515
6234
  }
6516
- const parsedType$3 = (data) => {
6235
+ const parsedType$2 = (data) => {
6517
6236
  const t = typeof data;
6518
6237
  switch (t) {
6519
6238
  case "number": {
@@ -6565,7 +6284,7 @@ const error$10 = () => {
6565
6284
  };
6566
6285
  return (issue$1) => {
6567
6286
  switch (issue$1.code) {
6568
- case "invalid_type": return `Неверный ввод: ожидалось ${issue$1.expected}, получено ${parsedType$3(issue$1.input)}`;
6287
+ case "invalid_type": return `Неверный ввод: ожидалось ${issue$1.expected}, получено ${parsedType$2(issue$1.input)}`;
6569
6288
  case "invalid_value":
6570
6289
  if (issue$1.values.length === 1) return `Неверный ввод: ожидалось ${stringifyPrimitive(issue$1.values[0])}`;
6571
6290
  return `Неверный вариант: ожидалось одно из ${joinValues(issue$1.values, "|")}`;
@@ -6611,7 +6330,7 @@ function ru_default() {
6611
6330
  }
6612
6331
 
6613
6332
  //#endregion
6614
- //#region ../../node_modules/zod/v4/locales/sl.js
6333
+ //#region ../../node_modules/zod/dist/esm/v4/locales/sl.js
6615
6334
  const error$9 = () => {
6616
6335
  const Sizable = {
6617
6336
  string: {
@@ -6634,7 +6353,7 @@ const error$9 = () => {
6634
6353
  function getSizing(origin) {
6635
6354
  return Sizable[origin] ?? null;
6636
6355
  }
6637
- const parsedType$3 = (data) => {
6356
+ const parsedType$2 = (data) => {
6638
6357
  const t = typeof data;
6639
6358
  switch (t) {
6640
6359
  case "number": {
@@ -6686,7 +6405,7 @@ const error$9 = () => {
6686
6405
  };
6687
6406
  return (issue$1) => {
6688
6407
  switch (issue$1.code) {
6689
- case "invalid_type": return `Neveljaven vnos: pričakovano ${issue$1.expected}, prejeto ${parsedType$3(issue$1.input)}`;
6408
+ case "invalid_type": return `Neveljaven vnos: pričakovano ${issue$1.expected}, prejeto ${parsedType$2(issue$1.input)}`;
6690
6409
  case "invalid_value":
6691
6410
  if (issue$1.values.length === 1) return `Neveljaven vnos: pričakovano ${stringifyPrimitive(issue$1.values[0])}`;
6692
6411
  return `Neveljavna možnost: pričakovano eno izmed ${joinValues(issue$1.values, "|")}`;
@@ -6728,7 +6447,7 @@ function sl_default() {
6728
6447
  }
6729
6448
 
6730
6449
  //#endregion
6731
- //#region ../../node_modules/zod/v4/locales/sv.js
6450
+ //#region ../../node_modules/zod/dist/esm/v4/locales/sv.js
6732
6451
  const error$8 = () => {
6733
6452
  const Sizable = {
6734
6453
  string: {
@@ -6751,7 +6470,7 @@ const error$8 = () => {
6751
6470
  function getSizing(origin) {
6752
6471
  return Sizable[origin] ?? null;
6753
6472
  }
6754
- const parsedType$3 = (data) => {
6473
+ const parsedType$2 = (data) => {
6755
6474
  const t = typeof data;
6756
6475
  switch (t) {
6757
6476
  case "number": {
@@ -6803,7 +6522,7 @@ const error$8 = () => {
6803
6522
  };
6804
6523
  return (issue$1) => {
6805
6524
  switch (issue$1.code) {
6806
- case "invalid_type": return `Ogiltig inmatning: förväntat ${issue$1.expected}, fick ${parsedType$3(issue$1.input)}`;
6525
+ case "invalid_type": return `Ogiltig inmatning: förväntat ${issue$1.expected}, fick ${parsedType$2(issue$1.input)}`;
6807
6526
  case "invalid_value":
6808
6527
  if (issue$1.values.length === 1) return `Ogiltig inmatning: förväntat ${stringifyPrimitive(issue$1.values[0])}`;
6809
6528
  return `Ogiltigt val: förväntade en av ${joinValues(issue$1.values, "|")}`;
@@ -6847,7 +6566,7 @@ function sv_default() {
6847
6566
  }
6848
6567
 
6849
6568
  //#endregion
6850
- //#region ../../node_modules/zod/v4/locales/ta.js
6569
+ //#region ../../node_modules/zod/dist/esm/v4/locales/ta.js
6851
6570
  const error$7 = () => {
6852
6571
  const Sizable = {
6853
6572
  string: {
@@ -6870,7 +6589,7 @@ const error$7 = () => {
6870
6589
  function getSizing(origin) {
6871
6590
  return Sizable[origin] ?? null;
6872
6591
  }
6873
- const parsedType$3 = (data) => {
6592
+ const parsedType$2 = (data) => {
6874
6593
  const t = typeof data;
6875
6594
  switch (t) {
6876
6595
  case "number": {
@@ -6922,7 +6641,7 @@ const error$7 = () => {
6922
6641
  };
6923
6642
  return (issue$1) => {
6924
6643
  switch (issue$1.code) {
6925
- case "invalid_type": return `தவறான உள்ளீடு: எதிர்பார்க்கப்பட்டது ${issue$1.expected}, பெறப்பட்டது ${parsedType$3(issue$1.input)}`;
6644
+ case "invalid_type": return `தவறான உள்ளீடு: எதிர்பார்க்கப்பட்டது ${issue$1.expected}, பெறப்பட்டது ${parsedType$2(issue$1.input)}`;
6926
6645
  case "invalid_value":
6927
6646
  if (issue$1.values.length === 1) return `தவறான உள்ளீடு: எதிர்பார்க்கப்பட்டது ${stringifyPrimitive(issue$1.values[0])}`;
6928
6647
  return `தவறான விருப்பம்: எதிர்பார்க்கப்பட்டது ${joinValues(issue$1.values, "|")} இல் ஒன்று`;
@@ -6964,7 +6683,7 @@ function ta_default() {
6964
6683
  }
6965
6684
 
6966
6685
  //#endregion
6967
- //#region ../../node_modules/zod/v4/locales/th.js
6686
+ //#region ../../node_modules/zod/dist/esm/v4/locales/th.js
6968
6687
  const error$6 = () => {
6969
6688
  const Sizable = {
6970
6689
  string: {
@@ -6987,7 +6706,7 @@ const error$6 = () => {
6987
6706
  function getSizing(origin) {
6988
6707
  return Sizable[origin] ?? null;
6989
6708
  }
6990
- const parsedType$3 = (data) => {
6709
+ const parsedType$2 = (data) => {
6991
6710
  const t = typeof data;
6992
6711
  switch (t) {
6993
6712
  case "number": {
@@ -7039,7 +6758,7 @@ const error$6 = () => {
7039
6758
  };
7040
6759
  return (issue$1) => {
7041
6760
  switch (issue$1.code) {
7042
- case "invalid_type": return `ประเภทข้อมูลไม่ถูกต้อง: ควรเป็น ${issue$1.expected} แต่ได้รับ ${parsedType$3(issue$1.input)}`;
6761
+ case "invalid_type": return `ประเภทข้อมูลไม่ถูกต้อง: ควรเป็น ${issue$1.expected} แต่ได้รับ ${parsedType$2(issue$1.input)}`;
7043
6762
  case "invalid_value":
7044
6763
  if (issue$1.values.length === 1) return `ค่าไม่ถูกต้อง: ควรเป็น ${stringifyPrimitive(issue$1.values[0])}`;
7045
6764
  return `ตัวเลือกไม่ถูกต้อง: ควรเป็นหนึ่งใน ${joinValues(issue$1.values, "|")}`;
@@ -7081,7 +6800,7 @@ function th_default() {
7081
6800
  }
7082
6801
 
7083
6802
  //#endregion
7084
- //#region ../../node_modules/zod/v4/locales/tr.js
6803
+ //#region ../../node_modules/zod/dist/esm/v4/locales/tr.js
7085
6804
  const parsedType = (data) => {
7086
6805
  const t = typeof data;
7087
6806
  switch (t) {
@@ -7194,7 +6913,7 @@ function tr_default() {
7194
6913
  }
7195
6914
 
7196
6915
  //#endregion
7197
- //#region ../../node_modules/zod/v4/locales/ua.js
6916
+ //#region ../../node_modules/zod/dist/esm/v4/locales/ua.js
7198
6917
  const error$4 = () => {
7199
6918
  const Sizable = {
7200
6919
  string: {
@@ -7217,7 +6936,7 @@ const error$4 = () => {
7217
6936
  function getSizing(origin) {
7218
6937
  return Sizable[origin] ?? null;
7219
6938
  }
7220
- const parsedType$3 = (data) => {
6939
+ const parsedType$2 = (data) => {
7221
6940
  const t = typeof data;
7222
6941
  switch (t) {
7223
6942
  case "number": {
@@ -7269,7 +6988,7 @@ const error$4 = () => {
7269
6988
  };
7270
6989
  return (issue$1) => {
7271
6990
  switch (issue$1.code) {
7272
- case "invalid_type": return `Неправильні вхідні дані: очікується ${issue$1.expected}, отримано ${parsedType$3(issue$1.input)}`;
6991
+ case "invalid_type": return `Неправильні вхідні дані: очікується ${issue$1.expected}, отримано ${parsedType$2(issue$1.input)}`;
7273
6992
  case "invalid_value":
7274
6993
  if (issue$1.values.length === 1) return `Неправильні вхідні дані: очікується ${stringifyPrimitive(issue$1.values[0])}`;
7275
6994
  return `Неправильна опція: очікується одне з ${joinValues(issue$1.values, "|")}`;
@@ -7309,7 +7028,7 @@ function ua_default() {
7309
7028
  }
7310
7029
 
7311
7030
  //#endregion
7312
- //#region ../../node_modules/zod/v4/locales/ur.js
7031
+ //#region ../../node_modules/zod/dist/esm/v4/locales/ur.js
7313
7032
  const error$3 = () => {
7314
7033
  const Sizable = {
7315
7034
  string: {
@@ -7332,7 +7051,7 @@ const error$3 = () => {
7332
7051
  function getSizing(origin) {
7333
7052
  return Sizable[origin] ?? null;
7334
7053
  }
7335
- const parsedType$3 = (data) => {
7054
+ const parsedType$2 = (data) => {
7336
7055
  const t = typeof data;
7337
7056
  switch (t) {
7338
7057
  case "number": {
@@ -7384,7 +7103,7 @@ const error$3 = () => {
7384
7103
  };
7385
7104
  return (issue$1) => {
7386
7105
  switch (issue$1.code) {
7387
- case "invalid_type": return `غلط ان پٹ: ${issue$1.expected} متوقع تھا، ${parsedType$3(issue$1.input)} موصول ہوا`;
7106
+ case "invalid_type": return `غلط ان پٹ: ${issue$1.expected} متوقع تھا، ${parsedType$2(issue$1.input)} موصول ہوا`;
7388
7107
  case "invalid_value":
7389
7108
  if (issue$1.values.length === 1) return `غلط ان پٹ: ${stringifyPrimitive(issue$1.values[0])} متوقع تھا`;
7390
7109
  return `غلط آپشن: ${joinValues(issue$1.values, "|")} میں سے ایک متوقع تھا`;
@@ -7426,7 +7145,7 @@ function ur_default() {
7426
7145
  }
7427
7146
 
7428
7147
  //#endregion
7429
- //#region ../../node_modules/zod/v4/locales/vi.js
7148
+ //#region ../../node_modules/zod/dist/esm/v4/locales/vi.js
7430
7149
  const error$2 = () => {
7431
7150
  const Sizable = {
7432
7151
  string: {
@@ -7449,7 +7168,7 @@ const error$2 = () => {
7449
7168
  function getSizing(origin) {
7450
7169
  return Sizable[origin] ?? null;
7451
7170
  }
7452
- const parsedType$3 = (data) => {
7171
+ const parsedType$2 = (data) => {
7453
7172
  const t = typeof data;
7454
7173
  switch (t) {
7455
7174
  case "number": {
@@ -7501,7 +7220,7 @@ const error$2 = () => {
7501
7220
  };
7502
7221
  return (issue$1) => {
7503
7222
  switch (issue$1.code) {
7504
- 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)}`;
7223
+ 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)}`;
7505
7224
  case "invalid_value":
7506
7225
  if (issue$1.values.length === 1) return `Đầu vào không hợp lệ: mong đợi ${stringifyPrimitive(issue$1.values[0])}`;
7507
7226
  return `Tùy chọn không hợp lệ: mong đợi một trong các giá trị ${joinValues(issue$1.values, "|")}`;
@@ -7541,7 +7260,7 @@ function vi_default() {
7541
7260
  }
7542
7261
 
7543
7262
  //#endregion
7544
- //#region ../../node_modules/zod/v4/locales/zh-CN.js
7263
+ //#region ../../node_modules/zod/dist/esm/v4/locales/zh-CN.js
7545
7264
  const error$1 = () => {
7546
7265
  const Sizable = {
7547
7266
  string: {
@@ -7564,7 +7283,7 @@ const error$1 = () => {
7564
7283
  function getSizing(origin) {
7565
7284
  return Sizable[origin] ?? null;
7566
7285
  }
7567
- const parsedType$3 = (data) => {
7286
+ const parsedType$2 = (data) => {
7568
7287
  const t = typeof data;
7569
7288
  switch (t) {
7570
7289
  case "number": {
@@ -7616,7 +7335,7 @@ const error$1 = () => {
7616
7335
  };
7617
7336
  return (issue$1) => {
7618
7337
  switch (issue$1.code) {
7619
- case "invalid_type": return `无效输入:期望 ${issue$1.expected},实际接收 ${parsedType$3(issue$1.input)}`;
7338
+ case "invalid_type": return `无效输入:期望 ${issue$1.expected},实际接收 ${parsedType$2(issue$1.input)}`;
7620
7339
  case "invalid_value":
7621
7340
  if (issue$1.values.length === 1) return `无效输入:期望 ${stringifyPrimitive(issue$1.values[0])}`;
7622
7341
  return `无效选项:期望以下之一 ${joinValues(issue$1.values, "|")}`;
@@ -7656,7 +7375,7 @@ function zh_CN_default() {
7656
7375
  }
7657
7376
 
7658
7377
  //#endregion
7659
- //#region ../../node_modules/zod/v4/locales/zh-TW.js
7378
+ //#region ../../node_modules/zod/dist/esm/v4/locales/zh-TW.js
7660
7379
  const error = () => {
7661
7380
  const Sizable = {
7662
7381
  string: {
@@ -7679,7 +7398,7 @@ const error = () => {
7679
7398
  function getSizing(origin) {
7680
7399
  return Sizable[origin] ?? null;
7681
7400
  }
7682
- const parsedType$3 = (data) => {
7401
+ const parsedType$2 = (data) => {
7683
7402
  const t = typeof data;
7684
7403
  switch (t) {
7685
7404
  case "number": {
@@ -7731,7 +7450,7 @@ const error = () => {
7731
7450
  };
7732
7451
  return (issue$1) => {
7733
7452
  switch (issue$1.code) {
7734
- case "invalid_type": return `無效的輸入值:預期為 ${issue$1.expected},但收到 ${parsedType$3(issue$1.input)}`;
7453
+ case "invalid_type": return `無效的輸入值:預期為 ${issue$1.expected},但收到 ${parsedType$2(issue$1.input)}`;
7735
7454
  case "invalid_value":
7736
7455
  if (issue$1.values.length === 1) return `無效的輸入值:預期為 ${stringifyPrimitive(issue$1.values[0])}`;
7737
7456
  return `無效的選項:預期為以下其中之一 ${joinValues(issue$1.values, "|")}`;
@@ -7773,7 +7492,7 @@ function zh_TW_default() {
7773
7492
  }
7774
7493
 
7775
7494
  //#endregion
7776
- //#region ../../node_modules/zod/v4/locales/index.js
7495
+ //#region ../../node_modules/zod/dist/esm/v4/locales/index.js
7777
7496
  var locales_exports = {};
7778
7497
  __export(locales_exports, {
7779
7498
  ar: () => ar_default,
@@ -7783,7 +7502,6 @@ __export(locales_exports, {
7783
7502
  cs: () => cs_default,
7784
7503
  de: () => de_default,
7785
7504
  en: () => en_default,
7786
- eo: () => eo_default,
7787
7505
  es: () => es_default,
7788
7506
  fa: () => fa_default,
7789
7507
  fi: () => fi_default,
@@ -7802,7 +7520,6 @@ __export(locales_exports, {
7802
7520
  no: () => no_default,
7803
7521
  ota: () => ota_default,
7804
7522
  pl: () => pl_default,
7805
- ps: () => ps_default,
7806
7523
  pt: () => pt_default,
7807
7524
  ru: () => ru_default,
7808
7525
  sl: () => sl_default,
@@ -7818,12 +7535,12 @@ __export(locales_exports, {
7818
7535
  });
7819
7536
 
7820
7537
  //#endregion
7821
- //#region ../../node_modules/zod/v4/core/registries.js
7538
+ //#region ../../node_modules/zod/dist/esm/v4/core/registries.js
7822
7539
  const $output = Symbol("ZodOutput");
7823
7540
  const $input = Symbol("ZodInput");
7824
7541
  var $ZodRegistry = class {
7825
7542
  constructor() {
7826
- this._map = new Map();
7543
+ this._map = new WeakMap();
7827
7544
  this._idmap = new Map();
7828
7545
  }
7829
7546
  add(schema, ..._meta) {
@@ -7837,16 +7554,7 @@ var $ZodRegistry = class {
7837
7554
  }
7838
7555
  return this;
7839
7556
  }
7840
- clear() {
7841
- this._map = new Map();
7842
- this._idmap = new Map();
7843
- return this;
7844
- }
7845
7557
  remove(schema) {
7846
- const meta = this._map.get(schema);
7847
- if (meta && typeof meta === "object" && "id" in meta) {
7848
- this._idmap.delete(meta.id);
7849
- }
7850
7558
  this._map.delete(schema);
7851
7559
  return this;
7852
7560
  }
@@ -7872,7 +7580,7 @@ function registry() {
7872
7580
  const globalRegistry = /* @__PURE__ */ registry();
7873
7581
 
7874
7582
  //#endregion
7875
- //#region ../../node_modules/zod/v4/core/api.js
7583
+ //#region ../../node_modules/zod/dist/esm/v4/core/api.js
7876
7584
  function _string(Class$1, params) {
7877
7585
  return new Class$1({
7878
7586
  type: "string",
@@ -8087,13 +7795,6 @@ function _jwt(Class$1, params) {
8087
7795
  ...normalizeParams(params)
8088
7796
  });
8089
7797
  }
8090
- const TimePrecision = {
8091
- Any: null,
8092
- Minute: -1,
8093
- Second: 0,
8094
- Millisecond: 3,
8095
- Microsecond: 6
8096
- };
8097
7798
  function _isoDateTime(Class$1, params) {
8098
7799
  return new Class$1({
8099
7800
  type: "string",
@@ -8660,8 +8361,8 @@ function _refine(Class$1, fn, _params) {
8660
8361
  return schema;
8661
8362
  }
8662
8363
  function _stringbool(Classes, _params) {
8663
- const params = normalizeParams(_params);
8664
- let truthyArray = params.truthy ?? [
8364
+ const { case: _case, error: error$37, truthy, falsy } = normalizeParams(_params);
8365
+ let truthyArray = truthy ?? [
8665
8366
  "true",
8666
8367
  "1",
8667
8368
  "yes",
@@ -8669,7 +8370,7 @@ function _stringbool(Classes, _params) {
8669
8370
  "y",
8670
8371
  "enabled"
8671
8372
  ];
8672
- let falsyArray = params.falsy ?? [
8373
+ let falsyArray = falsy ?? [
8673
8374
  "false",
8674
8375
  "0",
8675
8376
  "no",
@@ -8677,7 +8378,7 @@ function _stringbool(Classes, _params) {
8677
8378
  "n",
8678
8379
  "disabled"
8679
8380
  ];
8680
- if (params.case !== "sensitive") {
8381
+ if (_case !== "sensitive") {
8681
8382
  truthyArray = truthyArray.map((v) => typeof v === "string" ? v.toLowerCase() : v);
8682
8383
  falsyArray = falsyArray.map((v) => typeof v === "string" ? v.toLowerCase() : v);
8683
8384
  }
@@ -8691,7 +8392,7 @@ function _stringbool(Classes, _params) {
8691
8392
  type: "transform",
8692
8393
  transform: (input, payload) => {
8693
8394
  let data = input;
8694
- if (params.case !== "sensitive") data = data.toLowerCase();
8395
+ if (_case !== "sensitive") data = data.toLowerCase();
8695
8396
  if (truthySet.has(data)) {
8696
8397
  return true;
8697
8398
  } else if (falsySet.has(data)) {
@@ -8707,47 +8408,31 @@ function _stringbool(Classes, _params) {
8707
8408
  return {};
8708
8409
  }
8709
8410
  },
8710
- error: params.error
8411
+ error: error$37
8711
8412
  });
8712
8413
  const innerPipe = new _Pipe({
8713
8414
  type: "pipe",
8714
8415
  in: new _String({
8715
8416
  type: "string",
8716
- error: params.error
8417
+ error: error$37
8717
8418
  }),
8718
8419
  out: tx,
8719
- error: params.error
8420
+ error: error$37
8720
8421
  });
8721
8422
  const outerPipe = new _Pipe({
8722
8423
  type: "pipe",
8723
8424
  in: innerPipe,
8724
8425
  out: new _Boolean({
8725
8426
  type: "boolean",
8726
- error: params.error
8427
+ error: error$37
8727
8428
  }),
8728
- error: params.error
8429
+ error: error$37
8729
8430
  });
8730
8431
  return outerPipe;
8731
8432
  }
8732
- function _stringFormat(Class$1, format, fnOrRegex, _params = {}) {
8733
- const params = normalizeParams(_params);
8734
- const def = {
8735
- ...normalizeParams(_params),
8736
- check: "string_format",
8737
- type: "string",
8738
- format,
8739
- fn: typeof fnOrRegex === "function" ? fnOrRegex : (val) => fnOrRegex.test(val),
8740
- ...params
8741
- };
8742
- if (fnOrRegex instanceof RegExp) {
8743
- def.pattern = fnOrRegex;
8744
- }
8745
- const inst = new Class$1(def);
8746
- return inst;
8747
- }
8748
8433
 
8749
8434
  //#endregion
8750
- //#region ../../node_modules/zod/v4/core/function.js
8435
+ //#region ../../node_modules/zod/dist/esm/v4/core/function.js
8751
8436
  var $ZodFunction = class {
8752
8437
  constructor(def) {
8753
8438
  this._def = def;
@@ -8818,7 +8503,7 @@ function _function(params) {
8818
8503
  }
8819
8504
 
8820
8505
  //#endregion
8821
- //#region ../../node_modules/zod/v4/core/to-json-schema.js
8506
+ //#region ../../node_modules/zod/dist/esm/v4/core/to-json-schema.js
8822
8507
  var JSONSchemaGenerator = class {
8823
8508
  constructor(params) {
8824
8509
  this.counter = 0;
@@ -8854,435 +8539,431 @@ var JSONSchemaGenerator = class {
8854
8539
  const result = {
8855
8540
  schema: {},
8856
8541
  count: 1,
8857
- cycle: undefined,
8858
- path: _params.path
8542
+ cycle: undefined
8859
8543
  };
8860
8544
  this.seen.set(schema, result);
8861
- const overrideSchema = schema._zod.toJSONSchema?.();
8862
- if (overrideSchema) {
8863
- result.schema = overrideSchema;
8545
+ if (schema._zod.toJSONSchema) {
8546
+ result.schema = schema._zod.toJSONSchema();
8547
+ }
8548
+ const params = {
8549
+ ..._params,
8550
+ schemaPath: [..._params.schemaPath, schema],
8551
+ path: _params.path
8552
+ };
8553
+ const parent = schema._zod.parent;
8554
+ if (parent) {
8555
+ result.ref = parent;
8556
+ this.process(parent, params);
8557
+ this.seen.get(parent).isParent = true;
8864
8558
  } else {
8865
- const params = {
8866
- ..._params,
8867
- schemaPath: [..._params.schemaPath, schema],
8868
- path: _params.path
8869
- };
8870
- const parent = schema._zod.parent;
8871
- if (parent) {
8872
- result.ref = parent;
8873
- this.process(parent, params);
8874
- this.seen.get(parent).isParent = true;
8875
- } else {
8876
- const _json = result.schema;
8877
- switch (def.type) {
8878
- case "string": {
8879
- const json$1 = _json;
8880
- json$1.type = "string";
8881
- const { minimum, maximum, format, patterns, contentEncoding } = schema._zod.bag;
8882
- if (typeof minimum === "number") json$1.minLength = minimum;
8883
- if (typeof maximum === "number") json$1.maxLength = maximum;
8884
- if (format) {
8885
- json$1.format = formatMap[format] ?? format;
8886
- if (json$1.format === "") delete json$1.format;
8887
- }
8888
- if (contentEncoding) json$1.contentEncoding = contentEncoding;
8889
- if (patterns && patterns.size > 0) {
8890
- const regexes = [...patterns];
8891
- if (regexes.length === 1) json$1.pattern = regexes[0].source;
8892
- else if (regexes.length > 1) {
8893
- result.schema.allOf = [...regexes.map((regex) => ({
8894
- ...this.target === "draft-7" ? { type: "string" } : {},
8895
- pattern: regex.source
8896
- }))];
8897
- }
8898
- }
8899
- break;
8900
- }
8901
- case "number": {
8902
- const json$1 = _json;
8903
- const { minimum, maximum, format, multipleOf, exclusiveMaximum, exclusiveMinimum } = schema._zod.bag;
8904
- if (typeof format === "string" && format.includes("int")) json$1.type = "integer";
8905
- else json$1.type = "number";
8906
- if (typeof exclusiveMinimum === "number") json$1.exclusiveMinimum = exclusiveMinimum;
8907
- if (typeof minimum === "number") {
8908
- json$1.minimum = minimum;
8909
- if (typeof exclusiveMinimum === "number") {
8910
- if (exclusiveMinimum >= minimum) delete json$1.minimum;
8911
- else delete json$1.exclusiveMinimum;
8912
- }
8913
- }
8914
- if (typeof exclusiveMaximum === "number") json$1.exclusiveMaximum = exclusiveMaximum;
8915
- if (typeof maximum === "number") {
8916
- json$1.maximum = maximum;
8917
- if (typeof exclusiveMaximum === "number") {
8918
- if (exclusiveMaximum <= maximum) delete json$1.maximum;
8919
- else delete json$1.exclusiveMaximum;
8920
- }
8921
- }
8922
- if (typeof multipleOf === "number") json$1.multipleOf = multipleOf;
8923
- break;
8924
- }
8925
- case "boolean": {
8926
- const json$1 = _json;
8927
- json$1.type = "boolean";
8928
- break;
8929
- }
8930
- case "bigint": {
8931
- if (this.unrepresentable === "throw") {
8932
- throw new Error("BigInt cannot be represented in JSON Schema");
8933
- }
8934
- break;
8559
+ const _json = result.schema;
8560
+ switch (def.type) {
8561
+ case "string": {
8562
+ const json$1 = _json;
8563
+ json$1.type = "string";
8564
+ const { minimum, maximum, format, patterns, contentEncoding } = schema._zod.bag;
8565
+ if (typeof minimum === "number") json$1.minLength = minimum;
8566
+ if (typeof maximum === "number") json$1.maxLength = maximum;
8567
+ if (format) {
8568
+ json$1.format = formatMap[format] ?? format;
8569
+ if (json$1.format === "") delete json$1.format;
8935
8570
  }
8936
- case "symbol": {
8937
- if (this.unrepresentable === "throw") {
8938
- throw new Error("Symbols cannot be represented in JSON Schema");
8571
+ if (contentEncoding) json$1.contentEncoding = contentEncoding;
8572
+ if (patterns && patterns.size > 0) {
8573
+ const regexes = [...patterns];
8574
+ if (regexes.length === 1) json$1.pattern = regexes[0].source;
8575
+ else if (regexes.length > 1) {
8576
+ result.schema.allOf = [...regexes.map((regex) => ({
8577
+ ...this.target === "draft-7" ? { type: "string" } : {},
8578
+ pattern: regex.source
8579
+ }))];
8939
8580
  }
8940
- break;
8941
8581
  }
8942
- case "null": {
8943
- _json.type = "null";
8944
- break;
8945
- }
8946
- case "any": {
8947
- break;
8948
- }
8949
- case "unknown": {
8950
- break;
8951
- }
8952
- case "undefined": {
8953
- if (this.unrepresentable === "throw") {
8954
- throw new Error("Undefined cannot be represented in JSON Schema");
8582
+ break;
8583
+ }
8584
+ case "number": {
8585
+ const json$1 = _json;
8586
+ const { minimum, maximum, format, multipleOf, exclusiveMaximum, exclusiveMinimum } = schema._zod.bag;
8587
+ if (typeof format === "string" && format.includes("int")) json$1.type = "integer";
8588
+ else json$1.type = "number";
8589
+ if (typeof exclusiveMinimum === "number") json$1.exclusiveMinimum = exclusiveMinimum;
8590
+ if (typeof minimum === "number") {
8591
+ json$1.minimum = minimum;
8592
+ if (typeof exclusiveMinimum === "number") {
8593
+ if (exclusiveMinimum >= minimum) delete json$1.minimum;
8594
+ else delete json$1.exclusiveMinimum;
8955
8595
  }
8956
- break;
8957
8596
  }
8958
- case "void": {
8959
- if (this.unrepresentable === "throw") {
8960
- throw new Error("Void cannot be represented in JSON Schema");
8597
+ if (typeof exclusiveMaximum === "number") json$1.exclusiveMaximum = exclusiveMaximum;
8598
+ if (typeof maximum === "number") {
8599
+ json$1.maximum = maximum;
8600
+ if (typeof exclusiveMaximum === "number") {
8601
+ if (exclusiveMaximum <= maximum) delete json$1.maximum;
8602
+ else delete json$1.exclusiveMaximum;
8961
8603
  }
8962
- break;
8963
- }
8964
- case "never": {
8965
- _json.not = {};
8966
- break;
8967
8604
  }
8968
- case "date": {
8969
- if (this.unrepresentable === "throw") {
8970
- throw new Error("Date cannot be represented in JSON Schema");
8971
- }
8972
- break;
8605
+ if (typeof multipleOf === "number") json$1.multipleOf = multipleOf;
8606
+ break;
8607
+ }
8608
+ case "boolean": {
8609
+ const json$1 = _json;
8610
+ json$1.type = "boolean";
8611
+ break;
8612
+ }
8613
+ case "bigint": {
8614
+ if (this.unrepresentable === "throw") {
8615
+ throw new Error("BigInt cannot be represented in JSON Schema");
8973
8616
  }
8974
- case "array": {
8975
- const json$1 = _json;
8976
- const { minimum, maximum } = schema._zod.bag;
8977
- if (typeof minimum === "number") json$1.minItems = minimum;
8978
- if (typeof maximum === "number") json$1.maxItems = maximum;
8979
- json$1.type = "array";
8980
- json$1.items = this.process(def.element, {
8981
- ...params,
8982
- path: [...params.path, "items"]
8983
- });
8984
- break;
8617
+ break;
8618
+ }
8619
+ case "symbol": {
8620
+ if (this.unrepresentable === "throw") {
8621
+ throw new Error("Symbols cannot be represented in JSON Schema");
8985
8622
  }
8986
- case "object": {
8987
- const json$1 = _json;
8988
- json$1.type = "object";
8989
- json$1.properties = {};
8990
- const shape = def.shape;
8991
- for (const key in shape) {
8992
- json$1.properties[key] = this.process(shape[key], {
8993
- ...params,
8994
- path: [
8995
- ...params.path,
8996
- "properties",
8997
- key
8998
- ]
8999
- });
9000
- }
9001
- const allKeys = new Set(Object.keys(shape));
9002
- const requiredKeys = new Set([...allKeys].filter((key) => {
9003
- const v = def.shape[key]._zod;
9004
- if (this.io === "input") {
9005
- return v.optin === undefined;
9006
- } else {
9007
- return v.optout === undefined;
9008
- }
9009
- }));
9010
- if (requiredKeys.size > 0) {
9011
- json$1.required = Array.from(requiredKeys);
9012
- }
9013
- if (def.catchall?._zod.def.type === "never") {
9014
- json$1.additionalProperties = false;
9015
- } else if (!def.catchall) {
9016
- if (this.io === "output") json$1.additionalProperties = false;
9017
- } else if (def.catchall) {
9018
- json$1.additionalProperties = this.process(def.catchall, {
9019
- ...params,
9020
- path: [...params.path, "additionalProperties"]
9021
- });
9022
- }
9023
- break;
8623
+ break;
8624
+ }
8625
+ case "undefined": {
8626
+ const json$1 = _json;
8627
+ json$1.type = "null";
8628
+ break;
8629
+ }
8630
+ case "null": {
8631
+ _json.type = "null";
8632
+ break;
8633
+ }
8634
+ case "any": {
8635
+ break;
8636
+ }
8637
+ case "unknown": {
8638
+ break;
8639
+ }
8640
+ case "never": {
8641
+ _json.not = {};
8642
+ break;
8643
+ }
8644
+ case "void": {
8645
+ if (this.unrepresentable === "throw") {
8646
+ throw new Error("Void cannot be represented in JSON Schema");
9024
8647
  }
9025
- case "union": {
9026
- const json$1 = _json;
9027
- json$1.anyOf = def.options.map((x, i) => this.process(x, {
9028
- ...params,
9029
- path: [
9030
- ...params.path,
9031
- "anyOf",
9032
- i
9033
- ]
9034
- }));
9035
- break;
8648
+ break;
8649
+ }
8650
+ case "date": {
8651
+ if (this.unrepresentable === "throw") {
8652
+ throw new Error("Date cannot be represented in JSON Schema");
9036
8653
  }
9037
- case "intersection": {
9038
- const json$1 = _json;
9039
- const a = this.process(def.left, {
9040
- ...params,
9041
- path: [
9042
- ...params.path,
9043
- "allOf",
9044
- 0
9045
- ]
9046
- });
9047
- const b = this.process(def.right, {
8654
+ break;
8655
+ }
8656
+ case "array": {
8657
+ const json$1 = _json;
8658
+ const { minimum, maximum } = schema._zod.bag;
8659
+ if (typeof minimum === "number") json$1.minItems = minimum;
8660
+ if (typeof maximum === "number") json$1.maxItems = maximum;
8661
+ json$1.type = "array";
8662
+ json$1.items = this.process(def.element, {
8663
+ ...params,
8664
+ path: [...params.path, "items"]
8665
+ });
8666
+ break;
8667
+ }
8668
+ case "object": {
8669
+ const json$1 = _json;
8670
+ json$1.type = "object";
8671
+ json$1.properties = {};
8672
+ const shape = def.shape;
8673
+ for (const key in shape) {
8674
+ json$1.properties[key] = this.process(shape[key], {
9048
8675
  ...params,
9049
8676
  path: [
9050
8677
  ...params.path,
9051
- "allOf",
9052
- 1
8678
+ "properties",
8679
+ key
9053
8680
  ]
9054
8681
  });
9055
- const isSimpleIntersection = (val) => "allOf" in val && Object.keys(val).length === 1;
9056
- const allOf = [...isSimpleIntersection(a) ? a.allOf : [a], ...isSimpleIntersection(b) ? b.allOf : [b]];
9057
- json$1.allOf = allOf;
9058
- break;
9059
8682
  }
9060
- case "tuple": {
9061
- const json$1 = _json;
9062
- json$1.type = "array";
9063
- const prefixItems = def.items.map((x, i) => this.process(x, {
9064
- ...params,
9065
- path: [
9066
- ...params.path,
9067
- "prefixItems",
9068
- i
9069
- ]
9070
- }));
9071
- if (this.target === "draft-2020-12") {
9072
- json$1.prefixItems = prefixItems;
8683
+ const allKeys = new Set(Object.keys(shape));
8684
+ const requiredKeys = new Set([...allKeys].filter((key) => {
8685
+ const v = def.shape[key]._zod;
8686
+ if (this.io === "input") {
8687
+ return v.optin === undefined;
9073
8688
  } else {
9074
- json$1.items = prefixItems;
8689
+ return v.optout === undefined;
9075
8690
  }
9076
- if (def.rest) {
9077
- const rest = this.process(def.rest, {
9078
- ...params,
9079
- path: [...params.path, "items"]
9080
- });
9081
- if (this.target === "draft-2020-12") {
9082
- json$1.items = rest;
9083
- } else {
9084
- json$1.additionalItems = rest;
9085
- }
9086
- }
9087
- if (def.rest) {
9088
- json$1.items = this.process(def.rest, {
9089
- ...params,
9090
- path: [...params.path, "items"]
9091
- });
9092
- }
9093
- const { minimum, maximum } = schema._zod.bag;
9094
- if (typeof minimum === "number") json$1.minItems = minimum;
9095
- if (typeof maximum === "number") json$1.maxItems = maximum;
9096
- break;
8691
+ }));
8692
+ if (requiredKeys.size > 0) {
8693
+ json$1.required = Array.from(requiredKeys);
9097
8694
  }
9098
- case "record": {
9099
- const json$1 = _json;
9100
- json$1.type = "object";
9101
- json$1.propertyNames = this.process(def.keyType, {
9102
- ...params,
9103
- path: [...params.path, "propertyNames"]
9104
- });
9105
- json$1.additionalProperties = this.process(def.valueType, {
8695
+ if (def.catchall?._zod.def.type === "never") {
8696
+ json$1.additionalProperties = false;
8697
+ } else if (!def.catchall) {
8698
+ if (this.io === "output") json$1.additionalProperties = false;
8699
+ } else if (def.catchall) {
8700
+ json$1.additionalProperties = this.process(def.catchall, {
9106
8701
  ...params,
9107
8702
  path: [...params.path, "additionalProperties"]
9108
8703
  });
9109
- break;
9110
8704
  }
9111
- case "map": {
9112
- if (this.unrepresentable === "throw") {
9113
- throw new Error("Map cannot be represented in JSON Schema");
9114
- }
9115
- break;
8705
+ break;
8706
+ }
8707
+ case "union": {
8708
+ const json$1 = _json;
8709
+ json$1.anyOf = def.options.map((x, i) => this.process(x, {
8710
+ ...params,
8711
+ path: [
8712
+ ...params.path,
8713
+ "anyOf",
8714
+ i
8715
+ ]
8716
+ }));
8717
+ break;
8718
+ }
8719
+ case "intersection": {
8720
+ const json$1 = _json;
8721
+ const a = this.process(def.left, {
8722
+ ...params,
8723
+ path: [
8724
+ ...params.path,
8725
+ "allOf",
8726
+ 0
8727
+ ]
8728
+ });
8729
+ const b = this.process(def.right, {
8730
+ ...params,
8731
+ path: [
8732
+ ...params.path,
8733
+ "allOf",
8734
+ 1
8735
+ ]
8736
+ });
8737
+ const isSimpleIntersection = (val) => "allOf" in val && Object.keys(val).length === 1;
8738
+ const allOf = [...isSimpleIntersection(a) ? a.allOf : [a], ...isSimpleIntersection(b) ? b.allOf : [b]];
8739
+ json$1.allOf = allOf;
8740
+ break;
8741
+ }
8742
+ case "tuple": {
8743
+ const json$1 = _json;
8744
+ json$1.type = "array";
8745
+ const prefixItems = def.items.map((x, i) => this.process(x, {
8746
+ ...params,
8747
+ path: [
8748
+ ...params.path,
8749
+ "prefixItems",
8750
+ i
8751
+ ]
8752
+ }));
8753
+ if (this.target === "draft-2020-12") {
8754
+ json$1.prefixItems = prefixItems;
8755
+ } else {
8756
+ json$1.items = prefixItems;
9116
8757
  }
9117
- case "set": {
9118
- if (this.unrepresentable === "throw") {
9119
- throw new Error("Set cannot be represented in JSON Schema");
8758
+ if (def.rest) {
8759
+ const rest = this.process(def.rest, {
8760
+ ...params,
8761
+ path: [...params.path, "items"]
8762
+ });
8763
+ if (this.target === "draft-2020-12") {
8764
+ json$1.items = rest;
8765
+ } else {
8766
+ json$1.additionalItems = rest;
9120
8767
  }
9121
- break;
9122
8768
  }
9123
- case "enum": {
9124
- const json$1 = _json;
9125
- const values = getEnumValues(def.entries);
9126
- if (values.every((v) => typeof v === "number")) json$1.type = "number";
9127
- if (values.every((v) => typeof v === "string")) json$1.type = "string";
9128
- json$1.enum = values;
9129
- break;
8769
+ if (def.rest) {
8770
+ json$1.items = this.process(def.rest, {
8771
+ ...params,
8772
+ path: [...params.path, "items"]
8773
+ });
8774
+ }
8775
+ const { minimum, maximum } = schema._zod.bag;
8776
+ if (typeof minimum === "number") json$1.minItems = minimum;
8777
+ if (typeof maximum === "number") json$1.maxItems = maximum;
8778
+ break;
8779
+ }
8780
+ case "record": {
8781
+ const json$1 = _json;
8782
+ json$1.type = "object";
8783
+ json$1.propertyNames = this.process(def.keyType, {
8784
+ ...params,
8785
+ path: [...params.path, "propertyNames"]
8786
+ });
8787
+ json$1.additionalProperties = this.process(def.valueType, {
8788
+ ...params,
8789
+ path: [...params.path, "additionalProperties"]
8790
+ });
8791
+ break;
8792
+ }
8793
+ case "map": {
8794
+ if (this.unrepresentable === "throw") {
8795
+ throw new Error("Map cannot be represented in JSON Schema");
9130
8796
  }
9131
- case "literal": {
9132
- const json$1 = _json;
9133
- const vals = [];
9134
- for (const val of def.values) {
9135
- if (val === undefined) {
9136
- if (this.unrepresentable === "throw") {
9137
- throw new Error("Literal `undefined` cannot be represented in JSON Schema");
9138
- } else {}
9139
- } else if (typeof val === "bigint") {
9140
- if (this.unrepresentable === "throw") {
9141
- throw new Error("BigInt literals cannot be represented in JSON Schema");
9142
- } else {
9143
- vals.push(Number(val));
9144
- }
9145
- } else {
9146
- vals.push(val);
9147
- }
9148
- }
9149
- if (vals.length === 0) {} else if (vals.length === 1) {
9150
- const val = vals[0];
9151
- json$1.type = val === null ? "null" : typeof val;
9152
- json$1.const = val;
9153
- } else {
9154
- if (vals.every((v) => typeof v === "number")) json$1.type = "number";
9155
- if (vals.every((v) => typeof v === "string")) json$1.type = "string";
9156
- if (vals.every((v) => typeof v === "boolean")) json$1.type = "string";
9157
- if (vals.every((v) => v === null)) json$1.type = "null";
9158
- json$1.enum = vals;
9159
- }
9160
- break;
8797
+ break;
8798
+ }
8799
+ case "set": {
8800
+ if (this.unrepresentable === "throw") {
8801
+ throw new Error("Set cannot be represented in JSON Schema");
9161
8802
  }
9162
- case "file": {
9163
- const json$1 = _json;
9164
- const file$1 = {
9165
- type: "string",
9166
- format: "binary",
9167
- contentEncoding: "binary"
9168
- };
9169
- const { minimum, maximum, mime } = schema._zod.bag;
9170
- if (minimum !== undefined) file$1.minLength = minimum;
9171
- if (maximum !== undefined) file$1.maxLength = maximum;
9172
- if (mime) {
9173
- if (mime.length === 1) {
9174
- file$1.contentMediaType = mime[0];
9175
- Object.assign(json$1, file$1);
8803
+ break;
8804
+ }
8805
+ case "enum": {
8806
+ const json$1 = _json;
8807
+ const values = getEnumValues(def.entries);
8808
+ if (values.every((v) => typeof v === "number")) json$1.type = "number";
8809
+ if (values.every((v) => typeof v === "string")) json$1.type = "string";
8810
+ json$1.enum = values;
8811
+ break;
8812
+ }
8813
+ case "literal": {
8814
+ const json$1 = _json;
8815
+ const vals = [];
8816
+ for (const val of def.values) {
8817
+ if (val === undefined) {
8818
+ if (this.unrepresentable === "throw") {
8819
+ throw new Error("Literal `undefined` cannot be represented in JSON Schema");
8820
+ } else {}
8821
+ } else if (typeof val === "bigint") {
8822
+ if (this.unrepresentable === "throw") {
8823
+ throw new Error("BigInt literals cannot be represented in JSON Schema");
9176
8824
  } else {
9177
- json$1.anyOf = mime.map((m) => {
9178
- const mFile = {
9179
- ...file$1,
9180
- contentMediaType: m
9181
- };
9182
- return mFile;
9183
- });
8825
+ vals.push(Number(val));
9184
8826
  }
9185
8827
  } else {
9186
- Object.assign(json$1, file$1);
9187
- }
9188
- break;
9189
- }
9190
- case "transform": {
9191
- if (this.unrepresentable === "throw") {
9192
- throw new Error("Transforms cannot be represented in JSON Schema");
8828
+ vals.push(val);
9193
8829
  }
9194
- break;
9195
8830
  }
9196
- case "nullable": {
9197
- const inner = this.process(def.innerType, params);
9198
- _json.anyOf = [inner, { type: "null" }];
9199
- break;
9200
- }
9201
- case "nonoptional": {
9202
- this.process(def.innerType, params);
9203
- result.ref = def.innerType;
9204
- break;
9205
- }
9206
- case "success": {
9207
- const json$1 = _json;
9208
- json$1.type = "boolean";
9209
- break;
9210
- }
9211
- case "default": {
9212
- this.process(def.innerType, params);
9213
- result.ref = def.innerType;
9214
- _json.default = JSON.parse(JSON.stringify(def.defaultValue));
9215
- break;
9216
- }
9217
- case "prefault": {
9218
- this.process(def.innerType, params);
9219
- result.ref = def.innerType;
9220
- if (this.io === "input") _json._prefault = JSON.parse(JSON.stringify(def.defaultValue));
9221
- break;
9222
- }
9223
- case "catch": {
9224
- this.process(def.innerType, params);
9225
- result.ref = def.innerType;
9226
- let catchValue;
9227
- try {
9228
- catchValue = def.catchValue(undefined);
9229
- } catch {
9230
- throw new Error("Dynamic catch values are not supported in JSON Schema");
9231
- }
9232
- _json.default = catchValue;
9233
- break;
8831
+ if (vals.length === 0) {} else if (vals.length === 1) {
8832
+ const val = vals[0];
8833
+ json$1.type = val === null ? "null" : typeof val;
8834
+ json$1.const = val;
8835
+ } else {
8836
+ if (vals.every((v) => typeof v === "number")) json$1.type = "number";
8837
+ if (vals.every((v) => typeof v === "string")) json$1.type = "string";
8838
+ if (vals.every((v) => typeof v === "boolean")) json$1.type = "string";
8839
+ if (vals.every((v) => v === null)) json$1.type = "null";
8840
+ json$1.enum = vals;
9234
8841
  }
9235
- case "nan": {
9236
- if (this.unrepresentable === "throw") {
9237
- throw new Error("NaN cannot be represented in JSON Schema");
8842
+ break;
8843
+ }
8844
+ case "file": {
8845
+ const json$1 = _json;
8846
+ const file$1 = {
8847
+ type: "string",
8848
+ format: "binary",
8849
+ contentEncoding: "binary"
8850
+ };
8851
+ const { minimum, maximum, mime } = schema._zod.bag;
8852
+ if (minimum !== undefined) file$1.minLength = minimum;
8853
+ if (maximum !== undefined) file$1.maxLength = maximum;
8854
+ if (mime) {
8855
+ if (mime.length === 1) {
8856
+ file$1.contentMediaType = mime[0];
8857
+ Object.assign(json$1, file$1);
8858
+ } else {
8859
+ json$1.anyOf = mime.map((m) => {
8860
+ const mFile = {
8861
+ ...file$1,
8862
+ contentMediaType: m
8863
+ };
8864
+ return mFile;
8865
+ });
9238
8866
  }
9239
- break;
9240
- }
9241
- case "template_literal": {
9242
- const json$1 = _json;
9243
- const pattern = schema._zod.pattern;
9244
- if (!pattern) throw new Error("Pattern not found in template literal");
9245
- json$1.type = "string";
9246
- json$1.pattern = pattern.source;
9247
- break;
9248
- }
9249
- case "pipe": {
9250
- const innerType = this.io === "input" ? def.in._zod.def.type === "transform" ? def.out : def.in : def.out;
9251
- this.process(innerType, params);
9252
- result.ref = innerType;
9253
- break;
9254
- }
9255
- case "readonly": {
9256
- this.process(def.innerType, params);
9257
- result.ref = def.innerType;
9258
- _json.readOnly = true;
9259
- break;
9260
- }
9261
- case "promise": {
9262
- this.process(def.innerType, params);
9263
- result.ref = def.innerType;
9264
- break;
8867
+ } else {
8868
+ Object.assign(json$1, file$1);
9265
8869
  }
9266
- case "optional": {
9267
- this.process(def.innerType, params);
9268
- result.ref = def.innerType;
9269
- break;
8870
+ break;
8871
+ }
8872
+ case "transform": {
8873
+ if (this.unrepresentable === "throw") {
8874
+ throw new Error("Transforms cannot be represented in JSON Schema");
9270
8875
  }
9271
- case "lazy": {
9272
- const innerType = schema._zod.innerType;
9273
- this.process(innerType, params);
9274
- result.ref = innerType;
9275
- break;
8876
+ break;
8877
+ }
8878
+ case "nullable": {
8879
+ const inner = this.process(def.innerType, params);
8880
+ _json.anyOf = [inner, { type: "null" }];
8881
+ break;
8882
+ }
8883
+ case "nonoptional": {
8884
+ this.process(def.innerType, params);
8885
+ result.ref = def.innerType;
8886
+ break;
8887
+ }
8888
+ case "success": {
8889
+ const json$1 = _json;
8890
+ json$1.type = "boolean";
8891
+ break;
8892
+ }
8893
+ case "default": {
8894
+ this.process(def.innerType, params);
8895
+ result.ref = def.innerType;
8896
+ _json.default = def.defaultValue;
8897
+ break;
8898
+ }
8899
+ case "prefault": {
8900
+ this.process(def.innerType, params);
8901
+ result.ref = def.innerType;
8902
+ if (this.io === "input") _json._prefault = def.defaultValue;
8903
+ break;
8904
+ }
8905
+ case "catch": {
8906
+ this.process(def.innerType, params);
8907
+ result.ref = def.innerType;
8908
+ let catchValue;
8909
+ try {
8910
+ catchValue = def.catchValue(undefined);
8911
+ } catch {
8912
+ throw new Error("Dynamic catch values are not supported in JSON Schema");
9276
8913
  }
9277
- case "custom": {
9278
- if (this.unrepresentable === "throw") {
9279
- throw new Error("Custom types cannot be represented in JSON Schema");
9280
- }
9281
- break;
8914
+ _json.default = catchValue;
8915
+ break;
8916
+ }
8917
+ case "nan": {
8918
+ if (this.unrepresentable === "throw") {
8919
+ throw new Error("NaN cannot be represented in JSON Schema");
9282
8920
  }
9283
- default: {
9284
- def;
8921
+ break;
8922
+ }
8923
+ case "template_literal": {
8924
+ const json$1 = _json;
8925
+ const pattern = schema._zod.pattern;
8926
+ if (!pattern) throw new Error("Pattern not found in template literal");
8927
+ json$1.type = "string";
8928
+ json$1.pattern = pattern.source;
8929
+ break;
8930
+ }
8931
+ case "pipe": {
8932
+ const innerType = this.io === "input" ? def.in._zod.def.type === "transform" ? def.out : def.in : def.out;
8933
+ this.process(innerType, params);
8934
+ result.ref = innerType;
8935
+ break;
8936
+ }
8937
+ case "readonly": {
8938
+ this.process(def.innerType, params);
8939
+ result.ref = def.innerType;
8940
+ _json.readOnly = true;
8941
+ break;
8942
+ }
8943
+ case "promise": {
8944
+ this.process(def.innerType, params);
8945
+ result.ref = def.innerType;
8946
+ break;
8947
+ }
8948
+ case "optional": {
8949
+ this.process(def.innerType, params);
8950
+ result.ref = def.innerType;
8951
+ break;
8952
+ }
8953
+ case "lazy": {
8954
+ const innerType = schema._zod.innerType;
8955
+ this.process(innerType, params);
8956
+ result.ref = innerType;
8957
+ break;
8958
+ }
8959
+ case "custom": {
8960
+ if (this.unrepresentable === "throw") {
8961
+ throw new Error("Custom types cannot be represented in JSON Schema");
9285
8962
  }
8963
+ break;
8964
+ }
8965
+ default: {
8966
+ def;
9286
8967
  }
9287
8968
  }
9288
8969
  }
@@ -9309,15 +8990,12 @@ var JSONSchemaGenerator = class {
9309
8990
  const defsSegment = this.target === "draft-2020-12" ? "$defs" : "definitions";
9310
8991
  if (params.external) {
9311
8992
  const externalId = params.external.registry.get(entry[0])?.id;
9312
- const uriGenerator = params.external.uri ?? ((id$1) => id$1);
9313
- if (externalId) {
9314
- return { ref: uriGenerator(externalId) };
9315
- }
8993
+ if (externalId) return { ref: params.external.uri(externalId) };
9316
8994
  const id = entry[1].defId ?? entry[1].schema.id ?? `schema${this.counter++}`;
9317
8995
  entry[1].defId = id;
9318
8996
  return {
9319
8997
  defId: id,
9320
- ref: `${uriGenerator("__shared")}#/${defsSegment}/${id}`
8998
+ ref: `${params.external.uri("__shared")}#/${defsSegment}/${id}`
9321
8999
  };
9322
9000
  }
9323
9001
  if (entry[1] === root) {
@@ -9345,14 +9023,6 @@ var JSONSchemaGenerator = class {
9345
9023
  }
9346
9024
  schema$1.$ref = ref;
9347
9025
  };
9348
- if (params.cycles === "throw") {
9349
- for (const entry of this.seen.entries()) {
9350
- const seen = entry[1];
9351
- if (seen.cycle) {
9352
- throw new Error("Cycle detected: " + `#/${seen.cycle?.join("/")}/<root>` + "\n\nSet the `cycles` parameter to `\"ref\"` to resolve cyclical schemas with defs.");
9353
- }
9354
- }
9355
- }
9356
9026
  for (const entry of this.seen.entries()) {
9357
9027
  const seen = entry[1];
9358
9028
  if (schema === entry[0]) {
@@ -9372,7 +9042,11 @@ var JSONSchemaGenerator = class {
9372
9042
  continue;
9373
9043
  }
9374
9044
  if (seen.cycle) {
9375
- extractToDef(entry);
9045
+ if (params.cycles === "throw") {
9046
+ throw new Error("Cycle detected: " + `#/${seen.cycle?.join("/")}/<root>` + "\n\nSet the `cycles` parameter to `\"ref\"` to resolve cyclical schemas with defs.");
9047
+ } else if (params.cycles === "ref") {
9048
+ extractToDef(entry);
9049
+ }
9376
9050
  continue;
9377
9051
  }
9378
9052
  if (seen.count > 1) {
@@ -9404,8 +9078,7 @@ var JSONSchemaGenerator = class {
9404
9078
  }
9405
9079
  if (!seen.isParent) this.override({
9406
9080
  zodSchema,
9407
- jsonSchema: schema$1,
9408
- path: seen.path ?? []
9081
+ jsonSchema: schema$1
9409
9082
  });
9410
9083
  };
9411
9084
  for (const entry of [...this.seen.entries()].reverse()) {
@@ -9419,11 +9092,6 @@ var JSONSchemaGenerator = class {
9419
9092
  } else {
9420
9093
  console.warn(`Invalid target: ${this.target}`);
9421
9094
  }
9422
- if (params.external?.uri) {
9423
- const id = params.external.registry.get(schema)?.id;
9424
- if (!id) throw new Error("Schema is missing an `id` property");
9425
- result.$id = params.external.uri(id);
9426
- }
9427
9095
  Object.assign(result, root.def);
9428
9096
  const defs = params.external?.defs ?? {};
9429
9097
  for (const entry of this.seen.entries()) {
@@ -9432,13 +9100,11 @@ var JSONSchemaGenerator = class {
9432
9100
  defs[seen.defId] = seen.def;
9433
9101
  }
9434
9102
  }
9435
- if (params.external) {} else {
9436
- if (Object.keys(defs).length > 0) {
9437
- if (this.target === "draft-2020-12") {
9438
- result.$defs = defs;
9439
- } else {
9440
- result.definitions = defs;
9441
- }
9103
+ if (!params.external && Object.keys(defs).length > 0) {
9104
+ if (this.target === "draft-2020-12") {
9105
+ result.$defs = defs;
9106
+ } else {
9107
+ result.definitions = defs;
9442
9108
  }
9443
9109
  }
9444
9110
  try {
@@ -9459,7 +9125,7 @@ function toJSONSchema(input, _params) {
9459
9125
  const schemas = {};
9460
9126
  const external = {
9461
9127
  registry: input,
9462
- uri: _params?.uri,
9128
+ uri: _params?.uri || ((id) => id),
9463
9129
  defs
9464
9130
  };
9465
9131
  for (const entry of input._idmap.entries()) {
@@ -9570,11 +9236,11 @@ function isTransforming(_schema, _ctx) {
9570
9236
  }
9571
9237
 
9572
9238
  //#endregion
9573
- //#region ../../node_modules/zod/v4/core/json-schema.js
9239
+ //#region ../../node_modules/zod/dist/esm/v4/core/json-schema.js
9574
9240
  var json_schema_exports = {};
9575
9241
 
9576
9242
  //#endregion
9577
- //#region ../../node_modules/zod/v4/core/index.js
9243
+ //#region ../../node_modules/zod/dist/esm/v4/core/index.js
9578
9244
  var core_exports = {};
9579
9245
  __export(core_exports, {
9580
9246
  $ZodAny: () => $ZodAny,
@@ -9613,7 +9279,6 @@ __export(core_exports, {
9613
9279
  $ZodCheckStringFormat: () => $ZodCheckStringFormat,
9614
9280
  $ZodCheckUpperCase: () => $ZodCheckUpperCase,
9615
9281
  $ZodCustom: () => $ZodCustom,
9616
- $ZodCustomStringFormat: () => $ZodCustomStringFormat,
9617
9282
  $ZodDate: () => $ZodDate,
9618
9283
  $ZodDefault: () => $ZodDefault,
9619
9284
  $ZodDiscriminatedUnion: () => $ZodDiscriminatedUnion,
@@ -9678,8 +9343,6 @@ __export(core_exports, {
9678
9343
  Doc: () => Doc,
9679
9344
  JSONSchema: () => json_schema_exports,
9680
9345
  JSONSchemaGenerator: () => JSONSchemaGenerator,
9681
- NEVER: () => NEVER,
9682
- TimePrecision: () => TimePrecision,
9683
9346
  _any: () => _any,
9684
9347
  _array: () => _array,
9685
9348
  _base64: () => _base64,
@@ -9769,7 +9432,6 @@ __export(core_exports, {
9769
9432
  _size: () => _size,
9770
9433
  _startsWith: () => _startsWith,
9771
9434
  _string: () => _string,
9772
- _stringFormat: () => _stringFormat,
9773
9435
  _stringbool: () => _stringbool,
9774
9436
  _success: () => _success,
9775
9437
  _symbol: () => _symbol,
@@ -9819,7 +9481,7 @@ __export(core_exports, {
9819
9481
  });
9820
9482
 
9821
9483
  //#endregion
9822
- //#region ../../node_modules/zod/v4/classic/iso.js
9484
+ //#region ../../node_modules/zod/dist/esm/v4/classic/iso.js
9823
9485
  var iso_exports = {};
9824
9486
  __export(iso_exports, {
9825
9487
  ZodISODate: () => ZodISODate,
@@ -9861,7 +9523,7 @@ function duration(params) {
9861
9523
  }
9862
9524
 
9863
9525
  //#endregion
9864
- //#region ../../node_modules/zod/v4/classic/errors.js
9526
+ //#region ../../node_modules/zod/dist/esm/v4/classic/errors.js
9865
9527
  const initializer = (inst, issues) => {
9866
9528
  $ZodError.init(inst, issues);
9867
9529
  inst.name = "ZodError";
@@ -9879,14 +9541,14 @@ const ZodError = $constructor("ZodError", initializer);
9879
9541
  const ZodRealError = $constructor("ZodError", initializer, { Parent: Error });
9880
9542
 
9881
9543
  //#endregion
9882
- //#region ../../node_modules/zod/v4/classic/parse.js
9544
+ //#region ../../node_modules/zod/dist/esm/v4/classic/parse.js
9883
9545
  const parse = /* @__PURE__ */ _parse(ZodRealError);
9884
9546
  const parseAsync = /* @__PURE__ */ _parseAsync(ZodRealError);
9885
9547
  const safeParse = /* @__PURE__ */ _safeParse(ZodRealError);
9886
9548
  const safeParseAsync = /* @__PURE__ */ _safeParseAsync(ZodRealError);
9887
9549
 
9888
9550
  //#endregion
9889
- //#region ../../node_modules/zod/v4/classic/schemas.js
9551
+ //#region ../../node_modules/zod/dist/esm/v4/classic/schemas.js
9890
9552
  const ZodType = /* @__PURE__ */ $constructor("ZodType", (inst, def) => {
9891
9553
  $ZodType.init(inst, def);
9892
9554
  inst.def = def;
@@ -10154,13 +9816,6 @@ const ZodJWT = /* @__PURE__ */ $constructor("ZodJWT", (inst, def) => {
10154
9816
  function jwt(params) {
10155
9817
  return _jwt(ZodJWT, params);
10156
9818
  }
10157
- const ZodCustomStringFormat = /* @__PURE__ */ $constructor("ZodCustomStringFormat", (inst, def) => {
10158
- $ZodCustomStringFormat.init(inst, def);
10159
- ZodStringFormat.init(inst, def);
10160
- });
10161
- function stringFormat(format, fnOrRegex, _params = {}) {
10162
- return _stringFormat(ZodCustomStringFormat, format, fnOrRegex, _params);
10163
- }
10164
9819
  const ZodNumber = /* @__PURE__ */ $constructor("ZodNumber", (inst, def) => {
10165
9820
  $ZodNumber.init(inst, def);
10166
9821
  ZodType.init(inst, def);
@@ -10330,7 +9985,9 @@ function keyof(schema) {
10330
9985
  const ZodObject = /* @__PURE__ */ $constructor("ZodObject", (inst, def) => {
10331
9986
  $ZodObject.init(inst, def);
10332
9987
  ZodType.init(inst, def);
10333
- defineLazy(inst, "shape", () => def.shape);
9988
+ defineLazy(inst, "shape", () => {
9989
+ return Object.fromEntries(Object.entries(inst._zod.def.shape));
9990
+ });
10334
9991
  inst.keyof = () => _enum(Object.keys(inst._zod.def.shape));
10335
9992
  inst.catchall = (catchall) => inst.clone({
10336
9993
  ...inst._zod.def,
@@ -10775,8 +10432,11 @@ const ZodCustom = /* @__PURE__ */ $constructor("ZodCustom", (inst, def) => {
10775
10432
  $ZodCustom.init(inst, def);
10776
10433
  ZodType.init(inst, def);
10777
10434
  });
10778
- function check(fn) {
10779
- const ch = new $ZodCheck({ check: "custom" });
10435
+ function check(fn, params) {
10436
+ const ch = new $ZodCheck({
10437
+ check: "custom",
10438
+ ...normalizeParams(params)
10439
+ });
10780
10440
  ch._zod.check = fn;
10781
10441
  return ch;
10782
10442
  }
@@ -10786,7 +10446,7 @@ function custom(fn, _params) {
10786
10446
  function refine(fn, _params = {}) {
10787
10447
  return _refine(ZodCustom, fn, _params);
10788
10448
  }
10789
- function superRefine(fn) {
10449
+ function superRefine(fn, params) {
10790
10450
  const ch = check((payload) => {
10791
10451
  payload.addIssue = (issue$1) => {
10792
10452
  if (typeof issue$1 === "string") {
@@ -10802,7 +10462,7 @@ function superRefine(fn) {
10802
10462
  }
10803
10463
  };
10804
10464
  return fn(payload.value, payload);
10805
- });
10465
+ }, params);
10806
10466
  return ch;
10807
10467
  }
10808
10468
  function _instanceof(cls, params = { error: `Input not instance of ${cls.name}` }) {
@@ -10840,7 +10500,7 @@ function preprocess(fn, schema) {
10840
10500
  }
10841
10501
 
10842
10502
  //#endregion
10843
- //#region ../../node_modules/zod/v4/classic/compat.js
10503
+ //#region ../../node_modules/zod/dist/esm/v4/classic/compat.js
10844
10504
  /** @deprecated Use the raw string literal codes instead, e.g. "invalid_type". */
10845
10505
  const ZodIssueCode = {
10846
10506
  invalid_type: "invalid_type",
@@ -10855,6 +10515,10 @@ const ZodIssueCode = {
10855
10515
  invalid_value: "invalid_value",
10856
10516
  custom: "custom"
10857
10517
  };
10518
+ /** @deprecated Not necessary in Zod 4. */
10519
+ const INVALID = Object.freeze({ status: "aborted" });
10520
+ /** A special constant with type `never` */
10521
+ const NEVER = INVALID;
10858
10522
  /** @deprecated Use `z.config(params)` instead. */
10859
10523
  function setErrorMap(map$1) {
10860
10524
  config({ customError: map$1 });
@@ -10865,7 +10529,7 @@ function getErrorMap() {
10865
10529
  }
10866
10530
 
10867
10531
  //#endregion
10868
- //#region ../../node_modules/zod/v4/classic/coerce.js
10532
+ //#region ../../node_modules/zod/dist/esm/v4/classic/coerce.js
10869
10533
  var coerce_exports = {};
10870
10534
  __export(coerce_exports, {
10871
10535
  bigint: () => bigint,
@@ -10891,14 +10555,13 @@ function date(params) {
10891
10555
  }
10892
10556
 
10893
10557
  //#endregion
10894
- //#region ../../node_modules/zod/v4/classic/external.js
10558
+ //#region ../../node_modules/zod/dist/esm/v4/classic/external.js
10895
10559
  var external_exports = {};
10896
10560
  __export(external_exports, {
10897
10561
  $brand: () => $brand,
10898
10562
  $input: () => $input,
10899
10563
  $output: () => $output,
10900
10564
  NEVER: () => NEVER,
10901
- TimePrecision: () => TimePrecision,
10902
10565
  ZodAny: () => ZodAny,
10903
10566
  ZodArray: () => ZodArray,
10904
10567
  ZodBase64: () => ZodBase64,
@@ -10912,7 +10575,6 @@ __export(external_exports, {
10912
10575
  ZodCUID2: () => ZodCUID2,
10913
10576
  ZodCatch: () => ZodCatch,
10914
10577
  ZodCustom: () => ZodCustom,
10915
- ZodCustomStringFormat: () => ZodCustomStringFormat,
10916
10578
  ZodDate: () => ZodDate,
10917
10579
  ZodDefault: () => ZodDefault,
10918
10580
  ZodDiscriminatedUnion: () => ZodDiscriminatedUnion,
@@ -11074,7 +10736,6 @@ __export(external_exports, {
11074
10736
  startsWith: () => _startsWith,
11075
10737
  strictObject: () => strictObject,
11076
10738
  string: () => string$1,
11077
- stringFormat: () => stringFormat,
11078
10739
  stringbool: () => stringbool,
11079
10740
  success: () => success,
11080
10741
  superRefine: () => superRefine,
@@ -11105,11 +10766,11 @@ __export(external_exports, {
11105
10766
  config(en_default());
11106
10767
 
11107
10768
  //#endregion
11108
- //#region ../../node_modules/zod/v4/classic/index.js
10769
+ //#region ../../node_modules/zod/dist/esm/v4/classic/index.js
11109
10770
  var classic_default = external_exports;
11110
10771
 
11111
10772
  //#endregion
11112
- //#region ../../node_modules/zod/v4/index.js
10773
+ //#region ../../node_modules/zod/dist/esm/v4/index.js
11113
10774
  var v4_default = classic_default;
11114
10775
 
11115
10776
  //#endregion
@@ -11130,12 +10791,12 @@ var v4_default = classic_default;
11130
10791
  function validate(schema, value) {
11131
10792
  try {
11132
10793
  return schema.parse(value);
11133
- } catch (error$39) {
11134
- if (error$39 instanceof ZodError) {
11135
- const formattedErrors = error$39.issues.map((err) => `- ${err.path.join(".")}: ${err.message}`).join("\n");
11136
- throw new Error(`Validation error${error$39.issues.length > 1 ? "s" : ""}:\n${formattedErrors}`);
10794
+ } catch (error$37) {
10795
+ if (error$37 instanceof ZodError) {
10796
+ const formattedErrors = error$37.issues.map((err) => `- ${err.path.join(".")}: ${err.message}`).join("\n");
10797
+ throw new Error(`Validation error${error$37.issues.length > 1 ? "s" : ""}:\n${formattedErrors}`);
11137
10798
  }
11138
- throw error$39;
10799
+ throw error$37;
11139
10800
  }
11140
10801
  }
11141
10802