@jsfsi-core/ts-crossplatform 1.1.33 → 1.1.35

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.mjs CHANGED
@@ -1,36 +1,36 @@
1
- const as = (e = {}) => e, fs = (e) => [e, void 0], ls = (e) => [
1
+ const bi = (e = {}) => e, _e = (e) => [e, void 0], T = (e) => [
2
2
  void 0,
3
3
  e
4
4
  ];
5
- class ds {
5
+ class ae {
6
6
  name;
7
7
  constructor() {
8
8
  this.name = this.constructor.name;
9
9
  }
10
10
  }
11
- const ps = (
11
+ const yi = (
12
12
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
13
13
  ((e) => (t) => !(t instanceof e))
14
- ), hs = (
14
+ ), zi = (
15
15
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
16
16
  ((e) => (t) => t instanceof e)
17
- ), ms = (e, t = process.env) => {
17
+ ), ki = (e, t = process.env) => {
18
18
  const n = e.safeParse(t);
19
19
  if (!n.success)
20
20
  throw new Error(`Invalid environment variables: ${JSON.stringify(n.error.issues)}`);
21
21
  return n.data;
22
22
  };
23
- function gs(e) {
23
+ function $i(e) {
24
24
  return new Promise((t) => setTimeout(t, e));
25
25
  }
26
- function wt(e, t) {
26
+ function Ot(e, t) {
27
27
  return new Date(e).toLocaleDateString(t, {
28
28
  year: "numeric",
29
29
  month: "2-digit",
30
30
  day: "2-digit"
31
31
  });
32
32
  }
33
- function kt(e, t) {
33
+ function It(e, t) {
34
34
  return new Date(e).toLocaleTimeString(t, {
35
35
  hour12: !1,
36
36
  hour: "2-digit",
@@ -38,10 +38,10 @@ function kt(e, t) {
38
38
  second: "2-digit"
39
39
  });
40
40
  }
41
- function _s(e, t) {
42
- return `${wt(e, t)} ${kt(e, t)}`;
41
+ function Zi(e, t) {
42
+ return `${Ot(e, t)} ${It(e, t)}`;
43
43
  }
44
- function vs({
44
+ function Si({
45
45
  allDay: e,
46
46
  startDate: t,
47
47
  startTime: n,
@@ -54,66 +54,66 @@ function vs({
54
54
  if (e)
55
55
  return o;
56
56
  if (n) {
57
- const s = new Date(t);
58
- s.setHours(
57
+ const i = new Date(t);
58
+ i.setHours(
59
59
  n.getHours(),
60
60
  n.getMinutes(),
61
61
  n.getSeconds(),
62
62
  n.getMilliseconds()
63
- ), o.startDate = s;
63
+ ), o.startDate = i;
64
64
  }
65
65
  if (r) {
66
- const s = new Date(t);
67
- s.setHours(
66
+ const i = new Date(t);
67
+ i.setHours(
68
68
  r.getHours(),
69
69
  r.getMinutes(),
70
70
  r.getSeconds(),
71
71
  r.getMilliseconds()
72
- ), o.endDate = s;
72
+ ), o.endDate = i;
73
73
  }
74
74
  return o;
75
75
  }
76
- const $t = "00000000-0000-0000-0000-000000000000", Zt = /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/i;
77
- function Ue(e) {
78
- return typeof e == "string" && Zt.test(e);
76
+ const Et = "00000000-0000-0000-0000-000000000000", Pt = /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/i;
77
+ function Ve(e) {
78
+ return typeof e == "string" && Pt.test(e);
79
79
  }
80
- function Ot(e) {
81
- if (!Ue(e))
80
+ function Tt(e) {
81
+ if (!Ve(e))
82
82
  throw TypeError("Invalid UUID");
83
83
  let t;
84
84
  return Uint8Array.of((t = parseInt(e.slice(0, 8), 16)) >>> 24, t >>> 16 & 255, t >>> 8 & 255, t & 255, (t = parseInt(e.slice(9, 13), 16)) >>> 8, t & 255, (t = parseInt(e.slice(14, 18), 16)) >>> 8, t & 255, (t = parseInt(e.slice(19, 23), 16)) >>> 8, t & 255, (t = parseInt(e.slice(24, 36), 16)) / 1099511627776 & 255, t / 4294967296 & 255, t >>> 24 & 255, t >>> 16 & 255, t >>> 8 & 255, t & 255);
85
85
  }
86
- const w = [];
86
+ const z = [];
87
87
  for (let e = 0; e < 256; ++e)
88
- w.push((e + 256).toString(16).slice(1));
89
- function St(e, t = 0) {
90
- return (w[e[t + 0]] + w[e[t + 1]] + w[e[t + 2]] + w[e[t + 3]] + "-" + w[e[t + 4]] + w[e[t + 5]] + "-" + w[e[t + 6]] + w[e[t + 7]] + "-" + w[e[t + 8]] + w[e[t + 9]] + "-" + w[e[t + 10]] + w[e[t + 11]] + w[e[t + 12]] + w[e[t + 13]] + w[e[t + 14]] + w[e[t + 15]]).toLowerCase();
91
- }
92
- let ne;
93
- const It = new Uint8Array(16);
94
- function Et() {
95
- if (!ne) {
88
+ z.push((e + 256).toString(16).slice(1));
89
+ function Nt(e, t = 0) {
90
+ return (z[e[t + 0]] + z[e[t + 1]] + z[e[t + 2]] + z[e[t + 3]] + "-" + z[e[t + 4]] + z[e[t + 5]] + "-" + z[e[t + 6]] + z[e[t + 7]] + "-" + z[e[t + 8]] + z[e[t + 9]] + "-" + z[e[t + 10]] + z[e[t + 11]] + z[e[t + 12]] + z[e[t + 13]] + z[e[t + 14]] + z[e[t + 15]]).toLowerCase();
91
+ }
92
+ let re;
93
+ const jt = new Uint8Array(16);
94
+ function At() {
95
+ if (!re) {
96
96
  if (typeof crypto > "u" || !crypto.getRandomValues)
97
97
  throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
98
- ne = crypto.getRandomValues.bind(crypto);
98
+ re = crypto.getRandomValues.bind(crypto);
99
99
  }
100
- return ne(It);
100
+ return re(jt);
101
101
  }
102
- const Pt = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto), me = { randomUUID: Pt };
103
- function Tt(e, t, n) {
102
+ const xt = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto), ve = { randomUUID: xt };
103
+ function Dt(e, t, n) {
104
104
  e = e || {};
105
- const r = e.random ?? e.rng?.() ?? Et();
105
+ const r = e.random ?? e.rng?.() ?? At();
106
106
  if (r.length < 16)
107
107
  throw new Error("Random bytes length must be >= 16");
108
- return r[6] = r[6] & 15 | 64, r[8] = r[8] & 63 | 128, St(r);
108
+ return r[6] = r[6] & 15 | 64, r[8] = r[8] & 63 | 128, Nt(r);
109
109
  }
110
- function Nt(e, t, n) {
111
- return me.randomUUID && !e ? me.randomUUID() : Tt(e);
110
+ function Rt(e, t, n) {
111
+ return ve.randomUUID && !e ? ve.randomUUID() : Dt(e);
112
112
  }
113
- class F {
113
+ class J {
114
114
  uuid;
115
115
  constructor(t) {
116
- Ot(t), this.uuid = t;
116
+ Tt(t), this.uuid = t;
117
117
  }
118
118
  toString() {
119
119
  return this.uuid;
@@ -122,16 +122,16 @@ class F {
122
122
  return this.uuid === t.toString();
123
123
  }
124
124
  static new() {
125
- return new F(Nt());
125
+ return new J(Rt());
126
126
  }
127
127
  static empty() {
128
- return new F($t);
128
+ return new J(Et);
129
129
  }
130
130
  static isValid(t) {
131
- return !!(t && Ue(t));
131
+ return !!(t && Ve(t));
132
132
  }
133
133
  static parse(t) {
134
- return t && F.isValid(t) ? new F(t) : void 0;
134
+ return t && J.isValid(t) ? new J(t) : void 0;
135
135
  }
136
136
  }
137
137
  function u(e, t, n) {
@@ -139,57 +139,57 @@ function u(e, t, n) {
139
139
  if (c._zod || Object.defineProperty(c, "_zod", {
140
140
  value: {
141
141
  def: a,
142
- constr: i,
142
+ constr: s,
143
143
  traits: /* @__PURE__ */ new Set()
144
144
  },
145
145
  enumerable: !1
146
146
  }), c._zod.traits.has(e))
147
147
  return;
148
148
  c._zod.traits.add(e), t(c, a);
149
- const f = i.prototype, l = Object.keys(f);
149
+ const f = s.prototype, l = Object.keys(f);
150
150
  for (let m = 0; m < l.length; m++) {
151
151
  const p = l[m];
152
152
  p in c || (c[p] = f[p].bind(c));
153
153
  }
154
154
  }
155
155
  const o = n?.Parent ?? Object;
156
- class s extends o {
156
+ class i extends o {
157
157
  }
158
- Object.defineProperty(s, "name", { value: e });
159
- function i(c) {
158
+ Object.defineProperty(i, "name", { value: e });
159
+ function s(c) {
160
160
  var a;
161
- const f = n?.Parent ? new s() : this;
161
+ const f = n?.Parent ? new i() : this;
162
162
  r(f, c), (a = f._zod).deferred ?? (a.deferred = []);
163
163
  for (const l of f._zod.deferred)
164
164
  l();
165
165
  return f;
166
166
  }
167
- return Object.defineProperty(i, "init", { value: r }), Object.defineProperty(i, Symbol.hasInstance, {
167
+ return Object.defineProperty(s, "init", { value: r }), Object.defineProperty(s, Symbol.hasInstance, {
168
168
  value: (c) => n?.Parent && c instanceof n.Parent ? !0 : c?._zod?.traits?.has(e)
169
- }), Object.defineProperty(i, "name", { value: e }), i;
169
+ }), Object.defineProperty(s, "name", { value: e }), s;
170
170
  }
171
- class x extends Error {
171
+ class U extends Error {
172
172
  constructor() {
173
173
  super("Encountered Promise during synchronous parse. Use .parseAsync() instead.");
174
174
  }
175
175
  }
176
- class Fe extends Error {
176
+ class We extends Error {
177
177
  constructor(t) {
178
178
  super(`Encountered unidirectional transform during encode: ${t}`), this.name = "ZodEncodeError";
179
179
  }
180
180
  }
181
- const Je = {};
182
- function j(e) {
183
- return Je;
181
+ const Be = {};
182
+ function A(e) {
183
+ return Be;
184
184
  }
185
- function Me(e) {
185
+ function He(e) {
186
186
  const t = Object.values(e).filter((r) => typeof r == "number");
187
187
  return Object.entries(e).filter(([r, o]) => t.indexOf(+r) === -1).map(([r, o]) => o);
188
188
  }
189
189
  function ie(e, t) {
190
190
  return typeof t == "bigint" ? t.toString() : t;
191
191
  }
192
- function ue(e) {
192
+ function fe(e) {
193
193
  return {
194
194
  get value() {
195
195
  {
@@ -199,30 +199,30 @@ function ue(e) {
199
199
  }
200
200
  };
201
201
  }
202
- function ae(e) {
202
+ function le(e) {
203
203
  return e == null;
204
204
  }
205
- function fe(e) {
205
+ function de(e) {
206
206
  const t = e.startsWith("^") ? 1 : 0, n = e.endsWith("$") ? e.length - 1 : e.length;
207
207
  return e.slice(t, n);
208
208
  }
209
- function jt(e, t) {
209
+ function Ct(e, t) {
210
210
  const n = (e.toString().split(".")[1] || "").length, r = t.toString();
211
211
  let o = (r.split(".")[1] || "").length;
212
212
  if (o === 0 && /\d?e-\d?/.test(r)) {
213
213
  const a = r.match(/\d?e-(\d?)/);
214
214
  a?.[1] && (o = Number.parseInt(a[1]));
215
215
  }
216
- const s = n > o ? n : o, i = Number.parseInt(e.toFixed(s).replace(".", "")), c = Number.parseInt(t.toFixed(s).replace(".", ""));
217
- return i % c / 10 ** s;
216
+ const i = n > o ? n : o, s = Number.parseInt(e.toFixed(i).replace(".", "")), c = Number.parseInt(t.toFixed(i).replace(".", ""));
217
+ return s % c / 10 ** i;
218
218
  }
219
- const ge = /* @__PURE__ */ Symbol("evaluating");
219
+ const we = /* @__PURE__ */ Symbol("evaluating");
220
220
  function g(e, t, n) {
221
221
  let r;
222
222
  Object.defineProperty(e, t, {
223
223
  get() {
224
- if (r !== ge)
225
- return r === void 0 && (r = ge, r = n()), r;
224
+ if (r !== we)
225
+ return r === void 0 && (r = we, r = n()), r;
226
226
  },
227
227
  set(o) {
228
228
  Object.defineProperty(e, t, {
@@ -241,7 +241,7 @@ function D(e, t, n) {
241
241
  configurable: !0
242
242
  });
243
243
  }
244
- function T(...e) {
244
+ function N(...e) {
245
245
  const t = {};
246
246
  for (const n of e) {
247
247
  const r = Object.getOwnPropertyDescriptors(n);
@@ -249,18 +249,18 @@ function T(...e) {
249
249
  }
250
250
  return Object.defineProperties({}, t);
251
251
  }
252
- function _e(e) {
252
+ function be(e) {
253
253
  return JSON.stringify(e);
254
254
  }
255
- function At(e) {
255
+ function Ut(e) {
256
256
  return e.toLowerCase().trim().replace(/[^\w\s-]/g, "").replace(/[\s_-]+/g, "-").replace(/^-+|-+$/g, "");
257
257
  }
258
- const Le = "captureStackTrace" in Error ? Error.captureStackTrace : (...e) => {
258
+ const Ke = "captureStackTrace" in Error ? Error.captureStackTrace : (...e) => {
259
259
  };
260
260
  function G(e) {
261
261
  return typeof e == "object" && e !== null && !Array.isArray(e);
262
262
  }
263
- const Dt = ue(() => {
263
+ const Ft = fe(() => {
264
264
  if (typeof navigator < "u" && navigator?.userAgent?.includes("Cloudflare"))
265
265
  return !1;
266
266
  try {
@@ -270,7 +270,7 @@ const Dt = ue(() => {
270
270
  return !1;
271
271
  }
272
272
  });
273
- function M(e) {
273
+ function L(e) {
274
274
  if (G(e) === !1)
275
275
  return !1;
276
276
  const t = e.constructor;
@@ -279,14 +279,14 @@ function M(e) {
279
279
  const n = t.prototype;
280
280
  return !(G(n) === !1 || Object.prototype.hasOwnProperty.call(n, "isPrototypeOf") === !1);
281
281
  }
282
- function Ve(e) {
283
- return M(e) ? { ...e } : Array.isArray(e) ? [...e] : e;
282
+ function Ge(e) {
283
+ return L(e) ? { ...e } : Array.isArray(e) ? [...e] : e;
284
284
  }
285
- const Rt = /* @__PURE__ */ new Set(["string", "number", "symbol"]);
286
- function q(e) {
285
+ const Jt = /* @__PURE__ */ new Set(["string", "number", "symbol"]);
286
+ function Q(e) {
287
287
  return e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
288
288
  }
289
- function N(e, t, n) {
289
+ function j(e, t, n) {
290
290
  const r = new e._zod.constr(t ?? e._zod.def);
291
291
  return (!t || n?.parent) && (r._zod.parent = e), r;
292
292
  }
@@ -303,83 +303,83 @@ function d(e) {
303
303
  }
304
304
  return delete t.message, typeof t.error == "string" ? { ...t, error: () => t.error } : t;
305
305
  }
306
- function Ct(e) {
306
+ function Mt(e) {
307
307
  return Object.keys(e).filter((t) => e[t]._zod.optin === "optional" && e[t]._zod.optout === "optional");
308
308
  }
309
- const xt = {
309
+ const Lt = {
310
310
  safeint: [Number.MIN_SAFE_INTEGER, Number.MAX_SAFE_INTEGER],
311
311
  int32: [-2147483648, 2147483647],
312
312
  uint32: [0, 4294967295],
313
313
  float32: [-34028234663852886e22, 34028234663852886e22],
314
314
  float64: [-Number.MAX_VALUE, Number.MAX_VALUE]
315
315
  };
316
- function Ut(e, t) {
316
+ function Vt(e, t) {
317
317
  const n = e._zod.def, r = n.checks;
318
318
  if (r && r.length > 0)
319
319
  throw new Error(".pick() cannot be used on object schemas containing refinements");
320
- const s = T(e._zod.def, {
320
+ const i = N(e._zod.def, {
321
321
  get shape() {
322
- const i = {};
322
+ const s = {};
323
323
  for (const c in t) {
324
324
  if (!(c in n.shape))
325
325
  throw new Error(`Unrecognized key: "${c}"`);
326
- t[c] && (i[c] = n.shape[c]);
326
+ t[c] && (s[c] = n.shape[c]);
327
327
  }
328
- return D(this, "shape", i), i;
328
+ return D(this, "shape", s), s;
329
329
  },
330
330
  checks: []
331
331
  });
332
- return N(e, s);
332
+ return j(e, i);
333
333
  }
334
- function Ft(e, t) {
334
+ function Wt(e, t) {
335
335
  const n = e._zod.def, r = n.checks;
336
336
  if (r && r.length > 0)
337
337
  throw new Error(".omit() cannot be used on object schemas containing refinements");
338
- const s = T(e._zod.def, {
338
+ const i = N(e._zod.def, {
339
339
  get shape() {
340
- const i = { ...e._zod.def.shape };
340
+ const s = { ...e._zod.def.shape };
341
341
  for (const c in t) {
342
342
  if (!(c in n.shape))
343
343
  throw new Error(`Unrecognized key: "${c}"`);
344
- t[c] && delete i[c];
344
+ t[c] && delete s[c];
345
345
  }
346
- return D(this, "shape", i), i;
346
+ return D(this, "shape", s), s;
347
347
  },
348
348
  checks: []
349
349
  });
350
- return N(e, s);
350
+ return j(e, i);
351
351
  }
352
- function Jt(e, t) {
353
- if (!M(t))
352
+ function Bt(e, t) {
353
+ if (!L(t))
354
354
  throw new Error("Invalid input to extend: expected a plain object");
355
355
  const n = e._zod.def.checks;
356
356
  if (n && n.length > 0) {
357
- const s = e._zod.def.shape;
358
- for (const i in t)
359
- if (Object.getOwnPropertyDescriptor(s, i) !== void 0)
357
+ const i = e._zod.def.shape;
358
+ for (const s in t)
359
+ if (Object.getOwnPropertyDescriptor(i, s) !== void 0)
360
360
  throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.");
361
361
  }
362
- const o = T(e._zod.def, {
362
+ const o = N(e._zod.def, {
363
363
  get shape() {
364
- const s = { ...e._zod.def.shape, ...t };
365
- return D(this, "shape", s), s;
364
+ const i = { ...e._zod.def.shape, ...t };
365
+ return D(this, "shape", i), i;
366
366
  }
367
367
  });
368
- return N(e, o);
368
+ return j(e, o);
369
369
  }
370
- function Mt(e, t) {
371
- if (!M(t))
370
+ function Ht(e, t) {
371
+ if (!L(t))
372
372
  throw new Error("Invalid input to safeExtend: expected a plain object");
373
- const n = T(e._zod.def, {
373
+ const n = N(e._zod.def, {
374
374
  get shape() {
375
375
  const r = { ...e._zod.def.shape, ...t };
376
376
  return D(this, "shape", r), r;
377
377
  }
378
378
  });
379
- return N(e, n);
379
+ return j(e, n);
380
380
  }
381
- function Lt(e, t) {
382
- const n = T(e._zod.def, {
381
+ function Kt(e, t) {
382
+ const n = N(e._zod.def, {
383
383
  get shape() {
384
384
  const r = { ...e._zod.def.shape, ...t._zod.def.shape };
385
385
  return D(this, "shape", r), r;
@@ -390,13 +390,13 @@ function Lt(e, t) {
390
390
  checks: []
391
391
  // delete existing checks
392
392
  });
393
- return N(e, n);
393
+ return j(e, n);
394
394
  }
395
- function Vt(e, t, n) {
395
+ function Gt(e, t, n) {
396
396
  const o = t._zod.def.checks;
397
397
  if (o && o.length > 0)
398
398
  throw new Error(".partial() cannot be used on object schemas containing refinements");
399
- const i = T(t._zod.def, {
399
+ const s = N(t._zod.def, {
400
400
  get shape() {
401
401
  const c = t._zod.def.shape, a = { ...c };
402
402
  if (n)
@@ -418,31 +418,31 @@ function Vt(e, t, n) {
418
418
  },
419
419
  checks: []
420
420
  });
421
- return N(t, i);
421
+ return j(t, s);
422
422
  }
423
- function Wt(e, t, n) {
424
- const r = T(t._zod.def, {
423
+ function Xt(e, t, n) {
424
+ const r = N(t._zod.def, {
425
425
  get shape() {
426
- const o = t._zod.def.shape, s = { ...o };
426
+ const o = t._zod.def.shape, i = { ...o };
427
427
  if (n)
428
- for (const i in n) {
429
- if (!(i in s))
430
- throw new Error(`Unrecognized key: "${i}"`);
431
- n[i] && (s[i] = new e({
428
+ for (const s in n) {
429
+ if (!(s in i))
430
+ throw new Error(`Unrecognized key: "${s}"`);
431
+ n[s] && (i[s] = new e({
432
432
  type: "nonoptional",
433
- innerType: o[i]
433
+ innerType: o[s]
434
434
  }));
435
435
  }
436
436
  else
437
- for (const i in o)
438
- s[i] = new e({
437
+ for (const s in o)
438
+ i[s] = new e({
439
439
  type: "nonoptional",
440
- innerType: o[i]
440
+ innerType: o[s]
441
441
  });
442
- return D(this, "shape", s), s;
442
+ return D(this, "shape", i), i;
443
443
  }
444
444
  });
445
- return N(t, r);
445
+ return j(t, r);
446
446
  }
447
447
  function C(e, t = 0) {
448
448
  if (e.aborted === !0)
@@ -452,27 +452,27 @@ function C(e, t = 0) {
452
452
  return !0;
453
453
  return !1;
454
454
  }
455
- function We(e, t) {
455
+ function Xe(e, t) {
456
456
  return t.map((n) => {
457
457
  var r;
458
458
  return (r = n).path ?? (r.path = []), n.path.unshift(e), n;
459
459
  });
460
460
  }
461
- function W(e) {
461
+ function B(e) {
462
462
  return typeof e == "string" ? e : e?.message;
463
463
  }
464
- function A(e, t, n) {
464
+ function x(e, t, n) {
465
465
  const r = { ...e, path: e.path ?? [] };
466
466
  if (!e.message) {
467
- const o = W(e.inst?._zod.def?.error?.(e)) ?? W(t?.error?.(e)) ?? W(n.customError?.(e)) ?? W(n.localeError?.(e)) ?? "Invalid input";
467
+ const o = B(e.inst?._zod.def?.error?.(e)) ?? B(t?.error?.(e)) ?? B(n.customError?.(e)) ?? B(n.localeError?.(e)) ?? "Invalid input";
468
468
  r.message = o;
469
469
  }
470
470
  return delete r.inst, delete r.continue, t?.reportInput || delete r.input, r;
471
471
  }
472
- function le(e) {
472
+ function pe(e) {
473
473
  return Array.isArray(e) ? "array" : typeof e == "string" ? "string" : "unknown";
474
474
  }
475
- function L(...e) {
475
+ function V(...e) {
476
476
  const [t, n, r] = e;
477
477
  return typeof t == "string" ? {
478
478
  message: t,
@@ -481,7 +481,7 @@ function L(...e) {
481
481
  inst: r
482
482
  } : { ...t };
483
483
  }
484
- const Be = (e, t) => {
484
+ const Ye = (e, t) => {
485
485
  e.name = "$ZodError", Object.defineProperty(e, "_zod", {
486
486
  value: e._zod,
487
487
  enumerable: !1
@@ -492,112 +492,112 @@ const Be = (e, t) => {
492
492
  value: () => e.message,
493
493
  enumerable: !1
494
494
  });
495
- }, Ke = u("$ZodError", Be), Ge = u("$ZodError", Be, { Parent: Error });
496
- function Bt(e, t = (n) => n.message) {
495
+ }, qe = u("$ZodError", Ye), Qe = u("$ZodError", Ye, { Parent: Error });
496
+ function Yt(e, t = (n) => n.message) {
497
497
  const n = {}, r = [];
498
498
  for (const o of e.issues)
499
499
  o.path.length > 0 ? (n[o.path[0]] = n[o.path[0]] || [], n[o.path[0]].push(t(o))) : r.push(t(o));
500
500
  return { formErrors: r, fieldErrors: n };
501
501
  }
502
- function Kt(e, t = (n) => n.message) {
502
+ function qt(e, t = (n) => n.message) {
503
503
  const n = { _errors: [] }, r = (o) => {
504
- for (const s of o.issues)
505
- if (s.code === "invalid_union" && s.errors.length)
506
- s.errors.map((i) => r({ issues: i }));
507
- else if (s.code === "invalid_key")
508
- r({ issues: s.issues });
509
- else if (s.code === "invalid_element")
510
- r({ issues: s.issues });
511
- else if (s.path.length === 0)
512
- n._errors.push(t(s));
504
+ for (const i of o.issues)
505
+ if (i.code === "invalid_union" && i.errors.length)
506
+ i.errors.map((s) => r({ issues: s }));
507
+ else if (i.code === "invalid_key")
508
+ r({ issues: i.issues });
509
+ else if (i.code === "invalid_element")
510
+ r({ issues: i.issues });
511
+ else if (i.path.length === 0)
512
+ n._errors.push(t(i));
513
513
  else {
514
- let i = n, c = 0;
515
- for (; c < s.path.length; ) {
516
- const a = s.path[c];
517
- c === s.path.length - 1 ? (i[a] = i[a] || { _errors: [] }, i[a]._errors.push(t(s))) : i[a] = i[a] || { _errors: [] }, i = i[a], c++;
514
+ let s = n, c = 0;
515
+ for (; c < i.path.length; ) {
516
+ const a = i.path[c];
517
+ c === i.path.length - 1 ? (s[a] = s[a] || { _errors: [] }, s[a]._errors.push(t(i))) : s[a] = s[a] || { _errors: [] }, s = s[a], c++;
518
518
  }
519
519
  }
520
520
  };
521
521
  return r(e), n;
522
522
  }
523
- const de = (e) => (t, n, r, o) => {
524
- const s = r ? Object.assign(r, { async: !1 }) : { async: !1 }, i = t._zod.run({ value: n, issues: [] }, s);
525
- if (i instanceof Promise)
526
- throw new x();
527
- if (i.issues.length) {
528
- const c = new (o?.Err ?? e)(i.issues.map((a) => A(a, s, j())));
529
- throw Le(c, o?.callee), c;
523
+ const he = (e) => (t, n, r, o) => {
524
+ const i = r ? Object.assign(r, { async: !1 }) : { async: !1 }, s = t._zod.run({ value: n, issues: [] }, i);
525
+ if (s instanceof Promise)
526
+ throw new U();
527
+ if (s.issues.length) {
528
+ const c = new (o?.Err ?? e)(s.issues.map((a) => x(a, i, A())));
529
+ throw Ke(c, o?.callee), c;
530
530
  }
531
- return i.value;
532
- }, pe = (e) => async (t, n, r, o) => {
533
- const s = r ? Object.assign(r, { async: !0 }) : { async: !0 };
534
- let i = t._zod.run({ value: n, issues: [] }, s);
535
- if (i instanceof Promise && (i = await i), i.issues.length) {
536
- const c = new (o?.Err ?? e)(i.issues.map((a) => A(a, s, j())));
537
- throw Le(c, o?.callee), c;
531
+ return s.value;
532
+ }, me = (e) => async (t, n, r, o) => {
533
+ const i = r ? Object.assign(r, { async: !0 }) : { async: !0 };
534
+ let s = t._zod.run({ value: n, issues: [] }, i);
535
+ if (s instanceof Promise && (s = await s), s.issues.length) {
536
+ const c = new (o?.Err ?? e)(s.issues.map((a) => x(a, i, A())));
537
+ throw Ke(c, o?.callee), c;
538
538
  }
539
- return i.value;
540
- }, Q = (e) => (t, n, r) => {
541
- const o = r ? { ...r, async: !1 } : { async: !1 }, s = t._zod.run({ value: n, issues: [] }, o);
542
- if (s instanceof Promise)
543
- throw new x();
544
- return s.issues.length ? {
539
+ return s.value;
540
+ }, ee = (e) => (t, n, r) => {
541
+ const o = r ? { ...r, async: !1 } : { async: !1 }, i = t._zod.run({ value: n, issues: [] }, o);
542
+ if (i instanceof Promise)
543
+ throw new U();
544
+ return i.issues.length ? {
545
545
  success: !1,
546
- error: new (e ?? Ke)(s.issues.map((i) => A(i, o, j())))
547
- } : { success: !0, data: s.value };
548
- }, Gt = /* @__PURE__ */ Q(Ge), ee = (e) => async (t, n, r) => {
546
+ error: new (e ?? qe)(i.issues.map((s) => x(s, o, A())))
547
+ } : { success: !0, data: i.value };
548
+ }, Qt = /* @__PURE__ */ ee(Qe), te = (e) => async (t, n, r) => {
549
549
  const o = r ? Object.assign(r, { async: !0 }) : { async: !0 };
550
- let s = t._zod.run({ value: n, issues: [] }, o);
551
- return s instanceof Promise && (s = await s), s.issues.length ? {
550
+ let i = t._zod.run({ value: n, issues: [] }, o);
551
+ return i instanceof Promise && (i = await i), i.issues.length ? {
552
552
  success: !1,
553
- error: new e(s.issues.map((i) => A(i, o, j())))
554
- } : { success: !0, data: s.value };
555
- }, Ht = /* @__PURE__ */ ee(Ge), Xt = (e) => (t, n, r) => {
556
- const o = r ? Object.assign(r, { direction: "backward" }) : { direction: "backward" };
557
- return de(e)(t, n, o);
558
- }, Yt = (e) => (t, n, r) => de(e)(t, n, r), qt = (e) => async (t, n, r) => {
553
+ error: new e(i.issues.map((s) => x(s, o, A())))
554
+ } : { success: !0, data: i.value };
555
+ }, en = /* @__PURE__ */ te(Qe), tn = (e) => (t, n, r) => {
559
556
  const o = r ? Object.assign(r, { direction: "backward" }) : { direction: "backward" };
560
- return pe(e)(t, n, o);
561
- }, Qt = (e) => async (t, n, r) => pe(e)(t, n, r), en = (e) => (t, n, r) => {
557
+ return he(e)(t, n, o);
558
+ }, nn = (e) => (t, n, r) => he(e)(t, n, r), rn = (e) => async (t, n, r) => {
562
559
  const o = r ? Object.assign(r, { direction: "backward" }) : { direction: "backward" };
563
- return Q(e)(t, n, o);
564
- }, tn = (e) => (t, n, r) => Q(e)(t, n, r), nn = (e) => async (t, n, r) => {
560
+ return me(e)(t, n, o);
561
+ }, on = (e) => async (t, n, r) => me(e)(t, n, r), sn = (e) => (t, n, r) => {
565
562
  const o = r ? Object.assign(r, { direction: "backward" }) : { direction: "backward" };
566
563
  return ee(e)(t, n, o);
567
- }, rn = (e) => async (t, n, r) => ee(e)(t, n, r), on = /^[cC][^\s-]{8,}$/, sn = /^[0-9a-z]+$/, cn = /^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/, un = /^[0-9a-vA-V]{20}$/, an = /^[A-Za-z0-9]{27}$/, fn = /^[a-zA-Z0-9_-]{21}$/, ln = /^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/, dn = /^([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})$/, ve = (e) => e ? new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`) : /^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/, pn = /^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/, hn = "^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";
568
- function mn() {
569
- return new RegExp(hn, "u");
564
+ }, cn = (e) => (t, n, r) => ee(e)(t, n, r), un = (e) => async (t, n, r) => {
565
+ const o = r ? Object.assign(r, { direction: "backward" }) : { direction: "backward" };
566
+ return te(e)(t, n, o);
567
+ }, an = (e) => async (t, n, r) => te(e)(t, n, r), fn = /^[cC][^\s-]{8,}$/, ln = /^[0-9a-z]+$/, dn = /^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/, pn = /^[0-9a-vA-V]{20}$/, hn = /^[A-Za-z0-9]{27}$/, mn = /^[a-zA-Z0-9_-]{21}$/, gn = /^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/, _n = /^([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})$/, ye = (e) => e ? new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`) : /^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/, vn = /^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/, wn = "^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";
568
+ function bn() {
569
+ return new RegExp(wn, "u");
570
570
  }
571
- const gn = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/, _n = /^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/, vn = /^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/, zn = /^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/, bn = /^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/, He = /^[A-Za-z0-9_-]*$/, yn = /^\+[1-9]\d{6,14}$/, Xe = "(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))", wn = /* @__PURE__ */ new RegExp(`^${Xe}$`);
572
- function Ye(e) {
571
+ const yn = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/, zn = /^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/, kn = /^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/, $n = /^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/, Zn = /^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/, et = /^[A-Za-z0-9_-]*$/, Sn = /^\+[1-9]\d{6,14}$/, tt = "(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))", On = /* @__PURE__ */ new RegExp(`^${tt}$`);
572
+ function nt(e) {
573
573
  const t = "(?:[01]\\d|2[0-3]):[0-5]\\d";
574
574
  return typeof e.precision == "number" ? e.precision === -1 ? `${t}` : e.precision === 0 ? `${t}:[0-5]\\d` : `${t}:[0-5]\\d\\.\\d{${e.precision}}` : `${t}(?::[0-5]\\d(?:\\.\\d+)?)?`;
575
575
  }
576
- function kn(e) {
577
- return new RegExp(`^${Ye(e)}$`);
576
+ function In(e) {
577
+ return new RegExp(`^${nt(e)}$`);
578
578
  }
579
- function $n(e) {
580
- const t = Ye({ precision: e.precision }), n = ["Z"];
579
+ function En(e) {
580
+ const t = nt({ precision: e.precision }), n = ["Z"];
581
581
  e.local && n.push(""), e.offset && n.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");
582
582
  const r = `${t}(?:${n.join("|")})`;
583
- return new RegExp(`^${Xe}T(?:${r})$`);
583
+ return new RegExp(`^${tt}T(?:${r})$`);
584
584
  }
585
- const Zn = (e) => {
585
+ const Pn = (e) => {
586
586
  const t = e ? `[\\s\\S]{${e?.minimum ?? 0},${e?.maximum ?? ""}}` : "[\\s\\S]*";
587
587
  return new RegExp(`^${t}$`);
588
- }, On = /^-?\d+$/, Sn = /^-?\d+(?:\.\d+)?$/, In = /^[^A-Z]*$/, En = /^[^a-z]*$/, S = /* @__PURE__ */ u("$ZodCheck", (e, t) => {
588
+ }, Tn = /^-?\d+$/, Nn = /^-?\d+(?:\.\d+)?$/, jn = /^[^A-Z]*$/, An = /^[^a-z]*$/, O = /* @__PURE__ */ u("$ZodCheck", (e, t) => {
589
589
  var n;
590
590
  e._zod ?? (e._zod = {}), e._zod.def = t, (n = e._zod).onattach ?? (n.onattach = []);
591
- }), qe = {
591
+ }), rt = {
592
592
  number: "number",
593
593
  bigint: "bigint",
594
594
  object: "date"
595
- }, Qe = /* @__PURE__ */ u("$ZodCheckLessThan", (e, t) => {
596
- S.init(e, t);
597
- const n = qe[typeof t.value];
595
+ }, ot = /* @__PURE__ */ u("$ZodCheckLessThan", (e, t) => {
596
+ O.init(e, t);
597
+ const n = rt[typeof t.value];
598
598
  e._zod.onattach.push((r) => {
599
- const o = r._zod.bag, s = (t.inclusive ? o.maximum : o.exclusiveMaximum) ?? Number.POSITIVE_INFINITY;
600
- t.value < s && (t.inclusive ? o.maximum = t.value : o.exclusiveMaximum = t.value);
599
+ const o = r._zod.bag, i = (t.inclusive ? o.maximum : o.exclusiveMaximum) ?? Number.POSITIVE_INFINITY;
600
+ t.value < i && (t.inclusive ? o.maximum = t.value : o.exclusiveMaximum = t.value);
601
601
  }), e._zod.check = (r) => {
602
602
  (t.inclusive ? r.value <= t.value : r.value < t.value) || r.issues.push({
603
603
  origin: n,
@@ -609,12 +609,12 @@ const Zn = (e) => {
609
609
  continue: !t.abort
610
610
  });
611
611
  };
612
- }), et = /* @__PURE__ */ u("$ZodCheckGreaterThan", (e, t) => {
613
- S.init(e, t);
614
- const n = qe[typeof t.value];
612
+ }), st = /* @__PURE__ */ u("$ZodCheckGreaterThan", (e, t) => {
613
+ O.init(e, t);
614
+ const n = rt[typeof t.value];
615
615
  e._zod.onattach.push((r) => {
616
- const o = r._zod.bag, s = (t.inclusive ? o.minimum : o.exclusiveMinimum) ?? Number.NEGATIVE_INFINITY;
617
- t.value > s && (t.inclusive ? o.minimum = t.value : o.exclusiveMinimum = t.value);
616
+ const o = r._zod.bag, i = (t.inclusive ? o.minimum : o.exclusiveMinimum) ?? Number.NEGATIVE_INFINITY;
617
+ t.value > i && (t.inclusive ? o.minimum = t.value : o.exclusiveMinimum = t.value);
618
618
  }), e._zod.check = (r) => {
619
619
  (t.inclusive ? r.value >= t.value : r.value > t.value) || r.issues.push({
620
620
  origin: n,
@@ -626,14 +626,14 @@ const Zn = (e) => {
626
626
  continue: !t.abort
627
627
  });
628
628
  };
629
- }), Pn = /* @__PURE__ */ u("$ZodCheckMultipleOf", (e, t) => {
630
- S.init(e, t), e._zod.onattach.push((n) => {
629
+ }), xn = /* @__PURE__ */ u("$ZodCheckMultipleOf", (e, t) => {
630
+ O.init(e, t), e._zod.onattach.push((n) => {
631
631
  var r;
632
632
  (r = n._zod.bag).multipleOf ?? (r.multipleOf = t.value);
633
633
  }), e._zod.check = (n) => {
634
634
  if (typeof n.value != typeof t.value)
635
635
  throw new Error("Cannot mix number and bigint in multiple_of check.");
636
- (typeof n.value == "bigint" ? n.value % t.value === BigInt(0) : jt(n.value, t.value) === 0) || n.issues.push({
636
+ (typeof n.value == "bigint" ? n.value % t.value === BigInt(0) : Ct(n.value, t.value) === 0) || n.issues.push({
637
637
  origin: typeof n.value,
638
638
  code: "not_multiple_of",
639
639
  divisor: t.value,
@@ -642,17 +642,17 @@ const Zn = (e) => {
642
642
  continue: !t.abort
643
643
  });
644
644
  };
645
- }), Tn = /* @__PURE__ */ u("$ZodCheckNumberFormat", (e, t) => {
646
- S.init(e, t), t.format = t.format || "float64";
647
- const n = t.format?.includes("int"), r = n ? "int" : "number", [o, s] = xt[t.format];
648
- e._zod.onattach.push((i) => {
649
- const c = i._zod.bag;
650
- c.format = t.format, c.minimum = o, c.maximum = s, n && (c.pattern = On);
651
- }), e._zod.check = (i) => {
652
- const c = i.value;
645
+ }), Dn = /* @__PURE__ */ u("$ZodCheckNumberFormat", (e, t) => {
646
+ O.init(e, t), t.format = t.format || "float64";
647
+ const n = t.format?.includes("int"), r = n ? "int" : "number", [o, i] = Lt[t.format];
648
+ e._zod.onattach.push((s) => {
649
+ const c = s._zod.bag;
650
+ c.format = t.format, c.minimum = o, c.maximum = i, n && (c.pattern = Tn);
651
+ }), e._zod.check = (s) => {
652
+ const c = s.value;
653
653
  if (n) {
654
654
  if (!Number.isInteger(c)) {
655
- i.issues.push({
655
+ s.issues.push({
656
656
  expected: r,
657
657
  format: t.format,
658
658
  code: "invalid_type",
@@ -663,7 +663,7 @@ const Zn = (e) => {
663
663
  return;
664
664
  }
665
665
  if (!Number.isSafeInteger(c)) {
666
- c > 0 ? i.issues.push({
666
+ c > 0 ? s.issues.push({
667
667
  input: c,
668
668
  code: "too_big",
669
669
  maximum: Number.MAX_SAFE_INTEGER,
@@ -672,7 +672,7 @@ const Zn = (e) => {
672
672
  origin: r,
673
673
  inclusive: !0,
674
674
  continue: !t.abort
675
- }) : i.issues.push({
675
+ }) : s.issues.push({
676
676
  input: c,
677
677
  code: "too_small",
678
678
  minimum: Number.MIN_SAFE_INTEGER,
@@ -685,7 +685,7 @@ const Zn = (e) => {
685
685
  return;
686
686
  }
687
687
  }
688
- c < o && i.issues.push({
688
+ c < o && s.issues.push({
689
689
  origin: "number",
690
690
  input: c,
691
691
  code: "too_small",
@@ -693,21 +693,21 @@ const Zn = (e) => {
693
693
  inclusive: !0,
694
694
  inst: e,
695
695
  continue: !t.abort
696
- }), c > s && i.issues.push({
696
+ }), c > i && s.issues.push({
697
697
  origin: "number",
698
698
  input: c,
699
699
  code: "too_big",
700
- maximum: s,
700
+ maximum: i,
701
701
  inclusive: !0,
702
702
  inst: e,
703
703
  continue: !t.abort
704
704
  });
705
705
  };
706
- }), Nn = /* @__PURE__ */ u("$ZodCheckMaxLength", (e, t) => {
706
+ }), Rn = /* @__PURE__ */ u("$ZodCheckMaxLength", (e, t) => {
707
707
  var n;
708
- S.init(e, t), (n = e._zod.def).when ?? (n.when = (r) => {
708
+ O.init(e, t), (n = e._zod.def).when ?? (n.when = (r) => {
709
709
  const o = r.value;
710
- return !ae(o) && o.length !== void 0;
710
+ return !le(o) && o.length !== void 0;
711
711
  }), e._zod.onattach.push((r) => {
712
712
  const o = r._zod.bag.maximum ?? Number.POSITIVE_INFINITY;
713
713
  t.maximum < o && (r._zod.bag.maximum = t.maximum);
@@ -715,9 +715,9 @@ const Zn = (e) => {
715
715
  const o = r.value;
716
716
  if (o.length <= t.maximum)
717
717
  return;
718
- const i = le(o);
718
+ const s = pe(o);
719
719
  r.issues.push({
720
- origin: i,
720
+ origin: s,
721
721
  code: "too_big",
722
722
  maximum: t.maximum,
723
723
  inclusive: !0,
@@ -726,11 +726,11 @@ const Zn = (e) => {
726
726
  continue: !t.abort
727
727
  });
728
728
  };
729
- }), jn = /* @__PURE__ */ u("$ZodCheckMinLength", (e, t) => {
729
+ }), Cn = /* @__PURE__ */ u("$ZodCheckMinLength", (e, t) => {
730
730
  var n;
731
- S.init(e, t), (n = e._zod.def).when ?? (n.when = (r) => {
731
+ O.init(e, t), (n = e._zod.def).when ?? (n.when = (r) => {
732
732
  const o = r.value;
733
- return !ae(o) && o.length !== void 0;
733
+ return !le(o) && o.length !== void 0;
734
734
  }), e._zod.onattach.push((r) => {
735
735
  const o = r._zod.bag.minimum ?? Number.NEGATIVE_INFINITY;
736
736
  t.minimum > o && (r._zod.bag.minimum = t.minimum);
@@ -738,9 +738,9 @@ const Zn = (e) => {
738
738
  const o = r.value;
739
739
  if (o.length >= t.minimum)
740
740
  return;
741
- const i = le(o);
741
+ const s = pe(o);
742
742
  r.issues.push({
743
- origin: i,
743
+ origin: s,
744
744
  code: "too_small",
745
745
  minimum: t.minimum,
746
746
  inclusive: !0,
@@ -749,21 +749,21 @@ const Zn = (e) => {
749
749
  continue: !t.abort
750
750
  });
751
751
  };
752
- }), An = /* @__PURE__ */ u("$ZodCheckLengthEquals", (e, t) => {
752
+ }), Un = /* @__PURE__ */ u("$ZodCheckLengthEquals", (e, t) => {
753
753
  var n;
754
- S.init(e, t), (n = e._zod.def).when ?? (n.when = (r) => {
754
+ O.init(e, t), (n = e._zod.def).when ?? (n.when = (r) => {
755
755
  const o = r.value;
756
- return !ae(o) && o.length !== void 0;
756
+ return !le(o) && o.length !== void 0;
757
757
  }), e._zod.onattach.push((r) => {
758
758
  const o = r._zod.bag;
759
759
  o.minimum = t.length, o.maximum = t.length, o.length = t.length;
760
760
  }), e._zod.check = (r) => {
761
- const o = r.value, s = o.length;
762
- if (s === t.length)
761
+ const o = r.value, i = o.length;
762
+ if (i === t.length)
763
763
  return;
764
- const i = le(o), c = s > t.length;
764
+ const s = pe(o), c = i > t.length;
765
765
  r.issues.push({
766
- origin: i,
766
+ origin: s,
767
767
  ...c ? { code: "too_big", maximum: t.length } : { code: "too_small", minimum: t.length },
768
768
  inclusive: !0,
769
769
  exact: !0,
@@ -772,11 +772,11 @@ const Zn = (e) => {
772
772
  continue: !t.abort
773
773
  });
774
774
  };
775
- }), te = /* @__PURE__ */ u("$ZodCheckStringFormat", (e, t) => {
775
+ }), ne = /* @__PURE__ */ u("$ZodCheckStringFormat", (e, t) => {
776
776
  var n, r;
777
- S.init(e, t), e._zod.onattach.push((o) => {
778
- const s = o._zod.bag;
779
- s.format = t.format, t.pattern && (s.patterns ?? (s.patterns = /* @__PURE__ */ new Set()), s.patterns.add(t.pattern));
777
+ O.init(e, t), e._zod.onattach.push((o) => {
778
+ const i = o._zod.bag;
779
+ i.format = t.format, t.pattern && (i.patterns ?? (i.patterns = /* @__PURE__ */ new Set()), i.patterns.add(t.pattern));
780
780
  }), t.pattern ? (n = e._zod).check ?? (n.check = (o) => {
781
781
  t.pattern.lastIndex = 0, !t.pattern.test(o.value) && o.issues.push({
782
782
  origin: "string",
@@ -789,8 +789,8 @@ const Zn = (e) => {
789
789
  });
790
790
  }) : (r = e._zod).check ?? (r.check = () => {
791
791
  });
792
- }), Dn = /* @__PURE__ */ u("$ZodCheckRegex", (e, t) => {
793
- te.init(e, t), e._zod.check = (n) => {
792
+ }), Fn = /* @__PURE__ */ u("$ZodCheckRegex", (e, t) => {
793
+ ne.init(e, t), e._zod.check = (n) => {
794
794
  t.pattern.lastIndex = 0, !t.pattern.test(n.value) && n.issues.push({
795
795
  origin: "string",
796
796
  code: "invalid_format",
@@ -801,16 +801,16 @@ const Zn = (e) => {
801
801
  continue: !t.abort
802
802
  });
803
803
  };
804
- }), Rn = /* @__PURE__ */ u("$ZodCheckLowerCase", (e, t) => {
805
- t.pattern ?? (t.pattern = In), te.init(e, t);
806
- }), Cn = /* @__PURE__ */ u("$ZodCheckUpperCase", (e, t) => {
807
- t.pattern ?? (t.pattern = En), te.init(e, t);
808
- }), xn = /* @__PURE__ */ u("$ZodCheckIncludes", (e, t) => {
809
- S.init(e, t);
810
- const n = q(t.includes), r = new RegExp(typeof t.position == "number" ? `^.{${t.position}}${n}` : n);
804
+ }), Jn = /* @__PURE__ */ u("$ZodCheckLowerCase", (e, t) => {
805
+ t.pattern ?? (t.pattern = jn), ne.init(e, t);
806
+ }), Mn = /* @__PURE__ */ u("$ZodCheckUpperCase", (e, t) => {
807
+ t.pattern ?? (t.pattern = An), ne.init(e, t);
808
+ }), Ln = /* @__PURE__ */ u("$ZodCheckIncludes", (e, t) => {
809
+ O.init(e, t);
810
+ const n = Q(t.includes), r = new RegExp(typeof t.position == "number" ? `^.{${t.position}}${n}` : n);
811
811
  t.pattern = r, e._zod.onattach.push((o) => {
812
- const s = o._zod.bag;
813
- s.patterns ?? (s.patterns = /* @__PURE__ */ new Set()), s.patterns.add(r);
812
+ const i = o._zod.bag;
813
+ i.patterns ?? (i.patterns = /* @__PURE__ */ new Set()), i.patterns.add(r);
814
814
  }), e._zod.check = (o) => {
815
815
  o.value.includes(t.includes, t.position) || o.issues.push({
816
816
  origin: "string",
@@ -822,9 +822,9 @@ const Zn = (e) => {
822
822
  continue: !t.abort
823
823
  });
824
824
  };
825
- }), Un = /* @__PURE__ */ u("$ZodCheckStartsWith", (e, t) => {
826
- S.init(e, t);
827
- const n = new RegExp(`^${q(t.prefix)}.*`);
825
+ }), Vn = /* @__PURE__ */ u("$ZodCheckStartsWith", (e, t) => {
826
+ O.init(e, t);
827
+ const n = new RegExp(`^${Q(t.prefix)}.*`);
828
828
  t.pattern ?? (t.pattern = n), e._zod.onattach.push((r) => {
829
829
  const o = r._zod.bag;
830
830
  o.patterns ?? (o.patterns = /* @__PURE__ */ new Set()), o.patterns.add(n);
@@ -839,9 +839,9 @@ const Zn = (e) => {
839
839
  continue: !t.abort
840
840
  });
841
841
  };
842
- }), Fn = /* @__PURE__ */ u("$ZodCheckEndsWith", (e, t) => {
843
- S.init(e, t);
844
- const n = new RegExp(`.*${q(t.suffix)}$`);
842
+ }), Wn = /* @__PURE__ */ u("$ZodCheckEndsWith", (e, t) => {
843
+ O.init(e, t);
844
+ const n = new RegExp(`.*${Q(t.suffix)}$`);
845
845
  t.pattern ?? (t.pattern = n), e._zod.onattach.push((r) => {
846
846
  const o = r._zod.bag;
847
847
  o.patterns ?? (o.patterns = /* @__PURE__ */ new Set()), o.patterns.add(n);
@@ -856,12 +856,12 @@ const Zn = (e) => {
856
856
  continue: !t.abort
857
857
  });
858
858
  };
859
- }), Jn = /* @__PURE__ */ u("$ZodCheckOverwrite", (e, t) => {
860
- S.init(e, t), e._zod.check = (n) => {
859
+ }), Bn = /* @__PURE__ */ u("$ZodCheckOverwrite", (e, t) => {
860
+ O.init(e, t), e._zod.check = (n) => {
861
861
  n.value = t.tx(n.value);
862
862
  };
863
863
  });
864
- class Mn {
864
+ class Hn {
865
865
  constructor(t = []) {
866
866
  this.content = [], this.indent = 0, this && (this.args = t);
867
867
  }
@@ -874,77 +874,77 @@ class Mn {
874
874
  return;
875
875
  }
876
876
  const r = t.split(`
877
- `).filter((i) => i), o = Math.min(...r.map((i) => i.length - i.trimStart().length)), s = r.map((i) => i.slice(o)).map((i) => " ".repeat(this.indent * 2) + i);
878
- for (const i of s)
879
- this.content.push(i);
877
+ `).filter((s) => s), o = Math.min(...r.map((s) => s.length - s.trimStart().length)), i = r.map((s) => s.slice(o)).map((s) => " ".repeat(this.indent * 2) + s);
878
+ for (const s of i)
879
+ this.content.push(s);
880
880
  }
881
881
  compile() {
882
- const t = Function, n = this?.args, o = [...(this?.content ?? [""]).map((s) => ` ${s}`)];
882
+ const t = Function, n = this?.args, o = [...(this?.content ?? [""]).map((i) => ` ${i}`)];
883
883
  return new t(...n, o.join(`
884
884
  `));
885
885
  }
886
886
  }
887
- const Ln = {
887
+ const Kn = {
888
888
  major: 4,
889
889
  minor: 3,
890
890
  patch: 6
891
- }, z = /* @__PURE__ */ u("$ZodType", (e, t) => {
891
+ }, w = /* @__PURE__ */ u("$ZodType", (e, t) => {
892
892
  var n;
893
- e ?? (e = {}), e._zod.def = t, e._zod.bag = e._zod.bag || {}, e._zod.version = Ln;
893
+ e ?? (e = {}), e._zod.def = t, e._zod.bag = e._zod.bag || {}, e._zod.version = Kn;
894
894
  const r = [...e._zod.def.checks ?? []];
895
895
  e._zod.traits.has("$ZodCheck") && r.unshift(e);
896
896
  for (const o of r)
897
- for (const s of o._zod.onattach)
898
- s(e);
897
+ for (const i of o._zod.onattach)
898
+ i(e);
899
899
  if (r.length === 0)
900
900
  (n = e._zod).deferred ?? (n.deferred = []), e._zod.deferred?.push(() => {
901
901
  e._zod.run = e._zod.parse;
902
902
  });
903
903
  else {
904
- const o = (i, c, a) => {
905
- let f = C(i), l;
904
+ const o = (s, c, a) => {
905
+ let f = C(s), l;
906
906
  for (const m of c) {
907
907
  if (m._zod.def.when) {
908
- if (!m._zod.def.when(i))
908
+ if (!m._zod.def.when(s))
909
909
  continue;
910
910
  } else if (f)
911
911
  continue;
912
- const p = i.issues.length, h = m._zod.check(i);
912
+ const p = s.issues.length, h = m._zod.check(s);
913
913
  if (h instanceof Promise && a?.async === !1)
914
- throw new x();
914
+ throw new U();
915
915
  if (l || h instanceof Promise)
916
916
  l = (l ?? Promise.resolve()).then(async () => {
917
- await h, i.issues.length !== p && (f || (f = C(i, p)));
917
+ await h, s.issues.length !== p && (f || (f = C(s, p)));
918
918
  });
919
919
  else {
920
- if (i.issues.length === p)
920
+ if (s.issues.length === p)
921
921
  continue;
922
- f || (f = C(i, p));
922
+ f || (f = C(s, p));
923
923
  }
924
924
  }
925
- return l ? l.then(() => i) : i;
926
- }, s = (i, c, a) => {
927
- if (C(i))
928
- return i.aborted = !0, i;
925
+ return l ? l.then(() => s) : s;
926
+ }, i = (s, c, a) => {
927
+ if (C(s))
928
+ return s.aborted = !0, s;
929
929
  const f = o(c, r, a);
930
930
  if (f instanceof Promise) {
931
931
  if (a.async === !1)
932
- throw new x();
932
+ throw new U();
933
933
  return f.then((l) => e._zod.parse(l, a));
934
934
  }
935
935
  return e._zod.parse(f, a);
936
936
  };
937
- e._zod.run = (i, c) => {
937
+ e._zod.run = (s, c) => {
938
938
  if (c.skipChecks)
939
- return e._zod.parse(i, c);
939
+ return e._zod.parse(s, c);
940
940
  if (c.direction === "backward") {
941
- const f = e._zod.parse({ value: i.value, issues: [] }, { ...c, skipChecks: !0 });
942
- return f instanceof Promise ? f.then((l) => s(l, i, c)) : s(f, i, c);
941
+ const f = e._zod.parse({ value: s.value, issues: [] }, { ...c, skipChecks: !0 });
942
+ return f instanceof Promise ? f.then((l) => i(l, s, c)) : i(f, s, c);
943
943
  }
944
- const a = e._zod.parse(i, c);
944
+ const a = e._zod.parse(s, c);
945
945
  if (a instanceof Promise) {
946
946
  if (c.async === !1)
947
- throw new x();
947
+ throw new U();
948
948
  return a.then((f) => o(f, r, c));
949
949
  }
950
950
  return o(a, r, c);
@@ -953,17 +953,17 @@ const Ln = {
953
953
  g(e, "~standard", () => ({
954
954
  validate: (o) => {
955
955
  try {
956
- const s = Gt(e, o);
957
- return s.success ? { value: s.data } : { issues: s.error?.issues };
956
+ const i = Qt(e, o);
957
+ return i.success ? { value: i.data } : { issues: i.error?.issues };
958
958
  } catch {
959
- return Ht(e, o).then((i) => i.success ? { value: i.data } : { issues: i.error?.issues });
959
+ return en(e, o).then((s) => s.success ? { value: s.data } : { issues: s.error?.issues });
960
960
  }
961
961
  },
962
962
  vendor: "zod",
963
963
  version: 1
964
964
  }));
965
- }), he = /* @__PURE__ */ u("$ZodString", (e, t) => {
966
- z.init(e, t), e._zod.pattern = [...e?._zod.bag?.patterns ?? []].pop() ?? Zn(e._zod.bag), e._zod.parse = (n, r) => {
965
+ }), ge = /* @__PURE__ */ u("$ZodString", (e, t) => {
966
+ w.init(e, t), e._zod.pattern = [...e?._zod.bag?.patterns ?? []].pop() ?? Pn(e._zod.bag), e._zod.parse = (n, r) => {
967
967
  if (t.coerce)
968
968
  try {
969
969
  n.value = String(n.value);
@@ -977,10 +977,10 @@ const Ln = {
977
977
  }), n;
978
978
  };
979
979
  }), _ = /* @__PURE__ */ u("$ZodStringFormat", (e, t) => {
980
- te.init(e, t), he.init(e, t);
981
- }), Vn = /* @__PURE__ */ u("$ZodGUID", (e, t) => {
982
- t.pattern ?? (t.pattern = dn), _.init(e, t);
983
- }), Wn = /* @__PURE__ */ u("$ZodUUID", (e, t) => {
980
+ ne.init(e, t), ge.init(e, t);
981
+ }), Gn = /* @__PURE__ */ u("$ZodGUID", (e, t) => {
982
+ t.pattern ?? (t.pattern = _n), _.init(e, t);
983
+ }), Xn = /* @__PURE__ */ u("$ZodUUID", (e, t) => {
984
984
  if (t.version) {
985
985
  const r = {
986
986
  v1: 1,
@@ -994,13 +994,13 @@ const Ln = {
994
994
  }[t.version];
995
995
  if (r === void 0)
996
996
  throw new Error(`Invalid UUID version: "${t.version}"`);
997
- t.pattern ?? (t.pattern = ve(r));
997
+ t.pattern ?? (t.pattern = ye(r));
998
998
  } else
999
- t.pattern ?? (t.pattern = ve());
999
+ t.pattern ?? (t.pattern = ye());
1000
1000
  _.init(e, t);
1001
- }), Bn = /* @__PURE__ */ u("$ZodEmail", (e, t) => {
1002
- t.pattern ?? (t.pattern = pn), _.init(e, t);
1003
- }), Kn = /* @__PURE__ */ u("$ZodURL", (e, t) => {
1001
+ }), Yn = /* @__PURE__ */ u("$ZodEmail", (e, t) => {
1002
+ t.pattern ?? (t.pattern = vn), _.init(e, t);
1003
+ }), qn = /* @__PURE__ */ u("$ZodURL", (e, t) => {
1004
1004
  _.init(e, t), e._zod.check = (n) => {
1005
1005
  try {
1006
1006
  const r = n.value.trim(), o = new URL(r);
@@ -1032,32 +1032,32 @@ const Ln = {
1032
1032
  });
1033
1033
  }
1034
1034
  };
1035
- }), Gn = /* @__PURE__ */ u("$ZodEmoji", (e, t) => {
1036
- t.pattern ?? (t.pattern = mn()), _.init(e, t);
1037
- }), Hn = /* @__PURE__ */ u("$ZodNanoID", (e, t) => {
1035
+ }), Qn = /* @__PURE__ */ u("$ZodEmoji", (e, t) => {
1036
+ t.pattern ?? (t.pattern = bn()), _.init(e, t);
1037
+ }), er = /* @__PURE__ */ u("$ZodNanoID", (e, t) => {
1038
+ t.pattern ?? (t.pattern = mn), _.init(e, t);
1039
+ }), tr = /* @__PURE__ */ u("$ZodCUID", (e, t) => {
1038
1040
  t.pattern ?? (t.pattern = fn), _.init(e, t);
1039
- }), Xn = /* @__PURE__ */ u("$ZodCUID", (e, t) => {
1040
- t.pattern ?? (t.pattern = on), _.init(e, t);
1041
- }), Yn = /* @__PURE__ */ u("$ZodCUID2", (e, t) => {
1042
- t.pattern ?? (t.pattern = sn), _.init(e, t);
1043
- }), qn = /* @__PURE__ */ u("$ZodULID", (e, t) => {
1044
- t.pattern ?? (t.pattern = cn), _.init(e, t);
1045
- }), Qn = /* @__PURE__ */ u("$ZodXID", (e, t) => {
1046
- t.pattern ?? (t.pattern = un), _.init(e, t);
1047
- }), er = /* @__PURE__ */ u("$ZodKSUID", (e, t) => {
1048
- t.pattern ?? (t.pattern = an), _.init(e, t);
1049
- }), tr = /* @__PURE__ */ u("$ZodISODateTime", (e, t) => {
1050
- t.pattern ?? (t.pattern = $n(t)), _.init(e, t);
1051
- }), nr = /* @__PURE__ */ u("$ZodISODate", (e, t) => {
1052
- t.pattern ?? (t.pattern = wn), _.init(e, t);
1053
- }), rr = /* @__PURE__ */ u("$ZodISOTime", (e, t) => {
1054
- t.pattern ?? (t.pattern = kn(t)), _.init(e, t);
1055
- }), or = /* @__PURE__ */ u("$ZodISODuration", (e, t) => {
1041
+ }), nr = /* @__PURE__ */ u("$ZodCUID2", (e, t) => {
1056
1042
  t.pattern ?? (t.pattern = ln), _.init(e, t);
1057
- }), ir = /* @__PURE__ */ u("$ZodIPv4", (e, t) => {
1058
- t.pattern ?? (t.pattern = gn), _.init(e, t), e._zod.bag.format = "ipv4";
1059
- }), sr = /* @__PURE__ */ u("$ZodIPv6", (e, t) => {
1060
- t.pattern ?? (t.pattern = _n), _.init(e, t), e._zod.bag.format = "ipv6", e._zod.check = (n) => {
1043
+ }), rr = /* @__PURE__ */ u("$ZodULID", (e, t) => {
1044
+ t.pattern ?? (t.pattern = dn), _.init(e, t);
1045
+ }), or = /* @__PURE__ */ u("$ZodXID", (e, t) => {
1046
+ t.pattern ?? (t.pattern = pn), _.init(e, t);
1047
+ }), sr = /* @__PURE__ */ u("$ZodKSUID", (e, t) => {
1048
+ t.pattern ?? (t.pattern = hn), _.init(e, t);
1049
+ }), ir = /* @__PURE__ */ u("$ZodISODateTime", (e, t) => {
1050
+ t.pattern ?? (t.pattern = En(t)), _.init(e, t);
1051
+ }), cr = /* @__PURE__ */ u("$ZodISODate", (e, t) => {
1052
+ t.pattern ?? (t.pattern = On), _.init(e, t);
1053
+ }), ur = /* @__PURE__ */ u("$ZodISOTime", (e, t) => {
1054
+ t.pattern ?? (t.pattern = In(t)), _.init(e, t);
1055
+ }), ar = /* @__PURE__ */ u("$ZodISODuration", (e, t) => {
1056
+ t.pattern ?? (t.pattern = gn), _.init(e, t);
1057
+ }), fr = /* @__PURE__ */ u("$ZodIPv4", (e, t) => {
1058
+ t.pattern ?? (t.pattern = yn), _.init(e, t), e._zod.bag.format = "ipv4";
1059
+ }), lr = /* @__PURE__ */ u("$ZodIPv6", (e, t) => {
1060
+ t.pattern ?? (t.pattern = zn), _.init(e, t), e._zod.bag.format = "ipv6", e._zod.check = (n) => {
1061
1061
  try {
1062
1062
  new URL(`http://[${n.value}]`);
1063
1063
  } catch {
@@ -1070,21 +1070,21 @@ const Ln = {
1070
1070
  });
1071
1071
  }
1072
1072
  };
1073
- }), cr = /* @__PURE__ */ u("$ZodCIDRv4", (e, t) => {
1074
- t.pattern ?? (t.pattern = vn), _.init(e, t);
1075
- }), ur = /* @__PURE__ */ u("$ZodCIDRv6", (e, t) => {
1076
- t.pattern ?? (t.pattern = zn), _.init(e, t), e._zod.check = (n) => {
1073
+ }), dr = /* @__PURE__ */ u("$ZodCIDRv4", (e, t) => {
1074
+ t.pattern ?? (t.pattern = kn), _.init(e, t);
1075
+ }), pr = /* @__PURE__ */ u("$ZodCIDRv6", (e, t) => {
1076
+ t.pattern ?? (t.pattern = $n), _.init(e, t), e._zod.check = (n) => {
1077
1077
  const r = n.value.split("/");
1078
1078
  try {
1079
1079
  if (r.length !== 2)
1080
1080
  throw new Error();
1081
- const [o, s] = r;
1082
- if (!s)
1081
+ const [o, i] = r;
1082
+ if (!i)
1083
1083
  throw new Error();
1084
- const i = Number(s);
1085
- if (`${i}` !== s)
1084
+ const s = Number(i);
1085
+ if (`${s}` !== i)
1086
1086
  throw new Error();
1087
- if (i < 0 || i > 128)
1087
+ if (s < 0 || s > 128)
1088
1088
  throw new Error();
1089
1089
  new URL(`http://[${o}]`);
1090
1090
  } catch {
@@ -1098,7 +1098,7 @@ const Ln = {
1098
1098
  }
1099
1099
  };
1100
1100
  });
1101
- function tt(e) {
1101
+ function it(e) {
1102
1102
  if (e === "")
1103
1103
  return !0;
1104
1104
  if (e.length % 4 !== 0)
@@ -1109,9 +1109,9 @@ function tt(e) {
1109
1109
  return !1;
1110
1110
  }
1111
1111
  }
1112
- const ar = /* @__PURE__ */ u("$ZodBase64", (e, t) => {
1113
- t.pattern ?? (t.pattern = bn), _.init(e, t), e._zod.bag.contentEncoding = "base64", e._zod.check = (n) => {
1114
- tt(n.value) || n.issues.push({
1112
+ const hr = /* @__PURE__ */ u("$ZodBase64", (e, t) => {
1113
+ t.pattern ?? (t.pattern = Zn), _.init(e, t), e._zod.bag.contentEncoding = "base64", e._zod.check = (n) => {
1114
+ it(n.value) || n.issues.push({
1115
1115
  code: "invalid_format",
1116
1116
  format: "base64",
1117
1117
  input: n.value,
@@ -1120,15 +1120,15 @@ const ar = /* @__PURE__ */ u("$ZodBase64", (e, t) => {
1120
1120
  });
1121
1121
  };
1122
1122
  });
1123
- function fr(e) {
1124
- if (!He.test(e))
1123
+ function mr(e) {
1124
+ if (!et.test(e))
1125
1125
  return !1;
1126
1126
  const t = e.replace(/[-_]/g, (r) => r === "-" ? "+" : "/"), n = t.padEnd(Math.ceil(t.length / 4) * 4, "=");
1127
- return tt(n);
1127
+ return it(n);
1128
1128
  }
1129
- const lr = /* @__PURE__ */ u("$ZodBase64URL", (e, t) => {
1130
- t.pattern ?? (t.pattern = He), _.init(e, t), e._zod.bag.contentEncoding = "base64url", e._zod.check = (n) => {
1131
- fr(n.value) || n.issues.push({
1129
+ const gr = /* @__PURE__ */ u("$ZodBase64URL", (e, t) => {
1130
+ t.pattern ?? (t.pattern = et), _.init(e, t), e._zod.bag.contentEncoding = "base64url", e._zod.check = (n) => {
1131
+ mr(n.value) || n.issues.push({
1132
1132
  code: "invalid_format",
1133
1133
  format: "base64url",
1134
1134
  input: n.value,
@@ -1136,10 +1136,10 @@ const lr = /* @__PURE__ */ u("$ZodBase64URL", (e, t) => {
1136
1136
  continue: !t.abort
1137
1137
  });
1138
1138
  };
1139
- }), dr = /* @__PURE__ */ u("$ZodE164", (e, t) => {
1140
- t.pattern ?? (t.pattern = yn), _.init(e, t);
1139
+ }), _r = /* @__PURE__ */ u("$ZodE164", (e, t) => {
1140
+ t.pattern ?? (t.pattern = Sn), _.init(e, t);
1141
1141
  });
1142
- function pr(e, t = null) {
1142
+ function vr(e, t = null) {
1143
1143
  try {
1144
1144
  const n = e.split(".");
1145
1145
  if (n.length !== 3)
@@ -1153,9 +1153,9 @@ function pr(e, t = null) {
1153
1153
  return !1;
1154
1154
  }
1155
1155
  }
1156
- const hr = /* @__PURE__ */ u("$ZodJWT", (e, t) => {
1156
+ const wr = /* @__PURE__ */ u("$ZodJWT", (e, t) => {
1157
1157
  _.init(e, t), e._zod.check = (n) => {
1158
- pr(n.value, t.alg) || n.issues.push({
1158
+ vr(n.value, t.alg) || n.issues.push({
1159
1159
  code: "invalid_format",
1160
1160
  format: "jwt",
1161
1161
  input: n.value,
@@ -1163,8 +1163,8 @@ const hr = /* @__PURE__ */ u("$ZodJWT", (e, t) => {
1163
1163
  continue: !t.abort
1164
1164
  });
1165
1165
  };
1166
- }), nt = /* @__PURE__ */ u("$ZodNumber", (e, t) => {
1167
- z.init(e, t), e._zod.pattern = e._zod.bag.pattern ?? Sn, e._zod.parse = (n, r) => {
1166
+ }), ct = /* @__PURE__ */ u("$ZodNumber", (e, t) => {
1167
+ w.init(e, t), e._zod.pattern = e._zod.bag.pattern ?? Nn, e._zod.parse = (n, r) => {
1168
1168
  if (t.coerce)
1169
1169
  try {
1170
1170
  n.value = Number(n.value);
@@ -1173,32 +1173,42 @@ const hr = /* @__PURE__ */ u("$ZodJWT", (e, t) => {
1173
1173
  const o = n.value;
1174
1174
  if (typeof o == "number" && !Number.isNaN(o) && Number.isFinite(o))
1175
1175
  return n;
1176
- const s = typeof o == "number" ? Number.isNaN(o) ? "NaN" : Number.isFinite(o) ? void 0 : "Infinity" : void 0;
1176
+ const i = typeof o == "number" ? Number.isNaN(o) ? "NaN" : Number.isFinite(o) ? void 0 : "Infinity" : void 0;
1177
1177
  return n.issues.push({
1178
1178
  expected: "number",
1179
1179
  code: "invalid_type",
1180
1180
  input: o,
1181
1181
  inst: e,
1182
- ...s ? { received: s } : {}
1182
+ ...i ? { received: i } : {}
1183
1183
  }), n;
1184
1184
  };
1185
- }), mr = /* @__PURE__ */ u("$ZodNumberFormat", (e, t) => {
1186
- Tn.init(e, t), nt.init(e, t);
1187
- }), gr = /* @__PURE__ */ u("$ZodUnknown", (e, t) => {
1188
- z.init(e, t), e._zod.parse = (n) => n;
1189
- }), _r = /* @__PURE__ */ u("$ZodNever", (e, t) => {
1190
- z.init(e, t), e._zod.parse = (n, r) => (n.issues.push({
1185
+ }), br = /* @__PURE__ */ u("$ZodNumberFormat", (e, t) => {
1186
+ Dn.init(e, t), ct.init(e, t);
1187
+ }), yr = /* @__PURE__ */ u("$ZodUnknown", (e, t) => {
1188
+ w.init(e, t), e._zod.parse = (n) => n;
1189
+ }), zr = /* @__PURE__ */ u("$ZodNever", (e, t) => {
1190
+ w.init(e, t), e._zod.parse = (n, r) => (n.issues.push({
1191
1191
  expected: "never",
1192
1192
  code: "invalid_type",
1193
1193
  input: n.value,
1194
1194
  inst: e
1195
1195
  }), n);
1196
+ }), kr = /* @__PURE__ */ u("$ZodVoid", (e, t) => {
1197
+ w.init(e, t), e._zod.parse = (n, r) => {
1198
+ const o = n.value;
1199
+ return typeof o > "u" || n.issues.push({
1200
+ expected: "void",
1201
+ code: "invalid_type",
1202
+ input: o,
1203
+ inst: e
1204
+ }), n;
1205
+ };
1196
1206
  });
1197
1207
  function ze(e, t, n) {
1198
- e.issues.length && t.issues.push(...We(n, e.issues)), t.value[n] = e.value;
1208
+ e.issues.length && t.issues.push(...Xe(n, e.issues)), t.value[n] = e.value;
1199
1209
  }
1200
- const vr = /* @__PURE__ */ u("$ZodArray", (e, t) => {
1201
- z.init(e, t), e._zod.parse = (n, r) => {
1210
+ const $r = /* @__PURE__ */ u("$ZodArray", (e, t) => {
1211
+ w.init(e, t), e._zod.parse = (n, r) => {
1202
1212
  const o = n.value;
1203
1213
  if (!Array.isArray(o))
1204
1214
  return n.issues.push({
@@ -1208,31 +1218,31 @@ const vr = /* @__PURE__ */ u("$ZodArray", (e, t) => {
1208
1218
  inst: e
1209
1219
  }), n;
1210
1220
  n.value = Array(o.length);
1211
- const s = [];
1212
- for (let i = 0; i < o.length; i++) {
1213
- const c = o[i], a = t.element._zod.run({
1221
+ const i = [];
1222
+ for (let s = 0; s < o.length; s++) {
1223
+ const c = o[s], a = t.element._zod.run({
1214
1224
  value: c,
1215
1225
  issues: []
1216
1226
  }, r);
1217
- a instanceof Promise ? s.push(a.then((f) => ze(f, n, i))) : ze(a, n, i);
1227
+ a instanceof Promise ? i.push(a.then((f) => ze(f, n, s))) : ze(a, n, s);
1218
1228
  }
1219
- return s.length ? Promise.all(s).then(() => n) : n;
1229
+ return i.length ? Promise.all(i).then(() => n) : n;
1220
1230
  };
1221
1231
  });
1222
- function H(e, t, n, r, o) {
1232
+ function X(e, t, n, r, o) {
1223
1233
  if (e.issues.length) {
1224
1234
  if (o && !(n in r))
1225
1235
  return;
1226
- t.issues.push(...We(n, e.issues));
1236
+ t.issues.push(...Xe(n, e.issues));
1227
1237
  }
1228
1238
  e.value === void 0 ? n in r && (t.value[n] = void 0) : t.value[n] = e.value;
1229
1239
  }
1230
- function rt(e) {
1240
+ function ut(e) {
1231
1241
  const t = Object.keys(e.shape);
1232
1242
  for (const r of t)
1233
1243
  if (!e.shape?.[r]?._zod?.traits?.has("$ZodType"))
1234
1244
  throw new Error(`Invalid element at key "${r}": expected a Zod schema`);
1235
- const n = Ct(e.shape);
1245
+ const n = Mt(e.shape);
1236
1246
  return {
1237
1247
  ...e,
1238
1248
  keys: t,
@@ -1241,27 +1251,27 @@ function rt(e) {
1241
1251
  optionalKeys: new Set(n)
1242
1252
  };
1243
1253
  }
1244
- function ot(e, t, n, r, o, s) {
1245
- const i = [], c = o.keySet, a = o.catchall._zod, f = a.def.type, l = a.optout === "optional";
1254
+ function at(e, t, n, r, o, i) {
1255
+ const s = [], c = o.keySet, a = o.catchall._zod, f = a.def.type, l = a.optout === "optional";
1246
1256
  for (const m in t) {
1247
1257
  if (c.has(m))
1248
1258
  continue;
1249
1259
  if (f === "never") {
1250
- i.push(m);
1260
+ s.push(m);
1251
1261
  continue;
1252
1262
  }
1253
1263
  const p = a.run({ value: t[m], issues: [] }, r);
1254
- p instanceof Promise ? e.push(p.then((h) => H(h, n, m, t, l))) : H(p, n, m, t, l);
1264
+ p instanceof Promise ? e.push(p.then((h) => X(h, n, m, t, l))) : X(p, n, m, t, l);
1255
1265
  }
1256
- return i.length && n.issues.push({
1266
+ return s.length && n.issues.push({
1257
1267
  code: "unrecognized_keys",
1258
- keys: i,
1268
+ keys: s,
1259
1269
  input: t,
1260
- inst: s
1270
+ inst: i
1261
1271
  }), e.length ? Promise.all(e).then(() => n) : n;
1262
1272
  }
1263
- const zr = /* @__PURE__ */ u("$ZodObject", (e, t) => {
1264
- if (z.init(e, t), !Object.getOwnPropertyDescriptor(t, "shape")?.get) {
1273
+ const Zr = /* @__PURE__ */ u("$ZodObject", (e, t) => {
1274
+ if (w.init(e, t), !Object.getOwnPropertyDescriptor(t, "shape")?.get) {
1265
1275
  const c = t.shape;
1266
1276
  Object.defineProperty(t, "shape", {
1267
1277
  get: () => {
@@ -1272,7 +1282,7 @@ const zr = /* @__PURE__ */ u("$ZodObject", (e, t) => {
1272
1282
  }
1273
1283
  });
1274
1284
  }
1275
- const r = ue(() => rt(t));
1285
+ const r = fe(() => ut(t));
1276
1286
  g(e._zod, "propValues", () => {
1277
1287
  const c = t.shape, a = {};
1278
1288
  for (const f in c) {
@@ -1285,10 +1295,10 @@ const zr = /* @__PURE__ */ u("$ZodObject", (e, t) => {
1285
1295
  }
1286
1296
  return a;
1287
1297
  });
1288
- const o = G, s = t.catchall;
1289
- let i;
1298
+ const o = G, i = t.catchall;
1299
+ let s;
1290
1300
  e._zod.parse = (c, a) => {
1291
- i ?? (i = r.value);
1301
+ s ?? (s = r.value);
1292
1302
  const f = c.value;
1293
1303
  if (!o(f))
1294
1304
  return c.issues.push({
@@ -1298,75 +1308,75 @@ const zr = /* @__PURE__ */ u("$ZodObject", (e, t) => {
1298
1308
  inst: e
1299
1309
  }), c;
1300
1310
  c.value = {};
1301
- const l = [], m = i.shape;
1302
- for (const p of i.keys) {
1311
+ const l = [], m = s.shape;
1312
+ for (const p of s.keys) {
1303
1313
  const h = m[p], $ = h._zod.optout === "optional", y = h._zod.run({ value: f[p], issues: [] }, a);
1304
- y instanceof Promise ? l.push(y.then((V) => H(V, c, p, f, $))) : H(y, c, p, f, $);
1314
+ y instanceof Promise ? l.push(y.then((W) => X(W, c, p, f, $))) : X(y, c, p, f, $);
1305
1315
  }
1306
- return s ? ot(l, f, c, a, r.value, e) : l.length ? Promise.all(l).then(() => c) : c;
1316
+ return i ? at(l, f, c, a, r.value, e) : l.length ? Promise.all(l).then(() => c) : c;
1307
1317
  };
1308
- }), br = /* @__PURE__ */ u("$ZodObjectJIT", (e, t) => {
1309
- zr.init(e, t);
1310
- const n = e._zod.parse, r = ue(() => rt(t)), o = (p) => {
1311
- const h = new Mn(["shape", "payload", "ctx"]), $ = r.value, y = (P) => {
1312
- const O = _e(P);
1313
- return `shape[${O}]._zod.run({ value: input[${O}], issues: [] }, ctx)`;
1318
+ }), Sr = /* @__PURE__ */ u("$ZodObjectJIT", (e, t) => {
1319
+ Zr.init(e, t);
1320
+ const n = e._zod.parse, r = fe(() => ut(t)), o = (p) => {
1321
+ const h = new Hn(["shape", "payload", "ctx"]), $ = r.value, y = (P) => {
1322
+ const S = be(P);
1323
+ return `shape[${S}]._zod.run({ value: input[${S}], issues: [] }, ctx)`;
1314
1324
  };
1315
1325
  h.write("const input = payload.value;");
1316
- const V = /* @__PURE__ */ Object.create(null);
1317
- let zt = 0;
1326
+ const W = /* @__PURE__ */ Object.create(null);
1327
+ let $t = 0;
1318
1328
  for (const P of $.keys)
1319
- V[P] = `key_${zt++}`;
1329
+ W[P] = `key_${$t++}`;
1320
1330
  h.write("const newResult = {};");
1321
1331
  for (const P of $.keys) {
1322
- const O = V[P], E = _e(P), yt = p[P]?._zod?.optout === "optional";
1323
- h.write(`const ${O} = ${y(P)};`), yt ? h.write(`
1324
- if (${O}.issues.length) {
1332
+ const S = W[P], E = be(P), St = p[P]?._zod?.optout === "optional";
1333
+ h.write(`const ${S} = ${y(P)};`), St ? h.write(`
1334
+ if (${S}.issues.length) {
1325
1335
  if (${E} in input) {
1326
- payload.issues = payload.issues.concat(${O}.issues.map(iss => ({
1336
+ payload.issues = payload.issues.concat(${S}.issues.map(iss => ({
1327
1337
  ...iss,
1328
1338
  path: iss.path ? [${E}, ...iss.path] : [${E}]
1329
1339
  })));
1330
1340
  }
1331
1341
  }
1332
1342
 
1333
- if (${O}.value === undefined) {
1343
+ if (${S}.value === undefined) {
1334
1344
  if (${E} in input) {
1335
1345
  newResult[${E}] = undefined;
1336
1346
  }
1337
1347
  } else {
1338
- newResult[${E}] = ${O}.value;
1348
+ newResult[${E}] = ${S}.value;
1339
1349
  }
1340
1350
 
1341
1351
  `) : h.write(`
1342
- if (${O}.issues.length) {
1343
- payload.issues = payload.issues.concat(${O}.issues.map(iss => ({
1352
+ if (${S}.issues.length) {
1353
+ payload.issues = payload.issues.concat(${S}.issues.map(iss => ({
1344
1354
  ...iss,
1345
1355
  path: iss.path ? [${E}, ...iss.path] : [${E}]
1346
1356
  })));
1347
1357
  }
1348
1358
 
1349
- if (${O}.value === undefined) {
1359
+ if (${S}.value === undefined) {
1350
1360
  if (${E} in input) {
1351
1361
  newResult[${E}] = undefined;
1352
1362
  }
1353
1363
  } else {
1354
- newResult[${E}] = ${O}.value;
1364
+ newResult[${E}] = ${S}.value;
1355
1365
  }
1356
1366
 
1357
1367
  `);
1358
1368
  }
1359
1369
  h.write("payload.value = newResult;"), h.write("return payload;");
1360
- const bt = h.compile();
1361
- return (P, O) => bt(p, P, O);
1370
+ const Zt = h.compile();
1371
+ return (P, S) => Zt(p, P, S);
1362
1372
  };
1363
- let s;
1364
- const i = G, c = !Je.jitless, f = c && Dt.value, l = t.catchall;
1373
+ let i;
1374
+ const s = G, c = !Be.jitless, f = c && Ft.value, l = t.catchall;
1365
1375
  let m;
1366
1376
  e._zod.parse = (p, h) => {
1367
1377
  m ?? (m = r.value);
1368
1378
  const $ = p.value;
1369
- return i($) ? c && f && h?.async === !1 && h.jitless !== !0 ? (s || (s = o(t.shape)), p = s(p, h), l ? ot([], $, p, h, m, e) : p) : n(p, h) : (p.issues.push({
1379
+ return s($) ? c && f && h?.async === !1 && h.jitless !== !0 ? (i || (i = o(t.shape)), p = i(p, h), l ? at([], $, p, h, m, e) : p) : n(p, h) : (p.issues.push({
1370
1380
  expected: "object",
1371
1381
  code: "invalid_type",
1372
1382
  input: $,
@@ -1374,70 +1384,70 @@ const zr = /* @__PURE__ */ u("$ZodObject", (e, t) => {
1374
1384
  }), p);
1375
1385
  };
1376
1386
  });
1377
- function be(e, t, n, r) {
1378
- for (const s of e)
1379
- if (s.issues.length === 0)
1380
- return t.value = s.value, t;
1381
- const o = e.filter((s) => !C(s));
1387
+ function ke(e, t, n, r) {
1388
+ for (const i of e)
1389
+ if (i.issues.length === 0)
1390
+ return t.value = i.value, t;
1391
+ const o = e.filter((i) => !C(i));
1382
1392
  return o.length === 1 ? (t.value = o[0].value, o[0]) : (t.issues.push({
1383
1393
  code: "invalid_union",
1384
1394
  input: t.value,
1385
1395
  inst: n,
1386
- errors: e.map((s) => s.issues.map((i) => A(i, r, j())))
1396
+ errors: e.map((i) => i.issues.map((s) => x(s, r, A())))
1387
1397
  }), t);
1388
1398
  }
1389
- const yr = /* @__PURE__ */ u("$ZodUnion", (e, t) => {
1390
- z.init(e, t), g(e._zod, "optin", () => t.options.some((o) => o._zod.optin === "optional") ? "optional" : void 0), g(e._zod, "optout", () => t.options.some((o) => o._zod.optout === "optional") ? "optional" : void 0), g(e._zod, "values", () => {
1399
+ const Or = /* @__PURE__ */ u("$ZodUnion", (e, t) => {
1400
+ w.init(e, t), g(e._zod, "optin", () => t.options.some((o) => o._zod.optin === "optional") ? "optional" : void 0), g(e._zod, "optout", () => t.options.some((o) => o._zod.optout === "optional") ? "optional" : void 0), g(e._zod, "values", () => {
1391
1401
  if (t.options.every((o) => o._zod.values))
1392
1402
  return new Set(t.options.flatMap((o) => Array.from(o._zod.values)));
1393
1403
  }), g(e._zod, "pattern", () => {
1394
1404
  if (t.options.every((o) => o._zod.pattern)) {
1395
- const o = t.options.map((s) => s._zod.pattern);
1396
- return new RegExp(`^(${o.map((s) => fe(s.source)).join("|")})$`);
1405
+ const o = t.options.map((i) => i._zod.pattern);
1406
+ return new RegExp(`^(${o.map((i) => de(i.source)).join("|")})$`);
1397
1407
  }
1398
1408
  });
1399
1409
  const n = t.options.length === 1, r = t.options[0]._zod.run;
1400
- e._zod.parse = (o, s) => {
1410
+ e._zod.parse = (o, i) => {
1401
1411
  if (n)
1402
- return r(o, s);
1403
- let i = !1;
1412
+ return r(o, i);
1413
+ let s = !1;
1404
1414
  const c = [];
1405
1415
  for (const a of t.options) {
1406
1416
  const f = a._zod.run({
1407
1417
  value: o.value,
1408
1418
  issues: []
1409
- }, s);
1419
+ }, i);
1410
1420
  if (f instanceof Promise)
1411
- c.push(f), i = !0;
1421
+ c.push(f), s = !0;
1412
1422
  else {
1413
1423
  if (f.issues.length === 0)
1414
1424
  return f;
1415
1425
  c.push(f);
1416
1426
  }
1417
1427
  }
1418
- return i ? Promise.all(c).then((a) => be(a, o, e, s)) : be(c, o, e, s);
1428
+ return s ? Promise.all(c).then((a) => ke(a, o, e, i)) : ke(c, o, e, i);
1419
1429
  };
1420
- }), wr = /* @__PURE__ */ u("$ZodIntersection", (e, t) => {
1421
- z.init(e, t), e._zod.parse = (n, r) => {
1422
- const o = n.value, s = t.left._zod.run({ value: o, issues: [] }, r), i = t.right._zod.run({ value: o, issues: [] }, r);
1423
- return s instanceof Promise || i instanceof Promise ? Promise.all([s, i]).then(([a, f]) => ye(n, a, f)) : ye(n, s, i);
1430
+ }), Ir = /* @__PURE__ */ u("$ZodIntersection", (e, t) => {
1431
+ w.init(e, t), e._zod.parse = (n, r) => {
1432
+ const o = n.value, i = t.left._zod.run({ value: o, issues: [] }, r), s = t.right._zod.run({ value: o, issues: [] }, r);
1433
+ return i instanceof Promise || s instanceof Promise ? Promise.all([i, s]).then(([a, f]) => $e(n, a, f)) : $e(n, i, s);
1424
1434
  };
1425
1435
  });
1426
- function se(e, t) {
1436
+ function ce(e, t) {
1427
1437
  if (e === t)
1428
1438
  return { valid: !0, data: e };
1429
1439
  if (e instanceof Date && t instanceof Date && +e == +t)
1430
1440
  return { valid: !0, data: e };
1431
- if (M(e) && M(t)) {
1432
- const n = Object.keys(t), r = Object.keys(e).filter((s) => n.indexOf(s) !== -1), o = { ...e, ...t };
1433
- for (const s of r) {
1434
- const i = se(e[s], t[s]);
1435
- if (!i.valid)
1441
+ if (L(e) && L(t)) {
1442
+ const n = Object.keys(t), r = Object.keys(e).filter((i) => n.indexOf(i) !== -1), o = { ...e, ...t };
1443
+ for (const i of r) {
1444
+ const s = ce(e[i], t[i]);
1445
+ if (!s.valid)
1436
1446
  return {
1437
1447
  valid: !1,
1438
- mergeErrorPath: [s, ...i.mergeErrorPath]
1448
+ mergeErrorPath: [i, ...s.mergeErrorPath]
1439
1449
  };
1440
- o[s] = i.data;
1450
+ o[i] = s.data;
1441
1451
  }
1442
1452
  return { valid: !0, data: o };
1443
1453
  }
@@ -1446,19 +1456,19 @@ function se(e, t) {
1446
1456
  return { valid: !1, mergeErrorPath: [] };
1447
1457
  const n = [];
1448
1458
  for (let r = 0; r < e.length; r++) {
1449
- const o = e[r], s = t[r], i = se(o, s);
1450
- if (!i.valid)
1459
+ const o = e[r], i = t[r], s = ce(o, i);
1460
+ if (!s.valid)
1451
1461
  return {
1452
1462
  valid: !1,
1453
- mergeErrorPath: [r, ...i.mergeErrorPath]
1463
+ mergeErrorPath: [r, ...s.mergeErrorPath]
1454
1464
  };
1455
- n.push(i.data);
1465
+ n.push(s.data);
1456
1466
  }
1457
1467
  return { valid: !0, data: n };
1458
1468
  }
1459
1469
  return { valid: !1, mergeErrorPath: [] };
1460
1470
  }
1461
- function ye(e, t, n) {
1471
+ function $e(e, t, n) {
1462
1472
  const r = /* @__PURE__ */ new Map();
1463
1473
  let o;
1464
1474
  for (const c of t.issues)
@@ -1474,84 +1484,84 @@ function ye(e, t, n) {
1474
1484
  r.has(a) || r.set(a, {}), r.get(a).r = !0;
1475
1485
  else
1476
1486
  e.issues.push(c);
1477
- const s = [...r].filter(([, c]) => c.l && c.r).map(([c]) => c);
1478
- if (s.length && o && e.issues.push({ ...o, keys: s }), C(e))
1487
+ const i = [...r].filter(([, c]) => c.l && c.r).map(([c]) => c);
1488
+ if (i.length && o && e.issues.push({ ...o, keys: i }), C(e))
1479
1489
  return e;
1480
- const i = se(t.value, n.value);
1481
- if (!i.valid)
1482
- throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(i.mergeErrorPath)}`);
1483
- return e.value = i.data, e;
1484
- }
1485
- const kr = /* @__PURE__ */ u("$ZodEnum", (e, t) => {
1486
- z.init(e, t);
1487
- const n = Me(t.entries), r = new Set(n);
1488
- e._zod.values = r, e._zod.pattern = new RegExp(`^(${n.filter((o) => Rt.has(typeof o)).map((o) => typeof o == "string" ? q(o) : o.toString()).join("|")})$`), e._zod.parse = (o, s) => {
1489
- const i = o.value;
1490
- return r.has(i) || o.issues.push({
1490
+ const s = ce(t.value, n.value);
1491
+ if (!s.valid)
1492
+ throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(s.mergeErrorPath)}`);
1493
+ return e.value = s.data, e;
1494
+ }
1495
+ const Er = /* @__PURE__ */ u("$ZodEnum", (e, t) => {
1496
+ w.init(e, t);
1497
+ const n = He(t.entries), r = new Set(n);
1498
+ e._zod.values = r, e._zod.pattern = new RegExp(`^(${n.filter((o) => Jt.has(typeof o)).map((o) => typeof o == "string" ? Q(o) : o.toString()).join("|")})$`), e._zod.parse = (o, i) => {
1499
+ const s = o.value;
1500
+ return r.has(s) || o.issues.push({
1491
1501
  code: "invalid_value",
1492
1502
  values: n,
1493
- input: i,
1503
+ input: s,
1494
1504
  inst: e
1495
1505
  }), o;
1496
1506
  };
1497
- }), $r = /* @__PURE__ */ u("$ZodTransform", (e, t) => {
1498
- z.init(e, t), e._zod.parse = (n, r) => {
1507
+ }), Pr = /* @__PURE__ */ u("$ZodTransform", (e, t) => {
1508
+ w.init(e, t), e._zod.parse = (n, r) => {
1499
1509
  if (r.direction === "backward")
1500
- throw new Fe(e.constructor.name);
1510
+ throw new We(e.constructor.name);
1501
1511
  const o = t.transform(n.value, n);
1502
1512
  if (r.async)
1503
- return (o instanceof Promise ? o : Promise.resolve(o)).then((i) => (n.value = i, n));
1513
+ return (o instanceof Promise ? o : Promise.resolve(o)).then((s) => (n.value = s, n));
1504
1514
  if (o instanceof Promise)
1505
- throw new x();
1515
+ throw new U();
1506
1516
  return n.value = o, n;
1507
1517
  };
1508
1518
  });
1509
- function we(e, t) {
1519
+ function Ze(e, t) {
1510
1520
  return e.issues.length && t === void 0 ? { issues: [], value: void 0 } : e;
1511
1521
  }
1512
- const it = /* @__PURE__ */ u("$ZodOptional", (e, t) => {
1513
- z.init(e, t), e._zod.optin = "optional", e._zod.optout = "optional", g(e._zod, "values", () => t.innerType._zod.values ? /* @__PURE__ */ new Set([...t.innerType._zod.values, void 0]) : void 0), g(e._zod, "pattern", () => {
1522
+ const ft = /* @__PURE__ */ u("$ZodOptional", (e, t) => {
1523
+ w.init(e, t), e._zod.optin = "optional", e._zod.optout = "optional", g(e._zod, "values", () => t.innerType._zod.values ? /* @__PURE__ */ new Set([...t.innerType._zod.values, void 0]) : void 0), g(e._zod, "pattern", () => {
1514
1524
  const n = t.innerType._zod.pattern;
1515
- return n ? new RegExp(`^(${fe(n.source)})?$`) : void 0;
1525
+ return n ? new RegExp(`^(${de(n.source)})?$`) : void 0;
1516
1526
  }), e._zod.parse = (n, r) => {
1517
1527
  if (t.innerType._zod.optin === "optional") {
1518
1528
  const o = t.innerType._zod.run(n, r);
1519
- return o instanceof Promise ? o.then((s) => we(s, n.value)) : we(o, n.value);
1529
+ return o instanceof Promise ? o.then((i) => Ze(i, n.value)) : Ze(o, n.value);
1520
1530
  }
1521
1531
  return n.value === void 0 ? n : t.innerType._zod.run(n, r);
1522
1532
  };
1523
- }), Zr = /* @__PURE__ */ u("$ZodExactOptional", (e, t) => {
1524
- it.init(e, t), g(e._zod, "values", () => t.innerType._zod.values), g(e._zod, "pattern", () => t.innerType._zod.pattern), e._zod.parse = (n, r) => t.innerType._zod.run(n, r);
1525
- }), Or = /* @__PURE__ */ u("$ZodNullable", (e, t) => {
1526
- z.init(e, t), g(e._zod, "optin", () => t.innerType._zod.optin), g(e._zod, "optout", () => t.innerType._zod.optout), g(e._zod, "pattern", () => {
1533
+ }), Tr = /* @__PURE__ */ u("$ZodExactOptional", (e, t) => {
1534
+ ft.init(e, t), g(e._zod, "values", () => t.innerType._zod.values), g(e._zod, "pattern", () => t.innerType._zod.pattern), e._zod.parse = (n, r) => t.innerType._zod.run(n, r);
1535
+ }), Nr = /* @__PURE__ */ u("$ZodNullable", (e, t) => {
1536
+ w.init(e, t), g(e._zod, "optin", () => t.innerType._zod.optin), g(e._zod, "optout", () => t.innerType._zod.optout), g(e._zod, "pattern", () => {
1527
1537
  const n = t.innerType._zod.pattern;
1528
- return n ? new RegExp(`^(${fe(n.source)}|null)$`) : void 0;
1538
+ return n ? new RegExp(`^(${de(n.source)}|null)$`) : void 0;
1529
1539
  }), g(e._zod, "values", () => t.innerType._zod.values ? /* @__PURE__ */ new Set([...t.innerType._zod.values, null]) : void 0), e._zod.parse = (n, r) => n.value === null ? n : t.innerType._zod.run(n, r);
1530
- }), Sr = /* @__PURE__ */ u("$ZodDefault", (e, t) => {
1531
- z.init(e, t), e._zod.optin = "optional", g(e._zod, "values", () => t.innerType._zod.values), e._zod.parse = (n, r) => {
1540
+ }), jr = /* @__PURE__ */ u("$ZodDefault", (e, t) => {
1541
+ w.init(e, t), e._zod.optin = "optional", g(e._zod, "values", () => t.innerType._zod.values), e._zod.parse = (n, r) => {
1532
1542
  if (r.direction === "backward")
1533
1543
  return t.innerType._zod.run(n, r);
1534
1544
  if (n.value === void 0)
1535
1545
  return n.value = t.defaultValue, n;
1536
1546
  const o = t.innerType._zod.run(n, r);
1537
- return o instanceof Promise ? o.then((s) => ke(s, t)) : ke(o, t);
1547
+ return o instanceof Promise ? o.then((i) => Se(i, t)) : Se(o, t);
1538
1548
  };
1539
1549
  });
1540
- function ke(e, t) {
1550
+ function Se(e, t) {
1541
1551
  return e.value === void 0 && (e.value = t.defaultValue), e;
1542
1552
  }
1543
- const Ir = /* @__PURE__ */ u("$ZodPrefault", (e, t) => {
1544
- z.init(e, t), e._zod.optin = "optional", g(e._zod, "values", () => t.innerType._zod.values), e._zod.parse = (n, r) => (r.direction === "backward" || n.value === void 0 && (n.value = t.defaultValue), t.innerType._zod.run(n, r));
1545
- }), Er = /* @__PURE__ */ u("$ZodNonOptional", (e, t) => {
1546
- z.init(e, t), g(e._zod, "values", () => {
1553
+ const Ar = /* @__PURE__ */ u("$ZodPrefault", (e, t) => {
1554
+ w.init(e, t), e._zod.optin = "optional", g(e._zod, "values", () => t.innerType._zod.values), e._zod.parse = (n, r) => (r.direction === "backward" || n.value === void 0 && (n.value = t.defaultValue), t.innerType._zod.run(n, r));
1555
+ }), xr = /* @__PURE__ */ u("$ZodNonOptional", (e, t) => {
1556
+ w.init(e, t), g(e._zod, "values", () => {
1547
1557
  const n = t.innerType._zod.values;
1548
1558
  return n ? new Set([...n].filter((r) => r !== void 0)) : void 0;
1549
1559
  }), e._zod.parse = (n, r) => {
1550
1560
  const o = t.innerType._zod.run(n, r);
1551
- return o instanceof Promise ? o.then((s) => $e(s, e)) : $e(o, e);
1561
+ return o instanceof Promise ? o.then((i) => Oe(i, e)) : Oe(o, e);
1552
1562
  };
1553
1563
  });
1554
- function $e(e, t) {
1564
+ function Oe(e, t) {
1555
1565
  return !e.issues.length && e.value === void 0 && e.issues.push({
1556
1566
  code: "invalid_type",
1557
1567
  expected: "nonoptional",
@@ -1559,58 +1569,58 @@ function $e(e, t) {
1559
1569
  inst: t
1560
1570
  }), e;
1561
1571
  }
1562
- const Pr = /* @__PURE__ */ u("$ZodCatch", (e, t) => {
1563
- z.init(e, t), g(e._zod, "optin", () => t.innerType._zod.optin), g(e._zod, "optout", () => t.innerType._zod.optout), g(e._zod, "values", () => t.innerType._zod.values), e._zod.parse = (n, r) => {
1572
+ const Dr = /* @__PURE__ */ u("$ZodCatch", (e, t) => {
1573
+ w.init(e, t), g(e._zod, "optin", () => t.innerType._zod.optin), g(e._zod, "optout", () => t.innerType._zod.optout), g(e._zod, "values", () => t.innerType._zod.values), e._zod.parse = (n, r) => {
1564
1574
  if (r.direction === "backward")
1565
1575
  return t.innerType._zod.run(n, r);
1566
1576
  const o = t.innerType._zod.run(n, r);
1567
- return o instanceof Promise ? o.then((s) => (n.value = s.value, s.issues.length && (n.value = t.catchValue({
1577
+ return o instanceof Promise ? o.then((i) => (n.value = i.value, i.issues.length && (n.value = t.catchValue({
1568
1578
  ...n,
1569
1579
  error: {
1570
- issues: s.issues.map((i) => A(i, r, j()))
1580
+ issues: i.issues.map((s) => x(s, r, A()))
1571
1581
  },
1572
1582
  input: n.value
1573
1583
  }), n.issues = []), n)) : (n.value = o.value, o.issues.length && (n.value = t.catchValue({
1574
1584
  ...n,
1575
1585
  error: {
1576
- issues: o.issues.map((s) => A(s, r, j()))
1586
+ issues: o.issues.map((i) => x(i, r, A()))
1577
1587
  },
1578
1588
  input: n.value
1579
1589
  }), n.issues = []), n);
1580
1590
  };
1581
- }), Tr = /* @__PURE__ */ u("$ZodPipe", (e, t) => {
1582
- z.init(e, t), g(e._zod, "values", () => t.in._zod.values), g(e._zod, "optin", () => t.in._zod.optin), g(e._zod, "optout", () => t.out._zod.optout), g(e._zod, "propValues", () => t.in._zod.propValues), e._zod.parse = (n, r) => {
1591
+ }), Rr = /* @__PURE__ */ u("$ZodPipe", (e, t) => {
1592
+ w.init(e, t), g(e._zod, "values", () => t.in._zod.values), g(e._zod, "optin", () => t.in._zod.optin), g(e._zod, "optout", () => t.out._zod.optout), g(e._zod, "propValues", () => t.in._zod.propValues), e._zod.parse = (n, r) => {
1583
1593
  if (r.direction === "backward") {
1584
- const s = t.out._zod.run(n, r);
1585
- return s instanceof Promise ? s.then((i) => B(i, t.in, r)) : B(s, t.in, r);
1594
+ const i = t.out._zod.run(n, r);
1595
+ return i instanceof Promise ? i.then((s) => H(s, t.in, r)) : H(i, t.in, r);
1586
1596
  }
1587
1597
  const o = t.in._zod.run(n, r);
1588
- return o instanceof Promise ? o.then((s) => B(s, t.out, r)) : B(o, t.out, r);
1598
+ return o instanceof Promise ? o.then((i) => H(i, t.out, r)) : H(o, t.out, r);
1589
1599
  };
1590
1600
  });
1591
- function B(e, t, n) {
1601
+ function H(e, t, n) {
1592
1602
  return e.issues.length ? (e.aborted = !0, e) : t._zod.run({ value: e.value, issues: e.issues }, n);
1593
1603
  }
1594
- const Nr = /* @__PURE__ */ u("$ZodReadonly", (e, t) => {
1595
- z.init(e, t), g(e._zod, "propValues", () => t.innerType._zod.propValues), g(e._zod, "values", () => t.innerType._zod.values), g(e._zod, "optin", () => t.innerType?._zod?.optin), g(e._zod, "optout", () => t.innerType?._zod?.optout), e._zod.parse = (n, r) => {
1604
+ const Cr = /* @__PURE__ */ u("$ZodReadonly", (e, t) => {
1605
+ w.init(e, t), g(e._zod, "propValues", () => t.innerType._zod.propValues), g(e._zod, "values", () => t.innerType._zod.values), g(e._zod, "optin", () => t.innerType?._zod?.optin), g(e._zod, "optout", () => t.innerType?._zod?.optout), e._zod.parse = (n, r) => {
1596
1606
  if (r.direction === "backward")
1597
1607
  return t.innerType._zod.run(n, r);
1598
1608
  const o = t.innerType._zod.run(n, r);
1599
- return o instanceof Promise ? o.then(Ze) : Ze(o);
1609
+ return o instanceof Promise ? o.then(Ie) : Ie(o);
1600
1610
  };
1601
1611
  });
1602
- function Ze(e) {
1612
+ function Ie(e) {
1603
1613
  return e.value = Object.freeze(e.value), e;
1604
1614
  }
1605
- const jr = /* @__PURE__ */ u("$ZodCustom", (e, t) => {
1606
- S.init(e, t), z.init(e, t), e._zod.parse = (n, r) => n, e._zod.check = (n) => {
1615
+ const Ur = /* @__PURE__ */ u("$ZodCustom", (e, t) => {
1616
+ O.init(e, t), w.init(e, t), e._zod.parse = (n, r) => n, e._zod.check = (n) => {
1607
1617
  const r = n.value, o = t.fn(r);
1608
1618
  if (o instanceof Promise)
1609
- return o.then((s) => Oe(s, n, r, e));
1610
- Oe(o, n, r, e);
1619
+ return o.then((i) => Ee(i, n, r, e));
1620
+ Ee(o, n, r, e);
1611
1621
  };
1612
1622
  });
1613
- function Oe(e, t, n, r) {
1623
+ function Ee(e, t, n, r) {
1614
1624
  if (!e) {
1615
1625
  const o = {
1616
1626
  code: "custom",
@@ -1622,11 +1632,11 @@ function Oe(e, t, n, r) {
1622
1632
  continue: !r._zod.def.abort
1623
1633
  // params: inst._zod.def.params,
1624
1634
  };
1625
- r._zod.def.params && (o.params = r._zod.def.params), t.issues.push(L(o));
1635
+ r._zod.def.params && (o.params = r._zod.def.params), t.issues.push(V(o));
1626
1636
  }
1627
1637
  }
1628
- var Se;
1629
- class Ar {
1638
+ var Pe;
1639
+ class Fr {
1630
1640
  constructor() {
1631
1641
  this._map = /* @__PURE__ */ new WeakMap(), this._idmap = /* @__PURE__ */ new Map();
1632
1642
  }
@@ -1655,20 +1665,20 @@ class Ar {
1655
1665
  return this._map.has(t);
1656
1666
  }
1657
1667
  }
1658
- function Dr() {
1659
- return new Ar();
1668
+ function Jr() {
1669
+ return new Fr();
1660
1670
  }
1661
- (Se = globalThis).__zod_globalRegistry ?? (Se.__zod_globalRegistry = Dr());
1662
- const J = globalThis.__zod_globalRegistry;
1671
+ (Pe = globalThis).__zod_globalRegistry ?? (Pe.__zod_globalRegistry = Jr());
1672
+ const M = globalThis.__zod_globalRegistry;
1663
1673
  // @__NO_SIDE_EFFECTS__
1664
- function Rr(e, t) {
1674
+ function Mr(e, t) {
1665
1675
  return new e({
1666
1676
  type: "string",
1667
1677
  ...d(t)
1668
1678
  });
1669
1679
  }
1670
1680
  // @__NO_SIDE_EFFECTS__
1671
- function Cr(e, t) {
1681
+ function Lr(e, t) {
1672
1682
  return new e({
1673
1683
  type: "string",
1674
1684
  format: "email",
@@ -1678,7 +1688,7 @@ function Cr(e, t) {
1678
1688
  });
1679
1689
  }
1680
1690
  // @__NO_SIDE_EFFECTS__
1681
- function Ie(e, t) {
1691
+ function Te(e, t) {
1682
1692
  return new e({
1683
1693
  type: "string",
1684
1694
  format: "guid",
@@ -1688,7 +1698,7 @@ function Ie(e, t) {
1688
1698
  });
1689
1699
  }
1690
1700
  // @__NO_SIDE_EFFECTS__
1691
- function xr(e, t) {
1701
+ function Vr(e, t) {
1692
1702
  return new e({
1693
1703
  type: "string",
1694
1704
  format: "uuid",
@@ -1698,7 +1708,7 @@ function xr(e, t) {
1698
1708
  });
1699
1709
  }
1700
1710
  // @__NO_SIDE_EFFECTS__
1701
- function Ur(e, t) {
1711
+ function Wr(e, t) {
1702
1712
  return new e({
1703
1713
  type: "string",
1704
1714
  format: "uuid",
@@ -1709,7 +1719,7 @@ function Ur(e, t) {
1709
1719
  });
1710
1720
  }
1711
1721
  // @__NO_SIDE_EFFECTS__
1712
- function Fr(e, t) {
1722
+ function Br(e, t) {
1713
1723
  return new e({
1714
1724
  type: "string",
1715
1725
  format: "uuid",
@@ -1720,7 +1730,7 @@ function Fr(e, t) {
1720
1730
  });
1721
1731
  }
1722
1732
  // @__NO_SIDE_EFFECTS__
1723
- function Jr(e, t) {
1733
+ function Hr(e, t) {
1724
1734
  return new e({
1725
1735
  type: "string",
1726
1736
  format: "uuid",
@@ -1731,7 +1741,7 @@ function Jr(e, t) {
1731
1741
  });
1732
1742
  }
1733
1743
  // @__NO_SIDE_EFFECTS__
1734
- function Mr(e, t) {
1744
+ function Kr(e, t) {
1735
1745
  return new e({
1736
1746
  type: "string",
1737
1747
  format: "url",
@@ -1741,7 +1751,7 @@ function Mr(e, t) {
1741
1751
  });
1742
1752
  }
1743
1753
  // @__NO_SIDE_EFFECTS__
1744
- function Lr(e, t) {
1754
+ function Gr(e, t) {
1745
1755
  return new e({
1746
1756
  type: "string",
1747
1757
  format: "emoji",
@@ -1751,7 +1761,7 @@ function Lr(e, t) {
1751
1761
  });
1752
1762
  }
1753
1763
  // @__NO_SIDE_EFFECTS__
1754
- function Vr(e, t) {
1764
+ function Xr(e, t) {
1755
1765
  return new e({
1756
1766
  type: "string",
1757
1767
  format: "nanoid",
@@ -1761,7 +1771,7 @@ function Vr(e, t) {
1761
1771
  });
1762
1772
  }
1763
1773
  // @__NO_SIDE_EFFECTS__
1764
- function Wr(e, t) {
1774
+ function Yr(e, t) {
1765
1775
  return new e({
1766
1776
  type: "string",
1767
1777
  format: "cuid",
@@ -1771,7 +1781,7 @@ function Wr(e, t) {
1771
1781
  });
1772
1782
  }
1773
1783
  // @__NO_SIDE_EFFECTS__
1774
- function Br(e, t) {
1784
+ function qr(e, t) {
1775
1785
  return new e({
1776
1786
  type: "string",
1777
1787
  format: "cuid2",
@@ -1781,7 +1791,7 @@ function Br(e, t) {
1781
1791
  });
1782
1792
  }
1783
1793
  // @__NO_SIDE_EFFECTS__
1784
- function Kr(e, t) {
1794
+ function Qr(e, t) {
1785
1795
  return new e({
1786
1796
  type: "string",
1787
1797
  format: "ulid",
@@ -1791,7 +1801,7 @@ function Kr(e, t) {
1791
1801
  });
1792
1802
  }
1793
1803
  // @__NO_SIDE_EFFECTS__
1794
- function Gr(e, t) {
1804
+ function eo(e, t) {
1795
1805
  return new e({
1796
1806
  type: "string",
1797
1807
  format: "xid",
@@ -1801,7 +1811,7 @@ function Gr(e, t) {
1801
1811
  });
1802
1812
  }
1803
1813
  // @__NO_SIDE_EFFECTS__
1804
- function Hr(e, t) {
1814
+ function to(e, t) {
1805
1815
  return new e({
1806
1816
  type: "string",
1807
1817
  format: "ksuid",
@@ -1811,7 +1821,7 @@ function Hr(e, t) {
1811
1821
  });
1812
1822
  }
1813
1823
  // @__NO_SIDE_EFFECTS__
1814
- function Xr(e, t) {
1824
+ function no(e, t) {
1815
1825
  return new e({
1816
1826
  type: "string",
1817
1827
  format: "ipv4",
@@ -1821,7 +1831,7 @@ function Xr(e, t) {
1821
1831
  });
1822
1832
  }
1823
1833
  // @__NO_SIDE_EFFECTS__
1824
- function Yr(e, t) {
1834
+ function ro(e, t) {
1825
1835
  return new e({
1826
1836
  type: "string",
1827
1837
  format: "ipv6",
@@ -1831,7 +1841,7 @@ function Yr(e, t) {
1831
1841
  });
1832
1842
  }
1833
1843
  // @__NO_SIDE_EFFECTS__
1834
- function qr(e, t) {
1844
+ function oo(e, t) {
1835
1845
  return new e({
1836
1846
  type: "string",
1837
1847
  format: "cidrv4",
@@ -1841,7 +1851,7 @@ function qr(e, t) {
1841
1851
  });
1842
1852
  }
1843
1853
  // @__NO_SIDE_EFFECTS__
1844
- function Qr(e, t) {
1854
+ function so(e, t) {
1845
1855
  return new e({
1846
1856
  type: "string",
1847
1857
  format: "cidrv6",
@@ -1851,7 +1861,7 @@ function Qr(e, t) {
1851
1861
  });
1852
1862
  }
1853
1863
  // @__NO_SIDE_EFFECTS__
1854
- function eo(e, t) {
1864
+ function io(e, t) {
1855
1865
  return new e({
1856
1866
  type: "string",
1857
1867
  format: "base64",
@@ -1861,7 +1871,7 @@ function eo(e, t) {
1861
1871
  });
1862
1872
  }
1863
1873
  // @__NO_SIDE_EFFECTS__
1864
- function to(e, t) {
1874
+ function co(e, t) {
1865
1875
  return new e({
1866
1876
  type: "string",
1867
1877
  format: "base64url",
@@ -1871,7 +1881,7 @@ function to(e, t) {
1871
1881
  });
1872
1882
  }
1873
1883
  // @__NO_SIDE_EFFECTS__
1874
- function no(e, t) {
1884
+ function uo(e, t) {
1875
1885
  return new e({
1876
1886
  type: "string",
1877
1887
  format: "e164",
@@ -1881,7 +1891,7 @@ function no(e, t) {
1881
1891
  });
1882
1892
  }
1883
1893
  // @__NO_SIDE_EFFECTS__
1884
- function ro(e, t) {
1894
+ function ao(e, t) {
1885
1895
  return new e({
1886
1896
  type: "string",
1887
1897
  format: "jwt",
@@ -1891,7 +1901,7 @@ function ro(e, t) {
1891
1901
  });
1892
1902
  }
1893
1903
  // @__NO_SIDE_EFFECTS__
1894
- function oo(e, t) {
1904
+ function fo(e, t) {
1895
1905
  return new e({
1896
1906
  type: "string",
1897
1907
  format: "datetime",
@@ -1903,7 +1913,7 @@ function oo(e, t) {
1903
1913
  });
1904
1914
  }
1905
1915
  // @__NO_SIDE_EFFECTS__
1906
- function io(e, t) {
1916
+ function lo(e, t) {
1907
1917
  return new e({
1908
1918
  type: "string",
1909
1919
  format: "date",
@@ -1912,7 +1922,7 @@ function io(e, t) {
1912
1922
  });
1913
1923
  }
1914
1924
  // @__NO_SIDE_EFFECTS__
1915
- function so(e, t) {
1925
+ function po(e, t) {
1916
1926
  return new e({
1917
1927
  type: "string",
1918
1928
  format: "time",
@@ -1922,7 +1932,7 @@ function so(e, t) {
1922
1932
  });
1923
1933
  }
1924
1934
  // @__NO_SIDE_EFFECTS__
1925
- function co(e, t) {
1935
+ function ho(e, t) {
1926
1936
  return new e({
1927
1937
  type: "string",
1928
1938
  format: "duration",
@@ -1931,7 +1941,7 @@ function co(e, t) {
1931
1941
  });
1932
1942
  }
1933
1943
  // @__NO_SIDE_EFFECTS__
1934
- function uo(e, t) {
1944
+ function mo(e, t) {
1935
1945
  return new e({
1936
1946
  type: "number",
1937
1947
  checks: [],
@@ -1939,7 +1949,7 @@ function uo(e, t) {
1939
1949
  });
1940
1950
  }
1941
1951
  // @__NO_SIDE_EFFECTS__
1942
- function ao(e, t) {
1952
+ function go(e, t) {
1943
1953
  return new e({
1944
1954
  type: "number",
1945
1955
  check: "number_format",
@@ -1949,21 +1959,28 @@ function ao(e, t) {
1949
1959
  });
1950
1960
  }
1951
1961
  // @__NO_SIDE_EFFECTS__
1952
- function fo(e) {
1962
+ function _o(e) {
1953
1963
  return new e({
1954
1964
  type: "unknown"
1955
1965
  });
1956
1966
  }
1957
1967
  // @__NO_SIDE_EFFECTS__
1958
- function lo(e, t) {
1968
+ function vo(e, t) {
1959
1969
  return new e({
1960
1970
  type: "never",
1961
1971
  ...d(t)
1962
1972
  });
1963
1973
  }
1964
1974
  // @__NO_SIDE_EFFECTS__
1965
- function Ee(e, t) {
1966
- return new Qe({
1975
+ function wo(e, t) {
1976
+ return new e({
1977
+ type: "void",
1978
+ ...d(t)
1979
+ });
1980
+ }
1981
+ // @__NO_SIDE_EFFECTS__
1982
+ function Ne(e, t) {
1983
+ return new ot({
1967
1984
  check: "less_than",
1968
1985
  ...d(t),
1969
1986
  value: e,
@@ -1971,8 +1988,8 @@ function Ee(e, t) {
1971
1988
  });
1972
1989
  }
1973
1990
  // @__NO_SIDE_EFFECTS__
1974
- function re(e, t) {
1975
- return new Qe({
1991
+ function oe(e, t) {
1992
+ return new ot({
1976
1993
  check: "less_than",
1977
1994
  ...d(t),
1978
1995
  value: e,
@@ -1980,8 +1997,8 @@ function re(e, t) {
1980
1997
  });
1981
1998
  }
1982
1999
  // @__NO_SIDE_EFFECTS__
1983
- function Pe(e, t) {
1984
- return new et({
2000
+ function je(e, t) {
2001
+ return new st({
1985
2002
  check: "greater_than",
1986
2003
  ...d(t),
1987
2004
  value: e,
@@ -1989,8 +2006,8 @@ function Pe(e, t) {
1989
2006
  });
1990
2007
  }
1991
2008
  // @__NO_SIDE_EFFECTS__
1992
- function oe(e, t) {
1993
- return new et({
2009
+ function se(e, t) {
2010
+ return new st({
1994
2011
  check: "greater_than",
1995
2012
  ...d(t),
1996
2013
  value: e,
@@ -1998,40 +2015,40 @@ function oe(e, t) {
1998
2015
  });
1999
2016
  }
2000
2017
  // @__NO_SIDE_EFFECTS__
2001
- function Te(e, t) {
2002
- return new Pn({
2018
+ function Ae(e, t) {
2019
+ return new xn({
2003
2020
  check: "multiple_of",
2004
2021
  ...d(t),
2005
2022
  value: e
2006
2023
  });
2007
2024
  }
2008
2025
  // @__NO_SIDE_EFFECTS__
2009
- function st(e, t) {
2010
- return new Nn({
2026
+ function lt(e, t) {
2027
+ return new Rn({
2011
2028
  check: "max_length",
2012
2029
  ...d(t),
2013
2030
  maximum: e
2014
2031
  });
2015
2032
  }
2016
2033
  // @__NO_SIDE_EFFECTS__
2017
- function X(e, t) {
2018
- return new jn({
2034
+ function Y(e, t) {
2035
+ return new Cn({
2019
2036
  check: "min_length",
2020
2037
  ...d(t),
2021
2038
  minimum: e
2022
2039
  });
2023
2040
  }
2024
2041
  // @__NO_SIDE_EFFECTS__
2025
- function ct(e, t) {
2026
- return new An({
2042
+ function dt(e, t) {
2043
+ return new Un({
2027
2044
  check: "length_equals",
2028
2045
  ...d(t),
2029
2046
  length: e
2030
2047
  });
2031
2048
  }
2032
2049
  // @__NO_SIDE_EFFECTS__
2033
- function po(e, t) {
2034
- return new Dn({
2050
+ function bo(e, t) {
2051
+ return new Fn({
2035
2052
  check: "string_format",
2036
2053
  format: "regex",
2037
2054
  ...d(t),
@@ -2039,24 +2056,24 @@ function po(e, t) {
2039
2056
  });
2040
2057
  }
2041
2058
  // @__NO_SIDE_EFFECTS__
2042
- function ho(e) {
2043
- return new Rn({
2059
+ function yo(e) {
2060
+ return new Jn({
2044
2061
  check: "string_format",
2045
2062
  format: "lowercase",
2046
2063
  ...d(e)
2047
2064
  });
2048
2065
  }
2049
2066
  // @__NO_SIDE_EFFECTS__
2050
- function mo(e) {
2051
- return new Cn({
2067
+ function zo(e) {
2068
+ return new Mn({
2052
2069
  check: "string_format",
2053
2070
  format: "uppercase",
2054
2071
  ...d(e)
2055
2072
  });
2056
2073
  }
2057
2074
  // @__NO_SIDE_EFFECTS__
2058
- function go(e, t) {
2059
- return new xn({
2075
+ function ko(e, t) {
2076
+ return new Ln({
2060
2077
  check: "string_format",
2061
2078
  format: "includes",
2062
2079
  ...d(t),
@@ -2064,8 +2081,8 @@ function go(e, t) {
2064
2081
  });
2065
2082
  }
2066
2083
  // @__NO_SIDE_EFFECTS__
2067
- function _o(e, t) {
2068
- return new Un({
2084
+ function $o(e, t) {
2085
+ return new Vn({
2069
2086
  check: "string_format",
2070
2087
  format: "starts_with",
2071
2088
  ...d(t),
@@ -2073,8 +2090,8 @@ function _o(e, t) {
2073
2090
  });
2074
2091
  }
2075
2092
  // @__NO_SIDE_EFFECTS__
2076
- function vo(e, t) {
2077
- return new Fn({
2093
+ function Zo(e, t) {
2094
+ return new Wn({
2078
2095
  check: "string_format",
2079
2096
  format: "ends_with",
2080
2097
  ...d(t),
@@ -2082,34 +2099,34 @@ function vo(e, t) {
2082
2099
  });
2083
2100
  }
2084
2101
  // @__NO_SIDE_EFFECTS__
2085
- function U(e) {
2086
- return new Jn({
2102
+ function F(e) {
2103
+ return new Bn({
2087
2104
  check: "overwrite",
2088
2105
  tx: e
2089
2106
  });
2090
2107
  }
2091
2108
  // @__NO_SIDE_EFFECTS__
2092
- function zo(e) {
2093
- return /* @__PURE__ */ U((t) => t.normalize(e));
2109
+ function So(e) {
2110
+ return /* @__PURE__ */ F((t) => t.normalize(e));
2094
2111
  }
2095
2112
  // @__NO_SIDE_EFFECTS__
2096
- function bo() {
2097
- return /* @__PURE__ */ U((e) => e.trim());
2113
+ function Oo() {
2114
+ return /* @__PURE__ */ F((e) => e.trim());
2098
2115
  }
2099
2116
  // @__NO_SIDE_EFFECTS__
2100
- function yo() {
2101
- return /* @__PURE__ */ U((e) => e.toLowerCase());
2117
+ function Io() {
2118
+ return /* @__PURE__ */ F((e) => e.toLowerCase());
2102
2119
  }
2103
2120
  // @__NO_SIDE_EFFECTS__
2104
- function wo() {
2105
- return /* @__PURE__ */ U((e) => e.toUpperCase());
2121
+ function Eo() {
2122
+ return /* @__PURE__ */ F((e) => e.toUpperCase());
2106
2123
  }
2107
2124
  // @__NO_SIDE_EFFECTS__
2108
- function ko() {
2109
- return /* @__PURE__ */ U((e) => At(e));
2125
+ function Po() {
2126
+ return /* @__PURE__ */ F((e) => Ut(e));
2110
2127
  }
2111
2128
  // @__NO_SIDE_EFFECTS__
2112
- function $o(e, t, n) {
2129
+ function To(e, t, n) {
2113
2130
  return new e({
2114
2131
  type: "array",
2115
2132
  element: t,
@@ -2120,7 +2137,7 @@ function $o(e, t, n) {
2120
2137
  });
2121
2138
  }
2122
2139
  // @__NO_SIDE_EFFECTS__
2123
- function Zo(e, t, n) {
2140
+ function No(e, t, n) {
2124
2141
  return new e({
2125
2142
  type: "custom",
2126
2143
  check: "custom",
@@ -2129,30 +2146,30 @@ function Zo(e, t, n) {
2129
2146
  });
2130
2147
  }
2131
2148
  // @__NO_SIDE_EFFECTS__
2132
- function Oo(e) {
2133
- const t = /* @__PURE__ */ So((n) => (n.addIssue = (r) => {
2149
+ function jo(e) {
2150
+ const t = /* @__PURE__ */ Ao((n) => (n.addIssue = (r) => {
2134
2151
  if (typeof r == "string")
2135
- n.issues.push(L(r, n.value, t._zod.def));
2152
+ n.issues.push(V(r, n.value, t._zod.def));
2136
2153
  else {
2137
2154
  const o = r;
2138
- o.fatal && (o.continue = !1), o.code ?? (o.code = "custom"), o.input ?? (o.input = n.value), o.inst ?? (o.inst = t), o.continue ?? (o.continue = !t._zod.def.abort), n.issues.push(L(o));
2155
+ o.fatal && (o.continue = !1), o.code ?? (o.code = "custom"), o.input ?? (o.input = n.value), o.inst ?? (o.inst = t), o.continue ?? (o.continue = !t._zod.def.abort), n.issues.push(V(o));
2139
2156
  }
2140
2157
  }, e(n.value, n)));
2141
2158
  return t;
2142
2159
  }
2143
2160
  // @__NO_SIDE_EFFECTS__
2144
- function So(e, t) {
2145
- const n = new S({
2161
+ function Ao(e, t) {
2162
+ const n = new O({
2146
2163
  check: "custom",
2147
2164
  ...d(t)
2148
2165
  });
2149
2166
  return n._zod.check = e, n;
2150
2167
  }
2151
- function ut(e) {
2168
+ function pt(e) {
2152
2169
  let t = e?.target ?? "draft-2020-12";
2153
2170
  return t === "draft-4" && (t = "draft-04"), t === "draft-7" && (t = "draft-07"), {
2154
2171
  processors: e.processors ?? {},
2155
- metadataRegistry: e?.metadata ?? J,
2172
+ metadataRegistry: e?.metadata ?? M,
2156
2173
  target: t,
2157
2174
  unrepresentable: e?.unrepresentable ?? "throw",
2158
2175
  override: e?.override ?? (() => {
@@ -2167,14 +2184,14 @@ function ut(e) {
2167
2184
  }
2168
2185
  function k(e, t, n = { path: [], schemaPath: [] }) {
2169
2186
  var r;
2170
- const o = e._zod.def, s = t.seen.get(e);
2171
- if (s)
2172
- return s.count++, n.schemaPath.includes(e) && (s.cycle = n.path), s.schema;
2173
- const i = { schema: {}, count: 1, cycle: void 0, path: n.path };
2174
- t.seen.set(e, i);
2187
+ const o = e._zod.def, i = t.seen.get(e);
2188
+ if (i)
2189
+ return i.count++, n.schemaPath.includes(e) && (i.cycle = n.path), i.schema;
2190
+ const s = { schema: {}, count: 1, cycle: void 0, path: n.path };
2191
+ t.seen.set(e, s);
2175
2192
  const c = e._zod.toJSONSchema?.();
2176
2193
  if (c)
2177
- i.schema = c;
2194
+ s.schema = c;
2178
2195
  else {
2179
2196
  const l = {
2180
2197
  ...n,
@@ -2182,50 +2199,50 @@ function k(e, t, n = { path: [], schemaPath: [] }) {
2182
2199
  path: n.path
2183
2200
  };
2184
2201
  if (e._zod.processJSONSchema)
2185
- e._zod.processJSONSchema(t, i.schema, l);
2202
+ e._zod.processJSONSchema(t, s.schema, l);
2186
2203
  else {
2187
- const p = i.schema, h = t.processors[o.type];
2204
+ const p = s.schema, h = t.processors[o.type];
2188
2205
  if (!h)
2189
2206
  throw new Error(`[toJSONSchema]: Non-representable type encountered: ${o.type}`);
2190
2207
  h(e, t, p, l);
2191
2208
  }
2192
2209
  const m = e._zod.parent;
2193
- m && (i.ref || (i.ref = m), k(m, t, l), t.seen.get(m).isParent = !0);
2210
+ m && (s.ref || (s.ref = m), k(m, t, l), t.seen.get(m).isParent = !0);
2194
2211
  }
2195
2212
  const a = t.metadataRegistry.get(e);
2196
- return a && Object.assign(i.schema, a), t.io === "input" && Z(e) && (delete i.schema.examples, delete i.schema.default), t.io === "input" && i.schema._prefault && ((r = i.schema).default ?? (r.default = i.schema._prefault)), delete i.schema._prefault, t.seen.get(e).schema;
2213
+ return a && Object.assign(s.schema, a), t.io === "input" && Z(e) && (delete s.schema.examples, delete s.schema.default), t.io === "input" && s.schema._prefault && ((r = s.schema).default ?? (r.default = s.schema._prefault)), delete s.schema._prefault, t.seen.get(e).schema;
2197
2214
  }
2198
- function at(e, t) {
2215
+ function ht(e, t) {
2199
2216
  const n = e.seen.get(t);
2200
2217
  if (!n)
2201
2218
  throw new Error("Unprocessed schema. This is a bug in Zod.");
2202
2219
  const r = /* @__PURE__ */ new Map();
2203
- for (const i of e.seen.entries()) {
2204
- const c = e.metadataRegistry.get(i[0])?.id;
2220
+ for (const s of e.seen.entries()) {
2221
+ const c = e.metadataRegistry.get(s[0])?.id;
2205
2222
  if (c) {
2206
2223
  const a = r.get(c);
2207
- if (a && a !== i[0])
2224
+ if (a && a !== s[0])
2208
2225
  throw new Error(`Duplicate schema id "${c}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);
2209
- r.set(c, i[0]);
2226
+ r.set(c, s[0]);
2210
2227
  }
2211
2228
  }
2212
- const o = (i) => {
2229
+ const o = (s) => {
2213
2230
  const c = e.target === "draft-2020-12" ? "$defs" : "definitions";
2214
2231
  if (e.external) {
2215
- const m = e.external.registry.get(i[0])?.id, p = e.external.uri ?? (($) => $);
2232
+ const m = e.external.registry.get(s[0])?.id, p = e.external.uri ?? (($) => $);
2216
2233
  if (m)
2217
2234
  return { ref: p(m) };
2218
- const h = i[1].defId ?? i[1].schema.id ?? `schema${e.counter++}`;
2219
- return i[1].defId = h, { defId: h, ref: `${p("__shared")}#/${c}/${h}` };
2235
+ const h = s[1].defId ?? s[1].schema.id ?? `schema${e.counter++}`;
2236
+ return s[1].defId = h, { defId: h, ref: `${p("__shared")}#/${c}/${h}` };
2220
2237
  }
2221
- if (i[1] === n)
2238
+ if (s[1] === n)
2222
2239
  return { ref: "#" };
2223
- const f = `#/${c}/`, l = i[1].schema.id ?? `__schema${e.counter++}`;
2240
+ const f = `#/${c}/`, l = s[1].schema.id ?? `__schema${e.counter++}`;
2224
2241
  return { defId: l, ref: f + l };
2225
- }, s = (i) => {
2226
- if (i[1].schema.$ref)
2242
+ }, i = (s) => {
2243
+ if (s[1].schema.$ref)
2227
2244
  return;
2228
- const c = i[1], { ref: a, defId: f } = o(i);
2245
+ const c = s[1], { ref: a, defId: f } = o(s);
2229
2246
  c.def = { ...c.schema }, f && (c.defId = f);
2230
2247
  const l = c.schema;
2231
2248
  for (const m in l)
@@ -2233,60 +2250,60 @@ function at(e, t) {
2233
2250
  l.$ref = a;
2234
2251
  };
2235
2252
  if (e.cycles === "throw")
2236
- for (const i of e.seen.entries()) {
2237
- const c = i[1];
2253
+ for (const s of e.seen.entries()) {
2254
+ const c = s[1];
2238
2255
  if (c.cycle)
2239
2256
  throw new Error(`Cycle detected: #/${c.cycle?.join("/")}/<root>
2240
2257
 
2241
2258
  Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`);
2242
2259
  }
2243
- for (const i of e.seen.entries()) {
2244
- const c = i[1];
2245
- if (t === i[0]) {
2246
- s(i);
2260
+ for (const s of e.seen.entries()) {
2261
+ const c = s[1];
2262
+ if (t === s[0]) {
2263
+ i(s);
2247
2264
  continue;
2248
2265
  }
2249
2266
  if (e.external) {
2250
- const f = e.external.registry.get(i[0])?.id;
2251
- if (t !== i[0] && f) {
2252
- s(i);
2267
+ const f = e.external.registry.get(s[0])?.id;
2268
+ if (t !== s[0] && f) {
2269
+ i(s);
2253
2270
  continue;
2254
2271
  }
2255
2272
  }
2256
- if (e.metadataRegistry.get(i[0])?.id) {
2257
- s(i);
2273
+ if (e.metadataRegistry.get(s[0])?.id) {
2274
+ i(s);
2258
2275
  continue;
2259
2276
  }
2260
2277
  if (c.cycle) {
2261
- s(i);
2278
+ i(s);
2262
2279
  continue;
2263
2280
  }
2264
2281
  if (c.count > 1 && e.reused === "ref") {
2265
- s(i);
2282
+ i(s);
2266
2283
  continue;
2267
2284
  }
2268
2285
  }
2269
2286
  }
2270
- function ft(e, t) {
2287
+ function mt(e, t) {
2271
2288
  const n = e.seen.get(t);
2272
2289
  if (!n)
2273
2290
  throw new Error("Unprocessed schema. This is a bug in Zod.");
2274
- const r = (i) => {
2275
- const c = e.seen.get(i);
2291
+ const r = (s) => {
2292
+ const c = e.seen.get(s);
2276
2293
  if (c.ref === null)
2277
2294
  return;
2278
2295
  const a = c.def ?? c.schema, f = { ...a }, l = c.ref;
2279
2296
  if (c.ref = null, l) {
2280
2297
  r(l);
2281
2298
  const p = e.seen.get(l), h = p.schema;
2282
- if (h.$ref && (e.target === "draft-07" || e.target === "draft-04" || e.target === "openapi-3.0") ? (a.allOf = a.allOf ?? [], a.allOf.push(h)) : Object.assign(a, h), Object.assign(a, f), i._zod.parent === l)
2299
+ if (h.$ref && (e.target === "draft-07" || e.target === "draft-04" || e.target === "openapi-3.0") ? (a.allOf = a.allOf ?? [], a.allOf.push(h)) : Object.assign(a, h), Object.assign(a, f), s._zod.parent === l)
2283
2300
  for (const y in a)
2284
2301
  y === "$ref" || y === "allOf" || y in f || delete a[y];
2285
2302
  if (h.$ref && p.def)
2286
2303
  for (const y in a)
2287
2304
  y === "$ref" || y === "allOf" || y in p.def && JSON.stringify(a[y]) === JSON.stringify(p.def[y]) && delete a[y];
2288
2305
  }
2289
- const m = i._zod.parent;
2306
+ const m = s._zod.parent;
2290
2307
  if (m && m !== l) {
2291
2308
  r(m);
2292
2309
  const p = e.seen.get(m);
@@ -2295,40 +2312,40 @@ function ft(e, t) {
2295
2312
  h === "$ref" || h === "allOf" || h in p.def && JSON.stringify(a[h]) === JSON.stringify(p.def[h]) && delete a[h];
2296
2313
  }
2297
2314
  e.override({
2298
- zodSchema: i,
2315
+ zodSchema: s,
2299
2316
  jsonSchema: a,
2300
2317
  path: c.path ?? []
2301
2318
  });
2302
2319
  };
2303
- for (const i of [...e.seen.entries()].reverse())
2304
- r(i[0]);
2320
+ for (const s of [...e.seen.entries()].reverse())
2321
+ r(s[0]);
2305
2322
  const o = {};
2306
2323
  if (e.target === "draft-2020-12" ? o.$schema = "https://json-schema.org/draft/2020-12/schema" : e.target === "draft-07" ? o.$schema = "http://json-schema.org/draft-07/schema#" : e.target === "draft-04" ? o.$schema = "http://json-schema.org/draft-04/schema#" : e.target, e.external?.uri) {
2307
- const i = e.external.registry.get(t)?.id;
2308
- if (!i)
2324
+ const s = e.external.registry.get(t)?.id;
2325
+ if (!s)
2309
2326
  throw new Error("Schema is missing an `id` property");
2310
- o.$id = e.external.uri(i);
2327
+ o.$id = e.external.uri(s);
2311
2328
  }
2312
2329
  Object.assign(o, n.def ?? n.schema);
2313
- const s = e.external?.defs ?? {};
2314
- for (const i of e.seen.entries()) {
2315
- const c = i[1];
2316
- c.def && c.defId && (s[c.defId] = c.def);
2330
+ const i = e.external?.defs ?? {};
2331
+ for (const s of e.seen.entries()) {
2332
+ const c = s[1];
2333
+ c.def && c.defId && (i[c.defId] = c.def);
2317
2334
  }
2318
- e.external || Object.keys(s).length > 0 && (e.target === "draft-2020-12" ? o.$defs = s : o.definitions = s);
2335
+ e.external || Object.keys(i).length > 0 && (e.target === "draft-2020-12" ? o.$defs = i : o.definitions = i);
2319
2336
  try {
2320
- const i = JSON.parse(JSON.stringify(o));
2321
- return Object.defineProperty(i, "~standard", {
2337
+ const s = JSON.parse(JSON.stringify(o));
2338
+ return Object.defineProperty(s, "~standard", {
2322
2339
  value: {
2323
2340
  ...t["~standard"],
2324
2341
  jsonSchema: {
2325
- input: Y(t, "input", e.processors),
2326
- output: Y(t, "output", e.processors)
2342
+ input: q(t, "input", e.processors),
2343
+ output: q(t, "output", e.processors)
2327
2344
  }
2328
2345
  },
2329
2346
  enumerable: !1,
2330
2347
  writable: !1
2331
- }), i;
2348
+ }), s;
2332
2349
  } catch {
2333
2350
  throw new Error("Error converting schema to JSON.");
2334
2351
  }
@@ -2375,24 +2392,24 @@ function Z(e, t) {
2375
2392
  }
2376
2393
  return !1;
2377
2394
  }
2378
- const Io = (e, t = {}) => (n) => {
2379
- const r = ut({ ...n, processors: t });
2380
- return k(e, r), at(r, e), ft(r, e);
2381
- }, Y = (e, t, n = {}) => (r) => {
2382
- const { libraryOptions: o, target: s } = r ?? {}, i = ut({ ...o ?? {}, target: s, io: t, processors: n });
2383
- return k(e, i), at(i, e), ft(i, e);
2384
- }, Eo = {
2395
+ const xo = (e, t = {}) => (n) => {
2396
+ const r = pt({ ...n, processors: t });
2397
+ return k(e, r), ht(r, e), mt(r, e);
2398
+ }, q = (e, t, n = {}) => (r) => {
2399
+ const { libraryOptions: o, target: i } = r ?? {}, s = pt({ ...o ?? {}, target: i, io: t, processors: n });
2400
+ return k(e, s), ht(s, e), mt(s, e);
2401
+ }, Do = {
2385
2402
  guid: "uuid",
2386
2403
  url: "uri",
2387
2404
  datetime: "date-time",
2388
2405
  json_string: "json-string",
2389
2406
  regex: ""
2390
2407
  // do not set
2391
- }, Po = (e, t, n, r) => {
2408
+ }, Ro = (e, t, n, r) => {
2392
2409
  const o = n;
2393
2410
  o.type = "string";
2394
- const { minimum: s, maximum: i, format: c, patterns: a, contentEncoding: f } = e._zod.bag;
2395
- if (typeof s == "number" && (o.minLength = s), typeof i == "number" && (o.maxLength = i), c && (o.format = Eo[c] ?? c, o.format === "" && delete o.format, c === "time" && delete o.format), f && (o.contentEncoding = f), a && a.size > 0) {
2411
+ const { minimum: i, maximum: s, format: c, patterns: a, contentEncoding: f } = e._zod.bag;
2412
+ if (typeof i == "number" && (o.minLength = i), typeof s == "number" && (o.maxLength = s), c && (o.format = Do[c] ?? c, o.format === "" && delete o.format, c === "time" && delete o.format), f && (o.contentEncoding = f), a && a.size > 0) {
2396
2413
  const l = [...a];
2397
2414
  l.length === 1 ? o.pattern = l[0].source : l.length > 1 && (o.allOf = [
2398
2415
  ...l.map((m) => ({
@@ -2401,136 +2418,139 @@ const Io = (e, t = {}) => (n) => {
2401
2418
  }))
2402
2419
  ]);
2403
2420
  }
2404
- }, To = (e, t, n, r) => {
2405
- const o = n, { minimum: s, maximum: i, format: c, multipleOf: a, exclusiveMaximum: f, exclusiveMinimum: l } = e._zod.bag;
2406
- typeof c == "string" && c.includes("int") ? o.type = "integer" : o.type = "number", typeof l == "number" && (t.target === "draft-04" || t.target === "openapi-3.0" ? (o.minimum = l, o.exclusiveMinimum = !0) : o.exclusiveMinimum = l), typeof s == "number" && (o.minimum = s, typeof l == "number" && t.target !== "draft-04" && (l >= s ? delete o.minimum : delete o.exclusiveMinimum)), typeof f == "number" && (t.target === "draft-04" || t.target === "openapi-3.0" ? (o.maximum = f, o.exclusiveMaximum = !0) : o.exclusiveMaximum = f), typeof i == "number" && (o.maximum = i, typeof f == "number" && t.target !== "draft-04" && (f <= i ? delete o.maximum : delete o.exclusiveMaximum)), typeof a == "number" && (o.multipleOf = a);
2407
- }, No = (e, t, n, r) => {
2421
+ }, Co = (e, t, n, r) => {
2422
+ const o = n, { minimum: i, maximum: s, format: c, multipleOf: a, exclusiveMaximum: f, exclusiveMinimum: l } = e._zod.bag;
2423
+ typeof c == "string" && c.includes("int") ? o.type = "integer" : o.type = "number", typeof l == "number" && (t.target === "draft-04" || t.target === "openapi-3.0" ? (o.minimum = l, o.exclusiveMinimum = !0) : o.exclusiveMinimum = l), typeof i == "number" && (o.minimum = i, typeof l == "number" && t.target !== "draft-04" && (l >= i ? delete o.minimum : delete o.exclusiveMinimum)), typeof f == "number" && (t.target === "draft-04" || t.target === "openapi-3.0" ? (o.maximum = f, o.exclusiveMaximum = !0) : o.exclusiveMaximum = f), typeof s == "number" && (o.maximum = s, typeof f == "number" && t.target !== "draft-04" && (f <= s ? delete o.maximum : delete o.exclusiveMaximum)), typeof a == "number" && (o.multipleOf = a);
2424
+ }, Uo = (e, t, n, r) => {
2425
+ if (t.unrepresentable === "throw")
2426
+ throw new Error("Void cannot be represented in JSON Schema");
2427
+ }, Fo = (e, t, n, r) => {
2408
2428
  n.not = {};
2409
- }, jo = (e, t, n, r) => {
2410
- }, Ao = (e, t, n, r) => {
2411
- const o = e._zod.def, s = Me(o.entries);
2412
- s.every((i) => typeof i == "number") && (n.type = "number"), s.every((i) => typeof i == "string") && (n.type = "string"), n.enum = s;
2413
- }, Do = (e, t, n, r) => {
2429
+ }, Jo = (e, t, n, r) => {
2430
+ }, Mo = (e, t, n, r) => {
2431
+ const o = e._zod.def, i = He(o.entries);
2432
+ i.every((s) => typeof s == "number") && (n.type = "number"), i.every((s) => typeof s == "string") && (n.type = "string"), n.enum = i;
2433
+ }, Lo = (e, t, n, r) => {
2414
2434
  if (t.unrepresentable === "throw")
2415
2435
  throw new Error("Custom types cannot be represented in JSON Schema");
2416
- }, Ro = (e, t, n, r) => {
2436
+ }, Vo = (e, t, n, r) => {
2417
2437
  if (t.unrepresentable === "throw")
2418
2438
  throw new Error("Transforms cannot be represented in JSON Schema");
2419
- }, Co = (e, t, n, r) => {
2420
- const o = n, s = e._zod.def, { minimum: i, maximum: c } = e._zod.bag;
2421
- typeof i == "number" && (o.minItems = i), typeof c == "number" && (o.maxItems = c), o.type = "array", o.items = k(s.element, t, { ...r, path: [...r.path, "items"] });
2422
- }, xo = (e, t, n, r) => {
2423
- const o = n, s = e._zod.def;
2439
+ }, Wo = (e, t, n, r) => {
2440
+ const o = n, i = e._zod.def, { minimum: s, maximum: c } = e._zod.bag;
2441
+ typeof s == "number" && (o.minItems = s), typeof c == "number" && (o.maxItems = c), o.type = "array", o.items = k(i.element, t, { ...r, path: [...r.path, "items"] });
2442
+ }, Bo = (e, t, n, r) => {
2443
+ const o = n, i = e._zod.def;
2424
2444
  o.type = "object", o.properties = {};
2425
- const i = s.shape;
2426
- for (const f in i)
2427
- o.properties[f] = k(i[f], t, {
2445
+ const s = i.shape;
2446
+ for (const f in s)
2447
+ o.properties[f] = k(s[f], t, {
2428
2448
  ...r,
2429
2449
  path: [...r.path, "properties", f]
2430
2450
  });
2431
- const c = new Set(Object.keys(i)), a = new Set([...c].filter((f) => {
2432
- const l = s.shape[f]._zod;
2451
+ const c = new Set(Object.keys(s)), a = new Set([...c].filter((f) => {
2452
+ const l = i.shape[f]._zod;
2433
2453
  return t.io === "input" ? l.optin === void 0 : l.optout === void 0;
2434
2454
  }));
2435
- a.size > 0 && (o.required = Array.from(a)), s.catchall?._zod.def.type === "never" ? o.additionalProperties = !1 : s.catchall ? s.catchall && (o.additionalProperties = k(s.catchall, t, {
2455
+ a.size > 0 && (o.required = Array.from(a)), i.catchall?._zod.def.type === "never" ? o.additionalProperties = !1 : i.catchall ? i.catchall && (o.additionalProperties = k(i.catchall, t, {
2436
2456
  ...r,
2437
2457
  path: [...r.path, "additionalProperties"]
2438
2458
  })) : t.io === "output" && (o.additionalProperties = !1);
2439
- }, Uo = (e, t, n, r) => {
2440
- const o = e._zod.def, s = o.inclusive === !1, i = o.options.map((c, a) => k(c, t, {
2459
+ }, Ho = (e, t, n, r) => {
2460
+ const o = e._zod.def, i = o.inclusive === !1, s = o.options.map((c, a) => k(c, t, {
2441
2461
  ...r,
2442
- path: [...r.path, s ? "oneOf" : "anyOf", a]
2462
+ path: [...r.path, i ? "oneOf" : "anyOf", a]
2443
2463
  }));
2444
- s ? n.oneOf = i : n.anyOf = i;
2445
- }, Fo = (e, t, n, r) => {
2446
- const o = e._zod.def, s = k(o.left, t, {
2464
+ i ? n.oneOf = s : n.anyOf = s;
2465
+ }, Ko = (e, t, n, r) => {
2466
+ const o = e._zod.def, i = k(o.left, t, {
2447
2467
  ...r,
2448
2468
  path: [...r.path, "allOf", 0]
2449
- }), i = k(o.right, t, {
2469
+ }), s = k(o.right, t, {
2450
2470
  ...r,
2451
2471
  path: [...r.path, "allOf", 1]
2452
2472
  }), c = (f) => "allOf" in f && Object.keys(f).length === 1, a = [
2453
- ...c(s) ? s.allOf : [s],
2454
- ...c(i) ? i.allOf : [i]
2473
+ ...c(i) ? i.allOf : [i],
2474
+ ...c(s) ? s.allOf : [s]
2455
2475
  ];
2456
2476
  n.allOf = a;
2457
- }, Jo = (e, t, n, r) => {
2458
- const o = e._zod.def, s = k(o.innerType, t, r), i = t.seen.get(e);
2459
- t.target === "openapi-3.0" ? (i.ref = o.innerType, n.nullable = !0) : n.anyOf = [s, { type: "null" }];
2460
- }, Mo = (e, t, n, r) => {
2477
+ }, Go = (e, t, n, r) => {
2478
+ const o = e._zod.def, i = k(o.innerType, t, r), s = t.seen.get(e);
2479
+ t.target === "openapi-3.0" ? (s.ref = o.innerType, n.nullable = !0) : n.anyOf = [i, { type: "null" }];
2480
+ }, Xo = (e, t, n, r) => {
2461
2481
  const o = e._zod.def;
2462
2482
  k(o.innerType, t, r);
2463
- const s = t.seen.get(e);
2464
- s.ref = o.innerType;
2465
- }, Lo = (e, t, n, r) => {
2483
+ const i = t.seen.get(e);
2484
+ i.ref = o.innerType;
2485
+ }, Yo = (e, t, n, r) => {
2466
2486
  const o = e._zod.def;
2467
2487
  k(o.innerType, t, r);
2468
- const s = t.seen.get(e);
2469
- s.ref = o.innerType, n.default = JSON.parse(JSON.stringify(o.defaultValue));
2470
- }, Vo = (e, t, n, r) => {
2488
+ const i = t.seen.get(e);
2489
+ i.ref = o.innerType, n.default = JSON.parse(JSON.stringify(o.defaultValue));
2490
+ }, qo = (e, t, n, r) => {
2471
2491
  const o = e._zod.def;
2472
2492
  k(o.innerType, t, r);
2473
- const s = t.seen.get(e);
2474
- s.ref = o.innerType, t.io === "input" && (n._prefault = JSON.parse(JSON.stringify(o.defaultValue)));
2475
- }, Wo = (e, t, n, r) => {
2493
+ const i = t.seen.get(e);
2494
+ i.ref = o.innerType, t.io === "input" && (n._prefault = JSON.parse(JSON.stringify(o.defaultValue)));
2495
+ }, Qo = (e, t, n, r) => {
2476
2496
  const o = e._zod.def;
2477
2497
  k(o.innerType, t, r);
2478
- const s = t.seen.get(e);
2479
- s.ref = o.innerType;
2480
- let i;
2498
+ const i = t.seen.get(e);
2499
+ i.ref = o.innerType;
2500
+ let s;
2481
2501
  try {
2482
- i = o.catchValue(void 0);
2502
+ s = o.catchValue(void 0);
2483
2503
  } catch {
2484
2504
  throw new Error("Dynamic catch values are not supported in JSON Schema");
2485
2505
  }
2486
- n.default = i;
2487
- }, Bo = (e, t, n, r) => {
2488
- const o = e._zod.def, s = t.io === "input" ? o.in._zod.def.type === "transform" ? o.out : o.in : o.out;
2489
- k(s, t, r);
2490
- const i = t.seen.get(e);
2491
- i.ref = s;
2492
- }, Ko = (e, t, n, r) => {
2506
+ n.default = s;
2507
+ }, es = (e, t, n, r) => {
2508
+ const o = e._zod.def, i = t.io === "input" ? o.in._zod.def.type === "transform" ? o.out : o.in : o.out;
2509
+ k(i, t, r);
2510
+ const s = t.seen.get(e);
2511
+ s.ref = i;
2512
+ }, ts = (e, t, n, r) => {
2493
2513
  const o = e._zod.def;
2494
2514
  k(o.innerType, t, r);
2495
- const s = t.seen.get(e);
2496
- s.ref = o.innerType, n.readOnly = !0;
2497
- }, lt = (e, t, n, r) => {
2515
+ const i = t.seen.get(e);
2516
+ i.ref = o.innerType, n.readOnly = !0;
2517
+ }, gt = (e, t, n, r) => {
2498
2518
  const o = e._zod.def;
2499
2519
  k(o.innerType, t, r);
2500
- const s = t.seen.get(e);
2501
- s.ref = o.innerType;
2502
- }, Go = /* @__PURE__ */ u("ZodISODateTime", (e, t) => {
2503
- tr.init(e, t), v.init(e, t);
2520
+ const i = t.seen.get(e);
2521
+ i.ref = o.innerType;
2522
+ }, ns = /* @__PURE__ */ u("ZodISODateTime", (e, t) => {
2523
+ ir.init(e, t), v.init(e, t);
2504
2524
  });
2505
- function Ho(e) {
2506
- return /* @__PURE__ */ oo(Go, e);
2525
+ function rs(e) {
2526
+ return /* @__PURE__ */ fo(ns, e);
2507
2527
  }
2508
- const Xo = /* @__PURE__ */ u("ZodISODate", (e, t) => {
2509
- nr.init(e, t), v.init(e, t);
2528
+ const os = /* @__PURE__ */ u("ZodISODate", (e, t) => {
2529
+ cr.init(e, t), v.init(e, t);
2510
2530
  });
2511
- function Yo(e) {
2512
- return /* @__PURE__ */ io(Xo, e);
2531
+ function ss(e) {
2532
+ return /* @__PURE__ */ lo(os, e);
2513
2533
  }
2514
- const qo = /* @__PURE__ */ u("ZodISOTime", (e, t) => {
2515
- rr.init(e, t), v.init(e, t);
2534
+ const is = /* @__PURE__ */ u("ZodISOTime", (e, t) => {
2535
+ ur.init(e, t), v.init(e, t);
2516
2536
  });
2517
- function Qo(e) {
2518
- return /* @__PURE__ */ so(qo, e);
2537
+ function cs(e) {
2538
+ return /* @__PURE__ */ po(is, e);
2519
2539
  }
2520
- const ei = /* @__PURE__ */ u("ZodISODuration", (e, t) => {
2521
- or.init(e, t), v.init(e, t);
2540
+ const us = /* @__PURE__ */ u("ZodISODuration", (e, t) => {
2541
+ ar.init(e, t), v.init(e, t);
2522
2542
  });
2523
- function ti(e) {
2524
- return /* @__PURE__ */ co(ei, e);
2543
+ function as(e) {
2544
+ return /* @__PURE__ */ ho(us, e);
2525
2545
  }
2526
- const ni = (e, t) => {
2527
- Ke.init(e, t), e.name = "ZodError", Object.defineProperties(e, {
2546
+ const fs = (e, t) => {
2547
+ qe.init(e, t), e.name = "ZodError", Object.defineProperties(e, {
2528
2548
  format: {
2529
- value: (n) => Kt(e, n)
2549
+ value: (n) => qt(e, n)
2530
2550
  // enumerable: false,
2531
2551
  },
2532
2552
  flatten: {
2533
- value: (n) => Bt(e, n)
2553
+ value: (n) => Yt(e, n)
2534
2554
  // enumerable: false,
2535
2555
  },
2536
2556
  addIssue: {
@@ -2552,316 +2572,322 @@ const ni = (e, t) => {
2552
2572
  // enumerable: false,
2553
2573
  }
2554
2574
  });
2555
- }, I = u("ZodError", ni, {
2575
+ }, I = u("ZodError", fs, {
2556
2576
  Parent: Error
2557
- }), ri = /* @__PURE__ */ de(I), oi = /* @__PURE__ */ pe(I), ii = /* @__PURE__ */ Q(I), si = /* @__PURE__ */ ee(I), ci = /* @__PURE__ */ Xt(I), ui = /* @__PURE__ */ Yt(I), ai = /* @__PURE__ */ qt(I), fi = /* @__PURE__ */ Qt(I), li = /* @__PURE__ */ en(I), di = /* @__PURE__ */ tn(I), pi = /* @__PURE__ */ nn(I), hi = /* @__PURE__ */ rn(I), b = /* @__PURE__ */ u("ZodType", (e, t) => (z.init(e, t), Object.assign(e["~standard"], {
2577
+ }), ls = /* @__PURE__ */ he(I), ds = /* @__PURE__ */ me(I), ps = /* @__PURE__ */ ee(I), hs = /* @__PURE__ */ te(I), ms = /* @__PURE__ */ tn(I), gs = /* @__PURE__ */ nn(I), _s = /* @__PURE__ */ rn(I), vs = /* @__PURE__ */ on(I), ws = /* @__PURE__ */ sn(I), bs = /* @__PURE__ */ cn(I), ys = /* @__PURE__ */ un(I), zs = /* @__PURE__ */ an(I), b = /* @__PURE__ */ u("ZodType", (e, t) => (w.init(e, t), Object.assign(e["~standard"], {
2558
2578
  jsonSchema: {
2559
- input: Y(e, "input"),
2560
- output: Y(e, "output")
2579
+ input: q(e, "input"),
2580
+ output: q(e, "output")
2561
2581
  }
2562
- }), e.toJSONSchema = Io(e, {}), e.def = t, e.type = t.type, Object.defineProperty(e, "_def", { value: t }), e.check = (...n) => e.clone(T(t, {
2582
+ }), e.toJSONSchema = xo(e, {}), e.def = t, e.type = t.type, Object.defineProperty(e, "_def", { value: t }), e.check = (...n) => e.clone(N(t, {
2563
2583
  checks: [
2564
2584
  ...t.checks ?? [],
2565
2585
  ...n.map((r) => typeof r == "function" ? { _zod: { check: r, def: { check: "custom" }, onattach: [] } } : r)
2566
2586
  ]
2567
2587
  }), {
2568
2588
  parent: !0
2569
- }), e.with = e.check, e.clone = (n, r) => N(e, n, r), e.brand = () => e, e.register = ((n, r) => (n.add(e, r), e)), e.parse = (n, r) => ri(e, n, r, { callee: e.parse }), e.safeParse = (n, r) => ii(e, n, r), e.parseAsync = async (n, r) => oi(e, n, r, { callee: e.parseAsync }), e.safeParseAsync = async (n, r) => si(e, n, r), e.spa = e.safeParseAsync, e.encode = (n, r) => ci(e, n, r), e.decode = (n, r) => ui(e, n, r), e.encodeAsync = async (n, r) => ai(e, n, r), e.decodeAsync = async (n, r) => fi(e, n, r), e.safeEncode = (n, r) => li(e, n, r), e.safeDecode = (n, r) => di(e, n, r), e.safeEncodeAsync = async (n, r) => pi(e, n, r), e.safeDecodeAsync = async (n, r) => hi(e, n, r), e.refine = (n, r) => e.check(ss(n, r)), e.superRefine = (n) => e.check(cs(n)), e.overwrite = (n) => e.check(/* @__PURE__ */ U(n)), e.optional = () => De(e), e.exactOptional = () => Ki(e), e.nullable = () => Re(e), e.nullish = () => De(Re(e)), e.nonoptional = (n) => Qi(e, n), e.array = () => ht(e), e.or = (n) => gt([e, n]), e.and = (n) => Mi(e, n), e.transform = (n) => Ce(e, Wi(n)), e.default = (n) => Xi(e, n), e.prefault = (n) => qi(e, n), e.catch = (n) => ts(e, n), e.pipe = (n) => Ce(e, n), e.readonly = () => os(e), e.describe = (n) => {
2589
+ }), e.with = e.check, e.clone = (n, r) => j(e, n, r), e.brand = () => e, e.register = ((n, r) => (n.add(e, r), e)), e.parse = (n, r) => ls(e, n, r, { callee: e.parse }), e.safeParse = (n, r) => ps(e, n, r), e.parseAsync = async (n, r) => ds(e, n, r, { callee: e.parseAsync }), e.safeParseAsync = async (n, r) => hs(e, n, r), e.spa = e.safeParseAsync, e.encode = (n, r) => ms(e, n, r), e.decode = (n, r) => gs(e, n, r), e.encodeAsync = async (n, r) => _s(e, n, r), e.decodeAsync = async (n, r) => vs(e, n, r), e.safeEncode = (n, r) => ws(e, n, r), e.safeDecode = (n, r) => bs(e, n, r), e.safeEncodeAsync = async (n, r) => ys(e, n, r), e.safeDecodeAsync = async (n, r) => zs(e, n, r), e.refine = (n, r) => e.check(gi(n, r)), e.superRefine = (n) => e.check(_i(n)), e.overwrite = (n) => e.check(/* @__PURE__ */ F(n)), e.optional = () => Ce(e), e.exactOptional = () => ri(e), e.nullable = () => Ue(e), e.nullish = () => Ce(Ue(e)), e.nonoptional = (n) => ai(e, n), e.array = () => wt(e), e.or = (n) => yt([e, n]), e.and = (n) => qs(e, n), e.transform = (n) => Fe(e, ti(n)), e.default = (n) => ii(e, n), e.prefault = (n) => ui(e, n), e.catch = (n) => li(e, n), e.pipe = (n) => Fe(e, n), e.readonly = () => hi(e), e.describe = (n) => {
2570
2590
  const r = e.clone();
2571
- return J.add(r, { description: n }), r;
2591
+ return M.add(r, { description: n }), r;
2572
2592
  }, Object.defineProperty(e, "description", {
2573
2593
  get() {
2574
- return J.get(e)?.description;
2594
+ return M.get(e)?.description;
2575
2595
  },
2576
2596
  configurable: !0
2577
2597
  }), e.meta = (...n) => {
2578
2598
  if (n.length === 0)
2579
- return J.get(e);
2599
+ return M.get(e);
2580
2600
  const r = e.clone();
2581
- return J.add(r, n[0]), r;
2582
- }, e.isOptional = () => e.safeParse(void 0).success, e.isNullable = () => e.safeParse(null).success, e.apply = (n) => n(e), e)), dt = /* @__PURE__ */ u("_ZodString", (e, t) => {
2583
- he.init(e, t), b.init(e, t), e._zod.processJSONSchema = (r, o, s) => Po(e, r, o);
2601
+ return M.add(r, n[0]), r;
2602
+ }, e.isOptional = () => e.safeParse(void 0).success, e.isNullable = () => e.safeParse(null).success, e.apply = (n) => n(e), e)), _t = /* @__PURE__ */ u("_ZodString", (e, t) => {
2603
+ ge.init(e, t), b.init(e, t), e._zod.processJSONSchema = (r, o, i) => Ro(e, r, o);
2584
2604
  const n = e._zod.bag;
2585
- e.format = n.format ?? null, e.minLength = n.minimum ?? null, e.maxLength = n.maximum ?? null, e.regex = (...r) => e.check(/* @__PURE__ */ po(...r)), e.includes = (...r) => e.check(/* @__PURE__ */ go(...r)), e.startsWith = (...r) => e.check(/* @__PURE__ */ _o(...r)), e.endsWith = (...r) => e.check(/* @__PURE__ */ vo(...r)), e.min = (...r) => e.check(/* @__PURE__ */ X(...r)), e.max = (...r) => e.check(/* @__PURE__ */ st(...r)), e.length = (...r) => e.check(/* @__PURE__ */ ct(...r)), e.nonempty = (...r) => e.check(/* @__PURE__ */ X(1, ...r)), e.lowercase = (r) => e.check(/* @__PURE__ */ ho(r)), e.uppercase = (r) => e.check(/* @__PURE__ */ mo(r)), e.trim = () => e.check(/* @__PURE__ */ bo()), e.normalize = (...r) => e.check(/* @__PURE__ */ zo(...r)), e.toLowerCase = () => e.check(/* @__PURE__ */ yo()), e.toUpperCase = () => e.check(/* @__PURE__ */ wo()), e.slugify = () => e.check(/* @__PURE__ */ ko());
2586
- }), mi = /* @__PURE__ */ u("ZodString", (e, t) => {
2587
- he.init(e, t), dt.init(e, t), e.email = (n) => e.check(/* @__PURE__ */ Cr(_i, n)), e.url = (n) => e.check(/* @__PURE__ */ Mr(vi, n)), e.jwt = (n) => e.check(/* @__PURE__ */ ro(ji, n)), e.emoji = (n) => e.check(/* @__PURE__ */ Lr(zi, n)), e.guid = (n) => e.check(/* @__PURE__ */ Ie(Ne, n)), e.uuid = (n) => e.check(/* @__PURE__ */ xr(K, n)), e.uuidv4 = (n) => e.check(/* @__PURE__ */ Ur(K, n)), e.uuidv6 = (n) => e.check(/* @__PURE__ */ Fr(K, n)), e.uuidv7 = (n) => e.check(/* @__PURE__ */ Jr(K, n)), e.nanoid = (n) => e.check(/* @__PURE__ */ Vr(bi, n)), e.guid = (n) => e.check(/* @__PURE__ */ Ie(Ne, n)), e.cuid = (n) => e.check(/* @__PURE__ */ Wr(yi, n)), e.cuid2 = (n) => e.check(/* @__PURE__ */ Br(wi, n)), e.ulid = (n) => e.check(/* @__PURE__ */ Kr(ki, n)), e.base64 = (n) => e.check(/* @__PURE__ */ eo(Pi, n)), e.base64url = (n) => e.check(/* @__PURE__ */ to(Ti, n)), e.xid = (n) => e.check(/* @__PURE__ */ Gr($i, n)), e.ksuid = (n) => e.check(/* @__PURE__ */ Hr(Zi, n)), e.ipv4 = (n) => e.check(/* @__PURE__ */ Xr(Oi, n)), e.ipv6 = (n) => e.check(/* @__PURE__ */ Yr(Si, n)), e.cidrv4 = (n) => e.check(/* @__PURE__ */ qr(Ii, n)), e.cidrv6 = (n) => e.check(/* @__PURE__ */ Qr(Ei, n)), e.e164 = (n) => e.check(/* @__PURE__ */ no(Ni, n)), e.datetime = (n) => e.check(Ho(n)), e.date = (n) => e.check(Yo(n)), e.time = (n) => e.check(Qo(n)), e.duration = (n) => e.check(ti(n));
2605
+ e.format = n.format ?? null, e.minLength = n.minimum ?? null, e.maxLength = n.maximum ?? null, e.regex = (...r) => e.check(/* @__PURE__ */ bo(...r)), e.includes = (...r) => e.check(/* @__PURE__ */ ko(...r)), e.startsWith = (...r) => e.check(/* @__PURE__ */ $o(...r)), e.endsWith = (...r) => e.check(/* @__PURE__ */ Zo(...r)), e.min = (...r) => e.check(/* @__PURE__ */ Y(...r)), e.max = (...r) => e.check(/* @__PURE__ */ lt(...r)), e.length = (...r) => e.check(/* @__PURE__ */ dt(...r)), e.nonempty = (...r) => e.check(/* @__PURE__ */ Y(1, ...r)), e.lowercase = (r) => e.check(/* @__PURE__ */ yo(r)), e.uppercase = (r) => e.check(/* @__PURE__ */ zo(r)), e.trim = () => e.check(/* @__PURE__ */ Oo()), e.normalize = (...r) => e.check(/* @__PURE__ */ So(...r)), e.toLowerCase = () => e.check(/* @__PURE__ */ Io()), e.toUpperCase = () => e.check(/* @__PURE__ */ Eo()), e.slugify = () => e.check(/* @__PURE__ */ Po());
2606
+ }), ks = /* @__PURE__ */ u("ZodString", (e, t) => {
2607
+ ge.init(e, t), _t.init(e, t), e.email = (n) => e.check(/* @__PURE__ */ Lr(Zs, n)), e.url = (n) => e.check(/* @__PURE__ */ Kr(Ss, n)), e.jwt = (n) => e.check(/* @__PURE__ */ ao(Js, n)), e.emoji = (n) => e.check(/* @__PURE__ */ Gr(Os, n)), e.guid = (n) => e.check(/* @__PURE__ */ Te(xe, n)), e.uuid = (n) => e.check(/* @__PURE__ */ Vr(K, n)), e.uuidv4 = (n) => e.check(/* @__PURE__ */ Wr(K, n)), e.uuidv6 = (n) => e.check(/* @__PURE__ */ Br(K, n)), e.uuidv7 = (n) => e.check(/* @__PURE__ */ Hr(K, n)), e.nanoid = (n) => e.check(/* @__PURE__ */ Xr(Is, n)), e.guid = (n) => e.check(/* @__PURE__ */ Te(xe, n)), e.cuid = (n) => e.check(/* @__PURE__ */ Yr(Es, n)), e.cuid2 = (n) => e.check(/* @__PURE__ */ qr(Ps, n)), e.ulid = (n) => e.check(/* @__PURE__ */ Qr(Ts, n)), e.base64 = (n) => e.check(/* @__PURE__ */ io(Cs, n)), e.base64url = (n) => e.check(/* @__PURE__ */ co(Us, n)), e.xid = (n) => e.check(/* @__PURE__ */ eo(Ns, n)), e.ksuid = (n) => e.check(/* @__PURE__ */ to(js, n)), e.ipv4 = (n) => e.check(/* @__PURE__ */ no(As, n)), e.ipv6 = (n) => e.check(/* @__PURE__ */ ro(xs, n)), e.cidrv4 = (n) => e.check(/* @__PURE__ */ oo(Ds, n)), e.cidrv6 = (n) => e.check(/* @__PURE__ */ so(Rs, n)), e.e164 = (n) => e.check(/* @__PURE__ */ uo(Fs, n)), e.datetime = (n) => e.check(rs(n)), e.date = (n) => e.check(ss(n)), e.time = (n) => e.check(cs(n)), e.duration = (n) => e.check(as(n));
2588
2608
  });
2589
- function gi(e) {
2590
- return /* @__PURE__ */ Rr(mi, e);
2609
+ function $s(e) {
2610
+ return /* @__PURE__ */ Mr(ks, e);
2591
2611
  }
2592
2612
  const v = /* @__PURE__ */ u("ZodStringFormat", (e, t) => {
2593
- _.init(e, t), dt.init(e, t);
2594
- }), _i = /* @__PURE__ */ u("ZodEmail", (e, t) => {
2595
- Bn.init(e, t), v.init(e, t);
2596
- }), Ne = /* @__PURE__ */ u("ZodGUID", (e, t) => {
2597
- Vn.init(e, t), v.init(e, t);
2598
- }), K = /* @__PURE__ */ u("ZodUUID", (e, t) => {
2599
- Wn.init(e, t), v.init(e, t);
2600
- }), vi = /* @__PURE__ */ u("ZodURL", (e, t) => {
2601
- Kn.init(e, t), v.init(e, t);
2602
- }), zi = /* @__PURE__ */ u("ZodEmoji", (e, t) => {
2613
+ _.init(e, t), _t.init(e, t);
2614
+ }), Zs = /* @__PURE__ */ u("ZodEmail", (e, t) => {
2615
+ Yn.init(e, t), v.init(e, t);
2616
+ }), xe = /* @__PURE__ */ u("ZodGUID", (e, t) => {
2603
2617
  Gn.init(e, t), v.init(e, t);
2604
- }), bi = /* @__PURE__ */ u("ZodNanoID", (e, t) => {
2605
- Hn.init(e, t), v.init(e, t);
2606
- }), yi = /* @__PURE__ */ u("ZodCUID", (e, t) => {
2618
+ }), K = /* @__PURE__ */ u("ZodUUID", (e, t) => {
2607
2619
  Xn.init(e, t), v.init(e, t);
2608
- }), wi = /* @__PURE__ */ u("ZodCUID2", (e, t) => {
2609
- Yn.init(e, t), v.init(e, t);
2610
- }), ki = /* @__PURE__ */ u("ZodULID", (e, t) => {
2620
+ }), Ss = /* @__PURE__ */ u("ZodURL", (e, t) => {
2611
2621
  qn.init(e, t), v.init(e, t);
2612
- }), $i = /* @__PURE__ */ u("ZodXID", (e, t) => {
2622
+ }), Os = /* @__PURE__ */ u("ZodEmoji", (e, t) => {
2613
2623
  Qn.init(e, t), v.init(e, t);
2614
- }), Zi = /* @__PURE__ */ u("ZodKSUID", (e, t) => {
2624
+ }), Is = /* @__PURE__ */ u("ZodNanoID", (e, t) => {
2615
2625
  er.init(e, t), v.init(e, t);
2616
- }), Oi = /* @__PURE__ */ u("ZodIPv4", (e, t) => {
2617
- ir.init(e, t), v.init(e, t);
2618
- }), Si = /* @__PURE__ */ u("ZodIPv6", (e, t) => {
2626
+ }), Es = /* @__PURE__ */ u("ZodCUID", (e, t) => {
2627
+ tr.init(e, t), v.init(e, t);
2628
+ }), Ps = /* @__PURE__ */ u("ZodCUID2", (e, t) => {
2629
+ nr.init(e, t), v.init(e, t);
2630
+ }), Ts = /* @__PURE__ */ u("ZodULID", (e, t) => {
2631
+ rr.init(e, t), v.init(e, t);
2632
+ }), Ns = /* @__PURE__ */ u("ZodXID", (e, t) => {
2633
+ or.init(e, t), v.init(e, t);
2634
+ }), js = /* @__PURE__ */ u("ZodKSUID", (e, t) => {
2619
2635
  sr.init(e, t), v.init(e, t);
2620
- }), Ii = /* @__PURE__ */ u("ZodCIDRv4", (e, t) => {
2621
- cr.init(e, t), v.init(e, t);
2622
- }), Ei = /* @__PURE__ */ u("ZodCIDRv6", (e, t) => {
2623
- ur.init(e, t), v.init(e, t);
2624
- }), Pi = /* @__PURE__ */ u("ZodBase64", (e, t) => {
2625
- ar.init(e, t), v.init(e, t);
2626
- }), Ti = /* @__PURE__ */ u("ZodBase64URL", (e, t) => {
2636
+ }), As = /* @__PURE__ */ u("ZodIPv4", (e, t) => {
2637
+ fr.init(e, t), v.init(e, t);
2638
+ }), xs = /* @__PURE__ */ u("ZodIPv6", (e, t) => {
2627
2639
  lr.init(e, t), v.init(e, t);
2628
- }), Ni = /* @__PURE__ */ u("ZodE164", (e, t) => {
2640
+ }), Ds = /* @__PURE__ */ u("ZodCIDRv4", (e, t) => {
2629
2641
  dr.init(e, t), v.init(e, t);
2630
- }), ji = /* @__PURE__ */ u("ZodJWT", (e, t) => {
2642
+ }), Rs = /* @__PURE__ */ u("ZodCIDRv6", (e, t) => {
2643
+ pr.init(e, t), v.init(e, t);
2644
+ }), Cs = /* @__PURE__ */ u("ZodBase64", (e, t) => {
2631
2645
  hr.init(e, t), v.init(e, t);
2632
- }), pt = /* @__PURE__ */ u("ZodNumber", (e, t) => {
2633
- nt.init(e, t), b.init(e, t), e._zod.processJSONSchema = (r, o, s) => To(e, r, o), e.gt = (r, o) => e.check(/* @__PURE__ */ Pe(r, o)), e.gte = (r, o) => e.check(/* @__PURE__ */ oe(r, o)), e.min = (r, o) => e.check(/* @__PURE__ */ oe(r, o)), e.lt = (r, o) => e.check(/* @__PURE__ */ Ee(r, o)), e.lte = (r, o) => e.check(/* @__PURE__ */ re(r, o)), e.max = (r, o) => e.check(/* @__PURE__ */ re(r, o)), e.int = (r) => e.check(je(r)), e.safe = (r) => e.check(je(r)), e.positive = (r) => e.check(/* @__PURE__ */ Pe(0, r)), e.nonnegative = (r) => e.check(/* @__PURE__ */ oe(0, r)), e.negative = (r) => e.check(/* @__PURE__ */ Ee(0, r)), e.nonpositive = (r) => e.check(/* @__PURE__ */ re(0, r)), e.multipleOf = (r, o) => e.check(/* @__PURE__ */ Te(r, o)), e.step = (r, o) => e.check(/* @__PURE__ */ Te(r, o)), e.finite = () => e;
2646
+ }), Us = /* @__PURE__ */ u("ZodBase64URL", (e, t) => {
2647
+ gr.init(e, t), v.init(e, t);
2648
+ }), Fs = /* @__PURE__ */ u("ZodE164", (e, t) => {
2649
+ _r.init(e, t), v.init(e, t);
2650
+ }), Js = /* @__PURE__ */ u("ZodJWT", (e, t) => {
2651
+ wr.init(e, t), v.init(e, t);
2652
+ }), vt = /* @__PURE__ */ u("ZodNumber", (e, t) => {
2653
+ ct.init(e, t), b.init(e, t), e._zod.processJSONSchema = (r, o, i) => Co(e, r, o), e.gt = (r, o) => e.check(/* @__PURE__ */ je(r, o)), e.gte = (r, o) => e.check(/* @__PURE__ */ se(r, o)), e.min = (r, o) => e.check(/* @__PURE__ */ se(r, o)), e.lt = (r, o) => e.check(/* @__PURE__ */ Ne(r, o)), e.lte = (r, o) => e.check(/* @__PURE__ */ oe(r, o)), e.max = (r, o) => e.check(/* @__PURE__ */ oe(r, o)), e.int = (r) => e.check(De(r)), e.safe = (r) => e.check(De(r)), e.positive = (r) => e.check(/* @__PURE__ */ je(0, r)), e.nonnegative = (r) => e.check(/* @__PURE__ */ se(0, r)), e.negative = (r) => e.check(/* @__PURE__ */ Ne(0, r)), e.nonpositive = (r) => e.check(/* @__PURE__ */ oe(0, r)), e.multipleOf = (r, o) => e.check(/* @__PURE__ */ Ae(r, o)), e.step = (r, o) => e.check(/* @__PURE__ */ Ae(r, o)), e.finite = () => e;
2634
2654
  const n = e._zod.bag;
2635
2655
  e.minValue = Math.max(n.minimum ?? Number.NEGATIVE_INFINITY, n.exclusiveMinimum ?? Number.NEGATIVE_INFINITY) ?? null, e.maxValue = Math.min(n.maximum ?? Number.POSITIVE_INFINITY, n.exclusiveMaximum ?? Number.POSITIVE_INFINITY) ?? null, e.isInt = (n.format ?? "").includes("int") || Number.isSafeInteger(n.multipleOf ?? 0.5), e.isFinite = !0, e.format = n.format ?? null;
2636
2656
  });
2637
2657
  function R(e) {
2638
- return /* @__PURE__ */ uo(pt, e);
2658
+ return /* @__PURE__ */ mo(vt, e);
2639
2659
  }
2640
- const Ai = /* @__PURE__ */ u("ZodNumberFormat", (e, t) => {
2641
- mr.init(e, t), pt.init(e, t);
2660
+ const Ms = /* @__PURE__ */ u("ZodNumberFormat", (e, t) => {
2661
+ br.init(e, t), vt.init(e, t);
2642
2662
  });
2643
- function je(e) {
2644
- return /* @__PURE__ */ ao(Ai, e);
2663
+ function De(e) {
2664
+ return /* @__PURE__ */ go(Ms, e);
2645
2665
  }
2646
- const Di = /* @__PURE__ */ u("ZodUnknown", (e, t) => {
2647
- gr.init(e, t), b.init(e, t), e._zod.processJSONSchema = (n, r, o) => jo();
2666
+ const Ls = /* @__PURE__ */ u("ZodUnknown", (e, t) => {
2667
+ yr.init(e, t), b.init(e, t), e._zod.processJSONSchema = (n, r, o) => Jo();
2648
2668
  });
2649
- function Ae() {
2650
- return /* @__PURE__ */ fo(Di);
2669
+ function Re() {
2670
+ return /* @__PURE__ */ _o(Ls);
2651
2671
  }
2652
- const Ri = /* @__PURE__ */ u("ZodNever", (e, t) => {
2653
- _r.init(e, t), b.init(e, t), e._zod.processJSONSchema = (n, r, o) => No(e, n, r);
2672
+ const Vs = /* @__PURE__ */ u("ZodNever", (e, t) => {
2673
+ zr.init(e, t), b.init(e, t), e._zod.processJSONSchema = (n, r, o) => Fo(e, n, r);
2654
2674
  });
2655
- function Ci(e) {
2656
- return /* @__PURE__ */ lo(Ri, e);
2675
+ function Ws(e) {
2676
+ return /* @__PURE__ */ vo(Vs, e);
2657
2677
  }
2658
- const xi = /* @__PURE__ */ u("ZodArray", (e, t) => {
2659
- vr.init(e, t), b.init(e, t), e._zod.processJSONSchema = (n, r, o) => Co(e, n, r, o), e.element = t.element, e.min = (n, r) => e.check(/* @__PURE__ */ X(n, r)), e.nonempty = (n) => e.check(/* @__PURE__ */ X(1, n)), e.max = (n, r) => e.check(/* @__PURE__ */ st(n, r)), e.length = (n, r) => e.check(/* @__PURE__ */ ct(n, r)), e.unwrap = () => e.element;
2678
+ const Bs = /* @__PURE__ */ u("ZodVoid", (e, t) => {
2679
+ kr.init(e, t), b.init(e, t), e._zod.processJSONSchema = (n, r, o) => Uo(e, n);
2660
2680
  });
2661
- function ht(e, t) {
2662
- return /* @__PURE__ */ $o(xi, e, t);
2681
+ function Hs(e) {
2682
+ return /* @__PURE__ */ wo(Bs, e);
2663
2683
  }
2664
- const Ui = /* @__PURE__ */ u("ZodObject", (e, t) => {
2665
- br.init(e, t), b.init(e, t), e._zod.processJSONSchema = (n, r, o) => xo(e, n, r, o), g(e, "shape", () => t.shape), e.keyof = () => Li(Object.keys(e._zod.def.shape)), e.catchall = (n) => e.clone({ ...e._zod.def, catchall: n }), e.passthrough = () => e.clone({ ...e._zod.def, catchall: Ae() }), e.loose = () => e.clone({ ...e._zod.def, catchall: Ae() }), e.strict = () => e.clone({ ...e._zod.def, catchall: Ci() }), e.strip = () => e.clone({ ...e._zod.def, catchall: void 0 }), e.extend = (n) => Jt(e, n), e.safeExtend = (n) => Mt(e, n), e.merge = (n) => Lt(e, n), e.pick = (n) => Ut(e, n), e.omit = (n) => Ft(e, n), e.partial = (...n) => Vt(_t, e, n[0]), e.required = (...n) => Wt(vt, e, n[0]);
2684
+ const Ks = /* @__PURE__ */ u("ZodArray", (e, t) => {
2685
+ $r.init(e, t), b.init(e, t), e._zod.processJSONSchema = (n, r, o) => Wo(e, n, r, o), e.element = t.element, e.min = (n, r) => e.check(/* @__PURE__ */ Y(n, r)), e.nonempty = (n) => e.check(/* @__PURE__ */ Y(1, n)), e.max = (n, r) => e.check(/* @__PURE__ */ lt(n, r)), e.length = (n, r) => e.check(/* @__PURE__ */ dt(n, r)), e.unwrap = () => e.element;
2666
2686
  });
2667
- function mt(e, t) {
2687
+ function wt(e, t) {
2688
+ return /* @__PURE__ */ To(Ks, e, t);
2689
+ }
2690
+ const Gs = /* @__PURE__ */ u("ZodObject", (e, t) => {
2691
+ Sr.init(e, t), b.init(e, t), e._zod.processJSONSchema = (n, r, o) => Bo(e, n, r, o), g(e, "shape", () => t.shape), e.keyof = () => Qs(Object.keys(e._zod.def.shape)), e.catchall = (n) => e.clone({ ...e._zod.def, catchall: n }), e.passthrough = () => e.clone({ ...e._zod.def, catchall: Re() }), e.loose = () => e.clone({ ...e._zod.def, catchall: Re() }), e.strict = () => e.clone({ ...e._zod.def, catchall: Ws() }), e.strip = () => e.clone({ ...e._zod.def, catchall: void 0 }), e.extend = (n) => Bt(e, n), e.safeExtend = (n) => Ht(e, n), e.merge = (n) => Kt(e, n), e.pick = (n) => Vt(e, n), e.omit = (n) => Wt(e, n), e.partial = (...n) => Gt(zt, e, n[0]), e.required = (...n) => Xt(kt, e, n[0]);
2692
+ });
2693
+ function bt(e, t) {
2668
2694
  const n = {
2669
2695
  type: "object",
2670
2696
  shape: e ?? {},
2671
2697
  ...d(t)
2672
2698
  };
2673
- return new Ui(n);
2699
+ return new Gs(n);
2674
2700
  }
2675
- const Fi = /* @__PURE__ */ u("ZodUnion", (e, t) => {
2676
- yr.init(e, t), b.init(e, t), e._zod.processJSONSchema = (n, r, o) => Uo(e, n, r, o), e.options = t.options;
2701
+ const Xs = /* @__PURE__ */ u("ZodUnion", (e, t) => {
2702
+ Or.init(e, t), b.init(e, t), e._zod.processJSONSchema = (n, r, o) => Ho(e, n, r, o), e.options = t.options;
2677
2703
  });
2678
- function gt(e, t) {
2679
- return new Fi({
2704
+ function yt(e, t) {
2705
+ return new Xs({
2680
2706
  type: "union",
2681
2707
  options: e,
2682
2708
  ...d(t)
2683
2709
  });
2684
2710
  }
2685
- const Ji = /* @__PURE__ */ u("ZodIntersection", (e, t) => {
2686
- wr.init(e, t), b.init(e, t), e._zod.processJSONSchema = (n, r, o) => Fo(e, n, r, o);
2711
+ const Ys = /* @__PURE__ */ u("ZodIntersection", (e, t) => {
2712
+ Ir.init(e, t), b.init(e, t), e._zod.processJSONSchema = (n, r, o) => Ko(e, n, r, o);
2687
2713
  });
2688
- function Mi(e, t) {
2689
- return new Ji({
2714
+ function qs(e, t) {
2715
+ return new Ys({
2690
2716
  type: "intersection",
2691
2717
  left: e,
2692
2718
  right: t
2693
2719
  });
2694
2720
  }
2695
- const ce = /* @__PURE__ */ u("ZodEnum", (e, t) => {
2696
- kr.init(e, t), b.init(e, t), e._zod.processJSONSchema = (r, o, s) => Ao(e, r, o), e.enum = t.entries, e.options = Object.values(t.entries);
2721
+ const ue = /* @__PURE__ */ u("ZodEnum", (e, t) => {
2722
+ Er.init(e, t), b.init(e, t), e._zod.processJSONSchema = (r, o, i) => Mo(e, r, o), e.enum = t.entries, e.options = Object.values(t.entries);
2697
2723
  const n = new Set(Object.keys(t.entries));
2698
2724
  e.extract = (r, o) => {
2699
- const s = {};
2700
- for (const i of r)
2701
- if (n.has(i))
2702
- s[i] = t.entries[i];
2725
+ const i = {};
2726
+ for (const s of r)
2727
+ if (n.has(s))
2728
+ i[s] = t.entries[s];
2703
2729
  else
2704
- throw new Error(`Key ${i} not found in enum`);
2705
- return new ce({
2730
+ throw new Error(`Key ${s} not found in enum`);
2731
+ return new ue({
2706
2732
  ...t,
2707
2733
  checks: [],
2708
2734
  ...d(o),
2709
- entries: s
2735
+ entries: i
2710
2736
  });
2711
2737
  }, e.exclude = (r, o) => {
2712
- const s = { ...t.entries };
2713
- for (const i of r)
2714
- if (n.has(i))
2715
- delete s[i];
2738
+ const i = { ...t.entries };
2739
+ for (const s of r)
2740
+ if (n.has(s))
2741
+ delete i[s];
2716
2742
  else
2717
- throw new Error(`Key ${i} not found in enum`);
2718
- return new ce({
2743
+ throw new Error(`Key ${s} not found in enum`);
2744
+ return new ue({
2719
2745
  ...t,
2720
2746
  checks: [],
2721
2747
  ...d(o),
2722
- entries: s
2748
+ entries: i
2723
2749
  });
2724
2750
  };
2725
2751
  });
2726
- function Li(e, t) {
2752
+ function Qs(e, t) {
2727
2753
  const n = Array.isArray(e) ? Object.fromEntries(e.map((r) => [r, r])) : e;
2728
- return new ce({
2754
+ return new ue({
2729
2755
  type: "enum",
2730
2756
  entries: n,
2731
2757
  ...d(t)
2732
2758
  });
2733
2759
  }
2734
- const Vi = /* @__PURE__ */ u("ZodTransform", (e, t) => {
2735
- $r.init(e, t), b.init(e, t), e._zod.processJSONSchema = (n, r, o) => Ro(e, n), e._zod.parse = (n, r) => {
2760
+ const ei = /* @__PURE__ */ u("ZodTransform", (e, t) => {
2761
+ Pr.init(e, t), b.init(e, t), e._zod.processJSONSchema = (n, r, o) => Vo(e, n), e._zod.parse = (n, r) => {
2736
2762
  if (r.direction === "backward")
2737
- throw new Fe(e.constructor.name);
2738
- n.addIssue = (s) => {
2739
- if (typeof s == "string")
2740
- n.issues.push(L(s, n.value, t));
2763
+ throw new We(e.constructor.name);
2764
+ n.addIssue = (i) => {
2765
+ if (typeof i == "string")
2766
+ n.issues.push(V(i, n.value, t));
2741
2767
  else {
2742
- const i = s;
2743
- i.fatal && (i.continue = !1), i.code ?? (i.code = "custom"), i.input ?? (i.input = n.value), i.inst ?? (i.inst = e), n.issues.push(L(i));
2768
+ const s = i;
2769
+ s.fatal && (s.continue = !1), s.code ?? (s.code = "custom"), s.input ?? (s.input = n.value), s.inst ?? (s.inst = e), n.issues.push(V(s));
2744
2770
  }
2745
2771
  };
2746
2772
  const o = t.transform(n.value, n);
2747
- return o instanceof Promise ? o.then((s) => (n.value = s, n)) : (n.value = o, n);
2773
+ return o instanceof Promise ? o.then((i) => (n.value = i, n)) : (n.value = o, n);
2748
2774
  };
2749
2775
  });
2750
- function Wi(e) {
2751
- return new Vi({
2776
+ function ti(e) {
2777
+ return new ei({
2752
2778
  type: "transform",
2753
2779
  transform: e
2754
2780
  });
2755
2781
  }
2756
- const _t = /* @__PURE__ */ u("ZodOptional", (e, t) => {
2757
- it.init(e, t), b.init(e, t), e._zod.processJSONSchema = (n, r, o) => lt(e, n, r, o), e.unwrap = () => e._zod.def.innerType;
2782
+ const zt = /* @__PURE__ */ u("ZodOptional", (e, t) => {
2783
+ ft.init(e, t), b.init(e, t), e._zod.processJSONSchema = (n, r, o) => gt(e, n, r, o), e.unwrap = () => e._zod.def.innerType;
2758
2784
  });
2759
- function De(e) {
2760
- return new _t({
2785
+ function Ce(e) {
2786
+ return new zt({
2761
2787
  type: "optional",
2762
2788
  innerType: e
2763
2789
  });
2764
2790
  }
2765
- const Bi = /* @__PURE__ */ u("ZodExactOptional", (e, t) => {
2766
- Zr.init(e, t), b.init(e, t), e._zod.processJSONSchema = (n, r, o) => lt(e, n, r, o), e.unwrap = () => e._zod.def.innerType;
2791
+ const ni = /* @__PURE__ */ u("ZodExactOptional", (e, t) => {
2792
+ Tr.init(e, t), b.init(e, t), e._zod.processJSONSchema = (n, r, o) => gt(e, n, r, o), e.unwrap = () => e._zod.def.innerType;
2767
2793
  });
2768
- function Ki(e) {
2769
- return new Bi({
2794
+ function ri(e) {
2795
+ return new ni({
2770
2796
  type: "optional",
2771
2797
  innerType: e
2772
2798
  });
2773
2799
  }
2774
- const Gi = /* @__PURE__ */ u("ZodNullable", (e, t) => {
2775
- Or.init(e, t), b.init(e, t), e._zod.processJSONSchema = (n, r, o) => Jo(e, n, r, o), e.unwrap = () => e._zod.def.innerType;
2800
+ const oi = /* @__PURE__ */ u("ZodNullable", (e, t) => {
2801
+ Nr.init(e, t), b.init(e, t), e._zod.processJSONSchema = (n, r, o) => Go(e, n, r, o), e.unwrap = () => e._zod.def.innerType;
2776
2802
  });
2777
- function Re(e) {
2778
- return new Gi({
2803
+ function Ue(e) {
2804
+ return new oi({
2779
2805
  type: "nullable",
2780
2806
  innerType: e
2781
2807
  });
2782
2808
  }
2783
- const Hi = /* @__PURE__ */ u("ZodDefault", (e, t) => {
2784
- Sr.init(e, t), b.init(e, t), e._zod.processJSONSchema = (n, r, o) => Lo(e, n, r, o), e.unwrap = () => e._zod.def.innerType, e.removeDefault = e.unwrap;
2809
+ const si = /* @__PURE__ */ u("ZodDefault", (e, t) => {
2810
+ jr.init(e, t), b.init(e, t), e._zod.processJSONSchema = (n, r, o) => Yo(e, n, r, o), e.unwrap = () => e._zod.def.innerType, e.removeDefault = e.unwrap;
2785
2811
  });
2786
- function Xi(e, t) {
2787
- return new Hi({
2812
+ function ii(e, t) {
2813
+ return new si({
2788
2814
  type: "default",
2789
2815
  innerType: e,
2790
2816
  get defaultValue() {
2791
- return typeof t == "function" ? t() : Ve(t);
2817
+ return typeof t == "function" ? t() : Ge(t);
2792
2818
  }
2793
2819
  });
2794
2820
  }
2795
- const Yi = /* @__PURE__ */ u("ZodPrefault", (e, t) => {
2796
- Ir.init(e, t), b.init(e, t), e._zod.processJSONSchema = (n, r, o) => Vo(e, n, r, o), e.unwrap = () => e._zod.def.innerType;
2821
+ const ci = /* @__PURE__ */ u("ZodPrefault", (e, t) => {
2822
+ Ar.init(e, t), b.init(e, t), e._zod.processJSONSchema = (n, r, o) => qo(e, n, r, o), e.unwrap = () => e._zod.def.innerType;
2797
2823
  });
2798
- function qi(e, t) {
2799
- return new Yi({
2824
+ function ui(e, t) {
2825
+ return new ci({
2800
2826
  type: "prefault",
2801
2827
  innerType: e,
2802
2828
  get defaultValue() {
2803
- return typeof t == "function" ? t() : Ve(t);
2829
+ return typeof t == "function" ? t() : Ge(t);
2804
2830
  }
2805
2831
  });
2806
2832
  }
2807
- const vt = /* @__PURE__ */ u("ZodNonOptional", (e, t) => {
2808
- Er.init(e, t), b.init(e, t), e._zod.processJSONSchema = (n, r, o) => Mo(e, n, r, o), e.unwrap = () => e._zod.def.innerType;
2833
+ const kt = /* @__PURE__ */ u("ZodNonOptional", (e, t) => {
2834
+ xr.init(e, t), b.init(e, t), e._zod.processJSONSchema = (n, r, o) => Xo(e, n, r, o), e.unwrap = () => e._zod.def.innerType;
2809
2835
  });
2810
- function Qi(e, t) {
2811
- return new vt({
2836
+ function ai(e, t) {
2837
+ return new kt({
2812
2838
  type: "nonoptional",
2813
2839
  innerType: e,
2814
2840
  ...d(t)
2815
2841
  });
2816
2842
  }
2817
- const es = /* @__PURE__ */ u("ZodCatch", (e, t) => {
2818
- Pr.init(e, t), b.init(e, t), e._zod.processJSONSchema = (n, r, o) => Wo(e, n, r, o), e.unwrap = () => e._zod.def.innerType, e.removeCatch = e.unwrap;
2843
+ const fi = /* @__PURE__ */ u("ZodCatch", (e, t) => {
2844
+ Dr.init(e, t), b.init(e, t), e._zod.processJSONSchema = (n, r, o) => Qo(e, n, r, o), e.unwrap = () => e._zod.def.innerType, e.removeCatch = e.unwrap;
2819
2845
  });
2820
- function ts(e, t) {
2821
- return new es({
2846
+ function li(e, t) {
2847
+ return new fi({
2822
2848
  type: "catch",
2823
2849
  innerType: e,
2824
2850
  catchValue: typeof t == "function" ? t : () => t
2825
2851
  });
2826
2852
  }
2827
- const ns = /* @__PURE__ */ u("ZodPipe", (e, t) => {
2828
- Tr.init(e, t), b.init(e, t), e._zod.processJSONSchema = (n, r, o) => Bo(e, n, r, o), e.in = t.in, e.out = t.out;
2853
+ const di = /* @__PURE__ */ u("ZodPipe", (e, t) => {
2854
+ Rr.init(e, t), b.init(e, t), e._zod.processJSONSchema = (n, r, o) => es(e, n, r, o), e.in = t.in, e.out = t.out;
2829
2855
  });
2830
- function Ce(e, t) {
2831
- return new ns({
2856
+ function Fe(e, t) {
2857
+ return new di({
2832
2858
  type: "pipe",
2833
2859
  in: e,
2834
2860
  out: t
2835
2861
  // ...util.normalizeParams(params),
2836
2862
  });
2837
2863
  }
2838
- const rs = /* @__PURE__ */ u("ZodReadonly", (e, t) => {
2839
- Nr.init(e, t), b.init(e, t), e._zod.processJSONSchema = (n, r, o) => Ko(e, n, r, o), e.unwrap = () => e._zod.def.innerType;
2864
+ const pi = /* @__PURE__ */ u("ZodReadonly", (e, t) => {
2865
+ Cr.init(e, t), b.init(e, t), e._zod.processJSONSchema = (n, r, o) => ts(e, n, r, o), e.unwrap = () => e._zod.def.innerType;
2840
2866
  });
2841
- function os(e) {
2842
- return new rs({
2867
+ function hi(e) {
2868
+ return new pi({
2843
2869
  type: "readonly",
2844
2870
  innerType: e
2845
2871
  });
2846
2872
  }
2847
- const is = /* @__PURE__ */ u("ZodCustom", (e, t) => {
2848
- jr.init(e, t), b.init(e, t), e._zod.processJSONSchema = (n, r, o) => Do(e, n);
2873
+ const mi = /* @__PURE__ */ u("ZodCustom", (e, t) => {
2874
+ Ur.init(e, t), b.init(e, t), e._zod.processJSONSchema = (n, r, o) => Lo(e, n);
2849
2875
  });
2850
- function ss(e, t = {}) {
2851
- return /* @__PURE__ */ Zo(is, e, t);
2876
+ function gi(e, t = {}) {
2877
+ return /* @__PURE__ */ No(mi, e, t);
2852
2878
  }
2853
- function cs(e) {
2854
- return /* @__PURE__ */ Oo(e);
2879
+ function _i(e) {
2880
+ return /* @__PURE__ */ jo(e);
2855
2881
  }
2856
- const zs = (e) => mt({
2882
+ const Oi = (e) => bt({
2857
2883
  pages: R(),
2858
2884
  nextPage: R().optional(),
2859
2885
  totalElements: R(),
2860
2886
  currentPage: R(),
2861
2887
  pageSize: R(),
2862
- elements: ht(e)
2888
+ elements: wt(e)
2863
2889
  });
2864
- function bs() {
2890
+ function Ii() {
2865
2891
  return {
2866
2892
  pages: 0,
2867
2893
  nextPage: void 0,
@@ -2871,25 +2897,113 @@ function bs() {
2871
2897
  elements: []
2872
2898
  };
2873
2899
  }
2874
- const xe = gt([R(), gi()]).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" }), ys = mt({
2875
- page: xe,
2876
- pageSize: xe
2900
+ const Je = yt([R(), $s()]).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" }), Ei = bt({
2901
+ page: Je,
2902
+ pageSize: Je
2877
2903
  });
2904
+ class vi extends ae {
2905
+ constructor(t) {
2906
+ super(), this.error = t;
2907
+ }
2908
+ }
2909
+ class Me extends ae {
2910
+ constructor(t) {
2911
+ super(), this.error = t;
2912
+ }
2913
+ }
2914
+ class Le extends ae {
2915
+ constructor() {
2916
+ super();
2917
+ }
2918
+ }
2919
+ class Pi {
2920
+ constructor(t) {
2921
+ this.baseUrl = t;
2922
+ }
2923
+ async fetch(t, n, r, o = {}) {
2924
+ try {
2925
+ const i = await this.mergeHeaders(o.headers), s = await fetch(`${this.baseUrl}${t}`, {
2926
+ ...o,
2927
+ headers: i
2928
+ });
2929
+ if (s.status === 409)
2930
+ return T(
2931
+ new vi({
2932
+ status: s.status,
2933
+ statusText: s.statusText,
2934
+ /* v8 ignore next -- @preserve */
2935
+ body: await s.json().catch(() => s.text())
2936
+ })
2937
+ );
2938
+ if (s.status === 404)
2939
+ return T(new Le());
2940
+ if (!s.ok) {
2941
+ const l = await s.json().catch(() => ({ message: s.statusText }));
2942
+ return T(
2943
+ new r({
2944
+ error: l,
2945
+ metadata: {
2946
+ status: s.status,
2947
+ statusText: s.statusText
2948
+ }
2949
+ })
2950
+ );
2951
+ }
2952
+ const c = (await s.text()).trim(), a = s.status === 204 ? void 0 : c ? JSON.parse(c) : void 0, f = n.safeParse(a);
2953
+ return f.success ? _e(f.data) : T(new r(new Error("Invalid response body"), a));
2954
+ } catch (i) {
2955
+ return T(new Me(i));
2956
+ }
2957
+ }
2958
+ async fetchBlob(t, n, r = {}) {
2959
+ try {
2960
+ const o = await this.mergeHeaders(r.headers), i = await fetch(`${this.baseUrl}${t}`, {
2961
+ ...r,
2962
+ headers: o
2963
+ });
2964
+ if (i.status === 404)
2965
+ return T(new Le());
2966
+ if (!i.ok) {
2967
+ const c = await i.json().catch(() => ({ message: i.statusText }));
2968
+ return T(
2969
+ new n(c, {
2970
+ status: i.status,
2971
+ statusText: i.statusText
2972
+ })
2973
+ );
2974
+ }
2975
+ const s = await i.blob();
2976
+ return _e(s);
2977
+ } catch (o) {
2978
+ return T(new Me(o));
2979
+ }
2980
+ }
2981
+ async mergeHeaders(t) {
2982
+ const n = new Headers([...await this.getHeaders()]);
2983
+ return new Headers(t).forEach((o, i) => n.set(i, o)), n;
2984
+ }
2985
+ }
2986
+ const Ti = Hs();
2878
2987
  export {
2879
- bs as EmptyPage,
2880
- ls as Fail,
2881
- ds as Failure,
2882
- F as Guid,
2883
- fs as Ok,
2884
- ys as PageQuery,
2885
- vs as convertDateInfoToDateRange,
2886
- zs as createPageSchema,
2887
- wt as formatDate,
2888
- _s as formatDateTime,
2889
- kt as formatTime,
2890
- hs as isFailure,
2891
- as as mock,
2892
- ps as notFailure,
2893
- ms as parseConfig,
2894
- gs as sleep
2988
+ Ii as EmptyPage,
2989
+ Ti as EmptyResponse,
2990
+ T as Fail,
2991
+ ae as Failure,
2992
+ J as Guid,
2993
+ Pi as HttpSafeClient,
2994
+ vi as NetworkConflictFailure,
2995
+ Me as NetworkFailure,
2996
+ Le as NotFoundFailure,
2997
+ _e as Ok,
2998
+ Ei as PageQuery,
2999
+ Si as convertDateInfoToDateRange,
3000
+ Oi as createPageSchema,
3001
+ Ot as formatDate,
3002
+ Zi as formatDateTime,
3003
+ It as formatTime,
3004
+ zi as isFailure,
3005
+ bi as mock,
3006
+ yi as notFailure,
3007
+ ki as parseConfig,
3008
+ $i as sleep
2895
3009
  };