@eslint-react/core 1.48.2 → 1.48.3-next.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/dist/index.js +518 -31
  2. package/dist/index.mjs +518 -31
  3. package/package.json +6 -6
package/dist/index.js CHANGED
@@ -33,9 +33,13 @@ var AST9__namespace = /*#__PURE__*/_interopNamespace(AST9);
33
33
  var VAR3__namespace = /*#__PURE__*/_interopNamespace(VAR3);
34
34
  var birecord__default = /*#__PURE__*/_interopDefault(birecord);
35
35
 
36
- // src/component/component-collector.ts
36
+ var __defProp = Object.defineProperty;
37
+ var __export = (target, all) => {
38
+ for (var name in all)
39
+ __defProp(target, name, { get: all[name], enumerable: true });
40
+ };
37
41
 
38
- // ../../node_modules/.pnpm/@zod+core@0.1.0/node_modules/@zod/core/dist/esm/core.js
42
+ // ../../node_modules/.pnpm/@zod+core@0.5.1/node_modules/@zod/core/dist/esm/core.js
39
43
  // @__NO_SIDE_EFFECTS__
40
44
  function $constructor(name, initializer) {
41
45
  class _6 {
@@ -76,6 +80,87 @@ var globalConfig = {};
76
80
  function config(config2) {
77
81
  return globalConfig;
78
82
  }
83
+
84
+ // ../../node_modules/.pnpm/@zod+core@0.5.1/node_modules/@zod/core/dist/esm/util.js
85
+ var util_exports = {};
86
+ __export(util_exports, {
87
+ BIGINT_FORMAT_RANGES: () => BIGINT_FORMAT_RANGES,
88
+ NUMBER_FORMAT_RANGES: () => NUMBER_FORMAT_RANGES,
89
+ aborted: () => aborted,
90
+ allowsEval: () => allowsEval,
91
+ assert: () => assert,
92
+ assertEqual: () => assertEqual,
93
+ assertIs: () => assertIs,
94
+ assertNever: () => assertNever,
95
+ assertNotEqual: () => assertNotEqual,
96
+ assignProp: () => assignProp,
97
+ cached: () => cached,
98
+ cleanInterfaceKey: () => cleanInterfaceKey,
99
+ cleanInterfaceShape: () => cleanInterfaceShape,
100
+ cleanRegex: () => cleanRegex,
101
+ clone: () => clone,
102
+ createTransparentProxy: () => createTransparentProxy,
103
+ defineLazy: () => defineLazy,
104
+ esc: () => esc,
105
+ escapeRegex: () => escapeRegex,
106
+ extend: () => extend,
107
+ extendObjectLike: () => extendObjectLike,
108
+ finalizeIssue: () => finalizeIssue,
109
+ floatSafeRemainder: () => floatSafeRemainder,
110
+ getElementAtPath: () => getElementAtPath,
111
+ getLengthableOrigin: () => getLengthableOrigin,
112
+ getParsedType: () => getParsedType,
113
+ getSizableOrigin: () => getSizableOrigin,
114
+ getValidEnumValues: () => getValidEnumValues,
115
+ isObject: () => isObject,
116
+ isPlainObject: () => isPlainObject,
117
+ issue: () => issue,
118
+ joinValues: () => joinValues,
119
+ jsonStringifyReplacer: () => jsonStringifyReplacer,
120
+ mergeObjectLike: () => mergeObjectLike,
121
+ normalizeObjectLikeDef: () => normalizeObjectLikeDef,
122
+ normalizeParams: () => normalizeParams,
123
+ nullish: () => nullish,
124
+ numKeys: () => numKeys,
125
+ omit: () => omit,
126
+ optionalInterfaceKeys: () => optionalInterfaceKeys,
127
+ optionalObjectKeys: () => optionalObjectKeys,
128
+ partialObjectLike: () => partialObjectLike,
129
+ pick: () => pick,
130
+ prefixIssues: () => prefixIssues,
131
+ primitiveTypes: () => primitiveTypes,
132
+ promiseAllObject: () => promiseAllObject,
133
+ propertyKeyTypes: () => propertyKeyTypes,
134
+ randomString: () => randomString,
135
+ requiredObjectLike: () => requiredObjectLike,
136
+ splitChecksAndParams: () => splitChecksAndParams,
137
+ stringifyPrimitive: () => stringifyPrimitive,
138
+ unwrapMessage: () => unwrapMessage
139
+ });
140
+ function assertEqual(val) {
141
+ return val;
142
+ }
143
+ function assertNotEqual(val) {
144
+ return val;
145
+ }
146
+ function assertIs(_arg) {
147
+ }
148
+ function assertNever(_x) {
149
+ throw new Error();
150
+ }
151
+ function assert(_6) {
152
+ }
153
+ function getValidEnumValues(obj) {
154
+ const validKeys = Object.keys(obj).filter((k) => typeof obj[obj[k]] !== "number");
155
+ const filtered = {};
156
+ for (const k of validKeys) {
157
+ filtered[k] = obj[k];
158
+ }
159
+ return Object.values(filtered);
160
+ }
161
+ function joinValues(array2, separator = "|") {
162
+ return array2.map((val) => stringifyPrimitive(val)).join(separator);
163
+ }
79
164
  function jsonStringifyReplacer(_6, value) {
80
165
  if (typeof value === "bigint")
81
166
  return value.toString();
@@ -92,11 +177,22 @@ function cached(getter) {
92
177
  }
93
178
  };
94
179
  }
180
+ function nullish(input) {
181
+ return input === null || input === void 0;
182
+ }
95
183
  function cleanRegex(source) {
96
184
  const start = source.startsWith("^") ? 1 : 0;
97
185
  const end = source.endsWith("$") ? source.length - 1 : source.length;
98
186
  return source.slice(start, end);
99
187
  }
188
+ function floatSafeRemainder(val, step) {
189
+ const valDecCount = (val.toString().split(".")[1] || "").length;
190
+ const stepDecCount = (step.toString().split(".")[1] || "").length;
191
+ const decCount = valDecCount > stepDecCount ? valDecCount : stepDecCount;
192
+ const valInt = Number.parseInt(val.toFixed(decCount).replace(".", ""));
193
+ const stepInt = Number.parseInt(step.toFixed(decCount).replace(".", ""));
194
+ return valInt % stepInt / 10 ** decCount;
195
+ }
100
196
  function defineLazy(object2, key, getter) {
101
197
  Object.defineProperty(object2, key, {
102
198
  get() {
@@ -115,6 +211,30 @@ function defineLazy(object2, key, getter) {
115
211
  configurable: true
116
212
  });
117
213
  }
214
+ function assignProp(target, prop, value) {
215
+ Object.defineProperty(target, prop, {
216
+ value,
217
+ writable: true,
218
+ enumerable: true,
219
+ configurable: true
220
+ });
221
+ }
222
+ function getElementAtPath(obj, path) {
223
+ if (!path)
224
+ return obj;
225
+ return path.reduce((acc, key) => acc?.[key], obj);
226
+ }
227
+ function promiseAllObject(promisesObj) {
228
+ const keys = Object.keys(promisesObj);
229
+ const promises = keys.map((key) => promisesObj[key]);
230
+ return Promise.all(promises).then((results) => {
231
+ const resolvedObj = {};
232
+ for (let i = 0; i < keys.length; i++) {
233
+ resolvedObj[keys[i]] = results[i];
234
+ }
235
+ return resolvedObj;
236
+ });
237
+ }
118
238
  function randomString(length = 10) {
119
239
  const chars = "abcdefghijklmnopqrstuvwxyz";
120
240
  let str = "";
@@ -137,9 +257,78 @@ var allowsEval = cached(() => {
137
257
  return false;
138
258
  }
139
259
  });
260
+ function isPlainObject(data) {
261
+ return typeof data === "object" && data !== null && Object.getPrototypeOf(data) === Object.prototype;
262
+ }
263
+ function numKeys(data) {
264
+ let keyCount = 0;
265
+ for (const key in data) {
266
+ if (Object.prototype.hasOwnProperty.call(data, key)) {
267
+ keyCount++;
268
+ }
269
+ }
270
+ return keyCount;
271
+ }
272
+ var getParsedType = (data) => {
273
+ const t = typeof data;
274
+ switch (t) {
275
+ case "undefined":
276
+ return "undefined";
277
+ case "string":
278
+ return "string";
279
+ case "number":
280
+ return Number.isNaN(data) ? "nan" : "number";
281
+ case "boolean":
282
+ return "boolean";
283
+ case "function":
284
+ return "function";
285
+ case "bigint":
286
+ return "bigint";
287
+ case "symbol":
288
+ return "symbol";
289
+ case "object":
290
+ if (Array.isArray(data)) {
291
+ return "array";
292
+ }
293
+ if (data === null) {
294
+ return "null";
295
+ }
296
+ if (data.then && typeof data.then === "function" && data.catch && typeof data.catch === "function") {
297
+ return "promise";
298
+ }
299
+ if (typeof Map !== "undefined" && data instanceof Map) {
300
+ return "map";
301
+ }
302
+ if (typeof Set !== "undefined" && data instanceof Set) {
303
+ return "set";
304
+ }
305
+ if (typeof Date !== "undefined" && data instanceof Date) {
306
+ return "date";
307
+ }
308
+ if (typeof File !== "undefined" && data instanceof File) {
309
+ return "file";
310
+ }
311
+ return "object";
312
+ default:
313
+ throw new Error(`Unknown data type: ${t}`);
314
+ }
315
+ };
316
+ var propertyKeyTypes = /* @__PURE__ */ new Set(["string", "number", "symbol"]);
317
+ var primitiveTypes = /* @__PURE__ */ new Set(["string", "number", "bigint", "boolean", "symbol", "undefined"]);
318
+ function escapeRegex(str) {
319
+ return str.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
320
+ }
140
321
  function clone(inst, def) {
141
322
  return new inst._zod.constr(def);
142
323
  }
324
+ function splitChecksAndParams(_paramsOrChecks, _checks) {
325
+ const params = Array.isArray(_paramsOrChecks) ? {} : _paramsOrChecks ?? {};
326
+ const checks = Array.isArray(_paramsOrChecks) ? _paramsOrChecks : _checks ?? [];
327
+ return {
328
+ checks,
329
+ params
330
+ };
331
+ }
143
332
  function normalizeParams(_params) {
144
333
  const params = _params;
145
334
  if (!params)
@@ -156,11 +345,267 @@ function normalizeParams(_params) {
156
345
  return { ...params, error: () => params.error };
157
346
  return params;
158
347
  }
348
+ function createTransparentProxy(getter) {
349
+ let target;
350
+ return new Proxy({}, {
351
+ get(_6, prop, receiver) {
352
+ target ?? (target = getter());
353
+ return Reflect.get(target, prop, receiver);
354
+ },
355
+ set(_6, prop, value, receiver) {
356
+ target ?? (target = getter());
357
+ return Reflect.set(target, prop, value, receiver);
358
+ },
359
+ has(_6, prop) {
360
+ target ?? (target = getter());
361
+ return Reflect.has(target, prop);
362
+ },
363
+ deleteProperty(_6, prop) {
364
+ target ?? (target = getter());
365
+ return Reflect.deleteProperty(target, prop);
366
+ },
367
+ ownKeys(_6) {
368
+ target ?? (target = getter());
369
+ return Reflect.ownKeys(target);
370
+ },
371
+ getOwnPropertyDescriptor(_6, prop) {
372
+ target ?? (target = getter());
373
+ return Reflect.getOwnPropertyDescriptor(target, prop);
374
+ },
375
+ defineProperty(_6, prop, descriptor) {
376
+ target ?? (target = getter());
377
+ return Reflect.defineProperty(target, prop, descriptor);
378
+ }
379
+ // apply(target, thisArg, args) {
380
+ // return Reflect.apply(target, thisArg, args);
381
+ // },
382
+ // construct(target, args, newTarget) {
383
+ // return Reflect.construct(target, args, newTarget);
384
+ // },
385
+ });
386
+ }
387
+ function stringifyPrimitive(value) {
388
+ if (typeof value === "bigint")
389
+ return value.toString() + "n";
390
+ if (typeof value === "string")
391
+ return `"${value}"`;
392
+ return `${value}`;
393
+ }
159
394
  function optionalObjectKeys(shape) {
160
395
  return Object.keys(shape).filter((k) => {
161
396
  return shape[k]._zod.qout === "true";
162
397
  });
163
398
  }
399
+ function optionalInterfaceKeys(shape) {
400
+ return Object.keys(shape).filter((k) => {
401
+ return k.endsWith("?");
402
+ }).map((k) => k.replace(/\?$/, ""));
403
+ }
404
+ function cleanInterfaceKey(key) {
405
+ return key.replace(/^\?/, "").replace(/\?$/, "");
406
+ }
407
+ function cleanInterfaceShape(_shape) {
408
+ const keyMap = {};
409
+ const shape = {};
410
+ const optional2 = [];
411
+ const defaulted = [];
412
+ for (const [key, value] of Object.entries(_shape)) {
413
+ if (key.endsWith("?"))
414
+ optional2.push(key.slice(0, -1));
415
+ if (key.startsWith("?"))
416
+ defaulted.push(key.slice(1));
417
+ const cleanKey = cleanInterfaceKey(key);
418
+ shape[cleanKey] = value;
419
+ keyMap[cleanKey] = key;
420
+ }
421
+ return { shape, keyMap, optional: optional2, defaulted };
422
+ }
423
+ var NUMBER_FORMAT_RANGES = {
424
+ safeint: [Number.MIN_SAFE_INTEGER, Number.MAX_SAFE_INTEGER],
425
+ int32: [-2147483648, 2147483647],
426
+ uint32: [0, 4294967295],
427
+ float32: [-34028234663852886e22, 34028234663852886e22],
428
+ float64: [-17976931348623157e292, 17976931348623157e292]
429
+ };
430
+ var BIGINT_FORMAT_RANGES = {
431
+ int64: [/* @__PURE__ */ BigInt("-9223372036854775808"), /* @__PURE__ */ BigInt("9223372036854775807")],
432
+ uint64: [/* @__PURE__ */ BigInt(0), /* @__PURE__ */ BigInt("18446744073709551615")]
433
+ };
434
+ function pick(schema, mask) {
435
+ const newShape = {};
436
+ const newOptional = [];
437
+ const currShape = schema._zod.def.shape;
438
+ const currOptional = new Set(schema._zod.def.optional);
439
+ for (const key in mask) {
440
+ if (!(key in currShape)) {
441
+ throw new Error(`Unrecognized key: "${key}"`);
442
+ }
443
+ if (!mask[key])
444
+ continue;
445
+ newShape[key] = currShape[key];
446
+ if (currOptional.has(key)) {
447
+ newOptional.push(key);
448
+ }
449
+ }
450
+ return clone(schema, {
451
+ ...schema._zod.def,
452
+ shape: newShape,
453
+ optional: newOptional,
454
+ checks: []
455
+ });
456
+ }
457
+ function omit(schema, mask) {
458
+ const newShape = { ...schema._zod.def.shape };
459
+ const newOptional = new Set(schema._zod.def.optional);
460
+ for (const key in mask) {
461
+ if (!(key in schema._zod.def.shape)) {
462
+ throw new Error(`Unrecognized key: "${key}"`);
463
+ }
464
+ if (!mask[key])
465
+ continue;
466
+ delete newShape[key];
467
+ newOptional.delete(key);
468
+ }
469
+ return clone(schema, {
470
+ ...schema._zod.def,
471
+ shape: newShape,
472
+ optional: [...newOptional],
473
+ checks: []
474
+ });
475
+ }
476
+ function extend(schema, shape) {
477
+ const def = {
478
+ ...schema._zod.def,
479
+ get shape() {
480
+ const _shape = { ...schema._zod.def.shape, ...shape };
481
+ assignProp(this, "shape", _shape);
482
+ return _shape;
483
+ },
484
+ checks: []
485
+ // delete existing checks
486
+ };
487
+ defineLazy(def, "shape", () => ({ ...schema._zod.def.shape, ...shape }));
488
+ return clone(schema, def);
489
+ }
490
+ function mergeObjectLike(a, b) {
491
+ const bKeys = new Set(Object.keys(b._zod.def.shape));
492
+ const optional2 = [...a._zod.def.optional.filter((k) => !bKeys.has(k)), ...b._zod.def.optional];
493
+ return clone(a, {
494
+ ...a._zod.def,
495
+ get shape() {
496
+ const _shape = { ...a._zod.def.shape, ...b._zod.def.shape };
497
+ assignProp(this, "shape", _shape);
498
+ return _shape;
499
+ },
500
+ optional: optional2,
501
+ catchall: b._zod.def.catchall,
502
+ checks: []
503
+ // delete existing checks
504
+ });
505
+ }
506
+ function extendObjectLike(a, b) {
507
+ const bKeys = new Set(Object.keys(b._zod.def.shape));
508
+ const optional2 = [...a._zod.def.optional.filter((k) => !bKeys.has(k)), ...b._zod.def.optional];
509
+ return clone(a, {
510
+ ...a._zod.def,
511
+ get shape() {
512
+ const _shape = { ...a._zod.def.shape, ...b._zod.def.shape };
513
+ assignProp(this, "shape", _shape);
514
+ return _shape;
515
+ },
516
+ optional: optional2,
517
+ checks: []
518
+ // delete existent checks
519
+ });
520
+ }
521
+ function partialObjectLike(Class, schema, mask) {
522
+ const shape = { ...schema._zod.def.shape };
523
+ const optional2 = new Set(schema._zod.def.optional);
524
+ if (mask) {
525
+ for (const key in mask) {
526
+ if (!(key in shape)) {
527
+ throw new Error(`Unrecognized key: "${key}"`);
528
+ }
529
+ if (!mask[key])
530
+ continue;
531
+ shape[key] = new Class({
532
+ type: "optional",
533
+ innerType: schema._zod.def.shape[key]
534
+ });
535
+ optional2.add(key);
536
+ }
537
+ } else {
538
+ for (const key in schema._zod.def.shape) {
539
+ shape[key] = new Class({
540
+ type: "optional",
541
+ innerType: schema._zod.def.shape[key]
542
+ });
543
+ optional2.add(key);
544
+ }
545
+ }
546
+ return clone(schema, {
547
+ ...schema._zod.def,
548
+ shape,
549
+ optional: [...optional2],
550
+ checks: []
551
+ });
552
+ }
553
+ function requiredObjectLike(Class, schema, mask) {
554
+ const shape = { ...schema._zod.def.shape };
555
+ if (mask) {
556
+ for (const key in mask) {
557
+ if (!(key in shape)) {
558
+ throw new Error(`Unrecognized key: "${key}"`);
559
+ }
560
+ if (!mask[key])
561
+ continue;
562
+ shape[key] = new Class({
563
+ type: "nonoptional",
564
+ innerType: schema._zod.def.shape[key]
565
+ });
566
+ }
567
+ } else {
568
+ for (const key in schema._zod.def.shape) {
569
+ shape[key] = new Class({
570
+ type: "nonoptional",
571
+ innerType: schema._zod.def.shape[key]
572
+ });
573
+ }
574
+ }
575
+ return clone(schema, {
576
+ ...schema._zod.def,
577
+ shape,
578
+ optional: [],
579
+ checks: []
580
+ });
581
+ }
582
+ function normalizeObjectLikeDef(def) {
583
+ if (def.type === "interface") {
584
+ const keys = Object.keys(def.shape);
585
+ const keySet = new Set(Object.keys(def.shape));
586
+ return {
587
+ shape: { ...def.shape },
588
+ // resolve getters
589
+ keys,
590
+ keySet,
591
+ numKeys: keys.length,
592
+ optionalKeys: new Set(def.optional)
593
+ };
594
+ }
595
+ if (def.type === "object") {
596
+ const keys = Object.keys(def.shape);
597
+ const keySet = new Set(Object.keys(def.shape));
598
+ return {
599
+ shape: { ...def.shape },
600
+ // resolve getters
601
+ keys,
602
+ keySet,
603
+ numKeys: keys.length,
604
+ optionalKeys: new Set(def.optional)
605
+ };
606
+ }
607
+ throw new Error("Invalid object-like type");
608
+ }
164
609
  function aborted(x, startIndex = 0) {
165
610
  for (let i = startIndex; i < x.issues.length; i++) {
166
611
  if (x.issues[i].continue !== true)
@@ -192,8 +637,36 @@ function finalizeIssue(iss, ctx, config2) {
192
637
  }
193
638
  return full;
194
639
  }
640
+ function getSizableOrigin(input) {
641
+ if (input instanceof Set)
642
+ return "set";
643
+ if (input instanceof Map)
644
+ return "map";
645
+ if (input instanceof File)
646
+ return "file";
647
+ return "unknown";
648
+ }
649
+ function getLengthableOrigin(input) {
650
+ if (Array.isArray(input))
651
+ return "array";
652
+ if (typeof input === "string")
653
+ return "string";
654
+ return "unknown";
655
+ }
656
+ function issue(...args) {
657
+ const [iss, input, inst] = args;
658
+ if (typeof iss === "string") {
659
+ return {
660
+ message: iss,
661
+ code: "custom",
662
+ input,
663
+ inst
664
+ };
665
+ }
666
+ return { ...iss };
667
+ }
195
668
 
196
- // ../../node_modules/.pnpm/@zod+core@0.1.0/node_modules/@zod/core/dist/esm/errors.js
669
+ // ../../node_modules/.pnpm/@zod+core@0.5.1/node_modules/@zod/core/dist/esm/errors.js
197
670
  var ZOD_ERROR = Symbol.for("{{zod.error}}");
198
671
  var $ZodError = class {
199
672
  get message() {
@@ -210,7 +683,7 @@ var $ZodError = class {
210
683
  }
211
684
  };
212
685
 
213
- // ../../node_modules/.pnpm/@zod+core@0.1.0/node_modules/@zod/core/dist/esm/parse.js
686
+ // ../../node_modules/.pnpm/@zod+core@0.5.1/node_modules/@zod/core/dist/esm/parse.js
214
687
  function _parse(schema, value, _ctx) {
215
688
  const ctx = _ctx ? { ..._ctx, async: false } : { async: false };
216
689
  const result = schema._zod.run({ value, issues: [] }, ctx);
@@ -262,12 +735,13 @@ var string = (params) => {
262
735
  };
263
736
  var boolean = /true|false/i;
264
737
 
265
- // ../../node_modules/.pnpm/@zod+core@0.1.0/node_modules/@zod/core/dist/esm/doc.js
738
+ // ../../node_modules/.pnpm/@zod+core@0.5.1/node_modules/@zod/core/dist/esm/doc.js
266
739
  var Doc = class {
267
- constructor(args) {
740
+ constructor(args = []) {
268
741
  this.content = [];
269
742
  this.indent = 0;
270
- this.args = args;
743
+ if (this)
744
+ this.args = args;
271
745
  }
272
746
  indented(fn) {
273
747
  this.indent += 1;
@@ -289,18 +763,28 @@ var Doc = class {
289
763
  }
290
764
  }
291
765
  compile() {
292
- const lines = [...this.content.map((x) => ` ${x}`)];
293
- return new Function(...this.args, lines.join("\n"));
766
+ const args = this?.args;
767
+ const content = this?.content ?? [``];
768
+ const lines = [...content.map((x) => ` ${x}`)];
769
+ return new Function(...args, lines.join("\n"));
294
770
  }
295
771
  };
296
772
 
297
- // ../../node_modules/.pnpm/@zod+core@0.1.0/node_modules/@zod/core/dist/esm/schemas.js
773
+ // ../../node_modules/.pnpm/@zod+core@0.5.1/node_modules/@zod/core/dist/esm/versions.js
774
+ var version = {
775
+ major: 0,
776
+ minor: 5,
777
+ patch: 1
778
+ };
779
+
780
+ // ../../node_modules/.pnpm/@zod+core@0.5.1/node_modules/@zod/core/dist/esm/schemas.js
298
781
  var $ZodType = /* @__PURE__ */ $constructor("$ZodType", (inst, def) => {
299
782
  var _a;
300
783
  inst ?? (inst = {});
301
784
  inst._zod.id = def.type + "_" + randomString(10);
302
785
  inst._zod.def = def;
303
786
  inst._zod.computed = inst._zod.computed || {};
787
+ inst._zod.version = version;
304
788
  const checks = [...inst._zod.def.checks ?? []];
305
789
  def.type;
306
790
  if (inst._zod.traits.has("$ZodCheck")) {
@@ -334,8 +818,7 @@ var $ZodType = /* @__PURE__ */ $constructor("$ZodType", (inst, def) => {
334
818
  throw new $ZodAsyncError();
335
819
  }
336
820
  if (asyncResult || _6 instanceof Promise) {
337
- asyncResult = asyncResult ?? Promise.resolve();
338
- asyncResult.then(async () => {
821
+ asyncResult = (asyncResult ?? Promise.resolve()).then(async () => {
339
822
  await _6;
340
823
  const nextLen = payload.issues.length;
341
824
  if (nextLen === currLen)
@@ -368,23 +851,23 @@ var $ZodType = /* @__PURE__ */ $constructor("$ZodType", (inst, def) => {
368
851
  return runChecks(result, checks, ctx);
369
852
  };
370
853
  }
371
- defineLazy(inst, "~standard", () => ({
854
+ inst["~standard"] = {
372
855
  validate: (value) => {
373
856
  const result = inst._zod.run({ value, issues: [] }, {});
374
857
  if (result instanceof Promise) {
375
858
  return result.then(({ issues, value: value2 }) => {
376
859
  if (issues.length === 0)
377
860
  return { value: value2 };
378
- return { issues };
861
+ return { issues: issues.map((iss) => finalizeIssue(iss, {}, config())) };
379
862
  });
380
863
  }
381
864
  if (result.issues.length === 0)
382
865
  return { value: result.value };
383
- return { issues: result.issues };
866
+ return { issues: result.issues.map((iss) => finalizeIssue(iss, {}, config())) };
384
867
  },
385
868
  vendor: "zod",
386
869
  version: 1
387
- }));
870
+ };
388
871
  });
389
872
  var $ZodString = /* @__PURE__ */ $constructor("$ZodString", (inst, def) => {
390
873
  $ZodType.init(inst, def);
@@ -495,7 +978,6 @@ function handleOptionalObjectResult(result, final, key, input) {
495
978
  }
496
979
  var $ZodObjectLike = /* @__PURE__ */ $constructor("$ZodObjectLike", (inst, def) => {
497
980
  $ZodType.init(inst, def);
498
- defineLazy(inst._zod, "shape", () => def.shape);
499
981
  const _normalized = cached(() => {
500
982
  const keys = Object.keys(def.shape);
501
983
  return {
@@ -593,7 +1075,9 @@ var $ZodObjectLike = /* @__PURE__ */ $constructor("$ZodObjectLike", (inst, def)
593
1075
  const fastEnabled = allowsEval.value;
594
1076
  const isObject2 = isObject;
595
1077
  const { catchall } = def;
1078
+ let value;
596
1079
  inst._zod.parse = (payload, ctx) => {
1080
+ value ?? (value = _normalized.value);
597
1081
  const input = payload.value;
598
1082
  if (!isObject2(input)) {
599
1083
  payload.issues.push({
@@ -611,7 +1095,7 @@ var $ZodObjectLike = /* @__PURE__ */ $constructor("$ZodObjectLike", (inst, def)
611
1095
  payload = fastpass(payload, ctx);
612
1096
  } else {
613
1097
  payload.value = {};
614
- const { keys, shape, optionalKeys } = _normalized.value;
1098
+ const { keys, shape, optionalKeys } = value;
615
1099
  for (const key of keys) {
616
1100
  const valueSchema = shape[key];
617
1101
  const r = valueSchema._zod.run({ value: input[key], issues: [] }, ctx);
@@ -631,14 +1115,17 @@ var $ZodObjectLike = /* @__PURE__ */ $constructor("$ZodObjectLike", (inst, def)
631
1115
  return proms.length ? Promise.all(proms).then(() => payload) : payload;
632
1116
  }
633
1117
  const unrecognized = [];
1118
+ const keySet = value.keySet;
1119
+ const _catchall = catchall._zod;
1120
+ const t = _catchall.def.type;
634
1121
  for (const key of Object.keys(input)) {
635
- if (_normalized.value.keySet.has(key))
1122
+ if (keySet.has(key))
636
1123
  continue;
637
- if (catchall._zod.def.type === "never") {
1124
+ if (t === "never") {
638
1125
  unrecognized.push(key);
639
1126
  continue;
640
1127
  }
641
- const r = catchall._zod.run({ value: input[key], issues: [] }, ctx);
1128
+ const r = _catchall.run({ value: input[key], issues: [] }, ctx);
642
1129
  if (r instanceof Promise) {
643
1130
  proms.push(r.then((r2) => handleObjectResult(r2, payload, key)));
644
1131
  } else {
@@ -679,7 +1166,7 @@ var $ZodOptional = /* @__PURE__ */ $constructor("$ZodOptional", (inst, def) => {
679
1166
  };
680
1167
  });
681
1168
 
682
- // ../../node_modules/.pnpm/@zod+core@0.1.0/node_modules/@zod/core/dist/esm/api.js
1169
+ // ../../node_modules/.pnpm/@zod+core@0.5.1/node_modules/@zod/core/dist/esm/api.js
683
1170
  function _string(Class, params) {
684
1171
  return new Class({
685
1172
  type: "string",
@@ -699,7 +1186,7 @@ function _unknown(Class, params) {
699
1186
  });
700
1187
  }
701
1188
 
702
- // ../../node_modules/.pnpm/@zod+mini@4.0.0-beta.0/node_modules/@zod/mini/dist/esm/parse.js
1189
+ // ../../node_modules/.pnpm/@zod+mini@4.0.0-beta.20250415T232143_a6e9e9ac6408e2c9467a9c53ed9f86b4/node_modules/@zod/mini/dist/esm/parse.js
703
1190
  var parse2 = /* @__PURE__ */ _parse.bind({ Error: $ZodError });
704
1191
  var safeParse = /* @__PURE__ */ _safeParse.bind({ Error: $ZodError });
705
1192
  var parseAsync2 = /* @__PURE__ */ _parseAsync.bind({ Error: $ZodError });
@@ -707,7 +1194,7 @@ var safeParseAsync = /* @__PURE__ */ _safeParseAsync.bind({
707
1194
  Error: $ZodError
708
1195
  });
709
1196
 
710
- // ../../node_modules/.pnpm/@zod+mini@4.0.0-beta.0/node_modules/@zod/mini/dist/esm/schemas.js
1197
+ // ../../node_modules/.pnpm/@zod+mini@4.0.0-beta.20250415T232143_a6e9e9ac6408e2c9467a9c53ed9f86b4/node_modules/@zod/mini/dist/esm/schemas.js
711
1198
  var ZodMiniType = /* @__PURE__ */ $constructor("ZodMiniType", (inst, def) => {
712
1199
  if (!inst._zod)
713
1200
  throw new Error("Uninitialized schema in mixin ZodMiniType.");
@@ -765,7 +1252,7 @@ function array(element, params) {
765
1252
  // get element() {
766
1253
  // return element;
767
1254
  // },
768
- ...normalizeParams(params)
1255
+ ...util_exports.normalizeParams(params)
769
1256
  });
770
1257
  }
771
1258
  var ZodMiniObject = /* @__PURE__ */ $constructor("ZodMiniObject", (inst, def) => {
@@ -777,9 +1264,9 @@ function object(shape, params) {
777
1264
  type: "object",
778
1265
  shape: shape ?? {},
779
1266
  get optional() {
780
- return optionalObjectKeys(shape ?? {});
1267
+ return util_exports.optionalObjectKeys(shape ?? {});
781
1268
  },
782
- ...normalizeParams(params)
1269
+ ...util_exports.normalizeParams(params)
783
1270
  };
784
1271
  return new ZodMiniObject(def);
785
1272
  }
@@ -791,7 +1278,7 @@ function optional(innerType, params) {
791
1278
  return new ZodMiniOptional({
792
1279
  type: "optional",
793
1280
  innerType,
794
- ...normalizeParams(params)
1281
+ ...util_exports.normalizeParams(params)
795
1282
  });
796
1283
  }
797
1284
 
@@ -1194,10 +1681,10 @@ function isFunctionOfUseEffectSetup(node) {
1194
1681
  function isFunctionOfUseEffectCleanup(node) {
1195
1682
  if (node == null) return false;
1196
1683
  const pReturn = AST9__namespace.findParentNode(node, AST9__namespace.is(types.AST_NODE_TYPES.ReturnStatement));
1197
- const pFaunction = AST9__namespace.findParentNode(node, AST9__namespace.isFunction);
1684
+ const pFunction = AST9__namespace.findParentNode(node, AST9__namespace.isFunction);
1198
1685
  const pFunctionOfReturn = AST9__namespace.findParentNode(pReturn, AST9__namespace.isFunction);
1199
- if (pFaunction !== pFunctionOfReturn) return false;
1200
- return isFunctionOfUseEffectSetup(pFaunction);
1686
+ if (pFunction !== pFunctionOfReturn) return false;
1687
+ return isFunctionOfUseEffectSetup(pFunction);
1201
1688
  }
1202
1689
  function stringifyJsx(node) {
1203
1690
  switch (node.type) {