react-luminus-components 1.3.23 → 1.3.25
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/.vite/manifest.json +53 -50
- package/dist/{PrimaryButton-DJLMLJJ7.js → PrimaryButton-Bewa28m7.js} +1 -1
- package/dist/{PrimaryButton-Cx3E5x2b.cjs → PrimaryButton-DXGul-f9.cjs} +1 -1
- package/dist/{SimpleTooltip-CIPtCvs1.js → SimpleTooltip-B7H1sJLN.js} +1 -1
- package/dist/{SimpleTooltip-Dtb0OmTb.cjs → SimpleTooltip-Cssc2MLs.cjs} +1 -1
- package/dist/{UserAvatarToggle-CsTHq7yG.js → UserAvatarToggle-C1CRXpP2.js} +5 -0
- package/dist/{UserAvatarToggle-DJWp7_0z.cjs → UserAvatarToggle-DYIBvTYX.cjs} +1 -1
- package/dist/contexts/delegation/DelegationContext.d.ts +19 -3
- package/dist/contexts/delegation/DelegationProvider.d.ts +2 -1
- package/dist/contexts/index.d.ts +1 -0
- package/dist/contexts.cjs.js +1 -1
- package/dist/contexts.es.js +220 -191
- package/dist/{dateUtils-7nL2BXlo.js → dateUtils-C7tHbjab.js} +28 -23
- package/dist/{dateUtils-DUA3CKds.cjs → dateUtils-b-AkAh2Y.cjs} +1 -1
- package/dist/hooks/useGetApiData/useGetApiData.d.ts +1 -1
- package/dist/hooks.cjs.js +1 -1
- package/dist/hooks.es.js +516 -543
- package/dist/layout.cjs.js +1 -1
- package/dist/layout.es.js +3 -3
- package/dist/main.cjs.js +1 -1
- package/dist/main.es.js +4 -4
- package/dist/models/types/UseGetApiDataOptions.d.ts +1 -0
- package/dist/useLocalStorageState-CxsNjf78.cjs +1 -0
- package/dist/useLocalStorageState-DblJQuM7.js +73 -0
- package/dist/{usePermissions-DUTyAK35.cjs → usePermissions-BEKIk6u3.cjs} +1 -1
- package/dist/{usePermissions-B1eRrluF.js → usePermissions-avh3rydq.js} +1 -1
- package/dist/utils/date/dateUtils.d.ts +1 -0
- package/dist/utils.cjs.js +1 -1
- package/dist/utils.es.js +16 -15
- package/package.json +1 -1
- package/dist/useLocalStorageState-Cg6ipags.js +0 -40
- package/dist/useLocalStorageState-CkEIA-gx.cjs +0 -1
package/dist/hooks.es.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { Q as
|
|
2
|
-
import { aI as
|
|
3
|
-
import { b as
|
|
4
|
-
import { useContext as
|
|
5
|
-
import { f as
|
|
6
|
-
import { i as
|
|
1
|
+
import { Q as We, ab as Ye } from "./UserAvatarToggle-C1CRXpP2.js";
|
|
2
|
+
import { aI as lr, af as fr, aH as hr } from "./UserAvatarToggle-C1CRXpP2.js";
|
|
3
|
+
import { c as pr, b as yr, a as _r, u as vr } from "./useLocalStorageState-DblJQuM7.js";
|
|
4
|
+
import { useContext as He, useState as Je, useEffect as Ge } from "react";
|
|
5
|
+
import { f as Qe } from "./latinize-BQrinury.js";
|
|
6
|
+
import { i as Xe } from "./dateUtils-C7tHbjab.js";
|
|
7
7
|
import "react-hook-form";
|
|
8
|
-
import { b as
|
|
9
|
-
import { u as
|
|
8
|
+
import { b as xr, u as kr, a as br } from "./useFormControlType-oJGqgThz.js";
|
|
9
|
+
import { u as Tr } from "./usePermissions-avh3rydq.js";
|
|
10
10
|
var x;
|
|
11
11
|
(function(r) {
|
|
12
12
|
r.assertEqual = (s) => s;
|
|
@@ -43,14 +43,14 @@ var x;
|
|
|
43
43
|
}
|
|
44
44
|
r.joinValues = n, r.jsonStringifyReplacer = (s, a) => typeof a == "bigint" ? a.toString() : a;
|
|
45
45
|
})(x || (x = {}));
|
|
46
|
-
var
|
|
46
|
+
var Se;
|
|
47
47
|
(function(r) {
|
|
48
48
|
r.mergeShapes = (e, t) => ({
|
|
49
49
|
...e,
|
|
50
50
|
...t
|
|
51
51
|
// second overwrites first
|
|
52
52
|
});
|
|
53
|
-
})(
|
|
53
|
+
})(Se || (Se = {}));
|
|
54
54
|
const f = x.arrayToEnum([
|
|
55
55
|
"string",
|
|
56
56
|
"nan",
|
|
@@ -72,7 +72,7 @@ const f = x.arrayToEnum([
|
|
|
72
72
|
"never",
|
|
73
73
|
"map",
|
|
74
74
|
"set"
|
|
75
|
-
]),
|
|
75
|
+
]), P = (r) => {
|
|
76
76
|
switch (typeof r) {
|
|
77
77
|
case "undefined":
|
|
78
78
|
return f.undefined;
|
|
@@ -110,7 +110,7 @@ const f = x.arrayToEnum([
|
|
|
110
110
|
"invalid_intersection_types",
|
|
111
111
|
"not_multiple_of",
|
|
112
112
|
"not_finite"
|
|
113
|
-
]),
|
|
113
|
+
]), Ke = (r) => JSON.stringify(r, null, 2).replace(/"([^"]+)":/g, "$1:");
|
|
114
114
|
class N extends Error {
|
|
115
115
|
constructor(e) {
|
|
116
116
|
super(), this.issues = [], this.addIssue = (n) => {
|
|
@@ -171,7 +171,7 @@ class N extends Error {
|
|
|
171
171
|
}
|
|
172
172
|
}
|
|
173
173
|
N.create = (r) => new N(r);
|
|
174
|
-
const
|
|
174
|
+
const G = (r, e) => {
|
|
175
175
|
let t;
|
|
176
176
|
switch (r.code) {
|
|
177
177
|
case d.invalid_type:
|
|
@@ -227,14 +227,14 @@ const X = (r, e) => {
|
|
|
227
227
|
}
|
|
228
228
|
return { message: t };
|
|
229
229
|
};
|
|
230
|
-
let
|
|
231
|
-
function
|
|
232
|
-
|
|
230
|
+
let Ae = G;
|
|
231
|
+
function Fe(r) {
|
|
232
|
+
Ae = r;
|
|
233
233
|
}
|
|
234
|
-
function
|
|
235
|
-
return
|
|
234
|
+
function ye() {
|
|
235
|
+
return Ae;
|
|
236
236
|
}
|
|
237
|
-
const
|
|
237
|
+
const _e = (r) => {
|
|
238
238
|
const { data: e, path: t, errorMaps: n, issueData: s } = r, a = [...t, ...s.path || []], i = {
|
|
239
239
|
...s,
|
|
240
240
|
path: a
|
|
@@ -254,9 +254,9 @@ const xe = (r) => {
|
|
|
254
254
|
path: a,
|
|
255
255
|
message: o
|
|
256
256
|
};
|
|
257
|
-
},
|
|
257
|
+
}, et = [];
|
|
258
258
|
function l(r, e) {
|
|
259
|
-
const t =
|
|
259
|
+
const t = ye(), n = _e({
|
|
260
260
|
issueData: e,
|
|
261
261
|
data: r.data,
|
|
262
262
|
path: r.path,
|
|
@@ -264,7 +264,7 @@ function l(r, e) {
|
|
|
264
264
|
r.common.contextualErrorMap,
|
|
265
265
|
r.schemaErrorMap,
|
|
266
266
|
t,
|
|
267
|
-
t ===
|
|
267
|
+
t === G ? void 0 : G
|
|
268
268
|
// then global default map
|
|
269
269
|
].filter((s) => !!s)
|
|
270
270
|
});
|
|
@@ -284,7 +284,7 @@ class Z {
|
|
|
284
284
|
const n = [];
|
|
285
285
|
for (const s of t) {
|
|
286
286
|
if (s.status === "aborted")
|
|
287
|
-
return
|
|
287
|
+
return p;
|
|
288
288
|
s.status === "dirty" && e.dirty(), n.push(s.value);
|
|
289
289
|
}
|
|
290
290
|
return { status: e.value, value: n };
|
|
@@ -305,21 +305,21 @@ class Z {
|
|
|
305
305
|
for (const s of t) {
|
|
306
306
|
const { key: a, value: i } = s;
|
|
307
307
|
if (a.status === "aborted" || i.status === "aborted")
|
|
308
|
-
return
|
|
308
|
+
return p;
|
|
309
309
|
a.status === "dirty" && e.dirty(), i.status === "dirty" && e.dirty(), a.value !== "__proto__" && (typeof i.value < "u" || s.alwaysSet) && (n[a.value] = i.value);
|
|
310
310
|
}
|
|
311
311
|
return { status: e.value, value: n };
|
|
312
312
|
}
|
|
313
313
|
}
|
|
314
|
-
const
|
|
314
|
+
const p = Object.freeze({
|
|
315
315
|
status: "aborted"
|
|
316
|
-
}),
|
|
317
|
-
function
|
|
316
|
+
}), H = (r) => ({ status: "dirty", value: r }), S = (r) => ({ status: "valid", value: r }), Ce = (r) => r.status === "aborted", Oe = (r) => r.status === "dirty", ee = (r) => r.status === "valid", te = (r) => typeof Promise < "u" && r instanceof Promise;
|
|
317
|
+
function ve(r, e, t, n) {
|
|
318
318
|
if (typeof e == "function" ? r !== e || !n : !e.has(r))
|
|
319
319
|
throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
320
320
|
return e.get(r);
|
|
321
321
|
}
|
|
322
|
-
function
|
|
322
|
+
function Me(r, e, t, n, s) {
|
|
323
323
|
if (typeof e == "function" ? r !== e || !s : !e.has(r))
|
|
324
324
|
throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
325
325
|
return e.set(r, t), t;
|
|
@@ -328,7 +328,7 @@ var h;
|
|
|
328
328
|
(function(r) {
|
|
329
329
|
r.errToObj = (e) => typeof e == "string" ? { message: e } : e || {}, r.toString = (e) => typeof e == "string" ? e : e == null ? void 0 : e.message;
|
|
330
330
|
})(h || (h = {}));
|
|
331
|
-
var
|
|
331
|
+
var K, F;
|
|
332
332
|
class A {
|
|
333
333
|
constructor(e, t, n, s) {
|
|
334
334
|
this._cachedPath = [], this.parent = e, this.data = t, this._path = n, this._key = s;
|
|
@@ -337,8 +337,8 @@ class A {
|
|
|
337
337
|
return this._cachedPath.length || (this._key instanceof Array ? this._cachedPath.push(...this._path, ...this._key) : this._cachedPath.push(...this._path, this._key)), this._cachedPath;
|
|
338
338
|
}
|
|
339
339
|
}
|
|
340
|
-
const
|
|
341
|
-
if (
|
|
340
|
+
const Ie = (r, e) => {
|
|
341
|
+
if (ee(e))
|
|
342
342
|
return { success: !0, data: e.value };
|
|
343
343
|
if (!r.common.issues.length)
|
|
344
344
|
throw new Error("Validation failed but no issues detected.");
|
|
@@ -352,7 +352,7 @@ const Ae = (r, e) => {
|
|
|
352
352
|
}
|
|
353
353
|
};
|
|
354
354
|
};
|
|
355
|
-
function
|
|
355
|
+
function _(r) {
|
|
356
356
|
if (!r)
|
|
357
357
|
return {};
|
|
358
358
|
const { errorMap: e, invalid_type_error: t, required_error: n, description: s } = r;
|
|
@@ -360,11 +360,11 @@ function v(r) {
|
|
|
360
360
|
throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);
|
|
361
361
|
return e ? { errorMap: e, description: s } : { errorMap: (i, o) => {
|
|
362
362
|
var u, c;
|
|
363
|
-
const { message:
|
|
364
|
-
return i.code === "invalid_enum_value" ? { message:
|
|
363
|
+
const { message: y } = r;
|
|
364
|
+
return i.code === "invalid_enum_value" ? { message: y ?? o.defaultError } : typeof o.data > "u" ? { message: (u = y ?? n) !== null && u !== void 0 ? u : o.defaultError } : i.code !== "invalid_type" ? { message: o.defaultError } : { message: (c = y ?? t) !== null && c !== void 0 ? c : o.defaultError };
|
|
365
365
|
}, description: s };
|
|
366
366
|
}
|
|
367
|
-
class
|
|
367
|
+
class v {
|
|
368
368
|
constructor(e) {
|
|
369
369
|
this.spa = this.safeParseAsync, this._def = e, this.parse = this.parse.bind(this), this.safeParse = this.safeParse.bind(this), this.parseAsync = this.parseAsync.bind(this), this.safeParseAsync = this.safeParseAsync.bind(this), this.spa = this.spa.bind(this), this.refine = this.refine.bind(this), this.refinement = this.refinement.bind(this), this.superRefine = this.superRefine.bind(this), this.optional = this.optional.bind(this), this.nullable = this.nullable.bind(this), this.nullish = this.nullish.bind(this), this.array = this.array.bind(this), this.promise = this.promise.bind(this), this.or = this.or.bind(this), this.and = this.and.bind(this), this.transform = this.transform.bind(this), this.brand = this.brand.bind(this), this.default = this.default.bind(this), this.catch = this.catch.bind(this), this.describe = this.describe.bind(this), this.pipe = this.pipe.bind(this), this.readonly = this.readonly.bind(this), this.isNullable = this.isNullable.bind(this), this.isOptional = this.isOptional.bind(this);
|
|
370
370
|
}
|
|
@@ -372,13 +372,13 @@ class g {
|
|
|
372
372
|
return this._def.description;
|
|
373
373
|
}
|
|
374
374
|
_getType(e) {
|
|
375
|
-
return
|
|
375
|
+
return P(e.data);
|
|
376
376
|
}
|
|
377
377
|
_getOrReturnCtx(e, t) {
|
|
378
378
|
return t || {
|
|
379
379
|
common: e.parent.common,
|
|
380
380
|
data: e.data,
|
|
381
|
-
parsedType:
|
|
381
|
+
parsedType: P(e.data),
|
|
382
382
|
schemaErrorMap: this._def.errorMap,
|
|
383
383
|
path: e.path,
|
|
384
384
|
parent: e.parent
|
|
@@ -390,7 +390,7 @@ class g {
|
|
|
390
390
|
ctx: {
|
|
391
391
|
common: e.parent.common,
|
|
392
392
|
data: e.data,
|
|
393
|
-
parsedType:
|
|
393
|
+
parsedType: P(e.data),
|
|
394
394
|
schemaErrorMap: this._def.errorMap,
|
|
395
395
|
path: e.path,
|
|
396
396
|
parent: e.parent
|
|
@@ -399,7 +399,7 @@ class g {
|
|
|
399
399
|
}
|
|
400
400
|
_parseSync(e) {
|
|
401
401
|
const t = this._parse(e);
|
|
402
|
-
if (
|
|
402
|
+
if (te(t))
|
|
403
403
|
throw new Error("Synchronous parse encountered promise.");
|
|
404
404
|
return t;
|
|
405
405
|
}
|
|
@@ -425,9 +425,9 @@ class g {
|
|
|
425
425
|
schemaErrorMap: this._def.errorMap,
|
|
426
426
|
parent: null,
|
|
427
427
|
data: e,
|
|
428
|
-
parsedType:
|
|
428
|
+
parsedType: P(e)
|
|
429
429
|
}, a = this._parseSync({ data: e, path: s.path, parent: s });
|
|
430
|
-
return
|
|
430
|
+
return Ie(s, a);
|
|
431
431
|
}
|
|
432
432
|
async parseAsync(e, t) {
|
|
433
433
|
const n = await this.safeParseAsync(e, t);
|
|
@@ -446,9 +446,9 @@ class g {
|
|
|
446
446
|
schemaErrorMap: this._def.errorMap,
|
|
447
447
|
parent: null,
|
|
448
448
|
data: e,
|
|
449
|
-
parsedType:
|
|
450
|
-
}, s = this._parse({ data: e, path: n.path, parent: n }), a = await (
|
|
451
|
-
return
|
|
449
|
+
parsedType: P(e)
|
|
450
|
+
}, s = this._parse({ data: e, path: n.path, parent: n }), a = await (te(s) ? s : Promise.resolve(s));
|
|
451
|
+
return Ie(n, a);
|
|
452
452
|
}
|
|
453
453
|
refine(e, t) {
|
|
454
454
|
const n = (s) => typeof t == "string" || typeof t > "u" ? { message: t } : typeof t == "function" ? t(s) : t;
|
|
@@ -466,7 +466,7 @@ class g {
|
|
|
466
466
|
_refinement(e) {
|
|
467
467
|
return new I({
|
|
468
468
|
schema: this,
|
|
469
|
-
typeName:
|
|
469
|
+
typeName: m.ZodEffects,
|
|
470
470
|
effect: { type: "refinement", refinement: e }
|
|
471
471
|
});
|
|
472
472
|
}
|
|
@@ -477,7 +477,7 @@ class g {
|
|
|
477
477
|
return j.create(this, this._def);
|
|
478
478
|
}
|
|
479
479
|
nullable() {
|
|
480
|
-
return
|
|
480
|
+
return q.create(this, this._def);
|
|
481
481
|
}
|
|
482
482
|
nullish() {
|
|
483
483
|
return this.nullable().optional();
|
|
@@ -486,45 +486,45 @@ class g {
|
|
|
486
486
|
return R.create(this, this._def);
|
|
487
487
|
}
|
|
488
488
|
promise() {
|
|
489
|
-
return
|
|
489
|
+
return X.create(this, this._def);
|
|
490
490
|
}
|
|
491
491
|
or(e) {
|
|
492
|
-
return
|
|
492
|
+
return ae.create([this, e], this._def);
|
|
493
493
|
}
|
|
494
494
|
and(e) {
|
|
495
|
-
return
|
|
495
|
+
return ie.create(this, e, this._def);
|
|
496
496
|
}
|
|
497
497
|
transform(e) {
|
|
498
498
|
return new I({
|
|
499
|
-
...
|
|
499
|
+
..._(this._def),
|
|
500
500
|
schema: this,
|
|
501
|
-
typeName:
|
|
501
|
+
typeName: m.ZodEffects,
|
|
502
502
|
effect: { type: "transform", transform: e }
|
|
503
503
|
});
|
|
504
504
|
}
|
|
505
505
|
default(e) {
|
|
506
506
|
const t = typeof e == "function" ? e : () => e;
|
|
507
|
-
return new
|
|
508
|
-
...
|
|
507
|
+
return new le({
|
|
508
|
+
..._(this._def),
|
|
509
509
|
innerType: this,
|
|
510
510
|
defaultValue: t,
|
|
511
|
-
typeName:
|
|
511
|
+
typeName: m.ZodDefault
|
|
512
512
|
});
|
|
513
513
|
}
|
|
514
514
|
brand() {
|
|
515
|
-
return new
|
|
516
|
-
typeName:
|
|
515
|
+
return new Ee({
|
|
516
|
+
typeName: m.ZodBranded,
|
|
517
517
|
type: this,
|
|
518
|
-
...
|
|
518
|
+
..._(this._def)
|
|
519
519
|
});
|
|
520
520
|
}
|
|
521
521
|
catch(e) {
|
|
522
522
|
const t = typeof e == "function" ? e : () => e;
|
|
523
|
-
return new
|
|
524
|
-
...
|
|
523
|
+
return new fe({
|
|
524
|
+
..._(this._def),
|
|
525
525
|
innerType: this,
|
|
526
526
|
catchValue: t,
|
|
527
|
-
typeName:
|
|
527
|
+
typeName: m.ZodCatch
|
|
528
528
|
});
|
|
529
529
|
}
|
|
530
530
|
describe(e) {
|
|
@@ -535,10 +535,10 @@ class g {
|
|
|
535
535
|
});
|
|
536
536
|
}
|
|
537
537
|
pipe(e) {
|
|
538
|
-
return
|
|
538
|
+
return me.create(this, e);
|
|
539
539
|
}
|
|
540
540
|
readonly() {
|
|
541
|
-
return
|
|
541
|
+
return he.create(this);
|
|
542
542
|
}
|
|
543
543
|
isOptional() {
|
|
544
544
|
return this.safeParse(void 0).success;
|
|
@@ -547,25 +547,25 @@ class g {
|
|
|
547
547
|
return this.safeParse(null).success;
|
|
548
548
|
}
|
|
549
549
|
}
|
|
550
|
-
const
|
|
551
|
-
let
|
|
552
|
-
const
|
|
553
|
-
function
|
|
550
|
+
const tt = /^c[^\s-]{8,}$/i, rt = /^[0-9a-z]+$/, nt = /^[0-9A-HJKMNP-TV-Z]{26}$/, st = /^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i, at = /^[a-z0-9_-]{21}$/i, it = /^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/, ot = /^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i, dt = "^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";
|
|
551
|
+
let Ze;
|
|
552
|
+
const ct = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/, ut = /^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/, lt = /^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/, $e = "((\\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])))", ft = new RegExp(`^${$e}$`);
|
|
553
|
+
function ze(r) {
|
|
554
554
|
let e = "([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d";
|
|
555
555
|
return r.precision ? e = `${e}\\.\\d{${r.precision}}` : r.precision == null && (e = `${e}(\\.\\d+)?`), e;
|
|
556
556
|
}
|
|
557
|
-
function
|
|
558
|
-
return new RegExp(`^${
|
|
557
|
+
function ht(r) {
|
|
558
|
+
return new RegExp(`^${ze(r)}$`);
|
|
559
559
|
}
|
|
560
|
-
function
|
|
561
|
-
let e = `${
|
|
560
|
+
function Pe(r) {
|
|
561
|
+
let e = `${$e}T${ze(r)}`;
|
|
562
562
|
const t = [];
|
|
563
563
|
return t.push(r.local ? "Z?" : "Z"), r.offset && t.push("([+-]\\d{2}:?\\d{2})"), e = `${e}(${t.join("|")})`, new RegExp(`^${e}$`);
|
|
564
564
|
}
|
|
565
|
-
function
|
|
566
|
-
return !!((e === "v4" || !e) &&
|
|
565
|
+
function mt(r, e) {
|
|
566
|
+
return !!((e === "v4" || !e) && ct.test(r) || (e === "v6" || !e) && ut.test(r));
|
|
567
567
|
}
|
|
568
|
-
class E extends
|
|
568
|
+
class E extends v {
|
|
569
569
|
_parse(e) {
|
|
570
570
|
if (this._def.coerce && (e.data = String(e.data)), this._getType(e) !== f.string) {
|
|
571
571
|
const a = this._getOrReturnCtx(e);
|
|
@@ -573,7 +573,7 @@ class E extends g {
|
|
|
573
573
|
code: d.invalid_type,
|
|
574
574
|
expected: f.string,
|
|
575
575
|
received: a.parsedType
|
|
576
|
-
}),
|
|
576
|
+
}), p;
|
|
577
577
|
}
|
|
578
578
|
const n = new Z();
|
|
579
579
|
let s;
|
|
@@ -614,43 +614,43 @@ class E extends g {
|
|
|
614
614
|
message: a.message
|
|
615
615
|
}), n.dirty());
|
|
616
616
|
} else if (a.kind === "email")
|
|
617
|
-
|
|
617
|
+
ot.test(e.data) || (s = this._getOrReturnCtx(e, s), l(s, {
|
|
618
618
|
validation: "email",
|
|
619
619
|
code: d.invalid_string,
|
|
620
620
|
message: a.message
|
|
621
621
|
}), n.dirty());
|
|
622
622
|
else if (a.kind === "emoji")
|
|
623
|
-
|
|
623
|
+
Ze || (Ze = new RegExp(dt, "u")), Ze.test(e.data) || (s = this._getOrReturnCtx(e, s), l(s, {
|
|
624
624
|
validation: "emoji",
|
|
625
625
|
code: d.invalid_string,
|
|
626
626
|
message: a.message
|
|
627
627
|
}), n.dirty());
|
|
628
628
|
else if (a.kind === "uuid")
|
|
629
|
-
|
|
629
|
+
st.test(e.data) || (s = this._getOrReturnCtx(e, s), l(s, {
|
|
630
630
|
validation: "uuid",
|
|
631
631
|
code: d.invalid_string,
|
|
632
632
|
message: a.message
|
|
633
633
|
}), n.dirty());
|
|
634
634
|
else if (a.kind === "nanoid")
|
|
635
|
-
|
|
635
|
+
at.test(e.data) || (s = this._getOrReturnCtx(e, s), l(s, {
|
|
636
636
|
validation: "nanoid",
|
|
637
637
|
code: d.invalid_string,
|
|
638
638
|
message: a.message
|
|
639
639
|
}), n.dirty());
|
|
640
640
|
else if (a.kind === "cuid")
|
|
641
|
-
|
|
641
|
+
tt.test(e.data) || (s = this._getOrReturnCtx(e, s), l(s, {
|
|
642
642
|
validation: "cuid",
|
|
643
643
|
code: d.invalid_string,
|
|
644
644
|
message: a.message
|
|
645
645
|
}), n.dirty());
|
|
646
646
|
else if (a.kind === "cuid2")
|
|
647
|
-
|
|
647
|
+
rt.test(e.data) || (s = this._getOrReturnCtx(e, s), l(s, {
|
|
648
648
|
validation: "cuid2",
|
|
649
649
|
code: d.invalid_string,
|
|
650
650
|
message: a.message
|
|
651
651
|
}), n.dirty());
|
|
652
652
|
else if (a.kind === "ulid")
|
|
653
|
-
|
|
653
|
+
nt.test(e.data) || (s = this._getOrReturnCtx(e, s), l(s, {
|
|
654
654
|
validation: "ulid",
|
|
655
655
|
code: d.invalid_string,
|
|
656
656
|
message: a.message
|
|
@@ -682,27 +682,27 @@ class E extends g {
|
|
|
682
682
|
code: d.invalid_string,
|
|
683
683
|
validation: { endsWith: a.value },
|
|
684
684
|
message: a.message
|
|
685
|
-
}), n.dirty()) : a.kind === "datetime" ?
|
|
685
|
+
}), n.dirty()) : a.kind === "datetime" ? Pe(a).test(e.data) || (s = this._getOrReturnCtx(e, s), l(s, {
|
|
686
686
|
code: d.invalid_string,
|
|
687
687
|
validation: "datetime",
|
|
688
688
|
message: a.message
|
|
689
|
-
}), n.dirty()) : a.kind === "date" ?
|
|
689
|
+
}), n.dirty()) : a.kind === "date" ? ft.test(e.data) || (s = this._getOrReturnCtx(e, s), l(s, {
|
|
690
690
|
code: d.invalid_string,
|
|
691
691
|
validation: "date",
|
|
692
692
|
message: a.message
|
|
693
|
-
}), n.dirty()) : a.kind === "time" ?
|
|
693
|
+
}), n.dirty()) : a.kind === "time" ? ht(a).test(e.data) || (s = this._getOrReturnCtx(e, s), l(s, {
|
|
694
694
|
code: d.invalid_string,
|
|
695
695
|
validation: "time",
|
|
696
696
|
message: a.message
|
|
697
|
-
}), n.dirty()) : a.kind === "duration" ?
|
|
697
|
+
}), n.dirty()) : a.kind === "duration" ? it.test(e.data) || (s = this._getOrReturnCtx(e, s), l(s, {
|
|
698
698
|
validation: "duration",
|
|
699
699
|
code: d.invalid_string,
|
|
700
700
|
message: a.message
|
|
701
|
-
}), n.dirty()) : a.kind === "ip" ?
|
|
701
|
+
}), n.dirty()) : a.kind === "ip" ? mt(e.data, a.version) || (s = this._getOrReturnCtx(e, s), l(s, {
|
|
702
702
|
validation: "ip",
|
|
703
703
|
code: d.invalid_string,
|
|
704
704
|
message: a.message
|
|
705
|
-
}), n.dirty()) : a.kind === "base64" ?
|
|
705
|
+
}), n.dirty()) : a.kind === "base64" ? lt.test(e.data) || (s = this._getOrReturnCtx(e, s), l(s, {
|
|
706
706
|
validation: "base64",
|
|
707
707
|
code: d.invalid_string,
|
|
708
708
|
message: a.message
|
|
@@ -919,16 +919,16 @@ E.create = (r) => {
|
|
|
919
919
|
var e;
|
|
920
920
|
return new E({
|
|
921
921
|
checks: [],
|
|
922
|
-
typeName:
|
|
922
|
+
typeName: m.ZodString,
|
|
923
923
|
coerce: (e = r == null ? void 0 : r.coerce) !== null && e !== void 0 ? e : !1,
|
|
924
|
-
...
|
|
924
|
+
..._(r)
|
|
925
925
|
});
|
|
926
926
|
};
|
|
927
|
-
function
|
|
927
|
+
function pt(r, e) {
|
|
928
928
|
const t = (r.toString().split(".")[1] || "").length, n = (e.toString().split(".")[1] || "").length, s = t > n ? t : n, a = parseInt(r.toFixed(s).replace(".", "")), i = parseInt(e.toFixed(s).replace(".", ""));
|
|
929
929
|
return a % i / Math.pow(10, s);
|
|
930
930
|
}
|
|
931
|
-
class V extends
|
|
931
|
+
class V extends v {
|
|
932
932
|
constructor() {
|
|
933
933
|
super(...arguments), this.min = this.gte, this.max = this.lte, this.step = this.multipleOf;
|
|
934
934
|
}
|
|
@@ -939,7 +939,7 @@ class V extends g {
|
|
|
939
939
|
code: d.invalid_type,
|
|
940
940
|
expected: f.number,
|
|
941
941
|
received: a.parsedType
|
|
942
|
-
}),
|
|
942
|
+
}), p;
|
|
943
943
|
}
|
|
944
944
|
let n;
|
|
945
945
|
const s = new Z();
|
|
@@ -963,7 +963,7 @@ class V extends g {
|
|
|
963
963
|
inclusive: a.inclusive,
|
|
964
964
|
exact: !1,
|
|
965
965
|
message: a.message
|
|
966
|
-
}), s.dirty()) : a.kind === "multipleOf" ?
|
|
966
|
+
}), s.dirty()) : a.kind === "multipleOf" ? pt(e.data, a.value) !== 0 && (n = this._getOrReturnCtx(e, n), l(n, {
|
|
967
967
|
code: d.not_multiple_of,
|
|
968
968
|
multipleOf: a.value,
|
|
969
969
|
message: a.message
|
|
@@ -1096,11 +1096,11 @@ class V extends g {
|
|
|
1096
1096
|
}
|
|
1097
1097
|
V.create = (r) => new V({
|
|
1098
1098
|
checks: [],
|
|
1099
|
-
typeName:
|
|
1099
|
+
typeName: m.ZodNumber,
|
|
1100
1100
|
coerce: (r == null ? void 0 : r.coerce) || !1,
|
|
1101
|
-
...
|
|
1101
|
+
..._(r)
|
|
1102
1102
|
});
|
|
1103
|
-
class
|
|
1103
|
+
class D extends v {
|
|
1104
1104
|
constructor() {
|
|
1105
1105
|
super(...arguments), this.min = this.gte, this.max = this.lte;
|
|
1106
1106
|
}
|
|
@@ -1111,7 +1111,7 @@ class L extends g {
|
|
|
1111
1111
|
code: d.invalid_type,
|
|
1112
1112
|
expected: f.bigint,
|
|
1113
1113
|
received: a.parsedType
|
|
1114
|
-
}),
|
|
1114
|
+
}), p;
|
|
1115
1115
|
}
|
|
1116
1116
|
let n;
|
|
1117
1117
|
const s = new Z();
|
|
@@ -1148,7 +1148,7 @@ class L extends g {
|
|
|
1148
1148
|
return this.setLimit("max", e, !1, h.toString(t));
|
|
1149
1149
|
}
|
|
1150
1150
|
setLimit(e, t, n, s) {
|
|
1151
|
-
return new
|
|
1151
|
+
return new D({
|
|
1152
1152
|
...this._def,
|
|
1153
1153
|
checks: [
|
|
1154
1154
|
...this._def.checks,
|
|
@@ -1162,7 +1162,7 @@ class L extends g {
|
|
|
1162
1162
|
});
|
|
1163
1163
|
}
|
|
1164
1164
|
_addCheck(e) {
|
|
1165
|
-
return new
|
|
1165
|
+
return new D({
|
|
1166
1166
|
...this._def,
|
|
1167
1167
|
checks: [...this._def.checks, e]
|
|
1168
1168
|
});
|
|
@@ -1219,16 +1219,16 @@ class L extends g {
|
|
|
1219
1219
|
return e;
|
|
1220
1220
|
}
|
|
1221
1221
|
}
|
|
1222
|
-
|
|
1222
|
+
D.create = (r) => {
|
|
1223
1223
|
var e;
|
|
1224
|
-
return new
|
|
1224
|
+
return new D({
|
|
1225
1225
|
checks: [],
|
|
1226
|
-
typeName:
|
|
1226
|
+
typeName: m.ZodBigInt,
|
|
1227
1227
|
coerce: (e = r == null ? void 0 : r.coerce) !== null && e !== void 0 ? e : !1,
|
|
1228
|
-
...
|
|
1228
|
+
..._(r)
|
|
1229
1229
|
});
|
|
1230
1230
|
};
|
|
1231
|
-
class
|
|
1231
|
+
class re extends v {
|
|
1232
1232
|
_parse(e) {
|
|
1233
1233
|
if (this._def.coerce && (e.data = !!e.data), this._getType(e) !== f.boolean) {
|
|
1234
1234
|
const n = this._getOrReturnCtx(e);
|
|
@@ -1236,17 +1236,17 @@ class ie extends g {
|
|
|
1236
1236
|
code: d.invalid_type,
|
|
1237
1237
|
expected: f.boolean,
|
|
1238
1238
|
received: n.parsedType
|
|
1239
|
-
}),
|
|
1239
|
+
}), p;
|
|
1240
1240
|
}
|
|
1241
|
-
return
|
|
1241
|
+
return S(e.data);
|
|
1242
1242
|
}
|
|
1243
1243
|
}
|
|
1244
|
-
|
|
1245
|
-
typeName:
|
|
1244
|
+
re.create = (r) => new re({
|
|
1245
|
+
typeName: m.ZodBoolean,
|
|
1246
1246
|
coerce: (r == null ? void 0 : r.coerce) || !1,
|
|
1247
|
-
...
|
|
1247
|
+
..._(r)
|
|
1248
1248
|
});
|
|
1249
|
-
class
|
|
1249
|
+
class B extends v {
|
|
1250
1250
|
_parse(e) {
|
|
1251
1251
|
if (this._def.coerce && (e.data = new Date(e.data)), this._getType(e) !== f.date) {
|
|
1252
1252
|
const a = this._getOrReturnCtx(e);
|
|
@@ -1254,13 +1254,13 @@ class Y extends g {
|
|
|
1254
1254
|
code: d.invalid_type,
|
|
1255
1255
|
expected: f.date,
|
|
1256
1256
|
received: a.parsedType
|
|
1257
|
-
}),
|
|
1257
|
+
}), p;
|
|
1258
1258
|
}
|
|
1259
1259
|
if (isNaN(e.data.getTime())) {
|
|
1260
1260
|
const a = this._getOrReturnCtx(e);
|
|
1261
1261
|
return l(a, {
|
|
1262
1262
|
code: d.invalid_date
|
|
1263
|
-
}),
|
|
1263
|
+
}), p;
|
|
1264
1264
|
}
|
|
1265
1265
|
const n = new Z();
|
|
1266
1266
|
let s;
|
|
@@ -1286,7 +1286,7 @@ class Y extends g {
|
|
|
1286
1286
|
};
|
|
1287
1287
|
}
|
|
1288
1288
|
_addCheck(e) {
|
|
1289
|
-
return new
|
|
1289
|
+
return new B({
|
|
1290
1290
|
...this._def,
|
|
1291
1291
|
checks: [...this._def.checks, e]
|
|
1292
1292
|
});
|
|
@@ -1318,13 +1318,13 @@ class Y extends g {
|
|
|
1318
1318
|
return e != null ? new Date(e) : null;
|
|
1319
1319
|
}
|
|
1320
1320
|
}
|
|
1321
|
-
|
|
1321
|
+
B.create = (r) => new B({
|
|
1322
1322
|
checks: [],
|
|
1323
1323
|
coerce: (r == null ? void 0 : r.coerce) || !1,
|
|
1324
|
-
typeName:
|
|
1325
|
-
...
|
|
1324
|
+
typeName: m.ZodDate,
|
|
1325
|
+
..._(r)
|
|
1326
1326
|
});
|
|
1327
|
-
class
|
|
1327
|
+
class ge extends v {
|
|
1328
1328
|
_parse(e) {
|
|
1329
1329
|
if (this._getType(e) !== f.symbol) {
|
|
1330
1330
|
const n = this._getOrReturnCtx(e);
|
|
@@ -1332,16 +1332,16 @@ class ke extends g {
|
|
|
1332
1332
|
code: d.invalid_type,
|
|
1333
1333
|
expected: f.symbol,
|
|
1334
1334
|
received: n.parsedType
|
|
1335
|
-
}),
|
|
1335
|
+
}), p;
|
|
1336
1336
|
}
|
|
1337
|
-
return
|
|
1337
|
+
return S(e.data);
|
|
1338
1338
|
}
|
|
1339
1339
|
}
|
|
1340
|
-
|
|
1341
|
-
typeName:
|
|
1342
|
-
...
|
|
1340
|
+
ge.create = (r) => new ge({
|
|
1341
|
+
typeName: m.ZodSymbol,
|
|
1342
|
+
..._(r)
|
|
1343
1343
|
});
|
|
1344
|
-
class
|
|
1344
|
+
class ne extends v {
|
|
1345
1345
|
_parse(e) {
|
|
1346
1346
|
if (this._getType(e) !== f.undefined) {
|
|
1347
1347
|
const n = this._getOrReturnCtx(e);
|
|
@@ -1349,16 +1349,16 @@ class oe extends g {
|
|
|
1349
1349
|
code: d.invalid_type,
|
|
1350
1350
|
expected: f.undefined,
|
|
1351
1351
|
received: n.parsedType
|
|
1352
|
-
}),
|
|
1352
|
+
}), p;
|
|
1353
1353
|
}
|
|
1354
|
-
return
|
|
1354
|
+
return S(e.data);
|
|
1355
1355
|
}
|
|
1356
1356
|
}
|
|
1357
|
-
|
|
1358
|
-
typeName:
|
|
1359
|
-
...
|
|
1357
|
+
ne.create = (r) => new ne({
|
|
1358
|
+
typeName: m.ZodUndefined,
|
|
1359
|
+
..._(r)
|
|
1360
1360
|
});
|
|
1361
|
-
class
|
|
1361
|
+
class se extends v {
|
|
1362
1362
|
_parse(e) {
|
|
1363
1363
|
if (this._getType(e) !== f.null) {
|
|
1364
1364
|
const n = this._getOrReturnCtx(e);
|
|
@@ -1366,54 +1366,54 @@ class de extends g {
|
|
|
1366
1366
|
code: d.invalid_type,
|
|
1367
1367
|
expected: f.null,
|
|
1368
1368
|
received: n.parsedType
|
|
1369
|
-
}),
|
|
1369
|
+
}), p;
|
|
1370
1370
|
}
|
|
1371
|
-
return
|
|
1371
|
+
return S(e.data);
|
|
1372
1372
|
}
|
|
1373
1373
|
}
|
|
1374
|
-
|
|
1375
|
-
typeName:
|
|
1376
|
-
...
|
|
1374
|
+
se.create = (r) => new se({
|
|
1375
|
+
typeName: m.ZodNull,
|
|
1376
|
+
..._(r)
|
|
1377
1377
|
});
|
|
1378
|
-
class
|
|
1378
|
+
class Q extends v {
|
|
1379
1379
|
constructor() {
|
|
1380
1380
|
super(...arguments), this._any = !0;
|
|
1381
1381
|
}
|
|
1382
1382
|
_parse(e) {
|
|
1383
|
-
return
|
|
1383
|
+
return S(e.data);
|
|
1384
1384
|
}
|
|
1385
1385
|
}
|
|
1386
|
-
|
|
1387
|
-
typeName:
|
|
1388
|
-
...
|
|
1386
|
+
Q.create = (r) => new Q({
|
|
1387
|
+
typeName: m.ZodAny,
|
|
1388
|
+
..._(r)
|
|
1389
1389
|
});
|
|
1390
|
-
class
|
|
1390
|
+
class U extends v {
|
|
1391
1391
|
constructor() {
|
|
1392
1392
|
super(...arguments), this._unknown = !0;
|
|
1393
1393
|
}
|
|
1394
1394
|
_parse(e) {
|
|
1395
|
-
return
|
|
1395
|
+
return S(e.data);
|
|
1396
1396
|
}
|
|
1397
1397
|
}
|
|
1398
|
-
|
|
1399
|
-
typeName:
|
|
1400
|
-
...
|
|
1398
|
+
U.create = (r) => new U({
|
|
1399
|
+
typeName: m.ZodUnknown,
|
|
1400
|
+
..._(r)
|
|
1401
1401
|
});
|
|
1402
|
-
class z extends
|
|
1402
|
+
class z extends v {
|
|
1403
1403
|
_parse(e) {
|
|
1404
1404
|
const t = this._getOrReturnCtx(e);
|
|
1405
1405
|
return l(t, {
|
|
1406
1406
|
code: d.invalid_type,
|
|
1407
1407
|
expected: f.never,
|
|
1408
1408
|
received: t.parsedType
|
|
1409
|
-
}),
|
|
1409
|
+
}), p;
|
|
1410
1410
|
}
|
|
1411
1411
|
}
|
|
1412
1412
|
z.create = (r) => new z({
|
|
1413
|
-
typeName:
|
|
1414
|
-
...
|
|
1413
|
+
typeName: m.ZodNever,
|
|
1414
|
+
..._(r)
|
|
1415
1415
|
});
|
|
1416
|
-
class
|
|
1416
|
+
class xe extends v {
|
|
1417
1417
|
_parse(e) {
|
|
1418
1418
|
if (this._getType(e) !== f.undefined) {
|
|
1419
1419
|
const n = this._getOrReturnCtx(e);
|
|
@@ -1421,16 +1421,16 @@ class we extends g {
|
|
|
1421
1421
|
code: d.invalid_type,
|
|
1422
1422
|
expected: f.void,
|
|
1423
1423
|
received: n.parsedType
|
|
1424
|
-
}),
|
|
1424
|
+
}), p;
|
|
1425
1425
|
}
|
|
1426
|
-
return
|
|
1426
|
+
return S(e.data);
|
|
1427
1427
|
}
|
|
1428
1428
|
}
|
|
1429
|
-
|
|
1430
|
-
typeName:
|
|
1431
|
-
...
|
|
1429
|
+
xe.create = (r) => new xe({
|
|
1430
|
+
typeName: m.ZodVoid,
|
|
1431
|
+
..._(r)
|
|
1432
1432
|
});
|
|
1433
|
-
class R extends
|
|
1433
|
+
class R extends v {
|
|
1434
1434
|
_parse(e) {
|
|
1435
1435
|
const { ctx: t, status: n } = this._processInputParams(e), s = this._def;
|
|
1436
1436
|
if (t.parsedType !== f.array)
|
|
@@ -1438,7 +1438,7 @@ class R extends g {
|
|
|
1438
1438
|
code: d.invalid_type,
|
|
1439
1439
|
expected: f.array,
|
|
1440
1440
|
received: t.parsedType
|
|
1441
|
-
}),
|
|
1441
|
+
}), p;
|
|
1442
1442
|
if (s.exactLength !== null) {
|
|
1443
1443
|
const i = t.data.length > s.exactLength.value, o = t.data.length < s.exactLength.value;
|
|
1444
1444
|
(i || o) && (l(t, {
|
|
@@ -1500,15 +1500,15 @@ R.create = (r, e) => new R({
|
|
|
1500
1500
|
minLength: null,
|
|
1501
1501
|
maxLength: null,
|
|
1502
1502
|
exactLength: null,
|
|
1503
|
-
typeName:
|
|
1504
|
-
...
|
|
1503
|
+
typeName: m.ZodArray,
|
|
1504
|
+
..._(e)
|
|
1505
1505
|
});
|
|
1506
|
-
function
|
|
1506
|
+
function Y(r) {
|
|
1507
1507
|
if (r instanceof k) {
|
|
1508
1508
|
const e = {};
|
|
1509
1509
|
for (const t in r.shape) {
|
|
1510
1510
|
const n = r.shape[t];
|
|
1511
|
-
e[t] = j.create(
|
|
1511
|
+
e[t] = j.create(Y(n));
|
|
1512
1512
|
}
|
|
1513
1513
|
return new k({
|
|
1514
1514
|
...r._def,
|
|
@@ -1517,10 +1517,10 @@ function J(r) {
|
|
|
1517
1517
|
} else
|
|
1518
1518
|
return r instanceof R ? new R({
|
|
1519
1519
|
...r._def,
|
|
1520
|
-
type:
|
|
1521
|
-
}) : r instanceof j ? j.create(
|
|
1520
|
+
type: Y(r.element)
|
|
1521
|
+
}) : r instanceof j ? j.create(Y(r.unwrap())) : r instanceof q ? q.create(Y(r.unwrap())) : r instanceof M ? M.create(r.items.map((e) => Y(e))) : r;
|
|
1522
1522
|
}
|
|
1523
|
-
class k extends
|
|
1523
|
+
class k extends v {
|
|
1524
1524
|
constructor() {
|
|
1525
1525
|
super(...arguments), this._cached = null, this.nonstrict = this.passthrough, this.augment = this.extend;
|
|
1526
1526
|
}
|
|
@@ -1537,7 +1537,7 @@ class k extends g {
|
|
|
1537
1537
|
code: d.invalid_type,
|
|
1538
1538
|
expected: f.object,
|
|
1539
1539
|
received: c.parsedType
|
|
1540
|
-
}),
|
|
1540
|
+
}), p;
|
|
1541
1541
|
}
|
|
1542
1542
|
const { status: n, ctx: s } = this._processInputParams(e), { shape: a, keys: i } = this._getCached(), o = [];
|
|
1543
1543
|
if (!(this._def.catchall instanceof z && this._def.unknownKeys === "strip"))
|
|
@@ -1545,20 +1545,20 @@ class k extends g {
|
|
|
1545
1545
|
i.includes(c) || o.push(c);
|
|
1546
1546
|
const u = [];
|
|
1547
1547
|
for (const c of i) {
|
|
1548
|
-
const
|
|
1548
|
+
const y = a[c], O = s.data[c];
|
|
1549
1549
|
u.push({
|
|
1550
1550
|
key: { status: "valid", value: c },
|
|
1551
|
-
value:
|
|
1551
|
+
value: y._parse(new A(s, O, s.path, c)),
|
|
1552
1552
|
alwaysSet: c in s.data
|
|
1553
1553
|
});
|
|
1554
1554
|
}
|
|
1555
1555
|
if (this._def.catchall instanceof z) {
|
|
1556
1556
|
const c = this._def.unknownKeys;
|
|
1557
1557
|
if (c === "passthrough")
|
|
1558
|
-
for (const
|
|
1558
|
+
for (const y of o)
|
|
1559
1559
|
u.push({
|
|
1560
|
-
key: { status: "valid", value:
|
|
1561
|
-
value: { status: "valid", value: s.data[
|
|
1560
|
+
key: { status: "valid", value: y },
|
|
1561
|
+
value: { status: "valid", value: s.data[y] }
|
|
1562
1562
|
});
|
|
1563
1563
|
else if (c === "strict")
|
|
1564
1564
|
o.length > 0 && (l(s, {
|
|
@@ -1569,26 +1569,26 @@ class k extends g {
|
|
|
1569
1569
|
throw new Error("Internal ZodObject error: invalid unknownKeys value.");
|
|
1570
1570
|
} else {
|
|
1571
1571
|
const c = this._def.catchall;
|
|
1572
|
-
for (const
|
|
1573
|
-
const
|
|
1572
|
+
for (const y of o) {
|
|
1573
|
+
const O = s.data[y];
|
|
1574
1574
|
u.push({
|
|
1575
|
-
key: { status: "valid", value:
|
|
1575
|
+
key: { status: "valid", value: y },
|
|
1576
1576
|
value: c._parse(
|
|
1577
|
-
new A(s,
|
|
1577
|
+
new A(s, O, s.path, y)
|
|
1578
1578
|
//, ctx.child(key), value, getParsedType(value)
|
|
1579
1579
|
),
|
|
1580
|
-
alwaysSet:
|
|
1580
|
+
alwaysSet: y in s.data
|
|
1581
1581
|
});
|
|
1582
1582
|
}
|
|
1583
1583
|
}
|
|
1584
1584
|
return s.common.async ? Promise.resolve().then(async () => {
|
|
1585
1585
|
const c = [];
|
|
1586
|
-
for (const
|
|
1587
|
-
const
|
|
1586
|
+
for (const y of u) {
|
|
1587
|
+
const O = await y.key, Te = await y.value;
|
|
1588
1588
|
c.push({
|
|
1589
|
-
key:
|
|
1590
|
-
value:
|
|
1591
|
-
alwaysSet:
|
|
1589
|
+
key: O,
|
|
1590
|
+
value: Te,
|
|
1591
|
+
alwaysSet: y.alwaysSet
|
|
1592
1592
|
});
|
|
1593
1593
|
}
|
|
1594
1594
|
return c;
|
|
@@ -1665,7 +1665,7 @@ class k extends g {
|
|
|
1665
1665
|
...this._def.shape(),
|
|
1666
1666
|
...e._def.shape()
|
|
1667
1667
|
}),
|
|
1668
|
-
typeName:
|
|
1668
|
+
typeName: m.ZodObject
|
|
1669
1669
|
});
|
|
1670
1670
|
}
|
|
1671
1671
|
// merge<
|
|
@@ -1755,7 +1755,7 @@ class k extends g {
|
|
|
1755
1755
|
* @deprecated
|
|
1756
1756
|
*/
|
|
1757
1757
|
deepPartial() {
|
|
1758
|
-
return
|
|
1758
|
+
return Y(this);
|
|
1759
1759
|
}
|
|
1760
1760
|
partial(e) {
|
|
1761
1761
|
const t = {};
|
|
@@ -1784,31 +1784,31 @@ class k extends g {
|
|
|
1784
1784
|
});
|
|
1785
1785
|
}
|
|
1786
1786
|
keyof() {
|
|
1787
|
-
return
|
|
1787
|
+
return Ve(x.objectKeys(this.shape));
|
|
1788
1788
|
}
|
|
1789
1789
|
}
|
|
1790
1790
|
k.create = (r, e) => new k({
|
|
1791
1791
|
shape: () => r,
|
|
1792
1792
|
unknownKeys: "strip",
|
|
1793
1793
|
catchall: z.create(),
|
|
1794
|
-
typeName:
|
|
1795
|
-
...
|
|
1794
|
+
typeName: m.ZodObject,
|
|
1795
|
+
..._(e)
|
|
1796
1796
|
});
|
|
1797
1797
|
k.strictCreate = (r, e) => new k({
|
|
1798
1798
|
shape: () => r,
|
|
1799
1799
|
unknownKeys: "strict",
|
|
1800
1800
|
catchall: z.create(),
|
|
1801
|
-
typeName:
|
|
1802
|
-
...
|
|
1801
|
+
typeName: m.ZodObject,
|
|
1802
|
+
..._(e)
|
|
1803
1803
|
});
|
|
1804
1804
|
k.lazycreate = (r, e) => new k({
|
|
1805
1805
|
shape: r,
|
|
1806
1806
|
unknownKeys: "strip",
|
|
1807
1807
|
catchall: z.create(),
|
|
1808
|
-
typeName:
|
|
1809
|
-
...
|
|
1808
|
+
typeName: m.ZodObject,
|
|
1809
|
+
..._(e)
|
|
1810
1810
|
});
|
|
1811
|
-
class
|
|
1811
|
+
class ae extends v {
|
|
1812
1812
|
_parse(e) {
|
|
1813
1813
|
const { ctx: t } = this._processInputParams(e), n = this._def.options;
|
|
1814
1814
|
function s(a) {
|
|
@@ -1822,7 +1822,7 @@ class ce extends g {
|
|
|
1822
1822
|
return l(t, {
|
|
1823
1823
|
code: d.invalid_union,
|
|
1824
1824
|
unionErrors: i
|
|
1825
|
-
}),
|
|
1825
|
+
}), p;
|
|
1826
1826
|
}
|
|
1827
1827
|
if (t.common.async)
|
|
1828
1828
|
return Promise.all(n.map(async (a) => {
|
|
@@ -1854,14 +1854,14 @@ class ce extends g {
|
|
|
1854
1854
|
issues: []
|
|
1855
1855
|
},
|
|
1856
1856
|
parent: null
|
|
1857
|
-
},
|
|
1857
|
+
}, y = u._parseSync({
|
|
1858
1858
|
data: t.data,
|
|
1859
1859
|
path: t.path,
|
|
1860
1860
|
parent: c
|
|
1861
1861
|
});
|
|
1862
|
-
if (
|
|
1863
|
-
return
|
|
1864
|
-
|
|
1862
|
+
if (y.status === "valid")
|
|
1863
|
+
return y;
|
|
1864
|
+
y.status === "dirty" && !a && (a = { result: y, ctx: c }), c.common.issues.length && i.push(c.common.issues);
|
|
1865
1865
|
}
|
|
1866
1866
|
if (a)
|
|
1867
1867
|
return t.common.issues.push(...a.ctx.common.issues), a.result;
|
|
@@ -1869,20 +1869,20 @@ class ce extends g {
|
|
|
1869
1869
|
return l(t, {
|
|
1870
1870
|
code: d.invalid_union,
|
|
1871
1871
|
unionErrors: o
|
|
1872
|
-
}),
|
|
1872
|
+
}), p;
|
|
1873
1873
|
}
|
|
1874
1874
|
}
|
|
1875
1875
|
get options() {
|
|
1876
1876
|
return this._def.options;
|
|
1877
1877
|
}
|
|
1878
1878
|
}
|
|
1879
|
-
|
|
1879
|
+
ae.create = (r, e) => new ae({
|
|
1880
1880
|
options: r,
|
|
1881
|
-
typeName:
|
|
1882
|
-
...
|
|
1881
|
+
typeName: m.ZodUnion,
|
|
1882
|
+
..._(e)
|
|
1883
1883
|
});
|
|
1884
|
-
const
|
|
1885
|
-
class
|
|
1884
|
+
const $ = (r) => r instanceof de ? $(r.schema) : r instanceof I ? $(r.innerType()) : r instanceof ce ? [r.value] : r instanceof L ? r.options : r instanceof ue ? x.objectValues(r.enum) : r instanceof le ? $(r._def.innerType) : r instanceof ne ? [void 0] : r instanceof se ? [null] : r instanceof j ? [void 0, ...$(r.unwrap())] : r instanceof q ? [null, ...$(r.unwrap())] : r instanceof Ee || r instanceof he ? $(r.unwrap()) : r instanceof fe ? $(r._def.innerType) : [];
|
|
1885
|
+
class we extends v {
|
|
1886
1886
|
_parse(e) {
|
|
1887
1887
|
const { ctx: t } = this._processInputParams(e);
|
|
1888
1888
|
if (t.parsedType !== f.object)
|
|
@@ -1890,7 +1890,7 @@ class Se extends g {
|
|
|
1890
1890
|
code: d.invalid_type,
|
|
1891
1891
|
expected: f.object,
|
|
1892
1892
|
received: t.parsedType
|
|
1893
|
-
}),
|
|
1893
|
+
}), p;
|
|
1894
1894
|
const n = this.discriminator, s = t.data[n], a = this.optionsMap.get(s);
|
|
1895
1895
|
return a ? t.common.async ? a._parseAsync({
|
|
1896
1896
|
data: t.data,
|
|
@@ -1904,7 +1904,7 @@ class Se extends g {
|
|
|
1904
1904
|
code: d.invalid_union_discriminator,
|
|
1905
1905
|
options: Array.from(this.optionsMap.keys()),
|
|
1906
1906
|
path: [n]
|
|
1907
|
-
}),
|
|
1907
|
+
}), p);
|
|
1908
1908
|
}
|
|
1909
1909
|
get discriminator() {
|
|
1910
1910
|
return this._def.discriminator;
|
|
@@ -1926,7 +1926,7 @@ class Se extends g {
|
|
|
1926
1926
|
static create(e, t, n) {
|
|
1927
1927
|
const s = /* @__PURE__ */ new Map();
|
|
1928
1928
|
for (const a of t) {
|
|
1929
|
-
const i =
|
|
1929
|
+
const i = $(a.shape[e]);
|
|
1930
1930
|
if (!i.length)
|
|
1931
1931
|
throw new Error(`A discriminator value for key \`${e}\` could not be extracted from all schema options`);
|
|
1932
1932
|
for (const o of i) {
|
|
@@ -1935,23 +1935,23 @@ class Se extends g {
|
|
|
1935
1935
|
s.set(o, a);
|
|
1936
1936
|
}
|
|
1937
1937
|
}
|
|
1938
|
-
return new
|
|
1939
|
-
typeName:
|
|
1938
|
+
return new we({
|
|
1939
|
+
typeName: m.ZodDiscriminatedUnion,
|
|
1940
1940
|
discriminator: e,
|
|
1941
1941
|
options: t,
|
|
1942
1942
|
optionsMap: s,
|
|
1943
|
-
...
|
|
1943
|
+
..._(n)
|
|
1944
1944
|
});
|
|
1945
1945
|
}
|
|
1946
1946
|
}
|
|
1947
|
-
function
|
|
1948
|
-
const t =
|
|
1947
|
+
function Ne(r, e) {
|
|
1948
|
+
const t = P(r), n = P(e);
|
|
1949
1949
|
if (r === e)
|
|
1950
1950
|
return { valid: !0, data: r };
|
|
1951
1951
|
if (t === f.object && n === f.object) {
|
|
1952
1952
|
const s = x.objectKeys(e), a = x.objectKeys(r).filter((o) => s.indexOf(o) !== -1), i = { ...r, ...e };
|
|
1953
1953
|
for (const o of a) {
|
|
1954
|
-
const u =
|
|
1954
|
+
const u = Ne(r[o], e[o]);
|
|
1955
1955
|
if (!u.valid)
|
|
1956
1956
|
return { valid: !1 };
|
|
1957
1957
|
i[o] = u.data;
|
|
@@ -1962,7 +1962,7 @@ function Re(r, e) {
|
|
|
1962
1962
|
return { valid: !1 };
|
|
1963
1963
|
const s = [];
|
|
1964
1964
|
for (let a = 0; a < r.length; a++) {
|
|
1965
|
-
const i = r[a], o = e[a], u =
|
|
1965
|
+
const i = r[a], o = e[a], u = Ne(i, o);
|
|
1966
1966
|
if (!u.valid)
|
|
1967
1967
|
return { valid: !1 };
|
|
1968
1968
|
s.push(u.data);
|
|
@@ -1971,15 +1971,15 @@ function Re(r, e) {
|
|
|
1971
1971
|
} else
|
|
1972
1972
|
return t === f.date && n === f.date && +r == +e ? { valid: !0, data: r } : { valid: !1 };
|
|
1973
1973
|
}
|
|
1974
|
-
class
|
|
1974
|
+
class ie extends v {
|
|
1975
1975
|
_parse(e) {
|
|
1976
1976
|
const { status: t, ctx: n } = this._processInputParams(e), s = (a, i) => {
|
|
1977
|
-
if (
|
|
1978
|
-
return
|
|
1979
|
-
const o =
|
|
1980
|
-
return o.valid ? ((
|
|
1977
|
+
if (Ce(a) || Ce(i))
|
|
1978
|
+
return p;
|
|
1979
|
+
const o = Ne(a.value, i.value);
|
|
1980
|
+
return o.valid ? ((Oe(a) || Oe(i)) && t.dirty(), { status: t.value, value: o.data }) : (l(n, {
|
|
1981
1981
|
code: d.invalid_intersection_types
|
|
1982
|
-
}),
|
|
1982
|
+
}), p);
|
|
1983
1983
|
};
|
|
1984
1984
|
return n.common.async ? Promise.all([
|
|
1985
1985
|
this._def.left._parseAsync({
|
|
@@ -2003,13 +2003,13 @@ class ue extends g {
|
|
|
2003
2003
|
}));
|
|
2004
2004
|
}
|
|
2005
2005
|
}
|
|
2006
|
-
|
|
2006
|
+
ie.create = (r, e, t) => new ie({
|
|
2007
2007
|
left: r,
|
|
2008
2008
|
right: e,
|
|
2009
|
-
typeName:
|
|
2010
|
-
...
|
|
2009
|
+
typeName: m.ZodIntersection,
|
|
2010
|
+
..._(t)
|
|
2011
2011
|
});
|
|
2012
|
-
class
|
|
2012
|
+
class M extends v {
|
|
2013
2013
|
_parse(e) {
|
|
2014
2014
|
const { status: t, ctx: n } = this._processInputParams(e);
|
|
2015
2015
|
if (n.parsedType !== f.array)
|
|
@@ -2017,7 +2017,7 @@ class $ extends g {
|
|
|
2017
2017
|
code: d.invalid_type,
|
|
2018
2018
|
expected: f.array,
|
|
2019
2019
|
received: n.parsedType
|
|
2020
|
-
}),
|
|
2020
|
+
}), p;
|
|
2021
2021
|
if (n.data.length < this._def.items.length)
|
|
2022
2022
|
return l(n, {
|
|
2023
2023
|
code: d.too_small,
|
|
@@ -2025,7 +2025,7 @@ class $ extends g {
|
|
|
2025
2025
|
inclusive: !0,
|
|
2026
2026
|
exact: !1,
|
|
2027
2027
|
type: "array"
|
|
2028
|
-
}),
|
|
2028
|
+
}), p;
|
|
2029
2029
|
!this._def.rest && n.data.length > this._def.items.length && (l(n, {
|
|
2030
2030
|
code: d.too_big,
|
|
2031
2031
|
maximum: this._def.items.length,
|
|
@@ -2043,23 +2043,23 @@ class $ extends g {
|
|
|
2043
2043
|
return this._def.items;
|
|
2044
2044
|
}
|
|
2045
2045
|
rest(e) {
|
|
2046
|
-
return new
|
|
2046
|
+
return new M({
|
|
2047
2047
|
...this._def,
|
|
2048
2048
|
rest: e
|
|
2049
2049
|
});
|
|
2050
2050
|
}
|
|
2051
2051
|
}
|
|
2052
|
-
|
|
2052
|
+
M.create = (r, e) => {
|
|
2053
2053
|
if (!Array.isArray(r))
|
|
2054
2054
|
throw new Error("You must pass an array of schemas to z.tuple([ ... ])");
|
|
2055
|
-
return new
|
|
2055
|
+
return new M({
|
|
2056
2056
|
items: r,
|
|
2057
|
-
typeName:
|
|
2057
|
+
typeName: m.ZodTuple,
|
|
2058
2058
|
rest: null,
|
|
2059
|
-
...
|
|
2059
|
+
..._(e)
|
|
2060
2060
|
});
|
|
2061
2061
|
};
|
|
2062
|
-
class
|
|
2062
|
+
class oe extends v {
|
|
2063
2063
|
get keySchema() {
|
|
2064
2064
|
return this._def.keyType;
|
|
2065
2065
|
}
|
|
@@ -2073,7 +2073,7 @@ class le extends g {
|
|
|
2073
2073
|
code: d.invalid_type,
|
|
2074
2074
|
expected: f.object,
|
|
2075
2075
|
received: n.parsedType
|
|
2076
|
-
}),
|
|
2076
|
+
}), p;
|
|
2077
2077
|
const s = [], a = this._def.keyType, i = this._def.valueType;
|
|
2078
2078
|
for (const o in n.data)
|
|
2079
2079
|
s.push({
|
|
@@ -2087,20 +2087,20 @@ class le extends g {
|
|
|
2087
2087
|
return this._def.valueType;
|
|
2088
2088
|
}
|
|
2089
2089
|
static create(e, t, n) {
|
|
2090
|
-
return t instanceof
|
|
2090
|
+
return t instanceof v ? new oe({
|
|
2091
2091
|
keyType: e,
|
|
2092
2092
|
valueType: t,
|
|
2093
|
-
typeName:
|
|
2094
|
-
...
|
|
2095
|
-
}) : new
|
|
2093
|
+
typeName: m.ZodRecord,
|
|
2094
|
+
..._(n)
|
|
2095
|
+
}) : new oe({
|
|
2096
2096
|
keyType: E.create(),
|
|
2097
2097
|
valueType: e,
|
|
2098
|
-
typeName:
|
|
2099
|
-
...
|
|
2098
|
+
typeName: m.ZodRecord,
|
|
2099
|
+
..._(t)
|
|
2100
2100
|
});
|
|
2101
2101
|
}
|
|
2102
2102
|
}
|
|
2103
|
-
class
|
|
2103
|
+
class ke extends v {
|
|
2104
2104
|
get keySchema() {
|
|
2105
2105
|
return this._def.keyType;
|
|
2106
2106
|
}
|
|
@@ -2114,7 +2114,7 @@ class Te extends g {
|
|
|
2114
2114
|
code: d.invalid_type,
|
|
2115
2115
|
expected: f.map,
|
|
2116
2116
|
received: n.parsedType
|
|
2117
|
-
}),
|
|
2117
|
+
}), p;
|
|
2118
2118
|
const s = this._def.keyType, a = this._def.valueType, i = [...n.data.entries()].map(([o, u], c) => ({
|
|
2119
2119
|
key: s._parse(new A(n, o, n.path, [c, "key"])),
|
|
2120
2120
|
value: a._parse(new A(n, u, n.path, [c, "value"]))
|
|
@@ -2123,32 +2123,32 @@ class Te extends g {
|
|
|
2123
2123
|
const o = /* @__PURE__ */ new Map();
|
|
2124
2124
|
return Promise.resolve().then(async () => {
|
|
2125
2125
|
for (const u of i) {
|
|
2126
|
-
const c = await u.key,
|
|
2127
|
-
if (c.status === "aborted" ||
|
|
2128
|
-
return
|
|
2129
|
-
(c.status === "dirty" ||
|
|
2126
|
+
const c = await u.key, y = await u.value;
|
|
2127
|
+
if (c.status === "aborted" || y.status === "aborted")
|
|
2128
|
+
return p;
|
|
2129
|
+
(c.status === "dirty" || y.status === "dirty") && t.dirty(), o.set(c.value, y.value);
|
|
2130
2130
|
}
|
|
2131
2131
|
return { status: t.value, value: o };
|
|
2132
2132
|
});
|
|
2133
2133
|
} else {
|
|
2134
2134
|
const o = /* @__PURE__ */ new Map();
|
|
2135
2135
|
for (const u of i) {
|
|
2136
|
-
const c = u.key,
|
|
2137
|
-
if (c.status === "aborted" ||
|
|
2138
|
-
return
|
|
2139
|
-
(c.status === "dirty" ||
|
|
2136
|
+
const c = u.key, y = u.value;
|
|
2137
|
+
if (c.status === "aborted" || y.status === "aborted")
|
|
2138
|
+
return p;
|
|
2139
|
+
(c.status === "dirty" || y.status === "dirty") && t.dirty(), o.set(c.value, y.value);
|
|
2140
2140
|
}
|
|
2141
2141
|
return { status: t.value, value: o };
|
|
2142
2142
|
}
|
|
2143
2143
|
}
|
|
2144
2144
|
}
|
|
2145
|
-
|
|
2145
|
+
ke.create = (r, e, t) => new ke({
|
|
2146
2146
|
valueType: e,
|
|
2147
2147
|
keyType: r,
|
|
2148
|
-
typeName:
|
|
2149
|
-
...
|
|
2148
|
+
typeName: m.ZodMap,
|
|
2149
|
+
..._(t)
|
|
2150
2150
|
});
|
|
2151
|
-
class
|
|
2151
|
+
class W extends v {
|
|
2152
2152
|
_parse(e) {
|
|
2153
2153
|
const { status: t, ctx: n } = this._processInputParams(e);
|
|
2154
2154
|
if (n.parsedType !== f.set)
|
|
@@ -2156,7 +2156,7 @@ class H extends g {
|
|
|
2156
2156
|
code: d.invalid_type,
|
|
2157
2157
|
expected: f.set,
|
|
2158
2158
|
received: n.parsedType
|
|
2159
|
-
}),
|
|
2159
|
+
}), p;
|
|
2160
2160
|
const s = this._def;
|
|
2161
2161
|
s.minSize !== null && n.data.size < s.minSize.value && (l(n, {
|
|
2162
2162
|
code: d.too_small,
|
|
@@ -2176,10 +2176,10 @@ class H extends g {
|
|
|
2176
2176
|
const a = this._def.valueType;
|
|
2177
2177
|
function i(u) {
|
|
2178
2178
|
const c = /* @__PURE__ */ new Set();
|
|
2179
|
-
for (const
|
|
2180
|
-
if (
|
|
2181
|
-
return
|
|
2182
|
-
|
|
2179
|
+
for (const y of u) {
|
|
2180
|
+
if (y.status === "aborted")
|
|
2181
|
+
return p;
|
|
2182
|
+
y.status === "dirty" && t.dirty(), c.add(y.value);
|
|
2183
2183
|
}
|
|
2184
2184
|
return { status: t.value, value: c };
|
|
2185
2185
|
}
|
|
@@ -2187,13 +2187,13 @@ class H extends g {
|
|
|
2187
2187
|
return n.common.async ? Promise.all(o).then((u) => i(u)) : i(o);
|
|
2188
2188
|
}
|
|
2189
2189
|
min(e, t) {
|
|
2190
|
-
return new
|
|
2190
|
+
return new W({
|
|
2191
2191
|
...this._def,
|
|
2192
2192
|
minSize: { value: e, message: h.toString(t) }
|
|
2193
2193
|
});
|
|
2194
2194
|
}
|
|
2195
2195
|
max(e, t) {
|
|
2196
|
-
return new
|
|
2196
|
+
return new W({
|
|
2197
2197
|
...this._def,
|
|
2198
2198
|
maxSize: { value: e, message: h.toString(t) }
|
|
2199
2199
|
});
|
|
@@ -2205,14 +2205,14 @@ class H extends g {
|
|
|
2205
2205
|
return this.min(1, e);
|
|
2206
2206
|
}
|
|
2207
2207
|
}
|
|
2208
|
-
|
|
2208
|
+
W.create = (r, e) => new W({
|
|
2209
2209
|
valueType: r,
|
|
2210
2210
|
minSize: null,
|
|
2211
2211
|
maxSize: null,
|
|
2212
|
-
typeName:
|
|
2213
|
-
...
|
|
2212
|
+
typeName: m.ZodSet,
|
|
2213
|
+
..._(e)
|
|
2214
2214
|
});
|
|
2215
|
-
class
|
|
2215
|
+
class J extends v {
|
|
2216
2216
|
constructor() {
|
|
2217
2217
|
super(...arguments), this.validate = this.implement;
|
|
2218
2218
|
}
|
|
@@ -2223,16 +2223,16 @@ class Q extends g {
|
|
|
2223
2223
|
code: d.invalid_type,
|
|
2224
2224
|
expected: f.function,
|
|
2225
2225
|
received: t.parsedType
|
|
2226
|
-
}),
|
|
2226
|
+
}), p;
|
|
2227
2227
|
function n(o, u) {
|
|
2228
|
-
return
|
|
2228
|
+
return _e({
|
|
2229
2229
|
data: o,
|
|
2230
2230
|
path: t.path,
|
|
2231
2231
|
errorMaps: [
|
|
2232
2232
|
t.common.contextualErrorMap,
|
|
2233
2233
|
t.schemaErrorMap,
|
|
2234
|
-
|
|
2235
|
-
|
|
2234
|
+
ye(),
|
|
2235
|
+
G
|
|
2236
2236
|
].filter((c) => !!c),
|
|
2237
2237
|
issueData: {
|
|
2238
2238
|
code: d.invalid_arguments,
|
|
@@ -2241,14 +2241,14 @@ class Q extends g {
|
|
|
2241
2241
|
});
|
|
2242
2242
|
}
|
|
2243
2243
|
function s(o, u) {
|
|
2244
|
-
return
|
|
2244
|
+
return _e({
|
|
2245
2245
|
data: o,
|
|
2246
2246
|
path: t.path,
|
|
2247
2247
|
errorMaps: [
|
|
2248
2248
|
t.common.contextualErrorMap,
|
|
2249
2249
|
t.schemaErrorMap,
|
|
2250
|
-
|
|
2251
|
-
|
|
2250
|
+
ye(),
|
|
2251
|
+
G
|
|
2252
2252
|
].filter((c) => !!c),
|
|
2253
2253
|
issueData: {
|
|
2254
2254
|
code: d.invalid_return_type,
|
|
@@ -2257,26 +2257,26 @@ class Q extends g {
|
|
|
2257
2257
|
});
|
|
2258
2258
|
}
|
|
2259
2259
|
const a = { errorMap: t.common.contextualErrorMap }, i = t.data;
|
|
2260
|
-
if (this._def.returns instanceof
|
|
2260
|
+
if (this._def.returns instanceof X) {
|
|
2261
2261
|
const o = this;
|
|
2262
|
-
return
|
|
2263
|
-
const c = new N([]),
|
|
2264
|
-
throw c.addIssue(n(u,
|
|
2265
|
-
}),
|
|
2266
|
-
return await o._def.returns._def.type.parseAsync(
|
|
2267
|
-
throw c.addIssue(s(
|
|
2262
|
+
return S(async function(...u) {
|
|
2263
|
+
const c = new N([]), y = await o._def.args.parseAsync(u, a).catch((pe) => {
|
|
2264
|
+
throw c.addIssue(n(u, pe)), c;
|
|
2265
|
+
}), O = await Reflect.apply(i, this, y);
|
|
2266
|
+
return await o._def.returns._def.type.parseAsync(O, a).catch((pe) => {
|
|
2267
|
+
throw c.addIssue(s(O, pe)), c;
|
|
2268
2268
|
});
|
|
2269
2269
|
});
|
|
2270
2270
|
} else {
|
|
2271
2271
|
const o = this;
|
|
2272
|
-
return
|
|
2272
|
+
return S(function(...u) {
|
|
2273
2273
|
const c = o._def.args.safeParse(u, a);
|
|
2274
2274
|
if (!c.success)
|
|
2275
2275
|
throw new N([n(u, c.error)]);
|
|
2276
|
-
const
|
|
2277
|
-
if (!
|
|
2278
|
-
throw new N([s(
|
|
2279
|
-
return
|
|
2276
|
+
const y = Reflect.apply(i, this, c.data), O = o._def.returns.safeParse(y, a);
|
|
2277
|
+
if (!O.success)
|
|
2278
|
+
throw new N([s(y, O.error)]);
|
|
2279
|
+
return O.data;
|
|
2280
2280
|
});
|
|
2281
2281
|
}
|
|
2282
2282
|
}
|
|
@@ -2287,13 +2287,13 @@ class Q extends g {
|
|
|
2287
2287
|
return this._def.returns;
|
|
2288
2288
|
}
|
|
2289
2289
|
args(...e) {
|
|
2290
|
-
return new
|
|
2290
|
+
return new J({
|
|
2291
2291
|
...this._def,
|
|
2292
|
-
args:
|
|
2292
|
+
args: M.create(e).rest(U.create())
|
|
2293
2293
|
});
|
|
2294
2294
|
}
|
|
2295
2295
|
returns(e) {
|
|
2296
|
-
return new
|
|
2296
|
+
return new J({
|
|
2297
2297
|
...this._def,
|
|
2298
2298
|
returns: e
|
|
2299
2299
|
});
|
|
@@ -2305,15 +2305,15 @@ class Q extends g {
|
|
|
2305
2305
|
return this.parse(e);
|
|
2306
2306
|
}
|
|
2307
2307
|
static create(e, t, n) {
|
|
2308
|
-
return new
|
|
2309
|
-
args: e ||
|
|
2310
|
-
returns: t ||
|
|
2311
|
-
typeName:
|
|
2312
|
-
...
|
|
2308
|
+
return new J({
|
|
2309
|
+
args: e || M.create([]).rest(U.create()),
|
|
2310
|
+
returns: t || U.create(),
|
|
2311
|
+
typeName: m.ZodFunction,
|
|
2312
|
+
..._(n)
|
|
2313
2313
|
});
|
|
2314
2314
|
}
|
|
2315
2315
|
}
|
|
2316
|
-
class
|
|
2316
|
+
class de extends v {
|
|
2317
2317
|
get schema() {
|
|
2318
2318
|
return this._def.getter();
|
|
2319
2319
|
}
|
|
@@ -2322,12 +2322,12 @@ class fe extends g {
|
|
|
2322
2322
|
return this._def.getter()._parse({ data: t.data, path: t.path, parent: t });
|
|
2323
2323
|
}
|
|
2324
2324
|
}
|
|
2325
|
-
|
|
2325
|
+
de.create = (r, e) => new de({
|
|
2326
2326
|
getter: r,
|
|
2327
|
-
typeName:
|
|
2328
|
-
...
|
|
2327
|
+
typeName: m.ZodLazy,
|
|
2328
|
+
..._(e)
|
|
2329
2329
|
});
|
|
2330
|
-
class
|
|
2330
|
+
class ce extends v {
|
|
2331
2331
|
_parse(e) {
|
|
2332
2332
|
if (e.data !== this._def.value) {
|
|
2333
2333
|
const t = this._getOrReturnCtx(e);
|
|
@@ -2335,7 +2335,7 @@ class he extends g {
|
|
|
2335
2335
|
received: t.data,
|
|
2336
2336
|
code: d.invalid_literal,
|
|
2337
2337
|
expected: this._def.value
|
|
2338
|
-
}),
|
|
2338
|
+
}), p;
|
|
2339
2339
|
}
|
|
2340
2340
|
return { status: "valid", value: e.data };
|
|
2341
2341
|
}
|
|
@@ -2343,21 +2343,21 @@ class he extends g {
|
|
|
2343
2343
|
return this._def.value;
|
|
2344
2344
|
}
|
|
2345
2345
|
}
|
|
2346
|
-
|
|
2346
|
+
ce.create = (r, e) => new ce({
|
|
2347
2347
|
value: r,
|
|
2348
|
-
typeName:
|
|
2349
|
-
...
|
|
2348
|
+
typeName: m.ZodLiteral,
|
|
2349
|
+
..._(e)
|
|
2350
2350
|
});
|
|
2351
|
-
function
|
|
2352
|
-
return new
|
|
2351
|
+
function Ve(r, e) {
|
|
2352
|
+
return new L({
|
|
2353
2353
|
values: r,
|
|
2354
|
-
typeName:
|
|
2355
|
-
...
|
|
2354
|
+
typeName: m.ZodEnum,
|
|
2355
|
+
..._(e)
|
|
2356
2356
|
});
|
|
2357
2357
|
}
|
|
2358
|
-
class
|
|
2358
|
+
class L extends v {
|
|
2359
2359
|
constructor() {
|
|
2360
|
-
super(...arguments),
|
|
2360
|
+
super(...arguments), K.set(this, void 0);
|
|
2361
2361
|
}
|
|
2362
2362
|
_parse(e) {
|
|
2363
2363
|
if (typeof e.data != "string") {
|
|
@@ -2366,17 +2366,17 @@ class q extends g {
|
|
|
2366
2366
|
expected: x.joinValues(n),
|
|
2367
2367
|
received: t.parsedType,
|
|
2368
2368
|
code: d.invalid_type
|
|
2369
|
-
}),
|
|
2369
|
+
}), p;
|
|
2370
2370
|
}
|
|
2371
|
-
if (
|
|
2371
|
+
if (ve(this, K) || Me(this, K, new Set(this._def.values)), !ve(this, K).has(e.data)) {
|
|
2372
2372
|
const t = this._getOrReturnCtx(e), n = this._def.values;
|
|
2373
2373
|
return l(t, {
|
|
2374
2374
|
received: t.data,
|
|
2375
2375
|
code: d.invalid_enum_value,
|
|
2376
2376
|
options: n
|
|
2377
|
-
}),
|
|
2377
|
+
}), p;
|
|
2378
2378
|
}
|
|
2379
|
-
return
|
|
2379
|
+
return S(e.data);
|
|
2380
2380
|
}
|
|
2381
2381
|
get options() {
|
|
2382
2382
|
return this._def.values;
|
|
@@ -2400,23 +2400,23 @@ class q extends g {
|
|
|
2400
2400
|
return e;
|
|
2401
2401
|
}
|
|
2402
2402
|
extract(e, t = this._def) {
|
|
2403
|
-
return
|
|
2403
|
+
return L.create(e, {
|
|
2404
2404
|
...this._def,
|
|
2405
2405
|
...t
|
|
2406
2406
|
});
|
|
2407
2407
|
}
|
|
2408
2408
|
exclude(e, t = this._def) {
|
|
2409
|
-
return
|
|
2409
|
+
return L.create(this.options.filter((n) => !e.includes(n)), {
|
|
2410
2410
|
...this._def,
|
|
2411
2411
|
...t
|
|
2412
2412
|
});
|
|
2413
2413
|
}
|
|
2414
2414
|
}
|
|
2415
|
-
|
|
2416
|
-
|
|
2417
|
-
class
|
|
2415
|
+
K = /* @__PURE__ */ new WeakMap();
|
|
2416
|
+
L.create = Ve;
|
|
2417
|
+
class ue extends v {
|
|
2418
2418
|
constructor() {
|
|
2419
|
-
super(...arguments),
|
|
2419
|
+
super(...arguments), F.set(this, void 0);
|
|
2420
2420
|
}
|
|
2421
2421
|
_parse(e) {
|
|
2422
2422
|
const t = x.getValidEnumValues(this._def.values), n = this._getOrReturnCtx(e);
|
|
@@ -2426,29 +2426,29 @@ class me extends g {
|
|
|
2426
2426
|
expected: x.joinValues(s),
|
|
2427
2427
|
received: n.parsedType,
|
|
2428
2428
|
code: d.invalid_type
|
|
2429
|
-
}),
|
|
2429
|
+
}), p;
|
|
2430
2430
|
}
|
|
2431
|
-
if (
|
|
2431
|
+
if (ve(this, F) || Me(this, F, new Set(x.getValidEnumValues(this._def.values))), !ve(this, F).has(e.data)) {
|
|
2432
2432
|
const s = x.objectValues(t);
|
|
2433
2433
|
return l(n, {
|
|
2434
2434
|
received: n.data,
|
|
2435
2435
|
code: d.invalid_enum_value,
|
|
2436
2436
|
options: s
|
|
2437
|
-
}),
|
|
2437
|
+
}), p;
|
|
2438
2438
|
}
|
|
2439
|
-
return
|
|
2439
|
+
return S(e.data);
|
|
2440
2440
|
}
|
|
2441
2441
|
get enum() {
|
|
2442
2442
|
return this._def.values;
|
|
2443
2443
|
}
|
|
2444
2444
|
}
|
|
2445
|
-
|
|
2446
|
-
|
|
2445
|
+
F = /* @__PURE__ */ new WeakMap();
|
|
2446
|
+
ue.create = (r, e) => new ue({
|
|
2447
2447
|
values: r,
|
|
2448
|
-
typeName:
|
|
2449
|
-
...
|
|
2448
|
+
typeName: m.ZodNativeEnum,
|
|
2449
|
+
..._(e)
|
|
2450
2450
|
});
|
|
2451
|
-
class
|
|
2451
|
+
class X extends v {
|
|
2452
2452
|
unwrap() {
|
|
2453
2453
|
return this._def.type;
|
|
2454
2454
|
}
|
|
@@ -2459,25 +2459,25 @@ class F extends g {
|
|
|
2459
2459
|
code: d.invalid_type,
|
|
2460
2460
|
expected: f.promise,
|
|
2461
2461
|
received: t.parsedType
|
|
2462
|
-
}),
|
|
2462
|
+
}), p;
|
|
2463
2463
|
const n = t.parsedType === f.promise ? t.data : Promise.resolve(t.data);
|
|
2464
|
-
return
|
|
2464
|
+
return S(n.then((s) => this._def.type.parseAsync(s, {
|
|
2465
2465
|
path: t.path,
|
|
2466
2466
|
errorMap: t.common.contextualErrorMap
|
|
2467
2467
|
})));
|
|
2468
2468
|
}
|
|
2469
2469
|
}
|
|
2470
|
-
|
|
2470
|
+
X.create = (r, e) => new X({
|
|
2471
2471
|
type: r,
|
|
2472
|
-
typeName:
|
|
2473
|
-
...
|
|
2472
|
+
typeName: m.ZodPromise,
|
|
2473
|
+
..._(e)
|
|
2474
2474
|
});
|
|
2475
|
-
class I extends
|
|
2475
|
+
class I extends v {
|
|
2476
2476
|
innerType() {
|
|
2477
2477
|
return this._def.schema;
|
|
2478
2478
|
}
|
|
2479
2479
|
sourceType() {
|
|
2480
|
-
return this._def.schema._def.typeName ===
|
|
2480
|
+
return this._def.schema._def.typeName === m.ZodEffects ? this._def.schema.sourceType() : this._def.schema;
|
|
2481
2481
|
}
|
|
2482
2482
|
_parse(e) {
|
|
2483
2483
|
const { status: t, ctx: n } = this._processInputParams(e), s = this._def.effect || null, a = {
|
|
@@ -2493,23 +2493,23 @@ class I extends g {
|
|
|
2493
2493
|
if (n.common.async)
|
|
2494
2494
|
return Promise.resolve(i).then(async (o) => {
|
|
2495
2495
|
if (t.value === "aborted")
|
|
2496
|
-
return
|
|
2496
|
+
return p;
|
|
2497
2497
|
const u = await this._def.schema._parseAsync({
|
|
2498
2498
|
data: o,
|
|
2499
2499
|
path: n.path,
|
|
2500
2500
|
parent: n
|
|
2501
2501
|
});
|
|
2502
|
-
return u.status === "aborted" ?
|
|
2502
|
+
return u.status === "aborted" ? p : u.status === "dirty" || t.value === "dirty" ? H(u.value) : u;
|
|
2503
2503
|
});
|
|
2504
2504
|
{
|
|
2505
2505
|
if (t.value === "aborted")
|
|
2506
|
-
return
|
|
2506
|
+
return p;
|
|
2507
2507
|
const o = this._def.schema._parseSync({
|
|
2508
2508
|
data: i,
|
|
2509
2509
|
path: n.path,
|
|
2510
2510
|
parent: n
|
|
2511
2511
|
});
|
|
2512
|
-
return o.status === "aborted" ?
|
|
2512
|
+
return o.status === "aborted" ? p : o.status === "dirty" || t.value === "dirty" ? H(o.value) : o;
|
|
2513
2513
|
}
|
|
2514
2514
|
}
|
|
2515
2515
|
if (s.type === "refinement") {
|
|
@@ -2527,9 +2527,9 @@ class I extends g {
|
|
|
2527
2527
|
path: n.path,
|
|
2528
2528
|
parent: n
|
|
2529
2529
|
});
|
|
2530
|
-
return o.status === "aborted" ?
|
|
2530
|
+
return o.status === "aborted" ? p : (o.status === "dirty" && t.dirty(), i(o.value), { status: t.value, value: o.value });
|
|
2531
2531
|
} else
|
|
2532
|
-
return this._def.schema._parseAsync({ data: n.data, path: n.path, parent: n }).then((o) => o.status === "aborted" ?
|
|
2532
|
+
return this._def.schema._parseAsync({ data: n.data, path: n.path, parent: n }).then((o) => o.status === "aborted" ? p : (o.status === "dirty" && t.dirty(), i(o.value).then(() => ({ status: t.value, value: o.value }))));
|
|
2533
2533
|
}
|
|
2534
2534
|
if (s.type === "transform")
|
|
2535
2535
|
if (n.common.async === !1) {
|
|
@@ -2538,32 +2538,32 @@ class I extends g {
|
|
|
2538
2538
|
path: n.path,
|
|
2539
2539
|
parent: n
|
|
2540
2540
|
});
|
|
2541
|
-
if (!
|
|
2541
|
+
if (!ee(i))
|
|
2542
2542
|
return i;
|
|
2543
2543
|
const o = s.transform(i.value, a);
|
|
2544
2544
|
if (o instanceof Promise)
|
|
2545
2545
|
throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");
|
|
2546
2546
|
return { status: t.value, value: o };
|
|
2547
2547
|
} else
|
|
2548
|
-
return this._def.schema._parseAsync({ data: n.data, path: n.path, parent: n }).then((i) =>
|
|
2548
|
+
return this._def.schema._parseAsync({ data: n.data, path: n.path, parent: n }).then((i) => ee(i) ? Promise.resolve(s.transform(i.value, a)).then((o) => ({ status: t.value, value: o })) : i);
|
|
2549
2549
|
x.assertNever(s);
|
|
2550
2550
|
}
|
|
2551
2551
|
}
|
|
2552
2552
|
I.create = (r, e, t) => new I({
|
|
2553
2553
|
schema: r,
|
|
2554
|
-
typeName:
|
|
2554
|
+
typeName: m.ZodEffects,
|
|
2555
2555
|
effect: e,
|
|
2556
|
-
...
|
|
2556
|
+
..._(t)
|
|
2557
2557
|
});
|
|
2558
2558
|
I.createWithPreprocess = (r, e, t) => new I({
|
|
2559
2559
|
schema: e,
|
|
2560
2560
|
effect: { type: "preprocess", transform: r },
|
|
2561
|
-
typeName:
|
|
2562
|
-
...
|
|
2561
|
+
typeName: m.ZodEffects,
|
|
2562
|
+
..._(t)
|
|
2563
2563
|
});
|
|
2564
|
-
class j extends
|
|
2564
|
+
class j extends v {
|
|
2565
2565
|
_parse(e) {
|
|
2566
|
-
return this._getType(e) === f.undefined ?
|
|
2566
|
+
return this._getType(e) === f.undefined ? S(void 0) : this._def.innerType._parse(e);
|
|
2567
2567
|
}
|
|
2568
2568
|
unwrap() {
|
|
2569
2569
|
return this._def.innerType;
|
|
@@ -2571,23 +2571,23 @@ class j extends g {
|
|
|
2571
2571
|
}
|
|
2572
2572
|
j.create = (r, e) => new j({
|
|
2573
2573
|
innerType: r,
|
|
2574
|
-
typeName:
|
|
2575
|
-
...
|
|
2574
|
+
typeName: m.ZodOptional,
|
|
2575
|
+
..._(e)
|
|
2576
2576
|
});
|
|
2577
|
-
class
|
|
2577
|
+
class q extends v {
|
|
2578
2578
|
_parse(e) {
|
|
2579
|
-
return this._getType(e) === f.null ?
|
|
2579
|
+
return this._getType(e) === f.null ? S(null) : this._def.innerType._parse(e);
|
|
2580
2580
|
}
|
|
2581
2581
|
unwrap() {
|
|
2582
2582
|
return this._def.innerType;
|
|
2583
2583
|
}
|
|
2584
2584
|
}
|
|
2585
|
-
|
|
2585
|
+
q.create = (r, e) => new q({
|
|
2586
2586
|
innerType: r,
|
|
2587
|
-
typeName:
|
|
2588
|
-
...
|
|
2587
|
+
typeName: m.ZodNullable,
|
|
2588
|
+
..._(e)
|
|
2589
2589
|
});
|
|
2590
|
-
class
|
|
2590
|
+
class le extends v {
|
|
2591
2591
|
_parse(e) {
|
|
2592
2592
|
const { ctx: t } = this._processInputParams(e);
|
|
2593
2593
|
let n = t.data;
|
|
@@ -2601,13 +2601,13 @@ class pe extends g {
|
|
|
2601
2601
|
return this._def.innerType;
|
|
2602
2602
|
}
|
|
2603
2603
|
}
|
|
2604
|
-
|
|
2604
|
+
le.create = (r, e) => new le({
|
|
2605
2605
|
innerType: r,
|
|
2606
|
-
typeName:
|
|
2606
|
+
typeName: m.ZodDefault,
|
|
2607
2607
|
defaultValue: typeof e.default == "function" ? e.default : () => e.default,
|
|
2608
|
-
...
|
|
2608
|
+
..._(e)
|
|
2609
2609
|
});
|
|
2610
|
-
class
|
|
2610
|
+
class fe extends v {
|
|
2611
2611
|
_parse(e) {
|
|
2612
2612
|
const { ctx: t } = this._processInputParams(e), n = {
|
|
2613
2613
|
...t,
|
|
@@ -2622,7 +2622,7 @@ class ye extends g {
|
|
|
2622
2622
|
...n
|
|
2623
2623
|
}
|
|
2624
2624
|
});
|
|
2625
|
-
return
|
|
2625
|
+
return te(s) ? s.then((a) => ({
|
|
2626
2626
|
status: "valid",
|
|
2627
2627
|
value: a.status === "valid" ? a.value : this._def.catchValue({
|
|
2628
2628
|
get error() {
|
|
@@ -2644,13 +2644,13 @@ class ye extends g {
|
|
|
2644
2644
|
return this._def.innerType;
|
|
2645
2645
|
}
|
|
2646
2646
|
}
|
|
2647
|
-
|
|
2647
|
+
fe.create = (r, e) => new fe({
|
|
2648
2648
|
innerType: r,
|
|
2649
|
-
typeName:
|
|
2649
|
+
typeName: m.ZodCatch,
|
|
2650
2650
|
catchValue: typeof e.catch == "function" ? e.catch : () => e.catch,
|
|
2651
|
-
...
|
|
2651
|
+
..._(e)
|
|
2652
2652
|
});
|
|
2653
|
-
class
|
|
2653
|
+
class be extends v {
|
|
2654
2654
|
_parse(e) {
|
|
2655
2655
|
if (this._getType(e) !== f.nan) {
|
|
2656
2656
|
const n = this._getOrReturnCtx(e);
|
|
@@ -2658,17 +2658,17 @@ class Ze extends g {
|
|
|
2658
2658
|
code: d.invalid_type,
|
|
2659
2659
|
expected: f.nan,
|
|
2660
2660
|
received: n.parsedType
|
|
2661
|
-
}),
|
|
2661
|
+
}), p;
|
|
2662
2662
|
}
|
|
2663
2663
|
return { status: "valid", value: e.data };
|
|
2664
2664
|
}
|
|
2665
2665
|
}
|
|
2666
|
-
|
|
2667
|
-
typeName:
|
|
2668
|
-
...
|
|
2666
|
+
be.create = (r) => new be({
|
|
2667
|
+
typeName: m.ZodNaN,
|
|
2668
|
+
..._(r)
|
|
2669
2669
|
});
|
|
2670
|
-
const
|
|
2671
|
-
class
|
|
2670
|
+
const yt = Symbol("zod_brand");
|
|
2671
|
+
class Ee extends v {
|
|
2672
2672
|
_parse(e) {
|
|
2673
2673
|
const { ctx: t } = this._processInputParams(e), n = t.data;
|
|
2674
2674
|
return this._def.type._parse({
|
|
@@ -2681,7 +2681,7 @@ class Ie extends g {
|
|
|
2681
2681
|
return this._def.type;
|
|
2682
2682
|
}
|
|
2683
2683
|
}
|
|
2684
|
-
class
|
|
2684
|
+
class me extends v {
|
|
2685
2685
|
_parse(e) {
|
|
2686
2686
|
const { status: t, ctx: n } = this._processInputParams(e);
|
|
2687
2687
|
if (n.common.async)
|
|
@@ -2691,7 +2691,7 @@ class ve extends g {
|
|
|
2691
2691
|
path: n.path,
|
|
2692
2692
|
parent: n
|
|
2693
2693
|
});
|
|
2694
|
-
return a.status === "aborted" ?
|
|
2694
|
+
return a.status === "aborted" ? p : a.status === "dirty" ? (t.dirty(), H(a.value)) : this._def.out._parseAsync({
|
|
2695
2695
|
data: a.value,
|
|
2696
2696
|
path: n.path,
|
|
2697
2697
|
parent: n
|
|
@@ -2703,7 +2703,7 @@ class ve extends g {
|
|
|
2703
2703
|
path: n.path,
|
|
2704
2704
|
parent: n
|
|
2705
2705
|
});
|
|
2706
|
-
return s.status === "aborted" ?
|
|
2706
|
+
return s.status === "aborted" ? p : s.status === "dirty" ? (t.dirty(), {
|
|
2707
2707
|
status: "dirty",
|
|
2708
2708
|
value: s.value
|
|
2709
2709
|
}) : this._def.out._parseSync({
|
|
@@ -2714,191 +2714,191 @@ class ve extends g {
|
|
|
2714
2714
|
}
|
|
2715
2715
|
}
|
|
2716
2716
|
static create(e, t) {
|
|
2717
|
-
return new
|
|
2717
|
+
return new me({
|
|
2718
2718
|
in: e,
|
|
2719
2719
|
out: t,
|
|
2720
|
-
typeName:
|
|
2720
|
+
typeName: m.ZodPipeline
|
|
2721
2721
|
});
|
|
2722
2722
|
}
|
|
2723
2723
|
}
|
|
2724
|
-
class
|
|
2724
|
+
class he extends v {
|
|
2725
2725
|
_parse(e) {
|
|
2726
|
-
const t = this._def.innerType._parse(e), n = (s) => (
|
|
2727
|
-
return
|
|
2726
|
+
const t = this._def.innerType._parse(e), n = (s) => (ee(s) && (s.value = Object.freeze(s.value)), s);
|
|
2727
|
+
return te(t) ? t.then((s) => n(s)) : n(t);
|
|
2728
2728
|
}
|
|
2729
2729
|
unwrap() {
|
|
2730
2730
|
return this._def.innerType;
|
|
2731
2731
|
}
|
|
2732
2732
|
}
|
|
2733
|
-
|
|
2733
|
+
he.create = (r, e) => new he({
|
|
2734
2734
|
innerType: r,
|
|
2735
|
-
typeName:
|
|
2736
|
-
...
|
|
2735
|
+
typeName: m.ZodReadonly,
|
|
2736
|
+
..._(e)
|
|
2737
2737
|
});
|
|
2738
|
-
function
|
|
2739
|
-
return r ?
|
|
2738
|
+
function De(r, e = {}, t) {
|
|
2739
|
+
return r ? Q.create().superRefine((n, s) => {
|
|
2740
2740
|
var a, i;
|
|
2741
2741
|
if (!r(n)) {
|
|
2742
2742
|
const o = typeof e == "function" ? e(n) : typeof e == "string" ? { message: e } : e, u = (i = (a = o.fatal) !== null && a !== void 0 ? a : t) !== null && i !== void 0 ? i : !0, c = typeof o == "string" ? { message: o } : o;
|
|
2743
2743
|
s.addIssue({ code: "custom", ...c, fatal: u });
|
|
2744
2744
|
}
|
|
2745
|
-
}) :
|
|
2745
|
+
}) : Q.create();
|
|
2746
2746
|
}
|
|
2747
|
-
const
|
|
2747
|
+
const _t = {
|
|
2748
2748
|
object: k.lazycreate
|
|
2749
2749
|
};
|
|
2750
|
-
var
|
|
2750
|
+
var m;
|
|
2751
2751
|
(function(r) {
|
|
2752
2752
|
r.ZodString = "ZodString", r.ZodNumber = "ZodNumber", r.ZodNaN = "ZodNaN", r.ZodBigInt = "ZodBigInt", r.ZodBoolean = "ZodBoolean", r.ZodDate = "ZodDate", r.ZodSymbol = "ZodSymbol", r.ZodUndefined = "ZodUndefined", r.ZodNull = "ZodNull", r.ZodAny = "ZodAny", r.ZodUnknown = "ZodUnknown", r.ZodNever = "ZodNever", r.ZodVoid = "ZodVoid", r.ZodArray = "ZodArray", r.ZodObject = "ZodObject", r.ZodUnion = "ZodUnion", r.ZodDiscriminatedUnion = "ZodDiscriminatedUnion", r.ZodIntersection = "ZodIntersection", r.ZodTuple = "ZodTuple", r.ZodRecord = "ZodRecord", r.ZodMap = "ZodMap", r.ZodSet = "ZodSet", r.ZodFunction = "ZodFunction", r.ZodLazy = "ZodLazy", r.ZodLiteral = "ZodLiteral", r.ZodEnum = "ZodEnum", r.ZodEffects = "ZodEffects", r.ZodNativeEnum = "ZodNativeEnum", r.ZodOptional = "ZodOptional", r.ZodNullable = "ZodNullable", r.ZodDefault = "ZodDefault", r.ZodCatch = "ZodCatch", r.ZodPromise = "ZodPromise", r.ZodBranded = "ZodBranded", r.ZodPipeline = "ZodPipeline", r.ZodReadonly = "ZodReadonly";
|
|
2753
|
-
})(
|
|
2754
|
-
const
|
|
2753
|
+
})(m || (m = {}));
|
|
2754
|
+
const vt = (r, e = {
|
|
2755
2755
|
message: `Input not instance of ${r.name}`
|
|
2756
|
-
}) =>
|
|
2756
|
+
}) => De((t) => t instanceof r, e), Le = E.create, qe = V.create, gt = be.create, xt = D.create, Ue = re.create, kt = B.create, bt = ge.create, wt = ne.create, Tt = se.create, Zt = Q.create, St = U.create, Ct = z.create, Ot = xe.create, Nt = R.create, Et = k.create, Rt = k.strictCreate, It = ae.create, jt = we.create, At = ie.create, Mt = M.create, $t = oe.create, zt = ke.create, Pt = W.create, Vt = J.create, Dt = de.create, Lt = ce.create, qt = L.create, Ut = ue.create, Bt = X.create, je = I.create, Wt = j.create, Yt = q.create, Ht = I.createWithPreprocess, Jt = me.create, Gt = () => Le().optional(), Qt = () => qe().optional(), Xt = () => Ue().optional(), Kt = {
|
|
2757
2757
|
string: (r) => E.create({ ...r, coerce: !0 }),
|
|
2758
2758
|
number: (r) => V.create({ ...r, coerce: !0 }),
|
|
2759
|
-
boolean: (r) =>
|
|
2759
|
+
boolean: (r) => re.create({
|
|
2760
2760
|
...r,
|
|
2761
2761
|
coerce: !0
|
|
2762
2762
|
}),
|
|
2763
|
-
bigint: (r) =>
|
|
2764
|
-
date: (r) =>
|
|
2765
|
-
},
|
|
2766
|
-
var
|
|
2763
|
+
bigint: (r) => D.create({ ...r, coerce: !0 }),
|
|
2764
|
+
date: (r) => B.create({ ...r, coerce: !0 })
|
|
2765
|
+
}, Ft = p;
|
|
2766
|
+
var C = /* @__PURE__ */ Object.freeze({
|
|
2767
2767
|
__proto__: null,
|
|
2768
|
-
defaultErrorMap:
|
|
2769
|
-
setErrorMap:
|
|
2770
|
-
getErrorMap:
|
|
2771
|
-
makeIssue:
|
|
2772
|
-
EMPTY_PATH:
|
|
2768
|
+
defaultErrorMap: G,
|
|
2769
|
+
setErrorMap: Fe,
|
|
2770
|
+
getErrorMap: ye,
|
|
2771
|
+
makeIssue: _e,
|
|
2772
|
+
EMPTY_PATH: et,
|
|
2773
2773
|
addIssueToContext: l,
|
|
2774
2774
|
ParseStatus: Z,
|
|
2775
|
-
INVALID:
|
|
2776
|
-
DIRTY:
|
|
2777
|
-
OK:
|
|
2778
|
-
isAborted:
|
|
2779
|
-
isDirty:
|
|
2780
|
-
isValid:
|
|
2781
|
-
isAsync:
|
|
2775
|
+
INVALID: p,
|
|
2776
|
+
DIRTY: H,
|
|
2777
|
+
OK: S,
|
|
2778
|
+
isAborted: Ce,
|
|
2779
|
+
isDirty: Oe,
|
|
2780
|
+
isValid: ee,
|
|
2781
|
+
isAsync: te,
|
|
2782
2782
|
get util() {
|
|
2783
2783
|
return x;
|
|
2784
2784
|
},
|
|
2785
2785
|
get objectUtil() {
|
|
2786
|
-
return
|
|
2786
|
+
return Se;
|
|
2787
2787
|
},
|
|
2788
2788
|
ZodParsedType: f,
|
|
2789
|
-
getParsedType:
|
|
2790
|
-
ZodType:
|
|
2791
|
-
datetimeRegex:
|
|
2789
|
+
getParsedType: P,
|
|
2790
|
+
ZodType: v,
|
|
2791
|
+
datetimeRegex: Pe,
|
|
2792
2792
|
ZodString: E,
|
|
2793
2793
|
ZodNumber: V,
|
|
2794
|
-
ZodBigInt:
|
|
2795
|
-
ZodBoolean:
|
|
2796
|
-
ZodDate:
|
|
2797
|
-
ZodSymbol:
|
|
2798
|
-
ZodUndefined:
|
|
2799
|
-
ZodNull:
|
|
2800
|
-
ZodAny:
|
|
2801
|
-
ZodUnknown:
|
|
2794
|
+
ZodBigInt: D,
|
|
2795
|
+
ZodBoolean: re,
|
|
2796
|
+
ZodDate: B,
|
|
2797
|
+
ZodSymbol: ge,
|
|
2798
|
+
ZodUndefined: ne,
|
|
2799
|
+
ZodNull: se,
|
|
2800
|
+
ZodAny: Q,
|
|
2801
|
+
ZodUnknown: U,
|
|
2802
2802
|
ZodNever: z,
|
|
2803
|
-
ZodVoid:
|
|
2803
|
+
ZodVoid: xe,
|
|
2804
2804
|
ZodArray: R,
|
|
2805
2805
|
ZodObject: k,
|
|
2806
|
-
ZodUnion:
|
|
2807
|
-
ZodDiscriminatedUnion:
|
|
2808
|
-
ZodIntersection:
|
|
2809
|
-
ZodTuple:
|
|
2810
|
-
ZodRecord:
|
|
2811
|
-
ZodMap:
|
|
2812
|
-
ZodSet:
|
|
2813
|
-
ZodFunction:
|
|
2814
|
-
ZodLazy:
|
|
2815
|
-
ZodLiteral:
|
|
2816
|
-
ZodEnum:
|
|
2817
|
-
ZodNativeEnum:
|
|
2818
|
-
ZodPromise:
|
|
2806
|
+
ZodUnion: ae,
|
|
2807
|
+
ZodDiscriminatedUnion: we,
|
|
2808
|
+
ZodIntersection: ie,
|
|
2809
|
+
ZodTuple: M,
|
|
2810
|
+
ZodRecord: oe,
|
|
2811
|
+
ZodMap: ke,
|
|
2812
|
+
ZodSet: W,
|
|
2813
|
+
ZodFunction: J,
|
|
2814
|
+
ZodLazy: de,
|
|
2815
|
+
ZodLiteral: ce,
|
|
2816
|
+
ZodEnum: L,
|
|
2817
|
+
ZodNativeEnum: ue,
|
|
2818
|
+
ZodPromise: X,
|
|
2819
2819
|
ZodEffects: I,
|
|
2820
2820
|
ZodTransformer: I,
|
|
2821
2821
|
ZodOptional: j,
|
|
2822
|
-
ZodNullable:
|
|
2823
|
-
ZodDefault:
|
|
2824
|
-
ZodCatch:
|
|
2825
|
-
ZodNaN:
|
|
2826
|
-
BRAND:
|
|
2827
|
-
ZodBranded:
|
|
2828
|
-
ZodPipeline:
|
|
2829
|
-
ZodReadonly:
|
|
2830
|
-
custom:
|
|
2831
|
-
Schema:
|
|
2832
|
-
ZodSchema:
|
|
2833
|
-
late:
|
|
2822
|
+
ZodNullable: q,
|
|
2823
|
+
ZodDefault: le,
|
|
2824
|
+
ZodCatch: fe,
|
|
2825
|
+
ZodNaN: be,
|
|
2826
|
+
BRAND: yt,
|
|
2827
|
+
ZodBranded: Ee,
|
|
2828
|
+
ZodPipeline: me,
|
|
2829
|
+
ZodReadonly: he,
|
|
2830
|
+
custom: De,
|
|
2831
|
+
Schema: v,
|
|
2832
|
+
ZodSchema: v,
|
|
2833
|
+
late: _t,
|
|
2834
2834
|
get ZodFirstPartyTypeKind() {
|
|
2835
|
-
return
|
|
2835
|
+
return m;
|
|
2836
2836
|
},
|
|
2837
|
-
coerce:
|
|
2838
|
-
any:
|
|
2839
|
-
array:
|
|
2840
|
-
bigint:
|
|
2841
|
-
boolean:
|
|
2842
|
-
date:
|
|
2843
|
-
discriminatedUnion:
|
|
2844
|
-
effect:
|
|
2845
|
-
enum:
|
|
2846
|
-
function:
|
|
2847
|
-
instanceof:
|
|
2848
|
-
intersection:
|
|
2849
|
-
lazy:
|
|
2850
|
-
literal:
|
|
2851
|
-
map:
|
|
2852
|
-
nan:
|
|
2853
|
-
nativeEnum:
|
|
2854
|
-
never:
|
|
2855
|
-
null:
|
|
2856
|
-
nullable:
|
|
2857
|
-
number:
|
|
2858
|
-
object:
|
|
2859
|
-
oboolean:
|
|
2860
|
-
onumber:
|
|
2861
|
-
optional:
|
|
2862
|
-
ostring:
|
|
2863
|
-
pipeline:
|
|
2864
|
-
preprocess:
|
|
2865
|
-
promise:
|
|
2866
|
-
record:
|
|
2867
|
-
set:
|
|
2868
|
-
strictObject:
|
|
2869
|
-
string:
|
|
2870
|
-
symbol:
|
|
2871
|
-
transformer:
|
|
2872
|
-
tuple:
|
|
2873
|
-
undefined:
|
|
2874
|
-
union:
|
|
2875
|
-
unknown:
|
|
2876
|
-
void:
|
|
2877
|
-
NEVER:
|
|
2837
|
+
coerce: Kt,
|
|
2838
|
+
any: Zt,
|
|
2839
|
+
array: Nt,
|
|
2840
|
+
bigint: xt,
|
|
2841
|
+
boolean: Ue,
|
|
2842
|
+
date: kt,
|
|
2843
|
+
discriminatedUnion: jt,
|
|
2844
|
+
effect: je,
|
|
2845
|
+
enum: qt,
|
|
2846
|
+
function: Vt,
|
|
2847
|
+
instanceof: vt,
|
|
2848
|
+
intersection: At,
|
|
2849
|
+
lazy: Dt,
|
|
2850
|
+
literal: Lt,
|
|
2851
|
+
map: zt,
|
|
2852
|
+
nan: gt,
|
|
2853
|
+
nativeEnum: Ut,
|
|
2854
|
+
never: Ct,
|
|
2855
|
+
null: Tt,
|
|
2856
|
+
nullable: Yt,
|
|
2857
|
+
number: qe,
|
|
2858
|
+
object: Et,
|
|
2859
|
+
oboolean: Xt,
|
|
2860
|
+
onumber: Qt,
|
|
2861
|
+
optional: Wt,
|
|
2862
|
+
ostring: Gt,
|
|
2863
|
+
pipeline: Jt,
|
|
2864
|
+
preprocess: Ht,
|
|
2865
|
+
promise: Bt,
|
|
2866
|
+
record: $t,
|
|
2867
|
+
set: Pt,
|
|
2868
|
+
strictObject: Rt,
|
|
2869
|
+
string: Le,
|
|
2870
|
+
symbol: bt,
|
|
2871
|
+
transformer: je,
|
|
2872
|
+
tuple: Mt,
|
|
2873
|
+
undefined: wt,
|
|
2874
|
+
union: It,
|
|
2875
|
+
unknown: St,
|
|
2876
|
+
void: Ot,
|
|
2877
|
+
NEVER: Ft,
|
|
2878
2878
|
ZodIssueCode: d,
|
|
2879
|
-
quotelessJson:
|
|
2879
|
+
quotelessJson: Ke,
|
|
2880
2880
|
ZodError: N
|
|
2881
2881
|
});
|
|
2882
|
-
const
|
|
2883
|
-
const { formValidationTexts: r } =
|
|
2882
|
+
const or = () => {
|
|
2883
|
+
const { formValidationTexts: r } = He(We), e = (g) => (g != null && g.useCoerce ? C.coerce : C).string({
|
|
2884
2884
|
invalid_type_error: r.required,
|
|
2885
2885
|
required_error: r.required
|
|
2886
|
-
}).transform((w) => w ?? null), t = (
|
|
2887
|
-
const b = (
|
|
2886
|
+
}).transform((w) => w ?? null), t = (g) => e(g).nullable().optional().transform((b) => b ?? null), n = (g) => {
|
|
2887
|
+
const b = (g != null && g.useCoerce ? C.coerce : C).number({
|
|
2888
2888
|
invalid_type_error: r.required,
|
|
2889
2889
|
required_error: r.required
|
|
2890
2890
|
});
|
|
2891
|
-
return (
|
|
2892
|
-
}, s = (
|
|
2891
|
+
return (g == null ? void 0 : g.min) !== void 0 && b.min(g.min), (g == null ? void 0 : g.max) !== void 0 && b.max(g.max), b.transform((w) => w ?? null);
|
|
2892
|
+
}, s = (g) => n(g).nullable().optional().transform((b) => b ?? null), a = (g) => (g != null && g.useCoerce ? C.coerce : C).boolean({
|
|
2893
2893
|
invalid_type_error: r.required,
|
|
2894
2894
|
required_error: r.required
|
|
2895
|
-
}).transform((b) => b ?? null), i = (
|
|
2895
|
+
}).transform((b) => b ?? null), i = (g) => (g != null && g.useCoerce ? C.coerce : C).string({
|
|
2896
2896
|
invalid_type_error: r.required,
|
|
2897
2897
|
required_error: r.required
|
|
2898
|
-
}).refine(
|
|
2898
|
+
}).refine(Xe, { message: r.invalidDate }).transform((w) => w ?? null), o = (g) => i(g).nullable().transform((b) => b ?? null), u = (g, b) => C.enum(g, {
|
|
2899
2899
|
invalid_type_error: r.required,
|
|
2900
2900
|
required_error: r.required
|
|
2901
|
-
}).transform((
|
|
2901
|
+
}).transform((Re) => Re ?? null);
|
|
2902
2902
|
return {
|
|
2903
2903
|
zString: t,
|
|
2904
2904
|
zStringRequired: e,
|
|
@@ -2907,42 +2907,15 @@ const lr = () => {
|
|
|
2907
2907
|
zBool: a,
|
|
2908
2908
|
zDate: o,
|
|
2909
2909
|
zDateRequired: i,
|
|
2910
|
-
zEnum: (
|
|
2910
|
+
zEnum: (g, b) => u(g).nullable().transform((w) => w ?? null),
|
|
2911
2911
|
zEnumRequired: u,
|
|
2912
|
-
zObjectIdInt: (
|
|
2913
|
-
zObjectIdIntRequired: (
|
|
2914
|
-
zObjectIdStr: (
|
|
2915
|
-
zObjectIdStrRequired: (
|
|
2916
|
-
zFile: ({ required:
|
|
2912
|
+
zObjectIdInt: (g) => C.object({ id: s({ useCoerce: !0 }) }).nullable().transform((w) => w ?? null),
|
|
2913
|
+
zObjectIdIntRequired: (g) => C.object({ id: n() }).transform((w) => w ?? null),
|
|
2914
|
+
zObjectIdStr: (g) => C.object({ id: t({ useCoerce: !0 }) }).nullable().transform((w) => w ?? null),
|
|
2915
|
+
zObjectIdStrRequired: (g) => C.object({ id: e() }).transform((w) => w ?? null),
|
|
2916
|
+
zFile: ({ required: g, multiple: b, maxFileSize: w }) => C.any().transform((T) => Array.from(T ?? [])).refine((T) => !g || (T == null ? void 0 : T.length) > 0, "File is required.").refine((T) => b || (T == null ? void 0 : T.length) <= 1, "Multiple files not allowed.").refine((T) => T.every((Be) => Be.size <= w), `Maximum file size is ${Qe(w)}.`).transform((T) => (b ? T : T == null ? void 0 : T[0]) ?? null)
|
|
2917
2917
|
};
|
|
2918
|
-
},
|
|
2919
|
-
loadOnInit: !0,
|
|
2920
|
-
silent: !1,
|
|
2921
|
-
enabled: !0,
|
|
2922
|
-
nullStateBeforeLoad: !0
|
|
2923
|
-
}, fr = (r, { loadOnInit: e = te.loadOnInit, enabled: t = te.enabled, silent: n = te.silent, nullStateBeforeLoad: s = te.nullStateBeforeLoad, customApiUrl: a, customBearerToken: i } = te) => {
|
|
2924
|
-
const o = Me({ silent: n, customToken: i, differentBaseUrl: a }), { startLoading: u, stopLoading: c } = ze(Ke), m = Fe(0), [S, B] = Pe(null), P = et(async (ee, _) => {
|
|
2925
|
-
if (t !== !1) {
|
|
2926
|
-
!n && u(`loadData-${r}-${_}`), s && B(null);
|
|
2927
|
-
try {
|
|
2928
|
-
const b = await o.get(r, {
|
|
2929
|
-
signal: ee
|
|
2930
|
-
});
|
|
2931
|
-
B(b.data);
|
|
2932
|
-
} finally {
|
|
2933
|
-
!n && c(`loadData-${r}-${_}`);
|
|
2934
|
-
}
|
|
2935
|
-
}
|
|
2936
|
-
}, [t, n, u, r, s, o, c]);
|
|
2937
|
-
return De(() => {
|
|
2938
|
-
if (e === !1)
|
|
2939
|
-
return;
|
|
2940
|
-
const ee = new AbortController();
|
|
2941
|
-
return P(ee.signal, ++m.current), () => {
|
|
2942
|
-
ee.abort();
|
|
2943
|
-
};
|
|
2944
|
-
}, [P, e]), { data: S, setData: B, reloadData: P };
|
|
2945
|
-
}, ar = (r) => {
|
|
2918
|
+
}, er = (r) => {
|
|
2946
2919
|
let e = "pending", t;
|
|
2947
2920
|
const n = r.then((s) => {
|
|
2948
2921
|
e = "success", t = s;
|
|
@@ -2962,28 +2935,28 @@ const lr = () => {
|
|
|
2962
2935
|
}
|
|
2963
2936
|
};
|
|
2964
2937
|
};
|
|
2965
|
-
function
|
|
2966
|
-
const e =
|
|
2967
|
-
return
|
|
2938
|
+
function dr(r) {
|
|
2939
|
+
const e = Ye({ silent: !0 }), [t, n] = Je(null);
|
|
2940
|
+
return Ge(() => {
|
|
2968
2941
|
(async () => {
|
|
2969
2942
|
const a = e.get(r).then((i) => i.data);
|
|
2970
|
-
n(
|
|
2943
|
+
n(er(a));
|
|
2971
2944
|
})();
|
|
2972
2945
|
}, [e, r]), t;
|
|
2973
2946
|
}
|
|
2974
2947
|
export {
|
|
2975
|
-
|
|
2976
|
-
|
|
2977
|
-
|
|
2978
|
-
|
|
2979
|
-
|
|
2980
|
-
|
|
2981
|
-
|
|
2982
|
-
|
|
2983
|
-
|
|
2984
|
-
|
|
2985
|
-
|
|
2986
|
-
|
|
2987
|
-
|
|
2988
|
-
|
|
2948
|
+
lr as cancelToken,
|
|
2949
|
+
fr as useAuth,
|
|
2950
|
+
Ye as useAxios,
|
|
2951
|
+
xr as useClickOutside,
|
|
2952
|
+
pr as useConfirm,
|
|
2953
|
+
kr as useFormControlType,
|
|
2954
|
+
yr as useGetApiData,
|
|
2955
|
+
dr as useGetDataBound,
|
|
2956
|
+
br as useKeyPress,
|
|
2957
|
+
_r as useLocalStorageState,
|
|
2958
|
+
hr as useNotifications,
|
|
2959
|
+
Tr as usePermissions,
|
|
2960
|
+
vr as usePrompt,
|
|
2961
|
+
or as useZodSchemaTypes
|
|
2989
2962
|
};
|