@opentabs-dev/opentabs-plugin-reddit 0.0.86 → 0.0.87

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.
@@ -60,6 +60,7 @@
60
60
  return new Promise((resolve, reject) => {
61
61
  let settled = false;
62
62
  let poller;
63
+ let lastPredicateError;
63
64
  const isSettled = () => settled;
64
65
  const cleanup = () => {
65
66
  settled = true;
@@ -78,7 +79,8 @@
78
79
  if (isSettled())
79
80
  return;
80
81
  cleanup();
81
- reject(new Error(`waitUntil: timed out after ${timeout}ms waiting for predicate to return true`));
82
+ const errorContext = lastPredicateError instanceof Error ? `: predicate last threw \u2014 ${lastPredicateError.message}` : "";
83
+ reject(new Error(`waitUntil: timed out after ${timeout}ms waiting for predicate to return true${errorContext}`));
82
84
  }, timeout);
83
85
  const check2 = async () => {
84
86
  if (isSettled())
@@ -90,7 +92,8 @@
90
92
  resolve();
91
93
  return;
92
94
  }
93
- } catch {
95
+ } catch (err2) {
96
+ lastPredicateError = err2;
94
97
  }
95
98
  if (!isSettled()) {
96
99
  poller = setTimeout(() => void check2(), interval);
@@ -335,11 +338,11 @@
335
338
  credentials: "include",
336
339
  signal: AbortSignal.timeout(3e4)
337
340
  });
338
- } catch (error48) {
339
- if (error48 instanceof DOMException && error48.name === "TimeoutError") {
341
+ } catch (error51) {
342
+ if (error51 instanceof DOMException && error51.name === "TimeoutError") {
340
343
  throw ToolError.timeout("Reddit API request timed out after 30000ms");
341
344
  }
342
- throw ToolError.internal(`Reddit API network error: ${error48 instanceof Error ? error48.message : String(error48)}`);
345
+ throw ToolError.internal(`Reddit API network error: ${error51 instanceof Error ? error51.message : String(error51)}`);
343
346
  }
344
347
  if (response.status === 429) {
345
348
  const reset = response.headers.get("x-ratelimit-reset");
@@ -384,11 +387,11 @@
384
387
  credentials: "include",
385
388
  signal: AbortSignal.timeout(3e4)
386
389
  });
387
- } catch (error48) {
388
- if (error48 instanceof DOMException && error48.name === "TimeoutError") {
390
+ } catch (error51) {
391
+ if (error51 instanceof DOMException && error51.name === "TimeoutError") {
389
392
  throw ToolError.timeout("Reddit API request timed out after 30000ms");
390
393
  }
391
- throw ToolError.internal(`Reddit API network error: ${error48 instanceof Error ? error48.message : String(error48)}`);
394
+ throw ToolError.internal(`Reddit API network error: ${error51 instanceof Error ? error51.message : String(error51)}`);
392
395
  }
393
396
  if (response.status === 429) {
394
397
  const reset = response.headers.get("x-ratelimit-reset");
@@ -398,7 +401,7 @@
398
401
  if (!response.ok) {
399
402
  const errorText = await response.text().catch(() => response.statusText);
400
403
  if (response.status === 401 || response.status === 403) {
401
- cachedModhash = null;
404
+ clearSessionCache();
402
405
  throw ToolError.auth(`Reddit API HTTP ${response.status}: ${errorText}`);
403
406
  }
404
407
  if (response.status === 404) {
@@ -432,12 +435,12 @@
432
435
  body: form.toString(),
433
436
  signal: AbortSignal.timeout(3e4)
434
437
  });
435
- } catch (error48) {
436
- if (error48 instanceof DOMException && error48.name === "TimeoutError") {
438
+ } catch (error51) {
439
+ if (error51 instanceof DOMException && error51.name === "TimeoutError") {
437
440
  throw ToolError.timeout("Reddit OAuth API request timed out after 30000ms");
438
441
  }
439
442
  throw ToolError.internal(
440
- `Reddit OAuth API network error: ${error48 instanceof Error ? error48.message : String(error48)}`
443
+ `Reddit OAuth API network error: ${error51 instanceof Error ? error51.message : String(error51)}`
441
444
  );
442
445
  }
443
446
  if (response.status === 429) {
@@ -448,7 +451,7 @@
448
451
  if (!response.ok) {
449
452
  const errorText = await response.text().catch(() => response.statusText);
450
453
  if (response.status === 401 || response.status === 403) {
451
- cachedBearerToken = null;
454
+ clearSessionCache();
452
455
  throw ToolError.auth(`Reddit OAuth API HTTP ${response.status}: ${errorText}`);
453
456
  }
454
457
  if (response.status === 404) {
@@ -462,6 +465,11 @@
462
465
  throw ToolError.internal("Failed to parse Reddit OAuth API response");
463
466
  }
464
467
  };
468
+ var clearSessionCache = () => {
469
+ cachedModhash = null;
470
+ cachedBearerToken = null;
471
+ bearerTokenExpiry = 0;
472
+ };
465
473
 
466
474
  // node_modules/zod/v4/classic/external.js
467
475
  var external_exports = {};
@@ -603,6 +611,7 @@
603
611
  int32: () => int32,
604
612
  int64: () => int64,
605
613
  intersection: () => intersection,
614
+ invertCodec: () => invertCodec,
606
615
  ipv4: () => ipv42,
607
616
  ipv6: () => ipv62,
608
617
  iso: () => iso_exports,
@@ -983,7 +992,8 @@
983
992
  });
984
993
 
985
994
  // node_modules/zod/v4/core/core.js
986
- var NEVER = Object.freeze({
995
+ var _a;
996
+ var NEVER = /* @__PURE__ */ Object.freeze({
987
997
  status: "aborted"
988
998
  });
989
999
  // @__NO_SIDE_EFFECTS__
@@ -1018,10 +1028,10 @@
1018
1028
  }
1019
1029
  Object.defineProperty(Definition, "name", { value: name });
1020
1030
  function _(def) {
1021
- var _a2;
1031
+ var _a3;
1022
1032
  const inst = params?.Parent ? new Definition() : this;
1023
1033
  init(inst, def);
1024
- (_a2 = inst._zod).deferred ?? (_a2.deferred = []);
1034
+ (_a3 = inst._zod).deferred ?? (_a3.deferred = []);
1025
1035
  for (const fn of inst._zod.deferred) {
1026
1036
  fn();
1027
1037
  }
@@ -1050,7 +1060,8 @@
1050
1060
  this.name = "ZodEncodeError";
1051
1061
  }
1052
1062
  };
1053
- var globalConfig = {};
1063
+ (_a = globalThis).__zod_globalConfig ?? (_a.__zod_globalConfig = {});
1064
+ var globalConfig = globalThis.__zod_globalConfig;
1054
1065
  function config(newConfig) {
1055
1066
  if (newConfig)
1056
1067
  Object.assign(globalConfig, newConfig);
@@ -1083,6 +1094,7 @@
1083
1094
  defineLazy: () => defineLazy,
1084
1095
  esc: () => esc,
1085
1096
  escapeRegex: () => escapeRegex,
1097
+ explicitlyAborted: () => explicitlyAborted,
1086
1098
  extend: () => extend,
1087
1099
  finalizeIssue: () => finalizeIssue,
1088
1100
  floatSafeRemainder: () => floatSafeRemainder,
@@ -1171,19 +1183,12 @@
1171
1183
  return source.slice(start, end);
1172
1184
  }
1173
1185
  function floatSafeRemainder(val, step) {
1174
- const valDecCount = (val.toString().split(".")[1] || "").length;
1175
- const stepString = step.toString();
1176
- let stepDecCount = (stepString.split(".")[1] || "").length;
1177
- if (stepDecCount === 0 && /\d?e-\d?/.test(stepString)) {
1178
- const match = stepString.match(/\d?e-(\d?)/);
1179
- if (match?.[1]) {
1180
- stepDecCount = Number.parseInt(match[1]);
1181
- }
1182
- }
1183
- const decCount = valDecCount > stepDecCount ? valDecCount : stepDecCount;
1184
- const valInt = Number.parseInt(val.toFixed(decCount).replace(".", ""));
1185
- const stepInt = Number.parseInt(step.toFixed(decCount).replace(".", ""));
1186
- return valInt % stepInt / 10 ** decCount;
1186
+ const ratio = val / step;
1187
+ const roundedRatio = Math.round(ratio);
1188
+ const tolerance = Number.EPSILON * Math.max(Math.abs(ratio), 1);
1189
+ if (Math.abs(ratio - roundedRatio) < tolerance)
1190
+ return 0;
1191
+ return ratio - roundedRatio;
1187
1192
  }
1188
1193
  var EVALUATING = /* @__PURE__ */ Symbol("evaluating");
1189
1194
  function defineLazy(object2, key, getter) {
@@ -1265,7 +1270,10 @@
1265
1270
  function isObject(data) {
1266
1271
  return typeof data === "object" && data !== null && !Array.isArray(data);
1267
1272
  }
1268
- var allowsEval = cached(() => {
1273
+ var allowsEval = /* @__PURE__ */ cached(() => {
1274
+ if (globalConfig.jitless) {
1275
+ return false;
1276
+ }
1269
1277
  if (typeof navigator !== "undefined" && navigator?.userAgent?.includes("Cloudflare")) {
1270
1278
  return false;
1271
1279
  }
@@ -1298,6 +1306,10 @@
1298
1306
  return { ...o };
1299
1307
  if (Array.isArray(o))
1300
1308
  return [...o];
1309
+ if (o instanceof Map)
1310
+ return new Map(o);
1311
+ if (o instanceof Set)
1312
+ return new Set(o);
1301
1313
  return o;
1302
1314
  }
1303
1315
  function numKeys(data) {
@@ -1354,7 +1366,14 @@
1354
1366
  }
1355
1367
  };
1356
1368
  var propertyKeyTypes = /* @__PURE__ */ new Set(["string", "number", "symbol"]);
1357
- var primitiveTypes = /* @__PURE__ */ new Set(["string", "number", "bigint", "boolean", "symbol", "undefined"]);
1369
+ var primitiveTypes = /* @__PURE__ */ new Set([
1370
+ "string",
1371
+ "number",
1372
+ "bigint",
1373
+ "boolean",
1374
+ "symbol",
1375
+ "undefined"
1376
+ ]);
1358
1377
  function escapeRegex(str) {
1359
1378
  return str.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
1360
1379
  }
@@ -1523,6 +1542,9 @@
1523
1542
  return clone(schema, def);
1524
1543
  }
1525
1544
  function merge(a, b) {
1545
+ if (a._zod.def.checks?.length) {
1546
+ throw new Error(".merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.");
1547
+ }
1526
1548
  const def = mergeDefs(a._zod.def, {
1527
1549
  get shape() {
1528
1550
  const _shape = { ...a._zod.def.shape, ...b._zod.def.shape };
@@ -1532,8 +1554,7 @@
1532
1554
  get catchall() {
1533
1555
  return b._zod.def.catchall;
1534
1556
  },
1535
- checks: []
1536
- // delete existing checks
1557
+ checks: b._zod.def.checks ?? []
1537
1558
  });
1538
1559
  return clone(a, def);
1539
1560
  }
@@ -1616,10 +1637,20 @@
1616
1637
  }
1617
1638
  return false;
1618
1639
  }
1640
+ function explicitlyAborted(x, startIndex = 0) {
1641
+ if (x.aborted === true)
1642
+ return true;
1643
+ for (let i = startIndex; i < x.issues.length; i++) {
1644
+ if (x.issues[i]?.continue === false) {
1645
+ return true;
1646
+ }
1647
+ }
1648
+ return false;
1649
+ }
1619
1650
  function prefixIssues(path, issues) {
1620
1651
  return issues.map((iss) => {
1621
- var _a2;
1622
- (_a2 = iss).path ?? (_a2.path = []);
1652
+ var _a3;
1653
+ (_a3 = iss).path ?? (_a3.path = []);
1623
1654
  iss.path.unshift(path);
1624
1655
  return iss;
1625
1656
  });
@@ -1628,17 +1659,14 @@
1628
1659
  return typeof message === "string" ? message : message?.message;
1629
1660
  }
1630
1661
  function finalizeIssue(iss, ctx, config2) {
1631
- const full = { ...iss, path: iss.path ?? [] };
1632
- if (!iss.message) {
1633
- const message = unwrapMessage(iss.inst?._zod.def?.error?.(iss)) ?? unwrapMessage(ctx?.error?.(iss)) ?? unwrapMessage(config2.customError?.(iss)) ?? unwrapMessage(config2.localeError?.(iss)) ?? "Invalid input";
1634
- full.message = message;
1662
+ 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";
1663
+ const { inst: _inst, continue: _continue, input: _input, ...rest } = iss;
1664
+ rest.path ?? (rest.path = []);
1665
+ rest.message = message;
1666
+ if (ctx?.reportInput) {
1667
+ rest.input = _input;
1635
1668
  }
1636
- delete full.inst;
1637
- delete full.continue;
1638
- if (!ctx?.reportInput) {
1639
- delete full.input;
1640
- }
1641
- return full;
1669
+ return rest;
1642
1670
  }
1643
1671
  function getSizableOrigin(input) {
1644
1672
  if (input instanceof Set)
@@ -1755,10 +1783,10 @@
1755
1783
  };
1756
1784
  var $ZodError = $constructor("$ZodError", initializer);
1757
1785
  var $ZodRealError = $constructor("$ZodError", initializer, { Parent: Error });
1758
- function flattenError(error48, mapper = (issue2) => issue2.message) {
1786
+ function flattenError(error51, mapper = (issue2) => issue2.message) {
1759
1787
  const fieldErrors = {};
1760
1788
  const formErrors = [];
1761
- for (const sub of error48.issues) {
1789
+ for (const sub of error51.issues) {
1762
1790
  if (sub.path.length > 0) {
1763
1791
  fieldErrors[sub.path[0]] = fieldErrors[sub.path[0]] || [];
1764
1792
  fieldErrors[sub.path[0]].push(mapper(sub));
@@ -1768,50 +1796,53 @@
1768
1796
  }
1769
1797
  return { formErrors, fieldErrors };
1770
1798
  }
1771
- function formatError(error48, mapper = (issue2) => issue2.message) {
1799
+ function formatError(error51, mapper = (issue2) => issue2.message) {
1772
1800
  const fieldErrors = { _errors: [] };
1773
- const processError = (error49) => {
1774
- for (const issue2 of error49.issues) {
1801
+ const processError = (error52, path = []) => {
1802
+ for (const issue2 of error52.issues) {
1775
1803
  if (issue2.code === "invalid_union" && issue2.errors.length) {
1776
- issue2.errors.map((issues) => processError({ issues }));
1804
+ issue2.errors.map((issues) => processError({ issues }, [...path, ...issue2.path]));
1777
1805
  } else if (issue2.code === "invalid_key") {
1778
- processError({ issues: issue2.issues });
1806
+ processError({ issues: issue2.issues }, [...path, ...issue2.path]);
1779
1807
  } else if (issue2.code === "invalid_element") {
1780
- processError({ issues: issue2.issues });
1781
- } else if (issue2.path.length === 0) {
1782
- fieldErrors._errors.push(mapper(issue2));
1808
+ processError({ issues: issue2.issues }, [...path, ...issue2.path]);
1783
1809
  } else {
1784
- let curr = fieldErrors;
1785
- let i = 0;
1786
- while (i < issue2.path.length) {
1787
- const el = issue2.path[i];
1788
- const terminal = i === issue2.path.length - 1;
1789
- if (!terminal) {
1790
- curr[el] = curr[el] || { _errors: [] };
1791
- } else {
1792
- curr[el] = curr[el] || { _errors: [] };
1793
- curr[el]._errors.push(mapper(issue2));
1810
+ const fullpath = [...path, ...issue2.path];
1811
+ if (fullpath.length === 0) {
1812
+ fieldErrors._errors.push(mapper(issue2));
1813
+ } else {
1814
+ let curr = fieldErrors;
1815
+ let i = 0;
1816
+ while (i < fullpath.length) {
1817
+ const el = fullpath[i];
1818
+ const terminal = i === fullpath.length - 1;
1819
+ if (!terminal) {
1820
+ curr[el] = curr[el] || { _errors: [] };
1821
+ } else {
1822
+ curr[el] = curr[el] || { _errors: [] };
1823
+ curr[el]._errors.push(mapper(issue2));
1824
+ }
1825
+ curr = curr[el];
1826
+ i++;
1794
1827
  }
1795
- curr = curr[el];
1796
- i++;
1797
1828
  }
1798
1829
  }
1799
1830
  }
1800
1831
  };
1801
- processError(error48);
1832
+ processError(error51);
1802
1833
  return fieldErrors;
1803
1834
  }
1804
- function treeifyError(error48, mapper = (issue2) => issue2.message) {
1835
+ function treeifyError(error51, mapper = (issue2) => issue2.message) {
1805
1836
  const result = { errors: [] };
1806
- const processError = (error49, path = []) => {
1807
- var _a2, _b;
1808
- for (const issue2 of error49.issues) {
1837
+ const processError = (error52, path = []) => {
1838
+ var _a3, _b;
1839
+ for (const issue2 of error52.issues) {
1809
1840
  if (issue2.code === "invalid_union" && issue2.errors.length) {
1810
- issue2.errors.map((issues) => processError({ issues }, issue2.path));
1841
+ issue2.errors.map((issues) => processError({ issues }, [...path, ...issue2.path]));
1811
1842
  } else if (issue2.code === "invalid_key") {
1812
- processError({ issues: issue2.issues }, issue2.path);
1843
+ processError({ issues: issue2.issues }, [...path, ...issue2.path]);
1813
1844
  } else if (issue2.code === "invalid_element") {
1814
- processError({ issues: issue2.issues }, issue2.path);
1845
+ processError({ issues: issue2.issues }, [...path, ...issue2.path]);
1815
1846
  } else {
1816
1847
  const fullpath = [...path, ...issue2.path];
1817
1848
  if (fullpath.length === 0) {
@@ -1825,7 +1856,7 @@
1825
1856
  const terminal = i === fullpath.length - 1;
1826
1857
  if (typeof el === "string") {
1827
1858
  curr.properties ?? (curr.properties = {});
1828
- (_a2 = curr.properties)[el] ?? (_a2[el] = { errors: [] });
1859
+ (_a3 = curr.properties)[el] ?? (_a3[el] = { errors: [] });
1829
1860
  curr = curr.properties[el];
1830
1861
  } else {
1831
1862
  curr.items ?? (curr.items = []);
@@ -1840,7 +1871,7 @@
1840
1871
  }
1841
1872
  }
1842
1873
  };
1843
- processError(error48);
1874
+ processError(error51);
1844
1875
  return result;
1845
1876
  }
1846
1877
  function toDotPath(_path) {
@@ -1861,9 +1892,9 @@
1861
1892
  }
1862
1893
  return segs.join("");
1863
1894
  }
1864
- function prettifyError(error48) {
1895
+ function prettifyError(error51) {
1865
1896
  const lines = [];
1866
- const issues = [...error48.issues].sort((a, b) => (a.path ?? []).length - (b.path ?? []).length);
1897
+ const issues = [...error51.issues].sort((a, b) => (a.path ?? []).length - (b.path ?? []).length);
1867
1898
  for (const issue2 of issues) {
1868
1899
  lines.push(`\u2716 ${issue2.message}`);
1869
1900
  if (issue2.path?.length)
@@ -1874,7 +1905,7 @@
1874
1905
 
1875
1906
  // node_modules/zod/v4/core/parse.js
1876
1907
  var _parse = (_Err) => (schema, value, _ctx, _params) => {
1877
- const ctx = _ctx ? Object.assign(_ctx, { async: false }) : { async: false };
1908
+ const ctx = _ctx ? { ..._ctx, async: false } : { async: false };
1878
1909
  const result = schema._zod.run({ value, issues: [] }, ctx);
1879
1910
  if (result instanceof Promise) {
1880
1911
  throw new $ZodAsyncError();
@@ -1888,7 +1919,7 @@
1888
1919
  };
1889
1920
  var parse = /* @__PURE__ */ _parse($ZodRealError);
1890
1921
  var _parseAsync = (_Err) => async (schema, value, _ctx, params) => {
1891
- const ctx = _ctx ? Object.assign(_ctx, { async: true }) : { async: true };
1922
+ const ctx = _ctx ? { ..._ctx, async: true } : { async: true };
1892
1923
  let result = schema._zod.run({ value, issues: [] }, ctx);
1893
1924
  if (result instanceof Promise)
1894
1925
  result = await result;
@@ -1913,7 +1944,7 @@
1913
1944
  };
1914
1945
  var safeParse = /* @__PURE__ */ _safeParse($ZodRealError);
1915
1946
  var _safeParseAsync = (_Err) => async (schema, value, _ctx) => {
1916
- const ctx = _ctx ? Object.assign(_ctx, { async: true }) : { async: true };
1947
+ const ctx = _ctx ? { ..._ctx, async: true } : { async: true };
1917
1948
  let result = schema._zod.run({ value, issues: [] }, ctx);
1918
1949
  if (result instanceof Promise)
1919
1950
  result = await result;
@@ -1924,7 +1955,7 @@
1924
1955
  };
1925
1956
  var safeParseAsync = /* @__PURE__ */ _safeParseAsync($ZodRealError);
1926
1957
  var _encode = (_Err) => (schema, value, _ctx) => {
1927
- const ctx = _ctx ? Object.assign(_ctx, { direction: "backward" }) : { direction: "backward" };
1958
+ const ctx = _ctx ? { ..._ctx, direction: "backward" } : { direction: "backward" };
1928
1959
  return _parse(_Err)(schema, value, ctx);
1929
1960
  };
1930
1961
  var encode = /* @__PURE__ */ _encode($ZodRealError);
@@ -1933,7 +1964,7 @@
1933
1964
  };
1934
1965
  var decode = /* @__PURE__ */ _decode($ZodRealError);
1935
1966
  var _encodeAsync = (_Err) => async (schema, value, _ctx) => {
1936
- const ctx = _ctx ? Object.assign(_ctx, { direction: "backward" }) : { direction: "backward" };
1967
+ const ctx = _ctx ? { ..._ctx, direction: "backward" } : { direction: "backward" };
1937
1968
  return _parseAsync(_Err)(schema, value, ctx);
1938
1969
  };
1939
1970
  var encodeAsync = /* @__PURE__ */ _encodeAsync($ZodRealError);
@@ -1942,7 +1973,7 @@
1942
1973
  };
1943
1974
  var decodeAsync = /* @__PURE__ */ _decodeAsync($ZodRealError);
1944
1975
  var _safeEncode = (_Err) => (schema, value, _ctx) => {
1945
- const ctx = _ctx ? Object.assign(_ctx, { direction: "backward" }) : { direction: "backward" };
1976
+ const ctx = _ctx ? { ..._ctx, direction: "backward" } : { direction: "backward" };
1946
1977
  return _safeParse(_Err)(schema, value, ctx);
1947
1978
  };
1948
1979
  var safeEncode = /* @__PURE__ */ _safeEncode($ZodRealError);
@@ -1951,7 +1982,7 @@
1951
1982
  };
1952
1983
  var safeDecode = /* @__PURE__ */ _safeDecode($ZodRealError);
1953
1984
  var _safeEncodeAsync = (_Err) => async (schema, value, _ctx) => {
1954
- const ctx = _ctx ? Object.assign(_ctx, { direction: "backward" }) : { direction: "backward" };
1985
+ const ctx = _ctx ? { ..._ctx, direction: "backward" } : { direction: "backward" };
1955
1986
  return _safeParseAsync(_Err)(schema, value, ctx);
1956
1987
  };
1957
1988
  var safeEncodeAsync = /* @__PURE__ */ _safeEncodeAsync($ZodRealError);
@@ -1984,6 +2015,7 @@
1984
2015
  hex: () => hex,
1985
2016
  hostname: () => hostname,
1986
2017
  html5Email: () => html5Email,
2018
+ httpProtocol: () => httpProtocol,
1987
2019
  idnEmail: () => idnEmail,
1988
2020
  integer: () => integer,
1989
2021
  ipv4: () => ipv4,
@@ -2022,7 +2054,7 @@
2022
2054
  uuid7: () => uuid7,
2023
2055
  xid: () => xid
2024
2056
  });
2025
- var cuid = /^[cC][^\s-]{8,}$/;
2057
+ var cuid = /^[cC][0-9a-z]{6,}$/;
2026
2058
  var cuid2 = /^[0-9a-z]+$/;
2027
2059
  var ulid = /^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/;
2028
2060
  var xid = /^[0-9a-vA-V]{20}$/;
@@ -2061,6 +2093,7 @@
2061
2093
  var base64url = /^[A-Za-z0-9_-]*$/;
2062
2094
  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])?)*\.?$/;
2063
2095
  var domain = /^([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$/;
2096
+ var httpProtocol = /^https?$/;
2064
2097
  var e164 = /^\+[1-9]\d{6,14}$/;
2065
2098
  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])))`;
2066
2099
  var date = /* @__PURE__ */ new RegExp(`^${dateSource}$`);
@@ -2119,10 +2152,10 @@
2119
2152
 
2120
2153
  // node_modules/zod/v4/core/checks.js
2121
2154
  var $ZodCheck = /* @__PURE__ */ $constructor("$ZodCheck", (inst, def) => {
2122
- var _a2;
2155
+ var _a3;
2123
2156
  inst._zod ?? (inst._zod = {});
2124
2157
  inst._zod.def = def;
2125
- (_a2 = inst._zod).onattach ?? (_a2.onattach = []);
2158
+ (_a3 = inst._zod).onattach ?? (_a3.onattach = []);
2126
2159
  });
2127
2160
  var numericOriginMap = {
2128
2161
  number: "number",
@@ -2188,8 +2221,8 @@
2188
2221
  var $ZodCheckMultipleOf = /* @__PURE__ */ $constructor("$ZodCheckMultipleOf", (inst, def) => {
2189
2222
  $ZodCheck.init(inst, def);
2190
2223
  inst._zod.onattach.push((inst2) => {
2191
- var _a2;
2192
- (_a2 = inst2._zod.bag).multipleOf ?? (_a2.multipleOf = def.value);
2224
+ var _a3;
2225
+ (_a3 = inst2._zod.bag).multipleOf ?? (_a3.multipleOf = def.value);
2193
2226
  });
2194
2227
  inst._zod.check = (payload) => {
2195
2228
  if (typeof payload.value !== typeof def.value)
@@ -2322,9 +2355,9 @@
2322
2355
  };
2323
2356
  });
2324
2357
  var $ZodCheckMaxSize = /* @__PURE__ */ $constructor("$ZodCheckMaxSize", (inst, def) => {
2325
- var _a2;
2358
+ var _a3;
2326
2359
  $ZodCheck.init(inst, def);
2327
- (_a2 = inst._zod.def).when ?? (_a2.when = (payload) => {
2360
+ (_a3 = inst._zod.def).when ?? (_a3.when = (payload) => {
2328
2361
  const val = payload.value;
2329
2362
  return !nullish(val) && val.size !== void 0;
2330
2363
  });
@@ -2350,9 +2383,9 @@
2350
2383
  };
2351
2384
  });
2352
2385
  var $ZodCheckMinSize = /* @__PURE__ */ $constructor("$ZodCheckMinSize", (inst, def) => {
2353
- var _a2;
2386
+ var _a3;
2354
2387
  $ZodCheck.init(inst, def);
2355
- (_a2 = inst._zod.def).when ?? (_a2.when = (payload) => {
2388
+ (_a3 = inst._zod.def).when ?? (_a3.when = (payload) => {
2356
2389
  const val = payload.value;
2357
2390
  return !nullish(val) && val.size !== void 0;
2358
2391
  });
@@ -2378,9 +2411,9 @@
2378
2411
  };
2379
2412
  });
2380
2413
  var $ZodCheckSizeEquals = /* @__PURE__ */ $constructor("$ZodCheckSizeEquals", (inst, def) => {
2381
- var _a2;
2414
+ var _a3;
2382
2415
  $ZodCheck.init(inst, def);
2383
- (_a2 = inst._zod.def).when ?? (_a2.when = (payload) => {
2416
+ (_a3 = inst._zod.def).when ?? (_a3.when = (payload) => {
2384
2417
  const val = payload.value;
2385
2418
  return !nullish(val) && val.size !== void 0;
2386
2419
  });
@@ -2408,9 +2441,9 @@
2408
2441
  };
2409
2442
  });
2410
2443
  var $ZodCheckMaxLength = /* @__PURE__ */ $constructor("$ZodCheckMaxLength", (inst, def) => {
2411
- var _a2;
2444
+ var _a3;
2412
2445
  $ZodCheck.init(inst, def);
2413
- (_a2 = inst._zod.def).when ?? (_a2.when = (payload) => {
2446
+ (_a3 = inst._zod.def).when ?? (_a3.when = (payload) => {
2414
2447
  const val = payload.value;
2415
2448
  return !nullish(val) && val.length !== void 0;
2416
2449
  });
@@ -2437,9 +2470,9 @@
2437
2470
  };
2438
2471
  });
2439
2472
  var $ZodCheckMinLength = /* @__PURE__ */ $constructor("$ZodCheckMinLength", (inst, def) => {
2440
- var _a2;
2473
+ var _a3;
2441
2474
  $ZodCheck.init(inst, def);
2442
- (_a2 = inst._zod.def).when ?? (_a2.when = (payload) => {
2475
+ (_a3 = inst._zod.def).when ?? (_a3.when = (payload) => {
2443
2476
  const val = payload.value;
2444
2477
  return !nullish(val) && val.length !== void 0;
2445
2478
  });
@@ -2466,9 +2499,9 @@
2466
2499
  };
2467
2500
  });
2468
2501
  var $ZodCheckLengthEquals = /* @__PURE__ */ $constructor("$ZodCheckLengthEquals", (inst, def) => {
2469
- var _a2;
2502
+ var _a3;
2470
2503
  $ZodCheck.init(inst, def);
2471
- (_a2 = inst._zod.def).when ?? (_a2.when = (payload) => {
2504
+ (_a3 = inst._zod.def).when ?? (_a3.when = (payload) => {
2472
2505
  const val = payload.value;
2473
2506
  return !nullish(val) && val.length !== void 0;
2474
2507
  });
@@ -2497,7 +2530,7 @@
2497
2530
  };
2498
2531
  });
2499
2532
  var $ZodCheckStringFormat = /* @__PURE__ */ $constructor("$ZodCheckStringFormat", (inst, def) => {
2500
- var _a2, _b;
2533
+ var _a3, _b;
2501
2534
  $ZodCheck.init(inst, def);
2502
2535
  inst._zod.onattach.push((inst2) => {
2503
2536
  const bag = inst2._zod.bag;
@@ -2508,7 +2541,7 @@
2508
2541
  }
2509
2542
  });
2510
2543
  if (def.pattern)
2511
- (_a2 = inst._zod).check ?? (_a2.check = (payload) => {
2544
+ (_a3 = inst._zod).check ?? (_a3.check = (payload) => {
2512
2545
  def.pattern.lastIndex = 0;
2513
2546
  if (def.pattern.test(payload.value))
2514
2547
  return;
@@ -2704,13 +2737,13 @@
2704
2737
  // node_modules/zod/v4/core/versions.js
2705
2738
  var version = {
2706
2739
  major: 4,
2707
- minor: 3,
2708
- patch: 6
2740
+ minor: 4,
2741
+ patch: 1
2709
2742
  };
2710
2743
 
2711
2744
  // node_modules/zod/v4/core/schemas.js
2712
2745
  var $ZodType = /* @__PURE__ */ $constructor("$ZodType", (inst, def) => {
2713
- var _a2;
2746
+ var _a3;
2714
2747
  inst ?? (inst = {});
2715
2748
  inst._zod.def = def;
2716
2749
  inst._zod.bag = inst._zod.bag || {};
@@ -2725,7 +2758,7 @@
2725
2758
  }
2726
2759
  }
2727
2760
  if (checks.length === 0) {
2728
- (_a2 = inst._zod).deferred ?? (_a2.deferred = []);
2761
+ (_a3 = inst._zod).deferred ?? (_a3.deferred = []);
2729
2762
  inst._zod.deferred?.push(() => {
2730
2763
  inst._zod.run = inst._zod.parse;
2731
2764
  });
@@ -2735,6 +2768,8 @@
2735
2768
  let asyncResult;
2736
2769
  for (const ch of checks2) {
2737
2770
  if (ch._zod.def.when) {
2771
+ if (explicitlyAborted(payload))
2772
+ continue;
2738
2773
  const shouldRun = ch._zod.def.when(payload);
2739
2774
  if (!shouldRun)
2740
2775
  continue;
@@ -2875,6 +2910,19 @@
2875
2910
  inst._zod.check = (payload) => {
2876
2911
  try {
2877
2912
  const trimmed = payload.value.trim();
2913
+ if (!def.normalize && def.protocol?.source === httpProtocol.source) {
2914
+ if (!/^https?:\/\//i.test(trimmed)) {
2915
+ payload.issues.push({
2916
+ code: "invalid_format",
2917
+ format: "url",
2918
+ note: "Invalid URL format",
2919
+ input: payload.value,
2920
+ inst,
2921
+ continue: !def.abort
2922
+ });
2923
+ return;
2924
+ }
2925
+ }
2878
2926
  const url2 = new URL(trimmed);
2879
2927
  if (def.hostname) {
2880
2928
  def.hostname.lastIndex = 0;
@@ -3028,6 +3076,8 @@
3028
3076
  function isValidBase64(data) {
3029
3077
  if (data === "")
3030
3078
  return true;
3079
+ if (/\s/.test(data))
3080
+ return false;
3031
3081
  if (data.length % 4 !== 0)
3032
3082
  return false;
3033
3083
  try {
@@ -3220,8 +3270,6 @@
3220
3270
  $ZodType.init(inst, def);
3221
3271
  inst._zod.pattern = _undefined;
3222
3272
  inst._zod.values = /* @__PURE__ */ new Set([void 0]);
3223
- inst._zod.optin = "optional";
3224
- inst._zod.optout = "optional";
3225
3273
  inst._zod.parse = (payload, _ctx) => {
3226
3274
  const input = payload.value;
3227
3275
  if (typeof input === "undefined")
@@ -3350,15 +3398,27 @@
3350
3398
  return payload;
3351
3399
  };
3352
3400
  });
3353
- function handlePropertyResult(result, final, key, input, isOptionalOut) {
3401
+ function handlePropertyResult(result, final, key, input, isOptionalIn, isOptionalOut) {
3402
+ const isPresent = key in input;
3354
3403
  if (result.issues.length) {
3355
- if (isOptionalOut && !(key in input)) {
3404
+ if (isOptionalIn && isOptionalOut && !isPresent) {
3356
3405
  return;
3357
3406
  }
3358
3407
  final.issues.push(...prefixIssues(key, result.issues));
3359
3408
  }
3409
+ if (!isPresent && !isOptionalIn) {
3410
+ if (!result.issues.length) {
3411
+ final.issues.push({
3412
+ code: "invalid_type",
3413
+ expected: "nonoptional",
3414
+ input: void 0,
3415
+ path: [key]
3416
+ });
3417
+ }
3418
+ return;
3419
+ }
3360
3420
  if (result.value === void 0) {
3361
- if (key in input) {
3421
+ if (isPresent) {
3362
3422
  final.value[key] = void 0;
3363
3423
  }
3364
3424
  } else {
@@ -3386,8 +3446,11 @@
3386
3446
  const keySet = def.keySet;
3387
3447
  const _catchall = def.catchall._zod;
3388
3448
  const t = _catchall.def.type;
3449
+ const isOptionalIn = _catchall.optin === "optional";
3389
3450
  const isOptionalOut = _catchall.optout === "optional";
3390
3451
  for (const key in input) {
3452
+ if (key === "__proto__")
3453
+ continue;
3391
3454
  if (keySet.has(key))
3392
3455
  continue;
3393
3456
  if (t === "never") {
@@ -3396,9 +3459,9 @@
3396
3459
  }
3397
3460
  const r = _catchall.run({ value: input[key], issues: [] }, ctx);
3398
3461
  if (r instanceof Promise) {
3399
- proms.push(r.then((r2) => handlePropertyResult(r2, payload, key, input, isOptionalOut)));
3462
+ proms.push(r.then((r2) => handlePropertyResult(r2, payload, key, input, isOptionalIn, isOptionalOut)));
3400
3463
  } else {
3401
- handlePropertyResult(r, payload, key, input, isOptionalOut);
3464
+ handlePropertyResult(r, payload, key, input, isOptionalIn, isOptionalOut);
3402
3465
  }
3403
3466
  }
3404
3467
  if (unrecognized.length) {
@@ -3464,12 +3527,13 @@
3464
3527
  const shape = value.shape;
3465
3528
  for (const key of value.keys) {
3466
3529
  const el = shape[key];
3530
+ const isOptionalIn = el._zod.optin === "optional";
3467
3531
  const isOptionalOut = el._zod.optout === "optional";
3468
3532
  const r = el._zod.run({ value: input[key], issues: [] }, ctx);
3469
3533
  if (r instanceof Promise) {
3470
- proms.push(r.then((r2) => handlePropertyResult(r2, payload, key, input, isOptionalOut)));
3534
+ proms.push(r.then((r2) => handlePropertyResult(r2, payload, key, input, isOptionalIn, isOptionalOut)));
3471
3535
  } else {
3472
- handlePropertyResult(r, payload, key, input, isOptionalOut);
3536
+ handlePropertyResult(r, payload, key, input, isOptionalIn, isOptionalOut);
3473
3537
  }
3474
3538
  }
3475
3539
  if (!catchall) {
@@ -3500,9 +3564,10 @@
3500
3564
  const id = ids[key];
3501
3565
  const k = esc(key);
3502
3566
  const schema = shape[key];
3567
+ const isOptionalIn = schema?._zod?.optin === "optional";
3503
3568
  const isOptionalOut = schema?._zod?.optout === "optional";
3504
3569
  doc.write(`const ${id} = ${parseStr(key)};`);
3505
- if (isOptionalOut) {
3570
+ if (isOptionalIn && isOptionalOut) {
3506
3571
  doc.write(`
3507
3572
  if (${id}.issues.length) {
3508
3573
  if (${k} in input) {
@@ -3521,6 +3586,33 @@
3521
3586
  newResult[${k}] = ${id}.value;
3522
3587
  }
3523
3588
 
3589
+ `);
3590
+ } else if (!isOptionalIn) {
3591
+ doc.write(`
3592
+ const ${id}_present = ${k} in input;
3593
+ if (${id}.issues.length) {
3594
+ payload.issues = payload.issues.concat(${id}.issues.map(iss => ({
3595
+ ...iss,
3596
+ path: iss.path ? [${k}, ...iss.path] : [${k}]
3597
+ })));
3598
+ }
3599
+ if (!${id}_present && !${id}.issues.length) {
3600
+ payload.issues.push({
3601
+ code: "invalid_type",
3602
+ expected: "nonoptional",
3603
+ input: undefined,
3604
+ path: [${k}]
3605
+ });
3606
+ }
3607
+
3608
+ if (${id}_present) {
3609
+ if (${id}.value === undefined) {
3610
+ newResult[${k}] = undefined;
3611
+ } else {
3612
+ newResult[${k}] = ${id}.value;
3613
+ }
3614
+ }
3615
+
3524
3616
  `);
3525
3617
  } else {
3526
3618
  doc.write(`
@@ -3614,10 +3706,9 @@
3614
3706
  }
3615
3707
  return void 0;
3616
3708
  });
3617
- const single = def.options.length === 1;
3618
- const first = def.options[0]._zod.run;
3709
+ const first = def.options.length === 1 ? def.options[0]._zod.run : null;
3619
3710
  inst._zod.parse = (payload, ctx) => {
3620
- if (single) {
3711
+ if (first) {
3621
3712
  return first(payload, ctx);
3622
3713
  }
3623
3714
  let async = false;
@@ -3670,10 +3761,9 @@
3670
3761
  var $ZodXor = /* @__PURE__ */ $constructor("$ZodXor", (inst, def) => {
3671
3762
  $ZodUnion.init(inst, def);
3672
3763
  def.inclusive = false;
3673
- const single = def.options.length === 1;
3674
- const first = def.options[0]._zod.run;
3764
+ const first = def.options.length === 1 ? def.options[0]._zod.run : null;
3675
3765
  inst._zod.parse = (payload, ctx) => {
3676
- if (single) {
3766
+ if (first) {
3677
3767
  return first(payload, ctx);
3678
3768
  }
3679
3769
  let async = false;
@@ -3748,7 +3838,7 @@
3748
3838
  if (opt) {
3749
3839
  return opt._zod.run(payload, ctx);
3750
3840
  }
3751
- if (def.unionFallback) {
3841
+ if (def.unionFallback || ctx.direction === "backward") {
3752
3842
  return _super(payload, ctx);
3753
3843
  }
3754
3844
  payload.issues.push({
@@ -3756,6 +3846,7 @@
3756
3846
  errors: [],
3757
3847
  note: "No matching discriminator",
3758
3848
  discriminator: def.discriminator,
3849
+ options: Array.from(disc.value.keys()),
3759
3850
  input,
3760
3851
  path: [def.discriminator],
3761
3852
  inst
@@ -3877,64 +3968,96 @@
3877
3968
  }
3878
3969
  payload.value = [];
3879
3970
  const proms = [];
3880
- const reversedIndex = [...items].reverse().findIndex((item) => item._zod.optin !== "optional");
3881
- const optStart = reversedIndex === -1 ? 0 : items.length - reversedIndex;
3971
+ const optinStart = getTupleOptStart(items, "optin");
3972
+ const optoutStart = getTupleOptStart(items, "optout");
3882
3973
  if (!def.rest) {
3883
- const tooBig = input.length > items.length;
3884
- const tooSmall = input.length < optStart - 1;
3885
- if (tooBig || tooSmall) {
3974
+ if (input.length < optinStart) {
3886
3975
  payload.issues.push({
3887
- ...tooBig ? { code: "too_big", maximum: items.length, inclusive: true } : { code: "too_small", minimum: items.length },
3976
+ code: "too_small",
3977
+ minimum: optinStart,
3978
+ inclusive: true,
3888
3979
  input,
3889
3980
  inst,
3890
3981
  origin: "array"
3891
3982
  });
3892
3983
  return payload;
3893
3984
  }
3894
- }
3895
- let i = -1;
3896
- for (const item of items) {
3897
- i++;
3898
- if (i >= input.length) {
3899
- if (i >= optStart)
3900
- continue;
3985
+ if (input.length > items.length) {
3986
+ payload.issues.push({
3987
+ code: "too_big",
3988
+ maximum: items.length,
3989
+ inclusive: true,
3990
+ input,
3991
+ inst,
3992
+ origin: "array"
3993
+ });
3901
3994
  }
3902
- const result = item._zod.run({
3903
- value: input[i],
3904
- issues: []
3905
- }, ctx);
3906
- if (result instanceof Promise) {
3907
- proms.push(result.then((result2) => handleTupleResult(result2, payload, i)));
3995
+ }
3996
+ const itemResults = new Array(items.length);
3997
+ for (let i = 0; i < items.length; i++) {
3998
+ const r = items[i]._zod.run({ value: input[i], issues: [] }, ctx);
3999
+ if (r instanceof Promise) {
4000
+ proms.push(r.then((rr) => {
4001
+ itemResults[i] = rr;
4002
+ }));
3908
4003
  } else {
3909
- handleTupleResult(result, payload, i);
4004
+ itemResults[i] = r;
3910
4005
  }
3911
4006
  }
3912
4007
  if (def.rest) {
4008
+ let i = items.length - 1;
3913
4009
  const rest = input.slice(items.length);
3914
4010
  for (const el of rest) {
3915
4011
  i++;
3916
- const result = def.rest._zod.run({
3917
- value: el,
3918
- issues: []
3919
- }, ctx);
4012
+ const result = def.rest._zod.run({ value: el, issues: [] }, ctx);
3920
4013
  if (result instanceof Promise) {
3921
- proms.push(result.then((result2) => handleTupleResult(result2, payload, i)));
4014
+ proms.push(result.then((r) => handleTupleResult(r, payload, i)));
3922
4015
  } else {
3923
4016
  handleTupleResult(result, payload, i);
3924
4017
  }
3925
4018
  }
3926
4019
  }
3927
- if (proms.length)
3928
- return Promise.all(proms).then(() => payload);
3929
- return payload;
4020
+ if (proms.length) {
4021
+ return Promise.all(proms).then(() => handleTupleResults(itemResults, payload, items, input, optoutStart));
4022
+ }
4023
+ return handleTupleResults(itemResults, payload, items, input, optoutStart);
3930
4024
  };
3931
4025
  });
4026
+ function getTupleOptStart(items, key) {
4027
+ for (let i = items.length - 1; i >= 0; i--) {
4028
+ if (items[i]._zod[key] !== "optional")
4029
+ return i + 1;
4030
+ }
4031
+ return 0;
4032
+ }
3932
4033
  function handleTupleResult(result, final, index) {
3933
4034
  if (result.issues.length) {
3934
4035
  final.issues.push(...prefixIssues(index, result.issues));
3935
4036
  }
3936
4037
  final.value[index] = result.value;
3937
4038
  }
4039
+ function handleTupleResults(itemResults, final, items, input, optoutStart) {
4040
+ for (let i = 0; i < items.length; i++) {
4041
+ const r = itemResults[i];
4042
+ const isPresent = i < input.length;
4043
+ if (r.issues.length) {
4044
+ if (!isPresent && i >= optoutStart) {
4045
+ final.value.length = i;
4046
+ break;
4047
+ }
4048
+ final.issues.push(...prefixIssues(i, r.issues));
4049
+ }
4050
+ final.value[i] = r.value;
4051
+ }
4052
+ for (let i = final.value.length - 1; i >= input.length; i--) {
4053
+ if (items[i]._zod.optout === "optional" && final.value[i] === void 0) {
4054
+ final.value.length = i;
4055
+ } else {
4056
+ break;
4057
+ }
4058
+ }
4059
+ return final;
4060
+ }
3938
4061
  var $ZodRecord = /* @__PURE__ */ $constructor("$ZodRecord", (inst, def) => {
3939
4062
  $ZodType.init(inst, def);
3940
4063
  inst._zod.parse = (payload, ctx) => {
@@ -3956,19 +4079,35 @@
3956
4079
  for (const key of values) {
3957
4080
  if (typeof key === "string" || typeof key === "number" || typeof key === "symbol") {
3958
4081
  recordKeys.add(typeof key === "number" ? key.toString() : key);
4082
+ const keyResult = def.keyType._zod.run({ value: key, issues: [] }, ctx);
4083
+ if (keyResult instanceof Promise) {
4084
+ throw new Error("Async schemas not supported in object keys currently");
4085
+ }
4086
+ if (keyResult.issues.length) {
4087
+ payload.issues.push({
4088
+ code: "invalid_key",
4089
+ origin: "record",
4090
+ issues: keyResult.issues.map((iss) => finalizeIssue(iss, ctx, config())),
4091
+ input: key,
4092
+ path: [key],
4093
+ inst
4094
+ });
4095
+ continue;
4096
+ }
4097
+ const outKey = keyResult.value;
3959
4098
  const result = def.valueType._zod.run({ value: input[key], issues: [] }, ctx);
3960
4099
  if (result instanceof Promise) {
3961
4100
  proms.push(result.then((result2) => {
3962
4101
  if (result2.issues.length) {
3963
4102
  payload.issues.push(...prefixIssues(key, result2.issues));
3964
4103
  }
3965
- payload.value[key] = result2.value;
4104
+ payload.value[outKey] = result2.value;
3966
4105
  }));
3967
4106
  } else {
3968
4107
  if (result.issues.length) {
3969
4108
  payload.issues.push(...prefixIssues(key, result.issues));
3970
4109
  }
3971
- payload.value[key] = result.value;
4110
+ payload.value[outKey] = result.value;
3972
4111
  }
3973
4112
  }
3974
4113
  }
@@ -3992,6 +4131,8 @@
3992
4131
  for (const key of Reflect.ownKeys(input)) {
3993
4132
  if (key === "__proto__")
3994
4133
  continue;
4134
+ if (!Object.prototype.propertyIsEnumerable.call(input, key))
4135
+ continue;
3995
4136
  let keyResult = def.keyType._zod.run({ value: key, issues: [] }, ctx);
3996
4137
  if (keyResult instanceof Promise) {
3997
4138
  throw new Error("Async schemas not supported in object keys currently");
@@ -4635,7 +4776,12 @@
4635
4776
  });
4636
4777
  var $ZodLazy = /* @__PURE__ */ $constructor("$ZodLazy", (inst, def) => {
4637
4778
  $ZodType.init(inst, def);
4638
- defineLazy(inst._zod, "innerType", () => def.getter());
4779
+ defineLazy(inst._zod, "innerType", () => {
4780
+ const d = def;
4781
+ if (!d._cachedInner)
4782
+ d._cachedInner = def.getter();
4783
+ return d._cachedInner;
4784
+ });
4639
4785
  defineLazy(inst._zod, "pattern", () => inst._zod.innerType?._zod?.pattern);
4640
4786
  defineLazy(inst._zod, "propValues", () => inst._zod.innerType?._zod?.propValues);
4641
4787
  defineLazy(inst._zod, "optin", () => inst._zod.innerType?._zod?.optin ?? void 0);
@@ -4690,6 +4836,7 @@
4690
4836
  cs: () => cs_default,
4691
4837
  da: () => da_default,
4692
4838
  de: () => de_default,
4839
+ el: () => el_default,
4693
4840
  en: () => en_default,
4694
4841
  eo: () => eo_default,
4695
4842
  es: () => es_default,
@@ -4698,6 +4845,7 @@
4698
4845
  fr: () => fr_default,
4699
4846
  frCA: () => fr_CA_default,
4700
4847
  he: () => he_default,
4848
+ hr: () => hr_default,
4701
4849
  hu: () => hu_default,
4702
4850
  hy: () => hy_default,
4703
4851
  id: () => id_default,
@@ -4717,6 +4865,7 @@
4717
4865
  pl: () => pl_default,
4718
4866
  ps: () => ps_default,
4719
4867
  pt: () => pt_default,
4868
+ ro: () => ro_default,
4720
4869
  ru: () => ru_default,
4721
4870
  sl: () => sl_default,
4722
4871
  sv: () => sv_default,
@@ -5670,8 +5819,118 @@
5670
5819
  };
5671
5820
  }
5672
5821
 
5673
- // node_modules/zod/v4/locales/en.js
5822
+ // node_modules/zod/v4/locales/el.js
5674
5823
  var error9 = () => {
5824
+ const Sizable = {
5825
+ string: { unit: "\u03C7\u03B1\u03C1\u03B1\u03BA\u03C4\u03AE\u03C1\u03B5\u03C2", verb: "\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9" },
5826
+ file: { unit: "bytes", verb: "\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9" },
5827
+ array: { unit: "\u03C3\u03C4\u03BF\u03B9\u03C7\u03B5\u03AF\u03B1", verb: "\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9" },
5828
+ set: { unit: "\u03C3\u03C4\u03BF\u03B9\u03C7\u03B5\u03AF\u03B1", verb: "\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9" },
5829
+ map: { unit: "\u03BA\u03B1\u03C4\u03B1\u03C7\u03C9\u03C1\u03AE\u03C3\u03B5\u03B9\u03C2", verb: "\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9" }
5830
+ };
5831
+ function getSizing(origin) {
5832
+ return Sizable[origin] ?? null;
5833
+ }
5834
+ const FormatDictionary = {
5835
+ regex: "\u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2",
5836
+ email: "\u03B4\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 email",
5837
+ url: "URL",
5838
+ emoji: "emoji",
5839
+ uuid: "UUID",
5840
+ uuidv4: "UUIDv4",
5841
+ uuidv6: "UUIDv6",
5842
+ nanoid: "nanoid",
5843
+ guid: "GUID",
5844
+ cuid: "cuid",
5845
+ cuid2: "cuid2",
5846
+ ulid: "ULID",
5847
+ xid: "XID",
5848
+ ksuid: "KSUID",
5849
+ datetime: "ISO \u03B7\u03BC\u03B5\u03C1\u03BF\u03BC\u03B7\u03BD\u03AF\u03B1 \u03BA\u03B1\u03B9 \u03CE\u03C1\u03B1",
5850
+ date: "ISO \u03B7\u03BC\u03B5\u03C1\u03BF\u03BC\u03B7\u03BD\u03AF\u03B1",
5851
+ time: "ISO \u03CE\u03C1\u03B1",
5852
+ duration: "ISO \u03B4\u03B9\u03AC\u03C1\u03BA\u03B5\u03B9\u03B1",
5853
+ ipv4: "\u03B4\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 IPv4",
5854
+ ipv6: "\u03B4\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 IPv6",
5855
+ mac: "\u03B4\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 MAC",
5856
+ cidrv4: "\u03B5\u03CD\u03C1\u03BF\u03C2 IPv4",
5857
+ cidrv6: "\u03B5\u03CD\u03C1\u03BF\u03C2 IPv6",
5858
+ 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",
5859
+ 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",
5860
+ json_string: "\u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC JSON",
5861
+ e164: "\u03B1\u03C1\u03B9\u03B8\u03BC\u03CC\u03C2 E.164",
5862
+ jwt: "JWT",
5863
+ template_literal: "\u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2"
5864
+ };
5865
+ const TypeDictionary = {
5866
+ nan: "NaN"
5867
+ };
5868
+ return (issue2) => {
5869
+ switch (issue2.code) {
5870
+ case "invalid_type": {
5871
+ const expected = TypeDictionary[issue2.expected] ?? issue2.expected;
5872
+ const receivedType = parsedType(issue2.input);
5873
+ const received = TypeDictionary[receivedType] ?? receivedType;
5874
+ if (typeof issue2.expected === "string" && /^[A-Z]/.test(issue2.expected)) {
5875
+ 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}`;
5876
+ }
5877
+ 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}`;
5878
+ }
5879
+ case "invalid_value":
5880
+ if (issue2.values.length === 1)
5881
+ 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])}`;
5882
+ 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, "|")}`;
5883
+ case "too_big": {
5884
+ const adj = issue2.inclusive ? "<=" : "<";
5885
+ const sizing = getSizing(issue2.origin);
5886
+ if (sizing)
5887
+ 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"}`;
5888
+ 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()}`;
5889
+ }
5890
+ case "too_small": {
5891
+ const adj = issue2.inclusive ? ">=" : ">";
5892
+ const sizing = getSizing(issue2.origin);
5893
+ if (sizing) {
5894
+ 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}`;
5895
+ }
5896
+ 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()}`;
5897
+ }
5898
+ case "invalid_format": {
5899
+ const _issue = issue2;
5900
+ if (_issue.format === "starts_with") {
5901
+ 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}"`;
5902
+ }
5903
+ if (_issue.format === "ends_with")
5904
+ 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}"`;
5905
+ if (_issue.format === "includes")
5906
+ 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}"`;
5907
+ if (_issue.format === "regex")
5908
+ 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}`;
5909
+ return `\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03BF: ${FormatDictionary[_issue.format] ?? issue2.format}`;
5910
+ }
5911
+ case "not_multiple_of":
5912
+ 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}`;
5913
+ case "unrecognized_keys":
5914
+ 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, ", ")}`;
5915
+ case "invalid_key":
5916
+ return `\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03BF \u03BA\u03BB\u03B5\u03B9\u03B4\u03AF \u03C3\u03C4\u03BF ${issue2.origin}`;
5917
+ case "invalid_union":
5918
+ return "\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2";
5919
+ case "invalid_element":
5920
+ return `\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C4\u03B9\u03BC\u03AE \u03C3\u03C4\u03BF ${issue2.origin}`;
5921
+ default:
5922
+ return `\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2`;
5923
+ }
5924
+ };
5925
+ };
5926
+ function el_default() {
5927
+ return {
5928
+ localeError: error9()
5929
+ };
5930
+ }
5931
+
5932
+ // node_modules/zod/v4/locales/en.js
5933
+ var error10 = () => {
5675
5934
  const Sizable = {
5676
5935
  string: { unit: "characters", verb: "to have" },
5677
5936
  file: { unit: "bytes", verb: "to have" },
@@ -5765,6 +6024,10 @@
5765
6024
  case "invalid_key":
5766
6025
  return `Invalid key in ${issue2.origin}`;
5767
6026
  case "invalid_union":
6027
+ if (issue2.options && Array.isArray(issue2.options) && issue2.options.length > 0) {
6028
+ const opts = issue2.options.map((o) => `'${o}'`).join(" | ");
6029
+ return `Invalid discriminator value. Expected ${opts}`;
6030
+ }
5768
6031
  return "Invalid input";
5769
6032
  case "invalid_element":
5770
6033
  return `Invalid value in ${issue2.origin}`;
@@ -5775,12 +6038,12 @@
5775
6038
  };
5776
6039
  function en_default() {
5777
6040
  return {
5778
- localeError: error9()
6041
+ localeError: error10()
5779
6042
  };
5780
6043
  }
5781
6044
 
5782
6045
  // node_modules/zod/v4/locales/eo.js
5783
- var error10 = () => {
6046
+ var error11 = () => {
5784
6047
  const Sizable = {
5785
6048
  string: { unit: "karaktrojn", verb: "havi" },
5786
6049
  file: { unit: "bajtojn", verb: "havi" },
@@ -5885,12 +6148,12 @@
5885
6148
  };
5886
6149
  function eo_default() {
5887
6150
  return {
5888
- localeError: error10()
6151
+ localeError: error11()
5889
6152
  };
5890
6153
  }
5891
6154
 
5892
6155
  // node_modules/zod/v4/locales/es.js
5893
- var error11 = () => {
6156
+ var error12 = () => {
5894
6157
  const Sizable = {
5895
6158
  string: { unit: "caracteres", verb: "tener" },
5896
6159
  file: { unit: "bytes", verb: "tener" },
@@ -6018,12 +6281,12 @@
6018
6281
  };
6019
6282
  function es_default() {
6020
6283
  return {
6021
- localeError: error11()
6284
+ localeError: error12()
6022
6285
  };
6023
6286
  }
6024
6287
 
6025
6288
  // node_modules/zod/v4/locales/fa.js
6026
- var error12 = () => {
6289
+ var error13 = () => {
6027
6290
  const Sizable = {
6028
6291
  string: { unit: "\u06A9\u0627\u0631\u0627\u06A9\u062A\u0631", verb: "\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F" },
6029
6292
  file: { unit: "\u0628\u0627\u06CC\u062A", verb: "\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F" },
@@ -6133,12 +6396,12 @@
6133
6396
  };
6134
6397
  function fa_default() {
6135
6398
  return {
6136
- localeError: error12()
6399
+ localeError: error13()
6137
6400
  };
6138
6401
  }
6139
6402
 
6140
6403
  // node_modules/zod/v4/locales/fi.js
6141
- var error13 = () => {
6404
+ var error14 = () => {
6142
6405
  const Sizable = {
6143
6406
  string: { unit: "merkki\xE4", subject: "merkkijonon" },
6144
6407
  file: { unit: "tavua", subject: "tiedoston" },
@@ -6246,12 +6509,12 @@
6246
6509
  };
6247
6510
  function fi_default() {
6248
6511
  return {
6249
- localeError: error13()
6512
+ localeError: error14()
6250
6513
  };
6251
6514
  }
6252
6515
 
6253
6516
  // node_modules/zod/v4/locales/fr.js
6254
- var error14 = () => {
6517
+ var error15 = () => {
6255
6518
  const Sizable = {
6256
6519
  string: { unit: "caract\xE8res", verb: "avoir" },
6257
6520
  file: { unit: "octets", verb: "avoir" },
@@ -6292,9 +6555,27 @@
6292
6555
  template_literal: "entr\xE9e"
6293
6556
  };
6294
6557
  const TypeDictionary = {
6295
- nan: "NaN",
6558
+ string: "cha\xEEne",
6296
6559
  number: "nombre",
6297
- array: "tableau"
6560
+ int: "entier",
6561
+ boolean: "bool\xE9en",
6562
+ bigint: "grand entier",
6563
+ symbol: "symbole",
6564
+ undefined: "ind\xE9fini",
6565
+ null: "null",
6566
+ never: "jamais",
6567
+ void: "vide",
6568
+ date: "date",
6569
+ array: "tableau",
6570
+ object: "objet",
6571
+ tuple: "tuple",
6572
+ record: "enregistrement",
6573
+ map: "carte",
6574
+ set: "ensemble",
6575
+ file: "fichier",
6576
+ nonoptional: "non-optionnel",
6577
+ nan: "NaN",
6578
+ function: "fonction"
6298
6579
  };
6299
6580
  return (issue2) => {
6300
6581
  switch (issue2.code) {
@@ -6315,16 +6596,15 @@
6315
6596
  const adj = issue2.inclusive ? "<=" : "<";
6316
6597
  const sizing = getSizing(issue2.origin);
6317
6598
  if (sizing)
6318
- return `Trop grand : ${issue2.origin ?? "valeur"} doit ${sizing.verb} ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "\xE9l\xE9ment(s)"}`;
6319
- return `Trop grand : ${issue2.origin ?? "valeur"} doit \xEAtre ${adj}${issue2.maximum.toString()}`;
6599
+ return `Trop grand : ${TypeDictionary[issue2.origin] ?? "valeur"} doit ${sizing.verb} ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "\xE9l\xE9ment(s)"}`;
6600
+ return `Trop grand : ${TypeDictionary[issue2.origin] ?? "valeur"} doit \xEAtre ${adj}${issue2.maximum.toString()}`;
6320
6601
  }
6321
6602
  case "too_small": {
6322
6603
  const adj = issue2.inclusive ? ">=" : ">";
6323
6604
  const sizing = getSizing(issue2.origin);
6324
- if (sizing) {
6325
- return `Trop petit : ${issue2.origin} doit ${sizing.verb} ${adj}${issue2.minimum.toString()} ${sizing.unit}`;
6326
- }
6327
- return `Trop petit : ${issue2.origin} doit \xEAtre ${adj}${issue2.minimum.toString()}`;
6605
+ if (sizing)
6606
+ return `Trop petit : ${TypeDictionary[issue2.origin] ?? "valeur"} doit ${sizing.verb} ${adj}${issue2.minimum.toString()} ${sizing.unit}`;
6607
+ return `Trop petit : ${TypeDictionary[issue2.origin] ?? "valeur"} doit \xEAtre ${adj}${issue2.minimum.toString()}`;
6328
6608
  }
6329
6609
  case "invalid_format": {
6330
6610
  const _issue = issue2;
@@ -6355,12 +6635,12 @@
6355
6635
  };
6356
6636
  function fr_default() {
6357
6637
  return {
6358
- localeError: error14()
6638
+ localeError: error15()
6359
6639
  };
6360
6640
  }
6361
6641
 
6362
6642
  // node_modules/zod/v4/locales/fr-CA.js
6363
- var error15 = () => {
6643
+ var error16 = () => {
6364
6644
  const Sizable = {
6365
6645
  string: { unit: "caract\xE8res", verb: "avoir" },
6366
6646
  file: { unit: "octets", verb: "avoir" },
@@ -6463,12 +6743,12 @@
6463
6743
  };
6464
6744
  function fr_CA_default() {
6465
6745
  return {
6466
- localeError: error15()
6746
+ localeError: error16()
6467
6747
  };
6468
6748
  }
6469
6749
 
6470
6750
  // node_modules/zod/v4/locales/he.js
6471
- var error16 = () => {
6751
+ var error17 = () => {
6472
6752
  const TypeNames = {
6473
6753
  string: { label: "\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA", gender: "f" },
6474
6754
  number: { label: "\u05DE\u05E1\u05E4\u05E8", gender: "m" },
@@ -6658,24 +6938,24 @@
6658
6938
  };
6659
6939
  function he_default() {
6660
6940
  return {
6661
- localeError: error16()
6941
+ localeError: error17()
6662
6942
  };
6663
6943
  }
6664
6944
 
6665
- // node_modules/zod/v4/locales/hu.js
6666
- var error17 = () => {
6945
+ // node_modules/zod/v4/locales/hr.js
6946
+ var error18 = () => {
6667
6947
  const Sizable = {
6668
- string: { unit: "karakter", verb: "legyen" },
6669
- file: { unit: "byte", verb: "legyen" },
6670
- array: { unit: "elem", verb: "legyen" },
6671
- set: { unit: "elem", verb: "legyen" }
6948
+ string: { unit: "znakova", verb: "imati" },
6949
+ file: { unit: "bajtova", verb: "imati" },
6950
+ array: { unit: "stavki", verb: "imati" },
6951
+ set: { unit: "stavki", verb: "imati" }
6672
6952
  };
6673
6953
  function getSizing(origin) {
6674
6954
  return Sizable[origin] ?? null;
6675
6955
  }
6676
6956
  const FormatDictionary = {
6677
- regex: "bemenet",
6678
- email: "email c\xEDm",
6957
+ regex: "unos",
6958
+ email: "email adresa",
6679
6959
  url: "URL",
6680
6960
  emoji: "emoji",
6681
6961
  uuid: "UUID",
@@ -6688,25 +6968,37 @@
6688
6968
  ulid: "ULID",
6689
6969
  xid: "XID",
6690
6970
  ksuid: "KSUID",
6691
- datetime: "ISO id\u0151b\xE9lyeg",
6692
- date: "ISO d\xE1tum",
6693
- time: "ISO id\u0151",
6694
- duration: "ISO id\u0151intervallum",
6695
- ipv4: "IPv4 c\xEDm",
6696
- ipv6: "IPv6 c\xEDm",
6697
- cidrv4: "IPv4 tartom\xE1ny",
6698
- cidrv6: "IPv6 tartom\xE1ny",
6699
- base64: "base64-k\xF3dolt string",
6700
- base64url: "base64url-k\xF3dolt string",
6701
- json_string: "JSON string",
6702
- e164: "E.164 sz\xE1m",
6971
+ datetime: "ISO datum i vrijeme",
6972
+ date: "ISO datum",
6973
+ time: "ISO vrijeme",
6974
+ duration: "ISO trajanje",
6975
+ ipv4: "IPv4 adresa",
6976
+ ipv6: "IPv6 adresa",
6977
+ cidrv4: "IPv4 raspon",
6978
+ cidrv6: "IPv6 raspon",
6979
+ base64: "base64 kodirani tekst",
6980
+ base64url: "base64url kodirani tekst",
6981
+ json_string: "JSON tekst",
6982
+ e164: "E.164 broj",
6703
6983
  jwt: "JWT",
6704
- template_literal: "bemenet"
6984
+ template_literal: "unos"
6705
6985
  };
6706
6986
  const TypeDictionary = {
6707
6987
  nan: "NaN",
6708
- number: "sz\xE1m",
6709
- array: "t\xF6mb"
6988
+ string: "tekst",
6989
+ number: "broj",
6990
+ boolean: "boolean",
6991
+ array: "niz",
6992
+ object: "objekt",
6993
+ set: "skup",
6994
+ file: "datoteka",
6995
+ date: "datum",
6996
+ bigint: "bigint",
6997
+ symbol: "simbol",
6998
+ undefined: "undefined",
6999
+ null: "null",
7000
+ function: "funkcija",
7001
+ map: "mapa"
6710
7002
  };
6711
7003
  return (issue2) => {
6712
7004
  switch (issue2.code) {
@@ -6715,28 +7007,139 @@
6715
7007
  const receivedType = parsedType(issue2.input);
6716
7008
  const received = TypeDictionary[receivedType] ?? receivedType;
6717
7009
  if (/^[A-Z]/.test(issue2.expected)) {
6718
- return `\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k instanceof ${issue2.expected}, a kapott \xE9rt\xE9k ${received}`;
7010
+ return `Neispravan unos: o\u010Dekuje se instanceof ${issue2.expected}, a primljeno je ${received}`;
6719
7011
  }
6720
- return `\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k ${expected}, a kapott \xE9rt\xE9k ${received}`;
7012
+ return `Neispravan unos: o\u010Dekuje se ${expected}, a primljeno je ${received}`;
6721
7013
  }
6722
7014
  case "invalid_value":
6723
7015
  if (issue2.values.length === 1)
6724
- return `\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k ${stringifyPrimitive(issue2.values[0])}`;
6725
- return `\xC9rv\xE9nytelen opci\xF3: valamelyik \xE9rt\xE9k v\xE1rt ${joinValues(issue2.values, "|")}`;
7016
+ return `Neispravna vrijednost: o\u010Dekivano ${stringifyPrimitive(issue2.values[0])}`;
7017
+ return `Neispravna opcija: o\u010Dekivano jedno od ${joinValues(issue2.values, "|")}`;
6726
7018
  case "too_big": {
6727
7019
  const adj = issue2.inclusive ? "<=" : "<";
6728
7020
  const sizing = getSizing(issue2.origin);
7021
+ const origin = TypeDictionary[issue2.origin] ?? issue2.origin;
6729
7022
  if (sizing)
6730
- return `T\xFAl nagy: ${issue2.origin ?? "\xE9rt\xE9k"} m\xE9rete t\xFAl nagy ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "elem"}`;
6731
- return `T\xFAl nagy: a bemeneti \xE9rt\xE9k ${issue2.origin ?? "\xE9rt\xE9k"} t\xFAl nagy: ${adj}${issue2.maximum.toString()}`;
7023
+ return `Preveliko: o\u010Dekivano da ${origin ?? "vrijednost"} ima ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "elemenata"}`;
7024
+ return `Preveliko: o\u010Dekivano da ${origin ?? "vrijednost"} bude ${adj}${issue2.maximum.toString()}`;
6732
7025
  }
6733
7026
  case "too_small": {
6734
7027
  const adj = issue2.inclusive ? ">=" : ">";
6735
7028
  const sizing = getSizing(issue2.origin);
7029
+ const origin = TypeDictionary[issue2.origin] ?? issue2.origin;
6736
7030
  if (sizing) {
6737
- return `T\xFAl kicsi: a bemeneti \xE9rt\xE9k ${issue2.origin} m\xE9rete t\xFAl kicsi ${adj}${issue2.minimum.toString()} ${sizing.unit}`;
7031
+ return `Premalo: o\u010Dekivano da ${origin} ima ${adj}${issue2.minimum.toString()} ${sizing.unit}`;
6738
7032
  }
6739
- return `T\xFAl kicsi: a bemeneti \xE9rt\xE9k ${issue2.origin} t\xFAl kicsi ${adj}${issue2.minimum.toString()}`;
7033
+ return `Premalo: o\u010Dekivano da ${origin} bude ${adj}${issue2.minimum.toString()}`;
7034
+ }
7035
+ case "invalid_format": {
7036
+ const _issue = issue2;
7037
+ if (_issue.format === "starts_with")
7038
+ return `Neispravan tekst: mora zapo\u010Dinjati s "${_issue.prefix}"`;
7039
+ if (_issue.format === "ends_with")
7040
+ return `Neispravan tekst: mora zavr\u0161avati s "${_issue.suffix}"`;
7041
+ if (_issue.format === "includes")
7042
+ return `Neispravan tekst: mora sadr\u017Eavati "${_issue.includes}"`;
7043
+ if (_issue.format === "regex")
7044
+ return `Neispravan tekst: mora odgovarati uzorku ${_issue.pattern}`;
7045
+ return `Neispravna ${FormatDictionary[_issue.format] ?? issue2.format}`;
7046
+ }
7047
+ case "not_multiple_of":
7048
+ return `Neispravan broj: mora biti vi\u0161ekratnik od ${issue2.divisor}`;
7049
+ case "unrecognized_keys":
7050
+ return `Neprepoznat${issue2.keys.length > 1 ? "i klju\u010Devi" : " klju\u010D"}: ${joinValues(issue2.keys, ", ")}`;
7051
+ case "invalid_key":
7052
+ return `Neispravan klju\u010D u ${TypeDictionary[issue2.origin] ?? issue2.origin}`;
7053
+ case "invalid_union":
7054
+ return "Neispravan unos";
7055
+ case "invalid_element":
7056
+ return `Neispravna vrijednost u ${TypeDictionary[issue2.origin] ?? issue2.origin}`;
7057
+ default:
7058
+ return `Neispravan unos`;
7059
+ }
7060
+ };
7061
+ };
7062
+ function hr_default() {
7063
+ return {
7064
+ localeError: error18()
7065
+ };
7066
+ }
7067
+
7068
+ // node_modules/zod/v4/locales/hu.js
7069
+ var error19 = () => {
7070
+ const Sizable = {
7071
+ string: { unit: "karakter", verb: "legyen" },
7072
+ file: { unit: "byte", verb: "legyen" },
7073
+ array: { unit: "elem", verb: "legyen" },
7074
+ set: { unit: "elem", verb: "legyen" }
7075
+ };
7076
+ function getSizing(origin) {
7077
+ return Sizable[origin] ?? null;
7078
+ }
7079
+ const FormatDictionary = {
7080
+ regex: "bemenet",
7081
+ email: "email c\xEDm",
7082
+ url: "URL",
7083
+ emoji: "emoji",
7084
+ uuid: "UUID",
7085
+ uuidv4: "UUIDv4",
7086
+ uuidv6: "UUIDv6",
7087
+ nanoid: "nanoid",
7088
+ guid: "GUID",
7089
+ cuid: "cuid",
7090
+ cuid2: "cuid2",
7091
+ ulid: "ULID",
7092
+ xid: "XID",
7093
+ ksuid: "KSUID",
7094
+ datetime: "ISO id\u0151b\xE9lyeg",
7095
+ date: "ISO d\xE1tum",
7096
+ time: "ISO id\u0151",
7097
+ duration: "ISO id\u0151intervallum",
7098
+ ipv4: "IPv4 c\xEDm",
7099
+ ipv6: "IPv6 c\xEDm",
7100
+ cidrv4: "IPv4 tartom\xE1ny",
7101
+ cidrv6: "IPv6 tartom\xE1ny",
7102
+ base64: "base64-k\xF3dolt string",
7103
+ base64url: "base64url-k\xF3dolt string",
7104
+ json_string: "JSON string",
7105
+ e164: "E.164 sz\xE1m",
7106
+ jwt: "JWT",
7107
+ template_literal: "bemenet"
7108
+ };
7109
+ const TypeDictionary = {
7110
+ nan: "NaN",
7111
+ number: "sz\xE1m",
7112
+ array: "t\xF6mb"
7113
+ };
7114
+ return (issue2) => {
7115
+ switch (issue2.code) {
7116
+ case "invalid_type": {
7117
+ const expected = TypeDictionary[issue2.expected] ?? issue2.expected;
7118
+ const receivedType = parsedType(issue2.input);
7119
+ const received = TypeDictionary[receivedType] ?? receivedType;
7120
+ if (/^[A-Z]/.test(issue2.expected)) {
7121
+ return `\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k instanceof ${issue2.expected}, a kapott \xE9rt\xE9k ${received}`;
7122
+ }
7123
+ return `\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k ${expected}, a kapott \xE9rt\xE9k ${received}`;
7124
+ }
7125
+ case "invalid_value":
7126
+ if (issue2.values.length === 1)
7127
+ return `\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k ${stringifyPrimitive(issue2.values[0])}`;
7128
+ return `\xC9rv\xE9nytelen opci\xF3: valamelyik \xE9rt\xE9k v\xE1rt ${joinValues(issue2.values, "|")}`;
7129
+ case "too_big": {
7130
+ const adj = issue2.inclusive ? "<=" : "<";
7131
+ const sizing = getSizing(issue2.origin);
7132
+ if (sizing)
7133
+ return `T\xFAl nagy: ${issue2.origin ?? "\xE9rt\xE9k"} m\xE9rete t\xFAl nagy ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "elem"}`;
7134
+ return `T\xFAl nagy: a bemeneti \xE9rt\xE9k ${issue2.origin ?? "\xE9rt\xE9k"} t\xFAl nagy: ${adj}${issue2.maximum.toString()}`;
7135
+ }
7136
+ case "too_small": {
7137
+ const adj = issue2.inclusive ? ">=" : ">";
7138
+ const sizing = getSizing(issue2.origin);
7139
+ if (sizing) {
7140
+ return `T\xFAl kicsi: a bemeneti \xE9rt\xE9k ${issue2.origin} m\xE9rete t\xFAl kicsi ${adj}${issue2.minimum.toString()} ${sizing.unit}`;
7141
+ }
7142
+ return `T\xFAl kicsi: a bemeneti \xE9rt\xE9k ${issue2.origin} t\xFAl kicsi ${adj}${issue2.minimum.toString()}`;
6740
7143
  }
6741
7144
  case "invalid_format": {
6742
7145
  const _issue = issue2;
@@ -6767,7 +7170,7 @@
6767
7170
  };
6768
7171
  function hu_default() {
6769
7172
  return {
6770
- localeError: error17()
7173
+ localeError: error19()
6771
7174
  };
6772
7175
  }
6773
7176
 
@@ -6782,7 +7185,7 @@
6782
7185
  const lastChar = word[word.length - 1];
6783
7186
  return word + (vowels.includes(lastChar) ? "\u0576" : "\u0568");
6784
7187
  }
6785
- var error18 = () => {
7188
+ var error20 = () => {
6786
7189
  const Sizable = {
6787
7190
  string: {
6788
7191
  unit: {
@@ -6915,12 +7318,12 @@
6915
7318
  };
6916
7319
  function hy_default() {
6917
7320
  return {
6918
- localeError: error18()
7321
+ localeError: error20()
6919
7322
  };
6920
7323
  }
6921
7324
 
6922
7325
  // node_modules/zod/v4/locales/id.js
6923
- var error19 = () => {
7326
+ var error21 = () => {
6924
7327
  const Sizable = {
6925
7328
  string: { unit: "karakter", verb: "memiliki" },
6926
7329
  file: { unit: "byte", verb: "memiliki" },
@@ -7022,12 +7425,12 @@
7022
7425
  };
7023
7426
  function id_default() {
7024
7427
  return {
7025
- localeError: error19()
7428
+ localeError: error21()
7026
7429
  };
7027
7430
  }
7028
7431
 
7029
7432
  // node_modules/zod/v4/locales/is.js
7030
- var error20 = () => {
7433
+ var error22 = () => {
7031
7434
  const Sizable = {
7032
7435
  string: { unit: "stafi", verb: "a\xF0 hafa" },
7033
7436
  file: { unit: "b\xE6ti", verb: "a\xF0 hafa" },
@@ -7132,12 +7535,12 @@
7132
7535
  };
7133
7536
  function is_default() {
7134
7537
  return {
7135
- localeError: error20()
7538
+ localeError: error22()
7136
7539
  };
7137
7540
  }
7138
7541
 
7139
7542
  // node_modules/zod/v4/locales/it.js
7140
- var error21 = () => {
7543
+ var error23 = () => {
7141
7544
  const Sizable = {
7142
7545
  string: { unit: "caratteri", verb: "avere" },
7143
7546
  file: { unit: "byte", verb: "avere" },
@@ -7222,7 +7625,7 @@
7222
7625
  return `Stringa non valida: deve includere "${_issue.includes}"`;
7223
7626
  if (_issue.format === "regex")
7224
7627
  return `Stringa non valida: deve corrispondere al pattern ${_issue.pattern}`;
7225
- return `Invalid ${FormatDictionary[_issue.format] ?? issue2.format}`;
7628
+ return `Input non valido: ${FormatDictionary[_issue.format] ?? issue2.format}`;
7226
7629
  }
7227
7630
  case "not_multiple_of":
7228
7631
  return `Numero non valido: deve essere un multiplo di ${issue2.divisor}`;
@@ -7241,12 +7644,12 @@
7241
7644
  };
7242
7645
  function it_default() {
7243
7646
  return {
7244
- localeError: error21()
7647
+ localeError: error23()
7245
7648
  };
7246
7649
  }
7247
7650
 
7248
7651
  // node_modules/zod/v4/locales/ja.js
7249
- var error22 = () => {
7652
+ var error24 = () => {
7250
7653
  const Sizable = {
7251
7654
  string: { unit: "\u6587\u5B57", verb: "\u3067\u3042\u308B" },
7252
7655
  file: { unit: "\u30D0\u30A4\u30C8", verb: "\u3067\u3042\u308B" },
@@ -7349,12 +7752,12 @@
7349
7752
  };
7350
7753
  function ja_default() {
7351
7754
  return {
7352
- localeError: error22()
7755
+ localeError: error24()
7353
7756
  };
7354
7757
  }
7355
7758
 
7356
7759
  // node_modules/zod/v4/locales/ka.js
7357
- var error23 = () => {
7760
+ var error25 = () => {
7358
7761
  const Sizable = {
7359
7762
  string: { unit: "\u10E1\u10D8\u10DB\u10D1\u10DD\u10DA\u10DD", verb: "\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1" },
7360
7763
  file: { unit: "\u10D1\u10D0\u10D8\u10E2\u10D8", verb: "\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1" },
@@ -7387,9 +7790,9 @@
7387
7790
  ipv6: "IPv6 \u10DB\u10D8\u10E1\u10D0\u10DB\u10D0\u10E0\u10D7\u10D8",
7388
7791
  cidrv4: "IPv4 \u10D3\u10D8\u10D0\u10DE\u10D0\u10D6\u10DD\u10DC\u10D8",
7389
7792
  cidrv6: "IPv6 \u10D3\u10D8\u10D0\u10DE\u10D0\u10D6\u10DD\u10DC\u10D8",
7390
- base64: "base64-\u10D9\u10DD\u10D3\u10D8\u10E0\u10D4\u10D1\u10E3\u10DA\u10D8 \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8",
7391
- base64url: "base64url-\u10D9\u10DD\u10D3\u10D8\u10E0\u10D4\u10D1\u10E3\u10DA\u10D8 \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8",
7392
- json_string: "JSON \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8",
7793
+ base64: "base64-\u10D9\u10DD\u10D3\u10D8\u10E0\u10D4\u10D1\u10E3\u10DA\u10D8 \u10D5\u10D4\u10DA\u10D8",
7794
+ base64url: "base64url-\u10D9\u10DD\u10D3\u10D8\u10E0\u10D4\u10D1\u10E3\u10DA\u10D8 \u10D5\u10D4\u10DA\u10D8",
7795
+ json_string: "JSON \u10D5\u10D4\u10DA\u10D8",
7393
7796
  e164: "E.164 \u10DC\u10DD\u10DB\u10D4\u10E0\u10D8",
7394
7797
  jwt: "JWT",
7395
7798
  template_literal: "\u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0"
@@ -7397,7 +7800,7 @@
7397
7800
  const TypeDictionary = {
7398
7801
  nan: "NaN",
7399
7802
  number: "\u10E0\u10D8\u10EA\u10EE\u10D5\u10D8",
7400
- string: "\u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8",
7803
+ string: "\u10D5\u10D4\u10DA\u10D8",
7401
7804
  boolean: "\u10D1\u10E3\u10DA\u10D4\u10D0\u10DC\u10D8",
7402
7805
  function: "\u10E4\u10E3\u10DC\u10E5\u10EA\u10D8\u10D0",
7403
7806
  array: "\u10DB\u10D0\u10E1\u10D8\u10D5\u10D8"
@@ -7435,14 +7838,14 @@
7435
7838
  case "invalid_format": {
7436
7839
  const _issue = issue2;
7437
7840
  if (_issue.format === "starts_with") {
7438
- 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`;
7841
+ 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`;
7439
7842
  }
7440
7843
  if (_issue.format === "ends_with")
7441
- 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`;
7844
+ 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`;
7442
7845
  if (_issue.format === "includes")
7443
- 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`;
7846
+ 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`;
7444
7847
  if (_issue.format === "regex")
7445
- 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}`;
7848
+ 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}`;
7446
7849
  return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 ${FormatDictionary[_issue.format] ?? issue2.format}`;
7447
7850
  }
7448
7851
  case "not_multiple_of":
@@ -7462,12 +7865,12 @@
7462
7865
  };
7463
7866
  function ka_default() {
7464
7867
  return {
7465
- localeError: error23()
7868
+ localeError: error25()
7466
7869
  };
7467
7870
  }
7468
7871
 
7469
7872
  // node_modules/zod/v4/locales/km.js
7470
- var error24 = () => {
7873
+ var error26 = () => {
7471
7874
  const Sizable = {
7472
7875
  string: { unit: "\u178F\u17BD\u17A2\u1780\u17D2\u179F\u179A", verb: "\u1782\u17BD\u179A\u1798\u17B6\u1793" },
7473
7876
  file: { unit: "\u1794\u17C3", verb: "\u1782\u17BD\u179A\u1798\u17B6\u1793" },
@@ -7573,7 +7976,7 @@
7573
7976
  };
7574
7977
  function km_default() {
7575
7978
  return {
7576
- localeError: error24()
7979
+ localeError: error26()
7577
7980
  };
7578
7981
  }
7579
7982
 
@@ -7583,7 +7986,7 @@
7583
7986
  }
7584
7987
 
7585
7988
  // node_modules/zod/v4/locales/ko.js
7586
- var error25 = () => {
7989
+ var error27 = () => {
7587
7990
  const Sizable = {
7588
7991
  string: { unit: "\uBB38\uC790", verb: "to have" },
7589
7992
  file: { unit: "\uBC14\uC774\uD2B8", verb: "to have" },
@@ -7690,7 +8093,7 @@
7690
8093
  };
7691
8094
  function ko_default() {
7692
8095
  return {
7693
- localeError: error25()
8096
+ localeError: error27()
7694
8097
  };
7695
8098
  }
7696
8099
 
@@ -7708,7 +8111,7 @@
7708
8111
  return "one";
7709
8112
  return "few";
7710
8113
  }
7711
- var error26 = () => {
8114
+ var error28 = () => {
7712
8115
  const Sizable = {
7713
8116
  string: {
7714
8117
  unit: {
@@ -7894,12 +8297,12 @@
7894
8297
  };
7895
8298
  function lt_default() {
7896
8299
  return {
7897
- localeError: error26()
8300
+ localeError: error28()
7898
8301
  };
7899
8302
  }
7900
8303
 
7901
8304
  // node_modules/zod/v4/locales/mk.js
7902
- var error27 = () => {
8305
+ var error29 = () => {
7903
8306
  const Sizable = {
7904
8307
  string: { unit: "\u0437\u043D\u0430\u0446\u0438", verb: "\u0434\u0430 \u0438\u043C\u0430\u0430\u0442" },
7905
8308
  file: { unit: "\u0431\u0430\u0458\u0442\u0438", verb: "\u0434\u0430 \u0438\u043C\u0430\u0430\u0442" },
@@ -8004,12 +8407,12 @@
8004
8407
  };
8005
8408
  function mk_default() {
8006
8409
  return {
8007
- localeError: error27()
8410
+ localeError: error29()
8008
8411
  };
8009
8412
  }
8010
8413
 
8011
8414
  // node_modules/zod/v4/locales/ms.js
8012
- var error28 = () => {
8415
+ var error30 = () => {
8013
8416
  const Sizable = {
8014
8417
  string: { unit: "aksara", verb: "mempunyai" },
8015
8418
  file: { unit: "bait", verb: "mempunyai" },
@@ -8112,12 +8515,12 @@
8112
8515
  };
8113
8516
  function ms_default() {
8114
8517
  return {
8115
- localeError: error28()
8518
+ localeError: error30()
8116
8519
  };
8117
8520
  }
8118
8521
 
8119
8522
  // node_modules/zod/v4/locales/nl.js
8120
- var error29 = () => {
8523
+ var error31 = () => {
8121
8524
  const Sizable = {
8122
8525
  string: { unit: "tekens", verb: "heeft" },
8123
8526
  file: { unit: "bytes", verb: "heeft" },
@@ -8223,12 +8626,12 @@
8223
8626
  };
8224
8627
  function nl_default() {
8225
8628
  return {
8226
- localeError: error29()
8629
+ localeError: error31()
8227
8630
  };
8228
8631
  }
8229
8632
 
8230
8633
  // node_modules/zod/v4/locales/no.js
8231
- var error30 = () => {
8634
+ var error32 = () => {
8232
8635
  const Sizable = {
8233
8636
  string: { unit: "tegn", verb: "\xE5 ha" },
8234
8637
  file: { unit: "bytes", verb: "\xE5 ha" },
@@ -8332,12 +8735,12 @@
8332
8735
  };
8333
8736
  function no_default() {
8334
8737
  return {
8335
- localeError: error30()
8738
+ localeError: error32()
8336
8739
  };
8337
8740
  }
8338
8741
 
8339
8742
  // node_modules/zod/v4/locales/ota.js
8340
- var error31 = () => {
8743
+ var error33 = () => {
8341
8744
  const Sizable = {
8342
8745
  string: { unit: "harf", verb: "olmal\u0131d\u0131r" },
8343
8746
  file: { unit: "bayt", verb: "olmal\u0131d\u0131r" },
@@ -8442,12 +8845,12 @@
8442
8845
  };
8443
8846
  function ota_default() {
8444
8847
  return {
8445
- localeError: error31()
8848
+ localeError: error33()
8446
8849
  };
8447
8850
  }
8448
8851
 
8449
8852
  // node_modules/zod/v4/locales/ps.js
8450
- var error32 = () => {
8853
+ var error34 = () => {
8451
8854
  const Sizable = {
8452
8855
  string: { unit: "\u062A\u0648\u06A9\u064A", verb: "\u0648\u0644\u0631\u064A" },
8453
8856
  file: { unit: "\u0628\u0627\u06CC\u067C\u0633", verb: "\u0648\u0644\u0631\u064A" },
@@ -8557,12 +8960,12 @@
8557
8960
  };
8558
8961
  function ps_default() {
8559
8962
  return {
8560
- localeError: error32()
8963
+ localeError: error34()
8561
8964
  };
8562
8965
  }
8563
8966
 
8564
8967
  // node_modules/zod/v4/locales/pl.js
8565
- var error33 = () => {
8968
+ var error35 = () => {
8566
8969
  const Sizable = {
8567
8970
  string: { unit: "znak\xF3w", verb: "mie\u0107" },
8568
8971
  file: { unit: "bajt\xF3w", verb: "mie\u0107" },
@@ -8667,12 +9070,12 @@
8667
9070
  };
8668
9071
  function pl_default() {
8669
9072
  return {
8670
- localeError: error33()
9073
+ localeError: error35()
8671
9074
  };
8672
9075
  }
8673
9076
 
8674
9077
  // node_modules/zod/v4/locales/pt.js
8675
- var error34 = () => {
9078
+ var error36 = () => {
8676
9079
  const Sizable = {
8677
9080
  string: { unit: "caracteres", verb: "ter" },
8678
9081
  file: { unit: "bytes", verb: "ter" },
@@ -8776,7 +9179,127 @@
8776
9179
  };
8777
9180
  function pt_default() {
8778
9181
  return {
8779
- localeError: error34()
9182
+ localeError: error36()
9183
+ };
9184
+ }
9185
+
9186
+ // node_modules/zod/v4/locales/ro.js
9187
+ var error37 = () => {
9188
+ const Sizable = {
9189
+ string: { unit: "caractere", verb: "s\u0103 aib\u0103" },
9190
+ file: { unit: "octe\u021Bi", verb: "s\u0103 aib\u0103" },
9191
+ array: { unit: "elemente", verb: "s\u0103 aib\u0103" },
9192
+ set: { unit: "elemente", verb: "s\u0103 aib\u0103" },
9193
+ map: { unit: "intr\u0103ri", verb: "s\u0103 aib\u0103" }
9194
+ };
9195
+ function getSizing(origin) {
9196
+ return Sizable[origin] ?? null;
9197
+ }
9198
+ const FormatDictionary = {
9199
+ regex: "intrare",
9200
+ email: "adres\u0103 de email",
9201
+ url: "URL",
9202
+ emoji: "emoji",
9203
+ uuid: "UUID",
9204
+ uuidv4: "UUIDv4",
9205
+ uuidv6: "UUIDv6",
9206
+ nanoid: "nanoid",
9207
+ guid: "GUID",
9208
+ cuid: "cuid",
9209
+ cuid2: "cuid2",
9210
+ ulid: "ULID",
9211
+ xid: "XID",
9212
+ ksuid: "KSUID",
9213
+ datetime: "dat\u0103 \u0219i or\u0103 ISO",
9214
+ date: "dat\u0103 ISO",
9215
+ time: "or\u0103 ISO",
9216
+ duration: "durat\u0103 ISO",
9217
+ ipv4: "adres\u0103 IPv4",
9218
+ ipv6: "adres\u0103 IPv6",
9219
+ mac: "adres\u0103 MAC",
9220
+ cidrv4: "interval IPv4",
9221
+ cidrv6: "interval IPv6",
9222
+ base64: "\u0219ir codat base64",
9223
+ base64url: "\u0219ir codat base64url",
9224
+ json_string: "\u0219ir JSON",
9225
+ e164: "num\u0103r E.164",
9226
+ jwt: "JWT",
9227
+ template_literal: "intrare"
9228
+ };
9229
+ const TypeDictionary = {
9230
+ nan: "NaN",
9231
+ string: "\u0219ir",
9232
+ number: "num\u0103r",
9233
+ boolean: "boolean",
9234
+ function: "func\u021Bie",
9235
+ array: "matrice",
9236
+ object: "obiect",
9237
+ undefined: "nedefinit",
9238
+ symbol: "simbol",
9239
+ bigint: "num\u0103r mare",
9240
+ void: "void",
9241
+ never: "never",
9242
+ map: "hart\u0103",
9243
+ set: "set"
9244
+ };
9245
+ return (issue2) => {
9246
+ switch (issue2.code) {
9247
+ case "invalid_type": {
9248
+ const expected = TypeDictionary[issue2.expected] ?? issue2.expected;
9249
+ const receivedType = parsedType(issue2.input);
9250
+ const received = TypeDictionary[receivedType] ?? receivedType;
9251
+ return `Intrare invalid\u0103: a\u0219teptat ${expected}, primit ${received}`;
9252
+ }
9253
+ case "invalid_value":
9254
+ if (issue2.values.length === 1)
9255
+ return `Intrare invalid\u0103: a\u0219teptat ${stringifyPrimitive(issue2.values[0])}`;
9256
+ return `Op\u021Biune invalid\u0103: a\u0219teptat una dintre ${joinValues(issue2.values, "|")}`;
9257
+ case "too_big": {
9258
+ const adj = issue2.inclusive ? "<=" : "<";
9259
+ const sizing = getSizing(issue2.origin);
9260
+ if (sizing)
9261
+ return `Prea mare: a\u0219teptat ca ${issue2.origin ?? "valoarea"} ${sizing.verb} ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "elemente"}`;
9262
+ return `Prea mare: a\u0219teptat ca ${issue2.origin ?? "valoarea"} s\u0103 fie ${adj}${issue2.maximum.toString()}`;
9263
+ }
9264
+ case "too_small": {
9265
+ const adj = issue2.inclusive ? ">=" : ">";
9266
+ const sizing = getSizing(issue2.origin);
9267
+ if (sizing) {
9268
+ return `Prea mic: a\u0219teptat ca ${issue2.origin} ${sizing.verb} ${adj}${issue2.minimum.toString()} ${sizing.unit}`;
9269
+ }
9270
+ return `Prea mic: a\u0219teptat ca ${issue2.origin} s\u0103 fie ${adj}${issue2.minimum.toString()}`;
9271
+ }
9272
+ case "invalid_format": {
9273
+ const _issue = issue2;
9274
+ if (_issue.format === "starts_with") {
9275
+ return `\u0218ir invalid: trebuie s\u0103 \xEEnceap\u0103 cu "${_issue.prefix}"`;
9276
+ }
9277
+ if (_issue.format === "ends_with")
9278
+ return `\u0218ir invalid: trebuie s\u0103 se termine cu "${_issue.suffix}"`;
9279
+ if (_issue.format === "includes")
9280
+ return `\u0218ir invalid: trebuie s\u0103 includ\u0103 "${_issue.includes}"`;
9281
+ if (_issue.format === "regex")
9282
+ return `\u0218ir invalid: trebuie s\u0103 se potriveasc\u0103 cu modelul ${_issue.pattern}`;
9283
+ return `Format invalid: ${FormatDictionary[_issue.format] ?? issue2.format}`;
9284
+ }
9285
+ case "not_multiple_of":
9286
+ return `Num\u0103r invalid: trebuie s\u0103 fie multiplu de ${issue2.divisor}`;
9287
+ case "unrecognized_keys":
9288
+ return `Chei nerecunoscute: ${joinValues(issue2.keys, ", ")}`;
9289
+ case "invalid_key":
9290
+ return `Cheie invalid\u0103 \xEEn ${issue2.origin}`;
9291
+ case "invalid_union":
9292
+ return "Intrare invalid\u0103";
9293
+ case "invalid_element":
9294
+ return `Valoare invalid\u0103 \xEEn ${issue2.origin}`;
9295
+ default:
9296
+ return `Intrare invalid\u0103`;
9297
+ }
9298
+ };
9299
+ };
9300
+ function ro_default() {
9301
+ return {
9302
+ localeError: error37()
8780
9303
  };
8781
9304
  }
8782
9305
 
@@ -8796,7 +9319,7 @@
8796
9319
  }
8797
9320
  return many;
8798
9321
  }
8799
- var error35 = () => {
9322
+ var error38 = () => {
8800
9323
  const Sizable = {
8801
9324
  string: {
8802
9325
  unit: {
@@ -8933,12 +9456,12 @@
8933
9456
  };
8934
9457
  function ru_default() {
8935
9458
  return {
8936
- localeError: error35()
9459
+ localeError: error38()
8937
9460
  };
8938
9461
  }
8939
9462
 
8940
9463
  // node_modules/zod/v4/locales/sl.js
8941
- var error36 = () => {
9464
+ var error39 = () => {
8942
9465
  const Sizable = {
8943
9466
  string: { unit: "znakov", verb: "imeti" },
8944
9467
  file: { unit: "bajtov", verb: "imeti" },
@@ -9043,12 +9566,12 @@
9043
9566
  };
9044
9567
  function sl_default() {
9045
9568
  return {
9046
- localeError: error36()
9569
+ localeError: error39()
9047
9570
  };
9048
9571
  }
9049
9572
 
9050
9573
  // node_modules/zod/v4/locales/sv.js
9051
- var error37 = () => {
9574
+ var error40 = () => {
9052
9575
  const Sizable = {
9053
9576
  string: { unit: "tecken", verb: "att ha" },
9054
9577
  file: { unit: "bytes", verb: "att ha" },
@@ -9154,12 +9677,12 @@
9154
9677
  };
9155
9678
  function sv_default() {
9156
9679
  return {
9157
- localeError: error37()
9680
+ localeError: error40()
9158
9681
  };
9159
9682
  }
9160
9683
 
9161
9684
  // node_modules/zod/v4/locales/ta.js
9162
- var error38 = () => {
9685
+ var error41 = () => {
9163
9686
  const Sizable = {
9164
9687
  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" },
9165
9688
  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" },
@@ -9265,12 +9788,12 @@
9265
9788
  };
9266
9789
  function ta_default() {
9267
9790
  return {
9268
- localeError: error38()
9791
+ localeError: error41()
9269
9792
  };
9270
9793
  }
9271
9794
 
9272
9795
  // node_modules/zod/v4/locales/th.js
9273
- var error39 = () => {
9796
+ var error42 = () => {
9274
9797
  const Sizable = {
9275
9798
  string: { unit: "\u0E15\u0E31\u0E27\u0E2D\u0E31\u0E01\u0E29\u0E23", verb: "\u0E04\u0E27\u0E23\u0E21\u0E35" },
9276
9799
  file: { unit: "\u0E44\u0E1A\u0E15\u0E4C", verb: "\u0E04\u0E27\u0E23\u0E21\u0E35" },
@@ -9376,12 +9899,12 @@
9376
9899
  };
9377
9900
  function th_default() {
9378
9901
  return {
9379
- localeError: error39()
9902
+ localeError: error42()
9380
9903
  };
9381
9904
  }
9382
9905
 
9383
9906
  // node_modules/zod/v4/locales/tr.js
9384
- var error40 = () => {
9907
+ var error43 = () => {
9385
9908
  const Sizable = {
9386
9909
  string: { unit: "karakter", verb: "olmal\u0131" },
9387
9910
  file: { unit: "bayt", verb: "olmal\u0131" },
@@ -9482,12 +10005,12 @@
9482
10005
  };
9483
10006
  function tr_default() {
9484
10007
  return {
9485
- localeError: error40()
10008
+ localeError: error43()
9486
10009
  };
9487
10010
  }
9488
10011
 
9489
10012
  // node_modules/zod/v4/locales/uk.js
9490
- var error41 = () => {
10013
+ var error44 = () => {
9491
10014
  const Sizable = {
9492
10015
  string: { unit: "\u0441\u0438\u043C\u0432\u043E\u043B\u0456\u0432", verb: "\u043C\u0430\u0442\u0438\u043C\u0435" },
9493
10016
  file: { unit: "\u0431\u0430\u0439\u0442\u0456\u0432", verb: "\u043C\u0430\u0442\u0438\u043C\u0435" },
@@ -9591,7 +10114,7 @@
9591
10114
  };
9592
10115
  function uk_default() {
9593
10116
  return {
9594
- localeError: error41()
10117
+ localeError: error44()
9595
10118
  };
9596
10119
  }
9597
10120
 
@@ -9601,7 +10124,7 @@
9601
10124
  }
9602
10125
 
9603
10126
  // node_modules/zod/v4/locales/ur.js
9604
- var error42 = () => {
10127
+ var error45 = () => {
9605
10128
  const Sizable = {
9606
10129
  string: { unit: "\u062D\u0631\u0648\u0641", verb: "\u06C1\u0648\u0646\u0627" },
9607
10130
  file: { unit: "\u0628\u0627\u0626\u0679\u0633", verb: "\u06C1\u0648\u0646\u0627" },
@@ -9707,17 +10230,18 @@
9707
10230
  };
9708
10231
  function ur_default() {
9709
10232
  return {
9710
- localeError: error42()
10233
+ localeError: error45()
9711
10234
  };
9712
10235
  }
9713
10236
 
9714
10237
  // node_modules/zod/v4/locales/uz.js
9715
- var error43 = () => {
10238
+ var error46 = () => {
9716
10239
  const Sizable = {
9717
10240
  string: { unit: "belgi", verb: "bo\u2018lishi kerak" },
9718
10241
  file: { unit: "bayt", verb: "bo\u2018lishi kerak" },
9719
10242
  array: { unit: "element", verb: "bo\u2018lishi kerak" },
9720
- set: { unit: "element", verb: "bo\u2018lishi kerak" }
10243
+ set: { unit: "element", verb: "bo\u2018lishi kerak" },
10244
+ map: { unit: "yozuv", verb: "bo\u2018lishi kerak" }
9721
10245
  };
9722
10246
  function getSizing(origin) {
9723
10247
  return Sizable[origin] ?? null;
@@ -9817,12 +10341,12 @@
9817
10341
  };
9818
10342
  function uz_default() {
9819
10343
  return {
9820
- localeError: error43()
10344
+ localeError: error46()
9821
10345
  };
9822
10346
  }
9823
10347
 
9824
10348
  // node_modules/zod/v4/locales/vi.js
9825
- var error44 = () => {
10349
+ var error47 = () => {
9826
10350
  const Sizable = {
9827
10351
  string: { unit: "k\xFD t\u1EF1", verb: "c\xF3" },
9828
10352
  file: { unit: "byte", verb: "c\xF3" },
@@ -9926,12 +10450,12 @@
9926
10450
  };
9927
10451
  function vi_default() {
9928
10452
  return {
9929
- localeError: error44()
10453
+ localeError: error47()
9930
10454
  };
9931
10455
  }
9932
10456
 
9933
10457
  // node_modules/zod/v4/locales/zh-CN.js
9934
- var error45 = () => {
10458
+ var error48 = () => {
9935
10459
  const Sizable = {
9936
10460
  string: { unit: "\u5B57\u7B26", verb: "\u5305\u542B" },
9937
10461
  file: { unit: "\u5B57\u8282", verb: "\u5305\u542B" },
@@ -10036,12 +10560,12 @@
10036
10560
  };
10037
10561
  function zh_CN_default() {
10038
10562
  return {
10039
- localeError: error45()
10563
+ localeError: error48()
10040
10564
  };
10041
10565
  }
10042
10566
 
10043
10567
  // node_modules/zod/v4/locales/zh-TW.js
10044
- var error46 = () => {
10568
+ var error49 = () => {
10045
10569
  const Sizable = {
10046
10570
  string: { unit: "\u5B57\u5143", verb: "\u64C1\u6709" },
10047
10571
  file: { unit: "\u4F4D\u5143\u7D44", verb: "\u64C1\u6709" },
@@ -10144,12 +10668,12 @@
10144
10668
  };
10145
10669
  function zh_TW_default() {
10146
10670
  return {
10147
- localeError: error46()
10671
+ localeError: error49()
10148
10672
  };
10149
10673
  }
10150
10674
 
10151
10675
  // node_modules/zod/v4/locales/yo.js
10152
- var error47 = () => {
10676
+ var error50 = () => {
10153
10677
  const Sizable = {
10154
10678
  string: { unit: "\xE0mi", verb: "n\xED" },
10155
10679
  file: { unit: "bytes", verb: "n\xED" },
@@ -10252,12 +10776,12 @@
10252
10776
  };
10253
10777
  function yo_default() {
10254
10778
  return {
10255
- localeError: error47()
10779
+ localeError: error50()
10256
10780
  };
10257
10781
  }
10258
10782
 
10259
10783
  // node_modules/zod/v4/core/registries.js
10260
- var _a;
10784
+ var _a2;
10261
10785
  var $output = /* @__PURE__ */ Symbol("ZodOutput");
10262
10786
  var $input = /* @__PURE__ */ Symbol("ZodInput");
10263
10787
  var $ZodRegistry = class {
@@ -10303,7 +10827,7 @@
10303
10827
  function registry() {
10304
10828
  return new $ZodRegistry();
10305
10829
  }
10306
- (_a = globalThis).__zod_globalRegistry ?? (_a.__zod_globalRegistry = registry());
10830
+ (_a2 = globalThis).__zod_globalRegistry ?? (_a2.__zod_globalRegistry = registry());
10307
10831
  var globalRegistry = globalThis.__zod_globalRegistry;
10308
10832
 
10309
10833
  // node_modules/zod/v4/core/api.js
@@ -11221,7 +11745,7 @@
11221
11745
  return schema;
11222
11746
  }
11223
11747
  // @__NO_SIDE_EFFECTS__
11224
- function _superRefine(fn) {
11748
+ function _superRefine(fn, params) {
11225
11749
  const ch = /* @__PURE__ */ _check((payload) => {
11226
11750
  payload.addIssue = (issue2) => {
11227
11751
  if (typeof issue2 === "string") {
@@ -11238,7 +11762,7 @@
11238
11762
  }
11239
11763
  };
11240
11764
  return fn(payload.value, payload);
11241
- });
11765
+ }, params);
11242
11766
  return ch;
11243
11767
  }
11244
11768
  // @__NO_SIDE_EFFECTS__
@@ -11368,7 +11892,7 @@
11368
11892
  };
11369
11893
  }
11370
11894
  function process2(schema, ctx, _params = { path: [], schemaPath: [] }) {
11371
- var _a2;
11895
+ var _a3;
11372
11896
  const def = schema._zod.def;
11373
11897
  const seen = ctx.seen.get(schema);
11374
11898
  if (seen) {
@@ -11415,8 +11939,8 @@
11415
11939
  delete result.schema.examples;
11416
11940
  delete result.schema.default;
11417
11941
  }
11418
- if (ctx.io === "input" && result.schema._prefault)
11419
- (_a2 = result.schema).default ?? (_a2.default = result.schema._prefault);
11942
+ if (ctx.io === "input" && "_prefault" in result.schema)
11943
+ (_a3 = result.schema).default ?? (_a3.default = result.schema._prefault);
11420
11944
  delete result.schema._prefault;
11421
11945
  const _result = ctx.seen.get(schema);
11422
11946
  return _result.schema;
@@ -11597,10 +12121,15 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
11597
12121
  result.$id = ctx.external.uri(id);
11598
12122
  }
11599
12123
  Object.assign(result, root.def ?? root.schema);
12124
+ const rootMetaId = ctx.metadataRegistry.get(schema)?.id;
12125
+ if (rootMetaId !== void 0 && result.id === rootMetaId)
12126
+ delete result.id;
11600
12127
  const defs = ctx.external?.defs ?? {};
11601
12128
  for (const entry of ctx.seen.entries()) {
11602
12129
  const seen = entry[1];
11603
12130
  if (seen.def && seen.defId) {
12131
+ if (seen.def.id === seen.defId)
12132
+ delete seen.def.id;
11604
12133
  defs[seen.defId] = seen.def;
11605
12134
  }
11606
12135
  }
@@ -11745,39 +12274,28 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
11745
12274
  json2.type = "integer";
11746
12275
  else
11747
12276
  json2.type = "number";
11748
- if (typeof exclusiveMinimum === "number") {
11749
- if (ctx.target === "draft-04" || ctx.target === "openapi-3.0") {
12277
+ const exMin = typeof exclusiveMinimum === "number" && exclusiveMinimum >= (minimum ?? Number.NEGATIVE_INFINITY);
12278
+ const exMax = typeof exclusiveMaximum === "number" && exclusiveMaximum <= (maximum ?? Number.POSITIVE_INFINITY);
12279
+ const legacy = ctx.target === "draft-04" || ctx.target === "openapi-3.0";
12280
+ if (exMin) {
12281
+ if (legacy) {
11750
12282
  json2.minimum = exclusiveMinimum;
11751
12283
  json2.exclusiveMinimum = true;
11752
12284
  } else {
11753
12285
  json2.exclusiveMinimum = exclusiveMinimum;
11754
12286
  }
11755
- }
11756
- if (typeof minimum === "number") {
12287
+ } else if (typeof minimum === "number") {
11757
12288
  json2.minimum = minimum;
11758
- if (typeof exclusiveMinimum === "number" && ctx.target !== "draft-04") {
11759
- if (exclusiveMinimum >= minimum)
11760
- delete json2.minimum;
11761
- else
11762
- delete json2.exclusiveMinimum;
11763
- }
11764
12289
  }
11765
- if (typeof exclusiveMaximum === "number") {
11766
- if (ctx.target === "draft-04" || ctx.target === "openapi-3.0") {
12290
+ if (exMax) {
12291
+ if (legacy) {
11767
12292
  json2.maximum = exclusiveMaximum;
11768
12293
  json2.exclusiveMaximum = true;
11769
12294
  } else {
11770
12295
  json2.exclusiveMaximum = exclusiveMaximum;
11771
12296
  }
11772
- }
11773
- if (typeof maximum === "number") {
12297
+ } else if (typeof maximum === "number") {
11774
12298
  json2.maximum = maximum;
11775
- if (typeof exclusiveMaximum === "number" && ctx.target !== "draft-04") {
11776
- if (exclusiveMaximum <= maximum)
11777
- delete json2.maximum;
11778
- else
11779
- delete json2.exclusiveMaximum;
11780
- }
11781
12299
  }
11782
12300
  if (typeof multipleOf === "number")
11783
12301
  json2.multipleOf = multipleOf;
@@ -11949,7 +12467,10 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
11949
12467
  if (typeof maximum === "number")
11950
12468
  json2.maxItems = maximum;
11951
12469
  json2.type = "array";
11952
- json2.items = process2(def.element, ctx, { ...params, path: [...params.path, "items"] });
12470
+ json2.items = process2(def.element, ctx, {
12471
+ ...params,
12472
+ path: [...params.path, "items"]
12473
+ });
11953
12474
  };
11954
12475
  var objectProcessor = (schema, ctx, _json, params) => {
11955
12476
  const json2 = _json;
@@ -12436,6 +12957,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
12436
12957
  int32: () => int32,
12437
12958
  int64: () => int64,
12438
12959
  intersection: () => intersection,
12960
+ invertCodec: () => invertCodec,
12439
12961
  ipv4: () => ipv42,
12440
12962
  ipv6: () => ipv62,
12441
12963
  json: () => json,
@@ -12605,8 +13127,8 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
12605
13127
  }
12606
13128
  });
12607
13129
  };
12608
- var ZodError = $constructor("ZodError", initializer2);
12609
- var ZodRealError = $constructor("ZodError", initializer2, {
13130
+ var ZodError = /* @__PURE__ */ $constructor("ZodError", initializer2);
13131
+ var ZodRealError = /* @__PURE__ */ $constructor("ZodError", initializer2, {
12610
13132
  Parent: Error
12611
13133
  });
12612
13134
 
@@ -12625,6 +13147,43 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
12625
13147
  var safeDecodeAsync2 = /* @__PURE__ */ _safeDecodeAsync(ZodRealError);
12626
13148
 
12627
13149
  // node_modules/zod/v4/classic/schemas.js
13150
+ var _installedGroups = /* @__PURE__ */ new WeakMap();
13151
+ function _installLazyMethods(inst, group, methods) {
13152
+ const proto = Object.getPrototypeOf(inst);
13153
+ let installed = _installedGroups.get(proto);
13154
+ if (!installed) {
13155
+ installed = /* @__PURE__ */ new Set();
13156
+ _installedGroups.set(proto, installed);
13157
+ }
13158
+ if (installed.has(group))
13159
+ return;
13160
+ installed.add(group);
13161
+ for (const key in methods) {
13162
+ const fn = methods[key];
13163
+ Object.defineProperty(proto, key, {
13164
+ configurable: true,
13165
+ enumerable: false,
13166
+ get() {
13167
+ const bound = fn.bind(this);
13168
+ Object.defineProperty(this, key, {
13169
+ configurable: true,
13170
+ writable: true,
13171
+ enumerable: true,
13172
+ value: bound
13173
+ });
13174
+ return bound;
13175
+ },
13176
+ set(v) {
13177
+ Object.defineProperty(this, key, {
13178
+ configurable: true,
13179
+ writable: true,
13180
+ enumerable: true,
13181
+ value: v
13182
+ });
13183
+ }
13184
+ });
13185
+ }
13186
+ }
12628
13187
  var ZodType = /* @__PURE__ */ $constructor("ZodType", (inst, def) => {
12629
13188
  $ZodType.init(inst, def);
12630
13189
  Object.assign(inst["~standard"], {
@@ -12637,23 +13196,6 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
12637
13196
  inst.def = def;
12638
13197
  inst.type = def.type;
12639
13198
  Object.defineProperty(inst, "_def", { value: def });
12640
- inst.check = (...checks) => {
12641
- return inst.clone(util_exports.mergeDefs(def, {
12642
- checks: [
12643
- ...def.checks ?? [],
12644
- ...checks.map((ch) => typeof ch === "function" ? { _zod: { check: ch, def: { check: "custom" }, onattach: [] } } : ch)
12645
- ]
12646
- }), {
12647
- parent: true
12648
- });
12649
- };
12650
- inst.with = inst.check;
12651
- inst.clone = (def2, params) => clone(inst, def2, params);
12652
- inst.brand = () => inst;
12653
- inst.register = ((reg, meta3) => {
12654
- reg.add(inst, meta3);
12655
- return inst;
12656
- });
12657
13199
  inst.parse = (data, params) => parse2(inst, data, params, { callee: inst.parse });
12658
13200
  inst.safeParse = (data, params) => safeParse2(inst, data, params);
12659
13201
  inst.parseAsync = async (data, params) => parseAsync2(inst, data, params, { callee: inst.parseAsync });
@@ -12667,45 +13209,108 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
12667
13209
  inst.safeDecode = (data, params) => safeDecode2(inst, data, params);
12668
13210
  inst.safeEncodeAsync = async (data, params) => safeEncodeAsync2(inst, data, params);
12669
13211
  inst.safeDecodeAsync = async (data, params) => safeDecodeAsync2(inst, data, params);
12670
- inst.refine = (check2, params) => inst.check(refine(check2, params));
12671
- inst.superRefine = (refinement) => inst.check(superRefine(refinement));
12672
- inst.overwrite = (fn) => inst.check(_overwrite(fn));
12673
- inst.optional = () => optional(inst);
12674
- inst.exactOptional = () => exactOptional(inst);
12675
- inst.nullable = () => nullable(inst);
12676
- inst.nullish = () => optional(nullable(inst));
12677
- inst.nonoptional = (params) => nonoptional(inst, params);
12678
- inst.array = () => array(inst);
12679
- inst.or = (arg) => union([inst, arg]);
12680
- inst.and = (arg) => intersection(inst, arg);
12681
- inst.transform = (tx) => pipe(inst, transform(tx));
12682
- inst.default = (def2) => _default2(inst, def2);
12683
- inst.prefault = (def2) => prefault(inst, def2);
12684
- inst.catch = (params) => _catch2(inst, params);
12685
- inst.pipe = (target) => pipe(inst, target);
12686
- inst.readonly = () => readonly(inst);
12687
- inst.describe = (description) => {
12688
- const cl = inst.clone();
12689
- globalRegistry.add(cl, { description });
12690
- return cl;
12691
- };
13212
+ _installLazyMethods(inst, "ZodType", {
13213
+ check(...chks) {
13214
+ const def2 = this.def;
13215
+ return this.clone(util_exports.mergeDefs(def2, {
13216
+ checks: [
13217
+ ...def2.checks ?? [],
13218
+ ...chks.map((ch) => typeof ch === "function" ? { _zod: { check: ch, def: { check: "custom" }, onattach: [] } } : ch)
13219
+ ]
13220
+ }), { parent: true });
13221
+ },
13222
+ with(...chks) {
13223
+ return this.check(...chks);
13224
+ },
13225
+ clone(def2, params) {
13226
+ return clone(this, def2, params);
13227
+ },
13228
+ brand() {
13229
+ return this;
13230
+ },
13231
+ register(reg, meta3) {
13232
+ reg.add(this, meta3);
13233
+ return this;
13234
+ },
13235
+ refine(check2, params) {
13236
+ return this.check(refine(check2, params));
13237
+ },
13238
+ superRefine(refinement, params) {
13239
+ return this.check(superRefine(refinement, params));
13240
+ },
13241
+ overwrite(fn) {
13242
+ return this.check(_overwrite(fn));
13243
+ },
13244
+ optional() {
13245
+ return optional(this);
13246
+ },
13247
+ exactOptional() {
13248
+ return exactOptional(this);
13249
+ },
13250
+ nullable() {
13251
+ return nullable(this);
13252
+ },
13253
+ nullish() {
13254
+ return optional(nullable(this));
13255
+ },
13256
+ nonoptional(params) {
13257
+ return nonoptional(this, params);
13258
+ },
13259
+ array() {
13260
+ return array(this);
13261
+ },
13262
+ or(arg) {
13263
+ return union([this, arg]);
13264
+ },
13265
+ and(arg) {
13266
+ return intersection(this, arg);
13267
+ },
13268
+ transform(tx) {
13269
+ return pipe(this, transform(tx));
13270
+ },
13271
+ default(d) {
13272
+ return _default2(this, d);
13273
+ },
13274
+ prefault(d) {
13275
+ return prefault(this, d);
13276
+ },
13277
+ catch(params) {
13278
+ return _catch2(this, params);
13279
+ },
13280
+ pipe(target) {
13281
+ return pipe(this, target);
13282
+ },
13283
+ readonly() {
13284
+ return readonly(this);
13285
+ },
13286
+ describe(description) {
13287
+ const cl = this.clone();
13288
+ globalRegistry.add(cl, { description });
13289
+ return cl;
13290
+ },
13291
+ meta(...args) {
13292
+ if (args.length === 0)
13293
+ return globalRegistry.get(this);
13294
+ const cl = this.clone();
13295
+ globalRegistry.add(cl, args[0]);
13296
+ return cl;
13297
+ },
13298
+ isOptional() {
13299
+ return this.safeParse(void 0).success;
13300
+ },
13301
+ isNullable() {
13302
+ return this.safeParse(null).success;
13303
+ },
13304
+ apply(fn) {
13305
+ return fn(this);
13306
+ }
13307
+ });
12692
13308
  Object.defineProperty(inst, "description", {
12693
13309
  get() {
12694
13310
  return globalRegistry.get(inst)?.description;
12695
13311
  },
12696
13312
  configurable: true
12697
13313
  });
12698
- inst.meta = (...args) => {
12699
- if (args.length === 0) {
12700
- return globalRegistry.get(inst);
12701
- }
12702
- const cl = inst.clone();
12703
- globalRegistry.add(cl, args[0]);
12704
- return cl;
12705
- };
12706
- inst.isOptional = () => inst.safeParse(void 0).success;
12707
- inst.isNullable = () => inst.safeParse(null).success;
12708
- inst.apply = (fn) => fn(inst);
12709
13314
  return inst;
12710
13315
  });
12711
13316
  var _ZodString = /* @__PURE__ */ $constructor("_ZodString", (inst, def) => {
@@ -12716,21 +13321,53 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
12716
13321
  inst.format = bag.format ?? null;
12717
13322
  inst.minLength = bag.minimum ?? null;
12718
13323
  inst.maxLength = bag.maximum ?? null;
12719
- inst.regex = (...args) => inst.check(_regex(...args));
12720
- inst.includes = (...args) => inst.check(_includes(...args));
12721
- inst.startsWith = (...args) => inst.check(_startsWith(...args));
12722
- inst.endsWith = (...args) => inst.check(_endsWith(...args));
12723
- inst.min = (...args) => inst.check(_minLength(...args));
12724
- inst.max = (...args) => inst.check(_maxLength(...args));
12725
- inst.length = (...args) => inst.check(_length(...args));
12726
- inst.nonempty = (...args) => inst.check(_minLength(1, ...args));
12727
- inst.lowercase = (params) => inst.check(_lowercase(params));
12728
- inst.uppercase = (params) => inst.check(_uppercase(params));
12729
- inst.trim = () => inst.check(_trim());
12730
- inst.normalize = (...args) => inst.check(_normalize(...args));
12731
- inst.toLowerCase = () => inst.check(_toLowerCase());
12732
- inst.toUpperCase = () => inst.check(_toUpperCase());
12733
- inst.slugify = () => inst.check(_slugify());
13324
+ _installLazyMethods(inst, "_ZodString", {
13325
+ regex(...args) {
13326
+ return this.check(_regex(...args));
13327
+ },
13328
+ includes(...args) {
13329
+ return this.check(_includes(...args));
13330
+ },
13331
+ startsWith(...args) {
13332
+ return this.check(_startsWith(...args));
13333
+ },
13334
+ endsWith(...args) {
13335
+ return this.check(_endsWith(...args));
13336
+ },
13337
+ min(...args) {
13338
+ return this.check(_minLength(...args));
13339
+ },
13340
+ max(...args) {
13341
+ return this.check(_maxLength(...args));
13342
+ },
13343
+ length(...args) {
13344
+ return this.check(_length(...args));
13345
+ },
13346
+ nonempty(...args) {
13347
+ return this.check(_minLength(1, ...args));
13348
+ },
13349
+ lowercase(params) {
13350
+ return this.check(_lowercase(params));
13351
+ },
13352
+ uppercase(params) {
13353
+ return this.check(_uppercase(params));
13354
+ },
13355
+ trim() {
13356
+ return this.check(_trim());
13357
+ },
13358
+ normalize(...args) {
13359
+ return this.check(_normalize(...args));
13360
+ },
13361
+ toLowerCase() {
13362
+ return this.check(_toLowerCase());
13363
+ },
13364
+ toUpperCase() {
13365
+ return this.check(_toUpperCase());
13366
+ },
13367
+ slugify() {
13368
+ return this.check(_slugify());
13369
+ }
13370
+ });
12734
13371
  });
12735
13372
  var ZodString = /* @__PURE__ */ $constructor("ZodString", (inst, def) => {
12736
13373
  $ZodString.init(inst, def);
@@ -12809,7 +13446,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
12809
13446
  }
12810
13447
  function httpUrl(params) {
12811
13448
  return _url(ZodURL, {
12812
- protocol: /^https?$/,
13449
+ protocol: regexes_exports.httpProtocol,
12813
13450
  hostname: regexes_exports.domain,
12814
13451
  ...util_exports.normalizeParams(params)
12815
13452
  });
@@ -12951,21 +13588,53 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
12951
13588
  $ZodNumber.init(inst, def);
12952
13589
  ZodType.init(inst, def);
12953
13590
  inst._zod.processJSONSchema = (ctx, json2, params) => numberProcessor(inst, ctx, json2, params);
12954
- inst.gt = (value, params) => inst.check(_gt(value, params));
12955
- inst.gte = (value, params) => inst.check(_gte(value, params));
12956
- inst.min = (value, params) => inst.check(_gte(value, params));
12957
- inst.lt = (value, params) => inst.check(_lt(value, params));
12958
- inst.lte = (value, params) => inst.check(_lte(value, params));
12959
- inst.max = (value, params) => inst.check(_lte(value, params));
12960
- inst.int = (params) => inst.check(int(params));
12961
- inst.safe = (params) => inst.check(int(params));
12962
- inst.positive = (params) => inst.check(_gt(0, params));
12963
- inst.nonnegative = (params) => inst.check(_gte(0, params));
12964
- inst.negative = (params) => inst.check(_lt(0, params));
12965
- inst.nonpositive = (params) => inst.check(_lte(0, params));
12966
- inst.multipleOf = (value, params) => inst.check(_multipleOf(value, params));
12967
- inst.step = (value, params) => inst.check(_multipleOf(value, params));
12968
- inst.finite = () => inst;
13591
+ _installLazyMethods(inst, "ZodNumber", {
13592
+ gt(value, params) {
13593
+ return this.check(_gt(value, params));
13594
+ },
13595
+ gte(value, params) {
13596
+ return this.check(_gte(value, params));
13597
+ },
13598
+ min(value, params) {
13599
+ return this.check(_gte(value, params));
13600
+ },
13601
+ lt(value, params) {
13602
+ return this.check(_lt(value, params));
13603
+ },
13604
+ lte(value, params) {
13605
+ return this.check(_lte(value, params));
13606
+ },
13607
+ max(value, params) {
13608
+ return this.check(_lte(value, params));
13609
+ },
13610
+ int(params) {
13611
+ return this.check(int(params));
13612
+ },
13613
+ safe(params) {
13614
+ return this.check(int(params));
13615
+ },
13616
+ positive(params) {
13617
+ return this.check(_gt(0, params));
13618
+ },
13619
+ nonnegative(params) {
13620
+ return this.check(_gte(0, params));
13621
+ },
13622
+ negative(params) {
13623
+ return this.check(_lt(0, params));
13624
+ },
13625
+ nonpositive(params) {
13626
+ return this.check(_lte(0, params));
13627
+ },
13628
+ multipleOf(value, params) {
13629
+ return this.check(_multipleOf(value, params));
13630
+ },
13631
+ step(value, params) {
13632
+ return this.check(_multipleOf(value, params));
13633
+ },
13634
+ finite() {
13635
+ return this;
13636
+ }
13637
+ });
12969
13638
  const bag = inst._zod.bag;
12970
13639
  inst.minValue = Math.max(bag.minimum ?? Number.NEGATIVE_INFINITY, bag.exclusiveMinimum ?? Number.NEGATIVE_INFINITY) ?? null;
12971
13640
  inst.maxValue = Math.min(bag.maximum ?? Number.POSITIVE_INFINITY, bag.exclusiveMaximum ?? Number.POSITIVE_INFINITY) ?? null;
@@ -13112,11 +13781,23 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
13112
13781
  ZodType.init(inst, def);
13113
13782
  inst._zod.processJSONSchema = (ctx, json2, params) => arrayProcessor(inst, ctx, json2, params);
13114
13783
  inst.element = def.element;
13115
- inst.min = (minLength, params) => inst.check(_minLength(minLength, params));
13116
- inst.nonempty = (params) => inst.check(_minLength(1, params));
13117
- inst.max = (maxLength, params) => inst.check(_maxLength(maxLength, params));
13118
- inst.length = (len, params) => inst.check(_length(len, params));
13119
- inst.unwrap = () => inst.element;
13784
+ _installLazyMethods(inst, "ZodArray", {
13785
+ min(n, params) {
13786
+ return this.check(_minLength(n, params));
13787
+ },
13788
+ nonempty(params) {
13789
+ return this.check(_minLength(1, params));
13790
+ },
13791
+ max(n, params) {
13792
+ return this.check(_maxLength(n, params));
13793
+ },
13794
+ length(n, params) {
13795
+ return this.check(_length(n, params));
13796
+ },
13797
+ unwrap() {
13798
+ return this.element;
13799
+ }
13800
+ });
13120
13801
  });
13121
13802
  function array(element, params) {
13122
13803
  return _array(ZodArray, element, params);
@@ -13132,23 +13813,47 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
13132
13813
  util_exports.defineLazy(inst, "shape", () => {
13133
13814
  return def.shape;
13134
13815
  });
13135
- inst.keyof = () => _enum2(Object.keys(inst._zod.def.shape));
13136
- inst.catchall = (catchall) => inst.clone({ ...inst._zod.def, catchall });
13137
- inst.passthrough = () => inst.clone({ ...inst._zod.def, catchall: unknown() });
13138
- inst.loose = () => inst.clone({ ...inst._zod.def, catchall: unknown() });
13139
- inst.strict = () => inst.clone({ ...inst._zod.def, catchall: never() });
13140
- inst.strip = () => inst.clone({ ...inst._zod.def, catchall: void 0 });
13141
- inst.extend = (incoming) => {
13142
- return util_exports.extend(inst, incoming);
13143
- };
13144
- inst.safeExtend = (incoming) => {
13145
- return util_exports.safeExtend(inst, incoming);
13146
- };
13147
- inst.merge = (other) => util_exports.merge(inst, other);
13148
- inst.pick = (mask) => util_exports.pick(inst, mask);
13149
- inst.omit = (mask) => util_exports.omit(inst, mask);
13150
- inst.partial = (...args) => util_exports.partial(ZodOptional, inst, args[0]);
13151
- inst.required = (...args) => util_exports.required(ZodNonOptional, inst, args[0]);
13816
+ _installLazyMethods(inst, "ZodObject", {
13817
+ keyof() {
13818
+ return _enum2(Object.keys(this._zod.def.shape));
13819
+ },
13820
+ catchall(catchall) {
13821
+ return this.clone({ ...this._zod.def, catchall });
13822
+ },
13823
+ passthrough() {
13824
+ return this.clone({ ...this._zod.def, catchall: unknown() });
13825
+ },
13826
+ loose() {
13827
+ return this.clone({ ...this._zod.def, catchall: unknown() });
13828
+ },
13829
+ strict() {
13830
+ return this.clone({ ...this._zod.def, catchall: never() });
13831
+ },
13832
+ strip() {
13833
+ return this.clone({ ...this._zod.def, catchall: void 0 });
13834
+ },
13835
+ extend(incoming) {
13836
+ return util_exports.extend(this, incoming);
13837
+ },
13838
+ safeExtend(incoming) {
13839
+ return util_exports.safeExtend(this, incoming);
13840
+ },
13841
+ merge(other) {
13842
+ return util_exports.merge(this, other);
13843
+ },
13844
+ pick(mask) {
13845
+ return util_exports.pick(this, mask);
13846
+ },
13847
+ omit(mask) {
13848
+ return util_exports.omit(this, mask);
13849
+ },
13850
+ partial(...args) {
13851
+ return util_exports.partial(ZodOptional, this, args[0]);
13852
+ },
13853
+ required(...args) {
13854
+ return util_exports.required(ZodNonOptional, this, args[0]);
13855
+ }
13856
+ });
13152
13857
  });
13153
13858
  function object(shape, params) {
13154
13859
  const def = {
@@ -13253,6 +13958,14 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
13253
13958
  inst.valueType = def.valueType;
13254
13959
  });
13255
13960
  function record(keyType, valueType, params) {
13961
+ if (!valueType || !valueType._zod) {
13962
+ return new ZodRecord({
13963
+ type: "record",
13964
+ keyType: string2(),
13965
+ valueType: keyType,
13966
+ ...util_exports.normalizeParams(valueType)
13967
+ });
13968
+ }
13256
13969
  return new ZodRecord({
13257
13970
  type: "record",
13258
13971
  keyType,
@@ -13582,6 +14295,16 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
13582
14295
  reverseTransform: params.encode
13583
14296
  });
13584
14297
  }
14298
+ function invertCodec(codec2) {
14299
+ const def = codec2._zod.def;
14300
+ return new ZodCodec({
14301
+ type: "pipe",
14302
+ in: def.out,
14303
+ out: def.in,
14304
+ transform: def.reverseTransform,
14305
+ reverseTransform: def.transform
14306
+ });
14307
+ }
13585
14308
  var ZodReadonly = /* @__PURE__ */ $constructor("ZodReadonly", (inst, def) => {
13586
14309
  $ZodReadonly.init(inst, def);
13587
14310
  ZodType.init(inst, def);
@@ -13661,8 +14384,8 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
13661
14384
  function refine(fn, _params = {}) {
13662
14385
  return _refine(ZodCustom, fn, _params);
13663
14386
  }
13664
- function superRefine(fn) {
13665
- return _superRefine(fn);
14387
+ function superRefine(fn, params) {
14388
+ return _superRefine(fn, params);
13666
14389
  }
13667
14390
  var describe2 = describe;
13668
14391
  var meta2 = meta;
@@ -14121,12 +14844,6 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
14121
14844
  default:
14122
14845
  throw new Error(`Unsupported type: ${type}`);
14123
14846
  }
14124
- if (schema.description) {
14125
- zodSchema = zodSchema.describe(schema.description);
14126
- }
14127
- if (schema.default !== void 0) {
14128
- zodSchema = zodSchema.default(schema.default);
14129
- }
14130
14847
  return zodSchema;
14131
14848
  }
14132
14849
  function convertSchema(schema, ctx) {
@@ -14163,6 +14880,9 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
14163
14880
  if (schema.readOnly === true) {
14164
14881
  baseSchema = z.readonly(baseSchema);
14165
14882
  }
14883
+ if (schema.default !== void 0) {
14884
+ baseSchema = baseSchema.default(schema.default);
14885
+ }
14166
14886
  const extraMeta = {};
14167
14887
  const coreMetadataKeys = ["$id", "id", "$comment", "$anchor", "$vocabulary", "$dynamicRef", "$dynamicAnchor"];
14168
14888
  for (const key of coreMetadataKeys) {
@@ -14184,23 +14904,32 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
14184
14904
  if (Object.keys(extraMeta).length > 0) {
14185
14905
  ctx.registry.add(baseSchema, extraMeta);
14186
14906
  }
14907
+ if (schema.description) {
14908
+ baseSchema = baseSchema.describe(schema.description);
14909
+ }
14187
14910
  return baseSchema;
14188
14911
  }
14189
14912
  function fromJSONSchema(schema, params) {
14190
14913
  if (typeof schema === "boolean") {
14191
14914
  return schema ? z.any() : z.never();
14192
14915
  }
14193
- const version2 = detectVersion(schema, params?.defaultTarget);
14194
- const defs = schema.$defs || schema.definitions || {};
14916
+ let normalized;
14917
+ try {
14918
+ normalized = JSON.parse(JSON.stringify(schema));
14919
+ } catch {
14920
+ throw new Error("fromJSONSchema input is not valid JSON (possibly cyclic); use $defs/$ref for recursive schemas");
14921
+ }
14922
+ const version2 = detectVersion(normalized, params?.defaultTarget);
14923
+ const defs = normalized.$defs || normalized.definitions || {};
14195
14924
  const ctx = {
14196
14925
  version: version2,
14197
14926
  defs,
14198
14927
  refs: /* @__PURE__ */ new Map(),
14199
14928
  processing: /* @__PURE__ */ new Set(),
14200
- rootSchema: schema,
14929
+ rootSchema: normalized,
14201
14930
  registry: params?.registry ?? globalRegistry
14202
14931
  };
14203
- return convertSchema(schema, ctx);
14932
+ return convertSchema(normalized, ctx);
14204
14933
  }
14205
14934
 
14206
14935
  // node_modules/zod/v4/classic/coerce.js
@@ -14702,9 +15431,9 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
14702
15431
  score: external_exports.number().describe("Net score (upvotes minus downvotes)"),
14703
15432
  upvote_ratio: external_exports.number().describe("Ratio of upvotes to total votes (0.0 to 1.0)"),
14704
15433
  num_comments: external_exports.number().describe("Number of comments"),
14705
- url: external_exports.string().describe("URL the post links to (or the post URL for self posts)"),
15434
+ url: external_exports.string().nullable().describe("URL the post links to (or the post URL for self posts) \u2014 null when include_body is false"),
14706
15435
  permalink: external_exports.string().describe("Permalink path to the post on Reddit"),
14707
- selftext: external_exports.string().describe("Self post body text (empty for link posts)"),
15436
+ selftext: external_exports.string().nullable().describe("Self post body text (empty for link posts) \u2014 null when include_body is false"),
14708
15437
  is_self: external_exports.boolean().describe("Whether this is a self/text post"),
14709
15438
  created_utc: external_exports.number().describe("Post creation time as Unix timestamp"),
14710
15439
  link_flair_text: external_exports.string().nullable().describe("Link flair text if set")
@@ -14721,7 +15450,10 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
14721
15450
  sort: external_exports.enum(["hot", "new", "top", "rising", "controversial"]).optional().describe('Sort order (default "hot")'),
14722
15451
  t: external_exports.enum(["hour", "day", "week", "month", "year", "all"]).optional().describe('Time period for "top" and "controversial" sort (default "day")'),
14723
15452
  limit: external_exports.number().int().min(1).max(100).optional().describe("Number of posts to return (default 25, max 100)"),
14724
- after: external_exports.string().optional().describe('Pagination cursor \u2014 fullname of the last item (e.g., "t3_abc123")')
15453
+ after: external_exports.string().optional().describe('Pagination cursor \u2014 fullname of the last item (e.g., "t3_abc123")'),
15454
+ include_body: external_exports.boolean().optional().describe(
15455
+ "Whether to include post body text (selftext) and external URL. Defaults to false \u2014 titles and metadata only. Set true when you need to read post contents (doubles-to-triples the response size)."
15456
+ )
14725
15457
  }),
14726
15458
  output: external_exports.object({
14727
15459
  posts: external_exports.array(postSchema).describe("Array of posts"),
@@ -14731,6 +15463,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
14731
15463
  const sub = params.subreddit ? `/r/${params.subreddit}` : "";
14732
15464
  const sort = params.sort ?? "hot";
14733
15465
  const path = `${sub}/${sort}.json`;
15466
+ const includeBody = params.include_body ?? false;
14734
15467
  const queryParams = {
14735
15468
  limit: String(params.limit ?? 25)
14736
15469
  };
@@ -14751,9 +15484,9 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
14751
15484
  score: child.data.score,
14752
15485
  upvote_ratio: child.data.upvote_ratio,
14753
15486
  num_comments: child.data.num_comments,
14754
- url: child.data.url,
15487
+ url: includeBody ? child.data.url : null,
14755
15488
  permalink: child.data.permalink,
14756
- selftext: child.data.selftext ?? "",
15489
+ selftext: includeBody ? child.data.selftext ?? "" : null,
14757
15490
  is_self: child.data.is_self,
14758
15491
  created_utc: child.data.created_utc,
14759
15492
  link_flair_text: child.data.link_flair_text ?? null
@@ -14817,8 +15550,8 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
14817
15550
  created_utc: external_exports.number().describe("Creation timestamp"),
14818
15551
  permalink: external_exports.string().describe("Reddit permalink"),
14819
15552
  title: external_exports.string().nullable().describe("Post title (null for comments)"),
14820
- selftext: external_exports.string().nullable().describe("Post body (null for comments)"),
14821
- body: external_exports.string().nullable().describe("Comment body (null for posts)"),
15553
+ selftext: external_exports.string().nullable().describe("Post body (null for comments, null when include_body is false)"),
15554
+ body: external_exports.string().nullable().describe("Comment body (null for posts, null when include_body is false)"),
14822
15555
  link_title: external_exports.string().nullable().describe("Parent post title (for comments)"),
14823
15556
  link_id: external_exports.string().nullable().describe("Parent post fullname, e.g. t3_abc123 (for comments)"),
14824
15557
  parent_id: external_exports.string().nullable().describe("Parent comment/post fullname (for comments)"),
@@ -14837,13 +15570,17 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
14837
15570
  sort: external_exports.enum(["hot", "new", "top", "controversial"]).optional().describe('Sort order (default "new")'),
14838
15571
  t: external_exports.enum(["hour", "day", "week", "month", "year", "all"]).optional().describe('Time period for "top" and "controversial" sort'),
14839
15572
  limit: external_exports.number().int().min(1).max(100).optional().describe("Number of results (default 25, max 100)"),
14840
- after: external_exports.string().optional().describe("Pagination cursor for the next page")
15573
+ after: external_exports.string().optional().describe("Pagination cursor for the next page"),
15574
+ include_body: external_exports.boolean().optional().describe(
15575
+ "Whether to include post/comment body text (selftext/body). Defaults to false \u2014 titles, link_ids, and metadata only. Set true when you need to read item contents."
15576
+ )
14841
15577
  }),
14842
15578
  output: external_exports.object({
14843
15579
  items: external_exports.array(contentItemSchema).describe("User content items"),
14844
15580
  after: external_exports.string().nullable().describe("Pagination cursor for next page")
14845
15581
  }),
14846
15582
  handle: async (params) => {
15583
+ const includeBody = params.include_body ?? false;
14847
15584
  const queryParams = {
14848
15585
  limit: String(params.limit ?? 25)
14849
15586
  };
@@ -14865,8 +15602,8 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
14865
15602
  created_utc: child.data.created_utc,
14866
15603
  permalink: child.data.permalink,
14867
15604
  title: child.data.title ?? null,
14868
- selftext: child.data.selftext ?? null,
14869
- body: child.data.body ?? null,
15605
+ selftext: includeBody ? child.data.selftext ?? null : null,
15606
+ body: includeBody ? child.data.body ?? null : null,
14870
15607
  link_title: child.data.link_title ?? null,
14871
15608
  link_id: child.data.link_id ?? null,
14872
15609
  parent_id: child.data.parent_id ?? null,
@@ -14988,7 +15725,10 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
14988
15725
  sort: external_exports.enum(["relevance", "hot", "top", "new", "comments"]).optional().describe('Sort order (default "relevance")'),
14989
15726
  t: external_exports.enum(["hour", "day", "week", "month", "year", "all"]).optional().describe('Time period filter (default "all")'),
14990
15727
  limit: external_exports.number().int().min(1).max(100).optional().describe("Number of results (default 25, max 100)"),
14991
- after: external_exports.string().optional().describe("Pagination cursor for the next page")
15728
+ after: external_exports.string().optional().describe("Pagination cursor for the next page"),
15729
+ include_body: external_exports.boolean().optional().describe(
15730
+ "Whether to include post body text (selftext) and external URL. Defaults to false \u2014 titles and metadata only. Set true when you need to read post contents (doubles-to-triples the response size)."
15731
+ )
14992
15732
  }),
14993
15733
  output: external_exports.object({
14994
15734
  posts: external_exports.array(
@@ -15000,9 +15740,9 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
15000
15740
  subreddit: external_exports.string().describe("Subreddit name"),
15001
15741
  score: external_exports.number().describe("Post score"),
15002
15742
  num_comments: external_exports.number().describe("Number of comments"),
15003
- url: external_exports.string().describe("Post URL"),
15743
+ url: external_exports.string().nullable().describe("Post URL \u2014 null when include_body is false"),
15004
15744
  permalink: external_exports.string().describe("Reddit permalink"),
15005
- selftext: external_exports.string().describe("Self post body"),
15745
+ selftext: external_exports.string().nullable().describe("Self post body \u2014 null when include_body is false"),
15006
15746
  is_self: external_exports.boolean().describe("Whether this is a text post"),
15007
15747
  created_utc: external_exports.number().describe("Creation timestamp")
15008
15748
  })
@@ -15011,6 +15751,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
15011
15751
  }),
15012
15752
  handle: async (params) => {
15013
15753
  const base = params.subreddit ? `/r/${params.subreddit}` : "";
15754
+ const includeBody = params.include_body ?? false;
15014
15755
  const queryParams = {
15015
15756
  q: params.query,
15016
15757
  limit: String(params.limit ?? 25),
@@ -15029,9 +15770,9 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
15029
15770
  subreddit: child.data.subreddit,
15030
15771
  score: child.data.score,
15031
15772
  num_comments: child.data.num_comments,
15032
- url: child.data.url,
15773
+ url: includeBody ? child.data.url : null,
15033
15774
  permalink: child.data.permalink,
15034
- selftext: child.data.selftext ?? "",
15775
+ selftext: includeBody ? child.data.selftext ?? "" : null,
15035
15776
  is_self: child.data.is_self,
15036
15777
  created_utc: child.data.created_utc
15037
15778
  })),
@@ -15300,10 +16041,13 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
15300
16041
  if (isAuthenticated()) return true;
15301
16042
  return waitForAuth();
15302
16043
  }
16044
+ teardown() {
16045
+ clearSessionCache();
16046
+ }
15303
16047
  };
15304
16048
  var src_default = new RedditPlugin();
15305
16049
 
15306
- // dist/_adapter_entry_63873cb8-67b7-4aa0-9d9f-d3ea8fdd5270.ts
16050
+ // dist/_adapter_entry_03ae5a59-7a1a-44c1-95ea-687ba3a8f1af.ts
15307
16051
  if (!globalThis.__openTabs) {
15308
16052
  globalThis.__openTabs = {};
15309
16053
  } else {
@@ -15391,6 +16135,8 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
15391
16135
  const origHandle = tool.handle;
15392
16136
  tool.handle = async function(...handleArgs) {
15393
16137
  const startTime = performance.now();
16138
+ const runtime = globalThis.__openTabs;
16139
+ runtime._pluginName = "reddit";
15394
16140
  if (hasLifecycleHooks && typeof src_default.onToolInvocationStart === "function") {
15395
16141
  try {
15396
16142
  src_default.onToolInvocationStart(tool.name);
@@ -15519,5 +16265,5 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
15519
16265
  };
15520
16266
  delete src_default.onDeactivate;
15521
16267
  }
15522
- })();(function(){var o=(globalThis).__openTabs;if(o&&o.adapters&&o.adapters["reddit"]){var a=o.adapters["reddit"];a.__adapterHash="26334ce06696f5e6aa3d7ae6c49c2ccf0d6fedb80216ec13060c2e1eef16ef9a";if(a.tools&&Array.isArray(a.tools)){for(var i=0;i<a.tools.length;i++){Object.freeze(a.tools[i]);}Object.freeze(a.tools);}Object.freeze(a);Object.defineProperty(o.adapters,"reddit",{value:a,writable:false,configurable:false,enumerable:true});Object.defineProperty(o,"adapters",{value:o.adapters,writable:false,configurable:false});}})();
16268
+ })();(function(){var o=(globalThis).__openTabs;if(o&&o.adapters&&o.adapters["reddit"]){var a=o.adapters["reddit"];a.__adapterHash="6553ea310bce2bbf4f5824ad78008996dbfbcb1fc637d5426b62d0ec597eaf29";if(a.tools&&Array.isArray(a.tools)){for(var i=0;i<a.tools.length;i++){Object.freeze(a.tools[i]);}Object.freeze(a.tools);}Object.freeze(a);Object.defineProperty(o.adapters,"reddit",{value:a,writable:false,configurable:false,enumerable:true});Object.defineProperty(o,"adapters",{value:o.adapters,writable:false,configurable:false});}})();
15523
16269
  //# sourceMappingURL=adapter.iife.js.map