@moq/watch 0.2.2 → 0.2.3

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.
@@ -1,5 +1,5 @@
1
1
  import * as A from "@moq/lite";
2
- import { Time as v } from "@moq/lite";
2
+ import { Time as v, Path as $t } from "@moq/lite";
3
3
  import { Signal as h, Effect as C } from "@moq/signals";
4
4
  function l(e, n, t) {
5
5
  function r(a, c) {
@@ -73,7 +73,7 @@ function Ve(e) {
73
73
  const n = e.startsWith("^") ? 1 : 0, t = e.endsWith("$") ? e.length - 1 : e.length;
74
74
  return e.slice(n, t);
75
75
  }
76
- function $t(e, n) {
76
+ function Dt(e, n) {
77
77
  const t = (e.toString().split(".")[1] || "").length, r = n.toString();
78
78
  let s = (r.split(".")[1] || "").length;
79
79
  if (s === 0 && /\d?e-\d?/.test(r)) {
@@ -119,7 +119,7 @@ function Y(...e) {
119
119
  function Qe(e) {
120
120
  return JSON.stringify(e);
121
121
  }
122
- function Dt(e) {
122
+ function Ct(e) {
123
123
  return e.toLowerCase().trim().replace(/[^\w\s-]/g, "").replace(/[\s_-]+/g, "-").replace(/^-+|-+$/g, "");
124
124
  }
125
125
  const Cn = "captureStackTrace" in Error ? Error.captureStackTrace : (...e) => {
@@ -127,7 +127,7 @@ const Cn = "captureStackTrace" in Error ? Error.captureStackTrace : (...e) => {
127
127
  function ge(e) {
128
128
  return typeof e == "object" && e !== null && !Array.isArray(e);
129
129
  }
130
- const Ct = Pe(() => {
130
+ const xt = Pe(() => {
131
131
  if (typeof navigator < "u" && navigator?.userAgent?.includes("Cloudflare"))
132
132
  return !1;
133
133
  try {
@@ -149,7 +149,7 @@ function ae(e) {
149
149
  function xn(e) {
150
150
  return ae(e) ? { ...e } : Array.isArray(e) ? [...e] : e;
151
151
  }
152
- const xt = /* @__PURE__ */ new Set(["string", "number", "symbol"]);
152
+ const qt = /* @__PURE__ */ new Set(["string", "number", "symbol"]);
153
153
  function ce(e) {
154
154
  return e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
155
155
  }
@@ -170,17 +170,17 @@ function w(e) {
170
170
  }
171
171
  return delete n.message, typeof n.error == "string" ? { ...n, error: () => n.error } : n;
172
172
  }
173
- function qt(e) {
173
+ function Zt(e) {
174
174
  return Object.keys(e).filter((n) => e[n]._zod.optin === "optional" && e[n]._zod.optout === "optional");
175
175
  }
176
- const Zt = {
176
+ const Ft = {
177
177
  safeint: [Number.MIN_SAFE_INTEGER, Number.MAX_SAFE_INTEGER],
178
178
  int32: [-2147483648, 2147483647],
179
179
  uint32: [0, 4294967295],
180
180
  float32: [-34028234663852886e22, 34028234663852886e22],
181
181
  float64: [-Number.MAX_VALUE, Number.MAX_VALUE]
182
182
  };
183
- function Ft(e, n) {
183
+ function Bt(e, n) {
184
184
  const t = e._zod.def, r = t.checks;
185
185
  if (r && r.length > 0)
186
186
  throw new Error(".pick() cannot be used on object schemas containing refinements");
@@ -198,7 +198,7 @@ function Ft(e, n) {
198
198
  });
199
199
  return Q(e, i);
200
200
  }
201
- function Bt(e, n) {
201
+ function jt(e, n) {
202
202
  const t = e._zod.def, r = t.checks;
203
203
  if (r && r.length > 0)
204
204
  throw new Error(".omit() cannot be used on object schemas containing refinements");
@@ -216,7 +216,7 @@ function Bt(e, n) {
216
216
  });
217
217
  return Q(e, i);
218
218
  }
219
- function jt(e, n) {
219
+ function Vt(e, n) {
220
220
  if (!ae(n))
221
221
  throw new Error("Invalid input to extend: expected a plain object");
222
222
  const t = e._zod.def.checks;
@@ -234,7 +234,7 @@ function jt(e, n) {
234
234
  });
235
235
  return Q(e, s);
236
236
  }
237
- function Vt(e, n) {
237
+ function Lt(e, n) {
238
238
  if (!ae(n))
239
239
  throw new Error("Invalid input to safeExtend: expected a plain object");
240
240
  const t = Y(e._zod.def, {
@@ -245,7 +245,7 @@ function Vt(e, n) {
245
245
  });
246
246
  return Q(e, t);
247
247
  }
248
- function Lt(e, n) {
248
+ function Gt(e, n) {
249
249
  const t = Y(e._zod.def, {
250
250
  get shape() {
251
251
  const r = { ...e._zod.def.shape, ...n._zod.def.shape };
@@ -259,7 +259,7 @@ function Lt(e, n) {
259
259
  });
260
260
  return Q(e, t);
261
261
  }
262
- function Gt(e, n, t) {
262
+ function Jt(e, n, t) {
263
263
  const s = n._zod.def.checks;
264
264
  if (s && s.length > 0)
265
265
  throw new Error(".partial() cannot be used on object schemas containing refinements");
@@ -287,7 +287,7 @@ function Gt(e, n, t) {
287
287
  });
288
288
  return Q(n, o);
289
289
  }
290
- function Jt(e, n, t) {
290
+ function Wt(e, n, t) {
291
291
  const r = Y(n._zod.def, {
292
292
  get shape() {
293
293
  const s = n._zod.def.shape, i = { ...s };
@@ -360,13 +360,13 @@ const qn = (e, n) => {
360
360
  enumerable: !1
361
361
  });
362
362
  }, Zn = l("$ZodError", qn), Fn = l("$ZodError", qn, { Parent: Error });
363
- function Wt(e, n = (t) => t.message) {
363
+ function Ht(e, n = (t) => t.message) {
364
364
  const t = {}, r = [];
365
365
  for (const s of e.issues)
366
366
  s.path.length > 0 ? (t[s.path[0]] = t[s.path[0]] || [], t[s.path[0]].push(n(s))) : r.push(n(s));
367
367
  return { formErrors: r, fieldErrors: t };
368
368
  }
369
- function Ht(e, n = (t) => t.message) {
369
+ function Xt(e, n = (t) => t.message) {
370
370
  const t = { _errors: [] }, r = (s) => {
371
371
  for (const i of s.issues)
372
372
  if (i.code === "invalid_union" && i.errors.length)
@@ -412,47 +412,47 @@ const Ge = (e) => (n, t, r, s) => {
412
412
  success: !1,
413
413
  error: new (e ?? Zn)(i.issues.map((o) => X(o, s, H())))
414
414
  } : { success: !0, data: i.value };
415
- }, Xt = /* @__PURE__ */ Ue(Fn), Re = (e) => async (n, t, r) => {
415
+ }, Kt = /* @__PURE__ */ Ue(Fn), Re = (e) => async (n, t, r) => {
416
416
  const s = r ? Object.assign(r, { async: !0 }) : { async: !0 };
417
417
  let i = n._zod.run({ value: t, issues: [] }, s);
418
418
  return i instanceof Promise && (i = await i), i.issues.length ? {
419
419
  success: !1,
420
420
  error: new e(i.issues.map((o) => X(o, s, H())))
421
421
  } : { success: !0, data: i.value };
422
- }, Kt = /* @__PURE__ */ Re(Fn), Yt = (e) => (n, t, r) => {
422
+ }, Yt = /* @__PURE__ */ Re(Fn), Qt = (e) => (n, t, r) => {
423
423
  const s = r ? Object.assign(r, { direction: "backward" }) : { direction: "backward" };
424
424
  return Ge(e)(n, t, s);
425
- }, Qt = (e) => (n, t, r) => Ge(e)(n, t, r), er = (e) => async (n, t, r) => {
425
+ }, er = (e) => (n, t, r) => Ge(e)(n, t, r), nr = (e) => async (n, t, r) => {
426
426
  const s = r ? Object.assign(r, { direction: "backward" }) : { direction: "backward" };
427
427
  return Je(e)(n, t, s);
428
- }, nr = (e) => async (n, t, r) => Je(e)(n, t, r), tr = (e) => (n, t, r) => {
428
+ }, tr = (e) => async (n, t, r) => Je(e)(n, t, r), rr = (e) => (n, t, r) => {
429
429
  const s = r ? Object.assign(r, { direction: "backward" }) : { direction: "backward" };
430
430
  return Ue(e)(n, t, s);
431
- }, rr = (e) => (n, t, r) => Ue(e)(n, t, r), sr = (e) => async (n, t, r) => {
431
+ }, sr = (e) => (n, t, r) => Ue(e)(n, t, r), ir = (e) => async (n, t, r) => {
432
432
  const s = r ? Object.assign(r, { direction: "backward" }) : { direction: "backward" };
433
433
  return Re(e)(n, t, s);
434
- }, ir = (e) => async (n, t, r) => Re(e)(n, t, r), or = /^[cC][^\s-]{8,}$/, ar = /^[0-9a-z]+$/, cr = /^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/, ur = /^[0-9a-vA-V]{20}$/, dr = /^[A-Za-z0-9]{27}$/, lr = /^[a-zA-Z0-9_-]{21}$/, fr = /^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/, hr = /^([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})$/, en = (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)$/, pr = /^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/, mr = "^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";
435
- function wr() {
436
- return new RegExp(mr, "u");
434
+ }, or = (e) => async (n, t, r) => Re(e)(n, t, r), ar = /^[cC][^\s-]{8,}$/, cr = /^[0-9a-z]+$/, ur = /^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/, dr = /^[0-9a-vA-V]{20}$/, lr = /^[A-Za-z0-9]{27}$/, fr = /^[a-zA-Z0-9_-]{21}$/, hr = /^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/, pr = /^([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})$/, en = (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)$/, mr = /^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/, wr = "^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";
435
+ function gr() {
436
+ return new RegExp(wr, "u");
437
437
  }
438
- const gr = /^(?:(?: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])$/, vr = /^(([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}|:))$/, br = /^((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])$/, yr = /^(([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])$/, _r = /^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/, Bn = /^[A-Za-z0-9_-]*$/, kr = /^\+[1-9]\d{6,14}$/, jn = "(?:(?:\\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])))", Sr = /* @__PURE__ */ new RegExp(`^${jn}$`);
438
+ const vr = /^(?:(?: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])$/, br = /^(([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}|:))$/, yr = /^((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])$/, _r = /^(([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])$/, kr = /^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/, Bn = /^[A-Za-z0-9_-]*$/, Sr = /^\+[1-9]\d{6,14}$/, jn = "(?:(?:\\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])))", zr = /* @__PURE__ */ new RegExp(`^${jn}$`);
439
439
  function Vn(e) {
440
440
  const n = "(?:[01]\\d|2[0-3]):[0-5]\\d";
441
441
  return typeof e.precision == "number" ? e.precision === -1 ? `${n}` : e.precision === 0 ? `${n}:[0-5]\\d` : `${n}:[0-5]\\d\\.\\d{${e.precision}}` : `${n}(?::[0-5]\\d(?:\\.\\d+)?)?`;
442
442
  }
443
- function zr(e) {
443
+ function Ir(e) {
444
444
  return new RegExp(`^${Vn(e)}$`);
445
445
  }
446
- function Ir(e) {
446
+ function Er(e) {
447
447
  const n = Vn({ precision: e.precision }), t = ["Z"];
448
448
  e.local && t.push(""), e.offset && t.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");
449
449
  const r = `${n}(?:${t.join("|")})`;
450
450
  return new RegExp(`^${jn}T(?:${r})$`);
451
451
  }
452
- const Er = (e) => {
452
+ const Tr = (e) => {
453
453
  const n = e ? `[\\s\\S]{${e?.minimum ?? 0},${e?.maximum ?? ""}}` : "[\\s\\S]*";
454
454
  return new RegExp(`^${n}$`);
455
- }, Tr = /^-?\d+$/, Ln = /^-?\d+(?:\.\d+)?$/, Or = /^(?:true|false)$/i, Ar = /^[^A-Z]*$/, Pr = /^[^a-z]*$/, x = /* @__PURE__ */ l("$ZodCheck", (e, n) => {
455
+ }, Or = /^-?\d+$/, Ln = /^-?\d+(?:\.\d+)?$/, Ar = /^(?:true|false)$/i, Pr = /^[^A-Z]*$/, Ur = /^[^a-z]*$/, x = /* @__PURE__ */ l("$ZodCheck", (e, n) => {
456
456
  var t;
457
457
  e._zod ?? (e._zod = {}), e._zod.def = n, (t = e._zod).onattach ?? (t.onattach = []);
458
458
  }), Gn = {
@@ -493,14 +493,14 @@ const Er = (e) => {
493
493
  continue: !n.abort
494
494
  });
495
495
  };
496
- }), Ur = /* @__PURE__ */ l("$ZodCheckMultipleOf", (e, n) => {
496
+ }), Rr = /* @__PURE__ */ l("$ZodCheckMultipleOf", (e, n) => {
497
497
  x.init(e, n), e._zod.onattach.push((t) => {
498
498
  var r;
499
499
  (r = t._zod.bag).multipleOf ?? (r.multipleOf = n.value);
500
500
  }), e._zod.check = (t) => {
501
501
  if (typeof t.value != typeof n.value)
502
502
  throw new Error("Cannot mix number and bigint in multiple_of check.");
503
- (typeof t.value == "bigint" ? t.value % n.value === BigInt(0) : $t(t.value, n.value) === 0) || t.issues.push({
503
+ (typeof t.value == "bigint" ? t.value % n.value === BigInt(0) : Dt(t.value, n.value) === 0) || t.issues.push({
504
504
  origin: typeof t.value,
505
505
  code: "not_multiple_of",
506
506
  divisor: n.value,
@@ -509,12 +509,12 @@ const Er = (e) => {
509
509
  continue: !n.abort
510
510
  });
511
511
  };
512
- }), Rr = /* @__PURE__ */ l("$ZodCheckNumberFormat", (e, n) => {
512
+ }), Nr = /* @__PURE__ */ l("$ZodCheckNumberFormat", (e, n) => {
513
513
  x.init(e, n), n.format = n.format || "float64";
514
- const t = n.format?.includes("int"), r = t ? "int" : "number", [s, i] = Zt[n.format];
514
+ const t = n.format?.includes("int"), r = t ? "int" : "number", [s, i] = Ft[n.format];
515
515
  e._zod.onattach.push((o) => {
516
516
  const a = o._zod.bag;
517
- a.format = n.format, a.minimum = s, a.maximum = i, t && (a.pattern = Tr);
517
+ a.format = n.format, a.minimum = s, a.maximum = i, t && (a.pattern = Or);
518
518
  }), e._zod.check = (o) => {
519
519
  const a = o.value;
520
520
  if (t) {
@@ -570,7 +570,7 @@ const Er = (e) => {
570
570
  continue: !n.abort
571
571
  });
572
572
  };
573
- }), Nr = /* @__PURE__ */ l("$ZodCheckMaxLength", (e, n) => {
573
+ }), Mr = /* @__PURE__ */ l("$ZodCheckMaxLength", (e, n) => {
574
574
  var t;
575
575
  x.init(e, n), (t = e._zod.def).when ?? (t.when = (r) => {
576
576
  const s = r.value;
@@ -593,7 +593,7 @@ const Er = (e) => {
593
593
  continue: !n.abort
594
594
  });
595
595
  };
596
- }), Mr = /* @__PURE__ */ l("$ZodCheckMinLength", (e, n) => {
596
+ }), $r = /* @__PURE__ */ l("$ZodCheckMinLength", (e, n) => {
597
597
  var t;
598
598
  x.init(e, n), (t = e._zod.def).when ?? (t.when = (r) => {
599
599
  const s = r.value;
@@ -616,7 +616,7 @@ const Er = (e) => {
616
616
  continue: !n.abort
617
617
  });
618
618
  };
619
- }), $r = /* @__PURE__ */ l("$ZodCheckLengthEquals", (e, n) => {
619
+ }), Dr = /* @__PURE__ */ l("$ZodCheckLengthEquals", (e, n) => {
620
620
  var t;
621
621
  x.init(e, n), (t = e._zod.def).when ?? (t.when = (r) => {
622
622
  const s = r.value;
@@ -656,7 +656,7 @@ const Er = (e) => {
656
656
  });
657
657
  }) : (r = e._zod).check ?? (r.check = () => {
658
658
  });
659
- }), Dr = /* @__PURE__ */ l("$ZodCheckRegex", (e, n) => {
659
+ }), Cr = /* @__PURE__ */ l("$ZodCheckRegex", (e, n) => {
660
660
  Ne.init(e, n), e._zod.check = (t) => {
661
661
  n.pattern.lastIndex = 0, !n.pattern.test(t.value) && t.issues.push({
662
662
  origin: "string",
@@ -668,11 +668,11 @@ const Er = (e) => {
668
668
  continue: !n.abort
669
669
  });
670
670
  };
671
- }), Cr = /* @__PURE__ */ l("$ZodCheckLowerCase", (e, n) => {
672
- n.pattern ?? (n.pattern = Ar), Ne.init(e, n);
673
- }), xr = /* @__PURE__ */ l("$ZodCheckUpperCase", (e, n) => {
671
+ }), xr = /* @__PURE__ */ l("$ZodCheckLowerCase", (e, n) => {
674
672
  n.pattern ?? (n.pattern = Pr), Ne.init(e, n);
675
- }), qr = /* @__PURE__ */ l("$ZodCheckIncludes", (e, n) => {
673
+ }), qr = /* @__PURE__ */ l("$ZodCheckUpperCase", (e, n) => {
674
+ n.pattern ?? (n.pattern = Ur), Ne.init(e, n);
675
+ }), Zr = /* @__PURE__ */ l("$ZodCheckIncludes", (e, n) => {
676
676
  x.init(e, n);
677
677
  const t = ce(n.includes), r = new RegExp(typeof n.position == "number" ? `^.{${n.position}}${t}` : t);
678
678
  n.pattern = r, e._zod.onattach.push((s) => {
@@ -689,7 +689,7 @@ const Er = (e) => {
689
689
  continue: !n.abort
690
690
  });
691
691
  };
692
- }), Zr = /* @__PURE__ */ l("$ZodCheckStartsWith", (e, n) => {
692
+ }), Fr = /* @__PURE__ */ l("$ZodCheckStartsWith", (e, n) => {
693
693
  x.init(e, n);
694
694
  const t = new RegExp(`^${ce(n.prefix)}.*`);
695
695
  n.pattern ?? (n.pattern = t), e._zod.onattach.push((r) => {
@@ -706,7 +706,7 @@ const Er = (e) => {
706
706
  continue: !n.abort
707
707
  });
708
708
  };
709
- }), Fr = /* @__PURE__ */ l("$ZodCheckEndsWith", (e, n) => {
709
+ }), Br = /* @__PURE__ */ l("$ZodCheckEndsWith", (e, n) => {
710
710
  x.init(e, n);
711
711
  const t = new RegExp(`.*${ce(n.suffix)}$`);
712
712
  n.pattern ?? (n.pattern = t), e._zod.onattach.push((r) => {
@@ -723,12 +723,12 @@ const Er = (e) => {
723
723
  continue: !n.abort
724
724
  });
725
725
  };
726
- }), Br = /* @__PURE__ */ l("$ZodCheckOverwrite", (e, n) => {
726
+ }), jr = /* @__PURE__ */ l("$ZodCheckOverwrite", (e, n) => {
727
727
  x.init(e, n), e._zod.check = (t) => {
728
728
  t.value = n.tx(t.value);
729
729
  };
730
730
  });
731
- class jr {
731
+ class Vr {
732
732
  constructor(n = []) {
733
733
  this.content = [], this.indent = 0, this && (this.args = n);
734
734
  }
@@ -751,13 +751,13 @@ class jr {
751
751
  `));
752
752
  }
753
753
  }
754
- const Vr = {
754
+ const Lr = {
755
755
  major: 4,
756
756
  minor: 3,
757
757
  patch: 6
758
758
  }, z = /* @__PURE__ */ l("$ZodType", (e, n) => {
759
759
  var t;
760
- e ?? (e = {}), e._zod.def = n, e._zod.bag = e._zod.bag || {}, e._zod.version = Vr;
760
+ e ?? (e = {}), e._zod.def = n, e._zod.bag = e._zod.bag || {}, e._zod.version = Lr;
761
761
  const r = [...e._zod.def.checks ?? []];
762
762
  e._zod.traits.has("$ZodCheck") && r.unshift(e);
763
763
  for (const s of r)
@@ -820,17 +820,17 @@ const Vr = {
820
820
  b(e, "~standard", () => ({
821
821
  validate: (s) => {
822
822
  try {
823
- const i = Xt(e, s);
823
+ const i = Kt(e, s);
824
824
  return i.success ? { value: i.data } : { issues: i.error?.issues };
825
825
  } catch {
826
- return Kt(e, s).then((o) => o.success ? { value: o.data } : { issues: o.error?.issues });
826
+ return Yt(e, s).then((o) => o.success ? { value: o.data } : { issues: o.error?.issues });
827
827
  }
828
828
  },
829
829
  vendor: "zod",
830
830
  version: 1
831
831
  }));
832
832
  }), We = /* @__PURE__ */ l("$ZodString", (e, n) => {
833
- z.init(e, n), e._zod.pattern = [...e?._zod.bag?.patterns ?? []].pop() ?? Er(e._zod.bag), e._zod.parse = (t, r) => {
833
+ z.init(e, n), e._zod.pattern = [...e?._zod.bag?.patterns ?? []].pop() ?? Tr(e._zod.bag), e._zod.parse = (t, r) => {
834
834
  if (n.coerce)
835
835
  try {
836
836
  t.value = String(t.value);
@@ -845,9 +845,9 @@ const Vr = {
845
845
  };
846
846
  }), _ = /* @__PURE__ */ l("$ZodStringFormat", (e, n) => {
847
847
  Ne.init(e, n), We.init(e, n);
848
- }), Lr = /* @__PURE__ */ l("$ZodGUID", (e, n) => {
849
- n.pattern ?? (n.pattern = hr), _.init(e, n);
850
- }), Gr = /* @__PURE__ */ l("$ZodUUID", (e, n) => {
848
+ }), Gr = /* @__PURE__ */ l("$ZodGUID", (e, n) => {
849
+ n.pattern ?? (n.pattern = pr), _.init(e, n);
850
+ }), Jr = /* @__PURE__ */ l("$ZodUUID", (e, n) => {
851
851
  if (n.version) {
852
852
  const r = {
853
853
  v1: 1,
@@ -865,9 +865,9 @@ const Vr = {
865
865
  } else
866
866
  n.pattern ?? (n.pattern = en());
867
867
  _.init(e, n);
868
- }), Jr = /* @__PURE__ */ l("$ZodEmail", (e, n) => {
869
- n.pattern ?? (n.pattern = pr), _.init(e, n);
870
- }), Wr = /* @__PURE__ */ l("$ZodURL", (e, n) => {
868
+ }), Wr = /* @__PURE__ */ l("$ZodEmail", (e, n) => {
869
+ n.pattern ?? (n.pattern = mr), _.init(e, n);
870
+ }), Hr = /* @__PURE__ */ l("$ZodURL", (e, n) => {
871
871
  _.init(e, n), e._zod.check = (t) => {
872
872
  try {
873
873
  const r = t.value.trim(), s = new URL(r);
@@ -899,32 +899,32 @@ const Vr = {
899
899
  });
900
900
  }
901
901
  };
902
- }), Hr = /* @__PURE__ */ l("$ZodEmoji", (e, n) => {
903
- n.pattern ?? (n.pattern = wr()), _.init(e, n);
904
- }), Xr = /* @__PURE__ */ l("$ZodNanoID", (e, n) => {
905
- n.pattern ?? (n.pattern = lr), _.init(e, n);
906
- }), Kr = /* @__PURE__ */ l("$ZodCUID", (e, n) => {
907
- n.pattern ?? (n.pattern = or), _.init(e, n);
908
- }), Yr = /* @__PURE__ */ l("$ZodCUID2", (e, n) => {
902
+ }), Xr = /* @__PURE__ */ l("$ZodEmoji", (e, n) => {
903
+ n.pattern ?? (n.pattern = gr()), _.init(e, n);
904
+ }), Kr = /* @__PURE__ */ l("$ZodNanoID", (e, n) => {
905
+ n.pattern ?? (n.pattern = fr), _.init(e, n);
906
+ }), Yr = /* @__PURE__ */ l("$ZodCUID", (e, n) => {
909
907
  n.pattern ?? (n.pattern = ar), _.init(e, n);
910
- }), Qr = /* @__PURE__ */ l("$ZodULID", (e, n) => {
908
+ }), Qr = /* @__PURE__ */ l("$ZodCUID2", (e, n) => {
911
909
  n.pattern ?? (n.pattern = cr), _.init(e, n);
912
- }), es = /* @__PURE__ */ l("$ZodXID", (e, n) => {
910
+ }), es = /* @__PURE__ */ l("$ZodULID", (e, n) => {
913
911
  n.pattern ?? (n.pattern = ur), _.init(e, n);
914
- }), ns = /* @__PURE__ */ l("$ZodKSUID", (e, n) => {
912
+ }), ns = /* @__PURE__ */ l("$ZodXID", (e, n) => {
915
913
  n.pattern ?? (n.pattern = dr), _.init(e, n);
916
- }), ts = /* @__PURE__ */ l("$ZodISODateTime", (e, n) => {
914
+ }), ts = /* @__PURE__ */ l("$ZodKSUID", (e, n) => {
915
+ n.pattern ?? (n.pattern = lr), _.init(e, n);
916
+ }), rs = /* @__PURE__ */ l("$ZodISODateTime", (e, n) => {
917
+ n.pattern ?? (n.pattern = Er(n)), _.init(e, n);
918
+ }), ss = /* @__PURE__ */ l("$ZodISODate", (e, n) => {
919
+ n.pattern ?? (n.pattern = zr), _.init(e, n);
920
+ }), is = /* @__PURE__ */ l("$ZodISOTime", (e, n) => {
917
921
  n.pattern ?? (n.pattern = Ir(n)), _.init(e, n);
918
- }), rs = /* @__PURE__ */ l("$ZodISODate", (e, n) => {
919
- n.pattern ?? (n.pattern = Sr), _.init(e, n);
920
- }), ss = /* @__PURE__ */ l("$ZodISOTime", (e, n) => {
921
- n.pattern ?? (n.pattern = zr(n)), _.init(e, n);
922
- }), is = /* @__PURE__ */ l("$ZodISODuration", (e, n) => {
923
- n.pattern ?? (n.pattern = fr), _.init(e, n);
924
- }), os = /* @__PURE__ */ l("$ZodIPv4", (e, n) => {
925
- n.pattern ?? (n.pattern = gr), _.init(e, n), e._zod.bag.format = "ipv4";
926
- }), as = /* @__PURE__ */ l("$ZodIPv6", (e, n) => {
927
- n.pattern ?? (n.pattern = vr), _.init(e, n), e._zod.bag.format = "ipv6", e._zod.check = (t) => {
922
+ }), os = /* @__PURE__ */ l("$ZodISODuration", (e, n) => {
923
+ n.pattern ?? (n.pattern = hr), _.init(e, n);
924
+ }), as = /* @__PURE__ */ l("$ZodIPv4", (e, n) => {
925
+ n.pattern ?? (n.pattern = vr), _.init(e, n), e._zod.bag.format = "ipv4";
926
+ }), cs = /* @__PURE__ */ l("$ZodIPv6", (e, n) => {
927
+ n.pattern ?? (n.pattern = br), _.init(e, n), e._zod.bag.format = "ipv6", e._zod.check = (t) => {
928
928
  try {
929
929
  new URL(`http://[${t.value}]`);
930
930
  } catch {
@@ -937,10 +937,10 @@ const Vr = {
937
937
  });
938
938
  }
939
939
  };
940
- }), cs = /* @__PURE__ */ l("$ZodCIDRv4", (e, n) => {
941
- n.pattern ?? (n.pattern = br), _.init(e, n);
942
- }), us = /* @__PURE__ */ l("$ZodCIDRv6", (e, n) => {
943
- n.pattern ?? (n.pattern = yr), _.init(e, n), e._zod.check = (t) => {
940
+ }), us = /* @__PURE__ */ l("$ZodCIDRv4", (e, n) => {
941
+ n.pattern ?? (n.pattern = yr), _.init(e, n);
942
+ }), ds = /* @__PURE__ */ l("$ZodCIDRv6", (e, n) => {
943
+ n.pattern ?? (n.pattern = _r), _.init(e, n), e._zod.check = (t) => {
944
944
  const r = t.value.split("/");
945
945
  try {
946
946
  if (r.length !== 2)
@@ -976,8 +976,8 @@ function Hn(e) {
976
976
  return !1;
977
977
  }
978
978
  }
979
- const ds = /* @__PURE__ */ l("$ZodBase64", (e, n) => {
980
- n.pattern ?? (n.pattern = _r), _.init(e, n), e._zod.bag.contentEncoding = "base64", e._zod.check = (t) => {
979
+ const ls = /* @__PURE__ */ l("$ZodBase64", (e, n) => {
980
+ n.pattern ?? (n.pattern = kr), _.init(e, n), e._zod.bag.contentEncoding = "base64", e._zod.check = (t) => {
981
981
  Hn(t.value) || t.issues.push({
982
982
  code: "invalid_format",
983
983
  format: "base64",
@@ -987,15 +987,15 @@ const ds = /* @__PURE__ */ l("$ZodBase64", (e, n) => {
987
987
  });
988
988
  };
989
989
  });
990
- function ls(e) {
990
+ function fs(e) {
991
991
  if (!Bn.test(e))
992
992
  return !1;
993
993
  const n = e.replace(/[-_]/g, (r) => r === "-" ? "+" : "/"), t = n.padEnd(Math.ceil(n.length / 4) * 4, "=");
994
994
  return Hn(t);
995
995
  }
996
- const fs = /* @__PURE__ */ l("$ZodBase64URL", (e, n) => {
996
+ const hs = /* @__PURE__ */ l("$ZodBase64URL", (e, n) => {
997
997
  n.pattern ?? (n.pattern = Bn), _.init(e, n), e._zod.bag.contentEncoding = "base64url", e._zod.check = (t) => {
998
- ls(t.value) || t.issues.push({
998
+ fs(t.value) || t.issues.push({
999
999
  code: "invalid_format",
1000
1000
  format: "base64url",
1001
1001
  input: t.value,
@@ -1003,10 +1003,10 @@ const fs = /* @__PURE__ */ l("$ZodBase64URL", (e, n) => {
1003
1003
  continue: !n.abort
1004
1004
  });
1005
1005
  };
1006
- }), hs = /* @__PURE__ */ l("$ZodE164", (e, n) => {
1007
- n.pattern ?? (n.pattern = kr), _.init(e, n);
1006
+ }), ps = /* @__PURE__ */ l("$ZodE164", (e, n) => {
1007
+ n.pattern ?? (n.pattern = Sr), _.init(e, n);
1008
1008
  });
1009
- function ps(e, n = null) {
1009
+ function ms(e, n = null) {
1010
1010
  try {
1011
1011
  const t = e.split(".");
1012
1012
  if (t.length !== 3)
@@ -1020,9 +1020,9 @@ function ps(e, n = null) {
1020
1020
  return !1;
1021
1021
  }
1022
1022
  }
1023
- const ms = /* @__PURE__ */ l("$ZodJWT", (e, n) => {
1023
+ const ws = /* @__PURE__ */ l("$ZodJWT", (e, n) => {
1024
1024
  _.init(e, n), e._zod.check = (t) => {
1025
- ps(t.value, n.alg) || t.issues.push({
1025
+ ms(t.value, n.alg) || t.issues.push({
1026
1026
  code: "invalid_format",
1027
1027
  format: "jwt",
1028
1028
  input: t.value,
@@ -1049,10 +1049,10 @@ const ms = /* @__PURE__ */ l("$ZodJWT", (e, n) => {
1049
1049
  ...i ? { received: i } : {}
1050
1050
  }), t;
1051
1051
  };
1052
- }), ws = /* @__PURE__ */ l("$ZodNumberFormat", (e, n) => {
1053
- Rr.init(e, n), Xn.init(e, n);
1054
- }), gs = /* @__PURE__ */ l("$ZodBoolean", (e, n) => {
1055
- z.init(e, n), e._zod.pattern = Or, e._zod.parse = (t, r) => {
1052
+ }), gs = /* @__PURE__ */ l("$ZodNumberFormat", (e, n) => {
1053
+ Nr.init(e, n), Xn.init(e, n);
1054
+ }), vs = /* @__PURE__ */ l("$ZodBoolean", (e, n) => {
1055
+ z.init(e, n), e._zod.pattern = Ar, e._zod.parse = (t, r) => {
1056
1056
  if (n.coerce)
1057
1057
  try {
1058
1058
  t.value = !!t.value;
@@ -1066,9 +1066,9 @@ const ms = /* @__PURE__ */ l("$ZodJWT", (e, n) => {
1066
1066
  inst: e
1067
1067
  }), t;
1068
1068
  };
1069
- }), vs = /* @__PURE__ */ l("$ZodUnknown", (e, n) => {
1069
+ }), bs = /* @__PURE__ */ l("$ZodUnknown", (e, n) => {
1070
1070
  z.init(e, n), e._zod.parse = (t) => t;
1071
- }), bs = /* @__PURE__ */ l("$ZodNever", (e, n) => {
1071
+ }), ys = /* @__PURE__ */ l("$ZodNever", (e, n) => {
1072
1072
  z.init(e, n), e._zod.parse = (t, r) => (t.issues.push({
1073
1073
  expected: "never",
1074
1074
  code: "invalid_type",
@@ -1079,7 +1079,7 @@ const ms = /* @__PURE__ */ l("$ZodJWT", (e, n) => {
1079
1079
  function nn(e, n, t) {
1080
1080
  e.issues.length && n.issues.push(...se(t, e.issues)), n.value[t] = e.value;
1081
1081
  }
1082
- const ys = /* @__PURE__ */ l("$ZodArray", (e, n) => {
1082
+ const _s = /* @__PURE__ */ l("$ZodArray", (e, n) => {
1083
1083
  z.init(e, n), e._zod.parse = (t, r) => {
1084
1084
  const s = t.value;
1085
1085
  if (!Array.isArray(s))
@@ -1114,7 +1114,7 @@ function Kn(e) {
1114
1114
  for (const r of n)
1115
1115
  if (!e.shape?.[r]?._zod?.traits?.has("$ZodType"))
1116
1116
  throw new Error(`Invalid element at key "${r}": expected a Zod schema`);
1117
- const t = qt(e.shape);
1117
+ const t = Zt(e.shape);
1118
1118
  return {
1119
1119
  ...e,
1120
1120
  keys: n,
@@ -1142,7 +1142,7 @@ function Yn(e, n, t, r, s, i) {
1142
1142
  inst: i
1143
1143
  }), e.length ? Promise.all(e).then(() => t) : t;
1144
1144
  }
1145
- const _s = /* @__PURE__ */ l("$ZodObject", (e, n) => {
1145
+ const ks = /* @__PURE__ */ l("$ZodObject", (e, n) => {
1146
1146
  if (z.init(e, n), !Object.getOwnPropertyDescriptor(n, "shape")?.get) {
1147
1147
  const a = n.shape;
1148
1148
  Object.defineProperty(n, "shape", {
@@ -1187,10 +1187,10 @@ const _s = /* @__PURE__ */ l("$ZodObject", (e, n) => {
1187
1187
  }
1188
1188
  return i ? Yn(d, u, a, c, r.value, e) : d.length ? Promise.all(d).then(() => a) : a;
1189
1189
  };
1190
- }), ks = /* @__PURE__ */ l("$ZodObjectJIT", (e, n) => {
1191
- _s.init(e, n);
1190
+ }), Ss = /* @__PURE__ */ l("$ZodObjectJIT", (e, n) => {
1191
+ ks.init(e, n);
1192
1192
  const t = e._zod.parse, r = Pe(() => Kn(n)), s = (p) => {
1193
- const m = new jr(["shape", "payload", "ctx"]), y = r.value, g = (R) => {
1193
+ const m = new Vr(["shape", "payload", "ctx"]), y = r.value, g = (R) => {
1194
1194
  const k = Qe(R);
1195
1195
  return `shape[${k}]._zod.run({ value: input[${k}], issues: [] }, ctx)`;
1196
1196
  };
@@ -1243,7 +1243,7 @@ const _s = /* @__PURE__ */ l("$ZodObject", (e, n) => {
1243
1243
  return (R, k) => Z(p, R, k);
1244
1244
  };
1245
1245
  let i;
1246
- const o = ge, a = !$n.jitless, u = a && Ct.value, d = n.catchall;
1246
+ const o = ge, a = !$n.jitless, u = a && xt.value, d = n.catchall;
1247
1247
  let f;
1248
1248
  e._zod.parse = (p, m) => {
1249
1249
  f ?? (f = r.value);
@@ -1299,7 +1299,7 @@ const Qn = /* @__PURE__ */ l("$ZodUnion", (e, n) => {
1299
1299
  }
1300
1300
  return o ? Promise.all(a).then((c) => tn(c, s, e, i)) : tn(a, s, e, i);
1301
1301
  };
1302
- }), Ss = /* @__PURE__ */ l("$ZodDiscriminatedUnion", (e, n) => {
1302
+ }), zs = /* @__PURE__ */ l("$ZodDiscriminatedUnion", (e, n) => {
1303
1303
  n.inclusive = !1, Qn.init(e, n);
1304
1304
  const t = e._zod.parse;
1305
1305
  b(e._zod, "propValues", () => {
@@ -1350,7 +1350,7 @@ const Qn = /* @__PURE__ */ l("$ZodUnion", (e, n) => {
1350
1350
  inst: e
1351
1351
  }), s);
1352
1352
  };
1353
- }), zs = /* @__PURE__ */ l("$ZodIntersection", (e, n) => {
1353
+ }), Is = /* @__PURE__ */ l("$ZodIntersection", (e, n) => {
1354
1354
  z.init(e, n), e._zod.parse = (t, r) => {
1355
1355
  const s = t.value, i = n.left._zod.run({ value: s, issues: [] }, r), o = n.right._zod.run({ value: s, issues: [] }, r);
1356
1356
  return i instanceof Promise || o instanceof Promise ? Promise.all([i, o]).then(([c, u]) => rn(t, c, u)) : rn(t, i, o);
@@ -1415,7 +1415,7 @@ function rn(e, n, t) {
1415
1415
  throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(o.mergeErrorPath)}`);
1416
1416
  return e.value = o.data, e;
1417
1417
  }
1418
- const Is = /* @__PURE__ */ l("$ZodRecord", (e, n) => {
1418
+ const Es = /* @__PURE__ */ l("$ZodRecord", (e, n) => {
1419
1419
  z.init(e, n), e._zod.parse = (t, r) => {
1420
1420
  const s = t.value;
1421
1421
  if (!ae(s))
@@ -1479,10 +1479,10 @@ const Is = /* @__PURE__ */ l("$ZodRecord", (e, n) => {
1479
1479
  }
1480
1480
  return i.length ? Promise.all(i).then(() => t) : t;
1481
1481
  };
1482
- }), Es = /* @__PURE__ */ l("$ZodEnum", (e, n) => {
1482
+ }), Ts = /* @__PURE__ */ l("$ZodEnum", (e, n) => {
1483
1483
  z.init(e, n);
1484
1484
  const t = Dn(n.entries), r = new Set(t);
1485
- e._zod.values = r, e._zod.pattern = new RegExp(`^(${t.filter((s) => xt.has(typeof s)).map((s) => typeof s == "string" ? ce(s) : s.toString()).join("|")})$`), e._zod.parse = (s, i) => {
1485
+ e._zod.values = r, e._zod.pattern = new RegExp(`^(${t.filter((s) => qt.has(typeof s)).map((s) => typeof s == "string" ? ce(s) : s.toString()).join("|")})$`), e._zod.parse = (s, i) => {
1486
1486
  const o = s.value;
1487
1487
  return r.has(o) || s.issues.push({
1488
1488
  code: "invalid_value",
@@ -1491,7 +1491,7 @@ const Is = /* @__PURE__ */ l("$ZodRecord", (e, n) => {
1491
1491
  inst: e
1492
1492
  }), s;
1493
1493
  };
1494
- }), Ts = /* @__PURE__ */ l("$ZodLiteral", (e, n) => {
1494
+ }), Os = /* @__PURE__ */ l("$ZodLiteral", (e, n) => {
1495
1495
  if (z.init(e, n), n.values.length === 0)
1496
1496
  throw new Error("Cannot create literal schema with no valid values");
1497
1497
  const t = new Set(n.values);
@@ -1504,7 +1504,7 @@ const Is = /* @__PURE__ */ l("$ZodRecord", (e, n) => {
1504
1504
  inst: e
1505
1505
  }), r;
1506
1506
  };
1507
- }), Os = /* @__PURE__ */ l("$ZodTransform", (e, n) => {
1507
+ }), As = /* @__PURE__ */ l("$ZodTransform", (e, n) => {
1508
1508
  z.init(e, n), e._zod.parse = (t, r) => {
1509
1509
  if (r.direction === "backward")
1510
1510
  throw new Mn(e.constructor.name);
@@ -1530,14 +1530,14 @@ const et = /* @__PURE__ */ l("$ZodOptional", (e, n) => {
1530
1530
  }
1531
1531
  return t.value === void 0 ? t : n.innerType._zod.run(t, r);
1532
1532
  };
1533
- }), As = /* @__PURE__ */ l("$ZodExactOptional", (e, n) => {
1533
+ }), Ps = /* @__PURE__ */ l("$ZodExactOptional", (e, n) => {
1534
1534
  et.init(e, n), b(e._zod, "values", () => n.innerType._zod.values), b(e._zod, "pattern", () => n.innerType._zod.pattern), e._zod.parse = (t, r) => n.innerType._zod.run(t, r);
1535
- }), Ps = /* @__PURE__ */ l("$ZodNullable", (e, n) => {
1535
+ }), Us = /* @__PURE__ */ l("$ZodNullable", (e, n) => {
1536
1536
  z.init(e, n), b(e._zod, "optin", () => n.innerType._zod.optin), b(e._zod, "optout", () => n.innerType._zod.optout), b(e._zod, "pattern", () => {
1537
1537
  const t = n.innerType._zod.pattern;
1538
1538
  return t ? new RegExp(`^(${Ve(t.source)}|null)$`) : void 0;
1539
1539
  }), b(e._zod, "values", () => n.innerType._zod.values ? /* @__PURE__ */ new Set([...n.innerType._zod.values, null]) : void 0), e._zod.parse = (t, r) => t.value === null ? t : n.innerType._zod.run(t, r);
1540
- }), Us = /* @__PURE__ */ l("$ZodDefault", (e, n) => {
1540
+ }), Rs = /* @__PURE__ */ l("$ZodDefault", (e, n) => {
1541
1541
  z.init(e, n), e._zod.optin = "optional", b(e._zod, "values", () => n.innerType._zod.values), e._zod.parse = (t, r) => {
1542
1542
  if (r.direction === "backward")
1543
1543
  return n.innerType._zod.run(t, r);
@@ -1550,9 +1550,9 @@ const et = /* @__PURE__ */ l("$ZodOptional", (e, n) => {
1550
1550
  function on(e, n) {
1551
1551
  return e.value === void 0 && (e.value = n.defaultValue), e;
1552
1552
  }
1553
- const Rs = /* @__PURE__ */ l("$ZodPrefault", (e, n) => {
1553
+ const Ns = /* @__PURE__ */ l("$ZodPrefault", (e, n) => {
1554
1554
  z.init(e, n), e._zod.optin = "optional", b(e._zod, "values", () => n.innerType._zod.values), e._zod.parse = (t, r) => (r.direction === "backward" || t.value === void 0 && (t.value = n.defaultValue), n.innerType._zod.run(t, r));
1555
- }), Ns = /* @__PURE__ */ l("$ZodNonOptional", (e, n) => {
1555
+ }), Ms = /* @__PURE__ */ l("$ZodNonOptional", (e, n) => {
1556
1556
  z.init(e, n), b(e._zod, "values", () => {
1557
1557
  const t = n.innerType._zod.values;
1558
1558
  return t ? new Set([...t].filter((r) => r !== void 0)) : void 0;
@@ -1569,7 +1569,7 @@ function an(e, n) {
1569
1569
  inst: n
1570
1570
  }), e;
1571
1571
  }
1572
- const Ms = /* @__PURE__ */ l("$ZodCatch", (e, n) => {
1572
+ const $s = /* @__PURE__ */ l("$ZodCatch", (e, n) => {
1573
1573
  z.init(e, n), b(e._zod, "optin", () => n.innerType._zod.optin), b(e._zod, "optout", () => n.innerType._zod.optout), b(e._zod, "values", () => n.innerType._zod.values), e._zod.parse = (t, r) => {
1574
1574
  if (r.direction === "backward")
1575
1575
  return n.innerType._zod.run(t, r);
@@ -1588,7 +1588,7 @@ const Ms = /* @__PURE__ */ l("$ZodCatch", (e, n) => {
1588
1588
  input: t.value
1589
1589
  }), t.issues = []), t);
1590
1590
  };
1591
- }), $s = /* @__PURE__ */ l("$ZodPipe", (e, n) => {
1591
+ }), Ds = /* @__PURE__ */ l("$ZodPipe", (e, n) => {
1592
1592
  z.init(e, n), b(e._zod, "values", () => n.in._zod.values), b(e._zod, "optin", () => n.in._zod.optin), b(e._zod, "optout", () => n.out._zod.optout), b(e._zod, "propValues", () => n.in._zod.propValues), e._zod.parse = (t, r) => {
1593
1593
  if (r.direction === "backward") {
1594
1594
  const i = n.out._zod.run(t, r);
@@ -1601,7 +1601,7 @@ const Ms = /* @__PURE__ */ l("$ZodCatch", (e, n) => {
1601
1601
  function ze(e, n, t) {
1602
1602
  return e.issues.length ? (e.aborted = !0, e) : n._zod.run({ value: e.value, issues: e.issues }, t);
1603
1603
  }
1604
- const Ds = /* @__PURE__ */ l("$ZodReadonly", (e, n) => {
1604
+ const Cs = /* @__PURE__ */ l("$ZodReadonly", (e, n) => {
1605
1605
  z.init(e, n), b(e._zod, "propValues", () => n.innerType._zod.propValues), b(e._zod, "values", () => n.innerType._zod.values), b(e._zod, "optin", () => n.innerType?._zod?.optin), b(e._zod, "optout", () => n.innerType?._zod?.optout), e._zod.parse = (t, r) => {
1606
1606
  if (r.direction === "backward")
1607
1607
  return n.innerType._zod.run(t, r);
@@ -1612,7 +1612,7 @@ const Ds = /* @__PURE__ */ l("$ZodReadonly", (e, n) => {
1612
1612
  function cn(e) {
1613
1613
  return e.value = Object.freeze(e.value), e;
1614
1614
  }
1615
- const Cs = /* @__PURE__ */ l("$ZodCustom", (e, n) => {
1615
+ const xs = /* @__PURE__ */ l("$ZodCustom", (e, n) => {
1616
1616
  x.init(e, n), z.init(e, n), e._zod.parse = (t, r) => t, e._zod.check = (t) => {
1617
1617
  const r = t.value, s = n.fn(r);
1618
1618
  if (s instanceof Promise)
@@ -1636,7 +1636,7 @@ function un(e, n, t, r) {
1636
1636
  }
1637
1637
  }
1638
1638
  var dn;
1639
- class xs {
1639
+ class qs {
1640
1640
  constructor() {
1641
1641
  this._map = /* @__PURE__ */ new WeakMap(), this._idmap = /* @__PURE__ */ new Map();
1642
1642
  }
@@ -1665,20 +1665,20 @@ class xs {
1665
1665
  return this._map.has(n);
1666
1666
  }
1667
1667
  }
1668
- function qs() {
1669
- return new xs();
1668
+ function Zs() {
1669
+ return new qs();
1670
1670
  }
1671
- (dn = globalThis).__zod_globalRegistry ?? (dn.__zod_globalRegistry = qs());
1671
+ (dn = globalThis).__zod_globalRegistry ?? (dn.__zod_globalRegistry = Zs());
1672
1672
  const he = globalThis.__zod_globalRegistry;
1673
1673
  // @__NO_SIDE_EFFECTS__
1674
- function Zs(e, n) {
1674
+ function Fs(e, n) {
1675
1675
  return new e({
1676
1676
  type: "string",
1677
1677
  ...w(n)
1678
1678
  });
1679
1679
  }
1680
1680
  // @__NO_SIDE_EFFECTS__
1681
- function Fs(e, n) {
1681
+ function Bs(e, n) {
1682
1682
  return new e({
1683
1683
  type: "string",
1684
1684
  format: "email",
@@ -1698,7 +1698,7 @@ function ln(e, n) {
1698
1698
  });
1699
1699
  }
1700
1700
  // @__NO_SIDE_EFFECTS__
1701
- function Bs(e, n) {
1701
+ function js(e, n) {
1702
1702
  return new e({
1703
1703
  type: "string",
1704
1704
  format: "uuid",
@@ -1708,7 +1708,7 @@ function Bs(e, n) {
1708
1708
  });
1709
1709
  }
1710
1710
  // @__NO_SIDE_EFFECTS__
1711
- function js(e, n) {
1711
+ function Vs(e, n) {
1712
1712
  return new e({
1713
1713
  type: "string",
1714
1714
  format: "uuid",
@@ -1719,7 +1719,7 @@ function js(e, n) {
1719
1719
  });
1720
1720
  }
1721
1721
  // @__NO_SIDE_EFFECTS__
1722
- function Vs(e, n) {
1722
+ function Ls(e, n) {
1723
1723
  return new e({
1724
1724
  type: "string",
1725
1725
  format: "uuid",
@@ -1730,7 +1730,7 @@ function Vs(e, n) {
1730
1730
  });
1731
1731
  }
1732
1732
  // @__NO_SIDE_EFFECTS__
1733
- function Ls(e, n) {
1733
+ function Gs(e, n) {
1734
1734
  return new e({
1735
1735
  type: "string",
1736
1736
  format: "uuid",
@@ -1741,7 +1741,7 @@ function Ls(e, n) {
1741
1741
  });
1742
1742
  }
1743
1743
  // @__NO_SIDE_EFFECTS__
1744
- function Gs(e, n) {
1744
+ function Js(e, n) {
1745
1745
  return new e({
1746
1746
  type: "string",
1747
1747
  format: "url",
@@ -1751,7 +1751,7 @@ function Gs(e, n) {
1751
1751
  });
1752
1752
  }
1753
1753
  // @__NO_SIDE_EFFECTS__
1754
- function Js(e, n) {
1754
+ function Ws(e, n) {
1755
1755
  return new e({
1756
1756
  type: "string",
1757
1757
  format: "emoji",
@@ -1761,7 +1761,7 @@ function Js(e, n) {
1761
1761
  });
1762
1762
  }
1763
1763
  // @__NO_SIDE_EFFECTS__
1764
- function Ws(e, n) {
1764
+ function Hs(e, n) {
1765
1765
  return new e({
1766
1766
  type: "string",
1767
1767
  format: "nanoid",
@@ -1771,7 +1771,7 @@ function Ws(e, n) {
1771
1771
  });
1772
1772
  }
1773
1773
  // @__NO_SIDE_EFFECTS__
1774
- function Hs(e, n) {
1774
+ function Xs(e, n) {
1775
1775
  return new e({
1776
1776
  type: "string",
1777
1777
  format: "cuid",
@@ -1781,7 +1781,7 @@ function Hs(e, n) {
1781
1781
  });
1782
1782
  }
1783
1783
  // @__NO_SIDE_EFFECTS__
1784
- function Xs(e, n) {
1784
+ function Ks(e, n) {
1785
1785
  return new e({
1786
1786
  type: "string",
1787
1787
  format: "cuid2",
@@ -1791,7 +1791,7 @@ function Xs(e, n) {
1791
1791
  });
1792
1792
  }
1793
1793
  // @__NO_SIDE_EFFECTS__
1794
- function Ks(e, n) {
1794
+ function Ys(e, n) {
1795
1795
  return new e({
1796
1796
  type: "string",
1797
1797
  format: "ulid",
@@ -1801,7 +1801,7 @@ function Ks(e, n) {
1801
1801
  });
1802
1802
  }
1803
1803
  // @__NO_SIDE_EFFECTS__
1804
- function Ys(e, n) {
1804
+ function Qs(e, n) {
1805
1805
  return new e({
1806
1806
  type: "string",
1807
1807
  format: "xid",
@@ -1811,7 +1811,7 @@ function Ys(e, n) {
1811
1811
  });
1812
1812
  }
1813
1813
  // @__NO_SIDE_EFFECTS__
1814
- function Qs(e, n) {
1814
+ function ei(e, n) {
1815
1815
  return new e({
1816
1816
  type: "string",
1817
1817
  format: "ksuid",
@@ -1821,7 +1821,7 @@ function Qs(e, n) {
1821
1821
  });
1822
1822
  }
1823
1823
  // @__NO_SIDE_EFFECTS__
1824
- function ei(e, n) {
1824
+ function ni(e, n) {
1825
1825
  return new e({
1826
1826
  type: "string",
1827
1827
  format: "ipv4",
@@ -1831,7 +1831,7 @@ function ei(e, n) {
1831
1831
  });
1832
1832
  }
1833
1833
  // @__NO_SIDE_EFFECTS__
1834
- function ni(e, n) {
1834
+ function ti(e, n) {
1835
1835
  return new e({
1836
1836
  type: "string",
1837
1837
  format: "ipv6",
@@ -1841,7 +1841,7 @@ function ni(e, n) {
1841
1841
  });
1842
1842
  }
1843
1843
  // @__NO_SIDE_EFFECTS__
1844
- function ti(e, n) {
1844
+ function ri(e, n) {
1845
1845
  return new e({
1846
1846
  type: "string",
1847
1847
  format: "cidrv4",
@@ -1851,7 +1851,7 @@ function ti(e, n) {
1851
1851
  });
1852
1852
  }
1853
1853
  // @__NO_SIDE_EFFECTS__
1854
- function ri(e, n) {
1854
+ function si(e, n) {
1855
1855
  return new e({
1856
1856
  type: "string",
1857
1857
  format: "cidrv6",
@@ -1861,7 +1861,7 @@ function ri(e, n) {
1861
1861
  });
1862
1862
  }
1863
1863
  // @__NO_SIDE_EFFECTS__
1864
- function si(e, n) {
1864
+ function ii(e, n) {
1865
1865
  return new e({
1866
1866
  type: "string",
1867
1867
  format: "base64",
@@ -1871,7 +1871,7 @@ function si(e, n) {
1871
1871
  });
1872
1872
  }
1873
1873
  // @__NO_SIDE_EFFECTS__
1874
- function ii(e, n) {
1874
+ function oi(e, n) {
1875
1875
  return new e({
1876
1876
  type: "string",
1877
1877
  format: "base64url",
@@ -1881,7 +1881,7 @@ function ii(e, n) {
1881
1881
  });
1882
1882
  }
1883
1883
  // @__NO_SIDE_EFFECTS__
1884
- function oi(e, n) {
1884
+ function ai(e, n) {
1885
1885
  return new e({
1886
1886
  type: "string",
1887
1887
  format: "e164",
@@ -1891,7 +1891,7 @@ function oi(e, n) {
1891
1891
  });
1892
1892
  }
1893
1893
  // @__NO_SIDE_EFFECTS__
1894
- function ai(e, n) {
1894
+ function ci(e, n) {
1895
1895
  return new e({
1896
1896
  type: "string",
1897
1897
  format: "jwt",
@@ -1901,7 +1901,7 @@ function ai(e, n) {
1901
1901
  });
1902
1902
  }
1903
1903
  // @__NO_SIDE_EFFECTS__
1904
- function ci(e, n) {
1904
+ function ui(e, n) {
1905
1905
  return new e({
1906
1906
  type: "string",
1907
1907
  format: "datetime",
@@ -1913,7 +1913,7 @@ function ci(e, n) {
1913
1913
  });
1914
1914
  }
1915
1915
  // @__NO_SIDE_EFFECTS__
1916
- function ui(e, n) {
1916
+ function di(e, n) {
1917
1917
  return new e({
1918
1918
  type: "string",
1919
1919
  format: "date",
@@ -1922,7 +1922,7 @@ function ui(e, n) {
1922
1922
  });
1923
1923
  }
1924
1924
  // @__NO_SIDE_EFFECTS__
1925
- function di(e, n) {
1925
+ function li(e, n) {
1926
1926
  return new e({
1927
1927
  type: "string",
1928
1928
  format: "time",
@@ -1932,7 +1932,7 @@ function di(e, n) {
1932
1932
  });
1933
1933
  }
1934
1934
  // @__NO_SIDE_EFFECTS__
1935
- function li(e, n) {
1935
+ function fi(e, n) {
1936
1936
  return new e({
1937
1937
  type: "string",
1938
1938
  format: "duration",
@@ -1941,7 +1941,7 @@ function li(e, n) {
1941
1941
  });
1942
1942
  }
1943
1943
  // @__NO_SIDE_EFFECTS__
1944
- function fi(e, n) {
1944
+ function hi(e, n) {
1945
1945
  return new e({
1946
1946
  type: "number",
1947
1947
  checks: [],
@@ -1949,7 +1949,7 @@ function fi(e, n) {
1949
1949
  });
1950
1950
  }
1951
1951
  // @__NO_SIDE_EFFECTS__
1952
- function hi(e, n) {
1952
+ function pi(e, n) {
1953
1953
  return new e({
1954
1954
  type: "number",
1955
1955
  check: "number_format",
@@ -1959,20 +1959,20 @@ function hi(e, n) {
1959
1959
  });
1960
1960
  }
1961
1961
  // @__NO_SIDE_EFFECTS__
1962
- function pi(e, n) {
1962
+ function mi(e, n) {
1963
1963
  return new e({
1964
1964
  type: "boolean",
1965
1965
  ...w(n)
1966
1966
  });
1967
1967
  }
1968
1968
  // @__NO_SIDE_EFFECTS__
1969
- function mi(e) {
1969
+ function wi(e) {
1970
1970
  return new e({
1971
1971
  type: "unknown"
1972
1972
  });
1973
1973
  }
1974
1974
  // @__NO_SIDE_EFFECTS__
1975
- function wi(e, n) {
1975
+ function gi(e, n) {
1976
1976
  return new e({
1977
1977
  type: "never",
1978
1978
  ...w(n)
@@ -2016,7 +2016,7 @@ function De(e, n) {
2016
2016
  }
2017
2017
  // @__NO_SIDE_EFFECTS__
2018
2018
  function pn(e, n) {
2019
- return new Ur({
2019
+ return new Rr({
2020
2020
  check: "multiple_of",
2021
2021
  ...w(n),
2022
2022
  value: e
@@ -2024,7 +2024,7 @@ function pn(e, n) {
2024
2024
  }
2025
2025
  // @__NO_SIDE_EFFECTS__
2026
2026
  function nt(e, n) {
2027
- return new Nr({
2027
+ return new Mr({
2028
2028
  check: "max_length",
2029
2029
  ...w(n),
2030
2030
  maximum: e
@@ -2032,7 +2032,7 @@ function nt(e, n) {
2032
2032
  }
2033
2033
  // @__NO_SIDE_EFFECTS__
2034
2034
  function Te(e, n) {
2035
- return new Mr({
2035
+ return new $r({
2036
2036
  check: "min_length",
2037
2037
  ...w(n),
2038
2038
  minimum: e
@@ -2040,15 +2040,15 @@ function Te(e, n) {
2040
2040
  }
2041
2041
  // @__NO_SIDE_EFFECTS__
2042
2042
  function tt(e, n) {
2043
- return new $r({
2043
+ return new Dr({
2044
2044
  check: "length_equals",
2045
2045
  ...w(n),
2046
2046
  length: e
2047
2047
  });
2048
2048
  }
2049
2049
  // @__NO_SIDE_EFFECTS__
2050
- function gi(e, n) {
2051
- return new Dr({
2050
+ function vi(e, n) {
2051
+ return new Cr({
2052
2052
  check: "string_format",
2053
2053
  format: "regex",
2054
2054
  ...w(n),
@@ -2056,24 +2056,24 @@ function gi(e, n) {
2056
2056
  });
2057
2057
  }
2058
2058
  // @__NO_SIDE_EFFECTS__
2059
- function vi(e) {
2060
- return new Cr({
2059
+ function bi(e) {
2060
+ return new xr({
2061
2061
  check: "string_format",
2062
2062
  format: "lowercase",
2063
2063
  ...w(e)
2064
2064
  });
2065
2065
  }
2066
2066
  // @__NO_SIDE_EFFECTS__
2067
- function bi(e) {
2068
- return new xr({
2067
+ function yi(e) {
2068
+ return new qr({
2069
2069
  check: "string_format",
2070
2070
  format: "uppercase",
2071
2071
  ...w(e)
2072
2072
  });
2073
2073
  }
2074
2074
  // @__NO_SIDE_EFFECTS__
2075
- function yi(e, n) {
2076
- return new qr({
2075
+ function _i(e, n) {
2076
+ return new Zr({
2077
2077
  check: "string_format",
2078
2078
  format: "includes",
2079
2079
  ...w(n),
@@ -2081,8 +2081,8 @@ function yi(e, n) {
2081
2081
  });
2082
2082
  }
2083
2083
  // @__NO_SIDE_EFFECTS__
2084
- function _i(e, n) {
2085
- return new Zr({
2084
+ function ki(e, n) {
2085
+ return new Fr({
2086
2086
  check: "string_format",
2087
2087
  format: "starts_with",
2088
2088
  ...w(n),
@@ -2090,8 +2090,8 @@ function _i(e, n) {
2090
2090
  });
2091
2091
  }
2092
2092
  // @__NO_SIDE_EFFECTS__
2093
- function ki(e, n) {
2094
- return new Fr({
2093
+ function Si(e, n) {
2094
+ return new Br({
2095
2095
  check: "string_format",
2096
2096
  format: "ends_with",
2097
2097
  ...w(n),
@@ -2100,33 +2100,33 @@ function ki(e, n) {
2100
2100
  }
2101
2101
  // @__NO_SIDE_EFFECTS__
2102
2102
  function de(e) {
2103
- return new Br({
2103
+ return new jr({
2104
2104
  check: "overwrite",
2105
2105
  tx: e
2106
2106
  });
2107
2107
  }
2108
2108
  // @__NO_SIDE_EFFECTS__
2109
- function Si(e) {
2109
+ function zi(e) {
2110
2110
  return /* @__PURE__ */ de((n) => n.normalize(e));
2111
2111
  }
2112
2112
  // @__NO_SIDE_EFFECTS__
2113
- function zi() {
2113
+ function Ii() {
2114
2114
  return /* @__PURE__ */ de((e) => e.trim());
2115
2115
  }
2116
2116
  // @__NO_SIDE_EFFECTS__
2117
- function Ii() {
2117
+ function Ei() {
2118
2118
  return /* @__PURE__ */ de((e) => e.toLowerCase());
2119
2119
  }
2120
2120
  // @__NO_SIDE_EFFECTS__
2121
- function Ei() {
2121
+ function Ti() {
2122
2122
  return /* @__PURE__ */ de((e) => e.toUpperCase());
2123
2123
  }
2124
2124
  // @__NO_SIDE_EFFECTS__
2125
- function Ti() {
2126
- return /* @__PURE__ */ de((e) => Dt(e));
2125
+ function Oi() {
2126
+ return /* @__PURE__ */ de((e) => Ct(e));
2127
2127
  }
2128
2128
  // @__NO_SIDE_EFFECTS__
2129
- function Oi(e, n, t) {
2129
+ function Ai(e, n, t) {
2130
2130
  return new e({
2131
2131
  type: "array",
2132
2132
  element: n,
@@ -2137,7 +2137,7 @@ function Oi(e, n, t) {
2137
2137
  });
2138
2138
  }
2139
2139
  // @__NO_SIDE_EFFECTS__
2140
- function Ai(e, n, t) {
2140
+ function Pi(e, n, t) {
2141
2141
  return new e({
2142
2142
  type: "custom",
2143
2143
  check: "custom",
@@ -2146,8 +2146,8 @@ function Ai(e, n, t) {
2146
2146
  });
2147
2147
  }
2148
2148
  // @__NO_SIDE_EFFECTS__
2149
- function Pi(e) {
2150
- const n = /* @__PURE__ */ Ui((t) => (t.addIssue = (r) => {
2149
+ function Ui(e) {
2150
+ const n = /* @__PURE__ */ Ri((t) => (t.addIssue = (r) => {
2151
2151
  if (typeof r == "string")
2152
2152
  t.issues.push(ve(r, t.value, n._zod.def));
2153
2153
  else {
@@ -2158,7 +2158,7 @@ function Pi(e) {
2158
2158
  return n;
2159
2159
  }
2160
2160
  // @__NO_SIDE_EFFECTS__
2161
- function Ui(e, n) {
2161
+ function Ri(e, n) {
2162
2162
  const t = new x({
2163
2163
  check: "custom",
2164
2164
  ...w(n)
@@ -2392,24 +2392,24 @@ function $(e, n) {
2392
2392
  }
2393
2393
  return !1;
2394
2394
  }
2395
- const Ri = (e, n = {}) => (t) => {
2395
+ const Ni = (e, n = {}) => (t) => {
2396
2396
  const r = rt({ ...t, processors: n });
2397
2397
  return P(e, r), st(r, e), it(r, e);
2398
2398
  }, Oe = (e, n, t = {}) => (r) => {
2399
2399
  const { libraryOptions: s, target: i } = r ?? {}, o = rt({ ...s ?? {}, target: i, io: n, processors: t });
2400
2400
  return P(e, o), st(o, e), it(o, e);
2401
- }, Ni = {
2401
+ }, Mi = {
2402
2402
  guid: "uuid",
2403
2403
  url: "uri",
2404
2404
  datetime: "date-time",
2405
2405
  json_string: "json-string",
2406
2406
  regex: ""
2407
2407
  // do not set
2408
- }, Mi = (e, n, t, r) => {
2408
+ }, $i = (e, n, t, r) => {
2409
2409
  const s = t;
2410
2410
  s.type = "string";
2411
2411
  const { minimum: i, maximum: o, format: a, patterns: c, contentEncoding: u } = e._zod.bag;
2412
- if (typeof i == "number" && (s.minLength = i), typeof o == "number" && (s.maxLength = o), a && (s.format = Ni[a] ?? a, s.format === "" && delete s.format, a === "time" && delete s.format), u && (s.contentEncoding = u), c && c.size > 0) {
2412
+ if (typeof i == "number" && (s.minLength = i), typeof o == "number" && (s.maxLength = o), a && (s.format = Mi[a] ?? a, s.format === "" && delete s.format, a === "time" && delete s.format), u && (s.contentEncoding = u), c && c.size > 0) {
2413
2413
  const d = [...c];
2414
2414
  d.length === 1 ? s.pattern = d[0].source : d.length > 1 && (s.allOf = [
2415
2415
  ...d.map((f) => ({
@@ -2418,18 +2418,18 @@ const Ri = (e, n = {}) => (t) => {
2418
2418
  }))
2419
2419
  ]);
2420
2420
  }
2421
- }, $i = (e, n, t, r) => {
2421
+ }, Di = (e, n, t, r) => {
2422
2422
  const s = t, { minimum: i, maximum: o, format: a, multipleOf: c, exclusiveMaximum: u, exclusiveMinimum: d } = e._zod.bag;
2423
2423
  typeof a == "string" && a.includes("int") ? s.type = "integer" : s.type = "number", typeof d == "number" && (n.target === "draft-04" || n.target === "openapi-3.0" ? (s.minimum = d, s.exclusiveMinimum = !0) : s.exclusiveMinimum = d), typeof i == "number" && (s.minimum = i, typeof d == "number" && n.target !== "draft-04" && (d >= i ? delete s.minimum : delete s.exclusiveMinimum)), typeof u == "number" && (n.target === "draft-04" || n.target === "openapi-3.0" ? (s.maximum = u, s.exclusiveMaximum = !0) : s.exclusiveMaximum = u), typeof o == "number" && (s.maximum = o, typeof u == "number" && n.target !== "draft-04" && (u <= o ? delete s.maximum : delete s.exclusiveMaximum)), typeof c == "number" && (s.multipleOf = c);
2424
- }, Di = (e, n, t, r) => {
2425
- t.type = "boolean";
2426
2424
  }, Ci = (e, n, t, r) => {
2427
- t.not = {};
2425
+ t.type = "boolean";
2428
2426
  }, xi = (e, n, t, r) => {
2427
+ t.not = {};
2429
2428
  }, qi = (e, n, t, r) => {
2429
+ }, Zi = (e, n, t, r) => {
2430
2430
  const s = e._zod.def, i = Dn(s.entries);
2431
2431
  i.every((o) => typeof o == "number") && (t.type = "number"), i.every((o) => typeof o == "string") && (t.type = "string"), t.enum = i;
2432
- }, Zi = (e, n, t, r) => {
2432
+ }, Fi = (e, n, t, r) => {
2433
2433
  const s = e._zod.def, i = [];
2434
2434
  for (const o of s.values)
2435
2435
  if (o === void 0) {
@@ -2446,16 +2446,16 @@ const Ri = (e, n = {}) => (t) => {
2446
2446
  t.type = o === null ? "null" : typeof o, n.target === "draft-04" || n.target === "openapi-3.0" ? t.enum = [o] : t.const = o;
2447
2447
  } else
2448
2448
  i.every((o) => typeof o == "number") && (t.type = "number"), i.every((o) => typeof o == "string") && (t.type = "string"), i.every((o) => typeof o == "boolean") && (t.type = "boolean"), i.every((o) => o === null) && (t.type = "null"), t.enum = i;
2449
- }, Fi = (e, n, t, r) => {
2449
+ }, Bi = (e, n, t, r) => {
2450
2450
  if (n.unrepresentable === "throw")
2451
2451
  throw new Error("Custom types cannot be represented in JSON Schema");
2452
- }, Bi = (e, n, t, r) => {
2452
+ }, ji = (e, n, t, r) => {
2453
2453
  if (n.unrepresentable === "throw")
2454
2454
  throw new Error("Transforms cannot be represented in JSON Schema");
2455
- }, ji = (e, n, t, r) => {
2455
+ }, Vi = (e, n, t, r) => {
2456
2456
  const s = t, i = e._zod.def, { minimum: o, maximum: a } = e._zod.bag;
2457
2457
  typeof o == "number" && (s.minItems = o), typeof a == "number" && (s.maxItems = a), s.type = "array", s.items = P(i.element, n, { ...r, path: [...r.path, "items"] });
2458
- }, Vi = (e, n, t, r) => {
2458
+ }, Li = (e, n, t, r) => {
2459
2459
  const s = t, i = e._zod.def;
2460
2460
  s.type = "object", s.properties = {};
2461
2461
  const o = i.shape;
@@ -2472,13 +2472,13 @@ const Ri = (e, n = {}) => (t) => {
2472
2472
  ...r,
2473
2473
  path: [...r.path, "additionalProperties"]
2474
2474
  })) : n.io === "output" && (s.additionalProperties = !1);
2475
- }, Li = (e, n, t, r) => {
2475
+ }, Gi = (e, n, t, r) => {
2476
2476
  const s = e._zod.def, i = s.inclusive === !1, o = s.options.map((a, c) => P(a, n, {
2477
2477
  ...r,
2478
2478
  path: [...r.path, i ? "oneOf" : "anyOf", c]
2479
2479
  }));
2480
2480
  i ? t.oneOf = o : t.anyOf = o;
2481
- }, Gi = (e, n, t, r) => {
2481
+ }, Ji = (e, n, t, r) => {
2482
2482
  const s = e._zod.def, i = P(s.left, n, {
2483
2483
  ...r,
2484
2484
  path: [...r.path, "allOf", 0]
@@ -2490,7 +2490,7 @@ const Ri = (e, n = {}) => (t) => {
2490
2490
  ...a(o) ? o.allOf : [o]
2491
2491
  ];
2492
2492
  t.allOf = c;
2493
- }, Ji = (e, n, t, r) => {
2493
+ }, Wi = (e, n, t, r) => {
2494
2494
  const s = t, i = e._zod.def;
2495
2495
  s.type = "object";
2496
2496
  const o = i.keyType, c = o._zod.bag?.patterns;
@@ -2515,25 +2515,25 @@ const Ri = (e, n = {}) => (t) => {
2515
2515
  const d = [...u].filter((f) => typeof f == "string" || typeof f == "number");
2516
2516
  d.length > 0 && (s.required = d);
2517
2517
  }
2518
- }, Wi = (e, n, t, r) => {
2518
+ }, Hi = (e, n, t, r) => {
2519
2519
  const s = e._zod.def, i = P(s.innerType, n, r), o = n.seen.get(e);
2520
2520
  n.target === "openapi-3.0" ? (o.ref = s.innerType, t.nullable = !0) : t.anyOf = [i, { type: "null" }];
2521
- }, Hi = (e, n, t, r) => {
2521
+ }, Xi = (e, n, t, r) => {
2522
2522
  const s = e._zod.def;
2523
2523
  P(s.innerType, n, r);
2524
2524
  const i = n.seen.get(e);
2525
2525
  i.ref = s.innerType;
2526
- }, Xi = (e, n, t, r) => {
2526
+ }, Ki = (e, n, t, r) => {
2527
2527
  const s = e._zod.def;
2528
2528
  P(s.innerType, n, r);
2529
2529
  const i = n.seen.get(e);
2530
2530
  i.ref = s.innerType, t.default = JSON.parse(JSON.stringify(s.defaultValue));
2531
- }, Ki = (e, n, t, r) => {
2531
+ }, Yi = (e, n, t, r) => {
2532
2532
  const s = e._zod.def;
2533
2533
  P(s.innerType, n, r);
2534
2534
  const i = n.seen.get(e);
2535
2535
  i.ref = s.innerType, n.io === "input" && (t._prefault = JSON.parse(JSON.stringify(s.defaultValue)));
2536
- }, Yi = (e, n, t, r) => {
2536
+ }, Qi = (e, n, t, r) => {
2537
2537
  const s = e._zod.def;
2538
2538
  P(s.innerType, n, r);
2539
2539
  const i = n.seen.get(e);
@@ -2545,12 +2545,12 @@ const Ri = (e, n = {}) => (t) => {
2545
2545
  throw new Error("Dynamic catch values are not supported in JSON Schema");
2546
2546
  }
2547
2547
  t.default = o;
2548
- }, Qi = (e, n, t, r) => {
2548
+ }, eo = (e, n, t, r) => {
2549
2549
  const s = e._zod.def, i = n.io === "input" ? s.in._zod.def.type === "transform" ? s.out : s.in : s.out;
2550
2550
  P(i, n, r);
2551
2551
  const o = n.seen.get(e);
2552
2552
  o.ref = i;
2553
- }, eo = (e, n, t, r) => {
2553
+ }, no = (e, n, t, r) => {
2554
2554
  const s = e._zod.def;
2555
2555
  P(s.innerType, n, r);
2556
2556
  const i = n.seen.get(e);
@@ -2560,38 +2560,38 @@ const Ri = (e, n = {}) => (t) => {
2560
2560
  P(s.innerType, n, r);
2561
2561
  const i = n.seen.get(e);
2562
2562
  i.ref = s.innerType;
2563
- }, no = /* @__PURE__ */ l("ZodISODateTime", (e, n) => {
2564
- ts.init(e, n), E.init(e, n);
2565
- });
2566
- function to(e) {
2567
- return /* @__PURE__ */ ci(no, e);
2568
- }
2569
- const ro = /* @__PURE__ */ l("ZodISODate", (e, n) => {
2563
+ }, to = /* @__PURE__ */ l("ZodISODateTime", (e, n) => {
2570
2564
  rs.init(e, n), E.init(e, n);
2571
2565
  });
2572
- function so(e) {
2573
- return /* @__PURE__ */ ui(ro, e);
2566
+ function ro(e) {
2567
+ return /* @__PURE__ */ ui(to, e);
2574
2568
  }
2575
- const io = /* @__PURE__ */ l("ZodISOTime", (e, n) => {
2569
+ const so = /* @__PURE__ */ l("ZodISODate", (e, n) => {
2576
2570
  ss.init(e, n), E.init(e, n);
2577
2571
  });
2578
- function oo(e) {
2579
- return /* @__PURE__ */ di(io, e);
2572
+ function io(e) {
2573
+ return /* @__PURE__ */ di(so, e);
2580
2574
  }
2581
- const ao = /* @__PURE__ */ l("ZodISODuration", (e, n) => {
2575
+ const oo = /* @__PURE__ */ l("ZodISOTime", (e, n) => {
2582
2576
  is.init(e, n), E.init(e, n);
2583
2577
  });
2584
- function co(e) {
2585
- return /* @__PURE__ */ li(ao, e);
2578
+ function ao(e) {
2579
+ return /* @__PURE__ */ li(oo, e);
2586
2580
  }
2587
- const uo = (e, n) => {
2581
+ const co = /* @__PURE__ */ l("ZodISODuration", (e, n) => {
2582
+ os.init(e, n), E.init(e, n);
2583
+ });
2584
+ function uo(e) {
2585
+ return /* @__PURE__ */ fi(co, e);
2586
+ }
2587
+ const lo = (e, n) => {
2588
2588
  Zn.init(e, n), e.name = "ZodError", Object.defineProperties(e, {
2589
2589
  format: {
2590
- value: (t) => Ht(e, t)
2590
+ value: (t) => Xt(e, t)
2591
2591
  // enumerable: false,
2592
2592
  },
2593
2593
  flatten: {
2594
- value: (t) => Wt(e, t)
2594
+ value: (t) => Ht(e, t)
2595
2595
  // enumerable: false,
2596
2596
  },
2597
2597
  addIssue: {
@@ -2613,21 +2613,21 @@ const uo = (e, n) => {
2613
2613
  // enumerable: false,
2614
2614
  }
2615
2615
  });
2616
- }, F = l("ZodError", uo, {
2616
+ }, F = l("ZodError", lo, {
2617
2617
  Parent: Error
2618
- }), lo = /* @__PURE__ */ Ge(F), fo = /* @__PURE__ */ Je(F), ho = /* @__PURE__ */ Ue(F), po = /* @__PURE__ */ Re(F), mo = /* @__PURE__ */ Yt(F), wo = /* @__PURE__ */ Qt(F), go = /* @__PURE__ */ er(F), vo = /* @__PURE__ */ nr(F), bo = /* @__PURE__ */ tr(F), yo = /* @__PURE__ */ rr(F), _o = /* @__PURE__ */ sr(F), ko = /* @__PURE__ */ ir(F), I = /* @__PURE__ */ l("ZodType", (e, n) => (z.init(e, n), Object.assign(e["~standard"], {
2618
+ }), fo = /* @__PURE__ */ Ge(F), ho = /* @__PURE__ */ Je(F), po = /* @__PURE__ */ Ue(F), mo = /* @__PURE__ */ Re(F), wo = /* @__PURE__ */ Qt(F), go = /* @__PURE__ */ er(F), vo = /* @__PURE__ */ nr(F), bo = /* @__PURE__ */ tr(F), yo = /* @__PURE__ */ rr(F), _o = /* @__PURE__ */ sr(F), ko = /* @__PURE__ */ ir(F), So = /* @__PURE__ */ or(F), I = /* @__PURE__ */ l("ZodType", (e, n) => (z.init(e, n), Object.assign(e["~standard"], {
2619
2619
  jsonSchema: {
2620
2620
  input: Oe(e, "input"),
2621
2621
  output: Oe(e, "output")
2622
2622
  }
2623
- }), e.toJSONSchema = Ri(e, {}), e.def = n, e.type = n.type, Object.defineProperty(e, "_def", { value: n }), e.check = (...t) => e.clone(Y(n, {
2623
+ }), e.toJSONSchema = Ni(e, {}), e.def = n, e.type = n.type, Object.defineProperty(e, "_def", { value: n }), e.check = (...t) => e.clone(Y(n, {
2624
2624
  checks: [
2625
2625
  ...n.checks ?? [],
2626
2626
  ...t.map((r) => typeof r == "function" ? { _zod: { check: r, def: { check: "custom" }, onattach: [] } } : r)
2627
2627
  ]
2628
2628
  }), {
2629
2629
  parent: !0
2630
- }), e.with = e.check, e.clone = (t, r) => Q(e, t, r), e.brand = () => e, e.register = ((t, r) => (t.add(e, r), e)), e.parse = (t, r) => lo(e, t, r, { callee: e.parse }), e.safeParse = (t, r) => ho(e, t, r), e.parseAsync = async (t, r) => fo(e, t, r, { callee: e.parseAsync }), e.safeParseAsync = async (t, r) => po(e, t, r), e.spa = e.safeParseAsync, e.encode = (t, r) => mo(e, t, r), e.decode = (t, r) => wo(e, t, r), e.encodeAsync = async (t, r) => go(e, t, r), e.decodeAsync = async (t, r) => vo(e, t, r), e.safeEncode = (t, r) => bo(e, t, r), e.safeDecode = (t, r) => yo(e, t, r), e.safeEncodeAsync = async (t, r) => _o(e, t, r), e.safeDecodeAsync = async (t, r) => ko(e, t, r), e.refine = (t, r) => e.check(va(t, r)), e.superRefine = (t) => e.check(ba(t)), e.overwrite = (t) => e.check(/* @__PURE__ */ de(t)), e.optional = () => bn(e), e.exactOptional = () => ia(e), e.nullable = () => yn(e), e.nullish = () => bn(yn(e)), e.nonoptional = (t) => la(e, t), e.array = () => W(e), e.or = (t) => Wo([e, t]), e.and = (t) => Yo(e, t), e.transform = (t) => _n(e, ra(t)), e.default = (t) => ca(e, t), e.prefault = (t) => da(e, t), e.catch = (t) => ha(e, t), e.pipe = (t) => _n(e, t), e.readonly = () => wa(e), e.describe = (t) => {
2630
+ }), e.with = e.check, e.clone = (t, r) => Q(e, t, r), e.brand = () => e, e.register = ((t, r) => (t.add(e, r), e)), e.parse = (t, r) => fo(e, t, r, { callee: e.parse }), e.safeParse = (t, r) => po(e, t, r), e.parseAsync = async (t, r) => ho(e, t, r, { callee: e.parseAsync }), e.safeParseAsync = async (t, r) => mo(e, t, r), e.spa = e.safeParseAsync, e.encode = (t, r) => wo(e, t, r), e.decode = (t, r) => go(e, t, r), e.encodeAsync = async (t, r) => vo(e, t, r), e.decodeAsync = async (t, r) => bo(e, t, r), e.safeEncode = (t, r) => yo(e, t, r), e.safeDecode = (t, r) => _o(e, t, r), e.safeEncodeAsync = async (t, r) => ko(e, t, r), e.safeDecodeAsync = async (t, r) => So(e, t, r), e.refine = (t, r) => e.check(ba(t, r)), e.superRefine = (t) => e.check(ya(t)), e.overwrite = (t) => e.check(/* @__PURE__ */ de(t)), e.optional = () => bn(e), e.exactOptional = () => oa(e), e.nullable = () => yn(e), e.nullish = () => bn(yn(e)), e.nonoptional = (t) => fa(e, t), e.array = () => W(e), e.or = (t) => Ho([e, t]), e.and = (t) => Qo(e, t), e.transform = (t) => _n(e, sa(t)), e.default = (t) => ua(e, t), e.prefault = (t) => la(e, t), e.catch = (t) => pa(e, t), e.pipe = (t) => _n(e, t), e.readonly = () => ga(e), e.describe = (t) => {
2631
2631
  const r = e.clone();
2632
2632
  return he.add(r, { description: t }), r;
2633
2633
  }, Object.defineProperty(e, "description", {
@@ -2641,95 +2641,95 @@ const uo = (e, n) => {
2641
2641
  const r = e.clone();
2642
2642
  return he.add(r, t[0]), r;
2643
2643
  }, e.isOptional = () => e.safeParse(void 0).success, e.isNullable = () => e.safeParse(null).success, e.apply = (t) => t(e), e)), at = /* @__PURE__ */ l("_ZodString", (e, n) => {
2644
- We.init(e, n), I.init(e, n), e._zod.processJSONSchema = (r, s, i) => Mi(e, r, s);
2644
+ We.init(e, n), I.init(e, n), e._zod.processJSONSchema = (r, s, i) => $i(e, r, s);
2645
2645
  const t = e._zod.bag;
2646
- e.format = t.format ?? null, e.minLength = t.minimum ?? null, e.maxLength = t.maximum ?? null, e.regex = (...r) => e.check(/* @__PURE__ */ gi(...r)), e.includes = (...r) => e.check(/* @__PURE__ */ yi(...r)), e.startsWith = (...r) => e.check(/* @__PURE__ */ _i(...r)), e.endsWith = (...r) => e.check(/* @__PURE__ */ ki(...r)), e.min = (...r) => e.check(/* @__PURE__ */ Te(...r)), e.max = (...r) => e.check(/* @__PURE__ */ nt(...r)), e.length = (...r) => e.check(/* @__PURE__ */ tt(...r)), e.nonempty = (...r) => e.check(/* @__PURE__ */ Te(1, ...r)), e.lowercase = (r) => e.check(/* @__PURE__ */ vi(r)), e.uppercase = (r) => e.check(/* @__PURE__ */ bi(r)), e.trim = () => e.check(/* @__PURE__ */ zi()), e.normalize = (...r) => e.check(/* @__PURE__ */ Si(...r)), e.toLowerCase = () => e.check(/* @__PURE__ */ Ii()), e.toUpperCase = () => e.check(/* @__PURE__ */ Ei()), e.slugify = () => e.check(/* @__PURE__ */ Ti());
2647
- }), So = /* @__PURE__ */ l("ZodString", (e, n) => {
2648
- We.init(e, n), at.init(e, n), e.email = (t) => e.check(/* @__PURE__ */ Fs(zo, t)), e.url = (t) => e.check(/* @__PURE__ */ Gs(Io, t)), e.jwt = (t) => e.check(/* @__PURE__ */ ai(Zo, t)), e.emoji = (t) => e.check(/* @__PURE__ */ Js(Eo, t)), e.guid = (t) => e.check(/* @__PURE__ */ ln(mn, t)), e.uuid = (t) => e.check(/* @__PURE__ */ Bs(Ie, t)), e.uuidv4 = (t) => e.check(/* @__PURE__ */ js(Ie, t)), e.uuidv6 = (t) => e.check(/* @__PURE__ */ Vs(Ie, t)), e.uuidv7 = (t) => e.check(/* @__PURE__ */ Ls(Ie, t)), e.nanoid = (t) => e.check(/* @__PURE__ */ Ws(To, t)), e.guid = (t) => e.check(/* @__PURE__ */ ln(mn, t)), e.cuid = (t) => e.check(/* @__PURE__ */ Hs(Oo, t)), e.cuid2 = (t) => e.check(/* @__PURE__ */ Xs(Ao, t)), e.ulid = (t) => e.check(/* @__PURE__ */ Ks(Po, t)), e.base64 = (t) => e.check(/* @__PURE__ */ si(Co, t)), e.base64url = (t) => e.check(/* @__PURE__ */ ii(xo, t)), e.xid = (t) => e.check(/* @__PURE__ */ Ys(Uo, t)), e.ksuid = (t) => e.check(/* @__PURE__ */ Qs(Ro, t)), e.ipv4 = (t) => e.check(/* @__PURE__ */ ei(No, t)), e.ipv6 = (t) => e.check(/* @__PURE__ */ ni(Mo, t)), e.cidrv4 = (t) => e.check(/* @__PURE__ */ ti($o, t)), e.cidrv6 = (t) => e.check(/* @__PURE__ */ ri(Do, t)), e.e164 = (t) => e.check(/* @__PURE__ */ oi(qo, t)), e.datetime = (t) => e.check(to(t)), e.date = (t) => e.check(so(t)), e.time = (t) => e.check(oo(t)), e.duration = (t) => e.check(co(t));
2646
+ e.format = t.format ?? null, e.minLength = t.minimum ?? null, e.maxLength = t.maximum ?? null, e.regex = (...r) => e.check(/* @__PURE__ */ vi(...r)), e.includes = (...r) => e.check(/* @__PURE__ */ _i(...r)), e.startsWith = (...r) => e.check(/* @__PURE__ */ ki(...r)), e.endsWith = (...r) => e.check(/* @__PURE__ */ Si(...r)), e.min = (...r) => e.check(/* @__PURE__ */ Te(...r)), e.max = (...r) => e.check(/* @__PURE__ */ nt(...r)), e.length = (...r) => e.check(/* @__PURE__ */ tt(...r)), e.nonempty = (...r) => e.check(/* @__PURE__ */ Te(1, ...r)), e.lowercase = (r) => e.check(/* @__PURE__ */ bi(r)), e.uppercase = (r) => e.check(/* @__PURE__ */ yi(r)), e.trim = () => e.check(/* @__PURE__ */ Ii()), e.normalize = (...r) => e.check(/* @__PURE__ */ zi(...r)), e.toLowerCase = () => e.check(/* @__PURE__ */ Ei()), e.toUpperCase = () => e.check(/* @__PURE__ */ Ti()), e.slugify = () => e.check(/* @__PURE__ */ Oi());
2647
+ }), zo = /* @__PURE__ */ l("ZodString", (e, n) => {
2648
+ We.init(e, n), at.init(e, n), e.email = (t) => e.check(/* @__PURE__ */ Bs(Io, t)), e.url = (t) => e.check(/* @__PURE__ */ Js(Eo, t)), e.jwt = (t) => e.check(/* @__PURE__ */ ci(Fo, t)), e.emoji = (t) => e.check(/* @__PURE__ */ Ws(To, t)), e.guid = (t) => e.check(/* @__PURE__ */ ln(mn, t)), e.uuid = (t) => e.check(/* @__PURE__ */ js(Ie, t)), e.uuidv4 = (t) => e.check(/* @__PURE__ */ Vs(Ie, t)), e.uuidv6 = (t) => e.check(/* @__PURE__ */ Ls(Ie, t)), e.uuidv7 = (t) => e.check(/* @__PURE__ */ Gs(Ie, t)), e.nanoid = (t) => e.check(/* @__PURE__ */ Hs(Oo, t)), e.guid = (t) => e.check(/* @__PURE__ */ ln(mn, t)), e.cuid = (t) => e.check(/* @__PURE__ */ Xs(Ao, t)), e.cuid2 = (t) => e.check(/* @__PURE__ */ Ks(Po, t)), e.ulid = (t) => e.check(/* @__PURE__ */ Ys(Uo, t)), e.base64 = (t) => e.check(/* @__PURE__ */ ii(xo, t)), e.base64url = (t) => e.check(/* @__PURE__ */ oi(qo, t)), e.xid = (t) => e.check(/* @__PURE__ */ Qs(Ro, t)), e.ksuid = (t) => e.check(/* @__PURE__ */ ei(No, t)), e.ipv4 = (t) => e.check(/* @__PURE__ */ ni(Mo, t)), e.ipv6 = (t) => e.check(/* @__PURE__ */ ti($o, t)), e.cidrv4 = (t) => e.check(/* @__PURE__ */ ri(Do, t)), e.cidrv6 = (t) => e.check(/* @__PURE__ */ si(Co, t)), e.e164 = (t) => e.check(/* @__PURE__ */ ai(Zo, t)), e.datetime = (t) => e.check(ro(t)), e.date = (t) => e.check(io(t)), e.time = (t) => e.check(ao(t)), e.duration = (t) => e.check(uo(t));
2649
2649
  });
2650
2650
  function S(e) {
2651
- return /* @__PURE__ */ Zs(So, e);
2651
+ return /* @__PURE__ */ Fs(zo, e);
2652
2652
  }
2653
2653
  const E = /* @__PURE__ */ l("ZodStringFormat", (e, n) => {
2654
2654
  _.init(e, n), at.init(e, n);
2655
- }), zo = /* @__PURE__ */ l("ZodEmail", (e, n) => {
2656
- Jr.init(e, n), E.init(e, n);
2655
+ }), Io = /* @__PURE__ */ l("ZodEmail", (e, n) => {
2656
+ Wr.init(e, n), E.init(e, n);
2657
2657
  }), mn = /* @__PURE__ */ l("ZodGUID", (e, n) => {
2658
- Lr.init(e, n), E.init(e, n);
2659
- }), Ie = /* @__PURE__ */ l("ZodUUID", (e, n) => {
2660
2658
  Gr.init(e, n), E.init(e, n);
2661
- }), Io = /* @__PURE__ */ l("ZodURL", (e, n) => {
2662
- Wr.init(e, n), E.init(e, n);
2663
- }), Eo = /* @__PURE__ */ l("ZodEmoji", (e, n) => {
2659
+ }), Ie = /* @__PURE__ */ l("ZodUUID", (e, n) => {
2660
+ Jr.init(e, n), E.init(e, n);
2661
+ }), Eo = /* @__PURE__ */ l("ZodURL", (e, n) => {
2664
2662
  Hr.init(e, n), E.init(e, n);
2665
- }), To = /* @__PURE__ */ l("ZodNanoID", (e, n) => {
2663
+ }), To = /* @__PURE__ */ l("ZodEmoji", (e, n) => {
2666
2664
  Xr.init(e, n), E.init(e, n);
2667
- }), Oo = /* @__PURE__ */ l("ZodCUID", (e, n) => {
2665
+ }), Oo = /* @__PURE__ */ l("ZodNanoID", (e, n) => {
2668
2666
  Kr.init(e, n), E.init(e, n);
2669
- }), Ao = /* @__PURE__ */ l("ZodCUID2", (e, n) => {
2667
+ }), Ao = /* @__PURE__ */ l("ZodCUID", (e, n) => {
2670
2668
  Yr.init(e, n), E.init(e, n);
2671
- }), Po = /* @__PURE__ */ l("ZodULID", (e, n) => {
2669
+ }), Po = /* @__PURE__ */ l("ZodCUID2", (e, n) => {
2672
2670
  Qr.init(e, n), E.init(e, n);
2673
- }), Uo = /* @__PURE__ */ l("ZodXID", (e, n) => {
2671
+ }), Uo = /* @__PURE__ */ l("ZodULID", (e, n) => {
2674
2672
  es.init(e, n), E.init(e, n);
2675
- }), Ro = /* @__PURE__ */ l("ZodKSUID", (e, n) => {
2673
+ }), Ro = /* @__PURE__ */ l("ZodXID", (e, n) => {
2676
2674
  ns.init(e, n), E.init(e, n);
2677
- }), No = /* @__PURE__ */ l("ZodIPv4", (e, n) => {
2678
- os.init(e, n), E.init(e, n);
2679
- }), Mo = /* @__PURE__ */ l("ZodIPv6", (e, n) => {
2675
+ }), No = /* @__PURE__ */ l("ZodKSUID", (e, n) => {
2676
+ ts.init(e, n), E.init(e, n);
2677
+ }), Mo = /* @__PURE__ */ l("ZodIPv4", (e, n) => {
2680
2678
  as.init(e, n), E.init(e, n);
2681
- }), $o = /* @__PURE__ */ l("ZodCIDRv4", (e, n) => {
2679
+ }), $o = /* @__PURE__ */ l("ZodIPv6", (e, n) => {
2682
2680
  cs.init(e, n), E.init(e, n);
2683
- }), Do = /* @__PURE__ */ l("ZodCIDRv6", (e, n) => {
2681
+ }), Do = /* @__PURE__ */ l("ZodCIDRv4", (e, n) => {
2684
2682
  us.init(e, n), E.init(e, n);
2685
- }), Co = /* @__PURE__ */ l("ZodBase64", (e, n) => {
2683
+ }), Co = /* @__PURE__ */ l("ZodCIDRv6", (e, n) => {
2686
2684
  ds.init(e, n), E.init(e, n);
2687
- }), xo = /* @__PURE__ */ l("ZodBase64URL", (e, n) => {
2688
- fs.init(e, n), E.init(e, n);
2689
- }), qo = /* @__PURE__ */ l("ZodE164", (e, n) => {
2685
+ }), xo = /* @__PURE__ */ l("ZodBase64", (e, n) => {
2686
+ ls.init(e, n), E.init(e, n);
2687
+ }), qo = /* @__PURE__ */ l("ZodBase64URL", (e, n) => {
2690
2688
  hs.init(e, n), E.init(e, n);
2691
- }), Zo = /* @__PURE__ */ l("ZodJWT", (e, n) => {
2692
- ms.init(e, n), E.init(e, n);
2689
+ }), Zo = /* @__PURE__ */ l("ZodE164", (e, n) => {
2690
+ ps.init(e, n), E.init(e, n);
2691
+ }), Fo = /* @__PURE__ */ l("ZodJWT", (e, n) => {
2692
+ ws.init(e, n), E.init(e, n);
2693
2693
  }), ct = /* @__PURE__ */ l("ZodNumber", (e, n) => {
2694
- Xn.init(e, n), I.init(e, n), e._zod.processJSONSchema = (r, s, i) => $i(e, r, s), e.gt = (r, s) => e.check(/* @__PURE__ */ hn(r, s)), e.gte = (r, s) => e.check(/* @__PURE__ */ De(r, s)), e.min = (r, s) => e.check(/* @__PURE__ */ De(r, s)), e.lt = (r, s) => e.check(/* @__PURE__ */ fn(r, s)), e.lte = (r, s) => e.check(/* @__PURE__ */ $e(r, s)), e.max = (r, s) => e.check(/* @__PURE__ */ $e(r, s)), e.int = (r) => e.check(wn(r)), e.safe = (r) => e.check(wn(r)), e.positive = (r) => e.check(/* @__PURE__ */ hn(0, r)), e.nonnegative = (r) => e.check(/* @__PURE__ */ De(0, r)), e.negative = (r) => e.check(/* @__PURE__ */ fn(0, r)), e.nonpositive = (r) => e.check(/* @__PURE__ */ $e(0, r)), e.multipleOf = (r, s) => e.check(/* @__PURE__ */ pn(r, s)), e.step = (r, s) => e.check(/* @__PURE__ */ pn(r, s)), e.finite = () => e;
2694
+ Xn.init(e, n), I.init(e, n), e._zod.processJSONSchema = (r, s, i) => Di(e, r, s), e.gt = (r, s) => e.check(/* @__PURE__ */ hn(r, s)), e.gte = (r, s) => e.check(/* @__PURE__ */ De(r, s)), e.min = (r, s) => e.check(/* @__PURE__ */ De(r, s)), e.lt = (r, s) => e.check(/* @__PURE__ */ fn(r, s)), e.lte = (r, s) => e.check(/* @__PURE__ */ $e(r, s)), e.max = (r, s) => e.check(/* @__PURE__ */ $e(r, s)), e.int = (r) => e.check(wn(r)), e.safe = (r) => e.check(wn(r)), e.positive = (r) => e.check(/* @__PURE__ */ hn(0, r)), e.nonnegative = (r) => e.check(/* @__PURE__ */ De(0, r)), e.negative = (r) => e.check(/* @__PURE__ */ fn(0, r)), e.nonpositive = (r) => e.check(/* @__PURE__ */ $e(0, r)), e.multipleOf = (r, s) => e.check(/* @__PURE__ */ pn(r, s)), e.step = (r, s) => e.check(/* @__PURE__ */ pn(r, s)), e.finite = () => e;
2695
2695
  const t = e._zod.bag;
2696
2696
  e.minValue = Math.max(t.minimum ?? Number.NEGATIVE_INFINITY, t.exclusiveMinimum ?? Number.NEGATIVE_INFINITY) ?? null, e.maxValue = Math.min(t.maximum ?? Number.POSITIVE_INFINITY, t.exclusiveMaximum ?? Number.POSITIVE_INFINITY) ?? null, e.isInt = (t.format ?? "").includes("int") || Number.isSafeInteger(t.multipleOf ?? 0.5), e.isFinite = !0, e.format = t.format ?? null;
2697
2697
  });
2698
2698
  function J(e) {
2699
- return /* @__PURE__ */ fi(ct, e);
2699
+ return /* @__PURE__ */ hi(ct, e);
2700
2700
  }
2701
- const Fo = /* @__PURE__ */ l("ZodNumberFormat", (e, n) => {
2702
- ws.init(e, n), ct.init(e, n);
2701
+ const Bo = /* @__PURE__ */ l("ZodNumberFormat", (e, n) => {
2702
+ gs.init(e, n), ct.init(e, n);
2703
2703
  });
2704
2704
  function wn(e) {
2705
- return /* @__PURE__ */ hi(Fo, e);
2705
+ return /* @__PURE__ */ pi(Bo, e);
2706
2706
  }
2707
- const Bo = /* @__PURE__ */ l("ZodBoolean", (e, n) => {
2708
- gs.init(e, n), I.init(e, n), e._zod.processJSONSchema = (t, r, s) => Di(e, t, r);
2707
+ const jo = /* @__PURE__ */ l("ZodBoolean", (e, n) => {
2708
+ vs.init(e, n), I.init(e, n), e._zod.processJSONSchema = (t, r, s) => Ci(e, t, r);
2709
2709
  });
2710
2710
  function ee(e) {
2711
- return /* @__PURE__ */ pi(Bo, e);
2711
+ return /* @__PURE__ */ mi(jo, e);
2712
2712
  }
2713
- const jo = /* @__PURE__ */ l("ZodUnknown", (e, n) => {
2714
- vs.init(e, n), I.init(e, n), e._zod.processJSONSchema = (t, r, s) => xi();
2713
+ const Vo = /* @__PURE__ */ l("ZodUnknown", (e, n) => {
2714
+ bs.init(e, n), I.init(e, n), e._zod.processJSONSchema = (t, r, s) => qi();
2715
2715
  });
2716
2716
  function gn() {
2717
- return /* @__PURE__ */ mi(jo);
2717
+ return /* @__PURE__ */ wi(Vo);
2718
2718
  }
2719
- const Vo = /* @__PURE__ */ l("ZodNever", (e, n) => {
2720
- bs.init(e, n), I.init(e, n), e._zod.processJSONSchema = (t, r, s) => Ci(e, t, r);
2719
+ const Lo = /* @__PURE__ */ l("ZodNever", (e, n) => {
2720
+ ys.init(e, n), I.init(e, n), e._zod.processJSONSchema = (t, r, s) => xi(e, t, r);
2721
2721
  });
2722
- function Lo(e) {
2723
- return /* @__PURE__ */ wi(Vo, e);
2722
+ function Go(e) {
2723
+ return /* @__PURE__ */ gi(Lo, e);
2724
2724
  }
2725
- const Go = /* @__PURE__ */ l("ZodArray", (e, n) => {
2726
- ys.init(e, n), I.init(e, n), e._zod.processJSONSchema = (t, r, s) => ji(e, t, r, s), e.element = n.element, e.min = (t, r) => e.check(/* @__PURE__ */ Te(t, r)), e.nonempty = (t) => e.check(/* @__PURE__ */ Te(1, t)), e.max = (t, r) => e.check(/* @__PURE__ */ nt(t, r)), e.length = (t, r) => e.check(/* @__PURE__ */ tt(t, r)), e.unwrap = () => e.element;
2725
+ const Jo = /* @__PURE__ */ l("ZodArray", (e, n) => {
2726
+ _s.init(e, n), I.init(e, n), e._zod.processJSONSchema = (t, r, s) => Vi(e, t, r, s), e.element = n.element, e.min = (t, r) => e.check(/* @__PURE__ */ Te(t, r)), e.nonempty = (t) => e.check(/* @__PURE__ */ Te(1, t)), e.max = (t, r) => e.check(/* @__PURE__ */ nt(t, r)), e.length = (t, r) => e.check(/* @__PURE__ */ tt(t, r)), e.unwrap = () => e.element;
2727
2727
  });
2728
2728
  function W(e, n) {
2729
- return /* @__PURE__ */ Oi(Go, e, n);
2729
+ return /* @__PURE__ */ Ai(Jo, e, n);
2730
2730
  }
2731
- const Jo = /* @__PURE__ */ l("ZodObject", (e, n) => {
2732
- ks.init(e, n), I.init(e, n), e._zod.processJSONSchema = (t, r, s) => Vi(e, t, r, s), b(e, "shape", () => n.shape), e.keyof = () => ea(Object.keys(e._zod.def.shape)), e.catchall = (t) => e.clone({ ...e._zod.def, catchall: t }), e.passthrough = () => e.clone({ ...e._zod.def, catchall: gn() }), e.loose = () => e.clone({ ...e._zod.def, catchall: gn() }), e.strict = () => e.clone({ ...e._zod.def, catchall: Lo() }), e.strip = () => e.clone({ ...e._zod.def, catchall: void 0 }), e.extend = (t) => jt(e, t), e.safeExtend = (t) => Vt(e, t), e.merge = (t) => Lt(e, t), e.pick = (t) => Ft(e, t), e.omit = (t) => Bt(e, t), e.partial = (...t) => Gt(dt, e, t[0]), e.required = (...t) => Jt(lt, e, t[0]);
2731
+ const Wo = /* @__PURE__ */ l("ZodObject", (e, n) => {
2732
+ Ss.init(e, n), I.init(e, n), e._zod.processJSONSchema = (t, r, s) => Li(e, t, r, s), b(e, "shape", () => n.shape), e.keyof = () => na(Object.keys(e._zod.def.shape)), e.catchall = (t) => e.clone({ ...e._zod.def, catchall: t }), e.passthrough = () => e.clone({ ...e._zod.def, catchall: gn() }), e.loose = () => e.clone({ ...e._zod.def, catchall: gn() }), e.strict = () => e.clone({ ...e._zod.def, catchall: Go() }), e.strip = () => e.clone({ ...e._zod.def, catchall: void 0 }), e.extend = (t) => Vt(e, t), e.safeExtend = (t) => Lt(e, t), e.merge = (t) => Gt(e, t), e.pick = (t) => Bt(e, t), e.omit = (t) => jt(e, t), e.partial = (...t) => Jt(dt, e, t[0]), e.required = (...t) => Wt(lt, e, t[0]);
2733
2733
  });
2734
2734
  function T(e, n) {
2735
2735
  const t = {
@@ -2737,44 +2737,44 @@ function T(e, n) {
2737
2737
  shape: e ?? {},
2738
2738
  ...w(n)
2739
2739
  };
2740
- return new Jo(t);
2740
+ return new Wo(t);
2741
2741
  }
2742
2742
  const ut = /* @__PURE__ */ l("ZodUnion", (e, n) => {
2743
- Qn.init(e, n), I.init(e, n), e._zod.processJSONSchema = (t, r, s) => Li(e, t, r, s), e.options = n.options;
2743
+ Qn.init(e, n), I.init(e, n), e._zod.processJSONSchema = (t, r, s) => Gi(e, t, r, s), e.options = n.options;
2744
2744
  });
2745
- function Wo(e, n) {
2745
+ function Ho(e, n) {
2746
2746
  return new ut({
2747
2747
  type: "union",
2748
2748
  options: e,
2749
2749
  ...w(n)
2750
2750
  });
2751
2751
  }
2752
- const Ho = /* @__PURE__ */ l("ZodDiscriminatedUnion", (e, n) => {
2753
- ut.init(e, n), Ss.init(e, n);
2752
+ const Xo = /* @__PURE__ */ l("ZodDiscriminatedUnion", (e, n) => {
2753
+ ut.init(e, n), zs.init(e, n);
2754
2754
  });
2755
- function Xo(e, n, t) {
2756
- return new Ho({
2755
+ function Ko(e, n, t) {
2756
+ return new Xo({
2757
2757
  type: "union",
2758
2758
  options: n,
2759
2759
  discriminator: e,
2760
2760
  ...w(t)
2761
2761
  });
2762
2762
  }
2763
- const Ko = /* @__PURE__ */ l("ZodIntersection", (e, n) => {
2764
- zs.init(e, n), I.init(e, n), e._zod.processJSONSchema = (t, r, s) => Gi(e, t, r, s);
2763
+ const Yo = /* @__PURE__ */ l("ZodIntersection", (e, n) => {
2764
+ Is.init(e, n), I.init(e, n), e._zod.processJSONSchema = (t, r, s) => Ji(e, t, r, s);
2765
2765
  });
2766
- function Yo(e, n) {
2767
- return new Ko({
2766
+ function Qo(e, n) {
2767
+ return new Yo({
2768
2768
  type: "intersection",
2769
2769
  left: e,
2770
2770
  right: n
2771
2771
  });
2772
2772
  }
2773
- const Qo = /* @__PURE__ */ l("ZodRecord", (e, n) => {
2774
- Is.init(e, n), I.init(e, n), e._zod.processJSONSchema = (t, r, s) => Ji(e, t, r, s), e.keyType = n.keyType, e.valueType = n.valueType;
2773
+ const ea = /* @__PURE__ */ l("ZodRecord", (e, n) => {
2774
+ Es.init(e, n), I.init(e, n), e._zod.processJSONSchema = (t, r, s) => Wi(e, t, r, s), e.keyType = n.keyType, e.valueType = n.valueType;
2775
2775
  });
2776
2776
  function He(e, n, t) {
2777
- return new Qo({
2777
+ return new ea({
2778
2778
  type: "record",
2779
2779
  keyType: e,
2780
2780
  valueType: n,
@@ -2782,7 +2782,7 @@ function He(e, n, t) {
2782
2782
  });
2783
2783
  }
2784
2784
  const Be = /* @__PURE__ */ l("ZodEnum", (e, n) => {
2785
- Es.init(e, n), I.init(e, n), e._zod.processJSONSchema = (r, s, i) => qi(e, r, s), e.enum = n.entries, e.options = Object.values(n.entries);
2785
+ Ts.init(e, n), I.init(e, n), e._zod.processJSONSchema = (r, s, i) => Zi(e, r, s), e.enum = n.entries, e.options = Object.values(n.entries);
2786
2786
  const t = new Set(Object.keys(n.entries));
2787
2787
  e.extract = (r, s) => {
2788
2788
  const i = {};
@@ -2812,7 +2812,7 @@ const Be = /* @__PURE__ */ l("ZodEnum", (e, n) => {
2812
2812
  });
2813
2813
  };
2814
2814
  });
2815
- function ea(e, n) {
2815
+ function na(e, n) {
2816
2816
  const t = Array.isArray(e) ? Object.fromEntries(e.map((r) => [r, r])) : e;
2817
2817
  return new Be({
2818
2818
  type: "enum",
@@ -2820,8 +2820,8 @@ function ea(e, n) {
2820
2820
  ...w(n)
2821
2821
  });
2822
2822
  }
2823
- const na = /* @__PURE__ */ l("ZodLiteral", (e, n) => {
2824
- Ts.init(e, n), I.init(e, n), e._zod.processJSONSchema = (t, r, s) => Zi(e, t, r), e.values = new Set(n.values), Object.defineProperty(e, "value", {
2823
+ const ta = /* @__PURE__ */ l("ZodLiteral", (e, n) => {
2824
+ Os.init(e, n), I.init(e, n), e._zod.processJSONSchema = (t, r, s) => Fi(e, t, r), e.values = new Set(n.values), Object.defineProperty(e, "value", {
2825
2825
  get() {
2826
2826
  if (n.values.length > 1)
2827
2827
  throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");
@@ -2830,14 +2830,14 @@ const na = /* @__PURE__ */ l("ZodLiteral", (e, n) => {
2830
2830
  });
2831
2831
  });
2832
2832
  function vn(e, n) {
2833
- return new na({
2833
+ return new ta({
2834
2834
  type: "literal",
2835
2835
  values: Array.isArray(e) ? e : [e],
2836
2836
  ...w(n)
2837
2837
  });
2838
2838
  }
2839
- const ta = /* @__PURE__ */ l("ZodTransform", (e, n) => {
2840
- Os.init(e, n), I.init(e, n), e._zod.processJSONSchema = (t, r, s) => Bi(e, t), e._zod.parse = (t, r) => {
2839
+ const ra = /* @__PURE__ */ l("ZodTransform", (e, n) => {
2840
+ As.init(e, n), I.init(e, n), e._zod.processJSONSchema = (t, r, s) => ji(e, t), e._zod.parse = (t, r) => {
2841
2841
  if (r.direction === "backward")
2842
2842
  throw new Mn(e.constructor.name);
2843
2843
  t.addIssue = (i) => {
@@ -2852,8 +2852,8 @@ const ta = /* @__PURE__ */ l("ZodTransform", (e, n) => {
2852
2852
  return s instanceof Promise ? s.then((i) => (t.value = i, t)) : (t.value = s, t);
2853
2853
  };
2854
2854
  });
2855
- function ra(e) {
2856
- return new ta({
2855
+ function sa(e) {
2856
+ return new ra({
2857
2857
  type: "transform",
2858
2858
  transform: e
2859
2859
  });
@@ -2867,29 +2867,29 @@ function bn(e) {
2867
2867
  innerType: e
2868
2868
  });
2869
2869
  }
2870
- const sa = /* @__PURE__ */ l("ZodExactOptional", (e, n) => {
2871
- As.init(e, n), I.init(e, n), e._zod.processJSONSchema = (t, r, s) => ot(e, t, r, s), e.unwrap = () => e._zod.def.innerType;
2870
+ const ia = /* @__PURE__ */ l("ZodExactOptional", (e, n) => {
2871
+ Ps.init(e, n), I.init(e, n), e._zod.processJSONSchema = (t, r, s) => ot(e, t, r, s), e.unwrap = () => e._zod.def.innerType;
2872
2872
  });
2873
- function ia(e) {
2874
- return new sa({
2873
+ function oa(e) {
2874
+ return new ia({
2875
2875
  type: "optional",
2876
2876
  innerType: e
2877
2877
  });
2878
2878
  }
2879
- const oa = /* @__PURE__ */ l("ZodNullable", (e, n) => {
2880
- Ps.init(e, n), I.init(e, n), e._zod.processJSONSchema = (t, r, s) => Wi(e, t, r, s), e.unwrap = () => e._zod.def.innerType;
2879
+ const aa = /* @__PURE__ */ l("ZodNullable", (e, n) => {
2880
+ Us.init(e, n), I.init(e, n), e._zod.processJSONSchema = (t, r, s) => Hi(e, t, r, s), e.unwrap = () => e._zod.def.innerType;
2881
2881
  });
2882
2882
  function yn(e) {
2883
- return new oa({
2883
+ return new aa({
2884
2884
  type: "nullable",
2885
2885
  innerType: e
2886
2886
  });
2887
2887
  }
2888
- const aa = /* @__PURE__ */ l("ZodDefault", (e, n) => {
2889
- Us.init(e, n), I.init(e, n), e._zod.processJSONSchema = (t, r, s) => Xi(e, t, r, s), e.unwrap = () => e._zod.def.innerType, e.removeDefault = e.unwrap;
2888
+ const ca = /* @__PURE__ */ l("ZodDefault", (e, n) => {
2889
+ Rs.init(e, n), I.init(e, n), e._zod.processJSONSchema = (t, r, s) => Ki(e, t, r, s), e.unwrap = () => e._zod.def.innerType, e.removeDefault = e.unwrap;
2890
2890
  });
2891
- function ca(e, n) {
2892
- return new aa({
2891
+ function ua(e, n) {
2892
+ return new ca({
2893
2893
  type: "default",
2894
2894
  innerType: e,
2895
2895
  get defaultValue() {
@@ -2897,11 +2897,11 @@ function ca(e, n) {
2897
2897
  }
2898
2898
  });
2899
2899
  }
2900
- const ua = /* @__PURE__ */ l("ZodPrefault", (e, n) => {
2901
- Rs.init(e, n), I.init(e, n), e._zod.processJSONSchema = (t, r, s) => Ki(e, t, r, s), e.unwrap = () => e._zod.def.innerType;
2900
+ const da = /* @__PURE__ */ l("ZodPrefault", (e, n) => {
2901
+ Ns.init(e, n), I.init(e, n), e._zod.processJSONSchema = (t, r, s) => Yi(e, t, r, s), e.unwrap = () => e._zod.def.innerType;
2902
2902
  });
2903
- function da(e, n) {
2904
- return new ua({
2903
+ function la(e, n) {
2904
+ return new da({
2905
2905
  type: "prefault",
2906
2906
  innerType: e,
2907
2907
  get defaultValue() {
@@ -2910,56 +2910,56 @@ function da(e, n) {
2910
2910
  });
2911
2911
  }
2912
2912
  const lt = /* @__PURE__ */ l("ZodNonOptional", (e, n) => {
2913
- Ns.init(e, n), I.init(e, n), e._zod.processJSONSchema = (t, r, s) => Hi(e, t, r, s), e.unwrap = () => e._zod.def.innerType;
2913
+ Ms.init(e, n), I.init(e, n), e._zod.processJSONSchema = (t, r, s) => Xi(e, t, r, s), e.unwrap = () => e._zod.def.innerType;
2914
2914
  });
2915
- function la(e, n) {
2915
+ function fa(e, n) {
2916
2916
  return new lt({
2917
2917
  type: "nonoptional",
2918
2918
  innerType: e,
2919
2919
  ...w(n)
2920
2920
  });
2921
2921
  }
2922
- const fa = /* @__PURE__ */ l("ZodCatch", (e, n) => {
2923
- Ms.init(e, n), I.init(e, n), e._zod.processJSONSchema = (t, r, s) => Yi(e, t, r, s), e.unwrap = () => e._zod.def.innerType, e.removeCatch = e.unwrap;
2922
+ const ha = /* @__PURE__ */ l("ZodCatch", (e, n) => {
2923
+ $s.init(e, n), I.init(e, n), e._zod.processJSONSchema = (t, r, s) => Qi(e, t, r, s), e.unwrap = () => e._zod.def.innerType, e.removeCatch = e.unwrap;
2924
2924
  });
2925
- function ha(e, n) {
2926
- return new fa({
2925
+ function pa(e, n) {
2926
+ return new ha({
2927
2927
  type: "catch",
2928
2928
  innerType: e,
2929
2929
  catchValue: typeof n == "function" ? n : () => n
2930
2930
  });
2931
2931
  }
2932
- const pa = /* @__PURE__ */ l("ZodPipe", (e, n) => {
2933
- $s.init(e, n), I.init(e, n), e._zod.processJSONSchema = (t, r, s) => Qi(e, t, r, s), e.in = n.in, e.out = n.out;
2932
+ const ma = /* @__PURE__ */ l("ZodPipe", (e, n) => {
2933
+ Ds.init(e, n), I.init(e, n), e._zod.processJSONSchema = (t, r, s) => eo(e, t, r, s), e.in = n.in, e.out = n.out;
2934
2934
  });
2935
2935
  function _n(e, n) {
2936
- return new pa({
2936
+ return new ma({
2937
2937
  type: "pipe",
2938
2938
  in: e,
2939
2939
  out: n
2940
2940
  // ...util.normalizeParams(params),
2941
2941
  });
2942
2942
  }
2943
- const ma = /* @__PURE__ */ l("ZodReadonly", (e, n) => {
2944
- Ds.init(e, n), I.init(e, n), e._zod.processJSONSchema = (t, r, s) => eo(e, t, r, s), e.unwrap = () => e._zod.def.innerType;
2943
+ const wa = /* @__PURE__ */ l("ZodReadonly", (e, n) => {
2944
+ Cs.init(e, n), I.init(e, n), e._zod.processJSONSchema = (t, r, s) => no(e, t, r, s), e.unwrap = () => e._zod.def.innerType;
2945
2945
  });
2946
- function wa(e) {
2947
- return new ma({
2946
+ function ga(e) {
2947
+ return new wa({
2948
2948
  type: "readonly",
2949
2949
  innerType: e
2950
2950
  });
2951
2951
  }
2952
- const ga = /* @__PURE__ */ l("ZodCustom", (e, n) => {
2953
- Cs.init(e, n), I.init(e, n), e._zod.processJSONSchema = (t, r, s) => Fi(e, t);
2952
+ const va = /* @__PURE__ */ l("ZodCustom", (e, n) => {
2953
+ xs.init(e, n), I.init(e, n), e._zod.processJSONSchema = (t, r, s) => Bi(e, t);
2954
2954
  });
2955
- function va(e, n = {}) {
2956
- return /* @__PURE__ */ Ai(ga, e, n);
2955
+ function ba(e, n = {}) {
2956
+ return /* @__PURE__ */ Pi(va, e, n);
2957
2957
  }
2958
- function ba(e) {
2959
- return /* @__PURE__ */ Pi(e);
2958
+ function ya(e) {
2959
+ return /* @__PURE__ */ Ui(e);
2960
2960
  }
2961
2961
  J().int().nonnegative().max(255).brand("u8");
2962
- const D = J().int().nonnegative().max(Number.MAX_SAFE_INTEGER).brand("u53"), ft = Xo("kind", [
2962
+ const D = J().int().nonnegative().max(Number.MAX_SAFE_INTEGER).brand("u53"), ft = Ko("kind", [
2963
2963
  // The default hang container
2964
2964
  T({ kind: vn("legacy") }),
2965
2965
  // CMAF container with timescale for timestamp conversion
@@ -2970,7 +2970,7 @@ const D = J().int().nonnegative().max(Number.MAX_SAFE_INTEGER).brand("u53"), ft
2970
2970
  // Track ID used in the moof/mdat fragments
2971
2971
  trackId: D
2972
2972
  })
2973
- ]).default({ kind: "legacy" }), ya = T({
2973
+ ]).default({ kind: "legacy" }), _a = T({
2974
2974
  name: S()
2975
2975
  }), kn = T({
2976
2976
  // See: https://w3c.github.io/webcodecs/codec_registry.html
@@ -2996,32 +2996,32 @@ const D = J().int().nonnegative().max(Number.MAX_SAFE_INTEGER).brand("u53"), ft
2996
2996
  // NOTE: The audio "frame" duration depends on the codec, sample rate, etc.
2997
2997
  // ex: AAC often uses 1024 samples per frame, so at 44100Hz, this would be 1024/44100 = 23ms
2998
2998
  jitter: D.optional()
2999
- }), _a = T({
2999
+ }), ka = T({
3000
3000
  // A map of track name to rendition configuration.
3001
3001
  // This is not an array so it will work with JSON Merge Patch.
3002
3002
  renditions: He(S(), kn)
3003
3003
  }).or(
3004
3004
  // Backwards compatibility: transform old {track, config} format to new object format
3005
3005
  T({
3006
- track: ya,
3006
+ track: _a,
3007
3007
  config: kn
3008
3008
  }).transform((e) => ({
3009
3009
  renditions: { [e.track.name]: e.config }
3010
3010
  }))
3011
- ), ka = T({
3011
+ ), Sa = T({
3012
3012
  hardware: W(S()).optional(),
3013
3013
  software: W(S()).optional(),
3014
3014
  unsupported: W(S()).optional()
3015
- }), Sa = T({
3015
+ }), za = T({
3016
3016
  hardware: W(S()).optional(),
3017
3017
  software: W(S()).optional(),
3018
3018
  unsupported: W(S()).optional()
3019
- }), za = T({
3020
- video: ka.optional(),
3021
- audio: Sa.optional()
3019
+ }), Ia = T({
3020
+ video: Sa.optional(),
3021
+ audio: za.optional()
3022
3022
  }), be = T({
3023
3023
  name: S()
3024
- }), Ia = T({
3024
+ }), Ea = T({
3025
3025
  message: be.optional(),
3026
3026
  typing: be.optional()
3027
3027
  }), ht = T({
@@ -3036,7 +3036,7 @@ const D = J().int().nonnegative().max(Number.MAX_SAFE_INTEGER).brand("u53"), ft
3036
3036
  z: J().optional(),
3037
3037
  // The scale of the broadcast, where 1 is 100%
3038
3038
  s: J().optional()
3039
- }), Ea = T({
3039
+ }), Ta = T({
3040
3040
  // The initial position of the broadcaster, from -1 to +1 in both dimensions.
3041
3041
  // If not provided, then the broadcaster is assumed to be at (0,0)
3042
3042
  // This should be used for audio panning but can also be used for video positioning.
@@ -3051,7 +3051,7 @@ const D = J().int().nonnegative().max(Number.MAX_SAFE_INTEGER).brand("u53"), ft
3051
3051
  // If provided, this broadcaster is signaling the location of other peers.
3052
3052
  // The payload is a JSON blob keyed by handle for each peer.
3053
3053
  peers: be.optional()
3054
- }), Kc = He(S(), ht), Yc = T({
3054
+ }), Yc = He(S(), ht), Qc = T({
3055
3055
  name: S().optional(),
3056
3056
  // name
3057
3057
  avatar: S().optional(),
@@ -3074,13 +3074,13 @@ const D = J().int().nonnegative().max(Number.MAX_SAFE_INTEGER).brand("u53"), ft
3074
3074
  typing: 40,
3075
3075
  location: 20,
3076
3076
  preview: 10
3077
- }, Ta = T({
3077
+ }, Oa = T({
3078
3078
  id: S().optional(),
3079
3079
  name: S().optional(),
3080
3080
  avatar: S().optional(),
3081
3081
  // TODO allow using a track instead of a URL?
3082
3082
  color: S().optional()
3083
- }), Oa = T({
3083
+ }), Aa = T({
3084
3084
  name: S()
3085
3085
  }), Sn = T({
3086
3086
  // See: https://w3c.github.io/webcodecs/codec_registry.html
@@ -3118,7 +3118,7 @@ const D = J().int().nonnegative().max(Number.MAX_SAFE_INTEGER).brand("u53"), ft
3118
3118
  // - If there can be up to 3 b-frames in a row, this would be 3 * 1000/fps.
3119
3119
  // - If frames are buffered into 2s segments, this would be 2s.
3120
3120
  jitter: D.optional()
3121
- }), Aa = T({
3121
+ }), Pa = T({
3122
3122
  // A map of track name to rendition configuration.
3123
3123
  // This is not an array in order for it to work with JSON Merge Patch.
3124
3124
  renditions: He(S(), Sn),
@@ -3138,7 +3138,7 @@ const D = J().int().nonnegative().max(Number.MAX_SAFE_INTEGER).brand("u53"), ft
3138
3138
  // Backwards compatibility: transform old array of {track, config} to new object format
3139
3139
  W(
3140
3140
  T({
3141
- track: Oa,
3141
+ track: Aa,
3142
3142
  config: Sn
3143
3143
  })
3144
3144
  ).transform((e) => {
@@ -3150,33 +3150,33 @@ const D = J().int().nonnegative().max(Number.MAX_SAFE_INTEGER).brand("u53"), ft
3150
3150
  flip: void 0
3151
3151
  };
3152
3152
  })
3153
- ), Pa = T({
3154
- video: Aa.optional(),
3155
- audio: _a.optional(),
3156
- location: Ea.optional(),
3157
- user: Ta.optional(),
3158
- chat: Ia.optional(),
3159
- capabilities: za.optional(),
3153
+ ), Ua = T({
3154
+ video: Pa.optional(),
3155
+ audio: ka.optional(),
3156
+ location: Ta.optional(),
3157
+ user: Oa.optional(),
3158
+ chat: Ea.optional(),
3159
+ capabilities: Ia.optional(),
3160
3160
  preview: be.optional()
3161
3161
  });
3162
- function Ua(e) {
3162
+ function Ra(e) {
3163
3163
  const t = new TextDecoder().decode(e);
3164
3164
  try {
3165
3165
  const r = JSON.parse(t);
3166
- return Pa.parse(r);
3166
+ return Ua.parse(r);
3167
3167
  } catch (r) {
3168
3168
  throw console.warn("invalid catalog", t), r;
3169
3169
  }
3170
3170
  }
3171
- async function Ra(e) {
3171
+ async function Na(e) {
3172
3172
  const n = await e.readFrame();
3173
3173
  if (n)
3174
- return Ua(n);
3174
+ return Ra(n);
3175
3175
  }
3176
3176
  function pt(e) {
3177
3177
  return e instanceof ArrayBuffer || typeof SharedArrayBuffer < "u" && e instanceof SharedArrayBuffer;
3178
3178
  }
3179
- const Na = "utf-16", Ce = "utf-16be", zn = "utf-16le", me = "utf-8";
3179
+ const Ma = "utf-16", Ce = "utf-16be", zn = "utf-16le", me = "utf-8";
3180
3180
  function mt(e, n = {}) {
3181
3181
  let t;
3182
3182
  pt(e) ? t = new DataView(e) : t = new DataView(e.buffer, e.byteOffset, e.byteLength);
@@ -3207,7 +3207,7 @@ function mt(e, n = {}) {
3207
3207
  else r++;
3208
3208
  break;
3209
3209
  case Ce:
3210
- case Na:
3210
+ case Ma:
3211
3211
  case zn:
3212
3212
  c = t.getUint16(r, o), r += 2;
3213
3213
  break;
@@ -3216,13 +3216,13 @@ function mt(e, n = {}) {
3216
3216
  }
3217
3217
  return a;
3218
3218
  }
3219
- function Ma(e) {
3219
+ function $a(e) {
3220
3220
  return new TextEncoder().encode(e);
3221
3221
  }
3222
- function $a(e) {
3222
+ function Da(e) {
3223
3223
  return { writers: e?.writers ?? {} };
3224
3224
  }
3225
- const Da = [
3225
+ const Ca = [
3226
3226
  "dinf",
3227
3227
  "edts",
3228
3228
  "grpl",
@@ -3244,7 +3244,7 @@ const Da = [
3244
3244
  "vttc"
3245
3245
  ];
3246
3246
  function wt(e) {
3247
- return "boxes" in e || Da.includes(e.type);
3247
+ return "boxes" in e || Ca.includes(e.type);
3248
3248
  }
3249
3249
  const In = "utf8", K = "uint", ye = "template", En = "string", Tn = "int", On = "data";
3250
3250
  var N = class {
@@ -3304,7 +3304,7 @@ var N = class {
3304
3304
  this.writeUint(0, 1);
3305
3305
  }
3306
3306
  }, this.writeUtf8TerminatedString = (t) => {
3307
- const r = Ma(t);
3307
+ const r = $a(t);
3308
3308
  new Uint8Array(this.dataView.buffer).set(r, this.cursor), this.cursor += r.length, this.writeUint(0, 1);
3309
3309
  }, this.writeBytes = (t) => {
3310
3310
  Array.isArray(t) || (t = [t]);
@@ -3355,7 +3355,7 @@ var N = class {
3355
3355
  }
3356
3356
  };
3357
3357
  function gt(e, n) {
3358
- return Array.from(e, (t) => xa(t, n));
3358
+ return Array.from(e, (t) => qa(t, n));
3359
3359
  }
3360
3360
  function Xe(e, n) {
3361
3361
  const t = gt(e, n);
@@ -3364,24 +3364,24 @@ function Xe(e, n) {
3364
3364
  size: t.reduce((r, s) => r + s.byteLength, 0)
3365
3365
  };
3366
3366
  }
3367
- function Ca(e, n) {
3367
+ function xa(e, n) {
3368
3368
  const { bytes: r, size: s } = Xe(e.boxes, n), i = 8 + s, o = new N(e.type, i);
3369
3369
  return o.writeBytes(r), o;
3370
3370
  }
3371
- function xa(e, n) {
3371
+ function qa(e, n) {
3372
3372
  let t = null;
3373
3373
  if ("type" in e) {
3374
3374
  const { type: r } = e, s = n.writers?.[r];
3375
- if (s ? t = s(e, n) : wt(e) ? t = Ca(e, n) : "view" in e && (t = e.view), !t) throw new Error(`No writer found for box type: ${r}`);
3375
+ if (s ? t = s(e, n) : wt(e) ? t = xa(e, n) : "view" in e && (t = e.view), !t) throw new Error(`No writer found for box type: ${r}`);
3376
3376
  }
3377
3377
  if ("buffer" in e && (t = e), !t) throw new Error("Invalid box");
3378
3378
  return new Uint8Array(t.buffer, t.byteOffset, t.byteLength);
3379
3379
  }
3380
- function qa(e, n, t) {
3380
+ function Za(e, n, t) {
3381
3381
  const r = t > 0 ? t : e.byteLength - (n - e.byteOffset);
3382
3382
  return new Uint8Array(e.buffer, n, Math.max(r, 0));
3383
3383
  }
3384
- function Za(e, n, t) {
3384
+ function Fa(e, n, t) {
3385
3385
  let r = NaN;
3386
3386
  const s = n - e.byteOffset;
3387
3387
  switch (t) {
@@ -3431,11 +3431,11 @@ function An(e, n, t) {
3431
3431
  }
3432
3432
  return r;
3433
3433
  }
3434
- function Fa(e, n, t) {
3434
+ function Ba(e, n, t) {
3435
3435
  const r = t / 2;
3436
3436
  return ne(e, n, r) + ne(e, n + r, r) / Math.pow(2, r);
3437
3437
  }
3438
- function Ba(e, n) {
3438
+ function ja(e, n) {
3439
3439
  let t = "", r = n;
3440
3440
  for (; r - e.byteOffset < e.byteLength; ) {
3441
3441
  const s = ne(e, r, 1);
@@ -3444,11 +3444,11 @@ function Ba(e, n) {
3444
3444
  }
3445
3445
  return t;
3446
3446
  }
3447
- function ja(e, n) {
3447
+ function Va(e, n) {
3448
3448
  const t = e.byteLength - (n - e.byteOffset);
3449
3449
  return t > 0 ? mt(new DataView(e.buffer, n, t), { encoding: me }) : "";
3450
3450
  }
3451
- function Va(e, n) {
3451
+ function La(e, n) {
3452
3452
  const t = e.byteLength - (n - e.byteOffset);
3453
3453
  let r = "";
3454
3454
  if (t > 0) {
@@ -3459,7 +3459,7 @@ function Va(e, n) {
3459
3459
  }
3460
3460
  return r;
3461
3461
  }
3462
- var La = class vt {
3462
+ var Ga = class vt {
3463
3463
  /**
3464
3464
  * Creates a new IsoView instance. Similar to DataView, but with additional
3465
3465
  * methods for reading ISO BMFF data. It implements the iterator protocol,
@@ -3480,19 +3480,19 @@ var La = class vt {
3480
3480
  a = ne(i, o, s);
3481
3481
  break;
3482
3482
  case Tn:
3483
- a = Za(i, o, s);
3483
+ a = Fa(i, o, s);
3484
3484
  break;
3485
3485
  case ye:
3486
- a = Fa(i, o, s);
3486
+ a = Ba(i, o, s);
3487
3487
  break;
3488
3488
  case En:
3489
- s === -1 ? (a = Ba(i, o), c = a.length + 1) : a = An(i, o, s);
3489
+ s === -1 ? (a = ja(i, o), c = a.length + 1) : a = An(i, o, s);
3490
3490
  break;
3491
3491
  case On:
3492
- a = qa(i, o, s), c = a.length;
3492
+ a = Za(i, o, s), c = a.length;
3493
3493
  break;
3494
3494
  case In:
3495
- s === -1 ? (a = Va(i, o), c = a.length + 1) : a = ja(i, o);
3495
+ s === -1 ? (a = La(i, o), c = a.length + 1) : a = Va(i, o);
3496
3496
  break;
3497
3497
  default:
3498
3498
  a = -1;
@@ -3589,26 +3589,26 @@ var La = class vt {
3589
3589
  };
3590
3590
  function bt(e, n) {
3591
3591
  const t = [];
3592
- for (const r of new La(e, n)) t.push(r);
3592
+ for (const r of new Ga(e, n)) t.push(r);
3593
3593
  return t;
3594
3594
  }
3595
- function Ga(e, n) {
3596
- return gt(e, $a(n));
3595
+ function Ja(e, n) {
3596
+ return gt(e, Da(n));
3597
3597
  }
3598
- function Ja(e) {
3598
+ function Wa(e) {
3599
3599
  return {
3600
3600
  type: "mdat",
3601
3601
  data: e.readData(-1)
3602
3602
  };
3603
3603
  }
3604
- function Wa(e) {
3604
+ function Ha(e) {
3605
3605
  return {
3606
3606
  type: "mfhd",
3607
3607
  ...e.readFullBox(),
3608
3608
  sequenceNumber: e.readUint(4)
3609
3609
  };
3610
3610
  }
3611
- function Ha(e) {
3611
+ function Xa(e) {
3612
3612
  const { version: n, flags: t } = e.readFullBox();
3613
3613
  return {
3614
3614
  type: "tfdt",
@@ -3617,7 +3617,7 @@ function Ha(e) {
3617
3617
  baseMediaDecodeTime: e.readUint(n == 1 ? 8 : 4)
3618
3618
  };
3619
3619
  }
3620
- function Xa(e) {
3620
+ function Ka(e) {
3621
3621
  const { version: n, flags: t } = e.readFullBox();
3622
3622
  return {
3623
3623
  type: "tfhd",
@@ -3631,7 +3631,7 @@ function Xa(e) {
3631
3631
  defaultSampleFlags: t & 32 ? e.readUint(4) : void 0
3632
3632
  };
3633
3633
  }
3634
- function Ka(e) {
3634
+ function Ya(e) {
3635
3635
  const { version: n, flags: t } = e.readFullBox(), r = e.readUint(4);
3636
3636
  let s, i;
3637
3637
  t & 1 && (s = e.readInt(4)), t & 4 && (i = e.readUint(4));
@@ -3649,70 +3649,70 @@ function Ka(e) {
3649
3649
  samples: o
3650
3650
  };
3651
3651
  }
3652
- function Ya(e, n) {
3652
+ function Qa(e, n) {
3653
3653
  const i = e.entries.length, { bytes: o, size: a } = Xe(e.entries, n), c = new N("dref", 16 + a);
3654
3654
  return c.writeFullBox(e.version, e.flags), c.writeUint(i, 4), c.writeBytes(o), c;
3655
3655
  }
3656
- function Qa(e) {
3656
+ function ec(e) {
3657
3657
  const s = e.compatibleBrands.length * 4, i = new N("ftyp", 16 + s);
3658
3658
  i.writeString(e.majorBrand), i.writeUint(e.minorVersion, 4);
3659
3659
  for (const o of e.compatibleBrands) i.writeString(o);
3660
3660
  return i;
3661
3661
  }
3662
- function ec(e) {
3662
+ function nc(e) {
3663
3663
  const o = e.name.length + 1, a = new N("hdlr", 32 + o);
3664
3664
  return a.writeFullBox(e.version, e.flags), a.writeUint(e.preDefined, 4), a.writeString(e.handlerType), a.writeArray(e.reserved, K, 4, 3), a.writeTerminatedString(e.name), a;
3665
3665
  }
3666
- function nc(e) {
3666
+ function tc(e) {
3667
3667
  const n = new N("mdat", 8 + e.data.length);
3668
3668
  return n.writeBytes(e.data), n;
3669
3669
  }
3670
- function tc(e) {
3670
+ function rc(e) {
3671
3671
  const n = e.version === 1 ? 8 : 4, t = 8, r = 4, s = n * 3, i = new N("mdhd", t + r + s + 4 + 2 + 2);
3672
3672
  i.writeFullBox(e.version, e.flags), i.writeUint(e.creationTime, n), i.writeUint(e.modificationTime, n), i.writeUint(e.timescale, 4), i.writeUint(e.duration, n);
3673
3673
  const o = e.language.length >= 3 ? (e.language.charCodeAt(0) - 96 & 31) << 10 | (e.language.charCodeAt(1) - 96 & 31) << 5 | e.language.charCodeAt(2) - 96 & 31 : 0;
3674
3674
  return i.writeUint(o, 2), i.writeUint(e.preDefined, 2), i;
3675
3675
  }
3676
- function rc(e) {
3676
+ function sc(e) {
3677
3677
  const n = new N("mfhd", 16);
3678
3678
  return n.writeFullBox(e.version, e.flags), n.writeUint(e.sequenceNumber, 4), n;
3679
3679
  }
3680
- function sc(e) {
3680
+ function ic(e) {
3681
3681
  const n = e.version === 1 ? 8 : 4, t = 8, r = 4, s = n * 3, i = new N("mvhd", t + r + s + 4 + 4 + 2 + 2 + 8 + 36 + 24 + 4);
3682
3682
  return i.writeFullBox(e.version, e.flags), i.writeUint(e.creationTime, n), i.writeUint(e.modificationTime, n), i.writeUint(e.timescale, 4), i.writeUint(e.duration, n), i.writeTemplate(e.rate, 4), i.writeTemplate(e.volume, 2), i.writeUint(e.reserved1, 2), i.writeArray(e.reserved2, K, 4, 2), i.writeArray(e.matrix, ye, 4, 9), i.writeArray(e.preDefined, K, 4, 6), i.writeUint(e.nextTrackId, 4), i;
3683
3683
  }
3684
- function ic(e) {
3684
+ function oc(e) {
3685
3685
  const n = new N("smhd", 16);
3686
3686
  return n.writeFullBox(e.version, e.flags), n.writeUint(e.balance, 2), n.writeUint(e.reserved, 2), n;
3687
3687
  }
3688
- function oc(e, n) {
3688
+ function ac(e, n) {
3689
3689
  const i = e.entries.length, { bytes: o, size: a } = Xe(e.entries, n), c = new N("stsd", 16 + a);
3690
3690
  return c.writeFullBox(e.version, e.flags), c.writeUint(i, 4), c.writeBytes(o), c;
3691
3691
  }
3692
- function ac(e) {
3692
+ function cc(e) {
3693
3693
  const s = e.entryCount * 8, i = new N("stts", 16 + s);
3694
3694
  i.writeFullBox(e.version, e.flags), i.writeUint(e.entryCount, 4);
3695
3695
  for (const o of e.entries)
3696
3696
  i.writeUint(o.sampleCount, 4), i.writeUint(o.sampleDelta, 4);
3697
3697
  return i;
3698
3698
  }
3699
- function cc(e) {
3699
+ function uc(e) {
3700
3700
  const n = e.version === 1 ? 8 : 4, t = 8, r = 4, s = n, i = new N("tfdt", t + r + s);
3701
3701
  return i.writeFullBox(e.version, e.flags), i.writeUint(e.baseMediaDecodeTime, n), i;
3702
3702
  }
3703
- function uc(e) {
3703
+ function dc(e) {
3704
3704
  const s = e.flags & 1 ? 8 : 0, i = e.flags & 2 ? 4 : 0, o = e.flags & 8 ? 4 : 0, a = e.flags & 16 ? 4 : 0, c = e.flags & 32 ? 4 : 0, u = new N("tfhd", 16 + s + i + o + a + c);
3705
3705
  return u.writeFullBox(e.version, e.flags), u.writeUint(e.trackId, 4), e.flags & 1 && u.writeUint(e.baseDataOffset ?? 0, 8), e.flags & 2 && u.writeUint(e.sampleDescriptionIndex ?? 0, 4), e.flags & 8 && u.writeUint(e.defaultSampleDuration ?? 0, 4), e.flags & 16 && u.writeUint(e.defaultSampleSize ?? 0, 4), e.flags & 32 && u.writeUint(e.defaultSampleFlags ?? 0, 4), u;
3706
3706
  }
3707
- function dc(e) {
3707
+ function lc(e) {
3708
3708
  const n = e.version === 1 ? 8 : 4, t = 8, r = 4, s = n * 3, i = new N("tkhd", t + r + s + 4 + 4 + 8 + 2 + 2 + 2 + 2 + 36 + 4 + 4);
3709
3709
  return i.writeFullBox(e.version, e.flags), i.writeUint(e.creationTime, n), i.writeUint(e.modificationTime, n), i.writeUint(e.trackId, 4), i.writeUint(e.reserved1, 4), i.writeUint(e.duration, n), i.writeArray(e.reserved2, K, 4, 2), i.writeUint(e.layer, 2), i.writeUint(e.alternateGroup, 2), i.writeTemplate(e.volume, 2), i.writeUint(e.reserved3, 2), i.writeArray(e.matrix, ye, 4, 9), i.writeTemplate(e.width, 4), i.writeTemplate(e.height, 4), i;
3710
3710
  }
3711
- function lc(e) {
3711
+ function fc(e) {
3712
3712
  const n = new N("trex", 32);
3713
3713
  return n.writeFullBox(e.version, e.flags), n.writeUint(e.trackId, 4), n.writeUint(e.defaultSampleDescriptionIndex, 4), n.writeUint(e.defaultSampleDuration, 4), n.writeUint(e.defaultSampleSize, 4), n.writeUint(e.defaultSampleFlags, 4), n;
3714
3714
  }
3715
- function fc(e) {
3715
+ function hc(e) {
3716
3716
  const s = e.flags & 1 ? 4 : 0, i = e.flags & 4 ? 4 : 0;
3717
3717
  let o = 0;
3718
3718
  e.flags & 256 && (o += 4), e.flags & 512 && (o += 4), e.flags & 1024 && (o += 4), e.flags & 2048 && (o += 4);
@@ -3722,20 +3722,20 @@ function fc(e) {
3722
3722
  e.flags & 256 && c.writeUint(u.sampleDuration ?? 0, 4), e.flags & 512 && c.writeUint(u.sampleSize ?? 0, 4), e.flags & 1024 && c.writeUint(u.sampleFlags ?? 0, 4), e.flags & 2048 && c.writeUint(u.sampleCompositionTimeOffset ?? 0, 4);
3723
3723
  return c;
3724
3724
  }
3725
- function hc(e) {
3725
+ function pc(e) {
3726
3726
  const r = e.location.length + 1, s = new N("url ", 12 + r);
3727
3727
  return s.writeFullBox(e.version, e.flags), s.writeTerminatedString(e.location), s;
3728
3728
  }
3729
- function pc(e) {
3729
+ function mc(e) {
3730
3730
  const n = new N("vmhd", 20);
3731
3731
  return n.writeFullBox(e.version, e.flags), n.writeUint(e.graphicsmode, 2), n.writeArray(e.opcolor, K, 2, 3), n;
3732
3732
  }
3733
3733
  const yt = {
3734
- mfhd: Wa,
3735
- tfhd: Xa,
3736
- tfdt: Ha,
3737
- trun: Ka,
3738
- mdat: Ja
3734
+ mfhd: Ha,
3735
+ tfhd: Ka,
3736
+ tfdt: Xa,
3737
+ trun: Ya,
3738
+ mdat: Wa
3739
3739
  };
3740
3740
  function ie(e, n) {
3741
3741
  for (const t of e) {
@@ -3800,30 +3800,30 @@ function L(e) {
3800
3800
  throw new Error("invalid hex string format");
3801
3801
  return new Uint8Array(n.map((t) => parseInt(t, 16)));
3802
3802
  }
3803
- const Ae = [65536, 0, 0, 0, 65536, 0, 0, 0, 1073741824], mc = {
3803
+ const Ae = [65536, 0, 0, 0, 65536, 0, 0, 0, 1073741824], wc = {
3804
3804
  // Init segment boxes
3805
- ftyp: Qa,
3806
- mvhd: sc,
3807
- tkhd: dc,
3808
- mdhd: tc,
3809
- hdlr: ec,
3810
- vmhd: pc,
3811
- smhd: ic,
3812
- "url ": hc,
3813
- dref: Ya,
3814
- stsd: oc,
3815
- stts: ac,
3816
- trex: lc,
3805
+ ftyp: ec,
3806
+ mvhd: ic,
3807
+ tkhd: lc,
3808
+ mdhd: rc,
3809
+ hdlr: nc,
3810
+ vmhd: mc,
3811
+ smhd: oc,
3812
+ "url ": pc,
3813
+ dref: Qa,
3814
+ stsd: ac,
3815
+ stts: cc,
3816
+ trex: fc,
3817
3817
  // Data segment boxes
3818
- mfhd: rc,
3819
- tfhd: uc,
3820
- tfdt: cc,
3821
- trun: fc,
3822
- mdat: nc
3818
+ mfhd: sc,
3819
+ tfhd: dc,
3820
+ tfdt: uc,
3821
+ trun: hc,
3822
+ mdat: tc
3823
3823
  // For boxes without library writers, we create them manually as Uint8Arrays
3824
3824
  };
3825
3825
  function we(e) {
3826
- return Ga(e, { writers: mc });
3826
+ return Ja(e, { writers: wc });
3827
3827
  }
3828
3828
  function Ke(e, n, t, r) {
3829
3829
  const s = 12 + r.length, i = new Uint8Array(s), o = new DataView(i.buffer);
@@ -3841,7 +3841,7 @@ function Et() {
3841
3841
  const e = new Uint8Array(4);
3842
3842
  return Ke("stco", 0, 0, e);
3843
3843
  }
3844
- function wc(e, n, t) {
3844
+ function gc(e, n, t) {
3845
3845
  const r = 8 + t.length, i = 8 + (78 + r), o = new Uint8Array(i), a = new DataView(o.buffer);
3846
3846
  let c = 0;
3847
3847
  return a.setUint32(c, i, !1), c += 4, o[c++] = 97, o[c++] = 118, o[c++] = 99, o[c++] = 49, c += 6, a.setUint16(c, 1, !1), c += 2, a.setUint16(c, 0, !1), c += 2, a.setUint16(c, 0, !1), c += 2, c += 12, a.setUint16(c, e, !1), c += 2, a.setUint16(c, n, !1), c += 2, a.setUint32(c, 4718592, !1), c += 4, a.setUint32(c, 4718592, !1), c += 4, a.setUint32(c, 0, !1), c += 4, a.setUint16(c, 1, !1), c += 2, c += 32, a.setUint16(c, 24, !1), c += 2, a.setUint16(c, 65535, !1), c += 2, a.setUint32(c, r, !1), c += 4, o[c++] = 97, o[c++] = 118, o[c++] = 99, o[c++] = 67, o.set(t, c), o;
@@ -3939,7 +3939,7 @@ function Pn(e) {
3939
3939
  flags: 0,
3940
3940
  entryCount: 1,
3941
3941
  // biome-ignore lint/suspicious/noExplicitAny: Raw avc1 box since library doesn't handle avcC children
3942
- entries: [wc(n, t, L(r))]
3942
+ entries: [gc(n, t, L(r))]
3943
3943
  }, Z = {
3944
3944
  type: "stts",
3945
3945
  version: 0,
@@ -4063,7 +4063,7 @@ function Un(e) {
4063
4063
  flags: 0,
4064
4064
  entryCount: 1,
4065
4065
  // biome-ignore lint/suspicious/noExplicitAny: Raw sample entry box
4066
- entries: [gc(s, n, t, r)]
4066
+ entries: [vc(s, n, t, r)]
4067
4067
  }, R = {
4068
4068
  type: "stts",
4069
4069
  version: 0,
@@ -4104,24 +4104,24 @@ function Un(e) {
4104
4104
  fe.set(new Uint8Array(G.buffer, G.byteOffset, G.byteLength), V), V += G.byteLength;
4105
4105
  return fe;
4106
4106
  }
4107
- function gc(e, n, t, r) {
4107
+ function vc(e, n, t, r) {
4108
4108
  if (e.startsWith("mp4a"))
4109
- return vc(n, t, r);
4110
- if (e === "opus")
4111
4109
  return bc(n, t, r);
4110
+ if (e === "opus")
4111
+ return yc(n, t, r);
4112
4112
  throw new Error(`Unsupported audio codec: ${e}`);
4113
4113
  }
4114
- function vc(e, n, t) {
4115
- const r = _c(e, n, t), i = 8 + (28 + r.length), o = new Uint8Array(i), a = new DataView(o.buffer);
4114
+ function bc(e, n, t) {
4115
+ const r = kc(e, n, t), i = 8 + (28 + r.length), o = new Uint8Array(i), a = new DataView(o.buffer);
4116
4116
  let c = 0;
4117
4117
  return a.setUint32(c, i, !1), c += 4, o[c++] = 109, o[c++] = 112, o[c++] = 52, o[c++] = 97, c += 6, a.setUint16(c, 1, !1), c += 2, c += 8, a.setUint16(c, n, !1), c += 2, a.setUint16(c, 16, !1), c += 2, a.setUint16(c, 0, !1), c += 2, a.setUint16(c, 0, !1), c += 2, a.setUint32(c, e * 65536, !1), c += 4, o.set(r, c), o;
4118
4118
  }
4119
- function bc(e, n, t) {
4120
- const r = kc(n, e, t), i = 8 + (28 + r.length), o = new Uint8Array(i), a = new DataView(o.buffer);
4119
+ function yc(e, n, t) {
4120
+ const r = Sc(n, e, t), i = 8 + (28 + r.length), o = new Uint8Array(i), a = new DataView(o.buffer);
4121
4121
  let c = 0;
4122
4122
  return a.setUint32(c, i, !1), c += 4, o[c++] = 79, o[c++] = 112, o[c++] = 117, o[c++] = 115, c += 6, a.setUint16(c, 1, !1), c += 2, c += 8, a.setUint16(c, n, !1), c += 2, a.setUint16(c, 16, !1), c += 2, a.setUint16(c, 0, !1), c += 2, a.setUint16(c, 0, !1), c += 2, a.setUint32(c, e * 65536, !1), c += 4, o.set(r, c), o;
4123
4123
  }
4124
- function yc(e, n) {
4124
+ function _c(e, n) {
4125
4125
  const r = {
4126
4126
  96e3: 0,
4127
4127
  88200: 1,
@@ -4139,12 +4139,12 @@ function yc(e, n) {
4139
4139
  }[e] ?? 4, i = 2 << 3 | r >> 1, o = (r & 1) << 7 | n << 3;
4140
4140
  return new Uint8Array([i, o]);
4141
4141
  }
4142
- function _c(e, n, t) {
4143
- const r = t ? L(t) : yc(e, n), s = r.length, i = 15 + s, o = 5 + i + 3, a = 14 + o, c = new Uint8Array(a), u = new DataView(c.buffer);
4142
+ function kc(e, n, t) {
4143
+ const r = t ? L(t) : _c(e, n), s = r.length, i = 15 + s, o = 5 + i + 3, a = 14 + o, c = new Uint8Array(a), u = new DataView(c.buffer);
4144
4144
  let d = 0;
4145
4145
  return u.setUint32(d, a, !1), d += 4, c[d++] = 101, c[d++] = 115, c[d++] = 100, c[d++] = 115, u.setUint32(d, 0, !1), d += 4, c[d++] = 3, c[d++] = o, u.setUint16(d, 0, !1), d += 2, c[d++] = 0, c[d++] = 4, c[d++] = i, c[d++] = 64, c[d++] = 21, c[d++] = 0, c[d++] = 0, c[d++] = 0, u.setUint32(d, 0, !1), d += 4, u.setUint32(d, 0, !1), d += 4, c[d++] = 5, c[d++] = s, c.set(r, d), d += s, c[d++] = 6, c[d++] = 1, c[d++] = 2, c;
4146
4146
  }
4147
- function kc(e, n, t) {
4147
+ function Sc(e, n, t) {
4148
4148
  if (t) {
4149
4149
  const a = L(t), c = 8 + a.length, u = new Uint8Array(c);
4150
4150
  return new DataView(u.buffer).setUint32(0, c, !1), u[4] = 100, u[5] = 79, u[6] = 112, u[7] = 115, u.set(a, 8), u;
@@ -4347,7 +4347,7 @@ async function Rn() {
4347
4347
  polyfill: !0
4348
4348
  }), !0))), await xe);
4349
4349
  }
4350
- const Sc = `var __defProp = Object.defineProperty;
4350
+ const zc = `var __defProp = Object.defineProperty;
4351
4351
  var __export = (target, all) => {
4352
4352
  for (var name in all)
4353
4353
  __defProp(target, name, { get: all[name], enumerable: true });
@@ -6934,8 +6934,8 @@ var Render = class extends AudioWorkletProcessor {
6934
6934
  }
6935
6935
  };
6936
6936
  registerProcessor("render", Render);
6937
- `, zc = new Blob([Sc], { type: "application/javascript" }), Ic = URL.createObjectURL(zc);
6938
- let Ec = class {
6937
+ `, Ic = new Blob([zc], { type: "application/javascript" }), Ec = URL.createObjectURL(Ic);
6938
+ let Tc = class {
6939
6939
  source;
6940
6940
  enabled;
6941
6941
  #n = new h(void 0);
@@ -6961,7 +6961,7 @@ let Ec = class {
6961
6961
  buffered = this.#a;
6962
6962
  #c = new C();
6963
6963
  constructor(n, t) {
6964
- this.source = n, this.source.supported.set(Tc), this.enabled = h.from(t?.enabled ?? !1), this.#c.run(this.#d.bind(this)), this.#c.run(this.#l.bind(this)), this.#c.run(this.#u.bind(this)), this.#c.run(this.#h.bind(this));
6964
+ this.source = n, this.source.supported.set(Oc), this.enabled = h.from(t?.enabled ?? !1), this.#c.run(this.#d.bind(this)), this.#c.run(this.#l.bind(this)), this.#c.run(this.#u.bind(this)), this.#c.run(this.#h.bind(this));
6965
6965
  }
6966
6966
  #d(n) {
6967
6967
  const t = n.get(this.source.config);
@@ -6972,7 +6972,7 @@ let Ec = class {
6972
6972
  sampleRate: r
6973
6973
  });
6974
6974
  n.set(this.#n, i), n.cleanup(() => i.close()), n.spawn(async () => {
6975
- if (await i.audioWorklet.addModule(Ic), i.state === "closed") return;
6975
+ if (await i.audioWorklet.addModule(Ec), i.state === "closed") return;
6976
6976
  const o = new AudioWorkletNode(i, "render", {
6977
6977
  channelCount: s,
6978
6978
  channelCountMode: "explicit"
@@ -7027,7 +7027,7 @@ let Ec = class {
7027
7027
  });
7028
7028
  n.cleanup(() => s.close()), n.run((i) => {
7029
7029
  const o = i.get(s.buffered), a = i.get(this.#o);
7030
- this.#a.update(() => Oc(o, a));
7030
+ this.#a.update(() => Ac(o, a));
7031
7031
  }), n.spawn(async () => {
7032
7032
  if (!await Rn()) return;
7033
7033
  let o = 0;
@@ -7156,14 +7156,14 @@ let Ec = class {
7156
7156
  this.#c.close();
7157
7157
  }
7158
7158
  };
7159
- async function Tc(e) {
7159
+ async function Oc(e) {
7160
7160
  const n = e.description ? L(e.description) : void 0;
7161
7161
  return (await AudioDecoder.isConfigSupported({
7162
7162
  ...e,
7163
7163
  description: n
7164
7164
  })).supported ?? !1;
7165
7165
  }
7166
- function Oc(e, n) {
7166
+ function Ac(e, n) {
7167
7167
  if (e.length === 0) return n;
7168
7168
  if (n.length === 0) return e;
7169
7169
  const t = [], r = [...e, ...n].sort((s, i) => s.start - i.start);
@@ -7174,7 +7174,7 @@ function Oc(e, n) {
7174
7174
  return t;
7175
7175
  }
7176
7176
  const Nn = 1e-3, qe = 0.2;
7177
- class Ac {
7177
+ class Pc {
7178
7178
  source;
7179
7179
  volume;
7180
7180
  muted;
@@ -7283,11 +7283,11 @@ class Ot {
7283
7283
  this.#e.close();
7284
7284
  }
7285
7285
  }
7286
- const eu = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
7286
+ const nu = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
7287
7287
  __proto__: null,
7288
7288
  Muxer: Ot
7289
7289
  }, Symbol.toStringTag, { value: "Module" }));
7290
- class Pc {
7290
+ class Uc {
7291
7291
  // The earliest time we've received a frame, relative to its timestamp.
7292
7292
  // This will keep being updated as we catch up to the live playhead then will be relatively static.
7293
7293
  // TODO Update this when RTT changes
@@ -7341,8 +7341,8 @@ class Pc {
7341
7341
  this.signals.close();
7342
7342
  }
7343
7343
  }
7344
- const Uc = 500, Rc = 100;
7345
- class Nc {
7344
+ const Rc = 500, Nc = 100;
7345
+ class Mc {
7346
7346
  enabled;
7347
7347
  // Don't download any longer
7348
7348
  source;
@@ -7366,7 +7366,7 @@ class Nc {
7366
7366
  buffered = this.#o;
7367
7367
  #a = new C();
7368
7368
  constructor(n, t) {
7369
- this.enabled = h.from(t?.enabled ?? !1), this.source = n, this.source.supported.set(Dc), this.#a.run(this.#c.bind(this)), this.#a.run(this.#d.bind(this)), this.#a.run(this.#l.bind(this)), this.#a.run(this.#u.bind(this));
7369
+ this.enabled = h.from(t?.enabled ?? !1), this.source = n, this.source.supported.set(Cc), this.#a.run(this.#c.bind(this)), this.#a.run(this.#d.bind(this)), this.#a.run(this.#l.bind(this)), this.#a.run(this.#u.bind(this));
7370
7370
  }
7371
7371
  #c(n) {
7372
7372
  const t = n.getAll([this.enabled, this.source.broadcast, this.source.track, this.source.config]);
@@ -7376,7 +7376,7 @@ class Nc {
7376
7376
  }
7377
7377
  const [r, s, i, o] = t, a = n.get(s.active);
7378
7378
  if (!a) return;
7379
- let c = new Mc({
7379
+ let c = new $c({
7380
7380
  source: this.source,
7381
7381
  broadcast: a,
7382
7382
  track: i,
@@ -7388,7 +7388,7 @@ class Nc {
7388
7388
  const d = u.get(this.#n);
7389
7389
  if (d) {
7390
7390
  const f = u.get(c.timestamp), p = u.get(d.timestamp);
7391
- if (!f || p && p > f + Rc) return;
7391
+ if (!f || p && p > f + Nc) return;
7392
7392
  }
7393
7393
  this.#n.set(c), c = void 0, u.close();
7394
7394
  });
@@ -7429,7 +7429,7 @@ class Nc {
7429
7429
  }
7430
7430
  this.#s.set(!1), n.timer(() => {
7431
7431
  this.#s.set(!0);
7432
- }, Uc);
7432
+ }, Rc);
7433
7433
  }
7434
7434
  close() {
7435
7435
  this.#r.update((n) => {
@@ -7437,7 +7437,7 @@ class Nc {
7437
7437
  }), this.#a.close();
7438
7438
  }
7439
7439
  }
7440
- class Mc {
7440
+ class $c {
7441
7441
  source;
7442
7442
  broadcast;
7443
7443
  track;
@@ -7485,7 +7485,7 @@ class Mc {
7485
7485
  });
7486
7486
  n.cleanup(() => s.close()), n.run((o) => {
7487
7487
  const a = o.get(s.buffered), c = o.get(this.#n);
7488
- this.buffered.update(() => $c(a, c));
7488
+ this.buffered.update(() => Dc(a, c));
7489
7489
  }), r.configure({
7490
7490
  ...this.config,
7491
7491
  description: this.config.description ? L(this.config.description) : void 0,
@@ -7599,7 +7599,7 @@ class Mc {
7599
7599
  });
7600
7600
  }
7601
7601
  }
7602
- function $c(e, n) {
7602
+ function Dc(e, n) {
7603
7603
  if (e.length === 0) return n;
7604
7604
  if (n.length === 0) return e;
7605
7605
  const t = [], r = [...e, ...n].sort((s, i) => s.start - i.start);
@@ -7609,7 +7609,7 @@ function $c(e, n) {
7609
7609
  }
7610
7610
  return t;
7611
7611
  }
7612
- async function Dc(e) {
7612
+ async function Cc(e) {
7613
7613
  const n = e.description ? L(e.description) : void 0, { supported: t } = await VideoDecoder.isConfigSupported({
7614
7614
  codec: e.codec,
7615
7615
  description: n,
@@ -7617,7 +7617,7 @@ async function Dc(e) {
7617
7617
  });
7618
7618
  return t ?? !1;
7619
7619
  }
7620
- let Cc = class {
7620
+ let xc = class {
7621
7621
  muxer;
7622
7622
  source;
7623
7623
  // TODO implement stats
@@ -7631,7 +7631,7 @@ let Cc = class {
7631
7631
  timestamp = this.#t;
7632
7632
  signals = new C();
7633
7633
  constructor(n, t) {
7634
- this.muxer = n, this.source = t, this.source.supported.set(xc), this.signals.run(this.#s.bind(this)), this.signals.run(this.#c.bind(this)), this.signals.run(this.#d.bind(this));
7634
+ this.muxer = n, this.source = t, this.source.supported.set(qc), this.signals.run(this.#s.bind(this)), this.signals.run(this.#c.bind(this)), this.signals.run(this.#d.bind(this));
7635
7635
  }
7636
7636
  #s(n) {
7637
7637
  const t = n.get(this.muxer.element);
@@ -7741,10 +7741,10 @@ let Cc = class {
7741
7741
  this.source.close(), this.signals.close();
7742
7742
  }
7743
7743
  };
7744
- async function xc(e) {
7744
+ async function qc(e) {
7745
7745
  return MediaSource.isTypeSupported(`video/mp4; codecs="${e.codec}"`);
7746
7746
  }
7747
- class qc {
7747
+ class Zc {
7748
7748
  decoder;
7749
7749
  // The canvas to render the video to.
7750
7750
  canvas;
@@ -7809,7 +7809,7 @@ class qc {
7809
7809
  this.#n?.close(), this.#n = void 0, this.#e.close();
7810
7810
  }
7811
7811
  }
7812
- function Zc(e) {
7812
+ function Fc(e) {
7813
7813
  return (n) => {
7814
7814
  const t = [], r = [];
7815
7815
  for (const [s, i] of n)
@@ -7820,7 +7820,7 @@ function Zc(e) {
7820
7820
  return t.sort((s, i) => i.size - s.size), t.length > 0 ? t.map((s) => s.name) : r.length > 0 ? (r.sort((s, i) => s.size - i.size), [r[0].name]) : n.map(([s]) => s);
7821
7821
  };
7822
7822
  }
7823
- function Fc(e) {
7823
+ function Bc(e) {
7824
7824
  return (n) => {
7825
7825
  const t = [], r = [];
7826
7826
  for (const [s, i] of n)
@@ -7828,7 +7828,7 @@ function Fc(e) {
7828
7828
  return t.sort((s, i) => i.bitrate - s.bitrate), t.length > 0 ? t.map((s) => s.name) : r.length > 0 ? (r.sort((s, i) => s.bitrate - i.bitrate), [r[0].name]) : n.map(([s]) => s);
7829
7829
  };
7830
7830
  }
7831
- function Bc(e) {
7831
+ function jc(e) {
7832
7832
  let n = e[0];
7833
7833
  for (const t of e) {
7834
7834
  const [, r] = t, [, s] = n, i = (r.codedWidth ?? 0) * (r.codedHeight ?? 0), o = (s.codedWidth ?? 0) * (s.codedHeight ?? 0);
@@ -7840,7 +7840,7 @@ function Bc(e) {
7840
7840
  }
7841
7841
  return n[0];
7842
7842
  }
7843
- let jc = class {
7843
+ let Vc = class {
7844
7844
  broadcast;
7845
7845
  target;
7846
7846
  #n = new h(void 0);
@@ -7895,8 +7895,8 @@ let jc = class {
7895
7895
  if (r.length === 0) return;
7896
7896
  if (r.length === 1) return r[0][0];
7897
7897
  const s = [];
7898
- if (t?.pixels != null && s.push(Zc(t.pixels)), t?.bitrate != null && s.push(Fc(t.bitrate)), s.length === 0)
7899
- return Bc(r);
7898
+ if (t?.pixels != null && s.push(Fc(t.pixels)), t?.bitrate != null && s.push(Bc(t.bitrate)), s.length === 0)
7899
+ return jc(r);
7900
7900
  const i = s.map((a) => a(r)), o = i.map((a) => new Set(a));
7901
7901
  for (const a of i[0])
7902
7902
  if (o.every((c) => c.has(a)))
@@ -7915,7 +7915,7 @@ function At(e) {
7915
7915
  }
7916
7916
  return n;
7917
7917
  }
7918
- class Vc {
7918
+ class Lc {
7919
7919
  // The source of the video.
7920
7920
  source;
7921
7921
  // The stats of the video.
@@ -7930,7 +7930,7 @@ class Vc {
7930
7930
  this.source = n;
7931
7931
  }
7932
7932
  }
7933
- class Lc {
7933
+ class Gc {
7934
7934
  source;
7935
7935
  // The volume of the audio, between 0 and 1.
7936
7936
  volume = new h(0.5);
@@ -7944,7 +7944,7 @@ class Lc {
7944
7944
  this.source = n;
7945
7945
  }
7946
7946
  }
7947
- class ru {
7947
+ class su {
7948
7948
  element = new h(void 0);
7949
7949
  broadcast;
7950
7950
  jitter;
@@ -7957,22 +7957,22 @@ class ru {
7957
7957
  #e;
7958
7958
  signals = new C();
7959
7959
  constructor(n) {
7960
- this.element = h.from(n?.element), this.broadcast = h.from(n?.broadcast), this.jitter = h.from(n?.jitter ?? 100), this.#e = new Pc({ jitter: this.jitter }), this.#n = new jc(this.#e, {
7960
+ this.element = h.from(n?.element), this.broadcast = h.from(n?.broadcast), this.jitter = h.from(n?.jitter ?? 100), this.#e = new Uc({ jitter: this.jitter }), this.#n = new Vc(this.#e, {
7961
7961
  broadcast: this.broadcast
7962
- }), this.#r = new Wc(this.#e, {
7962
+ }), this.#r = new Hc(this.#e, {
7963
7963
  broadcast: this.broadcast
7964
- }), this.video = new Vc(this.#n), this.audio = new Lc(this.#r), this.paused = h.from(n?.paused ?? !1), this.signals.run(this.#t.bind(this));
7964
+ }), this.video = new Lc(this.#n), this.audio = new Gc(this.#r), this.paused = h.from(n?.paused ?? !1), this.signals.run(this.#t.bind(this));
7965
7965
  }
7966
7966
  #t(n) {
7967
7967
  const t = n.get(this.element);
7968
7968
  t && (t instanceof HTMLCanvasElement ? this.#s(n, t) : t instanceof HTMLVideoElement && this.#i(n, t));
7969
7969
  }
7970
7970
  #s(n, t) {
7971
- const r = new Nc(this.#n), s = new Ec(this.#r), i = new Ac(s, {
7971
+ const r = new Mc(this.#n), s = new Tc(this.#r), i = new Pc(s, {
7972
7972
  volume: this.audio.volume,
7973
7973
  muted: this.audio.muted,
7974
7974
  paused: this.paused
7975
- }), o = new qc(r, { canvas: t, paused: this.paused });
7975
+ }), o = new Zc(r, { canvas: t, paused: this.paused });
7976
7976
  n.cleanup(() => {
7977
7977
  r.close(), s.close(), i.close(), o.close();
7978
7978
  }), n.proxy(this.video.stats, r.stats), n.proxy(this.video.buffered, r.buffered), n.proxy(this.video.stalled, r.stalled), n.proxy(this.video.timestamp, r.timestamp), n.proxy(this.audio.stats, s.stats), n.proxy(this.audio.buffered, s.buffered);
@@ -7981,7 +7981,7 @@ class ru {
7981
7981
  const r = new Ot(this.#e, {
7982
7982
  paused: this.paused,
7983
7983
  element: t
7984
- }), s = new Cc(r, this.#n), i = new Gc(r, this.#r, {
7984
+ }), s = new xc(r, this.#n), i = new Jc(r, this.#r, {
7985
7985
  volume: this.audio.volume,
7986
7986
  muted: this.audio.muted
7987
7987
  });
@@ -7993,7 +7993,7 @@ class ru {
7993
7993
  this.signals.close();
7994
7994
  }
7995
7995
  }
7996
- class Gc {
7996
+ class Jc {
7997
7997
  muxer;
7998
7998
  source;
7999
7999
  volume;
@@ -8004,7 +8004,7 @@ class Gc {
8004
8004
  buffered = this.#r;
8005
8005
  #e = new C();
8006
8006
  constructor(n, t, r) {
8007
- this.muxer = n, this.source = t, this.source.supported.set(Jc), this.volume = h.from(r?.volume ?? 0.5), this.muted = h.from(r?.muted ?? !1), this.#e.run(this.#t.bind(this)), this.#e.run(this.#a.bind(this));
8007
+ this.muxer = n, this.source = t, this.source.supported.set(Wc), this.volume = h.from(r?.volume ?? 0.5), this.muted = h.from(r?.muted ?? !1), this.#e.run(this.#t.bind(this)), this.#e.run(this.#a.bind(this));
8008
8008
  }
8009
8009
  #t(n) {
8010
8010
  const t = n.get(this.muxer.element);
@@ -8095,10 +8095,10 @@ class Gc {
8095
8095
  this.#e.close();
8096
8096
  }
8097
8097
  }
8098
- async function Jc(e) {
8098
+ async function Wc(e) {
8099
8099
  return MediaSource.isTypeSupported(`audio/mp4; codecs="${e.codec}"`);
8100
8100
  }
8101
- class Wc {
8101
+ class Hc {
8102
8102
  broadcast;
8103
8103
  target;
8104
8104
  #n = new h(void 0);
@@ -8159,7 +8159,7 @@ class Wc {
8159
8159
  this.#s.close();
8160
8160
  }
8161
8161
  }
8162
- class su {
8162
+ class iu {
8163
8163
  connection;
8164
8164
  enabled;
8165
8165
  name;
@@ -8173,7 +8173,7 @@ class su {
8173
8173
  #e = new h(!1);
8174
8174
  signals = new C();
8175
8175
  constructor(n) {
8176
- this.connection = h.from(n?.connection), this.name = h.from(n?.name), this.enabled = h.from(n?.enabled ?? !1), this.reload = h.from(n?.reload ?? !1), this.signals.run(this.#t.bind(this)), this.signals.run(this.#s.bind(this)), this.signals.run(this.#i.bind(this));
8176
+ this.connection = h.from(n?.connection), this.name = h.from(n?.name ?? $t.empty()), this.enabled = h.from(n?.enabled ?? !1), this.reload = h.from(n?.reload ?? !1), this.signals.run(this.#t.bind(this)), this.signals.run(this.#s.bind(this)), this.signals.run(this.#i.bind(this));
8177
8177
  }
8178
8178
  #t(n) {
8179
8179
  if (!n.get(this.enabled)) return;
@@ -8183,9 +8183,7 @@ class su {
8183
8183
  }
8184
8184
  const s = n.get(this.connection);
8185
8185
  if (!s) return;
8186
- const i = n.get(this.name);
8187
- if (i === void 0) return;
8188
- const o = s.announced(i);
8186
+ const i = n.get(this.name), o = s.announced(i);
8189
8187
  n.cleanup(() => o.close()), n.spawn(async () => {
8190
8188
  for (; ; ) {
8191
8189
  const a = await o.next();
@@ -8201,9 +8199,7 @@ class su {
8201
8199
  #s(n) {
8202
8200
  const t = n.getAll([this.enabled, this.#e, this.connection]);
8203
8201
  if (!t) return;
8204
- const [r, s, i] = t, o = n.get(this.name);
8205
- if (o === void 0) return;
8206
- const a = i.consume(o);
8202
+ const [r, s, i] = t, o = n.get(this.name), a = i.consume(o);
8207
8203
  n.cleanup(() => a.close()), n.set(this.#n, a);
8208
8204
  }
8209
8205
  #i(n) {
@@ -8217,7 +8213,7 @@ class su {
8217
8213
  async #o(n) {
8218
8214
  try {
8219
8215
  for (; ; ) {
8220
- const t = await Ra(n);
8216
+ const t = await Na(n);
8221
8217
  if (!t) break;
8222
8218
  console.debug("received catalog", this.name.peek(), t), this.#r.set(t), this.status.set("live");
8223
8219
  }
@@ -8232,22 +8228,22 @@ class su {
8232
8228
  }
8233
8229
  }
8234
8230
  export {
8235
- su as B,
8236
- Nc as D,
8237
- Ac as E,
8238
- Cc as M,
8231
+ iu as B,
8232
+ Mc as D,
8233
+ Pc as E,
8234
+ xc as M,
8239
8235
  ue as P,
8240
- qc as R,
8241
- jc as S,
8242
- Ec as a,
8243
- Gc as b,
8244
- Wc as c,
8245
- Kc as d,
8236
+ Zc as R,
8237
+ Vc as S,
8238
+ Tc as a,
8239
+ Jc as b,
8240
+ Hc as c,
8241
+ Yc as d,
8246
8242
  ht as e,
8247
- Yc as f,
8248
- ru as g,
8249
- Pc as h,
8250
- eu as m,
8243
+ Qc as f,
8244
+ su as g,
8245
+ Uc as h,
8246
+ nu as m,
8251
8247
  At as t
8252
8248
  };
8253
- //# sourceMappingURL=broadcast-DFnI-aDr.js.map
8249
+ //# sourceMappingURL=broadcast-Djx16jPC.js.map