@jsfsi-core/ts-crossplatform 1.1.42 → 1.1.43
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +4 -4
- package/dist/index.mjs +595 -600
- package/package.json +4 -4
package/dist/index.mjs
CHANGED
|
@@ -72,20 +72,18 @@ function ne(e, t = 0) {
|
|
|
72
72
|
}
|
|
73
73
|
//#endregion
|
|
74
74
|
//#region ../../node_modules/uuid/dist/rng.js
|
|
75
|
-
var re
|
|
76
|
-
function
|
|
77
|
-
|
|
78
|
-
if (typeof crypto > "u" || !crypto.getRandomValues) throw Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
|
|
79
|
-
re = crypto.getRandomValues.bind(crypto);
|
|
80
|
-
}
|
|
81
|
-
return re(ie);
|
|
75
|
+
var re = new Uint8Array(16);
|
|
76
|
+
function ie() {
|
|
77
|
+
return crypto.getRandomValues(re);
|
|
82
78
|
}
|
|
83
|
-
var oe = { randomUUID: typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto) };
|
|
84
79
|
//#endregion
|
|
85
80
|
//#region ../../node_modules/uuid/dist/v4.js
|
|
86
|
-
function
|
|
81
|
+
function ae(e, t, n) {
|
|
82
|
+
return !t && !e && crypto.randomUUID ? crypto.randomUUID() : oe(e, t, n);
|
|
83
|
+
}
|
|
84
|
+
function oe(e, t, n) {
|
|
87
85
|
e ||= {};
|
|
88
|
-
let r = e.random ?? e.rng?.() ??
|
|
86
|
+
let r = e.random ?? e.rng?.() ?? ie();
|
|
89
87
|
if (r.length < 16) throw Error("Random bytes length must be >= 16");
|
|
90
88
|
if (r[6] = r[6] & 15 | 64, r[8] = r[8] & 63 | 128, t) {
|
|
91
89
|
if (n ||= 0, n < 0 || n + 16 > t.length) throw RangeError(`UUID byte range ${n}:${n + 15} is out of buffer bounds`);
|
|
@@ -94,12 +92,9 @@ function se(e, t, n) {
|
|
|
94
92
|
}
|
|
95
93
|
return ne(r);
|
|
96
94
|
}
|
|
97
|
-
function ce(e, t, n) {
|
|
98
|
-
return oe.randomUUID && !t && !e ? oe.randomUUID() : se(e, t, n);
|
|
99
|
-
}
|
|
100
95
|
//#endregion
|
|
101
96
|
//#region src/guid/Guid.ts
|
|
102
|
-
var
|
|
97
|
+
var se = class e {
|
|
103
98
|
uuid;
|
|
104
99
|
constructor(e) {
|
|
105
100
|
te(e), this.uuid = e;
|
|
@@ -111,7 +106,7 @@ var le = class e {
|
|
|
111
106
|
return this.uuid === e.toString();
|
|
112
107
|
}
|
|
113
108
|
static new() {
|
|
114
|
-
return new e(
|
|
109
|
+
return new e(ae());
|
|
115
110
|
}
|
|
116
111
|
static empty() {
|
|
117
112
|
return new e(f);
|
|
@@ -157,24 +152,24 @@ var g = class extends Error {
|
|
|
157
152
|
constructor() {
|
|
158
153
|
super("Encountered Promise during synchronous parse. Use .parseAsync() instead.");
|
|
159
154
|
}
|
|
160
|
-
},
|
|
155
|
+
}, ce = class extends Error {
|
|
161
156
|
constructor(e) {
|
|
162
157
|
super(`Encountered unidirectional transform during encode: ${e}`), this.name = "ZodEncodeError";
|
|
163
158
|
}
|
|
164
|
-
},
|
|
165
|
-
function
|
|
166
|
-
return e && Object.assign(
|
|
159
|
+
}, le = {};
|
|
160
|
+
function _(e) {
|
|
161
|
+
return e && Object.assign(le, e), le;
|
|
167
162
|
}
|
|
168
163
|
//#endregion
|
|
169
164
|
//#region ../../node_modules/zod/v4/core/util.js
|
|
170
|
-
function
|
|
165
|
+
function ue(e) {
|
|
171
166
|
let t = Object.values(e).filter((e) => typeof e == "number");
|
|
172
167
|
return Object.entries(e).filter(([e, n]) => t.indexOf(+e) === -1).map(([e, t]) => t);
|
|
173
168
|
}
|
|
174
|
-
function
|
|
169
|
+
function de(e, t) {
|
|
175
170
|
return typeof t == "bigint" ? t.toString() : t;
|
|
176
171
|
}
|
|
177
|
-
function
|
|
172
|
+
function v(e) {
|
|
178
173
|
return { get value() {
|
|
179
174
|
{
|
|
180
175
|
let t = e();
|
|
@@ -183,14 +178,14 @@ function fe(e) {
|
|
|
183
178
|
throw Error("cached value already set");
|
|
184
179
|
} };
|
|
185
180
|
}
|
|
186
|
-
function
|
|
181
|
+
function y(e) {
|
|
187
182
|
return e == null;
|
|
188
183
|
}
|
|
189
|
-
function
|
|
184
|
+
function b(e) {
|
|
190
185
|
let t = +!!e.startsWith("^"), n = e.endsWith("$") ? e.length - 1 : e.length;
|
|
191
186
|
return e.slice(t, n);
|
|
192
187
|
}
|
|
193
|
-
function
|
|
188
|
+
function fe(e, t) {
|
|
194
189
|
let n = (e.toString().split(".")[1] || "").length, r = t.toString(), i = (r.split(".")[1] || "").length;
|
|
195
190
|
if (i === 0 && /\d?e-\d?/.test(r)) {
|
|
196
191
|
let e = r.match(/\d?e-(\d?)/);
|
|
@@ -199,12 +194,12 @@ function he(e, t) {
|
|
|
199
194
|
let a = n > i ? n : i;
|
|
200
195
|
return Number.parseInt(e.toFixed(a).replace(".", "")) % Number.parseInt(t.toFixed(a).replace(".", "")) / 10 ** a;
|
|
201
196
|
}
|
|
202
|
-
var
|
|
203
|
-
function
|
|
197
|
+
var pe = Symbol("evaluating");
|
|
198
|
+
function x(e, t, n) {
|
|
204
199
|
let r;
|
|
205
200
|
Object.defineProperty(e, t, {
|
|
206
201
|
get() {
|
|
207
|
-
if (r !==
|
|
202
|
+
if (r !== pe) return r === void 0 && (r = pe, r = n()), r;
|
|
208
203
|
},
|
|
209
204
|
set(n) {
|
|
210
205
|
Object.defineProperty(e, t, { value: n });
|
|
@@ -212,7 +207,7 @@ function b(e, t, n) {
|
|
|
212
207
|
configurable: !0
|
|
213
208
|
});
|
|
214
209
|
}
|
|
215
|
-
function
|
|
210
|
+
function S(e, t, n) {
|
|
216
211
|
Object.defineProperty(e, t, {
|
|
217
212
|
value: n,
|
|
218
213
|
writable: !0,
|
|
@@ -220,22 +215,22 @@ function x(e, t, n) {
|
|
|
220
215
|
configurable: !0
|
|
221
216
|
});
|
|
222
217
|
}
|
|
223
|
-
function
|
|
218
|
+
function C(...e) {
|
|
224
219
|
let t = {};
|
|
225
220
|
for (let n of e) Object.assign(t, Object.getOwnPropertyDescriptors(n));
|
|
226
221
|
return Object.defineProperties({}, t);
|
|
227
222
|
}
|
|
228
|
-
function
|
|
223
|
+
function me(e) {
|
|
229
224
|
return JSON.stringify(e);
|
|
230
225
|
}
|
|
231
|
-
function
|
|
226
|
+
function he(e) {
|
|
232
227
|
return e.toLowerCase().trim().replace(/[^\w\s-]/g, "").replace(/[\s_-]+/g, "-").replace(/^-+|-+$/g, "");
|
|
233
228
|
}
|
|
234
|
-
var
|
|
235
|
-
function
|
|
229
|
+
var ge = "captureStackTrace" in Error ? Error.captureStackTrace : (...e) => {};
|
|
230
|
+
function w(e) {
|
|
236
231
|
return typeof e == "object" && !!e && !Array.isArray(e);
|
|
237
232
|
}
|
|
238
|
-
var
|
|
233
|
+
var _e = v(() => {
|
|
239
234
|
if (typeof navigator < "u" && navigator?.userAgent?.includes("Cloudflare")) return !1;
|
|
240
235
|
try {
|
|
241
236
|
return Function(""), !0;
|
|
@@ -243,29 +238,29 @@ var be = fe(() => {
|
|
|
243
238
|
return !1;
|
|
244
239
|
}
|
|
245
240
|
});
|
|
246
|
-
function
|
|
247
|
-
if (
|
|
241
|
+
function T(e) {
|
|
242
|
+
if (w(e) === !1) return !1;
|
|
248
243
|
let t = e.constructor;
|
|
249
244
|
if (t === void 0 || typeof t != "function") return !0;
|
|
250
245
|
let n = t.prototype;
|
|
251
|
-
return !(
|
|
246
|
+
return !(w(n) === !1 || Object.prototype.hasOwnProperty.call(n, "isPrototypeOf") === !1);
|
|
252
247
|
}
|
|
253
|
-
function
|
|
254
|
-
return
|
|
248
|
+
function ve(e) {
|
|
249
|
+
return T(e) ? { ...e } : Array.isArray(e) ? [...e] : e;
|
|
255
250
|
}
|
|
256
|
-
var
|
|
251
|
+
var ye = new Set([
|
|
257
252
|
"string",
|
|
258
253
|
"number",
|
|
259
254
|
"symbol"
|
|
260
255
|
]);
|
|
261
|
-
function
|
|
256
|
+
function E(e) {
|
|
262
257
|
return e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
263
258
|
}
|
|
264
|
-
function
|
|
259
|
+
function D(e, t, n) {
|
|
265
260
|
let r = new e._zod.constr(t ?? e._zod.def);
|
|
266
261
|
return (!t || n?.parent) && (r._zod.parent = e), r;
|
|
267
262
|
}
|
|
268
|
-
function
|
|
263
|
+
function O(e) {
|
|
269
264
|
let t = e;
|
|
270
265
|
if (!t) return {};
|
|
271
266
|
if (typeof t == "string") return { error: () => t };
|
|
@@ -278,79 +273,79 @@ function D(e) {
|
|
|
278
273
|
error: () => t.error
|
|
279
274
|
} : t;
|
|
280
275
|
}
|
|
281
|
-
function
|
|
276
|
+
function be(e) {
|
|
282
277
|
return Object.keys(e).filter((t) => e[t]._zod.optin === "optional" && e[t]._zod.optout === "optional");
|
|
283
278
|
}
|
|
284
|
-
var
|
|
279
|
+
var xe = {
|
|
285
280
|
safeint: [-(2 ** 53 - 1), 2 ** 53 - 1],
|
|
286
281
|
int32: [-2147483648, 2147483647],
|
|
287
282
|
uint32: [0, 4294967295],
|
|
288
283
|
float32: [-34028234663852886e22, 34028234663852886e22],
|
|
289
284
|
float64: [-Number.MAX_VALUE, Number.MAX_VALUE]
|
|
290
285
|
};
|
|
291
|
-
function
|
|
286
|
+
function Se(e, t) {
|
|
292
287
|
let n = e._zod.def, r = n.checks;
|
|
293
288
|
if (r && r.length > 0) throw Error(".pick() cannot be used on object schemas containing refinements");
|
|
294
|
-
return
|
|
289
|
+
return D(e, C(e._zod.def, {
|
|
295
290
|
get shape() {
|
|
296
291
|
let e = {};
|
|
297
292
|
for (let r in t) {
|
|
298
293
|
if (!(r in n.shape)) throw Error(`Unrecognized key: "${r}"`);
|
|
299
294
|
t[r] && (e[r] = n.shape[r]);
|
|
300
295
|
}
|
|
301
|
-
return
|
|
296
|
+
return S(this, "shape", e), e;
|
|
302
297
|
},
|
|
303
298
|
checks: []
|
|
304
299
|
}));
|
|
305
300
|
}
|
|
306
|
-
function
|
|
301
|
+
function Ce(e, t) {
|
|
307
302
|
let n = e._zod.def, r = n.checks;
|
|
308
303
|
if (r && r.length > 0) throw Error(".omit() cannot be used on object schemas containing refinements");
|
|
309
|
-
return
|
|
304
|
+
return D(e, C(e._zod.def, {
|
|
310
305
|
get shape() {
|
|
311
306
|
let r = { ...e._zod.def.shape };
|
|
312
307
|
for (let e in t) {
|
|
313
308
|
if (!(e in n.shape)) throw Error(`Unrecognized key: "${e}"`);
|
|
314
309
|
t[e] && delete r[e];
|
|
315
310
|
}
|
|
316
|
-
return
|
|
311
|
+
return S(this, "shape", r), r;
|
|
317
312
|
},
|
|
318
313
|
checks: []
|
|
319
314
|
}));
|
|
320
315
|
}
|
|
321
|
-
function
|
|
322
|
-
if (!
|
|
316
|
+
function we(e, t) {
|
|
317
|
+
if (!T(t)) throw Error("Invalid input to extend: expected a plain object");
|
|
323
318
|
let n = e._zod.def.checks;
|
|
324
319
|
if (n && n.length > 0) {
|
|
325
320
|
let n = e._zod.def.shape;
|
|
326
321
|
for (let e in t) if (Object.getOwnPropertyDescriptor(n, e) !== void 0) throw Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.");
|
|
327
322
|
}
|
|
328
|
-
return
|
|
323
|
+
return D(e, C(e._zod.def, { get shape() {
|
|
329
324
|
let n = {
|
|
330
325
|
...e._zod.def.shape,
|
|
331
326
|
...t
|
|
332
327
|
};
|
|
333
|
-
return
|
|
328
|
+
return S(this, "shape", n), n;
|
|
334
329
|
} }));
|
|
335
330
|
}
|
|
336
|
-
function
|
|
337
|
-
if (!
|
|
338
|
-
return
|
|
331
|
+
function Te(e, t) {
|
|
332
|
+
if (!T(t)) throw Error("Invalid input to safeExtend: expected a plain object");
|
|
333
|
+
return D(e, C(e._zod.def, { get shape() {
|
|
339
334
|
let n = {
|
|
340
335
|
...e._zod.def.shape,
|
|
341
336
|
...t
|
|
342
337
|
};
|
|
343
|
-
return
|
|
338
|
+
return S(this, "shape", n), n;
|
|
344
339
|
} }));
|
|
345
340
|
}
|
|
346
|
-
function
|
|
347
|
-
return
|
|
341
|
+
function Ee(e, t) {
|
|
342
|
+
return D(e, C(e._zod.def, {
|
|
348
343
|
get shape() {
|
|
349
344
|
let n = {
|
|
350
345
|
...e._zod.def.shape,
|
|
351
346
|
...t._zod.def.shape
|
|
352
347
|
};
|
|
353
|
-
return
|
|
348
|
+
return S(this, "shape", n), n;
|
|
354
349
|
},
|
|
355
350
|
get catchall() {
|
|
356
351
|
return t._zod.def.catchall;
|
|
@@ -358,10 +353,10 @@ function ke(e, t) {
|
|
|
358
353
|
checks: []
|
|
359
354
|
}));
|
|
360
355
|
}
|
|
361
|
-
function
|
|
356
|
+
function De(e, t, n) {
|
|
362
357
|
let r = t._zod.def.checks;
|
|
363
358
|
if (r && r.length > 0) throw Error(".partial() cannot be used on object schemas containing refinements");
|
|
364
|
-
return
|
|
359
|
+
return D(t, C(t._zod.def, {
|
|
365
360
|
get shape() {
|
|
366
361
|
let r = t._zod.def.shape, i = { ...r };
|
|
367
362
|
if (n) for (let t in n) {
|
|
@@ -375,13 +370,13 @@ function Ae(e, t, n) {
|
|
|
375
370
|
type: "optional",
|
|
376
371
|
innerType: r[t]
|
|
377
372
|
}) : r[t];
|
|
378
|
-
return
|
|
373
|
+
return S(this, "shape", i), i;
|
|
379
374
|
},
|
|
380
375
|
checks: []
|
|
381
376
|
}));
|
|
382
377
|
}
|
|
383
|
-
function
|
|
384
|
-
return
|
|
378
|
+
function Oe(e, t, n) {
|
|
379
|
+
return D(t, C(t._zod.def, { get shape() {
|
|
385
380
|
let r = t._zod.def.shape, i = { ...r };
|
|
386
381
|
if (n) for (let t in n) {
|
|
387
382
|
if (!(t in i)) throw Error(`Unrecognized key: "${t}"`);
|
|
@@ -394,31 +389,31 @@ function je(e, t, n) {
|
|
|
394
389
|
type: "nonoptional",
|
|
395
390
|
innerType: r[t]
|
|
396
391
|
});
|
|
397
|
-
return
|
|
392
|
+
return S(this, "shape", i), i;
|
|
398
393
|
} }));
|
|
399
394
|
}
|
|
400
|
-
function
|
|
395
|
+
function k(e, t = 0) {
|
|
401
396
|
if (e.aborted === !0) return !0;
|
|
402
397
|
for (let n = t; n < e.issues.length; n++) if (e.issues[n]?.continue !== !0) return !0;
|
|
403
398
|
return !1;
|
|
404
399
|
}
|
|
405
|
-
function
|
|
400
|
+
function ke(e, t) {
|
|
406
401
|
return t.map((t) => {
|
|
407
402
|
var n;
|
|
408
403
|
return (n = t).path ?? (n.path = []), t.path.unshift(e), t;
|
|
409
404
|
});
|
|
410
405
|
}
|
|
411
|
-
function
|
|
406
|
+
function A(e) {
|
|
412
407
|
return typeof e == "string" ? e : e?.message;
|
|
413
408
|
}
|
|
414
|
-
function
|
|
409
|
+
function j(e, t, n) {
|
|
415
410
|
let r = {
|
|
416
411
|
...e,
|
|
417
412
|
path: e.path ?? []
|
|
418
413
|
};
|
|
419
|
-
return e.message || (r.message =
|
|
414
|
+
return e.message || (r.message = A(e.inst?._zod.def?.error?.(e)) ?? A(t?.error?.(e)) ?? A(n.customError?.(e)) ?? A(n.localeError?.(e)) ?? "Invalid input"), delete r.inst, delete r.continue, t?.reportInput || delete r.input, r;
|
|
420
415
|
}
|
|
421
|
-
function
|
|
416
|
+
function Ae(e) {
|
|
422
417
|
return Array.isArray(e) ? "array" : typeof e == "string" ? "string" : "unknown";
|
|
423
418
|
}
|
|
424
419
|
function M(...e) {
|
|
@@ -432,19 +427,19 @@ function M(...e) {
|
|
|
432
427
|
}
|
|
433
428
|
//#endregion
|
|
434
429
|
//#region ../../node_modules/zod/v4/core/errors.js
|
|
435
|
-
var
|
|
430
|
+
var je = (e, t) => {
|
|
436
431
|
e.name = "$ZodError", Object.defineProperty(e, "_zod", {
|
|
437
432
|
value: e._zod,
|
|
438
433
|
enumerable: !1
|
|
439
434
|
}), Object.defineProperty(e, "issues", {
|
|
440
435
|
value: t,
|
|
441
436
|
enumerable: !1
|
|
442
|
-
}), e.message = JSON.stringify(t,
|
|
437
|
+
}), e.message = JSON.stringify(t, de, 2), Object.defineProperty(e, "toString", {
|
|
443
438
|
value: () => e.message,
|
|
444
439
|
enumerable: !1
|
|
445
440
|
});
|
|
446
|
-
},
|
|
447
|
-
function
|
|
441
|
+
}, Me = h("$ZodError", je), Ne = h("$ZodError", je, { Parent: Error });
|
|
442
|
+
function Pe(e, t = (e) => e.message) {
|
|
448
443
|
let n = {}, r = [];
|
|
449
444
|
for (let i of e.issues) i.path.length > 0 ? (n[i.path[0]] = n[i.path[0]] || [], n[i.path[0]].push(t(i))) : r.push(t(i));
|
|
450
445
|
return {
|
|
@@ -452,7 +447,7 @@ function Ie(e, t = (e) => e.message) {
|
|
|
452
447
|
fieldErrors: n
|
|
453
448
|
};
|
|
454
449
|
}
|
|
455
|
-
function
|
|
450
|
+
function Fe(e, t = (e) => e.message) {
|
|
456
451
|
let n = { _errors: [] }, r = (e) => {
|
|
457
452
|
for (let i of e.issues) if (i.code === "invalid_union" && i.errors.length) i.errors.map((e) => r({ issues: e }));
|
|
458
453
|
else if (i.code === "invalid_key") r({ issues: i.issues });
|
|
@@ -470,28 +465,28 @@ function Le(e, t = (e) => e.message) {
|
|
|
470
465
|
}
|
|
471
466
|
//#endregion
|
|
472
467
|
//#region ../../node_modules/zod/v4/core/parse.js
|
|
473
|
-
var
|
|
468
|
+
var Ie = (e) => (t, n, r, i) => {
|
|
474
469
|
let a = r ? Object.assign(r, { async: !1 }) : { async: !1 }, o = t._zod.run({
|
|
475
470
|
value: n,
|
|
476
471
|
issues: []
|
|
477
472
|
}, a);
|
|
478
473
|
if (o instanceof Promise) throw new g();
|
|
479
474
|
if (o.issues.length) {
|
|
480
|
-
let t = new (i?.Err ?? e)(o.issues.map((e) =>
|
|
481
|
-
throw
|
|
475
|
+
let t = new (i?.Err ?? e)(o.issues.map((e) => j(e, a, _())));
|
|
476
|
+
throw ge(t, i?.callee), t;
|
|
482
477
|
}
|
|
483
478
|
return o.value;
|
|
484
|
-
},
|
|
479
|
+
}, Le = (e) => async (t, n, r, i) => {
|
|
485
480
|
let a = r ? Object.assign(r, { async: !0 }) : { async: !0 }, o = t._zod.run({
|
|
486
481
|
value: n,
|
|
487
482
|
issues: []
|
|
488
483
|
}, a);
|
|
489
484
|
if (o instanceof Promise && (o = await o), o.issues.length) {
|
|
490
|
-
let t = new (i?.Err ?? e)(o.issues.map((e) =>
|
|
491
|
-
throw
|
|
485
|
+
let t = new (i?.Err ?? e)(o.issues.map((e) => j(e, a, _())));
|
|
486
|
+
throw ge(t, i?.callee), t;
|
|
492
487
|
}
|
|
493
488
|
return o.value;
|
|
494
|
-
},
|
|
489
|
+
}, N = (e) => (t, n, r) => {
|
|
495
490
|
let i = r ? {
|
|
496
491
|
...r,
|
|
497
492
|
async: !1
|
|
@@ -502,36 +497,36 @@ var N = (e) => (t, n, r, i) => {
|
|
|
502
497
|
if (a instanceof Promise) throw new g();
|
|
503
498
|
return a.issues.length ? {
|
|
504
499
|
success: !1,
|
|
505
|
-
error: new (e ??
|
|
500
|
+
error: new (e ?? Me)(a.issues.map((e) => j(e, i, _())))
|
|
506
501
|
} : {
|
|
507
502
|
success: !0,
|
|
508
503
|
data: a.value
|
|
509
504
|
};
|
|
510
|
-
}, Re = /* @__PURE__ */
|
|
505
|
+
}, Re = /* @__PURE__ */ N(Ne), P = (e) => async (t, n, r) => {
|
|
511
506
|
let i = r ? Object.assign(r, { async: !0 }) : { async: !0 }, a = t._zod.run({
|
|
512
507
|
value: n,
|
|
513
508
|
issues: []
|
|
514
509
|
}, i);
|
|
515
510
|
return a instanceof Promise && (a = await a), a.issues.length ? {
|
|
516
511
|
success: !1,
|
|
517
|
-
error: new e(a.issues.map((e) =>
|
|
512
|
+
error: new e(a.issues.map((e) => j(e, i, _())))
|
|
518
513
|
} : {
|
|
519
514
|
success: !0,
|
|
520
515
|
data: a.value
|
|
521
516
|
};
|
|
522
|
-
}, ze = /* @__PURE__ */
|
|
517
|
+
}, ze = /* @__PURE__ */ P(Ne), Be = (e) => (t, n, r) => {
|
|
523
518
|
let i = r ? Object.assign(r, { direction: "backward" }) : { direction: "backward" };
|
|
524
|
-
return
|
|
525
|
-
}, Ve = (e) => (t, n, r) =>
|
|
519
|
+
return Ie(e)(t, n, i);
|
|
520
|
+
}, Ve = (e) => (t, n, r) => Ie(e)(t, n, r), He = (e) => async (t, n, r) => {
|
|
526
521
|
let i = r ? Object.assign(r, { direction: "backward" }) : { direction: "backward" };
|
|
527
|
-
return
|
|
528
|
-
}, Ue = (e) => async (t, n, r) =>
|
|
522
|
+
return Le(e)(t, n, i);
|
|
523
|
+
}, Ue = (e) => async (t, n, r) => Le(e)(t, n, r), We = (e) => (t, n, r) => {
|
|
529
524
|
let i = r ? Object.assign(r, { direction: "backward" }) : { direction: "backward" };
|
|
530
|
-
return
|
|
531
|
-
}, Ge = (e) => (t, n, r) =>
|
|
525
|
+
return N(e)(t, n, i);
|
|
526
|
+
}, Ge = (e) => (t, n, r) => N(e)(t, n, r), Ke = (e) => async (t, n, r) => {
|
|
532
527
|
let i = r ? Object.assign(r, { direction: "backward" }) : { direction: "backward" };
|
|
533
|
-
return
|
|
534
|
-
}, qe = (e) => async (t, n, r) =>
|
|
528
|
+
return P(e)(t, n, i);
|
|
529
|
+
}, qe = (e) => async (t, n, r) => P(e)(t, n, r), Je = /^[cC][^\s-]{8,}$/, Ye = /^[0-9a-z]+$/, Xe = /^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/, Ze = /^[0-9a-vA-V]{20}$/, Qe = /^[A-Za-z0-9]{27}$/, $e = /^[a-zA-Z0-9_-]{21}$/, et = /^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/, tt = /^([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})$/, nt = (e) => e ? 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)$/, rt = /^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/, it = "^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";
|
|
535
530
|
function at() {
|
|
536
531
|
return new RegExp(it, "u");
|
|
537
532
|
}
|
|
@@ -552,7 +547,7 @@ function _t(e) {
|
|
|
552
547
|
var vt = (e) => {
|
|
553
548
|
let t = e ? `[\\s\\S]{${e?.minimum ?? 0},${e?.maximum ?? ""}}` : "[\\s\\S]*";
|
|
554
549
|
return RegExp(`^${t}$`);
|
|
555
|
-
}, yt = /^-?\d+$/, bt = /^-?\d+(?:\.\d+)?$/, xt = /^[^A-Z]*$/, St = /^[^a-z]*$/,
|
|
550
|
+
}, yt = /^-?\d+$/, bt = /^-?\d+(?:\.\d+)?$/, xt = /^[^A-Z]*$/, St = /^[^a-z]*$/, F = /* @__PURE__ */ h("$ZodCheck", (e, t) => {
|
|
556
551
|
var n;
|
|
557
552
|
e._zod ??= {}, e._zod.def = t, (n = e._zod).onattach ?? (n.onattach = []);
|
|
558
553
|
}), Ct = {
|
|
@@ -560,7 +555,7 @@ var vt = (e) => {
|
|
|
560
555
|
bigint: "bigint",
|
|
561
556
|
object: "date"
|
|
562
557
|
}, wt = /* @__PURE__ */ h("$ZodCheckLessThan", (e, t) => {
|
|
563
|
-
|
|
558
|
+
F.init(e, t);
|
|
564
559
|
let n = Ct[typeof t.value];
|
|
565
560
|
e._zod.onattach.push((e) => {
|
|
566
561
|
let n = e._zod.bag, r = (t.inclusive ? n.maximum : n.exclusiveMaximum) ?? Infinity;
|
|
@@ -577,7 +572,7 @@ var vt = (e) => {
|
|
|
577
572
|
});
|
|
578
573
|
};
|
|
579
574
|
}), Tt = /* @__PURE__ */ h("$ZodCheckGreaterThan", (e, t) => {
|
|
580
|
-
|
|
575
|
+
F.init(e, t);
|
|
581
576
|
let n = Ct[typeof t.value];
|
|
582
577
|
e._zod.onattach.push((e) => {
|
|
583
578
|
let n = e._zod.bag, r = (t.inclusive ? n.minimum : n.exclusiveMinimum) ?? -Infinity;
|
|
@@ -594,12 +589,12 @@ var vt = (e) => {
|
|
|
594
589
|
});
|
|
595
590
|
};
|
|
596
591
|
}), Et = /* @__PURE__ */ h("$ZodCheckMultipleOf", (e, t) => {
|
|
597
|
-
|
|
592
|
+
F.init(e, t), e._zod.onattach.push((e) => {
|
|
598
593
|
var n;
|
|
599
594
|
(n = e._zod.bag).multipleOf ?? (n.multipleOf = t.value);
|
|
600
595
|
}), e._zod.check = (n) => {
|
|
601
596
|
if (typeof n.value != typeof t.value) throw Error("Cannot mix number and bigint in multiple_of check.");
|
|
602
|
-
(typeof n.value == "bigint" ? n.value % t.value === BigInt(0) :
|
|
597
|
+
(typeof n.value == "bigint" ? n.value % t.value === BigInt(0) : fe(n.value, t.value) === 0) || n.issues.push({
|
|
603
598
|
origin: typeof n.value,
|
|
604
599
|
code: "not_multiple_of",
|
|
605
600
|
divisor: t.value,
|
|
@@ -609,8 +604,8 @@ var vt = (e) => {
|
|
|
609
604
|
});
|
|
610
605
|
};
|
|
611
606
|
}), Dt = /* @__PURE__ */ h("$ZodCheckNumberFormat", (e, t) => {
|
|
612
|
-
|
|
613
|
-
let n = t.format?.includes("int"), r = n ? "int" : "number", [i, a] =
|
|
607
|
+
F.init(e, t), t.format = t.format || "float64";
|
|
608
|
+
let n = t.format?.includes("int"), r = n ? "int" : "number", [i, a] = xe[t.format];
|
|
614
609
|
e._zod.onattach.push((e) => {
|
|
615
610
|
let r = e._zod.bag;
|
|
616
611
|
r.format = t.format, r.minimum = i, r.maximum = a, n && (r.pattern = yt);
|
|
@@ -671,16 +666,16 @@ var vt = (e) => {
|
|
|
671
666
|
};
|
|
672
667
|
}), Ot = /* @__PURE__ */ h("$ZodCheckMaxLength", (e, t) => {
|
|
673
668
|
var n;
|
|
674
|
-
|
|
669
|
+
F.init(e, t), (n = e._zod.def).when ?? (n.when = (e) => {
|
|
675
670
|
let t = e.value;
|
|
676
|
-
return !
|
|
671
|
+
return !y(t) && t.length !== void 0;
|
|
677
672
|
}), e._zod.onattach.push((e) => {
|
|
678
673
|
let n = e._zod.bag.maximum ?? Infinity;
|
|
679
674
|
t.maximum < n && (e._zod.bag.maximum = t.maximum);
|
|
680
675
|
}), e._zod.check = (n) => {
|
|
681
676
|
let r = n.value;
|
|
682
677
|
if (r.length <= t.maximum) return;
|
|
683
|
-
let i =
|
|
678
|
+
let i = Ae(r);
|
|
684
679
|
n.issues.push({
|
|
685
680
|
origin: i,
|
|
686
681
|
code: "too_big",
|
|
@@ -693,16 +688,16 @@ var vt = (e) => {
|
|
|
693
688
|
};
|
|
694
689
|
}), kt = /* @__PURE__ */ h("$ZodCheckMinLength", (e, t) => {
|
|
695
690
|
var n;
|
|
696
|
-
|
|
691
|
+
F.init(e, t), (n = e._zod.def).when ?? (n.when = (e) => {
|
|
697
692
|
let t = e.value;
|
|
698
|
-
return !
|
|
693
|
+
return !y(t) && t.length !== void 0;
|
|
699
694
|
}), e._zod.onattach.push((e) => {
|
|
700
695
|
let n = e._zod.bag.minimum ?? -Infinity;
|
|
701
696
|
t.minimum > n && (e._zod.bag.minimum = t.minimum);
|
|
702
697
|
}), e._zod.check = (n) => {
|
|
703
698
|
let r = n.value;
|
|
704
699
|
if (r.length >= t.minimum) return;
|
|
705
|
-
let i =
|
|
700
|
+
let i = Ae(r);
|
|
706
701
|
n.issues.push({
|
|
707
702
|
origin: i,
|
|
708
703
|
code: "too_small",
|
|
@@ -715,16 +710,16 @@ var vt = (e) => {
|
|
|
715
710
|
};
|
|
716
711
|
}), At = /* @__PURE__ */ h("$ZodCheckLengthEquals", (e, t) => {
|
|
717
712
|
var n;
|
|
718
|
-
|
|
713
|
+
F.init(e, t), (n = e._zod.def).when ?? (n.when = (e) => {
|
|
719
714
|
let t = e.value;
|
|
720
|
-
return !
|
|
715
|
+
return !y(t) && t.length !== void 0;
|
|
721
716
|
}), e._zod.onattach.push((e) => {
|
|
722
717
|
let n = e._zod.bag;
|
|
723
718
|
n.minimum = t.length, n.maximum = t.length, n.length = t.length;
|
|
724
719
|
}), e._zod.check = (n) => {
|
|
725
720
|
let r = n.value, i = r.length;
|
|
726
721
|
if (i === t.length) return;
|
|
727
|
-
let a =
|
|
722
|
+
let a = Ae(r), o = i > t.length;
|
|
728
723
|
n.issues.push({
|
|
729
724
|
origin: a,
|
|
730
725
|
...o ? {
|
|
@@ -741,9 +736,9 @@ var vt = (e) => {
|
|
|
741
736
|
continue: !t.abort
|
|
742
737
|
});
|
|
743
738
|
};
|
|
744
|
-
}),
|
|
739
|
+
}), I = /* @__PURE__ */ h("$ZodCheckStringFormat", (e, t) => {
|
|
745
740
|
var n, r;
|
|
746
|
-
|
|
741
|
+
F.init(e, t), e._zod.onattach.push((e) => {
|
|
747
742
|
let n = e._zod.bag;
|
|
748
743
|
n.format = t.format, t.pattern && (n.patterns ??= /* @__PURE__ */ new Set(), n.patterns.add(t.pattern));
|
|
749
744
|
}), t.pattern ? (n = e._zod).check ?? (n.check = (n) => {
|
|
@@ -758,7 +753,7 @@ var vt = (e) => {
|
|
|
758
753
|
});
|
|
759
754
|
}) : (r = e._zod).check ?? (r.check = () => {});
|
|
760
755
|
}), jt = /* @__PURE__ */ h("$ZodCheckRegex", (e, t) => {
|
|
761
|
-
|
|
756
|
+
I.init(e, t), e._zod.check = (n) => {
|
|
762
757
|
t.pattern.lastIndex = 0, !t.pattern.test(n.value) && n.issues.push({
|
|
763
758
|
origin: "string",
|
|
764
759
|
code: "invalid_format",
|
|
@@ -770,12 +765,12 @@ var vt = (e) => {
|
|
|
770
765
|
});
|
|
771
766
|
};
|
|
772
767
|
}), Mt = /* @__PURE__ */ h("$ZodCheckLowerCase", (e, t) => {
|
|
773
|
-
t.pattern ??= xt,
|
|
768
|
+
t.pattern ??= xt, I.init(e, t);
|
|
774
769
|
}), Nt = /* @__PURE__ */ h("$ZodCheckUpperCase", (e, t) => {
|
|
775
|
-
t.pattern ??= St,
|
|
770
|
+
t.pattern ??= St, I.init(e, t);
|
|
776
771
|
}), Pt = /* @__PURE__ */ h("$ZodCheckIncludes", (e, t) => {
|
|
777
|
-
|
|
778
|
-
let n =
|
|
772
|
+
F.init(e, t);
|
|
773
|
+
let n = E(t.includes), r = new RegExp(typeof t.position == "number" ? `^.{${t.position}}${n}` : n);
|
|
779
774
|
t.pattern = r, e._zod.onattach.push((e) => {
|
|
780
775
|
let t = e._zod.bag;
|
|
781
776
|
t.patterns ??= /* @__PURE__ */ new Set(), t.patterns.add(r);
|
|
@@ -791,8 +786,8 @@ var vt = (e) => {
|
|
|
791
786
|
});
|
|
792
787
|
};
|
|
793
788
|
}), Ft = /* @__PURE__ */ h("$ZodCheckStartsWith", (e, t) => {
|
|
794
|
-
|
|
795
|
-
let n = RegExp(`^${
|
|
789
|
+
F.init(e, t);
|
|
790
|
+
let n = RegExp(`^${E(t.prefix)}.*`);
|
|
796
791
|
t.pattern ??= n, e._zod.onattach.push((e) => {
|
|
797
792
|
let t = e._zod.bag;
|
|
798
793
|
t.patterns ??= /* @__PURE__ */ new Set(), t.patterns.add(n);
|
|
@@ -808,8 +803,8 @@ var vt = (e) => {
|
|
|
808
803
|
});
|
|
809
804
|
};
|
|
810
805
|
}), It = /* @__PURE__ */ h("$ZodCheckEndsWith", (e, t) => {
|
|
811
|
-
|
|
812
|
-
let n = RegExp(`.*${
|
|
806
|
+
F.init(e, t);
|
|
807
|
+
let n = RegExp(`.*${E(t.suffix)}$`);
|
|
813
808
|
t.pattern ??= n, e._zod.onattach.push((e) => {
|
|
814
809
|
let t = e._zod.bag;
|
|
815
810
|
t.patterns ??= /* @__PURE__ */ new Set(), t.patterns.add(n);
|
|
@@ -825,7 +820,7 @@ var vt = (e) => {
|
|
|
825
820
|
});
|
|
826
821
|
};
|
|
827
822
|
}), Lt = /* @__PURE__ */ h("$ZodCheckOverwrite", (e, t) => {
|
|
828
|
-
|
|
823
|
+
F.init(e, t), e._zod.check = (e) => {
|
|
829
824
|
e.value = t.tx(e.value);
|
|
830
825
|
};
|
|
831
826
|
}), Rt = class {
|
|
@@ -851,7 +846,7 @@ var vt = (e) => {
|
|
|
851
846
|
major: 4,
|
|
852
847
|
minor: 3,
|
|
853
848
|
patch: 6
|
|
854
|
-
},
|
|
849
|
+
}, L = /* @__PURE__ */ h("$ZodType", (e, t) => {
|
|
855
850
|
var n;
|
|
856
851
|
e ??= {}, e._zod.def = t, e._zod.bag = e._zod.bag || {}, e._zod.version = zt;
|
|
857
852
|
let r = [...e._zod.def.checks ?? []];
|
|
@@ -862,7 +857,7 @@ var vt = (e) => {
|
|
|
862
857
|
});
|
|
863
858
|
else {
|
|
864
859
|
let t = (e, t, n) => {
|
|
865
|
-
let r =
|
|
860
|
+
let r = k(e), i;
|
|
866
861
|
for (let a of t) {
|
|
867
862
|
if (a._zod.def.when) {
|
|
868
863
|
if (!a._zod.def.when(e)) continue;
|
|
@@ -870,16 +865,16 @@ var vt = (e) => {
|
|
|
870
865
|
let t = e.issues.length, o = a._zod.check(e);
|
|
871
866
|
if (o instanceof Promise && n?.async === !1) throw new g();
|
|
872
867
|
if (i || o instanceof Promise) i = (i ?? Promise.resolve()).then(async () => {
|
|
873
|
-
await o, e.issues.length !== t && (r ||=
|
|
868
|
+
await o, e.issues.length !== t && (r ||= k(e, t));
|
|
874
869
|
});
|
|
875
870
|
else {
|
|
876
871
|
if (e.issues.length === t) continue;
|
|
877
|
-
r ||=
|
|
872
|
+
r ||= k(e, t);
|
|
878
873
|
}
|
|
879
874
|
}
|
|
880
875
|
return i ? i.then(() => e) : e;
|
|
881
876
|
}, n = (n, i, a) => {
|
|
882
|
-
if (
|
|
877
|
+
if (k(n)) return n.aborted = !0, n;
|
|
883
878
|
let o = t(i, r, a);
|
|
884
879
|
if (o instanceof Promise) {
|
|
885
880
|
if (a.async === !1) throw new g();
|
|
@@ -907,7 +902,7 @@ var vt = (e) => {
|
|
|
907
902
|
return t(o, r, a);
|
|
908
903
|
};
|
|
909
904
|
}
|
|
910
|
-
|
|
905
|
+
x(e, "~standard", () => ({
|
|
911
906
|
validate: (t) => {
|
|
912
907
|
try {
|
|
913
908
|
let n = Re(e, t);
|
|
@@ -919,8 +914,8 @@ var vt = (e) => {
|
|
|
919
914
|
vendor: "zod",
|
|
920
915
|
version: 1
|
|
921
916
|
}));
|
|
922
|
-
}),
|
|
923
|
-
|
|
917
|
+
}), R = /* @__PURE__ */ h("$ZodString", (e, t) => {
|
|
918
|
+
L.init(e, t), e._zod.pattern = [...e?._zod.bag?.patterns ?? []].pop() ?? vt(e._zod.bag), e._zod.parse = (n, r) => {
|
|
924
919
|
if (t.coerce) try {
|
|
925
920
|
n.value = String(n.value);
|
|
926
921
|
} catch {}
|
|
@@ -931,11 +926,11 @@ var vt = (e) => {
|
|
|
931
926
|
inst: e
|
|
932
927
|
}), n;
|
|
933
928
|
};
|
|
934
|
-
}),
|
|
935
|
-
|
|
936
|
-
}),
|
|
937
|
-
t.pattern ??= tt,
|
|
938
|
-
}),
|
|
929
|
+
}), z = /* @__PURE__ */ h("$ZodStringFormat", (e, t) => {
|
|
930
|
+
I.init(e, t), R.init(e, t);
|
|
931
|
+
}), Bt = /* @__PURE__ */ h("$ZodGUID", (e, t) => {
|
|
932
|
+
t.pattern ??= tt, z.init(e, t);
|
|
933
|
+
}), Vt = /* @__PURE__ */ h("$ZodUUID", (e, t) => {
|
|
939
934
|
if (t.version) {
|
|
940
935
|
let e = {
|
|
941
936
|
v1: 1,
|
|
@@ -950,11 +945,11 @@ var vt = (e) => {
|
|
|
950
945
|
if (e === void 0) throw Error(`Invalid UUID version: "${t.version}"`);
|
|
951
946
|
t.pattern ??= nt(e);
|
|
952
947
|
} else t.pattern ??= nt();
|
|
953
|
-
|
|
954
|
-
}),
|
|
955
|
-
t.pattern ??= rt,
|
|
956
|
-
}),
|
|
957
|
-
|
|
948
|
+
z.init(e, t);
|
|
949
|
+
}), Ht = /* @__PURE__ */ h("$ZodEmail", (e, t) => {
|
|
950
|
+
t.pattern ??= rt, z.init(e, t);
|
|
951
|
+
}), Ut = /* @__PURE__ */ h("$ZodURL", (e, t) => {
|
|
952
|
+
z.init(e, t), e._zod.check = (n) => {
|
|
958
953
|
try {
|
|
959
954
|
let r = n.value.trim(), i = new URL(r);
|
|
960
955
|
t.hostname && (t.hostname.lastIndex = 0, t.hostname.test(i.hostname) || n.issues.push({
|
|
@@ -985,32 +980,32 @@ var vt = (e) => {
|
|
|
985
980
|
});
|
|
986
981
|
}
|
|
987
982
|
};
|
|
988
|
-
}),
|
|
989
|
-
t.pattern ??= at(),
|
|
990
|
-
}),
|
|
991
|
-
t.pattern ??= $e,
|
|
992
|
-
}),
|
|
993
|
-
t.pattern ??= Je,
|
|
994
|
-
}),
|
|
995
|
-
t.pattern ??= Ye,
|
|
996
|
-
}),
|
|
997
|
-
t.pattern ??= Xe,
|
|
998
|
-
}),
|
|
999
|
-
t.pattern ??= Ze,
|
|
1000
|
-
}),
|
|
1001
|
-
t.pattern ??= Qe,
|
|
1002
|
-
}),
|
|
1003
|
-
t.pattern ??= _t(t),
|
|
1004
|
-
}),
|
|
1005
|
-
t.pattern ??= mt,
|
|
1006
|
-
}),
|
|
1007
|
-
t.pattern ??= gt(t),
|
|
1008
|
-
}),
|
|
1009
|
-
t.pattern ??= et,
|
|
1010
|
-
}),
|
|
1011
|
-
t.pattern ??= ot,
|
|
1012
|
-
}),
|
|
1013
|
-
t.pattern ??= st,
|
|
983
|
+
}), Wt = /* @__PURE__ */ h("$ZodEmoji", (e, t) => {
|
|
984
|
+
t.pattern ??= at(), z.init(e, t);
|
|
985
|
+
}), Gt = /* @__PURE__ */ h("$ZodNanoID", (e, t) => {
|
|
986
|
+
t.pattern ??= $e, z.init(e, t);
|
|
987
|
+
}), Kt = /* @__PURE__ */ h("$ZodCUID", (e, t) => {
|
|
988
|
+
t.pattern ??= Je, z.init(e, t);
|
|
989
|
+
}), qt = /* @__PURE__ */ h("$ZodCUID2", (e, t) => {
|
|
990
|
+
t.pattern ??= Ye, z.init(e, t);
|
|
991
|
+
}), Jt = /* @__PURE__ */ h("$ZodULID", (e, t) => {
|
|
992
|
+
t.pattern ??= Xe, z.init(e, t);
|
|
993
|
+
}), Yt = /* @__PURE__ */ h("$ZodXID", (e, t) => {
|
|
994
|
+
t.pattern ??= Ze, z.init(e, t);
|
|
995
|
+
}), Xt = /* @__PURE__ */ h("$ZodKSUID", (e, t) => {
|
|
996
|
+
t.pattern ??= Qe, z.init(e, t);
|
|
997
|
+
}), Zt = /* @__PURE__ */ h("$ZodISODateTime", (e, t) => {
|
|
998
|
+
t.pattern ??= _t(t), z.init(e, t);
|
|
999
|
+
}), Qt = /* @__PURE__ */ h("$ZodISODate", (e, t) => {
|
|
1000
|
+
t.pattern ??= mt, z.init(e, t);
|
|
1001
|
+
}), $t = /* @__PURE__ */ h("$ZodISOTime", (e, t) => {
|
|
1002
|
+
t.pattern ??= gt(t), z.init(e, t);
|
|
1003
|
+
}), en = /* @__PURE__ */ h("$ZodISODuration", (e, t) => {
|
|
1004
|
+
t.pattern ??= et, z.init(e, t);
|
|
1005
|
+
}), tn = /* @__PURE__ */ h("$ZodIPv4", (e, t) => {
|
|
1006
|
+
t.pattern ??= ot, z.init(e, t), e._zod.bag.format = "ipv4";
|
|
1007
|
+
}), nn = /* @__PURE__ */ h("$ZodIPv6", (e, t) => {
|
|
1008
|
+
t.pattern ??= st, z.init(e, t), e._zod.bag.format = "ipv6", e._zod.check = (n) => {
|
|
1014
1009
|
try {
|
|
1015
1010
|
new URL(`http://[${n.value}]`);
|
|
1016
1011
|
} catch {
|
|
@@ -1023,10 +1018,10 @@ var vt = (e) => {
|
|
|
1023
1018
|
});
|
|
1024
1019
|
}
|
|
1025
1020
|
};
|
|
1026
|
-
}),
|
|
1027
|
-
t.pattern ??= ct,
|
|
1028
|
-
}),
|
|
1029
|
-
t.pattern ??= lt,
|
|
1021
|
+
}), rn = /* @__PURE__ */ h("$ZodCIDRv4", (e, t) => {
|
|
1022
|
+
t.pattern ??= ct, z.init(e, t);
|
|
1023
|
+
}), an = /* @__PURE__ */ h("$ZodCIDRv6", (e, t) => {
|
|
1024
|
+
t.pattern ??= lt, z.init(e, t), e._zod.check = (n) => {
|
|
1030
1025
|
let r = n.value.split("/");
|
|
1031
1026
|
try {
|
|
1032
1027
|
if (r.length !== 2) throw Error();
|
|
@@ -1046,7 +1041,7 @@ var vt = (e) => {
|
|
|
1046
1041
|
}
|
|
1047
1042
|
};
|
|
1048
1043
|
});
|
|
1049
|
-
function
|
|
1044
|
+
function on(e) {
|
|
1050
1045
|
if (e === "") return !0;
|
|
1051
1046
|
if (e.length % 4 != 0) return !1;
|
|
1052
1047
|
try {
|
|
@@ -1055,9 +1050,9 @@ function sn(e) {
|
|
|
1055
1050
|
return !1;
|
|
1056
1051
|
}
|
|
1057
1052
|
}
|
|
1058
|
-
var
|
|
1059
|
-
t.pattern ??= ut,
|
|
1060
|
-
|
|
1053
|
+
var sn = /* @__PURE__ */ h("$ZodBase64", (e, t) => {
|
|
1054
|
+
t.pattern ??= ut, z.init(e, t), e._zod.bag.contentEncoding = "base64", e._zod.check = (n) => {
|
|
1055
|
+
on(n.value) || n.issues.push({
|
|
1061
1056
|
code: "invalid_format",
|
|
1062
1057
|
format: "base64",
|
|
1063
1058
|
input: n.value,
|
|
@@ -1066,14 +1061,14 @@ var cn = /* @__PURE__ */ h("$ZodBase64", (e, t) => {
|
|
|
1066
1061
|
});
|
|
1067
1062
|
};
|
|
1068
1063
|
});
|
|
1069
|
-
function
|
|
1064
|
+
function cn(e) {
|
|
1070
1065
|
if (!dt.test(e)) return !1;
|
|
1071
1066
|
let t = e.replace(/[-_]/g, (e) => e === "-" ? "+" : "/");
|
|
1072
|
-
return
|
|
1067
|
+
return on(t.padEnd(Math.ceil(t.length / 4) * 4, "="));
|
|
1073
1068
|
}
|
|
1074
|
-
var
|
|
1075
|
-
t.pattern ??= dt,
|
|
1076
|
-
|
|
1069
|
+
var ln = /* @__PURE__ */ h("$ZodBase64URL", (e, t) => {
|
|
1070
|
+
t.pattern ??= dt, z.init(e, t), e._zod.bag.contentEncoding = "base64url", e._zod.check = (n) => {
|
|
1071
|
+
cn(n.value) || n.issues.push({
|
|
1077
1072
|
code: "invalid_format",
|
|
1078
1073
|
format: "base64url",
|
|
1079
1074
|
input: n.value,
|
|
@@ -1081,10 +1076,10 @@ var un = /* @__PURE__ */ h("$ZodBase64URL", (e, t) => {
|
|
|
1081
1076
|
continue: !t.abort
|
|
1082
1077
|
});
|
|
1083
1078
|
};
|
|
1084
|
-
}),
|
|
1085
|
-
t.pattern ??= ft,
|
|
1079
|
+
}), un = /* @__PURE__ */ h("$ZodE164", (e, t) => {
|
|
1080
|
+
t.pattern ??= ft, z.init(e, t);
|
|
1086
1081
|
});
|
|
1087
|
-
function
|
|
1082
|
+
function dn(e, t = null) {
|
|
1088
1083
|
try {
|
|
1089
1084
|
let n = e.split(".");
|
|
1090
1085
|
if (n.length !== 3) return !1;
|
|
@@ -1096,9 +1091,9 @@ function fn(e, t = null) {
|
|
|
1096
1091
|
return !1;
|
|
1097
1092
|
}
|
|
1098
1093
|
}
|
|
1099
|
-
var
|
|
1100
|
-
|
|
1101
|
-
|
|
1094
|
+
var fn = /* @__PURE__ */ h("$ZodJWT", (e, t) => {
|
|
1095
|
+
z.init(e, t), e._zod.check = (n) => {
|
|
1096
|
+
dn(n.value, t.alg) || n.issues.push({
|
|
1102
1097
|
code: "invalid_format",
|
|
1103
1098
|
format: "jwt",
|
|
1104
1099
|
input: n.value,
|
|
@@ -1106,8 +1101,8 @@ var pn = /* @__PURE__ */ h("$ZodJWT", (e, t) => {
|
|
|
1106
1101
|
continue: !t.abort
|
|
1107
1102
|
});
|
|
1108
1103
|
};
|
|
1109
|
-
}),
|
|
1110
|
-
|
|
1104
|
+
}), pn = /* @__PURE__ */ h("$ZodNumber", (e, t) => {
|
|
1105
|
+
L.init(e, t), e._zod.pattern = e._zod.bag.pattern ?? bt, e._zod.parse = (n, r) => {
|
|
1111
1106
|
if (t.coerce) try {
|
|
1112
1107
|
n.value = Number(n.value);
|
|
1113
1108
|
} catch {}
|
|
@@ -1122,19 +1117,19 @@ var pn = /* @__PURE__ */ h("$ZodJWT", (e, t) => {
|
|
|
1122
1117
|
...a ? { received: a } : {}
|
|
1123
1118
|
}), n;
|
|
1124
1119
|
};
|
|
1125
|
-
}),
|
|
1126
|
-
Dt.init(e, t),
|
|
1127
|
-
}),
|
|
1128
|
-
|
|
1129
|
-
}),
|
|
1130
|
-
|
|
1120
|
+
}), mn = /* @__PURE__ */ h("$ZodNumberFormat", (e, t) => {
|
|
1121
|
+
Dt.init(e, t), pn.init(e, t);
|
|
1122
|
+
}), hn = /* @__PURE__ */ h("$ZodUnknown", (e, t) => {
|
|
1123
|
+
L.init(e, t), e._zod.parse = (e) => e;
|
|
1124
|
+
}), gn = /* @__PURE__ */ h("$ZodNever", (e, t) => {
|
|
1125
|
+
L.init(e, t), e._zod.parse = (t, n) => (t.issues.push({
|
|
1131
1126
|
expected: "never",
|
|
1132
1127
|
code: "invalid_type",
|
|
1133
1128
|
input: t.value,
|
|
1134
1129
|
inst: e
|
|
1135
1130
|
}), t);
|
|
1136
|
-
}),
|
|
1137
|
-
|
|
1131
|
+
}), _n = /* @__PURE__ */ h("$ZodVoid", (e, t) => {
|
|
1132
|
+
L.init(e, t), e._zod.parse = (t, n) => {
|
|
1138
1133
|
let r = t.value;
|
|
1139
1134
|
return r === void 0 || t.issues.push({
|
|
1140
1135
|
expected: "void",
|
|
@@ -1144,11 +1139,11 @@ var pn = /* @__PURE__ */ h("$ZodJWT", (e, t) => {
|
|
|
1144
1139
|
}), t;
|
|
1145
1140
|
};
|
|
1146
1141
|
});
|
|
1147
|
-
function
|
|
1148
|
-
e.issues.length && t.issues.push(...
|
|
1142
|
+
function vn(e, t, n) {
|
|
1143
|
+
e.issues.length && t.issues.push(...ke(n, e.issues)), t.value[n] = e.value;
|
|
1149
1144
|
}
|
|
1150
|
-
var
|
|
1151
|
-
|
|
1145
|
+
var yn = /* @__PURE__ */ h("$ZodArray", (e, t) => {
|
|
1146
|
+
L.init(e, t), e._zod.parse = (n, r) => {
|
|
1152
1147
|
let i = n.value;
|
|
1153
1148
|
if (!Array.isArray(i)) return n.issues.push({
|
|
1154
1149
|
expected: "array",
|
|
@@ -1163,22 +1158,22 @@ var bn = /* @__PURE__ */ h("$ZodArray", (e, t) => {
|
|
|
1163
1158
|
value: o,
|
|
1164
1159
|
issues: []
|
|
1165
1160
|
}, r);
|
|
1166
|
-
s instanceof Promise ? a.push(s.then((t) =>
|
|
1161
|
+
s instanceof Promise ? a.push(s.then((t) => vn(t, n, e))) : vn(s, n, e);
|
|
1167
1162
|
}
|
|
1168
1163
|
return a.length ? Promise.all(a).then(() => n) : n;
|
|
1169
1164
|
};
|
|
1170
1165
|
});
|
|
1171
|
-
function
|
|
1166
|
+
function B(e, t, n, r, i) {
|
|
1172
1167
|
if (e.issues.length) {
|
|
1173
1168
|
if (i && !(n in r)) return;
|
|
1174
|
-
t.issues.push(...
|
|
1169
|
+
t.issues.push(...ke(n, e.issues));
|
|
1175
1170
|
}
|
|
1176
1171
|
e.value === void 0 ? n in r && (t.value[n] = void 0) : t.value[n] = e.value;
|
|
1177
1172
|
}
|
|
1178
|
-
function
|
|
1173
|
+
function bn(e) {
|
|
1179
1174
|
let t = Object.keys(e.shape);
|
|
1180
1175
|
for (let n of t) if (!e.shape?.[n]?._zod?.traits?.has("$ZodType")) throw Error(`Invalid element at key "${n}": expected a Zod schema`);
|
|
1181
|
-
let n =
|
|
1176
|
+
let n = be(e.shape);
|
|
1182
1177
|
return {
|
|
1183
1178
|
...e,
|
|
1184
1179
|
keys: t,
|
|
@@ -1187,7 +1182,7 @@ function xn(e) {
|
|
|
1187
1182
|
optionalKeys: new Set(n)
|
|
1188
1183
|
};
|
|
1189
1184
|
}
|
|
1190
|
-
function
|
|
1185
|
+
function xn(e, t, n, r, i, a) {
|
|
1191
1186
|
let o = [], s = i.keySet, c = i.catchall._zod, l = c.def.type, u = c.optout === "optional";
|
|
1192
1187
|
for (let i in t) {
|
|
1193
1188
|
if (s.has(i)) continue;
|
|
@@ -1199,7 +1194,7 @@ function Sn(e, t, n, r, i, a) {
|
|
|
1199
1194
|
value: t[i],
|
|
1200
1195
|
issues: []
|
|
1201
1196
|
}, r);
|
|
1202
|
-
a instanceof Promise ? e.push(a.then((e) =>
|
|
1197
|
+
a instanceof Promise ? e.push(a.then((e) => B(e, n, i, t, u))) : B(a, n, i, t, u);
|
|
1203
1198
|
}
|
|
1204
1199
|
return o.length && n.issues.push({
|
|
1205
1200
|
code: "unrecognized_keys",
|
|
@@ -1208,16 +1203,16 @@ function Sn(e, t, n, r, i, a) {
|
|
|
1208
1203
|
inst: a
|
|
1209
1204
|
}), e.length ? Promise.all(e).then(() => n) : n;
|
|
1210
1205
|
}
|
|
1211
|
-
var
|
|
1212
|
-
if (
|
|
1206
|
+
var Sn = /* @__PURE__ */ h("$ZodObject", (e, t) => {
|
|
1207
|
+
if (L.init(e, t), !Object.getOwnPropertyDescriptor(t, "shape")?.get) {
|
|
1213
1208
|
let e = t.shape;
|
|
1214
1209
|
Object.defineProperty(t, "shape", { get: () => {
|
|
1215
1210
|
let n = { ...e };
|
|
1216
1211
|
return Object.defineProperty(t, "shape", { value: n }), n;
|
|
1217
1212
|
} });
|
|
1218
1213
|
}
|
|
1219
|
-
let n =
|
|
1220
|
-
|
|
1214
|
+
let n = v(() => bn(t));
|
|
1215
|
+
x(e._zod, "propValues", () => {
|
|
1221
1216
|
let e = t.shape, n = {};
|
|
1222
1217
|
for (let t in e) {
|
|
1223
1218
|
let r = e[t]._zod;
|
|
@@ -1228,7 +1223,7 @@ var Cn = /* @__PURE__ */ h("$ZodObject", (e, t) => {
|
|
|
1228
1223
|
}
|
|
1229
1224
|
return n;
|
|
1230
1225
|
});
|
|
1231
|
-
let r =
|
|
1226
|
+
let r = w, i = t.catchall, a;
|
|
1232
1227
|
e._zod.parse = (t, o) => {
|
|
1233
1228
|
a ??= n.value;
|
|
1234
1229
|
let s = t.value;
|
|
@@ -1245,19 +1240,19 @@ var Cn = /* @__PURE__ */ h("$ZodObject", (e, t) => {
|
|
|
1245
1240
|
value: s[e],
|
|
1246
1241
|
issues: []
|
|
1247
1242
|
}, o);
|
|
1248
|
-
i instanceof Promise ? c.push(i.then((n) =>
|
|
1243
|
+
i instanceof Promise ? c.push(i.then((n) => B(n, t, e, s, r))) : B(i, t, e, s, r);
|
|
1249
1244
|
}
|
|
1250
|
-
return i ?
|
|
1245
|
+
return i ? xn(c, s, t, o, n.value, e) : c.length ? Promise.all(c).then(() => t) : t;
|
|
1251
1246
|
};
|
|
1252
|
-
}),
|
|
1253
|
-
|
|
1254
|
-
let n = e._zod.parse, r =
|
|
1247
|
+
}), Cn = /* @__PURE__ */ h("$ZodObjectJIT", (e, t) => {
|
|
1248
|
+
Sn.init(e, t);
|
|
1249
|
+
let n = e._zod.parse, r = v(() => bn(t)), i = (e) => {
|
|
1255
1250
|
let t = new Rt([
|
|
1256
1251
|
"shape",
|
|
1257
1252
|
"payload",
|
|
1258
1253
|
"ctx"
|
|
1259
1254
|
]), n = r.value, i = (e) => {
|
|
1260
|
-
let t =
|
|
1255
|
+
let t = me(e);
|
|
1261
1256
|
return `shape[${t}]._zod.run({ value: input[${t}], issues: [] }, ctx)`;
|
|
1262
1257
|
};
|
|
1263
1258
|
t.write("const input = payload.value;");
|
|
@@ -1265,7 +1260,7 @@ var Cn = /* @__PURE__ */ h("$ZodObject", (e, t) => {
|
|
|
1265
1260
|
for (let e of n.keys) a[e] = `key_${o++}`;
|
|
1266
1261
|
t.write("const newResult = {};");
|
|
1267
1262
|
for (let r of n.keys) {
|
|
1268
|
-
let n = a[r], o =
|
|
1263
|
+
let n = a[r], o = me(r), s = e[r]?._zod?.optout === "optional";
|
|
1269
1264
|
t.write(`const ${n} = ${i(r)};`), s ? t.write(`
|
|
1270
1265
|
if (${n}.issues.length) {
|
|
1271
1266
|
if (${o} in input) {
|
|
@@ -1305,11 +1300,11 @@ var Cn = /* @__PURE__ */ h("$ZodObject", (e, t) => {
|
|
|
1305
1300
|
t.write("payload.value = newResult;"), t.write("return payload;");
|
|
1306
1301
|
let s = t.compile();
|
|
1307
1302
|
return (t, n) => s(e, t, n);
|
|
1308
|
-
}, a, o =
|
|
1303
|
+
}, a, o = w, s = !le.jitless, c = s && _e.value, l = t.catchall, u;
|
|
1309
1304
|
e._zod.parse = (d, f) => {
|
|
1310
1305
|
u ??= r.value;
|
|
1311
1306
|
let p = d.value;
|
|
1312
|
-
return o(p) ? s && c && f?.async === !1 && f.jitless !== !0 ? (a ||= i(t.shape), d = a(d, f), l ?
|
|
1307
|
+
return o(p) ? s && c && f?.async === !1 && f.jitless !== !0 ? (a ||= i(t.shape), d = a(d, f), l ? xn([], p, d, f, u, e) : d) : n(d, f) : (d.issues.push({
|
|
1313
1308
|
expected: "object",
|
|
1314
1309
|
code: "invalid_type",
|
|
1315
1310
|
input: p,
|
|
@@ -1317,23 +1312,23 @@ var Cn = /* @__PURE__ */ h("$ZodObject", (e, t) => {
|
|
|
1317
1312
|
}), d);
|
|
1318
1313
|
};
|
|
1319
1314
|
});
|
|
1320
|
-
function
|
|
1315
|
+
function wn(e, t, n, r) {
|
|
1321
1316
|
for (let n of e) if (n.issues.length === 0) return t.value = n.value, t;
|
|
1322
|
-
let i = e.filter((e) => !
|
|
1317
|
+
let i = e.filter((e) => !k(e));
|
|
1323
1318
|
return i.length === 1 ? (t.value = i[0].value, i[0]) : (t.issues.push({
|
|
1324
1319
|
code: "invalid_union",
|
|
1325
1320
|
input: t.value,
|
|
1326
1321
|
inst: n,
|
|
1327
|
-
errors: e.map((e) => e.issues.map((e) =>
|
|
1322
|
+
errors: e.map((e) => e.issues.map((e) => j(e, r, _())))
|
|
1328
1323
|
}), t);
|
|
1329
1324
|
}
|
|
1330
|
-
var
|
|
1331
|
-
|
|
1325
|
+
var Tn = /* @__PURE__ */ h("$ZodUnion", (e, t) => {
|
|
1326
|
+
L.init(e, t), x(e._zod, "optin", () => t.options.some((e) => e._zod.optin === "optional") ? "optional" : void 0), x(e._zod, "optout", () => t.options.some((e) => e._zod.optout === "optional") ? "optional" : void 0), x(e._zod, "values", () => {
|
|
1332
1327
|
if (t.options.every((e) => e._zod.values)) return new Set(t.options.flatMap((e) => Array.from(e._zod.values)));
|
|
1333
|
-
}),
|
|
1328
|
+
}), x(e._zod, "pattern", () => {
|
|
1334
1329
|
if (t.options.every((e) => e._zod.pattern)) {
|
|
1335
1330
|
let e = t.options.map((e) => e._zod.pattern);
|
|
1336
|
-
return RegExp(`^(${e.map((e) =>
|
|
1331
|
+
return RegExp(`^(${e.map((e) => b(e.source)).join("|")})$`);
|
|
1337
1332
|
}
|
|
1338
1333
|
});
|
|
1339
1334
|
let n = t.options.length === 1, r = t.options[0]._zod.run;
|
|
@@ -1351,10 +1346,10 @@ var En = /* @__PURE__ */ h("$ZodUnion", (e, t) => {
|
|
|
1351
1346
|
s.push(t);
|
|
1352
1347
|
}
|
|
1353
1348
|
}
|
|
1354
|
-
return o ? Promise.all(s).then((t) =>
|
|
1349
|
+
return o ? Promise.all(s).then((t) => wn(t, i, e, a)) : wn(s, i, e, a);
|
|
1355
1350
|
};
|
|
1356
|
-
}),
|
|
1357
|
-
|
|
1351
|
+
}), En = /* @__PURE__ */ h("$ZodIntersection", (e, t) => {
|
|
1352
|
+
L.init(e, t), e._zod.parse = (e, n) => {
|
|
1358
1353
|
let r = e.value, i = t.left._zod.run({
|
|
1359
1354
|
value: r,
|
|
1360
1355
|
issues: []
|
|
@@ -1362,21 +1357,21 @@ var En = /* @__PURE__ */ h("$ZodUnion", (e, t) => {
|
|
|
1362
1357
|
value: r,
|
|
1363
1358
|
issues: []
|
|
1364
1359
|
}, n);
|
|
1365
|
-
return i instanceof Promise || a instanceof Promise ? Promise.all([i, a]).then(([t, n]) =>
|
|
1360
|
+
return i instanceof Promise || a instanceof Promise ? Promise.all([i, a]).then(([t, n]) => Dn(e, t, n)) : Dn(e, i, a);
|
|
1366
1361
|
};
|
|
1367
1362
|
});
|
|
1368
|
-
function
|
|
1363
|
+
function V(e, t) {
|
|
1369
1364
|
if (e === t || e instanceof Date && t instanceof Date && +e == +t) return {
|
|
1370
1365
|
valid: !0,
|
|
1371
1366
|
data: e
|
|
1372
1367
|
};
|
|
1373
|
-
if (
|
|
1368
|
+
if (T(e) && T(t)) {
|
|
1374
1369
|
let n = Object.keys(t), r = Object.keys(e).filter((e) => n.indexOf(e) !== -1), i = {
|
|
1375
1370
|
...e,
|
|
1376
1371
|
...t
|
|
1377
1372
|
};
|
|
1378
1373
|
for (let n of r) {
|
|
1379
|
-
let r =
|
|
1374
|
+
let r = V(e[n], t[n]);
|
|
1380
1375
|
if (!r.valid) return {
|
|
1381
1376
|
valid: !1,
|
|
1382
1377
|
mergeErrorPath: [n, ...r.mergeErrorPath]
|
|
@@ -1395,7 +1390,7 @@ function On(e, t) {
|
|
|
1395
1390
|
};
|
|
1396
1391
|
let n = [];
|
|
1397
1392
|
for (let r = 0; r < e.length; r++) {
|
|
1398
|
-
let i = e[r], a = t[r], o =
|
|
1393
|
+
let i = e[r], a = t[r], o = V(i, a);
|
|
1399
1394
|
if (!o.valid) return {
|
|
1400
1395
|
valid: !1,
|
|
1401
1396
|
mergeErrorPath: [r, ...o.mergeErrorPath]
|
|
@@ -1412,7 +1407,7 @@ function On(e, t) {
|
|
|
1412
1407
|
mergeErrorPath: []
|
|
1413
1408
|
};
|
|
1414
1409
|
}
|
|
1415
|
-
function
|
|
1410
|
+
function Dn(e, t, n) {
|
|
1416
1411
|
let r = /* @__PURE__ */ new Map(), i;
|
|
1417
1412
|
for (let n of t.issues) if (n.code === "unrecognized_keys") {
|
|
1418
1413
|
i ??= n;
|
|
@@ -1424,15 +1419,15 @@ function kn(e, t, n) {
|
|
|
1424
1419
|
if (a.length && i && e.issues.push({
|
|
1425
1420
|
...i,
|
|
1426
1421
|
keys: a
|
|
1427
|
-
}),
|
|
1428
|
-
let o =
|
|
1422
|
+
}), k(e)) return e;
|
|
1423
|
+
let o = V(t.value, n.value);
|
|
1429
1424
|
if (!o.valid) throw Error(`Unmergable intersection. Error path: ${JSON.stringify(o.mergeErrorPath)}`);
|
|
1430
1425
|
return e.value = o.data, e;
|
|
1431
1426
|
}
|
|
1432
|
-
var
|
|
1433
|
-
|
|
1434
|
-
let n =
|
|
1435
|
-
e._zod.values = r, e._zod.pattern = RegExp(`^(${n.filter((e) =>
|
|
1427
|
+
var On = /* @__PURE__ */ h("$ZodEnum", (e, t) => {
|
|
1428
|
+
L.init(e, t);
|
|
1429
|
+
let n = ue(t.entries), r = new Set(n);
|
|
1430
|
+
e._zod.values = r, e._zod.pattern = RegExp(`^(${n.filter((e) => ye.has(typeof e)).map((e) => typeof e == "string" ? E(e) : e.toString()).join("|")})$`), e._zod.parse = (t, i) => {
|
|
1436
1431
|
let a = t.value;
|
|
1437
1432
|
return r.has(a) || t.issues.push({
|
|
1438
1433
|
code: "invalid_value",
|
|
@@ -1441,62 +1436,62 @@ var An = /* @__PURE__ */ h("$ZodEnum", (e, t) => {
|
|
|
1441
1436
|
inst: e
|
|
1442
1437
|
}), t;
|
|
1443
1438
|
};
|
|
1444
|
-
}),
|
|
1445
|
-
|
|
1446
|
-
if (r.direction === "backward") throw new
|
|
1439
|
+
}), kn = /* @__PURE__ */ h("$ZodTransform", (e, t) => {
|
|
1440
|
+
L.init(e, t), e._zod.parse = (n, r) => {
|
|
1441
|
+
if (r.direction === "backward") throw new ce(e.constructor.name);
|
|
1447
1442
|
let i = t.transform(n.value, n);
|
|
1448
1443
|
if (r.async) return (i instanceof Promise ? i : Promise.resolve(i)).then((e) => (n.value = e, n));
|
|
1449
1444
|
if (i instanceof Promise) throw new g();
|
|
1450
1445
|
return n.value = i, n;
|
|
1451
1446
|
};
|
|
1452
1447
|
});
|
|
1453
|
-
function
|
|
1448
|
+
function An(e, t) {
|
|
1454
1449
|
return e.issues.length && t === void 0 ? {
|
|
1455
1450
|
issues: [],
|
|
1456
1451
|
value: void 0
|
|
1457
1452
|
} : e;
|
|
1458
1453
|
}
|
|
1459
|
-
var
|
|
1460
|
-
|
|
1454
|
+
var jn = /* @__PURE__ */ h("$ZodOptional", (e, t) => {
|
|
1455
|
+
L.init(e, t), e._zod.optin = "optional", e._zod.optout = "optional", x(e._zod, "values", () => t.innerType._zod.values ? new Set([...t.innerType._zod.values, void 0]) : void 0), x(e._zod, "pattern", () => {
|
|
1461
1456
|
let e = t.innerType._zod.pattern;
|
|
1462
|
-
return e ? RegExp(`^(${
|
|
1457
|
+
return e ? RegExp(`^(${b(e.source)})?$`) : void 0;
|
|
1463
1458
|
}), e._zod.parse = (e, n) => {
|
|
1464
1459
|
if (t.innerType._zod.optin === "optional") {
|
|
1465
1460
|
let r = t.innerType._zod.run(e, n);
|
|
1466
|
-
return r instanceof Promise ? r.then((t) =>
|
|
1461
|
+
return r instanceof Promise ? r.then((t) => An(t, e.value)) : An(r, e.value);
|
|
1467
1462
|
}
|
|
1468
1463
|
return e.value === void 0 ? e : t.innerType._zod.run(e, n);
|
|
1469
1464
|
};
|
|
1470
|
-
}),
|
|
1471
|
-
|
|
1472
|
-
}),
|
|
1473
|
-
|
|
1465
|
+
}), Mn = /* @__PURE__ */ h("$ZodExactOptional", (e, t) => {
|
|
1466
|
+
jn.init(e, t), x(e._zod, "values", () => t.innerType._zod.values), x(e._zod, "pattern", () => t.innerType._zod.pattern), e._zod.parse = (e, n) => t.innerType._zod.run(e, n);
|
|
1467
|
+
}), Nn = /* @__PURE__ */ h("$ZodNullable", (e, t) => {
|
|
1468
|
+
L.init(e, t), x(e._zod, "optin", () => t.innerType._zod.optin), x(e._zod, "optout", () => t.innerType._zod.optout), x(e._zod, "pattern", () => {
|
|
1474
1469
|
let e = t.innerType._zod.pattern;
|
|
1475
|
-
return e ? RegExp(`^(${
|
|
1476
|
-
}),
|
|
1477
|
-
}),
|
|
1478
|
-
|
|
1470
|
+
return e ? RegExp(`^(${b(e.source)}|null)$`) : void 0;
|
|
1471
|
+
}), x(e._zod, "values", () => t.innerType._zod.values ? new Set([...t.innerType._zod.values, null]) : void 0), e._zod.parse = (e, n) => e.value === null ? e : t.innerType._zod.run(e, n);
|
|
1472
|
+
}), Pn = /* @__PURE__ */ h("$ZodDefault", (e, t) => {
|
|
1473
|
+
L.init(e, t), e._zod.optin = "optional", x(e._zod, "values", () => t.innerType._zod.values), e._zod.parse = (e, n) => {
|
|
1479
1474
|
if (n.direction === "backward") return t.innerType._zod.run(e, n);
|
|
1480
1475
|
if (e.value === void 0) return e.value = t.defaultValue, e;
|
|
1481
1476
|
let r = t.innerType._zod.run(e, n);
|
|
1482
|
-
return r instanceof Promise ? r.then((e) =>
|
|
1477
|
+
return r instanceof Promise ? r.then((e) => Fn(e, t)) : Fn(r, t);
|
|
1483
1478
|
};
|
|
1484
1479
|
});
|
|
1485
|
-
function
|
|
1480
|
+
function Fn(e, t) {
|
|
1486
1481
|
return e.value === void 0 && (e.value = t.defaultValue), e;
|
|
1487
1482
|
}
|
|
1488
|
-
var
|
|
1489
|
-
|
|
1490
|
-
}),
|
|
1491
|
-
|
|
1483
|
+
var In = /* @__PURE__ */ h("$ZodPrefault", (e, t) => {
|
|
1484
|
+
L.init(e, t), e._zod.optin = "optional", x(e._zod, "values", () => t.innerType._zod.values), e._zod.parse = (e, n) => (n.direction === "backward" || e.value === void 0 && (e.value = t.defaultValue), t.innerType._zod.run(e, n));
|
|
1485
|
+
}), Ln = /* @__PURE__ */ h("$ZodNonOptional", (e, t) => {
|
|
1486
|
+
L.init(e, t), x(e._zod, "values", () => {
|
|
1492
1487
|
let e = t.innerType._zod.values;
|
|
1493
1488
|
return e ? new Set([...e].filter((e) => e !== void 0)) : void 0;
|
|
1494
1489
|
}), e._zod.parse = (n, r) => {
|
|
1495
1490
|
let i = t.innerType._zod.run(n, r);
|
|
1496
|
-
return i instanceof Promise ? i.then((t) =>
|
|
1491
|
+
return i instanceof Promise ? i.then((t) => Rn(t, e)) : Rn(i, e);
|
|
1497
1492
|
};
|
|
1498
1493
|
});
|
|
1499
|
-
function
|
|
1494
|
+
function Rn(e, t) {
|
|
1500
1495
|
return !e.issues.length && e.value === void 0 && e.issues.push({
|
|
1501
1496
|
code: "invalid_type",
|
|
1502
1497
|
expected: "nonoptional",
|
|
@@ -1504,22 +1499,22 @@ function Bn(e, t) {
|
|
|
1504
1499
|
inst: t
|
|
1505
1500
|
}), e;
|
|
1506
1501
|
}
|
|
1507
|
-
var
|
|
1508
|
-
|
|
1502
|
+
var zn = /* @__PURE__ */ h("$ZodCatch", (e, t) => {
|
|
1503
|
+
L.init(e, t), x(e._zod, "optin", () => t.innerType._zod.optin), x(e._zod, "optout", () => t.innerType._zod.optout), x(e._zod, "values", () => t.innerType._zod.values), e._zod.parse = (e, n) => {
|
|
1509
1504
|
if (n.direction === "backward") return t.innerType._zod.run(e, n);
|
|
1510
1505
|
let r = t.innerType._zod.run(e, n);
|
|
1511
1506
|
return r instanceof Promise ? r.then((r) => (e.value = r.value, r.issues.length && (e.value = t.catchValue({
|
|
1512
1507
|
...e,
|
|
1513
|
-
error: { issues: r.issues.map((e) =>
|
|
1508
|
+
error: { issues: r.issues.map((e) => j(e, n, _())) },
|
|
1514
1509
|
input: e.value
|
|
1515
1510
|
}), e.issues = []), e)) : (e.value = r.value, r.issues.length && (e.value = t.catchValue({
|
|
1516
1511
|
...e,
|
|
1517
|
-
error: { issues: r.issues.map((e) =>
|
|
1512
|
+
error: { issues: r.issues.map((e) => j(e, n, _())) },
|
|
1518
1513
|
input: e.value
|
|
1519
1514
|
}), e.issues = []), e);
|
|
1520
1515
|
};
|
|
1521
|
-
}),
|
|
1522
|
-
|
|
1516
|
+
}), Bn = /* @__PURE__ */ h("$ZodPipe", (e, t) => {
|
|
1517
|
+
L.init(e, t), x(e._zod, "values", () => t.in._zod.values), x(e._zod, "optin", () => t.in._zod.optin), x(e._zod, "optout", () => t.out._zod.optout), x(e._zod, "propValues", () => t.in._zod.propValues), e._zod.parse = (e, n) => {
|
|
1523
1518
|
if (n.direction === "backward") {
|
|
1524
1519
|
let r = t.out._zod.run(e, n);
|
|
1525
1520
|
return r instanceof Promise ? r.then((e) => H(e, t.in, n)) : H(r, t.in, n);
|
|
@@ -1534,24 +1529,24 @@ function H(e, t, n) {
|
|
|
1534
1529
|
issues: e.issues
|
|
1535
1530
|
}, n);
|
|
1536
1531
|
}
|
|
1537
|
-
var
|
|
1538
|
-
|
|
1532
|
+
var Vn = /* @__PURE__ */ h("$ZodReadonly", (e, t) => {
|
|
1533
|
+
L.init(e, t), x(e._zod, "propValues", () => t.innerType._zod.propValues), x(e._zod, "values", () => t.innerType._zod.values), x(e._zod, "optin", () => t.innerType?._zod?.optin), x(e._zod, "optout", () => t.innerType?._zod?.optout), e._zod.parse = (e, n) => {
|
|
1539
1534
|
if (n.direction === "backward") return t.innerType._zod.run(e, n);
|
|
1540
1535
|
let r = t.innerType._zod.run(e, n);
|
|
1541
|
-
return r instanceof Promise ? r.then(
|
|
1536
|
+
return r instanceof Promise ? r.then(Hn) : Hn(r);
|
|
1542
1537
|
};
|
|
1543
1538
|
});
|
|
1544
|
-
function
|
|
1539
|
+
function Hn(e) {
|
|
1545
1540
|
return e.value = Object.freeze(e.value), e;
|
|
1546
1541
|
}
|
|
1547
|
-
var
|
|
1548
|
-
|
|
1542
|
+
var Un = /* @__PURE__ */ h("$ZodCustom", (e, t) => {
|
|
1543
|
+
F.init(e, t), L.init(e, t), e._zod.parse = (e, t) => e, e._zod.check = (n) => {
|
|
1549
1544
|
let r = n.value, i = t.fn(r);
|
|
1550
|
-
if (i instanceof Promise) return i.then((t) =>
|
|
1551
|
-
|
|
1545
|
+
if (i instanceof Promise) return i.then((t) => Wn(t, n, r, e));
|
|
1546
|
+
Wn(i, n, r, e);
|
|
1552
1547
|
};
|
|
1553
1548
|
});
|
|
1554
|
-
function
|
|
1549
|
+
function Wn(e, t, n, r) {
|
|
1555
1550
|
if (!e) {
|
|
1556
1551
|
let e = {
|
|
1557
1552
|
code: "custom",
|
|
@@ -1565,7 +1560,7 @@ function Kn(e, t, n, r) {
|
|
|
1565
1560
|
}
|
|
1566
1561
|
//#endregion
|
|
1567
1562
|
//#region ../../node_modules/zod/v4/core/registries.js
|
|
1568
|
-
var
|
|
1563
|
+
var Gn, Kn = class {
|
|
1569
1564
|
constructor() {
|
|
1570
1565
|
this._map = /* @__PURE__ */ new WeakMap(), this._idmap = /* @__PURE__ */ new Map();
|
|
1571
1566
|
}
|
|
@@ -1597,245 +1592,245 @@ var qn, Jn = class {
|
|
|
1597
1592
|
return this._map.has(e);
|
|
1598
1593
|
}
|
|
1599
1594
|
};
|
|
1600
|
-
function
|
|
1601
|
-
return new
|
|
1595
|
+
function qn() {
|
|
1596
|
+
return new Kn();
|
|
1602
1597
|
}
|
|
1603
|
-
(
|
|
1598
|
+
(Gn = globalThis).__zod_globalRegistry ?? (Gn.__zod_globalRegistry = qn());
|
|
1604
1599
|
var U = globalThis.__zod_globalRegistry;
|
|
1605
1600
|
//#endregion
|
|
1606
1601
|
//#region ../../node_modules/zod/v4/core/api.js
|
|
1607
1602
|
/* @__NO_SIDE_EFFECTS__ */
|
|
1608
|
-
function
|
|
1603
|
+
function Jn(e, t) {
|
|
1609
1604
|
return new e({
|
|
1610
1605
|
type: "string",
|
|
1611
|
-
...
|
|
1606
|
+
...O(t)
|
|
1612
1607
|
});
|
|
1613
1608
|
}
|
|
1614
1609
|
/* @__NO_SIDE_EFFECTS__ */
|
|
1615
|
-
function
|
|
1610
|
+
function Yn(e, t) {
|
|
1616
1611
|
return new e({
|
|
1617
1612
|
type: "string",
|
|
1618
1613
|
format: "email",
|
|
1619
1614
|
check: "string_format",
|
|
1620
1615
|
abort: !1,
|
|
1621
|
-
...
|
|
1616
|
+
...O(t)
|
|
1622
1617
|
});
|
|
1623
1618
|
}
|
|
1624
1619
|
/* @__NO_SIDE_EFFECTS__ */
|
|
1625
|
-
function
|
|
1620
|
+
function Xn(e, t) {
|
|
1626
1621
|
return new e({
|
|
1627
1622
|
type: "string",
|
|
1628
1623
|
format: "guid",
|
|
1629
1624
|
check: "string_format",
|
|
1630
1625
|
abort: !1,
|
|
1631
|
-
...
|
|
1626
|
+
...O(t)
|
|
1632
1627
|
});
|
|
1633
1628
|
}
|
|
1634
1629
|
/* @__NO_SIDE_EFFECTS__ */
|
|
1635
|
-
function
|
|
1630
|
+
function Zn(e, t) {
|
|
1636
1631
|
return new e({
|
|
1637
1632
|
type: "string",
|
|
1638
1633
|
format: "uuid",
|
|
1639
1634
|
check: "string_format",
|
|
1640
1635
|
abort: !1,
|
|
1641
|
-
...
|
|
1636
|
+
...O(t)
|
|
1642
1637
|
});
|
|
1643
1638
|
}
|
|
1644
1639
|
/* @__NO_SIDE_EFFECTS__ */
|
|
1645
|
-
function
|
|
1640
|
+
function Qn(e, t) {
|
|
1646
1641
|
return new e({
|
|
1647
1642
|
type: "string",
|
|
1648
1643
|
format: "uuid",
|
|
1649
1644
|
check: "string_format",
|
|
1650
1645
|
abort: !1,
|
|
1651
1646
|
version: "v4",
|
|
1652
|
-
...
|
|
1647
|
+
...O(t)
|
|
1653
1648
|
});
|
|
1654
1649
|
}
|
|
1655
1650
|
/* @__NO_SIDE_EFFECTS__ */
|
|
1656
|
-
function
|
|
1651
|
+
function $n(e, t) {
|
|
1657
1652
|
return new e({
|
|
1658
1653
|
type: "string",
|
|
1659
1654
|
format: "uuid",
|
|
1660
1655
|
check: "string_format",
|
|
1661
1656
|
abort: !1,
|
|
1662
1657
|
version: "v6",
|
|
1663
|
-
...
|
|
1658
|
+
...O(t)
|
|
1664
1659
|
});
|
|
1665
1660
|
}
|
|
1666
1661
|
/* @__NO_SIDE_EFFECTS__ */
|
|
1667
|
-
function
|
|
1662
|
+
function er(e, t) {
|
|
1668
1663
|
return new e({
|
|
1669
1664
|
type: "string",
|
|
1670
1665
|
format: "uuid",
|
|
1671
1666
|
check: "string_format",
|
|
1672
1667
|
abort: !1,
|
|
1673
1668
|
version: "v7",
|
|
1674
|
-
...
|
|
1669
|
+
...O(t)
|
|
1675
1670
|
});
|
|
1676
1671
|
}
|
|
1677
1672
|
/* @__NO_SIDE_EFFECTS__ */
|
|
1678
|
-
function
|
|
1673
|
+
function tr(e, t) {
|
|
1679
1674
|
return new e({
|
|
1680
1675
|
type: "string",
|
|
1681
1676
|
format: "url",
|
|
1682
1677
|
check: "string_format",
|
|
1683
1678
|
abort: !1,
|
|
1684
|
-
...
|
|
1679
|
+
...O(t)
|
|
1685
1680
|
});
|
|
1686
1681
|
}
|
|
1687
1682
|
/* @__NO_SIDE_EFFECTS__ */
|
|
1688
|
-
function
|
|
1683
|
+
function nr(e, t) {
|
|
1689
1684
|
return new e({
|
|
1690
1685
|
type: "string",
|
|
1691
1686
|
format: "emoji",
|
|
1692
1687
|
check: "string_format",
|
|
1693
1688
|
abort: !1,
|
|
1694
|
-
...
|
|
1689
|
+
...O(t)
|
|
1695
1690
|
});
|
|
1696
1691
|
}
|
|
1697
1692
|
/* @__NO_SIDE_EFFECTS__ */
|
|
1698
|
-
function
|
|
1693
|
+
function rr(e, t) {
|
|
1699
1694
|
return new e({
|
|
1700
1695
|
type: "string",
|
|
1701
1696
|
format: "nanoid",
|
|
1702
1697
|
check: "string_format",
|
|
1703
1698
|
abort: !1,
|
|
1704
|
-
...
|
|
1699
|
+
...O(t)
|
|
1705
1700
|
});
|
|
1706
1701
|
}
|
|
1707
1702
|
/* @__NO_SIDE_EFFECTS__ */
|
|
1708
|
-
function
|
|
1703
|
+
function ir(e, t) {
|
|
1709
1704
|
return new e({
|
|
1710
1705
|
type: "string",
|
|
1711
1706
|
format: "cuid",
|
|
1712
1707
|
check: "string_format",
|
|
1713
1708
|
abort: !1,
|
|
1714
|
-
...
|
|
1709
|
+
...O(t)
|
|
1715
1710
|
});
|
|
1716
1711
|
}
|
|
1717
1712
|
/* @__NO_SIDE_EFFECTS__ */
|
|
1718
|
-
function
|
|
1713
|
+
function ar(e, t) {
|
|
1719
1714
|
return new e({
|
|
1720
1715
|
type: "string",
|
|
1721
1716
|
format: "cuid2",
|
|
1722
1717
|
check: "string_format",
|
|
1723
1718
|
abort: !1,
|
|
1724
|
-
...
|
|
1719
|
+
...O(t)
|
|
1725
1720
|
});
|
|
1726
1721
|
}
|
|
1727
1722
|
/* @__NO_SIDE_EFFECTS__ */
|
|
1728
|
-
function
|
|
1723
|
+
function or(e, t) {
|
|
1729
1724
|
return new e({
|
|
1730
1725
|
type: "string",
|
|
1731
1726
|
format: "ulid",
|
|
1732
1727
|
check: "string_format",
|
|
1733
1728
|
abort: !1,
|
|
1734
|
-
...
|
|
1729
|
+
...O(t)
|
|
1735
1730
|
});
|
|
1736
1731
|
}
|
|
1737
1732
|
/* @__NO_SIDE_EFFECTS__ */
|
|
1738
|
-
function
|
|
1733
|
+
function sr(e, t) {
|
|
1739
1734
|
return new e({
|
|
1740
1735
|
type: "string",
|
|
1741
1736
|
format: "xid",
|
|
1742
1737
|
check: "string_format",
|
|
1743
1738
|
abort: !1,
|
|
1744
|
-
...
|
|
1739
|
+
...O(t)
|
|
1745
1740
|
});
|
|
1746
1741
|
}
|
|
1747
1742
|
/* @__NO_SIDE_EFFECTS__ */
|
|
1748
|
-
function
|
|
1743
|
+
function cr(e, t) {
|
|
1749
1744
|
return new e({
|
|
1750
1745
|
type: "string",
|
|
1751
1746
|
format: "ksuid",
|
|
1752
1747
|
check: "string_format",
|
|
1753
1748
|
abort: !1,
|
|
1754
|
-
...
|
|
1749
|
+
...O(t)
|
|
1755
1750
|
});
|
|
1756
1751
|
}
|
|
1757
1752
|
/* @__NO_SIDE_EFFECTS__ */
|
|
1758
|
-
function
|
|
1753
|
+
function lr(e, t) {
|
|
1759
1754
|
return new e({
|
|
1760
1755
|
type: "string",
|
|
1761
1756
|
format: "ipv4",
|
|
1762
1757
|
check: "string_format",
|
|
1763
1758
|
abort: !1,
|
|
1764
|
-
...
|
|
1759
|
+
...O(t)
|
|
1765
1760
|
});
|
|
1766
1761
|
}
|
|
1767
1762
|
/* @__NO_SIDE_EFFECTS__ */
|
|
1768
|
-
function
|
|
1763
|
+
function ur(e, t) {
|
|
1769
1764
|
return new e({
|
|
1770
1765
|
type: "string",
|
|
1771
1766
|
format: "ipv6",
|
|
1772
1767
|
check: "string_format",
|
|
1773
1768
|
abort: !1,
|
|
1774
|
-
...
|
|
1769
|
+
...O(t)
|
|
1775
1770
|
});
|
|
1776
1771
|
}
|
|
1777
1772
|
/* @__NO_SIDE_EFFECTS__ */
|
|
1778
|
-
function
|
|
1773
|
+
function dr(e, t) {
|
|
1779
1774
|
return new e({
|
|
1780
1775
|
type: "string",
|
|
1781
1776
|
format: "cidrv4",
|
|
1782
1777
|
check: "string_format",
|
|
1783
1778
|
abort: !1,
|
|
1784
|
-
...
|
|
1779
|
+
...O(t)
|
|
1785
1780
|
});
|
|
1786
1781
|
}
|
|
1787
1782
|
/* @__NO_SIDE_EFFECTS__ */
|
|
1788
|
-
function
|
|
1783
|
+
function fr(e, t) {
|
|
1789
1784
|
return new e({
|
|
1790
1785
|
type: "string",
|
|
1791
1786
|
format: "cidrv6",
|
|
1792
1787
|
check: "string_format",
|
|
1793
1788
|
abort: !1,
|
|
1794
|
-
...
|
|
1789
|
+
...O(t)
|
|
1795
1790
|
});
|
|
1796
1791
|
}
|
|
1797
1792
|
/* @__NO_SIDE_EFFECTS__ */
|
|
1798
|
-
function
|
|
1793
|
+
function pr(e, t) {
|
|
1799
1794
|
return new e({
|
|
1800
1795
|
type: "string",
|
|
1801
1796
|
format: "base64",
|
|
1802
1797
|
check: "string_format",
|
|
1803
1798
|
abort: !1,
|
|
1804
|
-
...
|
|
1799
|
+
...O(t)
|
|
1805
1800
|
});
|
|
1806
1801
|
}
|
|
1807
1802
|
/* @__NO_SIDE_EFFECTS__ */
|
|
1808
|
-
function
|
|
1803
|
+
function mr(e, t) {
|
|
1809
1804
|
return new e({
|
|
1810
1805
|
type: "string",
|
|
1811
1806
|
format: "base64url",
|
|
1812
1807
|
check: "string_format",
|
|
1813
1808
|
abort: !1,
|
|
1814
|
-
...
|
|
1809
|
+
...O(t)
|
|
1815
1810
|
});
|
|
1816
1811
|
}
|
|
1817
1812
|
/* @__NO_SIDE_EFFECTS__ */
|
|
1818
|
-
function
|
|
1813
|
+
function hr(e, t) {
|
|
1819
1814
|
return new e({
|
|
1820
1815
|
type: "string",
|
|
1821
1816
|
format: "e164",
|
|
1822
1817
|
check: "string_format",
|
|
1823
1818
|
abort: !1,
|
|
1824
|
-
...
|
|
1819
|
+
...O(t)
|
|
1825
1820
|
});
|
|
1826
1821
|
}
|
|
1827
1822
|
/* @__NO_SIDE_EFFECTS__ */
|
|
1828
|
-
function
|
|
1823
|
+
function gr(e, t) {
|
|
1829
1824
|
return new e({
|
|
1830
1825
|
type: "string",
|
|
1831
1826
|
format: "jwt",
|
|
1832
1827
|
check: "string_format",
|
|
1833
1828
|
abort: !1,
|
|
1834
|
-
...
|
|
1829
|
+
...O(t)
|
|
1835
1830
|
});
|
|
1836
1831
|
}
|
|
1837
1832
|
/* @__NO_SIDE_EFFECTS__ */
|
|
1838
|
-
function
|
|
1833
|
+
function _r(e, t) {
|
|
1839
1834
|
return new e({
|
|
1840
1835
|
type: "string",
|
|
1841
1836
|
format: "datetime",
|
|
@@ -1843,122 +1838,122 @@ function yr(e, t) {
|
|
|
1843
1838
|
offset: !1,
|
|
1844
1839
|
local: !1,
|
|
1845
1840
|
precision: null,
|
|
1846
|
-
...
|
|
1841
|
+
...O(t)
|
|
1847
1842
|
});
|
|
1848
1843
|
}
|
|
1849
1844
|
/* @__NO_SIDE_EFFECTS__ */
|
|
1850
|
-
function
|
|
1845
|
+
function vr(e, t) {
|
|
1851
1846
|
return new e({
|
|
1852
1847
|
type: "string",
|
|
1853
1848
|
format: "date",
|
|
1854
1849
|
check: "string_format",
|
|
1855
|
-
...
|
|
1850
|
+
...O(t)
|
|
1856
1851
|
});
|
|
1857
1852
|
}
|
|
1858
1853
|
/* @__NO_SIDE_EFFECTS__ */
|
|
1859
|
-
function
|
|
1854
|
+
function yr(e, t) {
|
|
1860
1855
|
return new e({
|
|
1861
1856
|
type: "string",
|
|
1862
1857
|
format: "time",
|
|
1863
1858
|
check: "string_format",
|
|
1864
1859
|
precision: null,
|
|
1865
|
-
...
|
|
1860
|
+
...O(t)
|
|
1866
1861
|
});
|
|
1867
1862
|
}
|
|
1868
1863
|
/* @__NO_SIDE_EFFECTS__ */
|
|
1869
|
-
function
|
|
1864
|
+
function br(e, t) {
|
|
1870
1865
|
return new e({
|
|
1871
1866
|
type: "string",
|
|
1872
1867
|
format: "duration",
|
|
1873
1868
|
check: "string_format",
|
|
1874
|
-
...
|
|
1869
|
+
...O(t)
|
|
1875
1870
|
});
|
|
1876
1871
|
}
|
|
1877
1872
|
/* @__NO_SIDE_EFFECTS__ */
|
|
1878
|
-
function
|
|
1873
|
+
function xr(e, t) {
|
|
1879
1874
|
return new e({
|
|
1880
1875
|
type: "number",
|
|
1881
1876
|
checks: [],
|
|
1882
|
-
...
|
|
1877
|
+
...O(t)
|
|
1883
1878
|
});
|
|
1884
1879
|
}
|
|
1885
1880
|
/* @__NO_SIDE_EFFECTS__ */
|
|
1886
|
-
function
|
|
1881
|
+
function Sr(e, t) {
|
|
1887
1882
|
return new e({
|
|
1888
1883
|
type: "number",
|
|
1889
1884
|
check: "number_format",
|
|
1890
1885
|
abort: !1,
|
|
1891
1886
|
format: "safeint",
|
|
1892
|
-
...
|
|
1887
|
+
...O(t)
|
|
1893
1888
|
});
|
|
1894
1889
|
}
|
|
1895
1890
|
/* @__NO_SIDE_EFFECTS__ */
|
|
1896
|
-
function
|
|
1891
|
+
function Cr(e) {
|
|
1897
1892
|
return new e({ type: "unknown" });
|
|
1898
1893
|
}
|
|
1899
1894
|
/* @__NO_SIDE_EFFECTS__ */
|
|
1900
|
-
function
|
|
1895
|
+
function wr(e, t) {
|
|
1901
1896
|
return new e({
|
|
1902
1897
|
type: "never",
|
|
1903
|
-
...
|
|
1898
|
+
...O(t)
|
|
1904
1899
|
});
|
|
1905
1900
|
}
|
|
1906
1901
|
/* @__NO_SIDE_EFFECTS__ */
|
|
1907
|
-
function
|
|
1902
|
+
function Tr(e, t) {
|
|
1908
1903
|
return new e({
|
|
1909
1904
|
type: "void",
|
|
1910
|
-
...
|
|
1905
|
+
...O(t)
|
|
1911
1906
|
});
|
|
1912
1907
|
}
|
|
1913
1908
|
/* @__NO_SIDE_EFFECTS__ */
|
|
1914
|
-
function
|
|
1909
|
+
function Er(e, t) {
|
|
1915
1910
|
return new wt({
|
|
1916
1911
|
check: "less_than",
|
|
1917
|
-
...
|
|
1912
|
+
...O(t),
|
|
1918
1913
|
value: e,
|
|
1919
1914
|
inclusive: !1
|
|
1920
1915
|
});
|
|
1921
1916
|
}
|
|
1922
1917
|
/* @__NO_SIDE_EFFECTS__ */
|
|
1923
|
-
function
|
|
1918
|
+
function Dr(e, t) {
|
|
1924
1919
|
return new wt({
|
|
1925
1920
|
check: "less_than",
|
|
1926
|
-
...
|
|
1921
|
+
...O(t),
|
|
1927
1922
|
value: e,
|
|
1928
1923
|
inclusive: !0
|
|
1929
1924
|
});
|
|
1930
1925
|
}
|
|
1931
1926
|
/* @__NO_SIDE_EFFECTS__ */
|
|
1932
|
-
function
|
|
1927
|
+
function Or(e, t) {
|
|
1933
1928
|
return new Tt({
|
|
1934
1929
|
check: "greater_than",
|
|
1935
|
-
...
|
|
1930
|
+
...O(t),
|
|
1936
1931
|
value: e,
|
|
1937
1932
|
inclusive: !1
|
|
1938
1933
|
});
|
|
1939
1934
|
}
|
|
1940
1935
|
/* @__NO_SIDE_EFFECTS__ */
|
|
1941
|
-
function
|
|
1936
|
+
function kr(e, t) {
|
|
1942
1937
|
return new Tt({
|
|
1943
1938
|
check: "greater_than",
|
|
1944
|
-
...
|
|
1939
|
+
...O(t),
|
|
1945
1940
|
value: e,
|
|
1946
1941
|
inclusive: !0
|
|
1947
1942
|
});
|
|
1948
1943
|
}
|
|
1949
1944
|
/* @__NO_SIDE_EFFECTS__ */
|
|
1950
|
-
function
|
|
1945
|
+
function Ar(e, t) {
|
|
1951
1946
|
return new Et({
|
|
1952
1947
|
check: "multiple_of",
|
|
1953
|
-
...
|
|
1948
|
+
...O(t),
|
|
1954
1949
|
value: e
|
|
1955
1950
|
});
|
|
1956
1951
|
}
|
|
1957
1952
|
/* @__NO_SIDE_EFFECTS__ */
|
|
1958
|
-
function
|
|
1953
|
+
function jr(e, t) {
|
|
1959
1954
|
return new Ot({
|
|
1960
1955
|
check: "max_length",
|
|
1961
|
-
...
|
|
1956
|
+
...O(t),
|
|
1962
1957
|
maximum: e
|
|
1963
1958
|
});
|
|
1964
1959
|
}
|
|
@@ -1966,67 +1961,67 @@ function Nr(e, t) {
|
|
|
1966
1961
|
function W(e, t) {
|
|
1967
1962
|
return new kt({
|
|
1968
1963
|
check: "min_length",
|
|
1969
|
-
...
|
|
1964
|
+
...O(t),
|
|
1970
1965
|
minimum: e
|
|
1971
1966
|
});
|
|
1972
1967
|
}
|
|
1973
1968
|
/* @__NO_SIDE_EFFECTS__ */
|
|
1974
|
-
function
|
|
1969
|
+
function Mr(e, t) {
|
|
1975
1970
|
return new At({
|
|
1976
1971
|
check: "length_equals",
|
|
1977
|
-
...
|
|
1972
|
+
...O(t),
|
|
1978
1973
|
length: e
|
|
1979
1974
|
});
|
|
1980
1975
|
}
|
|
1981
1976
|
/* @__NO_SIDE_EFFECTS__ */
|
|
1982
|
-
function
|
|
1977
|
+
function Nr(e, t) {
|
|
1983
1978
|
return new jt({
|
|
1984
1979
|
check: "string_format",
|
|
1985
1980
|
format: "regex",
|
|
1986
|
-
...
|
|
1981
|
+
...O(t),
|
|
1987
1982
|
pattern: e
|
|
1988
1983
|
});
|
|
1989
1984
|
}
|
|
1990
1985
|
/* @__NO_SIDE_EFFECTS__ */
|
|
1991
|
-
function
|
|
1986
|
+
function Pr(e) {
|
|
1992
1987
|
return new Mt({
|
|
1993
1988
|
check: "string_format",
|
|
1994
1989
|
format: "lowercase",
|
|
1995
|
-
...
|
|
1990
|
+
...O(e)
|
|
1996
1991
|
});
|
|
1997
1992
|
}
|
|
1998
1993
|
/* @__NO_SIDE_EFFECTS__ */
|
|
1999
|
-
function
|
|
1994
|
+
function Fr(e) {
|
|
2000
1995
|
return new Nt({
|
|
2001
1996
|
check: "string_format",
|
|
2002
1997
|
format: "uppercase",
|
|
2003
|
-
...
|
|
1998
|
+
...O(e)
|
|
2004
1999
|
});
|
|
2005
2000
|
}
|
|
2006
2001
|
/* @__NO_SIDE_EFFECTS__ */
|
|
2007
|
-
function
|
|
2002
|
+
function Ir(e, t) {
|
|
2008
2003
|
return new Pt({
|
|
2009
2004
|
check: "string_format",
|
|
2010
2005
|
format: "includes",
|
|
2011
|
-
...
|
|
2006
|
+
...O(t),
|
|
2012
2007
|
includes: e
|
|
2013
2008
|
});
|
|
2014
2009
|
}
|
|
2015
2010
|
/* @__NO_SIDE_EFFECTS__ */
|
|
2016
|
-
function
|
|
2011
|
+
function Lr(e, t) {
|
|
2017
2012
|
return new Ft({
|
|
2018
2013
|
check: "string_format",
|
|
2019
2014
|
format: "starts_with",
|
|
2020
|
-
...
|
|
2015
|
+
...O(t),
|
|
2021
2016
|
prefix: e
|
|
2022
2017
|
});
|
|
2023
2018
|
}
|
|
2024
2019
|
/* @__NO_SIDE_EFFECTS__ */
|
|
2025
|
-
function
|
|
2020
|
+
function Rr(e, t) {
|
|
2026
2021
|
return new It({
|
|
2027
2022
|
check: "string_format",
|
|
2028
2023
|
format: "ends_with",
|
|
2029
|
-
...
|
|
2024
|
+
...O(t),
|
|
2030
2025
|
suffix: e
|
|
2031
2026
|
});
|
|
2032
2027
|
}
|
|
@@ -2038,45 +2033,45 @@ function G(e) {
|
|
|
2038
2033
|
});
|
|
2039
2034
|
}
|
|
2040
2035
|
/* @__NO_SIDE_EFFECTS__ */
|
|
2041
|
-
function
|
|
2036
|
+
function zr(e) {
|
|
2042
2037
|
return /* @__PURE__ */ G((t) => t.normalize(e));
|
|
2043
2038
|
}
|
|
2044
2039
|
/* @__NO_SIDE_EFFECTS__ */
|
|
2045
|
-
function
|
|
2040
|
+
function Br() {
|
|
2046
2041
|
return /* @__PURE__ */ G((e) => e.trim());
|
|
2047
2042
|
}
|
|
2048
2043
|
/* @__NO_SIDE_EFFECTS__ */
|
|
2049
|
-
function
|
|
2044
|
+
function Vr() {
|
|
2050
2045
|
return /* @__PURE__ */ G((e) => e.toLowerCase());
|
|
2051
2046
|
}
|
|
2052
2047
|
/* @__NO_SIDE_EFFECTS__ */
|
|
2053
|
-
function
|
|
2048
|
+
function Hr() {
|
|
2054
2049
|
return /* @__PURE__ */ G((e) => e.toUpperCase());
|
|
2055
2050
|
}
|
|
2056
2051
|
/* @__NO_SIDE_EFFECTS__ */
|
|
2057
|
-
function
|
|
2058
|
-
return /* @__PURE__ */ G((e) =>
|
|
2052
|
+
function Ur() {
|
|
2053
|
+
return /* @__PURE__ */ G((e) => he(e));
|
|
2059
2054
|
}
|
|
2060
2055
|
/* @__NO_SIDE_EFFECTS__ */
|
|
2061
|
-
function
|
|
2056
|
+
function Wr(e, t, n) {
|
|
2062
2057
|
return new e({
|
|
2063
2058
|
type: "array",
|
|
2064
2059
|
element: t,
|
|
2065
|
-
...
|
|
2060
|
+
...O(n)
|
|
2066
2061
|
});
|
|
2067
2062
|
}
|
|
2068
2063
|
/* @__NO_SIDE_EFFECTS__ */
|
|
2069
|
-
function
|
|
2064
|
+
function Gr(e, t, n) {
|
|
2070
2065
|
return new e({
|
|
2071
2066
|
type: "custom",
|
|
2072
2067
|
check: "custom",
|
|
2073
2068
|
fn: t,
|
|
2074
|
-
...
|
|
2069
|
+
...O(n)
|
|
2075
2070
|
});
|
|
2076
2071
|
}
|
|
2077
2072
|
/* @__NO_SIDE_EFFECTS__ */
|
|
2078
|
-
function
|
|
2079
|
-
let t = /* @__PURE__ */
|
|
2073
|
+
function Kr(e) {
|
|
2074
|
+
let t = /* @__PURE__ */ qr((n) => (n.addIssue = (e) => {
|
|
2080
2075
|
if (typeof e == "string") n.issues.push(M(e, n.value, t._zod.def));
|
|
2081
2076
|
else {
|
|
2082
2077
|
let r = e;
|
|
@@ -2086,16 +2081,16 @@ function Jr(e) {
|
|
|
2086
2081
|
return t;
|
|
2087
2082
|
}
|
|
2088
2083
|
/* @__NO_SIDE_EFFECTS__ */
|
|
2089
|
-
function
|
|
2090
|
-
let n = new
|
|
2084
|
+
function qr(e, t) {
|
|
2085
|
+
let n = new F({
|
|
2091
2086
|
check: "custom",
|
|
2092
|
-
...
|
|
2087
|
+
...O(t)
|
|
2093
2088
|
});
|
|
2094
2089
|
return n._zod.check = e, n;
|
|
2095
2090
|
}
|
|
2096
2091
|
//#endregion
|
|
2097
2092
|
//#region ../../node_modules/zod/v4/core/to-json-schema.js
|
|
2098
|
-
function
|
|
2093
|
+
function Jr(e) {
|
|
2099
2094
|
let t = e?.target ?? "draft-2020-12";
|
|
2100
2095
|
return t === "draft-4" && (t = "draft-04"), t === "draft-7" && (t = "draft-07"), {
|
|
2101
2096
|
processors: e.processors ?? {},
|
|
@@ -2145,7 +2140,7 @@ function K(e, t, n = {
|
|
|
2145
2140
|
let c = t.metadataRegistry.get(e);
|
|
2146
2141
|
return c && Object.assign(o.schema, c), t.io === "input" && q(e) && (delete o.schema.examples, delete o.schema.default), t.io === "input" && o.schema._prefault && ((r = o.schema).default ?? (r.default = o.schema._prefault)), delete o.schema._prefault, t.seen.get(e).schema;
|
|
2147
2142
|
}
|
|
2148
|
-
function
|
|
2143
|
+
function Yr(e, t) {
|
|
2149
2144
|
let n = e.seen.get(t);
|
|
2150
2145
|
if (!n) throw Error("Unprocessed schema. This is a bug in Zod.");
|
|
2151
2146
|
let r = /* @__PURE__ */ new Map();
|
|
@@ -2215,7 +2210,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
2215
2210
|
}
|
|
2216
2211
|
}
|
|
2217
2212
|
}
|
|
2218
|
-
function
|
|
2213
|
+
function Xr(e, t) {
|
|
2219
2214
|
let n = e.seen.get(t);
|
|
2220
2215
|
if (!n) throw Error("Unprocessed schema. This is a bug in Zod.");
|
|
2221
2216
|
let r = (t) => {
|
|
@@ -2298,58 +2293,58 @@ function q(e, t) {
|
|
|
2298
2293
|
}
|
|
2299
2294
|
return !1;
|
|
2300
2295
|
}
|
|
2301
|
-
var
|
|
2302
|
-
let r =
|
|
2296
|
+
var Zr = (e, t = {}) => (n) => {
|
|
2297
|
+
let r = Jr({
|
|
2303
2298
|
...n,
|
|
2304
2299
|
processors: t
|
|
2305
2300
|
});
|
|
2306
|
-
return K(e, r),
|
|
2301
|
+
return K(e, r), Yr(r, e), Xr(r, e);
|
|
2307
2302
|
}, J = (e, t, n = {}) => (r) => {
|
|
2308
|
-
let { libraryOptions: i, target: a } = r ?? {}, o =
|
|
2303
|
+
let { libraryOptions: i, target: a } = r ?? {}, o = Jr({
|
|
2309
2304
|
...i ?? {},
|
|
2310
2305
|
target: a,
|
|
2311
2306
|
io: t,
|
|
2312
2307
|
processors: n
|
|
2313
2308
|
});
|
|
2314
|
-
return K(e, o),
|
|
2315
|
-
},
|
|
2309
|
+
return K(e, o), Yr(o, e), Xr(o, e);
|
|
2310
|
+
}, Qr = {
|
|
2316
2311
|
guid: "uuid",
|
|
2317
2312
|
url: "uri",
|
|
2318
2313
|
datetime: "date-time",
|
|
2319
2314
|
json_string: "json-string",
|
|
2320
2315
|
regex: ""
|
|
2321
|
-
},
|
|
2316
|
+
}, $r = (e, t, n, r) => {
|
|
2322
2317
|
let i = n;
|
|
2323
2318
|
i.type = "string";
|
|
2324
2319
|
let { minimum: a, maximum: o, format: s, patterns: c, contentEncoding: l } = e._zod.bag;
|
|
2325
|
-
if (typeof a == "number" && (i.minLength = a), typeof o == "number" && (i.maxLength = o), s && (i.format =
|
|
2320
|
+
if (typeof a == "number" && (i.minLength = a), typeof o == "number" && (i.maxLength = o), s && (i.format = Qr[s] ?? s, i.format === "" && delete i.format, s === "time" && delete i.format), l && (i.contentEncoding = l), c && c.size > 0) {
|
|
2326
2321
|
let e = [...c];
|
|
2327
2322
|
e.length === 1 ? i.pattern = e[0].source : e.length > 1 && (i.allOf = [...e.map((e) => ({
|
|
2328
2323
|
...t.target === "draft-07" || t.target === "draft-04" || t.target === "openapi-3.0" ? { type: "string" } : {},
|
|
2329
2324
|
pattern: e.source
|
|
2330
2325
|
}))]);
|
|
2331
2326
|
}
|
|
2332
|
-
},
|
|
2327
|
+
}, ei = (e, t, n, r) => {
|
|
2333
2328
|
let i = n, { minimum: a, maximum: o, format: s, multipleOf: c, exclusiveMaximum: l, exclusiveMinimum: u } = e._zod.bag;
|
|
2334
2329
|
typeof s == "string" && s.includes("int") ? i.type = "integer" : i.type = "number", typeof u == "number" && (t.target === "draft-04" || t.target === "openapi-3.0" ? (i.minimum = u, i.exclusiveMinimum = !0) : i.exclusiveMinimum = u), typeof a == "number" && (i.minimum = a, typeof u == "number" && t.target !== "draft-04" && (u >= a ? delete i.minimum : delete i.exclusiveMinimum)), typeof l == "number" && (t.target === "draft-04" || t.target === "openapi-3.0" ? (i.maximum = l, i.exclusiveMaximum = !0) : i.exclusiveMaximum = l), typeof o == "number" && (i.maximum = o, typeof l == "number" && t.target !== "draft-04" && (l <= o ? delete i.maximum : delete i.exclusiveMaximum)), typeof c == "number" && (i.multipleOf = c);
|
|
2335
|
-
},
|
|
2330
|
+
}, ti = (e, t, n, r) => {
|
|
2336
2331
|
if (t.unrepresentable === "throw") throw Error("Void cannot be represented in JSON Schema");
|
|
2337
|
-
},
|
|
2332
|
+
}, ni = (e, t, n, r) => {
|
|
2338
2333
|
n.not = {};
|
|
2339
|
-
},
|
|
2340
|
-
let i = e._zod.def, a =
|
|
2334
|
+
}, ri = (e, t, n, r) => {
|
|
2335
|
+
let i = e._zod.def, a = ue(i.entries);
|
|
2341
2336
|
a.every((e) => typeof e == "number") && (n.type = "number"), a.every((e) => typeof e == "string") && (n.type = "string"), n.enum = a;
|
|
2342
|
-
},
|
|
2337
|
+
}, ii = (e, t, n, r) => {
|
|
2343
2338
|
if (t.unrepresentable === "throw") throw Error("Custom types cannot be represented in JSON Schema");
|
|
2344
|
-
},
|
|
2339
|
+
}, ai = (e, t, n, r) => {
|
|
2345
2340
|
if (t.unrepresentable === "throw") throw Error("Transforms cannot be represented in JSON Schema");
|
|
2346
|
-
},
|
|
2341
|
+
}, oi = (e, t, n, r) => {
|
|
2347
2342
|
let i = n, a = e._zod.def, { minimum: o, maximum: s } = e._zod.bag;
|
|
2348
2343
|
typeof o == "number" && (i.minItems = o), typeof s == "number" && (i.maxItems = s), i.type = "array", i.items = K(a.element, t, {
|
|
2349
2344
|
...r,
|
|
2350
2345
|
path: [...r.path, "items"]
|
|
2351
2346
|
});
|
|
2352
|
-
},
|
|
2347
|
+
}, si = (e, t, n, r) => {
|
|
2353
2348
|
let i = n, a = e._zod.def;
|
|
2354
2349
|
i.type = "object", i.properties = {};
|
|
2355
2350
|
let o = a.shape;
|
|
@@ -2369,7 +2364,7 @@ var $r = (e, t = {}) => (n) => {
|
|
|
2369
2364
|
...r,
|
|
2370
2365
|
path: [...r.path, "additionalProperties"]
|
|
2371
2366
|
})) : t.io === "output" && (i.additionalProperties = !1);
|
|
2372
|
-
},
|
|
2367
|
+
}, ci = (e, t, n, r) => {
|
|
2373
2368
|
let i = e._zod.def, a = i.inclusive === !1, o = i.options.map((e, n) => K(e, t, {
|
|
2374
2369
|
...r,
|
|
2375
2370
|
path: [
|
|
@@ -2379,7 +2374,7 @@ var $r = (e, t = {}) => (n) => {
|
|
|
2379
2374
|
]
|
|
2380
2375
|
}));
|
|
2381
2376
|
a ? n.oneOf = o : n.anyOf = o;
|
|
2382
|
-
},
|
|
2377
|
+
}, li = (e, t, n, r) => {
|
|
2383
2378
|
let i = e._zod.def, a = K(i.left, t, {
|
|
2384
2379
|
...r,
|
|
2385
2380
|
path: [
|
|
@@ -2396,25 +2391,25 @@ var $r = (e, t = {}) => (n) => {
|
|
|
2396
2391
|
]
|
|
2397
2392
|
}), s = (e) => "allOf" in e && Object.keys(e).length === 1;
|
|
2398
2393
|
n.allOf = [...s(a) ? a.allOf : [a], ...s(o) ? o.allOf : [o]];
|
|
2399
|
-
},
|
|
2394
|
+
}, ui = (e, t, n, r) => {
|
|
2400
2395
|
let i = e._zod.def, a = K(i.innerType, t, r), o = t.seen.get(e);
|
|
2401
2396
|
t.target === "openapi-3.0" ? (o.ref = i.innerType, n.nullable = !0) : n.anyOf = [a, { type: "null" }];
|
|
2402
|
-
},
|
|
2397
|
+
}, di = (e, t, n, r) => {
|
|
2403
2398
|
let i = e._zod.def;
|
|
2404
2399
|
K(i.innerType, t, r);
|
|
2405
2400
|
let a = t.seen.get(e);
|
|
2406
2401
|
a.ref = i.innerType;
|
|
2407
|
-
},
|
|
2402
|
+
}, fi = (e, t, n, r) => {
|
|
2408
2403
|
let i = e._zod.def;
|
|
2409
2404
|
K(i.innerType, t, r);
|
|
2410
2405
|
let a = t.seen.get(e);
|
|
2411
2406
|
a.ref = i.innerType, n.default = JSON.parse(JSON.stringify(i.defaultValue));
|
|
2412
|
-
},
|
|
2407
|
+
}, pi = (e, t, n, r) => {
|
|
2413
2408
|
let i = e._zod.def;
|
|
2414
2409
|
K(i.innerType, t, r);
|
|
2415
2410
|
let a = t.seen.get(e);
|
|
2416
2411
|
a.ref = i.innerType, t.io === "input" && (n._prefault = JSON.parse(JSON.stringify(i.defaultValue)));
|
|
2417
|
-
},
|
|
2412
|
+
}, mi = (e, t, n, r) => {
|
|
2418
2413
|
let i = e._zod.def;
|
|
2419
2414
|
K(i.innerType, t, r);
|
|
2420
2415
|
let a = t.seen.get(e);
|
|
@@ -2426,71 +2421,71 @@ var $r = (e, t = {}) => (n) => {
|
|
|
2426
2421
|
throw Error("Dynamic catch values are not supported in JSON Schema");
|
|
2427
2422
|
}
|
|
2428
2423
|
n.default = o;
|
|
2429
|
-
},
|
|
2424
|
+
}, hi = (e, t, n, r) => {
|
|
2430
2425
|
let i = e._zod.def, a = t.io === "input" ? i.in._zod.def.type === "transform" ? i.out : i.in : i.out;
|
|
2431
2426
|
K(a, t, r);
|
|
2432
2427
|
let o = t.seen.get(e);
|
|
2433
2428
|
o.ref = a;
|
|
2434
|
-
},
|
|
2429
|
+
}, gi = (e, t, n, r) => {
|
|
2435
2430
|
let i = e._zod.def;
|
|
2436
2431
|
K(i.innerType, t, r);
|
|
2437
2432
|
let a = t.seen.get(e);
|
|
2438
2433
|
a.ref = i.innerType, n.readOnly = !0;
|
|
2439
|
-
},
|
|
2434
|
+
}, _i = (e, t, n, r) => {
|
|
2440
2435
|
let i = e._zod.def;
|
|
2441
2436
|
K(i.innerType, t, r);
|
|
2442
2437
|
let a = t.seen.get(e);
|
|
2443
2438
|
a.ref = i.innerType;
|
|
2444
|
-
},
|
|
2439
|
+
}, vi = /* @__PURE__ */ h("ZodISODateTime", (e, t) => {
|
|
2440
|
+
Zt.init(e, t), Z.init(e, t);
|
|
2441
|
+
});
|
|
2442
|
+
function yi(e) {
|
|
2443
|
+
return /* @__PURE__ */ _r(vi, e);
|
|
2444
|
+
}
|
|
2445
|
+
var bi = /* @__PURE__ */ h("ZodISODate", (e, t) => {
|
|
2445
2446
|
Qt.init(e, t), Z.init(e, t);
|
|
2446
2447
|
});
|
|
2447
2448
|
function xi(e) {
|
|
2448
|
-
return /* @__PURE__ */
|
|
2449
|
+
return /* @__PURE__ */ vr(bi, e);
|
|
2449
2450
|
}
|
|
2450
|
-
var Si = /* @__PURE__ */ h("
|
|
2451
|
+
var Si = /* @__PURE__ */ h("ZodISOTime", (e, t) => {
|
|
2451
2452
|
$t.init(e, t), Z.init(e, t);
|
|
2452
2453
|
});
|
|
2453
2454
|
function Ci(e) {
|
|
2454
|
-
return /* @__PURE__ */
|
|
2455
|
+
return /* @__PURE__ */ yr(Si, e);
|
|
2455
2456
|
}
|
|
2456
|
-
var wi = /* @__PURE__ */ h("
|
|
2457
|
+
var wi = /* @__PURE__ */ h("ZodISODuration", (e, t) => {
|
|
2457
2458
|
en.init(e, t), Z.init(e, t);
|
|
2458
2459
|
});
|
|
2459
2460
|
function Ti(e) {
|
|
2460
|
-
return /* @__PURE__ */
|
|
2461
|
-
}
|
|
2462
|
-
var Ei = /* @__PURE__ */ h("ZodISODuration", (e, t) => {
|
|
2463
|
-
tn.init(e, t), Z.init(e, t);
|
|
2464
|
-
});
|
|
2465
|
-
function Di(e) {
|
|
2466
|
-
return /* @__PURE__ */ Sr(Ei, e);
|
|
2461
|
+
return /* @__PURE__ */ br(wi, e);
|
|
2467
2462
|
}
|
|
2468
2463
|
//#endregion
|
|
2469
2464
|
//#region ../../node_modules/zod/v4/classic/errors.js
|
|
2470
|
-
var
|
|
2471
|
-
|
|
2472
|
-
format: { value: (t) =>
|
|
2473
|
-
flatten: { value: (t) =>
|
|
2465
|
+
var Ei = (e, t) => {
|
|
2466
|
+
Me.init(e, t), e.name = "ZodError", Object.defineProperties(e, {
|
|
2467
|
+
format: { value: (t) => Fe(e, t) },
|
|
2468
|
+
flatten: { value: (t) => Pe(e, t) },
|
|
2474
2469
|
addIssue: { value: (t) => {
|
|
2475
|
-
e.issues.push(t), e.message = JSON.stringify(e.issues,
|
|
2470
|
+
e.issues.push(t), e.message = JSON.stringify(e.issues, de, 2);
|
|
2476
2471
|
} },
|
|
2477
2472
|
addIssues: { value: (t) => {
|
|
2478
|
-
e.issues.push(...t), e.message = JSON.stringify(e.issues,
|
|
2473
|
+
e.issues.push(...t), e.message = JSON.stringify(e.issues, de, 2);
|
|
2479
2474
|
} },
|
|
2480
2475
|
isEmpty: { get() {
|
|
2481
2476
|
return e.issues.length === 0;
|
|
2482
2477
|
} }
|
|
2483
2478
|
});
|
|
2484
2479
|
};
|
|
2485
|
-
h("ZodError",
|
|
2486
|
-
var Y = h("ZodError",
|
|
2480
|
+
h("ZodError", Ei);
|
|
2481
|
+
var Y = h("ZodError", Ei, { Parent: Error }), Di = /* @__PURE__ */ Ie(Y), Oi = /* @__PURE__ */ Le(Y), ki = /* @__PURE__ */ N(Y), Ai = /* @__PURE__ */ P(Y), ji = /* @__PURE__ */ Be(Y), Mi = /* @__PURE__ */ Ve(Y), Ni = /* @__PURE__ */ He(Y), Pi = /* @__PURE__ */ Ue(Y), Fi = /* @__PURE__ */ We(Y), Ii = /* @__PURE__ */ Ge(Y), Li = /* @__PURE__ */ Ke(Y), Ri = /* @__PURE__ */ qe(Y), X = /* @__PURE__ */ h("ZodType", (e, t) => (L.init(e, t), Object.assign(e["~standard"], { jsonSchema: {
|
|
2487
2482
|
input: J(e, "input"),
|
|
2488
2483
|
output: J(e, "output")
|
|
2489
|
-
} }), e.toJSONSchema =
|
|
2484
|
+
} }), e.toJSONSchema = Zr(e, {}), e.def = t, e.type = t.type, Object.defineProperty(e, "_def", { value: t }), e.check = (...n) => e.clone(C(t, { checks: [...t.checks ?? [], ...n.map((e) => typeof e == "function" ? { _zod: {
|
|
2490
2485
|
check: e,
|
|
2491
2486
|
def: { check: "custom" },
|
|
2492
2487
|
onattach: []
|
|
2493
|
-
} } : e)] }), { parent: !0 }), e.with = e.check, e.clone = (t, n) =>
|
|
2488
|
+
} } : e)] }), { parent: !0 }), e.with = e.check, e.clone = (t, n) => D(e, t, n), e.brand = () => e, e.register = ((t, n) => (t.add(e, n), e)), e.parse = (t, n) => Di(e, t, n, { callee: e.parse }), e.safeParse = (t, n) => ki(e, t, n), e.parseAsync = async (t, n) => Oi(e, t, n, { callee: e.parseAsync }), e.safeParseAsync = async (t, n) => Ai(e, t, n), e.spa = e.safeParseAsync, e.encode = (t, n) => ji(e, t, n), e.decode = (t, n) => Mi(e, t, n), e.encodeAsync = async (t, n) => Ni(e, t, n), e.decodeAsync = async (t, n) => Pi(e, t, n), e.safeEncode = (t, n) => Fi(e, t, n), e.safeDecode = (t, n) => Ii(e, t, n), e.safeEncodeAsync = async (t, n) => Li(e, t, n), e.safeDecodeAsync = async (t, n) => Ri(e, t, n), e.refine = (t, n) => e.check(Ka(t, n)), e.superRefine = (t) => e.check(qa(t)), e.overwrite = (t) => e.check(/* @__PURE__ */ G(t)), e.optional = () => Oa(e), e.exactOptional = () => Aa(e), e.nullable = () => Ma(e), e.nullish = () => Oa(Ma(e)), e.nonoptional = (t) => Ra(e, t), e.array = () => ga(e), e.or = (t) => ba([e, t]), e.and = (t) => Sa(e, t), e.transform = (t) => Ha(e, Ea(t)), e.default = (t) => Pa(e, t), e.prefault = (t) => Ia(e, t), e.catch = (t) => Ba(e, t), e.pipe = (t) => Ha(e, t), e.readonly = () => Wa(e), e.describe = (t) => {
|
|
2494
2489
|
let n = e.clone();
|
|
2495
2490
|
return U.add(n, { description: t }), n;
|
|
2496
2491
|
}, Object.defineProperty(e, "description", {
|
|
@@ -2502,174 +2497,174 @@ var Y = h("ZodError", Oi, { Parent: Error }), ki = /* @__PURE__ */ N(Y), Ai = /*
|
|
|
2502
2497
|
if (t.length === 0) return U.get(e);
|
|
2503
2498
|
let n = e.clone();
|
|
2504
2499
|
return U.add(n, t[0]), n;
|
|
2505
|
-
}, e.isOptional = () => e.safeParse(void 0).success, e.isNullable = () => e.safeParse(null).success, e.apply = (t) => t(e), e)),
|
|
2506
|
-
|
|
2500
|
+
}, e.isOptional = () => e.safeParse(void 0).success, e.isNullable = () => e.safeParse(null).success, e.apply = (t) => t(e), e)), zi = /* @__PURE__ */ h("_ZodString", (e, t) => {
|
|
2501
|
+
R.init(e, t), X.init(e, t), e._zod.processJSONSchema = (t, n, r) => $r(e, t, n, r);
|
|
2507
2502
|
let n = e._zod.bag;
|
|
2508
|
-
e.format = n.format ?? null, e.minLength = n.minimum ?? null, e.maxLength = n.maximum ?? null, e.regex = (...t) => e.check(/* @__PURE__ */
|
|
2509
|
-
}),
|
|
2510
|
-
|
|
2503
|
+
e.format = n.format ?? null, e.minLength = n.minimum ?? null, e.maxLength = n.maximum ?? null, e.regex = (...t) => e.check(/* @__PURE__ */ Nr(...t)), e.includes = (...t) => e.check(/* @__PURE__ */ Ir(...t)), e.startsWith = (...t) => e.check(/* @__PURE__ */ Lr(...t)), e.endsWith = (...t) => e.check(/* @__PURE__ */ Rr(...t)), e.min = (...t) => e.check(/* @__PURE__ */ W(...t)), e.max = (...t) => e.check(/* @__PURE__ */ jr(...t)), e.length = (...t) => e.check(/* @__PURE__ */ Mr(...t)), e.nonempty = (...t) => e.check(/* @__PURE__ */ W(1, ...t)), e.lowercase = (t) => e.check(/* @__PURE__ */ Pr(t)), e.uppercase = (t) => e.check(/* @__PURE__ */ Fr(t)), e.trim = () => e.check(/* @__PURE__ */ Br()), e.normalize = (...t) => e.check(/* @__PURE__ */ zr(...t)), e.toLowerCase = () => e.check(/* @__PURE__ */ Vr()), e.toUpperCase = () => e.check(/* @__PURE__ */ Hr()), e.slugify = () => e.check(/* @__PURE__ */ Ur());
|
|
2504
|
+
}), Bi = /* @__PURE__ */ h("ZodString", (e, t) => {
|
|
2505
|
+
R.init(e, t), zi.init(e, t), e.email = (t) => e.check(/* @__PURE__ */ Yn(Hi, t)), e.url = (t) => e.check(/* @__PURE__ */ tr(Wi, t)), e.jwt = (t) => e.check(/* @__PURE__ */ gr(aa, t)), e.emoji = (t) => e.check(/* @__PURE__ */ nr(Gi, t)), e.guid = (t) => e.check(/* @__PURE__ */ Xn(Ui, t)), e.uuid = (t) => e.check(/* @__PURE__ */ Zn(Q, t)), e.uuidv4 = (t) => e.check(/* @__PURE__ */ Qn(Q, t)), e.uuidv6 = (t) => e.check(/* @__PURE__ */ $n(Q, t)), e.uuidv7 = (t) => e.check(/* @__PURE__ */ er(Q, t)), e.nanoid = (t) => e.check(/* @__PURE__ */ rr(Ki, t)), e.guid = (t) => e.check(/* @__PURE__ */ Xn(Ui, t)), e.cuid = (t) => e.check(/* @__PURE__ */ ir(qi, t)), e.cuid2 = (t) => e.check(/* @__PURE__ */ ar(Ji, t)), e.ulid = (t) => e.check(/* @__PURE__ */ or(Yi, t)), e.base64 = (t) => e.check(/* @__PURE__ */ pr(na, t)), e.base64url = (t) => e.check(/* @__PURE__ */ mr(ra, t)), e.xid = (t) => e.check(/* @__PURE__ */ sr(Xi, t)), e.ksuid = (t) => e.check(/* @__PURE__ */ cr(Zi, t)), e.ipv4 = (t) => e.check(/* @__PURE__ */ lr(Qi, t)), e.ipv6 = (t) => e.check(/* @__PURE__ */ ur($i, t)), e.cidrv4 = (t) => e.check(/* @__PURE__ */ dr(ea, t)), e.cidrv6 = (t) => e.check(/* @__PURE__ */ fr(ta, t)), e.e164 = (t) => e.check(/* @__PURE__ */ hr(ia, t)), e.datetime = (t) => e.check(yi(t)), e.date = (t) => e.check(xi(t)), e.time = (t) => e.check(Ci(t)), e.duration = (t) => e.check(Ti(t));
|
|
2511
2506
|
});
|
|
2512
|
-
function
|
|
2513
|
-
return /* @__PURE__ */
|
|
2507
|
+
function Vi(e) {
|
|
2508
|
+
return /* @__PURE__ */ Jn(Bi, e);
|
|
2514
2509
|
}
|
|
2515
2510
|
var Z = /* @__PURE__ */ h("ZodStringFormat", (e, t) => {
|
|
2516
|
-
|
|
2517
|
-
}),
|
|
2518
|
-
Ut.init(e, t), Z.init(e, t);
|
|
2519
|
-
}), Gi = /* @__PURE__ */ h("ZodGUID", (e, t) => {
|
|
2520
|
-
Vt.init(e, t), Z.init(e, t);
|
|
2521
|
-
}), Q = /* @__PURE__ */ h("ZodUUID", (e, t) => {
|
|
2511
|
+
z.init(e, t), zi.init(e, t);
|
|
2512
|
+
}), Hi = /* @__PURE__ */ h("ZodEmail", (e, t) => {
|
|
2522
2513
|
Ht.init(e, t), Z.init(e, t);
|
|
2523
|
-
}),
|
|
2514
|
+
}), Ui = /* @__PURE__ */ h("ZodGUID", (e, t) => {
|
|
2515
|
+
Bt.init(e, t), Z.init(e, t);
|
|
2516
|
+
}), Q = /* @__PURE__ */ h("ZodUUID", (e, t) => {
|
|
2517
|
+
Vt.init(e, t), Z.init(e, t);
|
|
2518
|
+
}), Wi = /* @__PURE__ */ h("ZodURL", (e, t) => {
|
|
2519
|
+
Ut.init(e, t), Z.init(e, t);
|
|
2520
|
+
}), Gi = /* @__PURE__ */ h("ZodEmoji", (e, t) => {
|
|
2524
2521
|
Wt.init(e, t), Z.init(e, t);
|
|
2525
|
-
}),
|
|
2522
|
+
}), Ki = /* @__PURE__ */ h("ZodNanoID", (e, t) => {
|
|
2526
2523
|
Gt.init(e, t), Z.init(e, t);
|
|
2527
|
-
}),
|
|
2524
|
+
}), qi = /* @__PURE__ */ h("ZodCUID", (e, t) => {
|
|
2528
2525
|
Kt.init(e, t), Z.init(e, t);
|
|
2529
|
-
}),
|
|
2526
|
+
}), Ji = /* @__PURE__ */ h("ZodCUID2", (e, t) => {
|
|
2530
2527
|
qt.init(e, t), Z.init(e, t);
|
|
2531
|
-
}),
|
|
2528
|
+
}), Yi = /* @__PURE__ */ h("ZodULID", (e, t) => {
|
|
2532
2529
|
Jt.init(e, t), Z.init(e, t);
|
|
2533
|
-
}),
|
|
2530
|
+
}), Xi = /* @__PURE__ */ h("ZodXID", (e, t) => {
|
|
2534
2531
|
Yt.init(e, t), Z.init(e, t);
|
|
2535
|
-
}),
|
|
2532
|
+
}), Zi = /* @__PURE__ */ h("ZodKSUID", (e, t) => {
|
|
2536
2533
|
Xt.init(e, t), Z.init(e, t);
|
|
2537
|
-
}),
|
|
2538
|
-
|
|
2539
|
-
}),
|
|
2534
|
+
}), Qi = /* @__PURE__ */ h("ZodIPv4", (e, t) => {
|
|
2535
|
+
tn.init(e, t), Z.init(e, t);
|
|
2536
|
+
}), $i = /* @__PURE__ */ h("ZodIPv6", (e, t) => {
|
|
2540
2537
|
nn.init(e, t), Z.init(e, t);
|
|
2541
|
-
}),
|
|
2538
|
+
}), ea = /* @__PURE__ */ h("ZodCIDRv4", (e, t) => {
|
|
2542
2539
|
rn.init(e, t), Z.init(e, t);
|
|
2543
|
-
}),
|
|
2540
|
+
}), ta = /* @__PURE__ */ h("ZodCIDRv6", (e, t) => {
|
|
2544
2541
|
an.init(e, t), Z.init(e, t);
|
|
2545
|
-
}),
|
|
2546
|
-
|
|
2547
|
-
}),
|
|
2548
|
-
|
|
2549
|
-
}),
|
|
2542
|
+
}), na = /* @__PURE__ */ h("ZodBase64", (e, t) => {
|
|
2543
|
+
sn.init(e, t), Z.init(e, t);
|
|
2544
|
+
}), ra = /* @__PURE__ */ h("ZodBase64URL", (e, t) => {
|
|
2545
|
+
ln.init(e, t), Z.init(e, t);
|
|
2546
|
+
}), ia = /* @__PURE__ */ h("ZodE164", (e, t) => {
|
|
2550
2547
|
un.init(e, t), Z.init(e, t);
|
|
2551
|
-
}),
|
|
2552
|
-
|
|
2553
|
-
}),
|
|
2554
|
-
pn.init(e, t),
|
|
2555
|
-
}), ca = /* @__PURE__ */ h("ZodNumber", (e, t) => {
|
|
2556
|
-
mn.init(e, t), X.init(e, t), e._zod.processJSONSchema = (t, n, r) => ni(e, t, n, r), e.gt = (t, n) => e.check(/* @__PURE__ */ Ar(t, n)), e.gte = (t, n) => e.check(/* @__PURE__ */ jr(t, n)), e.min = (t, n) => e.check(/* @__PURE__ */ jr(t, n)), e.lt = (t, n) => e.check(/* @__PURE__ */ Or(t, n)), e.lte = (t, n) => e.check(/* @__PURE__ */ kr(t, n)), e.max = (t, n) => e.check(/* @__PURE__ */ kr(t, n)), e.int = (t) => e.check(ua(t)), e.safe = (t) => e.check(ua(t)), e.positive = (t) => e.check(/* @__PURE__ */ Ar(0, t)), e.nonnegative = (t) => e.check(/* @__PURE__ */ jr(0, t)), e.negative = (t) => e.check(/* @__PURE__ */ Or(0, t)), e.nonpositive = (t) => e.check(/* @__PURE__ */ kr(0, t)), e.multipleOf = (t, n) => e.check(/* @__PURE__ */ Mr(t, n)), e.step = (t, n) => e.check(/* @__PURE__ */ Mr(t, n)), e.finite = () => e;
|
|
2548
|
+
}), aa = /* @__PURE__ */ h("ZodJWT", (e, t) => {
|
|
2549
|
+
fn.init(e, t), Z.init(e, t);
|
|
2550
|
+
}), oa = /* @__PURE__ */ h("ZodNumber", (e, t) => {
|
|
2551
|
+
pn.init(e, t), X.init(e, t), e._zod.processJSONSchema = (t, n, r) => ei(e, t, n, r), e.gt = (t, n) => e.check(/* @__PURE__ */ Or(t, n)), e.gte = (t, n) => e.check(/* @__PURE__ */ kr(t, n)), e.min = (t, n) => e.check(/* @__PURE__ */ kr(t, n)), e.lt = (t, n) => e.check(/* @__PURE__ */ Er(t, n)), e.lte = (t, n) => e.check(/* @__PURE__ */ Dr(t, n)), e.max = (t, n) => e.check(/* @__PURE__ */ Dr(t, n)), e.int = (t) => e.check(ca(t)), e.safe = (t) => e.check(ca(t)), e.positive = (t) => e.check(/* @__PURE__ */ Or(0, t)), e.nonnegative = (t) => e.check(/* @__PURE__ */ kr(0, t)), e.negative = (t) => e.check(/* @__PURE__ */ Er(0, t)), e.nonpositive = (t) => e.check(/* @__PURE__ */ Dr(0, t)), e.multipleOf = (t, n) => e.check(/* @__PURE__ */ Ar(t, n)), e.step = (t, n) => e.check(/* @__PURE__ */ Ar(t, n)), e.finite = () => e;
|
|
2557
2552
|
let n = e._zod.bag;
|
|
2558
2553
|
e.minValue = Math.max(n.minimum ?? -Infinity, n.exclusiveMinimum ?? -Infinity) ?? null, e.maxValue = Math.min(n.maximum ?? Infinity, n.exclusiveMaximum ?? Infinity) ?? null, e.isInt = (n.format ?? "").includes("int") || Number.isSafeInteger(n.multipleOf ?? .5), e.isFinite = !0, e.format = n.format ?? null;
|
|
2559
2554
|
});
|
|
2560
2555
|
function $(e) {
|
|
2561
|
-
return /* @__PURE__ */
|
|
2556
|
+
return /* @__PURE__ */ xr(oa, e);
|
|
2562
2557
|
}
|
|
2563
|
-
var
|
|
2564
|
-
|
|
2558
|
+
var sa = /* @__PURE__ */ h("ZodNumberFormat", (e, t) => {
|
|
2559
|
+
mn.init(e, t), oa.init(e, t);
|
|
2565
2560
|
});
|
|
2566
|
-
function
|
|
2567
|
-
return /* @__PURE__ */
|
|
2561
|
+
function ca(e) {
|
|
2562
|
+
return /* @__PURE__ */ Sr(sa, e);
|
|
2568
2563
|
}
|
|
2569
|
-
var
|
|
2570
|
-
|
|
2564
|
+
var la = /* @__PURE__ */ h("ZodUnknown", (e, t) => {
|
|
2565
|
+
hn.init(e, t), X.init(e, t), e._zod.processJSONSchema = (e, t, n) => void 0;
|
|
2571
2566
|
});
|
|
2572
|
-
function
|
|
2573
|
-
return /* @__PURE__ */
|
|
2567
|
+
function ua() {
|
|
2568
|
+
return /* @__PURE__ */ Cr(la);
|
|
2574
2569
|
}
|
|
2575
|
-
var
|
|
2576
|
-
|
|
2570
|
+
var da = /* @__PURE__ */ h("ZodNever", (e, t) => {
|
|
2571
|
+
gn.init(e, t), X.init(e, t), e._zod.processJSONSchema = (t, n, r) => ni(e, t, n, r);
|
|
2577
2572
|
});
|
|
2578
|
-
function
|
|
2579
|
-
return /* @__PURE__ */
|
|
2573
|
+
function fa(e) {
|
|
2574
|
+
return /* @__PURE__ */ wr(da, e);
|
|
2580
2575
|
}
|
|
2581
|
-
var
|
|
2582
|
-
|
|
2576
|
+
var pa = /* @__PURE__ */ h("ZodVoid", (e, t) => {
|
|
2577
|
+
_n.init(e, t), X.init(e, t), e._zod.processJSONSchema = (t, n, r) => ti(e, t, n, r);
|
|
2583
2578
|
});
|
|
2584
|
-
function
|
|
2585
|
-
return /* @__PURE__ */
|
|
2579
|
+
function ma(e) {
|
|
2580
|
+
return /* @__PURE__ */ Tr(pa, e);
|
|
2586
2581
|
}
|
|
2587
|
-
var
|
|
2588
|
-
|
|
2582
|
+
var ha = /* @__PURE__ */ h("ZodArray", (e, t) => {
|
|
2583
|
+
yn.init(e, t), X.init(e, t), e._zod.processJSONSchema = (t, n, r) => oi(e, t, n, r), e.element = t.element, e.min = (t, n) => e.check(/* @__PURE__ */ W(t, n)), e.nonempty = (t) => e.check(/* @__PURE__ */ W(1, t)), e.max = (t, n) => e.check(/* @__PURE__ */ jr(t, n)), e.length = (t, n) => e.check(/* @__PURE__ */ Mr(t, n)), e.unwrap = () => e.element;
|
|
2589
2584
|
});
|
|
2590
|
-
function
|
|
2591
|
-
return /* @__PURE__ */
|
|
2585
|
+
function ga(e, t) {
|
|
2586
|
+
return /* @__PURE__ */ Wr(ha, e, t);
|
|
2592
2587
|
}
|
|
2593
|
-
var
|
|
2594
|
-
|
|
2588
|
+
var _a = /* @__PURE__ */ h("ZodObject", (e, t) => {
|
|
2589
|
+
Cn.init(e, t), X.init(e, t), e._zod.processJSONSchema = (t, n, r) => si(e, t, n, r), x(e, "shape", () => t.shape), e.keyof = () => wa(Object.keys(e._zod.def.shape)), e.catchall = (t) => e.clone({
|
|
2595
2590
|
...e._zod.def,
|
|
2596
2591
|
catchall: t
|
|
2597
2592
|
}), e.passthrough = () => e.clone({
|
|
2598
2593
|
...e._zod.def,
|
|
2599
|
-
catchall:
|
|
2594
|
+
catchall: ua()
|
|
2600
2595
|
}), e.loose = () => e.clone({
|
|
2601
2596
|
...e._zod.def,
|
|
2602
|
-
catchall:
|
|
2597
|
+
catchall: ua()
|
|
2603
2598
|
}), e.strict = () => e.clone({
|
|
2604
2599
|
...e._zod.def,
|
|
2605
|
-
catchall:
|
|
2600
|
+
catchall: fa()
|
|
2606
2601
|
}), e.strip = () => e.clone({
|
|
2607
2602
|
...e._zod.def,
|
|
2608
2603
|
catchall: void 0
|
|
2609
|
-
}), e.extend = (t) =>
|
|
2604
|
+
}), e.extend = (t) => we(e, t), e.safeExtend = (t) => Te(e, t), e.merge = (t) => Ee(e, t), e.pick = (t) => Se(e, t), e.omit = (t) => Ce(e, t), e.partial = (...t) => De(Da, e, t[0]), e.required = (...t) => Oe(La, e, t[0]);
|
|
2610
2605
|
});
|
|
2611
|
-
function
|
|
2612
|
-
return new
|
|
2606
|
+
function va(e, t) {
|
|
2607
|
+
return new _a({
|
|
2613
2608
|
type: "object",
|
|
2614
2609
|
shape: e ?? {},
|
|
2615
|
-
...
|
|
2610
|
+
...O(t)
|
|
2616
2611
|
});
|
|
2617
2612
|
}
|
|
2618
|
-
var
|
|
2619
|
-
|
|
2613
|
+
var ya = /* @__PURE__ */ h("ZodUnion", (e, t) => {
|
|
2614
|
+
Tn.init(e, t), X.init(e, t), e._zod.processJSONSchema = (t, n, r) => ci(e, t, n, r), e.options = t.options;
|
|
2620
2615
|
});
|
|
2621
|
-
function
|
|
2622
|
-
return new
|
|
2616
|
+
function ba(e, t) {
|
|
2617
|
+
return new ya({
|
|
2623
2618
|
type: "union",
|
|
2624
2619
|
options: e,
|
|
2625
|
-
...
|
|
2620
|
+
...O(t)
|
|
2626
2621
|
});
|
|
2627
2622
|
}
|
|
2628
|
-
var
|
|
2629
|
-
|
|
2623
|
+
var xa = /* @__PURE__ */ h("ZodIntersection", (e, t) => {
|
|
2624
|
+
En.init(e, t), X.init(e, t), e._zod.processJSONSchema = (t, n, r) => li(e, t, n, r);
|
|
2630
2625
|
});
|
|
2631
|
-
function
|
|
2632
|
-
return new
|
|
2626
|
+
function Sa(e, t) {
|
|
2627
|
+
return new xa({
|
|
2633
2628
|
type: "intersection",
|
|
2634
2629
|
left: e,
|
|
2635
2630
|
right: t
|
|
2636
2631
|
});
|
|
2637
2632
|
}
|
|
2638
|
-
var
|
|
2639
|
-
|
|
2633
|
+
var Ca = /* @__PURE__ */ h("ZodEnum", (e, t) => {
|
|
2634
|
+
On.init(e, t), X.init(e, t), e._zod.processJSONSchema = (t, n, r) => ri(e, t, n, r), e.enum = t.entries, e.options = Object.values(t.entries);
|
|
2640
2635
|
let n = new Set(Object.keys(t.entries));
|
|
2641
2636
|
e.extract = (e, r) => {
|
|
2642
2637
|
let i = {};
|
|
2643
2638
|
for (let r of e) if (n.has(r)) i[r] = t.entries[r];
|
|
2644
2639
|
else throw Error(`Key ${r} not found in enum`);
|
|
2645
|
-
return new
|
|
2640
|
+
return new Ca({
|
|
2646
2641
|
...t,
|
|
2647
2642
|
checks: [],
|
|
2648
|
-
...
|
|
2643
|
+
...O(r),
|
|
2649
2644
|
entries: i
|
|
2650
2645
|
});
|
|
2651
2646
|
}, e.exclude = (e, r) => {
|
|
2652
2647
|
let i = { ...t.entries };
|
|
2653
2648
|
for (let t of e) if (n.has(t)) delete i[t];
|
|
2654
2649
|
else throw Error(`Key ${t} not found in enum`);
|
|
2655
|
-
return new
|
|
2650
|
+
return new Ca({
|
|
2656
2651
|
...t,
|
|
2657
2652
|
checks: [],
|
|
2658
|
-
...
|
|
2653
|
+
...O(r),
|
|
2659
2654
|
entries: i
|
|
2660
2655
|
});
|
|
2661
2656
|
};
|
|
2662
2657
|
});
|
|
2663
|
-
function
|
|
2664
|
-
return new
|
|
2658
|
+
function wa(e, t) {
|
|
2659
|
+
return new Ca({
|
|
2665
2660
|
type: "enum",
|
|
2666
2661
|
entries: Array.isArray(e) ? Object.fromEntries(e.map((e) => [e, e])) : e,
|
|
2667
|
-
...
|
|
2662
|
+
...O(t)
|
|
2668
2663
|
});
|
|
2669
2664
|
}
|
|
2670
|
-
var
|
|
2671
|
-
|
|
2672
|
-
if (r.direction === "backward") throw new
|
|
2665
|
+
var Ta = /* @__PURE__ */ h("ZodTransform", (e, t) => {
|
|
2666
|
+
kn.init(e, t), X.init(e, t), e._zod.processJSONSchema = (t, n, r) => ai(e, t, n, r), e._zod.parse = (n, r) => {
|
|
2667
|
+
if (r.direction === "backward") throw new ce(e.constructor.name);
|
|
2673
2668
|
n.addIssue = (r) => {
|
|
2674
2669
|
if (typeof r == "string") n.issues.push(M(r, n.value, t));
|
|
2675
2670
|
else {
|
|
@@ -2681,122 +2676,122 @@ var Da = /* @__PURE__ */ h("ZodTransform", (e, t) => {
|
|
|
2681
2676
|
return i instanceof Promise ? i.then((e) => (n.value = e, n)) : (n.value = i, n);
|
|
2682
2677
|
};
|
|
2683
2678
|
});
|
|
2684
|
-
function
|
|
2685
|
-
return new
|
|
2679
|
+
function Ea(e) {
|
|
2680
|
+
return new Ta({
|
|
2686
2681
|
type: "transform",
|
|
2687
2682
|
transform: e
|
|
2688
2683
|
});
|
|
2689
2684
|
}
|
|
2690
|
-
var
|
|
2691
|
-
|
|
2685
|
+
var Da = /* @__PURE__ */ h("ZodOptional", (e, t) => {
|
|
2686
|
+
jn.init(e, t), X.init(e, t), e._zod.processJSONSchema = (t, n, r) => _i(e, t, n, r), e.unwrap = () => e._zod.def.innerType;
|
|
2692
2687
|
});
|
|
2693
|
-
function
|
|
2694
|
-
return new
|
|
2688
|
+
function Oa(e) {
|
|
2689
|
+
return new Da({
|
|
2695
2690
|
type: "optional",
|
|
2696
2691
|
innerType: e
|
|
2697
2692
|
});
|
|
2698
2693
|
}
|
|
2699
|
-
var
|
|
2700
|
-
|
|
2694
|
+
var ka = /* @__PURE__ */ h("ZodExactOptional", (e, t) => {
|
|
2695
|
+
Mn.init(e, t), X.init(e, t), e._zod.processJSONSchema = (t, n, r) => _i(e, t, n, r), e.unwrap = () => e._zod.def.innerType;
|
|
2701
2696
|
});
|
|
2702
|
-
function
|
|
2703
|
-
return new
|
|
2697
|
+
function Aa(e) {
|
|
2698
|
+
return new ka({
|
|
2704
2699
|
type: "optional",
|
|
2705
2700
|
innerType: e
|
|
2706
2701
|
});
|
|
2707
2702
|
}
|
|
2708
|
-
var
|
|
2709
|
-
|
|
2703
|
+
var ja = /* @__PURE__ */ h("ZodNullable", (e, t) => {
|
|
2704
|
+
Nn.init(e, t), X.init(e, t), e._zod.processJSONSchema = (t, n, r) => ui(e, t, n, r), e.unwrap = () => e._zod.def.innerType;
|
|
2710
2705
|
});
|
|
2711
|
-
function
|
|
2712
|
-
return new
|
|
2706
|
+
function Ma(e) {
|
|
2707
|
+
return new ja({
|
|
2713
2708
|
type: "nullable",
|
|
2714
2709
|
innerType: e
|
|
2715
2710
|
});
|
|
2716
2711
|
}
|
|
2717
|
-
var
|
|
2718
|
-
|
|
2712
|
+
var Na = /* @__PURE__ */ h("ZodDefault", (e, t) => {
|
|
2713
|
+
Pn.init(e, t), X.init(e, t), e._zod.processJSONSchema = (t, n, r) => fi(e, t, n, r), e.unwrap = () => e._zod.def.innerType, e.removeDefault = e.unwrap;
|
|
2719
2714
|
});
|
|
2720
|
-
function
|
|
2721
|
-
return new
|
|
2715
|
+
function Pa(e, t) {
|
|
2716
|
+
return new Na({
|
|
2722
2717
|
type: "default",
|
|
2723
2718
|
innerType: e,
|
|
2724
2719
|
get defaultValue() {
|
|
2725
|
-
return typeof t == "function" ? t() :
|
|
2720
|
+
return typeof t == "function" ? t() : ve(t);
|
|
2726
2721
|
}
|
|
2727
2722
|
});
|
|
2728
2723
|
}
|
|
2729
|
-
var
|
|
2730
|
-
|
|
2724
|
+
var Fa = /* @__PURE__ */ h("ZodPrefault", (e, t) => {
|
|
2725
|
+
In.init(e, t), X.init(e, t), e._zod.processJSONSchema = (t, n, r) => pi(e, t, n, r), e.unwrap = () => e._zod.def.innerType;
|
|
2731
2726
|
});
|
|
2732
|
-
function
|
|
2733
|
-
return new
|
|
2727
|
+
function Ia(e, t) {
|
|
2728
|
+
return new Fa({
|
|
2734
2729
|
type: "prefault",
|
|
2735
2730
|
innerType: e,
|
|
2736
2731
|
get defaultValue() {
|
|
2737
|
-
return typeof t == "function" ? t() :
|
|
2732
|
+
return typeof t == "function" ? t() : ve(t);
|
|
2738
2733
|
}
|
|
2739
2734
|
});
|
|
2740
2735
|
}
|
|
2741
|
-
var
|
|
2742
|
-
|
|
2736
|
+
var La = /* @__PURE__ */ h("ZodNonOptional", (e, t) => {
|
|
2737
|
+
Ln.init(e, t), X.init(e, t), e._zod.processJSONSchema = (t, n, r) => di(e, t, n, r), e.unwrap = () => e._zod.def.innerType;
|
|
2743
2738
|
});
|
|
2744
|
-
function
|
|
2745
|
-
return new
|
|
2739
|
+
function Ra(e, t) {
|
|
2740
|
+
return new La({
|
|
2746
2741
|
type: "nonoptional",
|
|
2747
2742
|
innerType: e,
|
|
2748
|
-
...
|
|
2743
|
+
...O(t)
|
|
2749
2744
|
});
|
|
2750
2745
|
}
|
|
2751
|
-
var
|
|
2752
|
-
|
|
2746
|
+
var za = /* @__PURE__ */ h("ZodCatch", (e, t) => {
|
|
2747
|
+
zn.init(e, t), X.init(e, t), e._zod.processJSONSchema = (t, n, r) => mi(e, t, n, r), e.unwrap = () => e._zod.def.innerType, e.removeCatch = e.unwrap;
|
|
2753
2748
|
});
|
|
2754
|
-
function
|
|
2755
|
-
return new
|
|
2749
|
+
function Ba(e, t) {
|
|
2750
|
+
return new za({
|
|
2756
2751
|
type: "catch",
|
|
2757
2752
|
innerType: e,
|
|
2758
2753
|
catchValue: typeof t == "function" ? t : () => t
|
|
2759
2754
|
});
|
|
2760
2755
|
}
|
|
2761
|
-
var
|
|
2762
|
-
|
|
2756
|
+
var Va = /* @__PURE__ */ h("ZodPipe", (e, t) => {
|
|
2757
|
+
Bn.init(e, t), X.init(e, t), e._zod.processJSONSchema = (t, n, r) => hi(e, t, n, r), e.in = t.in, e.out = t.out;
|
|
2763
2758
|
});
|
|
2764
|
-
function
|
|
2765
|
-
return new
|
|
2759
|
+
function Ha(e, t) {
|
|
2760
|
+
return new Va({
|
|
2766
2761
|
type: "pipe",
|
|
2767
2762
|
in: e,
|
|
2768
2763
|
out: t
|
|
2769
2764
|
});
|
|
2770
2765
|
}
|
|
2771
|
-
var
|
|
2772
|
-
|
|
2766
|
+
var Ua = /* @__PURE__ */ h("ZodReadonly", (e, t) => {
|
|
2767
|
+
Vn.init(e, t), X.init(e, t), e._zod.processJSONSchema = (t, n, r) => gi(e, t, n, r), e.unwrap = () => e._zod.def.innerType;
|
|
2773
2768
|
});
|
|
2774
|
-
function
|
|
2775
|
-
return new
|
|
2769
|
+
function Wa(e) {
|
|
2770
|
+
return new Ua({
|
|
2776
2771
|
type: "readonly",
|
|
2777
2772
|
innerType: e
|
|
2778
2773
|
});
|
|
2779
2774
|
}
|
|
2780
|
-
var
|
|
2781
|
-
|
|
2775
|
+
var Ga = /* @__PURE__ */ h("ZodCustom", (e, t) => {
|
|
2776
|
+
Un.init(e, t), X.init(e, t), e._zod.processJSONSchema = (t, n, r) => ii(e, t, n, r);
|
|
2782
2777
|
});
|
|
2783
|
-
function
|
|
2784
|
-
return /* @__PURE__ */
|
|
2778
|
+
function Ka(e, t = {}) {
|
|
2779
|
+
return /* @__PURE__ */ Gr(Ga, e, t);
|
|
2785
2780
|
}
|
|
2786
|
-
function
|
|
2787
|
-
return /* @__PURE__ */
|
|
2781
|
+
function qa(e) {
|
|
2782
|
+
return /* @__PURE__ */ Kr(e);
|
|
2788
2783
|
}
|
|
2789
2784
|
//#endregion
|
|
2790
2785
|
//#region src/paging/Page.ts
|
|
2791
|
-
var
|
|
2786
|
+
var Ja = (e) => va({
|
|
2792
2787
|
pages: $(),
|
|
2793
2788
|
nextPage: $().optional(),
|
|
2794
2789
|
totalElements: $(),
|
|
2795
2790
|
currentPage: $(),
|
|
2796
2791
|
pageSize: $(),
|
|
2797
|
-
elements:
|
|
2792
|
+
elements: ga(e)
|
|
2798
2793
|
});
|
|
2799
|
-
function
|
|
2794
|
+
function Ya() {
|
|
2800
2795
|
return {
|
|
2801
2796
|
pages: 0,
|
|
2802
2797
|
nextPage: void 0,
|
|
@@ -2808,22 +2803,22 @@ function Za() {
|
|
|
2808
2803
|
}
|
|
2809
2804
|
//#endregion
|
|
2810
2805
|
//#region src/paging/PageQuery.ts
|
|
2811
|
-
var
|
|
2812
|
-
page:
|
|
2813
|
-
pageSize:
|
|
2814
|
-
}),
|
|
2806
|
+
var Xa = ba([$(), Vi()]).optional().transform((e) => e === void 0 || e === "" ? void 0 : Number(e)).refine((e) => e === void 0 || !Number.isNaN(e), { message: "Must be a valid number" }), Za = va({
|
|
2807
|
+
page: Xa,
|
|
2808
|
+
pageSize: Xa
|
|
2809
|
+
}), Qa = class extends r {
|
|
2815
2810
|
constructor(e) {
|
|
2816
2811
|
super(), this.error = e;
|
|
2817
2812
|
}
|
|
2818
|
-
},
|
|
2813
|
+
}, $a = class extends r {
|
|
2819
2814
|
constructor(e) {
|
|
2820
2815
|
super(), this.error = e;
|
|
2821
2816
|
}
|
|
2822
|
-
},
|
|
2817
|
+
}, eo = class extends r {
|
|
2823
2818
|
constructor() {
|
|
2824
2819
|
super();
|
|
2825
2820
|
}
|
|
2826
|
-
},
|
|
2821
|
+
}, to = class {
|
|
2827
2822
|
constructor(e) {
|
|
2828
2823
|
this.baseUrl = e;
|
|
2829
2824
|
}
|
|
@@ -2833,12 +2828,12 @@ var Qa = Sa([$(), Ui()]).optional().transform((e) => e === void 0 || e === "" ?
|
|
|
2833
2828
|
...a,
|
|
2834
2829
|
headers: o
|
|
2835
2830
|
});
|
|
2836
|
-
if (s.status === 409) return n(new
|
|
2831
|
+
if (s.status === 409) return n(new Qa({
|
|
2837
2832
|
status: s.status,
|
|
2838
2833
|
statusText: s.statusText,
|
|
2839
2834
|
body: await s.json().catch(() => s.text())
|
|
2840
2835
|
}));
|
|
2841
|
-
if (s.status === 404) return n(new
|
|
2836
|
+
if (s.status === 404) return n(new eo());
|
|
2842
2837
|
if (!s.ok) return n(new i({
|
|
2843
2838
|
error: await s.json().catch(() => ({ message: s.statusText })),
|
|
2844
2839
|
metadata: {
|
|
@@ -2849,7 +2844,7 @@ var Qa = Sa([$(), Ui()]).optional().transform((e) => e === void 0 || e === "" ?
|
|
|
2849
2844
|
let c = (await s.text()).trim(), l = s.status === 204 ? void 0 : c ? JSON.parse(c) : void 0, u = r.safeParse(l);
|
|
2850
2845
|
return u.success ? t(u.data) : n(new i(/* @__PURE__ */ Error("Invalid response body"), l));
|
|
2851
2846
|
} catch (e) {
|
|
2852
|
-
return n(new
|
|
2847
|
+
return n(new $a(e));
|
|
2853
2848
|
}
|
|
2854
2849
|
}
|
|
2855
2850
|
async fetchBlob(e, r, i = {}) {
|
|
@@ -2858,22 +2853,22 @@ var Qa = Sa([$(), Ui()]).optional().transform((e) => e === void 0 || e === "" ?
|
|
|
2858
2853
|
...i,
|
|
2859
2854
|
headers: a
|
|
2860
2855
|
});
|
|
2861
|
-
return o.status === 404 ? n(new
|
|
2856
|
+
return o.status === 404 ? n(new eo()) : o.ok ? t(await o.blob()) : n(new r(await o.json().catch(() => ({ message: o.statusText })), {
|
|
2862
2857
|
status: o.status,
|
|
2863
2858
|
statusText: o.statusText
|
|
2864
2859
|
}));
|
|
2865
2860
|
} catch (e) {
|
|
2866
|
-
return n(new
|
|
2861
|
+
return n(new $a(e));
|
|
2867
2862
|
}
|
|
2868
2863
|
}
|
|
2869
2864
|
async mergeHeaders(e) {
|
|
2870
2865
|
let t = new Headers([...await this.getHeaders()]);
|
|
2871
2866
|
return new Headers(e).forEach((e, n) => t.set(n, e)), t;
|
|
2872
2867
|
}
|
|
2873
|
-
},
|
|
2874
|
-
function
|
|
2868
|
+
}, no = ma(), ro = /^(?!-)[A-Za-z0-9-]+([-.]{1}[a-z0-9]+)*\.[A-Za-z]{2,63}$/i;
|
|
2869
|
+
function io(e) {
|
|
2875
2870
|
let t = e?.message ?? "Please enter a valid domain";
|
|
2876
|
-
return
|
|
2871
|
+
return Vi().min(3, { message: t }).max(253).refine((e) => ro.test(e), { message: t });
|
|
2877
2872
|
}
|
|
2878
2873
|
//#endregion
|
|
2879
|
-
export {
|
|
2874
|
+
export { Ya as EmptyPage, no as EmptyResponse, n as Fail, r as Failure, se as Guid, to as HttpSafeClient, Qa as NetworkConflictFailure, $a as NetworkFailure, eo as NotFoundFailure, t as Ok, Za as PageQuery, io as SafeDomain, d as convertDateInfoToDateRange, Ja as createPageSchema, c as formatDate, u as formatDateTime, l as formatTime, a as isFailure, e as mock, i as notFailure, o as parseConfig, s as sleep };
|