ply-ui-cli 1.1.121 → 1.1.123

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/vendor.js CHANGED
@@ -1679,11 +1679,11 @@ var require_signals = __commonJS({
1679
1679
  var require_signal_exit = __commonJS({
1680
1680
  "node_modules/signal-exit/index.js"(exports2, module2) {
1681
1681
  "use strict";
1682
- var process3 = global.process;
1683
- var processOk = function(process4) {
1684
- return process4 && typeof process4 === "object" && typeof process4.removeListener === "function" && typeof process4.emit === "function" && typeof process4.reallyExit === "function" && typeof process4.listeners === "function" && typeof process4.kill === "function" && typeof process4.pid === "number" && typeof process4.on === "function";
1682
+ var process2 = global.process;
1683
+ var processOk = function(process3) {
1684
+ return process3 && typeof process3 === "object" && typeof process3.removeListener === "function" && typeof process3.emit === "function" && typeof process3.reallyExit === "function" && typeof process3.listeners === "function" && typeof process3.kill === "function" && typeof process3.pid === "number" && typeof process3.on === "function";
1685
1685
  };
1686
- if (!processOk(process3)) {
1686
+ if (!processOk(process2)) {
1687
1687
  module2.exports = function() {
1688
1688
  return function() {
1689
1689
  };
@@ -1691,15 +1691,15 @@ var require_signal_exit = __commonJS({
1691
1691
  } else {
1692
1692
  assert2 = require("assert");
1693
1693
  signals = require_signals();
1694
- isWin = /^win/i.test(process3.platform);
1694
+ isWin = /^win/i.test(process2.platform);
1695
1695
  EE = require("events");
1696
1696
  if (typeof EE !== "function") {
1697
1697
  EE = EE.EventEmitter;
1698
1698
  }
1699
- if (process3.__signal_exit_emitter__) {
1700
- emitter = process3.__signal_exit_emitter__;
1699
+ if (process2.__signal_exit_emitter__) {
1700
+ emitter = process2.__signal_exit_emitter__;
1701
1701
  } else {
1702
- emitter = process3.__signal_exit_emitter__ = new EE();
1702
+ emitter = process2.__signal_exit_emitter__ = new EE();
1703
1703
  emitter.count = 0;
1704
1704
  emitter.emitted = {};
1705
1705
  }
@@ -1736,12 +1736,12 @@ var require_signal_exit = __commonJS({
1736
1736
  loaded = false;
1737
1737
  signals.forEach(function(sig) {
1738
1738
  try {
1739
- process3.removeListener(sig, sigListeners[sig]);
1739
+ process2.removeListener(sig, sigListeners[sig]);
1740
1740
  } catch (er) {
1741
1741
  }
1742
1742
  });
1743
- process3.emit = originalProcessEmit;
1744
- process3.reallyExit = originalProcessReallyExit;
1743
+ process2.emit = originalProcessEmit;
1744
+ process2.reallyExit = originalProcessReallyExit;
1745
1745
  emitter.count -= 1;
1746
1746
  };
1747
1747
  module2.exports.unload = unload;
@@ -1758,7 +1758,7 @@ var require_signal_exit = __commonJS({
1758
1758
  if (!processOk(global.process)) {
1759
1759
  return;
1760
1760
  }
1761
- var listeners = process3.listeners(sig);
1761
+ var listeners = process2.listeners(sig);
1762
1762
  if (listeners.length === emitter.count) {
1763
1763
  unload();
1764
1764
  emit("exit", null, sig);
@@ -1766,7 +1766,7 @@ var require_signal_exit = __commonJS({
1766
1766
  if (isWin && sig === "SIGHUP") {
1767
1767
  sig = "SIGINT";
1768
1768
  }
1769
- process3.kill(process3.pid, sig);
1769
+ process2.kill(process2.pid, sig);
1770
1770
  }
1771
1771
  };
1772
1772
  });
@@ -1782,36 +1782,36 @@ var require_signal_exit = __commonJS({
1782
1782
  emitter.count += 1;
1783
1783
  signals = signals.filter(function(sig) {
1784
1784
  try {
1785
- process3.on(sig, sigListeners[sig]);
1785
+ process2.on(sig, sigListeners[sig]);
1786
1786
  return true;
1787
1787
  } catch (er) {
1788
1788
  return false;
1789
1789
  }
1790
1790
  });
1791
- process3.emit = processEmit;
1792
- process3.reallyExit = processReallyExit;
1791
+ process2.emit = processEmit;
1792
+ process2.reallyExit = processReallyExit;
1793
1793
  };
1794
1794
  module2.exports.load = load;
1795
- originalProcessReallyExit = process3.reallyExit;
1795
+ originalProcessReallyExit = process2.reallyExit;
1796
1796
  processReallyExit = function processReallyExit2(code) {
1797
1797
  if (!processOk(global.process)) {
1798
1798
  return;
1799
1799
  }
1800
- process3.exitCode = code || /* istanbul ignore next */
1800
+ process2.exitCode = code || /* istanbul ignore next */
1801
1801
  0;
1802
- emit("exit", process3.exitCode, null);
1803
- emit("afterexit", process3.exitCode, null);
1804
- originalProcessReallyExit.call(process3, process3.exitCode);
1802
+ emit("exit", process2.exitCode, null);
1803
+ emit("afterexit", process2.exitCode, null);
1804
+ originalProcessReallyExit.call(process2, process2.exitCode);
1805
1805
  };
1806
- originalProcessEmit = process3.emit;
1806
+ originalProcessEmit = process2.emit;
1807
1807
  processEmit = function processEmit2(ev, arg) {
1808
1808
  if (ev === "exit" && processOk(global.process)) {
1809
1809
  if (arg !== void 0) {
1810
- process3.exitCode = arg;
1810
+ process2.exitCode = arg;
1811
1811
  }
1812
1812
  var ret = originalProcessEmit.apply(this, arguments);
1813
- emit("exit", process3.exitCode, null);
1814
- emit("afterexit", process3.exitCode, null);
1813
+ emit("exit", process2.exitCode, null);
1814
+ emit("afterexit", process2.exitCode, null);
1815
1815
  return ret;
1816
1816
  } else {
1817
1817
  return originalProcessEmit.apply(this, arguments);
@@ -5493,9 +5493,9 @@ var require_async_iterator = __commonJS({
5493
5493
  },
5494
5494
  next: function next() {
5495
5495
  var _this = this;
5496
- var error61 = this[kError];
5497
- if (error61 !== null) {
5498
- return Promise.reject(error61);
5496
+ var error62 = this[kError];
5497
+ if (error62 !== null) {
5498
+ return Promise.reject(error62);
5499
5499
  }
5500
5500
  if (this[kEnded]) {
5501
5501
  return Promise.resolve(createIterResult(void 0, true));
@@ -5608,8 +5608,8 @@ var require_from = __commonJS({
5608
5608
  try {
5609
5609
  var info = gen[key](arg);
5610
5610
  var value = info.value;
5611
- } catch (error61) {
5612
- reject(error61);
5611
+ } catch (error62) {
5612
+ reject(error62);
5613
5613
  return;
5614
5614
  }
5615
5615
  if (info.done) {
@@ -6639,16 +6639,16 @@ var require_pipeline = __commonJS({
6639
6639
  if (streams.length < 2) {
6640
6640
  throw new ERR_MISSING_ARGS("streams");
6641
6641
  }
6642
- var error61;
6642
+ var error62;
6643
6643
  var destroys = streams.map(function(stream, i) {
6644
6644
  var reading = i < streams.length - 1;
6645
6645
  var writing = i > 0;
6646
6646
  return destroyer(stream, reading, writing, function(err) {
6647
- if (!error61) error61 = err;
6647
+ if (!error62) error62 = err;
6648
6648
  if (err) destroys.forEach(call);
6649
6649
  if (reading) return;
6650
6650
  destroys.forEach(call);
6651
- callback(error61);
6651
+ callback(error62);
6652
6652
  });
6653
6653
  });
6654
6654
  return streams.reduce(pipe2);
@@ -7875,8 +7875,8 @@ var require_text = __commonJS({
7875
7875
  try {
7876
7876
  var info = gen[key](arg);
7877
7877
  var value = info.value;
7878
- } catch (error61) {
7879
- reject(error61);
7878
+ } catch (error62) {
7879
+ reject(error62);
7880
7880
  return;
7881
7881
  }
7882
7882
  if (info.done) {
@@ -8614,8 +8614,8 @@ var require_date = __commonJS({
8614
8614
  try {
8615
8615
  var info = gen[key](arg);
8616
8616
  var value = info.value;
8617
- } catch (error61) {
8618
- reject(error61);
8617
+ } catch (error62) {
8618
+ reject(error62);
8619
8619
  return;
8620
8620
  }
8621
8621
  if (info.done) {
@@ -8840,8 +8840,8 @@ var require_number = __commonJS({
8840
8840
  try {
8841
8841
  var info = gen[key](arg);
8842
8842
  var value = info.value;
8843
- } catch (error61) {
8844
- reject(error61);
8843
+ } catch (error62) {
8844
+ reject(error62);
8845
8845
  return;
8846
8846
  }
8847
8847
  if (info.done) {
@@ -9286,8 +9286,8 @@ var require_autocomplete = __commonJS({
9286
9286
  try {
9287
9287
  var info = gen[key](arg);
9288
9288
  var value = info.value;
9289
- } catch (error61) {
9290
- reject(error61);
9289
+ } catch (error62) {
9290
+ reject(error62);
9291
9291
  return;
9292
9292
  }
9293
9293
  if (info.done) {
@@ -9940,8 +9940,8 @@ var require_dist = __commonJS({
9940
9940
  try {
9941
9941
  var info = gen[key](arg);
9942
9942
  var value = info.value;
9943
- } catch (error61) {
9944
- reject(error61);
9943
+ } catch (error62) {
9944
+ reject(error62);
9945
9945
  return;
9946
9946
  }
9947
9947
  if (info.done) {
@@ -12503,6 +12503,7 @@ __export(external_exports, {
12503
12503
  $brand: () => $brand,
12504
12504
  $input: () => $input,
12505
12505
  $output: () => $output,
12506
+ INVALID: () => INVALID,
12506
12507
  NEVER: () => NEVER,
12507
12508
  TimePrecision: () => TimePrecision,
12508
12509
  ZodAny: () => ZodAny,
@@ -12536,12 +12537,14 @@ __export(external_exports, {
12536
12537
  ZodFirstPartyTypeKind: () => ZodFirstPartyTypeKind,
12537
12538
  ZodFunction: () => ZodFunction,
12538
12539
  ZodGUID: () => ZodGUID,
12540
+ ZodIBAN: () => ZodIBAN,
12539
12541
  ZodIPv4: () => ZodIPv4,
12540
12542
  ZodIPv6: () => ZodIPv6,
12541
12543
  ZodISODate: () => ZodISODate,
12542
12544
  ZodISODateTime: () => ZodISODateTime,
12543
12545
  ZodISODuration: () => ZodISODuration,
12544
12546
  ZodISOTime: () => ZodISOTime,
12547
+ ZodInstanceOf: () => ZodInstanceOf,
12545
12548
  ZodIntersection: () => ZodIntersection,
12546
12549
  ZodIssueCode: () => ZodIssueCode,
12547
12550
  ZodJWT: () => ZodJWT,
@@ -12607,6 +12610,7 @@ __export(external_exports, {
12607
12610
  creditCard: () => creditCard2,
12608
12611
  cuid: () => cuid3,
12609
12612
  cuid2: () => cuid22,
12613
+ currencyCode: () => currencyCode2,
12610
12614
  custom: () => custom,
12611
12615
  date: () => date2,
12612
12616
  decode: () => decode2,
@@ -12639,6 +12643,7 @@ __export(external_exports, {
12639
12643
  hex: () => hex2,
12640
12644
  hostname: () => hostname2,
12641
12645
  httpUrl: () => httpUrl,
12646
+ iban: () => iban2,
12642
12647
  includes: () => _includes,
12643
12648
  input: () => input,
12644
12649
  instanceof: () => _instanceof,
@@ -12750,6 +12755,7 @@ __export(external_exports, {
12750
12755
  validate: () => validate,
12751
12756
  validateAsync: () => validateAsync,
12752
12757
  void: () => _void2,
12758
+ withParser: () => withParser,
12753
12759
  xid: () => xid2,
12754
12760
  xor: () => xor
12755
12761
  });
@@ -12786,6 +12792,7 @@ __export(core_exports2, {
12786
12792
  $ZodCheckMultipleOf: () => $ZodCheckMultipleOf,
12787
12793
  $ZodCheckNumberFormat: () => $ZodCheckNumberFormat,
12788
12794
  $ZodCheckOverwrite: () => $ZodCheckOverwrite,
12795
+ $ZodCheckProperties: () => $ZodCheckProperties,
12789
12796
  $ZodCheckProperty: () => $ZodCheckProperty,
12790
12797
  $ZodCheckRegex: () => $ZodCheckRegex,
12791
12798
  $ZodCheckSizeEquals: () => $ZodCheckSizeEquals,
@@ -12810,6 +12817,7 @@ __export(core_exports2, {
12810
12817
  $ZodFile: () => $ZodFile,
12811
12818
  $ZodFunction: () => $ZodFunction,
12812
12819
  $ZodGUID: () => $ZodGUID,
12820
+ $ZodIBAN: () => $ZodIBAN,
12813
12821
  $ZodIPv4: () => $ZodIPv4,
12814
12822
  $ZodIPv6: () => $ZodIPv6,
12815
12823
  $ZodISODate: () => $ZodISODate,
@@ -12911,6 +12919,7 @@ __export(core_exports2, {
12911
12919
  _gt: () => _gt,
12912
12920
  _gte: () => _gte,
12913
12921
  _guid: () => _guid,
12922
+ _iban: () => _iban,
12914
12923
  _includes: () => _includes,
12915
12924
  _int: () => _int,
12916
12925
  _int32: () => _int32,
@@ -13002,6 +13011,9 @@ __export(core_exports2, {
13002
13011
  _void: () => _void,
13003
13012
  _xid: () => _xid,
13004
13013
  _xor: () => _xor,
13014
+ base64Charset: () => base64Charset,
13015
+ base64urlCharset: () => base64urlCharset,
13016
+ canParseURL: () => canParseURL,
13005
13017
  clone: () => clone,
13006
13018
  compile: () => compile,
13007
13019
  compileFn: () => compileFn,
@@ -13028,6 +13040,7 @@ __export(core_exports2, {
13028
13040
  isValidBase64URL: () => isValidBase64URL,
13029
13041
  isValidCIDRv6: () => isValidCIDRv6,
13030
13042
  isValidCreditCard: () => isValidCreditCard,
13043
+ isValidIBAN: () => isValidIBAN,
13031
13044
  isValidIPv6: () => isValidIPv6,
13032
13045
  isValidJWT: () => isValidJWT,
13033
13046
  locales: () => locales_exports,
@@ -13038,7 +13051,8 @@ __export(core_exports2, {
13038
13051
  parseAsync: () => parseAsync,
13039
13052
  parseURLObject: () => parseURLObject,
13040
13053
  prettifyError: () => prettifyError,
13041
- process: () => process2,
13054
+ process: () => processSchema,
13055
+ processSchema: () => processSchema,
13042
13056
  regexes: () => regexes_exports,
13043
13057
  registry: () => registry,
13044
13058
  safeDecode: () => safeDecode,
@@ -13058,7 +13072,9 @@ __export(core_exports2, {
13058
13072
  util: () => util_exports,
13059
13073
  validate: () => validate,
13060
13074
  validateAsync: () => validateAsync,
13061
- version: () => version
13075
+ validateURL: () => validateURL,
13076
+ version: () => version,
13077
+ withParser: () => withParser
13062
13078
  });
13063
13079
 
13064
13080
  // node_modules/zod/v4/core/util.js
@@ -13090,6 +13106,7 @@ __export(util_exports, {
13090
13106
  createTransparentProxy: () => createTransparentProxy,
13091
13107
  defineLazy: () => defineLazy,
13092
13108
  defineLazyInternal: () => defineLazyInternal,
13109
+ derived: () => derived,
13093
13110
  esc: () => esc,
13094
13111
  escapeRegex: () => escapeRegex,
13095
13112
  explicitlyAborted: () => explicitlyAborted,
@@ -13127,6 +13144,7 @@ __export(util_exports, {
13127
13144
  promiseAllObject: () => promiseAllObject,
13128
13145
  propertyKeyTypes: () => propertyKeyTypes,
13129
13146
  randomString: () => randomString,
13147
+ rawShape: () => rawShape,
13130
13148
  required: () => required,
13131
13149
  safeExtend: () => safeExtend,
13132
13150
  shallowClone: () => shallowClone,
@@ -13167,18 +13185,22 @@ function jsonStringifyReplacer(_, value) {
13167
13185
  return value.toString();
13168
13186
  return value;
13169
13187
  }
13170
- function cached(getter) {
13171
- const set2 = false;
13172
- return {
13173
- get value() {
13174
- if (!set2) {
13175
- const value = getter();
13176
- Object.defineProperty(this, "value", { value });
13177
- return value;
13178
- }
13179
- throw new Error("cached value already set");
13188
+ var Cached = class {
13189
+ constructor(getter) {
13190
+ this._getter = getter;
13191
+ this._value = void 0;
13192
+ }
13193
+ get value() {
13194
+ const getter = this._getter;
13195
+ if (getter !== void 0) {
13196
+ this._value = getter();
13197
+ this._getter = void 0;
13180
13198
  }
13181
- };
13199
+ return this._value;
13200
+ }
13201
+ };
13202
+ function cached(getter) {
13203
+ return new Cached(getter);
13182
13204
  }
13183
13205
  function nullish(input2) {
13184
13206
  return input2 === null || input2 === void 0;
@@ -13230,6 +13252,56 @@ function assignProp(target, prop, value) {
13230
13252
  configurable: true
13231
13253
  });
13232
13254
  }
13255
+ function rawShape(def) {
13256
+ const desc = Object.getOwnPropertyDescriptor(def, "shape");
13257
+ return desc?.get ? desc.get.raw : desc?.value;
13258
+ }
13259
+ function sourceShape(schema) {
13260
+ return rawShape(schema._zod.def) ?? schema._zod.def.shape;
13261
+ }
13262
+ function deferProp(target, key, getter) {
13263
+ Object.defineProperty(target, key, {
13264
+ get() {
13265
+ const value = getter();
13266
+ assignProp(this, key, value);
13267
+ return value;
13268
+ },
13269
+ enumerable: true,
13270
+ configurable: true
13271
+ });
13272
+ }
13273
+ function putProp(target, key, value) {
13274
+ if (key in target)
13275
+ assignProp(target, key, value);
13276
+ else
13277
+ target[key] = value;
13278
+ }
13279
+ function mirrorShape(target, source, keys, wrap) {
13280
+ const raw = sourceShape(source);
13281
+ for (const key of keys) {
13282
+ const desc = Object.getOwnPropertyDescriptor(raw, key);
13283
+ if (!desc.enumerable)
13284
+ continue;
13285
+ if (desc.get) {
13286
+ deferProp(target, key, () => {
13287
+ const value = source._zod.def.shape[key];
13288
+ return wrap ? wrap(value, key) : value;
13289
+ });
13290
+ } else
13291
+ putProp(target, key, wrap ? wrap(desc.value, key) : desc.value);
13292
+ }
13293
+ }
13294
+ function mirrorProps(target, source) {
13295
+ for (const key of Reflect.ownKeys(source)) {
13296
+ const desc = Object.getOwnPropertyDescriptor(source, key);
13297
+ if (!desc.enumerable)
13298
+ continue;
13299
+ if (desc.get)
13300
+ deferProp(target, key, () => source[key]);
13301
+ else
13302
+ putProp(target, key, desc.value);
13303
+ }
13304
+ }
13233
13305
  function mergeDefs(...defs) {
13234
13306
  const mergedDescriptors = {};
13235
13307
  for (const def of defs) {
@@ -13468,23 +13540,21 @@ function pick(schema, mask) {
13468
13540
  if (hasChecks) {
13469
13541
  throw new Error(".pick() cannot be used on object schemas containing refinements");
13470
13542
  }
13471
- const def = mergeDefs(schema._zod.def, {
13472
- get shape() {
13473
- const newShape = {};
13474
- for (const key of Reflect.ownKeys(mask)) {
13475
- if (!Object.prototype.hasOwnProperty.call(currDef.shape, key)) {
13476
- throw new Error(`Unrecognized key: "${String(key)}"`);
13477
- }
13478
- if (!mask[key])
13479
- continue;
13480
- assignProp(newShape, key, currDef.shape[key]);
13481
- }
13482
- assignProp(this, "shape", newShape);
13483
- return newShape;
13484
- },
13485
- checks: []
13486
- });
13487
- return clone(schema, def);
13543
+ const newShape = {};
13544
+ mirrorShape(newShape, schema, maskedKeys(schema, mask));
13545
+ return clone(schema, mergeDefs(currDef, { shape: newShape, checks: [] }));
13546
+ }
13547
+ function maskedKeys(schema, mask) {
13548
+ const raw = sourceShape(schema);
13549
+ const keys = [];
13550
+ for (const key of Reflect.ownKeys(mask)) {
13551
+ if (!Object.getOwnPropertyDescriptor(raw, key)?.enumerable) {
13552
+ throw new Error(`Unrecognized key: "${String(key)}"`);
13553
+ }
13554
+ if (mask[key])
13555
+ keys.push(key);
13556
+ }
13557
+ return keys;
13488
13558
  }
13489
13559
  function omit(schema, mask) {
13490
13560
  const currDef = schema._zod.def;
@@ -13493,23 +13563,10 @@ function omit(schema, mask) {
13493
13563
  if (hasChecks) {
13494
13564
  throw new Error(".omit() cannot be used on object schemas containing refinements");
13495
13565
  }
13496
- const def = mergeDefs(schema._zod.def, {
13497
- get shape() {
13498
- const newShape = { ...schema._zod.def.shape };
13499
- for (const key of Reflect.ownKeys(mask)) {
13500
- if (!Object.prototype.hasOwnProperty.call(currDef.shape, key)) {
13501
- throw new Error(`Unrecognized key: "${String(key)}"`);
13502
- }
13503
- if (!mask[key])
13504
- continue;
13505
- delete newShape[key];
13506
- }
13507
- assignProp(this, "shape", newShape);
13508
- return newShape;
13509
- },
13510
- checks: []
13511
- });
13512
- return clone(schema, def);
13566
+ const omitted = new Set(maskedKeys(schema, mask));
13567
+ const newShape = {};
13568
+ mirrorShape(newShape, schema, Reflect.ownKeys(sourceShape(schema)).filter((key) => !omitted.has(key)));
13569
+ return clone(schema, mergeDefs(currDef, { shape: newShape, checks: [] }));
13513
13570
  }
13514
13571
  function extend(schema, shape) {
13515
13572
  if (!isPlainObject(shape)) {
@@ -13518,34 +13575,26 @@ function extend(schema, shape) {
13518
13575
  const checks = schema._zod.def.checks;
13519
13576
  const hasChecks = checks && checks.length > 0;
13520
13577
  if (hasChecks) {
13521
- const existingShape = schema._zod.def.shape;
13578
+ const existingShape = sourceShape(schema);
13522
13579
  for (const key of Reflect.ownKeys(shape)) {
13523
13580
  if (Object.getOwnPropertyDescriptor(existingShape, key) !== void 0) {
13524
13581
  throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.");
13525
13582
  }
13526
13583
  }
13527
13584
  }
13528
- const def = mergeDefs(schema._zod.def, {
13529
- get shape() {
13530
- const _shape = { ...schema._zod.def.shape, ...shape };
13531
- assignProp(this, "shape", _shape);
13532
- return _shape;
13533
- }
13534
- });
13535
- return clone(schema, def);
13585
+ return clone(schema, mergeDefs(schema._zod.def, { shape: extended(schema, shape) }));
13586
+ }
13587
+ function extended(schema, shape) {
13588
+ const newShape = {};
13589
+ mirrorShape(newShape, schema, Reflect.ownKeys(sourceShape(schema)));
13590
+ mirrorProps(newShape, shape);
13591
+ return newShape;
13536
13592
  }
13537
13593
  function safeExtend(schema, shape) {
13538
13594
  if (!isPlainObject(shape)) {
13539
13595
  throw new Error("Invalid input to safeExtend: expected a plain object");
13540
13596
  }
13541
- const def = mergeDefs(schema._zod.def, {
13542
- get shape() {
13543
- const _shape = { ...schema._zod.def.shape, ...shape };
13544
- assignProp(this, "shape", _shape);
13545
- return _shape;
13546
- }
13547
- });
13548
- return clone(schema, def);
13597
+ return clone(schema, mergeDefs(schema._zod.def, { shape: extended(schema, shape) }));
13549
13598
  }
13550
13599
  function merge(a, b) {
13551
13600
  if (!b?._zod?.def) {
@@ -13554,12 +13603,11 @@ function merge(a, b) {
13554
13603
  if (a._zod.def.checks?.length) {
13555
13604
  throw new Error(".merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.");
13556
13605
  }
13606
+ const newShape = {};
13607
+ mirrorShape(newShape, a, Reflect.ownKeys(sourceShape(a)));
13608
+ mirrorShape(newShape, b, Reflect.ownKeys(sourceShape(b)));
13557
13609
  const def = mergeDefs(a._zod.def, {
13558
- get shape() {
13559
- const _shape = { ...a._zod.def.shape, ...b._zod.def.shape };
13560
- assignProp(this, "shape", _shape);
13561
- return _shape;
13562
- },
13610
+ shape: newShape,
13563
13611
  get catchall() {
13564
13612
  return b._zod.def.catchall;
13565
13613
  },
@@ -13574,67 +13622,19 @@ function partial(Class2, schema, mask, name = "partial") {
13574
13622
  if (hasChecks) {
13575
13623
  throw new Error(`.${name}() cannot be used on object schemas containing refinements`);
13576
13624
  }
13577
- const def = mergeDefs(schema._zod.def, {
13578
- get shape() {
13579
- const oldShape = schema._zod.def.shape;
13580
- const shape = { ...oldShape };
13581
- if (mask) {
13582
- for (const key of Reflect.ownKeys(mask)) {
13583
- if (!Object.prototype.hasOwnProperty.call(oldShape, key)) {
13584
- throw new Error(`Unrecognized key: "${String(key)}"`);
13585
- }
13586
- if (!mask[key])
13587
- continue;
13588
- shape[key] = Class2 ? new Class2({
13589
- type: "optional",
13590
- innerType: oldShape[key]
13591
- }) : oldShape[key];
13592
- }
13593
- } else {
13594
- for (const key of Reflect.ownKeys(oldShape)) {
13595
- shape[key] = Class2 ? new Class2({
13596
- type: "optional",
13597
- innerType: oldShape[key]
13598
- }) : oldShape[key];
13599
- }
13600
- }
13601
- assignProp(this, "shape", shape);
13602
- return shape;
13603
- },
13604
- checks: []
13605
- });
13606
- return clone(schema, def);
13625
+ const selected = mask ? new Set(maskedKeys(schema, mask)) : void 0;
13626
+ const newShape = {};
13627
+ mirrorShape(newShape, schema, Reflect.ownKeys(sourceShape(schema)), Class2 && ((value, key) => selected && !selected.has(key) ? value : new Class2({ type: "optional", innerType: value })));
13628
+ return clone(schema, mergeDefs(schema._zod.def, { shape: newShape, checks: [] }));
13607
13629
  }
13608
13630
  function required(Class2, schema, mask) {
13609
- const def = mergeDefs(schema._zod.def, {
13610
- get shape() {
13611
- const oldShape = schema._zod.def.shape;
13612
- const shape = { ...oldShape };
13613
- if (mask) {
13614
- for (const key of Reflect.ownKeys(mask)) {
13615
- if (!Object.prototype.hasOwnProperty.call(shape, key)) {
13616
- throw new Error(`Unrecognized key: "${String(key)}"`);
13617
- }
13618
- if (!mask[key])
13619
- continue;
13620
- shape[key] = new Class2({
13621
- type: "nonoptional",
13622
- innerType: oldShape[key]
13623
- });
13624
- }
13625
- } else {
13626
- for (const key of Reflect.ownKeys(oldShape)) {
13627
- shape[key] = new Class2({
13628
- type: "nonoptional",
13629
- innerType: oldShape[key]
13630
- });
13631
- }
13632
- }
13633
- assignProp(this, "shape", shape);
13634
- return shape;
13635
- }
13636
- });
13637
- return clone(schema, def);
13631
+ const selected = mask ? new Set(maskedKeys(schema, mask)) : void 0;
13632
+ const newShape = {};
13633
+ mirrorShape(newShape, schema, Reflect.ownKeys(sourceShape(schema)), (value, key) => (
13634
+ // overwrite with non-optional
13635
+ selected && !selected.has(key) ? value : new Class2({ type: "nonoptional", innerType: value })
13636
+ ));
13637
+ return clone(schema, mergeDefs(schema._zod.def, { shape: newShape }));
13638
13638
  }
13639
13639
  function aborted(x, startIndex = 0) {
13640
13640
  if (x.aborted === true)
@@ -13684,13 +13684,18 @@ function finalizeIssue(iss, ctx, config2) {
13684
13684
  }
13685
13685
  const schemaError = iss.schema !== iss.inst ? iss.schema?._zod.def?.error : void 0;
13686
13686
  const message = iss.message ? iss.message : unwrapMessage(iss.inst?._zod.def?.error?.(iss)) ?? unwrapMessage(schemaError?.(iss)) ?? unwrapMessage(ctx?.error?.(iss)) ?? unwrapMessage(config2.customError?.(iss)) ?? unwrapMessage(config2.localeError?.(iss)) ?? "Invalid input";
13687
- const { inst: _inst, schema: _schema, continue: _continue, input: _input, ...rest } = iss;
13688
- rest.path ?? (rest.path = []);
13689
- rest.message = message;
13687
+ const full = {};
13688
+ for (const k of Object.keys(iss)) {
13689
+ if (k === "inst" || k === "schema" || k === "continue" || k === "input" || k === "__proto__")
13690
+ continue;
13691
+ full[k] = iss[k];
13692
+ }
13693
+ full.path ?? (full.path = []);
13694
+ full.message = message;
13690
13695
  if (ctx?.reportInput) {
13691
- rest.input = _input;
13696
+ full.input = iss.input;
13692
13697
  }
13693
- return rest;
13698
+ return full;
13694
13699
  }
13695
13700
  function getSizableOrigin(input2) {
13696
13701
  if (input2 instanceof Set)
@@ -13817,6 +13822,23 @@ function own(inst, key, value, enumerable = true) {
13817
13822
  function hide(inst, key, value) {
13818
13823
  return own(inst, key, value, false);
13819
13824
  }
13825
+ // @__NO_SIDE_EFFECTS__
13826
+ function derived(computes, table) {
13827
+ for (const key in computes) {
13828
+ const compute = computes[key];
13829
+ Object.defineProperty(table, key, {
13830
+ configurable: true,
13831
+ enumerable: true,
13832
+ get() {
13833
+ return own(this, key, compute(this));
13834
+ },
13835
+ set(value) {
13836
+ own(this, key, value);
13837
+ }
13838
+ });
13839
+ }
13840
+ return table;
13841
+ }
13820
13842
  function defineBound(proto, key, fn) {
13821
13843
  Object.defineProperty(proto, key, {
13822
13844
  configurable: true,
@@ -13944,8 +13966,7 @@ function $constructor(name, initializer3, proto, params) {
13944
13966
  } finally {
13945
13967
  _zodDesc.value = void 0;
13946
13968
  }
13947
- }
13948
- if (inst._zod.traits.has(name)) {
13969
+ } else if (inst._zod.traits.has(name)) {
13949
13970
  return;
13950
13971
  }
13951
13972
  inst._zod.traits.add(name);
@@ -14036,16 +14057,12 @@ var _messageDesc = {
14036
14057
  enumerable: true,
14037
14058
  configurable: true
14038
14059
  };
14039
- var _zodDesc2 = { value: void 0, enumerable: false };
14040
14060
  var _issuesDesc = { value: void 0, enumerable: false };
14041
14061
  var _installedToString = /* @__PURE__ */ new WeakSet([Object.prototype, Error.prototype]);
14042
14062
  var initializer = (inst, def) => {
14043
14063
  inst.name = "$ZodError";
14044
- _zodDesc2.value = inst._zod;
14045
- Object.defineProperty(inst, "_zod", _zodDesc2);
14046
14064
  _issuesDesc.value = def;
14047
14065
  Object.defineProperty(inst, "issues", _issuesDesc);
14048
- _zodDesc2.value = void 0;
14049
14066
  _issuesDesc.value = void 0;
14050
14067
  Object.defineProperty(inst, "message", _messageDesc);
14051
14068
  const proto = Object.getPrototypeOf(inst);
@@ -14079,10 +14096,10 @@ function node(obj, key, make) {
14079
14096
  }
14080
14097
  return obj[key];
14081
14098
  }
14082
- function flattenError(error61, mapper = (issue2) => issue2.message) {
14099
+ function flattenError(error62, mapper = (issue2) => issue2.message) {
14083
14100
  const fieldErrors = {};
14084
14101
  const formErrors = [];
14085
- for (const sub of error61.issues) {
14102
+ for (const sub of error62.issues) {
14086
14103
  if (sub.path.length > 0) {
14087
14104
  node(fieldErrors, sub.path[0], () => []).push(mapper(sub));
14088
14105
  } else {
@@ -14091,10 +14108,10 @@ function flattenError(error61, mapper = (issue2) => issue2.message) {
14091
14108
  }
14092
14109
  return { formErrors, fieldErrors };
14093
14110
  }
14094
- function formatError(error61, mapper = (issue2) => issue2.message) {
14111
+ function formatError(error62, mapper = (issue2) => issue2.message) {
14095
14112
  const fieldErrors = { _errors: [] };
14096
- const processError = (error62, path = []) => {
14097
- for (const issue2 of error62.issues) {
14113
+ const processError = (error63, path = []) => {
14114
+ for (const issue2 of error63.issues) {
14098
14115
  if (issue2.code === "invalid_union" && issue2.errors.length) {
14099
14116
  issue2.errors.map((issues) => processError({ issues }, [...path, ...issue2.path]));
14100
14117
  } else if (issue2.code === "invalid_key") {
@@ -14136,14 +14153,14 @@ function formatError(error61, mapper = (issue2) => issue2.message) {
14136
14153
  }
14137
14154
  }
14138
14155
  };
14139
- processError(error61);
14156
+ processError(error62);
14140
14157
  return fieldErrors;
14141
14158
  }
14142
- function treeifyError(error61, mapper = (issue2) => issue2.message) {
14159
+ function treeifyError(error62, mapper = (issue2) => issue2.message) {
14143
14160
  const result = { errors: [] };
14144
- const processError = (error62, path = []) => {
14161
+ const processError = (error63, path = []) => {
14145
14162
  var _a3;
14146
- for (const issue2 of error62.issues) {
14163
+ for (const issue2 of error63.issues) {
14147
14164
  if (issue2.code === "invalid_union" && issue2.errors.length) {
14148
14165
  issue2.errors.map((issues) => processError({ issues }, [...path, ...issue2.path]));
14149
14166
  } else if (issue2.code === "invalid_key") {
@@ -14185,7 +14202,7 @@ function treeifyError(error61, mapper = (issue2) => issue2.message) {
14185
14202
  }
14186
14203
  }
14187
14204
  };
14188
- processError(error61);
14205
+ processError(error62);
14189
14206
  return result;
14190
14207
  }
14191
14208
  function toDotPath(_path) {
@@ -14206,9 +14223,9 @@ function toDotPath(_path) {
14206
14223
  }
14207
14224
  return segs.join("");
14208
14225
  }
14209
- function prettifyError(error61) {
14226
+ function prettifyError(error62) {
14210
14227
  const lines = [];
14211
- const issues = [...error61.issues].sort((a, b) => (a.path ?? []).length - (b.path ?? []).length);
14228
+ const issues = [...error62.issues].sort((a, b) => (a.path ?? []).length - (b.path ?? []).length);
14212
14229
  for (const issue2 of issues) {
14213
14230
  lines.push(`\u2716 ${issue2.message}`);
14214
14231
  if (issue2.path?.length)
@@ -14260,33 +14277,50 @@ var _safeParse = (_Err) => (schema, value, _ctx) => {
14260
14277
  if (result instanceof Promise) {
14261
14278
  throw new $ZodAsyncError();
14262
14279
  }
14263
- return result.issues.length ? {
14264
- success: false,
14265
- error: new (_Err ?? $ZodError)(result.issues.map((iss) => finalizeIssue(iss, ctx, config())))
14266
- } : { success: true, data: result.value };
14280
+ return result.issues.length ? failure(_Err, result.issues, ctx) : { success: true, data: result.value };
14267
14281
  };
14268
14282
  var safeParse = /* @__PURE__ */ _safeParse($ZodRealError);
14283
+ function failure(Err, issues, ctx) {
14284
+ let error62;
14285
+ return {
14286
+ success: false,
14287
+ get error() {
14288
+ if (!error62) {
14289
+ error62 = new Err(issues.map((iss) => finalizeIssue(iss, ctx, config())));
14290
+ issues = void 0;
14291
+ ctx = void 0;
14292
+ }
14293
+ return error62;
14294
+ },
14295
+ set error(e) {
14296
+ error62 = e;
14297
+ issues = void 0;
14298
+ ctx = void 0;
14299
+ }
14300
+ };
14301
+ }
14269
14302
  var _safeParseAsync = (_Err) => async (schema, value, _ctx) => {
14270
14303
  const ctx = _ctx ? { ..._ctx, async: true } : { async: true };
14271
14304
  let result = schema._zod.run({ value, issues: [] }, ctx);
14272
14305
  if (result instanceof Promise)
14273
14306
  result = await result;
14274
- return result.issues.length ? {
14275
- success: false,
14276
- error: new _Err(result.issues.map((iss) => finalizeIssue(iss, ctx, config())))
14277
- } : { success: true, data: result.value };
14307
+ return result.issues.length ? failure(_Err, result.issues, ctx) : { success: true, data: result.value };
14278
14308
  };
14279
14309
  var safeParseAsync = /* @__PURE__ */ _safeParseAsync($ZodRealError);
14280
14310
  var COMPILE_INVALID = /* @__PURE__ */ Symbol.for("zod.compile.invalid");
14281
14311
  var COMPILE_FALLBACK = /* @__PURE__ */ Symbol.for("zod.compile.fallback");
14282
14312
  var validate = ((schema, value, _ctx) => {
14283
14313
  const validator = schema._zod.bag.validator;
14284
- if (validator !== void 0 && validator(value) !== COMPILE_INVALID)
14285
- return true;
14314
+ if (validator !== void 0) {
14315
+ if (validator(value) !== COMPILE_INVALID)
14316
+ return true;
14317
+ if (validator.definite === true && _ctx === void 0)
14318
+ return false;
14319
+ }
14286
14320
  return validateFallback(schema, value, _ctx);
14287
14321
  });
14288
14322
  function validateFallback(schema, value, _ctx) {
14289
- const ctx = _ctx ? { ..._ctx, async: false } : { async: false };
14323
+ const ctx = _ctx ? { ..._ctx, async: false, abortEarly: true } : { async: false, abortEarly: true };
14290
14324
  const fallbackRun = schema._zod.bag.fallbackRun;
14291
14325
  let result;
14292
14326
  if (fallbackRun) {
@@ -14301,7 +14335,7 @@ function validateFallback(schema, value, _ctx) {
14301
14335
  return result.issues.length === 0;
14302
14336
  }
14303
14337
  var validateAsync = async (schema, value, _ctx) => {
14304
- const ctx = _ctx ? { ..._ctx, async: true } : { async: true };
14338
+ const ctx = _ctx ? { ..._ctx, async: true, abortEarly: true } : { async: true, abortEarly: true };
14305
14339
  let result = schema._zod.run({ value, issues: [] }, ctx);
14306
14340
  if (result instanceof Promise)
14307
14341
  result = await result;
@@ -14363,6 +14397,7 @@ var safeDecodeAsync = /* @__PURE__ */ _safeDecodeAsync($ZodRealError);
14363
14397
  // node_modules/zod/v4/core/regexes.js
14364
14398
  var regexes_exports = {};
14365
14399
  __export(regexes_exports, {
14400
+ anyString: () => anyString,
14366
14401
  base64: () => base64,
14367
14402
  base64url: () => base64url,
14368
14403
  bigint: () => bigint,
@@ -14373,6 +14408,7 @@ __export(regexes_exports, {
14373
14408
  creditCard: () => creditCard,
14374
14409
  cuid: () => cuid,
14375
14410
  cuid2: () => cuid2,
14411
+ currencyCode: () => currencyCode,
14376
14412
  date: () => date,
14377
14413
  datetime: () => datetime,
14378
14414
  domain: () => domain,
@@ -14386,6 +14422,7 @@ __export(regexes_exports, {
14386
14422
  hostname: () => hostname,
14387
14423
  html5Email: () => html5Email,
14388
14424
  httpProtocol: () => httpProtocol,
14425
+ iban: () => iban,
14389
14426
  idnEmail: () => idnEmail,
14390
14427
  integer: () => integer,
14391
14428
  ipv4: () => ipv4,
@@ -14445,13 +14482,13 @@ var uuid = (version2) => {
14445
14482
  var uuid4 = /* @__PURE__ */ uuid(4);
14446
14483
  var uuid6 = /* @__PURE__ */ uuid(6);
14447
14484
  var uuid7 = /* @__PURE__ */ uuid(7);
14448
- var email = /^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/;
14485
+ var email = /^(?:[A-Za-z0-9_'+\-]+\.)*[A-Za-z0-9_'+\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/;
14449
14486
  var html5Email = /^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/;
14450
14487
  var rfc5322Email = /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;
14451
14488
  var unicodeEmail = /^[^\s@"]{1,64}@[^\s@]{1,255}$/u;
14452
14489
  var idnEmail = unicodeEmail;
14453
14490
  var browserEmail = /^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/;
14454
- var _emoji = `^[\\p{Extended_Pictographic}\\p{Emoji_Component}]+$`;
14491
+ var _emoji = `^(?=[\\s\\S]*[\\p{Extended_Pictographic}\\p{Regional_Indicator}\\u20E3])[\\p{Extended_Pictographic}\\p{Emoji_Component}]+$`;
14455
14492
  function emoji() {
14456
14493
  return new RegExp(_emoji, "u");
14457
14494
  }
@@ -14464,12 +14501,14 @@ var mac = (delimiter) => {
14464
14501
  var cidrv4 = /^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/;
14465
14502
  var cidrv6 = /^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/;
14466
14503
  var base64 = /^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/;
14467
- var base64url = /^[A-Za-z0-9_-]*$/;
14504
+ var base64url = /^(?:[A-Za-z0-9_-]{4})*(?:[A-Za-z0-9_-]{2,3})?$/;
14468
14505
  var hostname = /^(?=.{1,253}\.?$)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[-0-9a-zA-Z]{0,61}[0-9a-zA-Z])?)*\.?$/;
14469
14506
  var domain = /^(?=.{1,253}$)([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,63}$/;
14470
14507
  var httpProtocol = /^https?$/;
14471
14508
  var e164 = /^\+[1-9]\d{6,14}$/;
14472
14509
  var creditCard = /^\d(?:[ -]?\d){11,18}$/;
14510
+ var currencyCode = /^(?:AED|AFN|ALL|AMD|AOA|ARS|AUD|AWG|AZN|BAM|BBD|BDT|BHD|BIF|BMD|BND|BOB|BOV|BRL|BSD|BTN|BWP|BYN|BZD|CAD|CDF|CHE|CHF|CHW|CLF|CLP|CNY|COP|COU|CRC|CUP|CVE|CZK|DJF|DKK|DOP|DZD|EGP|ERN|ETB|EUR|FJD|FKP|GBP|GEL|GHS|GIP|GMD|GNF|GTQ|GYD|HKD|HNL|HTG|HUF|IDR|ILS|INR|IQD|IRR|ISK|JMD|JOD|JPY|KES|KGS|KHR|KMF|KPW|KRW|KWD|KYD|KZT|LAK|LBP|LKR|LRD|LSL|LYD|MAD|MDL|MGA|MKD|MMK|MNT|MOP|MRU|MUR|MVR|MWK|MXN|MXV|MYR|MZN|NAD|NGN|NIO|NOK|NPR|NZD|OMR|PAB|PEN|PGK|PHP|PKR|PLN|PYG|QAR|RON|RSD|RUB|RWF|SAR|SBD|SCR|SDG|SEK|SGD|SHP|SLE|SOS|SRD|SSP|STN|SVC|SYP|SZL|THB|TJS|TMT|TND|TOP|TRY|TTD|TWD|TZS|UAH|UGX|USD|USN|UYI|UYU|UYW|UZS|VED|VES|VND|VUV|WST|XAD|XAF|XAG|XAU|XBA|XBB|XBC|XBD|XCD|XCG|XDR|XOF|XPD|XPF|XPT|XSU|XTS|XUA|XXX|YER|ZAR|ZMW|ZWG)$/;
14511
+ var iban = /^[A-Z]{2}(?!00|01|99)\d{2}[A-Z0-9]{11,30}$/;
14473
14512
  var 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])))`;
14474
14513
  function anchor(source) {
14475
14514
  return new RegExp(`^${source}$`);
@@ -14491,6 +14530,7 @@ function datetime(args) {
14491
14530
  const timeRegex = args.local ? `${qualified}|${timeSource({ precision: args.precision })}` : qualified;
14492
14531
  return new RegExp(`^${dateSource}T(?:${timeRegex})$`);
14493
14532
  }
14533
+ var anyString = /^[\s\S]{0,}$/;
14494
14534
  var string = (params) => {
14495
14535
  const regex = params ? `[\\s\\S]{${params?.minimum ?? 0},${params?.maximum ?? ""}}` : `[\\s\\S]*`;
14496
14536
  return new RegExp(`^${regex}$`);
@@ -14549,16 +14589,6 @@ var numericOriginMap = {
14549
14589
  var $ZodCheckLessThan = /* @__PURE__ */ $constructor("$ZodCheckLessThan", (inst, def) => {
14550
14590
  $ZodCheck.init(inst, def);
14551
14591
  const origin = numericOriginMap[typeof def.value];
14552
- inst._zod.onattach.push((inst2) => {
14553
- const bag = inst2._zod.bag;
14554
- const curr = (def.inclusive ? bag.maximum : bag.exclusiveMaximum) ?? Number.POSITIVE_INFINITY;
14555
- if (def.value < curr) {
14556
- if (def.inclusive)
14557
- bag.maximum = def.value;
14558
- else
14559
- bag.exclusiveMaximum = def.value;
14560
- }
14561
- });
14562
14592
  inst._zod.check = (payload) => {
14563
14593
  if (def.inclusive ? payload.value <= def.value : payload.value < def.value) {
14564
14594
  return;
@@ -14577,16 +14607,6 @@ var $ZodCheckLessThan = /* @__PURE__ */ $constructor("$ZodCheckLessThan", (inst,
14577
14607
  var $ZodCheckGreaterThan = /* @__PURE__ */ $constructor("$ZodCheckGreaterThan", (inst, def) => {
14578
14608
  $ZodCheck.init(inst, def);
14579
14609
  const origin = numericOriginMap[typeof def.value];
14580
- inst._zod.onattach.push((inst2) => {
14581
- const bag = inst2._zod.bag;
14582
- const curr = (def.inclusive ? bag.minimum : bag.exclusiveMinimum) ?? Number.NEGATIVE_INFINITY;
14583
- if (def.value > curr) {
14584
- if (def.inclusive)
14585
- bag.minimum = def.value;
14586
- else
14587
- bag.exclusiveMinimum = def.value;
14588
- }
14589
- });
14590
14610
  inst._zod.check = (payload) => {
14591
14611
  if (def.inclusive ? payload.value >= def.value : payload.value > def.value) {
14592
14612
  return;
@@ -14604,10 +14624,6 @@ var $ZodCheckGreaterThan = /* @__PURE__ */ $constructor("$ZodCheckGreaterThan",
14604
14624
  });
14605
14625
  var $ZodCheckMultipleOf = /* @__PURE__ */ $constructor("$ZodCheckMultipleOf", (inst, def) => {
14606
14626
  $ZodCheck.init(inst, def);
14607
- inst._zod.onattach.push((inst2) => {
14608
- var _a3;
14609
- (_a3 = inst2._zod.bag).multipleOf ?? (_a3.multipleOf = def.value);
14610
- });
14611
14627
  inst._zod.check = (payload) => {
14612
14628
  if (typeof payload.value !== typeof def.value)
14613
14629
  throw new Error("Cannot mix number and bigint in multiple_of check.");
@@ -14633,14 +14649,6 @@ var $ZodCheckNumberFormat = /* @__PURE__ */ $constructor("$ZodCheckNumberFormat"
14633
14649
  const isInt = def.format?.includes("int");
14634
14650
  const origin = isInt ? "int" : "number";
14635
14651
  const [minimum, maximum] = NUMBER_FORMAT_RANGES[def.format];
14636
- inst._zod.onattach.push((inst2) => {
14637
- const bag = inst2._zod.bag;
14638
- bag.format = def.format;
14639
- bag.minimum = minimum;
14640
- bag.maximum = maximum;
14641
- if (isInt)
14642
- bag.pattern = integer;
14643
- });
14644
14652
  inst._zod.check = (payload) => {
14645
14653
  const input2 = payload.value;
14646
14654
  if (isInt) {
@@ -14709,12 +14717,6 @@ var $ZodCheckNumberFormat = /* @__PURE__ */ $constructor("$ZodCheckNumberFormat"
14709
14717
  var $ZodCheckBigIntFormat = /* @__PURE__ */ $constructor("$ZodCheckBigIntFormat", (inst, def) => {
14710
14718
  $ZodCheck.init(inst, def);
14711
14719
  const [minimum, maximum] = BIGINT_FORMAT_RANGES[def.format];
14712
- inst._zod.onattach.push((inst2) => {
14713
- const bag = inst2._zod.bag;
14714
- bag.format = def.format;
14715
- bag.minimum = minimum;
14716
- bag.maximum = maximum;
14717
- });
14718
14720
  inst._zod.check = (payload) => {
14719
14721
  const input2 = payload.value;
14720
14722
  if (input2 < minimum) {
@@ -14745,11 +14747,6 @@ var $ZodCheckMaxSize = /* @__PURE__ */ $constructor("$ZodCheckMaxSize", (inst, d
14745
14747
  var _a3;
14746
14748
  $ZodCheck.init(inst, def);
14747
14749
  (_a3 = inst._zod.def).when ?? (_a3.when = _whenHasSize);
14748
- inst._zod.onattach.push((inst2) => {
14749
- const curr = inst2._zod.bag.maximum ?? Number.POSITIVE_INFINITY;
14750
- if (def.maximum < curr)
14751
- inst2._zod.bag.maximum = def.maximum;
14752
- });
14753
14750
  inst._zod.check = (payload) => {
14754
14751
  const input2 = payload.value;
14755
14752
  const size = input2.size;
@@ -14770,11 +14767,6 @@ var $ZodCheckMinSize = /* @__PURE__ */ $constructor("$ZodCheckMinSize", (inst, d
14770
14767
  var _a3;
14771
14768
  $ZodCheck.init(inst, def);
14772
14769
  (_a3 = inst._zod.def).when ?? (_a3.when = _whenHasSize);
14773
- inst._zod.onattach.push((inst2) => {
14774
- const curr = inst2._zod.bag.minimum ?? Number.NEGATIVE_INFINITY;
14775
- if (def.minimum > curr)
14776
- inst2._zod.bag.minimum = def.minimum;
14777
- });
14778
14770
  inst._zod.check = (payload) => {
14779
14771
  const input2 = payload.value;
14780
14772
  const size = input2.size;
@@ -14795,12 +14787,6 @@ var $ZodCheckSizeEquals = /* @__PURE__ */ $constructor("$ZodCheckSizeEquals", (i
14795
14787
  var _a3;
14796
14788
  $ZodCheck.init(inst, def);
14797
14789
  (_a3 = inst._zod.def).when ?? (_a3.when = _whenHasSize);
14798
- inst._zod.onattach.push((inst2) => {
14799
- const bag = inst2._zod.bag;
14800
- bag.minimum = def.size;
14801
- bag.maximum = def.size;
14802
- bag.size = def.size;
14803
- });
14804
14790
  inst._zod.check = (payload) => {
14805
14791
  const input2 = payload.value;
14806
14792
  const size = input2.size;
@@ -14822,11 +14808,6 @@ var $ZodCheckMaxLength = /* @__PURE__ */ $constructor("$ZodCheckMaxLength", (ins
14822
14808
  var _a3;
14823
14809
  $ZodCheck.init(inst, def);
14824
14810
  (_a3 = inst._zod.def).when ?? (_a3.when = _whenHasLength);
14825
- inst._zod.onattach.push((inst2) => {
14826
- const curr = inst2._zod.bag.maximum ?? Number.POSITIVE_INFINITY;
14827
- if (def.maximum < curr)
14828
- inst2._zod.bag.maximum = def.maximum;
14829
- });
14830
14811
  inst._zod.check = (payload) => {
14831
14812
  const input2 = payload.value;
14832
14813
  const units = input2.length;
@@ -14849,11 +14830,6 @@ var $ZodCheckMinLength = /* @__PURE__ */ $constructor("$ZodCheckMinLength", (ins
14849
14830
  var _a3;
14850
14831
  $ZodCheck.init(inst, def);
14851
14832
  (_a3 = inst._zod.def).when ?? (_a3.when = _whenHasLength);
14852
- inst._zod.onattach.push((inst2) => {
14853
- const curr = inst2._zod.bag.minimum ?? Number.NEGATIVE_INFINITY;
14854
- if (def.minimum > curr)
14855
- inst2._zod.bag.minimum = def.minimum;
14856
- });
14857
14833
  inst._zod.check = (payload) => {
14858
14834
  const input2 = payload.value;
14859
14835
  const units = input2.length;
@@ -14876,12 +14852,6 @@ var $ZodCheckLengthEquals = /* @__PURE__ */ $constructor("$ZodCheckLengthEquals"
14876
14852
  var _a3;
14877
14853
  $ZodCheck.init(inst, def);
14878
14854
  (_a3 = inst._zod.def).when ?? (_a3.when = _whenHasLength);
14879
- inst._zod.onattach.push((inst2) => {
14880
- const bag = inst2._zod.bag;
14881
- bag.minimum = def.length;
14882
- bag.maximum = def.length;
14883
- bag.length = def.length;
14884
- });
14885
14855
  inst._zod.check = (payload) => {
14886
14856
  const input2 = payload.value;
14887
14857
  const units = input2.length;
@@ -14904,14 +14874,6 @@ var $ZodCheckLengthEquals = /* @__PURE__ */ $constructor("$ZodCheckLengthEquals"
14904
14874
  var $ZodCheckStringFormat = /* @__PURE__ */ $constructor("$ZodCheckStringFormat", (inst, def) => {
14905
14875
  var _a3, _b;
14906
14876
  $ZodCheck.init(inst, def);
14907
- inst._zod.onattach.push((inst2) => {
14908
- const bag = inst2._zod.bag;
14909
- bag.format = def.format;
14910
- if (def.pattern) {
14911
- bag.patterns ?? (bag.patterns = /* @__PURE__ */ new Set());
14912
- bag.patterns.add(def.pattern);
14913
- }
14914
- });
14915
14877
  if (def.pattern)
14916
14878
  (_a3 = inst._zod).check ?? (_a3.check = (payload) => {
14917
14879
  def.pattern.lastIndex = 0;
@@ -14961,11 +14923,6 @@ var $ZodCheckIncludes = /* @__PURE__ */ $constructor("$ZodCheckIncludes", (inst,
14961
14923
  const escapedRegex = escapeRegex(def.includes);
14962
14924
  const pattern = new RegExp(typeof def.position === "number" ? `^.{${def.position},}${escapedRegex}` : escapedRegex);
14963
14925
  def.pattern = pattern;
14964
- inst._zod.onattach.push((inst2) => {
14965
- const bag = inst2._zod.bag;
14966
- bag.patterns ?? (bag.patterns = /* @__PURE__ */ new Set());
14967
- bag.patterns.add(pattern);
14968
- });
14969
14926
  inst._zod.check = (payload) => {
14970
14927
  if (payload.value.includes(def.includes, def.position))
14971
14928
  return;
@@ -14984,11 +14941,6 @@ var $ZodCheckStartsWith = /* @__PURE__ */ $constructor("$ZodCheckStartsWith", (i
14984
14941
  $ZodCheck.init(inst, def);
14985
14942
  const pattern = new RegExp(`^${escapeRegex(def.prefix)}.*`);
14986
14943
  def.pattern ?? (def.pattern = pattern);
14987
- inst._zod.onattach.push((inst2) => {
14988
- const bag = inst2._zod.bag;
14989
- bag.patterns ?? (bag.patterns = /* @__PURE__ */ new Set());
14990
- bag.patterns.add(pattern);
14991
- });
14992
14944
  inst._zod.check = (payload) => {
14993
14945
  if (payload.value.startsWith(def.prefix))
14994
14946
  return;
@@ -15007,11 +14959,6 @@ var $ZodCheckEndsWith = /* @__PURE__ */ $constructor("$ZodCheckEndsWith", (inst,
15007
14959
  $ZodCheck.init(inst, def);
15008
14960
  const pattern = new RegExp(`.*${escapeRegex(def.suffix)}$`);
15009
14961
  def.pattern ?? (def.pattern = pattern);
15010
- inst._zod.onattach.push((inst2) => {
15011
- const bag = inst2._zod.bag;
15012
- bag.patterns ?? (bag.patterns = /* @__PURE__ */ new Set());
15013
- bag.patterns.add(pattern);
15014
- });
15015
14962
  inst._zod.check = (payload) => {
15016
14963
  if (payload.value.endsWith(def.suffix))
15017
14964
  return;
@@ -15045,12 +14992,37 @@ var $ZodCheckProperty = /* @__PURE__ */ $constructor("$ZodCheckProperty", (inst,
15045
14992
  return;
15046
14993
  };
15047
14994
  });
14995
+ var $ZodCheckProperties = /* @__PURE__ */ $constructor("$ZodCheckProperties", (inst, def) => {
14996
+ $ZodCheck.init(inst, def);
14997
+ hide(inst, Symbol.iterator, function* () {
14998
+ yield inst;
14999
+ });
15000
+ let entries;
15001
+ inst._zod.check = (payload) => {
15002
+ if (payload.value == null) {
15003
+ payload.issues.push({ expected: "object", code: "invalid_type", input: payload.value, inst });
15004
+ return void 0;
15005
+ }
15006
+ entries ?? (entries = Reflect.ownKeys(def.shape).map((key) => [key, def.shape[key]]));
15007
+ const input2 = payload.value;
15008
+ let proms;
15009
+ for (const [key, schema] of entries) {
15010
+ const result = schema._zod.run({ value: input2[key], issues: [] }, {});
15011
+ if (result instanceof Promise) {
15012
+ proms ?? (proms = []);
15013
+ proms.push(result.then((result2) => handleCheckPropertyResult(result2, payload, key)));
15014
+ } else {
15015
+ handleCheckPropertyResult(result, payload, key);
15016
+ }
15017
+ }
15018
+ if (proms)
15019
+ return Promise.all(proms).then(() => void 0);
15020
+ return void 0;
15021
+ };
15022
+ });
15048
15023
  var $ZodCheckMimeType = /* @__PURE__ */ $constructor("$ZodCheckMimeType", (inst, def) => {
15049
15024
  $ZodCheck.init(inst, def);
15050
15025
  const mimeSet = new Set(def.mime);
15051
- inst._zod.onattach.push((inst2) => {
15052
- inst2._zod.bag.mime = def.mime;
15053
- });
15054
15026
  inst._zod.check = (payload) => {
15055
15027
  if (mimeSet.has(payload.value.type))
15056
15028
  return;
@@ -15078,10 +15050,14 @@ var Doc = class {
15078
15050
  this.args = args;
15079
15051
  this.closed = closed;
15080
15052
  }
15053
+ // the compiler catches a child's throw and keeps writing into this doc, so the indent has to unwind with it
15081
15054
  indented(fn) {
15082
15055
  this.indent += 1;
15083
- fn(this);
15084
- this.indent -= 1;
15056
+ try {
15057
+ fn(this);
15058
+ } finally {
15059
+ this.indent -= 1;
15060
+ }
15085
15061
  }
15086
15062
  write(arg) {
15087
15063
  if (typeof arg === "function") {
@@ -15110,8 +15086,8 @@ ${content.join("\n")}
15110
15086
  // node_modules/zod/v4/core/versions.js
15111
15087
  var version = {
15112
15088
  major: 4,
15113
- minor: 5,
15114
- patch: 4
15089
+ minor: 6,
15090
+ patch: 5
15115
15091
  };
15116
15092
 
15117
15093
  // node_modules/zod/v4/core/schemas.js
@@ -15224,15 +15200,22 @@ var $ZodType = /* @__PURE__ */ $constructor("$ZodType", (inst, def) => {
15224
15200
  own(this, "~standard", value);
15225
15201
  }
15226
15202
  });
15227
- var toStandardResult = (r) => r.success ? { value: r.data } : { issues: r.error?.issues };
15203
+ var toStandardResult = (r, ctx) => r.issues.length ? { issues: r.issues.map((iss) => finalizeIssue(iss, ctx, config())) } : { value: r.value };
15204
+ async function validateAsync2(inst, value) {
15205
+ const ctx = { async: true };
15206
+ return toStandardResult(await inst._zod.run({ value, issues: [] }, ctx), ctx);
15207
+ }
15228
15208
  function standardProps(inst) {
15229
15209
  return {
15230
15210
  validate: (value) => {
15211
+ const ctx = { async: false };
15231
15212
  try {
15232
- return toStandardResult(safeParse(inst, value));
15213
+ const r = inst._zod.run({ value, issues: [] }, ctx);
15214
+ if (!(r instanceof Promise))
15215
+ return toStandardResult(r, ctx);
15233
15216
  } catch (_) {
15234
- return safeParseAsync(inst, value).then(toStandardResult);
15235
15217
  }
15218
+ return validateAsync2(inst, value);
15236
15219
  },
15237
15220
  vendor: "zod",
15238
15221
  version: 1
@@ -15240,7 +15223,7 @@ function standardProps(inst) {
15240
15223
  }
15241
15224
  var $ZodString = /* @__PURE__ */ $constructor("$ZodString", (inst, def) => {
15242
15225
  $ZodType.init(inst, def);
15243
- inst._zod.pattern = [...inst?._zod.bag?.patterns ?? []].pop() ?? string(inst._zod.bag);
15226
+ inst._zod.pattern = def.pattern ?? anyString;
15244
15227
  inst._zod.parse = (payload, _) => {
15245
15228
  if (def.coerce)
15246
15229
  try {
@@ -15292,11 +15275,32 @@ var $ZodEmail = /* @__PURE__ */ $constructor("$ZodEmail", (inst, def) => {
15292
15275
  });
15293
15276
  var URL_BAD_FORMAT = 1;
15294
15277
  var URL_UNPARSEABLE = 2;
15278
+ function canParseURL(input2) {
15279
+ try {
15280
+ if (typeof URL !== "undefined" && typeof URL.canParse === "function")
15281
+ return URL.canParse(input2);
15282
+ new URL(input2);
15283
+ return true;
15284
+ } catch {
15285
+ return false;
15286
+ }
15287
+ }
15288
+ function validateURL(trimmed, def) {
15289
+ if (!("normalize" in def) && !("hostname" in def) && !("protocol" in def)) {
15290
+ return canParseURL(trimmed) || URL_UNPARSEABLE;
15291
+ }
15292
+ return parseURLObject(trimmed, def);
15293
+ }
15295
15294
  function parseURLObject(trimmed, def) {
15296
15295
  if (!def.normalize && def.protocol?.source === httpProtocol.source && !/^https?:\/\//i.test(trimmed)) {
15297
15296
  return URL_BAD_FORMAT;
15298
15297
  }
15299
15298
  try {
15299
+ if (typeof URL !== "undefined") {
15300
+ const URLStatic = URL;
15301
+ if (typeof URLStatic.parse === "function")
15302
+ return URLStatic.parse(trimmed) ?? URL_UNPARSEABLE;
15303
+ }
15300
15304
  return new URL(trimmed);
15301
15305
  } catch {
15302
15306
  return URL_UNPARSEABLE;
@@ -15319,7 +15323,7 @@ var $ZodURL = /* @__PURE__ */ $constructor("$ZodURL", (inst, def) => {
15319
15323
  inst._zod.check = (payload) => {
15320
15324
  try {
15321
15325
  const trimmed = payload.value.trim();
15322
- const url2 = parseURLObject(trimmed, def);
15326
+ const url2 = validateURL(trimmed, def);
15323
15327
  if (url2 === URL_BAD_FORMAT) {
15324
15328
  payload.issues.push({
15325
15329
  code: "invalid_format",
@@ -15341,6 +15345,10 @@ var $ZodURL = /* @__PURE__ */ $constructor("$ZodURL", (inst, def) => {
15341
15345
  });
15342
15346
  return;
15343
15347
  }
15348
+ if (url2 === true) {
15349
+ payload.value = stripTabAndNewline(trimmed);
15350
+ return;
15351
+ }
15344
15352
  if (def.hostname && !urlHostnameOk(url2, def.hostname)) {
15345
15353
  payload.issues.push({
15346
15354
  code: "invalid_format",
@@ -15409,12 +15417,6 @@ var $ZodKSUID = /* @__PURE__ */ $constructor("$ZodKSUID", (inst, def) => {
15409
15417
  var $ZodISODateTime = /* @__PURE__ */ $constructor("$ZodISODateTime", (inst, def) => {
15410
15418
  def.pattern ?? (def.pattern = datetime(def));
15411
15419
  $ZodStringFormat.init(inst, def);
15412
- if (def.local || def.precision === -1) {
15413
- inst._zod.bag.laxFormat = true;
15414
- inst._zod.onattach.push((s) => {
15415
- s._zod.bag.laxFormat = true;
15416
- });
15417
- }
15418
15420
  });
15419
15421
  var $ZodISODate = /* @__PURE__ */ $constructor("$ZodISODate", (inst, def) => {
15420
15422
  def.pattern ?? (def.pattern = date);
@@ -15431,23 +15433,16 @@ var $ZodISODuration = /* @__PURE__ */ $constructor("$ZodISODuration", (inst, def
15431
15433
  var $ZodIPv4 = /* @__PURE__ */ $constructor("$ZodIPv4", (inst, def) => {
15432
15434
  def.pattern ?? (def.pattern = ipv4);
15433
15435
  $ZodStringFormat.init(inst, def);
15434
- inst._zod.bag.format = `ipv4`;
15435
15436
  });
15436
15437
  var ipv6Alphabet = /^[0-9a-fA-F:.]+$/;
15437
15438
  function isValidIPv6(value) {
15438
15439
  if (!ipv6Alphabet.test(value))
15439
15440
  return false;
15440
- try {
15441
- new URL(`http://[${value}]`);
15442
- return true;
15443
- } catch {
15444
- return false;
15445
- }
15441
+ return canParseURL(`http://[${value}]`);
15446
15442
  }
15447
15443
  var $ZodIPv6 = /* @__PURE__ */ $constructor("$ZodIPv6", (inst, def) => {
15448
15444
  def.pattern ?? (def.pattern = ipv6);
15449
15445
  $ZodStringFormat.init(inst, def);
15450
- inst._zod.bag.format = `ipv6`;
15451
15446
  inst._zod.check = (payload) => {
15452
15447
  if (!isValidIPv6(payload.value)) {
15453
15448
  payload.issues.push({
@@ -15463,7 +15458,6 @@ var $ZodIPv6 = /* @__PURE__ */ $constructor("$ZodIPv6", (inst, def) => {
15463
15458
  var $ZodMAC = /* @__PURE__ */ $constructor("$ZodMAC", (inst, def) => {
15464
15459
  def.pattern ?? (def.pattern = mac(def.delimiter));
15465
15460
  $ZodStringFormat.init(inst, def);
15466
- inst._zod.bag.format = `mac`;
15467
15461
  });
15468
15462
  var $ZodCIDRv4 = /* @__PURE__ */ $constructor("$ZodCIDRv4", (inst, def) => {
15469
15463
  def.pattern ?? (def.pattern = cidrv4);
@@ -15512,10 +15506,10 @@ function isValidBase64(data) {
15512
15506
  return false;
15513
15507
  }
15514
15508
  }
15509
+ var base64Charset = /^[0-9a-zA-Z+/]*={0,2}$/;
15515
15510
  var $ZodBase64 = /* @__PURE__ */ $constructor("$ZodBase64", (inst, def) => {
15516
- def.pattern ?? (def.pattern = base64);
15511
+ def.pattern ?? (def.pattern = base64Charset);
15517
15512
  $ZodStringFormat.init(inst, def);
15518
- inst._zod.bag.contentEncoding = "base64";
15519
15513
  inst._zod.check = (payload) => {
15520
15514
  if (isValidBase64(payload.value))
15521
15515
  return;
@@ -15528,17 +15522,17 @@ var $ZodBase64 = /* @__PURE__ */ $constructor("$ZodBase64", (inst, def) => {
15528
15522
  });
15529
15523
  };
15530
15524
  });
15525
+ var base64urlCharset = /^[A-Za-z0-9_-]*$/;
15531
15526
  function isValidBase64URL(data) {
15532
- if (!base64url.test(data))
15527
+ if (!base64urlCharset.test(data))
15533
15528
  return false;
15534
15529
  const base643 = data.replace(/[-_]/g, (c) => c === "-" ? "+" : "/");
15535
15530
  const padded = base643.padEnd(Math.ceil(base643.length / 4) * 4, "=");
15536
15531
  return isValidBase64(padded);
15537
15532
  }
15538
15533
  var $ZodBase64URL = /* @__PURE__ */ $constructor("$ZodBase64URL", (inst, def) => {
15539
- def.pattern ?? (def.pattern = base64url);
15534
+ def.pattern ?? (def.pattern = base64urlCharset);
15540
15535
  $ZodStringFormat.init(inst, def);
15541
- inst._zod.bag.contentEncoding = "base64url";
15542
15536
  inst._zod.check = (payload) => {
15543
15537
  if (isValidBase64URL(payload.value))
15544
15538
  return;
@@ -15561,7 +15555,7 @@ function isLuhnAlgo(digits) {
15561
15555
  let bit = 1;
15562
15556
  let sum = 0;
15563
15557
  while (length) {
15564
- const value = +digits[--length];
15558
+ const value = digits.charCodeAt(--length) - 48;
15565
15559
  bit ^= 1;
15566
15560
  sum += bit ? [0, 2, 4, 6, 8, 1, 3, 5, 7, 9][value] : value;
15567
15561
  }
@@ -15587,6 +15581,39 @@ var $ZodCreditCard = /* @__PURE__ */ $constructor("$ZodCreditCard", (inst, def)
15587
15581
  });
15588
15582
  };
15589
15583
  });
15584
+ function isIso7064Mod97(iban3) {
15585
+ let remainder = 0;
15586
+ const len = iban3.length;
15587
+ for (let i = 4; i < len; i++) {
15588
+ const code = iban3.charCodeAt(i);
15589
+ remainder = (code >= 65 ? remainder * 100 + (code - 55) : remainder * 10 + (code - 48)) % 97;
15590
+ }
15591
+ for (let i = 0; i < 4; i++) {
15592
+ const code = iban3.charCodeAt(i);
15593
+ remainder = (code >= 65 ? remainder * 100 + (code - 55) : remainder * 10 + (code - 48)) % 97;
15594
+ }
15595
+ return remainder === 1;
15596
+ }
15597
+ function isValidIBAN(input2) {
15598
+ if (!iban.test(input2))
15599
+ return false;
15600
+ return isIso7064Mod97(input2);
15601
+ }
15602
+ var $ZodIBAN = /* @__PURE__ */ $constructor("$ZodIBAN", (inst, def) => {
15603
+ def.pattern ?? (def.pattern = iban);
15604
+ $ZodStringFormat.init(inst, def);
15605
+ inst._zod.check = (payload) => {
15606
+ if (isValidIBAN(payload.value))
15607
+ return;
15608
+ payload.issues.push({
15609
+ code: "invalid_format",
15610
+ format: "iban",
15611
+ input: payload.value,
15612
+ inst,
15613
+ continue: !def.abort
15614
+ });
15615
+ };
15616
+ });
15590
15617
  function isValidJWT(token, algorithm = null) {
15591
15618
  try {
15592
15619
  const tokensParts = token.split(".");
@@ -15637,7 +15664,7 @@ var $ZodCustomStringFormat = /* @__PURE__ */ $constructor("$ZodCustomStringForma
15637
15664
  });
15638
15665
  var $ZodNumber = /* @__PURE__ */ $constructor("$ZodNumber", (inst, def) => {
15639
15666
  $ZodType.init(inst, def);
15640
- inst._zod.pattern = inst._zod.bag.pattern ?? number;
15667
+ inst._zod.pattern = number;
15641
15668
  inst._zod.parse = (payload, _ctx) => {
15642
15669
  if (def.coerce)
15643
15670
  try {
@@ -15839,6 +15866,7 @@ var $ZodArray = /* @__PURE__ */ $constructor("$ZodArray", (inst, def) => {
15839
15866
  }
15840
15867
  payload.value = memo2 ? memo2.alloc(inst, payload, Array(input2.length), ctx) : Array(input2.length);
15841
15868
  const proms = [];
15869
+ const abortEarly = ctx?.abortEarly;
15842
15870
  for (let i = 0; i < input2.length; i++) {
15843
15871
  const item = input2[i];
15844
15872
  const result = def.element._zod.run({
@@ -15849,6 +15877,8 @@ var $ZodArray = /* @__PURE__ */ $constructor("$ZodArray", (inst, def) => {
15849
15877
  proms.push(result.then((result2) => handleArrayResult(result2, payload, i)));
15850
15878
  } else {
15851
15879
  handleArrayResult(result, payload, i);
15880
+ if (abortEarly && result.issues.length !== 0 && aborted(result))
15881
+ break;
15852
15882
  }
15853
15883
  }
15854
15884
  if (proms.length) {
@@ -15881,7 +15911,7 @@ function handlePropertyResult(result, final, key, input2, optin, optout) {
15881
15911
  return;
15882
15912
  }
15883
15913
  if (result.value === void 0) {
15884
- if (isPresent) {
15914
+ if (isPresent || optin === "defaulted" && !isOptionalOut) {
15885
15915
  final.value[key] = void 0;
15886
15916
  }
15887
15917
  } else {
@@ -15910,14 +15940,20 @@ function normalizeDef(def) {
15910
15940
  optionalKeys: new Set(okeys)
15911
15941
  };
15912
15942
  }
15913
- function handleCatchall(proms, input2, payload, ctx, def, inst) {
15943
+ function handleCatchall(proms, input2, payload, ctx, def, inst, abortEarly) {
15914
15944
  const unrecognized = [];
15915
15945
  const keySet = def.keySet;
15916
15946
  const _catchall = def.catchall._zod;
15917
15947
  const t = _catchall.def.type;
15918
15948
  const optin = _catchall.optin;
15919
15949
  const optout = _catchall.optout;
15950
+ let seen = 0;
15920
15951
  for (const key in input2) {
15952
+ if (abortEarly && payload.issues.length !== seen) {
15953
+ if (aborted(payload, seen))
15954
+ break;
15955
+ seen = payload.issues.length;
15956
+ }
15921
15957
  if (keySet.has(key))
15922
15958
  continue;
15923
15959
  if (key === "__proto__") {
@@ -15952,23 +15988,19 @@ function handleCatchall(proms, input2, payload, ctx, def, inst) {
15952
15988
  return payload;
15953
15989
  });
15954
15990
  }
15955
- var propShapes = /* @__PURE__ */ new WeakMap();
15956
15991
  var $ZodObject = /* @__PURE__ */ $constructor("$ZodObject", (inst, def) => {
15957
15992
  $ZodType.init(inst, def);
15958
15993
  const desc = Object.getOwnPropertyDescriptor(def, "shape");
15959
- if (!desc?.get) {
15960
- const sh = def.shape;
15961
- propShapes.set(def, sh);
15962
- Object.defineProperty(def, "shape", {
15963
- get: () => {
15964
- const newSh = { ...sh };
15965
- Object.defineProperty(def, "shape", {
15966
- value: newSh
15967
- });
15968
- propShapes.set(def, newSh);
15969
- return newSh;
15970
- }
15971
- });
15994
+ const sh = desc?.get ? desc.get.raw : def.shape ?? {};
15995
+ if (sh) {
15996
+ const get = () => {
15997
+ const newSh = { ...sh };
15998
+ Object.defineProperty(def, "shape", { value: newSh });
15999
+ get.raw = newSh;
16000
+ return newSh;
16001
+ };
16002
+ get.raw = sh;
16003
+ Object.defineProperty(def, "shape", { get });
15972
16004
  }
15973
16005
  const _normalized = cached(() => normalizeDef(def));
15974
16006
  defineLazyInternal(inst, "propValues", (zod) => {
@@ -16008,7 +16040,14 @@ var $ZodObject = /* @__PURE__ */ $constructor("$ZodObject", (inst, def) => {
16008
16040
  payload.value = memo2 ? memo2.alloc(inst, payload, {}, ctx) : {};
16009
16041
  const proms = [];
16010
16042
  const shape = value.shape;
16043
+ const abortEarly = ctx?.abortEarly;
16044
+ let seen = payload.issues.length;
16011
16045
  for (const key of value.allKeys) {
16046
+ if (abortEarly && payload.issues.length !== seen) {
16047
+ if (aborted(payload, seen))
16048
+ break;
16049
+ seen = payload.issues.length;
16050
+ }
16012
16051
  if (key === "__proto__")
16013
16052
  continue;
16014
16053
  const el = shape[key];
@@ -16024,7 +16063,7 @@ var $ZodObject = /* @__PURE__ */ $constructor("$ZodObject", (inst, def) => {
16024
16063
  if (!catchall) {
16025
16064
  return proms.length ? Promise.all(proms).then(() => payload) : payload;
16026
16065
  }
16027
- return handleCatchall(proms, input2, payload, ctx, _normalized.value, inst);
16066
+ return handleCatchall(proms, input2, payload, ctx, _normalized.value, inst, abortEarly === true);
16028
16067
  };
16029
16068
  });
16030
16069
  var $ZodObjectJIT = /* @__PURE__ */ $constructor("$ZodObjectJIT", (inst, def) => {
@@ -16038,10 +16077,16 @@ var $ZodObjectJIT = /* @__PURE__ */ $constructor("$ZodObjectJIT", (inst, def) =>
16038
16077
  const doc = new Doc(["payload", "ctx"], { shape, inst, memo: memo2, syms });
16039
16078
  const parseStr = (k) => `shape[${k}]._zod.run({ value: input[${k}], issues: [] }, ctx)`;
16040
16079
  const prefixStr = (id, k) => `
16080
+ let ${id}_ab = false;
16041
16081
  for (let i = 0; i < ${id}.issues.length; i++) {
16042
16082
  const iss = ${id}.issues[i];
16043
16083
  iss.path = iss.path ? [${k}, ...iss.path] : [${k}];
16044
16084
  payload.issues.push(iss);
16085
+ if (iss.continue !== true) ${id}_ab = true;
16086
+ }
16087
+ if (${id}_ab && ctx && ctx.abortEarly) {
16088
+ payload.value = newResult;
16089
+ return payload;
16045
16090
  }`;
16046
16091
  doc.write(`const input = payload.value;`);
16047
16092
  const ids = /* @__PURE__ */ Object.create(null);
@@ -16087,6 +16132,10 @@ var $ZodObjectJIT = /* @__PURE__ */ $constructor("$ZodObjectJIT", (inst, def) =>
16087
16132
  input: undefined,
16088
16133
  path: [${k}]
16089
16134
  });
16135
+ if (ctx && ctx.abortEarly) {
16136
+ payload.value = newResult;
16137
+ return payload;
16138
+ }
16090
16139
  }
16091
16140
 
16092
16141
  if (${id}_present) {
@@ -16098,16 +16147,16 @@ var $ZodObjectJIT = /* @__PURE__ */ $constructor("$ZodObjectJIT", (inst, def) =>
16098
16147
  doc.write(`
16099
16148
  if (${id}.issues.length) {${prefixStr(id, k)}
16100
16149
  }
16101
-
16102
- if (${id}.value === undefined) {
16103
- if (${isPresent}) {
16104
- newResult[${k}] = undefined;
16105
- }
16150
+ `);
16151
+ if (optin === "defaulted") {
16152
+ doc.write(`newResult[${k}] = ${id}.value;`);
16106
16153
  } else {
16154
+ doc.write(`
16155
+ if (${id}.value !== undefined || ${isPresent}) {
16107
16156
  newResult[${k}] = ${id}.value;
16108
16157
  }
16109
-
16110
16158
  `);
16159
+ }
16111
16160
  }
16112
16161
  }
16113
16162
  doc.write(`payload.value = newResult;`);
@@ -16139,7 +16188,7 @@ var $ZodObjectJIT = /* @__PURE__ */ $constructor("$ZodObjectJIT", (inst, def) =>
16139
16188
  payload = fastpass(payload, ctx);
16140
16189
  if (!catchall)
16141
16190
  return payload;
16142
- return handleCatchall([], input2, payload, ctx, value, inst);
16191
+ return handleCatchall([], input2, payload, ctx, value, inst, ctx?.abortEarly === true);
16143
16192
  }
16144
16193
  return superParse(payload, ctx);
16145
16194
  };
@@ -16271,16 +16320,31 @@ function getDiscriminatedOption(union2, value) {
16271
16320
  const internals = union2._zod;
16272
16321
  let map2 = internals.bag.optionsMap;
16273
16322
  if (!map2) {
16274
- map2 = /* @__PURE__ */ new Map();
16275
- const { options, discriminator } = internals.def;
16276
- for (const option of options) {
16277
- for (const v of option._zod.propValues?.[discriminator] ?? [])
16278
- if (!map2.has(v))
16279
- map2.set(v, option);
16280
- }
16323
+ map2 = discriminatorMap(internals.def);
16281
16324
  internals.bag.optionsMap = map2;
16282
16325
  }
16283
- return map2.get(value);
16326
+ const option = map2.get(value);
16327
+ if (option === null)
16328
+ throw new Error(`Ambiguous discriminator value "${String(value)}"`);
16329
+ return option;
16330
+ }
16331
+ function discriminatorMap(def) {
16332
+ const map2 = /* @__PURE__ */ new Map();
16333
+ for (const option of def.options) {
16334
+ const values = option._zod.propValues?.[def.discriminator];
16335
+ if (!values || values.size === 0)
16336
+ throw new Error(`Invalid discriminated union option at index "${def.options.indexOf(option)}"`);
16337
+ for (const value of values) {
16338
+ if (map2.has(value)) {
16339
+ if (value !== void 0)
16340
+ throw new Error(`Duplicate discriminator value "${String(value)}"`);
16341
+ map2.set(value, null);
16342
+ } else {
16343
+ map2.set(value, option);
16344
+ }
16345
+ }
16346
+ }
16347
+ return map2;
16284
16348
  }
16285
16349
  var $ZodDiscriminatedUnion = /* @__PURE__ */ $constructor("$ZodDiscriminatedUnion", (inst, def) => {
16286
16350
  def.inclusive = false;
@@ -16288,10 +16352,13 @@ var $ZodDiscriminatedUnion = /* @__PURE__ */ $constructor("$ZodDiscriminatedUnio
16288
16352
  const _super = inst._zod.parse;
16289
16353
  defineLazyInternal(inst, "propValues", (zod) => {
16290
16354
  const propValues = {};
16355
+ let undefinedCount = 0;
16291
16356
  for (const option of zod.def.options) {
16292
16357
  const pv = option._zod.propValues;
16293
16358
  if (!pv || Object.keys(pv).length === 0)
16294
16359
  throw new Error(`Invalid discriminated union option at index "${zod.def.options.indexOf(option)}"`);
16360
+ if (pv[zod.def.discriminator]?.has(void 0))
16361
+ undefinedCount++;
16295
16362
  for (const [k, v] of Object.entries(pv)) {
16296
16363
  if (!Object.prototype.hasOwnProperty.call(propValues, k)) {
16297
16364
  assignProp(propValues, k, /* @__PURE__ */ new Set());
@@ -16301,30 +16368,17 @@ var $ZodDiscriminatedUnion = /* @__PURE__ */ $constructor("$ZodDiscriminatedUnio
16301
16368
  }
16302
16369
  }
16303
16370
  }
16371
+ if (!zod.def.unionFallback && undefinedCount > 1)
16372
+ propValues[zod.def.discriminator]?.delete(void 0);
16304
16373
  return propValues;
16305
16374
  });
16306
16375
  def.options.forEach((option, i) => {
16307
- const propShape = propShapes.get(option._zod.def);
16376
+ const propShape = rawShape(option._zod.def);
16308
16377
  if (propShape && !Object.prototype.hasOwnProperty.call(propShape, def.discriminator)) {
16309
16378
  throw new Error(`Invalid discriminated union option at index "${i}"`);
16310
16379
  }
16311
16380
  });
16312
- const disc = cached(() => {
16313
- const opts = def.options;
16314
- const map2 = /* @__PURE__ */ new Map();
16315
- for (const o of opts) {
16316
- const values = o._zod.propValues?.[def.discriminator];
16317
- if (!values || values.size === 0)
16318
- throw new Error(`Invalid discriminated union option at index "${def.options.indexOf(o)}"`);
16319
- for (const v of values) {
16320
- if (map2.has(v)) {
16321
- throw new Error(`Duplicate discriminator value "${String(v)}"`);
16322
- }
16323
- map2.set(v, o);
16324
- }
16325
- }
16326
- return map2;
16327
- });
16381
+ const disc = cached(() => discriminatorMap(def));
16328
16382
  inst._zod.parse = (payload, ctx) => {
16329
16383
  const input2 = payload.value;
16330
16384
  if (!isObject(input2)) {
@@ -16336,8 +16390,9 @@ var $ZodDiscriminatedUnion = /* @__PURE__ */ $constructor("$ZodDiscriminatedUnio
16336
16390
  });
16337
16391
  return payload;
16338
16392
  }
16339
- const opt = disc.value.get(input2?.[def.discriminator]);
16340
- if (opt) {
16393
+ const value = input2?.[def.discriminator];
16394
+ const opt = disc.value.get(value);
16395
+ if (opt && (value !== void 0 || ctx.direction !== "backward")) {
16341
16396
  return opt._zod.run(payload, ctx);
16342
16397
  }
16343
16398
  if (def.unionFallback || ctx.direction === "backward") {
@@ -16348,7 +16403,7 @@ var $ZodDiscriminatedUnion = /* @__PURE__ */ $constructor("$ZodDiscriminatedUnio
16348
16403
  errors: [],
16349
16404
  note: "No matching discriminator",
16350
16405
  discriminator: def.discriminator,
16351
- options: Array.from(disc.value.keys()),
16406
+ options: Array.from(disc.value.keys()).filter((value2) => disc.value.get(value2) !== null),
16352
16407
  input: input2,
16353
16408
  path: [def.discriminator],
16354
16409
  inst
@@ -16514,6 +16569,8 @@ var $ZodTuple = /* @__PURE__ */ $constructor("$ZodTuple", (inst, def) => {
16514
16569
  }
16515
16570
  }
16516
16571
  const itemResults = new Array(items.length);
16572
+ const abortEarly = def.rest ? ctx?.abortEarly : void 0;
16573
+ let itemAborted = false;
16517
16574
  for (let i = 0; i < items.length; i++) {
16518
16575
  const r = items[i]._zod.run({ value: input2[i], issues: [] }, ctx);
16519
16576
  if (r instanceof Promise) {
@@ -16522,12 +16579,20 @@ var $ZodTuple = /* @__PURE__ */ $constructor("$ZodTuple", (inst, def) => {
16522
16579
  }));
16523
16580
  } else {
16524
16581
  itemResults[i] = r;
16582
+ if (abortEarly && !itemAborted && r.issues.length)
16583
+ itemAborted = aborted(r);
16525
16584
  }
16526
16585
  }
16527
- if (def.rest) {
16586
+ if (def.rest && !itemAborted) {
16528
16587
  let i = items.length - 1;
16529
16588
  const rest = input2.slice(items.length);
16589
+ let seen = payload.issues.length;
16530
16590
  for (const el of rest) {
16591
+ if (abortEarly && payload.issues.length !== seen) {
16592
+ if (aborted(payload, seen))
16593
+ break;
16594
+ seen = payload.issues.length;
16595
+ }
16531
16596
  i++;
16532
16597
  const result = def.rest._zod.run({ value: el, issues: [] }, ctx);
16533
16598
  if (result instanceof Promise) {
@@ -16755,7 +16820,14 @@ var $ZodMap = /* @__PURE__ */ $constructor("$ZodMap", (inst, def) => {
16755
16820
  }
16756
16821
  const proms = [];
16757
16822
  payload.value = memo2 ? memo2.alloc(inst, payload, /* @__PURE__ */ new Map(), ctx) : /* @__PURE__ */ new Map();
16823
+ const abortEarly = ctx?.abortEarly;
16824
+ let seen = payload.issues.length;
16758
16825
  for (const [key, value] of input2) {
16826
+ if (abortEarly && payload.issues.length !== seen) {
16827
+ if (aborted(payload, seen))
16828
+ break;
16829
+ seen = payload.issues.length;
16830
+ }
16759
16831
  const keyResult = def.keyType._zod.run({ value: key, issues: [] }, ctx);
16760
16832
  const valueResult = def.valueType._zod.run({ value, issues: [] }, ctx);
16761
16833
  if (keyResult instanceof Promise || valueResult instanceof Promise) {
@@ -16818,7 +16890,14 @@ var $ZodSet = /* @__PURE__ */ $constructor("$ZodSet", (inst, def) => {
16818
16890
  }
16819
16891
  const proms = [];
16820
16892
  payload.value = memo2 ? memo2.alloc(inst, payload, /* @__PURE__ */ new Set(), ctx) : /* @__PURE__ */ new Set();
16893
+ const abortEarly = ctx?.abortEarly;
16894
+ let seen = payload.issues.length;
16821
16895
  for (const item of input2) {
16896
+ if (abortEarly && payload.issues.length !== seen) {
16897
+ if (aborted(payload, seen))
16898
+ break;
16899
+ seen = payload.issues.length;
16900
+ }
16822
16901
  const result = def.valueType._zod.run({ value: item, issues: [] }, ctx);
16823
16902
  if (result instanceof Promise) {
16824
16903
  proms.push(result.then((result2) => handleSetResult(result2, payload)));
@@ -16841,8 +16920,10 @@ var $ZodEnum = /* @__PURE__ */ $constructor("$ZodEnum", (inst, def) => {
16841
16920
  const values = getEnumValues(def.entries);
16842
16921
  const valuesSet = new Set(values);
16843
16922
  inst._zod.values = valuesSet;
16844
- const patternValues = values.filter((k) => propertyKeyTypes.has(typeof k));
16845
- inst._zod.pattern = new RegExp(patternValues.length ? `^(${patternValues.map((o) => escapeRegex(o.toString())).join("|")})$` : "^[^\\s\\S]$");
16923
+ defineLazyInternal(inst, "pattern", (zod) => {
16924
+ const patternValues = getEnumValues(zod.def.entries).filter((k) => propertyKeyTypes.has(typeof k));
16925
+ return new RegExp(patternValues.length ? `^(${patternValues.map((o) => escapeRegex(o.toString())).join("|")})$` : "^[^\\s\\S]$");
16926
+ });
16846
16927
  inst._zod.parse = (payload, _ctx) => {
16847
16928
  const input2 = payload.value;
16848
16929
  if (valuesSet.has(input2)) {
@@ -16861,7 +16942,10 @@ var $ZodLiteral = /* @__PURE__ */ $constructor("$ZodLiteral", (inst, def) => {
16861
16942
  $ZodType.init(inst, def);
16862
16943
  const values = new Set(def.values);
16863
16944
  inst._zod.values = values;
16864
- inst._zod.pattern = new RegExp(def.values.length ? `^(${def.values.map((o) => typeof o === "string" ? escapeRegex(o) : o ? escapeRegex(o.toString()) : String(o)).join("|")})$` : "^[^\\s\\S]$");
16945
+ defineLazyInternal(inst, "pattern", (zod) => {
16946
+ const vals = zod.def.values;
16947
+ return new RegExp(vals.length ? `^(${vals.map((o) => typeof o === "string" ? escapeRegex(o) : o ? escapeRegex(o.toString()) : String(o)).join("|")})$` : "^[^\\s\\S]$");
16948
+ });
16865
16949
  inst._zod.parse = (payload, _ctx) => {
16866
16950
  const input2 = payload.value;
16867
16951
  if (values.has(input2)) {
@@ -17199,20 +17283,62 @@ function handleReadonlyResult(payload) {
17199
17283
  payload.value = Object.freeze(payload.value);
17200
17284
  return payload;
17201
17285
  }
17286
+ function leafPattern(schema) {
17287
+ const def = schema._zod.def;
17288
+ let pattern = def.pattern;
17289
+ let isInt = !!def.format?.includes("int");
17290
+ let minimum;
17291
+ let maximum;
17292
+ for (const ch of def.checks ?? []) {
17293
+ const d = ch._zod.def;
17294
+ if (d.pattern)
17295
+ pattern = d.pattern;
17296
+ isInt || (isInt = !!d.format?.includes("int"));
17297
+ const lo = d.minimum ?? d.length;
17298
+ const hi = d.maximum ?? d.length;
17299
+ if (lo !== void 0 && (minimum === void 0 || lo > minimum))
17300
+ minimum = lo;
17301
+ if (hi !== void 0 && (maximum === void 0 || hi < maximum))
17302
+ maximum = hi;
17303
+ }
17304
+ if (pattern)
17305
+ return pattern.source;
17306
+ if (minimum !== void 0 && maximum !== void 0 && minimum > maximum)
17307
+ return "(?!)";
17308
+ if (minimum !== void 0 || maximum !== void 0)
17309
+ return string({ minimum, maximum }).source;
17310
+ const own2 = schema._zod.pattern;
17311
+ return (isInt && own2 === number ? integer : own2)?.source;
17312
+ }
17313
+ function partPattern(schema) {
17314
+ const def = schema._zod.def;
17315
+ const own2 = schema._zod.pattern?.source;
17316
+ const inner = def.innerType ?? schema._zod.innerType;
17317
+ if (inner) {
17318
+ const before = inner._zod.pattern?.source;
17319
+ const after = partPattern(inner);
17320
+ if (own2 && before && after && after !== before) {
17321
+ return own2.replace(cleanRegex(before), () => cleanRegex(after));
17322
+ }
17323
+ return own2;
17324
+ }
17325
+ if (def.options) {
17326
+ const sources = def.options.map(partPattern);
17327
+ if (sources.every(Boolean))
17328
+ return `^(${sources.map((s) => cleanRegex(s)).join("|")})$`;
17329
+ }
17330
+ return leafPattern(schema);
17331
+ }
17202
17332
  var $ZodTemplateLiteral = /* @__PURE__ */ $constructor("$ZodTemplateLiteral", (inst, def) => {
17203
17333
  $ZodType.init(inst, def);
17204
17334
  const regexParts = [];
17205
17335
  for (const part of def.parts) {
17206
17336
  if (typeof part === "object" && part !== null) {
17207
- if (!part._zod.pattern) {
17337
+ const source = partPattern(part);
17338
+ if (!source) {
17208
17339
  throw new Error(`Invalid template literal part, no pattern found: ${[...part._zod.traits].shift()}`);
17209
17340
  }
17210
- const source = part._zod.pattern instanceof RegExp ? part._zod.pattern.source : part._zod.pattern;
17211
- if (!source)
17212
- throw new Error(`Invalid template literal part: ${part._zod.traits}`);
17213
- const start = source.startsWith("^") ? 1 : 0;
17214
- const end = source.endsWith("$") ? source.length - 1 : source.length;
17215
- regexParts.push(source.slice(start, end));
17341
+ regexParts.push(cleanRegex(source));
17216
17342
  } else if (part === null || primitiveTypes.has(typeof part)) {
17217
17343
  regexParts.push(escapeRegex(`${part}`));
17218
17344
  } else {
@@ -17387,28 +17513,53 @@ var $ZodCyclicError = class extends Error {
17387
17513
  };
17388
17514
  var STATE = "~memo";
17389
17515
  var NO_ISSUES = [];
17516
+ function isRef(value) {
17517
+ return value !== null && typeof value === "object";
17518
+ }
17390
17519
  function cloneIssues(issues) {
17391
17520
  return issues.map((iss) => iss.path ? { ...iss, path: iss.path.slice() } : { ...iss });
17392
17521
  }
17393
17522
  var recursive = /* @__PURE__ */ new WeakMap();
17394
- function isRecursive(inst, stack) {
17523
+ var NONE = 0;
17524
+ var ASSUMED = 1;
17525
+ var PROVEN = 2;
17526
+ function isRecursive(inst, stack, resolve) {
17395
17527
  const cached2 = recursive.get(inst);
17396
17528
  if (cached2 !== void 0)
17397
- return cached2;
17529
+ return cached2 ? PROVEN : NONE;
17398
17530
  if (stack.has(inst))
17399
- return true;
17531
+ return PROVEN;
17400
17532
  stack.add(inst);
17401
- let result = false;
17533
+ let result = NONE;
17402
17534
  const check2 = (child) => {
17403
- if (!result && child?._zod && isRecursive(child, stack))
17404
- result = true;
17535
+ if (result !== PROVEN && child?._zod) {
17536
+ const answer = isRecursive(child, stack, resolve);
17537
+ if (answer > result)
17538
+ result = answer;
17539
+ }
17540
+ };
17541
+ const shape = (sh, spread) => {
17542
+ let answer = NONE;
17543
+ for (const key of Reflect.ownKeys(sh)) {
17544
+ const desc = Object.getOwnPropertyDescriptor(sh, key);
17545
+ if (spread && !desc.enumerable)
17546
+ continue;
17547
+ const child = desc.get ? ASSUMED : desc.value?._zod ? isRecursive(desc.value, stack, resolve) : NONE;
17548
+ if (child > answer)
17549
+ answer = child;
17550
+ }
17551
+ return answer;
17552
+ };
17553
+ const merge2 = (answer) => {
17554
+ if (answer > result)
17555
+ result = answer;
17405
17556
  };
17406
17557
  const def = inst._zod.def;
17407
17558
  const kind = def.type;
17408
17559
  switch (kind) {
17409
17560
  case "object": {
17410
- for (const key of Reflect.ownKeys(def.shape))
17411
- check2(def.shape[key]);
17561
+ const raw = rawShape(def);
17562
+ merge2(raw ? shape(raw, true) : ASSUMED);
17412
17563
  check2(def.catchall);
17413
17564
  break;
17414
17565
  }
@@ -17455,10 +17606,12 @@ function isRecursive(inst, stack) {
17455
17606
  check2(def.input);
17456
17607
  check2(def.output);
17457
17608
  break;
17458
- // reading `_zod.innerType` resolves the getter once and caches it
17459
- case "lazy":
17460
- check2(inst._zod.innerType);
17609
+ // `$ZodLazy` caches its inner on the def, so a resolved edge is followed exactly
17610
+ case "lazy": {
17611
+ const inner = def._cachedInner ?? (resolve ? inst._zod.innerType : void 0);
17612
+ merge2(inner ? isRecursive(inner, stack, false) : ASSUMED);
17461
17613
  break;
17614
+ }
17462
17615
  // a leaf by choice: `parts` are regex fragments, not data positions
17463
17616
  case "template_literal":
17464
17617
  // leaves
@@ -17500,16 +17653,20 @@ function isRecursive(inst, stack) {
17500
17653
  }
17501
17654
  }
17502
17655
  stack.delete(inst);
17503
- recursive.set(inst, result);
17504
- return result;
17656
+ return settle(inst, result);
17657
+ }
17658
+ function settle(inst, answer) {
17659
+ if (answer !== ASSUMED)
17660
+ recursive.set(inst, answer === PROVEN);
17661
+ return answer;
17505
17662
  }
17506
17663
  function isRecursiveSchema(inst) {
17507
- return isRecursive(inst, /* @__PURE__ */ new Set());
17664
+ return isRecursive(inst, /* @__PURE__ */ new Set(), true) !== NONE;
17508
17665
  }
17509
17666
  function bucketFor(state, inst) {
17510
17667
  let bucket = state.buckets.get(inst);
17511
17668
  if (!bucket) {
17512
- bucket = /* @__PURE__ */ new Map();
17669
+ bucket = /* @__PURE__ */ new WeakMap();
17513
17670
  state.buckets.set(inst, bucket);
17514
17671
  }
17515
17672
  return bucket;
@@ -17545,6 +17702,7 @@ var memo = {
17545
17702
  attach(inst) {
17546
17703
  var _a3;
17547
17704
  let isRecursiveInst;
17705
+ let rechecked = false;
17548
17706
  let lastCtx;
17549
17707
  let lastBucket;
17550
17708
  (_a3 = inst._zod).deferred ?? (_a3.deferred = []);
@@ -17552,20 +17710,24 @@ var memo = {
17552
17710
  const base = inst._zod.parse;
17553
17711
  const wrapped = (payload, ctx) => {
17554
17712
  if (isRecursiveInst === void 0) {
17555
- isRecursiveInst = isRecursive(inst, /* @__PURE__ */ new Set());
17556
- if (!isRecursiveInst) {
17713
+ const walked = isRecursive(inst, /* @__PURE__ */ new Set(), false);
17714
+ if (walked === NONE) {
17557
17715
  inst._zod.parse = base;
17558
17716
  if (inst._zod.run === wrapped)
17559
17717
  inst._zod.run = base;
17560
17718
  return base(payload, ctx);
17561
17719
  }
17720
+ if (walked === PROVEN || rechecked)
17721
+ isRecursiveInst = true;
17722
+ else
17723
+ rechecked = true;
17562
17724
  }
17563
17725
  const input2 = payload.value;
17564
- if (input2 === null || typeof input2 !== "object")
17726
+ if (!isRef(input2))
17565
17727
  return base(payload, ctx);
17566
17728
  let state = ctx[STATE];
17567
17729
  if (!state) {
17568
- state = { buckets: /* @__PURE__ */ new Map(), backEdges: void 0 };
17730
+ state = { buckets: /* @__PURE__ */ new WeakMap(), backEdges: void 0 };
17569
17731
  ctx[STATE] = state;
17570
17732
  }
17571
17733
  let bucket;
@@ -17584,7 +17746,7 @@ var memo = {
17584
17746
  payload.issues.push(...cloneIssues(hit.issues));
17585
17747
  } else {
17586
17748
  payload.memo = true;
17587
- state.backEdges ?? (state.backEdges = /* @__PURE__ */ new Set());
17749
+ state.backEdges ?? (state.backEdges = /* @__PURE__ */ new WeakSet());
17588
17750
  state.backEdges.add(hit.value);
17589
17751
  }
17590
17752
  return payload;
@@ -17616,7 +17778,7 @@ function memoizer() {
17616
17778
  }
17617
17779
  function isBackEdge(ctx, value) {
17618
17780
  const backEdges = ctx[STATE]?.backEdges;
17619
- return backEdges !== void 0 && value !== null && typeof value === "object" && backEdges.has(value);
17781
+ return backEdges !== void 0 && isRef(value) && backEdges.has(value);
17620
17782
  }
17621
17783
 
17622
17784
  // node_modules/zod/v4/locales/index.js
@@ -17673,6 +17835,7 @@ __export(locales_exports, {
17673
17835
  sl: () => sl_default,
17674
17836
  sv: () => sv_default,
17675
17837
  ta: () => ta_default,
17838
+ tg: () => tg_default,
17676
17839
  th: () => th_default,
17677
17840
  tk: () => tk_default,
17678
17841
  tr: () => tr_default,
@@ -17727,6 +17890,8 @@ var error = () => {
17727
17890
  json_string: "\u0646\u064E\u0635 \u0639\u0644\u0649 \u0647\u064A\u0626\u0629 JSON",
17728
17891
  e164: "\u0631\u0642\u0645 \u0647\u0627\u062A\u0641 \u0628\u0645\u0639\u064A\u0627\u0631 E.164",
17729
17892
  credit_card: "\u0631\u0642\u0645 \u0628\u0637\u0627\u0642\u0629 \u0627\u0644\u0627\u0626\u062A\u0645\u0627\u0646",
17893
+ currency_code: "\u0631\u0645\u0632 \u0627\u0644\u0639\u0645\u0644\u0629",
17894
+ iban: "IBAN",
17730
17895
  jwt: "JWT",
17731
17896
  template_literal: "\u0645\u062F\u062E\u0644"
17732
17897
  };
@@ -17837,6 +18002,8 @@ var error2 = () => {
17837
18002
  json_string: "JSON string",
17838
18003
  e164: "E.164 number",
17839
18004
  credit_card: "kredit kart\u0131 n\xF6mr\u0259si",
18005
+ currency_code: "valyuta kodu",
18006
+ iban: "IBAN",
17840
18007
  jwt: "JWT",
17841
18008
  template_literal: "input"
17842
18009
  };
@@ -17996,6 +18163,8 @@ var error3 = () => {
17996
18163
  json_string: "JSON \u0440\u0430\u0434\u043E\u043A",
17997
18164
  e164: "\u043D\u0443\u043C\u0430\u0440 E.164",
17998
18165
  credit_card: "\u043D\u0443\u043C\u0430\u0440 \u043A\u0440\u044D\u0434\u044B\u0442\u043D\u0430\u0439 \u043A\u0430\u0440\u0442\u044B",
18166
+ currency_code: "\u043A\u043E\u0434 \u0432\u0430\u043B\u044E\u0442\u044B",
18167
+ iban: "IBAN",
17999
18168
  jwt: "JWT",
18000
18169
  template_literal: "\u0443\u0432\u043E\u0434"
18001
18170
  };
@@ -18113,6 +18282,8 @@ var error4 = () => {
18113
18282
  json_string: "JSON \u043D\u0438\u0437",
18114
18283
  e164: "E.164 \u043D\u043E\u043C\u0435\u0440",
18115
18284
  credit_card: "\u043D\u043E\u043C\u0435\u0440 \u043D\u0430 \u043A\u0440\u0435\u0434\u0438\u0442\u043D\u0430 \u043A\u0430\u0440\u0442\u0430",
18285
+ currency_code: "\u043A\u043E\u0434 \u043D\u0430 \u0432\u0430\u043B\u0443\u0442\u0430",
18286
+ iban: "IBAN",
18116
18287
  jwt: "JWT",
18117
18288
  template_literal: "\u0432\u0445\u043E\u0434"
18118
18289
  };
@@ -18237,6 +18408,8 @@ var error5 = () => {
18237
18408
  json_string: "JSON \u09B8\u09CD\u099F\u09CD\u09B0\u09BF\u0982",
18238
18409
  e164: "E.164 \u09A8\u09AE\u09CD\u09AC\u09B0",
18239
18410
  credit_card: "\u0995\u09CD\u09B0\u09C7\u09A1\u09BF\u099F \u0995\u09BE\u09B0\u09CD\u09A1 \u09A8\u09AE\u09CD\u09AC\u09B0",
18411
+ currency_code: "\u09AE\u09C1\u09A6\u09CD\u09B0\u09BE \u0995\u09CB\u09A1",
18412
+ iban: "IBAN",
18240
18413
  jwt: "JWT",
18241
18414
  template_literal: "\u0987\u09A8\u09AA\u09C1\u099F"
18242
18415
  };
@@ -18349,6 +18522,8 @@ var error6 = () => {
18349
18522
  json_string: "cadena JSON",
18350
18523
  e164: "n\xFAmero E.164",
18351
18524
  credit_card: "n\xFAmero de targeta de cr\xE8dit",
18525
+ currency_code: "codi de moneda",
18526
+ iban: "IBAN",
18352
18527
  jwt: "JWT",
18353
18528
  template_literal: "entrada"
18354
18529
  };
@@ -18461,6 +18636,8 @@ var error7 = () => {
18461
18636
  json_string: "\u062F\u06D5\u0642\u06CC JSON",
18462
18637
  e164: "\u0698\u0645\u0627\u0631\u06D5\u06CC E.164",
18463
18638
  credit_card: "\u0698\u0645\u0627\u0631\u06D5\u06CC \u06A9\u0627\u0631\u062A\u06CC \u06A9\u0631\u06CE\u062F\u06CC\u062A",
18639
+ currency_code: "\u06A9\u06C6\u062F\u06CC \u062F\u0631\u0627\u0648",
18640
+ iban: "IBAN",
18464
18641
  jwt: "JWT",
18465
18642
  template_literal: "\u062A\u06CE\u06A9\u0631\u062F\u06D5"
18466
18643
  };
@@ -18592,6 +18769,8 @@ var error8 = () => {
18592
18769
  json_string: "\u0159et\u011Bzec ve form\xE1tu JSON",
18593
18770
  e164: "\u010D\xEDslo E.164",
18594
18771
  credit_card: "\u010D\xEDslo kreditn\xED karty",
18772
+ currency_code: "k\xF3d m\u011Bny",
18773
+ iban: "IBAN",
18595
18774
  jwt: "JWT",
18596
18775
  template_literal: "vstup"
18597
18776
  };
@@ -18707,6 +18886,8 @@ var error9 = () => {
18707
18886
  json_string: "JSON-streng",
18708
18887
  e164: "E.164-nummer",
18709
18888
  credit_card: "kreditkortnummer",
18889
+ currency_code: "valutakode",
18890
+ iban: "IBAN",
18710
18891
  jwt: "JWT",
18711
18892
  template_literal: "input"
18712
18893
  };
@@ -18826,6 +19007,8 @@ var error10 = () => {
18826
19007
  json_string: "JSON-String",
18827
19008
  e164: "E.164-Nummer",
18828
19009
  credit_card: "Kreditkartennummer",
19010
+ currency_code: "W\xE4hrungscode",
19011
+ iban: "IBAN",
18829
19012
  jwt: "JWT",
18830
19013
  template_literal: "Eingabe"
18831
19014
  };
@@ -18938,6 +19121,8 @@ var error11 = () => {
18938
19121
  json_string: "\u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC JSON",
18939
19122
  e164: "\u03B1\u03C1\u03B9\u03B8\u03BC\u03CC\u03C2 E.164",
18940
19123
  credit_card: "\u03B1\u03C1\u03B9\u03B8\u03BC\u03CC\u03C2 \u03C0\u03B9\u03C3\u03C4\u03C9\u03C4\u03B9\u03BA\u03AE\u03C2 \u03BA\u03AC\u03C1\u03C4\u03B1\u03C2",
19124
+ currency_code: "\u03BA\u03C9\u03B4\u03B9\u03BA\u03CC\u03C2 \u03BD\u03BF\u03BC\u03AF\u03C3\u03BC\u03B1\u03C4\u03BF\u03C2",
19125
+ iban: "IBAN",
18941
19126
  jwt: "JWT",
18942
19127
  template_literal: "\u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2"
18943
19128
  };
@@ -19048,7 +19233,9 @@ var error12 = () => {
19048
19233
  base64url: "base64url-encoded string",
19049
19234
  json_string: "JSON string",
19050
19235
  e164: "E.164 number",
19236
+ currency_code: "currency code",
19051
19237
  credit_card: "credit card number",
19238
+ iban: "IBAN",
19052
19239
  jwt: "JWT",
19053
19240
  template_literal: "input"
19054
19241
  };
@@ -19172,6 +19359,8 @@ var error13 = () => {
19172
19359
  json_string: "JSON-karaktraro",
19173
19360
  e164: "E.164-nombro",
19174
19361
  credit_card: "kreditkarta numero",
19362
+ currency_code: "valuta kodo",
19363
+ iban: "IBAN",
19175
19364
  jwt: "JWT",
19176
19365
  template_literal: "enigo"
19177
19366
  };
@@ -19284,6 +19473,8 @@ var error14 = () => {
19284
19473
  json_string: "cadena JSON",
19285
19474
  e164: "n\xFAmero E.164",
19286
19475
  credit_card: "n\xFAmero de tarjeta de cr\xE9dito",
19476
+ currency_code: "c\xF3digo de moneda",
19477
+ iban: "IBAN",
19287
19478
  jwt: "JWT",
19288
19479
  template_literal: "entrada"
19289
19480
  };
@@ -19420,6 +19611,8 @@ var error15 = () => {
19420
19611
  json_string: "JSON \u0631\u0634\u062A\u0647",
19421
19612
  e164: "E.164 \u0639\u062F\u062F",
19422
19613
  credit_card: "\u0634\u0645\u0627\u0631\u0647 \u06A9\u0627\u0631\u062A \u0627\u0639\u062A\u0628\u0627\u0631\u06CC",
19614
+ currency_code: "\u06A9\u062F \u0627\u0631\u0632",
19615
+ iban: "IBAN",
19423
19616
  jwt: "JWT",
19424
19617
  template_literal: "\u0648\u0631\u0648\u062F\u06CC"
19425
19618
  };
@@ -19542,6 +19735,8 @@ var error16 = () => {
19542
19735
  json_string: "JSON-merkkijono",
19543
19736
  e164: "E.164-luku",
19544
19737
  credit_card: "luottokortin numero",
19738
+ currency_code: "valuuttakoodi",
19739
+ iban: "IBAN",
19545
19740
  jwt: "JWT",
19546
19741
  template_literal: "templaattimerkkijono"
19547
19742
  };
@@ -19653,6 +19848,8 @@ var error17 = () => {
19653
19848
  json_string: "cha\xEEne de caract\xE8res JSON",
19654
19849
  e164: "num\xE9ro au format E.164",
19655
19850
  credit_card: "num\xE9ro de carte de cr\xE9dit",
19851
+ currency_code: "code de devise",
19852
+ iban: "IBAN",
19656
19853
  jwt: "JWT",
19657
19854
  template_literal: "entr\xE9e"
19658
19855
  };
@@ -19782,6 +19979,8 @@ var error18 = () => {
19782
19979
  json_string: "cha\xEEne JSON",
19783
19980
  e164: "num\xE9ro E.164",
19784
19981
  credit_card: "num\xE9ro de carte de cr\xE9dit",
19982
+ currency_code: "code de devise",
19983
+ iban: "IBAN",
19785
19984
  jwt: "JWT",
19786
19985
  template_literal: "entr\xE9e"
19787
19986
  };
@@ -19893,6 +20092,8 @@ var error19 = () => {
19893
20092
  json_string: "JSON \u0AB8\u0ACD\u0A9F\u0ACD\u0AB0\u0ABF\u0A82\u0A97",
19894
20093
  e164: "E.164 \u0AA8\u0A82\u0AAC\u0AB0",
19895
20094
  credit_card: "\u0A95\u0ACD\u0AB0\u0AC7\u0AA1\u0ABF\u0A9F \u0A95\u0ABE\u0AB0\u0ACD\u0AA1 \u0AA8\u0A82\u0AAC\u0AB0",
20095
+ currency_code: "\u0A9A\u0AB2\u0AA3 \u0A95\u0ACB\u0AA1",
20096
+ iban: "IBAN",
19896
20097
  jwt: "JWT",
19897
20098
  template_literal: "\u0A87\u0AA8\u0AAA\u0AC1\u0A9F"
19898
20099
  };
@@ -20041,6 +20242,8 @@ var error20 = () => {
20041
20242
  json_string: { label: "\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA JSON", gender: "f" },
20042
20243
  e164: { label: "\u05DE\u05E1\u05E4\u05E8 E.164", gender: "m" },
20043
20244
  credit_card: { label: "\u05DE\u05E1\u05E4\u05E8 \u05DB\u05E8\u05D8\u05D9\u05E1 \u05D0\u05E9\u05E8\u05D0\u05D9", gender: "m" },
20245
+ currency_code: { label: "\u05E7\u05D5\u05D3 \u05DE\u05D8\u05D1\u05E2", gender: "m" },
20246
+ iban: { label: "IBAN", gender: "m" },
20044
20247
  jwt: { label: "JWT", gender: "m" },
20045
20248
  template_literal: { label: "\u05E7\u05DC\u05D8", gender: "m" },
20046
20249
  ends_with: { label: "\u05E7\u05DC\u05D8", gender: "m" },
@@ -20205,6 +20408,8 @@ var error21 = () => {
20205
20408
  json_string: "JSON \u0938\u094D\u091F\u094D\u0930\u093F\u0902\u0917",
20206
20409
  e164: "E.164 \u0938\u0902\u0916\u094D\u092F\u093E",
20207
20410
  credit_card: "\u0915\u094D\u0930\u0947\u0921\u093F\u091F \u0915\u093E\u0930\u094D\u0921 \u0938\u0902\u0916\u094D\u092F\u093E",
20411
+ currency_code: "\u092E\u0941\u0926\u094D\u0930\u093E \u0915\u094B\u0921",
20412
+ iban: "IBAN",
20208
20413
  jwt: "JWT",
20209
20414
  template_literal: "\u0907\u0928\u092A\u0941\u091F"
20210
20415
  };
@@ -20314,6 +20519,8 @@ var error22 = () => {
20314
20519
  json_string: "JSON tekst",
20315
20520
  e164: "E.164 broj",
20316
20521
  credit_card: "broj kreditne kartice",
20522
+ currency_code: "kod valute",
20523
+ iban: "IBAN",
20317
20524
  jwt: "JWT",
20318
20525
  template_literal: "unos"
20319
20526
  };
@@ -20440,6 +20647,8 @@ var error23 = () => {
20440
20647
  json_string: "JSON string",
20441
20648
  e164: "E.164 sz\xE1m",
20442
20649
  credit_card: "hitelk\xE1rtyasz\xE1m",
20650
+ currency_code: "p\xE9nznemk\xF3d",
20651
+ iban: "IBAN",
20443
20652
  jwt: "JWT",
20444
20653
  template_literal: "bemenet"
20445
20654
  };
@@ -20592,6 +20801,8 @@ var error24 = () => {
20592
20801
  json_string: "JSON \u057F\u0578\u0572",
20593
20802
  e164: "E.164 \u0570\u0561\u0574\u0561\u0580",
20594
20803
  credit_card: "\u056F\u0580\u0565\u0564\u056B\u057F \u0584\u0561\u0580\u057F\u056B \u0570\u0561\u0574\u0561\u0580",
20804
+ currency_code: "\u0561\u0580\u056A\u0578\u0582\u0575\u0569\u056B \u056F\u0578\u0564",
20805
+ iban: "IBAN",
20595
20806
  jwt: "JWT",
20596
20807
  template_literal: "\u0574\u0578\u0582\u057F\u0584"
20597
20808
  };
@@ -20709,6 +20920,8 @@ var error25 = () => {
20709
20920
  json_string: "string JSON",
20710
20921
  e164: "angka E.164",
20711
20922
  credit_card: "nomor kartu kredit",
20923
+ currency_code: "kode mata uang",
20924
+ iban: "IBAN",
20712
20925
  jwt: "JWT",
20713
20926
  template_literal: "input"
20714
20927
  };
@@ -20819,6 +21032,8 @@ var error26 = () => {
20819
21032
  json_string: "JSON strengur",
20820
21033
  e164: "E.164 t\xF6lugildi",
20821
21034
  credit_card: "kreditkortan\xFAmer",
21035
+ currency_code: "gjaldmi\xF0ilsk\xF3\xF0i",
21036
+ iban: "IBAN",
20822
21037
  jwt: "JWT",
20823
21038
  template_literal: "gildi"
20824
21039
  };
@@ -20932,6 +21147,8 @@ var error27 = () => {
20932
21147
  json_string: "stringa JSON",
20933
21148
  e164: "numero E.164",
20934
21149
  credit_card: "numero di carta di credito",
21150
+ currency_code: "codice valuta",
21151
+ iban: "IBAN",
20935
21152
  jwt: "JWT",
20936
21153
  template_literal: "input"
20937
21154
  };
@@ -21044,6 +21261,8 @@ var error28 = () => {
21044
21261
  json_string: "JSON\u6587\u5B57\u5217",
21045
21262
  e164: "E.164\u756A\u53F7",
21046
21263
  credit_card: "\u30AF\u30EC\u30B8\u30C3\u30C8\u30AB\u30FC\u30C9\u756A\u53F7",
21264
+ currency_code: "\u901A\u8CA8\u30B3\u30FC\u30C9",
21265
+ iban: "IBAN",
21047
21266
  jwt: "JWT",
21048
21267
  template_literal: "\u5165\u529B\u5024"
21049
21268
  };
@@ -21155,6 +21374,8 @@ var error29 = () => {
21155
21374
  json_string: "JSON \u10D5\u10D4\u10DA\u10D8",
21156
21375
  e164: "E.164 \u10DC\u10DD\u10DB\u10D4\u10E0\u10D8",
21157
21376
  credit_card: "\u10E1\u10D0\u10D9\u10E0\u10D4\u10D3\u10D8\u10E2\u10DD \u10D1\u10D0\u10E0\u10D0\u10D7\u10D8\u10E1 \u10DC\u10DD\u10DB\u10D4\u10E0\u10D8",
21377
+ currency_code: "\u10D5\u10D0\u10DA\u10E3\u10E2\u10D8\u10E1 \u10D9\u10DD\u10D3\u10D8",
21378
+ iban: "IBAN",
21158
21379
  jwt: "JWT",
21159
21380
  template_literal: "\u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0"
21160
21381
  };
@@ -21271,6 +21492,8 @@ var error30 = () => {
21271
21492
  json_string: "\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A JSON",
21272
21493
  e164: "\u179B\u17C1\u1781 E.164",
21273
21494
  credit_card: "\u179B\u17C1\u1781\u1794\u17D0\u178E\u17D2\u178E\u17A5\u178E\u1791\u17B6\u1793",
21495
+ currency_code: "\u1780\u17BC\u178A\u179A\u17BC\u1794\u17B7\u1799\u1794\u17D0\u178E\u17D2\u178E",
21496
+ iban: "IBAN",
21274
21497
  jwt: "JWT",
21275
21498
  template_literal: "\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B"
21276
21499
  };
@@ -21390,6 +21613,8 @@ var error31 = () => {
21390
21613
  json_string: "JSON\u0CB8\u0CCD\u0C9F\u0CCD\u0CB0\u0CBF\u0C82\u0C97\u0CCD",
21391
21614
  e164: "E.164 \u0CB8\u0C82\u0C96\u0CCD\u0CAF\u0CC6",
21392
21615
  credit_card: "\u0C95\u0CCD\u0CB0\u0CC6\u0CA1\u0CBF\u0C9F\u0CCD \u0C95\u0CBE\u0CB0\u0CCD\u0CA1\u0CCD \u0CB8\u0C82\u0C96\u0CCD\u0CAF\u0CC6",
21616
+ currency_code: "\u0C95\u0CB0\u0CC6\u0CA8\u0CCD\u0CB8\u0CBF \u0C95\u0CCB\u0CA1\u0CCD",
21617
+ iban: "IBAN",
21393
21618
  jwt: "JWT",
21394
21619
  template_literal: "\u0C87\u0CA8\u0CCD\u0CAA\u0CC1\u0C9F\u0CCD"
21395
21620
  };
@@ -21504,6 +21729,8 @@ var error32 = () => {
21504
21729
  json_string: "JSON \uBB38\uC790\uC5F4",
21505
21730
  e164: "E.164 \uBC88\uD638",
21506
21731
  credit_card: "\uC2E0\uC6A9\uCE74\uB4DC \uBC88\uD638",
21732
+ currency_code: "\uD1B5\uD654 \uCF54\uB4DC",
21733
+ iban: "IBAN",
21507
21734
  jwt: "JWT",
21508
21735
  template_literal: "\uC785\uB825"
21509
21736
  };
@@ -21701,6 +21928,8 @@ var error33 = () => {
21701
21928
  json_string: "JSON eilut\u0117",
21702
21929
  e164: "E.164 numeris",
21703
21930
  credit_card: "kredito kortel\u0117s numeris",
21931
+ currency_code: "valiutos kodas",
21932
+ iban: "IBAN",
21704
21933
  jwt: "JWT",
21705
21934
  template_literal: "\u012Fvestis"
21706
21935
  };
@@ -21825,6 +22054,8 @@ var error34 = () => {
21825
22054
  json_string: "JSON \u043D\u0438\u0437\u0430",
21826
22055
  e164: "E.164 \u0431\u0440\u043E\u0458",
21827
22056
  credit_card: "\u0431\u0440\u043E\u0458 \u043D\u0430 \u043A\u0440\u0435\u0434\u0438\u0442\u043D\u0430 \u043A\u0430\u0440\u0442\u0438\u0447\u043A\u0430",
22057
+ currency_code: "\u043A\u043E\u0434 \u043D\u0430 \u0432\u0430\u043B\u0443\u0442\u0430",
22058
+ iban: "IBAN",
21828
22059
  jwt: "JWT",
21829
22060
  template_literal: "\u0432\u043D\u0435\u0441"
21830
22061
  };
@@ -21938,6 +22169,8 @@ var error35 = () => {
21938
22169
  json_string: "string JSON",
21939
22170
  e164: "nombor E.164",
21940
22171
  credit_card: "nombor kad kredit",
22172
+ currency_code: "kod mata wang",
22173
+ iban: "IBAN",
21941
22174
  jwt: "JWT",
21942
22175
  template_literal: "input"
21943
22176
  };
@@ -22049,6 +22282,8 @@ var error36 = () => {
22049
22282
  json_string: "JSON \u0938\u094D\u091F\u094D\u0930\u093F\u0919",
22050
22283
  e164: "E.164 \u0928\u092E\u094D\u092C\u0930",
22051
22284
  credit_card: "\u0915\u094D\u0930\u0947\u0921\u093F\u091F \u0915\u093E\u0930\u094D\u0921 \u0928\u092E\u094D\u092C\u0930",
22285
+ currency_code: "\u092E\u0941\u0926\u094D\u0930\u093E \u0915\u094B\u0921",
22286
+ iban: "IBAN",
22052
22287
  jwt: "JWT",
22053
22288
  template_literal: "\u0907\u0928\u092A\u0941\u091F"
22054
22289
  };
@@ -22159,6 +22394,8 @@ var error37 = () => {
22159
22394
  json_string: "JSON string",
22160
22395
  e164: "E.164-nummer",
22161
22396
  credit_card: "creditcardnummer",
22397
+ currency_code: "valutacode",
22398
+ iban: "IBAN",
22162
22399
  jwt: "JWT",
22163
22400
  template_literal: "invoer"
22164
22401
  };
@@ -22273,6 +22510,8 @@ var error38 = () => {
22273
22510
  json_string: "JSON-streng",
22274
22511
  e164: "E.164-nummer",
22275
22512
  credit_card: "kredittkortnummer",
22513
+ currency_code: "valutakode",
22514
+ iban: "IBAN",
22276
22515
  jwt: "JWT",
22277
22516
  template_literal: "input"
22278
22517
  };
@@ -22385,6 +22624,8 @@ var error39 = () => {
22385
22624
  json_string: "JSON-streng",
22386
22625
  e164: "E.164-nummer",
22387
22626
  credit_card: "kredittkortnummer",
22627
+ currency_code: "valutakode",
22628
+ iban: "IBAN",
22388
22629
  jwt: "JWT",
22389
22630
  template_literal: "input"
22390
22631
  };
@@ -22497,6 +22738,8 @@ var error40 = () => {
22497
22738
  json_string: "JSON metin",
22498
22739
  e164: "E.164 say\u0131s\u0131",
22499
22740
  credit_card: "i'tib\xE2r kart\u0131 numaras\u0131",
22741
+ currency_code: "para birimi kodu",
22742
+ iban: "IBAN",
22500
22743
  jwt: "JWT",
22501
22744
  template_literal: "giren"
22502
22745
  };
@@ -22610,6 +22853,8 @@ var error41 = () => {
22610
22853
  json_string: "JSON \u0645\u062A\u0646",
22611
22854
  e164: "\u062F E.164 \u0634\u0645\u06D0\u0631\u0647",
22612
22855
  credit_card: "\u062F \u06A9\u0631\u06CC\u0689\u06CC\u067C \u06A9\u0627\u0631\u062A \u0634\u0645\u06CC\u0631\u0647",
22856
+ currency_code: "\u062F \u0627\u0633\u0639\u0627\u0631\u0648 \u06A9\u0648\u0689",
22857
+ iban: "IBAN",
22613
22858
  jwt: "JWT",
22614
22859
  template_literal: "\u0648\u0631\u0648\u062F\u064A"
22615
22860
  };
@@ -22728,6 +22973,8 @@ var error42 = () => {
22728
22973
  json_string: "ci\u0105g znak\xF3w w formacie JSON",
22729
22974
  e164: "liczba E.164",
22730
22975
  credit_card: "numer karty kredytowej",
22976
+ currency_code: "kod waluty",
22977
+ iban: "IBAN",
22731
22978
  jwt: "JWT",
22732
22979
  template_literal: "wej\u015Bcie"
22733
22980
  };
@@ -22841,6 +23088,8 @@ var error43 = () => {
22841
23088
  json_string: "o texto JSON",
22842
23089
  e164: "o n\xFAmero E.164",
22843
23090
  credit_card: "o n\xFAmero de cart\xE3o de cr\xE9dito",
23091
+ currency_code: "o c\xF3digo de moeda",
23092
+ iban: "o IBAN",
22844
23093
  jwt: "o JWT",
22845
23094
  template_literal: "a entrada"
22846
23095
  };
@@ -22918,8 +23167,8 @@ var error43 = () => {
22918
23167
  case "not_multiple_of":
22919
23168
  return `N\xFAmero inv\xE1lido: deve ser m\xFAltiplo de ${issue2.divisor}`;
22920
23169
  case "unrecognized_keys": {
22921
- const plural = issue2.keys.length > 1 ? "s" : "";
22922
- return `Chave${plural} inv\xE1lida${plural}: ${joinValues(issue2.keys, ", ")}`;
23170
+ const plural2 = issue2.keys.length > 1 ? "s" : "";
23171
+ return `Chave${plural2} inv\xE1lida${plural2}: ${joinValues(issue2.keys, ", ")}`;
22923
23172
  }
22924
23173
  case "invalid_key":
22925
23174
  return `Entrada inv\xE1lida n${translateOriginWithArticle(issue2.origin, "definite")}`;
@@ -22983,6 +23232,8 @@ var error44 = () => {
22983
23232
  json_string: "o texto JSON",
22984
23233
  e164: "o n\xFAmero E.164",
22985
23234
  credit_card: "o n\xFAmero de cart\xE3o de cr\xE9dito",
23235
+ currency_code: "o c\xF3digo de moeda",
23236
+ iban: "o IBAN",
22986
23237
  jwt: "o JWT",
22987
23238
  template_literal: "a entrada"
22988
23239
  };
@@ -23061,8 +23312,8 @@ var error44 = () => {
23061
23312
  case "not_multiple_of":
23062
23313
  return `N\xFAmero inv\xE1lido: deve ser m\xFAltiplo de ${issue2.divisor}`;
23063
23314
  case "unrecognized_keys": {
23064
- const plural = issue2.keys.length > 1 ? "s" : "";
23065
- return `Chave${plural} inv\xE1lida${plural}: ${joinValues(issue2.keys, ", ")}`;
23315
+ const plural2 = issue2.keys.length > 1 ? "s" : "";
23316
+ return `Chave${plural2} inv\xE1lida${plural2}: ${joinValues(issue2.keys, ", ")}`;
23066
23317
  }
23067
23318
  case "invalid_key":
23068
23319
  return `Entrada inv\xE1lida n${translateOriginWithArticle(issue2.origin, "definite")}`;
@@ -23126,6 +23377,8 @@ var error45 = () => {
23126
23377
  json_string: "\u0219ir JSON",
23127
23378
  e164: "num\u0103r E.164",
23128
23379
  credit_card: "num\u0103r de card de credit",
23380
+ currency_code: "cod valutar",
23381
+ iban: "IBAN",
23129
23382
  jwt: "JWT",
23130
23383
  template_literal: "intrare"
23131
23384
  };
@@ -23297,6 +23550,8 @@ var error46 = () => {
23297
23550
  json_string: "JSON \u0441\u0442\u0440\u043E\u043A\u0430",
23298
23551
  e164: "\u043D\u043E\u043C\u0435\u0440 E.164",
23299
23552
  credit_card: "\u043D\u043E\u043C\u0435\u0440 \u043A\u0440\u0435\u0434\u0438\u0442\u043D\u043E\u0439 \u043A\u0430\u0440\u0442\u044B",
23553
+ currency_code: "\u043A\u043E\u0434 \u0432\u0430\u043B\u044E\u0442\u044B",
23554
+ iban: "IBAN",
23300
23555
  jwt: "JWT",
23301
23556
  template_literal: "\u0432\u0432\u043E\u0434"
23302
23557
  };
@@ -23414,6 +23669,8 @@ var error47 = () => {
23414
23669
  json_string: "re\u0165azec vo form\xE1te JSON",
23415
23670
  e164: "\u010D\xEDslo E.164",
23416
23671
  credit_card: "\u010D\xEDslo kreditnej karty",
23672
+ currency_code: "k\xF3d meny",
23673
+ iban: "IBAN",
23417
23674
  jwt: "JWT",
23418
23675
  template_literal: "vstup"
23419
23676
  };
@@ -23529,6 +23786,8 @@ var error48 = () => {
23529
23786
  json_string: "JSON niz",
23530
23787
  e164: "E.164 \u0161tevilka",
23531
23788
  credit_card: "\u0161tevilka kreditne kartice",
23789
+ currency_code: "koda valute",
23790
+ iban: "IBAN",
23532
23791
  jwt: "JWT",
23533
23792
  template_literal: "vnos"
23534
23793
  };
@@ -23642,6 +23901,8 @@ var error49 = () => {
23642
23901
  json_string: "JSON-str\xE4ng",
23643
23902
  e164: "E.164-nummer",
23644
23903
  credit_card: "kreditkortsnummer",
23904
+ currency_code: "valutakod",
23905
+ iban: "IBAN",
23645
23906
  jwt: "JWT",
23646
23907
  template_literal: "mall-literal"
23647
23908
  };
@@ -23756,6 +24017,8 @@ var error50 = () => {
23756
24017
  json_string: "JSON \u0B9A\u0BB0\u0BAE\u0BCD",
23757
24018
  e164: "E.164 \u0B8E\u0BA3\u0BCD",
23758
24019
  credit_card: "\u0B95\u0B9F\u0BA9\u0BCD \u0B85\u0B9F\u0BCD\u0B9F\u0BC8 \u0B8E\u0BA3\u0BCD",
24020
+ currency_code: "\u0BA8\u0BBE\u0BA3\u0BAF\u0B95\u0BCD \u0B95\u0BC1\u0BB1\u0BBF\u0BAF\u0BC0\u0B9F\u0BC1",
24021
+ iban: "IBAN",
23759
24022
  jwt: "JWT",
23760
24023
  template_literal: "input"
23761
24024
  };
@@ -23829,23 +24092,23 @@ function ta_default() {
23829
24092
  };
23830
24093
  }
23831
24094
 
23832
- // node_modules/zod/v4/locales/th.js
24095
+ // node_modules/zod/v4/locales/tg.js
23833
24096
  var error51 = () => {
23834
24097
  const Sizable = {
23835
- string: { unit: "\u0E15\u0E31\u0E27\u0E2D\u0E31\u0E01\u0E29\u0E23", verb: "\u0E04\u0E27\u0E23\u0E21\u0E35" },
23836
- file: { unit: "\u0E44\u0E1A\u0E15\u0E4C", verb: "\u0E04\u0E27\u0E23\u0E21\u0E35" },
23837
- array: { unit: "\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23", verb: "\u0E04\u0E27\u0E23\u0E21\u0E35" },
23838
- set: { unit: "\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23", verb: "\u0E04\u0E27\u0E23\u0E21\u0E35" },
23839
- map: { unit: "\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23", verb: "\u0E04\u0E27\u0E23\u0E21\u0E35" }
24098
+ string: { unit: "\u0430\u043B\u043E\u043C\u0430\u0442", verb: "\u0434\u043E\u0448\u0442\u0430 \u0431\u043E\u0448\u0430\u0434" },
24099
+ file: { unit: "\u0431\u0430\u0439\u0442", verb: "\u0434\u043E\u0448\u0442\u0430 \u0431\u043E\u0448\u0430\u0434" },
24100
+ array: { unit: "\u0443\u043D\u0441\u0443\u0440", verb: "\u0434\u043E\u0448\u0442\u0430 \u0431\u043E\u0448\u0430\u0434" },
24101
+ set: { unit: "\u0443\u043D\u0441\u0443\u0440", verb: "\u0434\u043E\u0448\u0442\u0430 \u0431\u043E\u0448\u0430\u0434" },
24102
+ map: { unit: "\u0441\u0430\u0431\u0442", verb: "\u0434\u043E\u0448\u0442\u0430 \u0431\u043E\u0448\u0430\u0434" }
23840
24103
  };
23841
24104
  function getSizing(origin) {
23842
24105
  return Sizable[origin] ?? null;
23843
24106
  }
23844
24107
  const FormatDictionary = {
23845
- regex: "\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E17\u0E35\u0E48\u0E1B\u0E49\u0E2D\u0E19",
23846
- email: "\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48\u0E2D\u0E35\u0E40\u0E21\u0E25",
24108
+ regex: "\u0432\u0443\u0440\u0443\u0434",
24109
+ email: "\u0441\u0443\u0440\u043E\u0493\u0430\u0438 email",
23847
24110
  url: "URL",
23848
- emoji: "\u0E2D\u0E34\u0E42\u0E21\u0E08\u0E34",
24111
+ emoji: "\u044D\u043C\u043E\u04B7\u0438",
23849
24112
  uuid: "UUID",
23850
24113
  uuidv4: "UUIDv4",
23851
24114
  uuidv6: "UUIDv6",
@@ -23856,28 +24119,32 @@ var error51 = () => {
23856
24119
  ulid: "ULID",
23857
24120
  xid: "XID",
23858
24121
  ksuid: "KSUID",
23859
- datetime: "\u0E27\u0E31\u0E19\u0E17\u0E35\u0E48\u0E40\u0E27\u0E25\u0E32\u0E41\u0E1A\u0E1A ISO",
23860
- date: "\u0E27\u0E31\u0E19\u0E17\u0E35\u0E48\u0E41\u0E1A\u0E1A ISO",
23861
- time: "\u0E40\u0E27\u0E25\u0E32\u0E41\u0E1A\u0E1A ISO",
23862
- duration: "\u0E0A\u0E48\u0E27\u0E07\u0E40\u0E27\u0E25\u0E32\u0E41\u0E1A\u0E1A ISO",
23863
- ipv4: "\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48 IPv4",
23864
- ipv6: "\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48 IPv6",
23865
- mac: "\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48 MAC",
23866
- cidrv4: "\u0E0A\u0E48\u0E27\u0E07 IP \u0E41\u0E1A\u0E1A IPv4",
23867
- cidrv6: "\u0E0A\u0E48\u0E27\u0E07 IP \u0E41\u0E1A\u0E1A IPv6",
23868
- base64: "\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A Base64",
23869
- base64url: "\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A Base64 \u0E2A\u0E33\u0E2B\u0E23\u0E31\u0E1A URL",
23870
- json_string: "\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A JSON",
23871
- e164: "\u0E40\u0E1A\u0E2D\u0E23\u0E4C\u0E42\u0E17\u0E23\u0E28\u0E31\u0E1E\u0E17\u0E4C\u0E23\u0E30\u0E2B\u0E27\u0E48\u0E32\u0E07\u0E1B\u0E23\u0E30\u0E40\u0E17\u0E28 (E.164)",
23872
- credit_card: "\u0E2B\u0E21\u0E32\u0E22\u0E40\u0E25\u0E02\u0E1A\u0E31\u0E15\u0E23\u0E40\u0E04\u0E23\u0E14\u0E34\u0E15",
23873
- jwt: "\u0E42\u0E17\u0E40\u0E04\u0E19 JWT",
23874
- template_literal: "\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E17\u0E35\u0E48\u0E1B\u0E49\u0E2D\u0E19"
24122
+ datetime: "\u0441\u0430\u043D\u0430\u0432\u0443 \u0432\u0430\u049B\u0442\u0438 ISO",
24123
+ date: "\u0441\u0430\u043D\u0430\u0438 ISO",
24124
+ time: "\u0432\u0430\u049B\u0442\u0438 ISO",
24125
+ duration: "\u0434\u0430\u0432\u043E\u043C\u043D\u043E\u043A\u0438\u0438 ISO",
24126
+ ipv4: "\u0441\u0443\u0440\u043E\u0493\u0430\u0438 IPv4",
24127
+ ipv6: "\u0441\u0443\u0440\u043E\u0493\u0430\u0438 IPv6",
24128
+ mac: "\u0441\u0443\u0440\u043E\u0493\u0430\u0438 MAC",
24129
+ cidrv4: "\u043C\u0430\u04B3\u0434\u0443\u0434\u0430\u0438 IPv4",
24130
+ cidrv6: "\u043C\u0430\u04B3\u0434\u0443\u0434\u0430\u0438 IPv6",
24131
+ base64: "\u0441\u0430\u0442\u0440\u0438 \u0434\u0430\u0440 \u0444\u043E\u0440\u043C\u0430\u0442\u0438 base64",
24132
+ base64url: "\u0441\u0430\u0442\u0440\u0438 \u0434\u0430\u0440 \u0444\u043E\u0440\u043C\u0430\u0442\u0438 base64url",
24133
+ json_string: "\u0441\u0430\u0442\u0440\u0438 JSON",
24134
+ e164: "\u0440\u0430\u049B\u0430\u043C\u0438 E.164",
24135
+ credit_card: "\u0440\u0430\u049B\u0430\u043C\u0438 \u043A\u043E\u0440\u0442\u0438 \u043A\u0440\u0435\u0434\u0438\u0442\u04E3",
24136
+ currency_code: "\u0440\u0430\u043C\u0437\u0438 \u0430\u0441\u044A\u043E\u0440",
24137
+ iban: "IBAN",
24138
+ jwt: "JWT",
24139
+ template_literal: "\u0432\u0443\u0440\u0443\u0434"
23875
24140
  };
23876
24141
  const TypeDictionary = {
23877
24142
  nan: "NaN",
23878
- number: "\u0E15\u0E31\u0E27\u0E40\u0E25\u0E02",
23879
- array: "\u0E2D\u0E32\u0E23\u0E4C\u0E40\u0E23\u0E22\u0E4C (Array)",
23880
- null: "\u0E44\u0E21\u0E48\u0E21\u0E35\u0E04\u0E48\u0E32 (null)"
24143
+ number: "\u0440\u0430\u049B\u0430\u043C",
24144
+ string: "\u0441\u0430\u0442\u0440",
24145
+ array: "\u043C\u0430\u0441\u0441\u0438\u0432",
24146
+ object: "\u043E\u0431\u044A\u0435\u043A\u0442",
24147
+ date: "\u0441\u0430\u043D\u0430"
23881
24148
  };
23882
24149
  return (issue2) => {
23883
24150
  switch (issue2.code) {
@@ -23885,9 +24152,124 @@ var error51 = () => {
23885
24152
  const expected = TypeDictionary[issue2.expected] ?? issue2.expected;
23886
24153
  const receivedType = parsedType(issue2.input);
23887
24154
  const received = TypeDictionary[receivedType] ?? receivedType;
23888
- if (/^[A-Z]/.test(issue2.expected)) {
23889
- return `\u0E1B\u0E23\u0E30\u0E40\u0E20\u0E17\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19 instanceof ${issue2.expected} \u0E41\u0E15\u0E48\u0E44\u0E14\u0E49\u0E23\u0E31\u0E1A ${received}`;
23890
- }
24155
+ return `\u0412\u0443\u0440\u0443\u0434\u0438 \u043D\u043E\u0434\u0443\u0440\u0443\u0441\u0442: ${expected} \u0438\u043D\u0442\u0438\u0437\u043E\u0440 \u043C\u0435\u0440\u0430\u0444\u0442, ${received} \u0433\u0438\u0440\u0438\u0444\u0442\u0430 \u0448\u0443\u0434`;
24156
+ }
24157
+ case "invalid_value":
24158
+ if (issue2.values.length === 1)
24159
+ return `\u0412\u0443\u0440\u0443\u0434\u0438 \u043D\u043E\u0434\u0443\u0440\u0443\u0441\u0442: ${stringifyPrimitive(issue2.values[0])} \u0438\u043D\u0442\u0438\u0437\u043E\u0440 \u043C\u0435\u0440\u0430\u0444\u0442`;
24160
+ return `\u0418\u043D\u0442\u0438\u0445\u043E\u0431\u0438 \u043D\u043E\u0434\u0443\u0440\u0443\u0441\u0442: \u044F\u043A\u0435 \u0430\u0437 ${joinValues(issue2.values, "|")} \u0438\u043D\u0442\u0438\u0437\u043E\u0440 \u043C\u0435\u0440\u0430\u0444\u0442`;
24161
+ case "too_big": {
24162
+ const adj = issue2.inclusive ? "<=" : "<";
24163
+ const sizing = getSizing(issue2.origin);
24164
+ if (sizing)
24165
+ return `\u0425\u0435\u043B\u0435 \u043A\u0430\u043B\u043E\u043D: ${issue2.origin ?? "\u049B\u0438\u043C\u0430\u0442"} \u0431\u043E\u044F\u0434 ${adj}${issue2.maximum.toString()} ${sizing.unit} ${sizing.verb}`;
24166
+ return `\u0425\u0435\u043B\u0435 \u043A\u0430\u043B\u043E\u043D: ${issue2.origin ?? "\u049B\u0438\u043C\u0430\u0442"} \u0431\u043E\u044F\u0434 ${adj}${issue2.maximum.toString()} \u0431\u043E\u0448\u0430\u0434`;
24167
+ }
24168
+ case "too_small": {
24169
+ const adj = issue2.inclusive ? ">=" : ">";
24170
+ const sizing = getSizing(issue2.origin);
24171
+ if (sizing)
24172
+ return `\u0425\u0435\u043B\u0435 \u0445\u0443\u0440\u0434: ${issue2.origin} \u0431\u043E\u044F\u0434 ${adj}${issue2.minimum.toString()} ${sizing.unit} ${sizing.verb}`;
24173
+ return `\u0425\u0435\u043B\u0435 \u0445\u0443\u0440\u0434: ${issue2.origin} \u0431\u043E\u044F\u0434 ${adj}${issue2.minimum.toString()} \u0431\u043E\u0448\u0430\u0434`;
24174
+ }
24175
+ case "invalid_format": {
24176
+ const _issue = issue2;
24177
+ if (_issue.format === "starts_with")
24178
+ return `\u0421\u0430\u0442\u0440\u0438 \u043D\u043E\u0434\u0443\u0440\u0443\u0441\u0442: \u0431\u043E\u044F\u0434 \u0431\u043E "${_issue.prefix}" \u043E\u0493\u043E\u0437 \u0448\u0430\u0432\u0430\u0434`;
24179
+ if (_issue.format === "ends_with")
24180
+ return `\u0421\u0430\u0442\u0440\u0438 \u043D\u043E\u0434\u0443\u0440\u0443\u0441\u0442: \u0431\u043E\u044F\u0434 \u0431\u043E "${_issue.suffix}" \u0430\u043D\u04B7\u043E\u043C \u0451\u0431\u0430\u0434`;
24181
+ if (_issue.format === "includes")
24182
+ return `\u0421\u0430\u0442\u0440\u0438 \u043D\u043E\u0434\u0443\u0440\u0443\u0441\u0442: \u0431\u043E\u044F\u0434 "${_issue.includes}"-\u0440\u043E \u0434\u0430\u0440 \u0431\u0430\u0440 \u0433\u0438\u0440\u0430\u0434`;
24183
+ if (_issue.format === "regex")
24184
+ return `\u0421\u0430\u0442\u0440\u0438 \u043D\u043E\u0434\u0443\u0440\u0443\u0441\u0442: \u0431\u043E\u044F\u0434 \u0431\u0430 \u043D\u0430\u043C\u0443\u043D\u0430\u0438 ${_issue.pattern} \u043C\u0443\u0432\u043E\u0444\u0438\u049B\u0430\u0442 \u043A\u0443\u043D\u0430\u0434`;
24185
+ return `${FormatDictionary[_issue.format] ?? issue2.format}-\u0438 \u043D\u043E\u0434\u0443\u0440\u0443\u0441\u0442`;
24186
+ }
24187
+ case "not_multiple_of":
24188
+ return `\u0420\u0430\u049B\u0430\u043C\u0438 \u043D\u043E\u0434\u0443\u0440\u0443\u0441\u0442: \u0431\u043E\u044F\u0434 \u0431\u0430 ${issue2.divisor} \u0431\u0435 \u0431\u0430\u049B\u0438\u044F \u0442\u0430\u049B\u0441\u0438\u043C \u0448\u0430\u0432\u0430\u0434`;
24189
+ case "unrecognized_keys":
24190
+ return `\u041A\u0430\u043B\u0438\u0434${issue2.keys.length > 1 ? "\u04B3\u043E\u0438" : "\u0438"} \u043D\u043E\u043C\u0430\u044A\u043B\u0443\u043C: ${joinValues(issue2.keys, ", ")}`;
24191
+ case "invalid_key":
24192
+ return `\u041A\u0430\u043B\u0438\u0434\u0438 \u043D\u043E\u0434\u0443\u0440\u0443\u0441\u0442 \u0434\u0430\u0440 ${issue2.origin}`;
24193
+ case "invalid_union":
24194
+ if (issue2.options && Array.isArray(issue2.options) && issue2.options.length > 0) {
24195
+ const opts = issue2.options.map((o) => `'${o}'`).join(" | ");
24196
+ return `\u049A\u0438\u043C\u0430\u0442\u0438 \u043D\u043E\u0434\u0443\u0440\u0443\u0441\u0442\u0438 \u0434\u0438\u0441\u043A\u0440\u0438\u043C\u0438\u043D\u0430\u0442\u043E\u0440: ${opts} \u0438\u043D\u0442\u0438\u0437\u043E\u0440 \u043C\u0435\u0440\u0430\u0444\u0442`;
24197
+ }
24198
+ return "\u0412\u0443\u0440\u0443\u0434\u0438 \u043D\u043E\u0434\u0443\u0440\u0443\u0441\u0442";
24199
+ case "invalid_element":
24200
+ return `\u049A\u0438\u043C\u0430\u0442\u0438 \u043D\u043E\u0434\u0443\u0440\u0443\u0441\u0442 \u0434\u0430\u0440 ${issue2.origin}`;
24201
+ default:
24202
+ return `\u0412\u0443\u0440\u0443\u0434\u0438 \u043D\u043E\u0434\u0443\u0440\u0443\u0441\u0442`;
24203
+ }
24204
+ };
24205
+ };
24206
+ function tg_default() {
24207
+ return {
24208
+ localeError: error51()
24209
+ };
24210
+ }
24211
+
24212
+ // node_modules/zod/v4/locales/th.js
24213
+ var error52 = () => {
24214
+ const Sizable = {
24215
+ string: { unit: "\u0E15\u0E31\u0E27\u0E2D\u0E31\u0E01\u0E29\u0E23", verb: "\u0E04\u0E27\u0E23\u0E21\u0E35" },
24216
+ file: { unit: "\u0E44\u0E1A\u0E15\u0E4C", verb: "\u0E04\u0E27\u0E23\u0E21\u0E35" },
24217
+ array: { unit: "\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23", verb: "\u0E04\u0E27\u0E23\u0E21\u0E35" },
24218
+ set: { unit: "\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23", verb: "\u0E04\u0E27\u0E23\u0E21\u0E35" },
24219
+ map: { unit: "\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23", verb: "\u0E04\u0E27\u0E23\u0E21\u0E35" }
24220
+ };
24221
+ function getSizing(origin) {
24222
+ return Sizable[origin] ?? null;
24223
+ }
24224
+ const FormatDictionary = {
24225
+ regex: "\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E17\u0E35\u0E48\u0E1B\u0E49\u0E2D\u0E19",
24226
+ email: "\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48\u0E2D\u0E35\u0E40\u0E21\u0E25",
24227
+ url: "URL",
24228
+ emoji: "\u0E2D\u0E34\u0E42\u0E21\u0E08\u0E34",
24229
+ uuid: "UUID",
24230
+ uuidv4: "UUIDv4",
24231
+ uuidv6: "UUIDv6",
24232
+ nanoid: "nanoid",
24233
+ guid: "GUID",
24234
+ cuid: "cuid",
24235
+ cuid2: "cuid2",
24236
+ ulid: "ULID",
24237
+ xid: "XID",
24238
+ ksuid: "KSUID",
24239
+ datetime: "\u0E27\u0E31\u0E19\u0E17\u0E35\u0E48\u0E40\u0E27\u0E25\u0E32\u0E41\u0E1A\u0E1A ISO",
24240
+ date: "\u0E27\u0E31\u0E19\u0E17\u0E35\u0E48\u0E41\u0E1A\u0E1A ISO",
24241
+ time: "\u0E40\u0E27\u0E25\u0E32\u0E41\u0E1A\u0E1A ISO",
24242
+ duration: "\u0E0A\u0E48\u0E27\u0E07\u0E40\u0E27\u0E25\u0E32\u0E41\u0E1A\u0E1A ISO",
24243
+ ipv4: "\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48 IPv4",
24244
+ ipv6: "\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48 IPv6",
24245
+ mac: "\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48 MAC",
24246
+ cidrv4: "\u0E0A\u0E48\u0E27\u0E07 IP \u0E41\u0E1A\u0E1A IPv4",
24247
+ cidrv6: "\u0E0A\u0E48\u0E27\u0E07 IP \u0E41\u0E1A\u0E1A IPv6",
24248
+ base64: "\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A Base64",
24249
+ base64url: "\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A Base64 \u0E2A\u0E33\u0E2B\u0E23\u0E31\u0E1A URL",
24250
+ json_string: "\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A JSON",
24251
+ e164: "\u0E40\u0E1A\u0E2D\u0E23\u0E4C\u0E42\u0E17\u0E23\u0E28\u0E31\u0E1E\u0E17\u0E4C\u0E23\u0E30\u0E2B\u0E27\u0E48\u0E32\u0E07\u0E1B\u0E23\u0E30\u0E40\u0E17\u0E28 (E.164)",
24252
+ credit_card: "\u0E2B\u0E21\u0E32\u0E22\u0E40\u0E25\u0E02\u0E1A\u0E31\u0E15\u0E23\u0E40\u0E04\u0E23\u0E14\u0E34\u0E15",
24253
+ currency_code: "\u0E23\u0E2B\u0E31\u0E2A\u0E2A\u0E01\u0E38\u0E25\u0E40\u0E07\u0E34\u0E19",
24254
+ iban: "IBAN",
24255
+ jwt: "\u0E42\u0E17\u0E40\u0E04\u0E19 JWT",
24256
+ template_literal: "\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E17\u0E35\u0E48\u0E1B\u0E49\u0E2D\u0E19"
24257
+ };
24258
+ const TypeDictionary = {
24259
+ nan: "NaN",
24260
+ number: "\u0E15\u0E31\u0E27\u0E40\u0E25\u0E02",
24261
+ array: "\u0E2D\u0E32\u0E23\u0E4C\u0E40\u0E23\u0E22\u0E4C (Array)",
24262
+ null: "\u0E44\u0E21\u0E48\u0E21\u0E35\u0E04\u0E48\u0E32 (null)"
24263
+ };
24264
+ return (issue2) => {
24265
+ switch (issue2.code) {
24266
+ case "invalid_type": {
24267
+ const expected = TypeDictionary[issue2.expected] ?? issue2.expected;
24268
+ const receivedType = parsedType(issue2.input);
24269
+ const received = TypeDictionary[receivedType] ?? receivedType;
24270
+ if (/^[A-Z]/.test(issue2.expected)) {
24271
+ return `\u0E1B\u0E23\u0E30\u0E40\u0E20\u0E17\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19 instanceof ${issue2.expected} \u0E41\u0E15\u0E48\u0E44\u0E14\u0E49\u0E23\u0E31\u0E1A ${received}`;
24272
+ }
23891
24273
  return `\u0E1B\u0E23\u0E30\u0E40\u0E20\u0E17\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19 ${expected} \u0E41\u0E15\u0E48\u0E44\u0E14\u0E49\u0E23\u0E31\u0E1A ${received}`;
23892
24274
  }
23893
24275
  case "invalid_value":
@@ -23939,12 +24321,12 @@ var error51 = () => {
23939
24321
  };
23940
24322
  function th_default() {
23941
24323
  return {
23942
- localeError: error51()
24324
+ localeError: error52()
23943
24325
  };
23944
24326
  }
23945
24327
 
23946
24328
  // node_modules/zod/v4/locales/tk.js
23947
- var error52 = () => {
24329
+ var error53 = () => {
23948
24330
  const Sizable = {
23949
24331
  string: { unit: "simwol", verb: "bolmaly" },
23950
24332
  file: { unit: "ba\xFDt", verb: "bolmaly" },
@@ -23984,6 +24366,8 @@ var error52 = () => {
23984
24366
  json_string: "JSON setiri",
23985
24367
  e164: "E.164 nomeri",
23986
24368
  credit_card: "kredit kartyny\u0148 nomeri",
24369
+ currency_code: "wal\xFDuta kody",
24370
+ iban: "IBAN",
23987
24371
  jwt: "JWT",
23988
24372
  template_literal: "\u015Fablon"
23989
24373
  };
@@ -24045,12 +24429,12 @@ var error52 = () => {
24045
24429
  };
24046
24430
  function tk_default() {
24047
24431
  return {
24048
- localeError: error52()
24432
+ localeError: error53()
24049
24433
  };
24050
24434
  }
24051
24435
 
24052
24436
  // node_modules/zod/v4/locales/tr.js
24053
- var error53 = () => {
24437
+ var error54 = () => {
24054
24438
  const Sizable = {
24055
24439
  string: { unit: "karakter", verb: "olmal\u0131" },
24056
24440
  file: { unit: "bayt", verb: "olmal\u0131" },
@@ -24090,6 +24474,8 @@ var error53 = () => {
24090
24474
  json_string: "JSON dizesi",
24091
24475
  e164: "E.164 say\u0131s\u0131",
24092
24476
  credit_card: "kredi kart\u0131 numaras\u0131",
24477
+ currency_code: "para birimi kodu",
24478
+ iban: "IBAN",
24093
24479
  jwt: "JWT",
24094
24480
  template_literal: "\u015Eablon dizesi"
24095
24481
  };
@@ -24154,12 +24540,12 @@ var error53 = () => {
24154
24540
  };
24155
24541
  function tr_default() {
24156
24542
  return {
24157
- localeError: error53()
24543
+ localeError: error54()
24158
24544
  };
24159
24545
  }
24160
24546
 
24161
24547
  // node_modules/zod/v4/locales/uk.js
24162
- var error54 = () => {
24548
+ var error55 = () => {
24163
24549
  const Sizable = {
24164
24550
  string: { unit: "\u0441\u0438\u043C\u0432\u043E\u043B\u0456\u0432", verb: "\u043C\u0430\u0442\u0438\u043C\u0435" },
24165
24551
  file: { unit: "\u0431\u0430\u0439\u0442\u0456\u0432", verb: "\u043C\u0430\u0442\u0438\u043C\u0435" },
@@ -24199,6 +24585,8 @@ var error54 = () => {
24199
24585
  json_string: "\u0440\u044F\u0434\u043E\u043A JSON",
24200
24586
  e164: "\u043D\u043E\u043C\u0435\u0440 E.164",
24201
24587
  credit_card: "\u043D\u043E\u043C\u0435\u0440 \u043A\u0440\u0435\u0434\u0438\u0442\u043D\u043E\u0457 \u043A\u0430\u0440\u0442\u043A\u0438",
24588
+ currency_code: "\u043A\u043E\u0434 \u0432\u0430\u043B\u044E\u0442\u0438",
24589
+ iban: "IBAN",
24202
24590
  jwt: "JWT",
24203
24591
  template_literal: "\u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456"
24204
24592
  };
@@ -24266,7 +24654,7 @@ var error54 = () => {
24266
24654
  };
24267
24655
  function uk_default() {
24268
24656
  return {
24269
- localeError: error54()
24657
+ localeError: error55()
24270
24658
  };
24271
24659
  }
24272
24660
 
@@ -24276,7 +24664,7 @@ function ua_default() {
24276
24664
  }
24277
24665
 
24278
24666
  // node_modules/zod/v4/locales/ur.js
24279
- var error55 = () => {
24667
+ var error56 = () => {
24280
24668
  const Sizable = {
24281
24669
  string: { unit: "\u062D\u0631\u0648\u0641", verb: "\u06C1\u0648\u0646\u0627" },
24282
24670
  file: { unit: "\u0628\u0627\u0626\u0679\u0633", verb: "\u06C1\u0648\u0646\u0627" },
@@ -24316,6 +24704,8 @@ var error55 = () => {
24316
24704
  json_string: "\u062C\u06D2 \u0627\u06CC\u0633 \u0627\u0648 \u0627\u06CC\u0646 \u0633\u0679\u0631\u0646\u06AF",
24317
24705
  e164: "\u0627\u06CC 164 \u0646\u0645\u0628\u0631",
24318
24706
  credit_card: "\u06A9\u0631\u06CC\u0688\u0679 \u06A9\u0627\u0631\u0688 \u0646\u0645\u0628\u0631",
24707
+ currency_code: "\u06A9\u0631\u0646\u0633\u06CC \u06A9\u0648\u0688",
24708
+ iban: "IBAN",
24319
24709
  jwt: "\u062C\u06D2 \u0688\u0628\u0644\u06CC\u0648 \u0679\u06CC",
24320
24710
  template_literal: "\u0627\u0646 \u067E\u0679"
24321
24711
  };
@@ -24385,12 +24775,12 @@ var error55 = () => {
24385
24775
  };
24386
24776
  function ur_default() {
24387
24777
  return {
24388
- localeError: error55()
24778
+ localeError: error56()
24389
24779
  };
24390
24780
  }
24391
24781
 
24392
24782
  // node_modules/zod/v4/locales/uz.js
24393
- var error56 = () => {
24783
+ var error57 = () => {
24394
24784
  const Sizable = {
24395
24785
  string: { unit: "belgi", verb: "bo\u2018lishi kerak" },
24396
24786
  file: { unit: "bayt", verb: "bo\u2018lishi kerak" },
@@ -24430,6 +24820,8 @@ var error56 = () => {
24430
24820
  json_string: "JSON satr",
24431
24821
  e164: "E.164 raqam",
24432
24822
  credit_card: "kredit karta raqami",
24823
+ currency_code: "valyuta kodi",
24824
+ iban: "IBAN",
24433
24825
  jwt: "JWT",
24434
24826
  template_literal: "kirish"
24435
24827
  };
@@ -24497,12 +24889,12 @@ var error56 = () => {
24497
24889
  };
24498
24890
  function uz_default() {
24499
24891
  return {
24500
- localeError: error56()
24892
+ localeError: error57()
24501
24893
  };
24502
24894
  }
24503
24895
 
24504
24896
  // node_modules/zod/v4/locales/vi.js
24505
- var error57 = () => {
24897
+ var error58 = () => {
24506
24898
  const Sizable = {
24507
24899
  string: { unit: "k\xFD t\u1EF1", verb: "c\xF3" },
24508
24900
  file: { unit: "byte", verb: "c\xF3" },
@@ -24542,6 +24934,8 @@ var error57 = () => {
24542
24934
  json_string: "chu\u1ED7i JSON",
24543
24935
  e164: "s\u1ED1 E.164",
24544
24936
  credit_card: "s\u1ED1 th\u1EBB t\xEDn d\u1EE5ng",
24937
+ currency_code: "m\xE3 ti\u1EC1n t\u1EC7",
24938
+ iban: "IBAN",
24545
24939
  jwt: "JWT",
24546
24940
  template_literal: "\u0111\u1EA7u v\xE0o"
24547
24941
  };
@@ -24609,12 +25003,12 @@ var error57 = () => {
24609
25003
  };
24610
25004
  function vi_default() {
24611
25005
  return {
24612
- localeError: error57()
25006
+ localeError: error58()
24613
25007
  };
24614
25008
  }
24615
25009
 
24616
25010
  // node_modules/zod/v4/locales/zh-CN.js
24617
- var error58 = () => {
25011
+ var error59 = () => {
24618
25012
  const Sizable = {
24619
25013
  string: { unit: "\u5B57\u7B26", verb: "\u5305\u542B" },
24620
25014
  file: { unit: "\u5B57\u8282", verb: "\u5305\u542B" },
@@ -24654,6 +25048,8 @@ var error58 = () => {
24654
25048
  json_string: "JSON\u5B57\u7B26\u4E32",
24655
25049
  e164: "E.164\u53F7\u7801",
24656
25050
  credit_card: "\u4FE1\u7528\u5361\u53F7",
25051
+ currency_code: "\u8D27\u5E01\u4EE3\u7801",
25052
+ iban: "IBAN",
24657
25053
  jwt: "JWT",
24658
25054
  template_literal: "\u8F93\u5165"
24659
25055
  };
@@ -24722,12 +25118,12 @@ var error58 = () => {
24722
25118
  };
24723
25119
  function zh_CN_default() {
24724
25120
  return {
24725
- localeError: error58()
25121
+ localeError: error59()
24726
25122
  };
24727
25123
  }
24728
25124
 
24729
25125
  // node_modules/zod/v4/locales/zh-TW.js
24730
- var error59 = () => {
25126
+ var error60 = () => {
24731
25127
  const Sizable = {
24732
25128
  string: { unit: "\u5B57\u5143", verb: "\u64C1\u6709" },
24733
25129
  file: { unit: "\u4F4D\u5143\u7D44", verb: "\u64C1\u6709" },
@@ -24767,6 +25163,8 @@ var error59 = () => {
24767
25163
  json_string: "JSON \u5B57\u4E32",
24768
25164
  e164: "E.164 \u6578\u503C",
24769
25165
  credit_card: "\u4FE1\u7528\u5361\u865F",
25166
+ currency_code: "\u8CA8\u5E63\u4EE3\u78BC",
25167
+ iban: "IBAN",
24770
25168
  jwt: "JWT",
24771
25169
  template_literal: "\u8F38\u5165"
24772
25170
  };
@@ -24833,12 +25231,12 @@ var error59 = () => {
24833
25231
  };
24834
25232
  function zh_TW_default() {
24835
25233
  return {
24836
- localeError: error59()
25234
+ localeError: error60()
24837
25235
  };
24838
25236
  }
24839
25237
 
24840
25238
  // node_modules/zod/v4/locales/yo.js
24841
- var error60 = () => {
25239
+ var error61 = () => {
24842
25240
  const Sizable = {
24843
25241
  string: { unit: "\xE0mi", verb: "n\xED" },
24844
25242
  file: { unit: "bytes", verb: "n\xED" },
@@ -24878,6 +25276,8 @@ var error60 = () => {
24878
25276
  json_string: "\u1ECD\u0300r\u1ECD\u0300 JSON",
24879
25277
  e164: "n\u1ECD\u0301mb\xE0 E.164",
24880
25278
  credit_card: "n\u1ECDmba kaadi gbese",
25279
+ currency_code: "koodu ow\xF3",
25280
+ iban: "IBAN",
24881
25281
  jwt: "JWT",
24882
25282
  template_literal: "\u1EB9\u0300r\u1ECD \xECb\xE1w\u1ECDl\xE9"
24883
25283
  };
@@ -24944,7 +25344,7 @@ var error60 = () => {
24944
25344
  };
24945
25345
  function yo_default() {
24946
25346
  return {
24947
- localeError: error60()
25347
+ localeError: error61()
24948
25348
  };
24949
25349
  }
24950
25350
 
@@ -25024,31 +25424,8 @@ function compileValidator(schema, parser) {
25024
25424
  function compile(schema, options) {
25025
25425
  try {
25026
25426
  const parser = compileFn(schema);
25027
- const clone2 = clone(schema);
25028
- const liveRun = schema._zod.run;
25029
- const originalRun = liveRun.__originalRun ?? liveRun;
25030
- const wrapped = (payload, ctx) => {
25031
- if (ctx?.async || ctx?.direction === "backward" || ctx?.skipChecks || ctx?.[FALLBACK_FLAG]) {
25032
- return originalRun(payload, ctx);
25033
- }
25034
- if (ctx && isBackEdge(ctx, payload.value)) {
25035
- return originalRun(payload, ctx);
25036
- }
25037
- const out = parser(payload.value);
25038
- if (out !== INVALID) {
25039
- payload.value = out;
25040
- return payload;
25041
- }
25042
- if (ctx)
25043
- ctx[FALLBACK_FLAG] = true;
25044
- return originalRun(payload, ctx);
25045
- };
25046
- wrapped.__originalRun = originalRun;
25047
- clone2._zod.bag.fallbackRun = originalRun;
25427
+ const clone2 = withParser(schema, parser);
25048
25428
  clone2._zod.bag.validator = compileValidator(schema, parser);
25049
- clone2._zod.run = wrapped;
25050
- if (!liveRun.__originalRun)
25051
- installCompiledUserMethods(clone2, schema, parser);
25052
25429
  return clone2;
25053
25430
  } catch (err) {
25054
25431
  if (options?.strict)
@@ -25056,6 +25433,37 @@ function compile(schema, options) {
25056
25433
  return schema;
25057
25434
  }
25058
25435
  }
25436
+ function withParser(schema, parser) {
25437
+ if (isRecursiveSchema(schema)) {
25438
+ throw new ZodCompileUnsupportedError("a schema whose subtree contains a reference cycle");
25439
+ }
25440
+ const clone2 = clone(schema);
25441
+ const liveRun = schema._zod.run;
25442
+ const originalRun = liveRun.__originalRun ?? liveRun;
25443
+ const wrapped = (payload, ctx) => {
25444
+ if (ctx?.async || ctx?.direction === "backward" || ctx?.skipChecks || ctx?.[FALLBACK_FLAG]) {
25445
+ return originalRun(payload, ctx);
25446
+ }
25447
+ if (ctx && isBackEdge(ctx, payload.value)) {
25448
+ return originalRun(payload, ctx);
25449
+ }
25450
+ const out = parser(payload.value);
25451
+ if (out !== INVALID) {
25452
+ payload.value = out;
25453
+ return payload;
25454
+ }
25455
+ if (ctx)
25456
+ ctx[FALLBACK_FLAG] = true;
25457
+ return originalRun(payload, ctx);
25458
+ };
25459
+ wrapped.__originalRun = originalRun;
25460
+ clone2._zod.bag.fallbackRun = originalRun;
25461
+ clone2._zod.bag.validator = parser;
25462
+ clone2._zod.run = wrapped;
25463
+ if (!liveRun.__originalRun)
25464
+ installCompiledUserMethods(clone2, schema, parser);
25465
+ return clone2;
25466
+ }
25059
25467
  function installCompiledUserMethods(target, source, parser) {
25060
25468
  const targetAny = target;
25061
25469
  const sourceAny = source;
@@ -25092,7 +25500,8 @@ function compileFn(schema, options) {
25092
25500
  const ctx = {
25093
25501
  constants: /* @__PURE__ */ new Map(),
25094
25502
  constantCounter: 0,
25095
- varCounter: 0
25503
+ varCounter: 0,
25504
+ definite: true
25096
25505
  };
25097
25506
  const doc = new Doc(["input"]);
25098
25507
  const outputAccessor = generateCheck(doc, ctx, schema, "input", !options?.assertOnly);
@@ -25116,6 +25525,7 @@ ${code}
25116
25525
  if (options?.debug) {
25117
25526
  fn.code = fullCode;
25118
25527
  }
25528
+ fn.definite = ctx.definite;
25119
25529
  return fn;
25120
25530
  }
25121
25531
  function addConstant(ctx, value) {
@@ -25127,6 +25537,10 @@ function addConstant(ctx, value) {
25127
25537
  ctx.constants.set(name, value);
25128
25538
  return name;
25129
25539
  }
25540
+ function addUserConstant(ctx, fn) {
25541
+ ctx.definite = false;
25542
+ return addConstant(ctx, fn);
25543
+ }
25130
25544
  function newVar(ctx) {
25131
25545
  return `v${ctx.varCounter++}`;
25132
25546
  }
@@ -25159,6 +25573,7 @@ function compileChild(doc, ctx, schema, accessor, needsValue = true) {
25159
25573
  }
25160
25574
  }
25161
25575
  function emitRuntimeIsland(doc, ctx, schema, accessor) {
25576
+ ctx.definite = false;
25162
25577
  const schemaConst = addConstant(ctx, schema);
25163
25578
  const runConst = addConstant(ctx, runtimeRun);
25164
25579
  const outVar = newVar(ctx);
@@ -25239,6 +25654,9 @@ function generateChecks(doc, ctx, schema, accessor) {
25239
25654
  case "property":
25240
25655
  generatePropertyCheck(doc, ctx, def, currentAccessor);
25241
25656
  break;
25657
+ case "properties":
25658
+ generatePropertiesChecks(doc, ctx, def, currentAccessor);
25659
+ break;
25242
25660
  case "overwrite": {
25243
25661
  const newAccessor = newVar(ctx);
25244
25662
  generateOverwriteCheck(doc, ctx, check2, currentAccessor, newAccessor);
@@ -25347,6 +25765,19 @@ function generateMimeTypeCheck(doc, ctx, def, accessor) {
25347
25765
  doc.write(`if (!${mimeSet}.has(${accessor}.type)) return INVALID;`);
25348
25766
  }
25349
25767
  }
25768
+ function generatePropertiesChecks(doc, ctx, def, accessor) {
25769
+ if (def.when) {
25770
+ throw new ZodCompileUnsupportedError(`check with a custom "when" condition`);
25771
+ }
25772
+ doc.write(`if (${accessor} == null) return INVALID;`);
25773
+ const shape = def.shape;
25774
+ for (const key of Reflect.ownKeys(shape)) {
25775
+ const keyExpr = typeof key === "symbol" ? addConstant(ctx, key) : esc(key);
25776
+ const inputVar = newVar(ctx);
25777
+ doc.write(`const ${inputVar} = ${accessor}[${keyExpr}];`);
25778
+ compileChild(doc, ctx, shape[key], inputVar, false);
25779
+ }
25780
+ }
25350
25781
  function generatePropertyCheck(doc, ctx, def, accessor) {
25351
25782
  const propAccessor = `${accessor}[${JSON.stringify(def.property)}]`;
25352
25783
  generateCheck(doc, ctx, def.schema, propAccessor);
@@ -25374,7 +25805,7 @@ function generateCustomRefineCheck(doc, ctx, check2, accessor) {
25374
25805
  if (isAsyncFunction(def.fn)) {
25375
25806
  throw new ZodCompileAsyncError("z.compile: async .refine() predicates are not supported");
25376
25807
  }
25377
- const fnConst = addConstant(ctx, def.fn);
25808
+ const fnConst = addUserConstant(ctx, def.fn);
25378
25809
  const throwAsyncConst = addConstant(ctx, throwAsync);
25379
25810
  const resVar = newVar(ctx);
25380
25811
  doc.write(`const ${resVar} = ${fnConst}(${accessor});`);
@@ -25394,7 +25825,7 @@ function generateCustomRefineCheck(doc, ctx, check2, accessor) {
25394
25825
  throwAsync();
25395
25826
  return fakePayload.issues.length === 0 ? fakePayload.value : INVALID;
25396
25827
  };
25397
- const helperConst = addConstant(ctx, helperFn);
25828
+ const helperConst = addUserConstant(ctx, helperFn);
25398
25829
  const outVar = newVar(ctx);
25399
25830
  doc.write(`const ${outVar} = ${helperConst}(${accessor});`);
25400
25831
  doc.write(`if (${outVar} === INVALID) return INVALID;`);
@@ -25428,7 +25859,7 @@ var PATTERN_IS_COMPLETE = /* @__PURE__ */ new Set([
25428
25859
  "uuid",
25429
25860
  "xid"
25430
25861
  ]);
25431
- function generateStringFormatCheck(doc, ctx, def, accessor) {
25862
+ function generateStringFormatCheck(doc, ctx, def, accessor, needsValue = true) {
25432
25863
  const fmt = def.format;
25433
25864
  if (fmt === "base64") {
25434
25865
  const validator = addConstant(ctx, isValidBase64);
@@ -25461,9 +25892,14 @@ function generateStringFormatCheck(doc, ctx, def, accessor) {
25461
25892
  doc.write(`if (!${validator}(${accessor})) return INVALID;`);
25462
25893
  return accessor;
25463
25894
  }
25895
+ if (fmt === "iban") {
25896
+ const validator = addConstant(ctx, isValidIBAN);
25897
+ doc.write(`if (!${validator}(${accessor})) return INVALID;`);
25898
+ return accessor;
25899
+ }
25464
25900
  const formatDef = def;
25465
25901
  if (fmt === "url" || fmt === "httpurl" || formatDef.normalize || formatDef.hostname !== void 0 || formatDef.protocol !== void 0) {
25466
- const parseConst = addConstant(ctx, parseURLObject);
25902
+ const parseConst = addConstant(ctx, validateURL);
25467
25903
  const defConst = addConstant(ctx, def);
25468
25904
  const trimVar = newVar(ctx);
25469
25905
  const urlVar = newVar(ctx);
@@ -25478,6 +25914,8 @@ function generateStringFormatCheck(doc, ctx, def, accessor) {
25478
25914
  const protocolConst = addConstant(ctx, urlProtocolOk);
25479
25915
  doc.write(`if (!${protocolConst}(${urlVar}, ${defConst}.protocol)) return INVALID;`);
25480
25916
  }
25917
+ if (!needsValue)
25918
+ return null;
25481
25919
  const outputVar = newVar(ctx);
25482
25920
  const outputExpr = formatDef.normalize ? `${urlVar}.href` : `${addConstant(ctx, stripTabAndNewline)}(${trimVar})`;
25483
25921
  doc.write(`const ${outputVar} = ${outputExpr};`);
@@ -25537,7 +25975,7 @@ function generateCheck(doc, ctx, schema, accessor, needsValue = true) {
25537
25975
  let typeAccessor;
25538
25976
  switch (type) {
25539
25977
  case "string":
25540
- typeAccessor = generateStringCheck(doc, ctx, schema, accessor);
25978
+ typeAccessor = generateStringCheck(doc, ctx, schema, accessor, buildsValue);
25541
25979
  break;
25542
25980
  case "number":
25543
25981
  typeAccessor = generateNumberCheck(doc, schema, accessor);
@@ -25658,12 +26096,12 @@ function generateCheck(doc, ctx, schema, accessor, needsValue = true) {
25658
26096
  return null;
25659
26097
  return generateChecks(doc, ctx, schema, typeAccessor);
25660
26098
  }
25661
- function generateStringCheck(doc, ctx, schema, accessor) {
26099
+ function generateStringCheck(doc, ctx, schema, accessor, needsValue = true) {
25662
26100
  doc.write(`if (typeof ${accessor} !== "string") return INVALID;`);
25663
26101
  const def = schema._zod.def;
25664
26102
  if (def.format === void 0)
25665
26103
  return accessor;
25666
- return generateStringFormatCheck(doc, ctx, def, accessor);
26104
+ return generateStringFormatCheck(doc, ctx, def, accessor, needsValue);
25667
26105
  }
25668
26106
  function generateNumberCheck(doc, schema, accessor) {
25669
26107
  doc.write(`if (typeof ${accessor} !== "number" || !Number.isFinite(${accessor})) return INVALID;`);
@@ -25781,7 +26219,7 @@ function generateObjectCheck(doc, ctx, schema, accessor, buildsValue = true) {
25781
26219
  }
25782
26220
  }
25783
26221
  const outputVar = newVar(ctx);
25784
- const hasConditionalKeys = allKeys.some((k) => mayOutputUndefined(propShape[k]) || dropsWhenAbsent(propShape[k]));
26222
+ const hasConditionalKeys = allKeys.some((k) => mayOmitUndefined(propShape[k]) || dropsWhenAbsent(propShape[k]));
25785
26223
  if (!buildsValue) {
25786
26224
  if (unknownKeysMode === "schema") {
25787
26225
  const knownSet = keys.length > 0 ? addConstant(ctx, new Set(keys)) : null;
@@ -25808,7 +26246,7 @@ function generateObjectCheck(doc, ctx, schema, accessor, buildsValue = true) {
25808
26246
  const out = propOutputs.get(k);
25809
26247
  if (dropsWhenAbsent(propShape[k])) {
25810
26248
  doc.write(`if (${kx} in ${accessor}) ${outputVar}[${kx}] = ${out};`);
25811
- } else if (mayOutputUndefined(propShape[k])) {
26249
+ } else if (mayOmitUndefined(propShape[k])) {
25812
26250
  doc.write(`if (${out} !== undefined || ${kx} in ${accessor}) ${outputVar}[${kx}] = ${out};`);
25813
26251
  } else {
25814
26252
  doc.write(`${outputVar}[${kx}] = ${out};`);
@@ -25941,6 +26379,9 @@ function fastPathAcceptsAbsence(schema) {
25941
26379
  function dropsWhenAbsent(schema) {
25942
26380
  return schema._zod.optin === "optional" && schema._zod.optout === "optional";
25943
26381
  }
26382
+ function mayOmitUndefined(schema) {
26383
+ return (schema._zod.optin !== "defaulted" || schema._zod.optout === "optional") && mayOutputUndefined(schema);
26384
+ }
25944
26385
  function mayOutputUndefined(schema) {
25945
26386
  const def = schema._zod.def;
25946
26387
  switch (def.type) {
@@ -26283,6 +26724,7 @@ function literalEquality(ctx, accessor, value) {
26283
26724
  }
26284
26725
  function generateIntersectionCheck(doc, ctx, schema, accessor) {
26285
26726
  const def = schema._zod.def;
26727
+ ctx.definite = false;
26286
26728
  const leftOutput = compileChild(doc, ctx, def.left, accessor);
26287
26729
  const rightOutput = compileChild(doc, ctx, def.right, accessor);
26288
26730
  const mergeConst = addConstant(ctx, mergeValues);
@@ -26336,14 +26778,13 @@ function generateRecordCheck(doc, ctx, schema, accessor) {
26336
26778
  const keyIsBareString = keyDef.type === "string" && keyDef.format === void 0 && !keyDef.coerce && (keyDef.checks?.length ?? 0) === 0;
26337
26779
  if (!keyIsBareString) {
26338
26780
  const isLoose = def.mode === "loose";
26339
- const keyFast = addConstant(ctx, compileFn(def.keyType));
26781
+ const keyFn = compileFn(def.keyType);
26782
+ if (keyFn.definite === false)
26783
+ ctx.definite = false;
26784
+ const keyFast = addConstant(ctx, keyFn);
26340
26785
  const numericConst = addConstant(ctx, number);
26341
- const propIsEnumerableConst = addConstant(ctx, Object.prototype.propertyIsEnumerable);
26342
26786
  const outKeyVar = newVar(ctx);
26343
- doc.write(`for (const ${kVar} of Reflect.ownKeys(${accessor})) {`);
26344
- doc.indented((d) => {
26345
- d.write(`if (${kVar} === "__proto__") continue;`);
26346
- d.write(`if (!${propIsEnumerableConst}.call(${accessor}, ${kVar})) continue;`);
26787
+ emitOwnKeys(doc, ctx, accessor, kVar, (d) => {
26347
26788
  d.write(`let ${outKeyVar} = ${keyFast}(${kVar});`);
26348
26789
  d.write(`if (${outKeyVar} === INVALID && typeof ${kVar} === "string" && ${numericConst}.test(${kVar})) ${outKeyVar} = ${keyFast}(Number(${kVar}));`);
26349
26790
  if (isLoose) {
@@ -26357,21 +26798,39 @@ function generateRecordCheck(doc, ctx, schema, accessor) {
26357
26798
  const valOutput = compileChild(d, ctx, def.valueType, valueVar);
26358
26799
  d.write(`${outputVar}[${outKeyVar}] = ${valOutput};`);
26359
26800
  });
26360
- doc.write(`}`);
26361
26801
  return outputVar;
26362
26802
  }
26363
- const propIsEnumerable = addConstant(ctx, Object.prototype.propertyIsEnumerable);
26364
- doc.write(`for (const ${kVar} of Reflect.ownKeys(${accessor})) {`);
26365
- doc.indented((d) => {
26366
- d.write(`if (${kVar} === "__proto__") continue;`);
26367
- d.write(`if (!${propIsEnumerable}.call(${accessor}, ${kVar})) continue;`);
26368
- d.write(`if (typeof ${kVar} !== "string") return INVALID;`);
26803
+ emitOwnKeys(doc, ctx, accessor, kVar, (d) => {
26369
26804
  d.write(`const ${valVar} = ${accessor}[${kVar}];`);
26370
26805
  const valOutput = compileChild(d, ctx, def.valueType, valVar);
26371
26806
  d.write(`${outputVar}[${kVar}] = ${valOutput};`);
26807
+ }, `return INVALID;`);
26808
+ return outputVar;
26809
+ }
26810
+ function emitOwnKeys(doc, ctx, accessor, kVar, body, onSymbol) {
26811
+ const propIsEnumerableConst = addConstant(ctx, Object.prototype.propertyIsEnumerable);
26812
+ const symsVar = newVar(ctx);
26813
+ const keysVar = newVar(ctx);
26814
+ const iVar = newVar(ctx);
26815
+ doc.write(`const ${symsVar} = Object.getOwnPropertySymbols(${accessor});`);
26816
+ doc.write(`const ${keysVar} = Object.getOwnPropertyNames(${accessor});`);
26817
+ doc.write(`for (let ${iVar} = 0; ${iVar} < ${keysVar}.length; ${iVar}++) {`);
26818
+ doc.indented((d) => {
26819
+ d.write(`const ${kVar} = ${keysVar}[${iVar}];`);
26820
+ d.write(`if (${kVar} === "__proto__" || !${propIsEnumerableConst}.call(${accessor}, ${kVar})) continue;`);
26821
+ body(d);
26822
+ });
26823
+ doc.write(`}`);
26824
+ doc.write(`for (let ${iVar} = 0; ${iVar} < ${symsVar}.length; ${iVar}++) {`);
26825
+ doc.indented((d) => {
26826
+ d.write(`const ${kVar} = ${symsVar}[${iVar}];`);
26827
+ d.write(`if (!${propIsEnumerableConst}.call(${accessor}, ${kVar})) continue;`);
26828
+ if (onSymbol)
26829
+ d.write(onSymbol);
26830
+ else
26831
+ body(d);
26372
26832
  });
26373
26833
  doc.write(`}`);
26374
- return outputVar;
26375
26834
  }
26376
26835
  function literalPropertyKey(ctx, key) {
26377
26836
  if (typeof key === "string")
@@ -26424,7 +26883,7 @@ function generateTemplateLiteralCheck(doc, ctx, schema, accessor) {
26424
26883
  }
26425
26884
  function generateLazyCheck(doc, ctx, schema, accessor) {
26426
26885
  const def = schema._zod.def;
26427
- const getterConst = addConstant(ctx, def.getter);
26886
+ const getterConst = addUserConstant(ctx, def.getter);
26428
26887
  const cacheConst = addConstant(ctx, { parser: null });
26429
26888
  doc.write(`if (!${cacheConst}.parser) {`);
26430
26889
  doc.indented((d) => {
@@ -26457,7 +26916,7 @@ function generatePipeCheck(doc, ctx, schema, accessor) {
26457
26916
  return INVALID;
26458
26917
  return fakePayload.issues.length === 0 ? result : INVALID;
26459
26918
  };
26460
- const helperConst = addConstant(ctx, helperFn);
26919
+ const helperConst = addUserConstant(ctx, helperFn);
26461
26920
  const transformedVar = newVar(ctx);
26462
26921
  doc.write(`const ${transformedVar} = ${helperConst}(${inputOutput});`);
26463
26922
  doc.write(`if (${transformedVar} === INVALID) return INVALID;`);
@@ -26475,7 +26934,7 @@ function generateCustomCheck(doc, ctx, schema, accessor) {
26475
26934
  if (isAsyncFunction(def.fn)) {
26476
26935
  throw new ZodCompileAsyncError("z.compile: async custom predicates are not supported");
26477
26936
  }
26478
- const fnConst = addConstant(ctx, def.fn);
26937
+ const fnConst = addUserConstant(ctx, def.fn);
26479
26938
  const throwAsyncConst = addConstant(ctx, throwAsync);
26480
26939
  const resVar = newVar(ctx);
26481
26940
  doc.write(`const ${resVar} = ${fnConst}(${accessor});`);
@@ -26508,7 +26967,7 @@ function generateCatchCheck(doc, ctx, schema, accessor) {
26508
26967
  });
26509
26968
  doc.write(`})();`);
26510
26969
  const innerConst = addConstant(ctx, def.innerType);
26511
- const catchConst = addConstant(ctx, def.catchValue);
26970
+ const catchConst = addUserConstant(ctx, def.catchValue);
26512
26971
  const catchHelperConst = addConstant(ctx, runtimeCatch);
26513
26972
  doc.write(`if (${outputVar} === INVALID) {`);
26514
26973
  doc.indented((d) => {
@@ -26532,7 +26991,7 @@ function generateTransformCheck(doc, ctx, schema, accessor) {
26532
26991
  return INVALID;
26533
26992
  return fakePayload.issues.length === 0 ? result : INVALID;
26534
26993
  };
26535
- const helperConst = addConstant(ctx, helperFn);
26994
+ const helperConst = addUserConstant(ctx, helperFn);
26536
26995
  const outputVar = newVar(ctx);
26537
26996
  doc.write(`const ${outputVar} = ${helperConst}(${accessor});`);
26538
26997
  doc.write(`if (${outputVar} === INVALID) return INVALID;`);
@@ -26542,20 +27001,18 @@ function generateTransformCheck(doc, ctx, schema, accessor) {
26542
27001
  }
26543
27002
 
26544
27003
  // node_modules/zod/v4/core/api.js
27004
+ function snapshotChecks(def) {
27005
+ if (def.checks)
27006
+ def.checks = [...def.checks];
27007
+ return def;
27008
+ }
26545
27009
  // @__NO_SIDE_EFFECTS__
26546
27010
  function _string(Class2, params) {
26547
- return new Class2({
26548
- type: "string",
26549
- ...normalizeParams(params)
26550
- });
27011
+ return new Class2(snapshotChecks({ type: "string", ...normalizeParams(params) }));
26551
27012
  }
26552
27013
  // @__NO_SIDE_EFFECTS__
26553
27014
  function _coercedString(Class2, params) {
26554
- return new Class2({
26555
- type: "string",
26556
- coerce: true,
26557
- ...normalizeParams(params)
26558
- });
27015
+ return new Class2(snapshotChecks({ type: "string", coerce: true, ...normalizeParams(params) }));
26559
27016
  }
26560
27017
  // @__NO_SIDE_EFFECTS__
26561
27018
  function _email(Class2, params) {
@@ -26791,6 +27248,16 @@ function _creditCard(Class2, params) {
26791
27248
  });
26792
27249
  }
26793
27250
  // @__NO_SIDE_EFFECTS__
27251
+ function _iban(Class2, params) {
27252
+ return new Class2({
27253
+ type: "string",
27254
+ format: "iban",
27255
+ check: "string_format",
27256
+ abort: false,
27257
+ ...normalizeParams(params)
27258
+ });
27259
+ }
27260
+ // @__NO_SIDE_EFFECTS__
26794
27261
  function _jwt(Class2, params) {
26795
27262
  return new Class2({
26796
27263
  type: "string",
@@ -26849,20 +27316,11 @@ function _isoDuration(Class2, params) {
26849
27316
  }
26850
27317
  // @__NO_SIDE_EFFECTS__
26851
27318
  function _number(Class2, params) {
26852
- return new Class2({
26853
- type: "number",
26854
- checks: [],
26855
- ...normalizeParams(params)
26856
- });
27319
+ return new Class2(snapshotChecks({ type: "number", checks: [], ...normalizeParams(params) }));
26857
27320
  }
26858
27321
  // @__NO_SIDE_EFFECTS__
26859
27322
  function _coercedNumber(Class2, params) {
26860
- return new Class2({
26861
- type: "number",
26862
- coerce: true,
26863
- checks: [],
26864
- ...normalizeParams(params)
26865
- });
27323
+ return new Class2(snapshotChecks({ type: "number", coerce: true, checks: [], ...normalizeParams(params) }));
26866
27324
  }
26867
27325
  // @__NO_SIDE_EFFECTS__
26868
27326
  function _int(Class2, params) {
@@ -27204,8 +27662,12 @@ function _property(property, schema, params) {
27204
27662
  });
27205
27663
  }
27206
27664
  // @__NO_SIDE_EFFECTS__
27207
- function _properties(shape) {
27208
- return Object.entries(shape).map(([property, schema]) => new $ZodCheckProperty({ check: "property", property, schema }));
27665
+ function _properties(shape, params) {
27666
+ return new $ZodCheckProperties({
27667
+ check: "properties",
27668
+ shape,
27669
+ ...normalizeParams(params)
27670
+ });
27209
27671
  }
27210
27672
  // @__NO_SIDE_EFFECTS__
27211
27673
  function _mime(types, params) {
@@ -27642,7 +28104,7 @@ function handleUnrepresentable(schema, ctx, json2, params, message) {
27642
28104
  Object.assign(json2, result);
27643
28105
  return true;
27644
28106
  }
27645
- function process2(schema, ctx, _params = { path: [], schemaPath: [] }) {
28107
+ function processSchema(schema, ctx, _params = { path: [], schemaPath: [] }) {
27646
28108
  var _a3;
27647
28109
  const def = schema._zod.def;
27648
28110
  const seen = ctx.seen.get(schema);
@@ -27681,7 +28143,7 @@ function process2(schema, ctx, _params = { path: [], schemaPath: [] }) {
27681
28143
  if (parent) {
27682
28144
  if (!result.ref)
27683
28145
  result.ref = parent;
27684
- process2(parent, ctx, params);
28146
+ processSchema(parent, ctx, params);
27685
28147
  ctx.seen.get(parent).isParent = true;
27686
28148
  }
27687
28149
  }
@@ -27788,7 +28250,6 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
27788
28250
  if (seen.count > 1) {
27789
28251
  if (ctx.reused === "ref") {
27790
28252
  extractToDef(entry);
27791
- continue;
27792
28253
  }
27793
28254
  }
27794
28255
  }
@@ -28116,19 +28577,107 @@ function isTransforming(_schema, _ctx) {
28116
28577
  }
28117
28578
  var createToJSONSchemaMethod = (schema, processors = {}) => (params) => {
28118
28579
  const ctx = initializeContext({ ...params, processors });
28119
- process2(schema, ctx);
28580
+ processSchema(schema, ctx);
28120
28581
  extractDefs(ctx, schema);
28121
28582
  return finalize(ctx, schema);
28122
28583
  };
28123
28584
  var createStandardJSONSchemaMethod = (schema, io, processors = {}) => (params) => {
28124
28585
  const { libraryOptions, target } = params ?? {};
28125
28586
  const ctx = initializeContext({ ...libraryOptions ?? {}, target, io, processors });
28126
- process2(schema, ctx);
28587
+ processSchema(schema, ctx);
28127
28588
  extractDefs(ctx, schema);
28128
28589
  return finalize(ctx, schema);
28129
28590
  };
28130
28591
 
28131
28592
  // node_modules/zod/v4/core/json-schema-processors.js
28593
+ var narrowMin = (agg, key, value) => {
28594
+ if (agg[key] === void 0 || value > agg[key])
28595
+ agg[key] = value;
28596
+ };
28597
+ var narrowMax = (agg, key, value) => {
28598
+ if (agg[key] === void 0 || value < agg[key])
28599
+ agg[key] = value;
28600
+ };
28601
+ var narrowBoth = (agg, value) => {
28602
+ narrowMin(agg, "minimum", value);
28603
+ narrowMax(agg, "maximum", value);
28604
+ };
28605
+ var addDivisor = (agg, value) => {
28606
+ agg.multipleOf ?? (agg.multipleOf = []);
28607
+ if (!agg.multipleOf.includes(value))
28608
+ agg.multipleOf.push(value);
28609
+ };
28610
+ var addPattern = (agg, pattern) => {
28611
+ agg.patterns ?? (agg.patterns = /* @__PURE__ */ new Set());
28612
+ agg.patterns.add(pattern);
28613
+ };
28614
+ var intersectMime = (agg, mime) => {
28615
+ agg.mime = agg.mime ? agg.mime.filter((m) => mime.includes(m)) : [...mime];
28616
+ };
28617
+ var setFormat = (agg, format) => {
28618
+ agg.format = format;
28619
+ if (format.includes("int"))
28620
+ agg.isInt = true;
28621
+ };
28622
+ var minContributor = (agg, def) => narrowMin(agg, "minimum", def.minimum);
28623
+ var maxContributor = (agg, def) => narrowMax(agg, "maximum", def.maximum);
28624
+ var formatContributor = (ranges) => (agg, def) => {
28625
+ setFormat(agg, def.format);
28626
+ const [minimum, maximum] = ranges[def.format];
28627
+ narrowMin(agg, "minimum", minimum);
28628
+ narrowMax(agg, "maximum", maximum);
28629
+ };
28630
+ var contributors = {
28631
+ greater_than: (agg, def) => narrowMin(agg, def.inclusive ? "minimum" : "exclusiveMinimum", def.value),
28632
+ less_than: (agg, def) => narrowMax(agg, def.inclusive ? "maximum" : "exclusiveMaximum", def.value),
28633
+ multiple_of: (agg, def) => addDivisor(agg, def.value),
28634
+ number_format: formatContributor(NUMBER_FORMAT_RANGES),
28635
+ bigint_format: formatContributor(BIGINT_FORMAT_RANGES),
28636
+ min_length: minContributor,
28637
+ max_length: maxContributor,
28638
+ length_equals: (agg, def) => narrowBoth(agg, def.length),
28639
+ min_size: minContributor,
28640
+ max_size: maxContributor,
28641
+ size_equals: (agg, def) => narrowBoth(agg, def.size),
28642
+ string_format: (agg, def) => {
28643
+ setFormat(agg, def.format);
28644
+ if (def.pattern)
28645
+ addPattern(agg, def.pattern);
28646
+ if (def.format === "base64" || def.format === "base64url")
28647
+ agg.contentEncoding = def.format;
28648
+ if (def.local || def.precision === -1)
28649
+ agg.laxFormat = true;
28650
+ },
28651
+ mime_type: (agg, def) => intersectMime(agg, def.mime)
28652
+ };
28653
+ function aggregateChecks(schema) {
28654
+ const agg = {};
28655
+ const def = schema._zod.def;
28656
+ const list = schema._zod.traits.has("$ZodCheck") ? [schema, ...def.checks ?? []] : def.checks ?? [];
28657
+ for (const ch of list)
28658
+ contributors[ch._zod.def.check]?.(agg, ch._zod.def);
28659
+ const bag = schema._zod.bag;
28660
+ if (bag.minimum !== void 0)
28661
+ narrowMin(agg, "minimum", bag.minimum);
28662
+ if (bag.exclusiveMinimum !== void 0)
28663
+ narrowMin(agg, "exclusiveMinimum", bag.exclusiveMinimum);
28664
+ if (bag.maximum !== void 0)
28665
+ narrowMax(agg, "maximum", bag.maximum);
28666
+ if (bag.exclusiveMaximum !== void 0)
28667
+ narrowMax(agg, "exclusiveMaximum", bag.exclusiveMaximum);
28668
+ if (bag.multipleOf !== void 0)
28669
+ addDivisor(agg, bag.multipleOf);
28670
+ if (bag.format !== void 0) {
28671
+ agg.format ?? (agg.format = bag.format);
28672
+ if (bag.format.includes("int"))
28673
+ agg.isInt = true;
28674
+ }
28675
+ if (bag.mime)
28676
+ intersectMime(agg, bag.mime);
28677
+ for (const pattern of bag.patterns ?? [])
28678
+ addPattern(agg, pattern);
28679
+ return agg;
28680
+ }
28132
28681
  var formatMap = {
28133
28682
  guid: "uuid",
28134
28683
  url: "uri",
@@ -28137,10 +28686,15 @@ var formatMap = {
28137
28686
  regex: ""
28138
28687
  // do not set
28139
28688
  };
28689
+ var exactPatterns = /* @__PURE__ */ new Map([
28690
+ [base64Charset, base64],
28691
+ [base64urlCharset, base64url]
28692
+ ]);
28693
+ var exactPattern = (p) => exactPatterns.get(p) ?? p;
28140
28694
  var stringProcessor = (schema, ctx, _json, _params) => {
28141
28695
  const json2 = _json;
28142
28696
  json2.type = "string";
28143
- const { minimum, maximum, format, patterns, contentEncoding, laxFormat } = schema._zod.bag;
28697
+ const { minimum, maximum, format, patterns, contentEncoding, laxFormat } = aggregateChecks(schema);
28144
28698
  if (typeof minimum === "number")
28145
28699
  json2.minLength = minimum;
28146
28700
  if (typeof maximum === "number")
@@ -28156,7 +28710,7 @@ var stringProcessor = (schema, ctx, _json, _params) => {
28156
28710
  if (contentEncoding)
28157
28711
  json2.contentEncoding = contentEncoding;
28158
28712
  if (patterns && patterns.size > 0) {
28159
- const patternList = [...patterns];
28713
+ const patternList = [...patterns].map(exactPattern);
28160
28714
  if (patternList.length === 1)
28161
28715
  json2.pattern = patternList[0].source;
28162
28716
  else if (patternList.length > 1) {
@@ -28171,11 +28725,8 @@ var stringProcessor = (schema, ctx, _json, _params) => {
28171
28725
  };
28172
28726
  var numberProcessor = (schema, ctx, _json, params) => {
28173
28727
  const json2 = _json;
28174
- const { minimum, maximum, format, multipleOf, exclusiveMaximum, exclusiveMinimum } = schema._zod.bag;
28175
- if (typeof format === "string" && format.includes("int"))
28176
- json2.type = "integer";
28177
- else
28178
- json2.type = "number";
28728
+ const { minimum, maximum, multipleOf, exclusiveMaximum, exclusiveMinimum, isInt } = aggregateChecks(schema);
28729
+ json2.type = isInt ? "integer" : "number";
28179
28730
  const exMin = typeof exclusiveMinimum === "number" && exclusiveMinimum >= (minimum ?? Number.NEGATIVE_INFINITY);
28180
28731
  const exMax = typeof exclusiveMaximum === "number" && exclusiveMaximum <= (maximum ?? Number.POSITIVE_INFINITY);
28181
28732
  const legacy = ctx.target === "draft-04" || ctx.target === "openapi-3.0";
@@ -28199,11 +28750,19 @@ var numberProcessor = (schema, ctx, _json, params) => {
28199
28750
  } else if (typeof maximum === "number") {
28200
28751
  json2.maximum = maximum;
28201
28752
  }
28202
- if (typeof multipleOf === "number") {
28203
- if (Number.isFinite(multipleOf) && multipleOf !== 0)
28204
- json2.multipleOf = Math.abs(multipleOf);
28205
- else
28206
- handleUnrepresentable(schema, ctx, json2, params, `A multipleOf divisor of ${multipleOf} cannot be represented in JSON Schema`);
28753
+ if (multipleOf) {
28754
+ const divisors = /* @__PURE__ */ new Set();
28755
+ for (const divisor of multipleOf) {
28756
+ if (Number.isFinite(divisor) && divisor !== 0)
28757
+ divisors.add(Math.abs(divisor));
28758
+ else
28759
+ handleUnrepresentable(schema, ctx, json2, params, `A multipleOf divisor of ${divisor} cannot be represented in JSON Schema`);
28760
+ }
28761
+ const [first, ...rest] = divisors;
28762
+ if (first !== void 0)
28763
+ json2.multipleOf = first;
28764
+ if (rest.length)
28765
+ json2.allOf = [...json2.allOf ?? [], ...rest.map((m) => ({ multipleOf: m }))];
28207
28766
  }
28208
28767
  };
28209
28768
  var booleanProcessor = (_schema, _ctx, json2, _params) => {
@@ -28306,27 +28865,22 @@ var templateLiteralProcessor = (schema, _ctx, json2, _params) => {
28306
28865
  };
28307
28866
  var fileProcessor = (schema, _ctx, json2, _params) => {
28308
28867
  const _json = json2;
28309
- const file2 = {
28310
- type: "string",
28311
- format: "binary",
28312
- contentEncoding: "binary"
28313
- };
28314
- const { minimum, maximum, mime } = schema._zod.bag;
28868
+ _json.type = "string";
28869
+ _json.format = "binary";
28870
+ _json.contentEncoding = "binary";
28871
+ const { minimum, maximum, mime } = aggregateChecks(schema);
28315
28872
  if (minimum !== void 0)
28316
- file2.minLength = minimum;
28873
+ _json.minLength = minimum;
28317
28874
  if (maximum !== void 0)
28318
- file2.maxLength = maximum;
28319
- if (mime) {
28320
- if (mime.length === 1) {
28321
- file2.contentMediaType = mime[0];
28322
- Object.assign(_json, file2);
28323
- } else {
28324
- Object.assign(_json, file2);
28325
- _json.anyOf = mime.map((m) => ({ contentMediaType: m }));
28326
- }
28327
- } else {
28328
- Object.assign(_json, file2);
28329
- }
28875
+ _json.maxLength = maximum;
28876
+ if (!mime)
28877
+ return;
28878
+ if (mime.length === 0)
28879
+ _json.not = {};
28880
+ else if (mime.length === 1)
28881
+ _json.contentMediaType = mime[0];
28882
+ else
28883
+ _json.anyOf = mime.map((m) => ({ contentMediaType: m }));
28330
28884
  };
28331
28885
  var successProcessor = (_schema, _ctx, json2, _params) => {
28332
28886
  json2.type = "boolean";
@@ -28349,13 +28903,13 @@ var setProcessor = (schema, ctx, json2, params) => {
28349
28903
  var arrayProcessor = (schema, ctx, _json, params) => {
28350
28904
  const json2 = _json;
28351
28905
  const def = schema._zod.def;
28352
- const { minimum, maximum } = schema._zod.bag;
28906
+ const { minimum, maximum } = aggregateChecks(schema);
28353
28907
  if (typeof minimum === "number")
28354
28908
  json2.minItems = minimum;
28355
28909
  if (typeof maximum === "number")
28356
28910
  json2.maxItems = maximum;
28357
28911
  json2.type = "array";
28358
- json2.items = process2(def.element, ctx, {
28912
+ json2.items = processSchema(def.element, ctx, {
28359
28913
  ...params,
28360
28914
  path: [...params.path, "items"]
28361
28915
  });
@@ -28381,22 +28935,20 @@ var objectProcessor = (schema, ctx, _json, params) => {
28381
28935
  json2.type = "object";
28382
28936
  json2.properties = {};
28383
28937
  for (const key in shape) {
28384
- assignProp(json2.properties, key, process2(shape[key], ctx, {
28938
+ assignProp(json2.properties, key, processSchema(shape[key], ctx, {
28385
28939
  ...params,
28386
28940
  path: [...params.path, "properties", key]
28387
28941
  }));
28388
28942
  }
28389
- const allKeys = new Set(Object.keys(shape));
28390
- const requiredKeys = new Set([...allKeys].filter((key) => {
28943
+ const requiredKeys = [];
28944
+ for (const key of Object.keys(shape)) {
28391
28945
  const field = def.shape[key];
28392
- if (ctx.io === "input") {
28393
- return inputOptin(field) === void 0;
28394
- } else {
28395
- return field._zod.optout === void 0;
28946
+ if (ctx.io === "input" ? inputOptin(field) === void 0 : field._zod.optout === void 0) {
28947
+ requiredKeys.push(key);
28396
28948
  }
28397
- }));
28398
- if (requiredKeys.size > 0) {
28399
- json2.required = Array.from(requiredKeys);
28949
+ }
28950
+ if (requiredKeys.length > 0) {
28951
+ json2.required = requiredKeys;
28400
28952
  }
28401
28953
  if (def.catchall?._zod.def.type === "never") {
28402
28954
  json2.additionalProperties = false;
@@ -28404,7 +28956,7 @@ var objectProcessor = (schema, ctx, _json, params) => {
28404
28956
  if (ctx.io === "output")
28405
28957
  json2.additionalProperties = false;
28406
28958
  } else if (def.catchall) {
28407
- json2.additionalProperties = process2(def.catchall, ctx, {
28959
+ json2.additionalProperties = processSchema(def.catchall, ctx, {
28408
28960
  ...params,
28409
28961
  path: [...params.path, "additionalProperties"]
28410
28962
  });
@@ -28413,7 +28965,7 @@ var objectProcessor = (schema, ctx, _json, params) => {
28413
28965
  var unionProcessor = (schema, ctx, json2, params) => {
28414
28966
  const def = schema._zod.def;
28415
28967
  const isExclusive = def.inclusive === false;
28416
- const options = def.options.map((x, i) => process2(x, ctx, {
28968
+ const options = def.options.map((x, i) => processSchema(x, ctx, {
28417
28969
  ...params,
28418
28970
  path: [...params.path, isExclusive ? "oneOf" : "anyOf", i]
28419
28971
  }));
@@ -28425,11 +28977,11 @@ var unionProcessor = (schema, ctx, json2, params) => {
28425
28977
  };
28426
28978
  var intersectionProcessor = (schema, ctx, json2, params) => {
28427
28979
  const def = schema._zod.def;
28428
- const a = process2(def.left, ctx, {
28980
+ const a = processSchema(def.left, ctx, {
28429
28981
  ...params,
28430
28982
  path: [...params.path, "allOf", 0]
28431
28983
  });
28432
- const b = process2(def.right, ctx, {
28984
+ const b = processSchema(def.right, ctx, {
28433
28985
  ...params,
28434
28986
  path: [...params.path, "allOf", 1]
28435
28987
  });
@@ -28447,11 +28999,11 @@ var tupleProcessor = (schema, ctx, _json, params) => {
28447
28999
  json2.type = "array";
28448
29000
  const prefixPath = ctx.target === "draft-2020-12" ? "prefixItems" : "items";
28449
29001
  const restPath = ctx.target === "draft-2020-12" ? "items" : ctx.target === "openapi-3.0" ? "items" : "additionalItems";
28450
- const prefixItems = def.items.map((x, i) => process2(x, ctx, {
29002
+ const prefixItems = def.items.map((x, i) => processSchema(x, ctx, {
28451
29003
  ...params,
28452
29004
  path: [...params.path, prefixPath, i]
28453
29005
  }));
28454
- const rest = def.rest ? process2(def.rest, ctx, {
29006
+ const rest = def.rest ? processSchema(def.rest, ctx, {
28455
29007
  ...params,
28456
29008
  path: [...params.path, restPath, ...ctx.target === "openapi-3.0" ? [def.items.length] : []]
28457
29009
  }) : null;
@@ -28499,7 +29051,7 @@ var tupleProcessor = (schema, ctx, _json, params) => {
28499
29051
  if (isClosed)
28500
29052
  json2.maxItems = maxItems;
28501
29053
  }
28502
- const { minimum, maximum } = schema._zod.bag;
29054
+ const { minimum, maximum } = aggregateChecks(schema);
28503
29055
  if (typeof minimum === "number")
28504
29056
  json2.minItems = minimum;
28505
29057
  if (typeof maximum === "number")
@@ -28573,20 +29125,19 @@ var recordProcessor = (schema, ctx, _json, params) => {
28573
29125
  const def = schema._zod.def;
28574
29126
  json2.type = "object";
28575
29127
  const keyType = def.keyType;
28576
- const keyBag = keyType._zod.bag;
28577
- const patterns = keyBag?.patterns;
29128
+ const patterns = aggregateChecks(keyType).patterns;
28578
29129
  if (def.mode === "loose" && patterns && patterns.size > 0) {
28579
- const valueSchema = process2(def.valueType, ctx, {
29130
+ const valueSchema = processSchema(def.valueType, ctx, {
28580
29131
  ...params,
28581
29132
  path: [...params.path, "patternProperties", "*"]
28582
29133
  });
28583
29134
  json2.patternProperties = {};
28584
29135
  for (const pattern of patterns) {
28585
- assignProp(json2.patternProperties, pattern.source, valueSchema);
29136
+ assignProp(json2.patternProperties, exactPattern(pattern).source, valueSchema);
28586
29137
  }
28587
29138
  } else {
28588
29139
  if (ctx.target === "draft-07" || ctx.target === "draft-2020-12") {
28589
- json2.propertyNames = process2(def.keyType, ctx, {
29140
+ json2.propertyNames = processSchema(def.keyType, ctx, {
28590
29141
  ...params,
28591
29142
  path: [...params.path, "propertyNames"]
28592
29143
  });
@@ -28598,7 +29149,7 @@ var recordProcessor = (schema, ctx, _json, params) => {
28598
29149
  }
28599
29150
  pending.push(schema);
28600
29151
  }
28601
- json2.additionalProperties = process2(def.valueType, ctx, {
29152
+ json2.additionalProperties = processSchema(def.valueType, ctx, {
28602
29153
  ...params,
28603
29154
  path: [...params.path, "additionalProperties"]
28604
29155
  });
@@ -28614,7 +29165,7 @@ var recordProcessor = (schema, ctx, _json, params) => {
28614
29165
  };
28615
29166
  var nullableProcessor = (schema, ctx, json2, params) => {
28616
29167
  const def = schema._zod.def;
28617
- const inner = process2(def.innerType, ctx, params);
29168
+ const inner = processSchema(def.innerType, ctx, params);
28618
29169
  const seen = ctx.seen.get(schema);
28619
29170
  if (ctx.target === "openapi-3.0") {
28620
29171
  seen.ref = def.innerType;
@@ -28625,7 +29176,7 @@ var nullableProcessor = (schema, ctx, json2, params) => {
28625
29176
  };
28626
29177
  var nonoptionalProcessor = (schema, ctx, _json, params) => {
28627
29178
  const def = schema._zod.def;
28628
- process2(def.innerType, ctx, params);
29179
+ processSchema(def.innerType, ctx, params);
28629
29180
  const seen = ctx.seen.get(schema);
28630
29181
  seen.ref = def.innerType;
28631
29182
  };
@@ -28645,7 +29196,7 @@ function serializeDefaultValue(value, schema, ctx, json2, params) {
28645
29196
  }
28646
29197
  var defaultProcessor = (schema, ctx, json2, params) => {
28647
29198
  const def = schema._zod.def;
28648
- process2(def.innerType, ctx, params);
29199
+ processSchema(def.innerType, ctx, params);
28649
29200
  const seen = ctx.seen.get(schema);
28650
29201
  seen.ref = def.innerType;
28651
29202
  const value = serializeDefaultValue(def.defaultValue, schema, ctx, json2, params);
@@ -28654,7 +29205,7 @@ var defaultProcessor = (schema, ctx, json2, params) => {
28654
29205
  };
28655
29206
  var prefaultProcessor = (schema, ctx, json2, params) => {
28656
29207
  const def = schema._zod.def;
28657
- process2(def.innerType, ctx, params);
29208
+ processSchema(def.innerType, ctx, params);
28658
29209
  const seen = ctx.seen.get(schema);
28659
29210
  seen.ref = def.innerType;
28660
29211
  if (ctx.io !== "input")
@@ -28665,7 +29216,7 @@ var prefaultProcessor = (schema, ctx, json2, params) => {
28665
29216
  };
28666
29217
  var catchProcessor = (schema, ctx, json2, params) => {
28667
29218
  const def = schema._zod.def;
28668
- process2(def.innerType, ctx, params);
29219
+ processSchema(def.innerType, ctx, params);
28669
29220
  const seen = ctx.seen.get(schema);
28670
29221
  seen.ref = def.innerType;
28671
29222
  let catchValue;
@@ -28681,32 +29232,32 @@ var pipeProcessor = (schema, ctx, _json, params) => {
28681
29232
  const def = schema._zod.def;
28682
29233
  const inIsTransform = def.in._zod.traits.has("$ZodTransform");
28683
29234
  const innerType = ctx.io === "input" ? inIsTransform ? def.out : def.in : def.out;
28684
- process2(innerType, ctx, params);
29235
+ processSchema(innerType, ctx, params);
28685
29236
  const seen = ctx.seen.get(schema);
28686
29237
  seen.ref = innerType;
28687
29238
  };
28688
29239
  var readonlyProcessor = (schema, ctx, json2, params) => {
28689
29240
  const def = schema._zod.def;
28690
- process2(def.innerType, ctx, params);
29241
+ processSchema(def.innerType, ctx, params);
28691
29242
  const seen = ctx.seen.get(schema);
28692
29243
  seen.ref = def.innerType;
28693
29244
  json2.readOnly = true;
28694
29245
  };
28695
29246
  var promiseProcessor = (schema, ctx, _json, params) => {
28696
29247
  const def = schema._zod.def;
28697
- process2(def.innerType, ctx, params);
29248
+ processSchema(def.innerType, ctx, params);
28698
29249
  const seen = ctx.seen.get(schema);
28699
29250
  seen.ref = def.innerType;
28700
29251
  };
28701
29252
  var optionalProcessor = (schema, ctx, _json, params) => {
28702
29253
  const def = schema._zod.def;
28703
- process2(def.innerType, ctx, params);
29254
+ processSchema(def.innerType, ctx, params);
28704
29255
  const seen = ctx.seen.get(schema);
28705
29256
  seen.ref = def.innerType;
28706
29257
  };
28707
29258
  var lazyProcessor = (schema, ctx, _json, params) => {
28708
29259
  const innerType = schema._zod.innerType;
28709
- process2(innerType, ctx, params);
29260
+ processSchema(innerType, ctx, params);
28710
29261
  const seen = ctx.seen.get(schema);
28711
29262
  seen.ref = innerType;
28712
29263
  };
@@ -28758,7 +29309,7 @@ function toJSONSchema(input2, params) {
28758
29309
  const defs = {};
28759
29310
  for (const entry of registry2._idmap.entries()) {
28760
29311
  const [_, schema] = entry;
28761
- process2(schema, ctx2);
29312
+ processSchema(schema, ctx2);
28762
29313
  }
28763
29314
  const schemas = {};
28764
29315
  const external = {
@@ -28781,7 +29332,7 @@ function toJSONSchema(input2, params) {
28781
29332
  return { schemas };
28782
29333
  }
28783
29334
  const ctx = initializeContext({ ...params, processors: allProcessors });
28784
- process2(input2, ctx);
29335
+ processSchema(input2, ctx);
28785
29336
  extractDefs(ctx, input2);
28786
29337
  return finalize(ctx, input2);
28787
29338
  }
@@ -28840,7 +29391,7 @@ var JSONSchemaGenerator = class {
28840
29391
  * This must be called before emit().
28841
29392
  */
28842
29393
  process(schema, _params = { path: [], schemaPath: [] }) {
28843
- return process2(schema, this.ctx, _params);
29394
+ return processSchema(schema, this.ctx, _params);
28844
29395
  }
28845
29396
  /**
28846
29397
  * Emit the final JSON Schema after processing.
@@ -28897,12 +29448,14 @@ __export(schemas_exports2, {
28897
29448
  ZodFile: () => ZodFile,
28898
29449
  ZodFunction: () => ZodFunction,
28899
29450
  ZodGUID: () => ZodGUID,
29451
+ ZodIBAN: () => ZodIBAN,
28900
29452
  ZodIPv4: () => ZodIPv4,
28901
29453
  ZodIPv6: () => ZodIPv6,
28902
29454
  ZodISODate: () => ZodISODate,
28903
29455
  ZodISODateTime: () => ZodISODateTime,
28904
29456
  ZodISODuration: () => ZodISODuration,
28905
29457
  ZodISOTime: () => ZodISOTime,
29458
+ ZodInstanceOf: () => ZodInstanceOf,
28906
29459
  ZodIntersection: () => ZodIntersection,
28907
29460
  ZodJWT: () => ZodJWT,
28908
29461
  ZodKSUID: () => ZodKSUID,
@@ -28961,6 +29514,7 @@ __export(schemas_exports2, {
28961
29514
  creditCard: () => creditCard2,
28962
29515
  cuid: () => cuid3,
28963
29516
  cuid2: () => cuid22,
29517
+ currencyCode: () => currencyCode2,
28964
29518
  custom: () => custom,
28965
29519
  date: () => date2,
28966
29520
  describe: () => describe2,
@@ -28979,6 +29533,7 @@ __export(schemas_exports2, {
28979
29533
  hex: () => hex2,
28980
29534
  hostname: () => hostname2,
28981
29535
  httpUrl: () => httpUrl,
29536
+ iban: () => iban2,
28982
29537
  instanceof: () => _instanceof,
28983
29538
  int: () => int,
28984
29539
  int32: () => int32,
@@ -29281,6 +29836,12 @@ var ZodType = /* @__PURE__ */ $constructor("ZodType", (inst, def) => {
29281
29836
  set spa(value) {
29282
29837
  util_exports.own(this, "spa", value);
29283
29838
  },
29839
+ validate(data, params) {
29840
+ return validate(this, data, params);
29841
+ },
29842
+ validateAsync(data, params) {
29843
+ return validateAsync(this, data, params);
29844
+ },
29284
29845
  encode: function _encode2(data, params) {
29285
29846
  return encode2(this, data, params, { callee: _encode2 });
29286
29847
  },
@@ -29317,61 +29878,65 @@ var ZodType = /* @__PURE__ */ $constructor("ZodType", (inst, def) => {
29317
29878
  return this._zod.def;
29318
29879
  }
29319
29880
  });
29320
- var _ZodString = /* @__PURE__ */ $constructor("_ZodString", (inst, def) => {
29321
- $ZodString.init(inst, def);
29322
- ZodType.init(inst, def);
29323
- inst._zod.processJSONSchema = (ctx, json2, params) => stringProcessor(inst, ctx, json2, params);
29324
- const bag = inst._zod.bag;
29325
- inst.format = bag.format ?? null;
29326
- inst.minLength = bag.minimum ?? null;
29327
- inst.maxLength = bag.maximum ?? null;
29328
- }, {
29329
- regex(...args) {
29330
- return this.check(_regex(...args));
29331
- },
29332
- includes(...args) {
29333
- return this.check(_includes(...args));
29334
- },
29335
- startsWith(...args) {
29336
- return this.check(_startsWith(...args));
29337
- },
29338
- endsWith(...args) {
29339
- return this.check(_endsWith(...args));
29340
- },
29341
- min(...args) {
29342
- return this.check(_minLength(...args));
29881
+ var _ZodString = /* @__PURE__ */ $constructor(
29882
+ "_ZodString",
29883
+ (inst, def) => {
29884
+ $ZodString.init(inst, def);
29885
+ ZodType.init(inst, def);
29886
+ inst._zod.processJSONSchema = (ctx, json2, params) => stringProcessor(inst, ctx, json2, params);
29343
29887
  },
29344
- max(...args) {
29345
- return this.check(_maxLength(...args));
29346
- },
29347
- length(...args) {
29348
- return this.check(_length(...args));
29349
- },
29350
- nonempty(...args) {
29351
- return this.check(_minLength(1, ...args));
29352
- },
29353
- lowercase(params) {
29354
- return this.check(_lowercase(params));
29355
- },
29356
- uppercase(params) {
29357
- return this.check(_uppercase(params));
29358
- },
29359
- trim() {
29360
- return this.check(_trim());
29361
- },
29362
- normalize(...args) {
29363
- return this.check(_normalize(...args));
29364
- },
29365
- toLowerCase() {
29366
- return this.check(_toLowerCase());
29367
- },
29368
- toUpperCase() {
29369
- return this.check(_toUpperCase());
29370
- },
29371
- slugify() {
29372
- return this.check(_slugify());
29373
- }
29374
- });
29888
+ /* @__PURE__ */ util_exports.derived({
29889
+ format: (inst) => aggregateChecks(inst).format ?? null,
29890
+ minLength: (inst) => aggregateChecks(inst).minimum ?? null,
29891
+ maxLength: (inst) => aggregateChecks(inst).maximum ?? null
29892
+ }, {
29893
+ regex(...args) {
29894
+ return this.check(_regex(...args));
29895
+ },
29896
+ includes(...args) {
29897
+ return this.check(_includes(...args));
29898
+ },
29899
+ startsWith(...args) {
29900
+ return this.check(_startsWith(...args));
29901
+ },
29902
+ endsWith(...args) {
29903
+ return this.check(_endsWith(...args));
29904
+ },
29905
+ min(...args) {
29906
+ return this.check(_minLength(...args));
29907
+ },
29908
+ max(...args) {
29909
+ return this.check(_maxLength(...args));
29910
+ },
29911
+ length(...args) {
29912
+ return this.check(_length(...args));
29913
+ },
29914
+ nonempty(...args) {
29915
+ return this.check(_minLength(1, ...args));
29916
+ },
29917
+ lowercase(params) {
29918
+ return this.check(_lowercase(params));
29919
+ },
29920
+ uppercase(params) {
29921
+ return this.check(_uppercase(params));
29922
+ },
29923
+ trim() {
29924
+ return this.check(_trim());
29925
+ },
29926
+ normalize(...args) {
29927
+ return this.check(_normalize(...args));
29928
+ },
29929
+ toLowerCase() {
29930
+ return this.check(_toLowerCase());
29931
+ },
29932
+ toUpperCase() {
29933
+ return this.check(_toUpperCase());
29934
+ },
29935
+ slugify() {
29936
+ return this.check(_slugify());
29937
+ }
29938
+ })
29939
+ );
29375
29940
  var ZodString = /* @__PURE__ */ $constructor("ZodString", (inst, def) => {
29376
29941
  $ZodString.init(inst, def);
29377
29942
  _ZodString.init(inst, def);
@@ -29517,8 +30082,8 @@ function url(params) {
29517
30082
  }
29518
30083
  function httpUrl(params) {
29519
30084
  return _url(ZodURL, {
29520
- protocol: regexes_exports.httpProtocol,
29521
- hostname: regexes_exports.domain,
30085
+ protocol: httpProtocol,
30086
+ hostname: domain,
29522
30087
  ...util_exports.normalizeParams(params)
29523
30088
  });
29524
30089
  }
@@ -29634,6 +30199,13 @@ var ZodCreditCard = /* @__PURE__ */ $constructor("ZodCreditCard", (inst, def) =>
29634
30199
  function creditCard2(params) {
29635
30200
  return _creditCard(ZodCreditCard, params);
29636
30201
  }
30202
+ var ZodIBAN = /* @__PURE__ */ $constructor("ZodIBAN", (inst, def) => {
30203
+ $ZodIBAN.init(inst, def);
30204
+ ZodStringFormat.init(inst, def);
30205
+ });
30206
+ function iban2(params) {
30207
+ return _iban(ZodIBAN, params);
30208
+ }
29637
30209
  var ZodJWT = /* @__PURE__ */ $constructor("ZodJWT", (inst, def) => {
29638
30210
  $ZodJWT.init(inst, def);
29639
30211
  ZodStringFormat.init(inst, def);
@@ -29649,10 +30221,13 @@ function stringFormat(format, fnOrRegex, _params = {}) {
29649
30221
  return _stringFormat(ZodCustomStringFormat, format, fnOrRegex, _params);
29650
30222
  }
29651
30223
  function hostname2(_params) {
29652
- return _stringFormat(ZodCustomStringFormat, "hostname", regexes_exports.hostname, _params);
30224
+ return _stringFormat(ZodCustomStringFormat, "hostname", hostname, _params);
29653
30225
  }
29654
30226
  function hex2(_params) {
29655
- return _stringFormat(ZodCustomStringFormat, "hex", regexes_exports.hex, _params);
30227
+ return _stringFormat(ZodCustomStringFormat, "hex", hex, _params);
30228
+ }
30229
+ function currencyCode2(_params) {
30230
+ return _stringFormat(ZodCustomStringFormat, "currency_code", currencyCode, _params);
29656
30231
  }
29657
30232
  function hash(alg, params) {
29658
30233
  const enc = params?.enc ?? "hex";
@@ -29662,63 +30237,76 @@ function hash(alg, params) {
29662
30237
  throw new Error(`Unrecognized hash format: ${format}`);
29663
30238
  return _stringFormat(ZodCustomStringFormat, format, regex, params);
29664
30239
  }
29665
- var ZodNumber = /* @__PURE__ */ $constructor("ZodNumber", (inst, def) => {
29666
- $ZodNumber.init(inst, def);
29667
- ZodType.init(inst, def);
29668
- inst._zod.processJSONSchema = (ctx, json2, params) => numberProcessor(inst, ctx, json2, params);
29669
- const bag = inst._zod.bag;
29670
- inst.minValue = Math.max(bag.minimum ?? Number.NEGATIVE_INFINITY, bag.exclusiveMinimum ?? Number.NEGATIVE_INFINITY) ?? null;
29671
- inst.maxValue = Math.min(bag.maximum ?? Number.POSITIVE_INFINITY, bag.exclusiveMaximum ?? Number.POSITIVE_INFINITY) ?? null;
29672
- inst.isInt = (bag.format ?? "").includes("int") || Number.isSafeInteger(bag.multipleOf ?? 0.5);
29673
- inst.isFinite = true;
29674
- inst.format = bag.format ?? null;
29675
- }, {
29676
- gt(value, params) {
29677
- return this.check(_gt(value, params));
29678
- },
29679
- gte(value, params) {
29680
- return this.check(_gte(value, params));
29681
- },
29682
- min(value, params) {
29683
- return this.check(_gte(value, params));
29684
- },
29685
- lt(value, params) {
29686
- return this.check(_lt(value, params));
29687
- },
29688
- lte(value, params) {
29689
- return this.check(_lte(value, params));
29690
- },
29691
- max(value, params) {
29692
- return this.check(_lte(value, params));
29693
- },
29694
- int(params) {
29695
- return this.check(int(params));
29696
- },
29697
- safe(params) {
29698
- return this.check(int(params));
29699
- },
29700
- positive(params) {
29701
- return this.check(_gt(0, params));
30240
+ var ZodNumber = /* @__PURE__ */ $constructor(
30241
+ "ZodNumber",
30242
+ (inst, def) => {
30243
+ $ZodNumber.init(inst, def);
30244
+ ZodType.init(inst, def);
30245
+ inst._zod.processJSONSchema = (ctx, json2, params) => numberProcessor(inst, ctx, json2, params);
30246
+ inst.isFinite = true;
29702
30247
  },
29703
- nonnegative(params) {
29704
- return this.check(_gte(0, params));
29705
- },
29706
- negative(params) {
29707
- return this.check(_lt(0, params));
29708
- },
29709
- nonpositive(params) {
29710
- return this.check(_lte(0, params));
29711
- },
29712
- multipleOf(value, params) {
29713
- return this.check(_multipleOf(value, params));
29714
- },
29715
- step(value, params) {
29716
- return this.check(_multipleOf(value, params));
29717
- },
29718
- finite() {
29719
- return this;
29720
- }
29721
- });
30248
+ /* @__PURE__ */ util_exports.derived({
30249
+ minValue: (inst) => {
30250
+ const { minimum, exclusiveMinimum } = aggregateChecks(inst);
30251
+ return Math.max(minimum ?? Number.NEGATIVE_INFINITY, exclusiveMinimum ?? Number.NEGATIVE_INFINITY);
30252
+ },
30253
+ maxValue: (inst) => {
30254
+ const { maximum, exclusiveMaximum } = aggregateChecks(inst);
30255
+ return Math.min(maximum ?? Number.POSITIVE_INFINITY, exclusiveMaximum ?? Number.POSITIVE_INFINITY);
30256
+ },
30257
+ isInt: (inst) => {
30258
+ const { isInt, multipleOf } = aggregateChecks(inst);
30259
+ return !!isInt || !!multipleOf?.some(Number.isSafeInteger);
30260
+ },
30261
+ format: (inst) => aggregateChecks(inst).format ?? null
30262
+ }, {
30263
+ gt(value, params) {
30264
+ return this.check(_gt(value, params));
30265
+ },
30266
+ gte(value, params) {
30267
+ return this.check(_gte(value, params));
30268
+ },
30269
+ min(value, params) {
30270
+ return this.check(_gte(value, params));
30271
+ },
30272
+ lt(value, params) {
30273
+ return this.check(_lt(value, params));
30274
+ },
30275
+ lte(value, params) {
30276
+ return this.check(_lte(value, params));
30277
+ },
30278
+ max(value, params) {
30279
+ return this.check(_lte(value, params));
30280
+ },
30281
+ int(params) {
30282
+ return this.check(int(params));
30283
+ },
30284
+ safe(params) {
30285
+ return this.check(int(params));
30286
+ },
30287
+ positive(params) {
30288
+ return this.check(_gt(0, params));
30289
+ },
30290
+ nonnegative(params) {
30291
+ return this.check(_gte(0, params));
30292
+ },
30293
+ negative(params) {
30294
+ return this.check(_lt(0, params));
30295
+ },
30296
+ nonpositive(params) {
30297
+ return this.check(_lte(0, params));
30298
+ },
30299
+ multipleOf(value, params) {
30300
+ return this.check(_multipleOf(value, params));
30301
+ },
30302
+ step(value, params) {
30303
+ return this.check(_multipleOf(value, params));
30304
+ },
30305
+ finite() {
30306
+ return this;
30307
+ }
30308
+ })
30309
+ );
29722
30310
  function number2(params) {
29723
30311
  return _number(ZodNumber, params);
29724
30312
  }
@@ -29749,49 +30337,53 @@ var ZodBoolean = /* @__PURE__ */ $constructor("ZodBoolean", (inst, def) => {
29749
30337
  function boolean2(params) {
29750
30338
  return _boolean(ZodBoolean, params);
29751
30339
  }
29752
- var ZodBigInt = /* @__PURE__ */ $constructor("ZodBigInt", (inst, def) => {
29753
- $ZodBigInt.init(inst, def);
29754
- ZodType.init(inst, def);
29755
- inst._zod.processJSONSchema = (ctx, json2, params) => bigintProcessor(inst, ctx, json2, params);
29756
- const bag = inst._zod.bag;
29757
- inst.minValue = bag.minimum ?? null;
29758
- inst.maxValue = bag.maximum ?? null;
29759
- inst.format = bag.format ?? null;
29760
- }, {
29761
- gte(value, params) {
29762
- return this.check(_gte(value, params));
29763
- },
29764
- min(value, params) {
29765
- return this.check(_gte(value, params));
29766
- },
29767
- gt(value, params) {
29768
- return this.check(_gt(value, params));
29769
- },
29770
- lt(value, params) {
29771
- return this.check(_lt(value, params));
29772
- },
29773
- lte(value, params) {
29774
- return this.check(_lte(value, params));
30340
+ var ZodBigInt = /* @__PURE__ */ $constructor(
30341
+ "ZodBigInt",
30342
+ (inst, def) => {
30343
+ $ZodBigInt.init(inst, def);
30344
+ ZodType.init(inst, def);
30345
+ inst._zod.processJSONSchema = (ctx, json2, params) => bigintProcessor(inst, ctx, json2, params);
29775
30346
  },
29776
- max(value, params) {
29777
- return this.check(_lte(value, params));
29778
- },
29779
- positive(params) {
29780
- return this.check(_gt(BigInt(0), params));
29781
- },
29782
- negative(params) {
29783
- return this.check(_lt(BigInt(0), params));
29784
- },
29785
- nonpositive(params) {
29786
- return this.check(_lte(BigInt(0), params));
29787
- },
29788
- nonnegative(params) {
29789
- return this.check(_gte(BigInt(0), params));
29790
- },
29791
- multipleOf(value, params) {
29792
- return this.check(_multipleOf(value, params));
29793
- }
29794
- });
30347
+ /* @__PURE__ */ util_exports.derived({
30348
+ minValue: (inst) => aggregateChecks(inst).minimum ?? null,
30349
+ maxValue: (inst) => aggregateChecks(inst).maximum ?? null,
30350
+ format: (inst) => aggregateChecks(inst).format ?? null
30351
+ }, {
30352
+ gte(value, params) {
30353
+ return this.check(_gte(value, params));
30354
+ },
30355
+ min(value, params) {
30356
+ return this.check(_gte(value, params));
30357
+ },
30358
+ gt(value, params) {
30359
+ return this.check(_gt(value, params));
30360
+ },
30361
+ lt(value, params) {
30362
+ return this.check(_lt(value, params));
30363
+ },
30364
+ lte(value, params) {
30365
+ return this.check(_lte(value, params));
30366
+ },
30367
+ max(value, params) {
30368
+ return this.check(_lte(value, params));
30369
+ },
30370
+ positive(params) {
30371
+ return this.check(_gt(BigInt(0), params));
30372
+ },
30373
+ negative(params) {
30374
+ return this.check(_lt(BigInt(0), params));
30375
+ },
30376
+ nonpositive(params) {
30377
+ return this.check(_lte(BigInt(0), params));
30378
+ },
30379
+ nonnegative(params) {
30380
+ return this.check(_gte(BigInt(0), params));
30381
+ },
30382
+ multipleOf(value, params) {
30383
+ return this.check(_multipleOf(value, params));
30384
+ }
30385
+ })
30386
+ );
29795
30387
  function bigint2(params) {
29796
30388
  return _bigint(ZodBigInt, params);
29797
30389
  }
@@ -29861,16 +30453,26 @@ var ZodVoid = /* @__PURE__ */ $constructor("ZodVoid", (inst, def) => {
29861
30453
  function _void2(params) {
29862
30454
  return _void(ZodVoid, params);
29863
30455
  }
29864
- var ZodDate = /* @__PURE__ */ $constructor("ZodDate", (inst, def) => {
29865
- $ZodDate.init(inst, def);
29866
- ZodType.init(inst, def);
29867
- inst._zod.processJSONSchema = (ctx, json2, params) => dateProcessor(inst, ctx, json2, params);
29868
- inst.min = (value, params) => inst.check(_gte(value, params));
29869
- inst.max = (value, params) => inst.check(_lte(value, params));
29870
- const c = inst._zod.bag;
29871
- inst.minDate = c.minimum ? new Date(c.minimum) : null;
29872
- inst.maxDate = c.maximum ? new Date(c.maximum) : null;
29873
- });
30456
+ var ZodDate = /* @__PURE__ */ $constructor(
30457
+ "ZodDate",
30458
+ (inst, def) => {
30459
+ $ZodDate.init(inst, def);
30460
+ ZodType.init(inst, def);
30461
+ inst._zod.processJSONSchema = (ctx, json2, params) => dateProcessor(inst, ctx, json2, params);
30462
+ inst.min = (value, params) => inst.check(_gte(value, params));
30463
+ inst.max = (value, params) => inst.check(_lte(value, params));
30464
+ },
30465
+ /* @__PURE__ */ util_exports.derived({
30466
+ minDate: (inst) => {
30467
+ const { minimum } = aggregateChecks(inst);
30468
+ return minimum ? new Date(minimum) : null;
30469
+ },
30470
+ maxDate: (inst) => {
30471
+ const { maximum } = aggregateChecks(inst);
30472
+ return maximum ? new Date(maximum) : null;
30473
+ }
30474
+ }, {})
30475
+ );
29874
30476
  function date2(params) {
29875
30477
  return _date(ZodDate, params);
29876
30478
  }
@@ -29915,19 +30517,19 @@ var ZodObject = /* @__PURE__ */ $constructor("ZodObject", (inst, def) => {
29915
30517
  return _enum2(Object.keys(this._zod.def.shape));
29916
30518
  },
29917
30519
  catchall(catchall) {
29918
- return this.clone({ ...this._zod.def, catchall });
30520
+ return this.clone(util_exports.mergeDefs(this._zod.def, { catchall }));
29919
30521
  },
29920
30522
  passthrough() {
29921
- return this.clone({ ...this._zod.def, catchall: unknown() });
30523
+ return this.clone(util_exports.mergeDefs(this._zod.def, { catchall: unknown() }));
29922
30524
  },
29923
30525
  loose() {
29924
- return this.clone({ ...this._zod.def, catchall: unknown() });
30526
+ return this.clone(util_exports.mergeDefs(this._zod.def, { catchall: unknown() }));
29925
30527
  },
29926
30528
  strict() {
29927
- return this.clone({ ...this._zod.def, catchall: never() });
30529
+ return this.clone(util_exports.mergeDefs(this._zod.def, { catchall: never() }));
29928
30530
  },
29929
30531
  strip() {
29930
- return this.clone({ ...this._zod.def, catchall: void 0 });
30532
+ return this.clone(util_exports.mergeDefs(this._zod.def, { catchall: void 0 }));
29931
30533
  },
29932
30534
  extend(incoming) {
29933
30535
  return util_exports.extend(this, incoming);
@@ -30146,7 +30748,7 @@ var ZodEnum = /* @__PURE__ */ $constructor("ZodEnum", (inst, def) => {
30146
30748
  ZodType.init(inst, def);
30147
30749
  inst._zod.processJSONSchema = (ctx, json2, params) => enumProcessor(inst, ctx, json2, params);
30148
30750
  inst.enum = def.entries;
30149
- inst.options = Object.values(def.entries);
30751
+ inst.options = [...inst._zod.values];
30150
30752
  const keys = new Set(Object.keys(def.entries));
30151
30753
  inst.extract = (values, params) => {
30152
30754
  const newEntries = {};
@@ -30509,8 +31111,15 @@ function superRefine(fn, params) {
30509
31111
  }
30510
31112
  var describe2 = describe;
30511
31113
  var meta2 = meta;
31114
+ var ZodInstanceOf = /* @__PURE__ */ $constructor("ZodInstanceOf", (inst, def) => {
31115
+ ZodCustom.init(inst, def);
31116
+ }, {
31117
+ properties(shape, params) {
31118
+ return this.check(_properties(shape, params));
31119
+ }
31120
+ });
30512
31121
  function _instanceof(cls, params = {}) {
30513
- const inst = new ZodCustom({
31122
+ const inst = new ZodInstanceOf({
30514
31123
  type: "custom",
30515
31124
  check: "custom",
30516
31125
  fn: (data) => data instanceof cls,
@@ -30715,27 +31324,188 @@ function resolveRef(ref, ctx) {
30715
31324
  }
30716
31325
  throw new Error(`Reference not found: ${ref}`);
30717
31326
  }
30718
- function checkPropertyNames(objectSchema, keySchema) {
31327
+ function checkObjectGuards(objectSchema, guards) {
30719
31328
  const guard = z.transform((value) => value).check((payload) => {
30720
31329
  const value = payload.value;
30721
31330
  if (typeof value !== "object" || value === null || Array.isArray(value))
30722
31331
  return;
30723
- for (const key of Object.getOwnPropertyNames(value)) {
30724
- const result = keySchema.safeParse(key);
30725
- if (result.success)
30726
- continue;
31332
+ const keys = Object.getOwnPropertyNames(value);
31333
+ if (guards.minProperties !== void 0 && keys.length < guards.minProperties) {
30727
31334
  payload.issues.push({
30728
- code: "invalid_key",
30729
- origin: "record",
30730
- issues: result.error.issues,
30731
- input: key,
30732
- path: [key],
31335
+ origin: "object",
31336
+ code: "too_small",
31337
+ minimum: guards.minProperties,
31338
+ inclusive: true,
31339
+ message: `Too small: expected object to have >=${guards.minProperties} properties`,
31340
+ input: value,
31341
+ inst: objectSchema,
31342
+ continue: true
31343
+ });
31344
+ }
31345
+ if (guards.maxProperties !== void 0 && keys.length > guards.maxProperties) {
31346
+ payload.issues.push({
31347
+ origin: "object",
31348
+ code: "too_big",
31349
+ maximum: guards.maxProperties,
31350
+ inclusive: true,
31351
+ message: `Too big: expected object to have <=${guards.maxProperties} properties`,
31352
+ input: value,
31353
+ inst: objectSchema,
30733
31354
  continue: true
30734
31355
  });
30735
31356
  }
31357
+ if (guards.keySchema) {
31358
+ for (const key of keys) {
31359
+ const result = guards.keySchema.safeParse(key);
31360
+ if (result.success)
31361
+ continue;
31362
+ payload.issues.push({
31363
+ code: "invalid_key",
31364
+ origin: "record",
31365
+ issues: result.error.issues,
31366
+ input: key,
31367
+ path: [key],
31368
+ continue: true
31369
+ });
31370
+ }
31371
+ }
30736
31372
  });
30737
31373
  return guard.pipe(objectSchema);
30738
31374
  }
31375
+ function canonicalKey(value, seen) {
31376
+ if (value === null)
31377
+ return "z";
31378
+ const type = typeof value;
31379
+ if (type !== "object") {
31380
+ if (type === "number" && Number.isNaN(value))
31381
+ return null;
31382
+ const raw = String(value);
31383
+ return `${type[0]}${raw.length}:${raw}`;
31384
+ }
31385
+ if (seen.has(value))
31386
+ return null;
31387
+ seen.add(value);
31388
+ try {
31389
+ if (Array.isArray(value)) {
31390
+ const parts2 = [];
31391
+ for (const item of value) {
31392
+ const key = canonicalKey(item, seen);
31393
+ if (key === null)
31394
+ return null;
31395
+ parts2.push(key);
31396
+ }
31397
+ return `a${parts2.length}:[${parts2.join(",")}]`;
31398
+ }
31399
+ const keys = Object.keys(value).sort();
31400
+ const parts = [];
31401
+ for (const k of keys) {
31402
+ const key = canonicalKey(value[k], seen);
31403
+ if (key === null)
31404
+ return null;
31405
+ parts.push(`${k.length}:${k}=${key}`);
31406
+ }
31407
+ return `o${parts.length}:{${parts.join(",")}}`;
31408
+ } finally {
31409
+ seen.delete(value);
31410
+ }
31411
+ }
31412
+ var SCHEMA_KEYWORDS = /* @__PURE__ */ new Set([
31413
+ "items",
31414
+ "prefixItems",
31415
+ "additionalItems",
31416
+ "additionalProperties",
31417
+ "contains",
31418
+ "propertyNames",
31419
+ "not",
31420
+ "if",
31421
+ "then",
31422
+ "else",
31423
+ "allOf",
31424
+ "anyOf",
31425
+ "oneOf",
31426
+ "unevaluatedItems",
31427
+ "unevaluatedProperties",
31428
+ "contentSchema"
31429
+ ]);
31430
+ var SCHEMA_MAP_KEYWORDS = /* @__PURE__ */ new Set([
31431
+ "properties",
31432
+ "patternProperties",
31433
+ "dependentSchemas",
31434
+ "dependencies",
31435
+ "$defs",
31436
+ "definitions"
31437
+ ]);
31438
+ function containsRef(value) {
31439
+ if (typeof value !== "object" || value === null)
31440
+ return false;
31441
+ if (Array.isArray(value))
31442
+ return value.some(containsRef);
31443
+ if (typeof value.$ref === "string")
31444
+ return true;
31445
+ return Object.entries(value).some(([key, sub]) => {
31446
+ if (SCHEMA_KEYWORDS.has(key))
31447
+ return containsRef(sub);
31448
+ if (!SCHEMA_MAP_KEYWORDS.has(key) || typeof sub !== "object" || sub === null)
31449
+ return false;
31450
+ return Object.values(sub).some(containsRef);
31451
+ });
31452
+ }
31453
+ function plural(n) {
31454
+ return n === 1 ? "element" : "elements";
31455
+ }
31456
+ function checkArrayGuards(arraySchema, guards) {
31457
+ const guard = z.transform((value) => value).check((payload) => {
31458
+ const items = payload.value;
31459
+ if (!Array.isArray(items))
31460
+ return;
31461
+ if (guards.uniqueItems === true) {
31462
+ const firstSeen = /* @__PURE__ */ new Map();
31463
+ for (let i = 0; i < items.length; i++) {
31464
+ const key = canonicalKey(items[i], /* @__PURE__ */ new Set());
31465
+ if (key === null)
31466
+ continue;
31467
+ const first = firstSeen.get(key);
31468
+ if (first === void 0) {
31469
+ firstSeen.set(key, i);
31470
+ continue;
31471
+ }
31472
+ payload.issues.push({
31473
+ code: "custom",
31474
+ message: `Array items must be unique: element at index ${i} duplicates the one at index ${first}`,
31475
+ input: items,
31476
+ path: [i],
31477
+ continue: true
31478
+ });
31479
+ }
31480
+ }
31481
+ if (guards.containsSchema) {
31482
+ const minContains = guards.minContains ?? 1;
31483
+ const ceiling = guards.maxContains !== void 0 ? guards.maxContains + 1 : Number.POSITIVE_INFINITY;
31484
+ let matches = 0;
31485
+ for (const item of items) {
31486
+ if (guards.containsSchema.safeParse(item).success && ++matches >= ceiling)
31487
+ break;
31488
+ }
31489
+ if (matches < minContains) {
31490
+ payload.issues.push({
31491
+ code: "custom",
31492
+ message: `Array must contain at least ${minContains} matching ${plural(minContains)}; found ${matches}`,
31493
+ input: items,
31494
+ continue: true
31495
+ });
31496
+ }
31497
+ if (guards.maxContains !== void 0 && matches > guards.maxContains) {
31498
+ payload.issues.push({
31499
+ code: "custom",
31500
+ message: `Array must contain at most ${guards.maxContains} matching ${plural(guards.maxContains)}`,
31501
+ input: items,
31502
+ continue: true
31503
+ });
31504
+ }
31505
+ }
31506
+ });
31507
+ return guard.pipe(arraySchema);
31508
+ }
30739
31509
  function getTupleRest(restSchema, ctx) {
30740
31510
  if (restSchema === false) {
30741
31511
  return void 0;
@@ -30865,6 +31635,8 @@ function convertBaseSchema(schema, ctx) {
30865
31635
  stringSchema = stringSchema.check(z.e164());
30866
31636
  } else if (format === "credit_card") {
30867
31637
  stringSchema = stringSchema.check(z.creditCard());
31638
+ } else if (format === "iban") {
31639
+ stringSchema = stringSchema.check(z.iban());
30868
31640
  } else if (format === "jwt") {
30869
31641
  stringSchema = stringSchema.check(z.jwt());
30870
31642
  } else if (format === "emoji") {
@@ -30997,9 +31769,16 @@ function convertBaseSchema(schema, ctx) {
30997
31769
  zodSchema = objectSchema.passthrough();
30998
31770
  }
30999
31771
  }
31000
- if (schema.propertyNames !== void 0 && schema.propertyNames !== true) {
31001
- const keyJSONSchema = typeof schema.propertyNames === "object" && schema.propertyNames.type === void 0 ? { type: "string", ...schema.propertyNames } : schema.propertyNames;
31002
- zodSchema = checkPropertyNames(zodSchema, convertSchema(keyJSONSchema, ctx));
31772
+ const hasKeyGuard = schema.propertyNames !== void 0 && schema.propertyNames !== true;
31773
+ const minProperties = typeof schema.minProperties === "number" ? schema.minProperties : void 0;
31774
+ const maxProperties = typeof schema.maxProperties === "number" ? schema.maxProperties : void 0;
31775
+ if (hasKeyGuard || minProperties !== void 0 || maxProperties !== void 0) {
31776
+ let keySchema;
31777
+ if (hasKeyGuard) {
31778
+ const keyJSONSchema = typeof schema.propertyNames === "object" && schema.propertyNames.type === void 0 ? { type: "string", ...schema.propertyNames } : schema.propertyNames;
31779
+ keySchema = convertSchema(keyJSONSchema, ctx);
31780
+ }
31781
+ zodSchema = checkObjectGuards(zodSchema, { keySchema, minProperties, maxProperties });
31003
31782
  }
31004
31783
  break;
31005
31784
  }
@@ -31045,6 +31824,14 @@ function convertBaseSchema(schema, ctx) {
31045
31824
  } else {
31046
31825
  zodSchema = z.array(z.any());
31047
31826
  }
31827
+ if (schema.uniqueItems === true || schema.contains !== void 0) {
31828
+ zodSchema = checkArrayGuards(zodSchema, {
31829
+ uniqueItems: schema.uniqueItems === true,
31830
+ containsSchema: schema.contains !== void 0 ? convertSchema(schema.contains, ctx) : void 0,
31831
+ minContains: typeof schema.minContains === "number" ? schema.minContains : void 0,
31832
+ maxContains: typeof schema.maxContains === "number" ? schema.maxContains : void 0
31833
+ });
31834
+ }
31048
31835
  break;
31049
31836
  }
31050
31837
  default:
@@ -31102,8 +31889,23 @@ function convertSchema(schema, ctx) {
31102
31889
  extraMeta[key] = schema[key];
31103
31890
  }
31104
31891
  }
31105
- if (schema.propertyNames !== void 0 && schema.type === "object" && schema.$ref === void 0) {
31106
- extraMeta.propertyNames = schema.propertyNames;
31892
+ if (schema.type === "object" && schema.$ref === void 0) {
31893
+ if (schema.propertyNames !== void 0 && !containsRef(schema.propertyNames)) {
31894
+ extraMeta.propertyNames = schema.propertyNames;
31895
+ }
31896
+ for (const key of ["minProperties", "maxProperties"]) {
31897
+ if (schema[key] !== void 0)
31898
+ extraMeta[key] = schema[key];
31899
+ }
31900
+ }
31901
+ if (schema.type === "array" && schema.$ref === void 0) {
31902
+ if (schema.contains !== void 0 && !containsRef(schema.contains)) {
31903
+ extraMeta.contains = schema.contains;
31904
+ }
31905
+ for (const key of ["uniqueItems", "minContains", "maxContains"]) {
31906
+ if (schema[key] !== void 0)
31907
+ extraMeta[key] = schema[key];
31908
+ }
31107
31909
  }
31108
31910
  for (const key of Object.keys(schema)) {
31109
31911
  if (!RECOGNIZED_KEYS.has(key)) {