gogcli-mcp-classroom 2.0.2 → 2.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -72,12 +72,12 @@ var require_code = __commonJS({
72
72
  return item === "" || item === '""';
73
73
  }
74
74
  get str() {
75
- var _a2;
76
- return (_a2 = this._str) !== null && _a2 !== void 0 ? _a2 : this._str = this._items.reduce((s, c) => `${s}${c}`, "");
75
+ var _a3;
76
+ return (_a3 = this._str) !== null && _a3 !== void 0 ? _a3 : this._str = this._items.reduce((s, c) => `${s}${c}`, "");
77
77
  }
78
78
  get names() {
79
- var _a2;
80
- return (_a2 = this._names) !== null && _a2 !== void 0 ? _a2 : this._names = this._items.reduce((names, c) => {
79
+ var _a3;
80
+ return (_a3 = this._names) !== null && _a3 !== void 0 ? _a3 : this._names = this._items.reduce((names, c) => {
81
81
  if (c instanceof Name)
82
82
  names[c.str] = (names[c.str] || 0) + 1;
83
83
  return names;
@@ -223,8 +223,8 @@ var require_scope = __commonJS({
223
223
  return `${prefix}${ng.index++}`;
224
224
  }
225
225
  _nameGroup(prefix) {
226
- var _a2, _b;
227
- if (((_b = (_a2 = this._parent) === null || _a2 === void 0 ? void 0 : _a2._prefixes) === null || _b === void 0 ? void 0 : _b.has(prefix)) || this._prefixes && !this._prefixes.has(prefix)) {
226
+ var _a3, _b;
227
+ if (((_b = (_a3 = this._parent) === null || _a3 === void 0 ? void 0 : _a3._prefixes) === null || _b === void 0 ? void 0 : _b.has(prefix)) || this._prefixes && !this._prefixes.has(prefix)) {
228
228
  throw new Error(`CodeGen: prefix "${prefix}" is not allowed in this scope`);
229
229
  }
230
230
  return this._names[prefix] = { prefix, index: 0 };
@@ -257,12 +257,12 @@ var require_scope = __commonJS({
257
257
  return new ValueScopeName(prefix, this._newName(prefix));
258
258
  }
259
259
  value(nameOrPrefix, value) {
260
- var _a2;
260
+ var _a3;
261
261
  if (value.ref === void 0)
262
262
  throw new Error("CodeGen: ref must be passed in value");
263
263
  const name = this.toName(nameOrPrefix);
264
264
  const { prefix } = name;
265
- const valueKey = (_a2 = value.key) !== null && _a2 !== void 0 ? _a2 : value.ref;
265
+ const valueKey = (_a3 = value.key) !== null && _a3 !== void 0 ? _a3 : value.ref;
266
266
  let vs = this._values[prefix];
267
267
  if (vs) {
268
268
  const _name = vs.get(valueKey);
@@ -469,9 +469,9 @@ var require_codegen = __commonJS({
469
469
  }
470
470
  };
471
471
  var Throw = class extends Node {
472
- constructor(error48) {
472
+ constructor(error51) {
473
473
  super();
474
- this.error = error48;
474
+ this.error = error51;
475
475
  }
476
476
  render({ _n }) {
477
477
  return `throw ${this.error};` + _n;
@@ -580,8 +580,8 @@ var require_codegen = __commonJS({
580
580
  return this;
581
581
  }
582
582
  optimizeNames(names, constants) {
583
- var _a2;
584
- this.else = (_a2 = this.else) === null || _a2 === void 0 ? void 0 : _a2.optimizeNames(names, constants);
583
+ var _a3;
584
+ this.else = (_a3 = this.else) === null || _a3 === void 0 ? void 0 : _a3.optimizeNames(names, constants);
585
585
  if (!(super.optimizeNames(names, constants) || this.else))
586
586
  return;
587
587
  this.condition = optimizeExpr(this.condition, names, constants);
@@ -685,16 +685,16 @@ var require_codegen = __commonJS({
685
685
  return code;
686
686
  }
687
687
  optimizeNodes() {
688
- var _a2, _b;
688
+ var _a3, _b;
689
689
  super.optimizeNodes();
690
- (_a2 = this.catch) === null || _a2 === void 0 ? void 0 : _a2.optimizeNodes();
690
+ (_a3 = this.catch) === null || _a3 === void 0 ? void 0 : _a3.optimizeNodes();
691
691
  (_b = this.finally) === null || _b === void 0 ? void 0 : _b.optimizeNodes();
692
692
  return this;
693
693
  }
694
694
  optimizeNames(names, constants) {
695
- var _a2, _b;
695
+ var _a3, _b;
696
696
  super.optimizeNames(names, constants);
697
- (_a2 = this.catch) === null || _a2 === void 0 ? void 0 : _a2.optimizeNames(names, constants);
697
+ (_a3 = this.catch) === null || _a3 === void 0 ? void 0 : _a3.optimizeNames(names, constants);
698
698
  (_b = this.finally) === null || _b === void 0 ? void 0 : _b.optimizeNames(names, constants);
699
699
  return this;
700
700
  }
@@ -708,9 +708,9 @@ var require_codegen = __commonJS({
708
708
  }
709
709
  };
710
710
  var Catch = class extends BlockNode {
711
- constructor(error48) {
711
+ constructor(error51) {
712
712
  super();
713
- this.error = error48;
713
+ this.error = error51;
714
714
  }
715
715
  render(opts) {
716
716
  return `catch(${this.error})` + super.render(opts);
@@ -901,9 +901,9 @@ var require_codegen = __commonJS({
901
901
  this._blockNode(node);
902
902
  this.code(tryBody);
903
903
  if (catchCode) {
904
- const error48 = this.name("e");
905
- this._currNode = node.catch = new Catch(error48);
906
- catchCode(error48);
904
+ const error51 = this.name("e");
905
+ this._currNode = node.catch = new Catch(error51);
906
+ catchCode(error51);
907
907
  }
908
908
  if (finallyCode) {
909
909
  this._currNode = node.finally = new Finally();
@@ -912,8 +912,8 @@ var require_codegen = __commonJS({
912
912
  return this._endBlockNode(Catch, Finally);
913
913
  }
914
914
  // `throw` statement
915
- throw(error48) {
916
- return this._leafNode(new Throw(error48));
915
+ throw(error51) {
916
+ return this._leafNode(new Throw(error51));
917
917
  }
918
918
  // start self-balancing block
919
919
  block(body, nodeCount) {
@@ -1269,10 +1269,10 @@ var require_errors = __commonJS({
1269
1269
  exports.keyword$DataError = {
1270
1270
  message: ({ keyword, schemaType }) => schemaType ? (0, codegen_1.str)`"${keyword}" keyword must be ${schemaType} ($data)` : (0, codegen_1.str)`"${keyword}" keyword is invalid ($data)`
1271
1271
  };
1272
- function reportError(cxt, error48 = exports.keywordError, errorPaths, overrideAllErrors) {
1272
+ function reportError(cxt, error51 = exports.keywordError, errorPaths, overrideAllErrors) {
1273
1273
  const { it } = cxt;
1274
1274
  const { gen, compositeRule, allErrors } = it;
1275
- const errObj = errorObjectCode(cxt, error48, errorPaths);
1275
+ const errObj = errorObjectCode(cxt, error51, errorPaths);
1276
1276
  if (overrideAllErrors !== null && overrideAllErrors !== void 0 ? overrideAllErrors : compositeRule || allErrors) {
1277
1277
  addError(gen, errObj);
1278
1278
  } else {
@@ -1280,10 +1280,10 @@ var require_errors = __commonJS({
1280
1280
  }
1281
1281
  }
1282
1282
  exports.reportError = reportError;
1283
- function reportExtraError(cxt, error48 = exports.keywordError, errorPaths) {
1283
+ function reportExtraError(cxt, error51 = exports.keywordError, errorPaths) {
1284
1284
  const { it } = cxt;
1285
1285
  const { gen, compositeRule, allErrors } = it;
1286
- const errObj = errorObjectCode(cxt, error48, errorPaths);
1286
+ const errObj = errorObjectCode(cxt, error51, errorPaths);
1287
1287
  addError(gen, errObj);
1288
1288
  if (!(compositeRule || allErrors)) {
1289
1289
  returnErrors(it, names_1.default.vErrors);
@@ -1334,19 +1334,19 @@ var require_errors = __commonJS({
1334
1334
  schema: new codegen_1.Name("schema"),
1335
1335
  parentSchema: new codegen_1.Name("parentSchema")
1336
1336
  };
1337
- function errorObjectCode(cxt, error48, errorPaths) {
1337
+ function errorObjectCode(cxt, error51, errorPaths) {
1338
1338
  const { createErrors } = cxt.it;
1339
1339
  if (createErrors === false)
1340
1340
  return (0, codegen_1._)`{}`;
1341
- return errorObject(cxt, error48, errorPaths);
1341
+ return errorObject(cxt, error51, errorPaths);
1342
1342
  }
1343
- function errorObject(cxt, error48, errorPaths = {}) {
1343
+ function errorObject(cxt, error51, errorPaths = {}) {
1344
1344
  const { gen, it } = cxt;
1345
1345
  const keyValues = [
1346
1346
  errorInstancePath(it, errorPaths),
1347
1347
  errorSchemaPath(cxt, errorPaths)
1348
1348
  ];
1349
- extraErrorProps(cxt, error48, keyValues);
1349
+ extraErrorProps(cxt, error51, keyValues);
1350
1350
  return gen.object(...keyValues);
1351
1351
  }
1352
1352
  function errorInstancePath({ errorPath }, { instancePath }) {
@@ -1474,8 +1474,8 @@ var require_applicability = __commonJS({
1474
1474
  }
1475
1475
  exports.shouldUseGroup = shouldUseGroup;
1476
1476
  function shouldUseRule(schema, rule) {
1477
- var _a2;
1478
- return schema[rule.keyword] !== void 0 || ((_a2 = rule.definition.implements) === null || _a2 === void 0 ? void 0 : _a2.some((kwd) => schema[kwd] !== void 0));
1477
+ var _a3;
1478
+ return schema[rule.keyword] !== void 0 || ((_a3 = rule.definition.implements) === null || _a3 === void 0 ? void 0 : _a3.some((kwd) => schema[kwd] !== void 0));
1479
1479
  }
1480
1480
  exports.shouldUseRule = shouldUseRule;
1481
1481
  }
@@ -1863,14 +1863,14 @@ var require_keyword = __commonJS({
1863
1863
  }
1864
1864
  exports.macroKeywordCode = macroKeywordCode;
1865
1865
  function funcKeywordCode(cxt, def) {
1866
- var _a2;
1866
+ var _a3;
1867
1867
  const { gen, keyword, schema, parentSchema, $data, it } = cxt;
1868
1868
  checkAsyncKeyword(it, def);
1869
1869
  const validate = !$data && def.compile ? def.compile.call(it.self, schema, parentSchema, it) : def.validate;
1870
1870
  const validateRef = useKeyword(gen, keyword, validate);
1871
1871
  const valid = gen.let("valid");
1872
1872
  cxt.block$data(valid, validateKeyword);
1873
- cxt.ok((_a2 = def.valid) !== null && _a2 !== void 0 ? _a2 : valid);
1873
+ cxt.ok((_a3 = def.valid) !== null && _a3 !== void 0 ? _a3 : valid);
1874
1874
  function validateKeyword() {
1875
1875
  if (def.errors === false) {
1876
1876
  assignValid();
@@ -1901,8 +1901,8 @@ var require_keyword = __commonJS({
1901
1901
  gen.assign(valid, (0, codegen_1._)`${_await}${(0, code_1.callValidateCode)(cxt, validateRef, passCxt, passSchema)}`, def.modifying);
1902
1902
  }
1903
1903
  function reportErrs(errors) {
1904
- var _a3;
1905
- gen.if((0, codegen_1.not)((_a3 = def.valid) !== null && _a3 !== void 0 ? _a3 : valid), errors);
1904
+ var _a4;
1905
+ gen.if((0, codegen_1.not)((_a4 = def.valid) !== null && _a4 !== void 0 ? _a4 : valid), errors);
1906
1906
  }
1907
1907
  }
1908
1908
  exports.funcKeywordCode = funcKeywordCode;
@@ -2870,7 +2870,7 @@ var require_compile = __commonJS({
2870
2870
  var validate_1 = require_validate();
2871
2871
  var SchemaEnv = class {
2872
2872
  constructor(env) {
2873
- var _a2;
2873
+ var _a3;
2874
2874
  this.refs = {};
2875
2875
  this.dynamicAnchors = {};
2876
2876
  let schema;
@@ -2879,7 +2879,7 @@ var require_compile = __commonJS({
2879
2879
  this.schema = env.schema;
2880
2880
  this.schemaId = env.schemaId;
2881
2881
  this.root = env.root || this;
2882
- this.baseId = (_a2 = env.baseId) !== null && _a2 !== void 0 ? _a2 : (0, resolve_1.normalizeId)(schema === null || schema === void 0 ? void 0 : schema[env.schemaId || "$id"]);
2882
+ this.baseId = (_a3 = env.baseId) !== null && _a3 !== void 0 ? _a3 : (0, resolve_1.normalizeId)(schema === null || schema === void 0 ? void 0 : schema[env.schemaId || "$id"]);
2883
2883
  this.schemaPath = env.schemaPath;
2884
2884
  this.localRefs = env.localRefs;
2885
2885
  this.meta = env.meta;
@@ -2975,14 +2975,14 @@ var require_compile = __commonJS({
2975
2975
  }
2976
2976
  exports.compileSchema = compileSchema;
2977
2977
  function resolveRef2(root, baseId, ref) {
2978
- var _a2;
2978
+ var _a3;
2979
2979
  ref = (0, resolve_1.resolveUrl)(this.opts.uriResolver, baseId, ref);
2980
2980
  const schOrFunc = root.refs[ref];
2981
2981
  if (schOrFunc)
2982
2982
  return schOrFunc;
2983
2983
  let _sch = resolve.call(this, root, ref);
2984
2984
  if (_sch === void 0) {
2985
- const schema = (_a2 = root.localRefs) === null || _a2 === void 0 ? void 0 : _a2[ref];
2985
+ const schema = (_a3 = root.localRefs) === null || _a3 === void 0 ? void 0 : _a3[ref];
2986
2986
  const { schemaId } = this.opts;
2987
2987
  if (schema)
2988
2988
  _sch = new SchemaEnv({ schema, schemaId, root, baseId });
@@ -3051,8 +3051,8 @@ var require_compile = __commonJS({
3051
3051
  "definitions"
3052
3052
  ]);
3053
3053
  function getJsonPointer(parsedRef, { baseId, schema, root }) {
3054
- var _a2;
3055
- if (((_a2 = parsedRef.fragment) === null || _a2 === void 0 ? void 0 : _a2[0]) !== "/")
3054
+ var _a3;
3055
+ if (((_a3 = parsedRef.fragment) === null || _a3 === void 0 ? void 0 : _a3[0]) !== "/")
3056
3056
  return;
3057
3057
  for (const part of parsedRef.fragment.slice(1).split("/")) {
3058
3058
  if (typeof schema === "boolean")
@@ -3913,9 +3913,9 @@ var require_core = __commonJS({
3913
3913
  };
3914
3914
  var MAX_EXPRESSION = 200;
3915
3915
  function requiredOptions(o) {
3916
- var _a2, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0;
3916
+ var _a3, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0;
3917
3917
  const s = o.strict;
3918
- const _optz = (_a2 = o.code) === null || _a2 === void 0 ? void 0 : _a2.optimize;
3918
+ const _optz = (_a3 = o.code) === null || _a3 === void 0 ? void 0 : _a3.optimize;
3919
3919
  const optimize = _optz === true || _optz === void 0 ? 1 : _optz || 0;
3920
3920
  const regExp = (_c = (_b = o.code) === null || _b === void 0 ? void 0 : _b.regExp) !== null && _c !== void 0 ? _c : defaultRegExp;
3921
3921
  const uriResolver = (_d = o.uriResolver) !== null && _d !== void 0 ? _d : uri_1.default;
@@ -4389,7 +4389,7 @@ var require_core = __commonJS({
4389
4389
  }
4390
4390
  }
4391
4391
  function addRule(keyword, definition, dataType) {
4392
- var _a2;
4392
+ var _a3;
4393
4393
  const post = definition === null || definition === void 0 ? void 0 : definition.post;
4394
4394
  if (dataType && post)
4395
4395
  throw new Error('keyword with "post" flag cannot have "type"');
@@ -4415,7 +4415,7 @@ var require_core = __commonJS({
4415
4415
  else
4416
4416
  ruleGroup.rules.push(rule);
4417
4417
  RULES.all[keyword] = rule;
4418
- (_a2 = definition.implements) === null || _a2 === void 0 ? void 0 : _a2.forEach((kwd) => this.addKeyword(kwd));
4418
+ (_a3 = definition.implements) === null || _a3 === void 0 ? void 0 : _a3.forEach((kwd) => this.addKeyword(kwd));
4419
4419
  }
4420
4420
  function addBeforeRule(ruleGroup, rule, before) {
4421
4421
  const i = ruleGroup.rules.findIndex((_rule) => _rule.keyword === before);
@@ -4549,10 +4549,10 @@ var require_ref = __commonJS({
4549
4549
  gen.assign(names_1.default.errors, (0, codegen_1._)`${names_1.default.vErrors}.length`);
4550
4550
  }
4551
4551
  function addEvaluatedFrom(source) {
4552
- var _a2;
4552
+ var _a3;
4553
4553
  if (!it.opts.unevaluated)
4554
4554
  return;
4555
- const schEvaluated = (_a2 = sch === null || sch === void 0 ? void 0 : sch.validate) === null || _a2 === void 0 ? void 0 : _a2.evaluated;
4555
+ const schEvaluated = (_a3 = sch === null || sch === void 0 ? void 0 : sch.validate) === null || _a3 === void 0 ? void 0 : _a3.evaluated;
4556
4556
  if (it.props !== true) {
4557
4557
  if (schEvaluated && !schEvaluated.dynamicProps) {
4558
4558
  if (schEvaluated.props !== void 0) {
@@ -4614,7 +4614,7 @@ var require_limitNumber = __commonJS({
4614
4614
  exclusiveMaximum: { okStr: "<", ok: ops.LT, fail: ops.GTE },
4615
4615
  exclusiveMinimum: { okStr: ">", ok: ops.GT, fail: ops.LTE }
4616
4616
  };
4617
- var error48 = {
4617
+ var error51 = {
4618
4618
  message: ({ keyword, schemaCode }) => (0, codegen_1.str)`must be ${KWDs[keyword].okStr} ${schemaCode}`,
4619
4619
  params: ({ keyword, schemaCode }) => (0, codegen_1._)`{comparison: ${KWDs[keyword].okStr}, limit: ${schemaCode}}`
4620
4620
  };
@@ -4623,7 +4623,7 @@ var require_limitNumber = __commonJS({
4623
4623
  type: "number",
4624
4624
  schemaType: "number",
4625
4625
  $data: true,
4626
- error: error48,
4626
+ error: error51,
4627
4627
  code(cxt) {
4628
4628
  const { keyword, data, schemaCode } = cxt;
4629
4629
  cxt.fail$data((0, codegen_1._)`${data} ${KWDs[keyword].fail} ${schemaCode} || isNaN(${data})`);
@@ -4639,7 +4639,7 @@ var require_multipleOf = __commonJS({
4639
4639
  "use strict";
4640
4640
  Object.defineProperty(exports, "__esModule", { value: true });
4641
4641
  var codegen_1 = require_codegen();
4642
- var error48 = {
4642
+ var error51 = {
4643
4643
  message: ({ schemaCode }) => (0, codegen_1.str)`must be multiple of ${schemaCode}`,
4644
4644
  params: ({ schemaCode }) => (0, codegen_1._)`{multipleOf: ${schemaCode}}`
4645
4645
  };
@@ -4648,7 +4648,7 @@ var require_multipleOf = __commonJS({
4648
4648
  type: "number",
4649
4649
  schemaType: "number",
4650
4650
  $data: true,
4651
- error: error48,
4651
+ error: error51,
4652
4652
  code(cxt) {
4653
4653
  const { gen, data, schemaCode, it } = cxt;
4654
4654
  const prec = it.opts.multipleOfPrecision;
@@ -4695,7 +4695,7 @@ var require_limitLength = __commonJS({
4695
4695
  var codegen_1 = require_codegen();
4696
4696
  var util_1 = require_util();
4697
4697
  var ucs2length_1 = require_ucs2length();
4698
- var error48 = {
4698
+ var error51 = {
4699
4699
  message({ keyword, schemaCode }) {
4700
4700
  const comp = keyword === "maxLength" ? "more" : "fewer";
4701
4701
  return (0, codegen_1.str)`must NOT have ${comp} than ${schemaCode} characters`;
@@ -4707,7 +4707,7 @@ var require_limitLength = __commonJS({
4707
4707
  type: "string",
4708
4708
  schemaType: "number",
4709
4709
  $data: true,
4710
- error: error48,
4710
+ error: error51,
4711
4711
  code(cxt) {
4712
4712
  const { keyword, data, schemaCode, it } = cxt;
4713
4713
  const op = keyword === "maxLength" ? codegen_1.operators.GT : codegen_1.operators.LT;
@@ -4727,7 +4727,7 @@ var require_pattern = __commonJS({
4727
4727
  var code_1 = require_code2();
4728
4728
  var util_1 = require_util();
4729
4729
  var codegen_1 = require_codegen();
4730
- var error48 = {
4730
+ var error51 = {
4731
4731
  message: ({ schemaCode }) => (0, codegen_1.str)`must match pattern "${schemaCode}"`,
4732
4732
  params: ({ schemaCode }) => (0, codegen_1._)`{pattern: ${schemaCode}}`
4733
4733
  };
@@ -4736,7 +4736,7 @@ var require_pattern = __commonJS({
4736
4736
  type: "string",
4737
4737
  schemaType: "string",
4738
4738
  $data: true,
4739
- error: error48,
4739
+ error: error51,
4740
4740
  code(cxt) {
4741
4741
  const { gen, data, $data, schema, schemaCode, it } = cxt;
4742
4742
  const u = it.opts.unicodeRegExp ? "u" : "";
@@ -4762,7 +4762,7 @@ var require_limitProperties = __commonJS({
4762
4762
  "use strict";
4763
4763
  Object.defineProperty(exports, "__esModule", { value: true });
4764
4764
  var codegen_1 = require_codegen();
4765
- var error48 = {
4765
+ var error51 = {
4766
4766
  message({ keyword, schemaCode }) {
4767
4767
  const comp = keyword === "maxProperties" ? "more" : "fewer";
4768
4768
  return (0, codegen_1.str)`must NOT have ${comp} than ${schemaCode} properties`;
@@ -4774,7 +4774,7 @@ var require_limitProperties = __commonJS({
4774
4774
  type: "object",
4775
4775
  schemaType: "number",
4776
4776
  $data: true,
4777
- error: error48,
4777
+ error: error51,
4778
4778
  code(cxt) {
4779
4779
  const { keyword, data, schemaCode } = cxt;
4780
4780
  const op = keyword === "maxProperties" ? codegen_1.operators.GT : codegen_1.operators.LT;
@@ -4793,7 +4793,7 @@ var require_required = __commonJS({
4793
4793
  var code_1 = require_code2();
4794
4794
  var codegen_1 = require_codegen();
4795
4795
  var util_1 = require_util();
4796
- var error48 = {
4796
+ var error51 = {
4797
4797
  message: ({ params: { missingProperty } }) => (0, codegen_1.str)`must have required property '${missingProperty}'`,
4798
4798
  params: ({ params: { missingProperty } }) => (0, codegen_1._)`{missingProperty: ${missingProperty}}`
4799
4799
  };
@@ -4802,7 +4802,7 @@ var require_required = __commonJS({
4802
4802
  type: "object",
4803
4803
  schemaType: "array",
4804
4804
  $data: true,
4805
- error: error48,
4805
+ error: error51,
4806
4806
  code(cxt) {
4807
4807
  const { gen, schema, schemaCode, data, $data, it } = cxt;
4808
4808
  const { opts } = it;
@@ -4873,7 +4873,7 @@ var require_limitItems = __commonJS({
4873
4873
  "use strict";
4874
4874
  Object.defineProperty(exports, "__esModule", { value: true });
4875
4875
  var codegen_1 = require_codegen();
4876
- var error48 = {
4876
+ var error51 = {
4877
4877
  message({ keyword, schemaCode }) {
4878
4878
  const comp = keyword === "maxItems" ? "more" : "fewer";
4879
4879
  return (0, codegen_1.str)`must NOT have ${comp} than ${schemaCode} items`;
@@ -4885,7 +4885,7 @@ var require_limitItems = __commonJS({
4885
4885
  type: "array",
4886
4886
  schemaType: "number",
4887
4887
  $data: true,
4888
- error: error48,
4888
+ error: error51,
4889
4889
  code(cxt) {
4890
4890
  const { keyword, data, schemaCode } = cxt;
4891
4891
  const op = keyword === "maxItems" ? codegen_1.operators.GT : codegen_1.operators.LT;
@@ -4916,7 +4916,7 @@ var require_uniqueItems = __commonJS({
4916
4916
  var codegen_1 = require_codegen();
4917
4917
  var util_1 = require_util();
4918
4918
  var equal_1 = require_equal();
4919
- var error48 = {
4919
+ var error51 = {
4920
4920
  message: ({ params: { i, j } }) => (0, codegen_1.str)`must NOT have duplicate items (items ## ${j} and ${i} are identical)`,
4921
4921
  params: ({ params: { i, j } }) => (0, codegen_1._)`{i: ${i}, j: ${j}}`
4922
4922
  };
@@ -4925,7 +4925,7 @@ var require_uniqueItems = __commonJS({
4925
4925
  type: "array",
4926
4926
  schemaType: "boolean",
4927
4927
  $data: true,
4928
- error: error48,
4928
+ error: error51,
4929
4929
  code(cxt) {
4930
4930
  const { gen, data, $data, schema, parentSchema, schemaCode, it } = cxt;
4931
4931
  if (!$data && !schema)
@@ -4982,14 +4982,14 @@ var require_const = __commonJS({
4982
4982
  var codegen_1 = require_codegen();
4983
4983
  var util_1 = require_util();
4984
4984
  var equal_1 = require_equal();
4985
- var error48 = {
4985
+ var error51 = {
4986
4986
  message: "must be equal to constant",
4987
4987
  params: ({ schemaCode }) => (0, codegen_1._)`{allowedValue: ${schemaCode}}`
4988
4988
  };
4989
4989
  var def = {
4990
4990
  keyword: "const",
4991
4991
  $data: true,
4992
- error: error48,
4992
+ error: error51,
4993
4993
  code(cxt) {
4994
4994
  const { gen, data, $data, schemaCode, schema } = cxt;
4995
4995
  if ($data || schema && typeof schema == "object") {
@@ -5011,7 +5011,7 @@ var require_enum = __commonJS({
5011
5011
  var codegen_1 = require_codegen();
5012
5012
  var util_1 = require_util();
5013
5013
  var equal_1 = require_equal();
5014
- var error48 = {
5014
+ var error51 = {
5015
5015
  message: "must be equal to one of the allowed values",
5016
5016
  params: ({ schemaCode }) => (0, codegen_1._)`{allowedValues: ${schemaCode}}`
5017
5017
  };
@@ -5019,7 +5019,7 @@ var require_enum = __commonJS({
5019
5019
  keyword: "enum",
5020
5020
  schemaType: "array",
5021
5021
  $data: true,
5022
- error: error48,
5022
+ error: error51,
5023
5023
  code(cxt) {
5024
5024
  const { gen, data, $data, schema, schemaCode, it } = cxt;
5025
5025
  if (!$data && schema.length === 0)
@@ -5098,7 +5098,7 @@ var require_additionalItems = __commonJS({
5098
5098
  exports.validateAdditionalItems = void 0;
5099
5099
  var codegen_1 = require_codegen();
5100
5100
  var util_1 = require_util();
5101
- var error48 = {
5101
+ var error51 = {
5102
5102
  message: ({ params: { len } }) => (0, codegen_1.str)`must NOT have more than ${len} items`,
5103
5103
  params: ({ params: { len } }) => (0, codegen_1._)`{limit: ${len}}`
5104
5104
  };
@@ -5107,7 +5107,7 @@ var require_additionalItems = __commonJS({
5107
5107
  type: "array",
5108
5108
  schemaType: ["boolean", "object"],
5109
5109
  before: "uniqueItems",
5110
- error: error48,
5110
+ error: error51,
5111
5111
  code(cxt) {
5112
5112
  const { parentSchema, it } = cxt;
5113
5113
  const { items } = parentSchema;
@@ -5226,7 +5226,7 @@ var require_items2020 = __commonJS({
5226
5226
  var util_1 = require_util();
5227
5227
  var code_1 = require_code2();
5228
5228
  var additionalItems_1 = require_additionalItems();
5229
- var error48 = {
5229
+ var error51 = {
5230
5230
  message: ({ params: { len } }) => (0, codegen_1.str)`must NOT have more than ${len} items`,
5231
5231
  params: ({ params: { len } }) => (0, codegen_1._)`{limit: ${len}}`
5232
5232
  };
@@ -5235,7 +5235,7 @@ var require_items2020 = __commonJS({
5235
5235
  type: "array",
5236
5236
  schemaType: ["object", "boolean"],
5237
5237
  before: "uniqueItems",
5238
- error: error48,
5238
+ error: error51,
5239
5239
  code(cxt) {
5240
5240
  const { schema, parentSchema, it } = cxt;
5241
5241
  const { prefixItems } = parentSchema;
@@ -5259,7 +5259,7 @@ var require_contains = __commonJS({
5259
5259
  Object.defineProperty(exports, "__esModule", { value: true });
5260
5260
  var codegen_1 = require_codegen();
5261
5261
  var util_1 = require_util();
5262
- var error48 = {
5262
+ var error51 = {
5263
5263
  message: ({ params: { min, max } }) => max === void 0 ? (0, codegen_1.str)`must contain at least ${min} valid item(s)` : (0, codegen_1.str)`must contain at least ${min} and no more than ${max} valid item(s)`,
5264
5264
  params: ({ params: { min, max } }) => max === void 0 ? (0, codegen_1._)`{minContains: ${min}}` : (0, codegen_1._)`{minContains: ${min}, maxContains: ${max}}`
5265
5265
  };
@@ -5269,7 +5269,7 @@ var require_contains = __commonJS({
5269
5269
  schemaType: ["object", "boolean"],
5270
5270
  before: "uniqueItems",
5271
5271
  trackErrors: true,
5272
- error: error48,
5272
+ error: error51,
5273
5273
  code(cxt) {
5274
5274
  const { gen, schema, parentSchema, data, it } = cxt;
5275
5275
  let min;
@@ -5447,7 +5447,7 @@ var require_propertyNames = __commonJS({
5447
5447
  Object.defineProperty(exports, "__esModule", { value: true });
5448
5448
  var codegen_1 = require_codegen();
5449
5449
  var util_1 = require_util();
5450
- var error48 = {
5450
+ var error51 = {
5451
5451
  message: "property name must be valid",
5452
5452
  params: ({ params }) => (0, codegen_1._)`{propertyName: ${params.propertyName}}`
5453
5453
  };
@@ -5455,7 +5455,7 @@ var require_propertyNames = __commonJS({
5455
5455
  keyword: "propertyNames",
5456
5456
  type: "object",
5457
5457
  schemaType: ["object", "boolean"],
5458
- error: error48,
5458
+ error: error51,
5459
5459
  code(cxt) {
5460
5460
  const { gen, schema, data, it } = cxt;
5461
5461
  if ((0, util_1.alwaysValidSchema)(it, schema))
@@ -5492,7 +5492,7 @@ var require_additionalProperties = __commonJS({
5492
5492
  var codegen_1 = require_codegen();
5493
5493
  var names_1 = require_names();
5494
5494
  var util_1 = require_util();
5495
- var error48 = {
5495
+ var error51 = {
5496
5496
  message: "must NOT have additional properties",
5497
5497
  params: ({ params }) => (0, codegen_1._)`{additionalProperty: ${params.additionalProperty}}`
5498
5498
  };
@@ -5502,7 +5502,7 @@ var require_additionalProperties = __commonJS({
5502
5502
  schemaType: ["boolean", "object"],
5503
5503
  allowUndefined: true,
5504
5504
  trackErrors: true,
5505
- error: error48,
5505
+ error: error51,
5506
5506
  code(cxt) {
5507
5507
  const { gen, schema, parentSchema, data, errsCount, it } = cxt;
5508
5508
  if (!errsCount)
@@ -5776,7 +5776,7 @@ var require_oneOf = __commonJS({
5776
5776
  Object.defineProperty(exports, "__esModule", { value: true });
5777
5777
  var codegen_1 = require_codegen();
5778
5778
  var util_1 = require_util();
5779
- var error48 = {
5779
+ var error51 = {
5780
5780
  message: "must match exactly one schema in oneOf",
5781
5781
  params: ({ params }) => (0, codegen_1._)`{passingSchemas: ${params.passing}}`
5782
5782
  };
@@ -5784,7 +5784,7 @@ var require_oneOf = __commonJS({
5784
5784
  keyword: "oneOf",
5785
5785
  schemaType: "array",
5786
5786
  trackErrors: true,
5787
- error: error48,
5787
+ error: error51,
5788
5788
  code(cxt) {
5789
5789
  const { gen, schema, parentSchema, it } = cxt;
5790
5790
  if (!Array.isArray(schema))
@@ -5861,7 +5861,7 @@ var require_if = __commonJS({
5861
5861
  Object.defineProperty(exports, "__esModule", { value: true });
5862
5862
  var codegen_1 = require_codegen();
5863
5863
  var util_1 = require_util();
5864
- var error48 = {
5864
+ var error51 = {
5865
5865
  message: ({ params }) => (0, codegen_1.str)`must match "${params.ifClause}" schema`,
5866
5866
  params: ({ params }) => (0, codegen_1._)`{failingKeyword: ${params.ifClause}}`
5867
5867
  };
@@ -5869,7 +5869,7 @@ var require_if = __commonJS({
5869
5869
  keyword: "if",
5870
5870
  schemaType: ["object", "boolean"],
5871
5871
  trackErrors: true,
5872
- error: error48,
5872
+ error: error51,
5873
5873
  code(cxt) {
5874
5874
  const { gen, parentSchema, it } = cxt;
5875
5875
  if (parentSchema.then === void 0 && parentSchema.else === void 0) {
@@ -5995,7 +5995,7 @@ var require_format = __commonJS({
5995
5995
  "use strict";
5996
5996
  Object.defineProperty(exports, "__esModule", { value: true });
5997
5997
  var codegen_1 = require_codegen();
5998
- var error48 = {
5998
+ var error51 = {
5999
5999
  message: ({ schemaCode }) => (0, codegen_1.str)`must match format "${schemaCode}"`,
6000
6000
  params: ({ schemaCode }) => (0, codegen_1._)`{format: ${schemaCode}}`
6001
6001
  };
@@ -6004,7 +6004,7 @@ var require_format = __commonJS({
6004
6004
  type: ["number", "string"],
6005
6005
  schemaType: "string",
6006
6006
  $data: true,
6007
- error: error48,
6007
+ error: error51,
6008
6008
  code(cxt, ruleType) {
6009
6009
  const { gen, data, $data, schema, schemaCode, it } = cxt;
6010
6010
  const { opts, errSchemaPath, schemaEnv, self } = it;
@@ -6159,7 +6159,7 @@ var require_discriminator = __commonJS({
6159
6159
  var compile_1 = require_compile();
6160
6160
  var ref_error_1 = require_ref_error();
6161
6161
  var util_1 = require_util();
6162
- var error48 = {
6162
+ var error51 = {
6163
6163
  message: ({ params: { discrError, tagName } }) => discrError === types_1.DiscrError.Tag ? `tag "${tagName}" must be string` : `value of tag "${tagName}" must be in oneOf`,
6164
6164
  params: ({ params: { discrError, tag, tagName } }) => (0, codegen_1._)`{error: ${discrError}, tag: ${tagName}, tagValue: ${tag}}`
6165
6165
  };
@@ -6167,7 +6167,7 @@ var require_discriminator = __commonJS({
6167
6167
  keyword: "discriminator",
6168
6168
  type: "object",
6169
6169
  schemaType: "object",
6170
- error: error48,
6170
+ error: error51,
6171
6171
  code(cxt) {
6172
6172
  const { gen, data, schema, parentSchema, it } = cxt;
6173
6173
  const { oneOf } = parentSchema;
@@ -6203,7 +6203,7 @@ var require_discriminator = __commonJS({
6203
6203
  return _valid;
6204
6204
  }
6205
6205
  function getMapping() {
6206
- var _a2;
6206
+ var _a3;
6207
6207
  const oneOfMapping = {};
6208
6208
  const topRequired = hasRequired(parentSchema);
6209
6209
  let tagRequired = true;
@@ -6217,7 +6217,7 @@ var require_discriminator = __commonJS({
6217
6217
  if (sch === void 0)
6218
6218
  throw new ref_error_1.default(it.opts.uriResolver, it.baseId, ref);
6219
6219
  }
6220
- const propSch = (_a2 = sch === null || sch === void 0 ? void 0 : sch.properties) === null || _a2 === void 0 ? void 0 : _a2[tagName];
6220
+ const propSch = (_a3 = sch === null || sch === void 0 ? void 0 : sch.properties) === null || _a3 === void 0 ? void 0 : _a3[tagName];
6221
6221
  if (typeof propSch != "object") {
6222
6222
  throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${tagName}"`);
6223
6223
  }
@@ -6699,7 +6699,7 @@ var require_limit = __commonJS({
6699
6699
  formatExclusiveMaximum: { okStr: "<", ok: ops.LT, fail: ops.GTE },
6700
6700
  formatExclusiveMinimum: { okStr: ">", ok: ops.GT, fail: ops.LTE }
6701
6701
  };
6702
- var error48 = {
6702
+ var error51 = {
6703
6703
  message: ({ keyword, schemaCode }) => (0, codegen_1.str)`should be ${KWDs[keyword].okStr} ${schemaCode}`,
6704
6704
  params: ({ keyword, schemaCode }) => (0, codegen_1._)`{comparison: ${KWDs[keyword].okStr}, limit: ${schemaCode}}`
6705
6705
  };
@@ -6708,7 +6708,7 @@ var require_limit = __commonJS({
6708
6708
  type: "string",
6709
6709
  schemaType: "string",
6710
6710
  $data: true,
6711
- error: error48,
6711
+ error: error51,
6712
6712
  code(cxt) {
6713
6713
  const { gen, data, schemaCode, keyword, it } = cxt;
6714
6714
  const { opts, self } = it;
@@ -6786,9 +6786,9 @@ var require_dist = __commonJS({
6786
6786
  return f;
6787
6787
  };
6788
6788
  function addFormats(ajv, list, fs, exportName) {
6789
- var _a2;
6789
+ var _a3;
6790
6790
  var _b;
6791
- (_a2 = (_b = ajv.opts.code).formats) !== null && _a2 !== void 0 ? _a2 : _b.formats = (0, codegen_1._)`require("ajv-formats/dist/formats").${exportName}`;
6791
+ (_a3 = (_b = ajv.opts.code).formats) !== null && _a3 !== void 0 ? _a3 : _b.formats = (0, codegen_1._)`require("ajv-formats/dist/formats").${exportName}`;
6792
6792
  for (const f of list)
6793
6793
  ajv.addFormat(f, fs[f]);
6794
6794
  }
@@ -6863,6 +6863,7 @@ __export(external_exports, {
6863
6863
  ZodOptional: () => ZodOptional,
6864
6864
  ZodPipe: () => ZodPipe,
6865
6865
  ZodPrefault: () => ZodPrefault,
6866
+ ZodPreprocess: () => ZodPreprocess,
6866
6867
  ZodPromise: () => ZodPromise,
6867
6868
  ZodReadonly: () => ZodReadonly,
6868
6869
  ZodRealError: () => ZodRealError,
@@ -6941,6 +6942,7 @@ __export(external_exports, {
6941
6942
  int32: () => int32,
6942
6943
  int64: () => int64,
6943
6944
  intersection: () => intersection,
6945
+ invertCodec: () => invertCodec,
6944
6946
  ipv4: () => ipv42,
6945
6947
  ipv6: () => ipv62,
6946
6948
  iso: () => iso_exports,
@@ -7122,6 +7124,7 @@ __export(core_exports2, {
7122
7124
  $ZodOptional: () => $ZodOptional,
7123
7125
  $ZodPipe: () => $ZodPipe,
7124
7126
  $ZodPrefault: () => $ZodPrefault,
7127
+ $ZodPreprocess: () => $ZodPreprocess,
7125
7128
  $ZodPromise: () => $ZodPromise,
7126
7129
  $ZodReadonly: () => $ZodReadonly,
7127
7130
  $ZodRealError: () => $ZodRealError,
@@ -7321,7 +7324,8 @@ __export(core_exports2, {
7321
7324
  });
7322
7325
 
7323
7326
  // ../../node_modules/zod/v4/core/core.js
7324
- var NEVER = Object.freeze({
7327
+ var _a;
7328
+ var NEVER = /* @__PURE__ */ Object.freeze({
7325
7329
  status: "aborted"
7326
7330
  });
7327
7331
  // @__NO_SIDE_EFFECTS__
@@ -7356,10 +7360,10 @@ function $constructor(name, initializer3, params) {
7356
7360
  }
7357
7361
  Object.defineProperty(Definition, "name", { value: name });
7358
7362
  function _(def) {
7359
- var _a2;
7363
+ var _a3;
7360
7364
  const inst = params?.Parent ? new Definition() : this;
7361
7365
  init(inst, def);
7362
- (_a2 = inst._zod).deferred ?? (_a2.deferred = []);
7366
+ (_a3 = inst._zod).deferred ?? (_a3.deferred = []);
7363
7367
  for (const fn of inst._zod.deferred) {
7364
7368
  fn();
7365
7369
  }
@@ -7388,7 +7392,8 @@ var $ZodEncodeError = class extends Error {
7388
7392
  this.name = "ZodEncodeError";
7389
7393
  }
7390
7394
  };
7391
- var globalConfig = {};
7395
+ (_a = globalThis).__zod_globalConfig ?? (_a.__zod_globalConfig = {});
7396
+ var globalConfig = globalThis.__zod_globalConfig;
7392
7397
  function config(newConfig) {
7393
7398
  if (newConfig)
7394
7399
  Object.assign(globalConfig, newConfig);
@@ -7421,6 +7426,7 @@ __export(util_exports, {
7421
7426
  defineLazy: () => defineLazy,
7422
7427
  esc: () => esc,
7423
7428
  escapeRegex: () => escapeRegex,
7429
+ explicitlyAborted: () => explicitlyAborted,
7424
7430
  extend: () => extend,
7425
7431
  finalizeIssue: () => finalizeIssue,
7426
7432
  floatSafeRemainder: () => floatSafeRemainder,
@@ -7509,19 +7515,12 @@ function cleanRegex(source) {
7509
7515
  return source.slice(start, end);
7510
7516
  }
7511
7517
  function floatSafeRemainder(val, step) {
7512
- const valDecCount = (val.toString().split(".")[1] || "").length;
7513
- const stepString = step.toString();
7514
- let stepDecCount = (stepString.split(".")[1] || "").length;
7515
- if (stepDecCount === 0 && /\d?e-\d?/.test(stepString)) {
7516
- const match = stepString.match(/\d?e-(\d?)/);
7517
- if (match?.[1]) {
7518
- stepDecCount = Number.parseInt(match[1]);
7519
- }
7520
- }
7521
- const decCount = valDecCount > stepDecCount ? valDecCount : stepDecCount;
7522
- const valInt = Number.parseInt(val.toFixed(decCount).replace(".", ""));
7523
- const stepInt = Number.parseInt(step.toFixed(decCount).replace(".", ""));
7524
- return valInt % stepInt / 10 ** decCount;
7518
+ const ratio = val / step;
7519
+ const roundedRatio = Math.round(ratio);
7520
+ const tolerance = Number.EPSILON * Math.max(Math.abs(ratio), 1);
7521
+ if (Math.abs(ratio - roundedRatio) < tolerance)
7522
+ return 0;
7523
+ return ratio - roundedRatio;
7525
7524
  }
7526
7525
  var EVALUATING = /* @__PURE__ */ Symbol("evaluating");
7527
7526
  function defineLazy(object3, key, getter) {
@@ -7603,7 +7602,10 @@ var captureStackTrace = "captureStackTrace" in Error ? Error.captureStackTrace :
7603
7602
  function isObject(data) {
7604
7603
  return typeof data === "object" && data !== null && !Array.isArray(data);
7605
7604
  }
7606
- var allowsEval = cached(() => {
7605
+ var allowsEval = /* @__PURE__ */ cached(() => {
7606
+ if (globalConfig.jitless) {
7607
+ return false;
7608
+ }
7607
7609
  if (typeof navigator !== "undefined" && navigator?.userAgent?.includes("Cloudflare")) {
7608
7610
  return false;
7609
7611
  }
@@ -7636,6 +7638,10 @@ function shallowClone(o) {
7636
7638
  return { ...o };
7637
7639
  if (Array.isArray(o))
7638
7640
  return [...o];
7641
+ if (o instanceof Map)
7642
+ return new Map(o);
7643
+ if (o instanceof Set)
7644
+ return new Set(o);
7639
7645
  return o;
7640
7646
  }
7641
7647
  function numKeys(data) {
@@ -7692,7 +7698,14 @@ var getParsedType = (data) => {
7692
7698
  }
7693
7699
  };
7694
7700
  var propertyKeyTypes = /* @__PURE__ */ new Set(["string", "number", "symbol"]);
7695
- var primitiveTypes = /* @__PURE__ */ new Set(["string", "number", "bigint", "boolean", "symbol", "undefined"]);
7701
+ var primitiveTypes = /* @__PURE__ */ new Set([
7702
+ "string",
7703
+ "number",
7704
+ "bigint",
7705
+ "boolean",
7706
+ "symbol",
7707
+ "undefined"
7708
+ ]);
7696
7709
  function escapeRegex(str) {
7697
7710
  return str.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
7698
7711
  }
@@ -7861,6 +7874,9 @@ function safeExtend(schema, shape) {
7861
7874
  return clone(schema, def);
7862
7875
  }
7863
7876
  function merge(a, b) {
7877
+ if (a._zod.def.checks?.length) {
7878
+ throw new Error(".merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.");
7879
+ }
7864
7880
  const def = mergeDefs(a._zod.def, {
7865
7881
  get shape() {
7866
7882
  const _shape = { ...a._zod.def.shape, ...b._zod.def.shape };
@@ -7870,8 +7886,7 @@ function merge(a, b) {
7870
7886
  get catchall() {
7871
7887
  return b._zod.def.catchall;
7872
7888
  },
7873
- checks: []
7874
- // delete existing checks
7889
+ checks: b._zod.def.checks ?? []
7875
7890
  });
7876
7891
  return clone(a, def);
7877
7892
  }
@@ -7954,10 +7969,20 @@ function aborted(x, startIndex = 0) {
7954
7969
  }
7955
7970
  return false;
7956
7971
  }
7972
+ function explicitlyAborted(x, startIndex = 0) {
7973
+ if (x.aborted === true)
7974
+ return true;
7975
+ for (let i = startIndex; i < x.issues.length; i++) {
7976
+ if (x.issues[i]?.continue === false) {
7977
+ return true;
7978
+ }
7979
+ }
7980
+ return false;
7981
+ }
7957
7982
  function prefixIssues(path, issues) {
7958
7983
  return issues.map((iss) => {
7959
- var _a2;
7960
- (_a2 = iss).path ?? (_a2.path = []);
7984
+ var _a3;
7985
+ (_a3 = iss).path ?? (_a3.path = []);
7961
7986
  iss.path.unshift(path);
7962
7987
  return iss;
7963
7988
  });
@@ -7966,17 +7991,14 @@ function unwrapMessage(message) {
7966
7991
  return typeof message === "string" ? message : message?.message;
7967
7992
  }
7968
7993
  function finalizeIssue(iss, ctx, config2) {
7969
- const full = { ...iss, path: iss.path ?? [] };
7970
- if (!iss.message) {
7971
- const message = unwrapMessage(iss.inst?._zod.def?.error?.(iss)) ?? unwrapMessage(ctx?.error?.(iss)) ?? unwrapMessage(config2.customError?.(iss)) ?? unwrapMessage(config2.localeError?.(iss)) ?? "Invalid input";
7972
- full.message = message;
7973
- }
7974
- delete full.inst;
7975
- delete full.continue;
7976
- if (!ctx?.reportInput) {
7977
- delete full.input;
7994
+ 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";
7995
+ const { inst: _inst, continue: _continue, input: _input, ...rest } = iss;
7996
+ rest.path ?? (rest.path = []);
7997
+ rest.message = message;
7998
+ if (ctx?.reportInput) {
7999
+ rest.input = _input;
7978
8000
  }
7979
- return full;
8001
+ return rest;
7980
8002
  }
7981
8003
  function getSizableOrigin(input) {
7982
8004
  if (input instanceof Set)
@@ -8093,10 +8115,10 @@ var initializer = (inst, def) => {
8093
8115
  };
8094
8116
  var $ZodError = $constructor("$ZodError", initializer);
8095
8117
  var $ZodRealError = $constructor("$ZodError", initializer, { Parent: Error });
8096
- function flattenError(error48, mapper = (issue2) => issue2.message) {
8118
+ function flattenError(error51, mapper = (issue2) => issue2.message) {
8097
8119
  const fieldErrors = {};
8098
8120
  const formErrors = [];
8099
- for (const sub of error48.issues) {
8121
+ for (const sub of error51.issues) {
8100
8122
  if (sub.path.length > 0) {
8101
8123
  fieldErrors[sub.path[0]] = fieldErrors[sub.path[0]] || [];
8102
8124
  fieldErrors[sub.path[0]].push(mapper(sub));
@@ -8106,50 +8128,53 @@ function flattenError(error48, mapper = (issue2) => issue2.message) {
8106
8128
  }
8107
8129
  return { formErrors, fieldErrors };
8108
8130
  }
8109
- function formatError(error48, mapper = (issue2) => issue2.message) {
8131
+ function formatError(error51, mapper = (issue2) => issue2.message) {
8110
8132
  const fieldErrors = { _errors: [] };
8111
- const processError = (error49) => {
8112
- for (const issue2 of error49.issues) {
8133
+ const processError = (error52, path = []) => {
8134
+ for (const issue2 of error52.issues) {
8113
8135
  if (issue2.code === "invalid_union" && issue2.errors.length) {
8114
- issue2.errors.map((issues) => processError({ issues }));
8136
+ issue2.errors.map((issues) => processError({ issues }, [...path, ...issue2.path]));
8115
8137
  } else if (issue2.code === "invalid_key") {
8116
- processError({ issues: issue2.issues });
8138
+ processError({ issues: issue2.issues }, [...path, ...issue2.path]);
8117
8139
  } else if (issue2.code === "invalid_element") {
8118
- processError({ issues: issue2.issues });
8119
- } else if (issue2.path.length === 0) {
8120
- fieldErrors._errors.push(mapper(issue2));
8140
+ processError({ issues: issue2.issues }, [...path, ...issue2.path]);
8121
8141
  } else {
8122
- let curr = fieldErrors;
8123
- let i = 0;
8124
- while (i < issue2.path.length) {
8125
- const el = issue2.path[i];
8126
- const terminal = i === issue2.path.length - 1;
8127
- if (!terminal) {
8128
- curr[el] = curr[el] || { _errors: [] };
8129
- } else {
8130
- curr[el] = curr[el] || { _errors: [] };
8131
- curr[el]._errors.push(mapper(issue2));
8142
+ const fullpath = [...path, ...issue2.path];
8143
+ if (fullpath.length === 0) {
8144
+ fieldErrors._errors.push(mapper(issue2));
8145
+ } else {
8146
+ let curr = fieldErrors;
8147
+ let i = 0;
8148
+ while (i < fullpath.length) {
8149
+ const el = fullpath[i];
8150
+ const terminal = i === fullpath.length - 1;
8151
+ if (!terminal) {
8152
+ curr[el] = curr[el] || { _errors: [] };
8153
+ } else {
8154
+ curr[el] = curr[el] || { _errors: [] };
8155
+ curr[el]._errors.push(mapper(issue2));
8156
+ }
8157
+ curr = curr[el];
8158
+ i++;
8132
8159
  }
8133
- curr = curr[el];
8134
- i++;
8135
8160
  }
8136
8161
  }
8137
8162
  }
8138
8163
  };
8139
- processError(error48);
8164
+ processError(error51);
8140
8165
  return fieldErrors;
8141
8166
  }
8142
- function treeifyError(error48, mapper = (issue2) => issue2.message) {
8167
+ function treeifyError(error51, mapper = (issue2) => issue2.message) {
8143
8168
  const result = { errors: [] };
8144
- const processError = (error49, path = []) => {
8145
- var _a2, _b;
8146
- for (const issue2 of error49.issues) {
8169
+ const processError = (error52, path = []) => {
8170
+ var _a3, _b;
8171
+ for (const issue2 of error52.issues) {
8147
8172
  if (issue2.code === "invalid_union" && issue2.errors.length) {
8148
- issue2.errors.map((issues) => processError({ issues }, issue2.path));
8173
+ issue2.errors.map((issues) => processError({ issues }, [...path, ...issue2.path]));
8149
8174
  } else if (issue2.code === "invalid_key") {
8150
- processError({ issues: issue2.issues }, issue2.path);
8175
+ processError({ issues: issue2.issues }, [...path, ...issue2.path]);
8151
8176
  } else if (issue2.code === "invalid_element") {
8152
- processError({ issues: issue2.issues }, issue2.path);
8177
+ processError({ issues: issue2.issues }, [...path, ...issue2.path]);
8153
8178
  } else {
8154
8179
  const fullpath = [...path, ...issue2.path];
8155
8180
  if (fullpath.length === 0) {
@@ -8163,7 +8188,7 @@ function treeifyError(error48, mapper = (issue2) => issue2.message) {
8163
8188
  const terminal = i === fullpath.length - 1;
8164
8189
  if (typeof el === "string") {
8165
8190
  curr.properties ?? (curr.properties = {});
8166
- (_a2 = curr.properties)[el] ?? (_a2[el] = { errors: [] });
8191
+ (_a3 = curr.properties)[el] ?? (_a3[el] = { errors: [] });
8167
8192
  curr = curr.properties[el];
8168
8193
  } else {
8169
8194
  curr.items ?? (curr.items = []);
@@ -8178,7 +8203,7 @@ function treeifyError(error48, mapper = (issue2) => issue2.message) {
8178
8203
  }
8179
8204
  }
8180
8205
  };
8181
- processError(error48);
8206
+ processError(error51);
8182
8207
  return result;
8183
8208
  }
8184
8209
  function toDotPath(_path) {
@@ -8199,9 +8224,9 @@ function toDotPath(_path) {
8199
8224
  }
8200
8225
  return segs.join("");
8201
8226
  }
8202
- function prettifyError(error48) {
8227
+ function prettifyError(error51) {
8203
8228
  const lines = [];
8204
- const issues = [...error48.issues].sort((a, b) => (a.path ?? []).length - (b.path ?? []).length);
8229
+ const issues = [...error51.issues].sort((a, b) => (a.path ?? []).length - (b.path ?? []).length);
8205
8230
  for (const issue2 of issues) {
8206
8231
  lines.push(`\u2716 ${issue2.message}`);
8207
8232
  if (issue2.path?.length)
@@ -8212,7 +8237,7 @@ function prettifyError(error48) {
8212
8237
 
8213
8238
  // ../../node_modules/zod/v4/core/parse.js
8214
8239
  var _parse = (_Err) => (schema, value, _ctx, _params) => {
8215
- const ctx = _ctx ? Object.assign(_ctx, { async: false }) : { async: false };
8240
+ const ctx = _ctx ? { ..._ctx, async: false } : { async: false };
8216
8241
  const result = schema._zod.run({ value, issues: [] }, ctx);
8217
8242
  if (result instanceof Promise) {
8218
8243
  throw new $ZodAsyncError();
@@ -8226,7 +8251,7 @@ var _parse = (_Err) => (schema, value, _ctx, _params) => {
8226
8251
  };
8227
8252
  var parse = /* @__PURE__ */ _parse($ZodRealError);
8228
8253
  var _parseAsync = (_Err) => async (schema, value, _ctx, params) => {
8229
- const ctx = _ctx ? Object.assign(_ctx, { async: true }) : { async: true };
8254
+ const ctx = _ctx ? { ..._ctx, async: true } : { async: true };
8230
8255
  let result = schema._zod.run({ value, issues: [] }, ctx);
8231
8256
  if (result instanceof Promise)
8232
8257
  result = await result;
@@ -8251,7 +8276,7 @@ var _safeParse = (_Err) => (schema, value, _ctx) => {
8251
8276
  };
8252
8277
  var safeParse = /* @__PURE__ */ _safeParse($ZodRealError);
8253
8278
  var _safeParseAsync = (_Err) => async (schema, value, _ctx) => {
8254
- const ctx = _ctx ? Object.assign(_ctx, { async: true }) : { async: true };
8279
+ const ctx = _ctx ? { ..._ctx, async: true } : { async: true };
8255
8280
  let result = schema._zod.run({ value, issues: [] }, ctx);
8256
8281
  if (result instanceof Promise)
8257
8282
  result = await result;
@@ -8262,7 +8287,7 @@ var _safeParseAsync = (_Err) => async (schema, value, _ctx) => {
8262
8287
  };
8263
8288
  var safeParseAsync = /* @__PURE__ */ _safeParseAsync($ZodRealError);
8264
8289
  var _encode = (_Err) => (schema, value, _ctx) => {
8265
- const ctx = _ctx ? Object.assign(_ctx, { direction: "backward" }) : { direction: "backward" };
8290
+ const ctx = _ctx ? { ..._ctx, direction: "backward" } : { direction: "backward" };
8266
8291
  return _parse(_Err)(schema, value, ctx);
8267
8292
  };
8268
8293
  var encode = /* @__PURE__ */ _encode($ZodRealError);
@@ -8271,7 +8296,7 @@ var _decode = (_Err) => (schema, value, _ctx) => {
8271
8296
  };
8272
8297
  var decode = /* @__PURE__ */ _decode($ZodRealError);
8273
8298
  var _encodeAsync = (_Err) => async (schema, value, _ctx) => {
8274
- const ctx = _ctx ? Object.assign(_ctx, { direction: "backward" }) : { direction: "backward" };
8299
+ const ctx = _ctx ? { ..._ctx, direction: "backward" } : { direction: "backward" };
8275
8300
  return _parseAsync(_Err)(schema, value, ctx);
8276
8301
  };
8277
8302
  var encodeAsync = /* @__PURE__ */ _encodeAsync($ZodRealError);
@@ -8280,7 +8305,7 @@ var _decodeAsync = (_Err) => async (schema, value, _ctx) => {
8280
8305
  };
8281
8306
  var decodeAsync = /* @__PURE__ */ _decodeAsync($ZodRealError);
8282
8307
  var _safeEncode = (_Err) => (schema, value, _ctx) => {
8283
- const ctx = _ctx ? Object.assign(_ctx, { direction: "backward" }) : { direction: "backward" };
8308
+ const ctx = _ctx ? { ..._ctx, direction: "backward" } : { direction: "backward" };
8284
8309
  return _safeParse(_Err)(schema, value, ctx);
8285
8310
  };
8286
8311
  var safeEncode = /* @__PURE__ */ _safeEncode($ZodRealError);
@@ -8289,7 +8314,7 @@ var _safeDecode = (_Err) => (schema, value, _ctx) => {
8289
8314
  };
8290
8315
  var safeDecode = /* @__PURE__ */ _safeDecode($ZodRealError);
8291
8316
  var _safeEncodeAsync = (_Err) => async (schema, value, _ctx) => {
8292
- const ctx = _ctx ? Object.assign(_ctx, { direction: "backward" }) : { direction: "backward" };
8317
+ const ctx = _ctx ? { ..._ctx, direction: "backward" } : { direction: "backward" };
8293
8318
  return _safeParseAsync(_Err)(schema, value, ctx);
8294
8319
  };
8295
8320
  var safeEncodeAsync = /* @__PURE__ */ _safeEncodeAsync($ZodRealError);
@@ -8322,6 +8347,7 @@ __export(regexes_exports, {
8322
8347
  hex: () => hex,
8323
8348
  hostname: () => hostname,
8324
8349
  html5Email: () => html5Email,
8350
+ httpProtocol: () => httpProtocol,
8325
8351
  idnEmail: () => idnEmail,
8326
8352
  integer: () => integer,
8327
8353
  ipv4: () => ipv4,
@@ -8360,7 +8386,7 @@ __export(regexes_exports, {
8360
8386
  uuid7: () => uuid7,
8361
8387
  xid: () => xid
8362
8388
  });
8363
- var cuid = /^[cC][^\s-]{8,}$/;
8389
+ var cuid = /^[cC][0-9a-z]{6,}$/;
8364
8390
  var cuid2 = /^[0-9a-z]+$/;
8365
8391
  var ulid = /^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/;
8366
8392
  var xid = /^[0-9a-vA-V]{20}$/;
@@ -8399,6 +8425,7 @@ var base64 = /^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/
8399
8425
  var base64url = /^[A-Za-z0-9_-]*$/;
8400
8426
  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])?)*\.?$/;
8401
8427
  var domain = /^([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$/;
8428
+ var httpProtocol = /^https?$/;
8402
8429
  var e164 = /^\+[1-9]\d{6,14}$/;
8403
8430
  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])))`;
8404
8431
  var date = /* @__PURE__ */ new RegExp(`^${dateSource}$`);
@@ -8457,10 +8484,10 @@ var sha512_base64url = /* @__PURE__ */ fixedBase64url(86);
8457
8484
 
8458
8485
  // ../../node_modules/zod/v4/core/checks.js
8459
8486
  var $ZodCheck = /* @__PURE__ */ $constructor("$ZodCheck", (inst, def) => {
8460
- var _a2;
8487
+ var _a3;
8461
8488
  inst._zod ?? (inst._zod = {});
8462
8489
  inst._zod.def = def;
8463
- (_a2 = inst._zod).onattach ?? (_a2.onattach = []);
8490
+ (_a3 = inst._zod).onattach ?? (_a3.onattach = []);
8464
8491
  });
8465
8492
  var numericOriginMap = {
8466
8493
  number: "number",
@@ -8526,8 +8553,8 @@ var $ZodCheckGreaterThan = /* @__PURE__ */ $constructor("$ZodCheckGreaterThan",
8526
8553
  var $ZodCheckMultipleOf = /* @__PURE__ */ $constructor("$ZodCheckMultipleOf", (inst, def) => {
8527
8554
  $ZodCheck.init(inst, def);
8528
8555
  inst._zod.onattach.push((inst2) => {
8529
- var _a2;
8530
- (_a2 = inst2._zod.bag).multipleOf ?? (_a2.multipleOf = def.value);
8556
+ var _a3;
8557
+ (_a3 = inst2._zod.bag).multipleOf ?? (_a3.multipleOf = def.value);
8531
8558
  });
8532
8559
  inst._zod.check = (payload) => {
8533
8560
  if (typeof payload.value !== typeof def.value)
@@ -8660,9 +8687,9 @@ var $ZodCheckBigIntFormat = /* @__PURE__ */ $constructor("$ZodCheckBigIntFormat"
8660
8687
  };
8661
8688
  });
8662
8689
  var $ZodCheckMaxSize = /* @__PURE__ */ $constructor("$ZodCheckMaxSize", (inst, def) => {
8663
- var _a2;
8690
+ var _a3;
8664
8691
  $ZodCheck.init(inst, def);
8665
- (_a2 = inst._zod.def).when ?? (_a2.when = (payload) => {
8692
+ (_a3 = inst._zod.def).when ?? (_a3.when = (payload) => {
8666
8693
  const val = payload.value;
8667
8694
  return !nullish(val) && val.size !== void 0;
8668
8695
  });
@@ -8688,9 +8715,9 @@ var $ZodCheckMaxSize = /* @__PURE__ */ $constructor("$ZodCheckMaxSize", (inst, d
8688
8715
  };
8689
8716
  });
8690
8717
  var $ZodCheckMinSize = /* @__PURE__ */ $constructor("$ZodCheckMinSize", (inst, def) => {
8691
- var _a2;
8718
+ var _a3;
8692
8719
  $ZodCheck.init(inst, def);
8693
- (_a2 = inst._zod.def).when ?? (_a2.when = (payload) => {
8720
+ (_a3 = inst._zod.def).when ?? (_a3.when = (payload) => {
8694
8721
  const val = payload.value;
8695
8722
  return !nullish(val) && val.size !== void 0;
8696
8723
  });
@@ -8716,9 +8743,9 @@ var $ZodCheckMinSize = /* @__PURE__ */ $constructor("$ZodCheckMinSize", (inst, d
8716
8743
  };
8717
8744
  });
8718
8745
  var $ZodCheckSizeEquals = /* @__PURE__ */ $constructor("$ZodCheckSizeEquals", (inst, def) => {
8719
- var _a2;
8746
+ var _a3;
8720
8747
  $ZodCheck.init(inst, def);
8721
- (_a2 = inst._zod.def).when ?? (_a2.when = (payload) => {
8748
+ (_a3 = inst._zod.def).when ?? (_a3.when = (payload) => {
8722
8749
  const val = payload.value;
8723
8750
  return !nullish(val) && val.size !== void 0;
8724
8751
  });
@@ -8746,9 +8773,9 @@ var $ZodCheckSizeEquals = /* @__PURE__ */ $constructor("$ZodCheckSizeEquals", (i
8746
8773
  };
8747
8774
  });
8748
8775
  var $ZodCheckMaxLength = /* @__PURE__ */ $constructor("$ZodCheckMaxLength", (inst, def) => {
8749
- var _a2;
8776
+ var _a3;
8750
8777
  $ZodCheck.init(inst, def);
8751
- (_a2 = inst._zod.def).when ?? (_a2.when = (payload) => {
8778
+ (_a3 = inst._zod.def).when ?? (_a3.when = (payload) => {
8752
8779
  const val = payload.value;
8753
8780
  return !nullish(val) && val.length !== void 0;
8754
8781
  });
@@ -8775,9 +8802,9 @@ var $ZodCheckMaxLength = /* @__PURE__ */ $constructor("$ZodCheckMaxLength", (ins
8775
8802
  };
8776
8803
  });
8777
8804
  var $ZodCheckMinLength = /* @__PURE__ */ $constructor("$ZodCheckMinLength", (inst, def) => {
8778
- var _a2;
8805
+ var _a3;
8779
8806
  $ZodCheck.init(inst, def);
8780
- (_a2 = inst._zod.def).when ?? (_a2.when = (payload) => {
8807
+ (_a3 = inst._zod.def).when ?? (_a3.when = (payload) => {
8781
8808
  const val = payload.value;
8782
8809
  return !nullish(val) && val.length !== void 0;
8783
8810
  });
@@ -8804,9 +8831,9 @@ var $ZodCheckMinLength = /* @__PURE__ */ $constructor("$ZodCheckMinLength", (ins
8804
8831
  };
8805
8832
  });
8806
8833
  var $ZodCheckLengthEquals = /* @__PURE__ */ $constructor("$ZodCheckLengthEquals", (inst, def) => {
8807
- var _a2;
8834
+ var _a3;
8808
8835
  $ZodCheck.init(inst, def);
8809
- (_a2 = inst._zod.def).when ?? (_a2.when = (payload) => {
8836
+ (_a3 = inst._zod.def).when ?? (_a3.when = (payload) => {
8810
8837
  const val = payload.value;
8811
8838
  return !nullish(val) && val.length !== void 0;
8812
8839
  });
@@ -8835,7 +8862,7 @@ var $ZodCheckLengthEquals = /* @__PURE__ */ $constructor("$ZodCheckLengthEquals"
8835
8862
  };
8836
8863
  });
8837
8864
  var $ZodCheckStringFormat = /* @__PURE__ */ $constructor("$ZodCheckStringFormat", (inst, def) => {
8838
- var _a2, _b;
8865
+ var _a3, _b;
8839
8866
  $ZodCheck.init(inst, def);
8840
8867
  inst._zod.onattach.push((inst2) => {
8841
8868
  const bag = inst2._zod.bag;
@@ -8846,7 +8873,7 @@ var $ZodCheckStringFormat = /* @__PURE__ */ $constructor("$ZodCheckStringFormat"
8846
8873
  }
8847
8874
  });
8848
8875
  if (def.pattern)
8849
- (_a2 = inst._zod).check ?? (_a2.check = (payload) => {
8876
+ (_a3 = inst._zod).check ?? (_a3.check = (payload) => {
8850
8877
  def.pattern.lastIndex = 0;
8851
8878
  if (def.pattern.test(payload.value))
8852
8879
  return;
@@ -9042,13 +9069,13 @@ var Doc = class {
9042
9069
  // ../../node_modules/zod/v4/core/versions.js
9043
9070
  var version = {
9044
9071
  major: 4,
9045
- minor: 3,
9046
- patch: 6
9072
+ minor: 4,
9073
+ patch: 3
9047
9074
  };
9048
9075
 
9049
9076
  // ../../node_modules/zod/v4/core/schemas.js
9050
9077
  var $ZodType = /* @__PURE__ */ $constructor("$ZodType", (inst, def) => {
9051
- var _a2;
9078
+ var _a3;
9052
9079
  inst ?? (inst = {});
9053
9080
  inst._zod.def = def;
9054
9081
  inst._zod.bag = inst._zod.bag || {};
@@ -9063,7 +9090,7 @@ var $ZodType = /* @__PURE__ */ $constructor("$ZodType", (inst, def) => {
9063
9090
  }
9064
9091
  }
9065
9092
  if (checks.length === 0) {
9066
- (_a2 = inst._zod).deferred ?? (_a2.deferred = []);
9093
+ (_a3 = inst._zod).deferred ?? (_a3.deferred = []);
9067
9094
  inst._zod.deferred?.push(() => {
9068
9095
  inst._zod.run = inst._zod.parse;
9069
9096
  });
@@ -9073,6 +9100,8 @@ var $ZodType = /* @__PURE__ */ $constructor("$ZodType", (inst, def) => {
9073
9100
  let asyncResult;
9074
9101
  for (const ch of checks2) {
9075
9102
  if (ch._zod.def.when) {
9103
+ if (explicitlyAborted(payload))
9104
+ continue;
9076
9105
  const shouldRun = ch._zod.def.when(payload);
9077
9106
  if (!shouldRun)
9078
9107
  continue;
@@ -9213,6 +9242,19 @@ var $ZodURL = /* @__PURE__ */ $constructor("$ZodURL", (inst, def) => {
9213
9242
  inst._zod.check = (payload) => {
9214
9243
  try {
9215
9244
  const trimmed = payload.value.trim();
9245
+ if (!def.normalize && def.protocol?.source === httpProtocol.source) {
9246
+ if (!/^https?:\/\//i.test(trimmed)) {
9247
+ payload.issues.push({
9248
+ code: "invalid_format",
9249
+ format: "url",
9250
+ note: "Invalid URL format",
9251
+ input: payload.value,
9252
+ inst,
9253
+ continue: !def.abort
9254
+ });
9255
+ return;
9256
+ }
9257
+ }
9216
9258
  const url2 = new URL(trimmed);
9217
9259
  if (def.hostname) {
9218
9260
  def.hostname.lastIndex = 0;
@@ -9366,6 +9408,8 @@ var $ZodCIDRv6 = /* @__PURE__ */ $constructor("$ZodCIDRv6", (inst, def) => {
9366
9408
  function isValidBase64(data) {
9367
9409
  if (data === "")
9368
9410
  return true;
9411
+ if (/\s/.test(data))
9412
+ return false;
9369
9413
  if (data.length % 4 !== 0)
9370
9414
  return false;
9371
9415
  try {
@@ -9558,8 +9602,6 @@ var $ZodUndefined = /* @__PURE__ */ $constructor("$ZodUndefined", (inst, def) =>
9558
9602
  $ZodType.init(inst, def);
9559
9603
  inst._zod.pattern = _undefined;
9560
9604
  inst._zod.values = /* @__PURE__ */ new Set([void 0]);
9561
- inst._zod.optin = "optional";
9562
- inst._zod.optout = "optional";
9563
9605
  inst._zod.parse = (payload, _ctx) => {
9564
9606
  const input = payload.value;
9565
9607
  if (typeof input === "undefined")
@@ -9688,15 +9730,27 @@ var $ZodArray = /* @__PURE__ */ $constructor("$ZodArray", (inst, def) => {
9688
9730
  return payload;
9689
9731
  };
9690
9732
  });
9691
- function handlePropertyResult(result, final, key, input, isOptionalOut) {
9733
+ function handlePropertyResult(result, final, key, input, isOptionalIn, isOptionalOut) {
9734
+ const isPresent = key in input;
9692
9735
  if (result.issues.length) {
9693
- if (isOptionalOut && !(key in input)) {
9736
+ if (isOptionalIn && isOptionalOut && !isPresent) {
9694
9737
  return;
9695
9738
  }
9696
9739
  final.issues.push(...prefixIssues(key, result.issues));
9697
9740
  }
9741
+ if (!isPresent && !isOptionalIn) {
9742
+ if (!result.issues.length) {
9743
+ final.issues.push({
9744
+ code: "invalid_type",
9745
+ expected: "nonoptional",
9746
+ input: void 0,
9747
+ path: [key]
9748
+ });
9749
+ }
9750
+ return;
9751
+ }
9698
9752
  if (result.value === void 0) {
9699
- if (key in input) {
9753
+ if (isPresent) {
9700
9754
  final.value[key] = void 0;
9701
9755
  }
9702
9756
  } else {
@@ -9724,8 +9778,11 @@ function handleCatchall(proms, input, payload, ctx, def, inst) {
9724
9778
  const keySet = def.keySet;
9725
9779
  const _catchall = def.catchall._zod;
9726
9780
  const t = _catchall.def.type;
9781
+ const isOptionalIn = _catchall.optin === "optional";
9727
9782
  const isOptionalOut = _catchall.optout === "optional";
9728
9783
  for (const key in input) {
9784
+ if (key === "__proto__")
9785
+ continue;
9729
9786
  if (keySet.has(key))
9730
9787
  continue;
9731
9788
  if (t === "never") {
@@ -9734,9 +9791,9 @@ function handleCatchall(proms, input, payload, ctx, def, inst) {
9734
9791
  }
9735
9792
  const r = _catchall.run({ value: input[key], issues: [] }, ctx);
9736
9793
  if (r instanceof Promise) {
9737
- proms.push(r.then((r2) => handlePropertyResult(r2, payload, key, input, isOptionalOut)));
9794
+ proms.push(r.then((r2) => handlePropertyResult(r2, payload, key, input, isOptionalIn, isOptionalOut)));
9738
9795
  } else {
9739
- handlePropertyResult(r, payload, key, input, isOptionalOut);
9796
+ handlePropertyResult(r, payload, key, input, isOptionalIn, isOptionalOut);
9740
9797
  }
9741
9798
  }
9742
9799
  if (unrecognized.length) {
@@ -9802,12 +9859,13 @@ var $ZodObject = /* @__PURE__ */ $constructor("$ZodObject", (inst, def) => {
9802
9859
  const shape = value.shape;
9803
9860
  for (const key of value.keys) {
9804
9861
  const el = shape[key];
9862
+ const isOptionalIn = el._zod.optin === "optional";
9805
9863
  const isOptionalOut = el._zod.optout === "optional";
9806
9864
  const r = el._zod.run({ value: input[key], issues: [] }, ctx);
9807
9865
  if (r instanceof Promise) {
9808
- proms.push(r.then((r2) => handlePropertyResult(r2, payload, key, input, isOptionalOut)));
9866
+ proms.push(r.then((r2) => handlePropertyResult(r2, payload, key, input, isOptionalIn, isOptionalOut)));
9809
9867
  } else {
9810
- handlePropertyResult(r, payload, key, input, isOptionalOut);
9868
+ handlePropertyResult(r, payload, key, input, isOptionalIn, isOptionalOut);
9811
9869
  }
9812
9870
  }
9813
9871
  if (!catchall) {
@@ -9838,9 +9896,10 @@ var $ZodObjectJIT = /* @__PURE__ */ $constructor("$ZodObjectJIT", (inst, def) =>
9838
9896
  const id = ids[key];
9839
9897
  const k = esc(key);
9840
9898
  const schema = shape[key];
9899
+ const isOptionalIn = schema?._zod?.optin === "optional";
9841
9900
  const isOptionalOut = schema?._zod?.optout === "optional";
9842
9901
  doc.write(`const ${id} = ${parseStr(key)};`);
9843
- if (isOptionalOut) {
9902
+ if (isOptionalIn && isOptionalOut) {
9844
9903
  doc.write(`
9845
9904
  if (${id}.issues.length) {
9846
9905
  if (${k} in input) {
@@ -9859,6 +9918,33 @@ var $ZodObjectJIT = /* @__PURE__ */ $constructor("$ZodObjectJIT", (inst, def) =>
9859
9918
  newResult[${k}] = ${id}.value;
9860
9919
  }
9861
9920
 
9921
+ `);
9922
+ } else if (!isOptionalIn) {
9923
+ doc.write(`
9924
+ const ${id}_present = ${k} in input;
9925
+ if (${id}.issues.length) {
9926
+ payload.issues = payload.issues.concat(${id}.issues.map(iss => ({
9927
+ ...iss,
9928
+ path: iss.path ? [${k}, ...iss.path] : [${k}]
9929
+ })));
9930
+ }
9931
+ if (!${id}_present && !${id}.issues.length) {
9932
+ payload.issues.push({
9933
+ code: "invalid_type",
9934
+ expected: "nonoptional",
9935
+ input: undefined,
9936
+ path: [${k}]
9937
+ });
9938
+ }
9939
+
9940
+ if (${id}_present) {
9941
+ if (${id}.value === undefined) {
9942
+ newResult[${k}] = undefined;
9943
+ } else {
9944
+ newResult[${k}] = ${id}.value;
9945
+ }
9946
+ }
9947
+
9862
9948
  `);
9863
9949
  } else {
9864
9950
  doc.write(`
@@ -9952,10 +10038,9 @@ var $ZodUnion = /* @__PURE__ */ $constructor("$ZodUnion", (inst, def) => {
9952
10038
  }
9953
10039
  return void 0;
9954
10040
  });
9955
- const single = def.options.length === 1;
9956
- const first = def.options[0]._zod.run;
10041
+ const first = def.options.length === 1 ? def.options[0]._zod.run : null;
9957
10042
  inst._zod.parse = (payload, ctx) => {
9958
- if (single) {
10043
+ if (first) {
9959
10044
  return first(payload, ctx);
9960
10045
  }
9961
10046
  let async = false;
@@ -10008,10 +10093,9 @@ function handleExclusiveUnionResults(results, final, inst, ctx) {
10008
10093
  var $ZodXor = /* @__PURE__ */ $constructor("$ZodXor", (inst, def) => {
10009
10094
  $ZodUnion.init(inst, def);
10010
10095
  def.inclusive = false;
10011
- const single = def.options.length === 1;
10012
- const first = def.options[0]._zod.run;
10096
+ const first = def.options.length === 1 ? def.options[0]._zod.run : null;
10013
10097
  inst._zod.parse = (payload, ctx) => {
10014
- if (single) {
10098
+ if (first) {
10015
10099
  return first(payload, ctx);
10016
10100
  }
10017
10101
  let async = false;
@@ -10086,7 +10170,7 @@ var $ZodDiscriminatedUnion = /* @__PURE__ */ $constructor("$ZodDiscriminatedUnio
10086
10170
  if (opt) {
10087
10171
  return opt._zod.run(payload, ctx);
10088
10172
  }
10089
- if (def.unionFallback) {
10173
+ if (def.unionFallback || ctx.direction === "backward") {
10090
10174
  return _super(payload, ctx);
10091
10175
  }
10092
10176
  payload.issues.push({
@@ -10094,6 +10178,7 @@ var $ZodDiscriminatedUnion = /* @__PURE__ */ $constructor("$ZodDiscriminatedUnio
10094
10178
  errors: [],
10095
10179
  note: "No matching discriminator",
10096
10180
  discriminator: def.discriminator,
10181
+ options: Array.from(disc.value.keys()),
10097
10182
  input,
10098
10183
  path: [def.discriminator],
10099
10184
  inst
@@ -10215,64 +10300,96 @@ var $ZodTuple = /* @__PURE__ */ $constructor("$ZodTuple", (inst, def) => {
10215
10300
  }
10216
10301
  payload.value = [];
10217
10302
  const proms = [];
10218
- const reversedIndex = [...items].reverse().findIndex((item) => item._zod.optin !== "optional");
10219
- const optStart = reversedIndex === -1 ? 0 : items.length - reversedIndex;
10303
+ const optinStart = getTupleOptStart(items, "optin");
10304
+ const optoutStart = getTupleOptStart(items, "optout");
10220
10305
  if (!def.rest) {
10221
- const tooBig = input.length > items.length;
10222
- const tooSmall = input.length < optStart - 1;
10223
- if (tooBig || tooSmall) {
10306
+ if (input.length < optinStart) {
10224
10307
  payload.issues.push({
10225
- ...tooBig ? { code: "too_big", maximum: items.length, inclusive: true } : { code: "too_small", minimum: items.length },
10308
+ code: "too_small",
10309
+ minimum: optinStart,
10310
+ inclusive: true,
10226
10311
  input,
10227
10312
  inst,
10228
10313
  origin: "array"
10229
10314
  });
10230
10315
  return payload;
10231
10316
  }
10232
- }
10233
- let i = -1;
10234
- for (const item of items) {
10235
- i++;
10236
- if (i >= input.length) {
10237
- if (i >= optStart)
10238
- continue;
10317
+ if (input.length > items.length) {
10318
+ payload.issues.push({
10319
+ code: "too_big",
10320
+ maximum: items.length,
10321
+ inclusive: true,
10322
+ input,
10323
+ inst,
10324
+ origin: "array"
10325
+ });
10239
10326
  }
10240
- const result = item._zod.run({
10241
- value: input[i],
10242
- issues: []
10243
- }, ctx);
10244
- if (result instanceof Promise) {
10245
- proms.push(result.then((result2) => handleTupleResult(result2, payload, i)));
10327
+ }
10328
+ const itemResults = new Array(items.length);
10329
+ for (let i = 0; i < items.length; i++) {
10330
+ const r = items[i]._zod.run({ value: input[i], issues: [] }, ctx);
10331
+ if (r instanceof Promise) {
10332
+ proms.push(r.then((rr) => {
10333
+ itemResults[i] = rr;
10334
+ }));
10246
10335
  } else {
10247
- handleTupleResult(result, payload, i);
10336
+ itemResults[i] = r;
10248
10337
  }
10249
10338
  }
10250
10339
  if (def.rest) {
10340
+ let i = items.length - 1;
10251
10341
  const rest = input.slice(items.length);
10252
10342
  for (const el of rest) {
10253
10343
  i++;
10254
- const result = def.rest._zod.run({
10255
- value: el,
10256
- issues: []
10257
- }, ctx);
10344
+ const result = def.rest._zod.run({ value: el, issues: [] }, ctx);
10258
10345
  if (result instanceof Promise) {
10259
- proms.push(result.then((result2) => handleTupleResult(result2, payload, i)));
10346
+ proms.push(result.then((r) => handleTupleResult(r, payload, i)));
10260
10347
  } else {
10261
10348
  handleTupleResult(result, payload, i);
10262
10349
  }
10263
10350
  }
10264
10351
  }
10265
- if (proms.length)
10266
- return Promise.all(proms).then(() => payload);
10267
- return payload;
10352
+ if (proms.length) {
10353
+ return Promise.all(proms).then(() => handleTupleResults(itemResults, payload, items, input, optoutStart));
10354
+ }
10355
+ return handleTupleResults(itemResults, payload, items, input, optoutStart);
10268
10356
  };
10269
10357
  });
10358
+ function getTupleOptStart(items, key) {
10359
+ for (let i = items.length - 1; i >= 0; i--) {
10360
+ if (items[i]._zod[key] !== "optional")
10361
+ return i + 1;
10362
+ }
10363
+ return 0;
10364
+ }
10270
10365
  function handleTupleResult(result, final, index) {
10271
10366
  if (result.issues.length) {
10272
10367
  final.issues.push(...prefixIssues(index, result.issues));
10273
10368
  }
10274
10369
  final.value[index] = result.value;
10275
10370
  }
10371
+ function handleTupleResults(itemResults, final, items, input, optoutStart) {
10372
+ for (let i = 0; i < items.length; i++) {
10373
+ const r = itemResults[i];
10374
+ const isPresent = i < input.length;
10375
+ if (r.issues.length) {
10376
+ if (!isPresent && i >= optoutStart) {
10377
+ final.value.length = i;
10378
+ break;
10379
+ }
10380
+ final.issues.push(...prefixIssues(i, r.issues));
10381
+ }
10382
+ final.value[i] = r.value;
10383
+ }
10384
+ for (let i = final.value.length - 1; i >= input.length; i--) {
10385
+ if (items[i]._zod.optout === "optional" && final.value[i] === void 0) {
10386
+ final.value.length = i;
10387
+ } else {
10388
+ break;
10389
+ }
10390
+ }
10391
+ return final;
10392
+ }
10276
10393
  var $ZodRecord = /* @__PURE__ */ $constructor("$ZodRecord", (inst, def) => {
10277
10394
  $ZodType.init(inst, def);
10278
10395
  inst._zod.parse = (payload, ctx) => {
@@ -10294,19 +10411,35 @@ var $ZodRecord = /* @__PURE__ */ $constructor("$ZodRecord", (inst, def) => {
10294
10411
  for (const key of values) {
10295
10412
  if (typeof key === "string" || typeof key === "number" || typeof key === "symbol") {
10296
10413
  recordKeys.add(typeof key === "number" ? key.toString() : key);
10414
+ const keyResult = def.keyType._zod.run({ value: key, issues: [] }, ctx);
10415
+ if (keyResult instanceof Promise) {
10416
+ throw new Error("Async schemas not supported in object keys currently");
10417
+ }
10418
+ if (keyResult.issues.length) {
10419
+ payload.issues.push({
10420
+ code: "invalid_key",
10421
+ origin: "record",
10422
+ issues: keyResult.issues.map((iss) => finalizeIssue(iss, ctx, config())),
10423
+ input: key,
10424
+ path: [key],
10425
+ inst
10426
+ });
10427
+ continue;
10428
+ }
10429
+ const outKey = keyResult.value;
10297
10430
  const result = def.valueType._zod.run({ value: input[key], issues: [] }, ctx);
10298
10431
  if (result instanceof Promise) {
10299
10432
  proms.push(result.then((result2) => {
10300
10433
  if (result2.issues.length) {
10301
10434
  payload.issues.push(...prefixIssues(key, result2.issues));
10302
10435
  }
10303
- payload.value[key] = result2.value;
10436
+ payload.value[outKey] = result2.value;
10304
10437
  }));
10305
10438
  } else {
10306
10439
  if (result.issues.length) {
10307
10440
  payload.issues.push(...prefixIssues(key, result.issues));
10308
10441
  }
10309
- payload.value[key] = result.value;
10442
+ payload.value[outKey] = result.value;
10310
10443
  }
10311
10444
  }
10312
10445
  }
@@ -10330,6 +10463,8 @@ var $ZodRecord = /* @__PURE__ */ $constructor("$ZodRecord", (inst, def) => {
10330
10463
  for (const key of Reflect.ownKeys(input)) {
10331
10464
  if (key === "__proto__")
10332
10465
  continue;
10466
+ if (!Object.prototype.propertyIsEnumerable.call(input, key))
10467
+ continue;
10333
10468
  let keyResult = def.keyType._zod.run({ value: key, issues: [] }, ctx);
10334
10469
  if (keyResult instanceof Promise) {
10335
10470
  throw new Error("Async schemas not supported in object keys currently");
@@ -10534,6 +10669,7 @@ var $ZodFile = /* @__PURE__ */ $constructor("$ZodFile", (inst, def) => {
10534
10669
  });
10535
10670
  var $ZodTransform = /* @__PURE__ */ $constructor("$ZodTransform", (inst, def) => {
10536
10671
  $ZodType.init(inst, def);
10672
+ inst._zod.optin = "optional";
10537
10673
  inst._zod.parse = (payload, ctx) => {
10538
10674
  if (ctx.direction === "backward") {
10539
10675
  throw new $ZodEncodeError(inst.constructor.name);
@@ -10543,6 +10679,7 @@ var $ZodTransform = /* @__PURE__ */ $constructor("$ZodTransform", (inst, def) =>
10543
10679
  const output = _out instanceof Promise ? _out : Promise.resolve(_out);
10544
10680
  return output.then((output2) => {
10545
10681
  payload.value = output2;
10682
+ payload.fallback = true;
10546
10683
  return payload;
10547
10684
  });
10548
10685
  }
@@ -10550,11 +10687,12 @@ var $ZodTransform = /* @__PURE__ */ $constructor("$ZodTransform", (inst, def) =>
10550
10687
  throw new $ZodAsyncError();
10551
10688
  }
10552
10689
  payload.value = _out;
10690
+ payload.fallback = true;
10553
10691
  return payload;
10554
10692
  };
10555
10693
  });
10556
10694
  function handleOptionalResult(result, input) {
10557
- if (result.issues.length && input === void 0) {
10695
+ if (input === void 0 && (result.issues.length || result.fallback)) {
10558
10696
  return { issues: [], value: void 0 };
10559
10697
  }
10560
10698
  return result;
@@ -10572,10 +10710,11 @@ var $ZodOptional = /* @__PURE__ */ $constructor("$ZodOptional", (inst, def) => {
10572
10710
  });
10573
10711
  inst._zod.parse = (payload, ctx) => {
10574
10712
  if (def.innerType._zod.optin === "optional") {
10713
+ const input = payload.value;
10575
10714
  const result = def.innerType._zod.run(payload, ctx);
10576
10715
  if (result instanceof Promise)
10577
- return result.then((r) => handleOptionalResult(r, payload.value));
10578
- return handleOptionalResult(result, payload.value);
10716
+ return result.then((r) => handleOptionalResult(r, input));
10717
+ return handleOptionalResult(result, input);
10579
10718
  }
10580
10719
  if (payload.value === void 0) {
10581
10720
  return payload;
@@ -10691,7 +10830,7 @@ var $ZodSuccess = /* @__PURE__ */ $constructor("$ZodSuccess", (inst, def) => {
10691
10830
  });
10692
10831
  var $ZodCatch = /* @__PURE__ */ $constructor("$ZodCatch", (inst, def) => {
10693
10832
  $ZodType.init(inst, def);
10694
- defineLazy(inst._zod, "optin", () => def.innerType._zod.optin);
10833
+ inst._zod.optin = "optional";
10695
10834
  defineLazy(inst._zod, "optout", () => def.innerType._zod.optout);
10696
10835
  defineLazy(inst._zod, "values", () => def.innerType._zod.values);
10697
10836
  inst._zod.parse = (payload, ctx) => {
@@ -10711,6 +10850,7 @@ var $ZodCatch = /* @__PURE__ */ $constructor("$ZodCatch", (inst, def) => {
10711
10850
  input: payload.value
10712
10851
  });
10713
10852
  payload.issues = [];
10853
+ payload.fallback = true;
10714
10854
  }
10715
10855
  return payload;
10716
10856
  });
@@ -10725,6 +10865,7 @@ var $ZodCatch = /* @__PURE__ */ $constructor("$ZodCatch", (inst, def) => {
10725
10865
  input: payload.value
10726
10866
  });
10727
10867
  payload.issues = [];
10868
+ payload.fallback = true;
10728
10869
  }
10729
10870
  return payload;
10730
10871
  };
@@ -10770,7 +10911,7 @@ function handlePipeResult(left, next, ctx) {
10770
10911
  left.aborted = true;
10771
10912
  return left;
10772
10913
  }
10773
- return next._zod.run({ value: left.value, issues: left.issues }, ctx);
10914
+ return next._zod.run({ value: left.value, issues: left.issues, fallback: left.fallback }, ctx);
10774
10915
  }
10775
10916
  var $ZodCodec = /* @__PURE__ */ $constructor("$ZodCodec", (inst, def) => {
10776
10917
  $ZodType.init(inst, def);
@@ -10822,6 +10963,9 @@ function handleCodecTxResult(left, value, nextSchema, ctx) {
10822
10963
  }
10823
10964
  return nextSchema._zod.run({ value, issues: left.issues }, ctx);
10824
10965
  }
10966
+ var $ZodPreprocess = /* @__PURE__ */ $constructor("$ZodPreprocess", (inst, def) => {
10967
+ $ZodPipe.init(inst, def);
10968
+ });
10825
10969
  var $ZodReadonly = /* @__PURE__ */ $constructor("$ZodReadonly", (inst, def) => {
10826
10970
  $ZodType.init(inst, def);
10827
10971
  defineLazy(inst._zod, "propValues", () => def.innerType._zod.propValues);
@@ -10973,7 +11117,12 @@ var $ZodPromise = /* @__PURE__ */ $constructor("$ZodPromise", (inst, def) => {
10973
11117
  });
10974
11118
  var $ZodLazy = /* @__PURE__ */ $constructor("$ZodLazy", (inst, def) => {
10975
11119
  $ZodType.init(inst, def);
10976
- defineLazy(inst._zod, "innerType", () => def.getter());
11120
+ defineLazy(inst._zod, "innerType", () => {
11121
+ const d = def;
11122
+ if (!d._cachedInner)
11123
+ d._cachedInner = def.getter();
11124
+ return d._cachedInner;
11125
+ });
10977
11126
  defineLazy(inst._zod, "pattern", () => inst._zod.innerType?._zod?.pattern);
10978
11127
  defineLazy(inst._zod, "propValues", () => inst._zod.innerType?._zod?.propValues);
10979
11128
  defineLazy(inst._zod, "optin", () => inst._zod.innerType?._zod?.optin ?? void 0);
@@ -11028,6 +11177,7 @@ __export(locales_exports, {
11028
11177
  cs: () => cs_default,
11029
11178
  da: () => da_default,
11030
11179
  de: () => de_default,
11180
+ el: () => el_default,
11031
11181
  en: () => en_default,
11032
11182
  eo: () => eo_default,
11033
11183
  es: () => es_default,
@@ -11036,6 +11186,7 @@ __export(locales_exports, {
11036
11186
  fr: () => fr_default,
11037
11187
  frCA: () => fr_CA_default,
11038
11188
  he: () => he_default,
11189
+ hr: () => hr_default,
11039
11190
  hu: () => hu_default,
11040
11191
  hy: () => hy_default,
11041
11192
  id: () => id_default,
@@ -11055,6 +11206,7 @@ __export(locales_exports, {
11055
11206
  pl: () => pl_default,
11056
11207
  ps: () => ps_default,
11057
11208
  pt: () => pt_default,
11209
+ ro: () => ro_default,
11058
11210
  ru: () => ru_default,
11059
11211
  sl: () => sl_default,
11060
11212
  sv: () => sv_default,
@@ -12008,8 +12160,118 @@ function de_default() {
12008
12160
  };
12009
12161
  }
12010
12162
 
12011
- // ../../node_modules/zod/v4/locales/en.js
12163
+ // ../../node_modules/zod/v4/locales/el.js
12012
12164
  var error9 = () => {
12165
+ const Sizable = {
12166
+ string: { unit: "\u03C7\u03B1\u03C1\u03B1\u03BA\u03C4\u03AE\u03C1\u03B5\u03C2", verb: "\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9" },
12167
+ file: { unit: "bytes", verb: "\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9" },
12168
+ array: { unit: "\u03C3\u03C4\u03BF\u03B9\u03C7\u03B5\u03AF\u03B1", verb: "\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9" },
12169
+ set: { unit: "\u03C3\u03C4\u03BF\u03B9\u03C7\u03B5\u03AF\u03B1", verb: "\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9" },
12170
+ map: { unit: "\u03BA\u03B1\u03C4\u03B1\u03C7\u03C9\u03C1\u03AE\u03C3\u03B5\u03B9\u03C2", verb: "\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9" }
12171
+ };
12172
+ function getSizing(origin) {
12173
+ return Sizable[origin] ?? null;
12174
+ }
12175
+ const FormatDictionary = {
12176
+ regex: "\u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2",
12177
+ email: "\u03B4\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 email",
12178
+ url: "URL",
12179
+ emoji: "emoji",
12180
+ uuid: "UUID",
12181
+ uuidv4: "UUIDv4",
12182
+ uuidv6: "UUIDv6",
12183
+ nanoid: "nanoid",
12184
+ guid: "GUID",
12185
+ cuid: "cuid",
12186
+ cuid2: "cuid2",
12187
+ ulid: "ULID",
12188
+ xid: "XID",
12189
+ ksuid: "KSUID",
12190
+ datetime: "ISO \u03B7\u03BC\u03B5\u03C1\u03BF\u03BC\u03B7\u03BD\u03AF\u03B1 \u03BA\u03B1\u03B9 \u03CE\u03C1\u03B1",
12191
+ date: "ISO \u03B7\u03BC\u03B5\u03C1\u03BF\u03BC\u03B7\u03BD\u03AF\u03B1",
12192
+ time: "ISO \u03CE\u03C1\u03B1",
12193
+ duration: "ISO \u03B4\u03B9\u03AC\u03C1\u03BA\u03B5\u03B9\u03B1",
12194
+ ipv4: "\u03B4\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 IPv4",
12195
+ ipv6: "\u03B4\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 IPv6",
12196
+ mac: "\u03B4\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 MAC",
12197
+ cidrv4: "\u03B5\u03CD\u03C1\u03BF\u03C2 IPv4",
12198
+ cidrv6: "\u03B5\u03CD\u03C1\u03BF\u03C2 IPv6",
12199
+ 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",
12200
+ 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",
12201
+ json_string: "\u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC JSON",
12202
+ e164: "\u03B1\u03C1\u03B9\u03B8\u03BC\u03CC\u03C2 E.164",
12203
+ jwt: "JWT",
12204
+ template_literal: "\u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2"
12205
+ };
12206
+ const TypeDictionary = {
12207
+ nan: "NaN"
12208
+ };
12209
+ return (issue2) => {
12210
+ switch (issue2.code) {
12211
+ case "invalid_type": {
12212
+ const expected = TypeDictionary[issue2.expected] ?? issue2.expected;
12213
+ const receivedType = parsedType(issue2.input);
12214
+ const received = TypeDictionary[receivedType] ?? receivedType;
12215
+ if (typeof issue2.expected === "string" && /^[A-Z]/.test(issue2.expected)) {
12216
+ 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}`;
12217
+ }
12218
+ 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}`;
12219
+ }
12220
+ case "invalid_value":
12221
+ if (issue2.values.length === 1)
12222
+ 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])}`;
12223
+ 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, "|")}`;
12224
+ case "too_big": {
12225
+ const adj = issue2.inclusive ? "<=" : "<";
12226
+ const sizing = getSizing(issue2.origin);
12227
+ if (sizing)
12228
+ 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"}`;
12229
+ 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()}`;
12230
+ }
12231
+ case "too_small": {
12232
+ const adj = issue2.inclusive ? ">=" : ">";
12233
+ const sizing = getSizing(issue2.origin);
12234
+ if (sizing) {
12235
+ 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}`;
12236
+ }
12237
+ 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()}`;
12238
+ }
12239
+ case "invalid_format": {
12240
+ const _issue = issue2;
12241
+ if (_issue.format === "starts_with") {
12242
+ 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}"`;
12243
+ }
12244
+ if (_issue.format === "ends_with")
12245
+ 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}"`;
12246
+ if (_issue.format === "includes")
12247
+ 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}"`;
12248
+ if (_issue.format === "regex")
12249
+ 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}`;
12250
+ return `\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03BF: ${FormatDictionary[_issue.format] ?? issue2.format}`;
12251
+ }
12252
+ case "not_multiple_of":
12253
+ 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}`;
12254
+ case "unrecognized_keys":
12255
+ 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, ", ")}`;
12256
+ case "invalid_key":
12257
+ return `\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03BF \u03BA\u03BB\u03B5\u03B9\u03B4\u03AF \u03C3\u03C4\u03BF ${issue2.origin}`;
12258
+ case "invalid_union":
12259
+ return "\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2";
12260
+ case "invalid_element":
12261
+ return `\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C4\u03B9\u03BC\u03AE \u03C3\u03C4\u03BF ${issue2.origin}`;
12262
+ default:
12263
+ return `\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2`;
12264
+ }
12265
+ };
12266
+ };
12267
+ function el_default() {
12268
+ return {
12269
+ localeError: error9()
12270
+ };
12271
+ }
12272
+
12273
+ // ../../node_modules/zod/v4/locales/en.js
12274
+ var error10 = () => {
12013
12275
  const Sizable = {
12014
12276
  string: { unit: "characters", verb: "to have" },
12015
12277
  file: { unit: "bytes", verb: "to have" },
@@ -12103,6 +12365,10 @@ var error9 = () => {
12103
12365
  case "invalid_key":
12104
12366
  return `Invalid key in ${issue2.origin}`;
12105
12367
  case "invalid_union":
12368
+ if (issue2.options && Array.isArray(issue2.options) && issue2.options.length > 0) {
12369
+ const opts = issue2.options.map((o) => `'${o}'`).join(" | ");
12370
+ return `Invalid discriminator value. Expected ${opts}`;
12371
+ }
12106
12372
  return "Invalid input";
12107
12373
  case "invalid_element":
12108
12374
  return `Invalid value in ${issue2.origin}`;
@@ -12113,12 +12379,12 @@ var error9 = () => {
12113
12379
  };
12114
12380
  function en_default() {
12115
12381
  return {
12116
- localeError: error9()
12382
+ localeError: error10()
12117
12383
  };
12118
12384
  }
12119
12385
 
12120
12386
  // ../../node_modules/zod/v4/locales/eo.js
12121
- var error10 = () => {
12387
+ var error11 = () => {
12122
12388
  const Sizable = {
12123
12389
  string: { unit: "karaktrojn", verb: "havi" },
12124
12390
  file: { unit: "bajtojn", verb: "havi" },
@@ -12223,12 +12489,12 @@ var error10 = () => {
12223
12489
  };
12224
12490
  function eo_default() {
12225
12491
  return {
12226
- localeError: error10()
12492
+ localeError: error11()
12227
12493
  };
12228
12494
  }
12229
12495
 
12230
12496
  // ../../node_modules/zod/v4/locales/es.js
12231
- var error11 = () => {
12497
+ var error12 = () => {
12232
12498
  const Sizable = {
12233
12499
  string: { unit: "caracteres", verb: "tener" },
12234
12500
  file: { unit: "bytes", verb: "tener" },
@@ -12356,12 +12622,12 @@ var error11 = () => {
12356
12622
  };
12357
12623
  function es_default() {
12358
12624
  return {
12359
- localeError: error11()
12625
+ localeError: error12()
12360
12626
  };
12361
12627
  }
12362
12628
 
12363
12629
  // ../../node_modules/zod/v4/locales/fa.js
12364
- var error12 = () => {
12630
+ var error13 = () => {
12365
12631
  const Sizable = {
12366
12632
  string: { unit: "\u06A9\u0627\u0631\u0627\u06A9\u062A\u0631", verb: "\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F" },
12367
12633
  file: { unit: "\u0628\u0627\u06CC\u062A", verb: "\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F" },
@@ -12471,12 +12737,12 @@ var error12 = () => {
12471
12737
  };
12472
12738
  function fa_default() {
12473
12739
  return {
12474
- localeError: error12()
12740
+ localeError: error13()
12475
12741
  };
12476
12742
  }
12477
12743
 
12478
12744
  // ../../node_modules/zod/v4/locales/fi.js
12479
- var error13 = () => {
12745
+ var error14 = () => {
12480
12746
  const Sizable = {
12481
12747
  string: { unit: "merkki\xE4", subject: "merkkijonon" },
12482
12748
  file: { unit: "tavua", subject: "tiedoston" },
@@ -12584,12 +12850,12 @@ var error13 = () => {
12584
12850
  };
12585
12851
  function fi_default() {
12586
12852
  return {
12587
- localeError: error13()
12853
+ localeError: error14()
12588
12854
  };
12589
12855
  }
12590
12856
 
12591
12857
  // ../../node_modules/zod/v4/locales/fr.js
12592
- var error14 = () => {
12858
+ var error15 = () => {
12593
12859
  const Sizable = {
12594
12860
  string: { unit: "caract\xE8res", verb: "avoir" },
12595
12861
  file: { unit: "octets", verb: "avoir" },
@@ -12630,9 +12896,27 @@ var error14 = () => {
12630
12896
  template_literal: "entr\xE9e"
12631
12897
  };
12632
12898
  const TypeDictionary = {
12633
- nan: "NaN",
12899
+ string: "cha\xEEne",
12634
12900
  number: "nombre",
12635
- array: "tableau"
12901
+ int: "entier",
12902
+ boolean: "bool\xE9en",
12903
+ bigint: "grand entier",
12904
+ symbol: "symbole",
12905
+ undefined: "ind\xE9fini",
12906
+ null: "null",
12907
+ never: "jamais",
12908
+ void: "vide",
12909
+ date: "date",
12910
+ array: "tableau",
12911
+ object: "objet",
12912
+ tuple: "tuple",
12913
+ record: "enregistrement",
12914
+ map: "carte",
12915
+ set: "ensemble",
12916
+ file: "fichier",
12917
+ nonoptional: "non-optionnel",
12918
+ nan: "NaN",
12919
+ function: "fonction"
12636
12920
  };
12637
12921
  return (issue2) => {
12638
12922
  switch (issue2.code) {
@@ -12653,16 +12937,15 @@ var error14 = () => {
12653
12937
  const adj = issue2.inclusive ? "<=" : "<";
12654
12938
  const sizing = getSizing(issue2.origin);
12655
12939
  if (sizing)
12656
- return `Trop grand : ${issue2.origin ?? "valeur"} doit ${sizing.verb} ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "\xE9l\xE9ment(s)"}`;
12657
- return `Trop grand : ${issue2.origin ?? "valeur"} doit \xEAtre ${adj}${issue2.maximum.toString()}`;
12940
+ return `Trop grand : ${TypeDictionary[issue2.origin] ?? "valeur"} doit ${sizing.verb} ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "\xE9l\xE9ment(s)"}`;
12941
+ return `Trop grand : ${TypeDictionary[issue2.origin] ?? "valeur"} doit \xEAtre ${adj}${issue2.maximum.toString()}`;
12658
12942
  }
12659
12943
  case "too_small": {
12660
12944
  const adj = issue2.inclusive ? ">=" : ">";
12661
12945
  const sizing = getSizing(issue2.origin);
12662
- if (sizing) {
12663
- return `Trop petit : ${issue2.origin} doit ${sizing.verb} ${adj}${issue2.minimum.toString()} ${sizing.unit}`;
12664
- }
12665
- return `Trop petit : ${issue2.origin} doit \xEAtre ${adj}${issue2.minimum.toString()}`;
12946
+ if (sizing)
12947
+ return `Trop petit : ${TypeDictionary[issue2.origin] ?? "valeur"} doit ${sizing.verb} ${adj}${issue2.minimum.toString()} ${sizing.unit}`;
12948
+ return `Trop petit : ${TypeDictionary[issue2.origin] ?? "valeur"} doit \xEAtre ${adj}${issue2.minimum.toString()}`;
12666
12949
  }
12667
12950
  case "invalid_format": {
12668
12951
  const _issue = issue2;
@@ -12693,12 +12976,12 @@ var error14 = () => {
12693
12976
  };
12694
12977
  function fr_default() {
12695
12978
  return {
12696
- localeError: error14()
12979
+ localeError: error15()
12697
12980
  };
12698
12981
  }
12699
12982
 
12700
12983
  // ../../node_modules/zod/v4/locales/fr-CA.js
12701
- var error15 = () => {
12984
+ var error16 = () => {
12702
12985
  const Sizable = {
12703
12986
  string: { unit: "caract\xE8res", verb: "avoir" },
12704
12987
  file: { unit: "octets", verb: "avoir" },
@@ -12801,12 +13084,12 @@ var error15 = () => {
12801
13084
  };
12802
13085
  function fr_CA_default() {
12803
13086
  return {
12804
- localeError: error15()
13087
+ localeError: error16()
12805
13088
  };
12806
13089
  }
12807
13090
 
12808
13091
  // ../../node_modules/zod/v4/locales/he.js
12809
- var error16 = () => {
13092
+ var error17 = () => {
12810
13093
  const TypeNames = {
12811
13094
  string: { label: "\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA", gender: "f" },
12812
13095
  number: { label: "\u05DE\u05E1\u05E4\u05E8", gender: "m" },
@@ -12996,23 +13279,146 @@ var error16 = () => {
12996
13279
  };
12997
13280
  function he_default() {
12998
13281
  return {
12999
- localeError: error16()
13282
+ localeError: error17()
13000
13283
  };
13001
13284
  }
13002
13285
 
13003
- // ../../node_modules/zod/v4/locales/hu.js
13004
- var error17 = () => {
13286
+ // ../../node_modules/zod/v4/locales/hr.js
13287
+ var error18 = () => {
13005
13288
  const Sizable = {
13006
- string: { unit: "karakter", verb: "legyen" },
13007
- file: { unit: "byte", verb: "legyen" },
13008
- array: { unit: "elem", verb: "legyen" },
13009
- set: { unit: "elem", verb: "legyen" }
13289
+ string: { unit: "znakova", verb: "imati" },
13290
+ file: { unit: "bajtova", verb: "imati" },
13291
+ array: { unit: "stavki", verb: "imati" },
13292
+ set: { unit: "stavki", verb: "imati" }
13010
13293
  };
13011
13294
  function getSizing(origin) {
13012
13295
  return Sizable[origin] ?? null;
13013
13296
  }
13014
13297
  const FormatDictionary = {
13015
- regex: "bemenet",
13298
+ regex: "unos",
13299
+ email: "email adresa",
13300
+ url: "URL",
13301
+ emoji: "emoji",
13302
+ uuid: "UUID",
13303
+ uuidv4: "UUIDv4",
13304
+ uuidv6: "UUIDv6",
13305
+ nanoid: "nanoid",
13306
+ guid: "GUID",
13307
+ cuid: "cuid",
13308
+ cuid2: "cuid2",
13309
+ ulid: "ULID",
13310
+ xid: "XID",
13311
+ ksuid: "KSUID",
13312
+ datetime: "ISO datum i vrijeme",
13313
+ date: "ISO datum",
13314
+ time: "ISO vrijeme",
13315
+ duration: "ISO trajanje",
13316
+ ipv4: "IPv4 adresa",
13317
+ ipv6: "IPv6 adresa",
13318
+ cidrv4: "IPv4 raspon",
13319
+ cidrv6: "IPv6 raspon",
13320
+ base64: "base64 kodirani tekst",
13321
+ base64url: "base64url kodirani tekst",
13322
+ json_string: "JSON tekst",
13323
+ e164: "E.164 broj",
13324
+ jwt: "JWT",
13325
+ template_literal: "unos"
13326
+ };
13327
+ const TypeDictionary = {
13328
+ nan: "NaN",
13329
+ string: "tekst",
13330
+ number: "broj",
13331
+ boolean: "boolean",
13332
+ array: "niz",
13333
+ object: "objekt",
13334
+ set: "skup",
13335
+ file: "datoteka",
13336
+ date: "datum",
13337
+ bigint: "bigint",
13338
+ symbol: "simbol",
13339
+ undefined: "undefined",
13340
+ null: "null",
13341
+ function: "funkcija",
13342
+ map: "mapa"
13343
+ };
13344
+ return (issue2) => {
13345
+ switch (issue2.code) {
13346
+ case "invalid_type": {
13347
+ const expected = TypeDictionary[issue2.expected] ?? issue2.expected;
13348
+ const receivedType = parsedType(issue2.input);
13349
+ const received = TypeDictionary[receivedType] ?? receivedType;
13350
+ if (/^[A-Z]/.test(issue2.expected)) {
13351
+ return `Neispravan unos: o\u010Dekuje se instanceof ${issue2.expected}, a primljeno je ${received}`;
13352
+ }
13353
+ return `Neispravan unos: o\u010Dekuje se ${expected}, a primljeno je ${received}`;
13354
+ }
13355
+ case "invalid_value":
13356
+ if (issue2.values.length === 1)
13357
+ return `Neispravna vrijednost: o\u010Dekivano ${stringifyPrimitive(issue2.values[0])}`;
13358
+ return `Neispravna opcija: o\u010Dekivano jedno od ${joinValues(issue2.values, "|")}`;
13359
+ case "too_big": {
13360
+ const adj = issue2.inclusive ? "<=" : "<";
13361
+ const sizing = getSizing(issue2.origin);
13362
+ const origin = TypeDictionary[issue2.origin] ?? issue2.origin;
13363
+ if (sizing)
13364
+ return `Preveliko: o\u010Dekivano da ${origin ?? "vrijednost"} ima ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "elemenata"}`;
13365
+ return `Preveliko: o\u010Dekivano da ${origin ?? "vrijednost"} bude ${adj}${issue2.maximum.toString()}`;
13366
+ }
13367
+ case "too_small": {
13368
+ const adj = issue2.inclusive ? ">=" : ">";
13369
+ const sizing = getSizing(issue2.origin);
13370
+ const origin = TypeDictionary[issue2.origin] ?? issue2.origin;
13371
+ if (sizing) {
13372
+ return `Premalo: o\u010Dekivano da ${origin} ima ${adj}${issue2.minimum.toString()} ${sizing.unit}`;
13373
+ }
13374
+ return `Premalo: o\u010Dekivano da ${origin} bude ${adj}${issue2.minimum.toString()}`;
13375
+ }
13376
+ case "invalid_format": {
13377
+ const _issue = issue2;
13378
+ if (_issue.format === "starts_with")
13379
+ return `Neispravan tekst: mora zapo\u010Dinjati s "${_issue.prefix}"`;
13380
+ if (_issue.format === "ends_with")
13381
+ return `Neispravan tekst: mora zavr\u0161avati s "${_issue.suffix}"`;
13382
+ if (_issue.format === "includes")
13383
+ return `Neispravan tekst: mora sadr\u017Eavati "${_issue.includes}"`;
13384
+ if (_issue.format === "regex")
13385
+ return `Neispravan tekst: mora odgovarati uzorku ${_issue.pattern}`;
13386
+ return `Neispravna ${FormatDictionary[_issue.format] ?? issue2.format}`;
13387
+ }
13388
+ case "not_multiple_of":
13389
+ return `Neispravan broj: mora biti vi\u0161ekratnik od ${issue2.divisor}`;
13390
+ case "unrecognized_keys":
13391
+ return `Neprepoznat${issue2.keys.length > 1 ? "i klju\u010Devi" : " klju\u010D"}: ${joinValues(issue2.keys, ", ")}`;
13392
+ case "invalid_key":
13393
+ return `Neispravan klju\u010D u ${TypeDictionary[issue2.origin] ?? issue2.origin}`;
13394
+ case "invalid_union":
13395
+ return "Neispravan unos";
13396
+ case "invalid_element":
13397
+ return `Neispravna vrijednost u ${TypeDictionary[issue2.origin] ?? issue2.origin}`;
13398
+ default:
13399
+ return `Neispravan unos`;
13400
+ }
13401
+ };
13402
+ };
13403
+ function hr_default() {
13404
+ return {
13405
+ localeError: error18()
13406
+ };
13407
+ }
13408
+
13409
+ // ../../node_modules/zod/v4/locales/hu.js
13410
+ var error19 = () => {
13411
+ const Sizable = {
13412
+ string: { unit: "karakter", verb: "legyen" },
13413
+ file: { unit: "byte", verb: "legyen" },
13414
+ array: { unit: "elem", verb: "legyen" },
13415
+ set: { unit: "elem", verb: "legyen" }
13416
+ };
13417
+ function getSizing(origin) {
13418
+ return Sizable[origin] ?? null;
13419
+ }
13420
+ const FormatDictionary = {
13421
+ regex: "bemenet",
13016
13422
  email: "email c\xEDm",
13017
13423
  url: "URL",
13018
13424
  emoji: "emoji",
@@ -13105,7 +13511,7 @@ var error17 = () => {
13105
13511
  };
13106
13512
  function hu_default() {
13107
13513
  return {
13108
- localeError: error17()
13514
+ localeError: error19()
13109
13515
  };
13110
13516
  }
13111
13517
 
@@ -13120,7 +13526,7 @@ function withDefiniteArticle(word) {
13120
13526
  const lastChar = word[word.length - 1];
13121
13527
  return word + (vowels.includes(lastChar) ? "\u0576" : "\u0568");
13122
13528
  }
13123
- var error18 = () => {
13529
+ var error20 = () => {
13124
13530
  const Sizable = {
13125
13531
  string: {
13126
13532
  unit: {
@@ -13253,12 +13659,12 @@ var error18 = () => {
13253
13659
  };
13254
13660
  function hy_default() {
13255
13661
  return {
13256
- localeError: error18()
13662
+ localeError: error20()
13257
13663
  };
13258
13664
  }
13259
13665
 
13260
13666
  // ../../node_modules/zod/v4/locales/id.js
13261
- var error19 = () => {
13667
+ var error21 = () => {
13262
13668
  const Sizable = {
13263
13669
  string: { unit: "karakter", verb: "memiliki" },
13264
13670
  file: { unit: "byte", verb: "memiliki" },
@@ -13360,12 +13766,12 @@ var error19 = () => {
13360
13766
  };
13361
13767
  function id_default() {
13362
13768
  return {
13363
- localeError: error19()
13769
+ localeError: error21()
13364
13770
  };
13365
13771
  }
13366
13772
 
13367
13773
  // ../../node_modules/zod/v4/locales/is.js
13368
- var error20 = () => {
13774
+ var error22 = () => {
13369
13775
  const Sizable = {
13370
13776
  string: { unit: "stafi", verb: "a\xF0 hafa" },
13371
13777
  file: { unit: "b\xE6ti", verb: "a\xF0 hafa" },
@@ -13470,12 +13876,12 @@ var error20 = () => {
13470
13876
  };
13471
13877
  function is_default() {
13472
13878
  return {
13473
- localeError: error20()
13879
+ localeError: error22()
13474
13880
  };
13475
13881
  }
13476
13882
 
13477
13883
  // ../../node_modules/zod/v4/locales/it.js
13478
- var error21 = () => {
13884
+ var error23 = () => {
13479
13885
  const Sizable = {
13480
13886
  string: { unit: "caratteri", verb: "avere" },
13481
13887
  file: { unit: "byte", verb: "avere" },
@@ -13560,7 +13966,7 @@ var error21 = () => {
13560
13966
  return `Stringa non valida: deve includere "${_issue.includes}"`;
13561
13967
  if (_issue.format === "regex")
13562
13968
  return `Stringa non valida: deve corrispondere al pattern ${_issue.pattern}`;
13563
- return `Invalid ${FormatDictionary[_issue.format] ?? issue2.format}`;
13969
+ return `Input non valido: ${FormatDictionary[_issue.format] ?? issue2.format}`;
13564
13970
  }
13565
13971
  case "not_multiple_of":
13566
13972
  return `Numero non valido: deve essere un multiplo di ${issue2.divisor}`;
@@ -13579,12 +13985,12 @@ var error21 = () => {
13579
13985
  };
13580
13986
  function it_default() {
13581
13987
  return {
13582
- localeError: error21()
13988
+ localeError: error23()
13583
13989
  };
13584
13990
  }
13585
13991
 
13586
13992
  // ../../node_modules/zod/v4/locales/ja.js
13587
- var error22 = () => {
13993
+ var error24 = () => {
13588
13994
  const Sizable = {
13589
13995
  string: { unit: "\u6587\u5B57", verb: "\u3067\u3042\u308B" },
13590
13996
  file: { unit: "\u30D0\u30A4\u30C8", verb: "\u3067\u3042\u308B" },
@@ -13687,12 +14093,12 @@ var error22 = () => {
13687
14093
  };
13688
14094
  function ja_default() {
13689
14095
  return {
13690
- localeError: error22()
14096
+ localeError: error24()
13691
14097
  };
13692
14098
  }
13693
14099
 
13694
14100
  // ../../node_modules/zod/v4/locales/ka.js
13695
- var error23 = () => {
14101
+ var error25 = () => {
13696
14102
  const Sizable = {
13697
14103
  string: { unit: "\u10E1\u10D8\u10DB\u10D1\u10DD\u10DA\u10DD", verb: "\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1" },
13698
14104
  file: { unit: "\u10D1\u10D0\u10D8\u10E2\u10D8", verb: "\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1" },
@@ -13725,9 +14131,9 @@ var error23 = () => {
13725
14131
  ipv6: "IPv6 \u10DB\u10D8\u10E1\u10D0\u10DB\u10D0\u10E0\u10D7\u10D8",
13726
14132
  cidrv4: "IPv4 \u10D3\u10D8\u10D0\u10DE\u10D0\u10D6\u10DD\u10DC\u10D8",
13727
14133
  cidrv6: "IPv6 \u10D3\u10D8\u10D0\u10DE\u10D0\u10D6\u10DD\u10DC\u10D8",
13728
- base64: "base64-\u10D9\u10DD\u10D3\u10D8\u10E0\u10D4\u10D1\u10E3\u10DA\u10D8 \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8",
13729
- base64url: "base64url-\u10D9\u10DD\u10D3\u10D8\u10E0\u10D4\u10D1\u10E3\u10DA\u10D8 \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8",
13730
- json_string: "JSON \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8",
14134
+ base64: "base64-\u10D9\u10DD\u10D3\u10D8\u10E0\u10D4\u10D1\u10E3\u10DA\u10D8 \u10D5\u10D4\u10DA\u10D8",
14135
+ base64url: "base64url-\u10D9\u10DD\u10D3\u10D8\u10E0\u10D4\u10D1\u10E3\u10DA\u10D8 \u10D5\u10D4\u10DA\u10D8",
14136
+ json_string: "JSON \u10D5\u10D4\u10DA\u10D8",
13731
14137
  e164: "E.164 \u10DC\u10DD\u10DB\u10D4\u10E0\u10D8",
13732
14138
  jwt: "JWT",
13733
14139
  template_literal: "\u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0"
@@ -13735,7 +14141,7 @@ var error23 = () => {
13735
14141
  const TypeDictionary = {
13736
14142
  nan: "NaN",
13737
14143
  number: "\u10E0\u10D8\u10EA\u10EE\u10D5\u10D8",
13738
- string: "\u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8",
14144
+ string: "\u10D5\u10D4\u10DA\u10D8",
13739
14145
  boolean: "\u10D1\u10E3\u10DA\u10D4\u10D0\u10DC\u10D8",
13740
14146
  function: "\u10E4\u10E3\u10DC\u10E5\u10EA\u10D8\u10D0",
13741
14147
  array: "\u10DB\u10D0\u10E1\u10D8\u10D5\u10D8"
@@ -13773,14 +14179,14 @@ var error23 = () => {
13773
14179
  case "invalid_format": {
13774
14180
  const _issue = issue2;
13775
14181
  if (_issue.format === "starts_with") {
13776
- 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`;
14182
+ 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`;
13777
14183
  }
13778
14184
  if (_issue.format === "ends_with")
13779
- 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`;
14185
+ 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`;
13780
14186
  if (_issue.format === "includes")
13781
- 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`;
14187
+ 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`;
13782
14188
  if (_issue.format === "regex")
13783
- 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}`;
14189
+ 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}`;
13784
14190
  return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 ${FormatDictionary[_issue.format] ?? issue2.format}`;
13785
14191
  }
13786
14192
  case "not_multiple_of":
@@ -13800,12 +14206,12 @@ var error23 = () => {
13800
14206
  };
13801
14207
  function ka_default() {
13802
14208
  return {
13803
- localeError: error23()
14209
+ localeError: error25()
13804
14210
  };
13805
14211
  }
13806
14212
 
13807
14213
  // ../../node_modules/zod/v4/locales/km.js
13808
- var error24 = () => {
14214
+ var error26 = () => {
13809
14215
  const Sizable = {
13810
14216
  string: { unit: "\u178F\u17BD\u17A2\u1780\u17D2\u179F\u179A", verb: "\u1782\u17BD\u179A\u1798\u17B6\u1793" },
13811
14217
  file: { unit: "\u1794\u17C3", verb: "\u1782\u17BD\u179A\u1798\u17B6\u1793" },
@@ -13911,7 +14317,7 @@ var error24 = () => {
13911
14317
  };
13912
14318
  function km_default() {
13913
14319
  return {
13914
- localeError: error24()
14320
+ localeError: error26()
13915
14321
  };
13916
14322
  }
13917
14323
 
@@ -13921,7 +14327,7 @@ function kh_default() {
13921
14327
  }
13922
14328
 
13923
14329
  // ../../node_modules/zod/v4/locales/ko.js
13924
- var error25 = () => {
14330
+ var error27 = () => {
13925
14331
  const Sizable = {
13926
14332
  string: { unit: "\uBB38\uC790", verb: "to have" },
13927
14333
  file: { unit: "\uBC14\uC774\uD2B8", verb: "to have" },
@@ -14028,7 +14434,7 @@ var error25 = () => {
14028
14434
  };
14029
14435
  function ko_default() {
14030
14436
  return {
14031
- localeError: error25()
14437
+ localeError: error27()
14032
14438
  };
14033
14439
  }
14034
14440
 
@@ -14046,7 +14452,7 @@ function getUnitTypeFromNumber(number4) {
14046
14452
  return "one";
14047
14453
  return "few";
14048
14454
  }
14049
- var error26 = () => {
14455
+ var error28 = () => {
14050
14456
  const Sizable = {
14051
14457
  string: {
14052
14458
  unit: {
@@ -14232,12 +14638,12 @@ var error26 = () => {
14232
14638
  };
14233
14639
  function lt_default() {
14234
14640
  return {
14235
- localeError: error26()
14641
+ localeError: error28()
14236
14642
  };
14237
14643
  }
14238
14644
 
14239
14645
  // ../../node_modules/zod/v4/locales/mk.js
14240
- var error27 = () => {
14646
+ var error29 = () => {
14241
14647
  const Sizable = {
14242
14648
  string: { unit: "\u0437\u043D\u0430\u0446\u0438", verb: "\u0434\u0430 \u0438\u043C\u0430\u0430\u0442" },
14243
14649
  file: { unit: "\u0431\u0430\u0458\u0442\u0438", verb: "\u0434\u0430 \u0438\u043C\u0430\u0430\u0442" },
@@ -14342,12 +14748,12 @@ var error27 = () => {
14342
14748
  };
14343
14749
  function mk_default() {
14344
14750
  return {
14345
- localeError: error27()
14751
+ localeError: error29()
14346
14752
  };
14347
14753
  }
14348
14754
 
14349
14755
  // ../../node_modules/zod/v4/locales/ms.js
14350
- var error28 = () => {
14756
+ var error30 = () => {
14351
14757
  const Sizable = {
14352
14758
  string: { unit: "aksara", verb: "mempunyai" },
14353
14759
  file: { unit: "bait", verb: "mempunyai" },
@@ -14450,12 +14856,12 @@ var error28 = () => {
14450
14856
  };
14451
14857
  function ms_default() {
14452
14858
  return {
14453
- localeError: error28()
14859
+ localeError: error30()
14454
14860
  };
14455
14861
  }
14456
14862
 
14457
14863
  // ../../node_modules/zod/v4/locales/nl.js
14458
- var error29 = () => {
14864
+ var error31 = () => {
14459
14865
  const Sizable = {
14460
14866
  string: { unit: "tekens", verb: "heeft" },
14461
14867
  file: { unit: "bytes", verb: "heeft" },
@@ -14561,12 +14967,12 @@ var error29 = () => {
14561
14967
  };
14562
14968
  function nl_default() {
14563
14969
  return {
14564
- localeError: error29()
14970
+ localeError: error31()
14565
14971
  };
14566
14972
  }
14567
14973
 
14568
14974
  // ../../node_modules/zod/v4/locales/no.js
14569
- var error30 = () => {
14975
+ var error32 = () => {
14570
14976
  const Sizable = {
14571
14977
  string: { unit: "tegn", verb: "\xE5 ha" },
14572
14978
  file: { unit: "bytes", verb: "\xE5 ha" },
@@ -14670,12 +15076,12 @@ var error30 = () => {
14670
15076
  };
14671
15077
  function no_default() {
14672
15078
  return {
14673
- localeError: error30()
15079
+ localeError: error32()
14674
15080
  };
14675
15081
  }
14676
15082
 
14677
15083
  // ../../node_modules/zod/v4/locales/ota.js
14678
- var error31 = () => {
15084
+ var error33 = () => {
14679
15085
  const Sizable = {
14680
15086
  string: { unit: "harf", verb: "olmal\u0131d\u0131r" },
14681
15087
  file: { unit: "bayt", verb: "olmal\u0131d\u0131r" },
@@ -14780,12 +15186,12 @@ var error31 = () => {
14780
15186
  };
14781
15187
  function ota_default() {
14782
15188
  return {
14783
- localeError: error31()
15189
+ localeError: error33()
14784
15190
  };
14785
15191
  }
14786
15192
 
14787
15193
  // ../../node_modules/zod/v4/locales/ps.js
14788
- var error32 = () => {
15194
+ var error34 = () => {
14789
15195
  const Sizable = {
14790
15196
  string: { unit: "\u062A\u0648\u06A9\u064A", verb: "\u0648\u0644\u0631\u064A" },
14791
15197
  file: { unit: "\u0628\u0627\u06CC\u067C\u0633", verb: "\u0648\u0644\u0631\u064A" },
@@ -14895,12 +15301,12 @@ var error32 = () => {
14895
15301
  };
14896
15302
  function ps_default() {
14897
15303
  return {
14898
- localeError: error32()
15304
+ localeError: error34()
14899
15305
  };
14900
15306
  }
14901
15307
 
14902
15308
  // ../../node_modules/zod/v4/locales/pl.js
14903
- var error33 = () => {
15309
+ var error35 = () => {
14904
15310
  const Sizable = {
14905
15311
  string: { unit: "znak\xF3w", verb: "mie\u0107" },
14906
15312
  file: { unit: "bajt\xF3w", verb: "mie\u0107" },
@@ -15005,12 +15411,12 @@ var error33 = () => {
15005
15411
  };
15006
15412
  function pl_default() {
15007
15413
  return {
15008
- localeError: error33()
15414
+ localeError: error35()
15009
15415
  };
15010
15416
  }
15011
15417
 
15012
15418
  // ../../node_modules/zod/v4/locales/pt.js
15013
- var error34 = () => {
15419
+ var error36 = () => {
15014
15420
  const Sizable = {
15015
15421
  string: { unit: "caracteres", verb: "ter" },
15016
15422
  file: { unit: "bytes", verb: "ter" },
@@ -15114,7 +15520,127 @@ var error34 = () => {
15114
15520
  };
15115
15521
  function pt_default() {
15116
15522
  return {
15117
- localeError: error34()
15523
+ localeError: error36()
15524
+ };
15525
+ }
15526
+
15527
+ // ../../node_modules/zod/v4/locales/ro.js
15528
+ var error37 = () => {
15529
+ const Sizable = {
15530
+ string: { unit: "caractere", verb: "s\u0103 aib\u0103" },
15531
+ file: { unit: "octe\u021Bi", verb: "s\u0103 aib\u0103" },
15532
+ array: { unit: "elemente", verb: "s\u0103 aib\u0103" },
15533
+ set: { unit: "elemente", verb: "s\u0103 aib\u0103" },
15534
+ map: { unit: "intr\u0103ri", verb: "s\u0103 aib\u0103" }
15535
+ };
15536
+ function getSizing(origin) {
15537
+ return Sizable[origin] ?? null;
15538
+ }
15539
+ const FormatDictionary = {
15540
+ regex: "intrare",
15541
+ email: "adres\u0103 de email",
15542
+ url: "URL",
15543
+ emoji: "emoji",
15544
+ uuid: "UUID",
15545
+ uuidv4: "UUIDv4",
15546
+ uuidv6: "UUIDv6",
15547
+ nanoid: "nanoid",
15548
+ guid: "GUID",
15549
+ cuid: "cuid",
15550
+ cuid2: "cuid2",
15551
+ ulid: "ULID",
15552
+ xid: "XID",
15553
+ ksuid: "KSUID",
15554
+ datetime: "dat\u0103 \u0219i or\u0103 ISO",
15555
+ date: "dat\u0103 ISO",
15556
+ time: "or\u0103 ISO",
15557
+ duration: "durat\u0103 ISO",
15558
+ ipv4: "adres\u0103 IPv4",
15559
+ ipv6: "adres\u0103 IPv6",
15560
+ mac: "adres\u0103 MAC",
15561
+ cidrv4: "interval IPv4",
15562
+ cidrv6: "interval IPv6",
15563
+ base64: "\u0219ir codat base64",
15564
+ base64url: "\u0219ir codat base64url",
15565
+ json_string: "\u0219ir JSON",
15566
+ e164: "num\u0103r E.164",
15567
+ jwt: "JWT",
15568
+ template_literal: "intrare"
15569
+ };
15570
+ const TypeDictionary = {
15571
+ nan: "NaN",
15572
+ string: "\u0219ir",
15573
+ number: "num\u0103r",
15574
+ boolean: "boolean",
15575
+ function: "func\u021Bie",
15576
+ array: "matrice",
15577
+ object: "obiect",
15578
+ undefined: "nedefinit",
15579
+ symbol: "simbol",
15580
+ bigint: "num\u0103r mare",
15581
+ void: "void",
15582
+ never: "never",
15583
+ map: "hart\u0103",
15584
+ set: "set"
15585
+ };
15586
+ return (issue2) => {
15587
+ switch (issue2.code) {
15588
+ case "invalid_type": {
15589
+ const expected = TypeDictionary[issue2.expected] ?? issue2.expected;
15590
+ const receivedType = parsedType(issue2.input);
15591
+ const received = TypeDictionary[receivedType] ?? receivedType;
15592
+ return `Intrare invalid\u0103: a\u0219teptat ${expected}, primit ${received}`;
15593
+ }
15594
+ case "invalid_value":
15595
+ if (issue2.values.length === 1)
15596
+ return `Intrare invalid\u0103: a\u0219teptat ${stringifyPrimitive(issue2.values[0])}`;
15597
+ return `Op\u021Biune invalid\u0103: a\u0219teptat una dintre ${joinValues(issue2.values, "|")}`;
15598
+ case "too_big": {
15599
+ const adj = issue2.inclusive ? "<=" : "<";
15600
+ const sizing = getSizing(issue2.origin);
15601
+ if (sizing)
15602
+ return `Prea mare: a\u0219teptat ca ${issue2.origin ?? "valoarea"} ${sizing.verb} ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "elemente"}`;
15603
+ return `Prea mare: a\u0219teptat ca ${issue2.origin ?? "valoarea"} s\u0103 fie ${adj}${issue2.maximum.toString()}`;
15604
+ }
15605
+ case "too_small": {
15606
+ const adj = issue2.inclusive ? ">=" : ">";
15607
+ const sizing = getSizing(issue2.origin);
15608
+ if (sizing) {
15609
+ return `Prea mic: a\u0219teptat ca ${issue2.origin} ${sizing.verb} ${adj}${issue2.minimum.toString()} ${sizing.unit}`;
15610
+ }
15611
+ return `Prea mic: a\u0219teptat ca ${issue2.origin} s\u0103 fie ${adj}${issue2.minimum.toString()}`;
15612
+ }
15613
+ case "invalid_format": {
15614
+ const _issue = issue2;
15615
+ if (_issue.format === "starts_with") {
15616
+ return `\u0218ir invalid: trebuie s\u0103 \xEEnceap\u0103 cu "${_issue.prefix}"`;
15617
+ }
15618
+ if (_issue.format === "ends_with")
15619
+ return `\u0218ir invalid: trebuie s\u0103 se termine cu "${_issue.suffix}"`;
15620
+ if (_issue.format === "includes")
15621
+ return `\u0218ir invalid: trebuie s\u0103 includ\u0103 "${_issue.includes}"`;
15622
+ if (_issue.format === "regex")
15623
+ return `\u0218ir invalid: trebuie s\u0103 se potriveasc\u0103 cu modelul ${_issue.pattern}`;
15624
+ return `Format invalid: ${FormatDictionary[_issue.format] ?? issue2.format}`;
15625
+ }
15626
+ case "not_multiple_of":
15627
+ return `Num\u0103r invalid: trebuie s\u0103 fie multiplu de ${issue2.divisor}`;
15628
+ case "unrecognized_keys":
15629
+ return `Chei nerecunoscute: ${joinValues(issue2.keys, ", ")}`;
15630
+ case "invalid_key":
15631
+ return `Cheie invalid\u0103 \xEEn ${issue2.origin}`;
15632
+ case "invalid_union":
15633
+ return "Intrare invalid\u0103";
15634
+ case "invalid_element":
15635
+ return `Valoare invalid\u0103 \xEEn ${issue2.origin}`;
15636
+ default:
15637
+ return `Intrare invalid\u0103`;
15638
+ }
15639
+ };
15640
+ };
15641
+ function ro_default() {
15642
+ return {
15643
+ localeError: error37()
15118
15644
  };
15119
15645
  }
15120
15646
 
@@ -15134,7 +15660,7 @@ function getRussianPlural(count, one, few, many) {
15134
15660
  }
15135
15661
  return many;
15136
15662
  }
15137
- var error35 = () => {
15663
+ var error38 = () => {
15138
15664
  const Sizable = {
15139
15665
  string: {
15140
15666
  unit: {
@@ -15271,12 +15797,12 @@ var error35 = () => {
15271
15797
  };
15272
15798
  function ru_default() {
15273
15799
  return {
15274
- localeError: error35()
15800
+ localeError: error38()
15275
15801
  };
15276
15802
  }
15277
15803
 
15278
15804
  // ../../node_modules/zod/v4/locales/sl.js
15279
- var error36 = () => {
15805
+ var error39 = () => {
15280
15806
  const Sizable = {
15281
15807
  string: { unit: "znakov", verb: "imeti" },
15282
15808
  file: { unit: "bajtov", verb: "imeti" },
@@ -15381,12 +15907,12 @@ var error36 = () => {
15381
15907
  };
15382
15908
  function sl_default() {
15383
15909
  return {
15384
- localeError: error36()
15910
+ localeError: error39()
15385
15911
  };
15386
15912
  }
15387
15913
 
15388
15914
  // ../../node_modules/zod/v4/locales/sv.js
15389
- var error37 = () => {
15915
+ var error40 = () => {
15390
15916
  const Sizable = {
15391
15917
  string: { unit: "tecken", verb: "att ha" },
15392
15918
  file: { unit: "bytes", verb: "att ha" },
@@ -15492,12 +16018,12 @@ var error37 = () => {
15492
16018
  };
15493
16019
  function sv_default() {
15494
16020
  return {
15495
- localeError: error37()
16021
+ localeError: error40()
15496
16022
  };
15497
16023
  }
15498
16024
 
15499
16025
  // ../../node_modules/zod/v4/locales/ta.js
15500
- var error38 = () => {
16026
+ var error41 = () => {
15501
16027
  const Sizable = {
15502
16028
  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" },
15503
16029
  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" },
@@ -15603,12 +16129,12 @@ var error38 = () => {
15603
16129
  };
15604
16130
  function ta_default() {
15605
16131
  return {
15606
- localeError: error38()
16132
+ localeError: error41()
15607
16133
  };
15608
16134
  }
15609
16135
 
15610
16136
  // ../../node_modules/zod/v4/locales/th.js
15611
- var error39 = () => {
16137
+ var error42 = () => {
15612
16138
  const Sizable = {
15613
16139
  string: { unit: "\u0E15\u0E31\u0E27\u0E2D\u0E31\u0E01\u0E29\u0E23", verb: "\u0E04\u0E27\u0E23\u0E21\u0E35" },
15614
16140
  file: { unit: "\u0E44\u0E1A\u0E15\u0E4C", verb: "\u0E04\u0E27\u0E23\u0E21\u0E35" },
@@ -15714,12 +16240,12 @@ var error39 = () => {
15714
16240
  };
15715
16241
  function th_default() {
15716
16242
  return {
15717
- localeError: error39()
16243
+ localeError: error42()
15718
16244
  };
15719
16245
  }
15720
16246
 
15721
16247
  // ../../node_modules/zod/v4/locales/tr.js
15722
- var error40 = () => {
16248
+ var error43 = () => {
15723
16249
  const Sizable = {
15724
16250
  string: { unit: "karakter", verb: "olmal\u0131" },
15725
16251
  file: { unit: "bayt", verb: "olmal\u0131" },
@@ -15820,12 +16346,12 @@ var error40 = () => {
15820
16346
  };
15821
16347
  function tr_default() {
15822
16348
  return {
15823
- localeError: error40()
16349
+ localeError: error43()
15824
16350
  };
15825
16351
  }
15826
16352
 
15827
16353
  // ../../node_modules/zod/v4/locales/uk.js
15828
- var error41 = () => {
16354
+ var error44 = () => {
15829
16355
  const Sizable = {
15830
16356
  string: { unit: "\u0441\u0438\u043C\u0432\u043E\u043B\u0456\u0432", verb: "\u043C\u0430\u0442\u0438\u043C\u0435" },
15831
16357
  file: { unit: "\u0431\u0430\u0439\u0442\u0456\u0432", verb: "\u043C\u0430\u0442\u0438\u043C\u0435" },
@@ -15929,7 +16455,7 @@ var error41 = () => {
15929
16455
  };
15930
16456
  function uk_default() {
15931
16457
  return {
15932
- localeError: error41()
16458
+ localeError: error44()
15933
16459
  };
15934
16460
  }
15935
16461
 
@@ -15939,7 +16465,7 @@ function ua_default() {
15939
16465
  }
15940
16466
 
15941
16467
  // ../../node_modules/zod/v4/locales/ur.js
15942
- var error42 = () => {
16468
+ var error45 = () => {
15943
16469
  const Sizable = {
15944
16470
  string: { unit: "\u062D\u0631\u0648\u0641", verb: "\u06C1\u0648\u0646\u0627" },
15945
16471
  file: { unit: "\u0628\u0627\u0626\u0679\u0633", verb: "\u06C1\u0648\u0646\u0627" },
@@ -16045,17 +16571,18 @@ var error42 = () => {
16045
16571
  };
16046
16572
  function ur_default() {
16047
16573
  return {
16048
- localeError: error42()
16574
+ localeError: error45()
16049
16575
  };
16050
16576
  }
16051
16577
 
16052
16578
  // ../../node_modules/zod/v4/locales/uz.js
16053
- var error43 = () => {
16579
+ var error46 = () => {
16054
16580
  const Sizable = {
16055
16581
  string: { unit: "belgi", verb: "bo\u2018lishi kerak" },
16056
16582
  file: { unit: "bayt", verb: "bo\u2018lishi kerak" },
16057
16583
  array: { unit: "element", verb: "bo\u2018lishi kerak" },
16058
- set: { unit: "element", verb: "bo\u2018lishi kerak" }
16584
+ set: { unit: "element", verb: "bo\u2018lishi kerak" },
16585
+ map: { unit: "yozuv", verb: "bo\u2018lishi kerak" }
16059
16586
  };
16060
16587
  function getSizing(origin) {
16061
16588
  return Sizable[origin] ?? null;
@@ -16155,12 +16682,12 @@ var error43 = () => {
16155
16682
  };
16156
16683
  function uz_default() {
16157
16684
  return {
16158
- localeError: error43()
16685
+ localeError: error46()
16159
16686
  };
16160
16687
  }
16161
16688
 
16162
16689
  // ../../node_modules/zod/v4/locales/vi.js
16163
- var error44 = () => {
16690
+ var error47 = () => {
16164
16691
  const Sizable = {
16165
16692
  string: { unit: "k\xFD t\u1EF1", verb: "c\xF3" },
16166
16693
  file: { unit: "byte", verb: "c\xF3" },
@@ -16264,12 +16791,12 @@ var error44 = () => {
16264
16791
  };
16265
16792
  function vi_default() {
16266
16793
  return {
16267
- localeError: error44()
16794
+ localeError: error47()
16268
16795
  };
16269
16796
  }
16270
16797
 
16271
16798
  // ../../node_modules/zod/v4/locales/zh-CN.js
16272
- var error45 = () => {
16799
+ var error48 = () => {
16273
16800
  const Sizable = {
16274
16801
  string: { unit: "\u5B57\u7B26", verb: "\u5305\u542B" },
16275
16802
  file: { unit: "\u5B57\u8282", verb: "\u5305\u542B" },
@@ -16374,12 +16901,12 @@ var error45 = () => {
16374
16901
  };
16375
16902
  function zh_CN_default() {
16376
16903
  return {
16377
- localeError: error45()
16904
+ localeError: error48()
16378
16905
  };
16379
16906
  }
16380
16907
 
16381
16908
  // ../../node_modules/zod/v4/locales/zh-TW.js
16382
- var error46 = () => {
16909
+ var error49 = () => {
16383
16910
  const Sizable = {
16384
16911
  string: { unit: "\u5B57\u5143", verb: "\u64C1\u6709" },
16385
16912
  file: { unit: "\u4F4D\u5143\u7D44", verb: "\u64C1\u6709" },
@@ -16482,12 +17009,12 @@ var error46 = () => {
16482
17009
  };
16483
17010
  function zh_TW_default() {
16484
17011
  return {
16485
- localeError: error46()
17012
+ localeError: error49()
16486
17013
  };
16487
17014
  }
16488
17015
 
16489
17016
  // ../../node_modules/zod/v4/locales/yo.js
16490
- var error47 = () => {
17017
+ var error50 = () => {
16491
17018
  const Sizable = {
16492
17019
  string: { unit: "\xE0mi", verb: "n\xED" },
16493
17020
  file: { unit: "bytes", verb: "n\xED" },
@@ -16590,12 +17117,12 @@ var error47 = () => {
16590
17117
  };
16591
17118
  function yo_default() {
16592
17119
  return {
16593
- localeError: error47()
17120
+ localeError: error50()
16594
17121
  };
16595
17122
  }
16596
17123
 
16597
17124
  // ../../node_modules/zod/v4/core/registries.js
16598
- var _a;
17125
+ var _a2;
16599
17126
  var $output = /* @__PURE__ */ Symbol("ZodOutput");
16600
17127
  var $input = /* @__PURE__ */ Symbol("ZodInput");
16601
17128
  var $ZodRegistry = class {
@@ -16641,7 +17168,7 @@ var $ZodRegistry = class {
16641
17168
  function registry() {
16642
17169
  return new $ZodRegistry();
16643
17170
  }
16644
- (_a = globalThis).__zod_globalRegistry ?? (_a.__zod_globalRegistry = registry());
17171
+ (_a2 = globalThis).__zod_globalRegistry ?? (_a2.__zod_globalRegistry = registry());
16645
17172
  var globalRegistry = globalThis.__zod_globalRegistry;
16646
17173
 
16647
17174
  // ../../node_modules/zod/v4/core/api.js
@@ -17559,7 +18086,7 @@ function _refine(Class2, fn, _params) {
17559
18086
  return schema;
17560
18087
  }
17561
18088
  // @__NO_SIDE_EFFECTS__
17562
- function _superRefine(fn) {
18089
+ function _superRefine(fn, params) {
17563
18090
  const ch = /* @__PURE__ */ _check((payload) => {
17564
18091
  payload.addIssue = (issue2) => {
17565
18092
  if (typeof issue2 === "string") {
@@ -17576,7 +18103,7 @@ function _superRefine(fn) {
17576
18103
  }
17577
18104
  };
17578
18105
  return fn(payload.value, payload);
17579
- });
18106
+ }, params);
17580
18107
  return ch;
17581
18108
  }
17582
18109
  // @__NO_SIDE_EFFECTS__
@@ -17706,7 +18233,7 @@ function initializeContext(params) {
17706
18233
  };
17707
18234
  }
17708
18235
  function process2(schema, ctx, _params = { path: [], schemaPath: [] }) {
17709
- var _a2;
18236
+ var _a3;
17710
18237
  const def = schema._zod.def;
17711
18238
  const seen = ctx.seen.get(schema);
17712
18239
  if (seen) {
@@ -17753,8 +18280,8 @@ function process2(schema, ctx, _params = { path: [], schemaPath: [] }) {
17753
18280
  delete result.schema.examples;
17754
18281
  delete result.schema.default;
17755
18282
  }
17756
- if (ctx.io === "input" && result.schema._prefault)
17757
- (_a2 = result.schema).default ?? (_a2.default = result.schema._prefault);
18283
+ if (ctx.io === "input" && "_prefault" in result.schema)
18284
+ (_a3 = result.schema).default ?? (_a3.default = result.schema._prefault);
17758
18285
  delete result.schema._prefault;
17759
18286
  const _result = ctx.seen.get(schema);
17760
18287
  return _result.schema;
@@ -17935,10 +18462,15 @@ function finalize(ctx, schema) {
17935
18462
  result.$id = ctx.external.uri(id);
17936
18463
  }
17937
18464
  Object.assign(result, root.def ?? root.schema);
18465
+ const rootMetaId = ctx.metadataRegistry.get(schema)?.id;
18466
+ if (rootMetaId !== void 0 && result.id === rootMetaId)
18467
+ delete result.id;
17938
18468
  const defs = ctx.external?.defs ?? {};
17939
18469
  for (const entry of ctx.seen.entries()) {
17940
18470
  const seen = entry[1];
17941
18471
  if (seen.def && seen.defId) {
18472
+ if (seen.def.id === seen.defId)
18473
+ delete seen.def.id;
17942
18474
  defs[seen.defId] = seen.def;
17943
18475
  }
17944
18476
  }
@@ -17994,6 +18526,8 @@ function isTransforming(_schema, _ctx) {
17994
18526
  return isTransforming(def.keyType, ctx) || isTransforming(def.valueType, ctx);
17995
18527
  }
17996
18528
  if (def.type === "pipe") {
18529
+ if (_schema._zod.traits.has("$ZodCodec"))
18530
+ return true;
17997
18531
  return isTransforming(def.in, ctx) || isTransforming(def.out, ctx);
17998
18532
  }
17999
18533
  if (def.type === "object") {
@@ -18083,39 +18617,28 @@ var numberProcessor = (schema, ctx, _json, _params) => {
18083
18617
  json2.type = "integer";
18084
18618
  else
18085
18619
  json2.type = "number";
18086
- if (typeof exclusiveMinimum === "number") {
18087
- if (ctx.target === "draft-04" || ctx.target === "openapi-3.0") {
18620
+ const exMin = typeof exclusiveMinimum === "number" && exclusiveMinimum >= (minimum ?? Number.NEGATIVE_INFINITY);
18621
+ const exMax = typeof exclusiveMaximum === "number" && exclusiveMaximum <= (maximum ?? Number.POSITIVE_INFINITY);
18622
+ const legacy = ctx.target === "draft-04" || ctx.target === "openapi-3.0";
18623
+ if (exMin) {
18624
+ if (legacy) {
18088
18625
  json2.minimum = exclusiveMinimum;
18089
18626
  json2.exclusiveMinimum = true;
18090
18627
  } else {
18091
18628
  json2.exclusiveMinimum = exclusiveMinimum;
18092
18629
  }
18093
- }
18094
- if (typeof minimum === "number") {
18630
+ } else if (typeof minimum === "number") {
18095
18631
  json2.minimum = minimum;
18096
- if (typeof exclusiveMinimum === "number" && ctx.target !== "draft-04") {
18097
- if (exclusiveMinimum >= minimum)
18098
- delete json2.minimum;
18099
- else
18100
- delete json2.exclusiveMinimum;
18101
- }
18102
18632
  }
18103
- if (typeof exclusiveMaximum === "number") {
18104
- if (ctx.target === "draft-04" || ctx.target === "openapi-3.0") {
18633
+ if (exMax) {
18634
+ if (legacy) {
18105
18635
  json2.maximum = exclusiveMaximum;
18106
18636
  json2.exclusiveMaximum = true;
18107
18637
  } else {
18108
18638
  json2.exclusiveMaximum = exclusiveMaximum;
18109
18639
  }
18110
- }
18111
- if (typeof maximum === "number") {
18640
+ } else if (typeof maximum === "number") {
18112
18641
  json2.maximum = maximum;
18113
- if (typeof exclusiveMaximum === "number" && ctx.target !== "draft-04") {
18114
- if (exclusiveMaximum <= maximum)
18115
- delete json2.maximum;
18116
- else
18117
- delete json2.exclusiveMaximum;
18118
- }
18119
18642
  }
18120
18643
  if (typeof multipleOf === "number")
18121
18644
  json2.multipleOf = multipleOf;
@@ -18287,7 +18810,10 @@ var arrayProcessor = (schema, ctx, _json, params) => {
18287
18810
  if (typeof maximum === "number")
18288
18811
  json2.maxItems = maximum;
18289
18812
  json2.type = "array";
18290
- json2.items = process2(def.element, ctx, { ...params, path: [...params.path, "items"] });
18813
+ json2.items = process2(def.element, ctx, {
18814
+ ...params,
18815
+ path: [...params.path, "items"]
18816
+ });
18291
18817
  };
18292
18818
  var objectProcessor = (schema, ctx, _json, params) => {
18293
18819
  const json2 = _json;
@@ -18480,7 +19006,8 @@ var catchProcessor = (schema, ctx, json2, params) => {
18480
19006
  };
18481
19007
  var pipeProcessor = (schema, ctx, _json, params) => {
18482
19008
  const def = schema._zod.def;
18483
- const innerType = ctx.io === "input" ? def.in._zod.def.type === "transform" ? def.out : def.in : def.out;
19009
+ const inIsTransform = def.in._zod.traits.has("$ZodTransform");
19010
+ const innerType = ctx.io === "input" ? inIsTransform ? def.out : def.in : def.out;
18484
19011
  process2(innerType, ctx, params);
18485
19012
  const seen = ctx.seen.get(schema);
18486
19013
  seen.ref = innerType;
@@ -18714,6 +19241,7 @@ __export(schemas_exports2, {
18714
19241
  ZodOptional: () => ZodOptional,
18715
19242
  ZodPipe: () => ZodPipe,
18716
19243
  ZodPrefault: () => ZodPrefault,
19244
+ ZodPreprocess: () => ZodPreprocess,
18717
19245
  ZodPromise: () => ZodPromise,
18718
19246
  ZodReadonly: () => ZodReadonly,
18719
19247
  ZodRecord: () => ZodRecord,
@@ -18774,6 +19302,7 @@ __export(schemas_exports2, {
18774
19302
  int32: () => int32,
18775
19303
  int64: () => int64,
18776
19304
  intersection: () => intersection,
19305
+ invertCodec: () => invertCodec,
18777
19306
  ipv4: () => ipv42,
18778
19307
  ipv6: () => ipv62,
18779
19308
  json: () => json,
@@ -18943,8 +19472,8 @@ var initializer2 = (inst, issues) => {
18943
19472
  }
18944
19473
  });
18945
19474
  };
18946
- var ZodError = $constructor("ZodError", initializer2);
18947
- var ZodRealError = $constructor("ZodError", initializer2, {
19475
+ var ZodError = /* @__PURE__ */ $constructor("ZodError", initializer2);
19476
+ var ZodRealError = /* @__PURE__ */ $constructor("ZodError", initializer2, {
18948
19477
  Parent: Error
18949
19478
  });
18950
19479
 
@@ -18963,6 +19492,43 @@ var safeEncodeAsync2 = /* @__PURE__ */ _safeEncodeAsync(ZodRealError);
18963
19492
  var safeDecodeAsync2 = /* @__PURE__ */ _safeDecodeAsync(ZodRealError);
18964
19493
 
18965
19494
  // ../../node_modules/zod/v4/classic/schemas.js
19495
+ var _installedGroups = /* @__PURE__ */ new WeakMap();
19496
+ function _installLazyMethods(inst, group, methods) {
19497
+ const proto = Object.getPrototypeOf(inst);
19498
+ let installed = _installedGroups.get(proto);
19499
+ if (!installed) {
19500
+ installed = /* @__PURE__ */ new Set();
19501
+ _installedGroups.set(proto, installed);
19502
+ }
19503
+ if (installed.has(group))
19504
+ return;
19505
+ installed.add(group);
19506
+ for (const key in methods) {
19507
+ const fn = methods[key];
19508
+ Object.defineProperty(proto, key, {
19509
+ configurable: true,
19510
+ enumerable: false,
19511
+ get() {
19512
+ const bound = fn.bind(this);
19513
+ Object.defineProperty(this, key, {
19514
+ configurable: true,
19515
+ writable: true,
19516
+ enumerable: true,
19517
+ value: bound
19518
+ });
19519
+ return bound;
19520
+ },
19521
+ set(v) {
19522
+ Object.defineProperty(this, key, {
19523
+ configurable: true,
19524
+ writable: true,
19525
+ enumerable: true,
19526
+ value: v
19527
+ });
19528
+ }
19529
+ });
19530
+ }
19531
+ }
18966
19532
  var ZodType = /* @__PURE__ */ $constructor("ZodType", (inst, def) => {
18967
19533
  $ZodType.init(inst, def);
18968
19534
  Object.assign(inst["~standard"], {
@@ -18975,23 +19541,6 @@ var ZodType = /* @__PURE__ */ $constructor("ZodType", (inst, def) => {
18975
19541
  inst.def = def;
18976
19542
  inst.type = def.type;
18977
19543
  Object.defineProperty(inst, "_def", { value: def });
18978
- inst.check = (...checks) => {
18979
- return inst.clone(util_exports.mergeDefs(def, {
18980
- checks: [
18981
- ...def.checks ?? [],
18982
- ...checks.map((ch) => typeof ch === "function" ? { _zod: { check: ch, def: { check: "custom" }, onattach: [] } } : ch)
18983
- ]
18984
- }), {
18985
- parent: true
18986
- });
18987
- };
18988
- inst.with = inst.check;
18989
- inst.clone = (def2, params) => clone(inst, def2, params);
18990
- inst.brand = () => inst;
18991
- inst.register = ((reg, meta3) => {
18992
- reg.add(inst, meta3);
18993
- return inst;
18994
- });
18995
19544
  inst.parse = (data, params) => parse2(inst, data, params, { callee: inst.parse });
18996
19545
  inst.safeParse = (data, params) => safeParse2(inst, data, params);
18997
19546
  inst.parseAsync = async (data, params) => parseAsync2(inst, data, params, { callee: inst.parseAsync });
@@ -19005,45 +19554,108 @@ var ZodType = /* @__PURE__ */ $constructor("ZodType", (inst, def) => {
19005
19554
  inst.safeDecode = (data, params) => safeDecode2(inst, data, params);
19006
19555
  inst.safeEncodeAsync = async (data, params) => safeEncodeAsync2(inst, data, params);
19007
19556
  inst.safeDecodeAsync = async (data, params) => safeDecodeAsync2(inst, data, params);
19008
- inst.refine = (check2, params) => inst.check(refine(check2, params));
19009
- inst.superRefine = (refinement) => inst.check(superRefine(refinement));
19010
- inst.overwrite = (fn) => inst.check(_overwrite(fn));
19011
- inst.optional = () => optional(inst);
19012
- inst.exactOptional = () => exactOptional(inst);
19013
- inst.nullable = () => nullable(inst);
19014
- inst.nullish = () => optional(nullable(inst));
19015
- inst.nonoptional = (params) => nonoptional(inst, params);
19016
- inst.array = () => array(inst);
19017
- inst.or = (arg) => union([inst, arg]);
19018
- inst.and = (arg) => intersection(inst, arg);
19019
- inst.transform = (tx) => pipe(inst, transform(tx));
19020
- inst.default = (def2) => _default2(inst, def2);
19021
- inst.prefault = (def2) => prefault(inst, def2);
19022
- inst.catch = (params) => _catch2(inst, params);
19023
- inst.pipe = (target) => pipe(inst, target);
19024
- inst.readonly = () => readonly(inst);
19025
- inst.describe = (description) => {
19026
- const cl = inst.clone();
19027
- globalRegistry.add(cl, { description });
19028
- return cl;
19029
- };
19557
+ _installLazyMethods(inst, "ZodType", {
19558
+ check(...chks) {
19559
+ const def2 = this.def;
19560
+ return this.clone(util_exports.mergeDefs(def2, {
19561
+ checks: [
19562
+ ...def2.checks ?? [],
19563
+ ...chks.map((ch) => typeof ch === "function" ? { _zod: { check: ch, def: { check: "custom" }, onattach: [] } } : ch)
19564
+ ]
19565
+ }), { parent: true });
19566
+ },
19567
+ with(...chks) {
19568
+ return this.check(...chks);
19569
+ },
19570
+ clone(def2, params) {
19571
+ return clone(this, def2, params);
19572
+ },
19573
+ brand() {
19574
+ return this;
19575
+ },
19576
+ register(reg, meta3) {
19577
+ reg.add(this, meta3);
19578
+ return this;
19579
+ },
19580
+ refine(check2, params) {
19581
+ return this.check(refine(check2, params));
19582
+ },
19583
+ superRefine(refinement, params) {
19584
+ return this.check(superRefine(refinement, params));
19585
+ },
19586
+ overwrite(fn) {
19587
+ return this.check(_overwrite(fn));
19588
+ },
19589
+ optional() {
19590
+ return optional(this);
19591
+ },
19592
+ exactOptional() {
19593
+ return exactOptional(this);
19594
+ },
19595
+ nullable() {
19596
+ return nullable(this);
19597
+ },
19598
+ nullish() {
19599
+ return optional(nullable(this));
19600
+ },
19601
+ nonoptional(params) {
19602
+ return nonoptional(this, params);
19603
+ },
19604
+ array() {
19605
+ return array(this);
19606
+ },
19607
+ or(arg) {
19608
+ return union([this, arg]);
19609
+ },
19610
+ and(arg) {
19611
+ return intersection(this, arg);
19612
+ },
19613
+ transform(tx) {
19614
+ return pipe(this, transform(tx));
19615
+ },
19616
+ default(d) {
19617
+ return _default2(this, d);
19618
+ },
19619
+ prefault(d) {
19620
+ return prefault(this, d);
19621
+ },
19622
+ catch(params) {
19623
+ return _catch2(this, params);
19624
+ },
19625
+ pipe(target) {
19626
+ return pipe(this, target);
19627
+ },
19628
+ readonly() {
19629
+ return readonly(this);
19630
+ },
19631
+ describe(description) {
19632
+ const cl = this.clone();
19633
+ globalRegistry.add(cl, { description });
19634
+ return cl;
19635
+ },
19636
+ meta(...args) {
19637
+ if (args.length === 0)
19638
+ return globalRegistry.get(this);
19639
+ const cl = this.clone();
19640
+ globalRegistry.add(cl, args[0]);
19641
+ return cl;
19642
+ },
19643
+ isOptional() {
19644
+ return this.safeParse(void 0).success;
19645
+ },
19646
+ isNullable() {
19647
+ return this.safeParse(null).success;
19648
+ },
19649
+ apply(fn) {
19650
+ return fn(this);
19651
+ }
19652
+ });
19030
19653
  Object.defineProperty(inst, "description", {
19031
19654
  get() {
19032
19655
  return globalRegistry.get(inst)?.description;
19033
19656
  },
19034
19657
  configurable: true
19035
19658
  });
19036
- inst.meta = (...args) => {
19037
- if (args.length === 0) {
19038
- return globalRegistry.get(inst);
19039
- }
19040
- const cl = inst.clone();
19041
- globalRegistry.add(cl, args[0]);
19042
- return cl;
19043
- };
19044
- inst.isOptional = () => inst.safeParse(void 0).success;
19045
- inst.isNullable = () => inst.safeParse(null).success;
19046
- inst.apply = (fn) => fn(inst);
19047
19659
  return inst;
19048
19660
  });
19049
19661
  var _ZodString = /* @__PURE__ */ $constructor("_ZodString", (inst, def) => {
@@ -19054,21 +19666,53 @@ var _ZodString = /* @__PURE__ */ $constructor("_ZodString", (inst, def) => {
19054
19666
  inst.format = bag.format ?? null;
19055
19667
  inst.minLength = bag.minimum ?? null;
19056
19668
  inst.maxLength = bag.maximum ?? null;
19057
- inst.regex = (...args) => inst.check(_regex(...args));
19058
- inst.includes = (...args) => inst.check(_includes(...args));
19059
- inst.startsWith = (...args) => inst.check(_startsWith(...args));
19060
- inst.endsWith = (...args) => inst.check(_endsWith(...args));
19061
- inst.min = (...args) => inst.check(_minLength(...args));
19062
- inst.max = (...args) => inst.check(_maxLength(...args));
19063
- inst.length = (...args) => inst.check(_length(...args));
19064
- inst.nonempty = (...args) => inst.check(_minLength(1, ...args));
19065
- inst.lowercase = (params) => inst.check(_lowercase(params));
19066
- inst.uppercase = (params) => inst.check(_uppercase(params));
19067
- inst.trim = () => inst.check(_trim());
19068
- inst.normalize = (...args) => inst.check(_normalize(...args));
19069
- inst.toLowerCase = () => inst.check(_toLowerCase());
19070
- inst.toUpperCase = () => inst.check(_toUpperCase());
19071
- inst.slugify = () => inst.check(_slugify());
19669
+ _installLazyMethods(inst, "_ZodString", {
19670
+ regex(...args) {
19671
+ return this.check(_regex(...args));
19672
+ },
19673
+ includes(...args) {
19674
+ return this.check(_includes(...args));
19675
+ },
19676
+ startsWith(...args) {
19677
+ return this.check(_startsWith(...args));
19678
+ },
19679
+ endsWith(...args) {
19680
+ return this.check(_endsWith(...args));
19681
+ },
19682
+ min(...args) {
19683
+ return this.check(_minLength(...args));
19684
+ },
19685
+ max(...args) {
19686
+ return this.check(_maxLength(...args));
19687
+ },
19688
+ length(...args) {
19689
+ return this.check(_length(...args));
19690
+ },
19691
+ nonempty(...args) {
19692
+ return this.check(_minLength(1, ...args));
19693
+ },
19694
+ lowercase(params) {
19695
+ return this.check(_lowercase(params));
19696
+ },
19697
+ uppercase(params) {
19698
+ return this.check(_uppercase(params));
19699
+ },
19700
+ trim() {
19701
+ return this.check(_trim());
19702
+ },
19703
+ normalize(...args) {
19704
+ return this.check(_normalize(...args));
19705
+ },
19706
+ toLowerCase() {
19707
+ return this.check(_toLowerCase());
19708
+ },
19709
+ toUpperCase() {
19710
+ return this.check(_toUpperCase());
19711
+ },
19712
+ slugify() {
19713
+ return this.check(_slugify());
19714
+ }
19715
+ });
19072
19716
  });
19073
19717
  var ZodString = /* @__PURE__ */ $constructor("ZodString", (inst, def) => {
19074
19718
  $ZodString.init(inst, def);
@@ -19147,7 +19791,7 @@ function url(params) {
19147
19791
  }
19148
19792
  function httpUrl(params) {
19149
19793
  return _url(ZodURL, {
19150
- protocol: /^https?$/,
19794
+ protocol: regexes_exports.httpProtocol,
19151
19795
  hostname: regexes_exports.domain,
19152
19796
  ...util_exports.normalizeParams(params)
19153
19797
  });
@@ -19289,21 +19933,53 @@ var ZodNumber = /* @__PURE__ */ $constructor("ZodNumber", (inst, def) => {
19289
19933
  $ZodNumber.init(inst, def);
19290
19934
  ZodType.init(inst, def);
19291
19935
  inst._zod.processJSONSchema = (ctx, json2, params) => numberProcessor(inst, ctx, json2, params);
19292
- inst.gt = (value, params) => inst.check(_gt(value, params));
19293
- inst.gte = (value, params) => inst.check(_gte(value, params));
19294
- inst.min = (value, params) => inst.check(_gte(value, params));
19295
- inst.lt = (value, params) => inst.check(_lt(value, params));
19296
- inst.lte = (value, params) => inst.check(_lte(value, params));
19297
- inst.max = (value, params) => inst.check(_lte(value, params));
19298
- inst.int = (params) => inst.check(int(params));
19299
- inst.safe = (params) => inst.check(int(params));
19300
- inst.positive = (params) => inst.check(_gt(0, params));
19301
- inst.nonnegative = (params) => inst.check(_gte(0, params));
19302
- inst.negative = (params) => inst.check(_lt(0, params));
19303
- inst.nonpositive = (params) => inst.check(_lte(0, params));
19304
- inst.multipleOf = (value, params) => inst.check(_multipleOf(value, params));
19305
- inst.step = (value, params) => inst.check(_multipleOf(value, params));
19306
- inst.finite = () => inst;
19936
+ _installLazyMethods(inst, "ZodNumber", {
19937
+ gt(value, params) {
19938
+ return this.check(_gt(value, params));
19939
+ },
19940
+ gte(value, params) {
19941
+ return this.check(_gte(value, params));
19942
+ },
19943
+ min(value, params) {
19944
+ return this.check(_gte(value, params));
19945
+ },
19946
+ lt(value, params) {
19947
+ return this.check(_lt(value, params));
19948
+ },
19949
+ lte(value, params) {
19950
+ return this.check(_lte(value, params));
19951
+ },
19952
+ max(value, params) {
19953
+ return this.check(_lte(value, params));
19954
+ },
19955
+ int(params) {
19956
+ return this.check(int(params));
19957
+ },
19958
+ safe(params) {
19959
+ return this.check(int(params));
19960
+ },
19961
+ positive(params) {
19962
+ return this.check(_gt(0, params));
19963
+ },
19964
+ nonnegative(params) {
19965
+ return this.check(_gte(0, params));
19966
+ },
19967
+ negative(params) {
19968
+ return this.check(_lt(0, params));
19969
+ },
19970
+ nonpositive(params) {
19971
+ return this.check(_lte(0, params));
19972
+ },
19973
+ multipleOf(value, params) {
19974
+ return this.check(_multipleOf(value, params));
19975
+ },
19976
+ step(value, params) {
19977
+ return this.check(_multipleOf(value, params));
19978
+ },
19979
+ finite() {
19980
+ return this;
19981
+ }
19982
+ });
19307
19983
  const bag = inst._zod.bag;
19308
19984
  inst.minValue = Math.max(bag.minimum ?? Number.NEGATIVE_INFINITY, bag.exclusiveMinimum ?? Number.NEGATIVE_INFINITY) ?? null;
19309
19985
  inst.maxValue = Math.min(bag.maximum ?? Number.POSITIVE_INFINITY, bag.exclusiveMaximum ?? Number.POSITIVE_INFINITY) ?? null;
@@ -19450,11 +20126,23 @@ var ZodArray = /* @__PURE__ */ $constructor("ZodArray", (inst, def) => {
19450
20126
  ZodType.init(inst, def);
19451
20127
  inst._zod.processJSONSchema = (ctx, json2, params) => arrayProcessor(inst, ctx, json2, params);
19452
20128
  inst.element = def.element;
19453
- inst.min = (minLength, params) => inst.check(_minLength(minLength, params));
19454
- inst.nonempty = (params) => inst.check(_minLength(1, params));
19455
- inst.max = (maxLength, params) => inst.check(_maxLength(maxLength, params));
19456
- inst.length = (len, params) => inst.check(_length(len, params));
19457
- inst.unwrap = () => inst.element;
20129
+ _installLazyMethods(inst, "ZodArray", {
20130
+ min(n, params) {
20131
+ return this.check(_minLength(n, params));
20132
+ },
20133
+ nonempty(params) {
20134
+ return this.check(_minLength(1, params));
20135
+ },
20136
+ max(n, params) {
20137
+ return this.check(_maxLength(n, params));
20138
+ },
20139
+ length(n, params) {
20140
+ return this.check(_length(n, params));
20141
+ },
20142
+ unwrap() {
20143
+ return this.element;
20144
+ }
20145
+ });
19458
20146
  });
19459
20147
  function array(element, params) {
19460
20148
  return _array(ZodArray, element, params);
@@ -19470,23 +20158,47 @@ var ZodObject = /* @__PURE__ */ $constructor("ZodObject", (inst, def) => {
19470
20158
  util_exports.defineLazy(inst, "shape", () => {
19471
20159
  return def.shape;
19472
20160
  });
19473
- inst.keyof = () => _enum2(Object.keys(inst._zod.def.shape));
19474
- inst.catchall = (catchall) => inst.clone({ ...inst._zod.def, catchall });
19475
- inst.passthrough = () => inst.clone({ ...inst._zod.def, catchall: unknown() });
19476
- inst.loose = () => inst.clone({ ...inst._zod.def, catchall: unknown() });
19477
- inst.strict = () => inst.clone({ ...inst._zod.def, catchall: never() });
19478
- inst.strip = () => inst.clone({ ...inst._zod.def, catchall: void 0 });
19479
- inst.extend = (incoming) => {
19480
- return util_exports.extend(inst, incoming);
19481
- };
19482
- inst.safeExtend = (incoming) => {
19483
- return util_exports.safeExtend(inst, incoming);
19484
- };
19485
- inst.merge = (other) => util_exports.merge(inst, other);
19486
- inst.pick = (mask) => util_exports.pick(inst, mask);
19487
- inst.omit = (mask) => util_exports.omit(inst, mask);
19488
- inst.partial = (...args) => util_exports.partial(ZodOptional, inst, args[0]);
19489
- inst.required = (...args) => util_exports.required(ZodNonOptional, inst, args[0]);
20161
+ _installLazyMethods(inst, "ZodObject", {
20162
+ keyof() {
20163
+ return _enum2(Object.keys(this._zod.def.shape));
20164
+ },
20165
+ catchall(catchall) {
20166
+ return this.clone({ ...this._zod.def, catchall });
20167
+ },
20168
+ passthrough() {
20169
+ return this.clone({ ...this._zod.def, catchall: unknown() });
20170
+ },
20171
+ loose() {
20172
+ return this.clone({ ...this._zod.def, catchall: unknown() });
20173
+ },
20174
+ strict() {
20175
+ return this.clone({ ...this._zod.def, catchall: never() });
20176
+ },
20177
+ strip() {
20178
+ return this.clone({ ...this._zod.def, catchall: void 0 });
20179
+ },
20180
+ extend(incoming) {
20181
+ return util_exports.extend(this, incoming);
20182
+ },
20183
+ safeExtend(incoming) {
20184
+ return util_exports.safeExtend(this, incoming);
20185
+ },
20186
+ merge(other) {
20187
+ return util_exports.merge(this, other);
20188
+ },
20189
+ pick(mask) {
20190
+ return util_exports.pick(this, mask);
20191
+ },
20192
+ omit(mask) {
20193
+ return util_exports.omit(this, mask);
20194
+ },
20195
+ partial(...args) {
20196
+ return util_exports.partial(ZodOptional, this, args[0]);
20197
+ },
20198
+ required(...args) {
20199
+ return util_exports.required(ZodNonOptional, this, args[0]);
20200
+ }
20201
+ });
19490
20202
  });
19491
20203
  function object(shape, params) {
19492
20204
  const def = {
@@ -19591,6 +20303,14 @@ var ZodRecord = /* @__PURE__ */ $constructor("ZodRecord", (inst, def) => {
19591
20303
  inst.valueType = def.valueType;
19592
20304
  });
19593
20305
  function record(keyType, valueType, params) {
20306
+ if (!valueType || !valueType._zod) {
20307
+ return new ZodRecord({
20308
+ type: "record",
20309
+ keyType: string2(),
20310
+ valueType: keyType,
20311
+ ...util_exports.normalizeParams(valueType)
20312
+ });
20313
+ }
19594
20314
  return new ZodRecord({
19595
20315
  type: "record",
19596
20316
  keyType,
@@ -19762,10 +20482,12 @@ var ZodTransform = /* @__PURE__ */ $constructor("ZodTransform", (inst, def) => {
19762
20482
  if (output instanceof Promise) {
19763
20483
  return output.then((output2) => {
19764
20484
  payload.value = output2;
20485
+ payload.fallback = true;
19765
20486
  return payload;
19766
20487
  });
19767
20488
  }
19768
20489
  payload.value = output;
20490
+ payload.fallback = true;
19769
20491
  return payload;
19770
20492
  };
19771
20493
  });
@@ -19920,6 +20642,20 @@ function codec(in_, out, params) {
19920
20642
  reverseTransform: params.encode
19921
20643
  });
19922
20644
  }
20645
+ function invertCodec(codec2) {
20646
+ const def = codec2._zod.def;
20647
+ return new ZodCodec({
20648
+ type: "pipe",
20649
+ in: def.out,
20650
+ out: def.in,
20651
+ transform: def.reverseTransform,
20652
+ reverseTransform: def.transform
20653
+ });
20654
+ }
20655
+ var ZodPreprocess = /* @__PURE__ */ $constructor("ZodPreprocess", (inst, def) => {
20656
+ ZodPipe.init(inst, def);
20657
+ $ZodPreprocess.init(inst, def);
20658
+ });
19923
20659
  var ZodReadonly = /* @__PURE__ */ $constructor("ZodReadonly", (inst, def) => {
19924
20660
  $ZodReadonly.init(inst, def);
19925
20661
  ZodType.init(inst, def);
@@ -19999,8 +20735,8 @@ function custom(fn, _params) {
19999
20735
  function refine(fn, _params = {}) {
20000
20736
  return _refine(ZodCustom, fn, _params);
20001
20737
  }
20002
- function superRefine(fn) {
20003
- return _superRefine(fn);
20738
+ function superRefine(fn, params) {
20739
+ return _superRefine(fn, params);
20004
20740
  }
20005
20741
  var describe2 = describe;
20006
20742
  var meta2 = meta;
@@ -20038,7 +20774,11 @@ function json(params) {
20038
20774
  return jsonSchema;
20039
20775
  }
20040
20776
  function preprocess(fn, schema) {
20041
- return pipe(transform(fn), schema);
20777
+ return new ZodPreprocess({
20778
+ type: "pipe",
20779
+ in: transform(fn),
20780
+ out: schema
20781
+ });
20042
20782
  }
20043
20783
 
20044
20784
  // ../../node_modules/zod/v4/classic/compat.js
@@ -20459,12 +21199,6 @@ function convertBaseSchema(schema, ctx) {
20459
21199
  default:
20460
21200
  throw new Error(`Unsupported type: ${type}`);
20461
21201
  }
20462
- if (schema.description) {
20463
- zodSchema = zodSchema.describe(schema.description);
20464
- }
20465
- if (schema.default !== void 0) {
20466
- zodSchema = zodSchema.default(schema.default);
20467
- }
20468
21202
  return zodSchema;
20469
21203
  }
20470
21204
  function convertSchema(schema, ctx) {
@@ -20501,6 +21235,9 @@ function convertSchema(schema, ctx) {
20501
21235
  if (schema.readOnly === true) {
20502
21236
  baseSchema = z.readonly(baseSchema);
20503
21237
  }
21238
+ if (schema.default !== void 0) {
21239
+ baseSchema = baseSchema.default(schema.default);
21240
+ }
20504
21241
  const extraMeta = {};
20505
21242
  const coreMetadataKeys = ["$id", "id", "$comment", "$anchor", "$vocabulary", "$dynamicRef", "$dynamicAnchor"];
20506
21243
  for (const key of coreMetadataKeys) {
@@ -20522,23 +21259,32 @@ function convertSchema(schema, ctx) {
20522
21259
  if (Object.keys(extraMeta).length > 0) {
20523
21260
  ctx.registry.add(baseSchema, extraMeta);
20524
21261
  }
21262
+ if (schema.description) {
21263
+ baseSchema = baseSchema.describe(schema.description);
21264
+ }
20525
21265
  return baseSchema;
20526
21266
  }
20527
21267
  function fromJSONSchema(schema, params) {
20528
21268
  if (typeof schema === "boolean") {
20529
21269
  return schema ? z.any() : z.never();
20530
21270
  }
20531
- const version2 = detectVersion(schema, params?.defaultTarget);
20532
- const defs = schema.$defs || schema.definitions || {};
21271
+ let normalized;
21272
+ try {
21273
+ normalized = JSON.parse(JSON.stringify(schema));
21274
+ } catch {
21275
+ throw new Error("fromJSONSchema input is not valid JSON (possibly cyclic); use $defs/$ref for recursive schemas");
21276
+ }
21277
+ const version2 = detectVersion(normalized, params?.defaultTarget);
21278
+ const defs = normalized.$defs || normalized.definitions || {};
20533
21279
  const ctx = {
20534
21280
  version: version2,
20535
21281
  defs,
20536
21282
  refs: /* @__PURE__ */ new Map(),
20537
21283
  processing: /* @__PURE__ */ new Set(),
20538
- rootSchema: schema,
21284
+ rootSchema: normalized,
20539
21285
  registry: params?.registry ?? globalRegistry
20540
21286
  };
20541
- return convertSchema(schema, ctx);
21287
+ return convertSchema(normalized, ctx);
20542
21288
  }
20543
21289
 
20544
21290
  // ../../node_modules/zod/v4/classic/coerce.js
@@ -22139,8 +22885,8 @@ var StdioServerTransport = class {
22139
22885
  this._readBuffer.append(chunk);
22140
22886
  this.processReadBuffer();
22141
22887
  };
22142
- this._onerror = (error48) => {
22143
- this.onerror?.(error48);
22888
+ this._onerror = (error51) => {
22889
+ this.onerror?.(error51);
22144
22890
  };
22145
22891
  }
22146
22892
  /**
@@ -22162,8 +22908,8 @@ var StdioServerTransport = class {
22162
22908
  break;
22163
22909
  }
22164
22910
  this.onmessage?.(message);
22165
- } catch (error48) {
22166
- this.onerror?.(error48);
22911
+ } catch (error51) {
22912
+ this.onerror?.(error51);
22167
22913
  }
22168
22914
  }
22169
22915
  }
@@ -22369,8 +23115,8 @@ var ZodError2 = class _ZodError extends Error {
22369
23115
  return issue2.message;
22370
23116
  };
22371
23117
  const fieldErrors = { _errors: [] };
22372
- const processError = (error48) => {
22373
- for (const issue2 of error48.issues) {
23118
+ const processError = (error51) => {
23119
+ for (const issue2 of error51.issues) {
22374
23120
  if (issue2.code === "invalid_union") {
22375
23121
  issue2.unionErrors.map(processError);
22376
23122
  } else if (issue2.code === "invalid_return_type") {
@@ -22433,8 +23179,8 @@ var ZodError2 = class _ZodError extends Error {
22433
23179
  }
22434
23180
  };
22435
23181
  ZodError2.create = (issues) => {
22436
- const error48 = new ZodError2(issues);
22437
- return error48;
23182
+ const error51 = new ZodError2(issues);
23183
+ return error51;
22438
23184
  };
22439
23185
 
22440
23186
  // ../../node_modules/zod/v3/locales/en.js
@@ -22694,8 +23440,8 @@ var handleResult = (ctx, result) => {
22694
23440
  get error() {
22695
23441
  if (this._error)
22696
23442
  return this._error;
22697
- const error48 = new ZodError2(ctx.common.issues);
22698
- this._error = error48;
23443
+ const error51 = new ZodError2(ctx.common.issues);
23444
+ this._error = error51;
22699
23445
  return this._error;
22700
23446
  }
22701
23447
  };
@@ -25350,25 +26096,25 @@ var ZodFunction2 = class _ZodFunction extends ZodType2 {
25350
26096
  });
25351
26097
  return INVALID;
25352
26098
  }
25353
- function makeArgsIssue(args, error48) {
26099
+ function makeArgsIssue(args, error51) {
25354
26100
  return makeIssue({
25355
26101
  data: args,
25356
26102
  path: ctx.path,
25357
26103
  errorMaps: [ctx.common.contextualErrorMap, ctx.schemaErrorMap, getErrorMap2(), en_default2].filter((x) => !!x),
25358
26104
  issueData: {
25359
26105
  code: ZodIssueCode2.invalid_arguments,
25360
- argumentsError: error48
26106
+ argumentsError: error51
25361
26107
  }
25362
26108
  });
25363
26109
  }
25364
- function makeReturnsIssue(returns, error48) {
26110
+ function makeReturnsIssue(returns, error51) {
25365
26111
  return makeIssue({
25366
26112
  data: returns,
25367
26113
  path: ctx.path,
25368
26114
  errorMaps: [ctx.common.contextualErrorMap, ctx.schemaErrorMap, getErrorMap2(), en_default2].filter((x) => !!x),
25369
26115
  issueData: {
25370
26116
  code: ZodIssueCode2.invalid_return_type,
25371
- returnTypeError: error48
26117
+ returnTypeError: error51
25372
26118
  }
25373
26119
  });
25374
26120
  }
@@ -25377,15 +26123,15 @@ var ZodFunction2 = class _ZodFunction extends ZodType2 {
25377
26123
  if (this._def.returns instanceof ZodPromise2) {
25378
26124
  const me = this;
25379
26125
  return OK(async function(...args) {
25380
- const error48 = new ZodError2([]);
26126
+ const error51 = new ZodError2([]);
25381
26127
  const parsedArgs = await me._def.args.parseAsync(args, params).catch((e) => {
25382
- error48.addIssue(makeArgsIssue(args, e));
25383
- throw error48;
26128
+ error51.addIssue(makeArgsIssue(args, e));
26129
+ throw error51;
25384
26130
  });
25385
26131
  const result = await Reflect.apply(fn, this, parsedArgs);
25386
26132
  const parsedReturns = await me._def.returns._def.type.parseAsync(result, params).catch((e) => {
25387
- error48.addIssue(makeReturnsIssue(result, e));
25388
- throw error48;
26133
+ error51.addIssue(makeReturnsIssue(result, e));
26134
+ throw error51;
25389
26135
  });
25390
26136
  return parsedReturns;
25391
26137
  });
@@ -26081,7 +26827,9 @@ var ZodMiniType = /* @__PURE__ */ $constructor("ZodMiniType", (inst, def) => {
26081
26827
  ...def,
26082
26828
  checks: [
26083
26829
  ...def.checks ?? [],
26084
- ...checks.map((ch) => typeof ch === "function" ? { _zod: { check: ch, def: { check: "custom" }, onattach: [] } } : ch)
26830
+ ...checks.map((ch) => typeof ch === "function" ? {
26831
+ _zod: { check: ch, def: { check: "custom" }, onattach: [] }
26832
+ } : ch)
26085
26833
  ]
26086
26834
  }, { parent: true });
26087
26835
  };
@@ -26193,24 +26941,24 @@ function normalizeObjectSchema(schema) {
26193
26941
  }
26194
26942
  return void 0;
26195
26943
  }
26196
- function getParseErrorMessage(error48) {
26197
- if (error48 && typeof error48 === "object") {
26198
- if ("message" in error48 && typeof error48.message === "string") {
26199
- return error48.message;
26944
+ function getParseErrorMessage(error51) {
26945
+ if (error51 && typeof error51 === "object") {
26946
+ if ("message" in error51 && typeof error51.message === "string") {
26947
+ return error51.message;
26200
26948
  }
26201
- if ("issues" in error48 && Array.isArray(error48.issues) && error48.issues.length > 0) {
26202
- const firstIssue = error48.issues[0];
26949
+ if ("issues" in error51 && Array.isArray(error51.issues) && error51.issues.length > 0) {
26950
+ const firstIssue = error51.issues[0];
26203
26951
  if (firstIssue && typeof firstIssue === "object" && "message" in firstIssue) {
26204
26952
  return String(firstIssue.message);
26205
26953
  }
26206
26954
  }
26207
26955
  try {
26208
- return JSON.stringify(error48);
26956
+ return JSON.stringify(error51);
26209
26957
  } catch {
26210
- return String(error48);
26958
+ return String(error51);
26211
26959
  }
26212
26960
  }
26213
- return String(error48);
26961
+ return String(error51);
26214
26962
  }
26215
26963
  function getSchemaDescription(schema) {
26216
26964
  return schema.description;
@@ -27638,8 +28386,8 @@ var Protocol = class {
27638
28386
  resolver(message);
27639
28387
  } else {
27640
28388
  const errorMessage = message;
27641
- const error48 = new McpError(errorMessage.error.code, errorMessage.error.message, errorMessage.error.data);
27642
- resolver(error48);
28389
+ const error51 = new McpError(errorMessage.error.code, errorMessage.error.message, errorMessage.error.data);
28390
+ resolver(error51);
27643
28391
  }
27644
28392
  } else {
27645
28393
  const messageType = queuedMessage.type === "response" ? "Response" : "Error";
@@ -27683,8 +28431,8 @@ var Protocol = class {
27683
28431
  nextCursor,
27684
28432
  _meta: {}
27685
28433
  };
27686
- } catch (error48) {
27687
- throw new McpError(ErrorCode.InvalidParams, `Failed to list tasks: ${error48 instanceof Error ? error48.message : String(error48)}`);
28434
+ } catch (error51) {
28435
+ throw new McpError(ErrorCode.InvalidParams, `Failed to list tasks: ${error51 instanceof Error ? error51.message : String(error51)}`);
27688
28436
  }
27689
28437
  });
27690
28438
  this.setRequestHandler(CancelTaskRequestSchema, async (request, extra) => {
@@ -27706,11 +28454,11 @@ var Protocol = class {
27706
28454
  _meta: {},
27707
28455
  ...cancelledTask
27708
28456
  };
27709
- } catch (error48) {
27710
- if (error48 instanceof McpError) {
27711
- throw error48;
28457
+ } catch (error51) {
28458
+ if (error51 instanceof McpError) {
28459
+ throw error51;
27712
28460
  }
27713
- throw new McpError(ErrorCode.InvalidRequest, `Failed to cancel task: ${error48 instanceof Error ? error48.message : String(error48)}`);
28461
+ throw new McpError(ErrorCode.InvalidRequest, `Failed to cancel task: ${error51 instanceof Error ? error51.message : String(error51)}`);
27714
28462
  }
27715
28463
  });
27716
28464
  }
@@ -27771,9 +28519,9 @@ var Protocol = class {
27771
28519
  this._onclose();
27772
28520
  };
27773
28521
  const _onerror = this.transport?.onerror;
27774
- this._transport.onerror = (error48) => {
27775
- _onerror?.(error48);
27776
- this._onerror(error48);
28522
+ this._transport.onerror = (error51) => {
28523
+ _onerror?.(error51);
28524
+ this._onerror(error51);
27777
28525
  };
27778
28526
  const _onmessage = this._transport?.onmessage;
27779
28527
  this._transport.onmessage = (message, extra) => {
@@ -27804,22 +28552,22 @@ var Protocol = class {
27804
28552
  controller.abort();
27805
28553
  }
27806
28554
  this._requestHandlerAbortControllers.clear();
27807
- const error48 = McpError.fromError(ErrorCode.ConnectionClosed, "Connection closed");
28555
+ const error51 = McpError.fromError(ErrorCode.ConnectionClosed, "Connection closed");
27808
28556
  this._transport = void 0;
27809
28557
  this.onclose?.();
27810
28558
  for (const handler of responseHandlers.values()) {
27811
- handler(error48);
28559
+ handler(error51);
27812
28560
  }
27813
28561
  }
27814
- _onerror(error48) {
27815
- this.onerror?.(error48);
28562
+ _onerror(error51) {
28563
+ this.onerror?.(error51);
27816
28564
  }
27817
28565
  _onnotification(notification) {
27818
28566
  const handler = this._notificationHandlers.get(notification.method) ?? this.fallbackNotificationHandler;
27819
28567
  if (handler === void 0) {
27820
28568
  return;
27821
28569
  }
27822
- Promise.resolve().then(() => handler(notification)).catch((error48) => this._onerror(new Error(`Uncaught error in notification handler: ${error48}`)));
28570
+ Promise.resolve().then(() => handler(notification)).catch((error51) => this._onerror(new Error(`Uncaught error in notification handler: ${error51}`)));
27823
28571
  }
27824
28572
  _onrequest(request, extra) {
27825
28573
  const handler = this._requestHandlers.get(request.method) ?? this.fallbackRequestHandler;
@@ -27839,9 +28587,9 @@ var Protocol = class {
27839
28587
  type: "error",
27840
28588
  message: errorResponse,
27841
28589
  timestamp: Date.now()
27842
- }, capturedTransport?.sessionId).catch((error48) => this._onerror(new Error(`Failed to enqueue error response: ${error48}`)));
28590
+ }, capturedTransport?.sessionId).catch((error51) => this._onerror(new Error(`Failed to enqueue error response: ${error51}`)));
27843
28591
  } else {
27844
- capturedTransport?.send(errorResponse).catch((error48) => this._onerror(new Error(`Failed to send an error response: ${error48}`)));
28592
+ capturedTransport?.send(errorResponse).catch((error51) => this._onerror(new Error(`Failed to send an error response: ${error51}`)));
27845
28593
  }
27846
28594
  return;
27847
28595
  }
@@ -27907,7 +28655,7 @@ var Protocol = class {
27907
28655
  } else {
27908
28656
  await capturedTransport?.send(response);
27909
28657
  }
27910
- }, async (error48) => {
28658
+ }, async (error51) => {
27911
28659
  if (abortController.signal.aborted) {
27912
28660
  return;
27913
28661
  }
@@ -27915,9 +28663,9 @@ var Protocol = class {
27915
28663
  jsonrpc: "2.0",
27916
28664
  id: request.id,
27917
28665
  error: {
27918
- code: Number.isSafeInteger(error48["code"]) ? error48["code"] : ErrorCode.InternalError,
27919
- message: error48.message ?? "Internal error",
27920
- ...error48["data"] !== void 0 && { data: error48["data"] }
28666
+ code: Number.isSafeInteger(error51["code"]) ? error51["code"] : ErrorCode.InternalError,
28667
+ message: error51.message ?? "Internal error",
28668
+ ...error51["data"] !== void 0 && { data: error51["data"] }
27921
28669
  }
27922
28670
  };
27923
28671
  if (relatedTaskId && this._taskMessageQueue) {
@@ -27929,7 +28677,7 @@ var Protocol = class {
27929
28677
  } else {
27930
28678
  await capturedTransport?.send(errorResponse);
27931
28679
  }
27932
- }).catch((error48) => this._onerror(new Error(`Failed to send response: ${error48}`))).finally(() => {
28680
+ }).catch((error51) => this._onerror(new Error(`Failed to send response: ${error51}`))).finally(() => {
27933
28681
  if (this._requestHandlerAbortControllers.get(request.id) === abortController) {
27934
28682
  this._requestHandlerAbortControllers.delete(request.id);
27935
28683
  }
@@ -27948,11 +28696,11 @@ var Protocol = class {
27948
28696
  if (timeoutInfo && responseHandler && timeoutInfo.resetTimeoutOnProgress) {
27949
28697
  try {
27950
28698
  this._resetTimeout(messageId);
27951
- } catch (error48) {
28699
+ } catch (error51) {
27952
28700
  this._responseHandlers.delete(messageId);
27953
28701
  this._progressHandlers.delete(messageId);
27954
28702
  this._cleanupTimeout(messageId);
27955
- responseHandler(error48);
28703
+ responseHandler(error51);
27956
28704
  return;
27957
28705
  }
27958
28706
  }
@@ -27966,8 +28714,8 @@ var Protocol = class {
27966
28714
  if (isJSONRPCResultResponse(response)) {
27967
28715
  resolver(response);
27968
28716
  } else {
27969
- const error48 = new McpError(response.error.code, response.error.message, response.error.data);
27970
- resolver(error48);
28717
+ const error51 = new McpError(response.error.code, response.error.message, response.error.data);
28718
+ resolver(error51);
27971
28719
  }
27972
28720
  return;
27973
28721
  }
@@ -27995,8 +28743,8 @@ var Protocol = class {
27995
28743
  if (isJSONRPCResultResponse(response)) {
27996
28744
  handler(response);
27997
28745
  } else {
27998
- const error48 = McpError.fromError(response.error.code, response.error.message, response.error.data);
27999
- handler(error48);
28746
+ const error51 = McpError.fromError(response.error.code, response.error.message, response.error.data);
28747
+ handler(error51);
28000
28748
  }
28001
28749
  }
28002
28750
  get transport() {
@@ -28041,10 +28789,10 @@ var Protocol = class {
28041
28789
  try {
28042
28790
  const result = await this.request(request, resultSchema, options);
28043
28791
  yield { type: "result", result };
28044
- } catch (error48) {
28792
+ } catch (error51) {
28045
28793
  yield {
28046
28794
  type: "error",
28047
- error: error48 instanceof McpError ? error48 : new McpError(ErrorCode.InternalError, String(error48))
28795
+ error: error51 instanceof McpError ? error51 : new McpError(ErrorCode.InternalError, String(error51))
28048
28796
  };
28049
28797
  }
28050
28798
  return;
@@ -28087,10 +28835,10 @@ var Protocol = class {
28087
28835
  await new Promise((resolve) => setTimeout(resolve, pollInterval));
28088
28836
  options?.signal?.throwIfAborted();
28089
28837
  }
28090
- } catch (error48) {
28838
+ } catch (error51) {
28091
28839
  yield {
28092
28840
  type: "error",
28093
- error: error48 instanceof McpError ? error48 : new McpError(ErrorCode.InternalError, String(error48))
28841
+ error: error51 instanceof McpError ? error51 : new McpError(ErrorCode.InternalError, String(error51))
28094
28842
  };
28095
28843
  }
28096
28844
  }
@@ -28102,8 +28850,8 @@ var Protocol = class {
28102
28850
  request(request, resultSchema, options) {
28103
28851
  const { relatedRequestId, resumptionToken, onresumptiontoken, task, relatedTask } = options ?? {};
28104
28852
  return new Promise((resolve, reject) => {
28105
- const earlyReject = (error48) => {
28106
- reject(error48);
28853
+ const earlyReject = (error51) => {
28854
+ reject(error51);
28107
28855
  };
28108
28856
  if (!this._transport) {
28109
28857
  earlyReject(new Error("Not connected"));
@@ -28163,9 +28911,9 @@ var Protocol = class {
28163
28911
  requestId: messageId,
28164
28912
  reason: String(reason)
28165
28913
  }
28166
- }, { relatedRequestId, resumptionToken, onresumptiontoken }).catch((error49) => this._onerror(new Error(`Failed to send cancellation: ${error49}`)));
28167
- const error48 = reason instanceof McpError ? reason : new McpError(ErrorCode.RequestTimeout, String(reason));
28168
- reject(error48);
28914
+ }, { relatedRequestId, resumptionToken, onresumptiontoken }).catch((error52) => this._onerror(new Error(`Failed to send cancellation: ${error52}`)));
28915
+ const error51 = reason instanceof McpError ? reason : new McpError(ErrorCode.RequestTimeout, String(reason));
28916
+ reject(error51);
28169
28917
  };
28170
28918
  this._responseHandlers.set(messageId, (response) => {
28171
28919
  if (options?.signal?.aborted) {
@@ -28181,8 +28929,8 @@ var Protocol = class {
28181
28929
  } else {
28182
28930
  resolve(parseResult.data);
28183
28931
  }
28184
- } catch (error48) {
28185
- reject(error48);
28932
+ } catch (error51) {
28933
+ reject(error51);
28186
28934
  }
28187
28935
  });
28188
28936
  options?.signal?.addEventListener("abort", () => {
@@ -28206,14 +28954,14 @@ var Protocol = class {
28206
28954
  type: "request",
28207
28955
  message: jsonrpcRequest,
28208
28956
  timestamp: Date.now()
28209
- }).catch((error48) => {
28957
+ }).catch((error51) => {
28210
28958
  this._cleanupTimeout(messageId);
28211
- reject(error48);
28959
+ reject(error51);
28212
28960
  });
28213
28961
  } else {
28214
- this._transport.send(jsonrpcRequest, { relatedRequestId, resumptionToken, onresumptiontoken }).catch((error48) => {
28962
+ this._transport.send(jsonrpcRequest, { relatedRequestId, resumptionToken, onresumptiontoken }).catch((error51) => {
28215
28963
  this._cleanupTimeout(messageId);
28216
- reject(error48);
28964
+ reject(error51);
28217
28965
  });
28218
28966
  }
28219
28967
  });
@@ -28306,7 +29054,7 @@ var Protocol = class {
28306
29054
  }
28307
29055
  };
28308
29056
  }
28309
- this._transport?.send(jsonrpcNotification2, options).catch((error48) => this._onerror(error48));
29057
+ this._transport?.send(jsonrpcNotification2, options).catch((error51) => this._onerror(error51));
28310
29058
  });
28311
29059
  return;
28312
29060
  }
@@ -29168,11 +29916,11 @@ var Server = class extends Protocol {
29168
29916
  if (!validationResult.valid) {
29169
29917
  throw new McpError(ErrorCode.InvalidParams, `Elicitation response content does not match requested schema: ${validationResult.errorMessage}`);
29170
29918
  }
29171
- } catch (error48) {
29172
- if (error48 instanceof McpError) {
29173
- throw error48;
29919
+ } catch (error51) {
29920
+ if (error51 instanceof McpError) {
29921
+ throw error51;
29174
29922
  }
29175
- throw new McpError(ErrorCode.InternalError, `Error validating elicitation response: ${error48 instanceof Error ? error48.message : String(error48)}`);
29923
+ throw new McpError(ErrorCode.InternalError, `Error validating elicitation response: ${error51 instanceof Error ? error51.message : String(error51)}`);
29176
29924
  }
29177
29925
  }
29178
29926
  return result;
@@ -29431,13 +30179,13 @@ var McpServer = class {
29431
30179
  }
29432
30180
  await this.validateToolOutput(tool, result, request.params.name);
29433
30181
  return result;
29434
- } catch (error48) {
29435
- if (error48 instanceof McpError) {
29436
- if (error48.code === ErrorCode.UrlElicitationRequired) {
29437
- throw error48;
30182
+ } catch (error51) {
30183
+ if (error51 instanceof McpError) {
30184
+ if (error51.code === ErrorCode.UrlElicitationRequired) {
30185
+ throw error51;
29438
30186
  }
29439
30187
  }
29440
- return this.createToolError(error48 instanceof Error ? error48.message : String(error48));
30188
+ return this.createToolError(error51 instanceof Error ? error51.message : String(error51));
29441
30189
  }
29442
30190
  });
29443
30191
  this._toolHandlersInitialized = true;
@@ -29470,8 +30218,8 @@ var McpServer = class {
29470
30218
  const schemaToParse = inputObj ?? tool.inputSchema;
29471
30219
  const parseResult = await safeParseAsync3(schemaToParse, args);
29472
30220
  if (!parseResult.success) {
29473
- const error48 = "error" in parseResult ? parseResult.error : "Unknown error";
29474
- const errorMessage = getParseErrorMessage(error48);
30221
+ const error51 = "error" in parseResult ? parseResult.error : "Unknown error";
30222
+ const errorMessage = getParseErrorMessage(error51);
29475
30223
  throw new McpError(ErrorCode.InvalidParams, `Input validation error: Invalid arguments for tool ${toolName}: ${errorMessage}`);
29476
30224
  }
29477
30225
  return parseResult.data;
@@ -29495,8 +30243,8 @@ var McpServer = class {
29495
30243
  const outputObj = normalizeObjectSchema(tool.outputSchema);
29496
30244
  const parseResult = await safeParseAsync3(outputObj, result.structuredContent);
29497
30245
  if (!parseResult.success) {
29498
- const error48 = "error" in parseResult ? parseResult.error : "Unknown error";
29499
- const errorMessage = getParseErrorMessage(error48);
30246
+ const error51 = "error" in parseResult ? parseResult.error : "Unknown error";
30247
+ const errorMessage = getParseErrorMessage(error51);
29500
30248
  throw new McpError(ErrorCode.InvalidParams, `Output validation error: Invalid structured content for tool ${toolName}: ${errorMessage}`);
29501
30249
  }
29502
30250
  }
@@ -29708,8 +30456,8 @@ var McpServer = class {
29708
30456
  const argsObj = normalizeObjectSchema(prompt.argsSchema);
29709
30457
  const parseResult = await safeParseAsync3(argsObj, request.params.arguments);
29710
30458
  if (!parseResult.success) {
29711
- const error48 = "error" in parseResult ? parseResult.error : "Unknown error";
29712
- const errorMessage = getParseErrorMessage(error48);
30459
+ const error51 = "error" in parseResult ? parseResult.error : "Unknown error";
30460
+ const errorMessage = getParseErrorMessage(error51);
29713
30461
  throw new McpError(ErrorCode.InvalidParams, `Invalid arguments for prompt ${request.params.name}: ${errorMessage}`);
29714
30462
  }
29715
30463
  const args = parseResult.data;
@@ -30931,7 +31679,7 @@ function registerClassroomTools(server2) {
30931
31679
  }
30932
31680
 
30933
31681
  // ../gogcli-mcp/src/server.ts
30934
- var VERSION = true ? "2.0.2" : "0.0.0";
31682
+ var VERSION = true ? "2.0.4" : "0.0.0";
30935
31683
  function createServer(options) {
30936
31684
  return new McpServer({
30937
31685
  name: options?.name ?? "gogcli",