@glasstrace/sdk 1.11.0 → 1.12.0

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.
Files changed (74) hide show
  1. package/README.md +20 -3
  2. package/dist/async-context/index.cjs +1189 -440
  3. package/dist/async-context/index.cjs.map +1 -1
  4. package/dist/async-context/index.js +2 -2
  5. package/dist/{capture-error-BeuEXXJO.d.cts → capture-error-CRQSqKgd.d.cts} +2 -2
  6. package/dist/{capture-error-D02pzB7q.d.ts → capture-error-CqCbjoMq.d.ts} +2 -2
  7. package/dist/{chunk-OXM2BZMF.js → chunk-4YRYR32D.js} +2 -2
  8. package/dist/{chunk-XG6WR2KS.js → chunk-6NKMAKMI.js} +3 -3
  9. package/dist/{chunk-6RKS3DNA.js → chunk-BN5DVIUO.js} +1176 -424
  10. package/dist/chunk-BN5DVIUO.js.map +1 -0
  11. package/dist/{chunk-DQFGNX3H.js → chunk-CZQN6G4I.js} +21 -20
  12. package/dist/chunk-CZQN6G4I.js.map +1 -0
  13. package/dist/{chunk-D54FMQHF.js → chunk-FFNGE5RR.js} +2 -2
  14. package/dist/{chunk-RL43PU2X.js → chunk-J3ZCVE67.js} +2 -2
  15. package/dist/{chunk-BSVWJSVX.js → chunk-KBHGPQZ2.js} +2 -2
  16. package/dist/{chunk-M5GO2SSO.js → chunk-M3ZTG4P5.js} +2 -2
  17. package/dist/{chunk-FQ4SEG6Y.js → chunk-V75ZB4G4.js} +3 -3
  18. package/dist/{chunk-QVTONMVZ.js → chunk-ZIL2IY4C.js} +2 -2
  19. package/dist/cli/init.cjs +1266 -497
  20. package/dist/cli/init.cjs.map +1 -1
  21. package/dist/cli/init.js +7 -7
  22. package/dist/cli/mcp-add.cjs +1171 -425
  23. package/dist/cli/mcp-add.cjs.map +1 -1
  24. package/dist/cli/mcp-add.js +3 -3
  25. package/dist/cli/uninit.js +3 -3
  26. package/dist/cli/upgrade-instructions.cjs +1 -1
  27. package/dist/cli/upgrade-instructions.js +3 -3
  28. package/dist/cli/validate.cjs +1168 -422
  29. package/dist/cli/validate.cjs.map +1 -1
  30. package/dist/cli/validate.js +2 -2
  31. package/dist/{correlation-id-NAapJ5jn.d.cts → correlation-id-CFpyJsKv.d.cts} +1 -1
  32. package/dist/{correlation-id-B_K8adD6.d.ts → correlation-id-DPXyY9-3.d.ts} +1 -1
  33. package/dist/edge-entry.cjs +1197 -448
  34. package/dist/edge-entry.cjs.map +1 -1
  35. package/dist/edge-entry.d.cts +2 -2
  36. package/dist/edge-entry.d.ts +2 -2
  37. package/dist/edge-entry.js +4 -4
  38. package/dist/index.cjs +1335 -552
  39. package/dist/index.cjs.map +1 -1
  40. package/dist/{index.d-CkTf_boH.d.ts → index.d-D-jdiIPU.d.cts} +1 -1
  41. package/dist/{index.d-CkTf_boH.d.cts → index.d-D-jdiIPU.d.ts} +1 -1
  42. package/dist/index.d.cts +4 -4
  43. package/dist/index.d.ts +4 -4
  44. package/dist/index.js +13 -6
  45. package/dist/index.js.map +1 -1
  46. package/dist/middleware/index.cjs +1192 -443
  47. package/dist/middleware/index.cjs.map +1 -1
  48. package/dist/middleware/index.js +2 -2
  49. package/dist/node-entry.cjs +1323 -550
  50. package/dist/node-entry.cjs.map +1 -1
  51. package/dist/node-entry.d.cts +3 -3
  52. package/dist/node-entry.d.ts +3 -3
  53. package/dist/node-entry.js +7 -7
  54. package/dist/node-subpath.cjs +1168 -422
  55. package/dist/node-subpath.cjs.map +1 -1
  56. package/dist/node-subpath.d.cts +1 -1
  57. package/dist/node-subpath.d.ts +1 -1
  58. package/dist/node-subpath.js +3 -3
  59. package/dist/{source-map-uploader-CLYCE2TZ.js → source-map-uploader-K67LTPBG.js} +3 -3
  60. package/dist/trpc/index.cjs +1187 -438
  61. package/dist/trpc/index.cjs.map +1 -1
  62. package/dist/trpc/index.js +1 -1
  63. package/package.json +2 -2
  64. package/dist/chunk-6RKS3DNA.js.map +0 -1
  65. package/dist/chunk-DQFGNX3H.js.map +0 -1
  66. /package/dist/{chunk-OXM2BZMF.js.map → chunk-4YRYR32D.js.map} +0 -0
  67. /package/dist/{chunk-XG6WR2KS.js.map → chunk-6NKMAKMI.js.map} +0 -0
  68. /package/dist/{chunk-D54FMQHF.js.map → chunk-FFNGE5RR.js.map} +0 -0
  69. /package/dist/{chunk-RL43PU2X.js.map → chunk-J3ZCVE67.js.map} +0 -0
  70. /package/dist/{chunk-BSVWJSVX.js.map → chunk-KBHGPQZ2.js.map} +0 -0
  71. /package/dist/{chunk-M5GO2SSO.js.map → chunk-M3ZTG4P5.js.map} +0 -0
  72. /package/dist/{chunk-FQ4SEG6Y.js.map → chunk-V75ZB4G4.js.map} +0 -0
  73. /package/dist/{chunk-QVTONMVZ.js.map → chunk-ZIL2IY4C.js.map} +0 -0
  74. /package/dist/{source-map-uploader-CLYCE2TZ.js.map → source-map-uploader-K67LTPBG.js.map} +0 -0
@@ -98,8 +98,8 @@ var major = VERSION.split(".")[0];
98
98
  var GLOBAL_OPENTELEMETRY_API_KEY = /* @__PURE__ */ Symbol.for(`opentelemetry.js.api.${major}`);
99
99
  var _global = typeof globalThis === "object" ? globalThis : typeof self === "object" ? self : typeof window === "object" ? window : typeof global === "object" ? global : {};
100
100
  function registerGlobal(type, instance, diag, allowOverride = false) {
101
- var _a2;
102
- const api = _global[GLOBAL_OPENTELEMETRY_API_KEY] = (_a2 = _global[GLOBAL_OPENTELEMETRY_API_KEY]) !== null && _a2 !== void 0 ? _a2 : {
101
+ var _a3;
102
+ const api = _global[GLOBAL_OPENTELEMETRY_API_KEY] = (_a3 = _global[GLOBAL_OPENTELEMETRY_API_KEY]) !== null && _a3 !== void 0 ? _a3 : {
103
103
  version: VERSION
104
104
  };
105
105
  if (!allowOverride && api[type]) {
@@ -117,8 +117,8 @@ function registerGlobal(type, instance, diag, allowOverride = false) {
117
117
  return true;
118
118
  }
119
119
  function getGlobal(type) {
120
- var _a2, _b;
121
- const globalVersion = (_a2 = _global[GLOBAL_OPENTELEMETRY_API_KEY]) === null || _a2 === void 0 ? void 0 : _a2.version;
120
+ var _a3, _b;
121
+ const globalVersion = (_a3 = _global[GLOBAL_OPENTELEMETRY_API_KEY]) === null || _a3 === void 0 ? void 0 : _a3.version;
122
122
  if (!globalVersion || !isCompatible(globalVersion)) {
123
123
  return;
124
124
  }
@@ -223,10 +223,10 @@ var DiagAPI = class _DiagAPI {
223
223
  }
224
224
  const self2 = this;
225
225
  const setLogger = (logger, optionsOrLogLevel = { logLevel: DiagLogLevel.INFO }) => {
226
- var _a2, _b, _c;
226
+ var _a3, _b, _c;
227
227
  if (logger === self2) {
228
228
  const err = new Error("Cannot use diag as the logger for itself. Please use a DiagLogger implementation like ConsoleDiagLogger or a custom implementation");
229
- self2.error((_a2 = err.stack) !== null && _a2 !== void 0 ? _a2 : err.message);
229
+ self2.error((_a3 = err.stack) !== null && _a3 !== void 0 ? _a3 : err.message);
230
230
  return false;
231
231
  }
232
232
  if (typeof optionsOrLogLevel === "number") {
@@ -444,8 +444,8 @@ function setSpanContext(context, spanContext) {
444
444
  return setSpan(context, new NonRecordingSpan(spanContext));
445
445
  }
446
446
  function getSpanContext(context) {
447
- var _a2;
448
- return (_a2 = getSpan(context)) === null || _a2 === void 0 ? void 0 : _a2.spanContext();
447
+ var _a3;
448
+ return (_a3 = getSpan(context)) === null || _a3 === void 0 ? void 0 : _a3.spanContext();
449
449
  }
450
450
 
451
451
  // ../../node_modules/@opentelemetry/api/build/esm/trace/spancontext-utils.js
@@ -665,12 +665,12 @@ var ProxyTracerProvider = class {
665
665
  * Get a {@link ProxyTracer}
666
666
  */
667
667
  getTracer(name, version2, options) {
668
- var _a2;
669
- return (_a2 = this.getDelegateTracer(name, version2, options)) !== null && _a2 !== void 0 ? _a2 : new ProxyTracer(this, name, version2, options);
668
+ var _a3;
669
+ return (_a3 = this.getDelegateTracer(name, version2, options)) !== null && _a3 !== void 0 ? _a3 : new ProxyTracer(this, name, version2, options);
670
670
  }
671
671
  getDelegate() {
672
- var _a2;
673
- return (_a2 = this._delegate) !== null && _a2 !== void 0 ? _a2 : NOOP_TRACER_PROVIDER;
672
+ var _a3;
673
+ return (_a3 = this._delegate) !== null && _a3 !== void 0 ? _a3 : NOOP_TRACER_PROVIDER;
674
674
  }
675
675
  /**
676
676
  * Set the delegate tracer provider
@@ -679,8 +679,8 @@ var ProxyTracerProvider = class {
679
679
  this._delegate = delegate;
680
680
  }
681
681
  getDelegateTracer(name, version2, options) {
682
- var _a2;
683
- return (_a2 = this._delegate) === null || _a2 === void 0 ? void 0 : _a2.getTracer(name, version2, options);
682
+ var _a3;
683
+ return (_a3 = this._delegate) === null || _a3 === void 0 ? void 0 : _a3.getTracer(name, version2, options);
684
684
  }
685
685
  };
686
686
 
@@ -810,6 +810,7 @@ __export(external_exports, {
810
810
  ZodOptional: () => ZodOptional,
811
811
  ZodPipe: () => ZodPipe,
812
812
  ZodPrefault: () => ZodPrefault,
813
+ ZodPreprocess: () => ZodPreprocess,
813
814
  ZodPromise: () => ZodPromise,
814
815
  ZodReadonly: () => ZodReadonly,
815
816
  ZodRealError: () => ZodRealError,
@@ -888,6 +889,7 @@ __export(external_exports, {
888
889
  int32: () => int32,
889
890
  int64: () => int64,
890
891
  intersection: () => intersection,
892
+ invertCodec: () => invertCodec,
891
893
  ipv4: () => ipv42,
892
894
  ipv6: () => ipv62,
893
895
  iso: () => iso_exports,
@@ -1069,6 +1071,7 @@ __export(core_exports2, {
1069
1071
  $ZodOptional: () => $ZodOptional,
1070
1072
  $ZodPipe: () => $ZodPipe,
1071
1073
  $ZodPrefault: () => $ZodPrefault,
1074
+ $ZodPreprocess: () => $ZodPreprocess,
1072
1075
  $ZodPromise: () => $ZodPromise,
1073
1076
  $ZodReadonly: () => $ZodReadonly,
1074
1077
  $ZodRealError: () => $ZodRealError,
@@ -1268,7 +1271,8 @@ __export(core_exports2, {
1268
1271
  });
1269
1272
 
1270
1273
  // ../../node_modules/zod/v4/core/core.js
1271
- var NEVER = Object.freeze({
1274
+ var _a;
1275
+ var NEVER = /* @__PURE__ */ Object.freeze({
1272
1276
  status: "aborted"
1273
1277
  });
1274
1278
  // @__NO_SIDE_EFFECTS__
@@ -1303,10 +1307,10 @@ function $constructor(name, initializer3, params) {
1303
1307
  }
1304
1308
  Object.defineProperty(Definition, "name", { value: name });
1305
1309
  function _(def) {
1306
- var _a2;
1310
+ var _a3;
1307
1311
  const inst = params?.Parent ? new Definition() : this;
1308
1312
  init(inst, def);
1309
- (_a2 = inst._zod).deferred ?? (_a2.deferred = []);
1313
+ (_a3 = inst._zod).deferred ?? (_a3.deferred = []);
1310
1314
  for (const fn of inst._zod.deferred) {
1311
1315
  fn();
1312
1316
  }
@@ -1335,7 +1339,8 @@ var $ZodEncodeError = class extends Error {
1335
1339
  this.name = "ZodEncodeError";
1336
1340
  }
1337
1341
  };
1338
- var globalConfig = {};
1342
+ (_a = globalThis).__zod_globalConfig ?? (_a.__zod_globalConfig = {});
1343
+ var globalConfig = globalThis.__zod_globalConfig;
1339
1344
  function config(newConfig) {
1340
1345
  if (newConfig)
1341
1346
  Object.assign(globalConfig, newConfig);
@@ -1368,6 +1373,7 @@ __export(util_exports, {
1368
1373
  defineLazy: () => defineLazy,
1369
1374
  esc: () => esc,
1370
1375
  escapeRegex: () => escapeRegex,
1376
+ explicitlyAborted: () => explicitlyAborted,
1371
1377
  extend: () => extend,
1372
1378
  finalizeIssue: () => finalizeIssue,
1373
1379
  floatSafeRemainder: () => floatSafeRemainder,
@@ -1456,19 +1462,12 @@ function cleanRegex(source) {
1456
1462
  return source.slice(start, end);
1457
1463
  }
1458
1464
  function floatSafeRemainder(val, step) {
1459
- const valDecCount = (val.toString().split(".")[1] || "").length;
1460
- const stepString = step.toString();
1461
- let stepDecCount = (stepString.split(".")[1] || "").length;
1462
- if (stepDecCount === 0 && /\d?e-\d?/.test(stepString)) {
1463
- const match = stepString.match(/\d?e-(\d?)/);
1464
- if (match?.[1]) {
1465
- stepDecCount = Number.parseInt(match[1]);
1466
- }
1467
- }
1468
- const decCount = valDecCount > stepDecCount ? valDecCount : stepDecCount;
1469
- const valInt = Number.parseInt(val.toFixed(decCount).replace(".", ""));
1470
- const stepInt = Number.parseInt(step.toFixed(decCount).replace(".", ""));
1471
- return valInt % stepInt / 10 ** decCount;
1465
+ const ratio = val / step;
1466
+ const roundedRatio = Math.round(ratio);
1467
+ const tolerance = Number.EPSILON * Math.max(Math.abs(ratio), 1);
1468
+ if (Math.abs(ratio - roundedRatio) < tolerance)
1469
+ return 0;
1470
+ return ratio - roundedRatio;
1472
1471
  }
1473
1472
  var EVALUATING = /* @__PURE__ */ Symbol("evaluating");
1474
1473
  function defineLazy(object2, key, getter) {
@@ -1550,7 +1549,10 @@ var captureStackTrace = "captureStackTrace" in Error ? Error.captureStackTrace :
1550
1549
  function isObject(data) {
1551
1550
  return typeof data === "object" && data !== null && !Array.isArray(data);
1552
1551
  }
1553
- var allowsEval = cached(() => {
1552
+ var allowsEval = /* @__PURE__ */ cached(() => {
1553
+ if (globalConfig.jitless) {
1554
+ return false;
1555
+ }
1554
1556
  if (typeof navigator !== "undefined" && navigator?.userAgent?.includes("Cloudflare")) {
1555
1557
  return false;
1556
1558
  }
@@ -1583,6 +1585,10 @@ function shallowClone(o) {
1583
1585
  return { ...o };
1584
1586
  if (Array.isArray(o))
1585
1587
  return [...o];
1588
+ if (o instanceof Map)
1589
+ return new Map(o);
1590
+ if (o instanceof Set)
1591
+ return new Set(o);
1586
1592
  return o;
1587
1593
  }
1588
1594
  function numKeys(data) {
@@ -1639,7 +1645,14 @@ var getParsedType = (data) => {
1639
1645
  }
1640
1646
  };
1641
1647
  var propertyKeyTypes = /* @__PURE__ */ new Set(["string", "number", "symbol"]);
1642
- var primitiveTypes = /* @__PURE__ */ new Set(["string", "number", "bigint", "boolean", "symbol", "undefined"]);
1648
+ var primitiveTypes = /* @__PURE__ */ new Set([
1649
+ "string",
1650
+ "number",
1651
+ "bigint",
1652
+ "boolean",
1653
+ "symbol",
1654
+ "undefined"
1655
+ ]);
1643
1656
  function escapeRegex(str) {
1644
1657
  return str.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
1645
1658
  }
@@ -1808,6 +1821,9 @@ function safeExtend(schema, shape) {
1808
1821
  return clone(schema, def);
1809
1822
  }
1810
1823
  function merge(a, b) {
1824
+ if (a._zod.def.checks?.length) {
1825
+ throw new Error(".merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.");
1826
+ }
1811
1827
  const def = mergeDefs(a._zod.def, {
1812
1828
  get shape() {
1813
1829
  const _shape = { ...a._zod.def.shape, ...b._zod.def.shape };
@@ -1817,8 +1833,7 @@ function merge(a, b) {
1817
1833
  get catchall() {
1818
1834
  return b._zod.def.catchall;
1819
1835
  },
1820
- checks: []
1821
- // delete existing checks
1836
+ checks: b._zod.def.checks ?? []
1822
1837
  });
1823
1838
  return clone(a, def);
1824
1839
  }
@@ -1901,10 +1916,20 @@ function aborted(x, startIndex = 0) {
1901
1916
  }
1902
1917
  return false;
1903
1918
  }
1919
+ function explicitlyAborted(x, startIndex = 0) {
1920
+ if (x.aborted === true)
1921
+ return true;
1922
+ for (let i = startIndex; i < x.issues.length; i++) {
1923
+ if (x.issues[i]?.continue === false) {
1924
+ return true;
1925
+ }
1926
+ }
1927
+ return false;
1928
+ }
1904
1929
  function prefixIssues(path, issues) {
1905
1930
  return issues.map((iss) => {
1906
- var _a2;
1907
- (_a2 = iss).path ?? (_a2.path = []);
1931
+ var _a3;
1932
+ (_a3 = iss).path ?? (_a3.path = []);
1908
1933
  iss.path.unshift(path);
1909
1934
  return iss;
1910
1935
  });
@@ -1913,17 +1938,14 @@ function unwrapMessage(message) {
1913
1938
  return typeof message === "string" ? message : message?.message;
1914
1939
  }
1915
1940
  function finalizeIssue(iss, ctx, config2) {
1916
- const full = { ...iss, path: iss.path ?? [] };
1917
- if (!iss.message) {
1918
- const message = unwrapMessage(iss.inst?._zod.def?.error?.(iss)) ?? unwrapMessage(ctx?.error?.(iss)) ?? unwrapMessage(config2.customError?.(iss)) ?? unwrapMessage(config2.localeError?.(iss)) ?? "Invalid input";
1919
- full.message = message;
1941
+ const message = iss.message ? iss.message : unwrapMessage(iss.inst?._zod.def?.error?.(iss)) ?? unwrapMessage(ctx?.error?.(iss)) ?? unwrapMessage(config2.customError?.(iss)) ?? unwrapMessage(config2.localeError?.(iss)) ?? "Invalid input";
1942
+ const { inst: _inst, continue: _continue, input: _input, ...rest } = iss;
1943
+ rest.path ?? (rest.path = []);
1944
+ rest.message = message;
1945
+ if (ctx?.reportInput) {
1946
+ rest.input = _input;
1920
1947
  }
1921
- delete full.inst;
1922
- delete full.continue;
1923
- if (!ctx?.reportInput) {
1924
- delete full.input;
1925
- }
1926
- return full;
1948
+ return rest;
1927
1949
  }
1928
1950
  function getSizableOrigin(input) {
1929
1951
  if (input instanceof Set)
@@ -2040,10 +2062,10 @@ var initializer = (inst, def) => {
2040
2062
  };
2041
2063
  var $ZodError = $constructor("$ZodError", initializer);
2042
2064
  var $ZodRealError = $constructor("$ZodError", initializer, { Parent: Error });
2043
- function flattenError(error48, mapper = (issue2) => issue2.message) {
2065
+ function flattenError(error51, mapper = (issue2) => issue2.message) {
2044
2066
  const fieldErrors = {};
2045
2067
  const formErrors = [];
2046
- for (const sub of error48.issues) {
2068
+ for (const sub of error51.issues) {
2047
2069
  if (sub.path.length > 0) {
2048
2070
  fieldErrors[sub.path[0]] = fieldErrors[sub.path[0]] || [];
2049
2071
  fieldErrors[sub.path[0]].push(mapper(sub));
@@ -2053,50 +2075,53 @@ function flattenError(error48, mapper = (issue2) => issue2.message) {
2053
2075
  }
2054
2076
  return { formErrors, fieldErrors };
2055
2077
  }
2056
- function formatError(error48, mapper = (issue2) => issue2.message) {
2078
+ function formatError(error51, mapper = (issue2) => issue2.message) {
2057
2079
  const fieldErrors = { _errors: [] };
2058
- const processError = (error49) => {
2059
- for (const issue2 of error49.issues) {
2080
+ const processError = (error52, path = []) => {
2081
+ for (const issue2 of error52.issues) {
2060
2082
  if (issue2.code === "invalid_union" && issue2.errors.length) {
2061
- issue2.errors.map((issues) => processError({ issues }));
2083
+ issue2.errors.map((issues) => processError({ issues }, [...path, ...issue2.path]));
2062
2084
  } else if (issue2.code === "invalid_key") {
2063
- processError({ issues: issue2.issues });
2085
+ processError({ issues: issue2.issues }, [...path, ...issue2.path]);
2064
2086
  } else if (issue2.code === "invalid_element") {
2065
- processError({ issues: issue2.issues });
2066
- } else if (issue2.path.length === 0) {
2067
- fieldErrors._errors.push(mapper(issue2));
2087
+ processError({ issues: issue2.issues }, [...path, ...issue2.path]);
2068
2088
  } else {
2069
- let curr = fieldErrors;
2070
- let i = 0;
2071
- while (i < issue2.path.length) {
2072
- const el = issue2.path[i];
2073
- const terminal = i === issue2.path.length - 1;
2074
- if (!terminal) {
2075
- curr[el] = curr[el] || { _errors: [] };
2076
- } else {
2077
- curr[el] = curr[el] || { _errors: [] };
2078
- curr[el]._errors.push(mapper(issue2));
2089
+ const fullpath = [...path, ...issue2.path];
2090
+ if (fullpath.length === 0) {
2091
+ fieldErrors._errors.push(mapper(issue2));
2092
+ } else {
2093
+ let curr = fieldErrors;
2094
+ let i = 0;
2095
+ while (i < fullpath.length) {
2096
+ const el = fullpath[i];
2097
+ const terminal = i === fullpath.length - 1;
2098
+ if (!terminal) {
2099
+ curr[el] = curr[el] || { _errors: [] };
2100
+ } else {
2101
+ curr[el] = curr[el] || { _errors: [] };
2102
+ curr[el]._errors.push(mapper(issue2));
2103
+ }
2104
+ curr = curr[el];
2105
+ i++;
2079
2106
  }
2080
- curr = curr[el];
2081
- i++;
2082
2107
  }
2083
2108
  }
2084
2109
  }
2085
2110
  };
2086
- processError(error48);
2111
+ processError(error51);
2087
2112
  return fieldErrors;
2088
2113
  }
2089
- function treeifyError(error48, mapper = (issue2) => issue2.message) {
2114
+ function treeifyError(error51, mapper = (issue2) => issue2.message) {
2090
2115
  const result = { errors: [] };
2091
- const processError = (error49, path = []) => {
2092
- var _a2, _b;
2093
- for (const issue2 of error49.issues) {
2116
+ const processError = (error52, path = []) => {
2117
+ var _a3, _b;
2118
+ for (const issue2 of error52.issues) {
2094
2119
  if (issue2.code === "invalid_union" && issue2.errors.length) {
2095
- issue2.errors.map((issues) => processError({ issues }, issue2.path));
2120
+ issue2.errors.map((issues) => processError({ issues }, [...path, ...issue2.path]));
2096
2121
  } else if (issue2.code === "invalid_key") {
2097
- processError({ issues: issue2.issues }, issue2.path);
2122
+ processError({ issues: issue2.issues }, [...path, ...issue2.path]);
2098
2123
  } else if (issue2.code === "invalid_element") {
2099
- processError({ issues: issue2.issues }, issue2.path);
2124
+ processError({ issues: issue2.issues }, [...path, ...issue2.path]);
2100
2125
  } else {
2101
2126
  const fullpath = [...path, ...issue2.path];
2102
2127
  if (fullpath.length === 0) {
@@ -2110,7 +2135,7 @@ function treeifyError(error48, mapper = (issue2) => issue2.message) {
2110
2135
  const terminal = i === fullpath.length - 1;
2111
2136
  if (typeof el === "string") {
2112
2137
  curr.properties ?? (curr.properties = {});
2113
- (_a2 = curr.properties)[el] ?? (_a2[el] = { errors: [] });
2138
+ (_a3 = curr.properties)[el] ?? (_a3[el] = { errors: [] });
2114
2139
  curr = curr.properties[el];
2115
2140
  } else {
2116
2141
  curr.items ?? (curr.items = []);
@@ -2125,7 +2150,7 @@ function treeifyError(error48, mapper = (issue2) => issue2.message) {
2125
2150
  }
2126
2151
  }
2127
2152
  };
2128
- processError(error48);
2153
+ processError(error51);
2129
2154
  return result;
2130
2155
  }
2131
2156
  function toDotPath(_path) {
@@ -2146,9 +2171,9 @@ function toDotPath(_path) {
2146
2171
  }
2147
2172
  return segs.join("");
2148
2173
  }
2149
- function prettifyError(error48) {
2174
+ function prettifyError(error51) {
2150
2175
  const lines = [];
2151
- const issues = [...error48.issues].sort((a, b) => (a.path ?? []).length - (b.path ?? []).length);
2176
+ const issues = [...error51.issues].sort((a, b) => (a.path ?? []).length - (b.path ?? []).length);
2152
2177
  for (const issue2 of issues) {
2153
2178
  lines.push(`\u2716 ${issue2.message}`);
2154
2179
  if (issue2.path?.length)
@@ -2159,7 +2184,7 @@ function prettifyError(error48) {
2159
2184
 
2160
2185
  // ../../node_modules/zod/v4/core/parse.js
2161
2186
  var _parse = (_Err) => (schema, value, _ctx, _params) => {
2162
- const ctx = _ctx ? Object.assign(_ctx, { async: false }) : { async: false };
2187
+ const ctx = _ctx ? { ..._ctx, async: false } : { async: false };
2163
2188
  const result = schema._zod.run({ value, issues: [] }, ctx);
2164
2189
  if (result instanceof Promise) {
2165
2190
  throw new $ZodAsyncError();
@@ -2173,7 +2198,7 @@ var _parse = (_Err) => (schema, value, _ctx, _params) => {
2173
2198
  };
2174
2199
  var parse = /* @__PURE__ */ _parse($ZodRealError);
2175
2200
  var _parseAsync = (_Err) => async (schema, value, _ctx, params) => {
2176
- const ctx = _ctx ? Object.assign(_ctx, { async: true }) : { async: true };
2201
+ const ctx = _ctx ? { ..._ctx, async: true } : { async: true };
2177
2202
  let result = schema._zod.run({ value, issues: [] }, ctx);
2178
2203
  if (result instanceof Promise)
2179
2204
  result = await result;
@@ -2198,7 +2223,7 @@ var _safeParse = (_Err) => (schema, value, _ctx) => {
2198
2223
  };
2199
2224
  var safeParse = /* @__PURE__ */ _safeParse($ZodRealError);
2200
2225
  var _safeParseAsync = (_Err) => async (schema, value, _ctx) => {
2201
- const ctx = _ctx ? Object.assign(_ctx, { async: true }) : { async: true };
2226
+ const ctx = _ctx ? { ..._ctx, async: true } : { async: true };
2202
2227
  let result = schema._zod.run({ value, issues: [] }, ctx);
2203
2228
  if (result instanceof Promise)
2204
2229
  result = await result;
@@ -2209,7 +2234,7 @@ var _safeParseAsync = (_Err) => async (schema, value, _ctx) => {
2209
2234
  };
2210
2235
  var safeParseAsync = /* @__PURE__ */ _safeParseAsync($ZodRealError);
2211
2236
  var _encode = (_Err) => (schema, value, _ctx) => {
2212
- const ctx = _ctx ? Object.assign(_ctx, { direction: "backward" }) : { direction: "backward" };
2237
+ const ctx = _ctx ? { ..._ctx, direction: "backward" } : { direction: "backward" };
2213
2238
  return _parse(_Err)(schema, value, ctx);
2214
2239
  };
2215
2240
  var encode = /* @__PURE__ */ _encode($ZodRealError);
@@ -2218,7 +2243,7 @@ var _decode = (_Err) => (schema, value, _ctx) => {
2218
2243
  };
2219
2244
  var decode = /* @__PURE__ */ _decode($ZodRealError);
2220
2245
  var _encodeAsync = (_Err) => async (schema, value, _ctx) => {
2221
- const ctx = _ctx ? Object.assign(_ctx, { direction: "backward" }) : { direction: "backward" };
2246
+ const ctx = _ctx ? { ..._ctx, direction: "backward" } : { direction: "backward" };
2222
2247
  return _parseAsync(_Err)(schema, value, ctx);
2223
2248
  };
2224
2249
  var encodeAsync = /* @__PURE__ */ _encodeAsync($ZodRealError);
@@ -2227,7 +2252,7 @@ var _decodeAsync = (_Err) => async (schema, value, _ctx) => {
2227
2252
  };
2228
2253
  var decodeAsync = /* @__PURE__ */ _decodeAsync($ZodRealError);
2229
2254
  var _safeEncode = (_Err) => (schema, value, _ctx) => {
2230
- const ctx = _ctx ? Object.assign(_ctx, { direction: "backward" }) : { direction: "backward" };
2255
+ const ctx = _ctx ? { ..._ctx, direction: "backward" } : { direction: "backward" };
2231
2256
  return _safeParse(_Err)(schema, value, ctx);
2232
2257
  };
2233
2258
  var safeEncode = /* @__PURE__ */ _safeEncode($ZodRealError);
@@ -2236,7 +2261,7 @@ var _safeDecode = (_Err) => (schema, value, _ctx) => {
2236
2261
  };
2237
2262
  var safeDecode = /* @__PURE__ */ _safeDecode($ZodRealError);
2238
2263
  var _safeEncodeAsync = (_Err) => async (schema, value, _ctx) => {
2239
- const ctx = _ctx ? Object.assign(_ctx, { direction: "backward" }) : { direction: "backward" };
2264
+ const ctx = _ctx ? { ..._ctx, direction: "backward" } : { direction: "backward" };
2240
2265
  return _safeParseAsync(_Err)(schema, value, ctx);
2241
2266
  };
2242
2267
  var safeEncodeAsync = /* @__PURE__ */ _safeEncodeAsync($ZodRealError);
@@ -2269,6 +2294,7 @@ __export(regexes_exports, {
2269
2294
  hex: () => hex,
2270
2295
  hostname: () => hostname,
2271
2296
  html5Email: () => html5Email,
2297
+ httpProtocol: () => httpProtocol,
2272
2298
  idnEmail: () => idnEmail,
2273
2299
  integer: () => integer,
2274
2300
  ipv4: () => ipv4,
@@ -2307,7 +2333,7 @@ __export(regexes_exports, {
2307
2333
  uuid7: () => uuid7,
2308
2334
  xid: () => xid
2309
2335
  });
2310
- var cuid = /^[cC][^\s-]{8,}$/;
2336
+ var cuid = /^[cC][0-9a-z]{6,}$/;
2311
2337
  var cuid2 = /^[0-9a-z]+$/;
2312
2338
  var ulid = /^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/;
2313
2339
  var xid = /^[0-9a-vA-V]{20}$/;
@@ -2346,6 +2372,7 @@ var base64 = /^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/
2346
2372
  var base64url = /^[A-Za-z0-9_-]*$/;
2347
2373
  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])?)*\.?$/;
2348
2374
  var domain = /^([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$/;
2375
+ var httpProtocol = /^https?$/;
2349
2376
  var e164 = /^\+[1-9]\d{6,14}$/;
2350
2377
  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])))`;
2351
2378
  var date = /* @__PURE__ */ new RegExp(`^${dateSource}$`);
@@ -2404,10 +2431,10 @@ var sha512_base64url = /* @__PURE__ */ fixedBase64url(86);
2404
2431
 
2405
2432
  // ../../node_modules/zod/v4/core/checks.js
2406
2433
  var $ZodCheck = /* @__PURE__ */ $constructor("$ZodCheck", (inst, def) => {
2407
- var _a2;
2434
+ var _a3;
2408
2435
  inst._zod ?? (inst._zod = {});
2409
2436
  inst._zod.def = def;
2410
- (_a2 = inst._zod).onattach ?? (_a2.onattach = []);
2437
+ (_a3 = inst._zod).onattach ?? (_a3.onattach = []);
2411
2438
  });
2412
2439
  var numericOriginMap = {
2413
2440
  number: "number",
@@ -2473,8 +2500,8 @@ var $ZodCheckGreaterThan = /* @__PURE__ */ $constructor("$ZodCheckGreaterThan",
2473
2500
  var $ZodCheckMultipleOf = /* @__PURE__ */ $constructor("$ZodCheckMultipleOf", (inst, def) => {
2474
2501
  $ZodCheck.init(inst, def);
2475
2502
  inst._zod.onattach.push((inst2) => {
2476
- var _a2;
2477
- (_a2 = inst2._zod.bag).multipleOf ?? (_a2.multipleOf = def.value);
2503
+ var _a3;
2504
+ (_a3 = inst2._zod.bag).multipleOf ?? (_a3.multipleOf = def.value);
2478
2505
  });
2479
2506
  inst._zod.check = (payload) => {
2480
2507
  if (typeof payload.value !== typeof def.value)
@@ -2607,9 +2634,9 @@ var $ZodCheckBigIntFormat = /* @__PURE__ */ $constructor("$ZodCheckBigIntFormat"
2607
2634
  };
2608
2635
  });
2609
2636
  var $ZodCheckMaxSize = /* @__PURE__ */ $constructor("$ZodCheckMaxSize", (inst, def) => {
2610
- var _a2;
2637
+ var _a3;
2611
2638
  $ZodCheck.init(inst, def);
2612
- (_a2 = inst._zod.def).when ?? (_a2.when = (payload) => {
2639
+ (_a3 = inst._zod.def).when ?? (_a3.when = (payload) => {
2613
2640
  const val = payload.value;
2614
2641
  return !nullish(val) && val.size !== void 0;
2615
2642
  });
@@ -2635,9 +2662,9 @@ var $ZodCheckMaxSize = /* @__PURE__ */ $constructor("$ZodCheckMaxSize", (inst, d
2635
2662
  };
2636
2663
  });
2637
2664
  var $ZodCheckMinSize = /* @__PURE__ */ $constructor("$ZodCheckMinSize", (inst, def) => {
2638
- var _a2;
2665
+ var _a3;
2639
2666
  $ZodCheck.init(inst, def);
2640
- (_a2 = inst._zod.def).when ?? (_a2.when = (payload) => {
2667
+ (_a3 = inst._zod.def).when ?? (_a3.when = (payload) => {
2641
2668
  const val = payload.value;
2642
2669
  return !nullish(val) && val.size !== void 0;
2643
2670
  });
@@ -2663,9 +2690,9 @@ var $ZodCheckMinSize = /* @__PURE__ */ $constructor("$ZodCheckMinSize", (inst, d
2663
2690
  };
2664
2691
  });
2665
2692
  var $ZodCheckSizeEquals = /* @__PURE__ */ $constructor("$ZodCheckSizeEquals", (inst, def) => {
2666
- var _a2;
2693
+ var _a3;
2667
2694
  $ZodCheck.init(inst, def);
2668
- (_a2 = inst._zod.def).when ?? (_a2.when = (payload) => {
2695
+ (_a3 = inst._zod.def).when ?? (_a3.when = (payload) => {
2669
2696
  const val = payload.value;
2670
2697
  return !nullish(val) && val.size !== void 0;
2671
2698
  });
@@ -2693,9 +2720,9 @@ var $ZodCheckSizeEquals = /* @__PURE__ */ $constructor("$ZodCheckSizeEquals", (i
2693
2720
  };
2694
2721
  });
2695
2722
  var $ZodCheckMaxLength = /* @__PURE__ */ $constructor("$ZodCheckMaxLength", (inst, def) => {
2696
- var _a2;
2723
+ var _a3;
2697
2724
  $ZodCheck.init(inst, def);
2698
- (_a2 = inst._zod.def).when ?? (_a2.when = (payload) => {
2725
+ (_a3 = inst._zod.def).when ?? (_a3.when = (payload) => {
2699
2726
  const val = payload.value;
2700
2727
  return !nullish(val) && val.length !== void 0;
2701
2728
  });
@@ -2722,9 +2749,9 @@ var $ZodCheckMaxLength = /* @__PURE__ */ $constructor("$ZodCheckMaxLength", (ins
2722
2749
  };
2723
2750
  });
2724
2751
  var $ZodCheckMinLength = /* @__PURE__ */ $constructor("$ZodCheckMinLength", (inst, def) => {
2725
- var _a2;
2752
+ var _a3;
2726
2753
  $ZodCheck.init(inst, def);
2727
- (_a2 = inst._zod.def).when ?? (_a2.when = (payload) => {
2754
+ (_a3 = inst._zod.def).when ?? (_a3.when = (payload) => {
2728
2755
  const val = payload.value;
2729
2756
  return !nullish(val) && val.length !== void 0;
2730
2757
  });
@@ -2751,9 +2778,9 @@ var $ZodCheckMinLength = /* @__PURE__ */ $constructor("$ZodCheckMinLength", (ins
2751
2778
  };
2752
2779
  });
2753
2780
  var $ZodCheckLengthEquals = /* @__PURE__ */ $constructor("$ZodCheckLengthEquals", (inst, def) => {
2754
- var _a2;
2781
+ var _a3;
2755
2782
  $ZodCheck.init(inst, def);
2756
- (_a2 = inst._zod.def).when ?? (_a2.when = (payload) => {
2783
+ (_a3 = inst._zod.def).when ?? (_a3.when = (payload) => {
2757
2784
  const val = payload.value;
2758
2785
  return !nullish(val) && val.length !== void 0;
2759
2786
  });
@@ -2782,7 +2809,7 @@ var $ZodCheckLengthEquals = /* @__PURE__ */ $constructor("$ZodCheckLengthEquals"
2782
2809
  };
2783
2810
  });
2784
2811
  var $ZodCheckStringFormat = /* @__PURE__ */ $constructor("$ZodCheckStringFormat", (inst, def) => {
2785
- var _a2, _b;
2812
+ var _a3, _b;
2786
2813
  $ZodCheck.init(inst, def);
2787
2814
  inst._zod.onattach.push((inst2) => {
2788
2815
  const bag = inst2._zod.bag;
@@ -2793,7 +2820,7 @@ var $ZodCheckStringFormat = /* @__PURE__ */ $constructor("$ZodCheckStringFormat"
2793
2820
  }
2794
2821
  });
2795
2822
  if (def.pattern)
2796
- (_a2 = inst._zod).check ?? (_a2.check = (payload) => {
2823
+ (_a3 = inst._zod).check ?? (_a3.check = (payload) => {
2797
2824
  def.pattern.lastIndex = 0;
2798
2825
  if (def.pattern.test(payload.value))
2799
2826
  return;
@@ -2989,13 +3016,13 @@ var Doc = class {
2989
3016
  // ../../node_modules/zod/v4/core/versions.js
2990
3017
  var version = {
2991
3018
  major: 4,
2992
- minor: 3,
2993
- patch: 6
3019
+ minor: 4,
3020
+ patch: 3
2994
3021
  };
2995
3022
 
2996
3023
  // ../../node_modules/zod/v4/core/schemas.js
2997
3024
  var $ZodType = /* @__PURE__ */ $constructor("$ZodType", (inst, def) => {
2998
- var _a2;
3025
+ var _a3;
2999
3026
  inst ?? (inst = {});
3000
3027
  inst._zod.def = def;
3001
3028
  inst._zod.bag = inst._zod.bag || {};
@@ -3010,7 +3037,7 @@ var $ZodType = /* @__PURE__ */ $constructor("$ZodType", (inst, def) => {
3010
3037
  }
3011
3038
  }
3012
3039
  if (checks.length === 0) {
3013
- (_a2 = inst._zod).deferred ?? (_a2.deferred = []);
3040
+ (_a3 = inst._zod).deferred ?? (_a3.deferred = []);
3014
3041
  inst._zod.deferred?.push(() => {
3015
3042
  inst._zod.run = inst._zod.parse;
3016
3043
  });
@@ -3020,6 +3047,8 @@ var $ZodType = /* @__PURE__ */ $constructor("$ZodType", (inst, def) => {
3020
3047
  let asyncResult;
3021
3048
  for (const ch of checks2) {
3022
3049
  if (ch._zod.def.when) {
3050
+ if (explicitlyAborted(payload))
3051
+ continue;
3023
3052
  const shouldRun = ch._zod.def.when(payload);
3024
3053
  if (!shouldRun)
3025
3054
  continue;
@@ -3160,6 +3189,19 @@ var $ZodURL = /* @__PURE__ */ $constructor("$ZodURL", (inst, def) => {
3160
3189
  inst._zod.check = (payload) => {
3161
3190
  try {
3162
3191
  const trimmed = payload.value.trim();
3192
+ if (!def.normalize && def.protocol?.source === httpProtocol.source) {
3193
+ if (!/^https?:\/\//i.test(trimmed)) {
3194
+ payload.issues.push({
3195
+ code: "invalid_format",
3196
+ format: "url",
3197
+ note: "Invalid URL format",
3198
+ input: payload.value,
3199
+ inst,
3200
+ continue: !def.abort
3201
+ });
3202
+ return;
3203
+ }
3204
+ }
3163
3205
  const url2 = new URL(trimmed);
3164
3206
  if (def.hostname) {
3165
3207
  def.hostname.lastIndex = 0;
@@ -3313,6 +3355,8 @@ var $ZodCIDRv6 = /* @__PURE__ */ $constructor("$ZodCIDRv6", (inst, def) => {
3313
3355
  function isValidBase64(data) {
3314
3356
  if (data === "")
3315
3357
  return true;
3358
+ if (/\s/.test(data))
3359
+ return false;
3316
3360
  if (data.length % 4 !== 0)
3317
3361
  return false;
3318
3362
  try {
@@ -3505,8 +3549,6 @@ var $ZodUndefined = /* @__PURE__ */ $constructor("$ZodUndefined", (inst, def) =>
3505
3549
  $ZodType.init(inst, def);
3506
3550
  inst._zod.pattern = _undefined;
3507
3551
  inst._zod.values = /* @__PURE__ */ new Set([void 0]);
3508
- inst._zod.optin = "optional";
3509
- inst._zod.optout = "optional";
3510
3552
  inst._zod.parse = (payload, _ctx) => {
3511
3553
  const input = payload.value;
3512
3554
  if (typeof input === "undefined")
@@ -3635,15 +3677,27 @@ var $ZodArray = /* @__PURE__ */ $constructor("$ZodArray", (inst, def) => {
3635
3677
  return payload;
3636
3678
  };
3637
3679
  });
3638
- function handlePropertyResult(result, final, key, input, isOptionalOut) {
3680
+ function handlePropertyResult(result, final, key, input, isOptionalIn, isOptionalOut) {
3681
+ const isPresent = key in input;
3639
3682
  if (result.issues.length) {
3640
- if (isOptionalOut && !(key in input)) {
3683
+ if (isOptionalIn && isOptionalOut && !isPresent) {
3641
3684
  return;
3642
3685
  }
3643
3686
  final.issues.push(...prefixIssues(key, result.issues));
3644
3687
  }
3688
+ if (!isPresent && !isOptionalIn) {
3689
+ if (!result.issues.length) {
3690
+ final.issues.push({
3691
+ code: "invalid_type",
3692
+ expected: "nonoptional",
3693
+ input: void 0,
3694
+ path: [key]
3695
+ });
3696
+ }
3697
+ return;
3698
+ }
3645
3699
  if (result.value === void 0) {
3646
- if (key in input) {
3700
+ if (isPresent) {
3647
3701
  final.value[key] = void 0;
3648
3702
  }
3649
3703
  } else {
@@ -3671,8 +3725,11 @@ function handleCatchall(proms, input, payload, ctx, def, inst) {
3671
3725
  const keySet = def.keySet;
3672
3726
  const _catchall = def.catchall._zod;
3673
3727
  const t = _catchall.def.type;
3728
+ const isOptionalIn = _catchall.optin === "optional";
3674
3729
  const isOptionalOut = _catchall.optout === "optional";
3675
3730
  for (const key in input) {
3731
+ if (key === "__proto__")
3732
+ continue;
3676
3733
  if (keySet.has(key))
3677
3734
  continue;
3678
3735
  if (t === "never") {
@@ -3681,9 +3738,9 @@ function handleCatchall(proms, input, payload, ctx, def, inst) {
3681
3738
  }
3682
3739
  const r = _catchall.run({ value: input[key], issues: [] }, ctx);
3683
3740
  if (r instanceof Promise) {
3684
- proms.push(r.then((r2) => handlePropertyResult(r2, payload, key, input, isOptionalOut)));
3741
+ proms.push(r.then((r2) => handlePropertyResult(r2, payload, key, input, isOptionalIn, isOptionalOut)));
3685
3742
  } else {
3686
- handlePropertyResult(r, payload, key, input, isOptionalOut);
3743
+ handlePropertyResult(r, payload, key, input, isOptionalIn, isOptionalOut);
3687
3744
  }
3688
3745
  }
3689
3746
  if (unrecognized.length) {
@@ -3749,12 +3806,13 @@ var $ZodObject = /* @__PURE__ */ $constructor("$ZodObject", (inst, def) => {
3749
3806
  const shape = value.shape;
3750
3807
  for (const key of value.keys) {
3751
3808
  const el = shape[key];
3809
+ const isOptionalIn = el._zod.optin === "optional";
3752
3810
  const isOptionalOut = el._zod.optout === "optional";
3753
3811
  const r = el._zod.run({ value: input[key], issues: [] }, ctx);
3754
3812
  if (r instanceof Promise) {
3755
- proms.push(r.then((r2) => handlePropertyResult(r2, payload, key, input, isOptionalOut)));
3813
+ proms.push(r.then((r2) => handlePropertyResult(r2, payload, key, input, isOptionalIn, isOptionalOut)));
3756
3814
  } else {
3757
- handlePropertyResult(r, payload, key, input, isOptionalOut);
3815
+ handlePropertyResult(r, payload, key, input, isOptionalIn, isOptionalOut);
3758
3816
  }
3759
3817
  }
3760
3818
  if (!catchall) {
@@ -3785,9 +3843,10 @@ var $ZodObjectJIT = /* @__PURE__ */ $constructor("$ZodObjectJIT", (inst, def) =>
3785
3843
  const id = ids[key];
3786
3844
  const k = esc(key);
3787
3845
  const schema = shape[key];
3846
+ const isOptionalIn = schema?._zod?.optin === "optional";
3788
3847
  const isOptionalOut = schema?._zod?.optout === "optional";
3789
3848
  doc.write(`const ${id} = ${parseStr(key)};`);
3790
- if (isOptionalOut) {
3849
+ if (isOptionalIn && isOptionalOut) {
3791
3850
  doc.write(`
3792
3851
  if (${id}.issues.length) {
3793
3852
  if (${k} in input) {
@@ -3806,6 +3865,33 @@ var $ZodObjectJIT = /* @__PURE__ */ $constructor("$ZodObjectJIT", (inst, def) =>
3806
3865
  newResult[${k}] = ${id}.value;
3807
3866
  }
3808
3867
 
3868
+ `);
3869
+ } else if (!isOptionalIn) {
3870
+ doc.write(`
3871
+ const ${id}_present = ${k} in input;
3872
+ if (${id}.issues.length) {
3873
+ payload.issues = payload.issues.concat(${id}.issues.map(iss => ({
3874
+ ...iss,
3875
+ path: iss.path ? [${k}, ...iss.path] : [${k}]
3876
+ })));
3877
+ }
3878
+ if (!${id}_present && !${id}.issues.length) {
3879
+ payload.issues.push({
3880
+ code: "invalid_type",
3881
+ expected: "nonoptional",
3882
+ input: undefined,
3883
+ path: [${k}]
3884
+ });
3885
+ }
3886
+
3887
+ if (${id}_present) {
3888
+ if (${id}.value === undefined) {
3889
+ newResult[${k}] = undefined;
3890
+ } else {
3891
+ newResult[${k}] = ${id}.value;
3892
+ }
3893
+ }
3894
+
3809
3895
  `);
3810
3896
  } else {
3811
3897
  doc.write(`
@@ -3899,10 +3985,9 @@ var $ZodUnion = /* @__PURE__ */ $constructor("$ZodUnion", (inst, def) => {
3899
3985
  }
3900
3986
  return void 0;
3901
3987
  });
3902
- const single = def.options.length === 1;
3903
- const first = def.options[0]._zod.run;
3988
+ const first = def.options.length === 1 ? def.options[0]._zod.run : null;
3904
3989
  inst._zod.parse = (payload, ctx) => {
3905
- if (single) {
3990
+ if (first) {
3906
3991
  return first(payload, ctx);
3907
3992
  }
3908
3993
  let async = false;
@@ -3955,10 +4040,9 @@ function handleExclusiveUnionResults(results, final, inst, ctx) {
3955
4040
  var $ZodXor = /* @__PURE__ */ $constructor("$ZodXor", (inst, def) => {
3956
4041
  $ZodUnion.init(inst, def);
3957
4042
  def.inclusive = false;
3958
- const single = def.options.length === 1;
3959
- const first = def.options[0]._zod.run;
4043
+ const first = def.options.length === 1 ? def.options[0]._zod.run : null;
3960
4044
  inst._zod.parse = (payload, ctx) => {
3961
- if (single) {
4045
+ if (first) {
3962
4046
  return first(payload, ctx);
3963
4047
  }
3964
4048
  let async = false;
@@ -4033,7 +4117,7 @@ var $ZodDiscriminatedUnion = /* @__PURE__ */ $constructor("$ZodDiscriminatedUnio
4033
4117
  if (opt) {
4034
4118
  return opt._zod.run(payload, ctx);
4035
4119
  }
4036
- if (def.unionFallback) {
4120
+ if (def.unionFallback || ctx.direction === "backward") {
4037
4121
  return _super(payload, ctx);
4038
4122
  }
4039
4123
  payload.issues.push({
@@ -4041,6 +4125,7 @@ var $ZodDiscriminatedUnion = /* @__PURE__ */ $constructor("$ZodDiscriminatedUnio
4041
4125
  errors: [],
4042
4126
  note: "No matching discriminator",
4043
4127
  discriminator: def.discriminator,
4128
+ options: Array.from(disc.value.keys()),
4044
4129
  input,
4045
4130
  path: [def.discriminator],
4046
4131
  inst
@@ -4162,64 +4247,96 @@ var $ZodTuple = /* @__PURE__ */ $constructor("$ZodTuple", (inst, def) => {
4162
4247
  }
4163
4248
  payload.value = [];
4164
4249
  const proms = [];
4165
- const reversedIndex = [...items].reverse().findIndex((item) => item._zod.optin !== "optional");
4166
- const optStart = reversedIndex === -1 ? 0 : items.length - reversedIndex;
4250
+ const optinStart = getTupleOptStart(items, "optin");
4251
+ const optoutStart = getTupleOptStart(items, "optout");
4167
4252
  if (!def.rest) {
4168
- const tooBig = input.length > items.length;
4169
- const tooSmall = input.length < optStart - 1;
4170
- if (tooBig || tooSmall) {
4253
+ if (input.length < optinStart) {
4171
4254
  payload.issues.push({
4172
- ...tooBig ? { code: "too_big", maximum: items.length, inclusive: true } : { code: "too_small", minimum: items.length },
4255
+ code: "too_small",
4256
+ minimum: optinStart,
4257
+ inclusive: true,
4173
4258
  input,
4174
4259
  inst,
4175
4260
  origin: "array"
4176
4261
  });
4177
4262
  return payload;
4178
4263
  }
4179
- }
4180
- let i = -1;
4181
- for (const item of items) {
4182
- i++;
4183
- if (i >= input.length) {
4184
- if (i >= optStart)
4185
- continue;
4264
+ if (input.length > items.length) {
4265
+ payload.issues.push({
4266
+ code: "too_big",
4267
+ maximum: items.length,
4268
+ inclusive: true,
4269
+ input,
4270
+ inst,
4271
+ origin: "array"
4272
+ });
4186
4273
  }
4187
- const result = item._zod.run({
4188
- value: input[i],
4189
- issues: []
4190
- }, ctx);
4191
- if (result instanceof Promise) {
4192
- proms.push(result.then((result2) => handleTupleResult(result2, payload, i)));
4274
+ }
4275
+ const itemResults = new Array(items.length);
4276
+ for (let i = 0; i < items.length; i++) {
4277
+ const r = items[i]._zod.run({ value: input[i], issues: [] }, ctx);
4278
+ if (r instanceof Promise) {
4279
+ proms.push(r.then((rr) => {
4280
+ itemResults[i] = rr;
4281
+ }));
4193
4282
  } else {
4194
- handleTupleResult(result, payload, i);
4283
+ itemResults[i] = r;
4195
4284
  }
4196
4285
  }
4197
4286
  if (def.rest) {
4287
+ let i = items.length - 1;
4198
4288
  const rest = input.slice(items.length);
4199
4289
  for (const el of rest) {
4200
4290
  i++;
4201
- const result = def.rest._zod.run({
4202
- value: el,
4203
- issues: []
4204
- }, ctx);
4291
+ const result = def.rest._zod.run({ value: el, issues: [] }, ctx);
4205
4292
  if (result instanceof Promise) {
4206
- proms.push(result.then((result2) => handleTupleResult(result2, payload, i)));
4293
+ proms.push(result.then((r) => handleTupleResult(r, payload, i)));
4207
4294
  } else {
4208
4295
  handleTupleResult(result, payload, i);
4209
4296
  }
4210
4297
  }
4211
4298
  }
4212
- if (proms.length)
4213
- return Promise.all(proms).then(() => payload);
4214
- return payload;
4299
+ if (proms.length) {
4300
+ return Promise.all(proms).then(() => handleTupleResults(itemResults, payload, items, input, optoutStart));
4301
+ }
4302
+ return handleTupleResults(itemResults, payload, items, input, optoutStart);
4215
4303
  };
4216
4304
  });
4305
+ function getTupleOptStart(items, key) {
4306
+ for (let i = items.length - 1; i >= 0; i--) {
4307
+ if (items[i]._zod[key] !== "optional")
4308
+ return i + 1;
4309
+ }
4310
+ return 0;
4311
+ }
4217
4312
  function handleTupleResult(result, final, index) {
4218
4313
  if (result.issues.length) {
4219
4314
  final.issues.push(...prefixIssues(index, result.issues));
4220
4315
  }
4221
4316
  final.value[index] = result.value;
4222
4317
  }
4318
+ function handleTupleResults(itemResults, final, items, input, optoutStart) {
4319
+ for (let i = 0; i < items.length; i++) {
4320
+ const r = itemResults[i];
4321
+ const isPresent = i < input.length;
4322
+ if (r.issues.length) {
4323
+ if (!isPresent && i >= optoutStart) {
4324
+ final.value.length = i;
4325
+ break;
4326
+ }
4327
+ final.issues.push(...prefixIssues(i, r.issues));
4328
+ }
4329
+ final.value[i] = r.value;
4330
+ }
4331
+ for (let i = final.value.length - 1; i >= input.length; i--) {
4332
+ if (items[i]._zod.optout === "optional" && final.value[i] === void 0) {
4333
+ final.value.length = i;
4334
+ } else {
4335
+ break;
4336
+ }
4337
+ }
4338
+ return final;
4339
+ }
4223
4340
  var $ZodRecord = /* @__PURE__ */ $constructor("$ZodRecord", (inst, def) => {
4224
4341
  $ZodType.init(inst, def);
4225
4342
  inst._zod.parse = (payload, ctx) => {
@@ -4241,19 +4358,35 @@ var $ZodRecord = /* @__PURE__ */ $constructor("$ZodRecord", (inst, def) => {
4241
4358
  for (const key of values) {
4242
4359
  if (typeof key === "string" || typeof key === "number" || typeof key === "symbol") {
4243
4360
  recordKeys.add(typeof key === "number" ? key.toString() : key);
4361
+ const keyResult = def.keyType._zod.run({ value: key, issues: [] }, ctx);
4362
+ if (keyResult instanceof Promise) {
4363
+ throw new Error("Async schemas not supported in object keys currently");
4364
+ }
4365
+ if (keyResult.issues.length) {
4366
+ payload.issues.push({
4367
+ code: "invalid_key",
4368
+ origin: "record",
4369
+ issues: keyResult.issues.map((iss) => finalizeIssue(iss, ctx, config())),
4370
+ input: key,
4371
+ path: [key],
4372
+ inst
4373
+ });
4374
+ continue;
4375
+ }
4376
+ const outKey = keyResult.value;
4244
4377
  const result = def.valueType._zod.run({ value: input[key], issues: [] }, ctx);
4245
4378
  if (result instanceof Promise) {
4246
4379
  proms.push(result.then((result2) => {
4247
4380
  if (result2.issues.length) {
4248
4381
  payload.issues.push(...prefixIssues(key, result2.issues));
4249
4382
  }
4250
- payload.value[key] = result2.value;
4383
+ payload.value[outKey] = result2.value;
4251
4384
  }));
4252
4385
  } else {
4253
4386
  if (result.issues.length) {
4254
4387
  payload.issues.push(...prefixIssues(key, result.issues));
4255
4388
  }
4256
- payload.value[key] = result.value;
4389
+ payload.value[outKey] = result.value;
4257
4390
  }
4258
4391
  }
4259
4392
  }
@@ -4277,6 +4410,8 @@ var $ZodRecord = /* @__PURE__ */ $constructor("$ZodRecord", (inst, def) => {
4277
4410
  for (const key of Reflect.ownKeys(input)) {
4278
4411
  if (key === "__proto__")
4279
4412
  continue;
4413
+ if (!Object.prototype.propertyIsEnumerable.call(input, key))
4414
+ continue;
4280
4415
  let keyResult = def.keyType._zod.run({ value: key, issues: [] }, ctx);
4281
4416
  if (keyResult instanceof Promise) {
4282
4417
  throw new Error("Async schemas not supported in object keys currently");
@@ -4481,6 +4616,7 @@ var $ZodFile = /* @__PURE__ */ $constructor("$ZodFile", (inst, def) => {
4481
4616
  });
4482
4617
  var $ZodTransform = /* @__PURE__ */ $constructor("$ZodTransform", (inst, def) => {
4483
4618
  $ZodType.init(inst, def);
4619
+ inst._zod.optin = "optional";
4484
4620
  inst._zod.parse = (payload, ctx) => {
4485
4621
  if (ctx.direction === "backward") {
4486
4622
  throw new $ZodEncodeError(inst.constructor.name);
@@ -4490,6 +4626,7 @@ var $ZodTransform = /* @__PURE__ */ $constructor("$ZodTransform", (inst, def) =>
4490
4626
  const output = _out instanceof Promise ? _out : Promise.resolve(_out);
4491
4627
  return output.then((output2) => {
4492
4628
  payload.value = output2;
4629
+ payload.fallback = true;
4493
4630
  return payload;
4494
4631
  });
4495
4632
  }
@@ -4497,11 +4634,12 @@ var $ZodTransform = /* @__PURE__ */ $constructor("$ZodTransform", (inst, def) =>
4497
4634
  throw new $ZodAsyncError();
4498
4635
  }
4499
4636
  payload.value = _out;
4637
+ payload.fallback = true;
4500
4638
  return payload;
4501
4639
  };
4502
4640
  });
4503
4641
  function handleOptionalResult(result, input) {
4504
- if (result.issues.length && input === void 0) {
4642
+ if (input === void 0 && (result.issues.length || result.fallback)) {
4505
4643
  return { issues: [], value: void 0 };
4506
4644
  }
4507
4645
  return result;
@@ -4519,10 +4657,11 @@ var $ZodOptional = /* @__PURE__ */ $constructor("$ZodOptional", (inst, def) => {
4519
4657
  });
4520
4658
  inst._zod.parse = (payload, ctx) => {
4521
4659
  if (def.innerType._zod.optin === "optional") {
4660
+ const input = payload.value;
4522
4661
  const result = def.innerType._zod.run(payload, ctx);
4523
4662
  if (result instanceof Promise)
4524
- return result.then((r) => handleOptionalResult(r, payload.value));
4525
- return handleOptionalResult(result, payload.value);
4663
+ return result.then((r) => handleOptionalResult(r, input));
4664
+ return handleOptionalResult(result, input);
4526
4665
  }
4527
4666
  if (payload.value === void 0) {
4528
4667
  return payload;
@@ -4638,7 +4777,7 @@ var $ZodSuccess = /* @__PURE__ */ $constructor("$ZodSuccess", (inst, def) => {
4638
4777
  });
4639
4778
  var $ZodCatch = /* @__PURE__ */ $constructor("$ZodCatch", (inst, def) => {
4640
4779
  $ZodType.init(inst, def);
4641
- defineLazy(inst._zod, "optin", () => def.innerType._zod.optin);
4780
+ inst._zod.optin = "optional";
4642
4781
  defineLazy(inst._zod, "optout", () => def.innerType._zod.optout);
4643
4782
  defineLazy(inst._zod, "values", () => def.innerType._zod.values);
4644
4783
  inst._zod.parse = (payload, ctx) => {
@@ -4658,6 +4797,7 @@ var $ZodCatch = /* @__PURE__ */ $constructor("$ZodCatch", (inst, def) => {
4658
4797
  input: payload.value
4659
4798
  });
4660
4799
  payload.issues = [];
4800
+ payload.fallback = true;
4661
4801
  }
4662
4802
  return payload;
4663
4803
  });
@@ -4672,6 +4812,7 @@ var $ZodCatch = /* @__PURE__ */ $constructor("$ZodCatch", (inst, def) => {
4672
4812
  input: payload.value
4673
4813
  });
4674
4814
  payload.issues = [];
4815
+ payload.fallback = true;
4675
4816
  }
4676
4817
  return payload;
4677
4818
  };
@@ -4717,7 +4858,7 @@ function handlePipeResult(left, next, ctx) {
4717
4858
  left.aborted = true;
4718
4859
  return left;
4719
4860
  }
4720
- return next._zod.run({ value: left.value, issues: left.issues }, ctx);
4861
+ return next._zod.run({ value: left.value, issues: left.issues, fallback: left.fallback }, ctx);
4721
4862
  }
4722
4863
  var $ZodCodec = /* @__PURE__ */ $constructor("$ZodCodec", (inst, def) => {
4723
4864
  $ZodType.init(inst, def);
@@ -4769,6 +4910,9 @@ function handleCodecTxResult(left, value, nextSchema, ctx) {
4769
4910
  }
4770
4911
  return nextSchema._zod.run({ value, issues: left.issues }, ctx);
4771
4912
  }
4913
+ var $ZodPreprocess = /* @__PURE__ */ $constructor("$ZodPreprocess", (inst, def) => {
4914
+ $ZodPipe.init(inst, def);
4915
+ });
4772
4916
  var $ZodReadonly = /* @__PURE__ */ $constructor("$ZodReadonly", (inst, def) => {
4773
4917
  $ZodType.init(inst, def);
4774
4918
  defineLazy(inst._zod, "propValues", () => def.innerType._zod.propValues);
@@ -4920,7 +5064,12 @@ var $ZodPromise = /* @__PURE__ */ $constructor("$ZodPromise", (inst, def) => {
4920
5064
  });
4921
5065
  var $ZodLazy = /* @__PURE__ */ $constructor("$ZodLazy", (inst, def) => {
4922
5066
  $ZodType.init(inst, def);
4923
- defineLazy(inst._zod, "innerType", () => def.getter());
5067
+ defineLazy(inst._zod, "innerType", () => {
5068
+ const d = def;
5069
+ if (!d._cachedInner)
5070
+ d._cachedInner = def.getter();
5071
+ return d._cachedInner;
5072
+ });
4924
5073
  defineLazy(inst._zod, "pattern", () => inst._zod.innerType?._zod?.pattern);
4925
5074
  defineLazy(inst._zod, "propValues", () => inst._zod.innerType?._zod?.propValues);
4926
5075
  defineLazy(inst._zod, "optin", () => inst._zod.innerType?._zod?.optin ?? void 0);
@@ -4975,6 +5124,7 @@ __export(locales_exports, {
4975
5124
  cs: () => cs_default,
4976
5125
  da: () => da_default,
4977
5126
  de: () => de_default,
5127
+ el: () => el_default,
4978
5128
  en: () => en_default,
4979
5129
  eo: () => eo_default,
4980
5130
  es: () => es_default,
@@ -4983,6 +5133,7 @@ __export(locales_exports, {
4983
5133
  fr: () => fr_default,
4984
5134
  frCA: () => fr_CA_default,
4985
5135
  he: () => he_default,
5136
+ hr: () => hr_default,
4986
5137
  hu: () => hu_default,
4987
5138
  hy: () => hy_default,
4988
5139
  id: () => id_default,
@@ -5002,6 +5153,7 @@ __export(locales_exports, {
5002
5153
  pl: () => pl_default,
5003
5154
  ps: () => ps_default,
5004
5155
  pt: () => pt_default,
5156
+ ro: () => ro_default,
5005
5157
  ru: () => ru_default,
5006
5158
  sl: () => sl_default,
5007
5159
  sv: () => sv_default,
@@ -5955,8 +6107,118 @@ function de_default() {
5955
6107
  };
5956
6108
  }
5957
6109
 
5958
- // ../../node_modules/zod/v4/locales/en.js
6110
+ // ../../node_modules/zod/v4/locales/el.js
5959
6111
  var error9 = () => {
6112
+ const Sizable = {
6113
+ string: { unit: "\u03C7\u03B1\u03C1\u03B1\u03BA\u03C4\u03AE\u03C1\u03B5\u03C2", verb: "\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9" },
6114
+ file: { unit: "bytes", verb: "\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9" },
6115
+ array: { unit: "\u03C3\u03C4\u03BF\u03B9\u03C7\u03B5\u03AF\u03B1", verb: "\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9" },
6116
+ set: { unit: "\u03C3\u03C4\u03BF\u03B9\u03C7\u03B5\u03AF\u03B1", verb: "\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9" },
6117
+ map: { unit: "\u03BA\u03B1\u03C4\u03B1\u03C7\u03C9\u03C1\u03AE\u03C3\u03B5\u03B9\u03C2", verb: "\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9" }
6118
+ };
6119
+ function getSizing(origin) {
6120
+ return Sizable[origin] ?? null;
6121
+ }
6122
+ const FormatDictionary = {
6123
+ regex: "\u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2",
6124
+ email: "\u03B4\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 email",
6125
+ url: "URL",
6126
+ emoji: "emoji",
6127
+ uuid: "UUID",
6128
+ uuidv4: "UUIDv4",
6129
+ uuidv6: "UUIDv6",
6130
+ nanoid: "nanoid",
6131
+ guid: "GUID",
6132
+ cuid: "cuid",
6133
+ cuid2: "cuid2",
6134
+ ulid: "ULID",
6135
+ xid: "XID",
6136
+ ksuid: "KSUID",
6137
+ datetime: "ISO \u03B7\u03BC\u03B5\u03C1\u03BF\u03BC\u03B7\u03BD\u03AF\u03B1 \u03BA\u03B1\u03B9 \u03CE\u03C1\u03B1",
6138
+ date: "ISO \u03B7\u03BC\u03B5\u03C1\u03BF\u03BC\u03B7\u03BD\u03AF\u03B1",
6139
+ time: "ISO \u03CE\u03C1\u03B1",
6140
+ duration: "ISO \u03B4\u03B9\u03AC\u03C1\u03BA\u03B5\u03B9\u03B1",
6141
+ ipv4: "\u03B4\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 IPv4",
6142
+ ipv6: "\u03B4\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 IPv6",
6143
+ mac: "\u03B4\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 MAC",
6144
+ cidrv4: "\u03B5\u03CD\u03C1\u03BF\u03C2 IPv4",
6145
+ cidrv6: "\u03B5\u03CD\u03C1\u03BF\u03C2 IPv6",
6146
+ base64: "\u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC \u03BA\u03C9\u03B4\u03B9\u03BA\u03BF\u03C0\u03BF\u03B9\u03B7\u03BC\u03AD\u03BD\u03B7 \u03C3\u03B5 base64",
6147
+ base64url: "\u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC \u03BA\u03C9\u03B4\u03B9\u03BA\u03BF\u03C0\u03BF\u03B9\u03B7\u03BC\u03AD\u03BD\u03B7 \u03C3\u03B5 base64url",
6148
+ json_string: "\u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC JSON",
6149
+ e164: "\u03B1\u03C1\u03B9\u03B8\u03BC\u03CC\u03C2 E.164",
6150
+ jwt: "JWT",
6151
+ template_literal: "\u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2"
6152
+ };
6153
+ const TypeDictionary = {
6154
+ nan: "NaN"
6155
+ };
6156
+ return (issue2) => {
6157
+ switch (issue2.code) {
6158
+ case "invalid_type": {
6159
+ const expected = TypeDictionary[issue2.expected] ?? issue2.expected;
6160
+ const receivedType = parsedType(issue2.input);
6161
+ const received = TypeDictionary[receivedType] ?? receivedType;
6162
+ if (typeof issue2.expected === "string" && /^[A-Z]/.test(issue2.expected)) {
6163
+ return `\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD instanceof ${issue2.expected}, \u03BB\u03AE\u03C6\u03B8\u03B7\u03BA\u03B5 ${received}`;
6164
+ }
6165
+ return `\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${expected}, \u03BB\u03AE\u03C6\u03B8\u03B7\u03BA\u03B5 ${received}`;
6166
+ }
6167
+ case "invalid_value":
6168
+ if (issue2.values.length === 1)
6169
+ return `\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${stringifyPrimitive(issue2.values[0])}`;
6170
+ return `\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03C0\u03B9\u03BB\u03BF\u03B3\u03AE: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD \u03AD\u03BD\u03B1 \u03B1\u03C0\u03CC ${joinValues(issue2.values, "|")}`;
6171
+ case "too_big": {
6172
+ const adj = issue2.inclusive ? "<=" : "<";
6173
+ const sizing = getSizing(issue2.origin);
6174
+ if (sizing)
6175
+ return `\u03A0\u03BF\u03BB\u03CD \u03BC\u03B5\u03B3\u03AC\u03BB\u03BF: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${issue2.origin ?? "\u03C4\u03B9\u03BC\u03AE"} \u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9 ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "\u03C3\u03C4\u03BF\u03B9\u03C7\u03B5\u03AF\u03B1"}`;
6176
+ return `\u03A0\u03BF\u03BB\u03CD \u03BC\u03B5\u03B3\u03AC\u03BB\u03BF: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${issue2.origin ?? "\u03C4\u03B9\u03BC\u03AE"} \u03BD\u03B1 \u03B5\u03AF\u03BD\u03B1\u03B9 ${adj}${issue2.maximum.toString()}`;
6177
+ }
6178
+ case "too_small": {
6179
+ const adj = issue2.inclusive ? ">=" : ">";
6180
+ const sizing = getSizing(issue2.origin);
6181
+ if (sizing) {
6182
+ return `\u03A0\u03BF\u03BB\u03CD \u03BC\u03B9\u03BA\u03C1\u03CC: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${issue2.origin} \u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9 ${adj}${issue2.minimum.toString()} ${sizing.unit}`;
6183
+ }
6184
+ return `\u03A0\u03BF\u03BB\u03CD \u03BC\u03B9\u03BA\u03C1\u03CC: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${issue2.origin} \u03BD\u03B1 \u03B5\u03AF\u03BD\u03B1\u03B9 ${adj}${issue2.minimum.toString()}`;
6185
+ }
6186
+ case "invalid_format": {
6187
+ const _issue = issue2;
6188
+ if (_issue.format === "starts_with") {
6189
+ return `\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC: \u03C0\u03C1\u03AD\u03C0\u03B5\u03B9 \u03BD\u03B1 \u03BE\u03B5\u03BA\u03B9\u03BD\u03AC \u03BC\u03B5 "${_issue.prefix}"`;
6190
+ }
6191
+ if (_issue.format === "ends_with")
6192
+ return `\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC: \u03C0\u03C1\u03AD\u03C0\u03B5\u03B9 \u03BD\u03B1 \u03C4\u03B5\u03BB\u03B5\u03B9\u03CE\u03BD\u03B5\u03B9 \u03BC\u03B5 "${_issue.suffix}"`;
6193
+ if (_issue.format === "includes")
6194
+ return `\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC: \u03C0\u03C1\u03AD\u03C0\u03B5\u03B9 \u03BD\u03B1 \u03C0\u03B5\u03C1\u03B9\u03AD\u03C7\u03B5\u03B9 "${_issue.includes}"`;
6195
+ if (_issue.format === "regex")
6196
+ return `\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC: \u03C0\u03C1\u03AD\u03C0\u03B5\u03B9 \u03BD\u03B1 \u03C4\u03B1\u03B9\u03C1\u03B9\u03AC\u03B6\u03B5\u03B9 \u03BC\u03B5 \u03C4\u03BF \u03BC\u03BF\u03C4\u03AF\u03B2\u03BF ${_issue.pattern}`;
6197
+ return `\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03BF: ${FormatDictionary[_issue.format] ?? issue2.format}`;
6198
+ }
6199
+ case "not_multiple_of":
6200
+ return `\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03BF\u03C2 \u03B1\u03C1\u03B9\u03B8\u03BC\u03CC\u03C2: \u03C0\u03C1\u03AD\u03C0\u03B5\u03B9 \u03BD\u03B1 \u03B5\u03AF\u03BD\u03B1\u03B9 \u03C0\u03BF\u03BB\u03BB\u03B1\u03C0\u03BB\u03AC\u03C3\u03B9\u03BF \u03C4\u03BF\u03C5 ${issue2.divisor}`;
6201
+ case "unrecognized_keys":
6202
+ return `\u0386\u03B3\u03BD\u03C9\u03C3\u03C4${issue2.keys.length > 1 ? "\u03B1" : "\u03BF"} \u03BA\u03BB\u03B5\u03B9\u03B4${issue2.keys.length > 1 ? "\u03B9\u03AC" : "\u03AF"}: ${joinValues(issue2.keys, ", ")}`;
6203
+ case "invalid_key":
6204
+ return `\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03BF \u03BA\u03BB\u03B5\u03B9\u03B4\u03AF \u03C3\u03C4\u03BF ${issue2.origin}`;
6205
+ case "invalid_union":
6206
+ return "\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2";
6207
+ case "invalid_element":
6208
+ return `\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C4\u03B9\u03BC\u03AE \u03C3\u03C4\u03BF ${issue2.origin}`;
6209
+ default:
6210
+ return `\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2`;
6211
+ }
6212
+ };
6213
+ };
6214
+ function el_default() {
6215
+ return {
6216
+ localeError: error9()
6217
+ };
6218
+ }
6219
+
6220
+ // ../../node_modules/zod/v4/locales/en.js
6221
+ var error10 = () => {
5960
6222
  const Sizable = {
5961
6223
  string: { unit: "characters", verb: "to have" },
5962
6224
  file: { unit: "bytes", verb: "to have" },
@@ -6050,6 +6312,10 @@ var error9 = () => {
6050
6312
  case "invalid_key":
6051
6313
  return `Invalid key in ${issue2.origin}`;
6052
6314
  case "invalid_union":
6315
+ if (issue2.options && Array.isArray(issue2.options) && issue2.options.length > 0) {
6316
+ const opts = issue2.options.map((o) => `'${o}'`).join(" | ");
6317
+ return `Invalid discriminator value. Expected ${opts}`;
6318
+ }
6053
6319
  return "Invalid input";
6054
6320
  case "invalid_element":
6055
6321
  return `Invalid value in ${issue2.origin}`;
@@ -6060,12 +6326,12 @@ var error9 = () => {
6060
6326
  };
6061
6327
  function en_default() {
6062
6328
  return {
6063
- localeError: error9()
6329
+ localeError: error10()
6064
6330
  };
6065
6331
  }
6066
6332
 
6067
6333
  // ../../node_modules/zod/v4/locales/eo.js
6068
- var error10 = () => {
6334
+ var error11 = () => {
6069
6335
  const Sizable = {
6070
6336
  string: { unit: "karaktrojn", verb: "havi" },
6071
6337
  file: { unit: "bajtojn", verb: "havi" },
@@ -6170,12 +6436,12 @@ var error10 = () => {
6170
6436
  };
6171
6437
  function eo_default() {
6172
6438
  return {
6173
- localeError: error10()
6439
+ localeError: error11()
6174
6440
  };
6175
6441
  }
6176
6442
 
6177
6443
  // ../../node_modules/zod/v4/locales/es.js
6178
- var error11 = () => {
6444
+ var error12 = () => {
6179
6445
  const Sizable = {
6180
6446
  string: { unit: "caracteres", verb: "tener" },
6181
6447
  file: { unit: "bytes", verb: "tener" },
@@ -6303,12 +6569,12 @@ var error11 = () => {
6303
6569
  };
6304
6570
  function es_default() {
6305
6571
  return {
6306
- localeError: error11()
6572
+ localeError: error12()
6307
6573
  };
6308
6574
  }
6309
6575
 
6310
6576
  // ../../node_modules/zod/v4/locales/fa.js
6311
- var error12 = () => {
6577
+ var error13 = () => {
6312
6578
  const Sizable = {
6313
6579
  string: { unit: "\u06A9\u0627\u0631\u0627\u06A9\u062A\u0631", verb: "\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F" },
6314
6580
  file: { unit: "\u0628\u0627\u06CC\u062A", verb: "\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F" },
@@ -6418,12 +6684,12 @@ var error12 = () => {
6418
6684
  };
6419
6685
  function fa_default() {
6420
6686
  return {
6421
- localeError: error12()
6687
+ localeError: error13()
6422
6688
  };
6423
6689
  }
6424
6690
 
6425
6691
  // ../../node_modules/zod/v4/locales/fi.js
6426
- var error13 = () => {
6692
+ var error14 = () => {
6427
6693
  const Sizable = {
6428
6694
  string: { unit: "merkki\xE4", subject: "merkkijonon" },
6429
6695
  file: { unit: "tavua", subject: "tiedoston" },
@@ -6531,12 +6797,12 @@ var error13 = () => {
6531
6797
  };
6532
6798
  function fi_default() {
6533
6799
  return {
6534
- localeError: error13()
6800
+ localeError: error14()
6535
6801
  };
6536
6802
  }
6537
6803
 
6538
6804
  // ../../node_modules/zod/v4/locales/fr.js
6539
- var error14 = () => {
6805
+ var error15 = () => {
6540
6806
  const Sizable = {
6541
6807
  string: { unit: "caract\xE8res", verb: "avoir" },
6542
6808
  file: { unit: "octets", verb: "avoir" },
@@ -6577,9 +6843,27 @@ var error14 = () => {
6577
6843
  template_literal: "entr\xE9e"
6578
6844
  };
6579
6845
  const TypeDictionary = {
6580
- nan: "NaN",
6846
+ string: "cha\xEEne",
6581
6847
  number: "nombre",
6582
- array: "tableau"
6848
+ int: "entier",
6849
+ boolean: "bool\xE9en",
6850
+ bigint: "grand entier",
6851
+ symbol: "symbole",
6852
+ undefined: "ind\xE9fini",
6853
+ null: "null",
6854
+ never: "jamais",
6855
+ void: "vide",
6856
+ date: "date",
6857
+ array: "tableau",
6858
+ object: "objet",
6859
+ tuple: "tuple",
6860
+ record: "enregistrement",
6861
+ map: "carte",
6862
+ set: "ensemble",
6863
+ file: "fichier",
6864
+ nonoptional: "non-optionnel",
6865
+ nan: "NaN",
6866
+ function: "fonction"
6583
6867
  };
6584
6868
  return (issue2) => {
6585
6869
  switch (issue2.code) {
@@ -6600,16 +6884,15 @@ var error14 = () => {
6600
6884
  const adj = issue2.inclusive ? "<=" : "<";
6601
6885
  const sizing = getSizing(issue2.origin);
6602
6886
  if (sizing)
6603
- return `Trop grand : ${issue2.origin ?? "valeur"} doit ${sizing.verb} ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "\xE9l\xE9ment(s)"}`;
6604
- return `Trop grand : ${issue2.origin ?? "valeur"} doit \xEAtre ${adj}${issue2.maximum.toString()}`;
6887
+ return `Trop grand : ${TypeDictionary[issue2.origin] ?? "valeur"} doit ${sizing.verb} ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "\xE9l\xE9ment(s)"}`;
6888
+ return `Trop grand : ${TypeDictionary[issue2.origin] ?? "valeur"} doit \xEAtre ${adj}${issue2.maximum.toString()}`;
6605
6889
  }
6606
6890
  case "too_small": {
6607
6891
  const adj = issue2.inclusive ? ">=" : ">";
6608
6892
  const sizing = getSizing(issue2.origin);
6609
- if (sizing) {
6610
- return `Trop petit : ${issue2.origin} doit ${sizing.verb} ${adj}${issue2.minimum.toString()} ${sizing.unit}`;
6611
- }
6612
- return `Trop petit : ${issue2.origin} doit \xEAtre ${adj}${issue2.minimum.toString()}`;
6893
+ if (sizing)
6894
+ return `Trop petit : ${TypeDictionary[issue2.origin] ?? "valeur"} doit ${sizing.verb} ${adj}${issue2.minimum.toString()} ${sizing.unit}`;
6895
+ return `Trop petit : ${TypeDictionary[issue2.origin] ?? "valeur"} doit \xEAtre ${adj}${issue2.minimum.toString()}`;
6613
6896
  }
6614
6897
  case "invalid_format": {
6615
6898
  const _issue = issue2;
@@ -6640,12 +6923,12 @@ var error14 = () => {
6640
6923
  };
6641
6924
  function fr_default() {
6642
6925
  return {
6643
- localeError: error14()
6926
+ localeError: error15()
6644
6927
  };
6645
6928
  }
6646
6929
 
6647
6930
  // ../../node_modules/zod/v4/locales/fr-CA.js
6648
- var error15 = () => {
6931
+ var error16 = () => {
6649
6932
  const Sizable = {
6650
6933
  string: { unit: "caract\xE8res", verb: "avoir" },
6651
6934
  file: { unit: "octets", verb: "avoir" },
@@ -6748,12 +7031,12 @@ var error15 = () => {
6748
7031
  };
6749
7032
  function fr_CA_default() {
6750
7033
  return {
6751
- localeError: error15()
7034
+ localeError: error16()
6752
7035
  };
6753
7036
  }
6754
7037
 
6755
7038
  // ../../node_modules/zod/v4/locales/he.js
6756
- var error16 = () => {
7039
+ var error17 = () => {
6757
7040
  const TypeNames = {
6758
7041
  string: { label: "\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA", gender: "f" },
6759
7042
  number: { label: "\u05DE\u05E1\u05E4\u05E8", gender: "m" },
@@ -6943,24 +7226,24 @@ var error16 = () => {
6943
7226
  };
6944
7227
  function he_default() {
6945
7228
  return {
6946
- localeError: error16()
7229
+ localeError: error17()
6947
7230
  };
6948
7231
  }
6949
7232
 
6950
- // ../../node_modules/zod/v4/locales/hu.js
6951
- var error17 = () => {
7233
+ // ../../node_modules/zod/v4/locales/hr.js
7234
+ var error18 = () => {
6952
7235
  const Sizable = {
6953
- string: { unit: "karakter", verb: "legyen" },
6954
- file: { unit: "byte", verb: "legyen" },
6955
- array: { unit: "elem", verb: "legyen" },
6956
- set: { unit: "elem", verb: "legyen" }
7236
+ string: { unit: "znakova", verb: "imati" },
7237
+ file: { unit: "bajtova", verb: "imati" },
7238
+ array: { unit: "stavki", verb: "imati" },
7239
+ set: { unit: "stavki", verb: "imati" }
6957
7240
  };
6958
7241
  function getSizing(origin) {
6959
7242
  return Sizable[origin] ?? null;
6960
7243
  }
6961
7244
  const FormatDictionary = {
6962
- regex: "bemenet",
6963
- email: "email c\xEDm",
7245
+ regex: "unos",
7246
+ email: "email adresa",
6964
7247
  url: "URL",
6965
7248
  emoji: "emoji",
6966
7249
  uuid: "UUID",
@@ -6973,25 +7256,37 @@ var error17 = () => {
6973
7256
  ulid: "ULID",
6974
7257
  xid: "XID",
6975
7258
  ksuid: "KSUID",
6976
- datetime: "ISO id\u0151b\xE9lyeg",
6977
- date: "ISO d\xE1tum",
6978
- time: "ISO id\u0151",
6979
- duration: "ISO id\u0151intervallum",
6980
- ipv4: "IPv4 c\xEDm",
6981
- ipv6: "IPv6 c\xEDm",
6982
- cidrv4: "IPv4 tartom\xE1ny",
6983
- cidrv6: "IPv6 tartom\xE1ny",
6984
- base64: "base64-k\xF3dolt string",
6985
- base64url: "base64url-k\xF3dolt string",
6986
- json_string: "JSON string",
6987
- e164: "E.164 sz\xE1m",
7259
+ datetime: "ISO datum i vrijeme",
7260
+ date: "ISO datum",
7261
+ time: "ISO vrijeme",
7262
+ duration: "ISO trajanje",
7263
+ ipv4: "IPv4 adresa",
7264
+ ipv6: "IPv6 adresa",
7265
+ cidrv4: "IPv4 raspon",
7266
+ cidrv6: "IPv6 raspon",
7267
+ base64: "base64 kodirani tekst",
7268
+ base64url: "base64url kodirani tekst",
7269
+ json_string: "JSON tekst",
7270
+ e164: "E.164 broj",
6988
7271
  jwt: "JWT",
6989
- template_literal: "bemenet"
7272
+ template_literal: "unos"
6990
7273
  };
6991
7274
  const TypeDictionary = {
6992
7275
  nan: "NaN",
6993
- number: "sz\xE1m",
6994
- array: "t\xF6mb"
7276
+ string: "tekst",
7277
+ number: "broj",
7278
+ boolean: "boolean",
7279
+ array: "niz",
7280
+ object: "objekt",
7281
+ set: "skup",
7282
+ file: "datoteka",
7283
+ date: "datum",
7284
+ bigint: "bigint",
7285
+ symbol: "simbol",
7286
+ undefined: "undefined",
7287
+ null: "null",
7288
+ function: "funkcija",
7289
+ map: "mapa"
6995
7290
  };
6996
7291
  return (issue2) => {
6997
7292
  switch (issue2.code) {
@@ -7000,20 +7295,131 @@ var error17 = () => {
7000
7295
  const receivedType = parsedType(issue2.input);
7001
7296
  const received = TypeDictionary[receivedType] ?? receivedType;
7002
7297
  if (/^[A-Z]/.test(issue2.expected)) {
7003
- return `\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k instanceof ${issue2.expected}, a kapott \xE9rt\xE9k ${received}`;
7298
+ return `Neispravan unos: o\u010Dekuje se instanceof ${issue2.expected}, a primljeno je ${received}`;
7004
7299
  }
7005
- return `\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k ${expected}, a kapott \xE9rt\xE9k ${received}`;
7300
+ return `Neispravan unos: o\u010Dekuje se ${expected}, a primljeno je ${received}`;
7006
7301
  }
7007
7302
  case "invalid_value":
7008
7303
  if (issue2.values.length === 1)
7009
- return `\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k ${stringifyPrimitive(issue2.values[0])}`;
7010
- return `\xC9rv\xE9nytelen opci\xF3: valamelyik \xE9rt\xE9k v\xE1rt ${joinValues(issue2.values, "|")}`;
7304
+ return `Neispravna vrijednost: o\u010Dekivano ${stringifyPrimitive(issue2.values[0])}`;
7305
+ return `Neispravna opcija: o\u010Dekivano jedno od ${joinValues(issue2.values, "|")}`;
7011
7306
  case "too_big": {
7012
7307
  const adj = issue2.inclusive ? "<=" : "<";
7013
7308
  const sizing = getSizing(issue2.origin);
7309
+ const origin = TypeDictionary[issue2.origin] ?? issue2.origin;
7014
7310
  if (sizing)
7015
- return `T\xFAl nagy: ${issue2.origin ?? "\xE9rt\xE9k"} m\xE9rete t\xFAl nagy ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "elem"}`;
7016
- return `T\xFAl nagy: a bemeneti \xE9rt\xE9k ${issue2.origin ?? "\xE9rt\xE9k"} t\xFAl nagy: ${adj}${issue2.maximum.toString()}`;
7311
+ return `Preveliko: o\u010Dekivano da ${origin ?? "vrijednost"} ima ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "elemenata"}`;
7312
+ return `Preveliko: o\u010Dekivano da ${origin ?? "vrijednost"} bude ${adj}${issue2.maximum.toString()}`;
7313
+ }
7314
+ case "too_small": {
7315
+ const adj = issue2.inclusive ? ">=" : ">";
7316
+ const sizing = getSizing(issue2.origin);
7317
+ const origin = TypeDictionary[issue2.origin] ?? issue2.origin;
7318
+ if (sizing) {
7319
+ return `Premalo: o\u010Dekivano da ${origin} ima ${adj}${issue2.minimum.toString()} ${sizing.unit}`;
7320
+ }
7321
+ return `Premalo: o\u010Dekivano da ${origin} bude ${adj}${issue2.minimum.toString()}`;
7322
+ }
7323
+ case "invalid_format": {
7324
+ const _issue = issue2;
7325
+ if (_issue.format === "starts_with")
7326
+ return `Neispravan tekst: mora zapo\u010Dinjati s "${_issue.prefix}"`;
7327
+ if (_issue.format === "ends_with")
7328
+ return `Neispravan tekst: mora zavr\u0161avati s "${_issue.suffix}"`;
7329
+ if (_issue.format === "includes")
7330
+ return `Neispravan tekst: mora sadr\u017Eavati "${_issue.includes}"`;
7331
+ if (_issue.format === "regex")
7332
+ return `Neispravan tekst: mora odgovarati uzorku ${_issue.pattern}`;
7333
+ return `Neispravna ${FormatDictionary[_issue.format] ?? issue2.format}`;
7334
+ }
7335
+ case "not_multiple_of":
7336
+ return `Neispravan broj: mora biti vi\u0161ekratnik od ${issue2.divisor}`;
7337
+ case "unrecognized_keys":
7338
+ return `Neprepoznat${issue2.keys.length > 1 ? "i klju\u010Devi" : " klju\u010D"}: ${joinValues(issue2.keys, ", ")}`;
7339
+ case "invalid_key":
7340
+ return `Neispravan klju\u010D u ${TypeDictionary[issue2.origin] ?? issue2.origin}`;
7341
+ case "invalid_union":
7342
+ return "Neispravan unos";
7343
+ case "invalid_element":
7344
+ return `Neispravna vrijednost u ${TypeDictionary[issue2.origin] ?? issue2.origin}`;
7345
+ default:
7346
+ return `Neispravan unos`;
7347
+ }
7348
+ };
7349
+ };
7350
+ function hr_default() {
7351
+ return {
7352
+ localeError: error18()
7353
+ };
7354
+ }
7355
+
7356
+ // ../../node_modules/zod/v4/locales/hu.js
7357
+ var error19 = () => {
7358
+ const Sizable = {
7359
+ string: { unit: "karakter", verb: "legyen" },
7360
+ file: { unit: "byte", verb: "legyen" },
7361
+ array: { unit: "elem", verb: "legyen" },
7362
+ set: { unit: "elem", verb: "legyen" }
7363
+ };
7364
+ function getSizing(origin) {
7365
+ return Sizable[origin] ?? null;
7366
+ }
7367
+ const FormatDictionary = {
7368
+ regex: "bemenet",
7369
+ email: "email c\xEDm",
7370
+ url: "URL",
7371
+ emoji: "emoji",
7372
+ uuid: "UUID",
7373
+ uuidv4: "UUIDv4",
7374
+ uuidv6: "UUIDv6",
7375
+ nanoid: "nanoid",
7376
+ guid: "GUID",
7377
+ cuid: "cuid",
7378
+ cuid2: "cuid2",
7379
+ ulid: "ULID",
7380
+ xid: "XID",
7381
+ ksuid: "KSUID",
7382
+ datetime: "ISO id\u0151b\xE9lyeg",
7383
+ date: "ISO d\xE1tum",
7384
+ time: "ISO id\u0151",
7385
+ duration: "ISO id\u0151intervallum",
7386
+ ipv4: "IPv4 c\xEDm",
7387
+ ipv6: "IPv6 c\xEDm",
7388
+ cidrv4: "IPv4 tartom\xE1ny",
7389
+ cidrv6: "IPv6 tartom\xE1ny",
7390
+ base64: "base64-k\xF3dolt string",
7391
+ base64url: "base64url-k\xF3dolt string",
7392
+ json_string: "JSON string",
7393
+ e164: "E.164 sz\xE1m",
7394
+ jwt: "JWT",
7395
+ template_literal: "bemenet"
7396
+ };
7397
+ const TypeDictionary = {
7398
+ nan: "NaN",
7399
+ number: "sz\xE1m",
7400
+ array: "t\xF6mb"
7401
+ };
7402
+ return (issue2) => {
7403
+ switch (issue2.code) {
7404
+ case "invalid_type": {
7405
+ const expected = TypeDictionary[issue2.expected] ?? issue2.expected;
7406
+ const receivedType = parsedType(issue2.input);
7407
+ const received = TypeDictionary[receivedType] ?? receivedType;
7408
+ if (/^[A-Z]/.test(issue2.expected)) {
7409
+ return `\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k instanceof ${issue2.expected}, a kapott \xE9rt\xE9k ${received}`;
7410
+ }
7411
+ return `\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k ${expected}, a kapott \xE9rt\xE9k ${received}`;
7412
+ }
7413
+ case "invalid_value":
7414
+ if (issue2.values.length === 1)
7415
+ return `\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k ${stringifyPrimitive(issue2.values[0])}`;
7416
+ return `\xC9rv\xE9nytelen opci\xF3: valamelyik \xE9rt\xE9k v\xE1rt ${joinValues(issue2.values, "|")}`;
7417
+ case "too_big": {
7418
+ const adj = issue2.inclusive ? "<=" : "<";
7419
+ const sizing = getSizing(issue2.origin);
7420
+ if (sizing)
7421
+ return `T\xFAl nagy: ${issue2.origin ?? "\xE9rt\xE9k"} m\xE9rete t\xFAl nagy ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "elem"}`;
7422
+ return `T\xFAl nagy: a bemeneti \xE9rt\xE9k ${issue2.origin ?? "\xE9rt\xE9k"} t\xFAl nagy: ${adj}${issue2.maximum.toString()}`;
7017
7423
  }
7018
7424
  case "too_small": {
7019
7425
  const adj = issue2.inclusive ? ">=" : ">";
@@ -7052,7 +7458,7 @@ var error17 = () => {
7052
7458
  };
7053
7459
  function hu_default() {
7054
7460
  return {
7055
- localeError: error17()
7461
+ localeError: error19()
7056
7462
  };
7057
7463
  }
7058
7464
 
@@ -7067,7 +7473,7 @@ function withDefiniteArticle(word) {
7067
7473
  const lastChar = word[word.length - 1];
7068
7474
  return word + (vowels.includes(lastChar) ? "\u0576" : "\u0568");
7069
7475
  }
7070
- var error18 = () => {
7476
+ var error20 = () => {
7071
7477
  const Sizable = {
7072
7478
  string: {
7073
7479
  unit: {
@@ -7200,12 +7606,12 @@ var error18 = () => {
7200
7606
  };
7201
7607
  function hy_default() {
7202
7608
  return {
7203
- localeError: error18()
7609
+ localeError: error20()
7204
7610
  };
7205
7611
  }
7206
7612
 
7207
7613
  // ../../node_modules/zod/v4/locales/id.js
7208
- var error19 = () => {
7614
+ var error21 = () => {
7209
7615
  const Sizable = {
7210
7616
  string: { unit: "karakter", verb: "memiliki" },
7211
7617
  file: { unit: "byte", verb: "memiliki" },
@@ -7307,12 +7713,12 @@ var error19 = () => {
7307
7713
  };
7308
7714
  function id_default() {
7309
7715
  return {
7310
- localeError: error19()
7716
+ localeError: error21()
7311
7717
  };
7312
7718
  }
7313
7719
 
7314
7720
  // ../../node_modules/zod/v4/locales/is.js
7315
- var error20 = () => {
7721
+ var error22 = () => {
7316
7722
  const Sizable = {
7317
7723
  string: { unit: "stafi", verb: "a\xF0 hafa" },
7318
7724
  file: { unit: "b\xE6ti", verb: "a\xF0 hafa" },
@@ -7417,12 +7823,12 @@ var error20 = () => {
7417
7823
  };
7418
7824
  function is_default() {
7419
7825
  return {
7420
- localeError: error20()
7826
+ localeError: error22()
7421
7827
  };
7422
7828
  }
7423
7829
 
7424
7830
  // ../../node_modules/zod/v4/locales/it.js
7425
- var error21 = () => {
7831
+ var error23 = () => {
7426
7832
  const Sizable = {
7427
7833
  string: { unit: "caratteri", verb: "avere" },
7428
7834
  file: { unit: "byte", verb: "avere" },
@@ -7507,7 +7913,7 @@ var error21 = () => {
7507
7913
  return `Stringa non valida: deve includere "${_issue.includes}"`;
7508
7914
  if (_issue.format === "regex")
7509
7915
  return `Stringa non valida: deve corrispondere al pattern ${_issue.pattern}`;
7510
- return `Invalid ${FormatDictionary[_issue.format] ?? issue2.format}`;
7916
+ return `Input non valido: ${FormatDictionary[_issue.format] ?? issue2.format}`;
7511
7917
  }
7512
7918
  case "not_multiple_of":
7513
7919
  return `Numero non valido: deve essere un multiplo di ${issue2.divisor}`;
@@ -7526,12 +7932,12 @@ var error21 = () => {
7526
7932
  };
7527
7933
  function it_default() {
7528
7934
  return {
7529
- localeError: error21()
7935
+ localeError: error23()
7530
7936
  };
7531
7937
  }
7532
7938
 
7533
7939
  // ../../node_modules/zod/v4/locales/ja.js
7534
- var error22 = () => {
7940
+ var error24 = () => {
7535
7941
  const Sizable = {
7536
7942
  string: { unit: "\u6587\u5B57", verb: "\u3067\u3042\u308B" },
7537
7943
  file: { unit: "\u30D0\u30A4\u30C8", verb: "\u3067\u3042\u308B" },
@@ -7634,12 +8040,12 @@ var error22 = () => {
7634
8040
  };
7635
8041
  function ja_default() {
7636
8042
  return {
7637
- localeError: error22()
8043
+ localeError: error24()
7638
8044
  };
7639
8045
  }
7640
8046
 
7641
8047
  // ../../node_modules/zod/v4/locales/ka.js
7642
- var error23 = () => {
8048
+ var error25 = () => {
7643
8049
  const Sizable = {
7644
8050
  string: { unit: "\u10E1\u10D8\u10DB\u10D1\u10DD\u10DA\u10DD", verb: "\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1" },
7645
8051
  file: { unit: "\u10D1\u10D0\u10D8\u10E2\u10D8", verb: "\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1" },
@@ -7672,9 +8078,9 @@ var error23 = () => {
7672
8078
  ipv6: "IPv6 \u10DB\u10D8\u10E1\u10D0\u10DB\u10D0\u10E0\u10D7\u10D8",
7673
8079
  cidrv4: "IPv4 \u10D3\u10D8\u10D0\u10DE\u10D0\u10D6\u10DD\u10DC\u10D8",
7674
8080
  cidrv6: "IPv6 \u10D3\u10D8\u10D0\u10DE\u10D0\u10D6\u10DD\u10DC\u10D8",
7675
- base64: "base64-\u10D9\u10DD\u10D3\u10D8\u10E0\u10D4\u10D1\u10E3\u10DA\u10D8 \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8",
7676
- base64url: "base64url-\u10D9\u10DD\u10D3\u10D8\u10E0\u10D4\u10D1\u10E3\u10DA\u10D8 \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8",
7677
- json_string: "JSON \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8",
8081
+ base64: "base64-\u10D9\u10DD\u10D3\u10D8\u10E0\u10D4\u10D1\u10E3\u10DA\u10D8 \u10D5\u10D4\u10DA\u10D8",
8082
+ base64url: "base64url-\u10D9\u10DD\u10D3\u10D8\u10E0\u10D4\u10D1\u10E3\u10DA\u10D8 \u10D5\u10D4\u10DA\u10D8",
8083
+ json_string: "JSON \u10D5\u10D4\u10DA\u10D8",
7678
8084
  e164: "E.164 \u10DC\u10DD\u10DB\u10D4\u10E0\u10D8",
7679
8085
  jwt: "JWT",
7680
8086
  template_literal: "\u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0"
@@ -7682,7 +8088,7 @@ var error23 = () => {
7682
8088
  const TypeDictionary = {
7683
8089
  nan: "NaN",
7684
8090
  number: "\u10E0\u10D8\u10EA\u10EE\u10D5\u10D8",
7685
- string: "\u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8",
8091
+ string: "\u10D5\u10D4\u10DA\u10D8",
7686
8092
  boolean: "\u10D1\u10E3\u10DA\u10D4\u10D0\u10DC\u10D8",
7687
8093
  function: "\u10E4\u10E3\u10DC\u10E5\u10EA\u10D8\u10D0",
7688
8094
  array: "\u10DB\u10D0\u10E1\u10D8\u10D5\u10D8"
@@ -7720,14 +8126,14 @@ var error23 = () => {
7720
8126
  case "invalid_format": {
7721
8127
  const _issue = issue2;
7722
8128
  if (_issue.format === "starts_with") {
7723
- return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10D8\u10EC\u10E7\u10D4\u10D1\u10DD\u10D3\u10D4\u10E1 "${_issue.prefix}"-\u10D8\u10D7`;
8129
+ return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D4\u10DA\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10D8\u10EC\u10E7\u10D4\u10D1\u10DD\u10D3\u10D4\u10E1 "${_issue.prefix}"-\u10D8\u10D7`;
7724
8130
  }
7725
8131
  if (_issue.format === "ends_with")
7726
- return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10DB\u10D7\u10D0\u10D5\u10E0\u10D3\u10D4\u10D1\u10DD\u10D3\u10D4\u10E1 "${_issue.suffix}"-\u10D8\u10D7`;
8132
+ return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D4\u10DA\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10DB\u10D7\u10D0\u10D5\u10E0\u10D3\u10D4\u10D1\u10DD\u10D3\u10D4\u10E1 "${_issue.suffix}"-\u10D8\u10D7`;
7727
8133
  if (_issue.format === "includes")
7728
- return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1 "${_issue.includes}"-\u10E1`;
8134
+ return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D4\u10DA\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1 "${_issue.includes}"-\u10E1`;
7729
8135
  if (_issue.format === "regex")
7730
- return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D4\u10E1\u10D0\u10D1\u10D0\u10DB\u10D4\u10D1\u10DD\u10D3\u10D4\u10E1 \u10E8\u10D0\u10D1\u10DA\u10DD\u10DC\u10E1 ${_issue.pattern}`;
8136
+ return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D4\u10DA\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D4\u10E1\u10D0\u10D1\u10D0\u10DB\u10D4\u10D1\u10DD\u10D3\u10D4\u10E1 \u10E8\u10D0\u10D1\u10DA\u10DD\u10DC\u10E1 ${_issue.pattern}`;
7731
8137
  return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 ${FormatDictionary[_issue.format] ?? issue2.format}`;
7732
8138
  }
7733
8139
  case "not_multiple_of":
@@ -7747,12 +8153,12 @@ var error23 = () => {
7747
8153
  };
7748
8154
  function ka_default() {
7749
8155
  return {
7750
- localeError: error23()
8156
+ localeError: error25()
7751
8157
  };
7752
8158
  }
7753
8159
 
7754
8160
  // ../../node_modules/zod/v4/locales/km.js
7755
- var error24 = () => {
8161
+ var error26 = () => {
7756
8162
  const Sizable = {
7757
8163
  string: { unit: "\u178F\u17BD\u17A2\u1780\u17D2\u179F\u179A", verb: "\u1782\u17BD\u179A\u1798\u17B6\u1793" },
7758
8164
  file: { unit: "\u1794\u17C3", verb: "\u1782\u17BD\u179A\u1798\u17B6\u1793" },
@@ -7858,7 +8264,7 @@ var error24 = () => {
7858
8264
  };
7859
8265
  function km_default() {
7860
8266
  return {
7861
- localeError: error24()
8267
+ localeError: error26()
7862
8268
  };
7863
8269
  }
7864
8270
 
@@ -7868,7 +8274,7 @@ function kh_default() {
7868
8274
  }
7869
8275
 
7870
8276
  // ../../node_modules/zod/v4/locales/ko.js
7871
- var error25 = () => {
8277
+ var error27 = () => {
7872
8278
  const Sizable = {
7873
8279
  string: { unit: "\uBB38\uC790", verb: "to have" },
7874
8280
  file: { unit: "\uBC14\uC774\uD2B8", verb: "to have" },
@@ -7975,7 +8381,7 @@ var error25 = () => {
7975
8381
  };
7976
8382
  function ko_default() {
7977
8383
  return {
7978
- localeError: error25()
8384
+ localeError: error27()
7979
8385
  };
7980
8386
  }
7981
8387
 
@@ -7993,7 +8399,7 @@ function getUnitTypeFromNumber(number4) {
7993
8399
  return "one";
7994
8400
  return "few";
7995
8401
  }
7996
- var error26 = () => {
8402
+ var error28 = () => {
7997
8403
  const Sizable = {
7998
8404
  string: {
7999
8405
  unit: {
@@ -8179,12 +8585,12 @@ var error26 = () => {
8179
8585
  };
8180
8586
  function lt_default() {
8181
8587
  return {
8182
- localeError: error26()
8588
+ localeError: error28()
8183
8589
  };
8184
8590
  }
8185
8591
 
8186
8592
  // ../../node_modules/zod/v4/locales/mk.js
8187
- var error27 = () => {
8593
+ var error29 = () => {
8188
8594
  const Sizable = {
8189
8595
  string: { unit: "\u0437\u043D\u0430\u0446\u0438", verb: "\u0434\u0430 \u0438\u043C\u0430\u0430\u0442" },
8190
8596
  file: { unit: "\u0431\u0430\u0458\u0442\u0438", verb: "\u0434\u0430 \u0438\u043C\u0430\u0430\u0442" },
@@ -8289,12 +8695,12 @@ var error27 = () => {
8289
8695
  };
8290
8696
  function mk_default() {
8291
8697
  return {
8292
- localeError: error27()
8698
+ localeError: error29()
8293
8699
  };
8294
8700
  }
8295
8701
 
8296
8702
  // ../../node_modules/zod/v4/locales/ms.js
8297
- var error28 = () => {
8703
+ var error30 = () => {
8298
8704
  const Sizable = {
8299
8705
  string: { unit: "aksara", verb: "mempunyai" },
8300
8706
  file: { unit: "bait", verb: "mempunyai" },
@@ -8397,12 +8803,12 @@ var error28 = () => {
8397
8803
  };
8398
8804
  function ms_default() {
8399
8805
  return {
8400
- localeError: error28()
8806
+ localeError: error30()
8401
8807
  };
8402
8808
  }
8403
8809
 
8404
8810
  // ../../node_modules/zod/v4/locales/nl.js
8405
- var error29 = () => {
8811
+ var error31 = () => {
8406
8812
  const Sizable = {
8407
8813
  string: { unit: "tekens", verb: "heeft" },
8408
8814
  file: { unit: "bytes", verb: "heeft" },
@@ -8508,12 +8914,12 @@ var error29 = () => {
8508
8914
  };
8509
8915
  function nl_default() {
8510
8916
  return {
8511
- localeError: error29()
8917
+ localeError: error31()
8512
8918
  };
8513
8919
  }
8514
8920
 
8515
8921
  // ../../node_modules/zod/v4/locales/no.js
8516
- var error30 = () => {
8922
+ var error32 = () => {
8517
8923
  const Sizable = {
8518
8924
  string: { unit: "tegn", verb: "\xE5 ha" },
8519
8925
  file: { unit: "bytes", verb: "\xE5 ha" },
@@ -8617,12 +9023,12 @@ var error30 = () => {
8617
9023
  };
8618
9024
  function no_default() {
8619
9025
  return {
8620
- localeError: error30()
9026
+ localeError: error32()
8621
9027
  };
8622
9028
  }
8623
9029
 
8624
9030
  // ../../node_modules/zod/v4/locales/ota.js
8625
- var error31 = () => {
9031
+ var error33 = () => {
8626
9032
  const Sizable = {
8627
9033
  string: { unit: "harf", verb: "olmal\u0131d\u0131r" },
8628
9034
  file: { unit: "bayt", verb: "olmal\u0131d\u0131r" },
@@ -8727,12 +9133,12 @@ var error31 = () => {
8727
9133
  };
8728
9134
  function ota_default() {
8729
9135
  return {
8730
- localeError: error31()
9136
+ localeError: error33()
8731
9137
  };
8732
9138
  }
8733
9139
 
8734
9140
  // ../../node_modules/zod/v4/locales/ps.js
8735
- var error32 = () => {
9141
+ var error34 = () => {
8736
9142
  const Sizable = {
8737
9143
  string: { unit: "\u062A\u0648\u06A9\u064A", verb: "\u0648\u0644\u0631\u064A" },
8738
9144
  file: { unit: "\u0628\u0627\u06CC\u067C\u0633", verb: "\u0648\u0644\u0631\u064A" },
@@ -8842,12 +9248,12 @@ var error32 = () => {
8842
9248
  };
8843
9249
  function ps_default() {
8844
9250
  return {
8845
- localeError: error32()
9251
+ localeError: error34()
8846
9252
  };
8847
9253
  }
8848
9254
 
8849
9255
  // ../../node_modules/zod/v4/locales/pl.js
8850
- var error33 = () => {
9256
+ var error35 = () => {
8851
9257
  const Sizable = {
8852
9258
  string: { unit: "znak\xF3w", verb: "mie\u0107" },
8853
9259
  file: { unit: "bajt\xF3w", verb: "mie\u0107" },
@@ -8952,12 +9358,12 @@ var error33 = () => {
8952
9358
  };
8953
9359
  function pl_default() {
8954
9360
  return {
8955
- localeError: error33()
9361
+ localeError: error35()
8956
9362
  };
8957
9363
  }
8958
9364
 
8959
9365
  // ../../node_modules/zod/v4/locales/pt.js
8960
- var error34 = () => {
9366
+ var error36 = () => {
8961
9367
  const Sizable = {
8962
9368
  string: { unit: "caracteres", verb: "ter" },
8963
9369
  file: { unit: "bytes", verb: "ter" },
@@ -9061,7 +9467,127 @@ var error34 = () => {
9061
9467
  };
9062
9468
  function pt_default() {
9063
9469
  return {
9064
- localeError: error34()
9470
+ localeError: error36()
9471
+ };
9472
+ }
9473
+
9474
+ // ../../node_modules/zod/v4/locales/ro.js
9475
+ var error37 = () => {
9476
+ const Sizable = {
9477
+ string: { unit: "caractere", verb: "s\u0103 aib\u0103" },
9478
+ file: { unit: "octe\u021Bi", verb: "s\u0103 aib\u0103" },
9479
+ array: { unit: "elemente", verb: "s\u0103 aib\u0103" },
9480
+ set: { unit: "elemente", verb: "s\u0103 aib\u0103" },
9481
+ map: { unit: "intr\u0103ri", verb: "s\u0103 aib\u0103" }
9482
+ };
9483
+ function getSizing(origin) {
9484
+ return Sizable[origin] ?? null;
9485
+ }
9486
+ const FormatDictionary = {
9487
+ regex: "intrare",
9488
+ email: "adres\u0103 de email",
9489
+ url: "URL",
9490
+ emoji: "emoji",
9491
+ uuid: "UUID",
9492
+ uuidv4: "UUIDv4",
9493
+ uuidv6: "UUIDv6",
9494
+ nanoid: "nanoid",
9495
+ guid: "GUID",
9496
+ cuid: "cuid",
9497
+ cuid2: "cuid2",
9498
+ ulid: "ULID",
9499
+ xid: "XID",
9500
+ ksuid: "KSUID",
9501
+ datetime: "dat\u0103 \u0219i or\u0103 ISO",
9502
+ date: "dat\u0103 ISO",
9503
+ time: "or\u0103 ISO",
9504
+ duration: "durat\u0103 ISO",
9505
+ ipv4: "adres\u0103 IPv4",
9506
+ ipv6: "adres\u0103 IPv6",
9507
+ mac: "adres\u0103 MAC",
9508
+ cidrv4: "interval IPv4",
9509
+ cidrv6: "interval IPv6",
9510
+ base64: "\u0219ir codat base64",
9511
+ base64url: "\u0219ir codat base64url",
9512
+ json_string: "\u0219ir JSON",
9513
+ e164: "num\u0103r E.164",
9514
+ jwt: "JWT",
9515
+ template_literal: "intrare"
9516
+ };
9517
+ const TypeDictionary = {
9518
+ nan: "NaN",
9519
+ string: "\u0219ir",
9520
+ number: "num\u0103r",
9521
+ boolean: "boolean",
9522
+ function: "func\u021Bie",
9523
+ array: "matrice",
9524
+ object: "obiect",
9525
+ undefined: "nedefinit",
9526
+ symbol: "simbol",
9527
+ bigint: "num\u0103r mare",
9528
+ void: "void",
9529
+ never: "never",
9530
+ map: "hart\u0103",
9531
+ set: "set"
9532
+ };
9533
+ return (issue2) => {
9534
+ switch (issue2.code) {
9535
+ case "invalid_type": {
9536
+ const expected = TypeDictionary[issue2.expected] ?? issue2.expected;
9537
+ const receivedType = parsedType(issue2.input);
9538
+ const received = TypeDictionary[receivedType] ?? receivedType;
9539
+ return `Intrare invalid\u0103: a\u0219teptat ${expected}, primit ${received}`;
9540
+ }
9541
+ case "invalid_value":
9542
+ if (issue2.values.length === 1)
9543
+ return `Intrare invalid\u0103: a\u0219teptat ${stringifyPrimitive(issue2.values[0])}`;
9544
+ return `Op\u021Biune invalid\u0103: a\u0219teptat una dintre ${joinValues(issue2.values, "|")}`;
9545
+ case "too_big": {
9546
+ const adj = issue2.inclusive ? "<=" : "<";
9547
+ const sizing = getSizing(issue2.origin);
9548
+ if (sizing)
9549
+ return `Prea mare: a\u0219teptat ca ${issue2.origin ?? "valoarea"} ${sizing.verb} ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "elemente"}`;
9550
+ return `Prea mare: a\u0219teptat ca ${issue2.origin ?? "valoarea"} s\u0103 fie ${adj}${issue2.maximum.toString()}`;
9551
+ }
9552
+ case "too_small": {
9553
+ const adj = issue2.inclusive ? ">=" : ">";
9554
+ const sizing = getSizing(issue2.origin);
9555
+ if (sizing) {
9556
+ return `Prea mic: a\u0219teptat ca ${issue2.origin} ${sizing.verb} ${adj}${issue2.minimum.toString()} ${sizing.unit}`;
9557
+ }
9558
+ return `Prea mic: a\u0219teptat ca ${issue2.origin} s\u0103 fie ${adj}${issue2.minimum.toString()}`;
9559
+ }
9560
+ case "invalid_format": {
9561
+ const _issue = issue2;
9562
+ if (_issue.format === "starts_with") {
9563
+ return `\u0218ir invalid: trebuie s\u0103 \xEEnceap\u0103 cu "${_issue.prefix}"`;
9564
+ }
9565
+ if (_issue.format === "ends_with")
9566
+ return `\u0218ir invalid: trebuie s\u0103 se termine cu "${_issue.suffix}"`;
9567
+ if (_issue.format === "includes")
9568
+ return `\u0218ir invalid: trebuie s\u0103 includ\u0103 "${_issue.includes}"`;
9569
+ if (_issue.format === "regex")
9570
+ return `\u0218ir invalid: trebuie s\u0103 se potriveasc\u0103 cu modelul ${_issue.pattern}`;
9571
+ return `Format invalid: ${FormatDictionary[_issue.format] ?? issue2.format}`;
9572
+ }
9573
+ case "not_multiple_of":
9574
+ return `Num\u0103r invalid: trebuie s\u0103 fie multiplu de ${issue2.divisor}`;
9575
+ case "unrecognized_keys":
9576
+ return `Chei nerecunoscute: ${joinValues(issue2.keys, ", ")}`;
9577
+ case "invalid_key":
9578
+ return `Cheie invalid\u0103 \xEEn ${issue2.origin}`;
9579
+ case "invalid_union":
9580
+ return "Intrare invalid\u0103";
9581
+ case "invalid_element":
9582
+ return `Valoare invalid\u0103 \xEEn ${issue2.origin}`;
9583
+ default:
9584
+ return `Intrare invalid\u0103`;
9585
+ }
9586
+ };
9587
+ };
9588
+ function ro_default() {
9589
+ return {
9590
+ localeError: error37()
9065
9591
  };
9066
9592
  }
9067
9593
 
@@ -9081,7 +9607,7 @@ function getRussianPlural(count, one, few, many) {
9081
9607
  }
9082
9608
  return many;
9083
9609
  }
9084
- var error35 = () => {
9610
+ var error38 = () => {
9085
9611
  const Sizable = {
9086
9612
  string: {
9087
9613
  unit: {
@@ -9218,12 +9744,12 @@ var error35 = () => {
9218
9744
  };
9219
9745
  function ru_default() {
9220
9746
  return {
9221
- localeError: error35()
9747
+ localeError: error38()
9222
9748
  };
9223
9749
  }
9224
9750
 
9225
9751
  // ../../node_modules/zod/v4/locales/sl.js
9226
- var error36 = () => {
9752
+ var error39 = () => {
9227
9753
  const Sizable = {
9228
9754
  string: { unit: "znakov", verb: "imeti" },
9229
9755
  file: { unit: "bajtov", verb: "imeti" },
@@ -9328,12 +9854,12 @@ var error36 = () => {
9328
9854
  };
9329
9855
  function sl_default() {
9330
9856
  return {
9331
- localeError: error36()
9857
+ localeError: error39()
9332
9858
  };
9333
9859
  }
9334
9860
 
9335
9861
  // ../../node_modules/zod/v4/locales/sv.js
9336
- var error37 = () => {
9862
+ var error40 = () => {
9337
9863
  const Sizable = {
9338
9864
  string: { unit: "tecken", verb: "att ha" },
9339
9865
  file: { unit: "bytes", verb: "att ha" },
@@ -9439,12 +9965,12 @@ var error37 = () => {
9439
9965
  };
9440
9966
  function sv_default() {
9441
9967
  return {
9442
- localeError: error37()
9968
+ localeError: error40()
9443
9969
  };
9444
9970
  }
9445
9971
 
9446
9972
  // ../../node_modules/zod/v4/locales/ta.js
9447
- var error38 = () => {
9973
+ var error41 = () => {
9448
9974
  const Sizable = {
9449
9975
  string: { unit: "\u0B8E\u0BB4\u0BC1\u0BA4\u0BCD\u0BA4\u0BC1\u0B95\u0BCD\u0B95\u0BB3\u0BCD", verb: "\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD" },
9450
9976
  file: { unit: "\u0BAA\u0BC8\u0B9F\u0BCD\u0B9F\u0BC1\u0B95\u0BB3\u0BCD", verb: "\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD" },
@@ -9550,12 +10076,12 @@ var error38 = () => {
9550
10076
  };
9551
10077
  function ta_default() {
9552
10078
  return {
9553
- localeError: error38()
10079
+ localeError: error41()
9554
10080
  };
9555
10081
  }
9556
10082
 
9557
10083
  // ../../node_modules/zod/v4/locales/th.js
9558
- var error39 = () => {
10084
+ var error42 = () => {
9559
10085
  const Sizable = {
9560
10086
  string: { unit: "\u0E15\u0E31\u0E27\u0E2D\u0E31\u0E01\u0E29\u0E23", verb: "\u0E04\u0E27\u0E23\u0E21\u0E35" },
9561
10087
  file: { unit: "\u0E44\u0E1A\u0E15\u0E4C", verb: "\u0E04\u0E27\u0E23\u0E21\u0E35" },
@@ -9661,12 +10187,12 @@ var error39 = () => {
9661
10187
  };
9662
10188
  function th_default() {
9663
10189
  return {
9664
- localeError: error39()
10190
+ localeError: error42()
9665
10191
  };
9666
10192
  }
9667
10193
 
9668
10194
  // ../../node_modules/zod/v4/locales/tr.js
9669
- var error40 = () => {
10195
+ var error43 = () => {
9670
10196
  const Sizable = {
9671
10197
  string: { unit: "karakter", verb: "olmal\u0131" },
9672
10198
  file: { unit: "bayt", verb: "olmal\u0131" },
@@ -9767,12 +10293,12 @@ var error40 = () => {
9767
10293
  };
9768
10294
  function tr_default() {
9769
10295
  return {
9770
- localeError: error40()
10296
+ localeError: error43()
9771
10297
  };
9772
10298
  }
9773
10299
 
9774
10300
  // ../../node_modules/zod/v4/locales/uk.js
9775
- var error41 = () => {
10301
+ var error44 = () => {
9776
10302
  const Sizable = {
9777
10303
  string: { unit: "\u0441\u0438\u043C\u0432\u043E\u043B\u0456\u0432", verb: "\u043C\u0430\u0442\u0438\u043C\u0435" },
9778
10304
  file: { unit: "\u0431\u0430\u0439\u0442\u0456\u0432", verb: "\u043C\u0430\u0442\u0438\u043C\u0435" },
@@ -9876,7 +10402,7 @@ var error41 = () => {
9876
10402
  };
9877
10403
  function uk_default() {
9878
10404
  return {
9879
- localeError: error41()
10405
+ localeError: error44()
9880
10406
  };
9881
10407
  }
9882
10408
 
@@ -9886,7 +10412,7 @@ function ua_default() {
9886
10412
  }
9887
10413
 
9888
10414
  // ../../node_modules/zod/v4/locales/ur.js
9889
- var error42 = () => {
10415
+ var error45 = () => {
9890
10416
  const Sizable = {
9891
10417
  string: { unit: "\u062D\u0631\u0648\u0641", verb: "\u06C1\u0648\u0646\u0627" },
9892
10418
  file: { unit: "\u0628\u0627\u0626\u0679\u0633", verb: "\u06C1\u0648\u0646\u0627" },
@@ -9992,17 +10518,18 @@ var error42 = () => {
9992
10518
  };
9993
10519
  function ur_default() {
9994
10520
  return {
9995
- localeError: error42()
10521
+ localeError: error45()
9996
10522
  };
9997
10523
  }
9998
10524
 
9999
10525
  // ../../node_modules/zod/v4/locales/uz.js
10000
- var error43 = () => {
10526
+ var error46 = () => {
10001
10527
  const Sizable = {
10002
10528
  string: { unit: "belgi", verb: "bo\u2018lishi kerak" },
10003
10529
  file: { unit: "bayt", verb: "bo\u2018lishi kerak" },
10004
10530
  array: { unit: "element", verb: "bo\u2018lishi kerak" },
10005
- set: { unit: "element", verb: "bo\u2018lishi kerak" }
10531
+ set: { unit: "element", verb: "bo\u2018lishi kerak" },
10532
+ map: { unit: "yozuv", verb: "bo\u2018lishi kerak" }
10006
10533
  };
10007
10534
  function getSizing(origin) {
10008
10535
  return Sizable[origin] ?? null;
@@ -10102,12 +10629,12 @@ var error43 = () => {
10102
10629
  };
10103
10630
  function uz_default() {
10104
10631
  return {
10105
- localeError: error43()
10632
+ localeError: error46()
10106
10633
  };
10107
10634
  }
10108
10635
 
10109
10636
  // ../../node_modules/zod/v4/locales/vi.js
10110
- var error44 = () => {
10637
+ var error47 = () => {
10111
10638
  const Sizable = {
10112
10639
  string: { unit: "k\xFD t\u1EF1", verb: "c\xF3" },
10113
10640
  file: { unit: "byte", verb: "c\xF3" },
@@ -10211,12 +10738,12 @@ var error44 = () => {
10211
10738
  };
10212
10739
  function vi_default() {
10213
10740
  return {
10214
- localeError: error44()
10741
+ localeError: error47()
10215
10742
  };
10216
10743
  }
10217
10744
 
10218
10745
  // ../../node_modules/zod/v4/locales/zh-CN.js
10219
- var error45 = () => {
10746
+ var error48 = () => {
10220
10747
  const Sizable = {
10221
10748
  string: { unit: "\u5B57\u7B26", verb: "\u5305\u542B" },
10222
10749
  file: { unit: "\u5B57\u8282", verb: "\u5305\u542B" },
@@ -10321,12 +10848,12 @@ var error45 = () => {
10321
10848
  };
10322
10849
  function zh_CN_default() {
10323
10850
  return {
10324
- localeError: error45()
10851
+ localeError: error48()
10325
10852
  };
10326
10853
  }
10327
10854
 
10328
10855
  // ../../node_modules/zod/v4/locales/zh-TW.js
10329
- var error46 = () => {
10856
+ var error49 = () => {
10330
10857
  const Sizable = {
10331
10858
  string: { unit: "\u5B57\u5143", verb: "\u64C1\u6709" },
10332
10859
  file: { unit: "\u4F4D\u5143\u7D44", verb: "\u64C1\u6709" },
@@ -10429,12 +10956,12 @@ var error46 = () => {
10429
10956
  };
10430
10957
  function zh_TW_default() {
10431
10958
  return {
10432
- localeError: error46()
10959
+ localeError: error49()
10433
10960
  };
10434
10961
  }
10435
10962
 
10436
10963
  // ../../node_modules/zod/v4/locales/yo.js
10437
- var error47 = () => {
10964
+ var error50 = () => {
10438
10965
  const Sizable = {
10439
10966
  string: { unit: "\xE0mi", verb: "n\xED" },
10440
10967
  file: { unit: "bytes", verb: "n\xED" },
@@ -10537,12 +11064,12 @@ var error47 = () => {
10537
11064
  };
10538
11065
  function yo_default() {
10539
11066
  return {
10540
- localeError: error47()
11067
+ localeError: error50()
10541
11068
  };
10542
11069
  }
10543
11070
 
10544
11071
  // ../../node_modules/zod/v4/core/registries.js
10545
- var _a;
11072
+ var _a2;
10546
11073
  var $output = /* @__PURE__ */ Symbol("ZodOutput");
10547
11074
  var $input = /* @__PURE__ */ Symbol("ZodInput");
10548
11075
  var $ZodRegistry = class {
@@ -10588,7 +11115,7 @@ var $ZodRegistry = class {
10588
11115
  function registry() {
10589
11116
  return new $ZodRegistry();
10590
11117
  }
10591
- (_a = globalThis).__zod_globalRegistry ?? (_a.__zod_globalRegistry = registry());
11118
+ (_a2 = globalThis).__zod_globalRegistry ?? (_a2.__zod_globalRegistry = registry());
10592
11119
  var globalRegistry = globalThis.__zod_globalRegistry;
10593
11120
 
10594
11121
  // ../../node_modules/zod/v4/core/api.js
@@ -11506,7 +12033,7 @@ function _refine(Class2, fn, _params) {
11506
12033
  return schema;
11507
12034
  }
11508
12035
  // @__NO_SIDE_EFFECTS__
11509
- function _superRefine(fn) {
12036
+ function _superRefine(fn, params) {
11510
12037
  const ch = /* @__PURE__ */ _check((payload) => {
11511
12038
  payload.addIssue = (issue2) => {
11512
12039
  if (typeof issue2 === "string") {
@@ -11523,7 +12050,7 @@ function _superRefine(fn) {
11523
12050
  }
11524
12051
  };
11525
12052
  return fn(payload.value, payload);
11526
- });
12053
+ }, params);
11527
12054
  return ch;
11528
12055
  }
11529
12056
  // @__NO_SIDE_EFFECTS__
@@ -11653,7 +12180,7 @@ function initializeContext(params) {
11653
12180
  };
11654
12181
  }
11655
12182
  function process(schema, ctx, _params = { path: [], schemaPath: [] }) {
11656
- var _a2;
12183
+ var _a3;
11657
12184
  const def = schema._zod.def;
11658
12185
  const seen = ctx.seen.get(schema);
11659
12186
  if (seen) {
@@ -11700,8 +12227,8 @@ function process(schema, ctx, _params = { path: [], schemaPath: [] }) {
11700
12227
  delete result.schema.examples;
11701
12228
  delete result.schema.default;
11702
12229
  }
11703
- if (ctx.io === "input" && result.schema._prefault)
11704
- (_a2 = result.schema).default ?? (_a2.default = result.schema._prefault);
12230
+ if (ctx.io === "input" && "_prefault" in result.schema)
12231
+ (_a3 = result.schema).default ?? (_a3.default = result.schema._prefault);
11705
12232
  delete result.schema._prefault;
11706
12233
  const _result = ctx.seen.get(schema);
11707
12234
  return _result.schema;
@@ -11882,10 +12409,15 @@ function finalize(ctx, schema) {
11882
12409
  result.$id = ctx.external.uri(id);
11883
12410
  }
11884
12411
  Object.assign(result, root.def ?? root.schema);
12412
+ const rootMetaId = ctx.metadataRegistry.get(schema)?.id;
12413
+ if (rootMetaId !== void 0 && result.id === rootMetaId)
12414
+ delete result.id;
11885
12415
  const defs = ctx.external?.defs ?? {};
11886
12416
  for (const entry of ctx.seen.entries()) {
11887
12417
  const seen = entry[1];
11888
12418
  if (seen.def && seen.defId) {
12419
+ if (seen.def.id === seen.defId)
12420
+ delete seen.def.id;
11889
12421
  defs[seen.defId] = seen.def;
11890
12422
  }
11891
12423
  }
@@ -11941,6 +12473,8 @@ function isTransforming(_schema, _ctx) {
11941
12473
  return isTransforming(def.keyType, ctx) || isTransforming(def.valueType, ctx);
11942
12474
  }
11943
12475
  if (def.type === "pipe") {
12476
+ if (_schema._zod.traits.has("$ZodCodec"))
12477
+ return true;
11944
12478
  return isTransforming(def.in, ctx) || isTransforming(def.out, ctx);
11945
12479
  }
11946
12480
  if (def.type === "object") {
@@ -12030,39 +12564,28 @@ var numberProcessor = (schema, ctx, _json, _params) => {
12030
12564
  json2.type = "integer";
12031
12565
  else
12032
12566
  json2.type = "number";
12033
- if (typeof exclusiveMinimum === "number") {
12034
- if (ctx.target === "draft-04" || ctx.target === "openapi-3.0") {
12567
+ const exMin = typeof exclusiveMinimum === "number" && exclusiveMinimum >= (minimum ?? Number.NEGATIVE_INFINITY);
12568
+ const exMax = typeof exclusiveMaximum === "number" && exclusiveMaximum <= (maximum ?? Number.POSITIVE_INFINITY);
12569
+ const legacy = ctx.target === "draft-04" || ctx.target === "openapi-3.0";
12570
+ if (exMin) {
12571
+ if (legacy) {
12035
12572
  json2.minimum = exclusiveMinimum;
12036
12573
  json2.exclusiveMinimum = true;
12037
12574
  } else {
12038
12575
  json2.exclusiveMinimum = exclusiveMinimum;
12039
12576
  }
12040
- }
12041
- if (typeof minimum === "number") {
12577
+ } else if (typeof minimum === "number") {
12042
12578
  json2.minimum = minimum;
12043
- if (typeof exclusiveMinimum === "number" && ctx.target !== "draft-04") {
12044
- if (exclusiveMinimum >= minimum)
12045
- delete json2.minimum;
12046
- else
12047
- delete json2.exclusiveMinimum;
12048
- }
12049
12579
  }
12050
- if (typeof exclusiveMaximum === "number") {
12051
- if (ctx.target === "draft-04" || ctx.target === "openapi-3.0") {
12580
+ if (exMax) {
12581
+ if (legacy) {
12052
12582
  json2.maximum = exclusiveMaximum;
12053
12583
  json2.exclusiveMaximum = true;
12054
12584
  } else {
12055
12585
  json2.exclusiveMaximum = exclusiveMaximum;
12056
12586
  }
12057
- }
12058
- if (typeof maximum === "number") {
12587
+ } else if (typeof maximum === "number") {
12059
12588
  json2.maximum = maximum;
12060
- if (typeof exclusiveMaximum === "number" && ctx.target !== "draft-04") {
12061
- if (exclusiveMaximum <= maximum)
12062
- delete json2.maximum;
12063
- else
12064
- delete json2.exclusiveMaximum;
12065
- }
12066
12589
  }
12067
12590
  if (typeof multipleOf === "number")
12068
12591
  json2.multipleOf = multipleOf;
@@ -12234,7 +12757,10 @@ var arrayProcessor = (schema, ctx, _json, params) => {
12234
12757
  if (typeof maximum === "number")
12235
12758
  json2.maxItems = maximum;
12236
12759
  json2.type = "array";
12237
- json2.items = process(def.element, ctx, { ...params, path: [...params.path, "items"] });
12760
+ json2.items = process(def.element, ctx, {
12761
+ ...params,
12762
+ path: [...params.path, "items"]
12763
+ });
12238
12764
  };
12239
12765
  var objectProcessor = (schema, ctx, _json, params) => {
12240
12766
  const json2 = _json;
@@ -12427,7 +12953,8 @@ var catchProcessor = (schema, ctx, json2, params) => {
12427
12953
  };
12428
12954
  var pipeProcessor = (schema, ctx, _json, params) => {
12429
12955
  const def = schema._zod.def;
12430
- const innerType = ctx.io === "input" ? def.in._zod.def.type === "transform" ? def.out : def.in : def.out;
12956
+ const inIsTransform = def.in._zod.traits.has("$ZodTransform");
12957
+ const innerType = ctx.io === "input" ? inIsTransform ? def.out : def.in : def.out;
12431
12958
  process(innerType, ctx, params);
12432
12959
  const seen = ctx.seen.get(schema);
12433
12960
  seen.ref = innerType;
@@ -12661,6 +13188,7 @@ __export(schemas_exports2, {
12661
13188
  ZodOptional: () => ZodOptional,
12662
13189
  ZodPipe: () => ZodPipe,
12663
13190
  ZodPrefault: () => ZodPrefault,
13191
+ ZodPreprocess: () => ZodPreprocess,
12664
13192
  ZodPromise: () => ZodPromise,
12665
13193
  ZodReadonly: () => ZodReadonly,
12666
13194
  ZodRecord: () => ZodRecord,
@@ -12721,6 +13249,7 @@ __export(schemas_exports2, {
12721
13249
  int32: () => int32,
12722
13250
  int64: () => int64,
12723
13251
  intersection: () => intersection,
13252
+ invertCodec: () => invertCodec,
12724
13253
  ipv4: () => ipv42,
12725
13254
  ipv6: () => ipv62,
12726
13255
  json: () => json,
@@ -12890,8 +13419,8 @@ var initializer2 = (inst, issues) => {
12890
13419
  }
12891
13420
  });
12892
13421
  };
12893
- var ZodError = $constructor("ZodError", initializer2);
12894
- var ZodRealError = $constructor("ZodError", initializer2, {
13422
+ var ZodError = /* @__PURE__ */ $constructor("ZodError", initializer2);
13423
+ var ZodRealError = /* @__PURE__ */ $constructor("ZodError", initializer2, {
12895
13424
  Parent: Error
12896
13425
  });
12897
13426
 
@@ -12910,6 +13439,43 @@ var safeEncodeAsync2 = /* @__PURE__ */ _safeEncodeAsync(ZodRealError);
12910
13439
  var safeDecodeAsync2 = /* @__PURE__ */ _safeDecodeAsync(ZodRealError);
12911
13440
 
12912
13441
  // ../../node_modules/zod/v4/classic/schemas.js
13442
+ var _installedGroups = /* @__PURE__ */ new WeakMap();
13443
+ function _installLazyMethods(inst, group, methods) {
13444
+ const proto = Object.getPrototypeOf(inst);
13445
+ let installed = _installedGroups.get(proto);
13446
+ if (!installed) {
13447
+ installed = /* @__PURE__ */ new Set();
13448
+ _installedGroups.set(proto, installed);
13449
+ }
13450
+ if (installed.has(group))
13451
+ return;
13452
+ installed.add(group);
13453
+ for (const key in methods) {
13454
+ const fn = methods[key];
13455
+ Object.defineProperty(proto, key, {
13456
+ configurable: true,
13457
+ enumerable: false,
13458
+ get() {
13459
+ const bound = fn.bind(this);
13460
+ Object.defineProperty(this, key, {
13461
+ configurable: true,
13462
+ writable: true,
13463
+ enumerable: true,
13464
+ value: bound
13465
+ });
13466
+ return bound;
13467
+ },
13468
+ set(v) {
13469
+ Object.defineProperty(this, key, {
13470
+ configurable: true,
13471
+ writable: true,
13472
+ enumerable: true,
13473
+ value: v
13474
+ });
13475
+ }
13476
+ });
13477
+ }
13478
+ }
12913
13479
  var ZodType = /* @__PURE__ */ $constructor("ZodType", (inst, def) => {
12914
13480
  $ZodType.init(inst, def);
12915
13481
  Object.assign(inst["~standard"], {
@@ -12922,23 +13488,6 @@ var ZodType = /* @__PURE__ */ $constructor("ZodType", (inst, def) => {
12922
13488
  inst.def = def;
12923
13489
  inst.type = def.type;
12924
13490
  Object.defineProperty(inst, "_def", { value: def });
12925
- inst.check = (...checks) => {
12926
- return inst.clone(util_exports.mergeDefs(def, {
12927
- checks: [
12928
- ...def.checks ?? [],
12929
- ...checks.map((ch) => typeof ch === "function" ? { _zod: { check: ch, def: { check: "custom" }, onattach: [] } } : ch)
12930
- ]
12931
- }), {
12932
- parent: true
12933
- });
12934
- };
12935
- inst.with = inst.check;
12936
- inst.clone = (def2, params) => clone(inst, def2, params);
12937
- inst.brand = () => inst;
12938
- inst.register = ((reg, meta3) => {
12939
- reg.add(inst, meta3);
12940
- return inst;
12941
- });
12942
13491
  inst.parse = (data, params) => parse2(inst, data, params, { callee: inst.parse });
12943
13492
  inst.safeParse = (data, params) => safeParse2(inst, data, params);
12944
13493
  inst.parseAsync = async (data, params) => parseAsync2(inst, data, params, { callee: inst.parseAsync });
@@ -12952,45 +13501,108 @@ var ZodType = /* @__PURE__ */ $constructor("ZodType", (inst, def) => {
12952
13501
  inst.safeDecode = (data, params) => safeDecode2(inst, data, params);
12953
13502
  inst.safeEncodeAsync = async (data, params) => safeEncodeAsync2(inst, data, params);
12954
13503
  inst.safeDecodeAsync = async (data, params) => safeDecodeAsync2(inst, data, params);
12955
- inst.refine = (check2, params) => inst.check(refine(check2, params));
12956
- inst.superRefine = (refinement) => inst.check(superRefine(refinement));
12957
- inst.overwrite = (fn) => inst.check(_overwrite(fn));
12958
- inst.optional = () => optional(inst);
12959
- inst.exactOptional = () => exactOptional(inst);
12960
- inst.nullable = () => nullable(inst);
12961
- inst.nullish = () => optional(nullable(inst));
12962
- inst.nonoptional = (params) => nonoptional(inst, params);
12963
- inst.array = () => array(inst);
12964
- inst.or = (arg) => union([inst, arg]);
12965
- inst.and = (arg) => intersection(inst, arg);
12966
- inst.transform = (tx) => pipe(inst, transform(tx));
12967
- inst.default = (def2) => _default2(inst, def2);
12968
- inst.prefault = (def2) => prefault(inst, def2);
12969
- inst.catch = (params) => _catch2(inst, params);
12970
- inst.pipe = (target) => pipe(inst, target);
12971
- inst.readonly = () => readonly(inst);
12972
- inst.describe = (description) => {
12973
- const cl = inst.clone();
12974
- globalRegistry.add(cl, { description });
12975
- return cl;
12976
- };
13504
+ _installLazyMethods(inst, "ZodType", {
13505
+ check(...chks) {
13506
+ const def2 = this.def;
13507
+ return this.clone(util_exports.mergeDefs(def2, {
13508
+ checks: [
13509
+ ...def2.checks ?? [],
13510
+ ...chks.map((ch) => typeof ch === "function" ? { _zod: { check: ch, def: { check: "custom" }, onattach: [] } } : ch)
13511
+ ]
13512
+ }), { parent: true });
13513
+ },
13514
+ with(...chks) {
13515
+ return this.check(...chks);
13516
+ },
13517
+ clone(def2, params) {
13518
+ return clone(this, def2, params);
13519
+ },
13520
+ brand() {
13521
+ return this;
13522
+ },
13523
+ register(reg, meta3) {
13524
+ reg.add(this, meta3);
13525
+ return this;
13526
+ },
13527
+ refine(check2, params) {
13528
+ return this.check(refine(check2, params));
13529
+ },
13530
+ superRefine(refinement, params) {
13531
+ return this.check(superRefine(refinement, params));
13532
+ },
13533
+ overwrite(fn) {
13534
+ return this.check(_overwrite(fn));
13535
+ },
13536
+ optional() {
13537
+ return optional(this);
13538
+ },
13539
+ exactOptional() {
13540
+ return exactOptional(this);
13541
+ },
13542
+ nullable() {
13543
+ return nullable(this);
13544
+ },
13545
+ nullish() {
13546
+ return optional(nullable(this));
13547
+ },
13548
+ nonoptional(params) {
13549
+ return nonoptional(this, params);
13550
+ },
13551
+ array() {
13552
+ return array(this);
13553
+ },
13554
+ or(arg) {
13555
+ return union([this, arg]);
13556
+ },
13557
+ and(arg) {
13558
+ return intersection(this, arg);
13559
+ },
13560
+ transform(tx) {
13561
+ return pipe(this, transform(tx));
13562
+ },
13563
+ default(d) {
13564
+ return _default2(this, d);
13565
+ },
13566
+ prefault(d) {
13567
+ return prefault(this, d);
13568
+ },
13569
+ catch(params) {
13570
+ return _catch2(this, params);
13571
+ },
13572
+ pipe(target) {
13573
+ return pipe(this, target);
13574
+ },
13575
+ readonly() {
13576
+ return readonly(this);
13577
+ },
13578
+ describe(description) {
13579
+ const cl = this.clone();
13580
+ globalRegistry.add(cl, { description });
13581
+ return cl;
13582
+ },
13583
+ meta(...args) {
13584
+ if (args.length === 0)
13585
+ return globalRegistry.get(this);
13586
+ const cl = this.clone();
13587
+ globalRegistry.add(cl, args[0]);
13588
+ return cl;
13589
+ },
13590
+ isOptional() {
13591
+ return this.safeParse(void 0).success;
13592
+ },
13593
+ isNullable() {
13594
+ return this.safeParse(null).success;
13595
+ },
13596
+ apply(fn) {
13597
+ return fn(this);
13598
+ }
13599
+ });
12977
13600
  Object.defineProperty(inst, "description", {
12978
13601
  get() {
12979
13602
  return globalRegistry.get(inst)?.description;
12980
13603
  },
12981
13604
  configurable: true
12982
13605
  });
12983
- inst.meta = (...args) => {
12984
- if (args.length === 0) {
12985
- return globalRegistry.get(inst);
12986
- }
12987
- const cl = inst.clone();
12988
- globalRegistry.add(cl, args[0]);
12989
- return cl;
12990
- };
12991
- inst.isOptional = () => inst.safeParse(void 0).success;
12992
- inst.isNullable = () => inst.safeParse(null).success;
12993
- inst.apply = (fn) => fn(inst);
12994
13606
  return inst;
12995
13607
  });
12996
13608
  var _ZodString = /* @__PURE__ */ $constructor("_ZodString", (inst, def) => {
@@ -13001,21 +13613,53 @@ var _ZodString = /* @__PURE__ */ $constructor("_ZodString", (inst, def) => {
13001
13613
  inst.format = bag.format ?? null;
13002
13614
  inst.minLength = bag.minimum ?? null;
13003
13615
  inst.maxLength = bag.maximum ?? null;
13004
- inst.regex = (...args) => inst.check(_regex(...args));
13005
- inst.includes = (...args) => inst.check(_includes(...args));
13006
- inst.startsWith = (...args) => inst.check(_startsWith(...args));
13007
- inst.endsWith = (...args) => inst.check(_endsWith(...args));
13008
- inst.min = (...args) => inst.check(_minLength(...args));
13009
- inst.max = (...args) => inst.check(_maxLength(...args));
13010
- inst.length = (...args) => inst.check(_length(...args));
13011
- inst.nonempty = (...args) => inst.check(_minLength(1, ...args));
13012
- inst.lowercase = (params) => inst.check(_lowercase(params));
13013
- inst.uppercase = (params) => inst.check(_uppercase(params));
13014
- inst.trim = () => inst.check(_trim());
13015
- inst.normalize = (...args) => inst.check(_normalize(...args));
13016
- inst.toLowerCase = () => inst.check(_toLowerCase());
13017
- inst.toUpperCase = () => inst.check(_toUpperCase());
13018
- inst.slugify = () => inst.check(_slugify());
13616
+ _installLazyMethods(inst, "_ZodString", {
13617
+ regex(...args) {
13618
+ return this.check(_regex(...args));
13619
+ },
13620
+ includes(...args) {
13621
+ return this.check(_includes(...args));
13622
+ },
13623
+ startsWith(...args) {
13624
+ return this.check(_startsWith(...args));
13625
+ },
13626
+ endsWith(...args) {
13627
+ return this.check(_endsWith(...args));
13628
+ },
13629
+ min(...args) {
13630
+ return this.check(_minLength(...args));
13631
+ },
13632
+ max(...args) {
13633
+ return this.check(_maxLength(...args));
13634
+ },
13635
+ length(...args) {
13636
+ return this.check(_length(...args));
13637
+ },
13638
+ nonempty(...args) {
13639
+ return this.check(_minLength(1, ...args));
13640
+ },
13641
+ lowercase(params) {
13642
+ return this.check(_lowercase(params));
13643
+ },
13644
+ uppercase(params) {
13645
+ return this.check(_uppercase(params));
13646
+ },
13647
+ trim() {
13648
+ return this.check(_trim());
13649
+ },
13650
+ normalize(...args) {
13651
+ return this.check(_normalize(...args));
13652
+ },
13653
+ toLowerCase() {
13654
+ return this.check(_toLowerCase());
13655
+ },
13656
+ toUpperCase() {
13657
+ return this.check(_toUpperCase());
13658
+ },
13659
+ slugify() {
13660
+ return this.check(_slugify());
13661
+ }
13662
+ });
13019
13663
  });
13020
13664
  var ZodString = /* @__PURE__ */ $constructor("ZodString", (inst, def) => {
13021
13665
  $ZodString.init(inst, def);
@@ -13094,7 +13738,7 @@ function url(params) {
13094
13738
  }
13095
13739
  function httpUrl(params) {
13096
13740
  return _url(ZodURL, {
13097
- protocol: /^https?$/,
13741
+ protocol: regexes_exports.httpProtocol,
13098
13742
  hostname: regexes_exports.domain,
13099
13743
  ...util_exports.normalizeParams(params)
13100
13744
  });
@@ -13236,21 +13880,53 @@ var ZodNumber = /* @__PURE__ */ $constructor("ZodNumber", (inst, def) => {
13236
13880
  $ZodNumber.init(inst, def);
13237
13881
  ZodType.init(inst, def);
13238
13882
  inst._zod.processJSONSchema = (ctx, json2, params) => numberProcessor(inst, ctx, json2, params);
13239
- inst.gt = (value, params) => inst.check(_gt(value, params));
13240
- inst.gte = (value, params) => inst.check(_gte(value, params));
13241
- inst.min = (value, params) => inst.check(_gte(value, params));
13242
- inst.lt = (value, params) => inst.check(_lt(value, params));
13243
- inst.lte = (value, params) => inst.check(_lte(value, params));
13244
- inst.max = (value, params) => inst.check(_lte(value, params));
13245
- inst.int = (params) => inst.check(int(params));
13246
- inst.safe = (params) => inst.check(int(params));
13247
- inst.positive = (params) => inst.check(_gt(0, params));
13248
- inst.nonnegative = (params) => inst.check(_gte(0, params));
13249
- inst.negative = (params) => inst.check(_lt(0, params));
13250
- inst.nonpositive = (params) => inst.check(_lte(0, params));
13251
- inst.multipleOf = (value, params) => inst.check(_multipleOf(value, params));
13252
- inst.step = (value, params) => inst.check(_multipleOf(value, params));
13253
- inst.finite = () => inst;
13883
+ _installLazyMethods(inst, "ZodNumber", {
13884
+ gt(value, params) {
13885
+ return this.check(_gt(value, params));
13886
+ },
13887
+ gte(value, params) {
13888
+ return this.check(_gte(value, params));
13889
+ },
13890
+ min(value, params) {
13891
+ return this.check(_gte(value, params));
13892
+ },
13893
+ lt(value, params) {
13894
+ return this.check(_lt(value, params));
13895
+ },
13896
+ lte(value, params) {
13897
+ return this.check(_lte(value, params));
13898
+ },
13899
+ max(value, params) {
13900
+ return this.check(_lte(value, params));
13901
+ },
13902
+ int(params) {
13903
+ return this.check(int(params));
13904
+ },
13905
+ safe(params) {
13906
+ return this.check(int(params));
13907
+ },
13908
+ positive(params) {
13909
+ return this.check(_gt(0, params));
13910
+ },
13911
+ nonnegative(params) {
13912
+ return this.check(_gte(0, params));
13913
+ },
13914
+ negative(params) {
13915
+ return this.check(_lt(0, params));
13916
+ },
13917
+ nonpositive(params) {
13918
+ return this.check(_lte(0, params));
13919
+ },
13920
+ multipleOf(value, params) {
13921
+ return this.check(_multipleOf(value, params));
13922
+ },
13923
+ step(value, params) {
13924
+ return this.check(_multipleOf(value, params));
13925
+ },
13926
+ finite() {
13927
+ return this;
13928
+ }
13929
+ });
13254
13930
  const bag = inst._zod.bag;
13255
13931
  inst.minValue = Math.max(bag.minimum ?? Number.NEGATIVE_INFINITY, bag.exclusiveMinimum ?? Number.NEGATIVE_INFINITY) ?? null;
13256
13932
  inst.maxValue = Math.min(bag.maximum ?? Number.POSITIVE_INFINITY, bag.exclusiveMaximum ?? Number.POSITIVE_INFINITY) ?? null;
@@ -13397,11 +14073,23 @@ var ZodArray = /* @__PURE__ */ $constructor("ZodArray", (inst, def) => {
13397
14073
  ZodType.init(inst, def);
13398
14074
  inst._zod.processJSONSchema = (ctx, json2, params) => arrayProcessor(inst, ctx, json2, params);
13399
14075
  inst.element = def.element;
13400
- inst.min = (minLength, params) => inst.check(_minLength(minLength, params));
13401
- inst.nonempty = (params) => inst.check(_minLength(1, params));
13402
- inst.max = (maxLength, params) => inst.check(_maxLength(maxLength, params));
13403
- inst.length = (len, params) => inst.check(_length(len, params));
13404
- inst.unwrap = () => inst.element;
14076
+ _installLazyMethods(inst, "ZodArray", {
14077
+ min(n, params) {
14078
+ return this.check(_minLength(n, params));
14079
+ },
14080
+ nonempty(params) {
14081
+ return this.check(_minLength(1, params));
14082
+ },
14083
+ max(n, params) {
14084
+ return this.check(_maxLength(n, params));
14085
+ },
14086
+ length(n, params) {
14087
+ return this.check(_length(n, params));
14088
+ },
14089
+ unwrap() {
14090
+ return this.element;
14091
+ }
14092
+ });
13405
14093
  });
13406
14094
  function array(element, params) {
13407
14095
  return _array(ZodArray, element, params);
@@ -13417,23 +14105,47 @@ var ZodObject = /* @__PURE__ */ $constructor("ZodObject", (inst, def) => {
13417
14105
  util_exports.defineLazy(inst, "shape", () => {
13418
14106
  return def.shape;
13419
14107
  });
13420
- inst.keyof = () => _enum2(Object.keys(inst._zod.def.shape));
13421
- inst.catchall = (catchall) => inst.clone({ ...inst._zod.def, catchall });
13422
- inst.passthrough = () => inst.clone({ ...inst._zod.def, catchall: unknown() });
13423
- inst.loose = () => inst.clone({ ...inst._zod.def, catchall: unknown() });
13424
- inst.strict = () => inst.clone({ ...inst._zod.def, catchall: never() });
13425
- inst.strip = () => inst.clone({ ...inst._zod.def, catchall: void 0 });
13426
- inst.extend = (incoming) => {
13427
- return util_exports.extend(inst, incoming);
13428
- };
13429
- inst.safeExtend = (incoming) => {
13430
- return util_exports.safeExtend(inst, incoming);
13431
- };
13432
- inst.merge = (other) => util_exports.merge(inst, other);
13433
- inst.pick = (mask) => util_exports.pick(inst, mask);
13434
- inst.omit = (mask) => util_exports.omit(inst, mask);
13435
- inst.partial = (...args) => util_exports.partial(ZodOptional, inst, args[0]);
13436
- inst.required = (...args) => util_exports.required(ZodNonOptional, inst, args[0]);
14108
+ _installLazyMethods(inst, "ZodObject", {
14109
+ keyof() {
14110
+ return _enum2(Object.keys(this._zod.def.shape));
14111
+ },
14112
+ catchall(catchall) {
14113
+ return this.clone({ ...this._zod.def, catchall });
14114
+ },
14115
+ passthrough() {
14116
+ return this.clone({ ...this._zod.def, catchall: unknown() });
14117
+ },
14118
+ loose() {
14119
+ return this.clone({ ...this._zod.def, catchall: unknown() });
14120
+ },
14121
+ strict() {
14122
+ return this.clone({ ...this._zod.def, catchall: never() });
14123
+ },
14124
+ strip() {
14125
+ return this.clone({ ...this._zod.def, catchall: void 0 });
14126
+ },
14127
+ extend(incoming) {
14128
+ return util_exports.extend(this, incoming);
14129
+ },
14130
+ safeExtend(incoming) {
14131
+ return util_exports.safeExtend(this, incoming);
14132
+ },
14133
+ merge(other) {
14134
+ return util_exports.merge(this, other);
14135
+ },
14136
+ pick(mask) {
14137
+ return util_exports.pick(this, mask);
14138
+ },
14139
+ omit(mask) {
14140
+ return util_exports.omit(this, mask);
14141
+ },
14142
+ partial(...args) {
14143
+ return util_exports.partial(ZodOptional, this, args[0]);
14144
+ },
14145
+ required(...args) {
14146
+ return util_exports.required(ZodNonOptional, this, args[0]);
14147
+ }
14148
+ });
13437
14149
  });
13438
14150
  function object(shape, params) {
13439
14151
  const def = {
@@ -13538,6 +14250,14 @@ var ZodRecord = /* @__PURE__ */ $constructor("ZodRecord", (inst, def) => {
13538
14250
  inst.valueType = def.valueType;
13539
14251
  });
13540
14252
  function record(keyType, valueType, params) {
14253
+ if (!valueType || !valueType._zod) {
14254
+ return new ZodRecord({
14255
+ type: "record",
14256
+ keyType: string2(),
14257
+ valueType: keyType,
14258
+ ...util_exports.normalizeParams(valueType)
14259
+ });
14260
+ }
13541
14261
  return new ZodRecord({
13542
14262
  type: "record",
13543
14263
  keyType,
@@ -13709,10 +14429,12 @@ var ZodTransform = /* @__PURE__ */ $constructor("ZodTransform", (inst, def) => {
13709
14429
  if (output instanceof Promise) {
13710
14430
  return output.then((output2) => {
13711
14431
  payload.value = output2;
14432
+ payload.fallback = true;
13712
14433
  return payload;
13713
14434
  });
13714
14435
  }
13715
14436
  payload.value = output;
14437
+ payload.fallback = true;
13716
14438
  return payload;
13717
14439
  };
13718
14440
  });
@@ -13867,6 +14589,20 @@ function codec(in_, out, params) {
13867
14589
  reverseTransform: params.encode
13868
14590
  });
13869
14591
  }
14592
+ function invertCodec(codec2) {
14593
+ const def = codec2._zod.def;
14594
+ return new ZodCodec({
14595
+ type: "pipe",
14596
+ in: def.out,
14597
+ out: def.in,
14598
+ transform: def.reverseTransform,
14599
+ reverseTransform: def.transform
14600
+ });
14601
+ }
14602
+ var ZodPreprocess = /* @__PURE__ */ $constructor("ZodPreprocess", (inst, def) => {
14603
+ ZodPipe.init(inst, def);
14604
+ $ZodPreprocess.init(inst, def);
14605
+ });
13870
14606
  var ZodReadonly = /* @__PURE__ */ $constructor("ZodReadonly", (inst, def) => {
13871
14607
  $ZodReadonly.init(inst, def);
13872
14608
  ZodType.init(inst, def);
@@ -13946,8 +14682,8 @@ function custom(fn, _params) {
13946
14682
  function refine(fn, _params = {}) {
13947
14683
  return _refine(ZodCustom, fn, _params);
13948
14684
  }
13949
- function superRefine(fn) {
13950
- return _superRefine(fn);
14685
+ function superRefine(fn, params) {
14686
+ return _superRefine(fn, params);
13951
14687
  }
13952
14688
  var describe2 = describe;
13953
14689
  var meta2 = meta;
@@ -13985,7 +14721,11 @@ function json(params) {
13985
14721
  return jsonSchema;
13986
14722
  }
13987
14723
  function preprocess(fn, schema) {
13988
- return pipe(transform(fn), schema);
14724
+ return new ZodPreprocess({
14725
+ type: "pipe",
14726
+ in: transform(fn),
14727
+ out: schema
14728
+ });
13989
14729
  }
13990
14730
 
13991
14731
  // ../../node_modules/zod/v4/classic/compat.js
@@ -14406,12 +15146,6 @@ function convertBaseSchema(schema, ctx) {
14406
15146
  default:
14407
15147
  throw new Error(`Unsupported type: ${type}`);
14408
15148
  }
14409
- if (schema.description) {
14410
- zodSchema = zodSchema.describe(schema.description);
14411
- }
14412
- if (schema.default !== void 0) {
14413
- zodSchema = zodSchema.default(schema.default);
14414
- }
14415
15149
  return zodSchema;
14416
15150
  }
14417
15151
  function convertSchema(schema, ctx) {
@@ -14448,6 +15182,9 @@ function convertSchema(schema, ctx) {
14448
15182
  if (schema.readOnly === true) {
14449
15183
  baseSchema = z.readonly(baseSchema);
14450
15184
  }
15185
+ if (schema.default !== void 0) {
15186
+ baseSchema = baseSchema.default(schema.default);
15187
+ }
14451
15188
  const extraMeta = {};
14452
15189
  const coreMetadataKeys = ["$id", "id", "$comment", "$anchor", "$vocabulary", "$dynamicRef", "$dynamicAnchor"];
14453
15190
  for (const key of coreMetadataKeys) {
@@ -14469,23 +15206,32 @@ function convertSchema(schema, ctx) {
14469
15206
  if (Object.keys(extraMeta).length > 0) {
14470
15207
  ctx.registry.add(baseSchema, extraMeta);
14471
15208
  }
15209
+ if (schema.description) {
15210
+ baseSchema = baseSchema.describe(schema.description);
15211
+ }
14472
15212
  return baseSchema;
14473
15213
  }
14474
15214
  function fromJSONSchema(schema, params) {
14475
15215
  if (typeof schema === "boolean") {
14476
15216
  return schema ? z.any() : z.never();
14477
15217
  }
14478
- const version2 = detectVersion(schema, params?.defaultTarget);
14479
- const defs = schema.$defs || schema.definitions || {};
15218
+ let normalized;
15219
+ try {
15220
+ normalized = JSON.parse(JSON.stringify(schema));
15221
+ } catch {
15222
+ throw new Error("fromJSONSchema input is not valid JSON (possibly cyclic); use $defs/$ref for recursive schemas");
15223
+ }
15224
+ const version2 = detectVersion(normalized, params?.defaultTarget);
15225
+ const defs = normalized.$defs || normalized.definitions || {};
14480
15226
  const ctx = {
14481
15227
  version: version2,
14482
15228
  defs,
14483
15229
  refs: /* @__PURE__ */ new Map(),
14484
15230
  processing: /* @__PURE__ */ new Set(),
14485
- rootSchema: schema,
15231
+ rootSchema: normalized,
14486
15232
  registry: params?.registry ?? globalRegistry
14487
15233
  };
14488
- return convertSchema(schema, ctx);
15234
+ return convertSchema(normalized, ctx);
14489
15235
  }
14490
15236
 
14491
15237
  // ../../node_modules/zod/v4/classic/coerce.js
@@ -14727,6 +15473,9 @@ var GLASSTRACE_ATTRIBUTE_NAMES = {
14727
15473
  SIDE_EFFECT_FIELD_TIMEZONE: "glasstrace.side_effect.field.timezone",
14728
15474
  SIDE_EFFECT_FIELD_STATUS: "glasstrace.side_effect.field.status",
14729
15475
  SIDE_EFFECT_FIELD_PHASE: "glasstrace.side_effect.field.phase",
15476
+ SIDE_EFFECT_FIELD_RECIPIENT_CLASS: "glasstrace.side_effect.field.recipientClass",
15477
+ SIDE_EFFECT_FIELD_PARTICIPANT_COUNT: "glasstrace.side_effect.field.participantCount",
15478
+ SIDE_EFFECT_FIELD_ACTIVE_PARTICIPANT_COUNT: "glasstrace.side_effect.field.activeParticipantCount",
14730
15479
  // Omission reason attributes — one per allowlisted reason. The
14731
15480
  // attribute value carries an integer count; the rejected value is
14732
15481
  // never echoed.
@@ -15011,10 +15760,10 @@ function tracedRequestMiddleware(options, handler) {
15011
15760
  let result;
15012
15761
  try {
15013
15762
  result = handler(req, ...rest);
15014
- } catch (error48) {
15015
- recordSpanError(span, error48);
15763
+ } catch (error51) {
15764
+ recordSpanError(span, error51);
15016
15765
  endSpanSafely(span);
15017
- throw error48;
15766
+ throw error51;
15018
15767
  }
15019
15768
  if (result !== null && typeof result === "object" && typeof result.then === "function") {
15020
15769
  return result.then(
@@ -15022,10 +15771,10 @@ function tracedRequestMiddleware(options, handler) {
15022
15771
  endSpanSafely(span);
15023
15772
  return value;
15024
15773
  },
15025
- (error48) => {
15026
- recordSpanError(span, error48);
15774
+ (error51) => {
15775
+ recordSpanError(span, error51);
15027
15776
  endSpanSafely(span);
15028
- throw error48;
15777
+ throw error51;
15029
15778
  }
15030
15779
  );
15031
15780
  }
@@ -15041,8 +15790,8 @@ function tracedRequestMiddleware(options, handler) {
15041
15790
  });
15042
15791
  return wrapped;
15043
15792
  }
15044
- function recordSpanError(span, error48) {
15045
- const normalized = error48 instanceof Error ? error48 : typeof error48 === "string" ? error48 : new Error(String(error48));
15793
+ function recordSpanError(span, error51) {
15794
+ const normalized = error51 instanceof Error ? error51 : typeof error51 === "string" ? error51 : new Error(String(error51));
15046
15795
  const statusMessage = normalized instanceof Error ? normalized.message : normalized;
15047
15796
  try {
15048
15797
  span.recordException(normalized);