vue-api-kit 1.0.0 → 1.1.1
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/README.md +235 -7
- package/dist/core/client.d.ts +44 -2
- package/dist/core/types.d.ts +116 -18
- package/dist/index.d.ts +2 -0
- package/dist/index.js +408 -394
- package/dist/index.js.map +1 -1
- package/package.json +22 -3
package/dist/index.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import Il, { AxiosError as gi } from "axios";
|
|
2
|
+
import { AxiosError as Xm } from "axios";
|
|
2
3
|
import { nextTick as zl, ref as F, onMounted as wl, watch as Sl, onBeforeUnmount as jl } from "vue";
|
|
3
4
|
import xl from "lodash";
|
|
4
5
|
const dt = Object.freeze({
|
|
@@ -50,7 +51,7 @@ class rn extends Error {
|
|
|
50
51
|
}
|
|
51
52
|
}
|
|
52
53
|
const We = {};
|
|
53
|
-
function
|
|
54
|
+
function D(e) {
|
|
54
55
|
return e && Object.assign(We, e), We;
|
|
55
56
|
}
|
|
56
57
|
function Ol(e) {
|
|
@@ -131,7 +132,7 @@ function Q(e, t, o) {
|
|
|
131
132
|
configurable: !0
|
|
132
133
|
});
|
|
133
134
|
}
|
|
134
|
-
function
|
|
135
|
+
function q(...e) {
|
|
135
136
|
const t = {};
|
|
136
137
|
for (const o of e) {
|
|
137
138
|
const i = Object.getOwnPropertyDescriptors(o);
|
|
@@ -139,10 +140,10 @@ function X(...e) {
|
|
|
139
140
|
}
|
|
140
141
|
return Object.defineProperties({}, t);
|
|
141
142
|
}
|
|
142
|
-
function
|
|
143
|
-
return
|
|
143
|
+
function Tl(e) {
|
|
144
|
+
return q(e._zod.def);
|
|
144
145
|
}
|
|
145
|
-
function
|
|
146
|
+
function El(e, t) {
|
|
146
147
|
return t ? t.reduce((o, i) => o?.[i], e) : e;
|
|
147
148
|
}
|
|
148
149
|
function Al(e) {
|
|
@@ -154,7 +155,7 @@ function Al(e) {
|
|
|
154
155
|
return n;
|
|
155
156
|
});
|
|
156
157
|
}
|
|
157
|
-
function
|
|
158
|
+
function Rl(e = 10) {
|
|
158
159
|
const t = "abcdefghijklmnopqrstuvwxyz";
|
|
159
160
|
let o = "";
|
|
160
161
|
for (let i = 0; i < e; i++)
|
|
@@ -194,7 +195,7 @@ function te(e) {
|
|
|
194
195
|
function an(e) {
|
|
195
196
|
return te(e) ? { ...e } : Array.isArray(e) ? [...e] : e;
|
|
196
197
|
}
|
|
197
|
-
function
|
|
198
|
+
function Ll(e) {
|
|
198
199
|
let t = 0;
|
|
199
200
|
for (const o in e)
|
|
200
201
|
Object.prototype.hasOwnProperty.call(e, o) && t++;
|
|
@@ -222,11 +223,11 @@ const Cl = (e) => {
|
|
|
222
223
|
default:
|
|
223
224
|
throw new Error(`Unknown data type: ${t}`);
|
|
224
225
|
}
|
|
225
|
-
},
|
|
226
|
+
}, qe = /* @__PURE__ */ new Set(["string", "number", "symbol"]), Ti = /* @__PURE__ */ new Set(["string", "number", "bigint", "boolean", "symbol", "undefined"]);
|
|
226
227
|
function B(e) {
|
|
227
228
|
return e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
228
229
|
}
|
|
229
|
-
function
|
|
230
|
+
function L(e, t, o) {
|
|
230
231
|
const i = new e._zod.constr(t ?? e._zod.def);
|
|
231
232
|
return (!t || o?.parent) && (i._zod.parent = e), i;
|
|
232
233
|
}
|
|
@@ -272,7 +273,7 @@ function Fl(e) {
|
|
|
272
273
|
function y(e) {
|
|
273
274
|
return typeof e == "bigint" ? e.toString() + "n" : typeof e == "string" ? `"${e}"` : `${e}`;
|
|
274
275
|
}
|
|
275
|
-
function
|
|
276
|
+
function Ei(e) {
|
|
276
277
|
return Object.keys(e).filter((t) => e[t]._zod.optin === "optional" && e[t]._zod.optout === "optional");
|
|
277
278
|
}
|
|
278
279
|
const Ai = {
|
|
@@ -281,12 +282,12 @@ const Ai = {
|
|
|
281
282
|
uint32: [0, 4294967295],
|
|
282
283
|
float32: [-34028234663852886e22, 34028234663852886e22],
|
|
283
284
|
float64: [-Number.MAX_VALUE, Number.MAX_VALUE]
|
|
284
|
-
},
|
|
285
|
+
}, Ri = {
|
|
285
286
|
int64: [/* @__PURE__ */ BigInt("-9223372036854775808"), /* @__PURE__ */ BigInt("9223372036854775807")],
|
|
286
287
|
uint64: [/* @__PURE__ */ BigInt(0), /* @__PURE__ */ BigInt("18446744073709551615")]
|
|
287
288
|
};
|
|
288
|
-
function
|
|
289
|
-
const o = e._zod.def, i =
|
|
289
|
+
function Li(e, t) {
|
|
290
|
+
const o = e._zod.def, i = q(e._zod.def, {
|
|
290
291
|
get shape() {
|
|
291
292
|
const n = {};
|
|
292
293
|
for (const r in t) {
|
|
@@ -298,10 +299,10 @@ function Ri(e, t) {
|
|
|
298
299
|
},
|
|
299
300
|
checks: []
|
|
300
301
|
});
|
|
301
|
-
return
|
|
302
|
+
return L(e, i);
|
|
302
303
|
}
|
|
303
304
|
function Ci(e, t) {
|
|
304
|
-
const o = e._zod.def, i =
|
|
305
|
+
const o = e._zod.def, i = q(e._zod.def, {
|
|
305
306
|
get shape() {
|
|
306
307
|
const n = { ...e._zod.def.shape };
|
|
307
308
|
for (const r in t) {
|
|
@@ -313,7 +314,7 @@ function Ci(e, t) {
|
|
|
313
314
|
},
|
|
314
315
|
checks: []
|
|
315
316
|
});
|
|
316
|
-
return
|
|
317
|
+
return L(e, i);
|
|
317
318
|
}
|
|
318
319
|
function Fi(e, t) {
|
|
319
320
|
if (!te(t))
|
|
@@ -321,14 +322,14 @@ function Fi(e, t) {
|
|
|
321
322
|
const o = e._zod.def.checks;
|
|
322
323
|
if (o && o.length > 0)
|
|
323
324
|
throw new Error("Object schemas containing refinements cannot be extended. Use `.safeExtend()` instead.");
|
|
324
|
-
const n =
|
|
325
|
+
const n = q(e._zod.def, {
|
|
325
326
|
get shape() {
|
|
326
327
|
const r = { ...e._zod.def.shape, ...t };
|
|
327
328
|
return Q(this, "shape", r), r;
|
|
328
329
|
},
|
|
329
330
|
checks: []
|
|
330
331
|
});
|
|
331
|
-
return
|
|
332
|
+
return L(e, n);
|
|
332
333
|
}
|
|
333
334
|
function Ji(e, t) {
|
|
334
335
|
if (!te(t))
|
|
@@ -341,10 +342,10 @@ function Ji(e, t) {
|
|
|
341
342
|
},
|
|
342
343
|
checks: e._zod.def.checks
|
|
343
344
|
};
|
|
344
|
-
return
|
|
345
|
+
return L(e, o);
|
|
345
346
|
}
|
|
346
347
|
function Mi(e, t) {
|
|
347
|
-
const o =
|
|
348
|
+
const o = q(e._zod.def, {
|
|
348
349
|
get shape() {
|
|
349
350
|
const i = { ...e._zod.def.shape, ...t._zod.def.shape };
|
|
350
351
|
return Q(this, "shape", i), i;
|
|
@@ -355,10 +356,10 @@ function Mi(e, t) {
|
|
|
355
356
|
checks: []
|
|
356
357
|
// delete existing checks
|
|
357
358
|
});
|
|
358
|
-
return
|
|
359
|
+
return L(e, o);
|
|
359
360
|
}
|
|
360
361
|
function Vi(e, t, o) {
|
|
361
|
-
const i =
|
|
362
|
+
const i = q(t._zod.def, {
|
|
362
363
|
get shape() {
|
|
363
364
|
const n = t._zod.def.shape, r = { ...n };
|
|
364
365
|
if (o)
|
|
@@ -380,10 +381,10 @@ function Vi(e, t, o) {
|
|
|
380
381
|
},
|
|
381
382
|
checks: []
|
|
382
383
|
});
|
|
383
|
-
return
|
|
384
|
+
return L(t, i);
|
|
384
385
|
}
|
|
385
386
|
function Gi(e, t, o) {
|
|
386
|
-
const i =
|
|
387
|
+
const i = q(t._zod.def, {
|
|
387
388
|
get shape() {
|
|
388
389
|
const n = t._zod.def.shape, r = { ...n };
|
|
389
390
|
if (o)
|
|
@@ -405,7 +406,7 @@ function Gi(e, t, o) {
|
|
|
405
406
|
},
|
|
406
407
|
checks: []
|
|
407
408
|
});
|
|
408
|
-
return
|
|
409
|
+
return L(t, i);
|
|
409
410
|
}
|
|
410
411
|
function ee(e, t = 0) {
|
|
411
412
|
if (e.aborted === !0)
|
|
@@ -487,7 +488,7 @@ class Wl {
|
|
|
487
488
|
}
|
|
488
489
|
const vt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
489
490
|
__proto__: null,
|
|
490
|
-
BIGINT_FORMAT_RANGES:
|
|
491
|
+
BIGINT_FORMAT_RANGES: Ri,
|
|
491
492
|
Class: Wl,
|
|
492
493
|
NUMBER_FORMAT_RANGES: Ai,
|
|
493
494
|
aborted: ee,
|
|
@@ -504,8 +505,8 @@ const vt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
504
505
|
captureStackTrace: gt,
|
|
505
506
|
cleanEnum: Jl,
|
|
506
507
|
cleanRegex: on,
|
|
507
|
-
clone:
|
|
508
|
-
cloneDef:
|
|
508
|
+
clone: L,
|
|
509
|
+
cloneDef: Tl,
|
|
509
510
|
createTransparentProxy: Fl,
|
|
510
511
|
defineLazy: j,
|
|
511
512
|
esc: at,
|
|
@@ -513,7 +514,7 @@ const vt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
513
514
|
extend: Fi,
|
|
514
515
|
finalizeIssue: K,
|
|
515
516
|
floatSafeRemainder: Di,
|
|
516
|
-
getElementAtPath:
|
|
517
|
+
getElementAtPath: El,
|
|
517
518
|
getEnumValues: ft,
|
|
518
519
|
getLengthableOrigin: cn,
|
|
519
520
|
getParsedType: Cl,
|
|
@@ -525,20 +526,20 @@ const vt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
525
526
|
joinValues: p,
|
|
526
527
|
jsonStringifyReplacer: Be,
|
|
527
528
|
merge: Mi,
|
|
528
|
-
mergeDefs:
|
|
529
|
+
mergeDefs: q,
|
|
529
530
|
normalizeParams: g,
|
|
530
531
|
nullish: oe,
|
|
531
|
-
numKeys:
|
|
532
|
+
numKeys: Ll,
|
|
532
533
|
objectClone: Zl,
|
|
533
534
|
omit: Ci,
|
|
534
|
-
optionalKeys:
|
|
535
|
+
optionalKeys: Ei,
|
|
535
536
|
partial: Vi,
|
|
536
|
-
pick:
|
|
537
|
+
pick: Li,
|
|
537
538
|
prefixIssues: G,
|
|
538
|
-
primitiveTypes:
|
|
539
|
+
primitiveTypes: Ti,
|
|
539
540
|
promiseAllObject: Al,
|
|
540
|
-
propertyKeyTypes:
|
|
541
|
-
randomString:
|
|
541
|
+
propertyKeyTypes: qe,
|
|
542
|
+
randomString: Rl,
|
|
542
543
|
required: Gi,
|
|
543
544
|
safeExtend: Ji,
|
|
544
545
|
shallowClone: an,
|
|
@@ -612,7 +613,7 @@ function ht(e, t = (o) => o.message) {
|
|
|
612
613
|
};
|
|
613
614
|
return i(e), o;
|
|
614
615
|
}
|
|
615
|
-
function
|
|
616
|
+
function qi(e) {
|
|
616
617
|
const t = [], o = e.map((i) => typeof i == "object" ? i.key : i);
|
|
617
618
|
for (const i of o)
|
|
618
619
|
typeof i == "number" ? t.push(`[${i}]`) : typeof i == "symbol" ? t.push(`[${JSON.stringify(String(i))}]`) : /[^\w$]/.test(i) ? t.push(`[${JSON.stringify(i)}]`) : (t.length && t.push("."), t.push(i));
|
|
@@ -621,7 +622,7 @@ function Xi(e) {
|
|
|
621
622
|
function $t(e) {
|
|
622
623
|
const t = [], o = [...e.issues].sort((i, n) => (i.path ?? []).length - (n.path ?? []).length);
|
|
623
624
|
for (const i of o)
|
|
624
|
-
t.push(`✖ ${i.message}`), i.path?.length && t.push(` → at ${
|
|
625
|
+
t.push(`✖ ${i.message}`), i.path?.length && t.push(` → at ${qi(i.path)}`);
|
|
625
626
|
return t.join(`
|
|
626
627
|
`);
|
|
627
628
|
}
|
|
@@ -630,7 +631,7 @@ const ke = (e) => (t, o, i, n) => {
|
|
|
630
631
|
if (a instanceof Promise)
|
|
631
632
|
throw new ne();
|
|
632
633
|
if (a.issues.length) {
|
|
633
|
-
const u = new (n?.Err ?? e)(a.issues.map((s) => K(s, r,
|
|
634
|
+
const u = new (n?.Err ?? e)(a.issues.map((s) => K(s, r, D())));
|
|
634
635
|
throw gt(u, n?.callee), u;
|
|
635
636
|
}
|
|
636
637
|
return a.value;
|
|
@@ -638,7 +639,7 @@ const ke = (e) => (t, o, i, n) => {
|
|
|
638
639
|
const r = i ? Object.assign(i, { async: !0 }) : { async: !0 };
|
|
639
640
|
let a = t._zod.run({ value: o, issues: [] }, r);
|
|
640
641
|
if (a instanceof Promise && (a = await a), a.issues.length) {
|
|
641
|
-
const u = new (n?.Err ?? e)(a.issues.map((s) => K(s, r,
|
|
642
|
+
const u = new (n?.Err ?? e)(a.issues.map((s) => K(s, r, D())));
|
|
642
643
|
throw gt(u, n?.callee), u;
|
|
643
644
|
}
|
|
644
645
|
return a.value;
|
|
@@ -648,22 +649,22 @@ const ke = (e) => (t, o, i, n) => {
|
|
|
648
649
|
throw new ne();
|
|
649
650
|
return r.issues.length ? {
|
|
650
651
|
success: !1,
|
|
651
|
-
error: new (e ?? pt)(r.issues.map((a) => K(a, n,
|
|
652
|
+
error: new (e ?? pt)(r.issues.map((a) => K(a, n, D())))
|
|
652
653
|
} : { success: !0, data: r.value };
|
|
653
|
-
},
|
|
654
|
+
}, Xi = /* @__PURE__ */ ze(C), we = (e) => async (t, o, i) => {
|
|
654
655
|
const n = i ? Object.assign(i, { async: !0 }) : { async: !0 };
|
|
655
656
|
let r = t._zod.run({ value: o, issues: [] }, n);
|
|
656
657
|
return r instanceof Promise && (r = await r), r.issues.length ? {
|
|
657
658
|
success: !1,
|
|
658
|
-
error: new e(r.issues.map((a) => K(a, n,
|
|
659
|
+
error: new e(r.issues.map((a) => K(a, n, D())))
|
|
659
660
|
} : { success: !0, data: r.value };
|
|
660
661
|
}, Yi = /* @__PURE__ */ we(C), bt = (e) => (t, o, i) => {
|
|
661
662
|
const n = i ? Object.assign(i, { direction: "backward" }) : { direction: "backward" };
|
|
662
663
|
return ke(e)(t, o, n);
|
|
663
|
-
}, Bl = /* @__PURE__ */ bt(C), _t = (e) => (t, o, i) => ke(e)(t, o, i),
|
|
664
|
+
}, Bl = /* @__PURE__ */ bt(C), _t = (e) => (t, o, i) => ke(e)(t, o, i), ql = /* @__PURE__ */ _t(C), yt = (e) => async (t, o, i) => {
|
|
664
665
|
const n = i ? Object.assign(i, { direction: "backward" }) : { direction: "backward" };
|
|
665
666
|
return Ie(e)(t, o, n);
|
|
666
|
-
},
|
|
667
|
+
}, Xl = /* @__PURE__ */ yt(C), kt = (e) => async (t, o, i) => Ie(e)(t, o, i), Yl = /* @__PURE__ */ kt(C), It = (e) => (t, o, i) => {
|
|
667
668
|
const n = i ? Object.assign(i, { direction: "backward" }) : { direction: "backward" };
|
|
668
669
|
return ze(e)(t, o, n);
|
|
669
670
|
}, Hl = /* @__PURE__ */ It(C), zt = (e) => (t, o, i) => ze(e)(t, o, i), Ql = /* @__PURE__ */ zt(C), wt = (e) => async (t, o, i) => {
|
|
@@ -801,7 +802,7 @@ const ds = /^[0-9a-fA-F]{32}$/, ms = /* @__PURE__ */ Se(22, "=="), fs = /* @__PU
|
|
|
801
802
|
continue: !t.abort
|
|
802
803
|
});
|
|
803
804
|
};
|
|
804
|
-
}),
|
|
805
|
+
}), To = /* @__PURE__ */ l("$ZodCheckMultipleOf", (e, t) => {
|
|
805
806
|
N.init(e, t), e._zod.onattach.push((o) => {
|
|
806
807
|
var i;
|
|
807
808
|
(i = o._zod.bag).multipleOf ?? (i.multipleOf = t.value);
|
|
@@ -817,7 +818,7 @@ const ds = /^[0-9a-fA-F]{32}$/, ms = /* @__PURE__ */ Se(22, "=="), fs = /* @__PU
|
|
|
817
818
|
continue: !t.abort
|
|
818
819
|
});
|
|
819
820
|
};
|
|
820
|
-
}),
|
|
821
|
+
}), Eo = /* @__PURE__ */ l("$ZodCheckNumberFormat", (e, t) => {
|
|
821
822
|
N.init(e, t), t.format = t.format || "float64";
|
|
822
823
|
const o = t.format?.includes("int"), i = o ? "int" : "number", [n, r] = Ai[t.format];
|
|
823
824
|
e._zod.onattach.push((a) => {
|
|
@@ -876,7 +877,7 @@ const ds = /^[0-9a-fA-F]{32}$/, ms = /* @__PURE__ */ Se(22, "=="), fs = /* @__PU
|
|
|
876
877
|
};
|
|
877
878
|
}), Ao = /* @__PURE__ */ l("$ZodCheckBigIntFormat", (e, t) => {
|
|
878
879
|
N.init(e, t);
|
|
879
|
-
const [o, i] =
|
|
880
|
+
const [o, i] = Ri[t.format];
|
|
880
881
|
e._zod.onattach.push((n) => {
|
|
881
882
|
const r = n._zod.bag;
|
|
882
883
|
r.format = t.format, r.minimum = o, r.maximum = i;
|
|
@@ -898,7 +899,7 @@ const ds = /^[0-9a-fA-F]{32}$/, ms = /* @__PURE__ */ Se(22, "=="), fs = /* @__PU
|
|
|
898
899
|
inst: e
|
|
899
900
|
});
|
|
900
901
|
};
|
|
901
|
-
}),
|
|
902
|
+
}), Ro = /* @__PURE__ */ l("$ZodCheckMaxSize", (e, t) => {
|
|
902
903
|
var o;
|
|
903
904
|
N.init(e, t), (o = e._zod.def).when ?? (o.when = (i) => {
|
|
904
905
|
const n = i.value;
|
|
@@ -918,7 +919,7 @@ const ds = /^[0-9a-fA-F]{32}$/, ms = /* @__PURE__ */ Se(22, "=="), fs = /* @__PU
|
|
|
918
919
|
continue: !t.abort
|
|
919
920
|
});
|
|
920
921
|
};
|
|
921
|
-
}),
|
|
922
|
+
}), Lo = /* @__PURE__ */ l("$ZodCheckMinSize", (e, t) => {
|
|
922
923
|
var o;
|
|
923
924
|
N.init(e, t), (o = e._zod.def).when ?? (o.when = (i) => {
|
|
924
925
|
const n = i.value;
|
|
@@ -1097,7 +1098,7 @@ const ds = /^[0-9a-fA-F]{32}$/, ms = /* @__PURE__ */ Se(22, "=="), fs = /* @__PU
|
|
|
1097
1098
|
continue: !t.abort
|
|
1098
1099
|
});
|
|
1099
1100
|
};
|
|
1100
|
-
}),
|
|
1101
|
+
}), qo = /* @__PURE__ */ l("$ZodCheckEndsWith", (e, t) => {
|
|
1101
1102
|
N.init(e, t);
|
|
1102
1103
|
const o = new RegExp(`.*${B(t.suffix)}$`);
|
|
1103
1104
|
t.pattern ?? (t.pattern = o), e._zod.onattach.push((i) => {
|
|
@@ -1118,7 +1119,7 @@ const ds = /^[0-9a-fA-F]{32}$/, ms = /* @__PURE__ */ Se(22, "=="), fs = /* @__PU
|
|
|
1118
1119
|
function pi(e, t, o) {
|
|
1119
1120
|
e.issues.length && t.issues.push(...G(o, e.issues));
|
|
1120
1121
|
}
|
|
1121
|
-
const
|
|
1122
|
+
const Xo = /* @__PURE__ */ l("$ZodCheckProperty", (e, t) => {
|
|
1122
1123
|
N.init(e, t), e._zod.check = (o) => {
|
|
1123
1124
|
const i = t.schema._zod.run({
|
|
1124
1125
|
value: o.value[t.property],
|
|
@@ -1239,7 +1240,7 @@ const ea = {
|
|
|
1239
1240
|
e["~standard"] = {
|
|
1240
1241
|
validate: (n) => {
|
|
1241
1242
|
try {
|
|
1242
|
-
const r =
|
|
1243
|
+
const r = Xi(e, n);
|
|
1243
1244
|
return r.success ? { value: r.data } : { issues: r.error?.issues };
|
|
1244
1245
|
} catch {
|
|
1245
1246
|
return Yi(e, n).then((a) => a.success ? { value: a.data } : { issues: a.error?.issues });
|
|
@@ -1481,7 +1482,7 @@ const Sa = /* @__PURE__ */ l("$ZodJWT", (e, t) => {
|
|
|
1481
1482
|
}), o;
|
|
1482
1483
|
};
|
|
1483
1484
|
}), xa = /* @__PURE__ */ l("$ZodNumberFormat", (e, t) => {
|
|
1484
|
-
|
|
1485
|
+
Eo.init(e, t), Nt.init(e, t);
|
|
1485
1486
|
}), Dt = /* @__PURE__ */ l("$ZodBoolean", (e, t) => {
|
|
1486
1487
|
I.init(e, t), e._zod.pattern = xo, e._zod.parse = (o, i) => {
|
|
1487
1488
|
if (t.coerce)
|
|
@@ -1547,14 +1548,14 @@ const Sa = /* @__PURE__ */ l("$ZodJWT", (e, t) => {
|
|
|
1547
1548
|
I.init(e, t), e._zod.parse = (o) => o;
|
|
1548
1549
|
}), Za = /* @__PURE__ */ l("$ZodUnknown", (e, t) => {
|
|
1549
1550
|
I.init(e, t), e._zod.parse = (o) => o;
|
|
1550
|
-
}),
|
|
1551
|
+
}), Ta = /* @__PURE__ */ l("$ZodNever", (e, t) => {
|
|
1551
1552
|
I.init(e, t), e._zod.parse = (o, i) => (o.issues.push({
|
|
1552
1553
|
expected: "never",
|
|
1553
1554
|
code: "invalid_type",
|
|
1554
1555
|
input: o.value,
|
|
1555
1556
|
inst: e
|
|
1556
1557
|
}), o);
|
|
1557
|
-
}),
|
|
1558
|
+
}), Ea = /* @__PURE__ */ l("$ZodVoid", (e, t) => {
|
|
1558
1559
|
I.init(e, t), e._zod.parse = (o, i) => {
|
|
1559
1560
|
const n = o.value;
|
|
1560
1561
|
return typeof n > "u" || o.issues.push({
|
|
@@ -1584,7 +1585,7 @@ const Sa = /* @__PURE__ */ l("$ZodJWT", (e, t) => {
|
|
|
1584
1585
|
function hi(e, t, o) {
|
|
1585
1586
|
e.issues.length && t.issues.push(...G(o, e.issues)), t.value[o] = e.value;
|
|
1586
1587
|
}
|
|
1587
|
-
const
|
|
1588
|
+
const Ra = /* @__PURE__ */ l("$ZodArray", (e, t) => {
|
|
1588
1589
|
I.init(e, t), e._zod.parse = (o, i) => {
|
|
1589
1590
|
const n = o.value;
|
|
1590
1591
|
if (!Array.isArray(n))
|
|
@@ -1606,15 +1607,15 @@ const La = /* @__PURE__ */ l("$ZodArray", (e, t) => {
|
|
|
1606
1607
|
return r.length ? Promise.all(r).then(() => o) : o;
|
|
1607
1608
|
};
|
|
1608
1609
|
});
|
|
1609
|
-
function
|
|
1610
|
+
function Xe(e, t, o, i) {
|
|
1610
1611
|
e.issues.length && t.issues.push(...G(o, e.issues)), e.value === void 0 ? o in i && (t.value[o] = void 0) : t.value[o] = e.value;
|
|
1611
1612
|
}
|
|
1612
|
-
function
|
|
1613
|
+
function La(e) {
|
|
1613
1614
|
const t = Object.keys(e.shape);
|
|
1614
1615
|
for (const i of t)
|
|
1615
1616
|
if (!e.shape?.[i]?._zod?.traits?.has("$ZodType"))
|
|
1616
1617
|
throw new Error(`Invalid element at key "${i}": expected a Zod schema`);
|
|
1617
|
-
const o =
|
|
1618
|
+
const o = Ei(e.shape);
|
|
1618
1619
|
return {
|
|
1619
1620
|
...e,
|
|
1620
1621
|
keys: t,
|
|
@@ -1633,7 +1634,7 @@ function Ca(e, t, o, i, n, r) {
|
|
|
1633
1634
|
continue;
|
|
1634
1635
|
}
|
|
1635
1636
|
const f = s.run({ value: t[d], issues: [] }, i);
|
|
1636
|
-
f instanceof Promise ? e.push(f.then((h) =>
|
|
1637
|
+
f instanceof Promise ? e.push(f.then((h) => Xe(h, o, d, t))) : Xe(f, o, d, t);
|
|
1637
1638
|
}
|
|
1638
1639
|
return a.length && o.issues.push({
|
|
1639
1640
|
code: "unrecognized_keys",
|
|
@@ -1654,7 +1655,7 @@ const Fa = /* @__PURE__ */ l("$ZodObject", (e, t) => {
|
|
|
1654
1655
|
}
|
|
1655
1656
|
});
|
|
1656
1657
|
}
|
|
1657
|
-
const i = ye(() =>
|
|
1658
|
+
const i = ye(() => La(t));
|
|
1658
1659
|
j(e._zod, "propValues", () => {
|
|
1659
1660
|
const u = t.shape, s = {};
|
|
1660
1661
|
for (const c in u) {
|
|
@@ -1683,26 +1684,26 @@ const Fa = /* @__PURE__ */ l("$ZodObject", (e, t) => {
|
|
|
1683
1684
|
const d = [], f = a.shape;
|
|
1684
1685
|
for (const h of a.keys) {
|
|
1685
1686
|
const m = f[h]._zod.run({ value: c[h], issues: [] }, s);
|
|
1686
|
-
m instanceof Promise ? d.push(m.then(($) =>
|
|
1687
|
+
m instanceof Promise ? d.push(m.then(($) => Xe($, u, h, c))) : Xe(m, u, h, c);
|
|
1687
1688
|
}
|
|
1688
1689
|
return r ? Ca(d, c, u, s, i.value, e) : d.length ? Promise.all(d).then(() => u) : u;
|
|
1689
1690
|
};
|
|
1690
1691
|
}), Ja = /* @__PURE__ */ l("$ZodObjectJIT", (e, t) => {
|
|
1691
1692
|
Fa.init(e, t);
|
|
1692
|
-
const o = e._zod.parse, i = ye(() =>
|
|
1693
|
-
const v = new Qo(["shape", "payload", "ctx"]), m = i.value, $ = (
|
|
1694
|
-
const S = at(
|
|
1693
|
+
const o = e._zod.parse, i = ye(() => La(t)), n = (h) => {
|
|
1694
|
+
const v = new Qo(["shape", "payload", "ctx"]), m = i.value, $ = (w) => {
|
|
1695
|
+
const S = at(w);
|
|
1695
1696
|
return `shape[${S}]._zod.run({ value: input[${S}], issues: [] }, ctx)`;
|
|
1696
1697
|
};
|
|
1697
1698
|
v.write("const input = payload.value;");
|
|
1698
1699
|
const b = /* @__PURE__ */ Object.create(null);
|
|
1699
1700
|
let k = 0;
|
|
1700
|
-
for (const
|
|
1701
|
-
b[
|
|
1701
|
+
for (const w of m.keys)
|
|
1702
|
+
b[w] = `key_${k++}`;
|
|
1702
1703
|
v.write("const newResult = {};");
|
|
1703
|
-
for (const
|
|
1704
|
-
const S = b[
|
|
1705
|
-
v.write(`const ${S} = ${$(
|
|
1704
|
+
for (const w of m.keys) {
|
|
1705
|
+
const S = b[w], x = at(w);
|
|
1706
|
+
v.write(`const ${S} = ${$(w)};`), v.write(`
|
|
1706
1707
|
if (${S}.issues.length) {
|
|
1707
1708
|
payload.issues = payload.issues.concat(${S}.issues.map(iss => ({
|
|
1708
1709
|
...iss,
|
|
@@ -1723,7 +1724,7 @@ const Fa = /* @__PURE__ */ l("$ZodObject", (e, t) => {
|
|
|
1723
1724
|
}
|
|
1724
1725
|
v.write("payload.value = newResult;"), v.write("return payload;");
|
|
1725
1726
|
const _ = v.compile();
|
|
1726
|
-
return (
|
|
1727
|
+
return (w, S) => _(h, w, S);
|
|
1727
1728
|
};
|
|
1728
1729
|
let r;
|
|
1729
1730
|
const a = ue, u = !We.jitless, c = u && Zi.value, d = t.catchall;
|
|
@@ -1748,7 +1749,7 @@ function $i(e, t, o, i) {
|
|
|
1748
1749
|
code: "invalid_union",
|
|
1749
1750
|
input: t.value,
|
|
1750
1751
|
inst: o,
|
|
1751
|
-
errors: e.map((r) => r.issues.map((a) => K(a, i,
|
|
1752
|
+
errors: e.map((r) => r.issues.map((a) => K(a, i, D())))
|
|
1752
1753
|
}), t);
|
|
1753
1754
|
}
|
|
1754
1755
|
const Zt = /* @__PURE__ */ l("$ZodUnion", (e, t) => {
|
|
@@ -1882,7 +1883,7 @@ function bi(e, t, o) {
|
|
|
1882
1883
|
throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(i.mergeErrorPath)}`);
|
|
1883
1884
|
return e.value = i.data, e;
|
|
1884
1885
|
}
|
|
1885
|
-
const
|
|
1886
|
+
const Tt = /* @__PURE__ */ l("$ZodTuple", (e, t) => {
|
|
1886
1887
|
I.init(e, t);
|
|
1887
1888
|
const o = t.items;
|
|
1888
1889
|
e._zod.parse = (i, n) => {
|
|
@@ -1976,7 +1977,7 @@ const Ga = /* @__PURE__ */ l("$ZodRecord", (e, t) => {
|
|
|
1976
1977
|
o.issues.push({
|
|
1977
1978
|
code: "invalid_key",
|
|
1978
1979
|
origin: "record",
|
|
1979
|
-
issues: s.issues.map((d) => K(d, i,
|
|
1980
|
+
issues: s.issues.map((d) => K(d, i, D())),
|
|
1980
1981
|
input: u,
|
|
1981
1982
|
path: [u],
|
|
1982
1983
|
inst: e
|
|
@@ -2013,19 +2014,19 @@ const Ga = /* @__PURE__ */ l("$ZodRecord", (e, t) => {
|
|
|
2013
2014
|
};
|
|
2014
2015
|
});
|
|
2015
2016
|
function _i(e, t, o, i, n, r, a) {
|
|
2016
|
-
e.issues.length && (
|
|
2017
|
+
e.issues.length && (qe.has(typeof i) ? o.issues.push(...G(i, e.issues)) : o.issues.push({
|
|
2017
2018
|
code: "invalid_key",
|
|
2018
2019
|
origin: "map",
|
|
2019
2020
|
input: n,
|
|
2020
2021
|
inst: r,
|
|
2021
|
-
issues: e.issues.map((u) => K(u, a,
|
|
2022
|
-
})), t.issues.length && (
|
|
2022
|
+
issues: e.issues.map((u) => K(u, a, D()))
|
|
2023
|
+
})), t.issues.length && (qe.has(typeof i) ? o.issues.push(...G(i, t.issues)) : o.issues.push({
|
|
2023
2024
|
origin: "map",
|
|
2024
2025
|
code: "invalid_element",
|
|
2025
2026
|
input: n,
|
|
2026
2027
|
inst: r,
|
|
2027
2028
|
key: i,
|
|
2028
|
-
issues: t.issues.map((u) => K(u, a,
|
|
2029
|
+
issues: t.issues.map((u) => K(u, a, D()))
|
|
2029
2030
|
})), o.value.set(e.value, t.value);
|
|
2030
2031
|
}
|
|
2031
2032
|
const Wa = /* @__PURE__ */ l("$ZodSet", (e, t) => {
|
|
@@ -2053,7 +2054,7 @@ function yi(e, t) {
|
|
|
2053
2054
|
const Ba = /* @__PURE__ */ l("$ZodEnum", (e, t) => {
|
|
2054
2055
|
I.init(e, t);
|
|
2055
2056
|
const o = ft(t.entries), i = new Set(o);
|
|
2056
|
-
e._zod.values = i, e._zod.pattern = new RegExp(`^(${o.filter((n) =>
|
|
2057
|
+
e._zod.values = i, e._zod.pattern = new RegExp(`^(${o.filter((n) => qe.has(typeof n)).map((n) => typeof n == "string" ? B(n) : n.toString()).join("|")})$`), e._zod.parse = (n, r) => {
|
|
2057
2058
|
const a = n.value;
|
|
2058
2059
|
return i.has(a) || n.issues.push({
|
|
2059
2060
|
code: "invalid_value",
|
|
@@ -2062,7 +2063,7 @@ const Ba = /* @__PURE__ */ l("$ZodEnum", (e, t) => {
|
|
|
2062
2063
|
inst: e
|
|
2063
2064
|
}), n;
|
|
2064
2065
|
};
|
|
2065
|
-
}),
|
|
2066
|
+
}), qa = /* @__PURE__ */ l("$ZodLiteral", (e, t) => {
|
|
2066
2067
|
if (I.init(e, t), t.values.length === 0)
|
|
2067
2068
|
throw new Error("Cannot create literal schema with no valid values");
|
|
2068
2069
|
const o = new Set(t.values);
|
|
@@ -2075,7 +2076,7 @@ const Ba = /* @__PURE__ */ l("$ZodEnum", (e, t) => {
|
|
|
2075
2076
|
inst: e
|
|
2076
2077
|
}), i;
|
|
2077
2078
|
};
|
|
2078
|
-
}),
|
|
2079
|
+
}), Xa = /* @__PURE__ */ l("$ZodFile", (e, t) => {
|
|
2079
2080
|
I.init(e, t), e._zod.parse = (o, i) => {
|
|
2080
2081
|
const n = o.value;
|
|
2081
2082
|
return n instanceof File || o.issues.push({
|
|
@@ -2163,13 +2164,13 @@ const ru = /* @__PURE__ */ l("$ZodSuccess", (e, t) => {
|
|
|
2163
2164
|
return n instanceof Promise ? n.then((r) => (o.value = r.value, r.issues.length && (o.value = t.catchValue({
|
|
2164
2165
|
...o,
|
|
2165
2166
|
error: {
|
|
2166
|
-
issues: r.issues.map((a) => K(a, i,
|
|
2167
|
+
issues: r.issues.map((a) => K(a, i, D()))
|
|
2167
2168
|
},
|
|
2168
2169
|
input: o.value
|
|
2169
2170
|
}), o.issues = []), o)) : (o.value = n.value, n.issues.length && (o.value = t.catchValue({
|
|
2170
2171
|
...o,
|
|
2171
2172
|
error: {
|
|
2172
|
-
issues: n.issues.map((r) => K(r, i,
|
|
2173
|
+
issues: n.issues.map((r) => K(r, i, D()))
|
|
2173
2174
|
},
|
|
2174
2175
|
input: o.value
|
|
2175
2176
|
}), o.issues = []), o);
|
|
@@ -2194,7 +2195,7 @@ const ru = /* @__PURE__ */ l("$ZodSuccess", (e, t) => {
|
|
|
2194
2195
|
function Ve(e, t, o) {
|
|
2195
2196
|
return e.issues.length ? (e.aborted = !0, e) : t._zod.run({ value: e.value, issues: e.issues }, o);
|
|
2196
2197
|
}
|
|
2197
|
-
const
|
|
2198
|
+
const Et = /* @__PURE__ */ l("$ZodCodec", (e, t) => {
|
|
2198
2199
|
I.init(e, t), j(e._zod, "values", () => t.in._zod.values), j(e._zod, "optin", () => t.in._zod.optin), j(e._zod, "optout", () => t.out._zod.optout), j(e._zod, "propValues", () => t.in._zod.propValues), e._zod.parse = (o, i) => {
|
|
2199
2200
|
if ((i.direction || "forward") === "forward") {
|
|
2200
2201
|
const r = t.in._zod.run(o, i);
|
|
@@ -2242,7 +2243,7 @@ const cu = /* @__PURE__ */ l("$ZodTemplateLiteral", (e, t) => {
|
|
|
2242
2243
|
throw new Error(`Invalid template literal part: ${i._zod.traits}`);
|
|
2243
2244
|
const r = n.startsWith("^") ? 1 : 0, a = n.endsWith("$") ? n.length - 1 : n.length;
|
|
2244
2245
|
o.push(n.slice(r, a));
|
|
2245
|
-
} else if (i === null ||
|
|
2246
|
+
} else if (i === null || Ti.has(typeof i))
|
|
2246
2247
|
o.push(B(`${i}`));
|
|
2247
2248
|
else
|
|
2248
2249
|
throw new Error(`Invalid template literal part: ${i}`);
|
|
@@ -2281,7 +2282,7 @@ const cu = /* @__PURE__ */ l("$ZodTemplateLiteral", (e, t) => {
|
|
|
2281
2282
|
const i = e.constructor;
|
|
2282
2283
|
return Array.isArray(o[0]) ? new i({
|
|
2283
2284
|
type: "function",
|
|
2284
|
-
input: new
|
|
2285
|
+
input: new Tt({
|
|
2285
2286
|
type: "tuple",
|
|
2286
2287
|
items: o[0],
|
|
2287
2288
|
rest: o[1]
|
|
@@ -2747,7 +2748,7 @@ function Zs() {
|
|
|
2747
2748
|
localeError: Ps()
|
|
2748
2749
|
};
|
|
2749
2750
|
}
|
|
2750
|
-
const
|
|
2751
|
+
const Ts = () => {
|
|
2751
2752
|
const e = {
|
|
2752
2753
|
string: { unit: "caràcters", verb: "contenir" },
|
|
2753
2754
|
file: { unit: "bytes", verb: "contenir" },
|
|
@@ -2837,9 +2838,9 @@ const Es = () => {
|
|
|
2837
2838
|
}
|
|
2838
2839
|
};
|
|
2839
2840
|
};
|
|
2840
|
-
function
|
|
2841
|
+
function Es() {
|
|
2841
2842
|
return {
|
|
2842
|
-
localeError:
|
|
2843
|
+
localeError: Ts()
|
|
2843
2844
|
};
|
|
2844
2845
|
}
|
|
2845
2846
|
const As = () => {
|
|
@@ -2942,12 +2943,12 @@ const As = () => {
|
|
|
2942
2943
|
}
|
|
2943
2944
|
};
|
|
2944
2945
|
};
|
|
2945
|
-
function
|
|
2946
|
+
function Rs() {
|
|
2946
2947
|
return {
|
|
2947
2948
|
localeError: As()
|
|
2948
2949
|
};
|
|
2949
2950
|
}
|
|
2950
|
-
const
|
|
2951
|
+
const Ls = () => {
|
|
2951
2952
|
const e = {
|
|
2952
2953
|
string: { unit: "tegn", verb: "havde" },
|
|
2953
2954
|
file: { unit: "bytes", verb: "havde" },
|
|
@@ -3042,7 +3043,7 @@ const Rs = () => {
|
|
|
3042
3043
|
};
|
|
3043
3044
|
function Cs() {
|
|
3044
3045
|
return {
|
|
3045
|
-
localeError:
|
|
3046
|
+
localeError: Ls()
|
|
3046
3047
|
};
|
|
3047
3048
|
}
|
|
3048
3049
|
const Fs = () => {
|
|
@@ -3436,12 +3437,12 @@ const Bs = () => {
|
|
|
3436
3437
|
}
|
|
3437
3438
|
};
|
|
3438
3439
|
};
|
|
3439
|
-
function
|
|
3440
|
+
function qs() {
|
|
3440
3441
|
return {
|
|
3441
3442
|
localeError: Bs()
|
|
3442
3443
|
};
|
|
3443
3444
|
}
|
|
3444
|
-
const
|
|
3445
|
+
const Xs = () => {
|
|
3445
3446
|
const e = {
|
|
3446
3447
|
string: { unit: "کاراکتر", verb: "داشته باشد" },
|
|
3447
3448
|
file: { unit: "بایت", verb: "داشته باشد" },
|
|
@@ -3531,7 +3532,7 @@ const qs = () => {
|
|
|
3531
3532
|
};
|
|
3532
3533
|
function Ys() {
|
|
3533
3534
|
return {
|
|
3534
|
-
localeError:
|
|
3535
|
+
localeError: Xs()
|
|
3535
3536
|
};
|
|
3536
3537
|
}
|
|
3537
3538
|
const Hs = () => {
|
|
@@ -5284,7 +5285,7 @@ function Zd() {
|
|
|
5284
5285
|
localeError: Pd()
|
|
5285
5286
|
};
|
|
5286
5287
|
}
|
|
5287
|
-
const
|
|
5288
|
+
const Td = () => {
|
|
5288
5289
|
const e = {
|
|
5289
5290
|
string: { unit: "harf", verb: "olmalıdır" },
|
|
5290
5291
|
file: { unit: "bayt", verb: "olmalıdır" },
|
|
@@ -5373,9 +5374,9 @@ const Ed = () => {
|
|
|
5373
5374
|
}
|
|
5374
5375
|
};
|
|
5375
5376
|
};
|
|
5376
|
-
function
|
|
5377
|
+
function Ed() {
|
|
5377
5378
|
return {
|
|
5378
|
-
localeError:
|
|
5379
|
+
localeError: Td()
|
|
5379
5380
|
};
|
|
5380
5381
|
}
|
|
5381
5382
|
const Ad = () => {
|
|
@@ -5466,12 +5467,12 @@ const Ad = () => {
|
|
|
5466
5467
|
}
|
|
5467
5468
|
};
|
|
5468
5469
|
};
|
|
5469
|
-
function
|
|
5470
|
+
function Rd() {
|
|
5470
5471
|
return {
|
|
5471
5472
|
localeError: Ad()
|
|
5472
5473
|
};
|
|
5473
5474
|
}
|
|
5474
|
-
const
|
|
5475
|
+
const Ld = () => {
|
|
5475
5476
|
const e = {
|
|
5476
5477
|
string: { unit: "znaków", verb: "mieć" },
|
|
5477
5478
|
file: { unit: "bajtów", verb: "mieć" },
|
|
@@ -5561,7 +5562,7 @@ const Rd = () => {
|
|
|
5561
5562
|
};
|
|
5562
5563
|
function Cd() {
|
|
5563
5564
|
return {
|
|
5564
|
-
localeError:
|
|
5565
|
+
localeError: Ld()
|
|
5565
5566
|
};
|
|
5566
5567
|
}
|
|
5567
5568
|
const Fd = () => {
|
|
@@ -5976,7 +5977,7 @@ function Bd() {
|
|
|
5976
5977
|
localeError: Wd()
|
|
5977
5978
|
};
|
|
5978
5979
|
}
|
|
5979
|
-
const
|
|
5980
|
+
const qd = () => {
|
|
5980
5981
|
const e = {
|
|
5981
5982
|
string: { unit: "எழுத்துக்கள்", verb: "கொண்டிருக்க வேண்டும்" },
|
|
5982
5983
|
file: { unit: "பைட்டுகள்", verb: "கொண்டிருக்க வேண்டும்" },
|
|
@@ -6064,9 +6065,9 @@ const Xd = () => {
|
|
|
6064
6065
|
}
|
|
6065
6066
|
};
|
|
6066
6067
|
};
|
|
6067
|
-
function
|
|
6068
|
+
function Xd() {
|
|
6068
6069
|
return {
|
|
6069
|
-
localeError:
|
|
6070
|
+
localeError: qd()
|
|
6070
6071
|
};
|
|
6071
6072
|
}
|
|
6072
6073
|
const Yd = () => {
|
|
@@ -6823,13 +6824,13 @@ const At = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
6823
6824
|
az: Os,
|
|
6824
6825
|
be: Ns,
|
|
6825
6826
|
bg: Zs,
|
|
6826
|
-
ca:
|
|
6827
|
-
cs:
|
|
6827
|
+
ca: Es,
|
|
6828
|
+
cs: Rs,
|
|
6828
6829
|
da: Cs,
|
|
6829
6830
|
de: Js,
|
|
6830
6831
|
en: fu,
|
|
6831
6832
|
eo: Ws,
|
|
6832
|
-
es:
|
|
6833
|
+
es: qs,
|
|
6833
6834
|
fa: Ys,
|
|
6834
6835
|
fi: Qs,
|
|
6835
6836
|
fr: nd,
|
|
@@ -6849,14 +6850,14 @@ const At = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
6849
6850
|
ms: Ud,
|
|
6850
6851
|
nl: Dd,
|
|
6851
6852
|
no: Zd,
|
|
6852
|
-
ota:
|
|
6853
|
+
ota: Ed,
|
|
6853
6854
|
pl: Cd,
|
|
6854
|
-
ps:
|
|
6855
|
+
ps: Rd,
|
|
6855
6856
|
pt: Jd,
|
|
6856
6857
|
ru: Vd,
|
|
6857
6858
|
sl: Kd,
|
|
6858
6859
|
sv: Bd,
|
|
6859
|
-
ta:
|
|
6860
|
+
ta: Xd,
|
|
6860
6861
|
th: Hd,
|
|
6861
6862
|
tr: nm,
|
|
6862
6863
|
ua: rm,
|
|
@@ -6868,7 +6869,7 @@ const At = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
6868
6869
|
zhTW: dm
|
|
6869
6870
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
6870
6871
|
var Ui;
|
|
6871
|
-
const
|
|
6872
|
+
const Rt = Symbol("ZodOutput"), Lt = Symbol("ZodInput");
|
|
6872
6873
|
class Ct {
|
|
6873
6874
|
constructor() {
|
|
6874
6875
|
this._map = /* @__PURE__ */ new WeakMap(), this._idmap = /* @__PURE__ */ new Map();
|
|
@@ -7014,7 +7015,7 @@ function Bt(e, t) {
|
|
|
7014
7015
|
...g(t)
|
|
7015
7016
|
});
|
|
7016
7017
|
}
|
|
7017
|
-
function
|
|
7018
|
+
function qt(e, t) {
|
|
7018
7019
|
return new e({
|
|
7019
7020
|
type: "string",
|
|
7020
7021
|
format: "cuid2",
|
|
@@ -7023,7 +7024,7 @@ function Xt(e, t) {
|
|
|
7023
7024
|
...g(t)
|
|
7024
7025
|
});
|
|
7025
7026
|
}
|
|
7026
|
-
function
|
|
7027
|
+
function Xt(e, t) {
|
|
7027
7028
|
return new e({
|
|
7028
7029
|
type: "string",
|
|
7029
7030
|
format: "ulid",
|
|
@@ -7269,7 +7270,7 @@ function Zu(e, t) {
|
|
|
7269
7270
|
...g(t)
|
|
7270
7271
|
});
|
|
7271
7272
|
}
|
|
7272
|
-
function
|
|
7273
|
+
function Tu(e, t) {
|
|
7273
7274
|
return new e({
|
|
7274
7275
|
type: "bigint",
|
|
7275
7276
|
check: "bigint_format",
|
|
@@ -7278,7 +7279,7 @@ function Eu(e, t) {
|
|
|
7278
7279
|
...g(t)
|
|
7279
7280
|
});
|
|
7280
7281
|
}
|
|
7281
|
-
function
|
|
7282
|
+
function Eu(e, t) {
|
|
7282
7283
|
return new e({
|
|
7283
7284
|
type: "symbol",
|
|
7284
7285
|
...g(t)
|
|
@@ -7290,13 +7291,13 @@ function Au(e, t) {
|
|
|
7290
7291
|
...g(t)
|
|
7291
7292
|
});
|
|
7292
7293
|
}
|
|
7293
|
-
function
|
|
7294
|
+
function Ru(e, t) {
|
|
7294
7295
|
return new e({
|
|
7295
7296
|
type: "null",
|
|
7296
7297
|
...g(t)
|
|
7297
7298
|
});
|
|
7298
7299
|
}
|
|
7299
|
-
function
|
|
7300
|
+
function Lu(e) {
|
|
7300
7301
|
return new e({
|
|
7301
7302
|
type: "any"
|
|
7302
7303
|
});
|
|
@@ -7361,7 +7362,7 @@ function H(e, t) {
|
|
|
7361
7362
|
inclusive: !1
|
|
7362
7363
|
});
|
|
7363
7364
|
}
|
|
7364
|
-
function
|
|
7365
|
+
function E(e, t) {
|
|
7365
7366
|
return new Ot({
|
|
7366
7367
|
check: "greater_than",
|
|
7367
7368
|
...g(t),
|
|
@@ -7379,24 +7380,24 @@ function sr(e) {
|
|
|
7379
7380
|
return M(0, e);
|
|
7380
7381
|
}
|
|
7381
7382
|
function dr(e) {
|
|
7382
|
-
return
|
|
7383
|
+
return E(0, e);
|
|
7383
7384
|
}
|
|
7384
7385
|
function se(e, t) {
|
|
7385
|
-
return new
|
|
7386
|
+
return new To({
|
|
7386
7387
|
check: "multiple_of",
|
|
7387
7388
|
...g(t),
|
|
7388
7389
|
value: e
|
|
7389
7390
|
});
|
|
7390
7391
|
}
|
|
7391
7392
|
function Ue(e, t) {
|
|
7392
|
-
return new
|
|
7393
|
+
return new Ro({
|
|
7393
7394
|
check: "max_size",
|
|
7394
7395
|
...g(t),
|
|
7395
7396
|
maximum: e
|
|
7396
7397
|
});
|
|
7397
7398
|
}
|
|
7398
7399
|
function de(e, t) {
|
|
7399
|
-
return new
|
|
7400
|
+
return new Lo({
|
|
7400
7401
|
check: "min_size",
|
|
7401
7402
|
...g(t),
|
|
7402
7403
|
minimum: e
|
|
@@ -7469,7 +7470,7 @@ function bn(e, t) {
|
|
|
7469
7470
|
});
|
|
7470
7471
|
}
|
|
7471
7472
|
function _n(e, t) {
|
|
7472
|
-
return new
|
|
7473
|
+
return new qo({
|
|
7473
7474
|
check: "string_format",
|
|
7474
7475
|
format: "ends_with",
|
|
7475
7476
|
...g(t),
|
|
@@ -7477,7 +7478,7 @@ function _n(e, t) {
|
|
|
7477
7478
|
});
|
|
7478
7479
|
}
|
|
7479
7480
|
function mr(e, t, o) {
|
|
7480
|
-
return new
|
|
7481
|
+
return new Xo({
|
|
7481
7482
|
check: "property",
|
|
7482
7483
|
property: e,
|
|
7483
7484
|
schema: t,
|
|
@@ -7491,26 +7492,26 @@ function yn(e, t) {
|
|
|
7491
7492
|
...g(t)
|
|
7492
7493
|
});
|
|
7493
7494
|
}
|
|
7494
|
-
function
|
|
7495
|
+
function X(e) {
|
|
7495
7496
|
return new Ho({
|
|
7496
7497
|
check: "overwrite",
|
|
7497
7498
|
tx: e
|
|
7498
7499
|
});
|
|
7499
7500
|
}
|
|
7500
7501
|
function kn(e) {
|
|
7501
|
-
return
|
|
7502
|
+
return X((t) => t.normalize(e));
|
|
7502
7503
|
}
|
|
7503
7504
|
function In() {
|
|
7504
|
-
return
|
|
7505
|
+
return X((e) => e.trim());
|
|
7505
7506
|
}
|
|
7506
7507
|
function zn() {
|
|
7507
|
-
return
|
|
7508
|
+
return X((e) => e.toLowerCase());
|
|
7508
7509
|
}
|
|
7509
7510
|
function wn() {
|
|
7510
|
-
return
|
|
7511
|
+
return X((e) => e.toUpperCase());
|
|
7511
7512
|
}
|
|
7512
7513
|
function Sn() {
|
|
7513
|
-
return
|
|
7514
|
+
return X((e) => Pi(e));
|
|
7514
7515
|
}
|
|
7515
7516
|
function Ku(e, t, o) {
|
|
7516
7517
|
return new e({
|
|
@@ -7677,7 +7678,7 @@ function Zm(e, t) {
|
|
|
7677
7678
|
getter: t
|
|
7678
7679
|
});
|
|
7679
7680
|
}
|
|
7680
|
-
function
|
|
7681
|
+
function Tm(e, t) {
|
|
7681
7682
|
return new e({
|
|
7682
7683
|
type: "promise",
|
|
7683
7684
|
innerType: t
|
|
@@ -7692,7 +7693,7 @@ function Bu(e, t, o) {
|
|
|
7692
7693
|
...i
|
|
7693
7694
|
});
|
|
7694
7695
|
}
|
|
7695
|
-
function
|
|
7696
|
+
function qu(e, t, o) {
|
|
7696
7697
|
return new e({
|
|
7697
7698
|
type: "custom",
|
|
7698
7699
|
check: "custom",
|
|
@@ -7700,7 +7701,7 @@ function Xu(e, t, o) {
|
|
|
7700
7701
|
...g(o)
|
|
7701
7702
|
});
|
|
7702
7703
|
}
|
|
7703
|
-
function
|
|
7704
|
+
function Xu(e) {
|
|
7704
7705
|
const t = Yu((o) => (o.addIssue = (i) => {
|
|
7705
7706
|
if (typeof i == "string")
|
|
7706
7707
|
o.issues.push(ce(i, o.value, t._zod.def));
|
|
@@ -7742,7 +7743,7 @@ function ec(e, t) {
|
|
|
7742
7743
|
const o = g(t);
|
|
7743
7744
|
let i = o.truthy ?? ["true", "1", "yes", "on", "y", "enabled"], n = o.falsy ?? ["false", "0", "no", "off", "n", "disabled"];
|
|
7744
7745
|
o.case !== "sensitive" && (i = i.map((v) => typeof v == "string" ? v.toLowerCase() : v), n = n.map((v) => typeof v == "string" ? v.toLowerCase() : v));
|
|
7745
|
-
const r = new Set(i), a = new Set(n), u = e.Codec ??
|
|
7746
|
+
const r = new Set(i), a = new Set(n), u = e.Codec ?? Et, s = e.Boolean ?? Dt, c = e.String ?? Oe, d = new c({ type: "string", error: o.error }), f = new s({ type: "boolean", error: o.error }), h = new u({
|
|
7746
7747
|
type: "pipe",
|
|
7747
7748
|
in: d,
|
|
7748
7749
|
out: f,
|
|
@@ -7809,8 +7810,8 @@ class st {
|
|
|
7809
7810
|
case "string": {
|
|
7810
7811
|
const m = v;
|
|
7811
7812
|
m.type = "string";
|
|
7812
|
-
const { minimum: $, maximum: b, format: k, patterns: _, contentEncoding:
|
|
7813
|
-
if (typeof $ == "number" && (m.minLength = $), typeof b == "number" && (m.maxLength = b), k && (m.format = r[k] ?? k, m.format === "" && delete m.format),
|
|
7813
|
+
const { minimum: $, maximum: b, format: k, patterns: _, contentEncoding: w } = t._zod.bag;
|
|
7814
|
+
if (typeof $ == "number" && (m.minLength = $), typeof b == "number" && (m.maxLength = b), k && (m.format = r[k] ?? k, m.format === "" && delete m.format), w && (m.contentEncoding = w), _ && _.size > 0) {
|
|
7814
7815
|
const S = [..._];
|
|
7815
7816
|
S.length === 1 ? m.pattern = S[0].source : S.length > 1 && (u.schema.allOf = [
|
|
7816
7817
|
...S.map((x) => ({
|
|
@@ -7822,8 +7823,8 @@ class st {
|
|
|
7822
7823
|
break;
|
|
7823
7824
|
}
|
|
7824
7825
|
case "number": {
|
|
7825
|
-
const m = v, { minimum: $, maximum: b, format: k, multipleOf: _, exclusiveMaximum:
|
|
7826
|
-
typeof k == "string" && k.includes("int") ? m.type = "integer" : m.type = "number", typeof S == "number" && (this.target === "draft-4" || this.target === "openapi-3.0" ? (m.minimum = S, m.exclusiveMinimum = !0) : m.exclusiveMinimum = S), typeof $ == "number" && (m.minimum = $, typeof S == "number" && this.target !== "draft-4" && (S >= $ ? delete m.minimum : delete m.exclusiveMinimum)), typeof
|
|
7826
|
+
const m = v, { minimum: $, maximum: b, format: k, multipleOf: _, exclusiveMaximum: w, exclusiveMinimum: S } = t._zod.bag;
|
|
7827
|
+
typeof k == "string" && k.includes("int") ? m.type = "integer" : m.type = "number", typeof S == "number" && (this.target === "draft-4" || this.target === "openapi-3.0" ? (m.minimum = S, m.exclusiveMinimum = !0) : m.exclusiveMinimum = S), typeof $ == "number" && (m.minimum = $, typeof S == "number" && this.target !== "draft-4" && (S >= $ ? delete m.minimum : delete m.exclusiveMinimum)), typeof w == "number" && (this.target === "draft-4" || this.target === "openapi-3.0" ? (m.maximum = w, m.exclusiveMaximum = !0) : m.exclusiveMaximum = w), typeof b == "number" && (m.maximum = b, typeof w == "number" && this.target !== "draft-4" && (w <= b ? delete m.maximum : delete m.exclusiveMaximum)), typeof _ == "number" && (m.multipleOf = _);
|
|
7827
7828
|
break;
|
|
7828
7829
|
}
|
|
7829
7830
|
case "boolean": {
|
|
@@ -7883,8 +7884,8 @@ class st {
|
|
|
7883
7884
|
path: [...f.path, "properties", _]
|
|
7884
7885
|
});
|
|
7885
7886
|
const b = new Set(Object.keys($)), k = new Set([...b].filter((_) => {
|
|
7886
|
-
const
|
|
7887
|
-
return this.io === "input" ?
|
|
7887
|
+
const w = n.shape[_]._zod;
|
|
7888
|
+
return this.io === "input" ? w.optin === void 0 : w.optout === void 0;
|
|
7888
7889
|
}));
|
|
7889
7890
|
k.size > 0 && (m.required = Array.from(k)), n.catchall?._zod.def.type === "never" ? m.additionalProperties = !1 : n.catchall ? n.catchall && (m.additionalProperties = this.process(n.catchall, {
|
|
7890
7891
|
...f,
|
|
@@ -7907,7 +7908,7 @@ class st {
|
|
|
7907
7908
|
}), b = this.process(n.right, {
|
|
7908
7909
|
...f,
|
|
7909
7910
|
path: [...f.path, "allOf", 1]
|
|
7910
|
-
}), k = (
|
|
7911
|
+
}), k = (w) => "allOf" in w && Object.keys(w).length === 1, _ = [
|
|
7911
7912
|
...k($) ? $.allOf : [$],
|
|
7912
7913
|
...k(b) ? b.allOf : [b]
|
|
7913
7914
|
];
|
|
@@ -7917,9 +7918,9 @@ class st {
|
|
|
7917
7918
|
case "tuple": {
|
|
7918
7919
|
const m = v;
|
|
7919
7920
|
m.type = "array";
|
|
7920
|
-
const $ = this.target === "draft-2020-12" ? "prefixItems" : "items", b = this.target === "draft-2020-12" || this.target === "openapi-3.0" ? "items" : "additionalItems", k = n.items.map((x,
|
|
7921
|
+
const $ = this.target === "draft-2020-12" ? "prefixItems" : "items", b = this.target === "draft-2020-12" || this.target === "openapi-3.0" ? "items" : "additionalItems", k = n.items.map((x, P) => this.process(x, {
|
|
7921
7922
|
...f,
|
|
7922
|
-
path: [...f.path, $,
|
|
7923
|
+
path: [...f.path, $, P]
|
|
7923
7924
|
})), _ = n.rest ? this.process(n.rest, {
|
|
7924
7925
|
...f,
|
|
7925
7926
|
path: [...f.path, b, ...this.target === "openapi-3.0" ? [n.items.length] : []]
|
|
@@ -7927,8 +7928,8 @@ class st {
|
|
|
7927
7928
|
this.target === "draft-2020-12" ? (m.prefixItems = k, _ && (m.items = _)) : this.target === "openapi-3.0" ? (m.items = {
|
|
7928
7929
|
anyOf: k
|
|
7929
7930
|
}, _ && m.items.anyOf.push(_), m.minItems = k.length, _ || (m.maxItems = k.length)) : (m.items = k, _ && (m.additionalItems = _));
|
|
7930
|
-
const { minimum:
|
|
7931
|
-
typeof
|
|
7931
|
+
const { minimum: w, maximum: S } = t._zod.bag;
|
|
7932
|
+
typeof w == "number" && (m.minItems = w), typeof S == "number" && (m.maxItems = S);
|
|
7932
7933
|
break;
|
|
7933
7934
|
}
|
|
7934
7935
|
case "record": {
|
|
@@ -7982,7 +7983,7 @@ class st {
|
|
|
7982
7983
|
format: "binary",
|
|
7983
7984
|
contentEncoding: "binary"
|
|
7984
7985
|
}, { minimum: b, maximum: k, mime: _ } = t._zod.bag;
|
|
7985
|
-
b !== void 0 && ($.minLength = b), k !== void 0 && ($.maxLength = k), _ ? _.length === 1 ? ($.contentMediaType = _[0], Object.assign(m, $)) : m.anyOf = _.map((
|
|
7986
|
+
b !== void 0 && ($.minLength = b), k !== void 0 && ($.maxLength = k), _ ? _.length === 1 ? ($.contentMediaType = _[0], Object.assign(m, $)) : m.anyOf = _.map((w) => ({ ...$, contentMediaType: w })) : Object.assign(m, $);
|
|
7986
7987
|
break;
|
|
7987
7988
|
}
|
|
7988
7989
|
case "transform": {
|
|
@@ -8072,7 +8073,7 @@ class st {
|
|
|
8072
8073
|
}
|
|
8073
8074
|
}
|
|
8074
8075
|
const c = this.metadataRegistry.get(t);
|
|
8075
|
-
return c && Object.assign(u.schema, c), this.io === "input" &&
|
|
8076
|
+
return c && Object.assign(u.schema, c), this.io === "input" && T(t) && (delete u.schema.examples, delete u.schema.default), this.io === "input" && u.schema._prefault && ((i = u.schema).default ?? (i.default = u.schema._prefault)), delete u.schema._prefault, this.seen.get(t).schema;
|
|
8076
8077
|
}
|
|
8077
8078
|
emit(t, o) {
|
|
8078
8079
|
const i = {
|
|
@@ -8210,7 +8211,7 @@ function fr(e, t) {
|
|
|
8210
8211
|
const o = new st(t);
|
|
8211
8212
|
return o.process(e), o.emit(e, t);
|
|
8212
8213
|
}
|
|
8213
|
-
function
|
|
8214
|
+
function T(e, t) {
|
|
8214
8215
|
const o = t ?? { seen: /* @__PURE__ */ new Set() };
|
|
8215
8216
|
if (o.seen.has(e))
|
|
8216
8217
|
return !1;
|
|
@@ -8219,45 +8220,45 @@ function E(e, t) {
|
|
|
8219
8220
|
if (i.type === "transform")
|
|
8220
8221
|
return !0;
|
|
8221
8222
|
if (i.type === "array")
|
|
8222
|
-
return
|
|
8223
|
+
return T(i.element, o);
|
|
8223
8224
|
if (i.type === "set")
|
|
8224
|
-
return
|
|
8225
|
+
return T(i.valueType, o);
|
|
8225
8226
|
if (i.type === "lazy")
|
|
8226
|
-
return
|
|
8227
|
+
return T(i.getter(), o);
|
|
8227
8228
|
if (i.type === "promise" || i.type === "optional" || i.type === "nonoptional" || i.type === "nullable" || i.type === "readonly" || i.type === "default" || i.type === "prefault")
|
|
8228
|
-
return
|
|
8229
|
+
return T(i.innerType, o);
|
|
8229
8230
|
if (i.type === "intersection")
|
|
8230
|
-
return
|
|
8231
|
+
return T(i.left, o) || T(i.right, o);
|
|
8231
8232
|
if (i.type === "record" || i.type === "map")
|
|
8232
|
-
return
|
|
8233
|
+
return T(i.keyType, o) || T(i.valueType, o);
|
|
8233
8234
|
if (i.type === "pipe")
|
|
8234
|
-
return
|
|
8235
|
+
return T(i.in, o) || T(i.out, o);
|
|
8235
8236
|
if (i.type === "object") {
|
|
8236
8237
|
for (const n in i.shape)
|
|
8237
|
-
if (
|
|
8238
|
+
if (T(i.shape[n], o))
|
|
8238
8239
|
return !0;
|
|
8239
8240
|
return !1;
|
|
8240
8241
|
}
|
|
8241
8242
|
if (i.type === "union") {
|
|
8242
8243
|
for (const n of i.options)
|
|
8243
|
-
if (
|
|
8244
|
+
if (T(n, o))
|
|
8244
8245
|
return !0;
|
|
8245
8246
|
return !1;
|
|
8246
8247
|
}
|
|
8247
8248
|
if (i.type === "tuple") {
|
|
8248
8249
|
for (const n of i.items)
|
|
8249
|
-
if (
|
|
8250
|
+
if (T(n, o))
|
|
8250
8251
|
return !0;
|
|
8251
|
-
return !!(i.rest &&
|
|
8252
|
+
return !!(i.rest && T(i.rest, o));
|
|
8252
8253
|
}
|
|
8253
8254
|
return !1;
|
|
8254
8255
|
}
|
|
8255
|
-
const
|
|
8256
|
+
const Em = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
8256
8257
|
__proto__: null
|
|
8257
8258
|
}, Symbol.toStringTag, { value: "Module" })), nc = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
8258
8259
|
__proto__: null,
|
|
8259
8260
|
$ZodAny: Pa,
|
|
8260
|
-
$ZodArray:
|
|
8261
|
+
$ZodArray: Ra,
|
|
8261
8262
|
$ZodAsyncError: ne,
|
|
8262
8263
|
$ZodBase64: ya,
|
|
8263
8264
|
$ZodBase64URL: Ia,
|
|
@@ -8271,27 +8272,27 @@ const Tm = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
8271
8272
|
$ZodCatch: iu,
|
|
8272
8273
|
$ZodCheck: N,
|
|
8273
8274
|
$ZodCheckBigIntFormat: Ao,
|
|
8274
|
-
$ZodCheckEndsWith:
|
|
8275
|
+
$ZodCheckEndsWith: qo,
|
|
8275
8276
|
$ZodCheckGreaterThan: Ot,
|
|
8276
8277
|
$ZodCheckIncludes: Wo,
|
|
8277
8278
|
$ZodCheckLengthEquals: Mo,
|
|
8278
8279
|
$ZodCheckLessThan: xt,
|
|
8279
8280
|
$ZodCheckLowerCase: Go,
|
|
8280
8281
|
$ZodCheckMaxLength: Fo,
|
|
8281
|
-
$ZodCheckMaxSize:
|
|
8282
|
+
$ZodCheckMaxSize: Ro,
|
|
8282
8283
|
$ZodCheckMimeType: Yo,
|
|
8283
8284
|
$ZodCheckMinLength: Jo,
|
|
8284
|
-
$ZodCheckMinSize:
|
|
8285
|
-
$ZodCheckMultipleOf:
|
|
8286
|
-
$ZodCheckNumberFormat:
|
|
8285
|
+
$ZodCheckMinSize: Lo,
|
|
8286
|
+
$ZodCheckMultipleOf: To,
|
|
8287
|
+
$ZodCheckNumberFormat: Eo,
|
|
8287
8288
|
$ZodCheckOverwrite: Ho,
|
|
8288
|
-
$ZodCheckProperty:
|
|
8289
|
+
$ZodCheckProperty: Xo,
|
|
8289
8290
|
$ZodCheckRegex: Vo,
|
|
8290
8291
|
$ZodCheckSizeEquals: Co,
|
|
8291
8292
|
$ZodCheckStartsWith: Bo,
|
|
8292
8293
|
$ZodCheckStringFormat: xe,
|
|
8293
8294
|
$ZodCheckUpperCase: Ko,
|
|
8294
|
-
$ZodCodec:
|
|
8295
|
+
$ZodCodec: Et,
|
|
8295
8296
|
$ZodCustom: mu,
|
|
8296
8297
|
$ZodCustomStringFormat: ja,
|
|
8297
8298
|
$ZodDate: Aa,
|
|
@@ -8303,7 +8304,7 @@ const Tm = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
8303
8304
|
$ZodEncodeError: rn,
|
|
8304
8305
|
$ZodEnum: Ba,
|
|
8305
8306
|
$ZodError: pt,
|
|
8306
|
-
$ZodFile:
|
|
8307
|
+
$ZodFile: Xa,
|
|
8307
8308
|
$ZodFunction: lu,
|
|
8308
8309
|
$ZodGUID: na,
|
|
8309
8310
|
$ZodIPv4: pa,
|
|
@@ -8316,12 +8317,12 @@ const Tm = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
8316
8317
|
$ZodJWT: Sa,
|
|
8317
8318
|
$ZodKSUID: da,
|
|
8318
8319
|
$ZodLazy: du,
|
|
8319
|
-
$ZodLiteral:
|
|
8320
|
+
$ZodLiteral: qa,
|
|
8320
8321
|
$ZodMAC: $a,
|
|
8321
8322
|
$ZodMap: Ka,
|
|
8322
8323
|
$ZodNaN: ou,
|
|
8323
8324
|
$ZodNanoID: aa,
|
|
8324
|
-
$ZodNever:
|
|
8325
|
+
$ZodNever: Ta,
|
|
8325
8326
|
$ZodNonOptional: tu,
|
|
8326
8327
|
$ZodNull: Da,
|
|
8327
8328
|
$ZodNullable: Qa,
|
|
@@ -8344,7 +8345,7 @@ const Tm = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
8344
8345
|
$ZodSymbol: Ua,
|
|
8345
8346
|
$ZodTemplateLiteral: cu,
|
|
8346
8347
|
$ZodTransform: Ya,
|
|
8347
|
-
$ZodTuple:
|
|
8348
|
+
$ZodTuple: Tt,
|
|
8348
8349
|
$ZodType: I,
|
|
8349
8350
|
$ZodULID: la,
|
|
8350
8351
|
$ZodURL: ia,
|
|
@@ -8352,18 +8353,18 @@ const Tm = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
8352
8353
|
$ZodUndefined: Na,
|
|
8353
8354
|
$ZodUnion: Zt,
|
|
8354
8355
|
$ZodUnknown: Za,
|
|
8355
|
-
$ZodVoid:
|
|
8356
|
+
$ZodVoid: Ea,
|
|
8356
8357
|
$ZodXID: sa,
|
|
8357
8358
|
$brand: mt,
|
|
8358
8359
|
$constructor: l,
|
|
8359
|
-
$input:
|
|
8360
|
-
$output:
|
|
8360
|
+
$input: Lt,
|
|
8361
|
+
$output: Rt,
|
|
8361
8362
|
Doc: Qo,
|
|
8362
|
-
JSONSchema:
|
|
8363
|
+
JSONSchema: Em,
|
|
8363
8364
|
JSONSchemaGenerator: st,
|
|
8364
8365
|
NEVER: dt,
|
|
8365
8366
|
TimePrecision: ur,
|
|
8366
|
-
_any:
|
|
8367
|
+
_any: Lu,
|
|
8367
8368
|
_array: Ku,
|
|
8368
8369
|
_base64: rr,
|
|
8369
8370
|
_base64url: ir,
|
|
@@ -8379,7 +8380,7 @@ const Tm = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
8379
8380
|
_coercedNumber: zu,
|
|
8380
8381
|
_coercedString: hu,
|
|
8381
8382
|
_cuid: Bt,
|
|
8382
|
-
_cuid2:
|
|
8383
|
+
_cuid2: qt,
|
|
8383
8384
|
_custom: Bu,
|
|
8384
8385
|
_date: Mu,
|
|
8385
8386
|
_decode: _t,
|
|
@@ -8397,7 +8398,7 @@ const Tm = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
8397
8398
|
_float32: Su,
|
|
8398
8399
|
_float64: ju,
|
|
8399
8400
|
_gt: H,
|
|
8400
|
-
_gte:
|
|
8401
|
+
_gte: E,
|
|
8401
8402
|
_guid: Ye,
|
|
8402
8403
|
_includes: $n,
|
|
8403
8404
|
_int: wu,
|
|
@@ -8424,7 +8425,7 @@ const Tm = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
8424
8425
|
_maxLength: Ne,
|
|
8425
8426
|
_maxSize: Ue,
|
|
8426
8427
|
_mime: yn,
|
|
8427
|
-
_min:
|
|
8428
|
+
_min: E,
|
|
8428
8429
|
_minLength: re,
|
|
8429
8430
|
_minSize: de,
|
|
8430
8431
|
_multipleOf: se,
|
|
@@ -8437,20 +8438,20 @@ const Tm = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
8437
8438
|
_nonoptional: xm,
|
|
8438
8439
|
_nonpositive: sr,
|
|
8439
8440
|
_normalize: kn,
|
|
8440
|
-
_null:
|
|
8441
|
+
_null: Ru,
|
|
8441
8442
|
_nullable: Sm,
|
|
8442
8443
|
_number: Iu,
|
|
8443
8444
|
_optional: wm,
|
|
8444
|
-
_overwrite:
|
|
8445
|
+
_overwrite: X,
|
|
8445
8446
|
_parse: ke,
|
|
8446
8447
|
_parseAsync: Ie,
|
|
8447
8448
|
_pipe: Nm,
|
|
8448
8449
|
_positive: cr,
|
|
8449
|
-
_promise:
|
|
8450
|
+
_promise: Tm,
|
|
8450
8451
|
_property: mr,
|
|
8451
8452
|
_readonly: Dm,
|
|
8452
8453
|
_record: $m,
|
|
8453
|
-
_refine:
|
|
8454
|
+
_refine: qu,
|
|
8454
8455
|
_regex: vn,
|
|
8455
8456
|
_safeDecode: zt,
|
|
8456
8457
|
_safeDecodeAsync: St,
|
|
@@ -8466,8 +8467,8 @@ const Tm = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
8466
8467
|
_stringFormat: Pe,
|
|
8467
8468
|
_stringbool: ec,
|
|
8468
8469
|
_success: Om,
|
|
8469
|
-
_superRefine:
|
|
8470
|
-
_symbol:
|
|
8470
|
+
_superRefine: Xu,
|
|
8471
|
+
_symbol: Eu,
|
|
8471
8472
|
_templateLiteral: Pm,
|
|
8472
8473
|
_toLowerCase: zn,
|
|
8473
8474
|
_toUpperCase: wn,
|
|
@@ -8475,8 +8476,8 @@ const Tm = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
8475
8476
|
_trim: In,
|
|
8476
8477
|
_tuple: hm,
|
|
8477
8478
|
_uint32: Ou,
|
|
8478
|
-
_uint64:
|
|
8479
|
-
_ulid:
|
|
8479
|
+
_uint64: Tu,
|
|
8480
|
+
_ulid: Xt,
|
|
8480
8481
|
_undefined: Au,
|
|
8481
8482
|
_union: gm,
|
|
8482
8483
|
_unknown: Cu,
|
|
@@ -8488,13 +8489,13 @@ const Tm = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
8488
8489
|
_uuidv7: Gt,
|
|
8489
8490
|
_void: Ju,
|
|
8490
8491
|
_xid: Yt,
|
|
8491
|
-
clone:
|
|
8492
|
-
config:
|
|
8493
|
-
decode:
|
|
8492
|
+
clone: L,
|
|
8493
|
+
config: D,
|
|
8494
|
+
decode: ql,
|
|
8494
8495
|
decodeAsync: Yl,
|
|
8495
8496
|
describe: Hu,
|
|
8496
8497
|
encode: Bl,
|
|
8497
|
-
encodeAsync:
|
|
8498
|
+
encodeAsync: Xl,
|
|
8498
8499
|
flattenError: ln,
|
|
8499
8500
|
formatError: sn,
|
|
8500
8501
|
globalConfig: We,
|
|
@@ -8513,9 +8514,9 @@ const Tm = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
8513
8514
|
safeDecodeAsync: ns,
|
|
8514
8515
|
safeEncode: Hl,
|
|
8515
8516
|
safeEncodeAsync: es,
|
|
8516
|
-
safeParse:
|
|
8517
|
+
safeParse: Xi,
|
|
8517
8518
|
safeParseAsync: Yi,
|
|
8518
|
-
toDotPath:
|
|
8519
|
+
toDotPath: qi,
|
|
8519
8520
|
toJSONSchema: fr,
|
|
8520
8521
|
treeifyError: ht,
|
|
8521
8522
|
util: vt,
|
|
@@ -8585,12 +8586,12 @@ const ac = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
8585
8586
|
});
|
|
8586
8587
|
}, He = l("ZodError", uc), A = l("ZodError", uc, {
|
|
8587
8588
|
Parent: Error
|
|
8588
|
-
}), gr = /* @__PURE__ */ ke(A), vr = /* @__PURE__ */ Ie(A), pr = /* @__PURE__ */ ze(A), hr = /* @__PURE__ */ we(A), $r = /* @__PURE__ */ bt(A), br = /* @__PURE__ */ _t(A), _r = /* @__PURE__ */ yt(A), yr = /* @__PURE__ */ kt(A), kr = /* @__PURE__ */ It(A), Ir = /* @__PURE__ */ zt(A), zr = /* @__PURE__ */ wt(A), wr = /* @__PURE__ */ St(A),
|
|
8589
|
+
}), gr = /* @__PURE__ */ ke(A), vr = /* @__PURE__ */ Ie(A), pr = /* @__PURE__ */ ze(A), hr = /* @__PURE__ */ we(A), $r = /* @__PURE__ */ bt(A), br = /* @__PURE__ */ _t(A), _r = /* @__PURE__ */ yt(A), yr = /* @__PURE__ */ kt(A), kr = /* @__PURE__ */ It(A), Ir = /* @__PURE__ */ zt(A), zr = /* @__PURE__ */ wt(A), wr = /* @__PURE__ */ St(A), z = /* @__PURE__ */ l("ZodType", (e, t) => (I.init(e, t), e.def = t, e.type = t.type, Object.defineProperty(e, "_def", { value: t }), e.check = (...o) => e.clone(q(t, {
|
|
8589
8590
|
checks: [
|
|
8590
8591
|
...t.checks ?? [],
|
|
8591
8592
|
...o.map((i) => typeof i == "function" ? { _zod: { check: i, def: { check: "custom" }, onattach: [] } } : i)
|
|
8592
8593
|
]
|
|
8593
|
-
})), e.clone = (o, i) =>
|
|
8594
|
+
})), e.clone = (o, i) => L(e, o, i), e.brand = () => e, e.register = ((o, i) => (o.add(e, i), e)), e.parse = (o, i) => gr(e, o, i, { callee: e.parse }), e.safeParse = (o, i) => pr(e, o, i), e.parseAsync = async (o, i) => vr(e, o, i, { callee: e.parseAsync }), e.safeParseAsync = async (o, i) => hr(e, o, i), e.spa = e.safeParseAsync, e.encode = (o, i) => $r(e, o, i), e.decode = (o, i) => br(e, o, i), e.encodeAsync = async (o, i) => _r(e, o, i), e.decodeAsync = async (o, i) => yr(e, o, i), e.safeEncode = (o, i) => kr(e, o, i), e.safeDecode = (o, i) => Ir(e, o, i), e.safeEncodeAsync = async (o, i) => zr(e, o, i), e.safeDecodeAsync = async (o, i) => wr(e, o, i), e.refine = (o, i) => e.check(mi(o, i)), e.superRefine = (o) => e.check(fi(o)), e.overwrite = (o) => e.check(X(o)), e.optional = () => $e(e), e.nullable = () => be(e), e.nullish = () => $e(be(e)), e.nonoptional = (o) => ei(e, o), e.array = () => Le(e), e.or = (o) => Hn([e, o]), e.and = (o) => Cr(e, o), e.transform = (o) => _e(e, nt(o)), e.default = (o) => Yr(e, o), e.prefault = (o) => Qr(e, o), e.catch = (o) => ri(e, o), e.pipe = (o) => _e(e, o), e.readonly = () => ai(e), e.describe = (o) => {
|
|
8594
8595
|
const i = e.clone();
|
|
8595
8596
|
return J.add(i, { description: o }), i;
|
|
8596
8597
|
}, Object.defineProperty(e, "description", {
|
|
@@ -8604,11 +8605,11 @@ const ac = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
8604
8605
|
const i = e.clone();
|
|
8605
8606
|
return J.add(i, o[0]), i;
|
|
8606
8607
|
}, e.isOptional = () => e.safeParse(void 0).success, e.isNullable = () => e.safeParse(null).success, e)), Nn = /* @__PURE__ */ l("_ZodString", (e, t) => {
|
|
8607
|
-
Oe.init(e, t),
|
|
8608
|
+
Oe.init(e, t), z.init(e, t);
|
|
8608
8609
|
const o = e._zod.bag;
|
|
8609
8610
|
e.format = o.format ?? null, e.minLength = o.minimum ?? null, e.maxLength = o.maximum ?? null, e.regex = (...i) => e.check(vn(...i)), e.includes = (...i) => e.check($n(...i)), e.startsWith = (...i) => e.check(bn(...i)), e.endsWith = (...i) => e.check(_n(...i)), e.min = (...i) => e.check(re(...i)), e.max = (...i) => e.check(Ne(...i)), e.length = (...i) => e.check(De(...i)), e.nonempty = (...i) => e.check(re(1, ...i)), e.lowercase = (i) => e.check(pn(i)), e.uppercase = (i) => e.check(hn(i)), e.trim = () => e.check(In()), e.normalize = (...i) => e.check(kn(...i)), e.toLowerCase = () => e.check(zn()), e.toUpperCase = () => e.check(wn()), e.slugify = () => e.check(Sn());
|
|
8610
8611
|
}), Ze = /* @__PURE__ */ l("ZodString", (e, t) => {
|
|
8611
|
-
Oe.init(e, t), Nn.init(e, t), e.email = (o) => e.check(Ft(Dn, o)), e.url = (o) => e.check(fn(
|
|
8612
|
+
Oe.init(e, t), Nn.init(e, t), e.email = (o) => e.check(Ft(Dn, o)), e.url = (o) => e.check(fn(Te, o)), e.jwt = (o) => e.check(ar(Wn, o)), e.emoji = (o) => e.check(Kt(Pn, o)), e.guid = (o) => e.check(Ye(he, o)), e.uuid = (o) => e.check(Jt(W, o)), e.uuidv4 = (o) => e.check(Mt(W, o)), e.uuidv6 = (o) => e.check(Vt(W, o)), e.uuidv7 = (o) => e.check(Gt(W, o)), e.nanoid = (o) => e.check(Wt(Zn, o)), e.guid = (o) => e.check(Ye(he, o)), e.cuid = (o) => e.check(Bt(Tn, o)), e.cuid2 = (o) => e.check(qt(En, o)), e.ulid = (o) => e.check(Xt(An, o)), e.base64 = (o) => e.check(rr(Vn, o)), e.base64url = (o) => e.check(ir(Gn, o)), e.xid = (o) => e.check(Yt(Rn, o)), e.ksuid = (o) => e.check(Ht(Ln, o)), e.ipv4 = (o) => e.check(Qt(Cn, o)), e.ipv6 = (o) => e.check(er(Fn, o)), e.cidrv4 = (o) => e.check(nr(Jn, o)), e.cidrv6 = (o) => e.check(tr(Mn, o)), e.e164 = (o) => e.check(or(Kn, o)), e.datetime = (o) => e.check(tc(o)), e.date = (o) => e.check(rc(o)), e.time = (o) => e.check(ic(o)), e.duration = (o) => e.check(oc(o));
|
|
8612
8613
|
});
|
|
8613
8614
|
function Qe(e) {
|
|
8614
8615
|
return pu(Ze, e);
|
|
@@ -8642,14 +8643,14 @@ function mc(e) {
|
|
|
8642
8643
|
function fc(e) {
|
|
8643
8644
|
return Gt(W, e);
|
|
8644
8645
|
}
|
|
8645
|
-
const
|
|
8646
|
+
const Te = /* @__PURE__ */ l("ZodURL", (e, t) => {
|
|
8646
8647
|
ia.init(e, t), U.init(e, t);
|
|
8647
8648
|
});
|
|
8648
8649
|
function gc(e) {
|
|
8649
|
-
return fn(
|
|
8650
|
+
return fn(Te, e);
|
|
8650
8651
|
}
|
|
8651
8652
|
function vc(e) {
|
|
8652
|
-
return fn(
|
|
8653
|
+
return fn(Te, {
|
|
8653
8654
|
protocol: /^https?$/,
|
|
8654
8655
|
hostname: ho,
|
|
8655
8656
|
...g(e)
|
|
@@ -8667,35 +8668,35 @@ const Zn = /* @__PURE__ */ l("ZodNanoID", (e, t) => {
|
|
|
8667
8668
|
function hc(e) {
|
|
8668
8669
|
return Wt(Zn, e);
|
|
8669
8670
|
}
|
|
8670
|
-
const
|
|
8671
|
+
const Tn = /* @__PURE__ */ l("ZodCUID", (e, t) => {
|
|
8671
8672
|
ua.init(e, t), U.init(e, t);
|
|
8672
8673
|
});
|
|
8673
8674
|
function $c(e) {
|
|
8674
|
-
return Bt(
|
|
8675
|
+
return Bt(Tn, e);
|
|
8675
8676
|
}
|
|
8676
|
-
const
|
|
8677
|
+
const En = /* @__PURE__ */ l("ZodCUID2", (e, t) => {
|
|
8677
8678
|
ca.init(e, t), U.init(e, t);
|
|
8678
8679
|
});
|
|
8679
8680
|
function bc(e) {
|
|
8680
|
-
return
|
|
8681
|
+
return qt(En, e);
|
|
8681
8682
|
}
|
|
8682
8683
|
const An = /* @__PURE__ */ l("ZodULID", (e, t) => {
|
|
8683
8684
|
la.init(e, t), U.init(e, t);
|
|
8684
8685
|
});
|
|
8685
8686
|
function _c(e) {
|
|
8686
|
-
return
|
|
8687
|
+
return Xt(An, e);
|
|
8687
8688
|
}
|
|
8688
|
-
const
|
|
8689
|
+
const Rn = /* @__PURE__ */ l("ZodXID", (e, t) => {
|
|
8689
8690
|
sa.init(e, t), U.init(e, t);
|
|
8690
8691
|
});
|
|
8691
8692
|
function yc(e) {
|
|
8692
|
-
return Yt(
|
|
8693
|
+
return Yt(Rn, e);
|
|
8693
8694
|
}
|
|
8694
|
-
const
|
|
8695
|
+
const Ln = /* @__PURE__ */ l("ZodKSUID", (e, t) => {
|
|
8695
8696
|
da.init(e, t), U.init(e, t);
|
|
8696
8697
|
});
|
|
8697
8698
|
function kc(e) {
|
|
8698
|
-
return Ht(
|
|
8699
|
+
return Ht(Ln, e);
|
|
8699
8700
|
}
|
|
8700
8701
|
const Cn = /* @__PURE__ */ l("ZodIPv4", (e, t) => {
|
|
8701
8702
|
pa.init(e, t), U.init(e, t);
|
|
@@ -8763,115 +8764,115 @@ function Pc(e) {
|
|
|
8763
8764
|
function Zc(e) {
|
|
8764
8765
|
return Pe(fe, "hex", Po, e);
|
|
8765
8766
|
}
|
|
8766
|
-
function
|
|
8767
|
+
function Tc(e, t) {
|
|
8767
8768
|
const o = t?.enc ?? "hex", i = `${e}_${o}`, n = dn[i];
|
|
8768
8769
|
if (!n)
|
|
8769
8770
|
throw new Error(`Unrecognized hash format: ${i}`);
|
|
8770
8771
|
return Pe(fe, i, n, t);
|
|
8771
8772
|
}
|
|
8772
|
-
const
|
|
8773
|
-
Nt.init(e, t),
|
|
8773
|
+
const Ee = /* @__PURE__ */ l("ZodNumber", (e, t) => {
|
|
8774
|
+
Nt.init(e, t), z.init(e, t), e.gt = (i, n) => e.check(H(i, n)), e.gte = (i, n) => e.check(E(i, n)), e.min = (i, n) => e.check(E(i, n)), e.lt = (i, n) => e.check(Y(i, n)), e.lte = (i, n) => e.check(M(i, n)), e.max = (i, n) => e.check(M(i, n)), e.int = (i) => e.check(en(i)), e.safe = (i) => e.check(en(i)), e.positive = (i) => e.check(H(0, i)), e.nonnegative = (i) => e.check(E(0, i)), e.negative = (i) => e.check(Y(0, i)), e.nonpositive = (i) => e.check(M(0, i)), e.multipleOf = (i, n) => e.check(se(i, n)), e.step = (i, n) => e.check(se(i, n)), e.finite = () => e;
|
|
8774
8775
|
const o = e._zod.bag;
|
|
8775
8776
|
e.minValue = Math.max(o.minimum ?? Number.NEGATIVE_INFINITY, o.exclusiveMinimum ?? Number.NEGATIVE_INFINITY) ?? null, e.maxValue = Math.min(o.maximum ?? Number.POSITIVE_INFINITY, o.exclusiveMaximum ?? Number.POSITIVE_INFINITY) ?? null, e.isInt = (o.format ?? "").includes("int") || Number.isSafeInteger(o.multipleOf ?? 0.5), e.isFinite = !0, e.format = o.format ?? null;
|
|
8776
8777
|
});
|
|
8777
8778
|
function jr(e) {
|
|
8778
|
-
return Iu(
|
|
8779
|
+
return Iu(Ee, e);
|
|
8779
8780
|
}
|
|
8780
8781
|
const ae = /* @__PURE__ */ l("ZodNumberFormat", (e, t) => {
|
|
8781
|
-
xa.init(e, t),
|
|
8782
|
+
xa.init(e, t), Ee.init(e, t);
|
|
8782
8783
|
});
|
|
8783
8784
|
function en(e) {
|
|
8784
8785
|
return wu(ae, e);
|
|
8785
8786
|
}
|
|
8786
|
-
function
|
|
8787
|
+
function Ec(e) {
|
|
8787
8788
|
return Su(ae, e);
|
|
8788
8789
|
}
|
|
8789
8790
|
function Ac(e) {
|
|
8790
8791
|
return ju(ae, e);
|
|
8791
8792
|
}
|
|
8792
|
-
function
|
|
8793
|
+
function Rc(e) {
|
|
8793
8794
|
return xu(ae, e);
|
|
8794
8795
|
}
|
|
8795
|
-
function
|
|
8796
|
+
function Lc(e) {
|
|
8796
8797
|
return Ou(ae, e);
|
|
8797
8798
|
}
|
|
8798
8799
|
const Ae = /* @__PURE__ */ l("ZodBoolean", (e, t) => {
|
|
8799
|
-
Dt.init(e, t),
|
|
8800
|
+
Dt.init(e, t), z.init(e, t);
|
|
8800
8801
|
});
|
|
8801
8802
|
function xr(e) {
|
|
8802
8803
|
return Uu(Ae, e);
|
|
8803
8804
|
}
|
|
8804
|
-
const
|
|
8805
|
-
Pt.init(e, t),
|
|
8805
|
+
const Re = /* @__PURE__ */ l("ZodBigInt", (e, t) => {
|
|
8806
|
+
Pt.init(e, t), z.init(e, t), e.gte = (i, n) => e.check(E(i, n)), e.min = (i, n) => e.check(E(i, n)), e.gt = (i, n) => e.check(H(i, n)), e.gte = (i, n) => e.check(E(i, n)), e.min = (i, n) => e.check(E(i, n)), e.lt = (i, n) => e.check(Y(i, n)), e.lte = (i, n) => e.check(M(i, n)), e.max = (i, n) => e.check(M(i, n)), e.positive = (i) => e.check(H(BigInt(0), i)), e.negative = (i) => e.check(Y(BigInt(0), i)), e.nonpositive = (i) => e.check(M(BigInt(0), i)), e.nonnegative = (i) => e.check(E(BigInt(0), i)), e.multipleOf = (i, n) => e.check(se(i, n));
|
|
8806
8807
|
const o = e._zod.bag;
|
|
8807
8808
|
e.minValue = o.minimum ?? null, e.maxValue = o.maximum ?? null, e.format = o.format ?? null;
|
|
8808
8809
|
});
|
|
8809
8810
|
function Cc(e) {
|
|
8810
|
-
return Du(
|
|
8811
|
+
return Du(Re, e);
|
|
8811
8812
|
}
|
|
8812
8813
|
const Bn = /* @__PURE__ */ l("ZodBigIntFormat", (e, t) => {
|
|
8813
|
-
Oa.init(e, t),
|
|
8814
|
+
Oa.init(e, t), Re.init(e, t);
|
|
8814
8815
|
});
|
|
8815
8816
|
function Fc(e) {
|
|
8816
8817
|
return Zu(Bn, e);
|
|
8817
8818
|
}
|
|
8818
8819
|
function Jc(e) {
|
|
8819
|
-
return
|
|
8820
|
+
return Tu(Bn, e);
|
|
8820
8821
|
}
|
|
8821
8822
|
const Or = /* @__PURE__ */ l("ZodSymbol", (e, t) => {
|
|
8822
|
-
Ua.init(e, t),
|
|
8823
|
+
Ua.init(e, t), z.init(e, t);
|
|
8823
8824
|
});
|
|
8824
8825
|
function Mc(e) {
|
|
8825
|
-
return
|
|
8826
|
+
return Eu(Or, e);
|
|
8826
8827
|
}
|
|
8827
8828
|
const Ur = /* @__PURE__ */ l("ZodUndefined", (e, t) => {
|
|
8828
|
-
Na.init(e, t),
|
|
8829
|
+
Na.init(e, t), z.init(e, t);
|
|
8829
8830
|
});
|
|
8830
8831
|
function Vc(e) {
|
|
8831
8832
|
return Au(Ur, e);
|
|
8832
8833
|
}
|
|
8833
8834
|
const Nr = /* @__PURE__ */ l("ZodNull", (e, t) => {
|
|
8834
|
-
Da.init(e, t),
|
|
8835
|
+
Da.init(e, t), z.init(e, t);
|
|
8835
8836
|
});
|
|
8836
8837
|
function Dr(e) {
|
|
8837
|
-
return
|
|
8838
|
+
return Ru(Nr, e);
|
|
8838
8839
|
}
|
|
8839
8840
|
const Pr = /* @__PURE__ */ l("ZodAny", (e, t) => {
|
|
8840
|
-
Pa.init(e, t),
|
|
8841
|
+
Pa.init(e, t), z.init(e, t);
|
|
8841
8842
|
});
|
|
8842
8843
|
function Gc() {
|
|
8843
|
-
return
|
|
8844
|
+
return Lu(Pr);
|
|
8844
8845
|
}
|
|
8845
8846
|
const Zr = /* @__PURE__ */ l("ZodUnknown", (e, t) => {
|
|
8846
|
-
Za.init(e, t),
|
|
8847
|
+
Za.init(e, t), z.init(e, t);
|
|
8847
8848
|
});
|
|
8848
8849
|
function ie() {
|
|
8849
8850
|
return Cu(Zr);
|
|
8850
8851
|
}
|
|
8851
|
-
const
|
|
8852
|
-
|
|
8852
|
+
const Tr = /* @__PURE__ */ l("ZodNever", (e, t) => {
|
|
8853
|
+
Ta.init(e, t), z.init(e, t);
|
|
8853
8854
|
});
|
|
8854
|
-
function
|
|
8855
|
-
return Fu(
|
|
8855
|
+
function qn(e) {
|
|
8856
|
+
return Fu(Tr, e);
|
|
8856
8857
|
}
|
|
8857
|
-
const
|
|
8858
|
-
|
|
8858
|
+
const Er = /* @__PURE__ */ l("ZodVoid", (e, t) => {
|
|
8859
|
+
Ea.init(e, t), z.init(e, t);
|
|
8859
8860
|
});
|
|
8860
8861
|
function Kc(e) {
|
|
8861
|
-
return Ju(
|
|
8862
|
+
return Ju(Er, e);
|
|
8862
8863
|
}
|
|
8863
|
-
const
|
|
8864
|
-
Aa.init(e, t),
|
|
8864
|
+
const Xn = /* @__PURE__ */ l("ZodDate", (e, t) => {
|
|
8865
|
+
Aa.init(e, t), z.init(e, t), e.min = (i, n) => e.check(E(i, n)), e.max = (i, n) => e.check(M(i, n));
|
|
8865
8866
|
const o = e._zod.bag;
|
|
8866
8867
|
e.minDate = o.minimum ? new Date(o.minimum) : null, e.maxDate = o.maximum ? new Date(o.maximum) : null;
|
|
8867
8868
|
});
|
|
8868
8869
|
function Wc(e) {
|
|
8869
|
-
return Mu(
|
|
8870
|
+
return Mu(Xn, e);
|
|
8870
8871
|
}
|
|
8871
8872
|
const Ar = /* @__PURE__ */ l("ZodArray", (e, t) => {
|
|
8872
|
-
|
|
8873
|
+
Ra.init(e, t), z.init(e, t), e.element = t.element, e.min = (o, i) => e.check(re(o, i)), e.nonempty = (o) => e.check(re(1, o)), e.max = (o, i) => e.check(Ne(o, i)), e.length = (o, i) => e.check(De(o, i)), e.unwrap = () => e.element;
|
|
8873
8874
|
});
|
|
8874
|
-
function
|
|
8875
|
+
function Le(e, t) {
|
|
8875
8876
|
return Ku(Ar, e, t);
|
|
8876
8877
|
}
|
|
8877
8878
|
function Bc(e) {
|
|
@@ -8879,9 +8880,9 @@ function Bc(e) {
|
|
|
8879
8880
|
return et(Object.keys(t));
|
|
8880
8881
|
}
|
|
8881
8882
|
const Ce = /* @__PURE__ */ l("ZodObject", (e, t) => {
|
|
8882
|
-
Ja.init(e, t),
|
|
8883
|
+
Ja.init(e, t), z.init(e, t), j(e, "shape", () => t.shape), e.keyof = () => et(Object.keys(e._zod.def.shape)), e.catchall = (o) => e.clone({ ...e._zod.def, catchall: o }), e.passthrough = () => e.clone({ ...e._zod.def, catchall: ie() }), e.loose = () => e.clone({ ...e._zod.def, catchall: ie() }), e.strict = () => e.clone({ ...e._zod.def, catchall: qn() }), e.strip = () => e.clone({ ...e._zod.def, catchall: void 0 }), e.extend = (o) => Fi(e, o), e.safeExtend = (o) => Ji(e, o), e.merge = (o) => Mi(e, o), e.pick = (o) => Li(e, o), e.omit = (o) => Ci(e, o), e.partial = (...o) => Vi(tt, e, o[0]), e.required = (...o) => Gi(rt, e, o[0]);
|
|
8883
8884
|
});
|
|
8884
|
-
function
|
|
8885
|
+
function qc(e, t) {
|
|
8885
8886
|
const o = {
|
|
8886
8887
|
type: "object",
|
|
8887
8888
|
shape: e ?? {},
|
|
@@ -8889,11 +8890,11 @@ function Xc(e, t) {
|
|
|
8889
8890
|
};
|
|
8890
8891
|
return new Ce(o);
|
|
8891
8892
|
}
|
|
8892
|
-
function
|
|
8893
|
+
function Xc(e, t) {
|
|
8893
8894
|
return new Ce({
|
|
8894
8895
|
type: "object",
|
|
8895
8896
|
shape: e,
|
|
8896
|
-
catchall:
|
|
8897
|
+
catchall: qn(),
|
|
8897
8898
|
...g(t)
|
|
8898
8899
|
});
|
|
8899
8900
|
}
|
|
@@ -8906,7 +8907,7 @@ function Yc(e, t) {
|
|
|
8906
8907
|
});
|
|
8907
8908
|
}
|
|
8908
8909
|
const Yn = /* @__PURE__ */ l("ZodUnion", (e, t) => {
|
|
8909
|
-
Zt.init(e, t),
|
|
8910
|
+
Zt.init(e, t), z.init(e, t), e.options = t.options;
|
|
8910
8911
|
});
|
|
8911
8912
|
function Hn(e, t) {
|
|
8912
8913
|
return new Yn({
|
|
@@ -8915,29 +8916,29 @@ function Hn(e, t) {
|
|
|
8915
8916
|
...g(t)
|
|
8916
8917
|
});
|
|
8917
8918
|
}
|
|
8918
|
-
const
|
|
8919
|
+
const Rr = /* @__PURE__ */ l("ZodDiscriminatedUnion", (e, t) => {
|
|
8919
8920
|
Yn.init(e, t), Ma.init(e, t);
|
|
8920
8921
|
});
|
|
8921
8922
|
function Hc(e, t, o) {
|
|
8922
|
-
return new
|
|
8923
|
+
return new Rr({
|
|
8923
8924
|
type: "union",
|
|
8924
8925
|
options: t,
|
|
8925
8926
|
discriminator: e,
|
|
8926
8927
|
...g(o)
|
|
8927
8928
|
});
|
|
8928
8929
|
}
|
|
8929
|
-
const
|
|
8930
|
-
Va.init(e, t),
|
|
8930
|
+
const Lr = /* @__PURE__ */ l("ZodIntersection", (e, t) => {
|
|
8931
|
+
Va.init(e, t), z.init(e, t);
|
|
8931
8932
|
});
|
|
8932
8933
|
function Cr(e, t) {
|
|
8933
|
-
return new
|
|
8934
|
+
return new Lr({
|
|
8934
8935
|
type: "intersection",
|
|
8935
8936
|
left: e,
|
|
8936
8937
|
right: t
|
|
8937
8938
|
});
|
|
8938
8939
|
}
|
|
8939
8940
|
const Fr = /* @__PURE__ */ l("ZodTuple", (e, t) => {
|
|
8940
|
-
|
|
8941
|
+
Tt.init(e, t), z.init(e, t), e.rest = (o) => e.clone({
|
|
8941
8942
|
...e._zod.def,
|
|
8942
8943
|
rest: o
|
|
8943
8944
|
});
|
|
@@ -8952,7 +8953,7 @@ function Jr(e, t, o) {
|
|
|
8952
8953
|
});
|
|
8953
8954
|
}
|
|
8954
8955
|
const Qn = /* @__PURE__ */ l("ZodRecord", (e, t) => {
|
|
8955
|
-
Ga.init(e, t),
|
|
8956
|
+
Ga.init(e, t), z.init(e, t), e.keyType = t.keyType, e.valueType = t.valueType;
|
|
8956
8957
|
});
|
|
8957
8958
|
function Mr(e, t, o) {
|
|
8958
8959
|
return new Qn({
|
|
@@ -8963,7 +8964,7 @@ function Mr(e, t, o) {
|
|
|
8963
8964
|
});
|
|
8964
8965
|
}
|
|
8965
8966
|
function Qc(e, t, o) {
|
|
8966
|
-
const i =
|
|
8967
|
+
const i = L(e);
|
|
8967
8968
|
return i._zod.values = void 0, new Qn({
|
|
8968
8969
|
type: "record",
|
|
8969
8970
|
keyType: i,
|
|
@@ -8972,7 +8973,7 @@ function Qc(e, t, o) {
|
|
|
8972
8973
|
});
|
|
8973
8974
|
}
|
|
8974
8975
|
const Vr = /* @__PURE__ */ l("ZodMap", (e, t) => {
|
|
8975
|
-
Ka.init(e, t),
|
|
8976
|
+
Ka.init(e, t), z.init(e, t), e.keyType = t.keyType, e.valueType = t.valueType;
|
|
8976
8977
|
});
|
|
8977
8978
|
function el(e, t, o) {
|
|
8978
8979
|
return new Vr({
|
|
@@ -8983,7 +8984,7 @@ function el(e, t, o) {
|
|
|
8983
8984
|
});
|
|
8984
8985
|
}
|
|
8985
8986
|
const Gr = /* @__PURE__ */ l("ZodSet", (e, t) => {
|
|
8986
|
-
Wa.init(e, t),
|
|
8987
|
+
Wa.init(e, t), z.init(e, t), e.min = (...o) => e.check(de(...o)), e.nonempty = (o) => e.check(de(1, o)), e.max = (...o) => e.check(Ue(...o)), e.size = (...o) => e.check(gn(...o));
|
|
8987
8988
|
});
|
|
8988
8989
|
function nl(e, t) {
|
|
8989
8990
|
return new Gr({
|
|
@@ -8993,7 +8994,7 @@ function nl(e, t) {
|
|
|
8993
8994
|
});
|
|
8994
8995
|
}
|
|
8995
8996
|
const me = /* @__PURE__ */ l("ZodEnum", (e, t) => {
|
|
8996
|
-
Ba.init(e, t),
|
|
8997
|
+
Ba.init(e, t), z.init(e, t), e.enum = t.entries, e.options = Object.values(t.entries);
|
|
8997
8998
|
const o = new Set(Object.keys(t.entries));
|
|
8998
8999
|
e.extract = (i, n) => {
|
|
8999
9000
|
const r = {};
|
|
@@ -9039,7 +9040,7 @@ function tl(e, t) {
|
|
|
9039
9040
|
});
|
|
9040
9041
|
}
|
|
9041
9042
|
const Kr = /* @__PURE__ */ l("ZodLiteral", (e, t) => {
|
|
9042
|
-
|
|
9043
|
+
qa.init(e, t), z.init(e, t), e.values = new Set(t.values), Object.defineProperty(e, "value", {
|
|
9043
9044
|
get() {
|
|
9044
9045
|
if (t.values.length > 1)
|
|
9045
9046
|
throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");
|
|
@@ -9055,13 +9056,13 @@ function rl(e, t) {
|
|
|
9055
9056
|
});
|
|
9056
9057
|
}
|
|
9057
9058
|
const Wr = /* @__PURE__ */ l("ZodFile", (e, t) => {
|
|
9058
|
-
|
|
9059
|
+
Xa.init(e, t), z.init(e, t), e.min = (o, i) => e.check(de(o, i)), e.max = (o, i) => e.check(Ue(o, i)), e.mime = (o, i) => e.check(yn(Array.isArray(o) ? o : [o], i));
|
|
9059
9060
|
});
|
|
9060
9061
|
function il(e) {
|
|
9061
9062
|
return Wu(Wr, e);
|
|
9062
9063
|
}
|
|
9063
9064
|
const Br = /* @__PURE__ */ l("ZodTransform", (e, t) => {
|
|
9064
|
-
Ya.init(e, t),
|
|
9065
|
+
Ya.init(e, t), z.init(e, t), e._zod.parse = (o, i) => {
|
|
9065
9066
|
if (i.direction === "backward")
|
|
9066
9067
|
throw new rn(e.constructor.name);
|
|
9067
9068
|
o.addIssue = (r) => {
|
|
@@ -9083,7 +9084,7 @@ function nt(e) {
|
|
|
9083
9084
|
});
|
|
9084
9085
|
}
|
|
9085
9086
|
const tt = /* @__PURE__ */ l("ZodOptional", (e, t) => {
|
|
9086
|
-
Ha.init(e, t),
|
|
9087
|
+
Ha.init(e, t), z.init(e, t), e.unwrap = () => e._zod.def.innerType;
|
|
9087
9088
|
});
|
|
9088
9089
|
function $e(e) {
|
|
9089
9090
|
return new tt({
|
|
@@ -9091,11 +9092,11 @@ function $e(e) {
|
|
|
9091
9092
|
innerType: e
|
|
9092
9093
|
});
|
|
9093
9094
|
}
|
|
9094
|
-
const
|
|
9095
|
-
Qa.init(e, t),
|
|
9095
|
+
const qr = /* @__PURE__ */ l("ZodNullable", (e, t) => {
|
|
9096
|
+
Qa.init(e, t), z.init(e, t), e.unwrap = () => e._zod.def.innerType;
|
|
9096
9097
|
});
|
|
9097
9098
|
function be(e) {
|
|
9098
|
-
return new
|
|
9099
|
+
return new qr({
|
|
9099
9100
|
type: "nullable",
|
|
9100
9101
|
innerType: e
|
|
9101
9102
|
});
|
|
@@ -9103,11 +9104,11 @@ function be(e) {
|
|
|
9103
9104
|
function ol(e) {
|
|
9104
9105
|
return $e(be(e));
|
|
9105
9106
|
}
|
|
9106
|
-
const
|
|
9107
|
-
eu.init(e, t),
|
|
9107
|
+
const Xr = /* @__PURE__ */ l("ZodDefault", (e, t) => {
|
|
9108
|
+
eu.init(e, t), z.init(e, t), e.unwrap = () => e._zod.def.innerType, e.removeDefault = e.unwrap;
|
|
9108
9109
|
});
|
|
9109
9110
|
function Yr(e, t) {
|
|
9110
|
-
return new
|
|
9111
|
+
return new Xr({
|
|
9111
9112
|
type: "default",
|
|
9112
9113
|
innerType: e,
|
|
9113
9114
|
get defaultValue() {
|
|
@@ -9116,7 +9117,7 @@ function Yr(e, t) {
|
|
|
9116
9117
|
});
|
|
9117
9118
|
}
|
|
9118
9119
|
const Hr = /* @__PURE__ */ l("ZodPrefault", (e, t) => {
|
|
9119
|
-
nu.init(e, t),
|
|
9120
|
+
nu.init(e, t), z.init(e, t), e.unwrap = () => e._zod.def.innerType;
|
|
9120
9121
|
});
|
|
9121
9122
|
function Qr(e, t) {
|
|
9122
9123
|
return new Hr({
|
|
@@ -9128,7 +9129,7 @@ function Qr(e, t) {
|
|
|
9128
9129
|
});
|
|
9129
9130
|
}
|
|
9130
9131
|
const rt = /* @__PURE__ */ l("ZodNonOptional", (e, t) => {
|
|
9131
|
-
tu.init(e, t),
|
|
9132
|
+
tu.init(e, t), z.init(e, t), e.unwrap = () => e._zod.def.innerType;
|
|
9132
9133
|
});
|
|
9133
9134
|
function ei(e, t) {
|
|
9134
9135
|
return new rt({
|
|
@@ -9138,7 +9139,7 @@ function ei(e, t) {
|
|
|
9138
9139
|
});
|
|
9139
9140
|
}
|
|
9140
9141
|
const ni = /* @__PURE__ */ l("ZodSuccess", (e, t) => {
|
|
9141
|
-
ru.init(e, t),
|
|
9142
|
+
ru.init(e, t), z.init(e, t), e.unwrap = () => e._zod.def.innerType;
|
|
9142
9143
|
});
|
|
9143
9144
|
function al(e) {
|
|
9144
9145
|
return new ni({
|
|
@@ -9147,7 +9148,7 @@ function al(e) {
|
|
|
9147
9148
|
});
|
|
9148
9149
|
}
|
|
9149
9150
|
const ti = /* @__PURE__ */ l("ZodCatch", (e, t) => {
|
|
9150
|
-
iu.init(e, t),
|
|
9151
|
+
iu.init(e, t), z.init(e, t), e.unwrap = () => e._zod.def.innerType, e.removeCatch = e.unwrap;
|
|
9151
9152
|
});
|
|
9152
9153
|
function ri(e, t) {
|
|
9153
9154
|
return new ti({
|
|
@@ -9157,13 +9158,13 @@ function ri(e, t) {
|
|
|
9157
9158
|
});
|
|
9158
9159
|
}
|
|
9159
9160
|
const ii = /* @__PURE__ */ l("ZodNaN", (e, t) => {
|
|
9160
|
-
ou.init(e, t),
|
|
9161
|
+
ou.init(e, t), z.init(e, t);
|
|
9161
9162
|
});
|
|
9162
9163
|
function ul(e) {
|
|
9163
9164
|
return Gu(ii, e);
|
|
9164
9165
|
}
|
|
9165
9166
|
const it = /* @__PURE__ */ l("ZodPipe", (e, t) => {
|
|
9166
|
-
au.init(e, t),
|
|
9167
|
+
au.init(e, t), z.init(e, t), e.in = t.in, e.out = t.out;
|
|
9167
9168
|
});
|
|
9168
9169
|
function _e(e, t) {
|
|
9169
9170
|
return new it({
|
|
@@ -9174,7 +9175,7 @@ function _e(e, t) {
|
|
|
9174
9175
|
});
|
|
9175
9176
|
}
|
|
9176
9177
|
const ot = /* @__PURE__ */ l("ZodCodec", (e, t) => {
|
|
9177
|
-
it.init(e, t),
|
|
9178
|
+
it.init(e, t), Et.init(e, t);
|
|
9178
9179
|
});
|
|
9179
9180
|
function cl(e, t, o) {
|
|
9180
9181
|
return new ot({
|
|
@@ -9186,7 +9187,7 @@ function cl(e, t, o) {
|
|
|
9186
9187
|
});
|
|
9187
9188
|
}
|
|
9188
9189
|
const oi = /* @__PURE__ */ l("ZodReadonly", (e, t) => {
|
|
9189
|
-
uu.init(e, t),
|
|
9190
|
+
uu.init(e, t), z.init(e, t), e.unwrap = () => e._zod.def.innerType;
|
|
9190
9191
|
});
|
|
9191
9192
|
function ai(e) {
|
|
9192
9193
|
return new oi({
|
|
@@ -9195,7 +9196,7 @@ function ai(e) {
|
|
|
9195
9196
|
});
|
|
9196
9197
|
}
|
|
9197
9198
|
const ui = /* @__PURE__ */ l("ZodTemplateLiteral", (e, t) => {
|
|
9198
|
-
cu.init(e, t),
|
|
9199
|
+
cu.init(e, t), z.init(e, t);
|
|
9199
9200
|
});
|
|
9200
9201
|
function ll(e, t) {
|
|
9201
9202
|
return new ui({
|
|
@@ -9205,7 +9206,7 @@ function ll(e, t) {
|
|
|
9205
9206
|
});
|
|
9206
9207
|
}
|
|
9207
9208
|
const ci = /* @__PURE__ */ l("ZodLazy", (e, t) => {
|
|
9208
|
-
du.init(e, t),
|
|
9209
|
+
du.init(e, t), z.init(e, t), e.unwrap = () => e._zod.def.getter();
|
|
9209
9210
|
});
|
|
9210
9211
|
function li(e) {
|
|
9211
9212
|
return new ci({
|
|
@@ -9214,7 +9215,7 @@ function li(e) {
|
|
|
9214
9215
|
});
|
|
9215
9216
|
}
|
|
9216
9217
|
const si = /* @__PURE__ */ l("ZodPromise", (e, t) => {
|
|
9217
|
-
su.init(e, t),
|
|
9218
|
+
su.init(e, t), z.init(e, t), e.unwrap = () => e._zod.def.innerType;
|
|
9218
9219
|
});
|
|
9219
9220
|
function sl(e) {
|
|
9220
9221
|
return new si({
|
|
@@ -9223,17 +9224,17 @@ function sl(e) {
|
|
|
9223
9224
|
});
|
|
9224
9225
|
}
|
|
9225
9226
|
const di = /* @__PURE__ */ l("ZodFunction", (e, t) => {
|
|
9226
|
-
lu.init(e, t),
|
|
9227
|
+
lu.init(e, t), z.init(e, t);
|
|
9227
9228
|
});
|
|
9228
9229
|
function nn(e) {
|
|
9229
9230
|
return new di({
|
|
9230
9231
|
type: "function",
|
|
9231
|
-
input: Array.isArray(e?.input) ? Jr(e?.input) : e?.input ??
|
|
9232
|
+
input: Array.isArray(e?.input) ? Jr(e?.input) : e?.input ?? Le(ie()),
|
|
9232
9233
|
output: e?.output ?? ie()
|
|
9233
9234
|
});
|
|
9234
9235
|
}
|
|
9235
9236
|
const Fe = /* @__PURE__ */ l("ZodCustom", (e, t) => {
|
|
9236
|
-
mu.init(e, t),
|
|
9237
|
+
mu.init(e, t), z.init(e, t);
|
|
9237
9238
|
});
|
|
9238
9239
|
function dl(e) {
|
|
9239
9240
|
const t = new N({
|
|
@@ -9246,10 +9247,10 @@ function ml(e, t) {
|
|
|
9246
9247
|
return Bu(Fe, e ?? (() => !0), t);
|
|
9247
9248
|
}
|
|
9248
9249
|
function mi(e, t = {}) {
|
|
9249
|
-
return
|
|
9250
|
+
return qu(Fe, e, t);
|
|
9250
9251
|
}
|
|
9251
9252
|
function fi(e) {
|
|
9252
|
-
return
|
|
9253
|
+
return Xu(e);
|
|
9253
9254
|
}
|
|
9254
9255
|
const fl = Hu, gl = Qu;
|
|
9255
9256
|
function vl(e, t = {
|
|
@@ -9270,7 +9271,7 @@ const pl = (...e) => ec({
|
|
|
9270
9271
|
String: Ze
|
|
9271
9272
|
}, ...e);
|
|
9272
9273
|
function hl(e) {
|
|
9273
|
-
const t = li(() => Hn([Qe(e), jr(), xr(), Dr(),
|
|
9274
|
+
const t = li(() => Hn([Qe(e), jr(), xr(), Dr(), Le(t), Mr(Qe(), t)]));
|
|
9274
9275
|
return t;
|
|
9275
9276
|
}
|
|
9276
9277
|
function $l(e, t) {
|
|
@@ -9290,64 +9291,64 @@ const bl = {
|
|
|
9290
9291
|
custom: "custom"
|
|
9291
9292
|
};
|
|
9292
9293
|
function _l(e) {
|
|
9293
|
-
|
|
9294
|
+
D({
|
|
9294
9295
|
customError: e
|
|
9295
9296
|
});
|
|
9296
9297
|
}
|
|
9297
9298
|
function yl() {
|
|
9298
|
-
return
|
|
9299
|
+
return D().customError;
|
|
9299
9300
|
}
|
|
9300
9301
|
var tn;
|
|
9301
9302
|
tn || (tn = {});
|
|
9302
9303
|
function Am(e) {
|
|
9303
9304
|
return hu(Ze, e);
|
|
9304
9305
|
}
|
|
9305
|
-
function Lm(e) {
|
|
9306
|
-
return zu(Te, e);
|
|
9307
|
-
}
|
|
9308
9306
|
function Rm(e) {
|
|
9307
|
+
return zu(Ee, e);
|
|
9308
|
+
}
|
|
9309
|
+
function Lm(e) {
|
|
9309
9310
|
return Nu(Ae, e);
|
|
9310
9311
|
}
|
|
9311
9312
|
function Cm(e) {
|
|
9312
|
-
return Pu(
|
|
9313
|
+
return Pu(Re, e);
|
|
9313
9314
|
}
|
|
9314
9315
|
function Fm(e) {
|
|
9315
|
-
return Vu(
|
|
9316
|
+
return Vu(Xn, e);
|
|
9316
9317
|
}
|
|
9317
9318
|
const kl = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
9318
9319
|
__proto__: null,
|
|
9319
9320
|
bigint: Cm,
|
|
9320
|
-
boolean:
|
|
9321
|
+
boolean: Lm,
|
|
9321
9322
|
date: Fm,
|
|
9322
|
-
number:
|
|
9323
|
+
number: Rm,
|
|
9323
9324
|
string: Am
|
|
9324
9325
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
9325
|
-
|
|
9326
|
+
D(fu());
|
|
9326
9327
|
const Ni = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
9327
9328
|
__proto__: null,
|
|
9328
9329
|
$brand: mt,
|
|
9329
|
-
$input:
|
|
9330
|
-
$output:
|
|
9330
|
+
$input: Lt,
|
|
9331
|
+
$output: Rt,
|
|
9331
9332
|
NEVER: dt,
|
|
9332
9333
|
TimePrecision: ur,
|
|
9333
9334
|
ZodAny: Pr,
|
|
9334
9335
|
ZodArray: Ar,
|
|
9335
9336
|
ZodBase64: Vn,
|
|
9336
9337
|
ZodBase64URL: Gn,
|
|
9337
|
-
ZodBigInt:
|
|
9338
|
+
ZodBigInt: Re,
|
|
9338
9339
|
ZodBigIntFormat: Bn,
|
|
9339
9340
|
ZodBoolean: Ae,
|
|
9340
9341
|
ZodCIDRv4: Jn,
|
|
9341
9342
|
ZodCIDRv6: Mn,
|
|
9342
|
-
ZodCUID:
|
|
9343
|
-
ZodCUID2:
|
|
9343
|
+
ZodCUID: Tn,
|
|
9344
|
+
ZodCUID2: En,
|
|
9344
9345
|
ZodCatch: ti,
|
|
9345
9346
|
ZodCodec: ot,
|
|
9346
9347
|
ZodCustom: Fe,
|
|
9347
9348
|
ZodCustomStringFormat: fe,
|
|
9348
|
-
ZodDate:
|
|
9349
|
-
ZodDefault:
|
|
9350
|
-
ZodDiscriminatedUnion:
|
|
9349
|
+
ZodDate: Xn,
|
|
9350
|
+
ZodDefault: Xr,
|
|
9351
|
+
ZodDiscriminatedUnion: Rr,
|
|
9351
9352
|
ZodE164: Kn,
|
|
9352
9353
|
ZodEmail: Dn,
|
|
9353
9354
|
ZodEmoji: Pn,
|
|
@@ -9365,21 +9366,21 @@ const Ni = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
9365
9366
|
ZodISODateTime: jn,
|
|
9366
9367
|
ZodISODuration: Un,
|
|
9367
9368
|
ZodISOTime: On,
|
|
9368
|
-
ZodIntersection:
|
|
9369
|
+
ZodIntersection: Lr,
|
|
9369
9370
|
ZodIssueCode: bl,
|
|
9370
9371
|
ZodJWT: Wn,
|
|
9371
|
-
ZodKSUID:
|
|
9372
|
+
ZodKSUID: Ln,
|
|
9372
9373
|
ZodLazy: ci,
|
|
9373
9374
|
ZodLiteral: Kr,
|
|
9374
9375
|
ZodMAC: Sr,
|
|
9375
9376
|
ZodMap: Vr,
|
|
9376
9377
|
ZodNaN: ii,
|
|
9377
9378
|
ZodNanoID: Zn,
|
|
9378
|
-
ZodNever:
|
|
9379
|
+
ZodNever: Tr,
|
|
9379
9380
|
ZodNonOptional: rt,
|
|
9380
9381
|
ZodNull: Nr,
|
|
9381
|
-
ZodNullable:
|
|
9382
|
-
ZodNumber:
|
|
9382
|
+
ZodNullable: qr,
|
|
9383
|
+
ZodNumber: Ee,
|
|
9383
9384
|
ZodNumberFormat: ae,
|
|
9384
9385
|
ZodObject: Ce,
|
|
9385
9386
|
ZodOptional: tt,
|
|
@@ -9397,20 +9398,20 @@ const Ni = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
9397
9398
|
ZodTemplateLiteral: ui,
|
|
9398
9399
|
ZodTransform: Br,
|
|
9399
9400
|
ZodTuple: Fr,
|
|
9400
|
-
ZodType:
|
|
9401
|
+
ZodType: z,
|
|
9401
9402
|
ZodULID: An,
|
|
9402
|
-
ZodURL:
|
|
9403
|
+
ZodURL: Te,
|
|
9403
9404
|
ZodUUID: W,
|
|
9404
9405
|
ZodUndefined: Ur,
|
|
9405
9406
|
ZodUnion: Yn,
|
|
9406
9407
|
ZodUnknown: Zr,
|
|
9407
|
-
ZodVoid:
|
|
9408
|
-
ZodXID:
|
|
9408
|
+
ZodVoid: Er,
|
|
9409
|
+
ZodXID: Rn,
|
|
9409
9410
|
_ZodString: Nn,
|
|
9410
9411
|
_default: Yr,
|
|
9411
9412
|
_function: nn,
|
|
9412
9413
|
any: Gc,
|
|
9413
|
-
array:
|
|
9414
|
+
array: Le,
|
|
9414
9415
|
base64: xc,
|
|
9415
9416
|
base64url: Oc,
|
|
9416
9417
|
bigint: Cc,
|
|
@@ -9419,10 +9420,10 @@ const Ni = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
9419
9420
|
check: dl,
|
|
9420
9421
|
cidrv4: Sc,
|
|
9421
9422
|
cidrv6: jc,
|
|
9422
|
-
clone:
|
|
9423
|
+
clone: L,
|
|
9423
9424
|
codec: cl,
|
|
9424
9425
|
coerce: kl,
|
|
9425
|
-
config:
|
|
9426
|
+
config: D,
|
|
9426
9427
|
core: nc,
|
|
9427
9428
|
cuid: $c,
|
|
9428
9429
|
cuid2: bc,
|
|
@@ -9441,23 +9442,23 @@ const Ni = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
9441
9442
|
enum: et,
|
|
9442
9443
|
file: il,
|
|
9443
9444
|
flattenError: ln,
|
|
9444
|
-
float32:
|
|
9445
|
+
float32: Ec,
|
|
9445
9446
|
float64: Ac,
|
|
9446
9447
|
formatError: sn,
|
|
9447
9448
|
function: nn,
|
|
9448
9449
|
getErrorMap: yl,
|
|
9449
9450
|
globalRegistry: J,
|
|
9450
9451
|
gt: H,
|
|
9451
|
-
gte:
|
|
9452
|
+
gte: E,
|
|
9452
9453
|
guid: lc,
|
|
9453
|
-
hash:
|
|
9454
|
+
hash: Tc,
|
|
9454
9455
|
hex: Zc,
|
|
9455
9456
|
hostname: Pc,
|
|
9456
9457
|
httpUrl: vc,
|
|
9457
9458
|
includes: $n,
|
|
9458
9459
|
instanceof: vl,
|
|
9459
9460
|
int: en,
|
|
9460
|
-
int32:
|
|
9461
|
+
int32: Rc,
|
|
9461
9462
|
int64: Fc,
|
|
9462
9463
|
intersection: Cr,
|
|
9463
9464
|
ipv4: Ic,
|
|
@@ -9488,7 +9489,7 @@ const Ni = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
9488
9489
|
nanoid: hc,
|
|
9489
9490
|
nativeEnum: tl,
|
|
9490
9491
|
negative: lr,
|
|
9491
|
-
never:
|
|
9492
|
+
never: qn,
|
|
9492
9493
|
nonnegative: dr,
|
|
9493
9494
|
nonoptional: ei,
|
|
9494
9495
|
nonpositive: sr,
|
|
@@ -9497,9 +9498,9 @@ const Ni = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
9497
9498
|
nullable: be,
|
|
9498
9499
|
nullish: ol,
|
|
9499
9500
|
number: jr,
|
|
9500
|
-
object:
|
|
9501
|
+
object: qc,
|
|
9501
9502
|
optional: $e,
|
|
9502
|
-
overwrite:
|
|
9503
|
+
overwrite: X,
|
|
9503
9504
|
parse: gr,
|
|
9504
9505
|
parseAsync: vr,
|
|
9505
9506
|
partialRecord: Qc,
|
|
@@ -9527,7 +9528,7 @@ const Ni = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
9527
9528
|
size: gn,
|
|
9528
9529
|
slugify: Sn,
|
|
9529
9530
|
startsWith: bn,
|
|
9530
|
-
strictObject:
|
|
9531
|
+
strictObject: Xc,
|
|
9531
9532
|
string: Qe,
|
|
9532
9533
|
stringFormat: Dc,
|
|
9533
9534
|
stringbool: pl,
|
|
@@ -9542,7 +9543,7 @@ const Ni = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
9542
9543
|
treeifyError: ht,
|
|
9543
9544
|
trim: In,
|
|
9544
9545
|
tuple: Jr,
|
|
9545
|
-
uint32:
|
|
9546
|
+
uint32: Lc,
|
|
9546
9547
|
uint64: Jc,
|
|
9547
9548
|
ulid: _c,
|
|
9548
9549
|
undefined: Vc,
|
|
@@ -9560,28 +9561,28 @@ const Ni = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
9560
9561
|
}, Symbol.toStringTag, { value: "Module" })), Km = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
9561
9562
|
__proto__: null,
|
|
9562
9563
|
$brand: mt,
|
|
9563
|
-
$input:
|
|
9564
|
-
$output:
|
|
9564
|
+
$input: Lt,
|
|
9565
|
+
$output: Rt,
|
|
9565
9566
|
NEVER: dt,
|
|
9566
9567
|
TimePrecision: ur,
|
|
9567
9568
|
ZodAny: Pr,
|
|
9568
9569
|
ZodArray: Ar,
|
|
9569
9570
|
ZodBase64: Vn,
|
|
9570
9571
|
ZodBase64URL: Gn,
|
|
9571
|
-
ZodBigInt:
|
|
9572
|
+
ZodBigInt: Re,
|
|
9572
9573
|
ZodBigIntFormat: Bn,
|
|
9573
9574
|
ZodBoolean: Ae,
|
|
9574
9575
|
ZodCIDRv4: Jn,
|
|
9575
9576
|
ZodCIDRv6: Mn,
|
|
9576
|
-
ZodCUID:
|
|
9577
|
-
ZodCUID2:
|
|
9577
|
+
ZodCUID: Tn,
|
|
9578
|
+
ZodCUID2: En,
|
|
9578
9579
|
ZodCatch: ti,
|
|
9579
9580
|
ZodCodec: ot,
|
|
9580
9581
|
ZodCustom: Fe,
|
|
9581
9582
|
ZodCustomStringFormat: fe,
|
|
9582
|
-
ZodDate:
|
|
9583
|
-
ZodDefault:
|
|
9584
|
-
ZodDiscriminatedUnion:
|
|
9583
|
+
ZodDate: Xn,
|
|
9584
|
+
ZodDefault: Xr,
|
|
9585
|
+
ZodDiscriminatedUnion: Rr,
|
|
9585
9586
|
ZodE164: Kn,
|
|
9586
9587
|
ZodEmail: Dn,
|
|
9587
9588
|
ZodEmoji: Pn,
|
|
@@ -9599,21 +9600,21 @@ const Ni = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
9599
9600
|
ZodISODateTime: jn,
|
|
9600
9601
|
ZodISODuration: Un,
|
|
9601
9602
|
ZodISOTime: On,
|
|
9602
|
-
ZodIntersection:
|
|
9603
|
+
ZodIntersection: Lr,
|
|
9603
9604
|
ZodIssueCode: bl,
|
|
9604
9605
|
ZodJWT: Wn,
|
|
9605
|
-
ZodKSUID:
|
|
9606
|
+
ZodKSUID: Ln,
|
|
9606
9607
|
ZodLazy: ci,
|
|
9607
9608
|
ZodLiteral: Kr,
|
|
9608
9609
|
ZodMAC: Sr,
|
|
9609
9610
|
ZodMap: Vr,
|
|
9610
9611
|
ZodNaN: ii,
|
|
9611
9612
|
ZodNanoID: Zn,
|
|
9612
|
-
ZodNever:
|
|
9613
|
+
ZodNever: Tr,
|
|
9613
9614
|
ZodNonOptional: rt,
|
|
9614
9615
|
ZodNull: Nr,
|
|
9615
|
-
ZodNullable:
|
|
9616
|
-
ZodNumber:
|
|
9616
|
+
ZodNullable: qr,
|
|
9617
|
+
ZodNumber: Ee,
|
|
9617
9618
|
ZodNumberFormat: ae,
|
|
9618
9619
|
ZodObject: Ce,
|
|
9619
9620
|
ZodOptional: tt,
|
|
@@ -9631,20 +9632,20 @@ const Ni = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
9631
9632
|
ZodTemplateLiteral: ui,
|
|
9632
9633
|
ZodTransform: Br,
|
|
9633
9634
|
ZodTuple: Fr,
|
|
9634
|
-
ZodType:
|
|
9635
|
+
ZodType: z,
|
|
9635
9636
|
ZodULID: An,
|
|
9636
|
-
ZodURL:
|
|
9637
|
+
ZodURL: Te,
|
|
9637
9638
|
ZodUUID: W,
|
|
9638
9639
|
ZodUndefined: Ur,
|
|
9639
9640
|
ZodUnion: Yn,
|
|
9640
9641
|
ZodUnknown: Zr,
|
|
9641
|
-
ZodVoid:
|
|
9642
|
-
ZodXID:
|
|
9642
|
+
ZodVoid: Er,
|
|
9643
|
+
ZodXID: Rn,
|
|
9643
9644
|
_ZodString: Nn,
|
|
9644
9645
|
_default: Yr,
|
|
9645
9646
|
_function: nn,
|
|
9646
9647
|
any: Gc,
|
|
9647
|
-
array:
|
|
9648
|
+
array: Le,
|
|
9648
9649
|
base64: xc,
|
|
9649
9650
|
base64url: Oc,
|
|
9650
9651
|
bigint: Cc,
|
|
@@ -9653,10 +9654,10 @@ const Ni = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
9653
9654
|
check: dl,
|
|
9654
9655
|
cidrv4: Sc,
|
|
9655
9656
|
cidrv6: jc,
|
|
9656
|
-
clone:
|
|
9657
|
+
clone: L,
|
|
9657
9658
|
codec: cl,
|
|
9658
9659
|
coerce: kl,
|
|
9659
|
-
config:
|
|
9660
|
+
config: D,
|
|
9660
9661
|
core: nc,
|
|
9661
9662
|
cuid: $c,
|
|
9662
9663
|
cuid2: bc,
|
|
@@ -9676,23 +9677,23 @@ const Ni = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
9676
9677
|
enum: et,
|
|
9677
9678
|
file: il,
|
|
9678
9679
|
flattenError: ln,
|
|
9679
|
-
float32:
|
|
9680
|
+
float32: Ec,
|
|
9680
9681
|
float64: Ac,
|
|
9681
9682
|
formatError: sn,
|
|
9682
9683
|
function: nn,
|
|
9683
9684
|
getErrorMap: yl,
|
|
9684
9685
|
globalRegistry: J,
|
|
9685
9686
|
gt: H,
|
|
9686
|
-
gte:
|
|
9687
|
+
gte: E,
|
|
9687
9688
|
guid: lc,
|
|
9688
|
-
hash:
|
|
9689
|
+
hash: Tc,
|
|
9689
9690
|
hex: Zc,
|
|
9690
9691
|
hostname: Pc,
|
|
9691
9692
|
httpUrl: vc,
|
|
9692
9693
|
includes: $n,
|
|
9693
9694
|
instanceof: vl,
|
|
9694
9695
|
int: en,
|
|
9695
|
-
int32:
|
|
9696
|
+
int32: Rc,
|
|
9696
9697
|
int64: Fc,
|
|
9697
9698
|
intersection: Cr,
|
|
9698
9699
|
ipv4: Ic,
|
|
@@ -9723,7 +9724,7 @@ const Ni = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
9723
9724
|
nanoid: hc,
|
|
9724
9725
|
nativeEnum: tl,
|
|
9725
9726
|
negative: lr,
|
|
9726
|
-
never:
|
|
9727
|
+
never: qn,
|
|
9727
9728
|
nonnegative: dr,
|
|
9728
9729
|
nonoptional: ei,
|
|
9729
9730
|
nonpositive: sr,
|
|
@@ -9732,9 +9733,9 @@ const Ni = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
9732
9733
|
nullable: be,
|
|
9733
9734
|
nullish: ol,
|
|
9734
9735
|
number: jr,
|
|
9735
|
-
object:
|
|
9736
|
+
object: qc,
|
|
9736
9737
|
optional: $e,
|
|
9737
|
-
overwrite:
|
|
9738
|
+
overwrite: X,
|
|
9738
9739
|
parse: gr,
|
|
9739
9740
|
parseAsync: vr,
|
|
9740
9741
|
partialRecord: Qc,
|
|
@@ -9762,7 +9763,7 @@ const Ni = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
9762
9763
|
size: gn,
|
|
9763
9764
|
slugify: Sn,
|
|
9764
9765
|
startsWith: bn,
|
|
9765
|
-
strictObject:
|
|
9766
|
+
strictObject: Xc,
|
|
9766
9767
|
string: Qe,
|
|
9767
9768
|
stringFormat: Dc,
|
|
9768
9769
|
stringbool: pl,
|
|
@@ -9777,7 +9778,7 @@ const Ni = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
9777
9778
|
treeifyError: ht,
|
|
9778
9779
|
trim: In,
|
|
9779
9780
|
tuple: Jr,
|
|
9780
|
-
uint32:
|
|
9781
|
+
uint32: Lc,
|
|
9781
9782
|
uint64: Jc,
|
|
9782
9783
|
ulid: _c,
|
|
9783
9784
|
undefined: Vc,
|
|
@@ -9804,15 +9805,27 @@ function Wm(e) {
|
|
|
9804
9805
|
},
|
|
9805
9806
|
withCredentials: e.withCredentials ?? !1
|
|
9806
9807
|
});
|
|
9807
|
-
e.
|
|
9808
|
+
e.onBeforeRequest && t.interceptors.request.use(
|
|
9809
|
+
async (a) => {
|
|
9810
|
+
try {
|
|
9811
|
+
return await e.onBeforeRequest(a) || a;
|
|
9812
|
+
} catch (u) {
|
|
9813
|
+
return Promise.reject(u);
|
|
9814
|
+
}
|
|
9815
|
+
},
|
|
9816
|
+
(a) => Promise.reject(a)
|
|
9817
|
+
), e.onStartRequest && t.interceptors.request.use(
|
|
9808
9818
|
async (a) => {
|
|
9809
9819
|
try {
|
|
9810
|
-
return await e.
|
|
9820
|
+
return await e.onStartRequest(), a;
|
|
9811
9821
|
} catch (u) {
|
|
9812
9822
|
return Promise.reject(u);
|
|
9813
9823
|
}
|
|
9814
9824
|
},
|
|
9815
9825
|
(a) => Promise.reject(a)
|
|
9826
|
+
), e.onFinishRequest && t.interceptors.response.use(
|
|
9827
|
+
(a) => (e.onFinishRequest(), a),
|
|
9828
|
+
(a) => Promise.reject(a)
|
|
9816
9829
|
), t.interceptors.request.use((a) => {
|
|
9817
9830
|
if (!a.url) return a;
|
|
9818
9831
|
const u = (s) => {
|
|
@@ -9851,40 +9864,40 @@ function Wm(e) {
|
|
|
9851
9864
|
url: u.path,
|
|
9852
9865
|
params: c?.params,
|
|
9853
9866
|
signal: b.signal
|
|
9854
|
-
}),
|
|
9855
|
-
d.value =
|
|
9867
|
+
}), P = u.response ? u.response.parse(x.data) : x.data;
|
|
9868
|
+
d.value = P, c?.onResult?.(P);
|
|
9856
9869
|
} catch (x) {
|
|
9857
9870
|
if (x instanceof gi) {
|
|
9858
9871
|
if (x.code !== "ERR_CANCELED") {
|
|
9859
|
-
const
|
|
9860
|
-
f.value =
|
|
9872
|
+
const P = x.response?.data?.message || x.message || "An error occurred", Z = x.response?.status, R = x.code, V = x.response?.data;
|
|
9873
|
+
f.value = P, c?.onError?.(x), e.onErrorRequest?.({ message: P, status: Z, code: R, data: V });
|
|
9861
9874
|
}
|
|
9862
9875
|
} else if (x instanceof He) {
|
|
9863
9876
|
h.value = x.issues || [];
|
|
9864
|
-
const
|
|
9865
|
-
(
|
|
9877
|
+
const Z = `Validation error: ${h.value.map(
|
|
9878
|
+
(R) => `${R.path.join(".")}: ${R.message}`
|
|
9866
9879
|
).join(", ")}`;
|
|
9867
|
-
f.value =
|
|
9880
|
+
f.value = Z, c?.onError?.(x), c?.onZodError?.(h.value), e.onErrorRequest?.({ message: Z, code: "VALIDATION_ERROR" }), e.onZodError && e.onZodError(h.value);
|
|
9868
9881
|
} else {
|
|
9869
|
-
const
|
|
9870
|
-
f.value =
|
|
9882
|
+
const P = x.message || "An error occurred";
|
|
9883
|
+
f.value = P, c?.onError?.(P), e.onErrorRequest?.({ message: P });
|
|
9871
9884
|
}
|
|
9872
9885
|
} finally {
|
|
9873
9886
|
v.value = !1, m.value = !0;
|
|
9874
9887
|
}
|
|
9875
|
-
},
|
|
9888
|
+
}, w = c?.debounce ? Jm(_, c.debounce) : _;
|
|
9876
9889
|
let S = null;
|
|
9877
9890
|
return c?.params && (wl(() => {
|
|
9878
9891
|
S && S(), S = Sl(
|
|
9879
9892
|
() => JSON.stringify(c.params),
|
|
9880
9893
|
() => {
|
|
9881
|
-
|
|
9894
|
+
w();
|
|
9882
9895
|
},
|
|
9883
9896
|
{ immediate: !1 }
|
|
9884
9897
|
);
|
|
9885
9898
|
}), jl(() => {
|
|
9886
9899
|
S && S(), b?.abort();
|
|
9887
|
-
})), (c?.loadOnMount === void 0 || c.loadOnMount) && !m.value && ($.value ? ($.value = !1, _()) :
|
|
9900
|
+
})), (c?.loadOnMount === void 0 || c.loadOnMount) && !m.value && ($.value ? ($.value = !1, _()) : w()), { result: d, errorMessage: f, zodErrors: h, isLoading: v, isDone: m, refetch: _ };
|
|
9888
9901
|
});
|
|
9889
9902
|
}
|
|
9890
9903
|
const n = e.mutations ?? {}, r = {};
|
|
@@ -9892,48 +9905,48 @@ function Wm(e) {
|
|
|
9892
9905
|
const u = n[a];
|
|
9893
9906
|
u && (r[a] = (s) => {
|
|
9894
9907
|
const c = F(), d = F(), f = F(), h = F(!1), v = F(!1), m = F(0);
|
|
9895
|
-
return { result: c,
|
|
9908
|
+
return { result: c, errorMessage: d, zodErrors: f, isLoading: h, isDone: v, uploadProgress: m, mutate: async (b) => {
|
|
9896
9909
|
if (!h.value) {
|
|
9897
9910
|
h.value = !0, d.value = void 0, m.value = 0;
|
|
9898
9911
|
try {
|
|
9899
|
-
const {
|
|
9900
|
-
let
|
|
9912
|
+
const { data: k, params: _ } = b;
|
|
9913
|
+
let w = k ?? {}, S = {};
|
|
9901
9914
|
if (u.isMultipart) {
|
|
9902
|
-
const
|
|
9903
|
-
for (const [
|
|
9904
|
-
V instanceof File || V instanceof Blob ?
|
|
9905
|
-
Je instanceof File || Je instanceof Blob ?
|
|
9906
|
-
}) : typeof V == "object" && V !== null ?
|
|
9907
|
-
|
|
9908
|
-
} else u.data && u.data.parse(
|
|
9909
|
-
u.params &&
|
|
9915
|
+
const Z = new FormData();
|
|
9916
|
+
for (const [R, V] of Object.entries(k))
|
|
9917
|
+
V instanceof File || V instanceof Blob ? Z.append(R, V) : Array.isArray(V) ? V.forEach((Je) => {
|
|
9918
|
+
Je instanceof File || Je instanceof Blob ? Z.append(R, Je) : Z.append(R, JSON.stringify(Je));
|
|
9919
|
+
}) : typeof V == "object" && V !== null ? Z.append(R, JSON.stringify(V)) : Z.append(R, String(V));
|
|
9920
|
+
w = Z, S["Content-Type"] = "multipart/form-data";
|
|
9921
|
+
} else u.data && u.data.parse(k);
|
|
9922
|
+
u.params && _ && u.params.parse(_);
|
|
9910
9923
|
const x = await t.request({
|
|
9911
9924
|
method: u.method,
|
|
9912
9925
|
url: u.path,
|
|
9913
|
-
data:
|
|
9914
|
-
params:
|
|
9926
|
+
data: w,
|
|
9927
|
+
params: _,
|
|
9915
9928
|
headers: S,
|
|
9916
|
-
onUploadProgress: (
|
|
9917
|
-
if (
|
|
9918
|
-
const
|
|
9919
|
-
m.value =
|
|
9929
|
+
onUploadProgress: (Z) => {
|
|
9930
|
+
if (Z.total) {
|
|
9931
|
+
const R = Math.round(Z.loaded * 100 / Z.total);
|
|
9932
|
+
m.value = R, s?.onUploadProgress?.(R);
|
|
9920
9933
|
}
|
|
9921
9934
|
}
|
|
9922
|
-
}),
|
|
9923
|
-
c.value =
|
|
9935
|
+
}), P = u.response ? u.response.parse(x.data) : x.data;
|
|
9936
|
+
c.value = P, s?.onResult?.(P);
|
|
9924
9937
|
} catch (k) {
|
|
9925
9938
|
if (k instanceof gi) {
|
|
9926
|
-
const _ = k.response?.data?.message || k.message || "An error occurred",
|
|
9927
|
-
d.value = _, s?.onError?.(
|
|
9939
|
+
const _ = k.response?.data?.message || k.message || "An error occurred", w = k.response?.status, S = k.code;
|
|
9940
|
+
d.value = _, s?.onError?.(k), e.onErrorRequest?.({ message: _, status: w, code: S });
|
|
9928
9941
|
} else if (k instanceof He) {
|
|
9929
9942
|
f.value = k.issues || [];
|
|
9930
|
-
const
|
|
9943
|
+
const w = `Validation error: ${f.value.map(
|
|
9931
9944
|
(S) => `${S.path.join(".")}: ${S.message}`
|
|
9932
9945
|
).join(", ")}`;
|
|
9933
|
-
d.value =
|
|
9946
|
+
d.value = w, s?.onError?.(k), s?.onZodError?.(f.value), e.onErrorRequest?.({ message: w, code: "VALIDATION_ERROR" }), e.onZodError && e.onZodError(f.value);
|
|
9934
9947
|
} else {
|
|
9935
9948
|
const _ = k.message || "An error occurred";
|
|
9936
|
-
d.value = _, s?.onError?.(
|
|
9949
|
+
d.value = _, s?.onError?.(k), e.onErrorRequest?.({ message: _ });
|
|
9937
9950
|
}
|
|
9938
9951
|
} finally {
|
|
9939
9952
|
h.value = !1, v.value = !0;
|
|
@@ -9948,6 +9961,7 @@ function Wm(e) {
|
|
|
9948
9961
|
};
|
|
9949
9962
|
}
|
|
9950
9963
|
export {
|
|
9964
|
+
Xm as AxiosError,
|
|
9951
9965
|
Wm as createApiClient,
|
|
9952
9966
|
Km as z
|
|
9953
9967
|
};
|