@taskless/cli 0.11.0 → 0.11.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/assets/reference.json +213 -0
- package/dist/binary-DSACXL6n.js +107 -0
- package/dist/index.js +5650 -4550
- package/dist/layout/index.d.ts +31 -0
- package/dist/layout.js +43 -0
- package/dist/node/runtimes/index.d.ts +102 -0
- package/dist/node/runtimes.js +10 -0
- package/dist/prompts/index.d.ts +25 -11
- package/dist/prompts/recipes.d.ts +37 -12
- package/dist/prompts.js +12 -12
- package/dist/recipes-w68swLg4.js +2662 -0
- package/dist/rules/ast-grep-binary.d.ts +26 -0
- package/dist/rules/capabilities.d.ts +46 -6
- package/dist/rules/constraints.d.ts +132 -0
- package/dist/rules/layout.d.ts +152 -0
- package/dist/rules/platform-binary.d.ts +113 -0
- package/dist/rules/vale/binary.d.ts +35 -0
- package/dist/schemas/index.d.ts +93 -0
- package/dist/schemas/rules-create.d.ts +1 -0
- package/dist/schemas/rules-improve.d.ts +1 -0
- package/dist/schemas/rules-verify.d.ts +67 -0
- package/dist/schemas/verify-test.d.ts +22 -0
- package/dist/schemas-OhdGAhu_.js +4512 -0
- package/dist/schemas.js +65 -0
- package/dist/types/errors.d.ts +20 -0
- package/dist/verify-test-BaZPwJqC.js +34 -0
- package/package.json +31 -12
- package/dist/recipes-C_i98mTO.js +0 -6975
|
@@ -0,0 +1,4512 @@
|
|
|
1
|
+
function u(e, n, t) {
|
|
2
|
+
function r(c, a) {
|
|
3
|
+
if (c._zod || Object.defineProperty(c, "_zod", {
|
|
4
|
+
value: {
|
|
5
|
+
def: a,
|
|
6
|
+
constr: s,
|
|
7
|
+
traits: /* @__PURE__ */ new Set()
|
|
8
|
+
},
|
|
9
|
+
enumerable: !1
|
|
10
|
+
}), c._zod.traits.has(e))
|
|
11
|
+
return;
|
|
12
|
+
c._zod.traits.add(e), n(c, a);
|
|
13
|
+
const l = s.prototype, f = Object.keys(l);
|
|
14
|
+
for (let d = 0; d < f.length; d++) {
|
|
15
|
+
const h = f[d];
|
|
16
|
+
h in c || (c[h] = l[h].bind(c));
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
const o = t?.Parent ?? Object;
|
|
20
|
+
class i extends o {
|
|
21
|
+
}
|
|
22
|
+
Object.defineProperty(i, "name", { value: e });
|
|
23
|
+
function s(c) {
|
|
24
|
+
var a;
|
|
25
|
+
const l = t?.Parent ? new i() : this;
|
|
26
|
+
r(l, c), (a = l._zod).deferred ?? (a.deferred = []);
|
|
27
|
+
for (const f of l._zod.deferred)
|
|
28
|
+
f();
|
|
29
|
+
return l;
|
|
30
|
+
}
|
|
31
|
+
return Object.defineProperty(s, "init", { value: r }), Object.defineProperty(s, Symbol.hasInstance, {
|
|
32
|
+
value: (c) => t?.Parent && c instanceof t.Parent ? !0 : c?._zod?.traits?.has(e)
|
|
33
|
+
}), Object.defineProperty(s, "name", { value: e }), s;
|
|
34
|
+
}
|
|
35
|
+
class M extends Error {
|
|
36
|
+
constructor() {
|
|
37
|
+
super("Encountered Promise during synchronous parse. Use .parseAsync() instead.");
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
class Me extends Error {
|
|
41
|
+
constructor(n) {
|
|
42
|
+
super(`Encountered unidirectional transform during encode: ${n}`), this.name = "ZodEncodeError";
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
const Yn = {};
|
|
46
|
+
function I(e) {
|
|
47
|
+
return Yn;
|
|
48
|
+
}
|
|
49
|
+
function qn(e) {
|
|
50
|
+
const n = Object.values(e).filter((r) => typeof r == "number");
|
|
51
|
+
return Object.entries(e).filter(([r, o]) => n.indexOf(+r) === -1).map(([r, o]) => o);
|
|
52
|
+
}
|
|
53
|
+
function xe(e, n) {
|
|
54
|
+
return typeof n == "bigint" ? n.toString() : n;
|
|
55
|
+
}
|
|
56
|
+
function be(e) {
|
|
57
|
+
return {
|
|
58
|
+
get value() {
|
|
59
|
+
{
|
|
60
|
+
const n = e();
|
|
61
|
+
return Object.defineProperty(this, "value", { value: n }), n;
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
};
|
|
65
|
+
}
|
|
66
|
+
function W(e) {
|
|
67
|
+
return e == null;
|
|
68
|
+
}
|
|
69
|
+
function Le(e) {
|
|
70
|
+
const n = e.startsWith("^") ? 1 : 0, t = e.endsWith("$") ? e.length - 1 : e.length;
|
|
71
|
+
return e.slice(n, t);
|
|
72
|
+
}
|
|
73
|
+
function oi(e, n) {
|
|
74
|
+
const t = (e.toString().split(".")[1] || "").length, r = n.toString();
|
|
75
|
+
let o = (r.split(".")[1] || "").length;
|
|
76
|
+
if (o === 0 && /\d?e-\d?/.test(r)) {
|
|
77
|
+
const a = r.match(/\d?e-(\d?)/);
|
|
78
|
+
a?.[1] && (o = Number.parseInt(a[1]));
|
|
79
|
+
}
|
|
80
|
+
const i = t > o ? t : o, s = Number.parseInt(e.toFixed(i).replace(".", "")), c = Number.parseInt(n.toFixed(i).replace(".", ""));
|
|
81
|
+
return s % c / 10 ** i;
|
|
82
|
+
}
|
|
83
|
+
const Pn = /* @__PURE__ */ Symbol("evaluating");
|
|
84
|
+
function v(e, n, t) {
|
|
85
|
+
let r;
|
|
86
|
+
Object.defineProperty(e, n, {
|
|
87
|
+
get() {
|
|
88
|
+
if (r !== Pn)
|
|
89
|
+
return r === void 0 && (r = Pn, r = t()), r;
|
|
90
|
+
},
|
|
91
|
+
set(o) {
|
|
92
|
+
Object.defineProperty(e, n, {
|
|
93
|
+
value: o
|
|
94
|
+
// configurable: true,
|
|
95
|
+
});
|
|
96
|
+
},
|
|
97
|
+
configurable: !0
|
|
98
|
+
});
|
|
99
|
+
}
|
|
100
|
+
function J(e, n, t) {
|
|
101
|
+
Object.defineProperty(e, n, {
|
|
102
|
+
value: t,
|
|
103
|
+
writable: !0,
|
|
104
|
+
enumerable: !0,
|
|
105
|
+
configurable: !0
|
|
106
|
+
});
|
|
107
|
+
}
|
|
108
|
+
function F(...e) {
|
|
109
|
+
const n = {};
|
|
110
|
+
for (const t of e) {
|
|
111
|
+
const r = Object.getOwnPropertyDescriptors(t);
|
|
112
|
+
Object.assign(n, r);
|
|
113
|
+
}
|
|
114
|
+
return Object.defineProperties({}, n);
|
|
115
|
+
}
|
|
116
|
+
function En(e) {
|
|
117
|
+
return JSON.stringify(e);
|
|
118
|
+
}
|
|
119
|
+
function ii(e) {
|
|
120
|
+
return e.toLowerCase().trim().replace(/[^\w\s-]/g, "").replace(/[\s_-]+/g, "-").replace(/^-+|-+$/g, "");
|
|
121
|
+
}
|
|
122
|
+
const Xn = "captureStackTrace" in Error ? Error.captureStackTrace : (...e) => {
|
|
123
|
+
};
|
|
124
|
+
function Y(e) {
|
|
125
|
+
return typeof e == "object" && e !== null && !Array.isArray(e);
|
|
126
|
+
}
|
|
127
|
+
const si = be(() => {
|
|
128
|
+
if (typeof navigator < "u" && navigator?.userAgent?.includes("Cloudflare"))
|
|
129
|
+
return !1;
|
|
130
|
+
try {
|
|
131
|
+
const e = Function;
|
|
132
|
+
return new e(""), !0;
|
|
133
|
+
} catch {
|
|
134
|
+
return !1;
|
|
135
|
+
}
|
|
136
|
+
});
|
|
137
|
+
function L(e) {
|
|
138
|
+
if (Y(e) === !1)
|
|
139
|
+
return !1;
|
|
140
|
+
const n = e.constructor;
|
|
141
|
+
if (n === void 0 || typeof n != "function")
|
|
142
|
+
return !0;
|
|
143
|
+
const t = n.prototype;
|
|
144
|
+
return !(Y(t) === !1 || Object.prototype.hasOwnProperty.call(t, "isPrototypeOf") === !1);
|
|
145
|
+
}
|
|
146
|
+
function Hn(e) {
|
|
147
|
+
return L(e) ? { ...e } : Array.isArray(e) ? [...e] : e;
|
|
148
|
+
}
|
|
149
|
+
const Ce = /* @__PURE__ */ new Set(["string", "number", "symbol"]), ci = /* @__PURE__ */ new Set(["string", "number", "bigint", "boolean", "symbol", "undefined"]);
|
|
150
|
+
function R(e) {
|
|
151
|
+
return e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
152
|
+
}
|
|
153
|
+
function C(e, n, t) {
|
|
154
|
+
const r = new e._zod.constr(n ?? e._zod.def);
|
|
155
|
+
return (!n || t?.parent) && (r._zod.parent = e), r;
|
|
156
|
+
}
|
|
157
|
+
function p(e) {
|
|
158
|
+
const n = e;
|
|
159
|
+
if (!n)
|
|
160
|
+
return {};
|
|
161
|
+
if (typeof n == "string")
|
|
162
|
+
return { error: () => n };
|
|
163
|
+
if (n?.message !== void 0) {
|
|
164
|
+
if (n?.error !== void 0)
|
|
165
|
+
throw new Error("Cannot specify both `message` and `error` params");
|
|
166
|
+
n.error = n.message;
|
|
167
|
+
}
|
|
168
|
+
return delete n.message, typeof n.error == "string" ? { ...n, error: () => n.error } : n;
|
|
169
|
+
}
|
|
170
|
+
function ui(e) {
|
|
171
|
+
return Object.keys(e).filter((n) => e[n]._zod.optin === "optional" && e[n]._zod.optout === "optional");
|
|
172
|
+
}
|
|
173
|
+
const ai = {
|
|
174
|
+
safeint: [Number.MIN_SAFE_INTEGER, Number.MAX_SAFE_INTEGER],
|
|
175
|
+
int32: [-2147483648, 2147483647],
|
|
176
|
+
uint32: [0, 4294967295],
|
|
177
|
+
float32: [-34028234663852886e22, 34028234663852886e22],
|
|
178
|
+
float64: [-Number.MAX_VALUE, Number.MAX_VALUE]
|
|
179
|
+
}, li = {
|
|
180
|
+
int64: [/* @__PURE__ */ BigInt("-9223372036854775808"), /* @__PURE__ */ BigInt("9223372036854775807")],
|
|
181
|
+
uint64: [/* @__PURE__ */ BigInt(0), /* @__PURE__ */ BigInt("18446744073709551615")]
|
|
182
|
+
};
|
|
183
|
+
function fi(e, n) {
|
|
184
|
+
const t = e._zod.def, r = t.checks;
|
|
185
|
+
if (r && r.length > 0)
|
|
186
|
+
throw new Error(".pick() cannot be used on object schemas containing refinements");
|
|
187
|
+
const i = F(e._zod.def, {
|
|
188
|
+
get shape() {
|
|
189
|
+
const s = {};
|
|
190
|
+
for (const c in n) {
|
|
191
|
+
if (!(c in t.shape))
|
|
192
|
+
throw new Error(`Unrecognized key: "${c}"`);
|
|
193
|
+
n[c] && (s[c] = t.shape[c]);
|
|
194
|
+
}
|
|
195
|
+
return J(this, "shape", s), s;
|
|
196
|
+
},
|
|
197
|
+
checks: []
|
|
198
|
+
});
|
|
199
|
+
return C(e, i);
|
|
200
|
+
}
|
|
201
|
+
function pi(e, n) {
|
|
202
|
+
const t = e._zod.def, r = t.checks;
|
|
203
|
+
if (r && r.length > 0)
|
|
204
|
+
throw new Error(".omit() cannot be used on object schemas containing refinements");
|
|
205
|
+
const i = F(e._zod.def, {
|
|
206
|
+
get shape() {
|
|
207
|
+
const s = { ...e._zod.def.shape };
|
|
208
|
+
for (const c in n) {
|
|
209
|
+
if (!(c in t.shape))
|
|
210
|
+
throw new Error(`Unrecognized key: "${c}"`);
|
|
211
|
+
n[c] && delete s[c];
|
|
212
|
+
}
|
|
213
|
+
return J(this, "shape", s), s;
|
|
214
|
+
},
|
|
215
|
+
checks: []
|
|
216
|
+
});
|
|
217
|
+
return C(e, i);
|
|
218
|
+
}
|
|
219
|
+
function di(e, n) {
|
|
220
|
+
if (!L(n))
|
|
221
|
+
throw new Error("Invalid input to extend: expected a plain object");
|
|
222
|
+
const t = e._zod.def.checks;
|
|
223
|
+
if (t && t.length > 0) {
|
|
224
|
+
const i = e._zod.def.shape;
|
|
225
|
+
for (const s in n)
|
|
226
|
+
if (Object.getOwnPropertyDescriptor(i, s) !== void 0)
|
|
227
|
+
throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.");
|
|
228
|
+
}
|
|
229
|
+
const o = F(e._zod.def, {
|
|
230
|
+
get shape() {
|
|
231
|
+
const i = { ...e._zod.def.shape, ...n };
|
|
232
|
+
return J(this, "shape", i), i;
|
|
233
|
+
}
|
|
234
|
+
});
|
|
235
|
+
return C(e, o);
|
|
236
|
+
}
|
|
237
|
+
function mi(e, n) {
|
|
238
|
+
if (!L(n))
|
|
239
|
+
throw new Error("Invalid input to safeExtend: expected a plain object");
|
|
240
|
+
const t = F(e._zod.def, {
|
|
241
|
+
get shape() {
|
|
242
|
+
const r = { ...e._zod.def.shape, ...n };
|
|
243
|
+
return J(this, "shape", r), r;
|
|
244
|
+
}
|
|
245
|
+
});
|
|
246
|
+
return C(e, t);
|
|
247
|
+
}
|
|
248
|
+
function hi(e, n) {
|
|
249
|
+
const t = F(e._zod.def, {
|
|
250
|
+
get shape() {
|
|
251
|
+
const r = { ...e._zod.def.shape, ...n._zod.def.shape };
|
|
252
|
+
return J(this, "shape", r), r;
|
|
253
|
+
},
|
|
254
|
+
get catchall() {
|
|
255
|
+
return n._zod.def.catchall;
|
|
256
|
+
},
|
|
257
|
+
checks: []
|
|
258
|
+
// delete existing checks
|
|
259
|
+
});
|
|
260
|
+
return C(e, t);
|
|
261
|
+
}
|
|
262
|
+
function _i(e, n, t) {
|
|
263
|
+
const o = n._zod.def.checks;
|
|
264
|
+
if (o && o.length > 0)
|
|
265
|
+
throw new Error(".partial() cannot be used on object schemas containing refinements");
|
|
266
|
+
const s = F(n._zod.def, {
|
|
267
|
+
get shape() {
|
|
268
|
+
const c = n._zod.def.shape, a = { ...c };
|
|
269
|
+
if (t)
|
|
270
|
+
for (const l in t) {
|
|
271
|
+
if (!(l in c))
|
|
272
|
+
throw new Error(`Unrecognized key: "${l}"`);
|
|
273
|
+
t[l] && (a[l] = e ? new e({
|
|
274
|
+
type: "optional",
|
|
275
|
+
innerType: c[l]
|
|
276
|
+
}) : c[l]);
|
|
277
|
+
}
|
|
278
|
+
else
|
|
279
|
+
for (const l in c)
|
|
280
|
+
a[l] = e ? new e({
|
|
281
|
+
type: "optional",
|
|
282
|
+
innerType: c[l]
|
|
283
|
+
}) : c[l];
|
|
284
|
+
return J(this, "shape", a), a;
|
|
285
|
+
},
|
|
286
|
+
checks: []
|
|
287
|
+
});
|
|
288
|
+
return C(n, s);
|
|
289
|
+
}
|
|
290
|
+
function gi(e, n, t) {
|
|
291
|
+
const r = F(n._zod.def, {
|
|
292
|
+
get shape() {
|
|
293
|
+
const o = n._zod.def.shape, i = { ...o };
|
|
294
|
+
if (t)
|
|
295
|
+
for (const s in t) {
|
|
296
|
+
if (!(s in i))
|
|
297
|
+
throw new Error(`Unrecognized key: "${s}"`);
|
|
298
|
+
t[s] && (i[s] = new e({
|
|
299
|
+
type: "nonoptional",
|
|
300
|
+
innerType: o[s]
|
|
301
|
+
}));
|
|
302
|
+
}
|
|
303
|
+
else
|
|
304
|
+
for (const s in o)
|
|
305
|
+
i[s] = new e({
|
|
306
|
+
type: "nonoptional",
|
|
307
|
+
innerType: o[s]
|
|
308
|
+
});
|
|
309
|
+
return J(this, "shape", i), i;
|
|
310
|
+
}
|
|
311
|
+
});
|
|
312
|
+
return C(n, r);
|
|
313
|
+
}
|
|
314
|
+
function U(e, n = 0) {
|
|
315
|
+
if (e.aborted === !0)
|
|
316
|
+
return !0;
|
|
317
|
+
for (let t = n; t < e.issues.length; t++)
|
|
318
|
+
if (e.issues[t]?.continue !== !0)
|
|
319
|
+
return !0;
|
|
320
|
+
return !1;
|
|
321
|
+
}
|
|
322
|
+
function A(e, n) {
|
|
323
|
+
return n.map((t) => {
|
|
324
|
+
var r;
|
|
325
|
+
return (r = t).path ?? (r.path = []), t.path.unshift(e), t;
|
|
326
|
+
});
|
|
327
|
+
}
|
|
328
|
+
function ie(e) {
|
|
329
|
+
return typeof e == "string" ? e : e?.message;
|
|
330
|
+
}
|
|
331
|
+
function P(e, n, t) {
|
|
332
|
+
const r = { ...e, path: e.path ?? [] };
|
|
333
|
+
if (!e.message) {
|
|
334
|
+
const o = ie(e.inst?._zod.def?.error?.(e)) ?? ie(n?.error?.(e)) ?? ie(t.customError?.(e)) ?? ie(t.localeError?.(e)) ?? "Invalid input";
|
|
335
|
+
r.message = o;
|
|
336
|
+
}
|
|
337
|
+
return delete r.inst, delete r.continue, n?.reportInput || delete r.input, r;
|
|
338
|
+
}
|
|
339
|
+
function Ve(e) {
|
|
340
|
+
return e instanceof Set ? "set" : e instanceof Map ? "map" : e instanceof File ? "file" : "unknown";
|
|
341
|
+
}
|
|
342
|
+
function Be(e) {
|
|
343
|
+
return Array.isArray(e) ? "array" : typeof e == "string" ? "string" : "unknown";
|
|
344
|
+
}
|
|
345
|
+
function q(...e) {
|
|
346
|
+
const [n, t, r] = e;
|
|
347
|
+
return typeof n == "string" ? {
|
|
348
|
+
message: n,
|
|
349
|
+
code: "custom",
|
|
350
|
+
input: t,
|
|
351
|
+
inst: r
|
|
352
|
+
} : { ...n };
|
|
353
|
+
}
|
|
354
|
+
const Qn = (e, n) => {
|
|
355
|
+
e.name = "$ZodError", Object.defineProperty(e, "_zod", {
|
|
356
|
+
value: e._zod,
|
|
357
|
+
enumerable: !1
|
|
358
|
+
}), Object.defineProperty(e, "issues", {
|
|
359
|
+
value: n,
|
|
360
|
+
enumerable: !1
|
|
361
|
+
}), e.message = JSON.stringify(n, xe, 2), Object.defineProperty(e, "toString", {
|
|
362
|
+
value: () => e.message,
|
|
363
|
+
enumerable: !1
|
|
364
|
+
});
|
|
365
|
+
}, et = u("$ZodError", Qn), ye = u("$ZodError", Qn, { Parent: Error });
|
|
366
|
+
function vi(e, n = (t) => t.message) {
|
|
367
|
+
const t = {}, r = [];
|
|
368
|
+
for (const o of e.issues)
|
|
369
|
+
o.path.length > 0 ? (t[o.path[0]] = t[o.path[0]] || [], t[o.path[0]].push(n(o))) : r.push(n(o));
|
|
370
|
+
return { formErrors: r, fieldErrors: t };
|
|
371
|
+
}
|
|
372
|
+
function zi(e, n = (t) => t.message) {
|
|
373
|
+
const t = { _errors: [] }, r = (o) => {
|
|
374
|
+
for (const i of o.issues)
|
|
375
|
+
if (i.code === "invalid_union" && i.errors.length)
|
|
376
|
+
i.errors.map((s) => r({ issues: s }));
|
|
377
|
+
else if (i.code === "invalid_key")
|
|
378
|
+
r({ issues: i.issues });
|
|
379
|
+
else if (i.code === "invalid_element")
|
|
380
|
+
r({ issues: i.issues });
|
|
381
|
+
else if (i.path.length === 0)
|
|
382
|
+
t._errors.push(n(i));
|
|
383
|
+
else {
|
|
384
|
+
let s = t, c = 0;
|
|
385
|
+
for (; c < i.path.length; ) {
|
|
386
|
+
const a = i.path[c];
|
|
387
|
+
c === i.path.length - 1 ? (s[a] = s[a] || { _errors: [] }, s[a]._errors.push(n(i))) : s[a] = s[a] || { _errors: [] }, s = s[a], c++;
|
|
388
|
+
}
|
|
389
|
+
}
|
|
390
|
+
};
|
|
391
|
+
return r(e), t;
|
|
392
|
+
}
|
|
393
|
+
const we = (e) => (n, t, r, o) => {
|
|
394
|
+
const i = r ? Object.assign(r, { async: !1 }) : { async: !1 }, s = n._zod.run({ value: t, issues: [] }, i);
|
|
395
|
+
if (s instanceof Promise)
|
|
396
|
+
throw new M();
|
|
397
|
+
if (s.issues.length) {
|
|
398
|
+
const c = new (o?.Err ?? e)(s.issues.map((a) => P(a, i, I())));
|
|
399
|
+
throw Xn(c, o?.callee), c;
|
|
400
|
+
}
|
|
401
|
+
return s.value;
|
|
402
|
+
}, Nn = /* @__PURE__ */ we(ye), $e = (e) => async (n, t, r, o) => {
|
|
403
|
+
const i = r ? Object.assign(r, { async: !0 }) : { async: !0 };
|
|
404
|
+
let s = n._zod.run({ value: t, issues: [] }, i);
|
|
405
|
+
if (s instanceof Promise && (s = await s), s.issues.length) {
|
|
406
|
+
const c = new (o?.Err ?? e)(s.issues.map((a) => P(a, i, I())));
|
|
407
|
+
throw Xn(c, o?.callee), c;
|
|
408
|
+
}
|
|
409
|
+
return s.value;
|
|
410
|
+
}, An = /* @__PURE__ */ $e(ye), ke = (e) => (n, t, r) => {
|
|
411
|
+
const o = r ? { ...r, async: !1 } : { async: !1 }, i = n._zod.run({ value: t, issues: [] }, o);
|
|
412
|
+
if (i instanceof Promise)
|
|
413
|
+
throw new M();
|
|
414
|
+
return i.issues.length ? {
|
|
415
|
+
success: !1,
|
|
416
|
+
error: new (e ?? et)(i.issues.map((s) => P(s, o, I())))
|
|
417
|
+
} : { success: !0, data: i.value };
|
|
418
|
+
}, bi = /* @__PURE__ */ ke(ye), Ze = (e) => async (n, t, r) => {
|
|
419
|
+
const o = r ? Object.assign(r, { async: !0 }) : { async: !0 };
|
|
420
|
+
let i = n._zod.run({ value: t, issues: [] }, o);
|
|
421
|
+
return i instanceof Promise && (i = await i), i.issues.length ? {
|
|
422
|
+
success: !1,
|
|
423
|
+
error: new e(i.issues.map((s) => P(s, o, I())))
|
|
424
|
+
} : { success: !0, data: i.value };
|
|
425
|
+
}, yi = /* @__PURE__ */ Ze(ye), wi = (e) => (n, t, r) => {
|
|
426
|
+
const o = r ? Object.assign(r, { direction: "backward" }) : { direction: "backward" };
|
|
427
|
+
return we(e)(n, t, o);
|
|
428
|
+
}, $i = (e) => (n, t, r) => we(e)(n, t, r), ki = (e) => async (n, t, r) => {
|
|
429
|
+
const o = r ? Object.assign(r, { direction: "backward" }) : { direction: "backward" };
|
|
430
|
+
return $e(e)(n, t, o);
|
|
431
|
+
}, Zi = (e) => async (n, t, r) => $e(e)(n, t, r), Si = (e) => (n, t, r) => {
|
|
432
|
+
const o = r ? Object.assign(r, { direction: "backward" }) : { direction: "backward" };
|
|
433
|
+
return ke(e)(n, t, o);
|
|
434
|
+
}, Oi = (e) => (n, t, r) => ke(e)(n, t, r), Ti = (e) => async (n, t, r) => {
|
|
435
|
+
const o = r ? Object.assign(r, { direction: "backward" }) : { direction: "backward" };
|
|
436
|
+
return Ze(e)(n, t, o);
|
|
437
|
+
}, Ii = (e) => async (n, t, r) => Ze(e)(n, t, r), nt = /^[cC][^\s-]{8,}$/, tt = /^[0-9a-z]+$/, rt = /^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/, ot = /^[0-9a-vA-V]{20}$/, it = /^[A-Za-z0-9]{27}$/, st = /^[a-zA-Z0-9_-]{21}$/, ct = /^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/, Pi = /^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/, ut = /^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/, V = (e) => e ? new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`) : /^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/, Ei = /* @__PURE__ */ V(4), Ni = /* @__PURE__ */ V(6), Ai = /* @__PURE__ */ V(7), at = /^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/, ji = /^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/, xi = /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/, lt = /^[^\s@"]{1,64}@[^\s@]{1,255}$/u, Ci = lt, Di = /^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/, Ri = "^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";
|
|
438
|
+
function ft() {
|
|
439
|
+
return new RegExp(Ri, "u");
|
|
440
|
+
}
|
|
441
|
+
const pt = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/, dt = /^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/, mt = (e) => {
|
|
442
|
+
const n = R(e ?? ":");
|
|
443
|
+
return new RegExp(`^(?:[0-9A-F]{2}${n}){5}[0-9A-F]{2}$|^(?:[0-9a-f]{2}${n}){5}[0-9a-f]{2}$`);
|
|
444
|
+
}, ht = /^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/, _t = /^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/, gt = /^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/, We = /^[A-Za-z0-9_-]*$/, vt = /^(?=.{1,253}\.?$)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[-0-9a-zA-Z]{0,61}[0-9a-zA-Z])?)*\.?$/, zt = /^([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$/, bt = /^\+[1-9]\d{6,14}$/, yt = "(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))", wt = /* @__PURE__ */ new RegExp(`^${yt}$`);
|
|
445
|
+
function $t(e) {
|
|
446
|
+
const n = "(?:[01]\\d|2[0-3]):[0-5]\\d";
|
|
447
|
+
return typeof e.precision == "number" ? e.precision === -1 ? `${n}` : e.precision === 0 ? `${n}:[0-5]\\d` : `${n}:[0-5]\\d\\.\\d{${e.precision}}` : `${n}(?::[0-5]\\d(?:\\.\\d+)?)?`;
|
|
448
|
+
}
|
|
449
|
+
function kt(e) {
|
|
450
|
+
return new RegExp(`^${$t(e)}$`);
|
|
451
|
+
}
|
|
452
|
+
function Zt(e) {
|
|
453
|
+
const n = $t({ precision: e.precision }), t = ["Z"];
|
|
454
|
+
e.local && t.push(""), e.offset && t.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");
|
|
455
|
+
const r = `${n}(?:${t.join("|")})`;
|
|
456
|
+
return new RegExp(`^${yt}T(?:${r})$`);
|
|
457
|
+
}
|
|
458
|
+
const St = (e) => {
|
|
459
|
+
const n = e ? `[\\s\\S]{${e?.minimum ?? 0},${e?.maximum ?? ""}}` : "[\\s\\S]*";
|
|
460
|
+
return new RegExp(`^${n}$`);
|
|
461
|
+
}, Ot = /^-?\d+n?$/, Tt = /^-?\d+$/, Ke = /^-?\d+(?:\.\d+)?$/, It = /^(?:true|false)$/i, Pt = /^null$/i, Et = /^undefined$/i, Nt = /^[^A-Z]*$/, At = /^[^a-z]*$/, jt = /^[0-9a-fA-F]*$/;
|
|
462
|
+
function ne(e, n) {
|
|
463
|
+
return new RegExp(`^[A-Za-z0-9+/]{${e}}${n}$`);
|
|
464
|
+
}
|
|
465
|
+
function te(e) {
|
|
466
|
+
return new RegExp(`^[A-Za-z0-9_-]{${e}}$`);
|
|
467
|
+
}
|
|
468
|
+
const Fi = /^[0-9a-fA-F]{32}$/, Ji = /* @__PURE__ */ ne(22, "=="), Ui = /* @__PURE__ */ te(22), Mi = /^[0-9a-fA-F]{40}$/, Li = /* @__PURE__ */ ne(27, "="), Vi = /* @__PURE__ */ te(27), Bi = /^[0-9a-fA-F]{64}$/, Wi = /* @__PURE__ */ ne(43, "="), Ki = /* @__PURE__ */ te(43), Gi = /^[0-9a-fA-F]{96}$/, Yi = /* @__PURE__ */ ne(64, ""), qi = /* @__PURE__ */ te(64), Xi = /^[0-9a-fA-F]{128}$/, Hi = /* @__PURE__ */ ne(86, "=="), Qi = /* @__PURE__ */ te(86), es = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
469
|
+
__proto__: null,
|
|
470
|
+
base64: gt,
|
|
471
|
+
base64url: We,
|
|
472
|
+
bigint: Ot,
|
|
473
|
+
boolean: It,
|
|
474
|
+
browserEmail: Di,
|
|
475
|
+
cidrv4: ht,
|
|
476
|
+
cidrv6: _t,
|
|
477
|
+
cuid: nt,
|
|
478
|
+
cuid2: tt,
|
|
479
|
+
date: wt,
|
|
480
|
+
datetime: Zt,
|
|
481
|
+
domain: zt,
|
|
482
|
+
duration: ct,
|
|
483
|
+
e164: bt,
|
|
484
|
+
email: at,
|
|
485
|
+
emoji: ft,
|
|
486
|
+
extendedDuration: Pi,
|
|
487
|
+
guid: ut,
|
|
488
|
+
hex: jt,
|
|
489
|
+
hostname: vt,
|
|
490
|
+
html5Email: ji,
|
|
491
|
+
idnEmail: Ci,
|
|
492
|
+
integer: Tt,
|
|
493
|
+
ipv4: pt,
|
|
494
|
+
ipv6: dt,
|
|
495
|
+
ksuid: it,
|
|
496
|
+
lowercase: Nt,
|
|
497
|
+
mac: mt,
|
|
498
|
+
md5_base64: Ji,
|
|
499
|
+
md5_base64url: Ui,
|
|
500
|
+
md5_hex: Fi,
|
|
501
|
+
nanoid: st,
|
|
502
|
+
null: Pt,
|
|
503
|
+
number: Ke,
|
|
504
|
+
rfc5322Email: xi,
|
|
505
|
+
sha1_base64: Li,
|
|
506
|
+
sha1_base64url: Vi,
|
|
507
|
+
sha1_hex: Mi,
|
|
508
|
+
sha256_base64: Wi,
|
|
509
|
+
sha256_base64url: Ki,
|
|
510
|
+
sha256_hex: Bi,
|
|
511
|
+
sha384_base64: Yi,
|
|
512
|
+
sha384_base64url: qi,
|
|
513
|
+
sha384_hex: Gi,
|
|
514
|
+
sha512_base64: Hi,
|
|
515
|
+
sha512_base64url: Qi,
|
|
516
|
+
sha512_hex: Xi,
|
|
517
|
+
string: St,
|
|
518
|
+
time: kt,
|
|
519
|
+
ulid: rt,
|
|
520
|
+
undefined: Et,
|
|
521
|
+
unicodeEmail: lt,
|
|
522
|
+
uppercase: At,
|
|
523
|
+
uuid: V,
|
|
524
|
+
uuid4: Ei,
|
|
525
|
+
uuid6: Ni,
|
|
526
|
+
uuid7: Ai,
|
|
527
|
+
xid: ot
|
|
528
|
+
}, Symbol.toStringTag, { value: "Module" })), w = /* @__PURE__ */ u("$ZodCheck", (e, n) => {
|
|
529
|
+
var t;
|
|
530
|
+
e._zod ?? (e._zod = {}), e._zod.def = n, (t = e._zod).onattach ?? (t.onattach = []);
|
|
531
|
+
}), xt = {
|
|
532
|
+
number: "number",
|
|
533
|
+
bigint: "bigint",
|
|
534
|
+
object: "date"
|
|
535
|
+
}, Ct = /* @__PURE__ */ u("$ZodCheckLessThan", (e, n) => {
|
|
536
|
+
w.init(e, n);
|
|
537
|
+
const t = xt[typeof n.value];
|
|
538
|
+
e._zod.onattach.push((r) => {
|
|
539
|
+
const o = r._zod.bag, i = (n.inclusive ? o.maximum : o.exclusiveMaximum) ?? Number.POSITIVE_INFINITY;
|
|
540
|
+
n.value < i && (n.inclusive ? o.maximum = n.value : o.exclusiveMaximum = n.value);
|
|
541
|
+
}), e._zod.check = (r) => {
|
|
542
|
+
(n.inclusive ? r.value <= n.value : r.value < n.value) || r.issues.push({
|
|
543
|
+
origin: t,
|
|
544
|
+
code: "too_big",
|
|
545
|
+
maximum: typeof n.value == "object" ? n.value.getTime() : n.value,
|
|
546
|
+
input: r.value,
|
|
547
|
+
inclusive: n.inclusive,
|
|
548
|
+
inst: e,
|
|
549
|
+
continue: !n.abort
|
|
550
|
+
});
|
|
551
|
+
};
|
|
552
|
+
}), Dt = /* @__PURE__ */ u("$ZodCheckGreaterThan", (e, n) => {
|
|
553
|
+
w.init(e, n);
|
|
554
|
+
const t = xt[typeof n.value];
|
|
555
|
+
e._zod.onattach.push((r) => {
|
|
556
|
+
const o = r._zod.bag, i = (n.inclusive ? o.minimum : o.exclusiveMinimum) ?? Number.NEGATIVE_INFINITY;
|
|
557
|
+
n.value > i && (n.inclusive ? o.minimum = n.value : o.exclusiveMinimum = n.value);
|
|
558
|
+
}), e._zod.check = (r) => {
|
|
559
|
+
(n.inclusive ? r.value >= n.value : r.value > n.value) || r.issues.push({
|
|
560
|
+
origin: t,
|
|
561
|
+
code: "too_small",
|
|
562
|
+
minimum: typeof n.value == "object" ? n.value.getTime() : n.value,
|
|
563
|
+
input: r.value,
|
|
564
|
+
inclusive: n.inclusive,
|
|
565
|
+
inst: e,
|
|
566
|
+
continue: !n.abort
|
|
567
|
+
});
|
|
568
|
+
};
|
|
569
|
+
}), ns = /* @__PURE__ */ u("$ZodCheckMultipleOf", (e, n) => {
|
|
570
|
+
w.init(e, n), e._zod.onattach.push((t) => {
|
|
571
|
+
var r;
|
|
572
|
+
(r = t._zod.bag).multipleOf ?? (r.multipleOf = n.value);
|
|
573
|
+
}), e._zod.check = (t) => {
|
|
574
|
+
if (typeof t.value != typeof n.value)
|
|
575
|
+
throw new Error("Cannot mix number and bigint in multiple_of check.");
|
|
576
|
+
(typeof t.value == "bigint" ? t.value % n.value === BigInt(0) : oi(t.value, n.value) === 0) || t.issues.push({
|
|
577
|
+
origin: typeof t.value,
|
|
578
|
+
code: "not_multiple_of",
|
|
579
|
+
divisor: n.value,
|
|
580
|
+
input: t.value,
|
|
581
|
+
inst: e,
|
|
582
|
+
continue: !n.abort
|
|
583
|
+
});
|
|
584
|
+
};
|
|
585
|
+
}), ts = /* @__PURE__ */ u("$ZodCheckNumberFormat", (e, n) => {
|
|
586
|
+
w.init(e, n), n.format = n.format || "float64";
|
|
587
|
+
const t = n.format?.includes("int"), r = t ? "int" : "number", [o, i] = ai[n.format];
|
|
588
|
+
e._zod.onattach.push((s) => {
|
|
589
|
+
const c = s._zod.bag;
|
|
590
|
+
c.format = n.format, c.minimum = o, c.maximum = i, t && (c.pattern = Tt);
|
|
591
|
+
}), e._zod.check = (s) => {
|
|
592
|
+
const c = s.value;
|
|
593
|
+
if (t) {
|
|
594
|
+
if (!Number.isInteger(c)) {
|
|
595
|
+
s.issues.push({
|
|
596
|
+
expected: r,
|
|
597
|
+
format: n.format,
|
|
598
|
+
code: "invalid_type",
|
|
599
|
+
continue: !1,
|
|
600
|
+
input: c,
|
|
601
|
+
inst: e
|
|
602
|
+
});
|
|
603
|
+
return;
|
|
604
|
+
}
|
|
605
|
+
if (!Number.isSafeInteger(c)) {
|
|
606
|
+
c > 0 ? s.issues.push({
|
|
607
|
+
input: c,
|
|
608
|
+
code: "too_big",
|
|
609
|
+
maximum: Number.MAX_SAFE_INTEGER,
|
|
610
|
+
note: "Integers must be within the safe integer range.",
|
|
611
|
+
inst: e,
|
|
612
|
+
origin: r,
|
|
613
|
+
inclusive: !0,
|
|
614
|
+
continue: !n.abort
|
|
615
|
+
}) : s.issues.push({
|
|
616
|
+
input: c,
|
|
617
|
+
code: "too_small",
|
|
618
|
+
minimum: Number.MIN_SAFE_INTEGER,
|
|
619
|
+
note: "Integers must be within the safe integer range.",
|
|
620
|
+
inst: e,
|
|
621
|
+
origin: r,
|
|
622
|
+
inclusive: !0,
|
|
623
|
+
continue: !n.abort
|
|
624
|
+
});
|
|
625
|
+
return;
|
|
626
|
+
}
|
|
627
|
+
}
|
|
628
|
+
c < o && s.issues.push({
|
|
629
|
+
origin: "number",
|
|
630
|
+
input: c,
|
|
631
|
+
code: "too_small",
|
|
632
|
+
minimum: o,
|
|
633
|
+
inclusive: !0,
|
|
634
|
+
inst: e,
|
|
635
|
+
continue: !n.abort
|
|
636
|
+
}), c > i && s.issues.push({
|
|
637
|
+
origin: "number",
|
|
638
|
+
input: c,
|
|
639
|
+
code: "too_big",
|
|
640
|
+
maximum: i,
|
|
641
|
+
inclusive: !0,
|
|
642
|
+
inst: e,
|
|
643
|
+
continue: !n.abort
|
|
644
|
+
});
|
|
645
|
+
};
|
|
646
|
+
}), rs = /* @__PURE__ */ u("$ZodCheckBigIntFormat", (e, n) => {
|
|
647
|
+
w.init(e, n);
|
|
648
|
+
const [t, r] = li[n.format];
|
|
649
|
+
e._zod.onattach.push((o) => {
|
|
650
|
+
const i = o._zod.bag;
|
|
651
|
+
i.format = n.format, i.minimum = t, i.maximum = r;
|
|
652
|
+
}), e._zod.check = (o) => {
|
|
653
|
+
const i = o.value;
|
|
654
|
+
i < t && o.issues.push({
|
|
655
|
+
origin: "bigint",
|
|
656
|
+
input: i,
|
|
657
|
+
code: "too_small",
|
|
658
|
+
minimum: t,
|
|
659
|
+
inclusive: !0,
|
|
660
|
+
inst: e,
|
|
661
|
+
continue: !n.abort
|
|
662
|
+
}), i > r && o.issues.push({
|
|
663
|
+
origin: "bigint",
|
|
664
|
+
input: i,
|
|
665
|
+
code: "too_big",
|
|
666
|
+
maximum: r,
|
|
667
|
+
inclusive: !0,
|
|
668
|
+
inst: e,
|
|
669
|
+
continue: !n.abort
|
|
670
|
+
});
|
|
671
|
+
};
|
|
672
|
+
}), os = /* @__PURE__ */ u("$ZodCheckMaxSize", (e, n) => {
|
|
673
|
+
var t;
|
|
674
|
+
w.init(e, n), (t = e._zod.def).when ?? (t.when = (r) => {
|
|
675
|
+
const o = r.value;
|
|
676
|
+
return !W(o) && o.size !== void 0;
|
|
677
|
+
}), e._zod.onattach.push((r) => {
|
|
678
|
+
const o = r._zod.bag.maximum ?? Number.POSITIVE_INFINITY;
|
|
679
|
+
n.maximum < o && (r._zod.bag.maximum = n.maximum);
|
|
680
|
+
}), e._zod.check = (r) => {
|
|
681
|
+
const o = r.value;
|
|
682
|
+
o.size <= n.maximum || r.issues.push({
|
|
683
|
+
origin: Ve(o),
|
|
684
|
+
code: "too_big",
|
|
685
|
+
maximum: n.maximum,
|
|
686
|
+
inclusive: !0,
|
|
687
|
+
input: o,
|
|
688
|
+
inst: e,
|
|
689
|
+
continue: !n.abort
|
|
690
|
+
});
|
|
691
|
+
};
|
|
692
|
+
}), is = /* @__PURE__ */ u("$ZodCheckMinSize", (e, n) => {
|
|
693
|
+
var t;
|
|
694
|
+
w.init(e, n), (t = e._zod.def).when ?? (t.when = (r) => {
|
|
695
|
+
const o = r.value;
|
|
696
|
+
return !W(o) && o.size !== void 0;
|
|
697
|
+
}), e._zod.onattach.push((r) => {
|
|
698
|
+
const o = r._zod.bag.minimum ?? Number.NEGATIVE_INFINITY;
|
|
699
|
+
n.minimum > o && (r._zod.bag.minimum = n.minimum);
|
|
700
|
+
}), e._zod.check = (r) => {
|
|
701
|
+
const o = r.value;
|
|
702
|
+
o.size >= n.minimum || r.issues.push({
|
|
703
|
+
origin: Ve(o),
|
|
704
|
+
code: "too_small",
|
|
705
|
+
minimum: n.minimum,
|
|
706
|
+
inclusive: !0,
|
|
707
|
+
input: o,
|
|
708
|
+
inst: e,
|
|
709
|
+
continue: !n.abort
|
|
710
|
+
});
|
|
711
|
+
};
|
|
712
|
+
}), ss = /* @__PURE__ */ u("$ZodCheckSizeEquals", (e, n) => {
|
|
713
|
+
var t;
|
|
714
|
+
w.init(e, n), (t = e._zod.def).when ?? (t.when = (r) => {
|
|
715
|
+
const o = r.value;
|
|
716
|
+
return !W(o) && o.size !== void 0;
|
|
717
|
+
}), e._zod.onattach.push((r) => {
|
|
718
|
+
const o = r._zod.bag;
|
|
719
|
+
o.minimum = n.size, o.maximum = n.size, o.size = n.size;
|
|
720
|
+
}), e._zod.check = (r) => {
|
|
721
|
+
const o = r.value, i = o.size;
|
|
722
|
+
if (i === n.size)
|
|
723
|
+
return;
|
|
724
|
+
const s = i > n.size;
|
|
725
|
+
r.issues.push({
|
|
726
|
+
origin: Ve(o),
|
|
727
|
+
...s ? { code: "too_big", maximum: n.size } : { code: "too_small", minimum: n.size },
|
|
728
|
+
inclusive: !0,
|
|
729
|
+
exact: !0,
|
|
730
|
+
input: r.value,
|
|
731
|
+
inst: e,
|
|
732
|
+
continue: !n.abort
|
|
733
|
+
});
|
|
734
|
+
};
|
|
735
|
+
}), cs = /* @__PURE__ */ u("$ZodCheckMaxLength", (e, n) => {
|
|
736
|
+
var t;
|
|
737
|
+
w.init(e, n), (t = e._zod.def).when ?? (t.when = (r) => {
|
|
738
|
+
const o = r.value;
|
|
739
|
+
return !W(o) && o.length !== void 0;
|
|
740
|
+
}), e._zod.onattach.push((r) => {
|
|
741
|
+
const o = r._zod.bag.maximum ?? Number.POSITIVE_INFINITY;
|
|
742
|
+
n.maximum < o && (r._zod.bag.maximum = n.maximum);
|
|
743
|
+
}), e._zod.check = (r) => {
|
|
744
|
+
const o = r.value;
|
|
745
|
+
if (o.length <= n.maximum)
|
|
746
|
+
return;
|
|
747
|
+
const s = Be(o);
|
|
748
|
+
r.issues.push({
|
|
749
|
+
origin: s,
|
|
750
|
+
code: "too_big",
|
|
751
|
+
maximum: n.maximum,
|
|
752
|
+
inclusive: !0,
|
|
753
|
+
input: o,
|
|
754
|
+
inst: e,
|
|
755
|
+
continue: !n.abort
|
|
756
|
+
});
|
|
757
|
+
};
|
|
758
|
+
}), us = /* @__PURE__ */ u("$ZodCheckMinLength", (e, n) => {
|
|
759
|
+
var t;
|
|
760
|
+
w.init(e, n), (t = e._zod.def).when ?? (t.when = (r) => {
|
|
761
|
+
const o = r.value;
|
|
762
|
+
return !W(o) && o.length !== void 0;
|
|
763
|
+
}), e._zod.onattach.push((r) => {
|
|
764
|
+
const o = r._zod.bag.minimum ?? Number.NEGATIVE_INFINITY;
|
|
765
|
+
n.minimum > o && (r._zod.bag.minimum = n.minimum);
|
|
766
|
+
}), e._zod.check = (r) => {
|
|
767
|
+
const o = r.value;
|
|
768
|
+
if (o.length >= n.minimum)
|
|
769
|
+
return;
|
|
770
|
+
const s = Be(o);
|
|
771
|
+
r.issues.push({
|
|
772
|
+
origin: s,
|
|
773
|
+
code: "too_small",
|
|
774
|
+
minimum: n.minimum,
|
|
775
|
+
inclusive: !0,
|
|
776
|
+
input: o,
|
|
777
|
+
inst: e,
|
|
778
|
+
continue: !n.abort
|
|
779
|
+
});
|
|
780
|
+
};
|
|
781
|
+
}), as = /* @__PURE__ */ u("$ZodCheckLengthEquals", (e, n) => {
|
|
782
|
+
var t;
|
|
783
|
+
w.init(e, n), (t = e._zod.def).when ?? (t.when = (r) => {
|
|
784
|
+
const o = r.value;
|
|
785
|
+
return !W(o) && o.length !== void 0;
|
|
786
|
+
}), e._zod.onattach.push((r) => {
|
|
787
|
+
const o = r._zod.bag;
|
|
788
|
+
o.minimum = n.length, o.maximum = n.length, o.length = n.length;
|
|
789
|
+
}), e._zod.check = (r) => {
|
|
790
|
+
const o = r.value, i = o.length;
|
|
791
|
+
if (i === n.length)
|
|
792
|
+
return;
|
|
793
|
+
const s = Be(o), c = i > n.length;
|
|
794
|
+
r.issues.push({
|
|
795
|
+
origin: s,
|
|
796
|
+
...c ? { code: "too_big", maximum: n.length } : { code: "too_small", minimum: n.length },
|
|
797
|
+
inclusive: !0,
|
|
798
|
+
exact: !0,
|
|
799
|
+
input: r.value,
|
|
800
|
+
inst: e,
|
|
801
|
+
continue: !n.abort
|
|
802
|
+
});
|
|
803
|
+
};
|
|
804
|
+
}), Se = /* @__PURE__ */ u("$ZodCheckStringFormat", (e, n) => {
|
|
805
|
+
var t, r;
|
|
806
|
+
w.init(e, n), e._zod.onattach.push((o) => {
|
|
807
|
+
const i = o._zod.bag;
|
|
808
|
+
i.format = n.format, n.pattern && (i.patterns ?? (i.patterns = /* @__PURE__ */ new Set()), i.patterns.add(n.pattern));
|
|
809
|
+
}), n.pattern ? (t = e._zod).check ?? (t.check = (o) => {
|
|
810
|
+
n.pattern.lastIndex = 0, !n.pattern.test(o.value) && o.issues.push({
|
|
811
|
+
origin: "string",
|
|
812
|
+
code: "invalid_format",
|
|
813
|
+
format: n.format,
|
|
814
|
+
input: o.value,
|
|
815
|
+
...n.pattern ? { pattern: n.pattern.toString() } : {},
|
|
816
|
+
inst: e,
|
|
817
|
+
continue: !n.abort
|
|
818
|
+
});
|
|
819
|
+
}) : (r = e._zod).check ?? (r.check = () => {
|
|
820
|
+
});
|
|
821
|
+
}), ls = /* @__PURE__ */ u("$ZodCheckRegex", (e, n) => {
|
|
822
|
+
Se.init(e, n), e._zod.check = (t) => {
|
|
823
|
+
n.pattern.lastIndex = 0, !n.pattern.test(t.value) && t.issues.push({
|
|
824
|
+
origin: "string",
|
|
825
|
+
code: "invalid_format",
|
|
826
|
+
format: "regex",
|
|
827
|
+
input: t.value,
|
|
828
|
+
pattern: n.pattern.toString(),
|
|
829
|
+
inst: e,
|
|
830
|
+
continue: !n.abort
|
|
831
|
+
});
|
|
832
|
+
};
|
|
833
|
+
}), fs = /* @__PURE__ */ u("$ZodCheckLowerCase", (e, n) => {
|
|
834
|
+
n.pattern ?? (n.pattern = Nt), Se.init(e, n);
|
|
835
|
+
}), ps = /* @__PURE__ */ u("$ZodCheckUpperCase", (e, n) => {
|
|
836
|
+
n.pattern ?? (n.pattern = At), Se.init(e, n);
|
|
837
|
+
}), ds = /* @__PURE__ */ u("$ZodCheckIncludes", (e, n) => {
|
|
838
|
+
w.init(e, n);
|
|
839
|
+
const t = R(n.includes), r = new RegExp(typeof n.position == "number" ? `^.{${n.position}}${t}` : t);
|
|
840
|
+
n.pattern = r, e._zod.onattach.push((o) => {
|
|
841
|
+
const i = o._zod.bag;
|
|
842
|
+
i.patterns ?? (i.patterns = /* @__PURE__ */ new Set()), i.patterns.add(r);
|
|
843
|
+
}), e._zod.check = (o) => {
|
|
844
|
+
o.value.includes(n.includes, n.position) || o.issues.push({
|
|
845
|
+
origin: "string",
|
|
846
|
+
code: "invalid_format",
|
|
847
|
+
format: "includes",
|
|
848
|
+
includes: n.includes,
|
|
849
|
+
input: o.value,
|
|
850
|
+
inst: e,
|
|
851
|
+
continue: !n.abort
|
|
852
|
+
});
|
|
853
|
+
};
|
|
854
|
+
}), ms = /* @__PURE__ */ u("$ZodCheckStartsWith", (e, n) => {
|
|
855
|
+
w.init(e, n);
|
|
856
|
+
const t = new RegExp(`^${R(n.prefix)}.*`);
|
|
857
|
+
n.pattern ?? (n.pattern = t), e._zod.onattach.push((r) => {
|
|
858
|
+
const o = r._zod.bag;
|
|
859
|
+
o.patterns ?? (o.patterns = /* @__PURE__ */ new Set()), o.patterns.add(t);
|
|
860
|
+
}), e._zod.check = (r) => {
|
|
861
|
+
r.value.startsWith(n.prefix) || r.issues.push({
|
|
862
|
+
origin: "string",
|
|
863
|
+
code: "invalid_format",
|
|
864
|
+
format: "starts_with",
|
|
865
|
+
prefix: n.prefix,
|
|
866
|
+
input: r.value,
|
|
867
|
+
inst: e,
|
|
868
|
+
continue: !n.abort
|
|
869
|
+
});
|
|
870
|
+
};
|
|
871
|
+
}), hs = /* @__PURE__ */ u("$ZodCheckEndsWith", (e, n) => {
|
|
872
|
+
w.init(e, n);
|
|
873
|
+
const t = new RegExp(`.*${R(n.suffix)}$`);
|
|
874
|
+
n.pattern ?? (n.pattern = t), e._zod.onattach.push((r) => {
|
|
875
|
+
const o = r._zod.bag;
|
|
876
|
+
o.patterns ?? (o.patterns = /* @__PURE__ */ new Set()), o.patterns.add(t);
|
|
877
|
+
}), e._zod.check = (r) => {
|
|
878
|
+
r.value.endsWith(n.suffix) || r.issues.push({
|
|
879
|
+
origin: "string",
|
|
880
|
+
code: "invalid_format",
|
|
881
|
+
format: "ends_with",
|
|
882
|
+
suffix: n.suffix,
|
|
883
|
+
input: r.value,
|
|
884
|
+
inst: e,
|
|
885
|
+
continue: !n.abort
|
|
886
|
+
});
|
|
887
|
+
};
|
|
888
|
+
});
|
|
889
|
+
function jn(e, n, t) {
|
|
890
|
+
e.issues.length && n.issues.push(...A(t, e.issues));
|
|
891
|
+
}
|
|
892
|
+
const _s = /* @__PURE__ */ u("$ZodCheckProperty", (e, n) => {
|
|
893
|
+
w.init(e, n), e._zod.check = (t) => {
|
|
894
|
+
const r = n.schema._zod.run({
|
|
895
|
+
value: t.value[n.property],
|
|
896
|
+
issues: []
|
|
897
|
+
}, {});
|
|
898
|
+
if (r instanceof Promise)
|
|
899
|
+
return r.then((o) => jn(o, t, n.property));
|
|
900
|
+
jn(r, t, n.property);
|
|
901
|
+
};
|
|
902
|
+
}), gs = /* @__PURE__ */ u("$ZodCheckMimeType", (e, n) => {
|
|
903
|
+
w.init(e, n);
|
|
904
|
+
const t = new Set(n.mime);
|
|
905
|
+
e._zod.onattach.push((r) => {
|
|
906
|
+
r._zod.bag.mime = n.mime;
|
|
907
|
+
}), e._zod.check = (r) => {
|
|
908
|
+
t.has(r.value.type) || r.issues.push({
|
|
909
|
+
code: "invalid_value",
|
|
910
|
+
values: n.mime,
|
|
911
|
+
input: r.value.type,
|
|
912
|
+
inst: e,
|
|
913
|
+
continue: !n.abort
|
|
914
|
+
});
|
|
915
|
+
};
|
|
916
|
+
}), vs = /* @__PURE__ */ u("$ZodCheckOverwrite", (e, n) => {
|
|
917
|
+
w.init(e, n), e._zod.check = (t) => {
|
|
918
|
+
t.value = n.tx(t.value);
|
|
919
|
+
};
|
|
920
|
+
});
|
|
921
|
+
class zs {
|
|
922
|
+
constructor(n = []) {
|
|
923
|
+
this.content = [], this.indent = 0, this && (this.args = n);
|
|
924
|
+
}
|
|
925
|
+
indented(n) {
|
|
926
|
+
this.indent += 1, n(this), this.indent -= 1;
|
|
927
|
+
}
|
|
928
|
+
write(n) {
|
|
929
|
+
if (typeof n == "function") {
|
|
930
|
+
n(this, { execution: "sync" }), n(this, { execution: "async" });
|
|
931
|
+
return;
|
|
932
|
+
}
|
|
933
|
+
const r = n.split(`
|
|
934
|
+
`).filter((s) => s), o = Math.min(...r.map((s) => s.length - s.trimStart().length)), i = r.map((s) => s.slice(o)).map((s) => " ".repeat(this.indent * 2) + s);
|
|
935
|
+
for (const s of i)
|
|
936
|
+
this.content.push(s);
|
|
937
|
+
}
|
|
938
|
+
compile() {
|
|
939
|
+
const n = Function, t = this?.args, o = [...(this?.content ?? [""]).map((i) => ` ${i}`)];
|
|
940
|
+
return new n(...t, o.join(`
|
|
941
|
+
`));
|
|
942
|
+
}
|
|
943
|
+
}
|
|
944
|
+
const bs = {
|
|
945
|
+
major: 4,
|
|
946
|
+
minor: 3,
|
|
947
|
+
patch: 6
|
|
948
|
+
}, _ = /* @__PURE__ */ u("$ZodType", (e, n) => {
|
|
949
|
+
var t;
|
|
950
|
+
e ?? (e = {}), e._zod.def = n, e._zod.bag = e._zod.bag || {}, e._zod.version = bs;
|
|
951
|
+
const r = [...e._zod.def.checks ?? []];
|
|
952
|
+
e._zod.traits.has("$ZodCheck") && r.unshift(e);
|
|
953
|
+
for (const o of r)
|
|
954
|
+
for (const i of o._zod.onattach)
|
|
955
|
+
i(e);
|
|
956
|
+
if (r.length === 0)
|
|
957
|
+
(t = e._zod).deferred ?? (t.deferred = []), e._zod.deferred?.push(() => {
|
|
958
|
+
e._zod.run = e._zod.parse;
|
|
959
|
+
});
|
|
960
|
+
else {
|
|
961
|
+
const o = (s, c, a) => {
|
|
962
|
+
let l = U(s), f;
|
|
963
|
+
for (const d of c) {
|
|
964
|
+
if (d._zod.def.when) {
|
|
965
|
+
if (!d._zod.def.when(s))
|
|
966
|
+
continue;
|
|
967
|
+
} else if (l)
|
|
968
|
+
continue;
|
|
969
|
+
const h = s.issues.length, m = d._zod.check(s);
|
|
970
|
+
if (m instanceof Promise && a?.async === !1)
|
|
971
|
+
throw new M();
|
|
972
|
+
if (f || m instanceof Promise)
|
|
973
|
+
f = (f ?? Promise.resolve()).then(async () => {
|
|
974
|
+
await m, s.issues.length !== h && (l || (l = U(s, h)));
|
|
975
|
+
});
|
|
976
|
+
else {
|
|
977
|
+
if (s.issues.length === h)
|
|
978
|
+
continue;
|
|
979
|
+
l || (l = U(s, h));
|
|
980
|
+
}
|
|
981
|
+
}
|
|
982
|
+
return f ? f.then(() => s) : s;
|
|
983
|
+
}, i = (s, c, a) => {
|
|
984
|
+
if (U(s))
|
|
985
|
+
return s.aborted = !0, s;
|
|
986
|
+
const l = o(c, r, a);
|
|
987
|
+
if (l instanceof Promise) {
|
|
988
|
+
if (a.async === !1)
|
|
989
|
+
throw new M();
|
|
990
|
+
return l.then((f) => e._zod.parse(f, a));
|
|
991
|
+
}
|
|
992
|
+
return e._zod.parse(l, a);
|
|
993
|
+
};
|
|
994
|
+
e._zod.run = (s, c) => {
|
|
995
|
+
if (c.skipChecks)
|
|
996
|
+
return e._zod.parse(s, c);
|
|
997
|
+
if (c.direction === "backward") {
|
|
998
|
+
const l = e._zod.parse({ value: s.value, issues: [] }, { ...c, skipChecks: !0 });
|
|
999
|
+
return l instanceof Promise ? l.then((f) => i(f, s, c)) : i(l, s, c);
|
|
1000
|
+
}
|
|
1001
|
+
const a = e._zod.parse(s, c);
|
|
1002
|
+
if (a instanceof Promise) {
|
|
1003
|
+
if (c.async === !1)
|
|
1004
|
+
throw new M();
|
|
1005
|
+
return a.then((l) => o(l, r, c));
|
|
1006
|
+
}
|
|
1007
|
+
return o(a, r, c);
|
|
1008
|
+
};
|
|
1009
|
+
}
|
|
1010
|
+
v(e, "~standard", () => ({
|
|
1011
|
+
validate: (o) => {
|
|
1012
|
+
try {
|
|
1013
|
+
const i = bi(e, o);
|
|
1014
|
+
return i.success ? { value: i.data } : { issues: i.error?.issues };
|
|
1015
|
+
} catch {
|
|
1016
|
+
return yi(e, o).then((s) => s.success ? { value: s.data } : { issues: s.error?.issues });
|
|
1017
|
+
}
|
|
1018
|
+
},
|
|
1019
|
+
vendor: "zod",
|
|
1020
|
+
version: 1
|
|
1021
|
+
}));
|
|
1022
|
+
}), Oe = /* @__PURE__ */ u("$ZodString", (e, n) => {
|
|
1023
|
+
_.init(e, n), e._zod.pattern = [...e?._zod.bag?.patterns ?? []].pop() ?? St(e._zod.bag), e._zod.parse = (t, r) => {
|
|
1024
|
+
if (n.coerce)
|
|
1025
|
+
try {
|
|
1026
|
+
t.value = String(t.value);
|
|
1027
|
+
} catch {
|
|
1028
|
+
}
|
|
1029
|
+
return typeof t.value == "string" || t.issues.push({
|
|
1030
|
+
expected: "string",
|
|
1031
|
+
code: "invalid_type",
|
|
1032
|
+
input: t.value,
|
|
1033
|
+
inst: e
|
|
1034
|
+
}), t;
|
|
1035
|
+
};
|
|
1036
|
+
}), b = /* @__PURE__ */ u("$ZodStringFormat", (e, n) => {
|
|
1037
|
+
Se.init(e, n), Oe.init(e, n);
|
|
1038
|
+
}), ys = /* @__PURE__ */ u("$ZodGUID", (e, n) => {
|
|
1039
|
+
n.pattern ?? (n.pattern = ut), b.init(e, n);
|
|
1040
|
+
}), ws = /* @__PURE__ */ u("$ZodUUID", (e, n) => {
|
|
1041
|
+
if (n.version) {
|
|
1042
|
+
const r = {
|
|
1043
|
+
v1: 1,
|
|
1044
|
+
v2: 2,
|
|
1045
|
+
v3: 3,
|
|
1046
|
+
v4: 4,
|
|
1047
|
+
v5: 5,
|
|
1048
|
+
v6: 6,
|
|
1049
|
+
v7: 7,
|
|
1050
|
+
v8: 8
|
|
1051
|
+
}[n.version];
|
|
1052
|
+
if (r === void 0)
|
|
1053
|
+
throw new Error(`Invalid UUID version: "${n.version}"`);
|
|
1054
|
+
n.pattern ?? (n.pattern = V(r));
|
|
1055
|
+
} else
|
|
1056
|
+
n.pattern ?? (n.pattern = V());
|
|
1057
|
+
b.init(e, n);
|
|
1058
|
+
}), $s = /* @__PURE__ */ u("$ZodEmail", (e, n) => {
|
|
1059
|
+
n.pattern ?? (n.pattern = at), b.init(e, n);
|
|
1060
|
+
}), ks = /* @__PURE__ */ u("$ZodURL", (e, n) => {
|
|
1061
|
+
b.init(e, n), e._zod.check = (t) => {
|
|
1062
|
+
try {
|
|
1063
|
+
const r = t.value.trim(), o = new URL(r);
|
|
1064
|
+
n.hostname && (n.hostname.lastIndex = 0, n.hostname.test(o.hostname) || t.issues.push({
|
|
1065
|
+
code: "invalid_format",
|
|
1066
|
+
format: "url",
|
|
1067
|
+
note: "Invalid hostname",
|
|
1068
|
+
pattern: n.hostname.source,
|
|
1069
|
+
input: t.value,
|
|
1070
|
+
inst: e,
|
|
1071
|
+
continue: !n.abort
|
|
1072
|
+
})), n.protocol && (n.protocol.lastIndex = 0, n.protocol.test(o.protocol.endsWith(":") ? o.protocol.slice(0, -1) : o.protocol) || t.issues.push({
|
|
1073
|
+
code: "invalid_format",
|
|
1074
|
+
format: "url",
|
|
1075
|
+
note: "Invalid protocol",
|
|
1076
|
+
pattern: n.protocol.source,
|
|
1077
|
+
input: t.value,
|
|
1078
|
+
inst: e,
|
|
1079
|
+
continue: !n.abort
|
|
1080
|
+
})), n.normalize ? t.value = o.href : t.value = r;
|
|
1081
|
+
return;
|
|
1082
|
+
} catch {
|
|
1083
|
+
t.issues.push({
|
|
1084
|
+
code: "invalid_format",
|
|
1085
|
+
format: "url",
|
|
1086
|
+
input: t.value,
|
|
1087
|
+
inst: e,
|
|
1088
|
+
continue: !n.abort
|
|
1089
|
+
});
|
|
1090
|
+
}
|
|
1091
|
+
};
|
|
1092
|
+
}), Zs = /* @__PURE__ */ u("$ZodEmoji", (e, n) => {
|
|
1093
|
+
n.pattern ?? (n.pattern = ft()), b.init(e, n);
|
|
1094
|
+
}), Ss = /* @__PURE__ */ u("$ZodNanoID", (e, n) => {
|
|
1095
|
+
n.pattern ?? (n.pattern = st), b.init(e, n);
|
|
1096
|
+
}), Os = /* @__PURE__ */ u("$ZodCUID", (e, n) => {
|
|
1097
|
+
n.pattern ?? (n.pattern = nt), b.init(e, n);
|
|
1098
|
+
}), Ts = /* @__PURE__ */ u("$ZodCUID2", (e, n) => {
|
|
1099
|
+
n.pattern ?? (n.pattern = tt), b.init(e, n);
|
|
1100
|
+
}), Is = /* @__PURE__ */ u("$ZodULID", (e, n) => {
|
|
1101
|
+
n.pattern ?? (n.pattern = rt), b.init(e, n);
|
|
1102
|
+
}), Ps = /* @__PURE__ */ u("$ZodXID", (e, n) => {
|
|
1103
|
+
n.pattern ?? (n.pattern = ot), b.init(e, n);
|
|
1104
|
+
}), Es = /* @__PURE__ */ u("$ZodKSUID", (e, n) => {
|
|
1105
|
+
n.pattern ?? (n.pattern = it), b.init(e, n);
|
|
1106
|
+
}), Ns = /* @__PURE__ */ u("$ZodISODateTime", (e, n) => {
|
|
1107
|
+
n.pattern ?? (n.pattern = Zt(n)), b.init(e, n);
|
|
1108
|
+
}), As = /* @__PURE__ */ u("$ZodISODate", (e, n) => {
|
|
1109
|
+
n.pattern ?? (n.pattern = wt), b.init(e, n);
|
|
1110
|
+
}), js = /* @__PURE__ */ u("$ZodISOTime", (e, n) => {
|
|
1111
|
+
n.pattern ?? (n.pattern = kt(n)), b.init(e, n);
|
|
1112
|
+
}), xs = /* @__PURE__ */ u("$ZodISODuration", (e, n) => {
|
|
1113
|
+
n.pattern ?? (n.pattern = ct), b.init(e, n);
|
|
1114
|
+
}), Cs = /* @__PURE__ */ u("$ZodIPv4", (e, n) => {
|
|
1115
|
+
n.pattern ?? (n.pattern = pt), b.init(e, n), e._zod.bag.format = "ipv4";
|
|
1116
|
+
}), Ds = /* @__PURE__ */ u("$ZodIPv6", (e, n) => {
|
|
1117
|
+
n.pattern ?? (n.pattern = dt), b.init(e, n), e._zod.bag.format = "ipv6", e._zod.check = (t) => {
|
|
1118
|
+
try {
|
|
1119
|
+
new URL(`http://[${t.value}]`);
|
|
1120
|
+
} catch {
|
|
1121
|
+
t.issues.push({
|
|
1122
|
+
code: "invalid_format",
|
|
1123
|
+
format: "ipv6",
|
|
1124
|
+
input: t.value,
|
|
1125
|
+
inst: e,
|
|
1126
|
+
continue: !n.abort
|
|
1127
|
+
});
|
|
1128
|
+
}
|
|
1129
|
+
};
|
|
1130
|
+
}), Rs = /* @__PURE__ */ u("$ZodMAC", (e, n) => {
|
|
1131
|
+
n.pattern ?? (n.pattern = mt(n.delimiter)), b.init(e, n), e._zod.bag.format = "mac";
|
|
1132
|
+
}), Fs = /* @__PURE__ */ u("$ZodCIDRv4", (e, n) => {
|
|
1133
|
+
n.pattern ?? (n.pattern = ht), b.init(e, n);
|
|
1134
|
+
}), Js = /* @__PURE__ */ u("$ZodCIDRv6", (e, n) => {
|
|
1135
|
+
n.pattern ?? (n.pattern = _t), b.init(e, n), e._zod.check = (t) => {
|
|
1136
|
+
const r = t.value.split("/");
|
|
1137
|
+
try {
|
|
1138
|
+
if (r.length !== 2)
|
|
1139
|
+
throw new Error();
|
|
1140
|
+
const [o, i] = r;
|
|
1141
|
+
if (!i)
|
|
1142
|
+
throw new Error();
|
|
1143
|
+
const s = Number(i);
|
|
1144
|
+
if (`${s}` !== i)
|
|
1145
|
+
throw new Error();
|
|
1146
|
+
if (s < 0 || s > 128)
|
|
1147
|
+
throw new Error();
|
|
1148
|
+
new URL(`http://[${o}]`);
|
|
1149
|
+
} catch {
|
|
1150
|
+
t.issues.push({
|
|
1151
|
+
code: "invalid_format",
|
|
1152
|
+
format: "cidrv6",
|
|
1153
|
+
input: t.value,
|
|
1154
|
+
inst: e,
|
|
1155
|
+
continue: !n.abort
|
|
1156
|
+
});
|
|
1157
|
+
}
|
|
1158
|
+
};
|
|
1159
|
+
});
|
|
1160
|
+
function Rt(e) {
|
|
1161
|
+
if (e === "")
|
|
1162
|
+
return !0;
|
|
1163
|
+
if (e.length % 4 !== 0)
|
|
1164
|
+
return !1;
|
|
1165
|
+
try {
|
|
1166
|
+
return atob(e), !0;
|
|
1167
|
+
} catch {
|
|
1168
|
+
return !1;
|
|
1169
|
+
}
|
|
1170
|
+
}
|
|
1171
|
+
const Us = /* @__PURE__ */ u("$ZodBase64", (e, n) => {
|
|
1172
|
+
n.pattern ?? (n.pattern = gt), b.init(e, n), e._zod.bag.contentEncoding = "base64", e._zod.check = (t) => {
|
|
1173
|
+
Rt(t.value) || t.issues.push({
|
|
1174
|
+
code: "invalid_format",
|
|
1175
|
+
format: "base64",
|
|
1176
|
+
input: t.value,
|
|
1177
|
+
inst: e,
|
|
1178
|
+
continue: !n.abort
|
|
1179
|
+
});
|
|
1180
|
+
};
|
|
1181
|
+
});
|
|
1182
|
+
function Ms(e) {
|
|
1183
|
+
if (!We.test(e))
|
|
1184
|
+
return !1;
|
|
1185
|
+
const n = e.replace(/[-_]/g, (r) => r === "-" ? "+" : "/"), t = n.padEnd(Math.ceil(n.length / 4) * 4, "=");
|
|
1186
|
+
return Rt(t);
|
|
1187
|
+
}
|
|
1188
|
+
const Ls = /* @__PURE__ */ u("$ZodBase64URL", (e, n) => {
|
|
1189
|
+
n.pattern ?? (n.pattern = We), b.init(e, n), e._zod.bag.contentEncoding = "base64url", e._zod.check = (t) => {
|
|
1190
|
+
Ms(t.value) || t.issues.push({
|
|
1191
|
+
code: "invalid_format",
|
|
1192
|
+
format: "base64url",
|
|
1193
|
+
input: t.value,
|
|
1194
|
+
inst: e,
|
|
1195
|
+
continue: !n.abort
|
|
1196
|
+
});
|
|
1197
|
+
};
|
|
1198
|
+
}), Vs = /* @__PURE__ */ u("$ZodE164", (e, n) => {
|
|
1199
|
+
n.pattern ?? (n.pattern = bt), b.init(e, n);
|
|
1200
|
+
});
|
|
1201
|
+
function Bs(e, n = null) {
|
|
1202
|
+
try {
|
|
1203
|
+
const t = e.split(".");
|
|
1204
|
+
if (t.length !== 3)
|
|
1205
|
+
return !1;
|
|
1206
|
+
const [r] = t;
|
|
1207
|
+
if (!r)
|
|
1208
|
+
return !1;
|
|
1209
|
+
const o = JSON.parse(atob(r));
|
|
1210
|
+
return !("typ" in o && o?.typ !== "JWT" || !o.alg || n && (!("alg" in o) || o.alg !== n));
|
|
1211
|
+
} catch {
|
|
1212
|
+
return !1;
|
|
1213
|
+
}
|
|
1214
|
+
}
|
|
1215
|
+
const Ws = /* @__PURE__ */ u("$ZodJWT", (e, n) => {
|
|
1216
|
+
b.init(e, n), e._zod.check = (t) => {
|
|
1217
|
+
Bs(t.value, n.alg) || t.issues.push({
|
|
1218
|
+
code: "invalid_format",
|
|
1219
|
+
format: "jwt",
|
|
1220
|
+
input: t.value,
|
|
1221
|
+
inst: e,
|
|
1222
|
+
continue: !n.abort
|
|
1223
|
+
});
|
|
1224
|
+
};
|
|
1225
|
+
}), Ks = /* @__PURE__ */ u("$ZodCustomStringFormat", (e, n) => {
|
|
1226
|
+
b.init(e, n), e._zod.check = (t) => {
|
|
1227
|
+
n.fn(t.value) || t.issues.push({
|
|
1228
|
+
code: "invalid_format",
|
|
1229
|
+
format: n.format,
|
|
1230
|
+
input: t.value,
|
|
1231
|
+
inst: e,
|
|
1232
|
+
continue: !n.abort
|
|
1233
|
+
});
|
|
1234
|
+
};
|
|
1235
|
+
}), Ft = /* @__PURE__ */ u("$ZodNumber", (e, n) => {
|
|
1236
|
+
_.init(e, n), e._zod.pattern = e._zod.bag.pattern ?? Ke, e._zod.parse = (t, r) => {
|
|
1237
|
+
if (n.coerce)
|
|
1238
|
+
try {
|
|
1239
|
+
t.value = Number(t.value);
|
|
1240
|
+
} catch {
|
|
1241
|
+
}
|
|
1242
|
+
const o = t.value;
|
|
1243
|
+
if (typeof o == "number" && !Number.isNaN(o) && Number.isFinite(o))
|
|
1244
|
+
return t;
|
|
1245
|
+
const i = typeof o == "number" ? Number.isNaN(o) ? "NaN" : Number.isFinite(o) ? void 0 : "Infinity" : void 0;
|
|
1246
|
+
return t.issues.push({
|
|
1247
|
+
expected: "number",
|
|
1248
|
+
code: "invalid_type",
|
|
1249
|
+
input: o,
|
|
1250
|
+
inst: e,
|
|
1251
|
+
...i ? { received: i } : {}
|
|
1252
|
+
}), t;
|
|
1253
|
+
};
|
|
1254
|
+
}), Gs = /* @__PURE__ */ u("$ZodNumberFormat", (e, n) => {
|
|
1255
|
+
ts.init(e, n), Ft.init(e, n);
|
|
1256
|
+
}), Jt = /* @__PURE__ */ u("$ZodBoolean", (e, n) => {
|
|
1257
|
+
_.init(e, n), e._zod.pattern = It, e._zod.parse = (t, r) => {
|
|
1258
|
+
if (n.coerce)
|
|
1259
|
+
try {
|
|
1260
|
+
t.value = !!t.value;
|
|
1261
|
+
} catch {
|
|
1262
|
+
}
|
|
1263
|
+
const o = t.value;
|
|
1264
|
+
return typeof o == "boolean" || t.issues.push({
|
|
1265
|
+
expected: "boolean",
|
|
1266
|
+
code: "invalid_type",
|
|
1267
|
+
input: o,
|
|
1268
|
+
inst: e
|
|
1269
|
+
}), t;
|
|
1270
|
+
};
|
|
1271
|
+
}), Ut = /* @__PURE__ */ u("$ZodBigInt", (e, n) => {
|
|
1272
|
+
_.init(e, n), e._zod.pattern = Ot, e._zod.parse = (t, r) => {
|
|
1273
|
+
if (n.coerce)
|
|
1274
|
+
try {
|
|
1275
|
+
t.value = BigInt(t.value);
|
|
1276
|
+
} catch {
|
|
1277
|
+
}
|
|
1278
|
+
return typeof t.value == "bigint" || t.issues.push({
|
|
1279
|
+
expected: "bigint",
|
|
1280
|
+
code: "invalid_type",
|
|
1281
|
+
input: t.value,
|
|
1282
|
+
inst: e
|
|
1283
|
+
}), t;
|
|
1284
|
+
};
|
|
1285
|
+
}), Ys = /* @__PURE__ */ u("$ZodBigIntFormat", (e, n) => {
|
|
1286
|
+
rs.init(e, n), Ut.init(e, n);
|
|
1287
|
+
}), qs = /* @__PURE__ */ u("$ZodSymbol", (e, n) => {
|
|
1288
|
+
_.init(e, n), e._zod.parse = (t, r) => {
|
|
1289
|
+
const o = t.value;
|
|
1290
|
+
return typeof o == "symbol" || t.issues.push({
|
|
1291
|
+
expected: "symbol",
|
|
1292
|
+
code: "invalid_type",
|
|
1293
|
+
input: o,
|
|
1294
|
+
inst: e
|
|
1295
|
+
}), t;
|
|
1296
|
+
};
|
|
1297
|
+
}), Xs = /* @__PURE__ */ u("$ZodUndefined", (e, n) => {
|
|
1298
|
+
_.init(e, n), e._zod.pattern = Et, e._zod.values = /* @__PURE__ */ new Set([void 0]), e._zod.optin = "optional", e._zod.optout = "optional", e._zod.parse = (t, r) => {
|
|
1299
|
+
const o = t.value;
|
|
1300
|
+
return typeof o > "u" || t.issues.push({
|
|
1301
|
+
expected: "undefined",
|
|
1302
|
+
code: "invalid_type",
|
|
1303
|
+
input: o,
|
|
1304
|
+
inst: e
|
|
1305
|
+
}), t;
|
|
1306
|
+
};
|
|
1307
|
+
}), Hs = /* @__PURE__ */ u("$ZodNull", (e, n) => {
|
|
1308
|
+
_.init(e, n), e._zod.pattern = Pt, e._zod.values = /* @__PURE__ */ new Set([null]), e._zod.parse = (t, r) => {
|
|
1309
|
+
const o = t.value;
|
|
1310
|
+
return o === null || t.issues.push({
|
|
1311
|
+
expected: "null",
|
|
1312
|
+
code: "invalid_type",
|
|
1313
|
+
input: o,
|
|
1314
|
+
inst: e
|
|
1315
|
+
}), t;
|
|
1316
|
+
};
|
|
1317
|
+
}), Qs = /* @__PURE__ */ u("$ZodAny", (e, n) => {
|
|
1318
|
+
_.init(e, n), e._zod.parse = (t) => t;
|
|
1319
|
+
}), ec = /* @__PURE__ */ u("$ZodUnknown", (e, n) => {
|
|
1320
|
+
_.init(e, n), e._zod.parse = (t) => t;
|
|
1321
|
+
}), nc = /* @__PURE__ */ u("$ZodNever", (e, n) => {
|
|
1322
|
+
_.init(e, n), e._zod.parse = (t, r) => (t.issues.push({
|
|
1323
|
+
expected: "never",
|
|
1324
|
+
code: "invalid_type",
|
|
1325
|
+
input: t.value,
|
|
1326
|
+
inst: e
|
|
1327
|
+
}), t);
|
|
1328
|
+
}), tc = /* @__PURE__ */ u("$ZodVoid", (e, n) => {
|
|
1329
|
+
_.init(e, n), e._zod.parse = (t, r) => {
|
|
1330
|
+
const o = t.value;
|
|
1331
|
+
return typeof o > "u" || t.issues.push({
|
|
1332
|
+
expected: "void",
|
|
1333
|
+
code: "invalid_type",
|
|
1334
|
+
input: o,
|
|
1335
|
+
inst: e
|
|
1336
|
+
}), t;
|
|
1337
|
+
};
|
|
1338
|
+
}), rc = /* @__PURE__ */ u("$ZodDate", (e, n) => {
|
|
1339
|
+
_.init(e, n), e._zod.parse = (t, r) => {
|
|
1340
|
+
if (n.coerce)
|
|
1341
|
+
try {
|
|
1342
|
+
t.value = new Date(t.value);
|
|
1343
|
+
} catch {
|
|
1344
|
+
}
|
|
1345
|
+
const o = t.value, i = o instanceof Date;
|
|
1346
|
+
return i && !Number.isNaN(o.getTime()) || t.issues.push({
|
|
1347
|
+
expected: "date",
|
|
1348
|
+
code: "invalid_type",
|
|
1349
|
+
input: o,
|
|
1350
|
+
...i ? { received: "Invalid Date" } : {},
|
|
1351
|
+
inst: e
|
|
1352
|
+
}), t;
|
|
1353
|
+
};
|
|
1354
|
+
});
|
|
1355
|
+
function xn(e, n, t) {
|
|
1356
|
+
e.issues.length && n.issues.push(...A(t, e.issues)), n.value[t] = e.value;
|
|
1357
|
+
}
|
|
1358
|
+
const oc = /* @__PURE__ */ u("$ZodArray", (e, n) => {
|
|
1359
|
+
_.init(e, n), e._zod.parse = (t, r) => {
|
|
1360
|
+
const o = t.value;
|
|
1361
|
+
if (!Array.isArray(o))
|
|
1362
|
+
return t.issues.push({
|
|
1363
|
+
expected: "array",
|
|
1364
|
+
code: "invalid_type",
|
|
1365
|
+
input: o,
|
|
1366
|
+
inst: e
|
|
1367
|
+
}), t;
|
|
1368
|
+
t.value = Array(o.length);
|
|
1369
|
+
const i = [];
|
|
1370
|
+
for (let s = 0; s < o.length; s++) {
|
|
1371
|
+
const c = o[s], a = n.element._zod.run({
|
|
1372
|
+
value: c,
|
|
1373
|
+
issues: []
|
|
1374
|
+
}, r);
|
|
1375
|
+
a instanceof Promise ? i.push(a.then((l) => xn(l, t, s))) : xn(a, t, s);
|
|
1376
|
+
}
|
|
1377
|
+
return i.length ? Promise.all(i).then(() => t) : t;
|
|
1378
|
+
};
|
|
1379
|
+
});
|
|
1380
|
+
function le(e, n, t, r, o) {
|
|
1381
|
+
if (e.issues.length) {
|
|
1382
|
+
if (o && !(t in r))
|
|
1383
|
+
return;
|
|
1384
|
+
n.issues.push(...A(t, e.issues));
|
|
1385
|
+
}
|
|
1386
|
+
e.value === void 0 ? t in r && (n.value[t] = void 0) : n.value[t] = e.value;
|
|
1387
|
+
}
|
|
1388
|
+
function Mt(e) {
|
|
1389
|
+
const n = Object.keys(e.shape);
|
|
1390
|
+
for (const r of n)
|
|
1391
|
+
if (!e.shape?.[r]?._zod?.traits?.has("$ZodType"))
|
|
1392
|
+
throw new Error(`Invalid element at key "${r}": expected a Zod schema`);
|
|
1393
|
+
const t = ui(e.shape);
|
|
1394
|
+
return {
|
|
1395
|
+
...e,
|
|
1396
|
+
keys: n,
|
|
1397
|
+
keySet: new Set(n),
|
|
1398
|
+
numKeys: n.length,
|
|
1399
|
+
optionalKeys: new Set(t)
|
|
1400
|
+
};
|
|
1401
|
+
}
|
|
1402
|
+
function Lt(e, n, t, r, o, i) {
|
|
1403
|
+
const s = [], c = o.keySet, a = o.catchall._zod, l = a.def.type, f = a.optout === "optional";
|
|
1404
|
+
for (const d in n) {
|
|
1405
|
+
if (c.has(d))
|
|
1406
|
+
continue;
|
|
1407
|
+
if (l === "never") {
|
|
1408
|
+
s.push(d);
|
|
1409
|
+
continue;
|
|
1410
|
+
}
|
|
1411
|
+
const h = a.run({ value: n[d], issues: [] }, r);
|
|
1412
|
+
h instanceof Promise ? e.push(h.then((m) => le(m, t, d, n, f))) : le(h, t, d, n, f);
|
|
1413
|
+
}
|
|
1414
|
+
return s.length && t.issues.push({
|
|
1415
|
+
code: "unrecognized_keys",
|
|
1416
|
+
keys: s,
|
|
1417
|
+
input: n,
|
|
1418
|
+
inst: i
|
|
1419
|
+
}), e.length ? Promise.all(e).then(() => t) : t;
|
|
1420
|
+
}
|
|
1421
|
+
const ic = /* @__PURE__ */ u("$ZodObject", (e, n) => {
|
|
1422
|
+
if (_.init(e, n), !Object.getOwnPropertyDescriptor(n, "shape")?.get) {
|
|
1423
|
+
const c = n.shape;
|
|
1424
|
+
Object.defineProperty(n, "shape", {
|
|
1425
|
+
get: () => {
|
|
1426
|
+
const a = { ...c };
|
|
1427
|
+
return Object.defineProperty(n, "shape", {
|
|
1428
|
+
value: a
|
|
1429
|
+
}), a;
|
|
1430
|
+
}
|
|
1431
|
+
});
|
|
1432
|
+
}
|
|
1433
|
+
const r = be(() => Mt(n));
|
|
1434
|
+
v(e._zod, "propValues", () => {
|
|
1435
|
+
const c = n.shape, a = {};
|
|
1436
|
+
for (const l in c) {
|
|
1437
|
+
const f = c[l]._zod;
|
|
1438
|
+
if (f.values) {
|
|
1439
|
+
a[l] ?? (a[l] = /* @__PURE__ */ new Set());
|
|
1440
|
+
for (const d of f.values)
|
|
1441
|
+
a[l].add(d);
|
|
1442
|
+
}
|
|
1443
|
+
}
|
|
1444
|
+
return a;
|
|
1445
|
+
});
|
|
1446
|
+
const o = Y, i = n.catchall;
|
|
1447
|
+
let s;
|
|
1448
|
+
e._zod.parse = (c, a) => {
|
|
1449
|
+
s ?? (s = r.value);
|
|
1450
|
+
const l = c.value;
|
|
1451
|
+
if (!o(l))
|
|
1452
|
+
return c.issues.push({
|
|
1453
|
+
expected: "object",
|
|
1454
|
+
code: "invalid_type",
|
|
1455
|
+
input: l,
|
|
1456
|
+
inst: e
|
|
1457
|
+
}), c;
|
|
1458
|
+
c.value = {};
|
|
1459
|
+
const f = [], d = s.shape;
|
|
1460
|
+
for (const h of s.keys) {
|
|
1461
|
+
const m = d[h], k = m._zod.optout === "optional", $ = m._zod.run({ value: l[h], issues: [] }, a);
|
|
1462
|
+
$ instanceof Promise ? f.push($.then((oe) => le(oe, c, h, l, k))) : le($, c, h, l, k);
|
|
1463
|
+
}
|
|
1464
|
+
return i ? Lt(f, l, c, a, r.value, e) : f.length ? Promise.all(f).then(() => c) : c;
|
|
1465
|
+
};
|
|
1466
|
+
}), sc = /* @__PURE__ */ u("$ZodObjectJIT", (e, n) => {
|
|
1467
|
+
ic.init(e, n);
|
|
1468
|
+
const t = e._zod.parse, r = be(() => Mt(n)), o = (h) => {
|
|
1469
|
+
const m = new zs(["shape", "payload", "ctx"]), k = r.value, $ = (E) => {
|
|
1470
|
+
const S = En(E);
|
|
1471
|
+
return `shape[${S}]._zod.run({ value: input[${S}], issues: [] }, ctx)`;
|
|
1472
|
+
};
|
|
1473
|
+
m.write("const input = payload.value;");
|
|
1474
|
+
const oe = /* @__PURE__ */ Object.create(null);
|
|
1475
|
+
let ni = 0;
|
|
1476
|
+
for (const E of k.keys)
|
|
1477
|
+
oe[E] = `key_${ni++}`;
|
|
1478
|
+
m.write("const newResult = {};");
|
|
1479
|
+
for (const E of k.keys) {
|
|
1480
|
+
const S = oe[E], T = En(E), ri = h[E]?._zod?.optout === "optional";
|
|
1481
|
+
m.write(`const ${S} = ${$(E)};`), ri ? m.write(`
|
|
1482
|
+
if (${S}.issues.length) {
|
|
1483
|
+
if (${T} in input) {
|
|
1484
|
+
payload.issues = payload.issues.concat(${S}.issues.map(iss => ({
|
|
1485
|
+
...iss,
|
|
1486
|
+
path: iss.path ? [${T}, ...iss.path] : [${T}]
|
|
1487
|
+
})));
|
|
1488
|
+
}
|
|
1489
|
+
}
|
|
1490
|
+
|
|
1491
|
+
if (${S}.value === undefined) {
|
|
1492
|
+
if (${T} in input) {
|
|
1493
|
+
newResult[${T}] = undefined;
|
|
1494
|
+
}
|
|
1495
|
+
} else {
|
|
1496
|
+
newResult[${T}] = ${S}.value;
|
|
1497
|
+
}
|
|
1498
|
+
|
|
1499
|
+
`) : m.write(`
|
|
1500
|
+
if (${S}.issues.length) {
|
|
1501
|
+
payload.issues = payload.issues.concat(${S}.issues.map(iss => ({
|
|
1502
|
+
...iss,
|
|
1503
|
+
path: iss.path ? [${T}, ...iss.path] : [${T}]
|
|
1504
|
+
})));
|
|
1505
|
+
}
|
|
1506
|
+
|
|
1507
|
+
if (${S}.value === undefined) {
|
|
1508
|
+
if (${T} in input) {
|
|
1509
|
+
newResult[${T}] = undefined;
|
|
1510
|
+
}
|
|
1511
|
+
} else {
|
|
1512
|
+
newResult[${T}] = ${S}.value;
|
|
1513
|
+
}
|
|
1514
|
+
|
|
1515
|
+
`);
|
|
1516
|
+
}
|
|
1517
|
+
m.write("payload.value = newResult;"), m.write("return payload;");
|
|
1518
|
+
const ti = m.compile();
|
|
1519
|
+
return (E, S) => ti(h, E, S);
|
|
1520
|
+
};
|
|
1521
|
+
let i;
|
|
1522
|
+
const s = Y, c = !Yn.jitless, l = c && si.value, f = n.catchall;
|
|
1523
|
+
let d;
|
|
1524
|
+
e._zod.parse = (h, m) => {
|
|
1525
|
+
d ?? (d = r.value);
|
|
1526
|
+
const k = h.value;
|
|
1527
|
+
return s(k) ? c && l && m?.async === !1 && m.jitless !== !0 ? (i || (i = o(n.shape)), h = i(h, m), f ? Lt([], k, h, m, d, e) : h) : t(h, m) : (h.issues.push({
|
|
1528
|
+
expected: "object",
|
|
1529
|
+
code: "invalid_type",
|
|
1530
|
+
input: k,
|
|
1531
|
+
inst: e
|
|
1532
|
+
}), h);
|
|
1533
|
+
};
|
|
1534
|
+
});
|
|
1535
|
+
function Cn(e, n, t, r) {
|
|
1536
|
+
for (const i of e)
|
|
1537
|
+
if (i.issues.length === 0)
|
|
1538
|
+
return n.value = i.value, n;
|
|
1539
|
+
const o = e.filter((i) => !U(i));
|
|
1540
|
+
return o.length === 1 ? (n.value = o[0].value, o[0]) : (n.issues.push({
|
|
1541
|
+
code: "invalid_union",
|
|
1542
|
+
input: n.value,
|
|
1543
|
+
inst: t,
|
|
1544
|
+
errors: e.map((i) => i.issues.map((s) => P(s, r, I())))
|
|
1545
|
+
}), n);
|
|
1546
|
+
}
|
|
1547
|
+
const Ge = /* @__PURE__ */ u("$ZodUnion", (e, n) => {
|
|
1548
|
+
_.init(e, n), v(e._zod, "optin", () => n.options.some((o) => o._zod.optin === "optional") ? "optional" : void 0), v(e._zod, "optout", () => n.options.some((o) => o._zod.optout === "optional") ? "optional" : void 0), v(e._zod, "values", () => {
|
|
1549
|
+
if (n.options.every((o) => o._zod.values))
|
|
1550
|
+
return new Set(n.options.flatMap((o) => Array.from(o._zod.values)));
|
|
1551
|
+
}), v(e._zod, "pattern", () => {
|
|
1552
|
+
if (n.options.every((o) => o._zod.pattern)) {
|
|
1553
|
+
const o = n.options.map((i) => i._zod.pattern);
|
|
1554
|
+
return new RegExp(`^(${o.map((i) => Le(i.source)).join("|")})$`);
|
|
1555
|
+
}
|
|
1556
|
+
});
|
|
1557
|
+
const t = n.options.length === 1, r = n.options[0]._zod.run;
|
|
1558
|
+
e._zod.parse = (o, i) => {
|
|
1559
|
+
if (t)
|
|
1560
|
+
return r(o, i);
|
|
1561
|
+
let s = !1;
|
|
1562
|
+
const c = [];
|
|
1563
|
+
for (const a of n.options) {
|
|
1564
|
+
const l = a._zod.run({
|
|
1565
|
+
value: o.value,
|
|
1566
|
+
issues: []
|
|
1567
|
+
}, i);
|
|
1568
|
+
if (l instanceof Promise)
|
|
1569
|
+
c.push(l), s = !0;
|
|
1570
|
+
else {
|
|
1571
|
+
if (l.issues.length === 0)
|
|
1572
|
+
return l;
|
|
1573
|
+
c.push(l);
|
|
1574
|
+
}
|
|
1575
|
+
}
|
|
1576
|
+
return s ? Promise.all(c).then((a) => Cn(a, o, e, i)) : Cn(c, o, e, i);
|
|
1577
|
+
};
|
|
1578
|
+
});
|
|
1579
|
+
function Dn(e, n, t, r) {
|
|
1580
|
+
const o = e.filter((i) => i.issues.length === 0);
|
|
1581
|
+
return o.length === 1 ? (n.value = o[0].value, n) : (o.length === 0 ? n.issues.push({
|
|
1582
|
+
code: "invalid_union",
|
|
1583
|
+
input: n.value,
|
|
1584
|
+
inst: t,
|
|
1585
|
+
errors: e.map((i) => i.issues.map((s) => P(s, r, I())))
|
|
1586
|
+
}) : n.issues.push({
|
|
1587
|
+
code: "invalid_union",
|
|
1588
|
+
input: n.value,
|
|
1589
|
+
inst: t,
|
|
1590
|
+
errors: [],
|
|
1591
|
+
inclusive: !1
|
|
1592
|
+
}), n);
|
|
1593
|
+
}
|
|
1594
|
+
const cc = /* @__PURE__ */ u("$ZodXor", (e, n) => {
|
|
1595
|
+
Ge.init(e, n), n.inclusive = !1;
|
|
1596
|
+
const t = n.options.length === 1, r = n.options[0]._zod.run;
|
|
1597
|
+
e._zod.parse = (o, i) => {
|
|
1598
|
+
if (t)
|
|
1599
|
+
return r(o, i);
|
|
1600
|
+
let s = !1;
|
|
1601
|
+
const c = [];
|
|
1602
|
+
for (const a of n.options) {
|
|
1603
|
+
const l = a._zod.run({
|
|
1604
|
+
value: o.value,
|
|
1605
|
+
issues: []
|
|
1606
|
+
}, i);
|
|
1607
|
+
l instanceof Promise ? (c.push(l), s = !0) : c.push(l);
|
|
1608
|
+
}
|
|
1609
|
+
return s ? Promise.all(c).then((a) => Dn(a, o, e, i)) : Dn(c, o, e, i);
|
|
1610
|
+
};
|
|
1611
|
+
}), uc = /* @__PURE__ */ u("$ZodDiscriminatedUnion", (e, n) => {
|
|
1612
|
+
n.inclusive = !1, Ge.init(e, n);
|
|
1613
|
+
const t = e._zod.parse;
|
|
1614
|
+
v(e._zod, "propValues", () => {
|
|
1615
|
+
const o = {};
|
|
1616
|
+
for (const i of n.options) {
|
|
1617
|
+
const s = i._zod.propValues;
|
|
1618
|
+
if (!s || Object.keys(s).length === 0)
|
|
1619
|
+
throw new Error(`Invalid discriminated union option at index "${n.options.indexOf(i)}"`);
|
|
1620
|
+
for (const [c, a] of Object.entries(s)) {
|
|
1621
|
+
o[c] || (o[c] = /* @__PURE__ */ new Set());
|
|
1622
|
+
for (const l of a)
|
|
1623
|
+
o[c].add(l);
|
|
1624
|
+
}
|
|
1625
|
+
}
|
|
1626
|
+
return o;
|
|
1627
|
+
});
|
|
1628
|
+
const r = be(() => {
|
|
1629
|
+
const o = n.options, i = /* @__PURE__ */ new Map();
|
|
1630
|
+
for (const s of o) {
|
|
1631
|
+
const c = s._zod.propValues?.[n.discriminator];
|
|
1632
|
+
if (!c || c.size === 0)
|
|
1633
|
+
throw new Error(`Invalid discriminated union option at index "${n.options.indexOf(s)}"`);
|
|
1634
|
+
for (const a of c) {
|
|
1635
|
+
if (i.has(a))
|
|
1636
|
+
throw new Error(`Duplicate discriminator value "${String(a)}"`);
|
|
1637
|
+
i.set(a, s);
|
|
1638
|
+
}
|
|
1639
|
+
}
|
|
1640
|
+
return i;
|
|
1641
|
+
});
|
|
1642
|
+
e._zod.parse = (o, i) => {
|
|
1643
|
+
const s = o.value;
|
|
1644
|
+
if (!Y(s))
|
|
1645
|
+
return o.issues.push({
|
|
1646
|
+
code: "invalid_type",
|
|
1647
|
+
expected: "object",
|
|
1648
|
+
input: s,
|
|
1649
|
+
inst: e
|
|
1650
|
+
}), o;
|
|
1651
|
+
const c = r.value.get(s?.[n.discriminator]);
|
|
1652
|
+
return c ? c._zod.run(o, i) : n.unionFallback ? t(o, i) : (o.issues.push({
|
|
1653
|
+
code: "invalid_union",
|
|
1654
|
+
errors: [],
|
|
1655
|
+
note: "No matching discriminator",
|
|
1656
|
+
discriminator: n.discriminator,
|
|
1657
|
+
input: s,
|
|
1658
|
+
path: [n.discriminator],
|
|
1659
|
+
inst: e
|
|
1660
|
+
}), o);
|
|
1661
|
+
};
|
|
1662
|
+
}), ac = /* @__PURE__ */ u("$ZodIntersection", (e, n) => {
|
|
1663
|
+
_.init(e, n), e._zod.parse = (t, r) => {
|
|
1664
|
+
const o = t.value, i = n.left._zod.run({ value: o, issues: [] }, r), s = n.right._zod.run({ value: o, issues: [] }, r);
|
|
1665
|
+
return i instanceof Promise || s instanceof Promise ? Promise.all([i, s]).then(([a, l]) => Rn(t, a, l)) : Rn(t, i, s);
|
|
1666
|
+
};
|
|
1667
|
+
});
|
|
1668
|
+
function De(e, n) {
|
|
1669
|
+
if (e === n)
|
|
1670
|
+
return { valid: !0, data: e };
|
|
1671
|
+
if (e instanceof Date && n instanceof Date && +e == +n)
|
|
1672
|
+
return { valid: !0, data: e };
|
|
1673
|
+
if (L(e) && L(n)) {
|
|
1674
|
+
const t = Object.keys(n), r = Object.keys(e).filter((i) => t.indexOf(i) !== -1), o = { ...e, ...n };
|
|
1675
|
+
for (const i of r) {
|
|
1676
|
+
const s = De(e[i], n[i]);
|
|
1677
|
+
if (!s.valid)
|
|
1678
|
+
return {
|
|
1679
|
+
valid: !1,
|
|
1680
|
+
mergeErrorPath: [i, ...s.mergeErrorPath]
|
|
1681
|
+
};
|
|
1682
|
+
o[i] = s.data;
|
|
1683
|
+
}
|
|
1684
|
+
return { valid: !0, data: o };
|
|
1685
|
+
}
|
|
1686
|
+
if (Array.isArray(e) && Array.isArray(n)) {
|
|
1687
|
+
if (e.length !== n.length)
|
|
1688
|
+
return { valid: !1, mergeErrorPath: [] };
|
|
1689
|
+
const t = [];
|
|
1690
|
+
for (let r = 0; r < e.length; r++) {
|
|
1691
|
+
const o = e[r], i = n[r], s = De(o, i);
|
|
1692
|
+
if (!s.valid)
|
|
1693
|
+
return {
|
|
1694
|
+
valid: !1,
|
|
1695
|
+
mergeErrorPath: [r, ...s.mergeErrorPath]
|
|
1696
|
+
};
|
|
1697
|
+
t.push(s.data);
|
|
1698
|
+
}
|
|
1699
|
+
return { valid: !0, data: t };
|
|
1700
|
+
}
|
|
1701
|
+
return { valid: !1, mergeErrorPath: [] };
|
|
1702
|
+
}
|
|
1703
|
+
function Rn(e, n, t) {
|
|
1704
|
+
const r = /* @__PURE__ */ new Map();
|
|
1705
|
+
let o;
|
|
1706
|
+
for (const c of n.issues)
|
|
1707
|
+
if (c.code === "unrecognized_keys") {
|
|
1708
|
+
o ?? (o = c);
|
|
1709
|
+
for (const a of c.keys)
|
|
1710
|
+
r.has(a) || r.set(a, {}), r.get(a).l = !0;
|
|
1711
|
+
} else
|
|
1712
|
+
e.issues.push(c);
|
|
1713
|
+
for (const c of t.issues)
|
|
1714
|
+
if (c.code === "unrecognized_keys")
|
|
1715
|
+
for (const a of c.keys)
|
|
1716
|
+
r.has(a) || r.set(a, {}), r.get(a).r = !0;
|
|
1717
|
+
else
|
|
1718
|
+
e.issues.push(c);
|
|
1719
|
+
const i = [...r].filter(([, c]) => c.l && c.r).map(([c]) => c);
|
|
1720
|
+
if (i.length && o && e.issues.push({ ...o, keys: i }), U(e))
|
|
1721
|
+
return e;
|
|
1722
|
+
const s = De(n.value, t.value);
|
|
1723
|
+
if (!s.valid)
|
|
1724
|
+
throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(s.mergeErrorPath)}`);
|
|
1725
|
+
return e.value = s.data, e;
|
|
1726
|
+
}
|
|
1727
|
+
const Vt = /* @__PURE__ */ u("$ZodTuple", (e, n) => {
|
|
1728
|
+
_.init(e, n);
|
|
1729
|
+
const t = n.items;
|
|
1730
|
+
e._zod.parse = (r, o) => {
|
|
1731
|
+
const i = r.value;
|
|
1732
|
+
if (!Array.isArray(i))
|
|
1733
|
+
return r.issues.push({
|
|
1734
|
+
input: i,
|
|
1735
|
+
inst: e,
|
|
1736
|
+
expected: "tuple",
|
|
1737
|
+
code: "invalid_type"
|
|
1738
|
+
}), r;
|
|
1739
|
+
r.value = [];
|
|
1740
|
+
const s = [], c = [...t].reverse().findIndex((f) => f._zod.optin !== "optional"), a = c === -1 ? 0 : t.length - c;
|
|
1741
|
+
if (!n.rest) {
|
|
1742
|
+
const f = i.length > t.length, d = i.length < a - 1;
|
|
1743
|
+
if (f || d)
|
|
1744
|
+
return r.issues.push({
|
|
1745
|
+
...f ? { code: "too_big", maximum: t.length, inclusive: !0 } : { code: "too_small", minimum: t.length },
|
|
1746
|
+
input: i,
|
|
1747
|
+
inst: e,
|
|
1748
|
+
origin: "array"
|
|
1749
|
+
}), r;
|
|
1750
|
+
}
|
|
1751
|
+
let l = -1;
|
|
1752
|
+
for (const f of t) {
|
|
1753
|
+
if (l++, l >= i.length && l >= a)
|
|
1754
|
+
continue;
|
|
1755
|
+
const d = f._zod.run({
|
|
1756
|
+
value: i[l],
|
|
1757
|
+
issues: []
|
|
1758
|
+
}, o);
|
|
1759
|
+
d instanceof Promise ? s.push(d.then((h) => se(h, r, l))) : se(d, r, l);
|
|
1760
|
+
}
|
|
1761
|
+
if (n.rest) {
|
|
1762
|
+
const f = i.slice(t.length);
|
|
1763
|
+
for (const d of f) {
|
|
1764
|
+
l++;
|
|
1765
|
+
const h = n.rest._zod.run({
|
|
1766
|
+
value: d,
|
|
1767
|
+
issues: []
|
|
1768
|
+
}, o);
|
|
1769
|
+
h instanceof Promise ? s.push(h.then((m) => se(m, r, l))) : se(h, r, l);
|
|
1770
|
+
}
|
|
1771
|
+
}
|
|
1772
|
+
return s.length ? Promise.all(s).then(() => r) : r;
|
|
1773
|
+
};
|
|
1774
|
+
});
|
|
1775
|
+
function se(e, n, t) {
|
|
1776
|
+
e.issues.length && n.issues.push(...A(t, e.issues)), n.value[t] = e.value;
|
|
1777
|
+
}
|
|
1778
|
+
const lc = /* @__PURE__ */ u("$ZodRecord", (e, n) => {
|
|
1779
|
+
_.init(e, n), e._zod.parse = (t, r) => {
|
|
1780
|
+
const o = t.value;
|
|
1781
|
+
if (!L(o))
|
|
1782
|
+
return t.issues.push({
|
|
1783
|
+
expected: "record",
|
|
1784
|
+
code: "invalid_type",
|
|
1785
|
+
input: o,
|
|
1786
|
+
inst: e
|
|
1787
|
+
}), t;
|
|
1788
|
+
const i = [], s = n.keyType._zod.values;
|
|
1789
|
+
if (s) {
|
|
1790
|
+
t.value = {};
|
|
1791
|
+
const c = /* @__PURE__ */ new Set();
|
|
1792
|
+
for (const l of s)
|
|
1793
|
+
if (typeof l == "string" || typeof l == "number" || typeof l == "symbol") {
|
|
1794
|
+
c.add(typeof l == "number" ? l.toString() : l);
|
|
1795
|
+
const f = n.valueType._zod.run({ value: o[l], issues: [] }, r);
|
|
1796
|
+
f instanceof Promise ? i.push(f.then((d) => {
|
|
1797
|
+
d.issues.length && t.issues.push(...A(l, d.issues)), t.value[l] = d.value;
|
|
1798
|
+
})) : (f.issues.length && t.issues.push(...A(l, f.issues)), t.value[l] = f.value);
|
|
1799
|
+
}
|
|
1800
|
+
let a;
|
|
1801
|
+
for (const l in o)
|
|
1802
|
+
c.has(l) || (a = a ?? [], a.push(l));
|
|
1803
|
+
a && a.length > 0 && t.issues.push({
|
|
1804
|
+
code: "unrecognized_keys",
|
|
1805
|
+
input: o,
|
|
1806
|
+
inst: e,
|
|
1807
|
+
keys: a
|
|
1808
|
+
});
|
|
1809
|
+
} else {
|
|
1810
|
+
t.value = {};
|
|
1811
|
+
for (const c of Reflect.ownKeys(o)) {
|
|
1812
|
+
if (c === "__proto__")
|
|
1813
|
+
continue;
|
|
1814
|
+
let a = n.keyType._zod.run({ value: c, issues: [] }, r);
|
|
1815
|
+
if (a instanceof Promise)
|
|
1816
|
+
throw new Error("Async schemas not supported in object keys currently");
|
|
1817
|
+
if (typeof c == "string" && Ke.test(c) && a.issues.length) {
|
|
1818
|
+
const d = n.keyType._zod.run({ value: Number(c), issues: [] }, r);
|
|
1819
|
+
if (d instanceof Promise)
|
|
1820
|
+
throw new Error("Async schemas not supported in object keys currently");
|
|
1821
|
+
d.issues.length === 0 && (a = d);
|
|
1822
|
+
}
|
|
1823
|
+
if (a.issues.length) {
|
|
1824
|
+
n.mode === "loose" ? t.value[c] = o[c] : t.issues.push({
|
|
1825
|
+
code: "invalid_key",
|
|
1826
|
+
origin: "record",
|
|
1827
|
+
issues: a.issues.map((d) => P(d, r, I())),
|
|
1828
|
+
input: c,
|
|
1829
|
+
path: [c],
|
|
1830
|
+
inst: e
|
|
1831
|
+
});
|
|
1832
|
+
continue;
|
|
1833
|
+
}
|
|
1834
|
+
const f = n.valueType._zod.run({ value: o[c], issues: [] }, r);
|
|
1835
|
+
f instanceof Promise ? i.push(f.then((d) => {
|
|
1836
|
+
d.issues.length && t.issues.push(...A(c, d.issues)), t.value[a.value] = d.value;
|
|
1837
|
+
})) : (f.issues.length && t.issues.push(...A(c, f.issues)), t.value[a.value] = f.value);
|
|
1838
|
+
}
|
|
1839
|
+
}
|
|
1840
|
+
return i.length ? Promise.all(i).then(() => t) : t;
|
|
1841
|
+
};
|
|
1842
|
+
}), fc = /* @__PURE__ */ u("$ZodMap", (e, n) => {
|
|
1843
|
+
_.init(e, n), e._zod.parse = (t, r) => {
|
|
1844
|
+
const o = t.value;
|
|
1845
|
+
if (!(o instanceof Map))
|
|
1846
|
+
return t.issues.push({
|
|
1847
|
+
expected: "map",
|
|
1848
|
+
code: "invalid_type",
|
|
1849
|
+
input: o,
|
|
1850
|
+
inst: e
|
|
1851
|
+
}), t;
|
|
1852
|
+
const i = [];
|
|
1853
|
+
t.value = /* @__PURE__ */ new Map();
|
|
1854
|
+
for (const [s, c] of o) {
|
|
1855
|
+
const a = n.keyType._zod.run({ value: s, issues: [] }, r), l = n.valueType._zod.run({ value: c, issues: [] }, r);
|
|
1856
|
+
a instanceof Promise || l instanceof Promise ? i.push(Promise.all([a, l]).then(([f, d]) => {
|
|
1857
|
+
Fn(f, d, t, s, o, e, r);
|
|
1858
|
+
})) : Fn(a, l, t, s, o, e, r);
|
|
1859
|
+
}
|
|
1860
|
+
return i.length ? Promise.all(i).then(() => t) : t;
|
|
1861
|
+
};
|
|
1862
|
+
});
|
|
1863
|
+
function Fn(e, n, t, r, o, i, s) {
|
|
1864
|
+
e.issues.length && (Ce.has(typeof r) ? t.issues.push(...A(r, e.issues)) : t.issues.push({
|
|
1865
|
+
code: "invalid_key",
|
|
1866
|
+
origin: "map",
|
|
1867
|
+
input: o,
|
|
1868
|
+
inst: i,
|
|
1869
|
+
issues: e.issues.map((c) => P(c, s, I()))
|
|
1870
|
+
})), n.issues.length && (Ce.has(typeof r) ? t.issues.push(...A(r, n.issues)) : t.issues.push({
|
|
1871
|
+
origin: "map",
|
|
1872
|
+
code: "invalid_element",
|
|
1873
|
+
input: o,
|
|
1874
|
+
inst: i,
|
|
1875
|
+
key: r,
|
|
1876
|
+
issues: n.issues.map((c) => P(c, s, I()))
|
|
1877
|
+
})), t.value.set(e.value, n.value);
|
|
1878
|
+
}
|
|
1879
|
+
const pc = /* @__PURE__ */ u("$ZodSet", (e, n) => {
|
|
1880
|
+
_.init(e, n), e._zod.parse = (t, r) => {
|
|
1881
|
+
const o = t.value;
|
|
1882
|
+
if (!(o instanceof Set))
|
|
1883
|
+
return t.issues.push({
|
|
1884
|
+
input: o,
|
|
1885
|
+
inst: e,
|
|
1886
|
+
expected: "set",
|
|
1887
|
+
code: "invalid_type"
|
|
1888
|
+
}), t;
|
|
1889
|
+
const i = [];
|
|
1890
|
+
t.value = /* @__PURE__ */ new Set();
|
|
1891
|
+
for (const s of o) {
|
|
1892
|
+
const c = n.valueType._zod.run({ value: s, issues: [] }, r);
|
|
1893
|
+
c instanceof Promise ? i.push(c.then((a) => Jn(a, t))) : Jn(c, t);
|
|
1894
|
+
}
|
|
1895
|
+
return i.length ? Promise.all(i).then(() => t) : t;
|
|
1896
|
+
};
|
|
1897
|
+
});
|
|
1898
|
+
function Jn(e, n) {
|
|
1899
|
+
e.issues.length && n.issues.push(...e.issues), n.value.add(e.value);
|
|
1900
|
+
}
|
|
1901
|
+
const dc = /* @__PURE__ */ u("$ZodEnum", (e, n) => {
|
|
1902
|
+
_.init(e, n);
|
|
1903
|
+
const t = qn(n.entries), r = new Set(t);
|
|
1904
|
+
e._zod.values = r, e._zod.pattern = new RegExp(`^(${t.filter((o) => Ce.has(typeof o)).map((o) => typeof o == "string" ? R(o) : o.toString()).join("|")})$`), e._zod.parse = (o, i) => {
|
|
1905
|
+
const s = o.value;
|
|
1906
|
+
return r.has(s) || o.issues.push({
|
|
1907
|
+
code: "invalid_value",
|
|
1908
|
+
values: t,
|
|
1909
|
+
input: s,
|
|
1910
|
+
inst: e
|
|
1911
|
+
}), o;
|
|
1912
|
+
};
|
|
1913
|
+
}), mc = /* @__PURE__ */ u("$ZodLiteral", (e, n) => {
|
|
1914
|
+
if (_.init(e, n), n.values.length === 0)
|
|
1915
|
+
throw new Error("Cannot create literal schema with no valid values");
|
|
1916
|
+
const t = new Set(n.values);
|
|
1917
|
+
e._zod.values = t, e._zod.pattern = new RegExp(`^(${n.values.map((r) => typeof r == "string" ? R(r) : r ? R(r.toString()) : String(r)).join("|")})$`), e._zod.parse = (r, o) => {
|
|
1918
|
+
const i = r.value;
|
|
1919
|
+
return t.has(i) || r.issues.push({
|
|
1920
|
+
code: "invalid_value",
|
|
1921
|
+
values: n.values,
|
|
1922
|
+
input: i,
|
|
1923
|
+
inst: e
|
|
1924
|
+
}), r;
|
|
1925
|
+
};
|
|
1926
|
+
}), hc = /* @__PURE__ */ u("$ZodFile", (e, n) => {
|
|
1927
|
+
_.init(e, n), e._zod.parse = (t, r) => {
|
|
1928
|
+
const o = t.value;
|
|
1929
|
+
return o instanceof File || t.issues.push({
|
|
1930
|
+
expected: "file",
|
|
1931
|
+
code: "invalid_type",
|
|
1932
|
+
input: o,
|
|
1933
|
+
inst: e
|
|
1934
|
+
}), t;
|
|
1935
|
+
};
|
|
1936
|
+
}), _c = /* @__PURE__ */ u("$ZodTransform", (e, n) => {
|
|
1937
|
+
_.init(e, n), e._zod.parse = (t, r) => {
|
|
1938
|
+
if (r.direction === "backward")
|
|
1939
|
+
throw new Me(e.constructor.name);
|
|
1940
|
+
const o = n.transform(t.value, t);
|
|
1941
|
+
if (r.async)
|
|
1942
|
+
return (o instanceof Promise ? o : Promise.resolve(o)).then((s) => (t.value = s, t));
|
|
1943
|
+
if (o instanceof Promise)
|
|
1944
|
+
throw new M();
|
|
1945
|
+
return t.value = o, t;
|
|
1946
|
+
};
|
|
1947
|
+
});
|
|
1948
|
+
function Un(e, n) {
|
|
1949
|
+
return e.issues.length && n === void 0 ? { issues: [], value: void 0 } : e;
|
|
1950
|
+
}
|
|
1951
|
+
const Bt = /* @__PURE__ */ u("$ZodOptional", (e, n) => {
|
|
1952
|
+
_.init(e, n), e._zod.optin = "optional", e._zod.optout = "optional", v(e._zod, "values", () => n.innerType._zod.values ? /* @__PURE__ */ new Set([...n.innerType._zod.values, void 0]) : void 0), v(e._zod, "pattern", () => {
|
|
1953
|
+
const t = n.innerType._zod.pattern;
|
|
1954
|
+
return t ? new RegExp(`^(${Le(t.source)})?$`) : void 0;
|
|
1955
|
+
}), e._zod.parse = (t, r) => {
|
|
1956
|
+
if (n.innerType._zod.optin === "optional") {
|
|
1957
|
+
const o = n.innerType._zod.run(t, r);
|
|
1958
|
+
return o instanceof Promise ? o.then((i) => Un(i, t.value)) : Un(o, t.value);
|
|
1959
|
+
}
|
|
1960
|
+
return t.value === void 0 ? t : n.innerType._zod.run(t, r);
|
|
1961
|
+
};
|
|
1962
|
+
}), gc = /* @__PURE__ */ u("$ZodExactOptional", (e, n) => {
|
|
1963
|
+
Bt.init(e, n), v(e._zod, "values", () => n.innerType._zod.values), v(e._zod, "pattern", () => n.innerType._zod.pattern), e._zod.parse = (t, r) => n.innerType._zod.run(t, r);
|
|
1964
|
+
}), vc = /* @__PURE__ */ u("$ZodNullable", (e, n) => {
|
|
1965
|
+
_.init(e, n), v(e._zod, "optin", () => n.innerType._zod.optin), v(e._zod, "optout", () => n.innerType._zod.optout), v(e._zod, "pattern", () => {
|
|
1966
|
+
const t = n.innerType._zod.pattern;
|
|
1967
|
+
return t ? new RegExp(`^(${Le(t.source)}|null)$`) : void 0;
|
|
1968
|
+
}), v(e._zod, "values", () => n.innerType._zod.values ? /* @__PURE__ */ new Set([...n.innerType._zod.values, null]) : void 0), e._zod.parse = (t, r) => t.value === null ? t : n.innerType._zod.run(t, r);
|
|
1969
|
+
}), zc = /* @__PURE__ */ u("$ZodDefault", (e, n) => {
|
|
1970
|
+
_.init(e, n), e._zod.optin = "optional", v(e._zod, "values", () => n.innerType._zod.values), e._zod.parse = (t, r) => {
|
|
1971
|
+
if (r.direction === "backward")
|
|
1972
|
+
return n.innerType._zod.run(t, r);
|
|
1973
|
+
if (t.value === void 0)
|
|
1974
|
+
return t.value = n.defaultValue, t;
|
|
1975
|
+
const o = n.innerType._zod.run(t, r);
|
|
1976
|
+
return o instanceof Promise ? o.then((i) => Mn(i, n)) : Mn(o, n);
|
|
1977
|
+
};
|
|
1978
|
+
});
|
|
1979
|
+
function Mn(e, n) {
|
|
1980
|
+
return e.value === void 0 && (e.value = n.defaultValue), e;
|
|
1981
|
+
}
|
|
1982
|
+
const bc = /* @__PURE__ */ u("$ZodPrefault", (e, n) => {
|
|
1983
|
+
_.init(e, n), e._zod.optin = "optional", v(e._zod, "values", () => n.innerType._zod.values), e._zod.parse = (t, r) => (r.direction === "backward" || t.value === void 0 && (t.value = n.defaultValue), n.innerType._zod.run(t, r));
|
|
1984
|
+
}), yc = /* @__PURE__ */ u("$ZodNonOptional", (e, n) => {
|
|
1985
|
+
_.init(e, n), v(e._zod, "values", () => {
|
|
1986
|
+
const t = n.innerType._zod.values;
|
|
1987
|
+
return t ? new Set([...t].filter((r) => r !== void 0)) : void 0;
|
|
1988
|
+
}), e._zod.parse = (t, r) => {
|
|
1989
|
+
const o = n.innerType._zod.run(t, r);
|
|
1990
|
+
return o instanceof Promise ? o.then((i) => Ln(i, e)) : Ln(o, e);
|
|
1991
|
+
};
|
|
1992
|
+
});
|
|
1993
|
+
function Ln(e, n) {
|
|
1994
|
+
return !e.issues.length && e.value === void 0 && e.issues.push({
|
|
1995
|
+
code: "invalid_type",
|
|
1996
|
+
expected: "nonoptional",
|
|
1997
|
+
input: e.value,
|
|
1998
|
+
inst: n
|
|
1999
|
+
}), e;
|
|
2000
|
+
}
|
|
2001
|
+
const wc = /* @__PURE__ */ u("$ZodSuccess", (e, n) => {
|
|
2002
|
+
_.init(e, n), e._zod.parse = (t, r) => {
|
|
2003
|
+
if (r.direction === "backward")
|
|
2004
|
+
throw new Me("ZodSuccess");
|
|
2005
|
+
const o = n.innerType._zod.run(t, r);
|
|
2006
|
+
return o instanceof Promise ? o.then((i) => (t.value = i.issues.length === 0, t)) : (t.value = o.issues.length === 0, t);
|
|
2007
|
+
};
|
|
2008
|
+
}), $c = /* @__PURE__ */ u("$ZodCatch", (e, n) => {
|
|
2009
|
+
_.init(e, n), v(e._zod, "optin", () => n.innerType._zod.optin), v(e._zod, "optout", () => n.innerType._zod.optout), v(e._zod, "values", () => n.innerType._zod.values), e._zod.parse = (t, r) => {
|
|
2010
|
+
if (r.direction === "backward")
|
|
2011
|
+
return n.innerType._zod.run(t, r);
|
|
2012
|
+
const o = n.innerType._zod.run(t, r);
|
|
2013
|
+
return o instanceof Promise ? o.then((i) => (t.value = i.value, i.issues.length && (t.value = n.catchValue({
|
|
2014
|
+
...t,
|
|
2015
|
+
error: {
|
|
2016
|
+
issues: i.issues.map((s) => P(s, r, I()))
|
|
2017
|
+
},
|
|
2018
|
+
input: t.value
|
|
2019
|
+
}), t.issues = []), t)) : (t.value = o.value, o.issues.length && (t.value = n.catchValue({
|
|
2020
|
+
...t,
|
|
2021
|
+
error: {
|
|
2022
|
+
issues: o.issues.map((i) => P(i, r, I()))
|
|
2023
|
+
},
|
|
2024
|
+
input: t.value
|
|
2025
|
+
}), t.issues = []), t);
|
|
2026
|
+
};
|
|
2027
|
+
}), kc = /* @__PURE__ */ u("$ZodNaN", (e, n) => {
|
|
2028
|
+
_.init(e, n), e._zod.parse = (t, r) => ((typeof t.value != "number" || !Number.isNaN(t.value)) && t.issues.push({
|
|
2029
|
+
input: t.value,
|
|
2030
|
+
inst: e,
|
|
2031
|
+
expected: "nan",
|
|
2032
|
+
code: "invalid_type"
|
|
2033
|
+
}), t);
|
|
2034
|
+
}), Zc = /* @__PURE__ */ u("$ZodPipe", (e, n) => {
|
|
2035
|
+
_.init(e, n), v(e._zod, "values", () => n.in._zod.values), v(e._zod, "optin", () => n.in._zod.optin), v(e._zod, "optout", () => n.out._zod.optout), v(e._zod, "propValues", () => n.in._zod.propValues), e._zod.parse = (t, r) => {
|
|
2036
|
+
if (r.direction === "backward") {
|
|
2037
|
+
const i = n.out._zod.run(t, r);
|
|
2038
|
+
return i instanceof Promise ? i.then((s) => ce(s, n.in, r)) : ce(i, n.in, r);
|
|
2039
|
+
}
|
|
2040
|
+
const o = n.in._zod.run(t, r);
|
|
2041
|
+
return o instanceof Promise ? o.then((i) => ce(i, n.out, r)) : ce(o, n.out, r);
|
|
2042
|
+
};
|
|
2043
|
+
});
|
|
2044
|
+
function ce(e, n, t) {
|
|
2045
|
+
return e.issues.length ? (e.aborted = !0, e) : n._zod.run({ value: e.value, issues: e.issues }, t);
|
|
2046
|
+
}
|
|
2047
|
+
const Wt = /* @__PURE__ */ u("$ZodCodec", (e, n) => {
|
|
2048
|
+
_.init(e, n), v(e._zod, "values", () => n.in._zod.values), v(e._zod, "optin", () => n.in._zod.optin), v(e._zod, "optout", () => n.out._zod.optout), v(e._zod, "propValues", () => n.in._zod.propValues), e._zod.parse = (t, r) => {
|
|
2049
|
+
if ((r.direction || "forward") === "forward") {
|
|
2050
|
+
const i = n.in._zod.run(t, r);
|
|
2051
|
+
return i instanceof Promise ? i.then((s) => ue(s, n, r)) : ue(i, n, r);
|
|
2052
|
+
} else {
|
|
2053
|
+
const i = n.out._zod.run(t, r);
|
|
2054
|
+
return i instanceof Promise ? i.then((s) => ue(s, n, r)) : ue(i, n, r);
|
|
2055
|
+
}
|
|
2056
|
+
};
|
|
2057
|
+
});
|
|
2058
|
+
function ue(e, n, t) {
|
|
2059
|
+
if (e.issues.length)
|
|
2060
|
+
return e.aborted = !0, e;
|
|
2061
|
+
if ((t.direction || "forward") === "forward") {
|
|
2062
|
+
const o = n.transform(e.value, e);
|
|
2063
|
+
return o instanceof Promise ? o.then((i) => ae(e, i, n.out, t)) : ae(e, o, n.out, t);
|
|
2064
|
+
} else {
|
|
2065
|
+
const o = n.reverseTransform(e.value, e);
|
|
2066
|
+
return o instanceof Promise ? o.then((i) => ae(e, i, n.in, t)) : ae(e, o, n.in, t);
|
|
2067
|
+
}
|
|
2068
|
+
}
|
|
2069
|
+
function ae(e, n, t, r) {
|
|
2070
|
+
return e.issues.length ? (e.aborted = !0, e) : t._zod.run({ value: n, issues: e.issues }, r);
|
|
2071
|
+
}
|
|
2072
|
+
const Sc = /* @__PURE__ */ u("$ZodReadonly", (e, n) => {
|
|
2073
|
+
_.init(e, n), v(e._zod, "propValues", () => n.innerType._zod.propValues), v(e._zod, "values", () => n.innerType._zod.values), v(e._zod, "optin", () => n.innerType?._zod?.optin), v(e._zod, "optout", () => n.innerType?._zod?.optout), e._zod.parse = (t, r) => {
|
|
2074
|
+
if (r.direction === "backward")
|
|
2075
|
+
return n.innerType._zod.run(t, r);
|
|
2076
|
+
const o = n.innerType._zod.run(t, r);
|
|
2077
|
+
return o instanceof Promise ? o.then(Vn) : Vn(o);
|
|
2078
|
+
};
|
|
2079
|
+
});
|
|
2080
|
+
function Vn(e) {
|
|
2081
|
+
return e.value = Object.freeze(e.value), e;
|
|
2082
|
+
}
|
|
2083
|
+
const Oc = /* @__PURE__ */ u("$ZodTemplateLiteral", (e, n) => {
|
|
2084
|
+
_.init(e, n);
|
|
2085
|
+
const t = [];
|
|
2086
|
+
for (const r of n.parts)
|
|
2087
|
+
if (typeof r == "object" && r !== null) {
|
|
2088
|
+
if (!r._zod.pattern)
|
|
2089
|
+
throw new Error(`Invalid template literal part, no pattern found: ${[...r._zod.traits].shift()}`);
|
|
2090
|
+
const o = r._zod.pattern instanceof RegExp ? r._zod.pattern.source : r._zod.pattern;
|
|
2091
|
+
if (!o)
|
|
2092
|
+
throw new Error(`Invalid template literal part: ${r._zod.traits}`);
|
|
2093
|
+
const i = o.startsWith("^") ? 1 : 0, s = o.endsWith("$") ? o.length - 1 : o.length;
|
|
2094
|
+
t.push(o.slice(i, s));
|
|
2095
|
+
} else if (r === null || ci.has(typeof r))
|
|
2096
|
+
t.push(R(`${r}`));
|
|
2097
|
+
else
|
|
2098
|
+
throw new Error(`Invalid template literal part: ${r}`);
|
|
2099
|
+
e._zod.pattern = new RegExp(`^${t.join("")}$`), e._zod.parse = (r, o) => typeof r.value != "string" ? (r.issues.push({
|
|
2100
|
+
input: r.value,
|
|
2101
|
+
inst: e,
|
|
2102
|
+
expected: "string",
|
|
2103
|
+
code: "invalid_type"
|
|
2104
|
+
}), r) : (e._zod.pattern.lastIndex = 0, e._zod.pattern.test(r.value) || r.issues.push({
|
|
2105
|
+
input: r.value,
|
|
2106
|
+
inst: e,
|
|
2107
|
+
code: "invalid_format",
|
|
2108
|
+
format: n.format ?? "template_literal",
|
|
2109
|
+
pattern: e._zod.pattern.source
|
|
2110
|
+
}), r);
|
|
2111
|
+
}), Tc = /* @__PURE__ */ u("$ZodFunction", (e, n) => (_.init(e, n), e._def = n, e._zod.def = n, e.implement = (t) => {
|
|
2112
|
+
if (typeof t != "function")
|
|
2113
|
+
throw new Error("implement() must be called with a function");
|
|
2114
|
+
return function(...r) {
|
|
2115
|
+
const o = e._def.input ? Nn(e._def.input, r) : r, i = Reflect.apply(t, this, o);
|
|
2116
|
+
return e._def.output ? Nn(e._def.output, i) : i;
|
|
2117
|
+
};
|
|
2118
|
+
}, e.implementAsync = (t) => {
|
|
2119
|
+
if (typeof t != "function")
|
|
2120
|
+
throw new Error("implementAsync() must be called with a function");
|
|
2121
|
+
return async function(...r) {
|
|
2122
|
+
const o = e._def.input ? await An(e._def.input, r) : r, i = await Reflect.apply(t, this, o);
|
|
2123
|
+
return e._def.output ? await An(e._def.output, i) : i;
|
|
2124
|
+
};
|
|
2125
|
+
}, e._zod.parse = (t, r) => typeof t.value != "function" ? (t.issues.push({
|
|
2126
|
+
code: "invalid_type",
|
|
2127
|
+
expected: "function",
|
|
2128
|
+
input: t.value,
|
|
2129
|
+
inst: e
|
|
2130
|
+
}), t) : (e._def.output && e._def.output._zod.def.type === "promise" ? t.value = e.implementAsync(t.value) : t.value = e.implement(t.value), t), e.input = (...t) => {
|
|
2131
|
+
const r = e.constructor;
|
|
2132
|
+
return Array.isArray(t[0]) ? new r({
|
|
2133
|
+
type: "function",
|
|
2134
|
+
input: new Vt({
|
|
2135
|
+
type: "tuple",
|
|
2136
|
+
items: t[0],
|
|
2137
|
+
rest: t[1]
|
|
2138
|
+
}),
|
|
2139
|
+
output: e._def.output
|
|
2140
|
+
}) : new r({
|
|
2141
|
+
type: "function",
|
|
2142
|
+
input: t[0],
|
|
2143
|
+
output: e._def.output
|
|
2144
|
+
});
|
|
2145
|
+
}, e.output = (t) => {
|
|
2146
|
+
const r = e.constructor;
|
|
2147
|
+
return new r({
|
|
2148
|
+
type: "function",
|
|
2149
|
+
input: e._def.input,
|
|
2150
|
+
output: t
|
|
2151
|
+
});
|
|
2152
|
+
}, e)), Ic = /* @__PURE__ */ u("$ZodPromise", (e, n) => {
|
|
2153
|
+
_.init(e, n), e._zod.parse = (t, r) => Promise.resolve(t.value).then((o) => n.innerType._zod.run({ value: o, issues: [] }, r));
|
|
2154
|
+
}), Pc = /* @__PURE__ */ u("$ZodLazy", (e, n) => {
|
|
2155
|
+
_.init(e, n), v(e._zod, "innerType", () => n.getter()), v(e._zod, "pattern", () => e._zod.innerType?._zod?.pattern), v(e._zod, "propValues", () => e._zod.innerType?._zod?.propValues), v(e._zod, "optin", () => e._zod.innerType?._zod?.optin ?? void 0), v(e._zod, "optout", () => e._zod.innerType?._zod?.optout ?? void 0), e._zod.parse = (t, r) => e._zod.innerType._zod.run(t, r);
|
|
2156
|
+
}), Ec = /* @__PURE__ */ u("$ZodCustom", (e, n) => {
|
|
2157
|
+
w.init(e, n), _.init(e, n), e._zod.parse = (t, r) => t, e._zod.check = (t) => {
|
|
2158
|
+
const r = t.value, o = n.fn(r);
|
|
2159
|
+
if (o instanceof Promise)
|
|
2160
|
+
return o.then((i) => Bn(i, t, r, e));
|
|
2161
|
+
Bn(o, t, r, e);
|
|
2162
|
+
};
|
|
2163
|
+
});
|
|
2164
|
+
function Bn(e, n, t, r) {
|
|
2165
|
+
if (!e) {
|
|
2166
|
+
const o = {
|
|
2167
|
+
code: "custom",
|
|
2168
|
+
input: t,
|
|
2169
|
+
inst: r,
|
|
2170
|
+
// incorporates params.error into issue reporting
|
|
2171
|
+
path: [...r._zod.def.path ?? []],
|
|
2172
|
+
// incorporates params.error into issue reporting
|
|
2173
|
+
continue: !r._zod.def.abort
|
|
2174
|
+
// params: inst._zod.def.params,
|
|
2175
|
+
};
|
|
2176
|
+
r._zod.def.params && (o.params = r._zod.def.params), n.issues.push(q(o));
|
|
2177
|
+
}
|
|
2178
|
+
}
|
|
2179
|
+
var Wn;
|
|
2180
|
+
class Nc {
|
|
2181
|
+
constructor() {
|
|
2182
|
+
this._map = /* @__PURE__ */ new WeakMap(), this._idmap = /* @__PURE__ */ new Map();
|
|
2183
|
+
}
|
|
2184
|
+
add(n, ...t) {
|
|
2185
|
+
const r = t[0];
|
|
2186
|
+
return this._map.set(n, r), r && typeof r == "object" && "id" in r && this._idmap.set(r.id, n), this;
|
|
2187
|
+
}
|
|
2188
|
+
clear() {
|
|
2189
|
+
return this._map = /* @__PURE__ */ new WeakMap(), this._idmap = /* @__PURE__ */ new Map(), this;
|
|
2190
|
+
}
|
|
2191
|
+
remove(n) {
|
|
2192
|
+
const t = this._map.get(n);
|
|
2193
|
+
return t && typeof t == "object" && "id" in t && this._idmap.delete(t.id), this._map.delete(n), this;
|
|
2194
|
+
}
|
|
2195
|
+
get(n) {
|
|
2196
|
+
const t = n._zod.parent;
|
|
2197
|
+
if (t) {
|
|
2198
|
+
const r = { ...this.get(t) ?? {} };
|
|
2199
|
+
delete r.id;
|
|
2200
|
+
const o = { ...r, ...this._map.get(n) };
|
|
2201
|
+
return Object.keys(o).length ? o : void 0;
|
|
2202
|
+
}
|
|
2203
|
+
return this._map.get(n);
|
|
2204
|
+
}
|
|
2205
|
+
has(n) {
|
|
2206
|
+
return this._map.has(n);
|
|
2207
|
+
}
|
|
2208
|
+
}
|
|
2209
|
+
function Ac() {
|
|
2210
|
+
return new Nc();
|
|
2211
|
+
}
|
|
2212
|
+
(Wn = globalThis).__zod_globalRegistry ?? (Wn.__zod_globalRegistry = Ac());
|
|
2213
|
+
const j = globalThis.__zod_globalRegistry;
|
|
2214
|
+
// @__NO_SIDE_EFFECTS__
|
|
2215
|
+
function jc(e, n) {
|
|
2216
|
+
return new e({
|
|
2217
|
+
type: "string",
|
|
2218
|
+
...p(n)
|
|
2219
|
+
});
|
|
2220
|
+
}
|
|
2221
|
+
// @__NO_SIDE_EFFECTS__
|
|
2222
|
+
function Kt(e, n) {
|
|
2223
|
+
return new e({
|
|
2224
|
+
type: "string",
|
|
2225
|
+
format: "email",
|
|
2226
|
+
check: "string_format",
|
|
2227
|
+
abort: !1,
|
|
2228
|
+
...p(n)
|
|
2229
|
+
});
|
|
2230
|
+
}
|
|
2231
|
+
// @__NO_SIDE_EFFECTS__
|
|
2232
|
+
function Re(e, n) {
|
|
2233
|
+
return new e({
|
|
2234
|
+
type: "string",
|
|
2235
|
+
format: "guid",
|
|
2236
|
+
check: "string_format",
|
|
2237
|
+
abort: !1,
|
|
2238
|
+
...p(n)
|
|
2239
|
+
});
|
|
2240
|
+
}
|
|
2241
|
+
// @__NO_SIDE_EFFECTS__
|
|
2242
|
+
function Gt(e, n) {
|
|
2243
|
+
return new e({
|
|
2244
|
+
type: "string",
|
|
2245
|
+
format: "uuid",
|
|
2246
|
+
check: "string_format",
|
|
2247
|
+
abort: !1,
|
|
2248
|
+
...p(n)
|
|
2249
|
+
});
|
|
2250
|
+
}
|
|
2251
|
+
// @__NO_SIDE_EFFECTS__
|
|
2252
|
+
function Yt(e, n) {
|
|
2253
|
+
return new e({
|
|
2254
|
+
type: "string",
|
|
2255
|
+
format: "uuid",
|
|
2256
|
+
check: "string_format",
|
|
2257
|
+
abort: !1,
|
|
2258
|
+
version: "v4",
|
|
2259
|
+
...p(n)
|
|
2260
|
+
});
|
|
2261
|
+
}
|
|
2262
|
+
// @__NO_SIDE_EFFECTS__
|
|
2263
|
+
function qt(e, n) {
|
|
2264
|
+
return new e({
|
|
2265
|
+
type: "string",
|
|
2266
|
+
format: "uuid",
|
|
2267
|
+
check: "string_format",
|
|
2268
|
+
abort: !1,
|
|
2269
|
+
version: "v6",
|
|
2270
|
+
...p(n)
|
|
2271
|
+
});
|
|
2272
|
+
}
|
|
2273
|
+
// @__NO_SIDE_EFFECTS__
|
|
2274
|
+
function Xt(e, n) {
|
|
2275
|
+
return new e({
|
|
2276
|
+
type: "string",
|
|
2277
|
+
format: "uuid",
|
|
2278
|
+
check: "string_format",
|
|
2279
|
+
abort: !1,
|
|
2280
|
+
version: "v7",
|
|
2281
|
+
...p(n)
|
|
2282
|
+
});
|
|
2283
|
+
}
|
|
2284
|
+
// @__NO_SIDE_EFFECTS__
|
|
2285
|
+
function Ye(e, n) {
|
|
2286
|
+
return new e({
|
|
2287
|
+
type: "string",
|
|
2288
|
+
format: "url",
|
|
2289
|
+
check: "string_format",
|
|
2290
|
+
abort: !1,
|
|
2291
|
+
...p(n)
|
|
2292
|
+
});
|
|
2293
|
+
}
|
|
2294
|
+
// @__NO_SIDE_EFFECTS__
|
|
2295
|
+
function Ht(e, n) {
|
|
2296
|
+
return new e({
|
|
2297
|
+
type: "string",
|
|
2298
|
+
format: "emoji",
|
|
2299
|
+
check: "string_format",
|
|
2300
|
+
abort: !1,
|
|
2301
|
+
...p(n)
|
|
2302
|
+
});
|
|
2303
|
+
}
|
|
2304
|
+
// @__NO_SIDE_EFFECTS__
|
|
2305
|
+
function Qt(e, n) {
|
|
2306
|
+
return new e({
|
|
2307
|
+
type: "string",
|
|
2308
|
+
format: "nanoid",
|
|
2309
|
+
check: "string_format",
|
|
2310
|
+
abort: !1,
|
|
2311
|
+
...p(n)
|
|
2312
|
+
});
|
|
2313
|
+
}
|
|
2314
|
+
// @__NO_SIDE_EFFECTS__
|
|
2315
|
+
function er(e, n) {
|
|
2316
|
+
return new e({
|
|
2317
|
+
type: "string",
|
|
2318
|
+
format: "cuid",
|
|
2319
|
+
check: "string_format",
|
|
2320
|
+
abort: !1,
|
|
2321
|
+
...p(n)
|
|
2322
|
+
});
|
|
2323
|
+
}
|
|
2324
|
+
// @__NO_SIDE_EFFECTS__
|
|
2325
|
+
function nr(e, n) {
|
|
2326
|
+
return new e({
|
|
2327
|
+
type: "string",
|
|
2328
|
+
format: "cuid2",
|
|
2329
|
+
check: "string_format",
|
|
2330
|
+
abort: !1,
|
|
2331
|
+
...p(n)
|
|
2332
|
+
});
|
|
2333
|
+
}
|
|
2334
|
+
// @__NO_SIDE_EFFECTS__
|
|
2335
|
+
function tr(e, n) {
|
|
2336
|
+
return new e({
|
|
2337
|
+
type: "string",
|
|
2338
|
+
format: "ulid",
|
|
2339
|
+
check: "string_format",
|
|
2340
|
+
abort: !1,
|
|
2341
|
+
...p(n)
|
|
2342
|
+
});
|
|
2343
|
+
}
|
|
2344
|
+
// @__NO_SIDE_EFFECTS__
|
|
2345
|
+
function rr(e, n) {
|
|
2346
|
+
return new e({
|
|
2347
|
+
type: "string",
|
|
2348
|
+
format: "xid",
|
|
2349
|
+
check: "string_format",
|
|
2350
|
+
abort: !1,
|
|
2351
|
+
...p(n)
|
|
2352
|
+
});
|
|
2353
|
+
}
|
|
2354
|
+
// @__NO_SIDE_EFFECTS__
|
|
2355
|
+
function or(e, n) {
|
|
2356
|
+
return new e({
|
|
2357
|
+
type: "string",
|
|
2358
|
+
format: "ksuid",
|
|
2359
|
+
check: "string_format",
|
|
2360
|
+
abort: !1,
|
|
2361
|
+
...p(n)
|
|
2362
|
+
});
|
|
2363
|
+
}
|
|
2364
|
+
// @__NO_SIDE_EFFECTS__
|
|
2365
|
+
function ir(e, n) {
|
|
2366
|
+
return new e({
|
|
2367
|
+
type: "string",
|
|
2368
|
+
format: "ipv4",
|
|
2369
|
+
check: "string_format",
|
|
2370
|
+
abort: !1,
|
|
2371
|
+
...p(n)
|
|
2372
|
+
});
|
|
2373
|
+
}
|
|
2374
|
+
// @__NO_SIDE_EFFECTS__
|
|
2375
|
+
function sr(e, n) {
|
|
2376
|
+
return new e({
|
|
2377
|
+
type: "string",
|
|
2378
|
+
format: "ipv6",
|
|
2379
|
+
check: "string_format",
|
|
2380
|
+
abort: !1,
|
|
2381
|
+
...p(n)
|
|
2382
|
+
});
|
|
2383
|
+
}
|
|
2384
|
+
// @__NO_SIDE_EFFECTS__
|
|
2385
|
+
function xc(e, n) {
|
|
2386
|
+
return new e({
|
|
2387
|
+
type: "string",
|
|
2388
|
+
format: "mac",
|
|
2389
|
+
check: "string_format",
|
|
2390
|
+
abort: !1,
|
|
2391
|
+
...p(n)
|
|
2392
|
+
});
|
|
2393
|
+
}
|
|
2394
|
+
// @__NO_SIDE_EFFECTS__
|
|
2395
|
+
function cr(e, n) {
|
|
2396
|
+
return new e({
|
|
2397
|
+
type: "string",
|
|
2398
|
+
format: "cidrv4",
|
|
2399
|
+
check: "string_format",
|
|
2400
|
+
abort: !1,
|
|
2401
|
+
...p(n)
|
|
2402
|
+
});
|
|
2403
|
+
}
|
|
2404
|
+
// @__NO_SIDE_EFFECTS__
|
|
2405
|
+
function ur(e, n) {
|
|
2406
|
+
return new e({
|
|
2407
|
+
type: "string",
|
|
2408
|
+
format: "cidrv6",
|
|
2409
|
+
check: "string_format",
|
|
2410
|
+
abort: !1,
|
|
2411
|
+
...p(n)
|
|
2412
|
+
});
|
|
2413
|
+
}
|
|
2414
|
+
// @__NO_SIDE_EFFECTS__
|
|
2415
|
+
function ar(e, n) {
|
|
2416
|
+
return new e({
|
|
2417
|
+
type: "string",
|
|
2418
|
+
format: "base64",
|
|
2419
|
+
check: "string_format",
|
|
2420
|
+
abort: !1,
|
|
2421
|
+
...p(n)
|
|
2422
|
+
});
|
|
2423
|
+
}
|
|
2424
|
+
// @__NO_SIDE_EFFECTS__
|
|
2425
|
+
function lr(e, n) {
|
|
2426
|
+
return new e({
|
|
2427
|
+
type: "string",
|
|
2428
|
+
format: "base64url",
|
|
2429
|
+
check: "string_format",
|
|
2430
|
+
abort: !1,
|
|
2431
|
+
...p(n)
|
|
2432
|
+
});
|
|
2433
|
+
}
|
|
2434
|
+
// @__NO_SIDE_EFFECTS__
|
|
2435
|
+
function fr(e, n) {
|
|
2436
|
+
return new e({
|
|
2437
|
+
type: "string",
|
|
2438
|
+
format: "e164",
|
|
2439
|
+
check: "string_format",
|
|
2440
|
+
abort: !1,
|
|
2441
|
+
...p(n)
|
|
2442
|
+
});
|
|
2443
|
+
}
|
|
2444
|
+
// @__NO_SIDE_EFFECTS__
|
|
2445
|
+
function pr(e, n) {
|
|
2446
|
+
return new e({
|
|
2447
|
+
type: "string",
|
|
2448
|
+
format: "jwt",
|
|
2449
|
+
check: "string_format",
|
|
2450
|
+
abort: !1,
|
|
2451
|
+
...p(n)
|
|
2452
|
+
});
|
|
2453
|
+
}
|
|
2454
|
+
// @__NO_SIDE_EFFECTS__
|
|
2455
|
+
function Cc(e, n) {
|
|
2456
|
+
return new e({
|
|
2457
|
+
type: "string",
|
|
2458
|
+
format: "datetime",
|
|
2459
|
+
check: "string_format",
|
|
2460
|
+
offset: !1,
|
|
2461
|
+
local: !1,
|
|
2462
|
+
precision: null,
|
|
2463
|
+
...p(n)
|
|
2464
|
+
});
|
|
2465
|
+
}
|
|
2466
|
+
// @__NO_SIDE_EFFECTS__
|
|
2467
|
+
function Dc(e, n) {
|
|
2468
|
+
return new e({
|
|
2469
|
+
type: "string",
|
|
2470
|
+
format: "date",
|
|
2471
|
+
check: "string_format",
|
|
2472
|
+
...p(n)
|
|
2473
|
+
});
|
|
2474
|
+
}
|
|
2475
|
+
// @__NO_SIDE_EFFECTS__
|
|
2476
|
+
function Rc(e, n) {
|
|
2477
|
+
return new e({
|
|
2478
|
+
type: "string",
|
|
2479
|
+
format: "time",
|
|
2480
|
+
check: "string_format",
|
|
2481
|
+
precision: null,
|
|
2482
|
+
...p(n)
|
|
2483
|
+
});
|
|
2484
|
+
}
|
|
2485
|
+
// @__NO_SIDE_EFFECTS__
|
|
2486
|
+
function Fc(e, n) {
|
|
2487
|
+
return new e({
|
|
2488
|
+
type: "string",
|
|
2489
|
+
format: "duration",
|
|
2490
|
+
check: "string_format",
|
|
2491
|
+
...p(n)
|
|
2492
|
+
});
|
|
2493
|
+
}
|
|
2494
|
+
// @__NO_SIDE_EFFECTS__
|
|
2495
|
+
function Jc(e, n) {
|
|
2496
|
+
return new e({
|
|
2497
|
+
type: "number",
|
|
2498
|
+
checks: [],
|
|
2499
|
+
...p(n)
|
|
2500
|
+
});
|
|
2501
|
+
}
|
|
2502
|
+
// @__NO_SIDE_EFFECTS__
|
|
2503
|
+
function Uc(e, n) {
|
|
2504
|
+
return new e({
|
|
2505
|
+
type: "number",
|
|
2506
|
+
check: "number_format",
|
|
2507
|
+
abort: !1,
|
|
2508
|
+
format: "safeint",
|
|
2509
|
+
...p(n)
|
|
2510
|
+
});
|
|
2511
|
+
}
|
|
2512
|
+
// @__NO_SIDE_EFFECTS__
|
|
2513
|
+
function Mc(e, n) {
|
|
2514
|
+
return new e({
|
|
2515
|
+
type: "number",
|
|
2516
|
+
check: "number_format",
|
|
2517
|
+
abort: !1,
|
|
2518
|
+
format: "float32",
|
|
2519
|
+
...p(n)
|
|
2520
|
+
});
|
|
2521
|
+
}
|
|
2522
|
+
// @__NO_SIDE_EFFECTS__
|
|
2523
|
+
function Lc(e, n) {
|
|
2524
|
+
return new e({
|
|
2525
|
+
type: "number",
|
|
2526
|
+
check: "number_format",
|
|
2527
|
+
abort: !1,
|
|
2528
|
+
format: "float64",
|
|
2529
|
+
...p(n)
|
|
2530
|
+
});
|
|
2531
|
+
}
|
|
2532
|
+
// @__NO_SIDE_EFFECTS__
|
|
2533
|
+
function Vc(e, n) {
|
|
2534
|
+
return new e({
|
|
2535
|
+
type: "number",
|
|
2536
|
+
check: "number_format",
|
|
2537
|
+
abort: !1,
|
|
2538
|
+
format: "int32",
|
|
2539
|
+
...p(n)
|
|
2540
|
+
});
|
|
2541
|
+
}
|
|
2542
|
+
// @__NO_SIDE_EFFECTS__
|
|
2543
|
+
function Bc(e, n) {
|
|
2544
|
+
return new e({
|
|
2545
|
+
type: "number",
|
|
2546
|
+
check: "number_format",
|
|
2547
|
+
abort: !1,
|
|
2548
|
+
format: "uint32",
|
|
2549
|
+
...p(n)
|
|
2550
|
+
});
|
|
2551
|
+
}
|
|
2552
|
+
// @__NO_SIDE_EFFECTS__
|
|
2553
|
+
function Wc(e, n) {
|
|
2554
|
+
return new e({
|
|
2555
|
+
type: "boolean",
|
|
2556
|
+
...p(n)
|
|
2557
|
+
});
|
|
2558
|
+
}
|
|
2559
|
+
// @__NO_SIDE_EFFECTS__
|
|
2560
|
+
function Kc(e, n) {
|
|
2561
|
+
return new e({
|
|
2562
|
+
type: "bigint",
|
|
2563
|
+
...p(n)
|
|
2564
|
+
});
|
|
2565
|
+
}
|
|
2566
|
+
// @__NO_SIDE_EFFECTS__
|
|
2567
|
+
function Gc(e, n) {
|
|
2568
|
+
return new e({
|
|
2569
|
+
type: "bigint",
|
|
2570
|
+
check: "bigint_format",
|
|
2571
|
+
abort: !1,
|
|
2572
|
+
format: "int64",
|
|
2573
|
+
...p(n)
|
|
2574
|
+
});
|
|
2575
|
+
}
|
|
2576
|
+
// @__NO_SIDE_EFFECTS__
|
|
2577
|
+
function Yc(e, n) {
|
|
2578
|
+
return new e({
|
|
2579
|
+
type: "bigint",
|
|
2580
|
+
check: "bigint_format",
|
|
2581
|
+
abort: !1,
|
|
2582
|
+
format: "uint64",
|
|
2583
|
+
...p(n)
|
|
2584
|
+
});
|
|
2585
|
+
}
|
|
2586
|
+
// @__NO_SIDE_EFFECTS__
|
|
2587
|
+
function qc(e, n) {
|
|
2588
|
+
return new e({
|
|
2589
|
+
type: "symbol",
|
|
2590
|
+
...p(n)
|
|
2591
|
+
});
|
|
2592
|
+
}
|
|
2593
|
+
// @__NO_SIDE_EFFECTS__
|
|
2594
|
+
function Xc(e, n) {
|
|
2595
|
+
return new e({
|
|
2596
|
+
type: "undefined",
|
|
2597
|
+
...p(n)
|
|
2598
|
+
});
|
|
2599
|
+
}
|
|
2600
|
+
// @__NO_SIDE_EFFECTS__
|
|
2601
|
+
function Hc(e, n) {
|
|
2602
|
+
return new e({
|
|
2603
|
+
type: "null",
|
|
2604
|
+
...p(n)
|
|
2605
|
+
});
|
|
2606
|
+
}
|
|
2607
|
+
// @__NO_SIDE_EFFECTS__
|
|
2608
|
+
function Qc(e) {
|
|
2609
|
+
return new e({
|
|
2610
|
+
type: "any"
|
|
2611
|
+
});
|
|
2612
|
+
}
|
|
2613
|
+
// @__NO_SIDE_EFFECTS__
|
|
2614
|
+
function eu(e) {
|
|
2615
|
+
return new e({
|
|
2616
|
+
type: "unknown"
|
|
2617
|
+
});
|
|
2618
|
+
}
|
|
2619
|
+
// @__NO_SIDE_EFFECTS__
|
|
2620
|
+
function nu(e, n) {
|
|
2621
|
+
return new e({
|
|
2622
|
+
type: "never",
|
|
2623
|
+
...p(n)
|
|
2624
|
+
});
|
|
2625
|
+
}
|
|
2626
|
+
// @__NO_SIDE_EFFECTS__
|
|
2627
|
+
function tu(e, n) {
|
|
2628
|
+
return new e({
|
|
2629
|
+
type: "void",
|
|
2630
|
+
...p(n)
|
|
2631
|
+
});
|
|
2632
|
+
}
|
|
2633
|
+
// @__NO_SIDE_EFFECTS__
|
|
2634
|
+
function ru(e, n) {
|
|
2635
|
+
return new e({
|
|
2636
|
+
type: "date",
|
|
2637
|
+
...p(n)
|
|
2638
|
+
});
|
|
2639
|
+
}
|
|
2640
|
+
// @__NO_SIDE_EFFECTS__
|
|
2641
|
+
function ou(e, n) {
|
|
2642
|
+
return new e({
|
|
2643
|
+
type: "nan",
|
|
2644
|
+
...p(n)
|
|
2645
|
+
});
|
|
2646
|
+
}
|
|
2647
|
+
// @__NO_SIDE_EFFECTS__
|
|
2648
|
+
function X(e, n) {
|
|
2649
|
+
return new Ct({
|
|
2650
|
+
check: "less_than",
|
|
2651
|
+
...p(n),
|
|
2652
|
+
value: e,
|
|
2653
|
+
inclusive: !1
|
|
2654
|
+
});
|
|
2655
|
+
}
|
|
2656
|
+
// @__NO_SIDE_EFFECTS__
|
|
2657
|
+
function D(e, n) {
|
|
2658
|
+
return new Ct({
|
|
2659
|
+
check: "less_than",
|
|
2660
|
+
...p(n),
|
|
2661
|
+
value: e,
|
|
2662
|
+
inclusive: !0
|
|
2663
|
+
});
|
|
2664
|
+
}
|
|
2665
|
+
// @__NO_SIDE_EFFECTS__
|
|
2666
|
+
function H(e, n) {
|
|
2667
|
+
return new Dt({
|
|
2668
|
+
check: "greater_than",
|
|
2669
|
+
...p(n),
|
|
2670
|
+
value: e,
|
|
2671
|
+
inclusive: !1
|
|
2672
|
+
});
|
|
2673
|
+
}
|
|
2674
|
+
// @__NO_SIDE_EFFECTS__
|
|
2675
|
+
function N(e, n) {
|
|
2676
|
+
return new Dt({
|
|
2677
|
+
check: "greater_than",
|
|
2678
|
+
...p(n),
|
|
2679
|
+
value: e,
|
|
2680
|
+
inclusive: !0
|
|
2681
|
+
});
|
|
2682
|
+
}
|
|
2683
|
+
// @__NO_SIDE_EFFECTS__
|
|
2684
|
+
function el(e) {
|
|
2685
|
+
return /* @__PURE__ */ H(0, e);
|
|
2686
|
+
}
|
|
2687
|
+
// @__NO_SIDE_EFFECTS__
|
|
2688
|
+
function nl(e) {
|
|
2689
|
+
return /* @__PURE__ */ X(0, e);
|
|
2690
|
+
}
|
|
2691
|
+
// @__NO_SIDE_EFFECTS__
|
|
2692
|
+
function tl(e) {
|
|
2693
|
+
return /* @__PURE__ */ D(0, e);
|
|
2694
|
+
}
|
|
2695
|
+
// @__NO_SIDE_EFFECTS__
|
|
2696
|
+
function rl(e) {
|
|
2697
|
+
return /* @__PURE__ */ N(0, e);
|
|
2698
|
+
}
|
|
2699
|
+
// @__NO_SIDE_EFFECTS__
|
|
2700
|
+
function Fe(e, n) {
|
|
2701
|
+
return new ns({
|
|
2702
|
+
check: "multiple_of",
|
|
2703
|
+
...p(n),
|
|
2704
|
+
value: e
|
|
2705
|
+
});
|
|
2706
|
+
}
|
|
2707
|
+
// @__NO_SIDE_EFFECTS__
|
|
2708
|
+
function qe(e, n) {
|
|
2709
|
+
return new os({
|
|
2710
|
+
check: "max_size",
|
|
2711
|
+
...p(n),
|
|
2712
|
+
maximum: e
|
|
2713
|
+
});
|
|
2714
|
+
}
|
|
2715
|
+
// @__NO_SIDE_EFFECTS__
|
|
2716
|
+
function Q(e, n) {
|
|
2717
|
+
return new is({
|
|
2718
|
+
check: "min_size",
|
|
2719
|
+
...p(n),
|
|
2720
|
+
minimum: e
|
|
2721
|
+
});
|
|
2722
|
+
}
|
|
2723
|
+
// @__NO_SIDE_EFFECTS__
|
|
2724
|
+
function dr(e, n) {
|
|
2725
|
+
return new ss({
|
|
2726
|
+
check: "size_equals",
|
|
2727
|
+
...p(n),
|
|
2728
|
+
size: e
|
|
2729
|
+
});
|
|
2730
|
+
}
|
|
2731
|
+
// @__NO_SIDE_EFFECTS__
|
|
2732
|
+
function mr(e, n) {
|
|
2733
|
+
return new cs({
|
|
2734
|
+
check: "max_length",
|
|
2735
|
+
...p(n),
|
|
2736
|
+
maximum: e
|
|
2737
|
+
});
|
|
2738
|
+
}
|
|
2739
|
+
// @__NO_SIDE_EFFECTS__
|
|
2740
|
+
function fe(e, n) {
|
|
2741
|
+
return new us({
|
|
2742
|
+
check: "min_length",
|
|
2743
|
+
...p(n),
|
|
2744
|
+
minimum: e
|
|
2745
|
+
});
|
|
2746
|
+
}
|
|
2747
|
+
// @__NO_SIDE_EFFECTS__
|
|
2748
|
+
function hr(e, n) {
|
|
2749
|
+
return new as({
|
|
2750
|
+
check: "length_equals",
|
|
2751
|
+
...p(n),
|
|
2752
|
+
length: e
|
|
2753
|
+
});
|
|
2754
|
+
}
|
|
2755
|
+
// @__NO_SIDE_EFFECTS__
|
|
2756
|
+
function iu(e, n) {
|
|
2757
|
+
return new ls({
|
|
2758
|
+
check: "string_format",
|
|
2759
|
+
format: "regex",
|
|
2760
|
+
...p(n),
|
|
2761
|
+
pattern: e
|
|
2762
|
+
});
|
|
2763
|
+
}
|
|
2764
|
+
// @__NO_SIDE_EFFECTS__
|
|
2765
|
+
function su(e) {
|
|
2766
|
+
return new fs({
|
|
2767
|
+
check: "string_format",
|
|
2768
|
+
format: "lowercase",
|
|
2769
|
+
...p(e)
|
|
2770
|
+
});
|
|
2771
|
+
}
|
|
2772
|
+
// @__NO_SIDE_EFFECTS__
|
|
2773
|
+
function cu(e) {
|
|
2774
|
+
return new ps({
|
|
2775
|
+
check: "string_format",
|
|
2776
|
+
format: "uppercase",
|
|
2777
|
+
...p(e)
|
|
2778
|
+
});
|
|
2779
|
+
}
|
|
2780
|
+
// @__NO_SIDE_EFFECTS__
|
|
2781
|
+
function uu(e, n) {
|
|
2782
|
+
return new ds({
|
|
2783
|
+
check: "string_format",
|
|
2784
|
+
format: "includes",
|
|
2785
|
+
...p(n),
|
|
2786
|
+
includes: e
|
|
2787
|
+
});
|
|
2788
|
+
}
|
|
2789
|
+
// @__NO_SIDE_EFFECTS__
|
|
2790
|
+
function au(e, n) {
|
|
2791
|
+
return new ms({
|
|
2792
|
+
check: "string_format",
|
|
2793
|
+
format: "starts_with",
|
|
2794
|
+
...p(n),
|
|
2795
|
+
prefix: e
|
|
2796
|
+
});
|
|
2797
|
+
}
|
|
2798
|
+
// @__NO_SIDE_EFFECTS__
|
|
2799
|
+
function lu(e, n) {
|
|
2800
|
+
return new hs({
|
|
2801
|
+
check: "string_format",
|
|
2802
|
+
format: "ends_with",
|
|
2803
|
+
...p(n),
|
|
2804
|
+
suffix: e
|
|
2805
|
+
});
|
|
2806
|
+
}
|
|
2807
|
+
// @__NO_SIDE_EFFECTS__
|
|
2808
|
+
function ol(e, n, t) {
|
|
2809
|
+
return new _s({
|
|
2810
|
+
check: "property",
|
|
2811
|
+
property: e,
|
|
2812
|
+
schema: n,
|
|
2813
|
+
...p(t)
|
|
2814
|
+
});
|
|
2815
|
+
}
|
|
2816
|
+
// @__NO_SIDE_EFFECTS__
|
|
2817
|
+
function fu(e, n) {
|
|
2818
|
+
return new gs({
|
|
2819
|
+
check: "mime_type",
|
|
2820
|
+
mime: e,
|
|
2821
|
+
...p(n)
|
|
2822
|
+
});
|
|
2823
|
+
}
|
|
2824
|
+
// @__NO_SIDE_EFFECTS__
|
|
2825
|
+
function K(e) {
|
|
2826
|
+
return new vs({
|
|
2827
|
+
check: "overwrite",
|
|
2828
|
+
tx: e
|
|
2829
|
+
});
|
|
2830
|
+
}
|
|
2831
|
+
// @__NO_SIDE_EFFECTS__
|
|
2832
|
+
function pu(e) {
|
|
2833
|
+
return /* @__PURE__ */ K((n) => n.normalize(e));
|
|
2834
|
+
}
|
|
2835
|
+
// @__NO_SIDE_EFFECTS__
|
|
2836
|
+
function du() {
|
|
2837
|
+
return /* @__PURE__ */ K((e) => e.trim());
|
|
2838
|
+
}
|
|
2839
|
+
// @__NO_SIDE_EFFECTS__
|
|
2840
|
+
function mu() {
|
|
2841
|
+
return /* @__PURE__ */ K((e) => e.toLowerCase());
|
|
2842
|
+
}
|
|
2843
|
+
// @__NO_SIDE_EFFECTS__
|
|
2844
|
+
function hu() {
|
|
2845
|
+
return /* @__PURE__ */ K((e) => e.toUpperCase());
|
|
2846
|
+
}
|
|
2847
|
+
// @__NO_SIDE_EFFECTS__
|
|
2848
|
+
function _u() {
|
|
2849
|
+
return /* @__PURE__ */ K((e) => ii(e));
|
|
2850
|
+
}
|
|
2851
|
+
// @__NO_SIDE_EFFECTS__
|
|
2852
|
+
function gu(e, n, t) {
|
|
2853
|
+
return new e({
|
|
2854
|
+
type: "array",
|
|
2855
|
+
element: n,
|
|
2856
|
+
// get element() {
|
|
2857
|
+
// return element;
|
|
2858
|
+
// },
|
|
2859
|
+
...p(t)
|
|
2860
|
+
});
|
|
2861
|
+
}
|
|
2862
|
+
// @__NO_SIDE_EFFECTS__
|
|
2863
|
+
function vu(e, n) {
|
|
2864
|
+
return new e({
|
|
2865
|
+
type: "file",
|
|
2866
|
+
...p(n)
|
|
2867
|
+
});
|
|
2868
|
+
}
|
|
2869
|
+
// @__NO_SIDE_EFFECTS__
|
|
2870
|
+
function zu(e, n, t) {
|
|
2871
|
+
const r = p(t);
|
|
2872
|
+
return r.abort ?? (r.abort = !0), new e({
|
|
2873
|
+
type: "custom",
|
|
2874
|
+
check: "custom",
|
|
2875
|
+
fn: n,
|
|
2876
|
+
...r
|
|
2877
|
+
});
|
|
2878
|
+
}
|
|
2879
|
+
// @__NO_SIDE_EFFECTS__
|
|
2880
|
+
function bu(e, n, t) {
|
|
2881
|
+
return new e({
|
|
2882
|
+
type: "custom",
|
|
2883
|
+
check: "custom",
|
|
2884
|
+
fn: n,
|
|
2885
|
+
...p(t)
|
|
2886
|
+
});
|
|
2887
|
+
}
|
|
2888
|
+
// @__NO_SIDE_EFFECTS__
|
|
2889
|
+
function yu(e) {
|
|
2890
|
+
const n = /* @__PURE__ */ wu((t) => (t.addIssue = (r) => {
|
|
2891
|
+
if (typeof r == "string")
|
|
2892
|
+
t.issues.push(q(r, t.value, n._zod.def));
|
|
2893
|
+
else {
|
|
2894
|
+
const o = r;
|
|
2895
|
+
o.fatal && (o.continue = !1), o.code ?? (o.code = "custom"), o.input ?? (o.input = t.value), o.inst ?? (o.inst = n), o.continue ?? (o.continue = !n._zod.def.abort), t.issues.push(q(o));
|
|
2896
|
+
}
|
|
2897
|
+
}, e(t.value, t)));
|
|
2898
|
+
return n;
|
|
2899
|
+
}
|
|
2900
|
+
// @__NO_SIDE_EFFECTS__
|
|
2901
|
+
function wu(e, n) {
|
|
2902
|
+
const t = new w({
|
|
2903
|
+
check: "custom",
|
|
2904
|
+
...p(n)
|
|
2905
|
+
});
|
|
2906
|
+
return t._zod.check = e, t;
|
|
2907
|
+
}
|
|
2908
|
+
// @__NO_SIDE_EFFECTS__
|
|
2909
|
+
function $u(e) {
|
|
2910
|
+
const n = new w({ check: "describe" });
|
|
2911
|
+
return n._zod.onattach = [
|
|
2912
|
+
(t) => {
|
|
2913
|
+
const r = j.get(t) ?? {};
|
|
2914
|
+
j.add(t, { ...r, description: e });
|
|
2915
|
+
}
|
|
2916
|
+
], n._zod.check = () => {
|
|
2917
|
+
}, n;
|
|
2918
|
+
}
|
|
2919
|
+
// @__NO_SIDE_EFFECTS__
|
|
2920
|
+
function ku(e) {
|
|
2921
|
+
const n = new w({ check: "meta" });
|
|
2922
|
+
return n._zod.onattach = [
|
|
2923
|
+
(t) => {
|
|
2924
|
+
const r = j.get(t) ?? {};
|
|
2925
|
+
j.add(t, { ...r, ...e });
|
|
2926
|
+
}
|
|
2927
|
+
], n._zod.check = () => {
|
|
2928
|
+
}, n;
|
|
2929
|
+
}
|
|
2930
|
+
// @__NO_SIDE_EFFECTS__
|
|
2931
|
+
function Zu(e, n) {
|
|
2932
|
+
const t = p(n);
|
|
2933
|
+
let r = t.truthy ?? ["true", "1", "yes", "on", "y", "enabled"], o = t.falsy ?? ["false", "0", "no", "off", "n", "disabled"];
|
|
2934
|
+
t.case !== "sensitive" && (r = r.map((m) => typeof m == "string" ? m.toLowerCase() : m), o = o.map((m) => typeof m == "string" ? m.toLowerCase() : m));
|
|
2935
|
+
const i = new Set(r), s = new Set(o), c = e.Codec ?? Wt, a = e.Boolean ?? Jt, l = e.String ?? Oe, f = new l({ type: "string", error: t.error }), d = new a({ type: "boolean", error: t.error }), h = new c({
|
|
2936
|
+
type: "pipe",
|
|
2937
|
+
in: f,
|
|
2938
|
+
out: d,
|
|
2939
|
+
transform: ((m, k) => {
|
|
2940
|
+
let $ = m;
|
|
2941
|
+
return t.case !== "sensitive" && ($ = $.toLowerCase()), i.has($) ? !0 : s.has($) ? !1 : (k.issues.push({
|
|
2942
|
+
code: "invalid_value",
|
|
2943
|
+
expected: "stringbool",
|
|
2944
|
+
values: [...i, ...s],
|
|
2945
|
+
input: k.value,
|
|
2946
|
+
inst: h,
|
|
2947
|
+
continue: !1
|
|
2948
|
+
}), {});
|
|
2949
|
+
}),
|
|
2950
|
+
reverseTransform: ((m, k) => m === !0 ? r[0] || "true" : o[0] || "false"),
|
|
2951
|
+
error: t.error
|
|
2952
|
+
});
|
|
2953
|
+
return h;
|
|
2954
|
+
}
|
|
2955
|
+
// @__NO_SIDE_EFFECTS__
|
|
2956
|
+
function Te(e, n, t, r = {}) {
|
|
2957
|
+
const o = p(r), i = {
|
|
2958
|
+
...p(r),
|
|
2959
|
+
check: "string_format",
|
|
2960
|
+
type: "string",
|
|
2961
|
+
format: n,
|
|
2962
|
+
fn: typeof t == "function" ? t : (c) => t.test(c),
|
|
2963
|
+
...o
|
|
2964
|
+
};
|
|
2965
|
+
return t instanceof RegExp && (i.pattern = t), new e(i);
|
|
2966
|
+
}
|
|
2967
|
+
function pe(e) {
|
|
2968
|
+
let n = e?.target ?? "draft-2020-12";
|
|
2969
|
+
return n === "draft-4" && (n = "draft-04"), n === "draft-7" && (n = "draft-07"), {
|
|
2970
|
+
processors: e.processors ?? {},
|
|
2971
|
+
metadataRegistry: e?.metadata ?? j,
|
|
2972
|
+
target: n,
|
|
2973
|
+
unrepresentable: e?.unrepresentable ?? "throw",
|
|
2974
|
+
override: e?.override ?? (() => {
|
|
2975
|
+
}),
|
|
2976
|
+
io: e?.io ?? "output",
|
|
2977
|
+
counter: 0,
|
|
2978
|
+
seen: /* @__PURE__ */ new Map(),
|
|
2979
|
+
cycles: e?.cycles ?? "ref",
|
|
2980
|
+
reused: e?.reused ?? "inline",
|
|
2981
|
+
external: e?.external ?? void 0
|
|
2982
|
+
};
|
|
2983
|
+
}
|
|
2984
|
+
function z(e, n, t = { path: [], schemaPath: [] }) {
|
|
2985
|
+
var r;
|
|
2986
|
+
const o = e._zod.def, i = n.seen.get(e);
|
|
2987
|
+
if (i)
|
|
2988
|
+
return i.count++, t.schemaPath.includes(e) && (i.cycle = t.path), i.schema;
|
|
2989
|
+
const s = { schema: {}, count: 1, cycle: void 0, path: t.path };
|
|
2990
|
+
n.seen.set(e, s);
|
|
2991
|
+
const c = e._zod.toJSONSchema?.();
|
|
2992
|
+
if (c)
|
|
2993
|
+
s.schema = c;
|
|
2994
|
+
else {
|
|
2995
|
+
const f = {
|
|
2996
|
+
...t,
|
|
2997
|
+
schemaPath: [...t.schemaPath, e],
|
|
2998
|
+
path: t.path
|
|
2999
|
+
};
|
|
3000
|
+
if (e._zod.processJSONSchema)
|
|
3001
|
+
e._zod.processJSONSchema(n, s.schema, f);
|
|
3002
|
+
else {
|
|
3003
|
+
const h = s.schema, m = n.processors[o.type];
|
|
3004
|
+
if (!m)
|
|
3005
|
+
throw new Error(`[toJSONSchema]: Non-representable type encountered: ${o.type}`);
|
|
3006
|
+
m(e, n, h, f);
|
|
3007
|
+
}
|
|
3008
|
+
const d = e._zod.parent;
|
|
3009
|
+
d && (s.ref || (s.ref = d), z(d, n, f), n.seen.get(d).isParent = !0);
|
|
3010
|
+
}
|
|
3011
|
+
const a = n.metadataRegistry.get(e);
|
|
3012
|
+
return a && Object.assign(s.schema, a), n.io === "input" && Z(e) && (delete s.schema.examples, delete s.schema.default), n.io === "input" && s.schema._prefault && ((r = s.schema).default ?? (r.default = s.schema._prefault)), delete s.schema._prefault, n.seen.get(e).schema;
|
|
3013
|
+
}
|
|
3014
|
+
function de(e, n) {
|
|
3015
|
+
const t = e.seen.get(n);
|
|
3016
|
+
if (!t)
|
|
3017
|
+
throw new Error("Unprocessed schema. This is a bug in Zod.");
|
|
3018
|
+
const r = /* @__PURE__ */ new Map();
|
|
3019
|
+
for (const s of e.seen.entries()) {
|
|
3020
|
+
const c = e.metadataRegistry.get(s[0])?.id;
|
|
3021
|
+
if (c) {
|
|
3022
|
+
const a = r.get(c);
|
|
3023
|
+
if (a && a !== s[0])
|
|
3024
|
+
throw new Error(`Duplicate schema id "${c}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);
|
|
3025
|
+
r.set(c, s[0]);
|
|
3026
|
+
}
|
|
3027
|
+
}
|
|
3028
|
+
const o = (s) => {
|
|
3029
|
+
const c = e.target === "draft-2020-12" ? "$defs" : "definitions";
|
|
3030
|
+
if (e.external) {
|
|
3031
|
+
const d = e.external.registry.get(s[0])?.id, h = e.external.uri ?? ((k) => k);
|
|
3032
|
+
if (d)
|
|
3033
|
+
return { ref: h(d) };
|
|
3034
|
+
const m = s[1].defId ?? s[1].schema.id ?? `schema${e.counter++}`;
|
|
3035
|
+
return s[1].defId = m, { defId: m, ref: `${h("__shared")}#/${c}/${m}` };
|
|
3036
|
+
}
|
|
3037
|
+
if (s[1] === t)
|
|
3038
|
+
return { ref: "#" };
|
|
3039
|
+
const l = `#/${c}/`, f = s[1].schema.id ?? `__schema${e.counter++}`;
|
|
3040
|
+
return { defId: f, ref: l + f };
|
|
3041
|
+
}, i = (s) => {
|
|
3042
|
+
if (s[1].schema.$ref)
|
|
3043
|
+
return;
|
|
3044
|
+
const c = s[1], { ref: a, defId: l } = o(s);
|
|
3045
|
+
c.def = { ...c.schema }, l && (c.defId = l);
|
|
3046
|
+
const f = c.schema;
|
|
3047
|
+
for (const d in f)
|
|
3048
|
+
delete f[d];
|
|
3049
|
+
f.$ref = a;
|
|
3050
|
+
};
|
|
3051
|
+
if (e.cycles === "throw")
|
|
3052
|
+
for (const s of e.seen.entries()) {
|
|
3053
|
+
const c = s[1];
|
|
3054
|
+
if (c.cycle)
|
|
3055
|
+
throw new Error(`Cycle detected: #/${c.cycle?.join("/")}/<root>
|
|
3056
|
+
|
|
3057
|
+
Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`);
|
|
3058
|
+
}
|
|
3059
|
+
for (const s of e.seen.entries()) {
|
|
3060
|
+
const c = s[1];
|
|
3061
|
+
if (n === s[0]) {
|
|
3062
|
+
i(s);
|
|
3063
|
+
continue;
|
|
3064
|
+
}
|
|
3065
|
+
if (e.external) {
|
|
3066
|
+
const l = e.external.registry.get(s[0])?.id;
|
|
3067
|
+
if (n !== s[0] && l) {
|
|
3068
|
+
i(s);
|
|
3069
|
+
continue;
|
|
3070
|
+
}
|
|
3071
|
+
}
|
|
3072
|
+
if (e.metadataRegistry.get(s[0])?.id) {
|
|
3073
|
+
i(s);
|
|
3074
|
+
continue;
|
|
3075
|
+
}
|
|
3076
|
+
if (c.cycle) {
|
|
3077
|
+
i(s);
|
|
3078
|
+
continue;
|
|
3079
|
+
}
|
|
3080
|
+
if (c.count > 1 && e.reused === "ref") {
|
|
3081
|
+
i(s);
|
|
3082
|
+
continue;
|
|
3083
|
+
}
|
|
3084
|
+
}
|
|
3085
|
+
}
|
|
3086
|
+
function me(e, n) {
|
|
3087
|
+
const t = e.seen.get(n);
|
|
3088
|
+
if (!t)
|
|
3089
|
+
throw new Error("Unprocessed schema. This is a bug in Zod.");
|
|
3090
|
+
const r = (s) => {
|
|
3091
|
+
const c = e.seen.get(s);
|
|
3092
|
+
if (c.ref === null)
|
|
3093
|
+
return;
|
|
3094
|
+
const a = c.def ?? c.schema, l = { ...a }, f = c.ref;
|
|
3095
|
+
if (c.ref = null, f) {
|
|
3096
|
+
r(f);
|
|
3097
|
+
const h = e.seen.get(f), m = h.schema;
|
|
3098
|
+
if (m.$ref && (e.target === "draft-07" || e.target === "draft-04" || e.target === "openapi-3.0") ? (a.allOf = a.allOf ?? [], a.allOf.push(m)) : Object.assign(a, m), Object.assign(a, l), s._zod.parent === f)
|
|
3099
|
+
for (const $ in a)
|
|
3100
|
+
$ === "$ref" || $ === "allOf" || $ in l || delete a[$];
|
|
3101
|
+
if (m.$ref && h.def)
|
|
3102
|
+
for (const $ in a)
|
|
3103
|
+
$ === "$ref" || $ === "allOf" || $ in h.def && JSON.stringify(a[$]) === JSON.stringify(h.def[$]) && delete a[$];
|
|
3104
|
+
}
|
|
3105
|
+
const d = s._zod.parent;
|
|
3106
|
+
if (d && d !== f) {
|
|
3107
|
+
r(d);
|
|
3108
|
+
const h = e.seen.get(d);
|
|
3109
|
+
if (h?.schema.$ref && (a.$ref = h.schema.$ref, h.def))
|
|
3110
|
+
for (const m in a)
|
|
3111
|
+
m === "$ref" || m === "allOf" || m in h.def && JSON.stringify(a[m]) === JSON.stringify(h.def[m]) && delete a[m];
|
|
3112
|
+
}
|
|
3113
|
+
e.override({
|
|
3114
|
+
zodSchema: s,
|
|
3115
|
+
jsonSchema: a,
|
|
3116
|
+
path: c.path ?? []
|
|
3117
|
+
});
|
|
3118
|
+
};
|
|
3119
|
+
for (const s of [...e.seen.entries()].reverse())
|
|
3120
|
+
r(s[0]);
|
|
3121
|
+
const o = {};
|
|
3122
|
+
if (e.target === "draft-2020-12" ? o.$schema = "https://json-schema.org/draft/2020-12/schema" : e.target === "draft-07" ? o.$schema = "http://json-schema.org/draft-07/schema#" : e.target === "draft-04" ? o.$schema = "http://json-schema.org/draft-04/schema#" : e.target, e.external?.uri) {
|
|
3123
|
+
const s = e.external.registry.get(n)?.id;
|
|
3124
|
+
if (!s)
|
|
3125
|
+
throw new Error("Schema is missing an `id` property");
|
|
3126
|
+
o.$id = e.external.uri(s);
|
|
3127
|
+
}
|
|
3128
|
+
Object.assign(o, t.def ?? t.schema);
|
|
3129
|
+
const i = e.external?.defs ?? {};
|
|
3130
|
+
for (const s of e.seen.entries()) {
|
|
3131
|
+
const c = s[1];
|
|
3132
|
+
c.def && c.defId && (i[c.defId] = c.def);
|
|
3133
|
+
}
|
|
3134
|
+
e.external || Object.keys(i).length > 0 && (e.target === "draft-2020-12" ? o.$defs = i : o.definitions = i);
|
|
3135
|
+
try {
|
|
3136
|
+
const s = JSON.parse(JSON.stringify(o));
|
|
3137
|
+
return Object.defineProperty(s, "~standard", {
|
|
3138
|
+
value: {
|
|
3139
|
+
...n["~standard"],
|
|
3140
|
+
jsonSchema: {
|
|
3141
|
+
input: he(n, "input", e.processors),
|
|
3142
|
+
output: he(n, "output", e.processors)
|
|
3143
|
+
}
|
|
3144
|
+
},
|
|
3145
|
+
enumerable: !1,
|
|
3146
|
+
writable: !1
|
|
3147
|
+
}), s;
|
|
3148
|
+
} catch {
|
|
3149
|
+
throw new Error("Error converting schema to JSON.");
|
|
3150
|
+
}
|
|
3151
|
+
}
|
|
3152
|
+
function Z(e, n) {
|
|
3153
|
+
const t = n ?? { seen: /* @__PURE__ */ new Set() };
|
|
3154
|
+
if (t.seen.has(e))
|
|
3155
|
+
return !1;
|
|
3156
|
+
t.seen.add(e);
|
|
3157
|
+
const r = e._zod.def;
|
|
3158
|
+
if (r.type === "transform")
|
|
3159
|
+
return !0;
|
|
3160
|
+
if (r.type === "array")
|
|
3161
|
+
return Z(r.element, t);
|
|
3162
|
+
if (r.type === "set")
|
|
3163
|
+
return Z(r.valueType, t);
|
|
3164
|
+
if (r.type === "lazy")
|
|
3165
|
+
return Z(r.getter(), t);
|
|
3166
|
+
if (r.type === "promise" || r.type === "optional" || r.type === "nonoptional" || r.type === "nullable" || r.type === "readonly" || r.type === "default" || r.type === "prefault")
|
|
3167
|
+
return Z(r.innerType, t);
|
|
3168
|
+
if (r.type === "intersection")
|
|
3169
|
+
return Z(r.left, t) || Z(r.right, t);
|
|
3170
|
+
if (r.type === "record" || r.type === "map")
|
|
3171
|
+
return Z(r.keyType, t) || Z(r.valueType, t);
|
|
3172
|
+
if (r.type === "pipe")
|
|
3173
|
+
return Z(r.in, t) || Z(r.out, t);
|
|
3174
|
+
if (r.type === "object") {
|
|
3175
|
+
for (const o in r.shape)
|
|
3176
|
+
if (Z(r.shape[o], t))
|
|
3177
|
+
return !0;
|
|
3178
|
+
return !1;
|
|
3179
|
+
}
|
|
3180
|
+
if (r.type === "union") {
|
|
3181
|
+
for (const o of r.options)
|
|
3182
|
+
if (Z(o, t))
|
|
3183
|
+
return !0;
|
|
3184
|
+
return !1;
|
|
3185
|
+
}
|
|
3186
|
+
if (r.type === "tuple") {
|
|
3187
|
+
for (const o of r.items)
|
|
3188
|
+
if (Z(o, t))
|
|
3189
|
+
return !0;
|
|
3190
|
+
return !!(r.rest && Z(r.rest, t));
|
|
3191
|
+
}
|
|
3192
|
+
return !1;
|
|
3193
|
+
}
|
|
3194
|
+
const Su = (e, n = {}) => (t) => {
|
|
3195
|
+
const r = pe({ ...t, processors: n });
|
|
3196
|
+
return z(e, r), de(r, e), me(r, e);
|
|
3197
|
+
}, he = (e, n, t = {}) => (r) => {
|
|
3198
|
+
const { libraryOptions: o, target: i } = r ?? {}, s = pe({ ...o ?? {}, target: i, io: n, processors: t });
|
|
3199
|
+
return z(e, s), de(s, e), me(s, e);
|
|
3200
|
+
}, Ou = {
|
|
3201
|
+
guid: "uuid",
|
|
3202
|
+
url: "uri",
|
|
3203
|
+
datetime: "date-time",
|
|
3204
|
+
json_string: "json-string",
|
|
3205
|
+
regex: ""
|
|
3206
|
+
// do not set
|
|
3207
|
+
}, _r = (e, n, t, r) => {
|
|
3208
|
+
const o = t;
|
|
3209
|
+
o.type = "string";
|
|
3210
|
+
const { minimum: i, maximum: s, format: c, patterns: a, contentEncoding: l } = e._zod.bag;
|
|
3211
|
+
if (typeof i == "number" && (o.minLength = i), typeof s == "number" && (o.maxLength = s), c && (o.format = Ou[c] ?? c, o.format === "" && delete o.format, c === "time" && delete o.format), l && (o.contentEncoding = l), a && a.size > 0) {
|
|
3212
|
+
const f = [...a];
|
|
3213
|
+
f.length === 1 ? o.pattern = f[0].source : f.length > 1 && (o.allOf = [
|
|
3214
|
+
...f.map((d) => ({
|
|
3215
|
+
...n.target === "draft-07" || n.target === "draft-04" || n.target === "openapi-3.0" ? { type: "string" } : {},
|
|
3216
|
+
pattern: d.source
|
|
3217
|
+
}))
|
|
3218
|
+
]);
|
|
3219
|
+
}
|
|
3220
|
+
}, gr = (e, n, t, r) => {
|
|
3221
|
+
const o = t, { minimum: i, maximum: s, format: c, multipleOf: a, exclusiveMaximum: l, exclusiveMinimum: f } = e._zod.bag;
|
|
3222
|
+
typeof c == "string" && c.includes("int") ? o.type = "integer" : o.type = "number", typeof f == "number" && (n.target === "draft-04" || n.target === "openapi-3.0" ? (o.minimum = f, o.exclusiveMinimum = !0) : o.exclusiveMinimum = f), typeof i == "number" && (o.minimum = i, typeof f == "number" && n.target !== "draft-04" && (f >= i ? delete o.minimum : delete o.exclusiveMinimum)), typeof l == "number" && (n.target === "draft-04" || n.target === "openapi-3.0" ? (o.maximum = l, o.exclusiveMaximum = !0) : o.exclusiveMaximum = l), typeof s == "number" && (o.maximum = s, typeof l == "number" && n.target !== "draft-04" && (l <= s ? delete o.maximum : delete o.exclusiveMaximum)), typeof a == "number" && (o.multipleOf = a);
|
|
3223
|
+
}, vr = (e, n, t, r) => {
|
|
3224
|
+
t.type = "boolean";
|
|
3225
|
+
}, zr = (e, n, t, r) => {
|
|
3226
|
+
if (n.unrepresentable === "throw")
|
|
3227
|
+
throw new Error("BigInt cannot be represented in JSON Schema");
|
|
3228
|
+
}, br = (e, n, t, r) => {
|
|
3229
|
+
if (n.unrepresentable === "throw")
|
|
3230
|
+
throw new Error("Symbols cannot be represented in JSON Schema");
|
|
3231
|
+
}, yr = (e, n, t, r) => {
|
|
3232
|
+
n.target === "openapi-3.0" ? (t.type = "string", t.nullable = !0, t.enum = [null]) : t.type = "null";
|
|
3233
|
+
}, wr = (e, n, t, r) => {
|
|
3234
|
+
if (n.unrepresentable === "throw")
|
|
3235
|
+
throw new Error("Undefined cannot be represented in JSON Schema");
|
|
3236
|
+
}, $r = (e, n, t, r) => {
|
|
3237
|
+
if (n.unrepresentable === "throw")
|
|
3238
|
+
throw new Error("Void cannot be represented in JSON Schema");
|
|
3239
|
+
}, kr = (e, n, t, r) => {
|
|
3240
|
+
t.not = {};
|
|
3241
|
+
}, Zr = (e, n, t, r) => {
|
|
3242
|
+
}, Sr = (e, n, t, r) => {
|
|
3243
|
+
}, Or = (e, n, t, r) => {
|
|
3244
|
+
if (n.unrepresentable === "throw")
|
|
3245
|
+
throw new Error("Date cannot be represented in JSON Schema");
|
|
3246
|
+
}, Tr = (e, n, t, r) => {
|
|
3247
|
+
const o = e._zod.def, i = qn(o.entries);
|
|
3248
|
+
i.every((s) => typeof s == "number") && (t.type = "number"), i.every((s) => typeof s == "string") && (t.type = "string"), t.enum = i;
|
|
3249
|
+
}, Ir = (e, n, t, r) => {
|
|
3250
|
+
const o = e._zod.def, i = [];
|
|
3251
|
+
for (const s of o.values)
|
|
3252
|
+
if (s === void 0) {
|
|
3253
|
+
if (n.unrepresentable === "throw")
|
|
3254
|
+
throw new Error("Literal `undefined` cannot be represented in JSON Schema");
|
|
3255
|
+
} else if (typeof s == "bigint") {
|
|
3256
|
+
if (n.unrepresentable === "throw")
|
|
3257
|
+
throw new Error("BigInt literals cannot be represented in JSON Schema");
|
|
3258
|
+
i.push(Number(s));
|
|
3259
|
+
} else
|
|
3260
|
+
i.push(s);
|
|
3261
|
+
if (i.length !== 0) if (i.length === 1) {
|
|
3262
|
+
const s = i[0];
|
|
3263
|
+
t.type = s === null ? "null" : typeof s, n.target === "draft-04" || n.target === "openapi-3.0" ? t.enum = [s] : t.const = s;
|
|
3264
|
+
} else
|
|
3265
|
+
i.every((s) => typeof s == "number") && (t.type = "number"), i.every((s) => typeof s == "string") && (t.type = "string"), i.every((s) => typeof s == "boolean") && (t.type = "boolean"), i.every((s) => s === null) && (t.type = "null"), t.enum = i;
|
|
3266
|
+
}, Pr = (e, n, t, r) => {
|
|
3267
|
+
if (n.unrepresentable === "throw")
|
|
3268
|
+
throw new Error("NaN cannot be represented in JSON Schema");
|
|
3269
|
+
}, Er = (e, n, t, r) => {
|
|
3270
|
+
const o = t, i = e._zod.pattern;
|
|
3271
|
+
if (!i)
|
|
3272
|
+
throw new Error("Pattern not found in template literal");
|
|
3273
|
+
o.type = "string", o.pattern = i.source;
|
|
3274
|
+
}, Nr = (e, n, t, r) => {
|
|
3275
|
+
const o = t, i = {
|
|
3276
|
+
type: "string",
|
|
3277
|
+
format: "binary",
|
|
3278
|
+
contentEncoding: "binary"
|
|
3279
|
+
}, { minimum: s, maximum: c, mime: a } = e._zod.bag;
|
|
3280
|
+
s !== void 0 && (i.minLength = s), c !== void 0 && (i.maxLength = c), a ? a.length === 1 ? (i.contentMediaType = a[0], Object.assign(o, i)) : (Object.assign(o, i), o.anyOf = a.map((l) => ({ contentMediaType: l }))) : Object.assign(o, i);
|
|
3281
|
+
}, Ar = (e, n, t, r) => {
|
|
3282
|
+
t.type = "boolean";
|
|
3283
|
+
}, jr = (e, n, t, r) => {
|
|
3284
|
+
if (n.unrepresentable === "throw")
|
|
3285
|
+
throw new Error("Custom types cannot be represented in JSON Schema");
|
|
3286
|
+
}, xr = (e, n, t, r) => {
|
|
3287
|
+
if (n.unrepresentable === "throw")
|
|
3288
|
+
throw new Error("Function types cannot be represented in JSON Schema");
|
|
3289
|
+
}, Cr = (e, n, t, r) => {
|
|
3290
|
+
if (n.unrepresentable === "throw")
|
|
3291
|
+
throw new Error("Transforms cannot be represented in JSON Schema");
|
|
3292
|
+
}, Dr = (e, n, t, r) => {
|
|
3293
|
+
if (n.unrepresentable === "throw")
|
|
3294
|
+
throw new Error("Map cannot be represented in JSON Schema");
|
|
3295
|
+
}, Rr = (e, n, t, r) => {
|
|
3296
|
+
if (n.unrepresentable === "throw")
|
|
3297
|
+
throw new Error("Set cannot be represented in JSON Schema");
|
|
3298
|
+
}, Fr = (e, n, t, r) => {
|
|
3299
|
+
const o = t, i = e._zod.def, { minimum: s, maximum: c } = e._zod.bag;
|
|
3300
|
+
typeof s == "number" && (o.minItems = s), typeof c == "number" && (o.maxItems = c), o.type = "array", o.items = z(i.element, n, { ...r, path: [...r.path, "items"] });
|
|
3301
|
+
}, Jr = (e, n, t, r) => {
|
|
3302
|
+
const o = t, i = e._zod.def;
|
|
3303
|
+
o.type = "object", o.properties = {};
|
|
3304
|
+
const s = i.shape;
|
|
3305
|
+
for (const l in s)
|
|
3306
|
+
o.properties[l] = z(s[l], n, {
|
|
3307
|
+
...r,
|
|
3308
|
+
path: [...r.path, "properties", l]
|
|
3309
|
+
});
|
|
3310
|
+
const c = new Set(Object.keys(s)), a = new Set([...c].filter((l) => {
|
|
3311
|
+
const f = i.shape[l]._zod;
|
|
3312
|
+
return n.io === "input" ? f.optin === void 0 : f.optout === void 0;
|
|
3313
|
+
}));
|
|
3314
|
+
a.size > 0 && (o.required = Array.from(a)), i.catchall?._zod.def.type === "never" ? o.additionalProperties = !1 : i.catchall ? i.catchall && (o.additionalProperties = z(i.catchall, n, {
|
|
3315
|
+
...r,
|
|
3316
|
+
path: [...r.path, "additionalProperties"]
|
|
3317
|
+
})) : n.io === "output" && (o.additionalProperties = !1);
|
|
3318
|
+
}, Xe = (e, n, t, r) => {
|
|
3319
|
+
const o = e._zod.def, i = o.inclusive === !1, s = o.options.map((c, a) => z(c, n, {
|
|
3320
|
+
...r,
|
|
3321
|
+
path: [...r.path, i ? "oneOf" : "anyOf", a]
|
|
3322
|
+
}));
|
|
3323
|
+
i ? t.oneOf = s : t.anyOf = s;
|
|
3324
|
+
}, Ur = (e, n, t, r) => {
|
|
3325
|
+
const o = e._zod.def, i = z(o.left, n, {
|
|
3326
|
+
...r,
|
|
3327
|
+
path: [...r.path, "allOf", 0]
|
|
3328
|
+
}), s = z(o.right, n, {
|
|
3329
|
+
...r,
|
|
3330
|
+
path: [...r.path, "allOf", 1]
|
|
3331
|
+
}), c = (l) => "allOf" in l && Object.keys(l).length === 1, a = [
|
|
3332
|
+
...c(i) ? i.allOf : [i],
|
|
3333
|
+
...c(s) ? s.allOf : [s]
|
|
3334
|
+
];
|
|
3335
|
+
t.allOf = a;
|
|
3336
|
+
}, Mr = (e, n, t, r) => {
|
|
3337
|
+
const o = t, i = e._zod.def;
|
|
3338
|
+
o.type = "array";
|
|
3339
|
+
const s = n.target === "draft-2020-12" ? "prefixItems" : "items", c = n.target === "draft-2020-12" || n.target === "openapi-3.0" ? "items" : "additionalItems", a = i.items.map((h, m) => z(h, n, {
|
|
3340
|
+
...r,
|
|
3341
|
+
path: [...r.path, s, m]
|
|
3342
|
+
})), l = i.rest ? z(i.rest, n, {
|
|
3343
|
+
...r,
|
|
3344
|
+
path: [...r.path, c, ...n.target === "openapi-3.0" ? [i.items.length] : []]
|
|
3345
|
+
}) : null;
|
|
3346
|
+
n.target === "draft-2020-12" ? (o.prefixItems = a, l && (o.items = l)) : n.target === "openapi-3.0" ? (o.items = {
|
|
3347
|
+
anyOf: a
|
|
3348
|
+
}, l && o.items.anyOf.push(l), o.minItems = a.length, l || (o.maxItems = a.length)) : (o.items = a, l && (o.additionalItems = l));
|
|
3349
|
+
const { minimum: f, maximum: d } = e._zod.bag;
|
|
3350
|
+
typeof f == "number" && (o.minItems = f), typeof d == "number" && (o.maxItems = d);
|
|
3351
|
+
}, Lr = (e, n, t, r) => {
|
|
3352
|
+
const o = t, i = e._zod.def;
|
|
3353
|
+
o.type = "object";
|
|
3354
|
+
const s = i.keyType, a = s._zod.bag?.patterns;
|
|
3355
|
+
if (i.mode === "loose" && a && a.size > 0) {
|
|
3356
|
+
const f = z(i.valueType, n, {
|
|
3357
|
+
...r,
|
|
3358
|
+
path: [...r.path, "patternProperties", "*"]
|
|
3359
|
+
});
|
|
3360
|
+
o.patternProperties = {};
|
|
3361
|
+
for (const d of a)
|
|
3362
|
+
o.patternProperties[d.source] = f;
|
|
3363
|
+
} else
|
|
3364
|
+
(n.target === "draft-07" || n.target === "draft-2020-12") && (o.propertyNames = z(i.keyType, n, {
|
|
3365
|
+
...r,
|
|
3366
|
+
path: [...r.path, "propertyNames"]
|
|
3367
|
+
})), o.additionalProperties = z(i.valueType, n, {
|
|
3368
|
+
...r,
|
|
3369
|
+
path: [...r.path, "additionalProperties"]
|
|
3370
|
+
});
|
|
3371
|
+
const l = s._zod.values;
|
|
3372
|
+
if (l) {
|
|
3373
|
+
const f = [...l].filter((d) => typeof d == "string" || typeof d == "number");
|
|
3374
|
+
f.length > 0 && (o.required = f);
|
|
3375
|
+
}
|
|
3376
|
+
}, Vr = (e, n, t, r) => {
|
|
3377
|
+
const o = e._zod.def, i = z(o.innerType, n, r), s = n.seen.get(e);
|
|
3378
|
+
n.target === "openapi-3.0" ? (s.ref = o.innerType, t.nullable = !0) : t.anyOf = [i, { type: "null" }];
|
|
3379
|
+
}, Br = (e, n, t, r) => {
|
|
3380
|
+
const o = e._zod.def;
|
|
3381
|
+
z(o.innerType, n, r);
|
|
3382
|
+
const i = n.seen.get(e);
|
|
3383
|
+
i.ref = o.innerType;
|
|
3384
|
+
}, Wr = (e, n, t, r) => {
|
|
3385
|
+
const o = e._zod.def;
|
|
3386
|
+
z(o.innerType, n, r);
|
|
3387
|
+
const i = n.seen.get(e);
|
|
3388
|
+
i.ref = o.innerType, t.default = JSON.parse(JSON.stringify(o.defaultValue));
|
|
3389
|
+
}, Kr = (e, n, t, r) => {
|
|
3390
|
+
const o = e._zod.def;
|
|
3391
|
+
z(o.innerType, n, r);
|
|
3392
|
+
const i = n.seen.get(e);
|
|
3393
|
+
i.ref = o.innerType, n.io === "input" && (t._prefault = JSON.parse(JSON.stringify(o.defaultValue)));
|
|
3394
|
+
}, Gr = (e, n, t, r) => {
|
|
3395
|
+
const o = e._zod.def;
|
|
3396
|
+
z(o.innerType, n, r);
|
|
3397
|
+
const i = n.seen.get(e);
|
|
3398
|
+
i.ref = o.innerType;
|
|
3399
|
+
let s;
|
|
3400
|
+
try {
|
|
3401
|
+
s = o.catchValue(void 0);
|
|
3402
|
+
} catch {
|
|
3403
|
+
throw new Error("Dynamic catch values are not supported in JSON Schema");
|
|
3404
|
+
}
|
|
3405
|
+
t.default = s;
|
|
3406
|
+
}, Yr = (e, n, t, r) => {
|
|
3407
|
+
const o = e._zod.def, i = n.io === "input" ? o.in._zod.def.type === "transform" ? o.out : o.in : o.out;
|
|
3408
|
+
z(i, n, r);
|
|
3409
|
+
const s = n.seen.get(e);
|
|
3410
|
+
s.ref = i;
|
|
3411
|
+
}, qr = (e, n, t, r) => {
|
|
3412
|
+
const o = e._zod.def;
|
|
3413
|
+
z(o.innerType, n, r);
|
|
3414
|
+
const i = n.seen.get(e);
|
|
3415
|
+
i.ref = o.innerType, t.readOnly = !0;
|
|
3416
|
+
}, Xr = (e, n, t, r) => {
|
|
3417
|
+
const o = e._zod.def;
|
|
3418
|
+
z(o.innerType, n, r);
|
|
3419
|
+
const i = n.seen.get(e);
|
|
3420
|
+
i.ref = o.innerType;
|
|
3421
|
+
}, He = (e, n, t, r) => {
|
|
3422
|
+
const o = e._zod.def;
|
|
3423
|
+
z(o.innerType, n, r);
|
|
3424
|
+
const i = n.seen.get(e);
|
|
3425
|
+
i.ref = o.innerType;
|
|
3426
|
+
}, Hr = (e, n, t, r) => {
|
|
3427
|
+
const o = e._zod.innerType;
|
|
3428
|
+
z(o, n, r);
|
|
3429
|
+
const i = n.seen.get(e);
|
|
3430
|
+
i.ref = o;
|
|
3431
|
+
}, Kn = {
|
|
3432
|
+
string: _r,
|
|
3433
|
+
number: gr,
|
|
3434
|
+
boolean: vr,
|
|
3435
|
+
bigint: zr,
|
|
3436
|
+
symbol: br,
|
|
3437
|
+
null: yr,
|
|
3438
|
+
undefined: wr,
|
|
3439
|
+
void: $r,
|
|
3440
|
+
never: kr,
|
|
3441
|
+
any: Zr,
|
|
3442
|
+
unknown: Sr,
|
|
3443
|
+
date: Or,
|
|
3444
|
+
enum: Tr,
|
|
3445
|
+
literal: Ir,
|
|
3446
|
+
nan: Pr,
|
|
3447
|
+
template_literal: Er,
|
|
3448
|
+
file: Nr,
|
|
3449
|
+
success: Ar,
|
|
3450
|
+
custom: jr,
|
|
3451
|
+
function: xr,
|
|
3452
|
+
transform: Cr,
|
|
3453
|
+
map: Dr,
|
|
3454
|
+
set: Rr,
|
|
3455
|
+
array: Fr,
|
|
3456
|
+
object: Jr,
|
|
3457
|
+
union: Xe,
|
|
3458
|
+
intersection: Ur,
|
|
3459
|
+
tuple: Mr,
|
|
3460
|
+
record: Lr,
|
|
3461
|
+
nullable: Vr,
|
|
3462
|
+
nonoptional: Br,
|
|
3463
|
+
default: Wr,
|
|
3464
|
+
prefault: Kr,
|
|
3465
|
+
catch: Gr,
|
|
3466
|
+
pipe: Yr,
|
|
3467
|
+
readonly: qr,
|
|
3468
|
+
promise: Xr,
|
|
3469
|
+
optional: He,
|
|
3470
|
+
lazy: Hr
|
|
3471
|
+
};
|
|
3472
|
+
function il(e, n) {
|
|
3473
|
+
if ("_idmap" in e) {
|
|
3474
|
+
const r = e, o = pe({ ...n, processors: Kn }), i = {};
|
|
3475
|
+
for (const a of r._idmap.entries()) {
|
|
3476
|
+
const [l, f] = a;
|
|
3477
|
+
z(f, o);
|
|
3478
|
+
}
|
|
3479
|
+
const s = {}, c = {
|
|
3480
|
+
registry: r,
|
|
3481
|
+
uri: n?.uri,
|
|
3482
|
+
defs: i
|
|
3483
|
+
};
|
|
3484
|
+
o.external = c;
|
|
3485
|
+
for (const a of r._idmap.entries()) {
|
|
3486
|
+
const [l, f] = a;
|
|
3487
|
+
de(o, f), s[l] = me(o, f);
|
|
3488
|
+
}
|
|
3489
|
+
if (Object.keys(i).length > 0) {
|
|
3490
|
+
const a = o.target === "draft-2020-12" ? "$defs" : "definitions";
|
|
3491
|
+
s.__shared = {
|
|
3492
|
+
[a]: i
|
|
3493
|
+
};
|
|
3494
|
+
}
|
|
3495
|
+
return { schemas: s };
|
|
3496
|
+
}
|
|
3497
|
+
const t = pe({ ...n, processors: Kn });
|
|
3498
|
+
return z(e, t), de(t, e), me(t, e);
|
|
3499
|
+
}
|
|
3500
|
+
const Qr = /* @__PURE__ */ u("ZodISODateTime", (e, n) => {
|
|
3501
|
+
Ns.init(e, n), y.init(e, n);
|
|
3502
|
+
});
|
|
3503
|
+
function eo(e) {
|
|
3504
|
+
return /* @__PURE__ */ Cc(Qr, e);
|
|
3505
|
+
}
|
|
3506
|
+
const no = /* @__PURE__ */ u("ZodISODate", (e, n) => {
|
|
3507
|
+
As.init(e, n), y.init(e, n);
|
|
3508
|
+
});
|
|
3509
|
+
function to(e) {
|
|
3510
|
+
return /* @__PURE__ */ Dc(no, e);
|
|
3511
|
+
}
|
|
3512
|
+
const ro = /* @__PURE__ */ u("ZodISOTime", (e, n) => {
|
|
3513
|
+
js.init(e, n), y.init(e, n);
|
|
3514
|
+
});
|
|
3515
|
+
function oo(e) {
|
|
3516
|
+
return /* @__PURE__ */ Rc(ro, e);
|
|
3517
|
+
}
|
|
3518
|
+
const io = /* @__PURE__ */ u("ZodISODuration", (e, n) => {
|
|
3519
|
+
xs.init(e, n), y.init(e, n);
|
|
3520
|
+
});
|
|
3521
|
+
function so(e) {
|
|
3522
|
+
return /* @__PURE__ */ Fc(io, e);
|
|
3523
|
+
}
|
|
3524
|
+
const sl = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
3525
|
+
__proto__: null,
|
|
3526
|
+
ZodISODate: no,
|
|
3527
|
+
ZodISODateTime: Qr,
|
|
3528
|
+
ZodISODuration: io,
|
|
3529
|
+
ZodISOTime: ro,
|
|
3530
|
+
date: to,
|
|
3531
|
+
datetime: eo,
|
|
3532
|
+
duration: so,
|
|
3533
|
+
time: oo
|
|
3534
|
+
}, Symbol.toStringTag, { value: "Module" })), co = (e, n) => {
|
|
3535
|
+
et.init(e, n), e.name = "ZodError", Object.defineProperties(e, {
|
|
3536
|
+
format: {
|
|
3537
|
+
value: (t) => zi(e, t)
|
|
3538
|
+
// enumerable: false,
|
|
3539
|
+
},
|
|
3540
|
+
flatten: {
|
|
3541
|
+
value: (t) => vi(e, t)
|
|
3542
|
+
// enumerable: false,
|
|
3543
|
+
},
|
|
3544
|
+
addIssue: {
|
|
3545
|
+
value: (t) => {
|
|
3546
|
+
e.issues.push(t), e.message = JSON.stringify(e.issues, xe, 2);
|
|
3547
|
+
}
|
|
3548
|
+
// enumerable: false,
|
|
3549
|
+
},
|
|
3550
|
+
addIssues: {
|
|
3551
|
+
value: (t) => {
|
|
3552
|
+
e.issues.push(...t), e.message = JSON.stringify(e.issues, xe, 2);
|
|
3553
|
+
}
|
|
3554
|
+
// enumerable: false,
|
|
3555
|
+
},
|
|
3556
|
+
isEmpty: {
|
|
3557
|
+
get() {
|
|
3558
|
+
return e.issues.length === 0;
|
|
3559
|
+
}
|
|
3560
|
+
// enumerable: false,
|
|
3561
|
+
}
|
|
3562
|
+
});
|
|
3563
|
+
}, cl = u("ZodError", co), O = u("ZodError", co, {
|
|
3564
|
+
Parent: Error
|
|
3565
|
+
}), Tu = /* @__PURE__ */ we(O), Iu = /* @__PURE__ */ $e(O), Pu = /* @__PURE__ */ ke(O), Eu = /* @__PURE__ */ Ze(O), Nu = /* @__PURE__ */ wi(O), Au = /* @__PURE__ */ $i(O), ju = /* @__PURE__ */ ki(O), xu = /* @__PURE__ */ Zi(O), Cu = /* @__PURE__ */ Si(O), Du = /* @__PURE__ */ Oi(O), Ru = /* @__PURE__ */ Ti(O), Fu = /* @__PURE__ */ Ii(O), g = /* @__PURE__ */ u("ZodType", (e, n) => (_.init(e, n), Object.assign(e["~standard"], {
|
|
3566
|
+
jsonSchema: {
|
|
3567
|
+
input: he(e, "input"),
|
|
3568
|
+
output: he(e, "output")
|
|
3569
|
+
}
|
|
3570
|
+
}), e.toJSONSchema = Su(e, {}), e.def = n, e.type = n.type, Object.defineProperty(e, "_def", { value: n }), e.check = (...t) => e.clone(F(n, {
|
|
3571
|
+
checks: [
|
|
3572
|
+
...n.checks ?? [],
|
|
3573
|
+
...t.map((r) => typeof r == "function" ? { _zod: { check: r, def: { check: "custom" }, onattach: [] } } : r)
|
|
3574
|
+
]
|
|
3575
|
+
}), {
|
|
3576
|
+
parent: !0
|
|
3577
|
+
}), e.with = e.check, e.clone = (t, r) => C(e, t, r), e.brand = () => e, e.register = ((t, r) => (t.add(e, r), e)), e.parse = (t, r) => Tu(e, t, r, { callee: e.parse }), e.safeParse = (t, r) => Pu(e, t, r), e.parseAsync = async (t, r) => Iu(e, t, r, { callee: e.parseAsync }), e.safeParseAsync = async (t, r) => Eu(e, t, r), e.spa = e.safeParseAsync, e.encode = (t, r) => Nu(e, t, r), e.decode = (t, r) => Au(e, t, r), e.encodeAsync = async (t, r) => ju(e, t, r), e.decodeAsync = async (t, r) => xu(e, t, r), e.safeEncode = (t, r) => Cu(e, t, r), e.safeDecode = (t, r) => Du(e, t, r), e.safeEncodeAsync = async (t, r) => Ru(e, t, r), e.safeDecodeAsync = async (t, r) => Fu(e, t, r), e.refine = (t, r) => e.check(Qo(t, r)), e.superRefine = (t) => e.check(ei(t)), e.overwrite = (t) => e.check(/* @__PURE__ */ K(t)), e.optional = () => ge(e), e.exactOptional = () => xo(e), e.nullable = () => ve(e), e.nullish = () => ge(ve(e)), e.nonoptional = (t) => Uo(e, t), e.array = () => Pe(e), e.or = (t) => $n([e, t]), e.and = (t) => Zo(e, t), e.transform = (t) => ze(e, Zn(t)), e.default = (t) => Ro(e, t), e.prefault = (t) => Jo(e, t), e.catch = (t) => Vo(e, t), e.pipe = (t) => ze(e, t), e.readonly = () => Ko(e), e.describe = (t) => {
|
|
3578
|
+
const r = e.clone();
|
|
3579
|
+
return j.add(r, { description: t }), r;
|
|
3580
|
+
}, Object.defineProperty(e, "description", {
|
|
3581
|
+
get() {
|
|
3582
|
+
return j.get(e)?.description;
|
|
3583
|
+
},
|
|
3584
|
+
configurable: !0
|
|
3585
|
+
}), e.meta = (...t) => {
|
|
3586
|
+
if (t.length === 0)
|
|
3587
|
+
return j.get(e);
|
|
3588
|
+
const r = e.clone();
|
|
3589
|
+
return j.add(r, t[0]), r;
|
|
3590
|
+
}, e.isOptional = () => e.safeParse(void 0).success, e.isNullable = () => e.safeParse(null).success, e.apply = (t) => t(e), e)), Qe = /* @__PURE__ */ u("_ZodString", (e, n) => {
|
|
3591
|
+
Oe.init(e, n), g.init(e, n), e._zod.processJSONSchema = (r, o, i) => _r(e, r, o);
|
|
3592
|
+
const t = e._zod.bag;
|
|
3593
|
+
e.format = t.format ?? null, e.minLength = t.minimum ?? null, e.maxLength = t.maximum ?? null, e.regex = (...r) => e.check(/* @__PURE__ */ iu(...r)), e.includes = (...r) => e.check(/* @__PURE__ */ uu(...r)), e.startsWith = (...r) => e.check(/* @__PURE__ */ au(...r)), e.endsWith = (...r) => e.check(/* @__PURE__ */ lu(...r)), e.min = (...r) => e.check(/* @__PURE__ */ fe(...r)), e.max = (...r) => e.check(/* @__PURE__ */ mr(...r)), e.length = (...r) => e.check(/* @__PURE__ */ hr(...r)), e.nonempty = (...r) => e.check(/* @__PURE__ */ fe(1, ...r)), e.lowercase = (r) => e.check(/* @__PURE__ */ su(r)), e.uppercase = (r) => e.check(/* @__PURE__ */ cu(r)), e.trim = () => e.check(/* @__PURE__ */ du()), e.normalize = (...r) => e.check(/* @__PURE__ */ pu(...r)), e.toLowerCase = () => e.check(/* @__PURE__ */ mu()), e.toUpperCase = () => e.check(/* @__PURE__ */ hu()), e.slugify = () => e.check(/* @__PURE__ */ _u());
|
|
3594
|
+
}), en = /* @__PURE__ */ u("ZodString", (e, n) => {
|
|
3595
|
+
Oe.init(e, n), Qe.init(e, n), e.email = (t) => e.check(/* @__PURE__ */ Kt(nn, t)), e.url = (t) => e.check(/* @__PURE__ */ Ye(Ie, t)), e.jwt = (t) => e.check(/* @__PURE__ */ pr(gn, t)), e.emoji = (t) => e.check(/* @__PURE__ */ Ht(tn, t)), e.guid = (t) => e.check(/* @__PURE__ */ Re(_e, t)), e.uuid = (t) => e.check(/* @__PURE__ */ Gt(x, t)), e.uuidv4 = (t) => e.check(/* @__PURE__ */ Yt(x, t)), e.uuidv6 = (t) => e.check(/* @__PURE__ */ qt(x, t)), e.uuidv7 = (t) => e.check(/* @__PURE__ */ Xt(x, t)), e.nanoid = (t) => e.check(/* @__PURE__ */ Qt(rn, t)), e.guid = (t) => e.check(/* @__PURE__ */ Re(_e, t)), e.cuid = (t) => e.check(/* @__PURE__ */ er(on, t)), e.cuid2 = (t) => e.check(/* @__PURE__ */ nr(sn, t)), e.ulid = (t) => e.check(/* @__PURE__ */ tr(cn, t)), e.base64 = (t) => e.check(/* @__PURE__ */ ar(mn, t)), e.base64url = (t) => e.check(/* @__PURE__ */ lr(hn, t)), e.xid = (t) => e.check(/* @__PURE__ */ rr(un, t)), e.ksuid = (t) => e.check(/* @__PURE__ */ or(an, t)), e.ipv4 = (t) => e.check(/* @__PURE__ */ ir(ln, t)), e.ipv6 = (t) => e.check(/* @__PURE__ */ sr(fn, t)), e.cidrv4 = (t) => e.check(/* @__PURE__ */ cr(pn, t)), e.cidrv6 = (t) => e.check(/* @__PURE__ */ ur(dn, t)), e.e164 = (t) => e.check(/* @__PURE__ */ fr(_n, t)), e.datetime = (t) => e.check(eo(t)), e.date = (t) => e.check(to(t)), e.time = (t) => e.check(oo(t)), e.duration = (t) => e.check(so(t));
|
|
3596
|
+
});
|
|
3597
|
+
function Je(e) {
|
|
3598
|
+
return /* @__PURE__ */ jc(en, e);
|
|
3599
|
+
}
|
|
3600
|
+
const y = /* @__PURE__ */ u("ZodStringFormat", (e, n) => {
|
|
3601
|
+
b.init(e, n), Qe.init(e, n);
|
|
3602
|
+
}), nn = /* @__PURE__ */ u("ZodEmail", (e, n) => {
|
|
3603
|
+
$s.init(e, n), y.init(e, n);
|
|
3604
|
+
});
|
|
3605
|
+
function Ju(e) {
|
|
3606
|
+
return /* @__PURE__ */ Kt(nn, e);
|
|
3607
|
+
}
|
|
3608
|
+
const _e = /* @__PURE__ */ u("ZodGUID", (e, n) => {
|
|
3609
|
+
ys.init(e, n), y.init(e, n);
|
|
3610
|
+
});
|
|
3611
|
+
function Uu(e) {
|
|
3612
|
+
return /* @__PURE__ */ Re(_e, e);
|
|
3613
|
+
}
|
|
3614
|
+
const x = /* @__PURE__ */ u("ZodUUID", (e, n) => {
|
|
3615
|
+
ws.init(e, n), y.init(e, n);
|
|
3616
|
+
});
|
|
3617
|
+
function Mu(e) {
|
|
3618
|
+
return /* @__PURE__ */ Gt(x, e);
|
|
3619
|
+
}
|
|
3620
|
+
function Lu(e) {
|
|
3621
|
+
return /* @__PURE__ */ Yt(x, e);
|
|
3622
|
+
}
|
|
3623
|
+
function Vu(e) {
|
|
3624
|
+
return /* @__PURE__ */ qt(x, e);
|
|
3625
|
+
}
|
|
3626
|
+
function Bu(e) {
|
|
3627
|
+
return /* @__PURE__ */ Xt(x, e);
|
|
3628
|
+
}
|
|
3629
|
+
const Ie = /* @__PURE__ */ u("ZodURL", (e, n) => {
|
|
3630
|
+
ks.init(e, n), y.init(e, n);
|
|
3631
|
+
});
|
|
3632
|
+
function Wu(e) {
|
|
3633
|
+
return /* @__PURE__ */ Ye(Ie, e);
|
|
3634
|
+
}
|
|
3635
|
+
function Ku(e) {
|
|
3636
|
+
return /* @__PURE__ */ Ye(Ie, {
|
|
3637
|
+
protocol: /^https?$/,
|
|
3638
|
+
hostname: zt,
|
|
3639
|
+
...p(e)
|
|
3640
|
+
});
|
|
3641
|
+
}
|
|
3642
|
+
const tn = /* @__PURE__ */ u("ZodEmoji", (e, n) => {
|
|
3643
|
+
Zs.init(e, n), y.init(e, n);
|
|
3644
|
+
});
|
|
3645
|
+
function Gu(e) {
|
|
3646
|
+
return /* @__PURE__ */ Ht(tn, e);
|
|
3647
|
+
}
|
|
3648
|
+
const rn = /* @__PURE__ */ u("ZodNanoID", (e, n) => {
|
|
3649
|
+
Ss.init(e, n), y.init(e, n);
|
|
3650
|
+
});
|
|
3651
|
+
function Yu(e) {
|
|
3652
|
+
return /* @__PURE__ */ Qt(rn, e);
|
|
3653
|
+
}
|
|
3654
|
+
const on = /* @__PURE__ */ u("ZodCUID", (e, n) => {
|
|
3655
|
+
Os.init(e, n), y.init(e, n);
|
|
3656
|
+
});
|
|
3657
|
+
function qu(e) {
|
|
3658
|
+
return /* @__PURE__ */ er(on, e);
|
|
3659
|
+
}
|
|
3660
|
+
const sn = /* @__PURE__ */ u("ZodCUID2", (e, n) => {
|
|
3661
|
+
Ts.init(e, n), y.init(e, n);
|
|
3662
|
+
});
|
|
3663
|
+
function Xu(e) {
|
|
3664
|
+
return /* @__PURE__ */ nr(sn, e);
|
|
3665
|
+
}
|
|
3666
|
+
const cn = /* @__PURE__ */ u("ZodULID", (e, n) => {
|
|
3667
|
+
Is.init(e, n), y.init(e, n);
|
|
3668
|
+
});
|
|
3669
|
+
function Hu(e) {
|
|
3670
|
+
return /* @__PURE__ */ tr(cn, e);
|
|
3671
|
+
}
|
|
3672
|
+
const un = /* @__PURE__ */ u("ZodXID", (e, n) => {
|
|
3673
|
+
Ps.init(e, n), y.init(e, n);
|
|
3674
|
+
});
|
|
3675
|
+
function Qu(e) {
|
|
3676
|
+
return /* @__PURE__ */ rr(un, e);
|
|
3677
|
+
}
|
|
3678
|
+
const an = /* @__PURE__ */ u("ZodKSUID", (e, n) => {
|
|
3679
|
+
Es.init(e, n), y.init(e, n);
|
|
3680
|
+
});
|
|
3681
|
+
function ea(e) {
|
|
3682
|
+
return /* @__PURE__ */ or(an, e);
|
|
3683
|
+
}
|
|
3684
|
+
const ln = /* @__PURE__ */ u("ZodIPv4", (e, n) => {
|
|
3685
|
+
Cs.init(e, n), y.init(e, n);
|
|
3686
|
+
});
|
|
3687
|
+
function na(e) {
|
|
3688
|
+
return /* @__PURE__ */ ir(ln, e);
|
|
3689
|
+
}
|
|
3690
|
+
const uo = /* @__PURE__ */ u("ZodMAC", (e, n) => {
|
|
3691
|
+
Rs.init(e, n), y.init(e, n);
|
|
3692
|
+
});
|
|
3693
|
+
function ta(e) {
|
|
3694
|
+
return /* @__PURE__ */ xc(uo, e);
|
|
3695
|
+
}
|
|
3696
|
+
const fn = /* @__PURE__ */ u("ZodIPv6", (e, n) => {
|
|
3697
|
+
Ds.init(e, n), y.init(e, n);
|
|
3698
|
+
});
|
|
3699
|
+
function ra(e) {
|
|
3700
|
+
return /* @__PURE__ */ sr(fn, e);
|
|
3701
|
+
}
|
|
3702
|
+
const pn = /* @__PURE__ */ u("ZodCIDRv4", (e, n) => {
|
|
3703
|
+
Fs.init(e, n), y.init(e, n);
|
|
3704
|
+
});
|
|
3705
|
+
function oa(e) {
|
|
3706
|
+
return /* @__PURE__ */ cr(pn, e);
|
|
3707
|
+
}
|
|
3708
|
+
const dn = /* @__PURE__ */ u("ZodCIDRv6", (e, n) => {
|
|
3709
|
+
Js.init(e, n), y.init(e, n);
|
|
3710
|
+
});
|
|
3711
|
+
function ia(e) {
|
|
3712
|
+
return /* @__PURE__ */ ur(dn, e);
|
|
3713
|
+
}
|
|
3714
|
+
const mn = /* @__PURE__ */ u("ZodBase64", (e, n) => {
|
|
3715
|
+
Us.init(e, n), y.init(e, n);
|
|
3716
|
+
});
|
|
3717
|
+
function sa(e) {
|
|
3718
|
+
return /* @__PURE__ */ ar(mn, e);
|
|
3719
|
+
}
|
|
3720
|
+
const hn = /* @__PURE__ */ u("ZodBase64URL", (e, n) => {
|
|
3721
|
+
Ls.init(e, n), y.init(e, n);
|
|
3722
|
+
});
|
|
3723
|
+
function ca(e) {
|
|
3724
|
+
return /* @__PURE__ */ lr(hn, e);
|
|
3725
|
+
}
|
|
3726
|
+
const _n = /* @__PURE__ */ u("ZodE164", (e, n) => {
|
|
3727
|
+
Vs.init(e, n), y.init(e, n);
|
|
3728
|
+
});
|
|
3729
|
+
function ua(e) {
|
|
3730
|
+
return /* @__PURE__ */ fr(_n, e);
|
|
3731
|
+
}
|
|
3732
|
+
const gn = /* @__PURE__ */ u("ZodJWT", (e, n) => {
|
|
3733
|
+
Ws.init(e, n), y.init(e, n);
|
|
3734
|
+
});
|
|
3735
|
+
function aa(e) {
|
|
3736
|
+
return /* @__PURE__ */ pr(gn, e);
|
|
3737
|
+
}
|
|
3738
|
+
const re = /* @__PURE__ */ u("ZodCustomStringFormat", (e, n) => {
|
|
3739
|
+
Ks.init(e, n), y.init(e, n);
|
|
3740
|
+
});
|
|
3741
|
+
function la(e, n, t = {}) {
|
|
3742
|
+
return /* @__PURE__ */ Te(re, e, n, t);
|
|
3743
|
+
}
|
|
3744
|
+
function fa(e) {
|
|
3745
|
+
return /* @__PURE__ */ Te(re, "hostname", vt, e);
|
|
3746
|
+
}
|
|
3747
|
+
function pa(e) {
|
|
3748
|
+
return /* @__PURE__ */ Te(re, "hex", jt, e);
|
|
3749
|
+
}
|
|
3750
|
+
function da(e, n) {
|
|
3751
|
+
const t = n?.enc ?? "hex", r = `${e}_${t}`, o = es[r];
|
|
3752
|
+
if (!o)
|
|
3753
|
+
throw new Error(`Unrecognized hash format: ${r}`);
|
|
3754
|
+
return /* @__PURE__ */ Te(re, r, o, n);
|
|
3755
|
+
}
|
|
3756
|
+
const vn = /* @__PURE__ */ u("ZodNumber", (e, n) => {
|
|
3757
|
+
Ft.init(e, n), g.init(e, n), e._zod.processJSONSchema = (r, o, i) => gr(e, r, o), e.gt = (r, o) => e.check(/* @__PURE__ */ H(r, o)), e.gte = (r, o) => e.check(/* @__PURE__ */ N(r, o)), e.min = (r, o) => e.check(/* @__PURE__ */ N(r, o)), e.lt = (r, o) => e.check(/* @__PURE__ */ X(r, o)), e.lte = (r, o) => e.check(/* @__PURE__ */ D(r, o)), e.max = (r, o) => e.check(/* @__PURE__ */ D(r, o)), e.int = (r) => e.check(Ue(r)), e.safe = (r) => e.check(Ue(r)), e.positive = (r) => e.check(/* @__PURE__ */ H(0, r)), e.nonnegative = (r) => e.check(/* @__PURE__ */ N(0, r)), e.negative = (r) => e.check(/* @__PURE__ */ X(0, r)), e.nonpositive = (r) => e.check(/* @__PURE__ */ D(0, r)), e.multipleOf = (r, o) => e.check(/* @__PURE__ */ Fe(r, o)), e.step = (r, o) => e.check(/* @__PURE__ */ Fe(r, o)), e.finite = () => e;
|
|
3758
|
+
const t = e._zod.bag;
|
|
3759
|
+
e.minValue = Math.max(t.minimum ?? Number.NEGATIVE_INFINITY, t.exclusiveMinimum ?? Number.NEGATIVE_INFINITY) ?? null, e.maxValue = Math.min(t.maximum ?? Number.POSITIVE_INFINITY, t.exclusiveMaximum ?? Number.POSITIVE_INFINITY) ?? null, e.isInt = (t.format ?? "").includes("int") || Number.isSafeInteger(t.multipleOf ?? 0.5), e.isFinite = !0, e.format = t.format ?? null;
|
|
3760
|
+
});
|
|
3761
|
+
function ao(e) {
|
|
3762
|
+
return /* @__PURE__ */ Jc(vn, e);
|
|
3763
|
+
}
|
|
3764
|
+
const G = /* @__PURE__ */ u("ZodNumberFormat", (e, n) => {
|
|
3765
|
+
Gs.init(e, n), vn.init(e, n);
|
|
3766
|
+
});
|
|
3767
|
+
function Ue(e) {
|
|
3768
|
+
return /* @__PURE__ */ Uc(G, e);
|
|
3769
|
+
}
|
|
3770
|
+
function ma(e) {
|
|
3771
|
+
return /* @__PURE__ */ Mc(G, e);
|
|
3772
|
+
}
|
|
3773
|
+
function ha(e) {
|
|
3774
|
+
return /* @__PURE__ */ Lc(G, e);
|
|
3775
|
+
}
|
|
3776
|
+
function _a(e) {
|
|
3777
|
+
return /* @__PURE__ */ Vc(G, e);
|
|
3778
|
+
}
|
|
3779
|
+
function ga(e) {
|
|
3780
|
+
return /* @__PURE__ */ Bc(G, e);
|
|
3781
|
+
}
|
|
3782
|
+
const zn = /* @__PURE__ */ u("ZodBoolean", (e, n) => {
|
|
3783
|
+
Jt.init(e, n), g.init(e, n), e._zod.processJSONSchema = (t, r, o) => vr(e, t, r);
|
|
3784
|
+
});
|
|
3785
|
+
function lo(e) {
|
|
3786
|
+
return /* @__PURE__ */ Wc(zn, e);
|
|
3787
|
+
}
|
|
3788
|
+
const bn = /* @__PURE__ */ u("ZodBigInt", (e, n) => {
|
|
3789
|
+
Ut.init(e, n), g.init(e, n), e._zod.processJSONSchema = (r, o, i) => zr(e, r), e.gte = (r, o) => e.check(/* @__PURE__ */ N(r, o)), e.min = (r, o) => e.check(/* @__PURE__ */ N(r, o)), e.gt = (r, o) => e.check(/* @__PURE__ */ H(r, o)), e.gte = (r, o) => e.check(/* @__PURE__ */ N(r, o)), e.min = (r, o) => e.check(/* @__PURE__ */ N(r, o)), e.lt = (r, o) => e.check(/* @__PURE__ */ X(r, o)), e.lte = (r, o) => e.check(/* @__PURE__ */ D(r, o)), e.max = (r, o) => e.check(/* @__PURE__ */ D(r, o)), e.positive = (r) => e.check(/* @__PURE__ */ H(BigInt(0), r)), e.negative = (r) => e.check(/* @__PURE__ */ X(BigInt(0), r)), e.nonpositive = (r) => e.check(/* @__PURE__ */ D(BigInt(0), r)), e.nonnegative = (r) => e.check(/* @__PURE__ */ N(BigInt(0), r)), e.multipleOf = (r, o) => e.check(/* @__PURE__ */ Fe(r, o));
|
|
3790
|
+
const t = e._zod.bag;
|
|
3791
|
+
e.minValue = t.minimum ?? null, e.maxValue = t.maximum ?? null, e.format = t.format ?? null;
|
|
3792
|
+
});
|
|
3793
|
+
function va(e) {
|
|
3794
|
+
return /* @__PURE__ */ Kc(bn, e);
|
|
3795
|
+
}
|
|
3796
|
+
const yn = /* @__PURE__ */ u("ZodBigIntFormat", (e, n) => {
|
|
3797
|
+
Ys.init(e, n), bn.init(e, n);
|
|
3798
|
+
});
|
|
3799
|
+
function za(e) {
|
|
3800
|
+
return /* @__PURE__ */ Gc(yn, e);
|
|
3801
|
+
}
|
|
3802
|
+
function ba(e) {
|
|
3803
|
+
return /* @__PURE__ */ Yc(yn, e);
|
|
3804
|
+
}
|
|
3805
|
+
const fo = /* @__PURE__ */ u("ZodSymbol", (e, n) => {
|
|
3806
|
+
qs.init(e, n), g.init(e, n), e._zod.processJSONSchema = (t, r, o) => br(e, t);
|
|
3807
|
+
});
|
|
3808
|
+
function ya(e) {
|
|
3809
|
+
return /* @__PURE__ */ qc(fo, e);
|
|
3810
|
+
}
|
|
3811
|
+
const po = /* @__PURE__ */ u("ZodUndefined", (e, n) => {
|
|
3812
|
+
Xs.init(e, n), g.init(e, n), e._zod.processJSONSchema = (t, r, o) => wr(e, t);
|
|
3813
|
+
});
|
|
3814
|
+
function wa(e) {
|
|
3815
|
+
return /* @__PURE__ */ Xc(po, e);
|
|
3816
|
+
}
|
|
3817
|
+
const mo = /* @__PURE__ */ u("ZodNull", (e, n) => {
|
|
3818
|
+
Hs.init(e, n), g.init(e, n), e._zod.processJSONSchema = (t, r, o) => yr(e, t, r);
|
|
3819
|
+
});
|
|
3820
|
+
function ho(e) {
|
|
3821
|
+
return /* @__PURE__ */ Hc(mo, e);
|
|
3822
|
+
}
|
|
3823
|
+
const _o = /* @__PURE__ */ u("ZodAny", (e, n) => {
|
|
3824
|
+
Qs.init(e, n), g.init(e, n), e._zod.processJSONSchema = (t, r, o) => Zr();
|
|
3825
|
+
});
|
|
3826
|
+
function $a() {
|
|
3827
|
+
return /* @__PURE__ */ Qc(_o);
|
|
3828
|
+
}
|
|
3829
|
+
const go = /* @__PURE__ */ u("ZodUnknown", (e, n) => {
|
|
3830
|
+
ec.init(e, n), g.init(e, n), e._zod.processJSONSchema = (t, r, o) => Sr();
|
|
3831
|
+
});
|
|
3832
|
+
function B() {
|
|
3833
|
+
return /* @__PURE__ */ eu(go);
|
|
3834
|
+
}
|
|
3835
|
+
const vo = /* @__PURE__ */ u("ZodNever", (e, n) => {
|
|
3836
|
+
nc.init(e, n), g.init(e, n), e._zod.processJSONSchema = (t, r, o) => kr(e, t, r);
|
|
3837
|
+
});
|
|
3838
|
+
function wn(e) {
|
|
3839
|
+
return /* @__PURE__ */ nu(vo, e);
|
|
3840
|
+
}
|
|
3841
|
+
const zo = /* @__PURE__ */ u("ZodVoid", (e, n) => {
|
|
3842
|
+
tc.init(e, n), g.init(e, n), e._zod.processJSONSchema = (t, r, o) => $r(e, t);
|
|
3843
|
+
});
|
|
3844
|
+
function ka(e) {
|
|
3845
|
+
return /* @__PURE__ */ tu(zo, e);
|
|
3846
|
+
}
|
|
3847
|
+
const bo = /* @__PURE__ */ u("ZodDate", (e, n) => {
|
|
3848
|
+
rc.init(e, n), g.init(e, n), e._zod.processJSONSchema = (r, o, i) => Or(e, r), e.min = (r, o) => e.check(/* @__PURE__ */ N(r, o)), e.max = (r, o) => e.check(/* @__PURE__ */ D(r, o));
|
|
3849
|
+
const t = e._zod.bag;
|
|
3850
|
+
e.minDate = t.minimum ? new Date(t.minimum) : null, e.maxDate = t.maximum ? new Date(t.maximum) : null;
|
|
3851
|
+
});
|
|
3852
|
+
function Za(e) {
|
|
3853
|
+
return /* @__PURE__ */ ru(bo, e);
|
|
3854
|
+
}
|
|
3855
|
+
const yo = /* @__PURE__ */ u("ZodArray", (e, n) => {
|
|
3856
|
+
oc.init(e, n), g.init(e, n), e._zod.processJSONSchema = (t, r, o) => Fr(e, t, r, o), e.element = n.element, e.min = (t, r) => e.check(/* @__PURE__ */ fe(t, r)), e.nonempty = (t) => e.check(/* @__PURE__ */ fe(1, t)), e.max = (t, r) => e.check(/* @__PURE__ */ mr(t, r)), e.length = (t, r) => e.check(/* @__PURE__ */ hr(t, r)), e.unwrap = () => e.element;
|
|
3857
|
+
});
|
|
3858
|
+
function Pe(e, n) {
|
|
3859
|
+
return /* @__PURE__ */ gu(yo, e, n);
|
|
3860
|
+
}
|
|
3861
|
+
function Sa(e) {
|
|
3862
|
+
const n = e._zod.def.shape;
|
|
3863
|
+
return kn(Object.keys(n));
|
|
3864
|
+
}
|
|
3865
|
+
const Ee = /* @__PURE__ */ u("ZodObject", (e, n) => {
|
|
3866
|
+
sc.init(e, n), g.init(e, n), e._zod.processJSONSchema = (t, r, o) => Jr(e, t, r, o), v(e, "shape", () => n.shape), e.keyof = () => kn(Object.keys(e._zod.def.shape)), e.catchall = (t) => e.clone({ ...e._zod.def, catchall: t }), e.passthrough = () => e.clone({ ...e._zod.def, catchall: B() }), e.loose = () => e.clone({ ...e._zod.def, catchall: B() }), e.strict = () => e.clone({ ...e._zod.def, catchall: wn() }), e.strip = () => e.clone({ ...e._zod.def, catchall: void 0 }), e.extend = (t) => di(e, t), e.safeExtend = (t) => mi(e, t), e.merge = (t) => hi(e, t), e.pick = (t) => fi(e, t), e.omit = (t) => pi(e, t), e.partial = (...t) => _i(Sn, e, t[0]), e.required = (...t) => gi(On, e, t[0]);
|
|
3867
|
+
});
|
|
3868
|
+
function Oa(e, n) {
|
|
3869
|
+
const t = {
|
|
3870
|
+
type: "object",
|
|
3871
|
+
shape: e ?? {},
|
|
3872
|
+
...p(n)
|
|
3873
|
+
};
|
|
3874
|
+
return new Ee(t);
|
|
3875
|
+
}
|
|
3876
|
+
function Ta(e, n) {
|
|
3877
|
+
return new Ee({
|
|
3878
|
+
type: "object",
|
|
3879
|
+
shape: e,
|
|
3880
|
+
catchall: wn(),
|
|
3881
|
+
...p(n)
|
|
3882
|
+
});
|
|
3883
|
+
}
|
|
3884
|
+
function Ia(e, n) {
|
|
3885
|
+
return new Ee({
|
|
3886
|
+
type: "object",
|
|
3887
|
+
shape: e,
|
|
3888
|
+
catchall: B(),
|
|
3889
|
+
...p(n)
|
|
3890
|
+
});
|
|
3891
|
+
}
|
|
3892
|
+
const Ne = /* @__PURE__ */ u("ZodUnion", (e, n) => {
|
|
3893
|
+
Ge.init(e, n), g.init(e, n), e._zod.processJSONSchema = (t, r, o) => Xe(e, t, r, o), e.options = n.options;
|
|
3894
|
+
});
|
|
3895
|
+
function $n(e, n) {
|
|
3896
|
+
return new Ne({
|
|
3897
|
+
type: "union",
|
|
3898
|
+
options: e,
|
|
3899
|
+
...p(n)
|
|
3900
|
+
});
|
|
3901
|
+
}
|
|
3902
|
+
const wo = /* @__PURE__ */ u("ZodXor", (e, n) => {
|
|
3903
|
+
Ne.init(e, n), cc.init(e, n), e._zod.processJSONSchema = (t, r, o) => Xe(e, t, r, o), e.options = n.options;
|
|
3904
|
+
});
|
|
3905
|
+
function Pa(e, n) {
|
|
3906
|
+
return new wo({
|
|
3907
|
+
type: "union",
|
|
3908
|
+
options: e,
|
|
3909
|
+
inclusive: !1,
|
|
3910
|
+
...p(n)
|
|
3911
|
+
});
|
|
3912
|
+
}
|
|
3913
|
+
const $o = /* @__PURE__ */ u("ZodDiscriminatedUnion", (e, n) => {
|
|
3914
|
+
Ne.init(e, n), uc.init(e, n);
|
|
3915
|
+
});
|
|
3916
|
+
function Ea(e, n, t) {
|
|
3917
|
+
return new $o({
|
|
3918
|
+
type: "union",
|
|
3919
|
+
options: n,
|
|
3920
|
+
discriminator: e,
|
|
3921
|
+
...p(t)
|
|
3922
|
+
});
|
|
3923
|
+
}
|
|
3924
|
+
const ko = /* @__PURE__ */ u("ZodIntersection", (e, n) => {
|
|
3925
|
+
ac.init(e, n), g.init(e, n), e._zod.processJSONSchema = (t, r, o) => Ur(e, t, r, o);
|
|
3926
|
+
});
|
|
3927
|
+
function Zo(e, n) {
|
|
3928
|
+
return new ko({
|
|
3929
|
+
type: "intersection",
|
|
3930
|
+
left: e,
|
|
3931
|
+
right: n
|
|
3932
|
+
});
|
|
3933
|
+
}
|
|
3934
|
+
const So = /* @__PURE__ */ u("ZodTuple", (e, n) => {
|
|
3935
|
+
Vt.init(e, n), g.init(e, n), e._zod.processJSONSchema = (t, r, o) => Mr(e, t, r, o), e.rest = (t) => e.clone({
|
|
3936
|
+
...e._zod.def,
|
|
3937
|
+
rest: t
|
|
3938
|
+
});
|
|
3939
|
+
});
|
|
3940
|
+
function Oo(e, n, t) {
|
|
3941
|
+
const r = n instanceof _, o = r ? t : n, i = r ? n : null;
|
|
3942
|
+
return new So({
|
|
3943
|
+
type: "tuple",
|
|
3944
|
+
items: e,
|
|
3945
|
+
rest: i,
|
|
3946
|
+
...p(o)
|
|
3947
|
+
});
|
|
3948
|
+
}
|
|
3949
|
+
const Ae = /* @__PURE__ */ u("ZodRecord", (e, n) => {
|
|
3950
|
+
lc.init(e, n), g.init(e, n), e._zod.processJSONSchema = (t, r, o) => Lr(e, t, r, o), e.keyType = n.keyType, e.valueType = n.valueType;
|
|
3951
|
+
});
|
|
3952
|
+
function To(e, n, t) {
|
|
3953
|
+
return new Ae({
|
|
3954
|
+
type: "record",
|
|
3955
|
+
keyType: e,
|
|
3956
|
+
valueType: n,
|
|
3957
|
+
...p(t)
|
|
3958
|
+
});
|
|
3959
|
+
}
|
|
3960
|
+
function Na(e, n, t) {
|
|
3961
|
+
const r = C(e);
|
|
3962
|
+
return r._zod.values = void 0, new Ae({
|
|
3963
|
+
type: "record",
|
|
3964
|
+
keyType: r,
|
|
3965
|
+
valueType: n,
|
|
3966
|
+
...p(t)
|
|
3967
|
+
});
|
|
3968
|
+
}
|
|
3969
|
+
function Aa(e, n, t) {
|
|
3970
|
+
return new Ae({
|
|
3971
|
+
type: "record",
|
|
3972
|
+
keyType: e,
|
|
3973
|
+
valueType: n,
|
|
3974
|
+
mode: "loose",
|
|
3975
|
+
...p(t)
|
|
3976
|
+
});
|
|
3977
|
+
}
|
|
3978
|
+
const Io = /* @__PURE__ */ u("ZodMap", (e, n) => {
|
|
3979
|
+
fc.init(e, n), g.init(e, n), e._zod.processJSONSchema = (t, r, o) => Dr(e, t), e.keyType = n.keyType, e.valueType = n.valueType, e.min = (...t) => e.check(/* @__PURE__ */ Q(...t)), e.nonempty = (t) => e.check(/* @__PURE__ */ Q(1, t)), e.max = (...t) => e.check(/* @__PURE__ */ qe(...t)), e.size = (...t) => e.check(/* @__PURE__ */ dr(...t));
|
|
3980
|
+
});
|
|
3981
|
+
function ja(e, n, t) {
|
|
3982
|
+
return new Io({
|
|
3983
|
+
type: "map",
|
|
3984
|
+
keyType: e,
|
|
3985
|
+
valueType: n,
|
|
3986
|
+
...p(t)
|
|
3987
|
+
});
|
|
3988
|
+
}
|
|
3989
|
+
const Po = /* @__PURE__ */ u("ZodSet", (e, n) => {
|
|
3990
|
+
pc.init(e, n), g.init(e, n), e._zod.processJSONSchema = (t, r, o) => Rr(e, t), e.min = (...t) => e.check(/* @__PURE__ */ Q(...t)), e.nonempty = (t) => e.check(/* @__PURE__ */ Q(1, t)), e.max = (...t) => e.check(/* @__PURE__ */ qe(...t)), e.size = (...t) => e.check(/* @__PURE__ */ dr(...t));
|
|
3991
|
+
});
|
|
3992
|
+
function xa(e, n) {
|
|
3993
|
+
return new Po({
|
|
3994
|
+
type: "set",
|
|
3995
|
+
valueType: e,
|
|
3996
|
+
...p(n)
|
|
3997
|
+
});
|
|
3998
|
+
}
|
|
3999
|
+
const ee = /* @__PURE__ */ u("ZodEnum", (e, n) => {
|
|
4000
|
+
dc.init(e, n), g.init(e, n), e._zod.processJSONSchema = (r, o, i) => Tr(e, r, o), e.enum = n.entries, e.options = Object.values(n.entries);
|
|
4001
|
+
const t = new Set(Object.keys(n.entries));
|
|
4002
|
+
e.extract = (r, o) => {
|
|
4003
|
+
const i = {};
|
|
4004
|
+
for (const s of r)
|
|
4005
|
+
if (t.has(s))
|
|
4006
|
+
i[s] = n.entries[s];
|
|
4007
|
+
else
|
|
4008
|
+
throw new Error(`Key ${s} not found in enum`);
|
|
4009
|
+
return new ee({
|
|
4010
|
+
...n,
|
|
4011
|
+
checks: [],
|
|
4012
|
+
...p(o),
|
|
4013
|
+
entries: i
|
|
4014
|
+
});
|
|
4015
|
+
}, e.exclude = (r, o) => {
|
|
4016
|
+
const i = { ...n.entries };
|
|
4017
|
+
for (const s of r)
|
|
4018
|
+
if (t.has(s))
|
|
4019
|
+
delete i[s];
|
|
4020
|
+
else
|
|
4021
|
+
throw new Error(`Key ${s} not found in enum`);
|
|
4022
|
+
return new ee({
|
|
4023
|
+
...n,
|
|
4024
|
+
checks: [],
|
|
4025
|
+
...p(o),
|
|
4026
|
+
entries: i
|
|
4027
|
+
});
|
|
4028
|
+
};
|
|
4029
|
+
});
|
|
4030
|
+
function kn(e, n) {
|
|
4031
|
+
const t = Array.isArray(e) ? Object.fromEntries(e.map((r) => [r, r])) : e;
|
|
4032
|
+
return new ee({
|
|
4033
|
+
type: "enum",
|
|
4034
|
+
entries: t,
|
|
4035
|
+
...p(n)
|
|
4036
|
+
});
|
|
4037
|
+
}
|
|
4038
|
+
function Ca(e, n) {
|
|
4039
|
+
return new ee({
|
|
4040
|
+
type: "enum",
|
|
4041
|
+
entries: e,
|
|
4042
|
+
...p(n)
|
|
4043
|
+
});
|
|
4044
|
+
}
|
|
4045
|
+
const Eo = /* @__PURE__ */ u("ZodLiteral", (e, n) => {
|
|
4046
|
+
mc.init(e, n), g.init(e, n), e._zod.processJSONSchema = (t, r, o) => Ir(e, t, r), e.values = new Set(n.values), Object.defineProperty(e, "value", {
|
|
4047
|
+
get() {
|
|
4048
|
+
if (n.values.length > 1)
|
|
4049
|
+
throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");
|
|
4050
|
+
return n.values[0];
|
|
4051
|
+
}
|
|
4052
|
+
});
|
|
4053
|
+
});
|
|
4054
|
+
function Da(e, n) {
|
|
4055
|
+
return new Eo({
|
|
4056
|
+
type: "literal",
|
|
4057
|
+
values: Array.isArray(e) ? e : [e],
|
|
4058
|
+
...p(n)
|
|
4059
|
+
});
|
|
4060
|
+
}
|
|
4061
|
+
const No = /* @__PURE__ */ u("ZodFile", (e, n) => {
|
|
4062
|
+
hc.init(e, n), g.init(e, n), e._zod.processJSONSchema = (t, r, o) => Nr(e, t, r), e.min = (t, r) => e.check(/* @__PURE__ */ Q(t, r)), e.max = (t, r) => e.check(/* @__PURE__ */ qe(t, r)), e.mime = (t, r) => e.check(/* @__PURE__ */ fu(Array.isArray(t) ? t : [t], r));
|
|
4063
|
+
});
|
|
4064
|
+
function Ra(e) {
|
|
4065
|
+
return /* @__PURE__ */ vu(No, e);
|
|
4066
|
+
}
|
|
4067
|
+
const Ao = /* @__PURE__ */ u("ZodTransform", (e, n) => {
|
|
4068
|
+
_c.init(e, n), g.init(e, n), e._zod.processJSONSchema = (t, r, o) => Cr(e, t), e._zod.parse = (t, r) => {
|
|
4069
|
+
if (r.direction === "backward")
|
|
4070
|
+
throw new Me(e.constructor.name);
|
|
4071
|
+
t.addIssue = (i) => {
|
|
4072
|
+
if (typeof i == "string")
|
|
4073
|
+
t.issues.push(q(i, t.value, n));
|
|
4074
|
+
else {
|
|
4075
|
+
const s = i;
|
|
4076
|
+
s.fatal && (s.continue = !1), s.code ?? (s.code = "custom"), s.input ?? (s.input = t.value), s.inst ?? (s.inst = e), t.issues.push(q(s));
|
|
4077
|
+
}
|
|
4078
|
+
};
|
|
4079
|
+
const o = n.transform(t.value, t);
|
|
4080
|
+
return o instanceof Promise ? o.then((i) => (t.value = i, t)) : (t.value = o, t);
|
|
4081
|
+
};
|
|
4082
|
+
});
|
|
4083
|
+
function Zn(e) {
|
|
4084
|
+
return new Ao({
|
|
4085
|
+
type: "transform",
|
|
4086
|
+
transform: e
|
|
4087
|
+
});
|
|
4088
|
+
}
|
|
4089
|
+
const Sn = /* @__PURE__ */ u("ZodOptional", (e, n) => {
|
|
4090
|
+
Bt.init(e, n), g.init(e, n), e._zod.processJSONSchema = (t, r, o) => He(e, t, r, o), e.unwrap = () => e._zod.def.innerType;
|
|
4091
|
+
});
|
|
4092
|
+
function ge(e) {
|
|
4093
|
+
return new Sn({
|
|
4094
|
+
type: "optional",
|
|
4095
|
+
innerType: e
|
|
4096
|
+
});
|
|
4097
|
+
}
|
|
4098
|
+
const jo = /* @__PURE__ */ u("ZodExactOptional", (e, n) => {
|
|
4099
|
+
gc.init(e, n), g.init(e, n), e._zod.processJSONSchema = (t, r, o) => He(e, t, r, o), e.unwrap = () => e._zod.def.innerType;
|
|
4100
|
+
});
|
|
4101
|
+
function xo(e) {
|
|
4102
|
+
return new jo({
|
|
4103
|
+
type: "optional",
|
|
4104
|
+
innerType: e
|
|
4105
|
+
});
|
|
4106
|
+
}
|
|
4107
|
+
const Co = /* @__PURE__ */ u("ZodNullable", (e, n) => {
|
|
4108
|
+
vc.init(e, n), g.init(e, n), e._zod.processJSONSchema = (t, r, o) => Vr(e, t, r, o), e.unwrap = () => e._zod.def.innerType;
|
|
4109
|
+
});
|
|
4110
|
+
function ve(e) {
|
|
4111
|
+
return new Co({
|
|
4112
|
+
type: "nullable",
|
|
4113
|
+
innerType: e
|
|
4114
|
+
});
|
|
4115
|
+
}
|
|
4116
|
+
function Fa(e) {
|
|
4117
|
+
return ge(ve(e));
|
|
4118
|
+
}
|
|
4119
|
+
const Do = /* @__PURE__ */ u("ZodDefault", (e, n) => {
|
|
4120
|
+
zc.init(e, n), g.init(e, n), e._zod.processJSONSchema = (t, r, o) => Wr(e, t, r, o), e.unwrap = () => e._zod.def.innerType, e.removeDefault = e.unwrap;
|
|
4121
|
+
});
|
|
4122
|
+
function Ro(e, n) {
|
|
4123
|
+
return new Do({
|
|
4124
|
+
type: "default",
|
|
4125
|
+
innerType: e,
|
|
4126
|
+
get defaultValue() {
|
|
4127
|
+
return typeof n == "function" ? n() : Hn(n);
|
|
4128
|
+
}
|
|
4129
|
+
});
|
|
4130
|
+
}
|
|
4131
|
+
const Fo = /* @__PURE__ */ u("ZodPrefault", (e, n) => {
|
|
4132
|
+
bc.init(e, n), g.init(e, n), e._zod.processJSONSchema = (t, r, o) => Kr(e, t, r, o), e.unwrap = () => e._zod.def.innerType;
|
|
4133
|
+
});
|
|
4134
|
+
function Jo(e, n) {
|
|
4135
|
+
return new Fo({
|
|
4136
|
+
type: "prefault",
|
|
4137
|
+
innerType: e,
|
|
4138
|
+
get defaultValue() {
|
|
4139
|
+
return typeof n == "function" ? n() : Hn(n);
|
|
4140
|
+
}
|
|
4141
|
+
});
|
|
4142
|
+
}
|
|
4143
|
+
const On = /* @__PURE__ */ u("ZodNonOptional", (e, n) => {
|
|
4144
|
+
yc.init(e, n), g.init(e, n), e._zod.processJSONSchema = (t, r, o) => Br(e, t, r, o), e.unwrap = () => e._zod.def.innerType;
|
|
4145
|
+
});
|
|
4146
|
+
function Uo(e, n) {
|
|
4147
|
+
return new On({
|
|
4148
|
+
type: "nonoptional",
|
|
4149
|
+
innerType: e,
|
|
4150
|
+
...p(n)
|
|
4151
|
+
});
|
|
4152
|
+
}
|
|
4153
|
+
const Mo = /* @__PURE__ */ u("ZodSuccess", (e, n) => {
|
|
4154
|
+
wc.init(e, n), g.init(e, n), e._zod.processJSONSchema = (t, r, o) => Ar(e, t, r), e.unwrap = () => e._zod.def.innerType;
|
|
4155
|
+
});
|
|
4156
|
+
function Ja(e) {
|
|
4157
|
+
return new Mo({
|
|
4158
|
+
type: "success",
|
|
4159
|
+
innerType: e
|
|
4160
|
+
});
|
|
4161
|
+
}
|
|
4162
|
+
const Lo = /* @__PURE__ */ u("ZodCatch", (e, n) => {
|
|
4163
|
+
$c.init(e, n), g.init(e, n), e._zod.processJSONSchema = (t, r, o) => Gr(e, t, r, o), e.unwrap = () => e._zod.def.innerType, e.removeCatch = e.unwrap;
|
|
4164
|
+
});
|
|
4165
|
+
function Vo(e, n) {
|
|
4166
|
+
return new Lo({
|
|
4167
|
+
type: "catch",
|
|
4168
|
+
innerType: e,
|
|
4169
|
+
catchValue: typeof n == "function" ? n : () => n
|
|
4170
|
+
});
|
|
4171
|
+
}
|
|
4172
|
+
const Bo = /* @__PURE__ */ u("ZodNaN", (e, n) => {
|
|
4173
|
+
kc.init(e, n), g.init(e, n), e._zod.processJSONSchema = (t, r, o) => Pr(e, t);
|
|
4174
|
+
});
|
|
4175
|
+
function Ua(e) {
|
|
4176
|
+
return /* @__PURE__ */ ou(Bo, e);
|
|
4177
|
+
}
|
|
4178
|
+
const Tn = /* @__PURE__ */ u("ZodPipe", (e, n) => {
|
|
4179
|
+
Zc.init(e, n), g.init(e, n), e._zod.processJSONSchema = (t, r, o) => Yr(e, t, r, o), e.in = n.in, e.out = n.out;
|
|
4180
|
+
});
|
|
4181
|
+
function ze(e, n) {
|
|
4182
|
+
return new Tn({
|
|
4183
|
+
type: "pipe",
|
|
4184
|
+
in: e,
|
|
4185
|
+
out: n
|
|
4186
|
+
// ...util.normalizeParams(params),
|
|
4187
|
+
});
|
|
4188
|
+
}
|
|
4189
|
+
const In = /* @__PURE__ */ u("ZodCodec", (e, n) => {
|
|
4190
|
+
Tn.init(e, n), Wt.init(e, n);
|
|
4191
|
+
});
|
|
4192
|
+
function Ma(e, n, t) {
|
|
4193
|
+
return new In({
|
|
4194
|
+
type: "pipe",
|
|
4195
|
+
in: e,
|
|
4196
|
+
out: n,
|
|
4197
|
+
transform: t.decode,
|
|
4198
|
+
reverseTransform: t.encode
|
|
4199
|
+
});
|
|
4200
|
+
}
|
|
4201
|
+
const Wo = /* @__PURE__ */ u("ZodReadonly", (e, n) => {
|
|
4202
|
+
Sc.init(e, n), g.init(e, n), e._zod.processJSONSchema = (t, r, o) => qr(e, t, r, o), e.unwrap = () => e._zod.def.innerType;
|
|
4203
|
+
});
|
|
4204
|
+
function Ko(e) {
|
|
4205
|
+
return new Wo({
|
|
4206
|
+
type: "readonly",
|
|
4207
|
+
innerType: e
|
|
4208
|
+
});
|
|
4209
|
+
}
|
|
4210
|
+
const Go = /* @__PURE__ */ u("ZodTemplateLiteral", (e, n) => {
|
|
4211
|
+
Oc.init(e, n), g.init(e, n), e._zod.processJSONSchema = (t, r, o) => Er(e, t, r);
|
|
4212
|
+
});
|
|
4213
|
+
function La(e, n) {
|
|
4214
|
+
return new Go({
|
|
4215
|
+
type: "template_literal",
|
|
4216
|
+
parts: e,
|
|
4217
|
+
...p(n)
|
|
4218
|
+
});
|
|
4219
|
+
}
|
|
4220
|
+
const Yo = /* @__PURE__ */ u("ZodLazy", (e, n) => {
|
|
4221
|
+
Pc.init(e, n), g.init(e, n), e._zod.processJSONSchema = (t, r, o) => Hr(e, t, r, o), e.unwrap = () => e._zod.def.getter();
|
|
4222
|
+
});
|
|
4223
|
+
function qo(e) {
|
|
4224
|
+
return new Yo({
|
|
4225
|
+
type: "lazy",
|
|
4226
|
+
getter: e
|
|
4227
|
+
});
|
|
4228
|
+
}
|
|
4229
|
+
const Xo = /* @__PURE__ */ u("ZodPromise", (e, n) => {
|
|
4230
|
+
Ic.init(e, n), g.init(e, n), e._zod.processJSONSchema = (t, r, o) => Xr(e, t, r, o), e.unwrap = () => e._zod.def.innerType;
|
|
4231
|
+
});
|
|
4232
|
+
function Va(e) {
|
|
4233
|
+
return new Xo({
|
|
4234
|
+
type: "promise",
|
|
4235
|
+
innerType: e
|
|
4236
|
+
});
|
|
4237
|
+
}
|
|
4238
|
+
const Ho = /* @__PURE__ */ u("ZodFunction", (e, n) => {
|
|
4239
|
+
Tc.init(e, n), g.init(e, n), e._zod.processJSONSchema = (t, r, o) => xr(e, t);
|
|
4240
|
+
});
|
|
4241
|
+
function Gn(e) {
|
|
4242
|
+
return new Ho({
|
|
4243
|
+
type: "function",
|
|
4244
|
+
input: Array.isArray(e?.input) ? Oo(e?.input) : e?.input ?? Pe(B()),
|
|
4245
|
+
output: e?.output ?? B()
|
|
4246
|
+
});
|
|
4247
|
+
}
|
|
4248
|
+
const je = /* @__PURE__ */ u("ZodCustom", (e, n) => {
|
|
4249
|
+
Ec.init(e, n), g.init(e, n), e._zod.processJSONSchema = (t, r, o) => jr(e, t);
|
|
4250
|
+
});
|
|
4251
|
+
function Ba(e) {
|
|
4252
|
+
const n = new w({
|
|
4253
|
+
check: "custom"
|
|
4254
|
+
// ...util.normalizeParams(params),
|
|
4255
|
+
});
|
|
4256
|
+
return n._zod.check = e, n;
|
|
4257
|
+
}
|
|
4258
|
+
function Wa(e, n) {
|
|
4259
|
+
return /* @__PURE__ */ zu(je, e ?? (() => !0), n);
|
|
4260
|
+
}
|
|
4261
|
+
function Qo(e, n = {}) {
|
|
4262
|
+
return /* @__PURE__ */ bu(je, e, n);
|
|
4263
|
+
}
|
|
4264
|
+
function ei(e) {
|
|
4265
|
+
return /* @__PURE__ */ yu(e);
|
|
4266
|
+
}
|
|
4267
|
+
const Ka = $u, Ga = ku;
|
|
4268
|
+
function Ya(e, n = {}) {
|
|
4269
|
+
const t = new je({
|
|
4270
|
+
type: "custom",
|
|
4271
|
+
check: "custom",
|
|
4272
|
+
fn: (r) => r instanceof e,
|
|
4273
|
+
abort: !0,
|
|
4274
|
+
...p(n)
|
|
4275
|
+
});
|
|
4276
|
+
return t._zod.bag.Class = e, t._zod.check = (r) => {
|
|
4277
|
+
r.value instanceof e || r.issues.push({
|
|
4278
|
+
code: "invalid_type",
|
|
4279
|
+
expected: e.name,
|
|
4280
|
+
input: r.value,
|
|
4281
|
+
inst: t,
|
|
4282
|
+
path: [...t._zod.def.path ?? []]
|
|
4283
|
+
});
|
|
4284
|
+
}, t;
|
|
4285
|
+
}
|
|
4286
|
+
const qa = (...e) => /* @__PURE__ */ Zu({
|
|
4287
|
+
Codec: In,
|
|
4288
|
+
Boolean: zn,
|
|
4289
|
+
String: en
|
|
4290
|
+
}, ...e);
|
|
4291
|
+
function Xa(e) {
|
|
4292
|
+
const n = qo(() => $n([Je(e), ao(), lo(), ho(), Pe(n), To(Je(), n)]));
|
|
4293
|
+
return n;
|
|
4294
|
+
}
|
|
4295
|
+
function Ha(e, n) {
|
|
4296
|
+
return ze(Zn(e), n);
|
|
4297
|
+
}
|
|
4298
|
+
const ul = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
4299
|
+
__proto__: null,
|
|
4300
|
+
ZodAny: _o,
|
|
4301
|
+
ZodArray: yo,
|
|
4302
|
+
ZodBase64: mn,
|
|
4303
|
+
ZodBase64URL: hn,
|
|
4304
|
+
ZodBigInt: bn,
|
|
4305
|
+
ZodBigIntFormat: yn,
|
|
4306
|
+
ZodBoolean: zn,
|
|
4307
|
+
ZodCIDRv4: pn,
|
|
4308
|
+
ZodCIDRv6: dn,
|
|
4309
|
+
ZodCUID: on,
|
|
4310
|
+
ZodCUID2: sn,
|
|
4311
|
+
ZodCatch: Lo,
|
|
4312
|
+
ZodCodec: In,
|
|
4313
|
+
ZodCustom: je,
|
|
4314
|
+
ZodCustomStringFormat: re,
|
|
4315
|
+
ZodDate: bo,
|
|
4316
|
+
ZodDefault: Do,
|
|
4317
|
+
ZodDiscriminatedUnion: $o,
|
|
4318
|
+
ZodE164: _n,
|
|
4319
|
+
ZodEmail: nn,
|
|
4320
|
+
ZodEmoji: tn,
|
|
4321
|
+
ZodEnum: ee,
|
|
4322
|
+
ZodExactOptional: jo,
|
|
4323
|
+
ZodFile: No,
|
|
4324
|
+
ZodFunction: Ho,
|
|
4325
|
+
ZodGUID: _e,
|
|
4326
|
+
ZodIPv4: ln,
|
|
4327
|
+
ZodIPv6: fn,
|
|
4328
|
+
ZodIntersection: ko,
|
|
4329
|
+
ZodJWT: gn,
|
|
4330
|
+
ZodKSUID: an,
|
|
4331
|
+
ZodLazy: Yo,
|
|
4332
|
+
ZodLiteral: Eo,
|
|
4333
|
+
ZodMAC: uo,
|
|
4334
|
+
ZodMap: Io,
|
|
4335
|
+
ZodNaN: Bo,
|
|
4336
|
+
ZodNanoID: rn,
|
|
4337
|
+
ZodNever: vo,
|
|
4338
|
+
ZodNonOptional: On,
|
|
4339
|
+
ZodNull: mo,
|
|
4340
|
+
ZodNullable: Co,
|
|
4341
|
+
ZodNumber: vn,
|
|
4342
|
+
ZodNumberFormat: G,
|
|
4343
|
+
ZodObject: Ee,
|
|
4344
|
+
ZodOptional: Sn,
|
|
4345
|
+
ZodPipe: Tn,
|
|
4346
|
+
ZodPrefault: Fo,
|
|
4347
|
+
ZodPromise: Xo,
|
|
4348
|
+
ZodReadonly: Wo,
|
|
4349
|
+
ZodRecord: Ae,
|
|
4350
|
+
ZodSet: Po,
|
|
4351
|
+
ZodString: en,
|
|
4352
|
+
ZodStringFormat: y,
|
|
4353
|
+
ZodSuccess: Mo,
|
|
4354
|
+
ZodSymbol: fo,
|
|
4355
|
+
ZodTemplateLiteral: Go,
|
|
4356
|
+
ZodTransform: Ao,
|
|
4357
|
+
ZodTuple: So,
|
|
4358
|
+
ZodType: g,
|
|
4359
|
+
ZodULID: cn,
|
|
4360
|
+
ZodURL: Ie,
|
|
4361
|
+
ZodUUID: x,
|
|
4362
|
+
ZodUndefined: po,
|
|
4363
|
+
ZodUnion: Ne,
|
|
4364
|
+
ZodUnknown: go,
|
|
4365
|
+
ZodVoid: zo,
|
|
4366
|
+
ZodXID: un,
|
|
4367
|
+
ZodXor: wo,
|
|
4368
|
+
_ZodString: Qe,
|
|
4369
|
+
_default: Ro,
|
|
4370
|
+
_function: Gn,
|
|
4371
|
+
any: $a,
|
|
4372
|
+
array: Pe,
|
|
4373
|
+
base64: sa,
|
|
4374
|
+
base64url: ca,
|
|
4375
|
+
bigint: va,
|
|
4376
|
+
boolean: lo,
|
|
4377
|
+
catch: Vo,
|
|
4378
|
+
check: Ba,
|
|
4379
|
+
cidrv4: oa,
|
|
4380
|
+
cidrv6: ia,
|
|
4381
|
+
codec: Ma,
|
|
4382
|
+
cuid: qu,
|
|
4383
|
+
cuid2: Xu,
|
|
4384
|
+
custom: Wa,
|
|
4385
|
+
date: Za,
|
|
4386
|
+
describe: Ka,
|
|
4387
|
+
discriminatedUnion: Ea,
|
|
4388
|
+
e164: ua,
|
|
4389
|
+
email: Ju,
|
|
4390
|
+
emoji: Gu,
|
|
4391
|
+
enum: kn,
|
|
4392
|
+
exactOptional: xo,
|
|
4393
|
+
file: Ra,
|
|
4394
|
+
float32: ma,
|
|
4395
|
+
float64: ha,
|
|
4396
|
+
function: Gn,
|
|
4397
|
+
guid: Uu,
|
|
4398
|
+
hash: da,
|
|
4399
|
+
hex: pa,
|
|
4400
|
+
hostname: fa,
|
|
4401
|
+
httpUrl: Ku,
|
|
4402
|
+
instanceof: Ya,
|
|
4403
|
+
int: Ue,
|
|
4404
|
+
int32: _a,
|
|
4405
|
+
int64: za,
|
|
4406
|
+
intersection: Zo,
|
|
4407
|
+
ipv4: na,
|
|
4408
|
+
ipv6: ra,
|
|
4409
|
+
json: Xa,
|
|
4410
|
+
jwt: aa,
|
|
4411
|
+
keyof: Sa,
|
|
4412
|
+
ksuid: ea,
|
|
4413
|
+
lazy: qo,
|
|
4414
|
+
literal: Da,
|
|
4415
|
+
looseObject: Ia,
|
|
4416
|
+
looseRecord: Aa,
|
|
4417
|
+
mac: ta,
|
|
4418
|
+
map: ja,
|
|
4419
|
+
meta: Ga,
|
|
4420
|
+
nan: Ua,
|
|
4421
|
+
nanoid: Yu,
|
|
4422
|
+
nativeEnum: Ca,
|
|
4423
|
+
never: wn,
|
|
4424
|
+
nonoptional: Uo,
|
|
4425
|
+
null: ho,
|
|
4426
|
+
nullable: ve,
|
|
4427
|
+
nullish: Fa,
|
|
4428
|
+
number: ao,
|
|
4429
|
+
object: Oa,
|
|
4430
|
+
optional: ge,
|
|
4431
|
+
partialRecord: Na,
|
|
4432
|
+
pipe: ze,
|
|
4433
|
+
prefault: Jo,
|
|
4434
|
+
preprocess: Ha,
|
|
4435
|
+
promise: Va,
|
|
4436
|
+
readonly: Ko,
|
|
4437
|
+
record: To,
|
|
4438
|
+
refine: Qo,
|
|
4439
|
+
set: xa,
|
|
4440
|
+
strictObject: Ta,
|
|
4441
|
+
string: Je,
|
|
4442
|
+
stringFormat: la,
|
|
4443
|
+
stringbool: qa,
|
|
4444
|
+
success: Ja,
|
|
4445
|
+
superRefine: ei,
|
|
4446
|
+
symbol: ya,
|
|
4447
|
+
templateLiteral: La,
|
|
4448
|
+
transform: Zn,
|
|
4449
|
+
tuple: Oo,
|
|
4450
|
+
uint32: ga,
|
|
4451
|
+
uint64: ba,
|
|
4452
|
+
ulid: Hu,
|
|
4453
|
+
undefined: wa,
|
|
4454
|
+
union: $n,
|
|
4455
|
+
unknown: B,
|
|
4456
|
+
url: Wu,
|
|
4457
|
+
uuid: Mu,
|
|
4458
|
+
uuidv4: Lu,
|
|
4459
|
+
uuidv6: Vu,
|
|
4460
|
+
uuidv7: Bu,
|
|
4461
|
+
void: ka,
|
|
4462
|
+
xid: Qu,
|
|
4463
|
+
xor: Pa
|
|
4464
|
+
}, Symbol.toStringTag, { value: "Module" }));
|
|
4465
|
+
export {
|
|
4466
|
+
pu as A,
|
|
4467
|
+
K as B,
|
|
4468
|
+
el as C,
|
|
4469
|
+
ol as D,
|
|
4470
|
+
iu as E,
|
|
4471
|
+
dr as F,
|
|
4472
|
+
_u as G,
|
|
4473
|
+
au as H,
|
|
4474
|
+
mu as I,
|
|
4475
|
+
hu as J,
|
|
4476
|
+
du as K,
|
|
4477
|
+
cu as L,
|
|
4478
|
+
ul as M,
|
|
4479
|
+
sl as N,
|
|
4480
|
+
j as O,
|
|
4481
|
+
Ea as P,
|
|
4482
|
+
Ta as Q,
|
|
4483
|
+
Ia as R,
|
|
4484
|
+
cl as Z,
|
|
4485
|
+
kn as _,
|
|
4486
|
+
Pe as a,
|
|
4487
|
+
lo as b,
|
|
4488
|
+
lu as c,
|
|
4489
|
+
H as d,
|
|
4490
|
+
N as e,
|
|
4491
|
+
uu as f,
|
|
4492
|
+
hr as g,
|
|
4493
|
+
su as h,
|
|
4494
|
+
X as i,
|
|
4495
|
+
D as j,
|
|
4496
|
+
mr as k,
|
|
4497
|
+
Da as l,
|
|
4498
|
+
qe as m,
|
|
4499
|
+
ao as n,
|
|
4500
|
+
Oa as o,
|
|
4501
|
+
fu as p,
|
|
4502
|
+
fe as q,
|
|
4503
|
+
To as r,
|
|
4504
|
+
Je as s,
|
|
4505
|
+
il as t,
|
|
4506
|
+
B as u,
|
|
4507
|
+
Q as v,
|
|
4508
|
+
Fe as w,
|
|
4509
|
+
nl as x,
|
|
4510
|
+
rl as y,
|
|
4511
|
+
tl as z
|
|
4512
|
+
};
|